"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 a="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!a){if(Array.isArray(e)||(a=_unsupportedIterableToArray(e))||t&&e&&"number"==typeof e.length){a&&(e=a);var o=0,t=function(){};return{s:t,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},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 i,n=!0,s=!1;return{s:function(){a=a.call(e)},n:function(){var e=a.next();return n=e.done,e},e:function(e){s=!0,i=e},f:function(){try{n||null==a.return||a.return()}finally{if(s)throw i}}}}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Map"===(a="Object"===a&&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=new Array(t);a a[href="#"]'));try{for(a.s();!(t=a.n()).done;){var o=t.value;o.addEventListener("touchstart",g),o.addEventListener("click",g),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()});e=i.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")&&(n.classList.remove("open"),i.classList.remove("toggled"),document.body.classList.remove("mobile-menu-visible"))})}catch(e){r.e(e)}finally{r.f()}}var s=(c=i.querySelectorAll("a[href]:not([disabled])"))[0],c=c[c.length-1];c.addEventListener("keydown",function(e){"Tab"!==e.key&&9!==e.keyCode||(e.shiftKey||s.focus())}),t.addEventListener("click",function(e){e.preventDefault();e=n.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(a);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.checkMenuReverse()}else n.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 a,o=_createForOfIteratorHelper(t.parentNode.children);try{for(o.s();!(a=o.n()).done;){var i=a.value;t!==i&&i.classList.remove("focus")}}catch(e){o.e(e)}finally{o.f()}t.classList.toggle("focus")}}},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 i,n=_createForOfIteratorHelper(o);try{for(n.s();!(i=n.n()).done;)i.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){n.e(e)}finally{n.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),a.removeEventListener("touchstart",this.menuReverseEventHandler),a.addEventListener("touchstart",this.menuReverseEventHandler)}}catch(e){t.e(e)}finally{t.f()}},menuReverseEventHandler:function(){event.stopPropagation();var e=event.currentTarget.querySelector(".header-login-register>nav, .top-bar-login-register>nav, .sub-menu");return null!==e&&(e.classList.remove("sub-menu-reverse"),0!=botiga.helpers.isInHorizontalViewport(e)||e.closest(".menu-item").classList.contains("botiga-mega-menu")?e.classList.remove("sub-menu-reverse"):e.classList.add("sub-menu-reverse"),!(e.closest(".site-header")||e.closest(".bottom-header-row")||e.closest(".bhfb-header"))&&(e.classList.remove("sub-menu-reverse-vertically"),void(0!=botiga.helpers.isInVerticalViewport(e)||e.closest(".menu-item").classList.contains("botiga-mega-menu")?e.classList.remove("sub-menu-reverse-vertically"):e.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 a,o=_createForOfIteratorHelper(t.querySelectorAll('.dropdown-symbol, .menu-item-has-children > a[href="#"]'));try{for(o.s();!(a=o.n()).done;){var i=a.value;i.addEventListener("touchstart",n),i.addEventListener("click",n),i.addEventListener("keydown",function(e){"Enter"!==e.key&&13!==e.keyCode||(e.preventDefault(),i.parentNode.parentNode.getElementsByClassName("sub-menu")[0].classList.toggle("toggled"))})}}catch(e){o.e(e)}finally{o.f()}}function n(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 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.wishList.init(),botiga.quickView.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()});