var boostPFSInstantSearchConfig={search:{}};(function(){BoostPFS.inject(this),SearchInput.prototype.customizeInstantSearch=function(){var suggestionElement=this.$uiMenuElement,searchElement=this.$element,searchBoxId=this.id};var bindEventsMobile=InstantSearchMobile.prototype.bindEvents;InstantSearchMobile.prototype.bindEvents=function(){bindEventsMobile.call(this);var self=this,searchButtonMobile=".site-nav--mobile .search-button, .js-search-destop",searchInputMobile='.search-input-group input[type="search"], .wg-search-form .search-input',searchCloseButtonMobile=".drawer__close > button, .drawer_back a";jQ(searchButtonMobile).off("click").click(function(e){e.preventDefault(),jQ(searchInputMobile).focus(),self.openSuggestionMobile(),jQ(searchCloseButtonMobile).trigger("click")})};var bindEvents=InstantSearchStyle3.prototype.bindEvents;InstantSearchStyle3.prototype.bindEvents=function(){bindEvents.call(this);var self=this,searchButtonDesktop=".site-header__links .search-button",searchInputDesktop="#SearchContainer #search-input",searchCloseButtonDesktop=".drawer__close > button";jQ(searchButtonDesktop).off("click").click(function(e){e.preventDefault(),jQ(searchInputDesktop).focus(),self.openSuggestionStyle3(),jQ(searchCloseButtonDesktop).trigger("click")})},new MutationObserver(mutations=>{mutations.forEach(mutation=>{mutation.addedNodes.forEach(node=>{if(node.nodeType===1&&node.classList.contains("boost-pfs-search-suggestion-no-products")){const group=node.querySelector(".boost-pfs-search-suggestion-group");if(!group||group.dataset.hasViewAll==="true")return;const header=group.querySelector(".boost-pfs-search-suggestion-header");if(!header||header.textContent.trim()!=="Blog & Pages"||group.querySelectorAll(".boost-pfs-search-suggestion-item").length<5)return;const button=document.createElement("button");button.type="button",button.className="show-all-button",button.textContent="Show all results",button.addEventListener("click",function(){const input=document.querySelector(".boost-pfs-search-box");if(!input)return;const form=input.closest("form");form&&form.submit()}),group.appendChild(button),group.dataset.hasViewAll="true"}})})}).observe(document.body,{childList:!0,subtree:!0}),jQ(".site-header__links .search-button").on("click",function(){setTimeout(function(){boostPFS.initSearchBox(),Utils.isCollectionPage()&&jQ(".search-input-group > .boost-pfs-search-box").val("")},500)})})();
//# sourceMappingURL=/cdn/shop/t/72/assets/boost-pfs-instant-search.js.map?v=162376880727630679271761772637
