!function(r){r.each(["frontend/element_ready/wd_products_tabs.default"],function(e,t){woodmartThemeModule.wdElementorAddAction(t,function(){woodmartThemeModule.productsTabs()})}),woodmartThemeModule.productsTabs=function(){var i=!1,n=(r(".wd-products-tabs").each(function(){var e=r(this),o=e.find(".wd-tabs-content-wrapper"),a=[],t=o.find(".wd-products-element").clone().removeClass("wd-active wd-in");t.find(".wd-carousel")&&t.find(".wd-carousel").removeClass("wd-initialized"),a[0]={html:t.prop("outerHTML")},e.find(".products-tabs-title li").on("click",function(e){e.preventDefault();var t=r(this),e=t.data("atts"),d=t.index();i||t.hasClass("wd-active")||(i=!0,o.find(".wd-products-element").removeClass("wd-in"),setTimeout(function(){o.find(".wd-products-element").addClass("wd-active")},100),n(e,d,o,t,a,function(e){e.html&&woodmartThemeModule.removeDuplicatedStylesFromHTML(e.html,function(e){o.find(".wd-products-element").replaceWith(e),o.find(".wd-products-element").addClass("wd-active"),setTimeout(function(){o.find(".wd-products-element").addClass("wd-in"),woodmartThemeModule.$document.trigger("wdProductsTabsLoaded"),woodmartThemeModule.$document.trigger("wood-images-loaded")},200),t.removeClass("loading")})}))}),setTimeout(function(){e.find(".products-tabs-title li.wd-active").length||e.find(".products-tabs-title li").first().addClass("wd-active"),e.addClass("wd-inited")},200)}),function(e,t,d,o,a,n){var s=d.find("> .wd-sticky-loader");o.parent().find(".wd-active").removeClass("wd-active"),o.addClass("wd-active"),a[t]?setTimeout(function(){i=!1,n(a[t])},300):(s.addClass("wd-loading"),o.addClass("loading"),r.ajax({url:woodmart_settings.ajaxurl,data:{atts:e,action:"woodmart_get_products_tab_shortcode"},dataType:"json",method:"POST",success:function(e){i=!1,a[t]=e,n(e)},error:function(){console.log("ajax error")},complete:function(){i=!1,s.removeClass("wd-loading")}}))})},r(document).ready(function(){woodmartThemeModule.productsTabs()})}(jQuery);