XylotrechusZ
!function(e){"use strict";var t=e(window),a=e(document),i=e("html"),o=e("html,body"),l=e("body"),r=function(){this.General=this.General.bind(this),this.QuickView=this.QuickView.bind(this),this.Wishlist=this.Wishlist.bind(this),this.Compare=this.Compare.bind(this),this.AjaxFilter=this.AjaxFilter.bind(this),this.AutoInit=this.AutoInit.bind(this)};let s=(t,a)=>{let i=e.extend({},a);return i.url=la_theme_config.ajax_url,i.handlerSettings={nonce:la_theme_config.ajaxGlobal.nonce,data_type:"json",type:"POST",action:t},new LaStudio.global.AjaxHandler(i)};r.prototype.AutoInit=function(){this.General(),this.QuickView(),this.Wishlist(),this.Compare(),this.AjaxFilter()},r.prototype.General=function(){a.trigger("reinit_la_swatches"),e(document).on("click touchend",".lawl--continue",function(t){t.preventDefault(),e.featherlight.close()}),e("#customer_login .input-text").each(function(){e(this).closest(".form-row").find("label").length&&e(this).attr("placeholder",e(this).closest(".form-row").find("label").text())}),e(document).on("lastudiokit/woocommerce/single/init_product_slider",function(e,t){t.controlNav.eq(t.animatingTo).closest("li").get(0).scrollIntoView({inline:"center",block:"nearest",behavior:"smooth"}),t.viewport.closest(".woocommerce-product-gallery").css("--singleproduct-thumbs-height",t.viewport.height()+"px")}),a.on("click",".product_item .la-swatch-control .swatch-wrapper",function(t){t.preventDefault();var a=e(this),i=a.closest(".product_item").find(".p_img-first img").first(),o=a.closest(".product_item").find(".la-addcart");if(!a.hasClass("selected")&&(a.addClass("selected").siblings().removeClass("selected"),i.hasClass("--has-changed")||i.attr("data-o-src",i.attr("src")).attr("data-o-sizes",i.attr("sizes")).attr("data-o-srcset",i.attr("srcset")).addClass("--has-changed"),i.attr("src",a.attr("data-thumb")?a.attr("data-thumb"):i.attr("data-o-src")).removeAttr("sizes srcset"),o.length>0)){var l=o.attr("href");l=LaStudio.global.addQueryArg(l,"attribute_"+a.attr("data-attribute"),a.attr("data-value")),o.attr("href",l)}});var t,i,o=null;e(document.body).on("wc_fragments_refreshed updated_wc_div wc_fragments_loaded",function(t){clearTimeout(o),o=setTimeout(function(){LaStudio.global.eventManager.publish("LaStudio:Component:LazyLoadImage",[e(".widget_shopping_cart_content")])},100)}),a.on("click",".quantity .qty-minus",function(t){t.preventDefault();var a=e(this).siblings(".qty"),i=parseInt(a.val()),o=a.attr("min")?parseInt(a.attr("min")||1):1;a.val(i>o?i-1:o).trigger("change")}),a.on("click",".quantity .qty-plus",function(t){t.preventDefault();var a=e(this).siblings(".qty"),i=parseInt(a.val());a.val(i>0?i+1:1).trigger("change")}),a.on("click",".wc-view-item a",function(){var t=e(this),a=t.data("col"),i=t.closest(".woocommerce");if(!t.hasClass("active")){e(".wc-view-item a").removeClass("active"),t.addClass("active"),t.closest(".wc-view-item").find(">button>span").html(t.text());var o=i.find("[data-widget_current_query] ul.ul_products");if(o.each(function(){e(this).removeClass("products-list").addClass("products-grid")}),o.find(">li").each(function(){var t=e(this).attr("class").replace(/(\scol-desk-\d)/g," col-desk-"+a).replace(/(\scol-lap-\d)/g," col-lap-"+a);e(this).attr("class",t)}),i.closest(".elementor-widget-wc-archive-products").length){var l=i.attr("class").replace(/(\scolumns-\d)/g," columns-"+a);i.attr("class",l)}Cookies.set("veres_wc_product_per_row",a,{expires:2})}}).on("click",".wc-view-toggle button",function(){var t=e(this),a=t.data("view_mode"),i=t.closest(".woocommerce");if(!t.hasClass("active")){e(".wc-view-toggle button").removeClass("active"),t.addClass("active");var o=i.find("ul.products[data-grid_layout]"),l=o.attr("data-grid_layout");"grid"==a?o.removeClass("products-list").addClass("products-grid").addClass(l):o.removeClass("products-grid").addClass("products-list").removeClass(l),Cookies.set("veres_wc_catalog_view_mode",a,{expires:2})}}).on("mouseover",".lasf-custom-dropdown",function(t){e(this).addClass("is-hover")}).on("mouseleave",".lasf-custom-dropdown",function(t){e(this).removeClass("is-hover")}),a.on("adding_to_cart",function(t,a,i){e("body").addClass("lakit-adding-cart"),e(".lakit-cart").addClass("lakit-cart-open"),e(".lakit-cart__icon").addClass("la-loading-spin")}),a.on("added_to_cart",function(t,a,i,o){e("body").removeClass("lakit-adding-cart"),e(".lakit-cart__icon").removeClass("la-loading-spin")}),la_theme_config.single_ajax_add_cart&&(a.on("submit","div.product.type-product:not(.product-type-external) form.cart",function(t){t.preventDefault(),a.trigger("adding_to_cart");var i=e(this),o=i.attr("action")||window.location.href,l=LaStudio.global.addQueryArg(o,"product_quickview","1");void 0!==e.fn.block&&i.block({message:null,overlayCSS:{background:"#fff",opacity:.6}}),e.post(l,i.serialize()+"&_wp_http_referer="+o,function(t){let o=e(t).find(".woocommerce-notices-wrapper");o.length&&e(".woocommerce-message, .woocommerce-error",o.first()).length&&e(".single-product-article > .woocommerce-notices-wrapper").replaceWith(o.first()),void 0!==e.fn.unblock&&i.unblock(),a.trigger("LaStudio:Component:Popup:Close"),e.ajax({url:woocommerce_params.wc_ajax_url.toString().replace("%%endpoint%%","get_refreshed_fragments"),type:"POST",success:function(t){t&&t.fragments&&(e.each(t.fragments,function(t,a){e(t).replaceWith(a)}),e(document.body).trigger("wc_fragments_refreshed"),e("body").removeClass("lakit-adding-cart"),e(".lakit-cart__icon").removeClass("la-loading-spin"))}})})}),a.on("submit",".product_item:not(.product-type-external) form.cart",function(t){t.preventDefault(),a.trigger("adding_to_cart");var i=e(this),o=i.attr("action")||window.location.href,l=LaStudio.global.addQueryArg(o,"product_quickview","1");void 0!==e.fn.block&&i.block({message:null,overlayCSS:{background:"#fff",opacity:.6}}),e.post(l,i.serialize()+"&_wp_http_referer="+o,function(t){let o=e(t).find(".woocommerce-notices-wrapper");o.length&&e(".woocommerce-message, .woocommerce-error",o.first()).length&&e(".single-product-article > .woocommerce-notices-wrapper").replaceWith(o.first()),void 0!==e.fn.unblock&&i.unblock(),a.trigger("LaStudio:Component:Popup:Close"),e.ajax({url:woocommerce_params.wc_ajax_url.toString().replace("%%endpoint%%","get_refreshed_fragments"),type:"POST",success:function(t){t&&t.fragments&&(e.each(t.fragments,function(t,a){e(t).replaceWith(a)}),e(document.body).trigger("wc_fragments_refreshed"),e("body").removeClass("lakit-adding-cart"),e(".lakit-cart__icon").removeClass("la-loading-spin"))}})})}),a.on("click",".product_item .la-addcart.product_type_variable",function(t){var a=e(this).closest(".product_item").find("form.cart");if(a.length&&0==a.find(".wc-variation-selection-needed").length)return t.preventDefault(),a.find(".single_add_to_cart_button").trigger("click"),!1})),"#register"==location.hash&&e("#customer_login .u-column2.col-2").length?e("#customer_login .u-column2.col-2").addClass("active"):e("#customer_login .u-column1.col-1").addClass("active"),a.on("click","#customer_login h2",function(t){t.preventDefault();var a=e(this).parent();a.hasClass("active")||a.addClass("active").siblings("div").removeClass("active")}),a.on("click",".wcr_resigter_link a",function(t){t.preventDefault(),e("#customer_login .u-column2.col-2 h2").trigger("click")}),(i=(t=e(".single-product-article")).find(".wc-tabs-wrapper").first()).length&&(e(".wc-tab-title a",i).off("click"),e(".wc-tabs a",i).off("click"),i.wrapInner('<div class="lakit-wc-tabs--content"></div>'),i.find(".wc-tabs").wrapAll('<div class="lakit-wc-tabs--controls"></div>'),i.find(".lakit-wc-tabs--controls").prependTo(i),i.find(".wc-tab").wrapInner('<div class="tab-content"></div>'),i.find(".wc-tab").each(function(){var t=e("#"+e(this).attr("aria-labelledby")).html();e(this).prepend('<div class="wc-tab-title">'+t+"</div>")}),e(".wc-tab-title a",i).wrapInner("<span></span>"),e(".wc-tab-title a",i).on("click",function(t){t.preventDefault(),i.find(".wc-tabs").find('li[aria-controls="'+e(this).attr("href").replace("#","")+'"]').toggleClass("active").siblings().removeClass("active"),e(this).closest(".wc-tab").toggleClass("active").siblings().removeClass("active")}),e(".wc-tabs li a",i).on("click",function(t){e(this).closest(".wc-tabs-wrapper, .woocommerce-tabs").find(e(this).attr("href")).addClass("active").siblings().removeClass("active")}),e(".wc-tabs li",i).removeClass("active"),e(".wc-tab-title a",i).first().trigger("click"))},r.prototype.QuickView=function(){a.on("click",".la-quickview-button",function(i){if(t.width()>900){i.preventDefault();var o=e(this),r=function(){void 0!==e.featherlight.close()&&e.featherlight.close(),e.featherlight(o.data("href"),{openSpeed:0,closeSpeed:0,type:{wc_quickview:!0},background:'<div class="featherlight featherlight-loading is--qvpp"><div class="featherlight-outer"><button class="featherlight-close-icon featherlight-close" aria-label="Close"><i class="lastudioicon-e-remove"></i></button><div class="featherlight-content"><div class="featherlight-inner"><div class="la-loader spinner3"><div class="dot1"></div><div class="dot2"></div><div class="bounce1"></div><div class="bounce2"></div><div class="bounce3"></div><div class="cube1"></div><div class="cube2"></div><div class="cube3"></div><div class="cube4"></div></div></div></div></div><div class="custom-featherlight-overlay"></div></div>',contentFilters:["wc_quickview"],ajaxSetup:{cache:!0,ajax_request_id:LaStudio.global.getUrlParameter("product_quickview",o.data("href"))},beforeOpen:function(e){l.addClass("open-quickview-product")},afterOpen:function(t){var i=e(".woocommerce-product-gallery",this.$content);i.length&&e.fn.wc_product_gallery&&(l.addClass("lightcase--pending"),i.wc_product_gallery({flexslider:{animation:"slide",animationLoop:!1,animationSpeed:500,controlNav:"",directionNav:!0,rtl:!1,slideshow:!1,smoothHeight:!1},photoswipe_enabled:0,zoom_enabled:0})),a.trigger("reinit_la_swatches")},afterClose:function(e){l.removeClass("open-quickview-product lightcase--completed lightcase--pending")}})};e.isFunction(e.fn.featherlight)?r():LaStudio.global.loadDependencies([LaStudio.global.loadJsFile("featherlight")],r)}})},r.prototype.Wishlist=function(){function t(){var t=e("table.wishlist_table");t.addClass("shop_table_responsive"),t.find("thead th").each(function(){var a=e(this),i=a.text().trim();""!=i&&e("td."+a.attr("class"),t).attr("data-title",i)})}t(),l.on("removed_from_wishlist",function(e){t()}),a.on("added_to_cart",function(e,a,i,o){setTimeout(t,800)}),a.on("click",".product a.add_wishlist.la-yith-wishlist",function(t){if(!e(this).hasClass("added")){t.preventDefault();var a=e(this),i={add_to_wishlist:a.data("product_id"),product_type:a.data("product-type"),action:yith_wcwl_l10n.actions.add_to_wishlist_action};try{if(yith_wcwl_l10n.multi_wishlist&&yith_wcwl_l10n.is_user_logged_in){var o=a.parents(".yith-wcwl-popup-footer").prev(".yith-wcwl-popup-content"),r=o.find(".wishlist-select"),s=o.find(".wishlist-name"),c=o.find(".wishlist-visibility");i.wishlist_id=r.val(),i.wishlist_name=s.val(),i.wishlist_visibility=c.val()}if(!LaStudio.global.isCookieEnable()){alert(yith_wcwl_l10n.labels.cookie_disabled);return}e.ajax({type:"POST",url:yith_wcwl_l10n.ajax_url,data:i,dataType:"json",beforeSend:function(){a.addClass("loading")},complete:function(){a.removeClass("loading").addClass("added")},success:function(t){if(yith_wcwl_l10n.multi_wishlist&&yith_wcwl_l10n.is_user_logged_in){var i=e("select.wishlist-select");void 0!==e.prettyPhoto&&e.prettyPhoto.close(),i.each(function(a){var i=e(this),o=i.find("option");if((o=o.slice(1,o.length-1)).remove(),void 0!==t.user_wishlists){var l=0;for(l in t.user_wishlists)"1"!=t.user_wishlists[l].is_default&&e("<option>").val(t.user_wishlists[l].ID).html(t.user_wishlists[l].wishlist_name).insertBefore(i.find("option:last-child"))}})}LaStudio.global.ShowNotice(t.message,"",!0,3e3),a.attr("href",t.wishlist_url),e('.add_wishlist[data-product_id="'+a.data("product_id")+'"]').addClass("added"),l.trigger("added_to_wishlist")}})}catch(n){LaStudio.global.log(n)}}}),a.on("click",".product a.add_wishlist.la-ti-wishlist",function(t){var a;t.preventDefault(),(a=e(this).closest(".entry-summary").length?e(this).closest(".entry-summary").find("form.cart .tinvwl_add_to_wishlist_button"):e(this).closest(".elementor-widget").length?e(this).closest(".elementor-widget").find("form.cart .tinvwl_add_to_wishlist_button"):e(this).closest(".product").find(".tinvwl_add_to_wishlist_button")).trigger("click")}),a.on("click",".product a.add_wishlist.la-core-wishlist, a.la_remove_from_wishlist, .view-wishlist-list, .lakit-wishlist-trigger",function(t){t.preventDefault();let a=e(this),i=a.hasClass("added")?"load":"add";a.is(".la_remove_from_wishlist")&&(i="remove"),(a.is(".view-wishlist-list")||a.is(".lakit-wishlist-trigger"))&&(i="load");let o=e=>{LaStudio.global.ShowMessageBox(LaStudio.utils.localCache.get("la_wishlist").table,"open-wishlist-pp",!1,e)};if("load"==i&&LaStudio.utils.localCache.exist("la_wishlist",!0))e("body").hasClass("open-wishlist-pp")?e(".la-global-message").html(LaStudio.utils.localCache.get("la_wishlist").table):o();else{let l=null,r=s("wishlist",{beforeSendCallback:function(){a.addClass("loading")},completeCallback:function(){a.removeClass("loading")},successCallback:function(t,r,s){let c=t.data.responses.wishlist.data;e(".la-wishlist-count").html(c.count),clearTimeout(l),"add"==i?e('.add_wishlist[data-product_id="'+a.data("product_id")+'"]').addClass("added").attr("href",c.wishlist_url):"remove"==i&&e('.add_wishlist[data-product_id="'+a.data("product_id")+'"]').removeClass("added"),LaStudio.utils.localCache.set("la_wishlist",{count:c.count,table:c.table_output});let n=function(){"load"!=i&&(e(".la_wishlist-bottom_notice").html(c.message).addClass("show-notice"),l=setTimeout(function(){e(".la_wishlist-bottom_notice").removeClass("show-notice")},3e3))};e(".la-global-message").length?(e(".la-global-message").html(c.table_output),n()):e(".la_wishlist_table").length?e(".la_wishlist_table").replaceWith(e(c.table_output).find(".la_wishlist_table")):o(n)}});r.sendData({post_id:a.data("product_id"),type:i})}}),e("form.variations_form").on("woocommerce_variation_has_changed",function(t){var a=e(this),i=parseInt(a.find('input[name="variation_id"]').val()||0);0==i&&(i=parseInt(a.find('input[name="product_id"]').val())),a.closest(".product").find(".cart .la-core-wishlist").attr("data-product_id",i).removeClass("added")})},r.prototype.Compare=function(){a.on("click","table.compare-list .remove a",function(t){t.preventDefault(),e('.add_compare[data-product_id="'+e(this).data("product_id")+'"]',window.parent.document).removeClass("added")}).on("click",".la_com_action--compare",function(e){"undefined"!=typeof yith_woocompare&&(e.preventDefault(),a.trigger("LaStudio:Component:Popup:Close"),l.trigger("yith_woocompare_open_popup",{response:LaStudio.global.addQueryArg(LaStudio.global.addQueryArg("","action",yith_woocompare.actionview),"iframe","true")}))}).on("click",".product a.add_compare:not(.la-core-compare)",function(t){if(t.preventDefault(),e(this).hasClass("added")){l.trigger("yith_woocompare_open_popup",{response:LaStudio.global.addQueryArg(LaStudio.global.addQueryArg("","action",yith_woocompare.actionview),"iframe","true")});return}var a=e(this),i=e(".yith-woocompare-widget ul.products-list"),o={action:yith_woocompare.actionadd,id:a.data("product_id"),context:"frontend"};e.ajax({type:"post",url:yith_woocompare.ajaxurl.toString().replace("%%endpoint%%",yith_woocompare.actionadd),data:o,dataType:"json",beforeSend:function(){a.addClass("loading")},complete:function(){a.removeClass("loading").addClass("added")},success:function(t){e.isFunction(e.fn.block)&&i.unblock(),LaStudio.global.ShowNotice(la_theme_config.i18n.compare.success,"",!0,3e3),e('.add_compare[data-product_id="'+a.data("product_id")+'"]').addClass("added"),i.unblock().html(t.widget_table)}})}),a.on("click",".product a.add_compare.la-core-compare, a.la_remove_from_compare, .view-compare-list, .lakit-compare-trigger",function(t){t.preventDefault();let a=e(this),i=a.hasClass("added")?"load":"add";a.is(".la_remove_from_compare")&&(i="remove"),(a.is(".view-compare-list")||a.is(".lakit-compare-trigger"))&&(i="load");let o=e=>{let t=LaStudio.utils.localCache.get("la_compare");LaStudio.global.ShowMessageBox(t.table,"open-compare-pp",!1,e)};if("load"==i&&LaStudio.utils.localCache.exist("la_compare",!0))e("body").hasClass("open-compare-pp")?e(".la-global-message").html(LaStudio.utils.localCache.get("la_compare").table):o();else{let l=s("compare",{beforeSendCallback:function(){a.addClass("loading")},completeCallback:function(){a.removeClass("loading")},successCallback:function(t,a,i){let l=t.data.responses.compare.data;e(".la-compare-count").html(l.count),clearTimeout(null),LaStudio.utils.localCache.set("la_compare",{count:l.count,table:l.table_output}),e(".la-global-message").length?e(".la-global-message").html(l.table_output):e(".la-compare-table").length?e(".la-compare-table").replaceWith(e(l.table_output).find(".la-compare-table")):o()}});l.sendData({post_id:a.data("product_id"),type:i})}})},r.prototype.AjaxFilter=function(){if(0!=e(".woocommerce.lakit_wc_widget_current_query").length){s(),e("li.current-cat, li.current-cat-parent",e(".widget-area")).each(function(){e(this).addClass("open"),e(">ul",e(this)).css("display","block")}),c();var l=[".woocommerce.lakit_wc_widget_current_query .wc-toolbar-top",".woocommerce.lakit_wc_widget_current_query .la-advanced-product-filters .sidebar-inner",".woocommerce.lakit_wc_widget_current_query .wc_page_description",".woocommerce.lakit_wc_widget_current_query ul.ul_products",".woocommerce.lakit_wc_widget_current_query .woocommerce-pagination",".woocommerce.lakit_wc_widget_current_query .lakit-pagination",".elementor-lakit-woofilters .woocommerce-result-count"];try{history.pushState({title:document.title,href:LaStudio.global.removeURLParameter(window.location.href,"la_doing_ajax")},document.title,LaStudio.global.removeURLParameter(window.location.href,"la_doing_ajax")),LaStudio.utils.localCache.set(LaStudio.global.removeURLParameter(window.location.href,"la_doing_ajax"),document.documentElement.outerHTML)}catch(r){LaStudio.global.log(r)}window.addEventListener("popstate",function(e){if(null!==e.state&&void 0!==e.state.href){var a=e.state.href;a=LaStudio.global.removeURLParameter(a,"la_doing_ajax"),LaStudio.utils.localCache.exist(a,!0)?n(LaStudio.utils.localCache.get(a),a,t):window.location.reload()}else window.location.reload()}),LaStudio.global.eventManager.subscribe("LaStudio:AjaxShopFilter",function(t,a,i){if(e(".wc-toolbar-container").length>0){var l=e(".wc-toolbar-container").offset().top-200;o.stop().animate({scrollTop:l},800)}"?"==a.slice(-1)&&(a=a.slice(0,-1)),a=a.replace(/%2C/g,","),a=LaStudio.global.removeURLParameter(a,"la_doing_ajax");try{history.pushState({title:document.title,href:a},document.title,a)}catch(r){LaStudio.global.log(r)}LaStudio.global.eventManager.publish("LaStudio:AjaxShopFilter:before_send",[a,i]),LaStudio.utils.ajax_xhr&&LaStudio.utils.ajax_xhr.abort();var s=a;a=LaStudio.global.addQueryArg(a,"la_doing_ajax","true"),LaStudio.utils.ajax_xhr=e.get(a,function(e){n(e,s,i)},"html")}),LaStudio.global.eventManager.subscribe("LaStudio:AjaxShopFilter:success",function(t,o,l,r){e(".widget.woocommerce.widget_price_filter").length&&function t(){if("undefined"==typeof woocommerce_price_slider_params)return!1;e("input#min_price, input#max_price").hide(),e(".price_slider, .price_label").show();var a=e(".price_slider_amount #min_price").data("min"),i=e(".price_slider_amount #max_price").data("max"),o=e(".price_slider_amount #min_price").val(),l=e(".price_slider_amount #max_price").val();e(".price_slider:not(.ui-slider)").slider({range:!0,animate:!0,min:a,max:i,values:[o,l],create:function(){e(".price_slider_amount #min_price").val(o),e(".price_slider_amount #max_price").val(l),e(document.body).trigger("price_slider_create",[o,l])},slide:function(t,a){e("input#min_price").val(a.values[0]),e("input#max_price").val(a.values[1]),e(document.body).trigger("price_slider_slide",[a.values[0],a.values[1]])},change:function(t,a){e(document.body).trigger("price_slider_change",[a.values[0],a.values[1]])}})}(),i.hasClass("open-advanced-shop-filter")&&(i.removeClass("open-advanced-shop-filter"),e(".la-advanced-product-filters").stop().slideUp("fast")),c();var s=LaStudio.global.getUrlParameter("pwb-brand-filter",location.href);null!==s&&""!==s&&(e('.pwb-filter-products input[type="checkbox"]').prop("checked",!1),s.split(",").filter(function(t){e('.pwb-filter-products input[type="checkbox"][value="'+t+'"]').prop("checked",!0)})),e("body").trigger("lastudio-fix-ios-limit-image-resource").trigger("lastudio-lazy-images-load").trigger("jetpack-lazy-images-load").trigger("lastudio-object-fit"),LaStudio.core.initAll(a)}),a.on("click",".btn-advanced-shop-filter",function(t){t.preventDefault(),i.toggleClass("open-advanced-shop-filter"),e(".la-advanced-product-filters").stop().animate({height:"toggle"})}).on("click",".la-advanced-product-filters .close-advanced-product-filters",function(t){t.preventDefault(),e(".btn-advanced-shop-filter").trigger("click")}).on("click",".woocommerce.lakit_wc_widget_current_query .woocommerce-pagination:not(.lakit-ajax-pagination) a, .la-advanced-product-filters-result a",function(t){t.preventDefault(),e(".la-ajax-shop-loading").addClass("loading"),LaStudio.global.eventManager.publish("LaStudio:AjaxShopFilter",[e(this).attr("href"),e(this)])}).on("click",".woo-widget-filter a, .wc-ordering a, .wc-view-count a, .woocommerce.product-sort-by a, .woocommerce.la-price-filter-list a, .woocommerce.widget_layered_nav a, .woocommerce.widget_product_tag_cloud li a, .woocommerce.widget_product_categories a, .wc-block-product-categories-list-item > a",function(t){t.preventDefault(),e(".la-ajax-shop-loading").addClass("loading"),e(this).closest(".widget_layered_nav").length?e(this).parent().hasClass("active")||e(this).parent().hasClass("chosen")?e(this).parent().removeClass("active chosen"):e(this).parent().addClass("active chosen"):e(this).parent().addClass("active").siblings().removeClass("active"),e(".lasf-custom-dropdown").removeClass("is-hover");var a=e(this).attr("href"),i=LaStudio.global.getUrlParameter("la_preset");!LaStudio.global.getUrlParameter("la_preset",a)&&i&&(a=LaStudio.global.addQueryArg(a,"la_preset",i)),LaStudio.global.eventManager.publish("LaStudio:AjaxShopFilter",[a,e(this)])}).on("click",".woocommerce.widget_product_tag_cloud:not(.la_product_tag_cloud) a",function(t){t.preventDefault(),e(".la-ajax-shop-loading").addClass("loading"),e(this).addClass("active").siblings().removeClass("active");var a=e(this).attr("href"),i=LaStudio.global.getUrlParameter("la_preset");!LaStudio.global.getUrlParameter("la_preset",a)&&i&&(a=LaStudio.global.addQueryArg(a,"la_preset",i)),LaStudio.global.eventManager.publish("LaStudio:AjaxShopFilter",[a,e(this)])}).on("click",".woocommerce.widget_layered_nav_filters a",function(t){t.preventDefault(),e(".la-ajax-shop-loading").addClass("loading"),LaStudio.global.eventManager.publish("LaStudio:AjaxShopFilter",[e(this).attr("href"),e(this)])}).on("submit",".widget_price_filter form, .woocommerce-widget-layered-nav form",function(t){t.preventDefault();var a=e(this),i=a.attr("action")+"?"+a.serialize();e(".la-ajax-shop-loading").addClass("loading"),LaStudio.global.eventManager.publish("LaStudio:AjaxShopFilter",[i,a])}).on("change",".woocommerce-widget-layered-nav form select",function(t){t.preventDefault();var a=e(this).val(),i=e(this).attr("class").split("dropdown_layered_nav_")[1];e(':input[name="filter_'+i+'"]').val(a),e(this).attr("multiple")||e(this).closest("form").submit()}).on("change",".widget_pwb_dropdown_widget .pwb-dropdown-widget",function(t){t.preventDefault();var a=e(this),i=e(this).val();e(".la-ajax-shop-loading").addClass("loading"),LaStudio.global.eventManager.publish("LaStudio:AjaxShopFilter",[i,a])}).on("click",".widget_pwb_filter_by_brand_widget .pwb-filter-products button",function(t){t.preventDefault();var a=e(this).closest(".pwb-filter-products"),i=a.data("cat-url"),o=[];a.find('input[type="checkbox"]:checked').each(function(){o.push(e(this).val())}),o.length>0&&(i=LaStudio.global.addQueryArg(i,"pwb-brand-filter",o.join(","))),e(".la-ajax-shop-loading").addClass("loading"),LaStudio.global.eventManager.publish("LaStudio:AjaxShopFilter",[i,a])}).on("change",".widget_pwb_filter_by_brand_widget .pwb-filter-products.pwb-hide-submit-btn input",function(t){t.preventDefault();var a=e(this).closest(".pwb-filter-products"),i=a.data("cat-url"),o=[];a.find('input[type="checkbox"]:checked').each(function(){o.push(e(this).val())}),o.length>0&&(i=LaStudio.global.addQueryArg(i,"pwb-brand-filter",o.join(","))),e(".la-ajax-shop-loading").addClass("loading"),LaStudio.global.eventManager.publish("LaStudio:AjaxShopFilter",[i,a])}),e(".widget_pwb_dropdown_widget .pwb-dropdown-widget").off("change"),e(".widget_pwb_filter_by_brand_widget .pwb-filter-products button").off("click"),e(".widget_pwb_filter_by_brand_widget .pwb-filter-products.pwb-hide-submit-btn input").off("change")}function s(){e(".woocommerce.lakit_wc_widget_current_query .lakit-products").length?0==e(".woocommerce.lakit_wc_widget_current_query .lakit-products .la-ajax-shop-loading").length&&e('<div class="la-ajax-shop-loading"><span class="lakit-css-loader"></span></div>').prependTo(e(".woocommerce.lakit_wc_widget_current_query .lakit-products")):0==e(".woocommerce.lakit_wc_widget_current_query .la-ajax-shop-loading").length&&e('<div class="la-ajax-shop-loading"><span class="lakit-css-loader"></span></div>').prependTo(e(".woocommerce.lakit_wc_widget_current_query"))}function c(){}function n(t,a,i){var o=t.match("<title>(.*)</title>");o[1]&&(document.title=o[1].replaceAll("–","–")),LaStudio.utils.localCache.set(a,t);for(var r=0;r<l.length;r++)e(l[r]).length&&(e(t).find(l[r]).length?e(l[r]).replaceWith(e(t).find(l[r])):e(l[r]).addClass("nothing-to-show"));(e(".woocommerce.lakit_wc_widget_current_query > .woocommerce-info").length||e(t).find(".woocommerce.lakit_wc_widget_current_query > .woocommerce-info").length)&&(e(".woocommerce.lakit_wc_widget_current_query").replaceWith(e(t).find(".woocommerce.lakit_wc_widget_current_query")),s()),e(".widget-area").each(function(){var a=e(this).data("id");e(t).find('.widget-area[data-id="'+a+'"]').length&&(e(this).replaceWith(e(t).find('.widget-area[data-id="'+a+'"]')),LaStudio.core.Blog(e('.widget-area[data-id="'+a+'"]')))});let c=[];e(".widget.lakit-wp--widget").each(function(){var t=e(this).closest(".elementor-column, .e-container").data("id");0>c.indexOf(t)&&c.push(t)}),c.length>0&&c.forEach(function(a){e(t).find('.elementor-element[data-id="'+a+'"]').length&&(e('.elementor-element[data-id="'+a+'"]').replaceWith(e(t).find('.elementor-element[data-id="'+a+'"]')),LaStudio.core.elementorFrontendInit(e('.elementor-element[data-id="'+a+'"]')),LaStudio.core.Blog(e('.elementor-element[data-id="'+a+'"]')))}),e(".lakit-breadcrumbs").length&&e(t).find(".lakit-breadcrumbs").length&&e(".lakit-breadcrumbs").replaceWith(e(t).find(".lakit-breadcrumbs")),e(".lakit-archive-title").length&&e(t).find(".lakit-archive-title").length&&e(".lakit-archive-title").replaceWith(e(t).find(".lakit-archive-title"));try{var n=Cookies.get("veres_wc_catalog_view_mode");e('.wc-toolbar .wc-view-toggle button[data-view_mode="'+n+'"]').trigger("click");var d=Cookies.get("veres_wc_product_per_row");e('.wc-toolbar .wc-view-item a[data-col="'+d+'"]').trigger("click")}catch(u){}e("body").trigger("lastudio-fix-ios-limit-image-resource"),e(".la-ajax-shop-loading").removeClass("loading"),LaStudio.global.eventManager.publish("LaStudio:AjaxShopFilter:success",[t,a,i])}},window.LaStudioWooCommerce=new r}(jQuery);