File: /home/centuryt/public_html/wp-content/themes/emoza-woocommerce/assets/js/customizer-scripts.min.js
"use strict";jQuery(document).ready(function(i){function n(o){var t={font:o.find(".google-fonts-list").val(),regularweight:o.find(".google-fonts-regularweight-style").val(),category:o.find(".google-fonts-category").val()};o.find(".customize-control-google-font-selection").val(JSON.stringify(t)).trigger("change")}i(".google-fonts-list").each(function(o,t){i(this).hasClass("select2-hidden-accessible")||i(this).select2()}),i(".google-fonts-list").on("change",function(){var e=i(this).parent().parent().find(".google-fonts-regularweight-style"),r=i(this).val(),o=i(this).attr("control-name");e.empty();var t=_wpCustomizeSettings.controls[o],o=i.map(t.emozafontslist,function(o,t){if(o.family===r)return t})[0];i.each(t.emozafontslist[o].variants,function(o,t){e.append(i("<option></option>").val(t).html(t)),0<i(e).find('option[value="regular"]').length?i(e).val("regular"):0<i(e).find('option[value="400"]').length?i(e).val("400"):0<i(e).find('option[value="300"]').length&&i(e).val("300")}),i(this).parent().parent().find(".google-fonts-category").val(t.emozafontslist[o].category),n(i(this).parent().parent().parent().parent())}),i(".google_fonts_select_control select").on("change",function(){n(i(this).parent().parent().parent().parent())})}),jQuery(document).ready(function(t){t(".emoza-devices-preview").find("button").on("click",function(o){t(this).hasClass("preview-desktop")?(t(".emoza-devices-preview").find(".preview-desktop").addClass("active"),t(".emoza-devices-preview").find(".preview-tablet").removeClass("active"),t(".emoza-devices-preview").find(".preview-mobile").removeClass("active"),t(".font-size-desktop").addClass("active"),t(".font-size-tablet").removeClass("active"),t(".font-size-mobile").removeClass("active"),t('.wp-full-overlay-footer .devices button[data-device="desktop"]').trigger("click")):t(this).hasClass("preview-tablet")?(t(".emoza-devices-preview").find(".preview-tablet").addClass("active"),t(".emoza-devices-preview").find(".preview-desktop").removeClass("active"),t(".emoza-devices-preview").find(".preview-mobile").removeClass("active"),t(".font-size-desktop").removeClass("active"),t(".font-size-tablet").addClass("active"),t(".font-size-mobile").removeClass("active"),t('.wp-full-overlay-footer .devices button[data-device="tablet"]').trigger("click")):(t(".emoza-devices-preview").find(".preview-mobile").addClass("active"),t(".emoza-devices-preview").find(".preview-desktop").removeClass("active"),t(".emoza-devices-preview").find(".preview-tablet").removeClass("active"),t(".font-size-desktop").removeClass("active"),t(".font-size-tablet").removeClass("active"),t(".font-size-mobile").addClass("active"),t('.wp-full-overlay-footer .devices button[data-device="mobile"]').trigger("click"))}),t(" .wp-full-overlay-footer .devices button ").on("click",function(){var o=t(this).attr("data-device");t(".emoza-devices-preview").find(".preview-"+o).trigger("click")})}),jQuery(document).ready(function(r){function i(o,t){t='<div class="repeater" style="display:none"><input type="text" value="'+(1<arguments.length&&void 0!==t?t:"")+'" class="repeater-input" placeholder="https://" /><span class="dashicons dashicons-menu"></span><a class="customize-control-sortable-repeater-delete" href="#"><span class="dashicons dashicons-no-alt"></span></a></div>';o.find(".sortable").append(t),o.find(".sortable").find(".repeater:last").slideDown("slow",function(){r(this).find("input").focus()})}function e(o){var t=o.find(".repeater-input").map(function(){return r(this).val()}).toArray();o.find(".customize-control-sortable-repeater").val(t),o.find(".customize-control-sortable-repeater").trigger("change")}r(".emoza-sortable_repeater_control").each(function(){var o=r(this).find(".customize-control-sortable-repeater").val().split(","),t=o.length;if(0<t&&(r(this).find(".repeater-input").val(o[0]),1<t))for(var e=1;e<t;++e)i(r(this),o[e])}),r(this).find(".emoza-sortable_repeater.sortable").sortable({update:function(o,t){e(r(this).parent())}}),r(".emoza-sortable_repeater.sortable").on("click",".customize-control-sortable-repeater-delete",function(o){o.preventDefault(),1<r(this).parent().parent().find(".repeater").length?r(this).parent().slideUp("fast",function(){var o=r(this).parent().parent();r(this).remove(),e(o)}):(r(this).parent().find(".repeater-input").val(""),e(r(this).parent().parent().parent()))}),r(".customize-control-sortable-repeater-add").click(function(o){o.preventDefault(),i(r(this).parent()),e(r(this).parent())}),r(".emoza-sortable_repeater.sortable").change(function(){e(r(this).parent())}),r(".emoza-sortable_repeater.sortable").on("blur",".repeater-input",function(){var o=r(this),t=o.val();t&&!t.match(/^.+:\/\/.*/)&&o.val("https://"+t).trigger("change")})}),jQuery(document).ready(function(i){function s(o){var t;return t=(o=o.replace(/ /g,"")).match(/rgba\(\d+\,\d+\,\d+\,([^\)]+)\)/)?(t=100*parseFloat(o.match(/rgba\(\d+\,\d+\,\d+\,([^\)]+)\)/)[1]).toFixed(2),parseInt(t)):100}function e(o,t,e,r){var i=t.data("a8cIris"),n=t.data("wpWpColorPicker");i._color._alpha=o,i=i._color.toString(),t.val(i),n.toggler.css({"background-color":i}),r&&d(o,e),t.wpColorPicker("color",i)}function d(o,t){t.slider("value",o),t.find(".ui-slider-handle").text(o.toString())}i(".alpha-color-control").each(function(){var n,c,a=i(this),r=a.val().replace(/\s+/g,""),o=a.attr("data-palette"),t=a.attr("data-show-opacity"),l=a.attr("data-default-color"),o=-1!==o.indexOf("|")?o.split("|"):"false"!=o,o={change:function(o,t){var e,r=a.attr("data-customize-setting-link"),i=a.wpColorPicker("color");l==i&&(e=s(i),c.find(".ui-slider-handle").text(e)),wp.customize(r,function(o){o.set(i)}),n.find(".transparency").css("background-color",t.color.toString("no-alpha"))},palettes:o};a.wpColorPicker(o),n=a.parents(".wp-picker-container:first"),i('<div class="alpha-color-picker-container"><div class="min-click-zone click-zone"></div><div class="max-click-zone click-zone"></div><div class="alpha-slider"></div><div class="transparency"></div></div>').appendTo(n.find(".wp-picker-holder")),c=n.find(".alpha-slider"),o=s(r),c.slider({create:function(o,t){var e=i(this).slider("value");i(this).find(".ui-slider-handle").text(e),i(this).siblings(".transparency ").css("background-color",r)},value:o,range:"max",step:1,min:0,max:100,animate:300}),"true"==t&&c.find(".ui-slider-handle").addClass("show-opacity"),n.find(".min-click-zone").on("click",function(){e(0,a,c,!0)}),n.find(".max-click-zone").on("click",function(){e(100,a,c,!0)}),n.find(".iris-palette").on("click",function(){var o=i(this).css("background-color"),t=s(o);d(t,c),100!=t&&(o=o.replace(/[^,]+(?=\))/,(t/100).toFixed(2))),a.wpColorPicker("color",o)}),n.find(".button.wp-picker-clear").on("click",function(){var o=a.attr("data-customize-setting-link");a.wpColorPicker("color","#ffffff"),wp.customize(o,function(o){o.set("")}),d(100,c)}),n.find(".button.wp-picker-default").on("click",function(){d(s(l),c)}),a.on("input",function(){d(s(i(this).val()),c)}),c.slider().on("slide",function(o,t){e(parseFloat(t.value)/100,a,c,!1),i(this).find(".ui-slider-handle").text(t.value)})}),Color.prototype.toString=function(o){if("no-alpha"==o)return this.toCSS("rgba","1").replace(/\s+/g,"");if(this._alpha<1)return this.toCSS("rgba",this._alpha).replace(/\s+/g,"");var t=parseInt(this._color,10).toString(16);if(this.error)return"";if(t.length<6)for(var e=6-t.length-1;0<=e;e--)t="0"+t;return"#"+t}}),jQuery(document).ready(function(e){e(".customize-control-emoza-tab-control").each(function(){e(this).parent().find("li").not(".section-meta").not(".customize-control-emoza-tab-control").addClass("emoza-hide-control");var o=e(this).find(".control-tab-general").data("connected");e.each(o,function(o,t){e(this).removeClass("emoza-hide-control")}),e(this).find(".control-tab").on("click",function(){var o=e(this).data("connected");e(this).addClass("active"),e(this).siblings().removeClass("active"),e(this).parent().parent().parent().find("li").not(".section-meta").not(".customize-control-emoza-tab-control").addClass("emoza-hide-control"),e.each(o,function(o,t){e(this).removeClass("emoza-hide-control")})})})}),jQuery(document).ready(function(e){e(".customize-control-tinymce-editor").each(function(){var o=_wpCustomizeSettings.controls[e(this).attr("id")].emozatb1,t=_wpCustomizeSettings.controls[e(this).attr("id")].emozatb2;_wpCustomizeSettings.controls[e(this).attr("id")].emozatmb;wp.editor.initialize(e(this).attr("id"),{tinymce:{wpautop:!0,toolbar1:o,toolbar2:t},quicktags:!0,mediaButtons:!0})}),e(document).on("tinymce-editor-init",function(o,t){t.on("change",function(o){tinyMCE.triggerSave(),e("#"+t.id).trigger("change")})})}),jQuery(document).ready(function(t){function o(o){"col3"===t(o).val()||"col3-bigleft"===t(o).val()||"col3-bigright"===t(o).val()?(t(".footer-widget-area-link-1, .footer-widget-area-link-2, .footer-widget-area-link-3").show(),t(".footer-widget-area-link-4").hide()):"col4"===t(o).val()||"col4-bigleft"===t(o).val()||"col4-bigright"===t(o).val()?t(".footer-widget-area-link-1, .footer-widget-area-link-2, .footer-widget-area-link-3, .footer-widget-area-link-4").show():"col2"===t(o).val()||"col2-bigleft"===t(o).val()||"col2-bigright"===t(o).val()?(t(".footer-widget-area-link-1, .footer-widget-area-link-2").show(),t(".footer-widget-area-link-4, .footer-widget-area-link-3").hide()):"col1"===t(o).val()?(t(".footer-widget-area-link-1").show(),t(".footer-widget-area-link-4, .footer-widget-area-link-2, .footer-widget-area-link-3").hide()):t(".footer-widget-area-link-1, .footer-widget-area-link-2, .footer-widget-area-link-3, .footer-widget-area-link-4").hide()}o(t("#customize-control-footer_widgets").find("input:checked")),t("#customize-control-footer_widgets").find("input").change(function(){o(t(this))})}),wp.customize("color_palettes",function(x){var j=jQuery("#customize-control-color_palettes").find(".radio-buttons").data("palettes");x.bind(function(){for(var o=x.get(),t=0,e=["custom_color1","scrolltop_bg_color","button_background_color","button_border_color","color_link_default"];t<e.length;t++){var r=e[t];wp.customize(r).set(j[o][0]),jQuery("#customize-control-"+r).find(".wp-color-result").css("background-color",j[o][0])}for(var i=0,n=["custom_color2","footer_widgets_links_hover_color","scrolltop_bg_color_hover","button_background_color_hover","button_border_color_hover","color_link_hover"];i<n.length;i++){var c=n[i];wp.customize(c).set(j[o][1]),jQuery("#customize-control-"+c).find(".wp-color-result").css("background-color",j[o][1])}for(var a=0,l=["single_post_title_color","custom_color3","main_header_submenu_color","offcanvas_menu_color","mobile_header_color","footer_widgets_title_color","single_product_title_color","color_forms_text","shop_product_product_title","loop_post_meta_color","loop_post_title_color","main_header_color","site_title_color","site_description_color","color_heading_1","color_heading_2","color_heading_3","color_heading_4","color_heading_5","color_heading_6"];a<l.length;a++){var s=l[a];wp.customize(s).set(j[o][2]),jQuery("#customize-control-"+s).find(".wp-color-result").css("background-color",j[o][2])}for(var d=0,u=["custom_color4","footer_widgets_links_color","footer_widgets_text_color","color_body_text","footer_credits_text_color","color_forms_placeholder","topbar_color","main_header_bottom_color"];d<u.length;d++){var f=u[d];wp.customize(f).set(j[o][3]),jQuery("#customize-control-"+f).find(".wp-color-result").css("background-color",j[o][3])}for(var p=0,g=["custom_color5","color_forms_borders"];p<g.length;p++){var _=g[p];wp.customize(_).set(j[o][4]),jQuery("#customize-control-"+_).find(".wp-color-result").css("background-color",j[o][4])}for(var h=0,v=["custom_color6","footer_widgets_background","footer_credits_background","content_cards_background"];h<v.length;h++){var m=v[h];wp.customize(m).set(j[o][5]),jQuery("#customize-control-"+m).find(".wp-color-result").css("background-color",j[o][5])}for(var b=0,w=["custom_color7","background_color","button_color","button_color_hover","scrolltop_color","scrolltop_color_hover","color_forms_background","topbar_background"];b<w.length;b++){var k=w[b];wp.customize(k).set(j[o][6]),jQuery("#customize-control-"+k).find(".wp-color-result").css("background-color",j[o][6])}for(var z=0,y=["custom_color8","main_header_submenu_background","main_header_background","main_header_bottom_background","mobile_header_background","offcanvas_menu_background"];z<y.length;z++){var C=y[z];wp.customize(C).set(j[o][7]),jQuery("#customize-control-"+C).find(".wp-color-result").css("background-color",j[o][7])}})}),wp.customize.bind("ready",function(){wp.customize("custom_color1",function(o){o.bind(function(o){for(var t=0,e=["scrolltop_bg_color","button_background_color","button_border_color","color_link_default"];t<e.length;t++){var r=e[t];wp.customize(r).set(o),jQuery("#customize-control-"+r).find(".wp-color-result").css("background-color",o)}})}),wp.customize("custom_color2",function(o){o.bind(function(o){for(var t=0,e=["footer_widgets_links_hover_color","scrolltop_bg_color_hover","button_background_color_hover","button_border_color_hover","color_link_hover"];t<e.length;t++){var r=e[t];wp.customize(r).set(o),jQuery("#customize-control-"+r).find(".wp-color-result").css("background-color",o)}})}),wp.customize("custom_color3",function(o){o.bind(function(o){for(var t=0,e=["main_header_submenu_color","offcanvas_menu_color","mobile_header_color","footer_widgets_title_color","single_product_title_color","color_forms_text","shop_product_product_title","loop_post_meta_color","loop_post_title_color","main_header_color","site_title_color","site_description_color","color_heading_1","color_heading_2","color_heading_3","color_heading_4","color_heading_5","color_heading_6"];t<e.length;t++){var r=e[t];wp.customize(r).set(o),jQuery("#customize-control-"+r).find(".wp-color-result").css("background-color",o)}})}),wp.customize("custom_color4",function(o){o.bind(function(o){for(var t=0,e=["footer_widgets_links_color","footer_widgets_text_color","color_body_text","footer_credits_text_color","color_forms_placeholder"];t<e.length;t++){var r=e[t];wp.customize(r).set(o),jQuery("#customize-control-"+r).find(".wp-color-result").css("background-color",o)}})}),wp.customize("custom_color5",function(o){o.bind(function(o){for(var t=0,e=["color_forms_borders"];t<e.length;t++){var r=e[t];wp.customize(r).set(o),jQuery("#customize-control-"+r).find(".wp-color-result").css("background-color",o)}})}),wp.customize("custom_color6",function(o){o.bind(function(o){for(var t=0,e=["footer_widgets_background","footer_credits_background","content_cards_background"];t<e.length;t++){var r=e[t];wp.customize(r).set(o),jQuery("#customize-control-"+r).find(".wp-color-result").css("background-color",o)}})}),wp.customize("custom_color7",function(o){o.bind(function(o){for(var t=0,e=["background_color","button_color","button_color_hover","scrolltop_color","scrolltop_color_hover","color_forms_background"];t<e.length;t++){var r=e[t];wp.customize(r).set(o),jQuery("#customize-control-"+r).find(".wp-color-result").css("background-color",o)}})}),wp.customize("custom_color8",function(o){o.bind(function(o){for(var t=0,e=["main_header_submenu_background","main_header_background","main_header_bottom_background","mobile_header_background","offcanvas_menu_background"];t<e.length;t++){var r=e[t];wp.customize(r).set(o),jQuery("#customize-control-"+r).find(".wp-color-result").css("background-color",o)}})})}),wp.customize.bind("ready",function(){wp.customize.control("custom_palette",function(t){wp.customize("custom_palette_toggle").bind(function(o){t.active.set(o)})})}),jQuery(document).ready(function(o){o(".wp-picker-input-wrap").each(function(){o(this).prependTo(o(this).next(".wp-picker-holder"))})}),jQuery(document).ready(function(o){var t=o(".saved-palette");o(".saved-palette").on("click",function(){o(".palette-radio-buttons").toggleClass("open")}),o(".palette-radio-buttons").find(".palette").on("click",function(){t.empty(),o(".palette-radio-buttons").removeClass("open"),o(this).parent().clone().unwrap().appendTo(t).find("input").remove()})}),jQuery(document).ready(function(n){var o={init:function(){this.firstTime=!0,this.initialized||this.events(),this.initialized=!0},events:function(){var e=this;return n(document).on("click",".emoza-accordion-title",function(){var o=n(this);n(this).hasClass("expanded")&&(e.showOrHide(n(this),"hide"),n(this).removeClass("expanded").addClass("collapse"),setTimeout(function(){o.removeClass("collapse")},300)),n(this).hasClass("collapse")||(n(".emoza-accordion-item").addClass("emoza-accordion-hide"),n(".emoza-accordion-title").removeClass("expanded"),e.showOrHide(n(this),"show"),o.addClass("expanded"))}),n(document).on("click",".control-section",function(o){var t=n(".control-section.open");e.firstTime&&t.find(".emoza-accordion-title").length&&t.find(".emoza-accordion-title").each(function(){e.showOrHide(n(this),"hide"),n(this).removeClass("expanded"),e.firstTime=!1})}),n(document).on("click",".customize-section-back",function(){e.firstTime=!0}),this},showOrHide:function(o,t){var e="",r=[];if((e=o.closest(".customize-control").next()).attr("id")=="customize-control-"+o.data("until"))r.push(e[0].id);else for(;e.attr("id")!="customize-control-"+o.data("until");)r.push(e[0].id),e=e.next();1<=r.length&&r.push(e[0].id);for(var i=0;i<r.length;i++)n("#"+r[i]).addClass("emoza-accordion-item active"),"hide"==t?n("#"+r[i]).addClass("emoza-accordion-hide"):n("#"+r[i]).removeClass("emoza-accordion-hide"),0==i&&n("#"+r[i]).addClass("emoza-accordion-first-item"),(i==r.length-1&&1<r.length||1==r.length)&&n("#"+r[i]).addClass("emoza-accordion-last-item");return this}};n(document).ready(function(){o.init()})});