"undefined"!=typeof wc_single_product_params&&(wc_single_product_params.photoswipe_enabled=!1),function($,b){"use strict";var a={init:function(){var c={"clever-single-images.default":a.productImages,"clever-single-related.default":a.relatedProduct,"clever-single-recent-viewed-products.default":a.recentViewedProduct,"clever-single-add-to-cart.default":a.addToCart,"clever-single-tabs.default":a.productTabs,"clever-woo-products.default":a.widgetProducts,"clever-woo-categories.default":a.widgetCategories,"clever-single-get-order-time.default":a.productGetOrderTime,"clever-single-cart-extend.default":a.ExtendCartInfo,"clever-woo-builder-archive-quick-view.default":a.QuickView};$.each(c,function(a,c){b.hooks.addAction("frontend/element_ready/"+a,c)}),$.browser&&$.browser.safari&&document.addEventListener("click",function(a){(a.target.matches(".add_to_cart_button")||a.target.matches(".single_add_to_cart_button"))&&a.target.focus()}),$(document).on("clever-filter-content-rendered",a.reInitCarousel),$(document).on("cleverswatch_update_gallery",function(){a.productImages($(".elementor-clever-single-images.clever-woo-builder"))}),b.hooks.addFilter("clever-popup/widget-extensions/popup-data",a.prepareCleverPopup),$(window).on("clever-popup/render-content/ajax/success",a.cleverPopupLoaded),$(document).on("wc_update_cart added_to_cart",a.cleverCartPopupOpen),$(document).on("click",".clever-woo-switcher-btn",a.gridListSwitcher),$(document).on("click",".cwb-archive-quick-view",a.QuickView),$(document).on("click",".cwb-mask-close.mask-quick-view, .close-quickview",function(){$(".cwb-mask-close.mask-quick-view").removeClass("active"),$("#cwb-quickview-lb").attr("style","")})},gridListSwitcher:function(a){a.preventDefault();var b=$(document).find(".clever-woo-products-wrapper").data("layout-switcher"),d=$(a.currentTarget).hasClass("clever-woo-switcher-btn-main")?b.main:b.secondary,c=$(document).find(".clever-woo-switcher-controls-wrapper .clever-woo-switcher-btn"),f=$(document).find(".clever-woo-products-wrapper");if(window.CleverSmartFilters&&window.CleverSmartFilters.filterGroups["woocommerce-archive/default"])var e=window.CleverSmartFilters.filterGroups["woocommerce-archive/default"].query;$(a.currentTarget).hasClass("active")||(c.hasClass("active")&&c.removeClass("active"),$(a.currentTarget).addClass("active")),$.ajax({type:"POST",url:window.cleverWooBuilderData.ajax_url,data:{action:"clever_woo_builder_get_layout",query:window.cleverWooBuilderData.products,layout:d,filters:e},beforeSend:function(a){f.addClass("clever-layout-loading")},success:function(a){f.removeClass("clever-layout-loading"),f.html(a)}})},cleverPopupLoaded:function(a,b){setTimeout(function(){$(window).trigger("resize"),$(".clever-popup .woocommerce-product-gallery.images").each(function(a){$(this).wc_product_gallery()})},500)},prepareCleverPopup:function(a,c,b,e){if(c["is-clever-woo-builder"]){var d;a.isCleverWooBuilder=!0,a.templateId=c["clever-woo-builder-qv-template"],(d=b.hasClass("elementor-widget-clever-woo-products")||b.hasClass("elementor-widget-clever-woo-products-list")?$(e.target).parents(".clever-woo-builder-product"):b.parents(".clever-woo-builder-product")).length&&(a.productId=d.data("product-id"))}return a},relatedProduct:function(b){a.productsCarousel(b)},recentViewedProduct:function(b){a.productsCarousel(b)},productsCarousel:function(a){a.find(".carousel-layout.products").each(function(){let a=JSON.parse($(this).attr("data-cwb-config"));$(this).slick({slidesToShow:""!=a.slidesToShow?a.slidesToShow:1,slidesToScroll:1,rows:0,rtl:!!$("body.rtl")[0],swipe:!0,arrows:"true"==a.arrows,dots:"true"==a.dots,prevArrow:'',nextArrow:'',responsive:[{breakpoint:768,settings:{slidesToShow:""!=a.slidesToShow_tablet?a.slidesToShow_tablet:1}},{breakpoint:556,settings:{slidesToShow:""!=a.slidesToShow_mobile?a.slidesToShow_mobile:1}}]})})},productImages:function(b){b.find(".cwb-single-images:not(.grid-layout)").each(function(){let a=JSON.parse($(this).attr("data-slider")),b=$(this);$(this).find(".wrap-main-product-gallery").slick({slidesToShow:b.hasClass("carousel-layout")?parseInt(a.slidesToShow):1,slidesToScroll:1,rows:0,rtl:!!$("body.rtl")[0],swipe:!0,arrows:"true"==a.arrows,dots:"true"==a.dots,centerMode:"true"==a.center_mod,centerPadding:a.center_padding,prevArrow:'',nextArrow:'',asNavFor:b.hasClass("carousel-layout")?"":".cwb-single-images .wrap-list-thumbnail",responsive:[{breakpoint:768,settings:{centerPadding:a.center_padding_tablet,slidesToShow:b.hasClass("carousel-layout")?parseInt(a.slidesToShow_tablet):1}},{breakpoint:556,settings:{centerPadding:a.center_padding_mobile,slidesToShow:b.hasClass("carousel-layout")?parseInt(a.slidesToShow_mobile):1}}]}),$(this).find(".wrap-list-thumbnail")[0]&&$(this).find(".wrap-list-thumbnail").slick({slidesToShow:a.slidesToShow,slidesToScroll:1,rows:0,rtl:!!$("body.rtl")[0],swipe:!0,arrows:"true"==a.thumb_arrows,prevArrow:'',nextArrow:'',asNavFor:".cwb-single-images .wrap-main-product-gallery",vertical:"1"==a.isVertical,verticalSwiping:"1"==a.isVertical,focusOnSelect:!0,responsive:[{breakpoint:768,settings:{slidesToShow:a.slidesToShow_tablet}},{breakpoint:556,settings:{slidesToShow:a.slidesToShow_mobile}}]})});let c="";$(window).resize(function(){c!=$(window).width()&&(void 0!==$.fn.zoom&&(b.find(".woocommerce-product-gallery__image a").trigger("zoom.destroy"),$(window).width()>768&&b.find(".woocommerce-product-gallery__image a").zoom()),$(window).width()>768?$(".cwb-single-images.grid-layout .wrap-main-product-gallery.slick-initialized")[0]&&$(".cwb-single-images.grid-layout.wrap-main-product-gallery.slick-initialized").slick("unslick"):b.find(".cwb-single-images.grid-layout").each(function(){let a=JSON.parse($(this).attr("data-slider"));$(this),$(this).find(".wrap-main-product-gallery").slick({slidesToShow:parseInt(a.slidesToShow),slidesToScroll:1,rows:0,rtl:!!$("body.rtl")[0],swipe:!0,arrows:"true"==a.arrows,dots:"true"==a.dots,prevArrow:'',nextArrow:'',responsive:[{breakpoint:768,settings:{slidesToShow:parseInt(a.slidesToShow_tablet)}},{breakpoint:556,settings:{slidesToShow:parseInt(a.slidesToShow_mobile)}}]})}),c=$(window).width())}).resize(),a.productImgLightBox()},productImgLightBox:function(){$(document).on("click",".cwb-single-images .wrap-main-product-gallery .woocommerce-product-gallery__image a",function(c){if(c.preventDefault(),"undefined"!=typeof PhotoSwipe){let d=$(".pswp")[0],e=a.GetGalleryItems(),b=$(this).parent().index();$(this).closest(".slick-slide")[0]&&(b=$(this).closest(".slick-slide").data("slick-index"));let f={index:b,shareEl:!1,closeOnScroll:!1,history:!1,hideAnimationDuration:0,showAnimationDuration:0};new PhotoSwipe(d,PhotoSwipeUI_Default,e,f).init()}})},GetGalleryItems:function(){let a,b=[];return(a=$(".wrap-main-product-gallery").find(".woocommerce-product-gallery__image:not(.slick-cloned)")).length>0&&a.each(function(h,c){var a=$(c).find("img"),d=a.attr("data-large_image"),e=a.attr("data-large_image_width"),f=a.attr("data-large_image_height"),g={src:d,w:e,h:f,title:a.attr("title")};b.push(g)}),b},addToCart:function(a){$(".qty-nav")[0]&&$(document).on("click",".quantity .qty-nav",function(){var a=$(this).parents(".quantity").find("input.qty"),b=parseInt(a.val()?a.val():0);Number.isNaN(b)&&(b=0),$(this).hasClass("increase")?a.val(b+1):b>1&&a.val(b-1),a.trigger("change")}),$(document).on("show_variation",".variations_form:not(.cw-form-data)",function(){var b=$('.variations_form [data-countdown="countdown"]');if(b[0]){var a=b.data("date").split("-");b.lofCountDown({TargetDate:a[0]+"/"+a[1]+"/"+a[2]+" "+a[3]+":"+a[4]+":"+a[5],DisplayFormat:'
%%D%% Days
%%H%% Hours
%%M%% Mins
%%S%% Secs
',FinishMessage:"Expired"})}}),$(".use-ajax")[0]&&($(document).on("cleverswatch_button_select_option",function(b,a){a.selector.closest(".variations_form").find(".cwb-buy-now").addClass("disabled")}),$(document).on("cleverswatch_button_add_cart",function(b,a){a.selector.closest(".variations_form").find(".cwb-buy-now").removeClass("disabled")}),$(document).on("cleverswatch_button_out_stock",function(b,a){a.selector.closest(".variations_form").find(".cwb-buy-now").addClass("disabled")}),$(document).on("cleverswatch_update_gallery",function(c,d){var b=$('.variations_form [data-countdown="countdown"]');if(b[0]){var a=b.data("date").split("-");b.lofCountDown({TargetDate:a[0]+"/"+a[1]+"/"+a[2]+" "+a[3]+":"+a[4]+":"+a[5],DisplayFormat:'
%%D%% Days
%%H%% Hours
%%M%% Mins
%%S%% Secs
',FinishMessage:"Expired"})}}),$(window).resize(function(){$(window).width()>769&&$(".zoo-cw-is-desktop")[0]&&$(document).on("mouseenter mouseleave click",".variations_form .zoo-cw-attribute-option",function(){var b=$('.variations_form [data-countdown="countdown"]');if(b[0]){var a=b.data("date").split("-");b.lofCountDown({TargetDate:a[0]+"/"+a[1]+"/"+a[2]+" "+a[3]+":"+a[4]+":"+a[5],DisplayFormat:'
%%D%% Days
%%H%% Hours
%%M%% Mins
%%S%% Secs
',FinishMessage:"Expired"})}})}).resize(),"undefined"!=typeof wc_add_to_cart_params&&$(document).on("click","button.single_add_to_cart_button:not(.disabled)",function(f){f.preventDefault();var a=$(this);if("get"==a.closest("form").attr("method")){let g=a.closest("form").attr("action");window.location.href=g}var c=parseInt(a.closest("form").find("input.qty").attr("max")),h=parseInt(a.closest("form").find("input.qty").val()),b=a.closest("form.cart"),i=a.val(),j=b.find("input[name=quantity]").val()||1,d=b.find("input[name=product_id]").val()||i,k=b.find("input[name=variation_id]").val()||0,l={};if(!d)return!0;if(b.find("select").each(function(){l[$(this).attr("name")]=$(this).val()}),c&&c=0||"#reviews"===b||"#tab-reviews"===b?a.find("li.reviews_tab a").click():e.indexOf("comment-page-")>0||e.indexOf("cpage=")>0?a.find("li.reviews_tab a").click():"#tab-additional_information"===b?a.find("li.additional_information_tab a").click():a.find("li:first a").click(),$(".wrap-off-canvas-tab")[0]&&($(document).on("click",".off-canvas-tab-control a",function(a){a.preventDefault();let b=$(this).attr("href");$(this).closest(".off-canvas-layout").find(".wrap-off-canvas-tab").addClass("active").fadeIn(),$(b).addClass("active"),$("body").addClass("overflow")}),$(document).on("click",".close-off-canvas-tab",function(a){a.preventDefault(),$(this).closest(".wrap-off-canvas-tab").removeClass("active").fadeOut(),$(this).closest(".wrap-off-canvas-tab").find(".wc-tab.active").removeClass("active"),$("body").removeClass("overflow")})),$(".cwb-group-accordion")[0]&&($(".cwb-product-data-tabs .accordion-active .wc-tab").show(),$(document).on("click",".tabs li a",function(){$(".cwb-group-accordion.accordion-active").removeClass("accordion-active"),$($(this).attr("href")).closest(".cwb-group-accordion").addClass("accordion-active")}),$(document).on("click",".cwb-group-accordion .tab-heading",function(){let a=$(this).closest(".accordion-active")[0];if($(".cwb-product-data-tabs .accordion-active .wc-tab").slideUp(),$(".cwb-product-data-tabs .accordion-active").removeClass("accordion-active"),!a&&($(this).closest(".cwb-group-accordion").toggleClass("accordion-active"),$(this).next(".wc-tab").slideToggle(),$(".cwb-product-data-tabs .tabs.wc-tabs")[0])){let b=$(this).next(".wc-tab").attr("id");$(".cwb-product-data-tabs .tabs.wc-tabs .active").removeClass("active"),$('.cwb-product-data-tabs .tabs.wc-tabs a[href="#'+b+'"]').parent().addClass("active")}})),$(".cwb-get-order-notice .end-of-day")[0]){var h=$(".end-of-day").data("timezone"),f=new Date,i=f.getTime()+6e4*f.getTimezoneOffset();let g=new Date(i+36e5*h),j=60*(60-g.getMinutes()),k=j,l,c=23-g.getHours();c=c<10?"0"+c:c;let m=$(".cwb-get-order-notice .end-of-day").data("hours"),n=$(".cwb-get-order-notice .end-of-day").data("minutes");setInterval(function(){l=(l=parseInt(k/60,10))<10?"0"+l:l,$(".cwb-get-order-notice .end-of-day").text(c+" "+m+" "+l+" "+n),--k<0&&(k=j)},1e3)}},productGetOrderTime:function(g){if($(".cwb-get-order-notice .end-of-day")[0]){var d=$(".end-of-day").data("timezone"),b=new Date,e=b.getTime()+6e4*b.getTimezoneOffset();let c=new Date(e+36e5*d),f=60*(60-c.getMinutes()),h=f,i,a=23-c.getHours();a=a<10?"0"+a:a;let j=$(".cwb-get-order-notice .end-of-day").data("hours"),k=$(".cwb-get-order-notice .end-of-day").data("minutes");setInterval(function(){i=(i=parseInt(h/60,10))<10?"0"+i:i,$(".cwb-get-order-notice .end-of-day").text(a+" "+j+" "+i+" "+k),--h<0&&(h=f)},1e3)}},widgetProducts:function(c){var b=c.find(".clever-woo-carousel");b.length&&a.initCarousel(b,b.data("slider_options"))},widgetCategories:function(c){var b=c.find(".clever-woo-carousel");b.length&&a.initCarousel(b,b.data("slider_options"))},reInitCarousel:function(c,b){a.widgetProducts(b)},initCarousel:function(b,a){var c,d,e,f,g,h=b.find(".swiper-slide").length;c=a.slidesToShow.mobile?a.slidesToShow.mobile:1,d=a.slidesToShow.tablet?a.slidesToShow.tablet:1===a.slidesToShow.desktop?1:2,e=a.slidesToShow.desktop,g=768>$(window).width()?c:1025>$(window).width()?d:e,f={slidesPerView:1,breakpoints:{0:{slidesPerView:c,slidesPerGroup:1},768:{slidesPerView:d,slidesPerGroup:1},1025:{slidesPerView:e}},pagination:{el:".swiper-pagination",clickable:!0},navigation:{nextEl:".clever-swiper-button-next",prevEl:".clever-swiper-button-prev"}},h>g?(new Swiper(b,$.extend({},f,a)),b.find(".clever-arrow").show()):("vertical"===a.direction&&b.addClass("swiper-container-vertical"),b.find(".clever-arrow").hide())},cleverCartPopupOpen:function(b){var c=$(b.currentTarget.activeElement).parents(".clever-woo-products, .clever-woo-products-list, .clever-woo-builder-archive-add-to-cart, .clever-woo-builder-single-ajax-add-to-cart").data("cart-popup-enable"),a=$(b.currentTarget.activeElement).parents(".clever-woo-products, .clever-woo-products-list, .clever-woo-builder-archive-add-to-cart, .clever-woo-builder-single-ajax-add-to-cart").data("cart-popup-id");a=$(a)[0],c&&$(window).trigger({type:"clever-popup-open-trigger",popupData:{popupId:"clever-popup-"+a}})},ExtendCartInfo:function(){$(document).on("click",".cwb-cart-extend-info-item >a",function(b){b.preventDefault();let a=$(this).closest(".elementor-clever-single-cart-extend");a.find(".cwb-wrap-content-popup-page").addClass("active"),a.find(".cwb-close-extend-cart-info").addClass("active"),$($(this).data("target")).addClass("active")}),$(document).on("click",".cwb-close-extend-cart-info, .cwb-wrap-content-popup-page .cwb-close-popup-page",function(){$(".cwb-wrap-content-popup-page.active").removeClass("active"),$(".cwb-close-extend-cart-info.active").removeClass("active"),$(".cwb-content-popup-page.active").removeClass("active")})},QuickView:function(a){$(".cwb-mask-close")[0]||$("body").append('
'),$(".cwb-mask-close").addClass("loading active mask-quick-view");var b=$(a.currentTarget).attr("data-id");$(this).parent().addClass("loading");var c=$(a.currentTarget);$.ajax({url:ajaxurl,data:{action:"clever_woo_builder_ajax_quick_view",product_id:b},type:"POST",success:function(a){$("body").append(a),c.parent().removeClass("loading"),setTimeout(function(){$("#cwb-quickview-lb").css("opacity","1"),$("#cwb-quickview-lb").css("top","50%")},100)}})}};$(window).on("elementor/frontend/init",a.init)}(jQuery,window.elementorFrontend)