index of
/
home
/
thefkyzp
/
www
/
wp-content
/
plugins
/
forminator
/
assets
/
forminator-ui
/
js
/
File: /home/thefkyzp/www/wp-content/plugins/forminator/assets/forminator-ui/js/forminator-ui.min.js
/*! * WPMU DEV Forminator UI * Copyright 2019 Incsub (https://incsub.com) * Licensed under GPL v3 (http://www.gnu.org/licenses/gpl-3.0.html) */ /*! * WPMU DEV Forminator UI * Copyright 2019 Incsub (https://incsub.com) * Licensed under GPL v3 (http://www.gnu.org/licenses/gpl-3.0.html) */ function _createForOfIteratorHelper(t,e){var o="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!o){if(Array.isArray(t)||(o=_unsupportedIterableToArray(t))||e&&t&&"number"==typeof t.length){o&&(t=o);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var n,a=!0,s=!1;return{s:function(){o=o.call(t)},n:function(){var t=o.next();return a=t.done,t},e:function(t){s=!0,n=t},f:function(){try{a||null==o.return||o.return()}finally{if(s)throw n}}}}function _unsupportedIterableToArray(t,e){if(t){if("string"==typeof t)return _arrayLikeToArray(t,e);var o={}.toString.call(t).slice(8,-1);return"Object"===o&&t.constructor&&(o=t.constructor.name),"Map"===o||"Set"===o?Array.from(t):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?_arrayLikeToArray(t,e):void 0}}function _arrayLikeToArray(t,e){(null==e||e>t.length)&&(e=t.length);for(var o=0,r=Array(e);o<e;o++)r[o]=t[o];return r}function ownKeys(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),o.push.apply(o,r)}return o}function _objectSpread(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(Object(o),!0).forEach((function(e){_defineProperty(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):ownKeys(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}function _defineProperty(t,e,o){return(e=_toPropertyKey(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function _toPropertyKey(t){var e=_toPrimitive(t,"string");return"symbol"==_typeof(e)?e:e+""}function _toPrimitive(t,e){if("object"!=_typeof(t)||!t)return t;var o=t[Symbol.toPrimitive];if(void 0!==o){var r=o.call(t,e||"default");if("object"!=_typeof(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}function _typeof(t){return _typeof="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},_typeof(t)}!function(t){"use strict";"object"!==_typeof(window.FUI)&&(window.FUI={}),FUI.formLoad=function(e){var o,r,i,n,a,s,l=t(e),d=l.find(".forminator-response-message");if(l.is(".forminator-ui")||l.is(".forminator-custom-form"))return d.removeClass("forminator-show"),d.removeClass("forminator-accessible"),d.attr("aria-hidden","true"),o=l.data("id"),r=l.data("id"),o.length&&""!==o&&l.addClass("forminator-form-"+r),i=l.data("design"),n=l.data("design"),i&&""!==i?l.addClass("forminator-design--"+n):l.addClass("forminator-design--none"),a=l.data("grid"),s=l.data("grid"),l.removeClass("forminator-custom"),l.removeClass("forminator-enclosed"),a&&""!==a&&"open"!==a&&l.addClass("forminator-"+s),this}}(jQuery),function(t){"use strict";"object"!==_typeof(window.FUI)&&(window.FUI={}),FUI.formSimulation=function(e){var o=t(e),r=o.closest("form"),i=r.find(".forminator-response-message"),n="";if(r.is(".forminator-ui")||r.is(".forminator-custom-form"))return o.on("click",(function(t){return a(),t.preventDefault(),t.stopPropagation(),!1})),this;function a(){var e=r.find(".forminator-input"),o=e.closest(".forminator-field"),a=e.closest(".forminator-field.forminator-is_required"),s=a.find(".forminator-input").filter((function(){return!!this.value})),l=r.find(".forminator-textarea"),d=l.closest(".forminator-field"),f=l.closest(".forminator-field.forminator-is_required").find(".forminator-textarea").val(),c=r.find(".forminator-field-radio"),u=r.find(".forminator-field-radio.forminator-is_required").find("input:checked"),m=r.find(".forminator-multiselect"),p=m.closest(".forminator-field"),h=m.closest(".forminator-field.forminator-is_required").find("input:checked");n="",i.html(n),i.removeClass("forminator-show"),i.removeClass("forminator-accessible"),i.removeClass("forminator-error"),i.removeClass("forminator-success"),i.attr("aria-hidden","true"),i.removeAttr("tabindex"),r.find(".forminator-field").removeClass("forminator-has_error"),o.hasClass("forminator-is_required")&&s.length!==a.length||d.hasClass("forminator-is_required")&&""===f.length||c.hasClass("forminator-is_required")&&0===u.length||p.hasClass("forminator-is_required")&&0===h.length?(r.find(".forminator-input").each((function(){var e=t(this),o=e.closest(".forminator-field"),r=o.find(".forminator-label");o.hasClass("forminator-is_required")&&""===e.val()&&(o.addClass("forminator-has_error"),r.length?n+="<li>"+r.text()+" needs to be filled.</li>":n+="<li>"+e.prop("id")+" needs to be filled.</li>")})),i.html(n),r.find(".forminator-textarea").each((function(){var e=t(this),o=e.closest(".forminator-field"),r=o.find(".forminator-label");o.hasClass("forminator-is_required")&&""===e.val()&&(o.addClass("forminator-has_error"),r.length?n+="<li>"+r.text()+" needs to be filled.</li>":n+="<li>"+e.prop("id")+" needs to be filled.</li>")})),i.html(n),r.find(".forminator-field-radio").each((function(){var e=t(this),o=e.find(".forminator-label"),r=e.find(".forminator-radio"),i=r.find("input").map((function(){return this.id})).get();e.hasClass("forminator-is_required")&&0===r.find("input:checked").length&&(e.addClass("forminator-has_error"),o.length?n+="<li>"+o.text()+" needs at least one option selected.</li>":n+="<li>You must select at lease one of these options: "+i.join(",")+"</li>")})),i.html(n),r.find(".forminator-multiselect").each((function(){var e=t(this),o=e.closest(".forminator-field"),r=o.find(".forminator-label"),i=e.find(".forminator-option"),a=i.find("input").map((function(){return this.id})).get();o.hasClass("forminator-is_required")&&0===i.find("input:checked").length&&(o.addClass("forminator-has_error"),r.length?n+="<li>"+r.text()+" needs at least one option selected.</li>":n+="<li>You must select at lease one of these options: "+a.join(",")+"</li>")})),i.html(n),i.addClass("forminator-accessible"),i.removeAttr("aria-hidden"),i.prop("tabindex","-1"),i.focus()):(n="<p>Form was submitted successfully.</p>",i.html(n),i.addClass("forminator-success"),i.addClass("forminator-show"),i.removeAttr("aria-hidden"),i.prop("tabindex","-1"),i.focus())}}}(jQuery),function(t){"use strict";"object"!==_typeof(window.FUI)&&(window.FUI={}),FUI.inputStates=function(e){var o=t(e),r=o.closest("form");if(o.is("input")||r.is(".forminator-poll")&&(r.is(".forminator-ui")||r.is(".forminator-custom-form")))return o.each((function(){var e,o;e=t(this),o=e.closest(".forminator-field"),e.mouseover((function(t){o.addClass("forminator-is_hover"),t.stopPropagation()})).mouseout((function(t){o.removeClass("forminator-is_hover"),t.stopPropagation()})),function(e){var o=t(e),r=o.closest(".forminator-field");o.focus((function(t){r.addClass("forminator-is_active"),t.stopPropagation()})).blur((function(t){r.removeClass("forminator-is_active"),t.stopPropagation()}))}(this),function(e){var o=t(e),r=o.closest(".forminator-field");""!==o.val().trim()&&r.addClass("forminator-is_filled"),o.on("change",(function(){""!==o.val().trim()?r.addClass("forminator-is_filled"):r.removeClass("forminator-is_filled")}))}(this)})),this}}(jQuery),function(t){"use strict";"object"!==_typeof(window.FUI)&&(window.FUI={}),FUI.inputMaterial=function(e){var o=t(e),r=o.closest(".forminator-field"),i=r.find(".forminator-label"),n=o.closest("form");if(o.is("input")||n.is(".forminator-poll")&&(n.is(".forminator-ui")||n.is(".forminator-custom-form")))return o.parent().hasClass("forminator-input--wrap")||o.wrap('<div class="forminator-input--wrap"></div>'),i.length&&(i.addClass("forminator-floating--input"),r.find(".forminator-input-with-icon").length&&i.addClass("forminator-has_icon"),r.find(".forminator-input-with-phone").length&&(i.addClass("forminator-has_phone"),r.find(".intl-tel-input").hasClass("allow-dropdown")&&i.addClass("allow-dropdown"))),this}}(jQuery),function(t){"use strict";"object"!==_typeof(window.FUI)&&(window.FUI={}),FUI.textareaStates=function(e){var o=t(e),r=o.closest("form");if(o.is("textarea")||r.is(".forminator-ui")||r.is(".forminator-custom-form"))return o.each((function(){var e,o;e=t(this),o=e.closest(".forminator-field"),e.mouseover((function(t){o.addClass("forminator-is_hover"),t.stopPropagation()})).mouseout((function(t){o.removeClass("forminator-is_hover"),t.stopPropagation()})),function(e){var o=t(e),r=o.closest(".forminator-field");o.focus((function(t){r.addClass("forminator-is_active"),t.stopPropagation()})).blur((function(t){r.removeClass("forminator-is_active"),t.stopPropagation()}))}(this),function(e){var o=t(e),r=o.closest(".forminator-field");o.on("load",(function(){""!==o.val().trim()&&r.addClass("forminator-is_filled")})),o.on("change",(function(){""!==o.val().trim()?r.addClass("forminator-is_filled"):r.removeClass("forminator-is_filled")}))}(this)})),this}}(jQuery),function(t){"use strict";"object"!==_typeof(window.FUI)&&(window.FUI={}),FUI.textareaMaterial=function(e){var o=t(e),r=o.closest(".forminator-field"),i=r.find(".forminator-label"),n=o.closest("form");if((o.is("textarea")||n.is(".forminator-ui")||n.is(".forminator-custom-form"))&&!o.hasClass("wp-editor-area"))return function(){if(o.parent().hasClass("forminator-textarea--wrap")||o.wrap('<div class="forminator-textarea--wrap"></div>'),i.length){var t=(0===i.height()?20:i.height())+9;i.addClass("forminator-floating--textarea"),r.css({position:"relative"}),o.val()&&r.addClass("forminator-is_filled"),r.hasClass("forminator-is_filled")&&r.hasClass("forminator-is_active")||i.css({"padding-top":t+"px"}),o.css({"padding-top":t+"px"})}}(),this}}(jQuery),function(t){"use strict";"object"!==_typeof(window.FUI)&&(window.FUI={}),FUI.radioStates=function(e){var o=t(e),r=o.find("input");if(o.is("label")&&"radio"===r.prop("type"))return r.each((function(){t(this).on("click",(function(){var e=t(this),o=e.parent(),r=o.closest(".forminator-field").find(".forminator-radio");r.find("input").prop("checked",!1),r.removeClass("forminator-is_checked"),e.prop("checked","checked"),o.addClass("forminator-is_checked")}))})),this}}(jQuery),function(t){"use strict";"object"!==_typeof(window.FUI)&&(window.FUI={}),FUI.checkboxStates=function(e){var o=t(e),r=o.find("input");if(o.is("label")&&"checkbox"===r.prop("type"))return r.each((function(){t(this).on("click",(function(){var e=t(this).parent();e.is(".forminator-is_checked")?e.removeClass("forminator-is_checked"):e.addClass("forminator-is_checked")}))})),this}}(jQuery),function(t){"use strict";"object"!==_typeof(window.FUI)&&(window.FUI={}),FUI.multiSelectStates=function(e){var o=t(e),r=o.find(".forminator-option"),i=r.find("input");if(o.is(".forminator-multiselect")&&0!==r.length)return i.each((function(){t(this).on("click",(function(){var e=t(this).parent();e.is(".forminator-is_checked")?e.removeClass("forminator-is_checked"):e.addClass("forminator-is_checked")}))})),this}}(jQuery),function(t){"use strict";"object"!==_typeof(window.FUI)&&(window.FUI={}),FUI.select={},FUI.select.escapeJS=function(e){return t("<div>").html(e).text().replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,"")},FUI.select.formatCheckbox=function(t,e){var o=FUI.select.escapeJS(t.text),r=t.selected,i=o.toLowerCase().replace(/\s+/g,"-");return t.id&&(i=t.id),'<label for="'+i+'" class="forminator-checkbox"><input type="checkbox" value="'+o+'" id="'+i+'" '+(r?"checked":"")+' /><span class="forminator-checkbox-box" aria-hidden="true"></span><span class="forminator-select-label">'+o+"</span></label>"},FUI.select2=function(){t(".forminator-custom-form").each((function(){var e=t(this),o=e.data("form-id"),r=e.find(".forminator-select2");t.each(["bold","flat","default","material","none"],(function(i,n){var a,s="en",l="Select",d=-1,f=!1;e.hasClass("forminator-design--"+n)&&r.length&&r.each((function(){var e=t(this),r=e.closest(".sui-dialog-content"),i=r.length?r:e.closest(".elementor-popup-modal"),c="forminator-custom-form-"+o+" forminator-dropdown--"+n;a=!0===e.data("rtl-support")?"rtl":"ltr",l=e.data("placeholder")?e.data("placeholder"):"Select",s=e.data("language")?e.data("language"):"en",d=!0===e.data("search")?0:-1,!0===e.data("checkbox")?(f=!0,c+=" forminator-dropdown--checkbox"):f=!1,e.prop("multiple")&&(c+=" forminator-dropdown--multiple"),i.length||(i=t(document.body)),e.FUIselect2(_objectSpread({dir:a,language:s,placeholder:l,dropdownCssClass:c,minimumResultsForSearch:d,dropdownParent:i},f&&{closeOnSelect:!1,templateResult:FUI.select.formatCheckbox,escapeMarkup:function(t){return t}})).on("select2:opening",(function(){e.data("search-placeholder")?e.data("select2").$dropdown.find(":input.select2-search__field").prop("placeholder",e.data("search-placeholder")):e.data("select2").$dropdown.find(":input.select2-search__field").prop("placeholder",e.data("placeholder")?e.data("placeholder"):"Search"),(e.closest(".hustle-popup").length||e.closest(".hustle-slidein"))&&t(document.body).addClass("forminator-hustle-dropdown-fix")})).on("select2:closing",(function(){t(document.body).removeClass("forminator-hustle-dropdown-fix")}))}))}))}))}}(jQuery),function(){"use strict";"object"!==_typeof(window.FUI)&&(window.FUI={});var t=t||{};t.KeyCode={BACKSPACE:8,TAB:9,RETURN:13,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},t.Utils=t.Utils||{},t.Utils.remove=function(t){return t.remove&&"function"==typeof t.remove?t.remove():!(!t.parentNode||!t.parentNode.removeChild||"function"!=typeof t.parentNode.removeChild)&&t.parentNode.removeChild(t)},t.Utils.isFocusable=function(t){if(0<t.tabIndex||0===t.tabIndex&&null!==t.getAttribute("tabIndex"))return!0;if(t.disabled)return!1;switch(t.nodeName){case"A":return!!t.href&&"ignore"!=t.rel;case"INPUT":return"hidden"!=t.type&&"file"!=t.type;case"BUTTON":case"SELECT":case"TEXTAREA":return!0;default:return!1}},t.Utils.simulateClick=function(t){var e=new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window});t.dispatchEvent(e)},t.Utils.IgnoreUtilFocusChanges=!1,t.Utils.dialogOpenClass="forminator-authentication-enabled",t.Utils.focusFirstDescendant=function(e){for(var o=0;o<e.childNodes.length;o++){var r=e.childNodes[o];if(t.Utils.attemptFocus(r)||t.Utils.focusFirstDescendant(r))return!0}return!1},t.Utils.focusLastDescendant=function(e){for(var o=e.childNodes.length-1;0<=o;o--){var r=e.childNodes[o];if(t.Utils.attemptFocus(r)||t.Utils.focusLastDescendant(r))return!0}return!1},t.Utils.attemptFocus=function(e){if(!t.Utils.isFocusable(e))return!1;t.Utils.IgnoreUtilFocusChanges=!0;try{e.focus()}catch(t){}return t.Utils.IgnoreUtilFocusChanges=!1,document.activeElement===e},t.OpenDialogList=t.OpenDialogList||new Array(0),t.getCurrentDialog=function(){if(t.OpenDialogList&&t.OpenDialogList.length)return t.OpenDialogList[t.OpenDialogList.length-1]},t.closeCurrentDialog=function(){var e=t.getCurrentDialog();return!!e&&(e.close(),!0)},t.handleEscape=function(e){(e.which||e.keyCode)===t.Utils.ESC&&t.closeCurrentDialog()&&e.stopPropagation()},document.addEventListener("keyup",t.handleEscape),t.Authentication=function(e,o,r){if(this.dialogNode=document.getElementById(e),null===this.dialogNode)throw new Error('No element found with id="'+e+'".');var i=["dialog","alertdialog"];if(!(this.dialogNode.getAttribute("role")||"").trim().split(/\s+/g).some((function(t){return i.some((function(e){return t===e}))})))throw new Error("Dialog() requires a DOM element with ARIA role of dialog or alertdialog.");var n="forminator-authentication";if(this.dialogNode.parentNode.classList.contains(n)?this.backdropNode=this.dialogNode.parentNode:(this.backdropNode=document.createElement("div"),this.backdropNode.className=n,this.backdropNode.data("markup","new"),this.dialogNode.parentNode.insertBefore(this.backdropNode,this.dialogNodev),this.backdropNode.appendChild(this.dialogNode)),this.backdropNode.classList.add("forminator-active"),document.body.parentNode.classList.add(t.Utils.dialogOpenClass),"string"==typeof o)this.focusAfterClosed=document.getElementById(o);else{if("object"!==_typeof(o))throw new Error("the focusAfterClosed parameter is required for the aria.Authentication constructor.");this.focusAfterClosed=o}"string"==typeof r?this.focusFirst=document.getElementById(r):"object"===_typeof(r)?this.focusFirst=r:this.focusFirst=null;var a=document.createElement("div");this.preNode=this.dialogNode.parentNode.insertBefore(a,this.dialogNode),this.preNode.tabIndex=0;var s=document.createElement("div");this.postNode=this.dialogNode.parentNode.insertBefore(s,this.dialogNode.nextSibling),this.postNode.tabIndex=0,0<t.OpenDialogList.length&&t.getCurrentDialog().removeListeners(),this.addListeners(),t.OpenDialogList.push(this),this.dialogNode.classList.add("forminator-authentication-fade-in"),this.dialogNode.classList.remove("forminator-authentication-fade-out"),this.focusFirst?this.focusFirst.focus():t.Utils.focusFirstDescendant(this.dialogNode),this.lastFocus=document.activeElement},t.Authentication.prototype.close=function(){var e=this;t.OpenDialogList.pop(),this.removeListeners(),this.preNode.parentNode.removeChild(this.preNode),this.postNode.parentNode.removeChild(this.postNode),this.dialogNode.classList.add("forminator-content-fade-out"),this.dialogNode.classList.remove("forminator-content-fade-in"),this.focusAfterClosed.focus(),setTimeout((function(){e.backdropNode.classList.remove("forminator-active")}),300),0<t.OpenDialogList.length?t.getCurrentDialog().addListeners():document.body.parentNode.classList.remove(t.Utils.dialogOpenClass)},t.Authentication.prototype.addListeners=function(){document.addEventListener("focus",this.trapFocus,!0)},t.Authentication.prototype.removeListeners=function(){document.removeEventListener("focus",this.trapFocus,!0)},t.Authentication.prototype.trapFocus=function(e){if(!t.Utils.IgnoreUtilFocusChanges){var o=t.getCurrentDialog();o.dialogNode.contains(e.target)?o.lastFocus=e.target:(t.Utils.focusFirstDescendant(o.dialogNode),o.lastFocus==document.activeElement&&t.Utils.focusLastDescendant(o.dialogNode),o.lastFocus=document.activeElement)}},FUI.openAuthentication=function(e,o,r){new t.Authentication(e,o,r)},FUI.closeAuthentication=function(){t.getCurrentDialog().close()}}(),function(t){"use strict";"object"!==_typeof(window.FUI)&&(window.FUI={}),FUI.slider=function(){function e(e,o){return(e.find(".forminator-slider-amount").data("value-template")||"{slider-value}").replace("{slider-value}",'<span class="forminator-slider-value">'+t("<div>").text(o).html()+"</span>")}function o(t,e,o,r,i){var n=t.find(".forminator-slider-amount"),a=t.find(".forminator-slide").data("is-range");n.find(".forminator-slider-value-min").html(e),a&&(r===i?(n.find(".forminator-slider-separator").hide(),n.find(".forminator-slider-value-max").html("")):(n.find(".forminator-slider-separator").show(),n.find(".forminator-slider-value-max").html(o)))}t(".forminator-slider").each((function(){var r=t(this),i=r.find(".forminator-slide"),n=r.find(".forminator-hidden-input"),a=r.hasClass("forminator-disabled"),s=i.data("is-range"),l=parseInt(i.data("min"))||0,d=parseInt(i.data("max"))||100,f=parseInt(i.data("value"))||l,c=parseInt(i.data("value-max"))||d,u=parseInt(i.data("step"))||1,m=r.find(".forminator-slider-amount"),p=t('label[for="'+n.attr("id")+'"]');!0!==i.data("init")&&(i.slider(_objectSpread(_objectSpread({range:!!s||"min",min:l,max:d,disabled:a,step:u},s?{values:[f,c]}:{value:f}),{},{create:function(t,n){var a=e(r,f),l=s?e(r,c):null;i.data("init",!0),m.find(".forminator-slider-hidden-min").val(f).change(),s&&m.find(".forminator-slider-hidden-max").val(c).change(),o(r,a,l,f,c)},slide:function(t,i){var n=s?i.values[0]:i.value,a=s?i.values[1]:null,l=e(r,n),d=s?e(r,a):null;o(r,l,d,n,a)},stop:function(t,e){var o=s?e.values[0]:e.value,i=s?e.values[1]:null;e.handle===r.find(".ui-slider-handle")[0]?m.find(".forminator-slider-hidden-min").val(o).change():e.handle===r.find(".ui-slider-handle")[1]?m.find(".forminator-slider-hidden-max").val(i).change():m.find(".forminator-slider-hidden-min").val(o).change()}})),p.on("click",(function(){var e=i.find(".ui-slider-handle");a||(s&&1<e.length?t(e[0]).focus():e.focus())})))}))}}(jQuery),function(t){"use strict";var e=!1;"object"!==_typeof(window.FUI)&&(window.FUI={}),FUI.rating=function(o){o.each((function(){var e,o=t(this),r=o.attr("id"),i=o.find("option").not(":disabled"),n=i.length,a=o.attr("data-type")||"star",s=o.attr("data-size")||"md",l=Number(o.find("option:selected").val())||0,d=t('<div class="forminator-rating-wrapper"></div>'),f=t('<span data-id="'+r+'" data-selected-value="'+l+'" class="forminator-rating-items forminator-rating-'+s+'"></span>');for("true"===(o.attr("data-init")||"false")&&o.next(".forminator-rating-wrapper").remove(),e=0;e<n;e++){var c=Number(i.eq(e).val()),u=c<=l?"forminator-rating-item forminator-rating-selected":"forminator-rating-item";f.append('<span class="'+u+'" data-value="'+c+'"><i class="forminator-icon-'+a+'" aria-hidden="true"></i></span>')}o.attr("data-selected-value",l),o.attr("data-total-value",n),d.append(f),"true"===o.attr("data-suffix")&&f.append('<span class="forminator-rating-suffix">('+l+"/"+n+")</span>"),o.after(d),o.attr("data-init","true"),o.on("change",(function(){var e=Number(t(this).val())||0,o=t('[data-id="'+r+'"]'),i=o.find(".forminator-rating-suffix");o.attr("data-selected-value",e),t(this).attr("data-selected-value",e),o.children().removeClass("forminator-rating-selected"),o.children().each((function(){t(this).data("value")<=e&&t(this).addClass("forminator-rating-selected")})),i.length&&i.text("("+e+"/"+o.children().not(".forminator-rating-suffix").length+")")}))})),e||(FUI.rating.events(),e=!0)},FUI.rating.events=function(){t(document).on("mouseenter",".forminator-rating-item",(function(){var e=t(this);e.siblings().removeClass("forminator-rating-selected"),e.prevAll().addBack().addClass("forminator-rating-hover")})),t(document).on("mouseleave",".forminator-rating-item",(function(){var e=t(this),o=e.closest(".forminator-rating-items").data("id"),r=t("#"+o),i=Number(r.find("option:selected").val());e.prevAll().addBack().removeClass("forminator-rating-hover"),e.siblings().addBack().each((function(){t(this).data("value")<=i?t(this).addClass("forminator-rating-selected"):t(this).removeClass("forminator-rating-selected")}))})),t(document).on("click",".forminator-rating-item",(function(){var e=t(this),o=Number(e.data("value")),r=e.closest(".forminator-rating-items"),i=r.data("id"),n=t("#"+i),a=r.find(".forminator-rating-suffix");n.val(o).trigger("change"),r.attr("data-selected-value",o),n.attr("data-selected-value",o),e.siblings().removeClass("forminator-rating-selected"),e.prevAll().addBack().addClass("forminator-rating-selected"),a.length&&a.text("("+o+"/"+r.children().not(".forminator-rating-suffix").length+")")})),t(document).on("focus",".forminator-rating",(function(){t(this).next(".forminator-rating-wrapper").addClass("forminator-rating-focused")})),t(document).on("blur",".forminator-rating",(function(){t(this).next(".forminator-rating-wrapper").removeClass("forminator-rating-focused")})),t(document).on("keydown",".forminator-rating",(function(e){var o=t(this),r=o.find("option"),i=r.index(o.find("option:selected"));"ArrowUp"!==e.key&&"ArrowRight"!==e.key&&"ArrowDown"!==e.key&&"ArrowLeft"!==e.key||e.preventDefault(),("ArrowUp"===e.key||"ArrowRight"===e.key)&&i<r.length-1?r.eq(i+1).prop("selected",!0).trigger("change"):("ArrowDown"===e.key||"ArrowLeft"===e.key)&&0<i&&r.eq(i-1).prop("selected",!0).trigger("change")}))}}(jQuery),function(t){"use strict";"object"!==_typeof(window.FUI)&&(window.FUI={}),FUI.pollChart=function(e,o){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"horizontalBar",i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",n=t(e);if("bar"===r&&(r="horizontalBar"),void 0!==o&&0!==o.length)return function(){var e,s=[],l=[],d=[],f=_createForOfIteratorHelper(o);try{for(f.s();!(e=f.n()).done;){var c=e.value;"pie"===r?s.push(c[0]):s.push(a(c[0],20)),l.push(c[1]),d.push(c[2])}}catch(t){f.e(t)}finally{f.f()}var u={votesLabel:"vote(s)",votesOnPoll:!1,basicColors:["#E5E5E5","#777771","#333333"],tooltipsBasic:["#333333","#FFFFFF"]};""===i&&(i=[u.votesLabel,u.votesOnPoll,u.basicColors,u.tooltipsBasic]);var m={labels:s,datasets:[{data:l,backgroundColor:d,borderWidth:0}]},p={legend:{display:!1},tooltips:{callbacks:{title:function(t,e){var o="";return"pie"!==r&&(o=t[0].yLabel),o},label:function(t,e){var o=e.datasets[t.datasetIndex].label||"";return"pie"===r?(o=e.labels[t.index],!0===i[1]&&(o+=": "+e.datasets[0].data[t.index])):!0===i[1]&&(o+=Math.round(100*t.xLabel)/100),!0===i[1]&&(o+=" "+i[0]),o}},backgroundColor:i[3][0],titleFontColor:i[3][1],titleFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",titleFontSize:13,titleFontStyle:"bold",titleMarginBottom:10,bodyFontColor:i[3][1],bodyFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",bodyFontSize:12,bodyFontStyle:"normal"},scales:{xAxes:[{display:"pie"!==r,ticks:{fontColor:i[2][1],beginAtZero:!0},gridLines:{color:i[2][0]}}],yAxes:[{display:"pie"!==r,ticks:{fontColor:i[2][1],beginAtZero:!0},gridLines:{color:i[2][0]}}]},plugins:{datalabels:{display:"pie"!==r&&i[1],align:"end",anchor:"start",textAlign:"center",color:i[2][2],formatter:function(t){return t+" "+i[0]}}}};n.each((function(){n=t(this),new Chart(n,{type:r,data:m,plugins:[ChartDataLabels],options:p}),"pie"===r&&(n.wrap('<div class="forminator-chart-wrapper" aria-hidden="true" />'),n.parent().prepend('<ul class="forminator-chart-legend"></ul>'),o.forEach((function(t){!0===i[1]?n.parent().find(".forminator-chart-legend").append('<li><span class="forminator-chart-legend--color" style="background-color: '+t[2]+'" aria-hidden="true"></span><strong>'+t[0]+":</strong> "+t[1]+" "+i[0]+"</li>"):n.parent().find(".forminator-chart-legend").append('<li><span class="forminator-chart-legend--color" style="background-color: '+t[2]+'" aria-hidden="true"></span><strong>'+t[0]+"</strong></li>")})))}))}(),this;function a(t,e){var o=[],r=t.split(" "),i="";return r.forEach((function(t,n){if(0<i.length){var a=i+" "+t;if(!(a.length>e))return n==r.length-1?void o.push(a):void(i=a);o.push(i),i=""}n!=r.length-1&&t.length<e?i=t:o.push(t)})),o}}}(jQuery),function(t){"use strict";"object"!==_typeof(window.FUI)&&(window.FUI={}),FUI.formSubmit=function(e){var o=t(e),r=o.closest(".forminator-custom-form");if(o.is(".forminator-button-submit")&&r[0]&&r.length)return o.addClass("forminator-button-onload"),setTimeout((function(){o.removeClass("forminator-button-onload")}),1e3),this}}(jQuery);