!function(e,t){"use strict";var n={throttle:function(e,t){let n=0;return function(...i){let a=(new Date).getTime();if(a-n<t)return!1;window.intervalID=setTimeout((function(){e(...i)}),t),n=a}},debounce:function(e,t){let n;return function(...i){n&&clearTimeout(n),n=setTimeout((function(){e(...i)}),t)}},isInViewport:function(e){const t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)},setDefaultFilterData({name:t,classPrefix:n,setArray:i,addClass:a}){const o=new URLSearchParams(window.location.search);if(o.has(t)){o.get(t).split(",").map((t=>{i.add(t);const o=e(`${n}${t}`);a&&a.length&&o.addClass(a),o.prop("checked",!0)}))}}},i={init:function(){var n={"shopengine-single-product-images.default":i.Single_Product_Images,"shopengine-product-filters.default":i.Product_Filters,"shopengine-product-size-charts.default":i.Product_Size_Charts,"shopengine-advanced-coupon.default":i.Advanced_Coupon,"shopengine-avatar.default":i.Avatar};e.each(n,(function(e,n){t.hooks.addAction("frontend/element_ready/"+e,n)}))},Single_Product_Images:function(t){setTimeout((function(){if(t.find(".flex-control-thumbs").length){function n(e){let n=e.el?e.el:t.find(".flex-active"),i=t.find(".flex-control-thumbs"),a=t.find(".flex-viewport"),o="bottom"==e.type?"left":"top",r="bottom"==e.type?n.outerWidth():n.outerHeight(),s="bottom"==e.type?a.outerWidth():a.outerHeight(),l="bottom"==e.type?"translateX":"translateY",f=n.offset()[o]+r-i.offset()[o];if(s<=f){let e=f-s;i.css("transform",l+"(-"+Math.abs(e)+"px)")}else i.css("transform",l+"(0px)")}e(window).width()<=980&&t.removeClass("shopengine_image_gallery_position_left").removeClass("shopengine_image_gallery_position_right").addClass("shopengine_image_gallery_position_bottom"),t.find(".flex-direction-nav, .flex-control-thumbs").wrapAll('<div class="shopengine-gallery-wrapper"></div>'),t.find(".flex-direction-nav a").on("click change input",(function(i,a){t.hasClass("shopengine_image_gallery_position_bottom")?n({type:"bottom",el:a?e(a):""}):n({type:"left-right",el:a?e(a):""})})),t.find(".flex-control-thumbs li").on("click",(function(){t.find(".flex-direction-nav a.flex-next").trigger("click",e(this))}))}else t.find(".flex-control-thumbs").length||(t.find(".shopengine-product-image-toggle").css("margin",0),t.find(".position-top-left").css("margin-left",0))}),0)},Advanced_Coupon:function(e){e.find(".shopengine-coupon-button").on("click",(function(e){let t=jQuery("<input>");jQuery("body").append(t),t.val(jQuery("#shopengine-coupon-code").text()).select(),document.execCommand ("copy"),t.remove(),jQuery(".shopengine-coupon").addClass("shopengine-coupon-active"),setTimeout((()=>{jQuery(".shopengine-coupon").removeClass("shopengine-coupon-active")}),500)}))},Product_Filters:function(t){var i=t.find(".shopengine-product-filters-wrapper"),a=i.data("filter-price"),o=i.data("filter-rating"),r=i.data("filter-color"),s=i.data("filter-category"),l=i.data("filter-attribute"),f=i.data("filter-label"),c=i.data("filter-image"),g=i.data("filter-shipping"),d=i.data("filter-stock"),p=i.data("filter-onsale"),u=i.data("filter-view-mode"),h=t.find(".shopengine-filter-price"),m=t.find(".shopengine-filter-price-slider"),_=t.find(".shopengine-filter-price-reset"),v=t.find(".shopengine-filter-price-result"),y=i.find('input[name="min_price"]'),b=i.find('input[name="max_price"]'),w=v.data("sign"),x=h.data("default-range");let C=t.find(".shopengine-filter-rating__labels"),k=new Set,I=new Set,A=t.find(".shopengine-filter-group-toggle"),S=t.find(".shopengine-filter-group-content-wrapper"),D=t.find(".shopengine-filter-group-content-underlay"),P=t.find(".shopengine-filter-group-content-close");if(A.add(P).add(D).on("click",(function(){A.toggleClass("active"),S.toggleClass("isactive")})),e(document).on("click",(e=>{if(S.hasClass("isactive")){e.target.closest(".shopengine-filter-group-content-wrapper, .shopengine-filter-group-toggle")||(A.toggleClass("active"),S.toggleClass("isactive")),e.target==document.querySelector(".shopengine-filter-overlay")&&S.removeClass("isactive")}})),"collapse"===u){t.find(".shopengine-collapse .shopengine-product-filter-title").on("click",(e=>{e.preventDefault(),e.stopPropagation();const t=e.target.closest(".shopengine-filter");t.classList.toggle("open"),t.nextElementSibling.classList.toggle("open")}))}const R=({form:e,filterInput:t,formInput:i})=>{let a={};t.map(((e,t)=>{a[t.name]||(a[t.name]=new Set);const i={name:t.name,classPrefix:`.${t.name}-`,setArray:a[t.name]};n.setDefaultFilterData(i)})),t.on("change",(function(t){const n=t.target.value,o=t.target.name;a[o]||(a[o]=new Set),a[o].has(n)?a[o]["delete"](n):a[o].add(n),i.attr("name",o),i.attr("value",Array.from(a[o])),e.trigger("submit")}))};var F=t.find(".shopengine-filter-scroll-wrapper").data("scroll"),j=t.find(".shopengine-filter-scroll-wrapper").data("height"),L=t.find(".shopengine-filter-scroll-wrapper");if("yes"===F&&(e(L).css("height",j),e(L).css("padding-right","10px"),SimpleScrollbar.initEl(L[0])),"yes"===a){let n=t.find(".shopengine-filter-price"),i=!1;m.asRange("val",[10,300]);const a=new URLSearchParams(window.location.search);let o=n.data("exchange-rate");a.has("min_price")&&a.has("max_price")&&(i=0!==o?[a.get("min_price")*o,a.get("max_price")*o]:[a.get("min_price"),a.get("max_price")],v.text(w+i[0]+" - "+w+i[1])),m.asRange({range:!0,min:0,max:x[1],step:1,tip:!1,scale:!1,replaceFirst:0,value:i||x}).on("asRange::change",(function(e,t,n){v.text(w+n[0]+" - "+w+n[1])})).on("asRange::moveEnd",(function(){var t=e(this).data("asRange").value;if(0!==o)var i=t[0]/o,a=t[1]/o;else i=t[0],a=t[1];y.val(i),b.val(a),n.trigger("submit")})),_.on("click",(function(){m.asRange("val",x),n.trigger("reset").trigger("submit")}))}if("yes"===o){const e={name:"rating_filter",classPrefix:".shopengine-rating-name-",setArray:k,addClass:"checked"};n.setDefaultFilterData(e);let i=t.find(".shopengine-filter.shopengine-filter-rating");C.on("click",(function(e){e.preventDefault();let n=e.target.closest(".rating-label-triger");if(n){let e=n.dataset.rating,a=n.dataset.target,o=t.find(n),r=t.find(`#${a}`);k.has(e)?k["delete"](e):k.add(e),o.hasClass("checked")?o.removeClass("checked"):o.addClass("checked"),r.attr("value",Array.from(k)),i.trigger("submit")}}))}if("yes"===r){R({form:t.find("#shopengine_color_form"),filterInput:t.find(".shopengine-filter-colors"),formInput:t.find(".shopengine-filter-colors-value")})}if("yes"===s){let i=t.find("#shopengine_category_form"),a=t.find(".shopengine-filter-categories"),o=t.find("#shopengine_filter_category"),r=t.find(".shopengine-filter-category-toggle");const s={name:"shopengine_filter_category",classPrefix:".shopengine-category-name-",setArray:I};n.setDefaultFilterData(s),r.on("click",(function(){let t=e(this).data("target"),n=e(this).attr("aria-expanded"),i=e(this).parent().parent();"true"===n?(i.removeClass("isActive"),e(t).slideUp(),e(this).attr("aria-expanded","false")):(i.addClass("isActive"),e(t).slideDown(),e(this).attr("aria-expanded","true"))})),a.on("click",(function(n){let a=n.target.value;I.has(a)?I["delete"](a):I.add(a),o.attr("value",Array.from(I));let r=e(this).parent(),s=r.find(".shopengine-filter-category-toggle");r.parent().hasClass("isActive")||e(this).hasClass("shopengine-filter-subcategory")||t.find(".shopengine-filter-category-has-child.isActive").find(".shopengine-filter-category-toggle").trigger("click"),r.parent().hasClass("shopengine-filter-category-has-child")&&"true"!==s.attr("aria-expanded")&&s.trigger("click"),i.trigger("submit")}))}if("yes"===l){R({form:t.find("#shopengine_attribute_form"),filterInput:t.find(".shopengine-filter-attribute"),formInput:t.find(".shopengine-filter-attribute-value")})}if("yes"===f){R({form:t.find("#shopengine_label_form"),filterInput:t.find(".shopengine-filter-label"),formInput:t.find(".shopengine-filter-label-value")})}if("yes"===c){R({form:t.find("#shopengine_image_form"),filterInput:t.find(".shopengine-filter-image"),formInput:t.find(".shopengine-filter-image-value")})}if("yes"===g){R({form:t.find("#shopengine_shipping_form"),filterInput:t.find(".shopengine-filter-shipping"),formInput:t.find(".shopengine-filter-shipping-value")})}if("yes"===d){R({form:t.find("#shopengine_stock_form"),filterInput:t.find(".shopengine-filter-stock"),formInput:t.find(".shopengine-filter-stock-value")})}if("yes"===p){R({form:t.find("#shopengine_onsale_form"),filterInput:t.find(".shopengine-filter-onsale"),formInput:t.find(".shopengine-filter-onsale-value")})}},Product_Size_Charts:function(t){let n=t.find(".shopengine-product-size-chart-button"),i=t.find(".shopengine-product-size-chart");n.on("click",(function(){i.css({display:"flex"})})),i.on("click",(function(){"yes"===e(this).data("model")&&i.css({display:"none"})}))},Avatar:function(t){let n=t.find(".shopengine_avatar_image"),i=t.find(".shopengine-avatar__info--btn"),a=t.find(".shopengine-avatar__thumbnail .avatar"),o=t.find("#shopengine_avatar_image_cancel_button"),r=a.attr("src");"yes"===t.find(".shopengine-avatar-container").data("editor")&&(i.fadeIn(300),o.fadeIn(300)),a.closest("form").attr("enctype","multipart/form-data"),o.on("click",(function(){o.fadeOut(300),a.attr("src",r),e(".shopengine-avatar__thumbnail--file").val(""),i.fadeOut(300)})),e(n).on("change",(function(){let t=e(this)[0].files[0],n=URL.createObjectURL(t);a.attr("src",n),o.fadeIn(300),t&&i.fadeIn(300)})),e(i).on("click",(function(){e(this).fadeOut(500),o.fadeOut(300)}))}};e(window).on("elementor/frontend/init",i.init)}(jQuery,window.elementorFrontend);
function shopengine_currency_switcher(e){let t=new URL(window.location),o=new URLSearchParams(t.search);o.set("currency",e),window.location=window.location.origin+window.location.pathname+"?"+o.toString()}!function(e,t){"use strict";var o=function(e,t){let o=0;return function(...n){let i=(new Date).getTime();if(i-o<t)return!1;window.intervalID=setTimeout((function(){e(...n)}),t),o=i}},n=function(e,t){let o;return function(...n){o&&clearTimeout(o),o=setTimeout((function(){e(...n)}),t)}},i=function(e){const t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)},r=function(t,o){let n=t?e(t).get(0):null;if("undefined"==typeof Swiper){return elementorFrontend.utils.assetsLoader.load("script","swiper").then((()=>new Swiper(n,o)))}{const e=new Swiper(n,o);return Promise.resolve(e)}},a=function(t){var o="target"in t?t.target.closest("a"):t[0];if(o){var n=e(o).parents(".wc-tabs"),i=n.find(".shopengine-tabs-line"),r=n[0].getBoundingClientRect(),a=o.getBoundingClientRect().x-r.x;i.animate({width:`${a}px`},100,(()=>{i.animate({left:`${a}px`,width:"30px"},100)}))}},s={get_url:function(e,t){return e.wc_ajax_url.toString().replace("%%endpoint%%",t)},is_blocked:function(e){return e.is(".processing")||e.parents(".processing").length},block:function(e){this.is_blocked(e)||e.addClass("processing").block({message:null,overlayCSS:{background:"#fff",opacity:.6}})},unblock:function(e){e.removeClass("processing").unblock()},show_notice:function(t,o){o||(o=e(".woocommerce-notices-wrapper:first")||e(".cart-empty").closest(".woocommerce")||e(".woocommerce-cart-form")),o.prepend(t)},remove_duplicate_notices:function(t){var o=[],n=t;return t.each((function(t){var i=e(this).text();"undefined"==typeof o[i]?o[i]=!0:n.splice(t,1)})),n},update_cart_totals_div:function(t){e(".cart_totals").replaceWith(t),e(document.body).trigger("updated_cart_totals")},update_wc_div:function(t,o){var n=e.parseHTML(t),i=e(".shopengine-cart-form",n),r=e(".cart_totals",n),a=this.remove_duplicate_notices(e(".woocommerce-error, .woocommerce-message, .woocommerce-info",n));0!==e(".shopengine-cart-form").length?(o||e(".woocommerce-error, .woocommerce-message, .woocommerce-info").remove(),0===i.length?(e(document.body).trigger("wc_cart_emptied"),window.location.reload()):(e(".woocommerce-checkout").length&&e(document.body).trigger("update_checkout"),e(".shopengine-cart-form").replaceWith(i),e(".shopengine-cart-form").find(':input[name="update_cart"]').prop("disabled",!0).attr("aria-disabled",!0),a.length>0&&this.show_notice(a),this.update_cart_totals_div(r)),e(document.body).trigger("updated_wc_div")):window.location.reload()}},c={init:function(){var o={"shopengine-archive-view-mode.default":c.Archive_View_Mode,"shopengine-related.default":c.Related_Slider,"shopengine-cross-sells.default":c.Cross_Sells_Slider,"shopengine-up-sells.default":c.Up_Sells_Slider,"shopengine-product-tabs.default":c.Product_Tabs,"shopengine-product-review.default":c.Product_Review,"shopengine-single-product-images.default":c.Single_Product_Images,"shopengine-cart-table.default":c.Cart_Table,"shopengine-cart-totals.default":c.Cart_Totals,"shopengine-filter-orderby.default":c.Filter_OrderBy,"shopengine-checkout-coupon-form.default":c.Checkout_Coupon_Form,"shopengine-checkout-review-order.default":c.Checkout_Review_Order,"shopengine-checkout-form-shipping.default":c.Checkout_Form_Shipping,"shopengine-filter-products-per-page.default":c.Filter_ProductsPerPage,"shopengine-archive-products.default":c.Archive_Products,"shopengine-advanced-search.default":c.Advanced_Search,"shopengine-add-to-cart.default":c.Add_To_Cart,"shopengine-categories.default":c.Categories,"shopengine-deal-products.default":c.Deal_Products,"shopengine-flash-sale-products.default":c.Deal_Products,"shopengine-filterable-product-list.default":c.FilterableProductList,"shopengine-checkout-form-login.default":c.CheckoutFormLogin,"shopengine-checkout-shipping-methods.default":c.ShippingMethod};e.each(o,(function(e,o){t.hooks.addAction("frontend/element_ready/"+e,o)}))},Archive_View_Mode:function(t){t.on("click",".shopengine-archive-view-mode-switch",(function(t){let o=e(this),n=o.data("view");t.preventDefault(),o.addClass("isactive"),o.siblings().removeClass("isactive"),e(document).find(".shopengine-archive-products").removeClass((function(t,o){let n=o.split(" "),i=[];return e.each(n,(function(e,t){/shopengine-archive-products--view-.*/.test(t)&&i.push(t)})),i.join(" ")})).addClass("shopengine-archive-products--view-"+n)}))},Advanced_Search:function(t){let n=t.find(".shopengine-search-form"),i=n.attr("action"),r=n.find(".shopengine-search-result-container"),a="";n.on("submit",(function(o){o.preventDefault();let s=e(this).serialize(),c=new URLSearchParams(s),l=c.get("s"),d=c.get("nonce");a=l,e(this).data("submitted-data")!=s&&null!==l&&""!=l&&e.ajax({url:i,method:"GET",data:s,dataType:"html",beforeSend:function(e){e.setRequestHeader("X-WP-Nonce",d),n.addClass("is-loading").data("submitted-data",s)},success:function(o){n.removeClass("is-loading").addClass("sr-container-opened"),r.find(".shopengine-search-result").html(o);let i=r.find(".shopengine-search-result")[0].getBoundingClientRect().height;i<=500?r.css({height:`${i}px`}):r.css({height:"500px"}),SimpleScrollbar.unbindEl(r[0]),SimpleScrollbar.initEl(r[0]),e("body").addClass("shopengine-sr-container-open-body"),t.find(".shopengine-search-product__item--title a").map((function(t,o){let n=e(o).text();return n=n.replaceAll(a,`<strong>${a}</strong>`),e(o).html(n),!0}))}})})),e(document).on("click",".shopengine-sr-container-open-body",(function(t){e(t.target).parents(".shopengine-search-form").length>0||(n.removeClass("sr-container-opened"),e("body").removeClass("shopengine-sr-container-open-body"))})),n.on("keyup change",".shopengine-advanced-search-input, .shopengine-ele-nav-search-select",o((function(){n.submit()}),500))},Archive_Products:function(t){var o={main:t.find(".shopengine-archive-products"),product:t.find(".shopengine-archive-products ul.products"),pagi:t.find(".woocommerce-pagination"),style:t.find(".shopengine-archive-products").data("pagination"),is_tooltip:t.find(".archive-product-container").data("tooltip"),tooltip_container:t.find(".archive-product-container")};function r(){if("yes"===o.is_tooltip){o.tooltip_container=t.find(".archive-product-container");var n=e(o.tooltip_container).find(".button"),i=e(o.tooltip_container).find(".shopengine-quickview-trigger"),r=e(o.tooltip_container).find(".shopengine-wishlist"),a=e(o.tooltip_container).find(".shopengine-comparison"),s=e(o.tooltip_container).find(".shopengine_direct_checkout");function c(t,o){t.each((function(t,n){e(n).find(".tooltiptext").length?e(n).find(".tooltiptext").text(o):(e("body").hasClass("theme-kadence")&&e(n).find("span").length&&e(n).find("span").remove(),n.insertAdjacentHTML("beforeend",`<p class='tooltiptext'>${o}</p>`))}))}n.length>0&&c(n,shopengineLoopProductConfig?.add_to_cart||"Add to Cart"),i.length>0&&c(i,shopengineLoopProductConfig?.quick_view||"Quick View"),r.length>0&&c(r,shopengineLoopProductConfig?.add_to_wishlist||"Add to Wishlist"),a.length>0&&c(a,shopengineLoopProductConfig?.compare||"Compare"),s.length>0&&c(s,shopengineLoopProductConfig?.direct_checkout||"Direct Checkout")}}function a(n,i,a){e.ajax({url:i,beforeSend:function(){o.main.addClass("is-loading"),"numeric"!==o.style&&"default"!==o.style||window.history.pushState({},document.title,i)},success:function(n){let i=e(n).find(".shopengine-archive-products").first(),s=(t.find(".shopengine-archive-products"),t.find(".shopengine-archive-products ul.products")),c=t.find(".woocommerce-pagination"),l=t.find(".shopengine-archive-products").data("pagination");if("numeric"===l||"default"===l)o.main.html(i.html()),t[0].scrollIntoView();else if("load-more"===l){let t=e(n).find(".shopengine-archive-products ul.products"),o=e(n).find(".woocommerce-pagination");s.append(t.html()),c.html(o.html())}else if("load-more-on-scroll"===l&&a){let t=e(n).find(".shopengine-archive-products ul.products"),o=e(n).find(".woocommerce-pagination");s.append(t.html()),c.html(o.html())}let d=e(".shopengine-archive-result-count > p");if(d.length){let e=i.find("p.woocommerce-result-count").text();e.includes("Sorted by")&&(e=e.replace("Sorted by"," - Sorted by")),d.text(e)}r()},complete:function(){o.main.removeClass("is-loading");if(!["load-more","load-more-on-scroll"].includes(n)){var i=t.offset().top;e(window).scrollTop(i)}}})}r(),"load-more-on-scroll"===o.style&&e(document).on("scroll",n((function(){if(i(o.pagi[0])){let e=t.find(".woocommerce-pagination .next").attr("href");e&&a(o.style,e,!0)}}),500)),o.pagi.length&&e(t).on("click","a.page-numbers",(function(e){e.preventDefault(),e.stopPropagation(),a(o.style,this.href,!1)}))},Categories:function(t){e(".shopengine-categories ul.children").hide(),e(".shopengine-categories li").removeClass("active opened"),t.find(".shopengine-categories li").on("click",(function(t){if("undefined"!=typeof t.target.href||!e(t.target).hasClass("cat-parent"))return;t.preventDefault(),t.stopPropagation();let o=e(t.target);o.hasClass("children-expended")?(o.removeClass("children-expended"),o.find("> .children").slideUp()):(o.addClass("children-expended"),o.find("> .children").slideDown())}))},Product_Tabs:function(e){e.find(".wc-tabs-wrapper, .woocommerce-tabs, #rating").trigger("init");let t=e.find(".tabs.wc-tabs");if(t.length){let e=document.createElement("div");e.setAttribute("class","shopengine-tabs-line"),t[0].appendChild(e),t.on("click",a),setTimeout((function(){a(t.find("li.active a"))}),250)}},Related_Slider:function(e){let t=e.find(".shopengine-related.slider-enabled");if(t.length){let o=t.data("controls"),n=Boolean(o.slider_enabled),i=parseInt(o.slides_to_show),a=parseInt(o.slides_to_show_mobile),s=parseInt(o.slides_to_show_tablet),c=Boolean(o.slider_loop),l=Boolean(o.slider_autoplay),d=parseInt(o.slider_autoplay_delay),p=parseInt(o.slider_space_between),u=e.find(".slider-enabled .related").get(0),h=e.find(".swiper-button-next").get(0),f=e.find(".swiper-button-prev").get(0),g=e.find(".swiper-pagination").get(0);r(u,{direction:"horizontal",slidesPerView:i,spaceBetween:p,loop:c,breakpoints:{270:{slidesPerView:a||1},540:{slidesPerView:s||2},770:{slidesPerView:s||3},900:{slidesPerView:i}},wrapperClass:"products",slideClass:"product",grabCursor:!0,freeMode:!0,centeredSlides:!1,allowTouchMove:n,speed:500,parallax:!0,autoplay:!!l&&{delay:d},effect:"slide",pagination:{el:g,type:"bullets",dynamicBullets:!0,clickable:!0},navigation:{nextEl:h,prevEl:f},on:{snapGridLengthChange:function(){var e=this.slidesSizesGrid[0];this.slides.each((function(){this.style.maxWidth=e-10+"px",-1!==this.className.indexOf(" last ")&&this.classList.remove("last")}))}}})}},Cross_Sells_Slider:function(e){let t=e.find(".shopengine-cross-sells.slider-enabled");if(t.length){let o=t.data("controls"),n=Boolean(o.slider_enabled),i=parseInt(o.slides_to_show),a=Boolean(o.slider_loop),s=Boolean(o.slider_autoplay),c=parseInt(o.slider_autoplay_delay),l=parseInt(o.slider_space_between),d=parseInt(o.selected_item),p=e.find(".swiper-pagination").get(0),u=e.find(".swiper-button-next").get(0),h=e.find(".swiper-button-prev").get(0),f=e.find(".shopengine-cross-sells.slider-enabled > .cross-sells").get(0);i>=d&&(a=!1),r(f,{direction:"horizontal",slidesPerView:i,spaceBetween:l,loop:a,breakpoints:{320:{slidesPerView:1},540:{slidesPerView:2},770:{slidesPerView:3},900:{slidesPerView:i}},wrapperClass:"products",slideClass:"product",grabCursor:!0,freeMode:!0,centeredSlides:!1,allowTouchMove:n,speed:500,parallax:!0,autoplay:!!s&&{delay:c},effect:"slide",pagination:{el:p,type:"bullets",dynamicBullets:!0,clickable:!0},navigation:{nextEl:u,prevEl:h},on:{snapGridLengthChange:function(){var e=this.slidesSizesGrid[0];this.slides.each((function(){this.style.maxWidth=e-10+"px;",-1!==this.className.indexOf(" last ")&&this.classList.remove("last")}))}}})}},Up_Sells_Slider:function(e){let t=e.find(".shopengine-up-sells.slider-enabled");if(t.length){let o=t.data("controls"),n=Boolean(o.slider_enabled),i=parseInt(o.slides_to_show),a=Boolean(o.slider_loop),s=Boolean(o.slider_autoplay),c=parseInt(o.slider_autoplay_delay),l=parseInt(o.slider_space_between),d=parseInt(o.selected_item),p=e.find(".swiper-pagination").get(0),u=e.find(".swiper-button-next").get(0),h=e.find(".swiper-button-prev").get(0),f=e.find(".up-sells.products").get(0);i>=d&&(a=!1);r(f,{direction:"horizontal",slidesPerView:i,spaceBetween:l,loop:a,breakpoints:{320:{slidesPerView:1},540:{slidesPerView:2},770:{slidesPerView:3},900:{slidesPerView:i}},wrapperClass:"products",slideClass:"product",grabCursor:!0,freeMode:!0,centeredSlides:!1,allowTouchMove:n,speed:500,parallax:!0,autoplay:!!s&&{delay:c},effect:"slide",pagination:{el:p,type:"bullets",dynamicBullets:!0,clickable:!0},navigation:{nextEl:u,prevEl:h},on:{snapGridLengthChange:function(){var e=this.slidesSizesGrid[0];this.slides.each((function(){this.style.maxWidth=e-10+"px",-1!==this.className.indexOf(" last ")&&this.classList.remove("last")}))}}})}},Product_Review:function(e){e.find(".stars").length||(e.find("#rating").before('<p class="stars">\t\t\t\t\t\t<span>\t\t\t\t\t\t\t<a title="One Star" class="star-1" href="javascript:void(0)">1</a>\t\t\t\t\t\t\t<a title="Two Star" class="star-2" href="javascript:void(0)">2</a>\t\t\t\t\t\t\t<a title="Three Star" class="star-3" href="javascript:void(0)">3</a>\t\t\t\t\t\t\t<a title="Four Star" class="star-4" href="javascript:void(0)">4</a>\t\t\t\t\t\t\t<a title="Five Star" class="star-5" href="javascript:void(0)">5</a>\t\t\t\t\t\t</span>\t\t\t\t\t</p>'),e.find("#rating").hide()),e.find(".stars:not(:first)").remove()},Single_Product_Images:function(t){"undefined"!=typeof e.fn.wc_product_gallery&&t.find(".woocommerce-product-gallery").wc_product_gallery(),t.find(".flex-viewport").css("height","auto"),t.on("click",".shopengine-product-image .shopengine-product-image-toggle",(function(e){e.preventDefault();let o=t.find(".woocommerce-product-gallery__trigger");o.length?o.click():t.find(".flex-active-slide a").click()})),e(".pswp__button.pswp__button--close, .pswp__container").on("click",(function(){setTimeout((()=>{e(".pswp--open").removeClass("pswp--open")}),0)}));let o=e("#shopengine-variable-onsale-badge");e(".variations_form").on("found_variation",(function(e,t){let n=t?.variation_id;if("undefined"!=typeof ShopEngineSaleVariations&&ShopEngineSaleVariations.hasOwnProperty(n)){let e=ShopEngineSaleVariations[n];e>0?(o.text(e+"% OFF"),o.show()):o.hide()}else o.hide()}));let n=e(".shopengine-product-stock"),i=n.data("variations")||{};e(".variations_form").on("found_variation",(function(e,t){let o=t?.variation_id;if(n.length&&o&&i[o]){let e=i[o],t=n.find("p.stock");if(t.length){t.removeClass("in-stock out-of-stock on-backorder"),t.addClass(e["class"]);let o="";o="onbackorder"===e.stock_status?e.availability||"On backorder":"instock"===e.stock_status?e.availability||"In Stock":e.availability||"Out of stock";let n=e.icon||"";t.html(n+o)}}})),e(".variations_form").on("reset_data",(function(){if(n.length){let e=n.find("p.stock");if(e.length){let t=n.data("default-stock")||{stock_status:"instock",availability:"","class":"in-stock",icon:""};e.removeClass("in-stock out-of-stock on-backorder"),e.addClass(t["class"]);let o="";o="onbackorder"===t.stock_status?t.availability||"On backorder":"instock"===t.stock_status?t.availability||"In Stock":t.availability||"Out of stock";let i=t.icon||"";e.html(i+o)}}}))},Cart_Table:function(t){t.find(".shopengine-cart-quantity input.qty").each((function(){let t=e(this),o=parseInt(t.val(),10),n=parseInt(t.attr("min"),10);isNaN(n)&&(n=0),!isNaN(o)&&o>n&&t.attr("min",o)})),t.on("click",".minus-button, .plus-button",(function(o){o.preventDefault();let n=e(this),i=n.closest(".shopengine-cart-quantity").find("input.qty"),r=parseInt(i.val(),10);var a=parseInt(i.attr("min"),10),s=parseInt(i.attr("max"),10),c=parseInt(i.attr("step"),10);isNaN(a)&&(a=0),(isNaN(c)||c<1)&&(c=1),n.is(".minus-button")?r-c>=a&&(r-=c):(!s||r+c<=s)&&(r+=c),i.val(r),t.find("[name=update_cart]").prop("disabled",!1)})),t.on("change",".shopengine-cart-quantity input.qty",(function(o){let n=e(this),i=parseInt(n.val(),10),r=parseInt(n.attr("min"),10),a=parseInt(n.attr("max"),10),s=parseInt(n.attr("step"),10);isNaN(r)&&(r=0),(isNaN(s)||s<1)&&(s=1),!isNaN(i)&&i<r&&n.val(r),!isNaN(a)&&!isNaN(i)&&i>a&&n.val(a),t.find("[name=update_cart]").prop("disabled",!1)})),t.on("click","[name=empty_cart]",(function(o){o.preventDefault();let n=t.find(".product-remove > a");n.length&&n.each((function(){e(this).trigger("click")}))})),t.on("click","button[name=update_cart]",(function(o){o.preventDefault();let n=t.find("form.shopengine-cart-form");if(s.is_blocked(n))return!1;s.block(n),s.block(e("div.cart_totals")),e("<input />").attr("type","hidden").attr("name","update_cart").attr("value","Update Cart").appendTo(n),e.ajax({type:n.attr("method"),url:n.attr("action"),data:n.serialize(),dataType:"html",success:function(e){s.update_wc_div(e)},complete:function(){s.unblock(n),s.unblock(e("div.cart_totals")),e.scroll_to_notices(e('[role="alert"]'))}})})),e(document).on("click",".woocommerce-cart-form .product-remove > a",(function(t){t.preventDefault(),e(document).on("wc_cart_emptied",(function(){location.reload()}))}))},Cart_Totals:function(e){var t=e.find("tr.shipping > td");t.length&&t.attr("colspan","2")},Filter_OrderBy:function(e){var t=e.find(".shopengine-filter");e.find(".orderby").on("change",(function(){t.trigger("submit")}))},Checkout_Coupon_Form:function(t){t.on("click","button.showcoupon",(function(){return e(".shopengine-checkout-coupon").slideToggle(400,(function(){e(".shopengine-checkout-coupon").find(":input:eq(0)").focus()})),!1})),t.on("click",'button[name="apply_coupon"]',(function(o){o.preventDefault();let n,i=t.find(".shopengine-checkout-coupon-form").find(".shopengine-checkout-coupon"),r=!!e(document.body).hasClass("shopengine-cart"),a=r?wc_cart_params:wc_checkout_params,c={security:r?wc_cart_params.apply_coupon_nonce:wc_checkout_params.apply_coupon_nonce,coupon_code:i.find('input[name="coupon_code"]').val()};return s.is_blocked(i)||(s.block(i),n=e(document.body).find(".shopengine-woocommerce-checkout .woocommerce-notices-wrapper, .shopengine-cart-table .woocommerce-notices-wrapper"),e.ajax({type:"POST",url:s.get_url(a,"apply_coupon"),data:c,success:function(t){e(".woocommerce-error, .woocommerce-message").remove(),n.after(t),i.slideUp(),s.unblock(e(i)),t&&(r?(s.block(e("div.cart_totals")),e.ajax({url:s.get_url(wc_cart_params,"get_cart_totals"),dataType:"html",success:function(e){s.update_cart_totals_div(e)},complete:function(){s.unblock(e("div.cart_totals")),e.scroll_to_notices(e('[role="alert"]'))}})):(e(document.body).trigger("applied_coupon_in_checkout",[c.coupon_code]),e(document.body).trigger("update_checkout",{update_shipping_method:!1})))},dataType:"html"})),!1}))},Checkout_Review_Order:function(e){},Checkout_Form_Shipping:function(e){var t=e.find("#ship-to-different-address-checkbox"),o=e.find(".shipping_address");(elementorFrontend.isWPPreviewMode()||elementorFrontend.isEditMode())&&(o.hide(),t.change((function(){this.checked?o.slideDown():o.hide()})))},ShippingMethod:function(t){let o=t.closest("form");o.find(".shopengine-checkout-review-order .woocommerce-shipping-totals").remove(),e(window).on("updated_checkout",(function(t,n){if(n&&n.fragments){o.find(".shopengine-checkout-review-order .woocommerce-shipping-totals").remove();let t=n.fragments[".woocommerce-checkout-review-order-table"],i=e(t).find(".woocommerce-shipping-totals");i.length&&e(document.body).find(".woocommerce-shipping-totals").replaceWith(i)}}))},Filter_ProductsPerPage:function(e){var t=e.find(".shopengine-products-per-page");t.on("change",(function(){t.trigger("submit")}))},Add_To_Cart:function(t){let o=t.find("form.cart");o.length&&o.on("click",".plus, .minus",(function(){let t=e(o).find('.qty:not([type="hidden"])'),n=o.hasClass("grouped_form")?e(this).parents("tr").find(".qty"):t,i=n.val()?parseFloat(n.val()):0,r=parseFloat(n.attr("max")),a=parseFloat(n.attr("min")),s=parseFloat(n.attr("step"));isNaN(a)&&(a=0),(isNaN(s)||s<1)&&(s=1),e(this).is(".plus")?(!r||i+s<=r)&&n.val(i+s):i-s>=a&&n.val(i-s)}))},Deal_Products:function(t){let o=t.find(".deal-products"),n=t.find(".deal-products__grap--line");const i=6e4,r=36e5,a=24*r;e.each(o,((t,o)=>(t=>{let o=e(t),n=JSON.parse(t.dataset.dealData),s=new Date(n.end_time.replace(/-/g,"/")).getTime(),c=o.find(".clock-days"),l=o.find(".clock-hou"),d=o.find(".clock-min"),p=o.find(".clock-sec"),u=setInterval((()=>{let e=(new Date).getTime(),o=s-e;c.text(Math.floor(o/a)),"yes"===n.show_days?l.text(Math.floor(o%a/r)):l.text(Math.floor(o/r)),d.text(Math.floor(o%r/i)),p.text(Math.floor(o%i/1e3)),o<0&&(clearInterval(u),t.css({display:"none"}))}),500)})(o)));const s=new ResizeObserver((t=>{e.each(t,((e,t)=>(e=>{const t=e.getContext("2d"),o=e.parentNode.getBoundingClientRect().width,n=e.height,i=JSON.parse(e.dataset.settings),r=i.total_sell/i.stock_qty*o;e.setAttribute("width",o+10),t.beginPath(),t.moveTo(2,n/2),t.lineTo(o,n/2),t.lineCap=i.bg_line_cap,t.lineWidth=i.bg_line_height,t.strokeStyle=i.bg_line_clr,t.stroke(),r>0&&(t.beginPath(),t.moveTo(2,n/2),t.lineTo(r,n/2),t.lineCap=i.prog_line_cap,t.lineWidth=i.prog_line_height,t.strokeStyle=i.prog_line_clr,t.stroke())})(t.target)))}));e.each(n,((e,t)=>{s.observe(t)}))},FilterableProductList:function(t){let o=t.find(".filter-nav-link"),n=t.find(".shopengine-filterable-product-wrap"),i=t.find(".filter-content"),r=JSON.parse(t.find(".shopengine-shopengine-filterable-product-list").attr("data-widget_settings"));t.on("click",".filter-nav-link",(function(t){t.preventDefault();let a=e(this),s=a.data("product-list"),c=a.data("filter-uid"),l=a.data("product-order"),d=a.data("product-order-by");o.removeClass("active"),a.addClass("active"),i.find(`.filter-${c}`).length?(i.find(".filtered-product-list").removeClass("active"),i.find(".filter-"+c).addClass("active")):jQuery.ajax({data:{products:s,order:l,order_by:d,settings:r},type:"GET",dataType:"html",url:shopEngineApiSettings.resturl+"shopengine-builder/v1/widgets_partials/filter_cat_products/",beforeSend:function(){n.addClass("is-loading")},success:function(e){i.find(".filtered-product-list").removeClass("active"),i.find(`.filter-${c}`).length||i.append('<div class="filter-content-row filtered-product-list active filter-'+c+'">'+e+"</div>")},complete:function(){n.removeClass("is-loading")}})}))},CheckoutFormLogin:function(e){let t=e.find(".woocommerce-form-login-toggle");if(0===t.length)return;t.remove();let o=e.find(".shopengine-checkout-form-login"),n=t[0].outerHTML+'<div class="shopengine-checkout-login-form" style="display:none">'+o.html()+"</div>";o.html(n),e.on("click",".showlogin",(function(t){t.preventDefault();let o=e.find(".shopengine-checkout-login-form");"none"===o.css("display")?o.slideDown():o.slideUp()})),e.on("click",".woocommerce-form-login__submit",(function(t){t.preventDefault(),t.target.disabled=!0;let o=e[0].querySelector('input[name="username"]'),n=e[0].querySelector('input[name="password"]'),i=e[0].querySelector('input[name="rememberme"]'),r=e[0].querySelector(".form-row-first"),a=e[0].querySelector(".form-row-last"),s=!0;if(0===o.value.length?(r.querySelector(".shopengine-checkout-login-required-msg")||(r.innerHTML+='<span class="shopengine-checkout-login-required-msg" style="color:red">User name or email field is required</span>'),s=!1):r.querySelector(".shopengine-checkout-login-required-msg")&&r.querySelector(".shopengine-checkout-login-required-msg").remove(),0===n.value.length?(a.querySelector(".shopengine-checkout-login-required-msg")||(a.innerHTML+='<span class="shopengine-checkout-login-required-msg" style="color:red">Password field is required</span>'),s=!1):a.querySelector(".shopengine-checkout-login-required-msg")&&a.querySelector(".shopengine-checkout-login-required-msg").remove(),!1===s)t.target.disabled=!1;else{e[0].querySelectorAll(".shopengine-checkout-login-required-msg").forEach((e=>{e.remove()})),jQuery.ajax({data:{user_login:o.value,user_password:n.value,rememberme:i.checked},type:"POST",dataType:"json",url:shopEngineApiSettings.resturl+"shopengine-builder/v1/widgets_partials/checkout_login/",success:function(){location.reload()},error:function(t){e.find(".woocommerce-NoticeGroup").remove();let o='<div class="woocommerce-NoticeGroup woocommerce-NoticeGroup-checkout"><ul class="woocommerce-error" role="alert"><ul><li>'+t.responseJSON.message+"</li></ul></div>";jQuery(".shopengine-checkout-form-login").prepend(o)},complete:function(){e.find(".woocommerce-form-login__submit").prop("disabled",!1)}})}}))}};e(window).on("elementor/frontend/init",c.init),e(document).on("click","button.my-xs-class",(function(t){t.preventDefault();let o=e("form.checkout_coupon");o.find("#coupon_code").val(jQuery(this).closest("div").find("#shopengine_code").val()),o.trigger("submit")}))}(jQuery,window.elementorFrontend);let shopengine_wrapper=document.querySelector(".shopengine-checkout-notice");if(shopengine_wrapper){const e=document.querySelector(".shopengine-woocommerce-checkout-form");if(e){const t={childList:!0,subtree:!0};new MutationObserver((function(){let e=document.querySelector(".woocommerce-NoticeGroup");e&&""!==e.innerHTML&&(shopengine_wrapper.innerHTML=e.innerHTML,e.innerHTML="")})).observe(e,t)}};