!function(e){"use strict";window.avadaWooAjax=window.avadaWooAjax||{},window.avadaWooAjax.isLoading=!1,window.avadaWooAjax.replaceContent=function(a,t){if(e(a).each((function(o){const n=e(this).attr("id");let i;i=n?t.find("#"+n):t.find(a).eq(o),i.length&&(i.find("select:not([multiple]").filter((function(){return!e(this).parent().hasClass("avada-select-parent")})).each((function(){e(this).wrap('<p class="avada-select-parent"></p>').after('<div class="select-arrow">&#xe61f;</div>');const a=e(this),t=a.next();setTimeout((function(){0<a.innerHeight()&&t.css({height:a.innerHeight(),width:a.innerHeight(),"line-height":a.innerHeight()+"px"})}),10)})),e(this).replaceWith(i))})),".widget_layered_nav_filters"===a&&!e(a).length&&t.find(".widget_layered_nav_filters").length){const a=t.find(".widget_layered_nav_filters"),o=a.next();if(o.length){const t=e(document).find("."+o.attr("class").split(/\s+/).join("."));t.length&&a.insertBefore(t)}}},window.avadaWooAjax.mergeQueryParams=function(e,a){const t=new URL(e,window.location.origin),o=new URLSearchParams(t.search);for(const[e,t]of a.entries())t?o.set(e,t):o.delete(e);return o.delete("paged"),o.delete("page"),t.search=o.toString(),t.toString()},window.avadaWooAjax.load=function(a,t=!0,o=!1){if(window.avadaWooAjax.isLoading)return;window.avadaWooAjax.isLoading=!0;let n=e(".woocommerce-container .products"),i=e(".woocommerce-no-products-found");const r=e(".woocommerce-widget-layered-nav, .widget_price_filter, .widget_rating_filter, .widget_layered_nav_filters, .widget_brand_nav, .widget_product_categories, .awb-woo-filters-categories, .catalog-ordering"),d=e("#wrapper");n.length||i.length?(n=n.length?n:i,r.addClass("awb-disabled"),n.addClass("awb-disabled is-leaving"),setTimeout((function(){n.children().remove(),n.append('<div class="fusion-slider-loading"></div>'),n.removeClass("is-leaving")}),250)):o&&d.addClass("awb-disabled"),e.ajax({url:a,method:"GET",dataType:"html",success:function(i){const r=e("<div>").append(e.parseHTML(i));if(o){const a=r.find("#wrapper");a.length&&(d.addClass("is-leaving"),setTimeout((function(){d.html(a.html()),d.addClass("is-entering").removeClass("is-leaving");const t=i.match(/<body[^>]*class=["']([^"']*)["']/);t&&t[1]&&e("body").attr("class",t[1]);const o=i.match(/<title[^>]*>([^<]*)<\/title>/);o&&o[1]&&(document.title=o[1]),e(window).trigger("fusion-dynamic-content-render",d),e(document).trigger("fusion-reinit-carousels"),e(document.body).trigger("post-load"),void 0!==e(window).wc_variation_form&&d.find(".variations_form").wc_variation_form(),"undefined"!=typeof woocommerce_price_slider_params&&e(document.body).trigger("init_price_filter"),setTimeout((function(){d.removeClass("awb-disabled is-entering")}),50)}),250))}else{let a=r.find(".woocommerce-container .products");const t=r.find(".woocommerce-no-products-found");a=a.length?a:t,a.length&&(n.addClass("is-entering"),setTimeout((function(){a.addClass("is-entering").insertAfter(n),n.remove(),a[0].offsetHeight,a.removeClass("is-entering")}),250)),window.avadaWooAjax.replaceContent(".catalog-ordering",r),window.avadaWooAjax.replaceContent(".widget_rating_filter",r),window.avadaWooAjax.replaceContent(".widget_price_filter",r),"undefined"!=typeof woocommerce_price_slider_params&&e(document.body).trigger("init_price_filter"),window.avadaWooAjax.replaceContent(".woocommerce-widget-layered-nav",r),window.avadaWooAjax.replaceContent(".widget_product_categories",r),window.avadaWooAjax.replaceContent(".widget_brand_nav",r),window.avadaWooAjax.replaceContent(".awb-woo-filters-categories",r);const o=!!r.find(".widget_layered_nav_filters").length;window.avadaWooAjax.replaceContent(".widget_layered_nav_filters",r),o||e(".widget_layered_nav_filters li").remove(),e(".woocommerce-result-count").replaceWith(r.find(".woocommerce-result-count"))}t&&history.pushState(null,"",a),a.includes("product_cat=")||e(".awb-woo-filters-categories li.chosen, .widget_product_categories li.chosen").removeClass("chosen"),e(document).trigger("avada_woo_ajax_success",[a])},complete:function(){window.avadaWooAjax.isLoading=!1,e(".awb-disabled").removeClass("awb-disabled"),e(document).trigger("avada_woo_ajax_complete")}})},"1"===avadaWooCommerceVars.woo_ajax_sorting&&e(document).on("click",".catalog-ordering a",(function(a){a.preventDefault(),window.avadaWooAjax.load(e(this).attr("href"))})),e(document).on("click",".pagination a",(function(a){a.preventDefault(),window.avadaWooAjax.load(e(this).attr("href"))})),window.addEventListener("popstate",(function(){window.avadaWooAjax.load(location.href,!1)})),e(document).on("change",".woocommerce-widget-layered-nav-dropdown select",(function(){const a=e(this),t=a.closest("form"),o=a.val();let n=a.attr("name");if(!n){const e=(a.attr("class")||"").split(/\s+/).find(e=>e.startsWith("dropdown_layered_nav_"));e&&(n="filter_"+e.replace("dropdown_layered_nav_",""))}n&&t.length&&t.find('input[name="'+n+'"]').val(o),a.attr("multiple")||t.trigger("submit")}))}(jQuery);