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 _classCallCheck(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,n){for(var t=0;t')}),c(document.body).on("added_to_cart",function(e,n,t,r){c(r).find(".brandy-loader").remove(),c(r).prop("disabled",!1)}),c(document).on("click",".woocommerce-cart-form .brandy-quantity .qty-minus, \n .add_to_cart_form .brandy-quantity .qty-minus",function(e){e.preventDefault(),e.stopPropagation(),h.bind(this)(e,"minus"),n()}),c(document).on("click",".woocommerce-cart-form .brandy-quantity .qty-plus, \n .add_to_cart_form .brandy-quantity .qty-plus",function(e){e.preventDefault(),e.stopPropagation(),h.bind(this)(e,"plus"),n()}),c(document).on("click",".brandy-mini-cart .brandy-quantity .qty-minus",function(e){e.preventDefault(),e.stopPropagation(),h.bind(this)(e,"minus"),i.bind(this)(e)}),c(document).on("click",".brandy-mini-cart .brandy-quantity .qty-plus",function(e){e.preventDefault(),e.stopPropagation(),h.bind(this)(e,"plus"),i.bind(this)(e)}),c(document).ready(function(){function e(){c(".brandy-cart-element").each(function(e,n){var t;1==(null==(t=c(n).data("auto-open-mini-cart"))||t)&&(c(n).find(".brandy-cart-dropdown").closest(".brandy-cart-wrapper").addClass("brandy-cart-dropdown-open"),c(n).find(".brandy-cart-drawer").addClass("brandy-cart-drawer-open"),c(n).find(".brandy-cart-overlay").addClass("brandy-cart-overlay-open"))})}c(document.body).on("added_to_cart",e),c(document).on("wc-blocks_added_to_cart",e)})}(window.jQuery),function(e){e(document).ready(function(){e(".single-comment__detail__action .reply-btn").on("click",function(){e(this).closest(".single-comment").find(".single-comment__reply-form").show()})})}(window.jQuery),function(e){e("document").ready(function(){e("head").append(""))})}(window.jQuery),function(s){s(document).ready(function(){var i;s(".brandy-subscribe-box__action-send-mail").on("click",function(e){e.preventDefault(),e.stopPropagation(),clearTimeout(i);var e=s(".brandy-subscribe-box__input").val(),o=s(".brandy-subscribe-box__action-send-mail");o.addClass("loading"),s.ajax({url:window.brandyData.ajax.path,method:"POST",data:{email:e,action:"brandy_send_subscribe_mail",nonce:window.brandyData.ajax.nonces.send_subscribe_mail},success:function(e){var n,t,r,a;e.success&&(o.removeClass("loading"),n=(null==e||null==(n=e.data)?void 0:n.message)||"",e=(null==e||null==(e=e.data)?void 0:e.success)||!1?"#7ED321":"#FF0000",t="\n \n "),(r=s("body")).css({position:"relative"}),((a=s("#send-mail-message")).length<1?(r.append(t),s("#send-mail-message")):(s(".send-mail-message-icon").attr("fill",e),a.find(".send-mail-message-content").html(n),a)).fadeIn("slow"),i=setTimeout(function(){s("#send-mail-message").fadeOut("slow")},3e3))},error:function(e){o.removeClass("loading"),console.log(e)}})})})}(jQuery),function(a){a("document").ready(function(){var e="".concat([1,2,3,4,5].map(function(e){return'\t\t\t\t\n\t\t\t')}).join(""));a("#brandy-rating .brandy-ratings__stars").html(e),a(".comment-form-author input").attr("placeholder","Enter your fullname"),a(".comment-form-email input").attr("placeholder","Enter your email"),a(document).on("click","#brandy-rating > .brandy-ratings__stars > label",function(){var t=a(this).find("input[type='radio']").val();a(this).closest("#brandy-rating").find(".star-item").each(function(e,n){e\n .woocommerce-product-gallery__trigger::after {\n background-image: url(".concat(window.brandyData.urls.assets+"/images/zoom-icon.svg",")\n }\n "))}),a(document).ready(function(){a(document).on("click",".brandy-cart-actions .single_add_to_cart_button, .woocommerce-variation-add-to-cart .single_add_to_cart_button",function(){a(this).addClass("loading"),a(this).addClass("disabled"),a(this).append('')})})}(window.jQuery),function(i){i(document).ready(function(){function t(){var o=0a+r&&t?(c(n).addClass("is-stickying"),c(n).closest(".header-within-device").addClass("sticky-start"),a=c("body").outerWidth()-c("body").width(),c(n).find(".sticky-part").css("width","calc(100% - ".concat(a,"px )"))):(window.scrollY<=o||0==window.scrollY||!t)&&(c(n).removeClass("is-stickying"),c(n).closest(".header-within-device").removeClass("sticky-start"),c(n).find(".sticky-part").css("width","100%"))})}window.addEventListener("scroll",function(){var e=s();n(),i=e<=0?0:e}),n()})}(window.jQuery),function(t){t(document).ready(function(){t(document).on("click",".brandy-lang-switcher-element .brandy-lang-switcher__placeholder",function(){t(this).toggleClass("opened"),t(this).hasClass("opened")&&window.dispatchEvent(new CustomEvent("brandy-language-switcher-opened",{detail:{activator:this}}))}),t(document).on("click",function(e){var n=t(".brandy-lang-switcher-element .brandy-lang-switcher__placeholder");n.has(e.target).length<=0&&!n.is(e.target)&&n.removeClass("opened")}),t(document).on("click",".brandy-lang-switcher-element .brandy-lang-option",function(){t(".brandy-lang-switcher-element .brandy-lang-option").removeClass("selected"),t(this).addClass("selected"),t(".brandy-lang-switcher__placeholder .brandy-lang-flag").replaceWith(t(this).find(".brandy-lang-flag").clone()),t(".brandy-lang-switcher__placeholder .brandy-lang-name").replaceWith(t(this).find(".brandy-lang-name").clone())}),t(window).on("brandy-language-switcher-opened",function(e){var e=t(e.detail.activator).parent(),n=t(e).find(".brandy-lang-options"),e=0 .brandy-logo-element").each(function(e,n){var t;1==r(n).data("has-sticky-logo")&&(t=r(n).find('.brandy-logo[logo-type="primary"]'),n=r(n).find('.brandy-logo[logo-type="sticky"]'),100 .brandy-element-wrapper",function(){var e=d("".concat(i," .brandy-menu__item.current-menu-item"));if(0More
    '));for(var t,r,a=d(t);;)if(r=function(){var t=[],e=d(n).find(".brandy-menu-items").children(".brandy-menu__item"),r=n.offsetLeft+n.offsetWidth;if(window.brandyData.rtl&&(r=d(window).width()-n.offsetLeft),e.each(function(e,n){0!=e&&(e=n.offsetLeft+n.offsetWidth,window.brandyData.rtl&&(e=d(window).width()-n.offsetLeft),Math.ceil(e)-10>r)&&(d(n).is(".more-options")?((e=d(n).prev()).addClass("brandy-sub-menu__item"),t.push(e)):(n.classList.add("brandy-sub-menu__item"),t.push(n)))}),t.forEach(function(e){a.children(".brandy-sub-menu").append(e)}),0\n
    \n
    \n
    \n \n ';return'\n
    \n '.concat(e,"\n
    \n ")}},{key:"stopLoading",value:function(){r(this.element).find(".brandy-result-placeholder").remove()}},{key:"mapDataToContent",value:function(e){r(this.element).find(".brandy-live-result__content").append(e)}},{key:"clearResult",value:function(){r(this.element).find(".brandy-live-result__content").html("")}},{key:"fetchPosts",value:(t=_asyncToGenerator(_regeneratorRuntime().mark(function e(n){var t;return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=new URLSearchParams(n),e.abrupt("return",new Promise(function(n){a=r.ajax({url:window.brandyData.ajax.path+"?".concat(t.toString()),type:"GET",data:{action:"brandy_search"},success:function(e){e.success&&n(null!=(e=null==(e=e.data)?void 0:e.html)?e:""),n("")}})}));case 2:case"end":return e.stop()}},e)})),function(e){return t.apply(this,arguments)})},{key:"onSearch",value:(n=_asyncToGenerator(_regeneratorRuntime().mark(function e(n){var t,r,a,o,i;return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.s,r=n.post_types,a=n.offset,o=n.limit,i=n.showMore,i=void 0!==i&&i,this.openLiveResult(),i||this.clearResult(),this.loading(),e.next=6,this.fetchPosts({s:t,post_types:r,offset:a,limit:o});case 6:i=e.sent,this.mapDataToContent(i),this.stopLoading();case 9:case"end":return e.stop()}},e,this)})),function(e){return n.apply(this,arguments)})},{key:"onSubmit",value:function(e){e.preventDefault(),e.stopPropagation();var n=new FormData(e.target).get("search_value"),e=null!=(e=r(e.target).attr("search-criteria"))?e:"",t={s:n,post_types:e,offset:0..toString(),limit:this.limit.toString()};this.hasLiveResult?(this.isIcon&&this.openLiveResult(),null!=n&&""!=n&&this.onSearch(t)):window.location.href=window.location.origin+"/?s=".concat(n,"&post_type=").concat(""!=e?e:"any")}},{key:"onShowMore",value:function(){var e,n,t=r(o);t.length<=0||(e=new FormData(t[0]).get("search_value"),t=null!=(t=r(t[0]).attr("search-criteria"))?t:"",n=r(".brandy-live-result__content .brandy-result-item").length||0,this.onSearch({s:e,post_types:t,offset:n.toString(),limit:this.limit.toString(),showMore:!0}))}},{key:"searchBySuggestion",value:function(e){var n,e=e.target.dataset.value,e=(r(".brandy-search-box__input").val(e),r(o));e.length<=0||(n=new FormData(e[0]).get("search_value"),e=null!=(e=r(e[0]).attr("search-criteria"))?e:"",this.onSearch({s:n,post_types:e,offset:0..toString(),limit:this.limit.toString()}))}},{key:"parentSubmit",value:function(e){e.stopPropagation(),e.preventDefault(),r(this).parent().submit()}},{key:"createHandlers",value:function(){this.closeLiveResultHandler=this.closeLiveResult.bind(this),this.submitHandler=this.onSubmit.bind(this),this.showMoreHandler=this.onShowMore.bind(this),this.searchBySuggestionHandler=this.searchBySuggestion.bind(this),this.onEscEvent=this.onEsc.bind(this)}},{key:"onEsc",value:function(e){"Escape"===e.key&&this.closeLiveResult()}},{key:"main",value:function(){r(this.element).find(o+" button[type='submit']").on("click",this.parentSubmit),r(this.element).find(o).on("submit",this.submitHandler),r(document).on("keyup",".brandy-search-box__input",function(e){r(".brandy-search-box__input").val(e.target.value)}),r(document).on("focus",".brandy-search-box__input",function(){r(".brandy-search-box").addClass("focused")}),r(document).on("focusout",".brandy-search-box__input",function(){r(".brandy-search-box").removeClass("focused")}),r(this.element).find(".brandy-live-result__suggestions__item").on("click",this.searchBySuggestionHandler)}},{key:"removeListeners",value:function(){r(this.element).find(o+" button[type='submit']").off("click",this.parentSubmit),r(this.element).find(o).off("submit",this.submitHandler),r(this.element).find(".brandy-live-result__suggestions__item").off("click",this.searchBySuggestionHandler)}}]);var n,t}();function t(){var e=[];return r(".brandy-search-element .brandy-element-wrapper").each(function(){e.push(new n(this))}),e}r(document).ready(function(){var e=t();window.addEventListener("partials-refreshed",function(){e.forEach(function(e){e.removeListeners()}),e=t()})})}(window.jQuery),function(s){function e(){s("body").removeClass("toc-opened")}function n(e){s("body").toggleClass("toc-opened"),s("body").hasClass("toc-opened")&&window.dispatchEvent(new CustomEvent("brandy-canvas-opened"))}s(document).ready(function(){s(document).on("click",".brandy-toggle-button-element > .brandy-element-wrapper",n),s(document).on("click",".brandy-toc-close-icon, .brandy-toc-backdrop",e)}),s(window).on("resize",function(){0