"use strict";function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _createForOfIteratorHelper(e,t){var o="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!o){if(Array.isArray(e)||(o=_unsupportedIterableToArray(e))||t&&e&&"number"==typeof e.length){o&&(e=o);var a=0,t=function(){};return{s:t,n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},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.")}var n,i=!0,r=!1;return{s:function(){o=o.call(e)},n:function(){var e=o.next();return i=e.done,e},e:function(e){r=!0,n=e},f:function(){try{i||null==o.return||o.return()}finally{if(r)throw n}}}}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);return"Map"===(o="Object"===o&&e.constructor?e.constructor.name:o)||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,a=new Array(t);o a[href="#"]'));try{for(o.s();!(t=o.n()).done;){var a=t.value;a.addEventListener("touchstart",g),a.addEventListener("click",g),a.addEventListener("keydown",function(e){"Enter"!==e.key&&13!==e.keyCode||(e.preventDefault(),a.parentNode.parentNode.getElementsByClassName("sub-menu")[0].classList.toggle("toggled"))})}}catch(e){o.e(e)}finally{o.f()}r.focus()});e=n.querySelectorAll('a[href*="#"]');if(e.length){var a,s=_createForOfIteratorHelper(e);try{for(s.s();!(a=s.n()).done;)a.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){s.e(e)}finally{s.f()}}var r=(c=n.querySelectorAll("a[href]:not([disabled])"))[0],c=c[c.length-1];c.addEventListener("keydown",function(e){"Tab"!==e.key&&9!==e.keyCode||(e.shiftKey||r.focus())}),t.addEventListener("click",function(e){e.preventDefault();e=i.getBoundingClientRect();0 a, .page_item_has_children > a"),d=_createForOfIteratorHelper(t);try{for(d.s();!(l=d.n()).done;){var u=l.value;u.addEventListener("focus",f,!0),u.addEventListener("blur",f,!0)}}catch(e){d.e(e)}finally{d.f()}var m,v=_createForOfIteratorHelper(o);try{for(v.s();!(m=v.n()).done;)m.value.addEventListener("touchstart",f,!1)}catch(e){v.e(e)}finally{v.f()}this.mobileAccordionNavigation(),this.initHoverClass(),this.checkMenuReverse()}else i.style.display="none"}}function g(e){e.preventDefault(),e.target.closest("li").querySelector(".sub-menu").classList.toggle("toggled")}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=this.parentNode;event.preventDefault();var o,a=_createForOfIteratorHelper(t.parentNode.children);try{for(a.s();!(o=a.n()).done;){var n=o.value;t!==n&&n.classList.remove("focus")}}catch(e){a.e(e)}finally{a.f()}t.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,o=0,a=[{name:"scroll",selector:window},{name:"mouseenter",selector:document},{name:"mouseover",selector:document},{name:"touchstart",selector:document}];o .botiga-dropdown-li"));try{for(i.s();!(t=i.n()).done;)t.value.addEventListener("mouseover",function(e){clearTimeout(o),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(a),n.contains(e.relatedTarget))return!1;o=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,o=_createForOfIteratorHelper(e);try{for(o.s();!(t=o.n()).done;){var a=t.value.querySelectorAll(".menu-item-has-children");if(!a.length)return!1;var n,i=_createForOfIteratorHelper(a);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){o.e(e)}finally{o.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 o=e.value;o.removeEventListener("mouseover",this.menuReverseEventHandler),o.addEventListener("mouseover",this.menuReverseEventHandler,{passive:!0}),o.removeEventListener("touchstart",this.menuReverseEventHandler),o.addEventListener("touchstart",this.menuReverseEventHandler,{passive:!0})}}catch(e){t.e(e)}finally{t.f()}},menuReverseEventHandler:function(){var e="rtl"===document.querySelector("html").getAttribute("dir");event.stopPropagation();var t=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.desktopOffCanvasToggleNav={init:function(){var e=document.getElementById("site-navigation"),t=document.getElementsByClassName("botiga-desktop-offcanvas-menu")[0];if(e&&void 0!==t){var o,a=_createForOfIteratorHelper(t.querySelectorAll('.dropdown-symbol, .menu-item-has-children > a[href="#"]'));try{for(a.s();!(o=a.n()).done;){var n=o.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){a.e(e)}finally{a.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],o=document.getElementsByClassName("botiga-desktop-offcanvas")[0];if(!e.length)return!1;for(var a=0;a td")&&document.querySelector("#order_review .woocommerce-shipping-totals > td").setAttribute("colspan",2)})},customizer:function(){if(!window.parent.document.body.classList.contains("wp-customizer"))return!1;window.onload=function(){document.querySelectorAll(".cart-count").length&&jQuery(document.body).trigger("wc_fragment_refresh")}}},botiga.helpers.botigaDomReady(function(){botiga.navigation.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()});