1function _createForOfIteratorHelper(e,t){var a,o,n,i,s="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(s)return n=!(o=!0),{s:function(){s=s.call(e)},n:function(){var e=s.next();return o=e.done,e},e:function(e){n=!0,a=e},f:function(){try{o||null==s.return||s.return()}finally{if(n)throw a}}};if(Array.isArray(e)||(s=_unsupportedIterableToArray(e))||t&&e&&"number"==typeof e.length)return s&&(e=s),i=0,{s:t=function(){},n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,t){var a;if(e)return"string"==typeof e?_arrayLikeToArray(e,t):"Map"===(a="Object"===(a={}.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:a)||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?_arrayLikeToArray(e,t):void 0}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,o=Array(t);a<t;a++)o[a]=e[a];return o}var botiga=botiga||{};botiga.helpers={botigaDomReady:function(e){if("function"==typeof e)return"interactive"===document.readyState||"complete"===document.readyState?e():void document.addEventListener("DOMContentLoaded",e,!1)},isInVerticalViewport:function(e){e=e.getBoundingClientRect();return 0<=e.top&&e.bottom<=(window.innerHeight||document.documentElement.clientHeight)},isInHorizontalViewport:function(e){e=e.getBoundingClientRect();return 0<=e.left&&e.right<=document.documentElement.clientWidth},ajax:function(e,t,a,o){(n=new XMLHttpRequest).open("POST",botiga.ajaxurl,!0),n.setRequestHeader("Content-type","application/x-www-form-urlencoded"),n.onload=function(){200<=this.status&&this.status<400&&o.apply(this)};var n,i="";a=Object.entries(a);for(var s=0;s<a.length;s++)i+="&"+a[s].join("=");n.send("action="+e+"&nonce="+t+i)},setCookie:function(e,t,a){var o=new Date,a=(o.setTime(o.getTime()+24*a*60*60*1e3),"expires="+o.toUTCString());document.cookie=e+"="+t+";"+a+";path=/"},getCookie:function(e){for(var t=e+"=",a=document.cookie.split(";"),o=0;o<a.length;o++){for(var n=a[o];" "==n.charAt(0);)n=n.substring(1);if(0==n.indexOf(t))return n.substring(t.length,n.length)}return""}},botiga.navigation={init:function(){var e=null==document.getElementById("site-navigation")?document.getElementById("site-navigation-mobile"):document.getElementById("site-navigation"),n=document.getElementsByClassName("botiga-offcanvas-menu")[0],i=document.getElementsByClassName("menu-toggle")[0];if(null!==e&&(e||void 0!==i)&&void 0!==n){var t=document.getElementsByClassName("mobile-menu-close")[0];if(void 0!==i){var a=e.getElementsByTagName("ul")[0];e.getElementsByClassName("mobile-menu-close")[0];if(void 0===a)i.style.display="none";else{a.classList.contains("nav-menu")||a.classList.add("nav-menu");var s=n.querySelectorAll("a[href]:not([disabled]):not(.mobile-menu-close)")[0],e=(i.addEventListener("click",function(e){e.preventDefault(),i.classList.add("open"),n.classList.add("toggled"),document.body.classList.add("mobile-menu-visible");var t,a=_createForOfIteratorHelper(n.querySelectorAll('.dropdown-symbol, .menu-item-has-children > a[href="#"]'));try{for(a.s();!(t=a.n()).done;){var o=t.value;o.addEventListener("touchstart",v),o.addEventListener("click",v),o.addEventListener("keydown",function(e){"Enter"!==e.key&&13!==e.keyCode||(e.preventDefault(),o.parentNode.parentNode.getElementsByClassName("sub-menu")[0].classList.toggle("toggled"))})}}catch(e){a.e(e)}finally{a.f()}s.focus()}),n.querySelectorAll('a[href*="#"]'));if(e.length){var o,r=_createForOfIteratorHelper(e);try{for(r.s();!(o=r.n()).done;)o.value.addEventListener("click",function(e){e.target.hash&&null!==document.querySelector(e.target.hash)&&!e.target.classList.contains("botiga-tabs-nav-link")&&(i.classList.remove("open"),n.classList.remove("toggled"),document.body.classList.remove("mobile-menu-visible"))})}catch(e){r.e(e)}finally{r.f()}}var c,s=(e=n.querySelectorAll("a[href]:not([disabled])"))[0],e=(e[e.length-1].addEventListener("keydown",function(e){"Tab"!==e.key&&9!==e.keyCode||e.shiftKey||s.focus()}),t.addEventListener("click",function(e){e.preventDefault();e=i.getBoundingClientRect();0<e.top+e.height&&i.focus(),i.classList.remove("open"),n.classList.remove("toggled"),document.body.classList.remove("mobile-menu-visible")}),document.addEventListener("click",function(e){null!==e.target.closest(".botiga-offcanvas-menu")||e.target.classList.contains("menu-toggle")||null!==e.target.closest(".menu-toggle")||(i.classList.remove("open"),n.classList.remove("toggled"),document.body.classList.remove("mobile-menu-visible"))}),a.getElementsByTagName("a")),t=a.querySelectorAll(".menu-item-has-children > a, .page_item_has_children > a"),l=_createForOfIteratorHelper(e);try{for(l.s();!(c=l.n()).done;){var d=c.value;d.addEventListener("focus",f,!0),d.addEventListener("blur",f,!0)}}catch(e){l.e(e)}finally{l.f()}var u,m=_createForOfIteratorHelper(t);try{for(m.s();!(u=m.n()).done;)u.value.addEventListener("touchstart",f,!1)}catch(e){m.e(e)}finally{m.f()}this.mobileAccordionNavigation(),this.initHoverClass(),this.checkMenuReverse()}}}function v(e){e.cancelable&&e.preventDefault();var t=e.target.closest("li");if(t.querySelector(".sub-menu").classList.contains("toggling"))return!1;t.querySelector(".sub-menu").classList.toggle("toggling"),t.querySelector(".sub-menu").classList.toggle("toggled"),setTimeout(function(){t.querySelector(".sub-menu").classList.remove("toggling")},300)}function f(){if("focus"===event.type||"blur"===event.type)for(var e=this;!e.classList.contains("nav-menu");)"li"===e.tagName.toLowerCase()&&e.classList.toggle("focus"),e=e.parentNode;if("touchstart"===event.type){var t,a=this.parentNode,o=(event.preventDefault(),_createForOfIteratorHelper(a.parentNode.children));try{for(o.s();!(t=o.n()).done;){var n=t.value;a!==n&&n.classList.remove("focus")}}catch(e){o.e(e)}finally{o.f()}a.classList.toggle("focus")}}},initHoverClass:function(){var e=this;if(void 0!==botiga.settings&&"no"===botiga.settings.misc.dropdowns_hover_delay)return!1;for(var t=!1,a=0,o=[{name:"scroll",selector:window},{name:"mouseenter",selector:document},{name:"mouseover",selector:document},{name:"touchstart",selector:document}];a<o.length;a++){var n=o[a];n.selector.addEventListener(n.name,function(){if(t)return!1;t=!0,e.addHoverClassToDropdownItems()})}},addHoverClassToDropdownItems:function(){var s,t=_createForOfIteratorHelper(document.querySelectorAll(".botiga-dropdown-li"));try{for(t.s();!(s=t.n()).done;)(()=>
1{var a,o,e=s.value,n=e;e.addEventListener("mouseover",function(e){var t=this;clearTimeout(a),o=setTimeout(function(){t.classList.add("hovered")},300)});var t,i=_createForOfIteratorHelper(e.querySelectorAll(".botiga-dropdown-ul > .botiga-dropdown-li"));try{for(i.s();!(t=i.n()).done;)t.value.addEventListener("mouseover",function(e){clearTimeout(a),setTimeout(function(){n.classList.add("hovered")},300)})}catch(e){i.e(e)}finally{i.f()}e.addEventListener("mouseout",function(e){var t=this;if(clearTimeout(o),n.contains(e.relatedTarget))return!1;a=setTimeout(function(){t.classList.remove("hovered")},300)})})()}catch(e){t.e(e)}finally{t.f()}},mobileAccordionNavigation:function(){var e=document.querySelectorAll(".botiga-dropdown-mobile-accordion");if(!e.length)return!1;var t,a=_createForOfIteratorHelper(e);try{for(a.s();!(t=a.n()).done;){var o=t.value.querySelectorAll(".menu-item-has-children");if(!o.length)return!1;var n,i=_createForOfIteratorHelper(o);try{for(i.s();!(n=i.n()).done;)n.value.querySelectorAll(".dropdown-symbol")[0].addEventListener("click",function(e){e.stopPropagation();e=this.parentNode;e.classList.contains("expand")?e.classList.remove("expand"):e.classList.add("expand")})}catch(e){i.e(e)}finally{i.f()}}}catch(e){a.e(e)}finally{a.f()}},checkMenuReverse:function(){var e,t=_createForOfIteratorHelper(document.querySelectorAll(".header-login-register, .top-bar-login-register, .botiga-dropdown .menu li"));try{for(t.s();!(e=t.n()).done;){var a=e.value;a.removeEventListener("mouseover",this.menuReverseEventHandler),a.addEventListener("mouseover",this.menuReverseEventHandler,{passive:!0}),a.removeEventListener("touchstart",this.menuReverseEventHandler),a.addEventListener("touchstart",this.menuReverseEventHandler,{passive:!0})}}catch(e){t.e(e)}finally{t.f()}},menuReverseEventHandler:function(){var e="rtl"===document.querySelector("html").getAttribute("dir"),t=(event.stopPropagation(),event.currentTarget.querySelector(".header-login-register>nav, .top-bar-login-register>nav, .sub-menu"));return null!==t&&(t.classList.remove("sub-menu-reverse"),!e&&(0!=botiga.helpers.isInHorizontalViewport(t)||t.closest(".menu-item").classList.contains("botiga-mega-menu"))?t.classList.remove("sub-menu-reverse"):t.classList.add("sub-menu-reverse"),!(t.closest(".site-header")||t.closest(".bottom-header-row")||t.closest(".bhfb-header")))&&(t.classList.remove("sub-menu-reverse-vertically"),void(0!=botiga.helpers.isInVerticalViewport(t)||t.closest(".menu-item").classList.contains("botiga-mega-menu")?t.classList.remove("sub-menu-reverse-vertically"):t.classList.add("sub-menu-reverse-vertically")))}},botiga.autoSelectVariations={init:function(){var e;null!=(e=botiga.settings)&&null!=(e=e.misc)&&e.auto_select_variations&&(document.addEventListener("wc_variation_form",function(e){var a,o=e.target;o&&o.matches(".variations_form")&&1===(e=(o.dataset.product_variations?JSON.parse(o.dataset.product_variations):[]).filter(function(e){return e.is_in_stock&&e.is_purchasable})).length&&(a=e[0].attributes,Object.keys(a).forEach(function(e){var t=a[e],e=o.querySelector('select[name="'.concat(e,'"]'));e&&(e.value=t)}),e=o.querySelector("select"))&&e.dispatchEvent(new Event("change",{bubbles:!0}))},!0),document.querySelectorAll(".variations_form").forEach(function(e){var t;e.dataset.product_variations&&(t=new CustomEvent("wc_variation_form",{bubbles:!0,cancelable:!0}),e.dispatchEvent(t))}))}},botiga.desktopOffCanvasToggleNav={init:function(){var e=document.getElementById("site-navigation"),t=document.getElementsByClassName("botiga-desktop-offcanvas-menu")[0];if(e&&void 0!==t){var a,o=_createForOfIteratorHelper(t.querySelectorAll('.dropdown-symbol, .menu-item-has-children > a[href="#"]'));try{for(o.s();!(a=o.n()).done;){var n=a.value;n.addEventListener("touchstart",i),n.addEventListener("click",i),n.addEventListener("keydown",function(e){"Enter"!==e.key&&13!==e.keyCode||(e.preventDefault(),n.parentNode.parentNode.getElementsByClassName("sub-menu")[0].classList.toggle("toggled"))})}}catch(e){o.e(e)}finally{o.f()}}function i(e){e.preventDefault(),e.target.closest("li").querySelector(".sub-menu").classList.toggle("toggled")}}},botiga.desktopOffcanvasNav={init:function(){var e=document.querySelectorAll(".desktop-menu-toggle"),t=document.getElementsByClassName("desktop-menu-close")[0],a=document.getElementsByClassName("botiga-desktop-offcanvas")[0];if(!e.length)return!1;for(var o=0;o<e.length;o++)e[o].addEventListener("click",function(e){e.preventDefault(),a.classList.contains("botiga-desktop-offcanvas-show")?a.classList.remove("botiga-desktop-offcanvas-show"):a.classList.add("botiga-desktop-offcanvas-show")});t.addEventListener("click",function(e){e.preventDefault(),a.classList.remove("botiga-desktop-offcanvas-show")}),document.addEventListener("click",function(e){null===e.target.closest(".botiga-desktop-offcanvas-menu")&&null!==a.querySelector(".botiga-mega-menu .sub-menu.toggled")&&a.querySelector(".botiga-mega-menu .sub-menu.toggled").classList.remove("toggled")})}},botiga.headerSearch={init:function(){var t=this,n=document.querySelectorAll(".header-search"),i=window.matchMedia("(max-width: 1024px)").matches?document.querySelector("#masthead-mobile .header-search-form"):document.querySelector("#masthead .header-search-form"),s=document.getElementsByClassName("search-overlay")[0],e=null!==i?i.getElementsByClassName("search-submit")[0]:void 0;if(0!==n.length){if(document.body.classList.contains("has-bhfb-builder")&&(i=document.querySelector(".header-search-form")),void 0!==s){var a,o=_createForOfIteratorHelper(n);try{for(o.s();!(a=o.n()).done;)a.value.addEventListener("click",function(e){if(e.preventDefault(),1<n.length){var t,a=_createForOfIteratorHelper(n);try{for(a.s();!(t=a.n()).done;)t.value.classList.toggle("hide")}catch(e){a.e(e)}finally{a.f()}}i.classList.toggle("active"),s.classList.toggle("active"),document.body.classList.toggle("header-search-form-active"),e.target.closest(".header-search").getElementsByClassName("icon-search")[0].classList.toggle("active"),e.target.closest(".header-search").getElementsByClassName("icon-cancel")[0].classList.toggle("active"),e.target.closest(".header-search").classList.add("active"),e.target.closest(".header-search").classList.remove("hide");var o="",o=(window.matchMedia("screen and (min-width: 1024px)").matches?document.querySelectorAll(".bhfb-desktop .header-search-form .search-field"):document.querySelectorAll(".bhfb-mobile .header-search-form .search-field"))[0];void 0!==(o=e.target.closest(".header-search").parentNode.classList.contains("header-search-form-hide-input-on-mobile")?document.querySelectorAll(".bhfb-mobile .header-search-form .search-field")[1]:o)&&o.focus(),null!==e.target.closest(".botiga-offcanvas-menu")&&e.target.closest(".botiga-offcanvas-menu").classList.remove("toggled")})}catch(e){o.e(e)}finally{o.f()}s.addEventListener("click",function(){i.classList.remove("active"),s.classList.remove("active"),document.body.classList.remove("header-search-form-active"),t.backButtonsToDefaultState(n)})}void 0!==e&&e.addEventListener("keydown",function(e){"Tab"!==e.key&&e.keyCode!==KEYCODE_TAB||(i.classList.remove("active"),s.classList.remove("active"),document.body.classList.remove("header-search-form-active"),t.backButtonsToDefaultState(n),n.focus())});e=null!==document.getElementsByClassName("header-desktop-offcanvas-layout2")[0]&&document.getElementsByClassName("botiga-desktop-offcanvas")[0];return e&&e.addEventListener("click",function(e){null===e.target.closest(".header-search")&&(i.classList.remove("active"),s.classList.remove("active"),document.body.classList.remove("header-search-form-active"),t.backButtonsToDefaultState(n))}),this}},backButtonsToDefaultState:function(e){var t,a=_createForOfIteratorHelper(e);try{for(a.s();!(t=a.n()).done;){var o=t.value;o.classList.remove("hide"),o.querySelector(".icon-cancel").classList.remove("active"),o.querySelector(".icon-search").classList.add("active")}}catch(e){a.e(e)}finally{a.f()}}},botiga.stickyHeader={init:function(){function o(e){return!!e&&!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)}var t,e,n,i,a,s=this,r=document.body,c=Array.from(document.querySelectorAll(".sticky-header, header.bhfb.has-sticky-header"));c.length&&(this.stickyChangeLogo(),t=function(e){e=e.getBoundingClientRect().y;return r.classList.contains("admin-bar")&&(e-=32),r.classList.contains("botiga-site-layout-padded")&&(e-=parseInt(getComputedStyle(r).getPropertyValue("--botiga_padded_spacing"),10)),e},e=c.some(function(e){return e.classList.contains("sticky-scrolltop")}),10<(window.pageYOffset||document.documentElement.scrollTop)&&(c.forEach(function(e){e.classList.add("is-sticky")}
1),r.classList.add("sticky-header-active"),c.forEach(function(e){e.matches("header.bhfb")&&s.isHBStickyActive("",e)}),window.dispatchEvent(new Event("botiga.sticky.header.activated"))),e?(n=0,window.addEventListener("scroll",function(){var e=window.pageYOffset||document.documentElement.scrollTop,t=n<e||e<10,a=jQuery("header.bhfb.sticky-scrolltop:visible")[0];(t=a?e<a.getBoundingClientRect().height:t)?(c.forEach(function(e){e.classList.remove("is-sticky")}),r.classList.remove("sticky-header-active"),r.classList.add("on-header-area"),c.forEach(function(e){e.matches("header.bhfb")&&s.isHBStickyDeactivated("scrolltop",e)}),window.dispatchEvent(new Event("botiga.sticky.header.deactivated"))):(c.forEach(function(e){e.classList.add("is-sticky")}),r.classList.add("sticky-header-active"),r.classList.remove("on-header-area"),c.forEach(function(e){e.matches("header.bhfb")&&s.isHBStickyActive("scrolltop",e)}),window.dispatchEvent(new Event("botiga.sticky.header.activated"))),n=e<=0?0:e},!1)):(i=new Map,(a=function(){c.forEach(function(e){i.set(e,t(e))})})(),window.addEventListener("resize",function(){a(),c.forEach(function(e){o(e)||e.classList.remove("sticky-shadow","is-sticky")}),window.dispatchEvent(new Event("scroll"))}),window.addEventListener("scroll",function(){var t=window.scrollY,a=!1,e=(c.forEach(function(e){o(e)&&(i.get(e)||0)<t?(e.classList.add("sticky-shadow"),a=!0):e.classList.remove("sticky-shadow")}),window.pageYOffset||document.documentElement.scrollTop);a&&0<e?(r.classList.add("sticky-header-active"),c.forEach(function(e){e.matches("header.bhfb")&&o(e)&&s.isHBStickyActive("",e)}),window.dispatchEvent(new Event("botiga.sticky.header.activated"))):(r.classList.remove("sticky-header-active"),c.forEach(function(e){e.matches("header.bhfb")&&o(e)&&s.isHBStickyDeactivated("",e)}),window.dispatchEvent(new Event("botiga.sticky.header.deactivated")))},!1)))},isHBStickyActive:function(e,t){var a,o,n,i,s,r,c=t||document.querySelector("header.bhfb");return null!==c&&(t=document.body.classList.contains("admin-bar"),a=c.querySelector(".bhfb-above_header_row"),o=c.querySelector(".bhfb-main_header_row"),n=c.querySelector(".bhfb-below_header_row"),!!(a&&o&&n))&&(r=0,i=!1,a.classList.remove("bhfb-sticky-hidden"),o.classList.remove("bhfb-sticky-hidden"),n.classList.remove("bhfb-sticky-hidden"),c.classList.contains("sticky-row-main-header-row")&&(n.classList.contains("bt-d-none")||n.classList.add("bhfb-sticky-hidden"),(a.classList.contains("bt-d-none")||(r=a.clientHeight,document.body.classList.contains("botiga-site-layout-padded")))&&(i=!0),t?window.matchMedia("screen and (min-width: 601px)").matches&&(r-=32):!a.classList.contains("bt-d-none")&&document.body.classList.contains("botiga-site-layout-padded")&&(i=!1),document.body.classList.contains("botiga-site-layout-padded")&&(r-=parseFloat(getComputedStyle(document.body).getPropertyValue("--botiga_padded_spacing"))),r=i?+Math.abs(r):-Math.abs(r),c.style.transform="translateY(".concat(r,"px)")),c.classList.contains("sticky-row-below-header-row")&&(n.classList.contains("bt-d-none")||(s=parseFloat(getComputedStyle(n).borderBottomWidth),r=t?c.clientHeight-n.clientHeight-32-s:c.clientHeight-n.clientHeight-s),a.classList.contains("bt-d-none")&&o.classList.contains("bt-d-none")&&(i=!0),document.body.classList.contains("botiga-site-layout-padded")&&(r-=parseFloat(getComputedStyle(document.body).getPropertyValue("--botiga_padded_spacing"))),r=i?+Math.abs(r):-Math.abs(r),c.style.transform="translateY(".concat(r,"px)")),void("scrolltop"===e&&document.body.classList.contains("on-header-area")&&(c.classList.add("bhfb-no-transition"),setTimeout(function(){c.classList.remove("bhfb-no-transition")},500))))},isHBStickyDeactivated:function(e,t){var a,t=t||document.querySelector("header.bhfb");if(null===t)return!1;t.classList.contains("sticky-row-main-header-row")&&(t.style.transform="translateY(0px)"),t.classList.contains("sticky-row-below-header-row")&&(a=t.querySelector(".bhfb-below_header_row"))&&!a.classList.contains("bt-d-none")&&(t.style.transform="translateY(0px)")},stickyChangeLogo:function(){var e=!1;if(window.matchMedia("screen and (min-width: 1024px)").matches&&"undefined"!=typeof botiga_sticky_header_logo){var t=Array.from(document.querySelectorAll(".bhfb-sticky-header .site-branding img, .sticky-header .site-branding img")).filter(function(e){return null!==e});if(!t.length)return!1;var a=new Map;t.forEach(function(e){a.set(e,{src:e.getAttribute("src"),srcset:e.getAttribute("srcset"),sizes:e.getAttribute("sizes"),height:e.clientHeight})}),window.addEventListener("botiga.sticky.header.activated",function(){if(e)return!1;t.forEach(function(e){var t=a.get(e);e.setAttribute("src",botiga_sticky_header_logo[0]),e.setAttribute("style","max-height: "+t.height+"px;"),void 0!==botiga_sticky_header_logo.srcset&&e.setAttribute("srcset",botiga_sticky_header_logo.srcset),void 0!==botiga_sticky_header_logo.sizes&&e.setAttribute("sizes",botiga_sticky_header_logo.sizes)}),e=!0}),window.addEventListener("botiga.sticky.header.deactivated",function(){if(!e)return!1;t.forEach(function(e){var t=a.get(e);e.setAttribute("src",t.src),null!==t.srcset&&e.setAttribute("srcset",t.srcset),null!==t.sizes&&e.setAttribute("sizes",t.sizes)}),e=!1})}}},botiga.scrollDirection={init:function(){var t,e=document.querySelectorAll(".botiga-single-sticky-add-to-cart-wrapper.hide-when-scroll"),a=document.getElementsByTagName("body")[0];"null"!=typeof e&&(t=0,window.addEventListener("scroll",function(){var e=window.pageYOffset||document.documentElement.scrollTop;t<e?(a.classList.remove("botiga-scrolling-up"),a.classList.add("botiga-scrolling-down")):(a.classList.remove("botiga-scrolling-down"),a.classList.add("botiga-scrolling-up")),t=e<=0?0:e},!1))}},botiga.customAddToCartButton={init:function(){var e=document.querySelectorAll(".botiga-cu
1stom-addtocart");if(!e.length)return!1;for(var t=0;t<e.length;t++)e[t].addEventListener("click",function(e){e.preventDefault();var t=this,e=this.getAttribute("data-product-id"),a=this.getAttribute("data-context"),o=this.innerHTML,n=this.getAttribute("data-loading-text"),i=this.getAttribute("data-added-text"),s=this.getAttribute("data-nonce"),r=new XMLHttpRequest;r.open("POST",botiga.ajaxurl,!0),r.setRequestHeader("Content-type","application/x-www-form-urlencoded"),t.innerHTML=n,r.onload=function(){200<=this.status&&this.status<400&&(t.innerHTML=i,setTimeout(function(){t.innerHTML=o},1500),jQuery(document.body).trigger("wc_fragment_refresh"),jQuery(document.body).trigger("added_to_cart"),document.body.dispatchEvent(new Event("botiga.custom_added_to_cart")))},r.send("action=botiga_custom_addtocart&product_id="+e+"&context="+a+"&nonce="+s)})}},botiga.backToTop={init:function(){this.backToTop(),window.addEventListener("scroll",function(){this.backToTop()}.bind(this)),this.safariDoubleClickFix()},backToTop:function(){var e=document.getElementsByClassName("back-to-top")[0];void 0!==e&&(300<window.pageYOffset?e.classList.add("display"):e.classList.remove("display"),e.removeEventListener("click",this.scrollToTop),e.addEventListener("click",this.scrollToTop))},scrollToTop:function(){window.scrollTo({top:0,left:0,behavior:"smooth"})},safariDoubleClickFix:function(){var e=document.querySelectorAll(".product-gallery-summary .botiga-single-addtocart-wrapper .button, .single-product .content-wrapper a, .single-product .footer-widgets a, .single-product .site-footer a");if(!e.length)return!1;var t,a=_createForOfIteratorHelper(e);try{for(a.s();!(t=a.n()).done;)t.value.addEventListener("touchend",function(){})}catch(e){a.e(e)}finally{a.f()}}},botiga.qtyButton={init:function(e){this.events(e),this.wooEvents()},isInsideCarousel:function(e){return null!==e.closest(".botiga-carousel")&&!1===e.closest(".botiga-carousel").classList.contains("botiga-carousel-not-initialized")&&"true"!==e.closest(".botiga-carousel").getAttribute("data-initialized")},events:function(e){var s=this,t=document.querySelectorAll(".botiga-quantity-minus");if(t.length<1)return!1;for(var a=0;a<t.length;a++){var o=t[a].closest(".quantity");if(null!==o&&!o.dataset.qtyInitialized&&!s.isInsideCarousel(t[a])){if(o.classList.contains("hidden"))return!1;var n=o.querySelector(".qty"),i=o.querySelector(".botiga-quantity-plus"),r=o.querySelector(".botiga-quantity-minus"),c=o.querySelector(".input-text");i.classList.add("show"),r.classList.add("show"),n.addEventListener("change",function(e){s.behaviorsBasedOnQuantityValue(this,this.value)}),n.addEventListener("keyup",function(e){s.behaviorsBasedOnQuantityValue(this,this.value)}),i.addEventListener("click",function(e){e.preventDefault();var e=this.parentNode.querySelector(".qty"),t=Number(e.getAttribute("max"))||99999,a=Number(e.getAttribute("min")),o=Number(e.getAttribute("step")),n=Number(e.value),i=document.createEvent("HTMLEvents");e.value=Math.max(a,Math.min(t,(n+o).toFixed(1))),i.initEvent("change",!0,!1),e.dispatchEvent(i),s.updateAddToCartQuantity(this,e.value),s.updateBuyNowButtonQuantity(this,e.value),s.behaviorsBasedOnQuantityValue(this,e.value)}),r.addEventListener("click",function(e){e.preventDefault();var e=this.parentNode.querySelector(".qty"),t=Number(e.getAttribute("max"))||99999,a=Number(e.getAttribute("min")),o=Number(e.getAttribute("step")),n=Number(e.value),i=document.createEvent("HTMLEvents");e.value=Math.max(a,Math.min(t,(n-o).toFixed(1))),i.initEvent("change",!0,!1),e.dispatchEvent(i),s.updateAddToCartQuantity(this,e.value),s.updateBuyNowButtonQuantity(this,e.value),s.behaviorsBasedOnQuantityValue(this,e.value)}),c.addEventListener("change",function(e){s.updateAddToCartQuantity(this,this.value),s.updateBuyNowButtonQuantity(this,this.value)}),o.dataset.qtyInitialized=!0}}},wooEvents:function(){var e=this;"undefined"!=typeof jQuery&&(jQuery("body").on("updated_cart_totals",function(){e.events()}),jQuery(document).on("wc_fragments_loaded",function(){e.events()}))},updateAddToCartQuantity:function(e,t){if(null!==e.closest(".woocommerce-cart-form"))return!1;var a,o=e.closest(".product")?".product":".wc-block-grid__product",o=e.closest(o),n=e.parentNode.querySelector(".qty");o&&(o=o.querySelector(".add_to_cart_button:not(.single_add_to_cart_button)"))&&o.setAttribute("data-quantity",t),(e.closest(".mini_cart_item")?e.closest(".mini_cart_item"):e.closest(".woocommerce-cart-form__cart-item"))&&((a=jQuery(e.closest(".widget_shopping_cart"))).block({message:null,overlayCSS:{background:"#fff",opacity:.6}}),jQuery.post({url:botiga.ajaxurl,data:{action:"botiga_update_mini_cart_quantity",quantity:n.value,cart_item_key:n.name,nonce:jQuery("#mini_cart_qty_nonce").val()},success:function(e){jQuery(document.body).trigger("added_to_cart",[e.fragments,e.cart_hash]),setTimeout(function(){a.unblock()},100)}}))},updateBuyNowButtonQuantity:function(e,t){var a=!(!e.parentNode.parentNode.classList.contains("botiga-sc-product-name")&&!e.parentNode.parentNode.classList.contains("product-name")),o=null!==e.closest(".woocommerce-mini-cart-item");return!a&&!o&&(a=e.closest(".product")?".product":".wc-block-grid__product",o=e.closest(a),e.parentNode.querySelector(".qty"),null!==(a=o?o.querySelector(".botiga-buy-now-button"):null))&&((e=new
1URL(a.getAttribute("href"))).searchParams.set("quantity",t),void a.setAttribute("href",e))},behaviorsBasedOnQuantityValue:function(e,t){var a=e.closest(".product")?".product":".wc-block-grid__product",e=e.closest(a);e&&(a=e.querySelector(".add_to_cart_button:not(.single_add_to_cart_button)"))&&(0==t?a.classList.add("disabled"):a.classList.remove("disabled"))}},botiga.carousel={init:function(){this.build(),this.events()},build:function(){var e=this;if(null===document.querySelector(".botiga-carousel")&&null===document.querySelector(".has-cross-sells-carousel")&&null===document.querySelector(".botiga-woocommerce-mini-cart__cross-sell"))return!1;var t,a=_createForOfIteratorHelper(document.querySelectorAll(".botiga-carousel, #masthead .cross-sells, .botiga-side-mini-cart .cross-sells, .cart-collaterals .cross-sells"));try{for(a.s();!(t=a.n()).done;){var o=t.value;if(null===o.querySelector(".botiga-carousel-stage")&&o.querySelector(".products").classList.add("botiga-carousel-stage"),"true"!==o.getAttribute("data-initialized")){var n,i=o.getAttribute("data-per-page"),s=(null===i&&(n=o.querySelector(".products").classList.value,[1,2,3,4,5].forEach(function(e){0<n.indexOf("columns-"+e)&&(i=e)})),document.createElement("div")),r=o.querySelector(".botiga-carousel-stage"),c=(s.className="botiga-carousel-wrapper",s.innerHTML=r.outerHTML,r.remove(),o.append(s),30);if("undefined"!=typeof botiga_carousel?c=parseInt(botiga_carousel.margin_desktop):null!==o.closest(".botiga-woocommerce-mini-cart__cross-sell")&&(c=15),o.querySelectorAll("li.product").length<=parseInt(i))return o.classList.add("botiga-carousel-not-initialized"),!1;new Siema({parentSelector:o,selector:".botiga-carousel-stage",duration:200,easing:"ease-out",perPage:null!==i?{0:1,768:2,1025:parseInt(i)}:2,startIndex:0,draggable:!0,multipleDrag:!1,threshold:20,loop:!0,rtl:"rtl"===document.querySelector("html").getAttribute("dir"),margin:c,onInit:function(){window.dispatchEvent(new Event("botiga.carousel.initialized")),e.maybeInitExtraFeatures()}})}}}catch(e){a.e(e)}finally{a.f()}},events:function(){var a,o=this;"undefined"!=typeof jQuery&&(a=!0,jQuery(document.body).on("wc_fragment_refresh added_to_cart removed_from_cart",function(){setTimeout(function(){var e=document.getElementById("site-header-cart");if(null===e)return!1;var t=e.querySelector(".cart_list");null!==t&&(2<t.children.length?(e.classList.remove("mini-cart-has-no-scroll"),e.classList.add("mini-cart-has-scroll")):(e.classList.remove("mini-cart-has-scroll"),e.classList.add("mini-cart-has-no-scroll"))),o.build(),a=!1},a?1e3:0)}))},maybeInitExtraFeatures:function(){botiga.qtyButton.init()}},botiga.copyLinkToClipboard={init:function(e,t){e.preventDefault(),navigator.clipboard.writeText(window.location.href),t.classList.add("copied"),t.setAttribute("data-botiga-tooltip",botiga.i18n.botiga_sharebox_copy_link_copied),setTimeout(function(){t.setAttribute("data-botiga-tooltip",botiga.i18n.botiga_sharebox_copy_link),t.classList.remove("copied")},1e3)}},botiga.toggleClass={init:function(e,t,a){e.preventDefault(),e.stopPropagation();var e=document.querySelector(t.getAttribute("data-botiga-selector")),o=t.getAttribute("data-botiga-toggle-class-remove"),t=t.getAttribute("data-botiga-toggle-class"),e=e.classList;"string"==typeof o&&e.remove(o),e.toggle(t),a&&((o=document.createEvent("HTMLEvents")).initEvent(a,!0,!1),window.dispatchEvent(o))}},botiga.collapse={init:function(){var o=document.querySelectorAll("[data-botiga-collapse]");if(!o.length)return!1;for(var e,n=this,t=0;t<o.length;t++)if(e=(t=>{var e=o[t].getAttribute("data-botiga-collapse"),a=JSON.parse(e.replace(/'/g,'"').replace(";",""));if(!a.enable)return{v:!1};n.expand(o[t],a,!0),o[t].addEventListener("click",function(e){e.preventDefault(),this.dispatchEvent(new Event("botiga.collapse.before.expand")),o[t].classList.contains("active")?n.collapse(o[t],a):n.expand(o[t],a),this.dispatchEvent(new Event("botiga.collapse.after.collapse"))}),a.options.oneAtTime&&o[t].addEventListener("botiga.collapse.before.expand",function(){for(var e=document.querySelectorAll(a.options.oneAtTimeParentSelector+" [data-botiga-collapse]"),t=0;t<e.length;t++)n.collapseAll(e[t],a)})})(t))return e.v}
1,expand:function(e,t,a){if(a&&!e.classList.contains("active"))return!1;a=t.id,t=document.getElementById(a),a=t.querySelector(".botiga-collapse__content");t.addEventListener("transitionend",this.expandTransitionEnd.bind(this,e)),t.style="max-height: "+a.clientHeight+"px;",e.classList.add("active"),t.classList.add("active")},expandTransitionEnd:function(e){if(!e.classList.contains("active"))return!1;e.dispatchEvent(new Event("botiga.collapse.expanded"))},collapse:function(e,t,a){t=t.id,t=document.getElementById(t);t.style="max-height: 0px;",e.classList.remove("active"),t.classList.remove("active"),e.dispatchEvent(new Event("botiga.collapse.collapsed"))},collapseAll:function(e,t){e.classList.remove("active"),e.nextElementSibling.classList.remove("active"),e.nextElementSibling.style="max-height: 0px;"}},botiga.tabsNav={init:function(){if(!document.querySelectorAll(".botiga-tabs-nav").length)return!1;this.events()},events:function(){var t,l=document.querySelectorAll(".botiga-tabs-nav-item"),a=_createForOfIteratorHelper(l);try{for(a.s();!(t=a.n()).done;)(()=>{var a,e=t.value;e.closest(".botiga-tabs-nav").classList.contains("botiga-tabs-nav-click-on-mouseover")&&(e.addEventListener("mouseover",function(e){e.preventDefault();var t=this;a=setTimeout(function(){t.dispatchEvent(new Event("click"))},500)}),e.addEventListener("mouseout",function(e){clearTimeout(a)})),e.addEventListener("click",function(e){e.preventDefault();var t=this,e=this.querySelector(".botiga-tabs-nav-link").getAttribute("href"),a=this.closest(".botiga-tabs-nav").querySelector(".botiga-tabs-nav-item.is-active .botiga-tabs-nav-link").getAttribute("href"),o=document.querySelector(a),n=document.querySelector(e),a=n.parentNode.querySelectorAll(".botiga-tab-content.is-active").length;if(null===n)return!1;if(0===a||1<a)return!1;if(n.classList.contains("is-active"))return!1;var i,s=_createForOfIteratorHelper(l=this.closest(".botiga-tabs-nav").querySelectorAll(".botiga-tabs-nav-item"));try{for(s.s();!(i=s.n()).done;){var r=i.value,c=document.querySelector(r.querySelector(".botiga-tabs-nav-link").getAttribute("href"));null!==c&&(r.classList.remove("is-active"),c.classList.remove("is-active"))}}catch(e){s.e(e)}finally{s.f()}o.classList.add("removing"),setTimeout(function(){t.classList.add("is-active"),n.classList.add("activating"),setTimeout(function(){n.classList.add("is-active"),n.classList.remove("activating")},300),o.classList.remove("removing")},300)})})()}catch(e){a.e(e)}finally{a.f()}}},botiga.misc={init:function(){this.general(),this.wcExpressPayButtons(),this.singleProduct(),this.cart(),this.checkout(),this.customizer()},general:function(){var e=document.getElementById("site-header-cart");if(null===e)return!1;e.addEventListener("mouseover",function(){document.body.classList.add("bt-mini-cart-hovered")}),e.addEventListener("mouseout",function(){document.body.classList.remove("bt-mini-cart-hovered")})},wcExpressPayButtons:function(){var e=document.querySelector("body.woocommerce-checkout"),t=document.querySelector("body.woocommerce-cart");if(null===document.querySelector("body.single-product")&&null===e&&null===t)return!1;"function"==typeof jQuery&&void 0!==(t=jQuery)("#wc-stripe-payment-request-button-separator, #wcpay-payment-request-wrapper").get(0)&&null===e&&(t("#wc-stripe-payment-request-button-separator, #wcpay-payment-request-button-separator").appendTo("form.cart"),t("#wc-stripe-payment-request-wrapper, #wcpay-payment-request-wrapper").appendTo("form.cart"),t(window).trigger("botiga.wcexpresspaybtns.appended"))},singleProduct:function(){var e,t,o,a,n=this;if(null===document.querySelector("body.single-product"))return!1;"function"==typeof jQuery&&((e=jQuery)(".variations_form").each(function(){if(!0===e(this).data("misc-variations"))return!1;n.moveResetVariationButton(e(this)),n.checkIfHasVariationSelected(e(this)),e(this).on("woocommerce_variation_select_change",function(){n.checkIfHasVariationSelected(e(this))}),e(this).data("misc-variations",!0)}),e(".botiga-in-cart-flag").length)&&(t=e("body.single-product .entry-summary .variations_form, .botiga-tb-sp-add-to-cart"),o=t.find(".single_add_to_cart_button"),a=o.text(),t.each(function(){e(this).on("found_variation",function(e,t){var a=botigaInCartFlag.variations_in_cart.filter(function(e){return e.variation_id===t.variation_id}),a=a.length?a[0].addtocart_button_text:o.text();o.html(a)}),e(this).on("reset_data",function(){o.text(a)})}))},moveResetVariationButton:function(e){var t=e.find(".reset_variations");t.remove(),e.find("table").after(t)},checkIfHasVariationSelected:function(e){var t=!0;e.find("td.value select").each(function(){if(""!==jQuery(this).val())return t=!1,jQuery(this).closest("table").addClass("has-variation-selected"),!1;jQuery(this).closest("table").removeClass("has-variation-selected")}),t?e.closest(".variations_form").find(".reset_variations").css("display","none"):e.closest(".variations_form").find(".reset_variations").css("display","inline-block")},cart:function(){var t;if(null===document.querySelector("body.woocommerce-cart"))return!1;"function"==typeof jQuery&&(t=jQuery)("header.has-sticky-header").length&&t(document).on("updated_cart_totals",function(){t(window).on("scroll",function(e){t("html, body").stop(!0,!1),t(this).off(e),t("html, body").animate({scrollTop:t('[role="alert"]').offset().top-t("header.has-sticky-header").height()},1e3)})})},checkout:function(){if(null===document.querySelector("body.woocommerce-checkout"))return!1;"function"==typeof jQuery&&jQuery(document).on("updated_checkout",function(){null!==document.querySelector("#order_review .woocommerce-shipping-totals > td")&&document.querySelector("#order_review .woocommerce-shipping-totals > td").setAttribute("colspan",2)})},customizer:function(){if("undefined"==typeof wp||void 0===wp.customize)return!1;wp.customize.bind("preview-ready",function(){document.querySelectorAll(".cart-count").length&&jQuery(document.body).trigger("wc_fragment_refresh")})}},botiga.helpers.botigaDomReady(function(){botiga.navigation.init(),botiga.autoSelectVariations.init(),botiga.desktopOffcanvasNav.init(),botiga.desktopOffCanvasToggleNav.init(),botiga.headerSearch.init(),botiga.customAddToCartButton.init(),botiga.stickyHeader.init(),botiga.scrollDirection.init(),botiga.backToTop.init(),botiga.qtyButton.init(),botiga.carousel.init(),botiga.collapse.init(),botiga.tabsNav.init(),botiga.misc.init()});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.