!function(l){woodmartThemeModule.scrollTop=function(){var o=l(".scrollToTop");woodmartThemeModule.$window.on("scroll",function(){100<l(this).scrollTop()?o.addClass("button-show"):o.removeClass("button-show")}),o.on("click",function(){return l("html, body").animate({scrollTop:0},800),!1})},l(document).ready(function(){woodmartThemeModule.scrollTop()})}(jQuery);
!function(l){woodmartThemeModule.searchFullScreen=function(){woodmartThemeModule.$body.on("click",".wd-header-search.wd-display-full-screen > a, .wd-header-search.wd-display-full-screen-2 > a, .wd-search-form.wd-display-full-screen, .wd-search-form.wd-display-full-screen-2",function(e){e.preventDefault();var e=l(this),a=l(".wd-search-full-screen-2");0<e.parent().find(".wd-search-dropdown").length||woodmartThemeModule.$body.hasClass("global-search-dropdown")||(n()?d():(e.hasClass("wd-display-full-screen-2")||e.parent().hasClass("wd-display-full-screen-2")||(a=l(".wd-search-full-screen"),r()),setTimeout(function(){s(a)},10)))}),woodmartThemeModule.$body.on("click",".wd-close-search a, .wd-page-wrapper, .wd-hb",function(e){var a=l(e.target).closest(".wd-close-search a").length,r=l(e.target).closest(".wd-search-full-screen").length;!a&&r||(a&&e.preventDefault(),n()&&d())});var a=function(e){27===e.keyCode&&(d(),woodmartThemeModule.$body.unbind("keyup",a))},d=function(){var e=l("[class*=wd-search-full-screen]");l("html").removeClass("wd-search-opened"),e.removeClass("wd-opened"),e.removeClass("wd-searched"),e.trigger("wdCloseSearch")},r=function(){var e,a=l("#wpadminbar"),a=0<a.length?a.outerHeight():0,r=l(".whb-sticked"),d=l(".whb-main-header");0<r.length?e=0<l(".whb-clone").length?r.outerHeight()+a:d.outerHeight()+a:(e=d.outerHeight()+a,0<($headerBanner=l(".wd-hb-wrapp")).length&&$headerBanner.hasClass("wd-display")&&(e+=$headerBanner.outerHeight())),l(".wd-search-full-screen").css("top",e)},s=function(r){woodmartThemeModule.$body.on("keyup",a),l("html").addClass("wd-search-opened"),r.addClass("wd-opened"),r.trigger("wdOpenSearch"),setTimeout(function(){var e=r.find('input[type="text"]'),a=e.val().length;e[0].setSelectionRange(a,a),e.trigger("focus")},500)},n=function(){return l("html").hasClass("wd-search-opened")}},l(document).ready(function(){woodmartThemeModule.searchFullScreen()})}(jQuery);
function openMobileNavEvent(e){e.preventDefault();e=document.querySelector(".wd-side-hidden-nav");e.classList.contains("wd-opened")?woodmartThemeModule.closeMobileNavigation():(this.parentNode.classList.add("wd-opened"),woodmartThemeModule.openMobileNavigation(e))}woodmartThemeModule.$document.on("wdCloseMobileMenu wdPjaxStart",function(){woodmartThemeModule.closeMobileNavigation()}),woodmartThemeModule.mobileNavigationClickAction=function(e){e&&e.addEventListener("click",function(e){var o=e.target.closest(".wd-nav");if(o){var t,n,i,d,a=o.classList.contains("wd-layout-dropdown"),l=o.classList.contains("wd-layout-drilldown"),o=o.classList.contains("wd-drilldown-slide"),s=e.target.closest(".wd-nav-mob-tab li"),r=e.target.closest(".menu-item-has-children > a"),c=e.target.closest(".menu-item-has-children > .wd-nav-opener"),u=e.target.closest(".mobile-nav"),m="arrow";if(this.classList.contains("wd-opener-item")&&(m="item"),woodmartThemeModule.$document.trigger("wood-images-loaded"),s){if(e.preventDefault(),s.classList.contains("wd-active"))return;var w=s.dataset.menu,v=null!==u&&u.querySelector(".wd-active");v&&v.classList.remove("wd-active"),s.classList.add("wd-active"),null!==u&&(u.querySelectorAll(".wd-nav-mobile").forEach(function(e){e.classList.remove("wd-active")}),void 0!==w)&&u.querySelectorAll(`.mobile-${w}-menu`).forEach(function(e){e.classList.add("wd-active")})}a?("item"===m&&(r||c)||"arrow"===m&&c)&&(e.preventDefault(),t=("item"===m&&r||c).parentNode,v=(n=Array.from(t.children)).find(function(e){return e.classList.contains("wd-nav-opener")}),s=n.filter(function(e){return"UL"===e.tagName||e.classList.contains("wd-sub-menu")}),t.classList.contains("opener-page")?(t.classList.remove("opener-page"),0!==s.length&&s.forEach(function(e){woodmartThemeModule.slideUp(e,200)}),[".wd-dropdown-menu .container > ul",".wd-dropdown-menu > ul"].forEach(function(e){e=t.querySelectorAll(e);0!==e.length&&e.forEach(function(e){woodmartThemeModule.slideUp(e,200)})}),void 0!==v&&v.classList.remove("wd-active")):(t.classList.add("opener-page"),0!==s.length&&s.forEach(function(e){woodmartThemeModule.slideDown(e,200)}),[".wd-dropdown-menu .container > ul",".wd-dropdown-menu > ul"].forEach(function(e){e=t.querySelectorAll(e);0!==e.length&&e.forEach(function(e){woodmartThemeModule.slideDown(e,200)})}),void 0!==v&&v.classList.add("wd-active"))):l&&(w=e.target.closest(".menu-item-has-children .wd-drilldown-back a"),a=e.target.closest(".menu-item-has-children .wd-drilldown-back .wd-nav-opener"),("item"===m&&(r||c)||"arrow"===m&&c)&&(d=(t=("item"===m&&r||c).parentNode).closest("ul"),void 0!==(i=(n=Array.from(t.children)).find(function(e){return e.classList.contains("wd-sub-menu")||e.classList.contains("sub-sub-menu")})))&&(e.preventDefault(),t.setAttribute("aria-expanded",!0),d.classList.add("wd-drilldown-hide"),d.classList.remove("wd-drilldown-show"),i.classList.add("wd-drilldown-show"),i.setAttribute("aria-expanded",!1),v=(v=(v=(s=i.querySelector(".wd-drilldown-back a")).textContent).replaceAll("\t","")).replaceAll("\n",""),t.classList.contains("item-level-0")?(l=null)!==(l=null!==u?u.querySelector(".wd-nav-mob-tab li.wd-active .nav-link-text"):l)?(m=(m=(m=l.textContent).replaceAll("\t","")).replaceAll("\n",""),!v.includes(m)&&0<m.length&&(s.textContent=woodmart_settings.mobile_navigation_drilldown_back_to.replace("%s",m))):t.classList.contains("cat-item")?s.textContent=woodmart_settings.mobile_navigation_drilldown_back_to_categories:v.includes(woodmart_settings.mobile_navigation_drilldown_back_to_main_menu)||(s.textContent=woodmart_settings.mobile_navigation_drilldown_back_to_main_menu):(r="",r=(null!==(c=d.closest("li").querySelector(".woodmart-nav-link")).querySelector(".nav-link-text")?c.querySelector(".nav-link-text"):null!==c.querySelector("span")?c.querySelector("span"):c).textContent,!v.includes(r)&&0<r.length&&(s.textContent=woodmart_settings.mobile_navigation_drilldown_back_to.replace("%s",r))),o)&&(this.querySelector("ul.wd-active").style.height=i.offsetHeight+"px"),w||a)&&(e.preventDefault(),d=(t=(w||a).closest(".menu-item")).closest("ul"),i=(n=Array.from(t.children)).find(function(e){return e.classList.contains("wd-sub-menu")||e.classList.contains("sub-sub-menu")}),t.setAttribute("aria-expanded",!1),t.classList.contains("item-level-0")||d.classList.add("wd-drilldown-show"),d.classList.remove("wd-drilldown-hide"),i.classList.remove("wd-drilldown-show"),i.setAttribute("aria-expanded",!0),o)&&(t.classList.contains("item-level-0")?this.querySelector("ul.wd-active").style.height="":this.querySelector("ul.wd-active").style.height=d.offsetHeight+"px")}})},woodmartThemeModule.mobileNavigationAddOpeners=function(e){e.forEach(function(e){var o;e.querySelector(":scope > .wd-nav-opener")||e.closest(".widget_nav_mega_menu")||((o=document.createElement("span")).classList.add("wd-nav-opener"),e.appendChild(o))})},woodmartThemeModule.mobileNavigationCloseSideWidgets=function(e){e&&e.forEach(function(e){e.addEventListener("click",function(e){e.preventDefault(),woodmartThemeModule.closeMobileNavigation()})})},woodmartThemeModule.openMobileNavigation=function(e){var o=document.querySelector(".wd-close-side");e&&(e.classList.add("wd-opened"),jQuery(e).trigger("wdOpenSide")),o&&o.classList.add("wd-close-side-opened"),woodmartThemeModule.$document.trigger("wood-images-loaded")},woodmartThemeModule.closeMobileNavigation=function(){var e=document.querySelector(".wd-header-mobile-nav.wd-opened"),o=document.querySelector(".mobile-nav.wd-opened"),t=document.querySelector(".wd-close-side.wd-close-side-opened"),n=document.querySelector(".mobile-nav .searchform input[type=text]");e&&e.classList.remove("wd-opened"),o&&(o.classList.remove("wd-opened"),jQuery(o).trigger("wdCloseSide")),o&&t&&t.classList.remove("wd-close-side-opened"),n&&n.blur()},woodmartThemeModule.mobileNavigation=function(){var e=document.querySelectorAll(".wd-side-hidden-nav .wd-nav-mobile .menu-item-has-children"),o=document.querySelectorAll(".wd-side-hidden-nav"),t=document.querySelector(".wd-close-side"),n=document.querySelectorAll(".mobile-nav .login-side-opener, .mobile-nav .close-side-widget");woodmartThemeModule.mobileNavigationAddOpeners(e),o.forEach(function(e){woodmartThemeModule.mobileNavigationClickAction(e)}),document.querySelectorAll(".wd-header-mobile-nav > a").forEach(function(e){e.addEventListener("click",openMobileNavEvent)}),t&&(t.addEventListener("click",function(e){e.preventDefault(),woodmartThemeModule.closeMobileNavigation()}),t.addEventListener("touchstart",function(e){e.preventDefault(),woodmartThemeModule.closeMobileNavigation()},{passive:!1})),woodmartThemeModule.$document.on("keyup",function(e){27===e.keyCode&&document.querySelector(".wd-side-hidden-nav").classList.contains("wd-opened")&&woodmartThemeModule.closeMobileNavigation()}),woodmartThemeModule.mobileNavigationCloseSideWidgets(n)},window.addEventListener("load",function(){woodmartThemeModule.mobileNavigation()}),window.addEventListener("wdUpdatedHeader",function(){woodmartThemeModule.mobileNavigation()}),window.addEventListener("wdHeaderBuilderCloneCreated",function(){var e=document.querySelector(".whb-clone .wd-header-mobile-nav > a");e&&e.addEventListener("click",openMobileNavEvent)});
!function(a){woodmartThemeModule.cartWidget=function(){var e=woodmartThemeModule.$body,o=a(".cart-widget-side"),d=a(".wd-close-side"),t=(e.on("click wdOpenWidgetCart",".cart-widget-opener",function(e){r()||i()||e.preventDefault(),c()?t():setTimeout(function(){n()},10)}),e.on("click touchstart",".wd-close-side",function(){c()&&t()}),e.on("click",".close-side-widget",function(e){e.preventDefault(),c()&&t()}),woodmartThemeModule.$document.on("keyup",function(e){27===e.keyCode&&c()&&t()}),function(){o.trigger("wdCloseSide"),o.removeClass("wd-opened"),d.removeClass("wd-close-side-opened")}),n=function(){if(r()||i())return!1;o.trigger("wdOpenSide"),o.addClass("wd-opened"),d.addClass("wd-close-side-opened")},c=function(){return o.hasClass("wd-opened")},r=function(){return woodmartThemeModule.$body.hasClass("woocommerce-cart")},i=function(){return woodmartThemeModule.$body.hasClass("woocommerce-checkout")}},a(document).ready(function(){woodmartThemeModule.cartWidget()}),window.addEventListener("wdUpdatedHeader",function(){woodmartThemeModule.cartWidget()})}(jQuery);
!function(n){woodmartThemeModule.$document.on("wdShopPageInit",function(){woodmartThemeModule.stickySidebarBtn()}),woodmartThemeModule.stickySidebarBtn=function(){var o,e=n(".wd-show-sidebar-btn,.wd-off-canvas-btn"),d=n(".wd-sidebar-opener.wd-show-on-scroll");d.length<=0||e.length<=0||((o=function(){e.offset().top+e.outerHeight()<woodmartThemeModule.$window.scrollTop()?d.addClass("wd-shown"):d.removeClass("wd-shown")})(),woodmartThemeModule.$window.on("scroll",o),woodmartThemeModule.$window.on("resize",o))},n(document).ready(function(){woodmartThemeModule.stickySidebarBtn()})}(jQuery);
(()=>{"use strict";const t=window.wp.hooks,e=(t,e)=>{const a={id:"gla_"+t.id,quantity:e,google_business_vertical:"retail"};return t.name&&(a.name=t.name),t?.categories?.length&&(a.category=t.categories[0].name),t?.prices?.price&&(a.price=parseInt(t.prices.price,10)/10**t.prices.currency_minor_unit),a},a=(t,a=1)=>{((t,e)=>{if("function"!=typeof gtag)throw new Error("Function gtag not implemented.");window.gtag("event","add_to_cart",{send_to:"GLA",...e})})(0,{ecomm_pagetype:"cart",event_category:"ecommerce",items:[e(t,a)]})},n=t=>{var e;return glaGtagData.products[t.id]&&(t.name=glaGtagData.products[t.id].name,t.prices=(e=glaGtagData.products[t.id].price,{price:Math.round(e*10**glaGtagData.currency_minor_unit),currency_minor_unit:glaGtagData.currency_minor_unit})),t};(0,t.addAction)("experimental__woocommerce_blocks-cart-add-item","google-listings-and-ads",({product:t,quantity:e=1})=>{a(t,e)});const r=function(t){const e=t.currentTarget.dataset,r=n({id:e.product_id});a(r,e.quantity||1)},o=function(t){const e=t.target.closest("form.cart");if(!e)return;const r=e.querySelector("[name=add-to-cart]");if(!r)return;const o=e.querySelector("[name=variation_id]"),c=e.querySelector("[name=quantity]"),i=n({id:parseInt(o?o.value:r.value,10)});a(i,c?parseInt(c.value,10):1)};document.defaultView.addEventListener("DOMContentLoaded",function(){document.querySelectorAll(".add_to_cart_button:not(.product_type_variable):not(.product_type_grouped):not(.wc-block-components-product-button__button)").forEach(t=>{t.addEventListener("click",r)}),document.querySelectorAll('[data-block-name="woocommerce/product-button"] > .add_to_cart_button:not(.product_type_variable):not(.product_type_grouped)').forEach(t=>{t.addEventListener("click",r)}),document.querySelectorAll(".single_add_to_cart_button").forEach(t=>{t.addEventListener("click",o)})}),"function"==typeof jQuery&&jQuery(document).on("found_variation","form.cart",function(t,e){(t=>{t?.variation_id&&(glaGtagData.products[t.variation_id]={name:t.display_name,price:t.display_price})})(e)})})();
(()=>{const e={statistics:["analytics_storage"],marketing:["ad_storage","ad_user_data","ad_personalization"]},t=()=>{if("function"==typeof wp_has_consent){void 0===window.wp_consent_type&&(window.wp_consent_type="optin");const t={};for(const[n,o]of Object.entries(e))if(""!==consent_api_get_cookie(window.consent_api.cookie_prefix+"_"+n)){const e=wp_has_consent(n)?"granted":"denied";o.forEach(n=>{t[n]=e})}Object.keys(t).length>0&&window.gtag("consent","update",t)}};document.addEventListener("wp_listen_for_consent_change",t=>{const n={},o=e[Object.keys(t.detail)[0]],a="allow"===Object.values(t.detail)[0]?"granted":"denied";void 0!==o&&(o.forEach(e=>{n[e]=a}),Object.keys(n).length>0&&window.gtag("consent","update",n))}),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",t):t()})();