0&&e.each(s.suggestions,function(e,t){if(void 0!==t.type&&"more_products"!=t.type&&"headline"!=t.type&&"headline-v2"!=t.type&&"no-results"!=t.type)return a=e,!1;(void 0===t.type||"no-results"===t.type)&&(o=!0)}),!o&&(s.latestActivateSource="system",s.getDetails(t[a]),s.activate(a))},isBadQuery:function(e){if(!this.options.preventBadQueries)return!1;for(var t=this.badQueries,s=t.length;s--;)if(0===e.indexOf(t[s]))return!0;return!1},hide:function(t){var s=this,a=s.getSuggestionsContainer(),o=s.getDetailsContainer();if("function"==typeof s.options.onHide&&s.visible&&s.options.onHide.call(s.element,container),s.visible=!1,s.selectedIndex=-1,clearTimeout(s.onChangeTimeout),a.hide(),a.removeClass(s.classes.suggestionsContainerOrientTop),a.removeClass(s.classes.fixed),s.canShowDetailsPanel()&&(o.hide(),o.removeClass(s.classes.fixed)),s.hidePreSuggestions(),e("body").removeClass("dgwt-wcas-open"),!e("html").hasClass("dgwt-wcas-overlay-mobile-on")){var i=s.getSearchStyle();e("html").removeClass("dgwt-wcas-open-"+i),"pirx"===i&&e("html").removeClass("dgwt-wcas-open-pirx-compact")}e("body").removeClass("dgwt-wcas-block-scroll"),e("body").removeClass("dgwt-wcas-is-details"),e("body").removeClass("dgwt-wcas-full-width"),e("body").removeClass("dgwt-wcas-nores"),e("body").removeClass("dgwt-wcas-details-outside"),e("body").removeClass("dgwt-wcas-details-right"),e("body").removeClass("dgwt-wcas-details-left"),null!=s.autoAligmentprocess&&(clearInterval(s.autoAligmentprocess),s.autoAligmentprocess=null),s.isMouseDownOnSearchElements=!1,"boolean"==typeof t&&t&&(s.hideCloseButton(),s.currentValue="",s.suggestions=[])},positionIconSearchMode:function(t){var s=-20,a=this.getForm(),o=a.width(),i=e(window).width(),n=t[0].getBoundingClientRect().left;s=Math.max(s=Math.floor(-1*(o*((n+10)/i))),-1*n),a.css({left:s+"px"})},isActiveIconModeSearch:function(){var t=!1;return e(".dgwt-wcas-layout-icon-open").length>0&&(t=!0),t},hideIconModeSearch:function(){this.isActiveIconModeSearch()&&!s.isTextSelected()&&e(".dgwt-wcas-layout-icon-open").removeClass("dgwt-wcas-layout-icon-open")},hideAfterClickOutsideListener:function(){var t=this;"ontouchend"in document||e(document).on("mouseup",function(s){if(t.visible){var a=!(e(s.target).closest("."+t.options.searchFormClass).length>0||e(s.target).hasClass(t.options.searchFormClass)),o=!(e(s.target).closest("."+t.options.containerClass).length>0||e(s.target).hasClass(t.options.containerClass));if(t.canShowDetailsPanel()){var i=!(e(s.target).closest("."+t.options.containerDetailsClass).length>0||e(s.target).hasClass(t.options.containerDetailsClass));a&&o&&i&&t.hide()}else a&&o&&t.hide()}})},suggest:function(){if(!this.suggestions.length){this.hide();return}var t,s=this,a=s.options,o=a.groupBy,i=a.formatResult,n=s.getQuery(s.currentValue),r=s.classes.suggestion,c=s.classes.selected,l=s.getSuggestionsContainer(),d=s.getDetailsContainer(),g=e(s.noSuggestionsContainer),u=a.beforeRender,h="",p=function(e,s){var a=e.data[o];return t===a?"":'
'+(t=a)+"
"};if(a.triggerSelectOnValidInput&&s.isExactMatch(n)){s.select(0);return}e("body").removeClass("dgwt-wcas-nores"),e.each(s.suggestions,function(t,c){var l="string"==typeof c.url&&c.url.length?c.url:"#";if(o&&(h+=p(c,n,t)),void 0===c.type||"product"!=c.type&&"product_variation"!=c.type){var g,u=r,w="dgwt-wcas-st",f="",v="",m="",y=!0;if("product_cat"===c.taxonomy?(u+=" dgwt-wcas-suggestion-tax dgwt-wcas-suggestion-cat",a.showHeadings||(f+='
'+dgwt_wcas.labels["tax_"+c.taxonomy]+""),void 0!==c.breadcrumbs&&c.breadcrumbs&&(m=c.breadcrumbs+" > "+c.value,v+='
'+dgwt_wcas.labels.in+" "+c.breadcrumbs+"")):"product_tag"===c.taxonomy?(u+=" dgwt-wcas-suggestion-tax dgwt-wcas-suggestion-tag",a.showHeadings||(f+='
'+dgwt_wcas.labels["tax_"+c.taxonomy]+"")):a.isPremium&&c.taxonomy===a.taxonomyBrands?(u+=" dgwt-wcas-suggestion-tax dgwt-wcas-suggestion-brand",a.showHeadings||(f+='
'+dgwt_wcas.labels["tax_"+c.taxonomy]+"")):a.isPremium&&"taxonomy"===c.type?(u+=" dgwt-wcas-suggestion-tax dgwt-wcas-suggestion-tax-"+c.taxonomy,a.showHeadings||(f+='
'+dgwt_wcas.labels["tax_"+c.taxonomy]+"")):a.isPremium&&"vendor"===c.type?(u+=" dgwt-wcas-suggestion-vendor dgwt-wcas-suggestion-vendor",a.showHeadings||(f+='
'+dgwt_wcas.labels.vendor+"")):a.isPremium&&"post"===c.type&&void 0!==c.post_type?(u+=" dgwt-wcas-suggestion-pt dgwt-wcas-suggestion-pt-"+c.post_type,a.showHeadings||(f+='
'+dgwt_wcas.labels["post_type_"+c.post_type]+"")):"more_products"===c.type?(u+=" js-dgwt-wcas-suggestion-more dgwt-wcas-suggestion-more",w="dgwt-wcas-st-more",c.value=dgwt_wcas.labels.show_more+'
('+c.total+")",y=!1):a.showHeadings&&"headline"===c.type&&(u+=" js-dgwt-wcas-suggestion-headline dgwt-wcas-suggestion-headline",void 0!==dgwt_wcas.labels[c.value+"_plu"]&&(c.value=dgwt_wcas.labels[c.value+"_plu"]),y=!1),"no-results"===c.type)e("body").addClass("dgwt-wcas-nores"),d.length&&(s.detailsPanelClearScene(),d.hide(),d.removeClass(s.classes.fixed),s.fixHeight()),c.value="",h+=s.createNoResultsContent();else{if((void 0!==c.image_src&&c.image_src||void 0!==c.image&&c.image)&&(g=!0),f+=s.apply3rdPartyPlaceholder("title_before",c),v+=s.apply3rdPartyPlaceholder("title_after",c),m=m.length>0?' title="'+m+'"':"",h+='
',g){let b=c.image_src?c.image_src:c.image;h+='
',h+=''}h+="',"vendor"===c.type?(h+=''+f+i(c.value,n,y,a)+v+"",c.shop_city&&(h+=' - '+i(c.shop_city,n,!0,a)+""),void 0!==c.desc&&c.desc&&(h+=''+i(c.desc,n,!0,a)+"")):h+=f+i(c.value,n,y,a)+v,h+="",h+=g?"
":"",h+=""}}else h+=s.createProductSuggestion(c,t)}),this.adjustContainerWidth(),g.detach(),l.html(h),"function"==typeof u&&u.call(s.element,l,s.suggestions),l.show(),e("body").addClass("dgwt-wcas-open");var w=s.getSearchStyle();e("html").addClass("dgwt-wcas-open-"+w),"pirx"===w&&e("html").addClass("dgwt-wcas-open-pirx-compact"),s.isMouseDownOnSearchElements=!1,s.automaticAlignment(),s.canShowDetailsPanel()&&(e("body").addClass("dgwt-wcas-is-details"),d.show(),s.fixHeight()),a.autoSelectFirst&&(s.selectedIndex=0,l.scrollTop(0),l.children("."+r).first().addClass(c)),s.visible=!0,s.fixPosition()},createNoResultsContent:function(){var e='
',t=void 0!==dgwt_wcas.labels.no_results_default?dgwt_wcas.labels.no_results_default:"";try{t=JSON.parse(dgwt_wcas.labels.no_results);var s=document.createElement("div");s.innerHTML=t,t=s.innerHTML}catch(a){}return e+=t,e+="
"},createProductSuggestion:function(e,t,s){var a="",o="",i=this.options,n=this.classes.suggestion,r=!1,c=this.getQuery(this.currentValue),l=i.formatResult,d="string"==typeof e.url&&e.url.length?e.url:"#";"string"==typeof s&&(n+=" "+s),!0===i.showImage&&void 0!==e.thumb_html&&(r=!0);var g="product_variation"===e.type?" dgwt-wcas-suggestion-product-var":"";if(o+=void 0!==e.post_id?'data-post-id="'+e.post_id+'" ':"",o+=void 0!==e.taxonomy?'data-taxonomy="'+e.taxonomy+'" ':"",o+=void 0!==e.term_id?'data-term-id="'+e.term_id+'" ':"",a+='
",r&&(a+=''+e.thumb_html+""),a+=r?'':"",a+='
',a+=this.apply3rdPartyPlaceholder("title_before",e),a+=''+l(e.value,c,!0,i)+"",a+=this.apply3rdPartyPlaceholder("title_after",e),!0===i.showSKU&&void 0!==e.sku&&e.sku.length>0&&(a+='('+dgwt_wcas.labels.sku_label+" "+l(e.sku,c,!0,i)+")"),!0===i.showDescription&&void 0!==e.desc&&e.desc&&(a+=''+l(e.desc,c,!0,i)+""),!0===i.showProductVendor&&void 0!==e.vendor&&e.vendor){var u=''+dgwt_wcas.labels.vendor_sold_by+" "+e.vendor+"";void 0!==e.vendor_url&&e.vendor_url?a+=''+u+"":a+=u}a+=this.apply3rdPartyPlaceholder("content_after",e),a+="
";var h=!0===i.showPrice&&void 0!==e.price,p=void 0!==e.meta_before,w=void 0!==e.meta_after,f=h||p||w;return a+=f?'
':"",p&&(a+=this.apply3rdPartyPlaceholder("meta_before",e)),h&&(a+=''+e.price+""),w&&(a+=this.apply3rdPartyPlaceholder("meta_after",e)),a+=f?"
":"",a+=r?"
":"",a+=""},apply3rdPartyPlaceholder:function(e,t){var s="";return void 0!==t[e]&&t[e]&&(s=t[e]),s},getSearchStyle:function(){var t=this.getFormWrapper(),s="solaris";return e(t.attr("class").split(/\s+/)).each(function(e){/dgwt-wcas-style-/i.test(this)&&(s=this.replace(/dgwt-wcas-style-/i,""))}),"pirx-compact"===s&&(s="pirx"),s},adjustContainerWidth:function(){var e=this.getFormWrapper(),t=this.getSuggestionsContainer(),s=this.getDetailsContainer(),a=this.getForm().outerWidth();if(e.length&&(t.css("width",a+"px"),this.canShowDetailsPanel()&&a>=this.options.dpusbBreakpoint)){var o=0;t.css("width",a/2),s.css("width",a/2),0!=(o=a-(t.outerWidth()+s.outerWidth()))&&s.css("width",s.outerWidth()+o)}},positionPreloaderAndMic:function(t){var s=this,a="object"==typeof t?t.find(".dgwt-wcas-search-submit"):e(".dgwt-wcas-search-submit");a.length>0&&a.each(function(){var t=e(this).closest(".dgwt-wcas-search-wrapp").find(".dgwt-wcas-preloader"),a=e(this).closest(".dgwt-wcas-search-wrapp").hasClass("dgwt-wcas-style-solaris"),o=e(this).closest(".dgwt-wcas-search-wrapp").hasClass(s.options.voiceSearchSupportedClass),i=e(this).closest(".dgwt-wcas-search-wrapp").find("."+s.options.voiceSearchClass);o&&a&&(1==dgwt_wcas.is_rtl?i.css("transform","translateX("+e(this).outerWidth()+"px)"):i.css("transform","translateX(-"+e(this).outerWidth()+"px)")),1==dgwt_wcas.is_rtl?t.css("left",e(this).outerWidth()+"px"):t.css("right",e(this).outerWidth()+"px")})},preloader:function(e,t,s){var a,o,i="dgwt-wcas-preloader-wrapp";if("form"===t){if(1!=dgwt_wcas.show_preloader)return;o=this.getFormWrapper().find(".dgwt-wcas-preloader")}else"details"===t&&(o=this.getDetailsContainer());if(0!=o.length){if("form"===t){"hide"===e?(o.removeClass(s),o.html("")):(o.addClass(s),"string"==typeof dgwt_wcas.preloader_icon&&o.html(dgwt_wcas.preloader_icon));return}var n=o.find("."+i);if("hide"===e){n.length&&n.remove();return}if("show"===e){var r=this.options.isRtl?"-rtl":"";a='

',this.detailsPanelClearScene(),n.length&&n.remove(),o.prepend(a)}}},verifySuggestionsFormat:function(t){return t.length&&"string"==typeof t[0]?e.map(t,function(e){return{value:e,data:null}}):t},processResponse:function(e,t,s){var a=this,o=a.options;e.suggestions=a.verifySuggestionsFormat(e.suggestions),o.noCache||(a.cachedResponse[s]=e,o.preventBadQueries&&!e.suggestions.length&&a.badQueries.push(t)),t===a.getQuery(a.currentValue)&&(a.suggestions=e.suggestions,a.suggest())},activate:function(t){var s,a=this,o=a.classes.selected,i=a.getSuggestionsContainer(),n=i.find("."+a.classes.suggestion);return(i.find("."+o).removeClass(o),a.selectedIndex=t,-1!==a.selectedIndex&&n.length>a.selectedIndex)?(e(s=n.get(a.selectedIndex)).addClass(o),s):null},selectHint:function(){var t=e.inArray(this.hint,this.suggestions);this.select(t)},select:function(e){!this.options.disableHits&&void 0!==this.suggestions[e]&&(void 0===this.suggestions[e]||"headline"!=this.suggestions[e].type&&"headline-v2"!=this.suggestions[e].type)&&(this.closeOverlayMobile(),this.hide(),this.onSelect(e))},moveUp:function(){var e=this;if(-1!==e.selectedIndex){if(e.latestActivateSource="key",0===e.selectedIndex){e.getSuggestionsContainer().children("."+e.classes.suggestion).first().removeClass(e.classes.selected),e.selectedIndex=-1,e.ignoreValueChange=!1,e.el.val(e.currentValue);return}e.adjustScroll(e.selectedIndex-1,"up")}},moveDown:function(){var e=this;e.selectedIndex!==e.suggestions.length-1&&(e.latestActivateSource="key",e.adjustScroll(e.selectedIndex+1,"down"))},adjustScroll:function(t,s){var a=this;if("headline"===a.suggestions[t].type&&(t="down"===s?t+1:t-1),void 0!==a.suggestions[t]){var o=a.activate(t);if(a.getDetails(a.suggestions[t]),!("more_products"===a.suggestions[t].type||!o||a.canShowDetailsPanel())){var i,n,r,c=a.getSuggestionsContainer(),l=e(o).outerHeight(!1);i=o.offsetTop,r=(n=c.scrollTop())+a.options.maxHeight-l,i
r&&c.scrollTop(i-a.options.maxHeight+l),a.options.preserveInput||(a.ignoreValueChange=!0)}}},onSelect:function(e){var t=this,s=t.options.onSelect,a=t.suggestions[e],o=!1;void 0!==a.type&&("more_products"!==a.type&&("enter"!==t.actionTriggerSource||"key"==t.latestActivateSource||"product_variation"==a.type)&&("enter"!==t.actionTriggerSource||"key"==t.latestActivateSource||"product_variation"!=a.type||t.options.goToFirstVariationOnSubmit)||(t.el.closest("form").trigger("submit"),o=!0),"history-search"===a.type&&(t.currentValue=t.getValue(a.value),t.currentValue===t.el.val()||t.options.preserveInput||t.el.val(t.currentValue.replace(/(<([^>]+)>)/gi," ").replace(/\s\s+/g," ")),t.el.closest("form").trigger("submit"),o=!0)),("product"===a.type||"product_variation"===a.type)&&t.options.showRecentlySearchedProducts&&t.saveHistoryProducts(a),o||(t.currentValue=t.getValue(a.value),t.currentValue===t.el.val()||t.options.preserveInput||t.el.val(t.currentValue.replace(/(<([^>]+)>)/gi," ").replace(/\s\s+/g," ")),a.url.length>0&&(window.location.href=a.url),t.suggestions=[],t.selection=a),"function"==typeof s&&s.call(t.element,a)},openInNewTab:function(e){var t=this.suggestions[e];t.url.length>0&&window.open(t.url,"_blank").trigger("focus")},getValue:function(e){var t,s,a=this.options.delimiter;return a&&1!==(s=(t=this.currentValue).split(a)).length?t.substr(0,t.length-s[s.length-1].length)+e:e},dispose:function(){var t=this.el,s=this.getFormWrapper(),a=this.getSuggestionsContainer(),o=s.find(".js-dgwt-wcas-enable-mobile-form");s.length&&s.find("*").each(function(){e(this).off(".autocomplete")}),t.off("fibosearch/ping"),s.off("click.autocomplete",".js-dgwt-wcas-search-icon-handler"),t.removeData("autocomplete"),e(window).off("resize.autocomplete",this.fixPosition),s.removeClass("dgwt-wcas-active"),this.close(!1),o.length&&o.remove(),a.length&&a.html("")},isMountedOverlayDarkened:function(){var e=this.getFormWrapper(),t=!1;return e.hasClass(this.classes.darkenOverlayMounted)&&(t=!0),t},enableOverlayDarkened:function(){var t,s=this,a=s.options;if(s.isMountedOverlayDarkened()){if((t=s.getFormWrapper()).addClass("dgwt-wcas-search-darkoverl-on"),e("body").addClass("dgwt-wcas-darkoverl-on"),0==e("."+a.darkenedOverlayClass).length){var o='';e("body").append(o);var i=e("."+s.options.darkenedOverlayClass);s.positionOverlayDarkened(),i.on("click.autocomplete",function(e){s.disableOverlayDarkened()})}s.overlayDarkenedState="on"}},disableOverlayDarkened:function(){var t,s=this,a=s.options;if(s.isMountedOverlayDarkened()){(t=e(".dgwt-wcas-search-darkoverl-on")).length&&t.removeClass("dgwt-wcas-search-darkoverl-on"),e("body").removeClass("dgwt-wcas-darkoverl-on");var o=e("."+a.darkenedOverlayClass);o.length>0&&(o.remove(),s.overlayDarkenedState="off")}},positionOverlayDarkened:function(){var t=this,s=!1,a=e("."+t.options.darkenedOverlayClass);a.length>0&&(t.ancestorHasPositionFixed(t.getFormWrapper())?(s=!0,a.addClass("dgwt-wcas-suggestions-wrapp-fixed")):a.removeClass("dgwt-wcas-suggestions-wrapp-fixed"),a.children("div").each(function(a){t.positionOverlayDarkenedDiv(e(this),a+1,s)}))},positionOverlayDarkenedDiv:function(t,s,a){var o,i,n=this.getFormWrapper();switch(n.hasClass("js-dgwt-wcas-layout-icon")&&(n=this.getForm()),o=this.getElementInfo(n),s){case 1:i={left:"-200px",top:"-200px",width:o.left+200+"px",height:e(document).outerHeight(!1)+200-1+"px"};break;case 2:var r=a?o.topViewPort:o.top;i={left:"-200px",top:"-200px",width:e(window).outerWidth(!1)+200+"px",height:r+200+"px"};break;case 3:i={left:o.left+o.width+"px",top:"-200px",width:e(window).outerWidth(!1)-o.right+"px",height:e(document).outerHeight(!1)+200-1+"px"};break;case 4:var r=a?o.topViewPort:o.top;i={left:"-200px",top:r+o.height+"px",width:e(window).outerWidth(!1)+200+"px",height:e(document).outerHeight(!1)-o.bottom-1+"px"}}i&&t.css(i)},showCloseButton:function(){var e=this,t=void 0!==dgwt_wcas.close_icon?dgwt_wcas.close_icon:"",s=e.getFormWrapper().find("."+e.options.preloaderClass);!(e.el.val().length',void 0!==dgwt_wcas.labels.search_hist){var g=dgwt_wcas.labels.search_hist;g+=' '+dgwt_wcas.labels.search_hist_clear+"",i+=''+g+""}if(i+="",o++,c.length>0)for(t=0;t0)for(t=0;t',i+=''+u.thumb_html+"",i+='',i+='
'+s.formatHtml(u.value)+"
",i+="
",i+="",o++}n.html(i),n.show(),e("body").addClass("dgwt-wcas-open"),e("body").addClass("dgwt-wcas-open-pre-suggestions");var h=a.getSearchStyle();e("html").addClass("dgwt-wcas-open-"+a.getSearchStyle()),"pirx"===h&&e("html").addClass("dgwt-wcas-open-pirx-compact"),a.isMouseDownOnSearchElements=!1,a.visible=!0,a.fixPosition(),a.options.showImage=d,document.dispatchEvent(new CustomEvent("fibosearch/open",{detail:a})),document.dispatchEvent(new CustomEvent("fibosearch/show-pre-suggestions",{detail:a}))}},resetPreSuggestions:function(){var t=this,a=t.getSuggestionsContainer(),o=s.getActiveInstance();s.removeLocalStorageItem(t.recentlyViewedProductsKey),s.removeLocalStorageItem(t.recentlySearchedPhrasesKey),t.suggestions=[],a.html(""),e("body").removeClass("dgwt-wcas-open-pre-suggestions"),o.el.trigger("focus")},hidePreSuggestions:function(){var e=this;e.options.showImage||e.suggestionsContainer.removeClass("dgwt-wcas-has-img"),e.suggestionsContainer.removeClass("dgwt-wcas-has-img-forced"),e.isPreSuggestionsMode=!1},saveHistoryProducts:function(e){var t=this,a=s.getLocalStorageItem(t.recentlyViewedProductsKey,[]);a=[e,...a],a=[...new Map(a.map(e=>(void 0!==e.price&&delete e.price,t.options.showImage||(e.thumb_html=dgwt_wcas.history_icon),[e.post_id,e]))).values()],s.setLocalStorageItem(t.recentlyViewedProductsKey,a.slice(0,5))},saveHistorySearches:function(e){var t=s.getLocalStorageItem(this.recentlySearchedPhrasesKey,[]);t=[e,...t],t=[...new Set(t)],s.setLocalStorageItem(this.recentlySearchedPhrasesKey,t.slice(0,5))},addActiveClassIfMissing:function(){var t=document.activeElement;if("object"==typeof t&&e(t).length&&e(t).hasClass("dgwt-wcas-search-input")){var s=e(t).closest(".dgwt-wcas-search-wrapp");s.length&&!s.hasClass("dgwt-wcas-active")&&s.addClass("dgwt-wcas-active")}},ancestorHasPositionFixed:function(t){var s=t.add(t.parents()),a=!1;return s.each(function(){if("fixed"===e(this).css("position"))return a=!0,!1}),a},gaEvent:function(t,s){var a=!!(window.hasOwnProperty("GoogleAnalyticsObject")&&window.hasOwnProperty(window.GoogleAnalyticsObject))&&window[window.GoogleAnalyticsObject];if(this.options.sendGAEvents)try{if("undefined"!=typeof gtag)gtag("event","autocomplete_search",{event_label:t,event_category:s});else if(!1!==a){var o=a.getAll()[0];o&&o.send({hitType:"event",eventCategory:s,eventAction:"autocomplete_search",eventLabel:t})}}catch(i){}if(this.options.enableGASiteSearchModule)try{if("undefined"!=typeof gtag)gtag("event","page_view",{page_path:"/?s="+encodeURI(t)+"&post_type=product&dgwt_wcas=1"});else if(!1!==a){var n=a.getAll()[0];n&&(n.set("page","/?s="+encodeURI(t)+"&post_type=product&dgwt_wcas=1"),n.send("pageview"))}}catch(r){}e(document).trigger("dgwtWcasGAEvent",{term:t,category:s})},initVoiceSearch:function(){var t=this;if(!t.options.voiceSearchEnabled)return!1;var a=t.getFormWrapper(),o=a.find("."+t.options.searchInputClass),i=a.find("."+t.options.voiceSearchClass),n=!1;if("function"==typeof SpeechRecognition?n=SpeechRecognition:"function"==typeof webkitSpeechRecognition&&(n=webkitSpeechRecognition),!n||s.isBrowser("Chrome")&&s.isIOS()||s.isSafari())return!1;t.voiceSearchSetState("inactive",i),a.addClass(t.options.voiceSearchSupportedClass),t.voiceSearchRecognition=new n,t.voiceSearchRecognition.lang=t.options.voiceSearchLang,t.voiceSearchRecognition.continuous=!1,t.voiceSearchRecognition.interimResults=!0,t.voiceSearchRecognition.maxAlternatives=1,i.on("click",function(){if(a.hasClass("dgwt-wcas-mobile-overlay-trigger-active")&&!e("html").hasClass("dgwt-wcas-overlay-mobile-on")&&(a.find(".js-dgwt-wcas-enable-mobile-form").trigger("click"),a.find("."+t.options.searchInputClass).trigger("blur")),t.voiceSearchStarted){t.voiceSearchAbort();return}t.voiceSearchIsInitialized()&&t.voiceSearchAbort(),t.voiceSearchRecognition.start()}),t.voiceSearchRecognition.onstart=function(e){t.voiceSearchSetState("active",i)},t.voiceSearchRecognition.onresult=function(e){let s=e.results[0],a=s[0].transcript;o.val(a),s.isFinal&&(o.trigger("change"),"ontouchend"in document||o.trigger("focus"),t.voiceSearchSetState("inactive",i))},t.voiceSearchRecognition.onspeechend=function(){t.voiceSearchSetState("inactive",i),t.voiceSearchRecognition.stop()},t.voiceSearchRecognition.onnomatch=function(e){t.voiceSearchSetState("inactive",i)},t.voiceSearchRecognition.onerror=function(e){switch(e.error){case"aborted":case"no-speech":t.voiceSearchSetState("inactive",i);break;case"network":break;case"not-allowed":case"service-not-allowed":t.voiceSearchSetState("off",i)}}},voiceSearchAbort:function(){var e=this;e.voiceSearchIsInitialized()&&(e.voiceSearchRecognition.abort(),e.voiceSearchStarted=!1)},voiceSearchIsInitialized:function(){return null!==this.voiceSearchRecognition},voiceSearchSetState:function(e,t){var s=this;switch(e){case"active":s.voiceSearchStarted=!0,"string"==typeof dgwt_wcas.voice_search_active_icon&&t.html(dgwt_wcas.voice_search_active_icon);break;case"inactive":s.voiceSearchStarted=!1,"string"==typeof dgwt_wcas.voice_search_inactive_icon&&t.html(dgwt_wcas.voice_search_inactive_icon);break;case"off":s.voiceSearchStarted=!1,"string"==typeof dgwt_wcas.voice_search_disabled_icon&&t.html(dgwt_wcas.voice_search_disabled_icon)}}},e.fn.dgwtWcasAutocomplete=function(t,s){var a="autocomplete";return arguments.length?this.each(function(){var o=e(this),i=o.data(a);"string"==typeof t?i&&"function"==typeof i[t]&&i[t](s):(i&&i.dispose&&i.dispose(),i=new n(this,t),o.data(a,i))}):this.first().data(a)},e.fn.autocomplete||(e.fn.autocomplete=e.fn.dgwtWcasAutocomplete),s.isIE11()&&function(e,t){function s(e,t){var s=arguments.length>2?arguments[2]:[];if(!1===i(e))throw TypeError(Object.prototype.toString.call(e)+"is not a function.");return e.apply(t,s)}function a(e,t,s){Object.defineProperty(e,t,{value:s,writable:!0,enumerable:!1,configurable:!0})}function o(e,t){return e[t]}function i(e){return"function"==typeof e}function n(e,t){return e===t}function r(e){if(null===e||e===t)throw TypeError();return Object(e)}function c(t){switch(typeof t){case"undefined":return"undefined";case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"symbol":return"symbol";default:return null===t?"null":"Symbol"in e&&(t instanceof e.Symbol||t.constructor===e.Symbol)?"symbol":"object"}}function l(e,t){var s,a;return c(e)===c(t)&&("number"===c(e)?!(!isNaN(e)||!isNaN(t))||1/e==1/0&&1/t==-1/0||1/e==-1/0&&1/t==1/0||e===t:(s=e,s===(a=t)))}function d(e){if("symbol"===c(e))throw TypeError("Cannot convert a Symbol value to a number");var t=Number(e);return isNaN(t)?0:1/t==1/0||1/t==-1/0||t===1/0||t===-1/0?t:(t<0?-1:1)*Math.floor(Math.abs(t))}function g(a){switch(c(a)){case"symbol":throw TypeError("Cannot convert a Symbol value to a string");case"object":return g(function a(o){var n=arguments.length>1?arguments[1]:t;if("object"===c(o)){if(arguments.length<2)var l="default";else n===String?l="string":n===Number&&(l="number");var d="function"==typeof e.Symbol&&"symbol"==typeof e.Symbol.toPrimitive?function e(s,a){var o,n,c=(o=s,n=a,r(o)[n]);if(null!==c&&c!==t){if(!1===i(c))throw TypeError("Method not callable: "+a);return c}}(o,e.Symbol.toPrimitive):t;if(d!==t){var g=s(d,o,[l]);if("object"!==c(g))return g;throw TypeError("Cannot convert exotic object to primitive.")}return"default"===l&&(l="number"),function e(t,a){if("string"===a)var o=["toString","valueOf"];else o=["valueOf","toString"];for(var n=0;n=0)var p=h;else(p=u+h)<0&&(p=0);for(;p1?arguments[1]:t,i=function e(s){if(null===s||s===t)throw TypeError(Object.prototype.toString.call(s)+" is not coercible to Object.");return s}(this),n=g(i);if(function s(a){if("object"!==c(a))return!1;var o,i,n,r="Symbol"in e&&"match"in e.Symbol?(i=a,i[n=e.Symbol.match]):t;if(r!==t)return Boolean(o=r);try{var l=a.lastIndex;return a.lastIndex=0,RegExp.prototype.exec.call(a),!0}catch(d){}finally{a.lastIndex=l}return!1}(a))throw TypeError("First argument to String.prototype.includes must not be a regular expression");var r=g(a),l=d(o),u=n.length;return-1!==String.prototype.indexOf.call(n,r,Math.min(Math.max(l,0),u))})}("object"==typeof window&&window||"object"==typeof self&&self||"object"==typeof global&&global||{}),e(document).ready(function(){s.isIOS()&&e("html").addClass("dgwt-wcas-is-ios"),window.dgwt_wcas.resizeOnlyOnce=null,window.dgwt_wcas.scrollOnlyOnce=null,window.dgwt_wcas.config={minChars:dgwt_wcas.min_chars,width:dgwt_wcas.sug_width,autoSelectFirst:!1,triggerSelectOnValidInput:!1,serviceUrl:dgwt_wcas.ajax_search_endpoint,paramName:"s",showDetailsPanel:1==dgwt_wcas.show_details_panel,showImage:1==dgwt_wcas.show_images,showPrice:1==dgwt_wcas.show_price,showDescription:1==dgwt_wcas.show_desc,showSKU:1==dgwt_wcas.show_sku,showSaleBadge:1==dgwt_wcas.show_sale_badge,showFeaturedBadge:1==dgwt_wcas.show_featured_badge,dynamicPrices:void 0!==dgwt_wcas.dynamic_prices&&!!dgwt_wcas.dynamic_prices,saleBadgeText:dgwt_wcas.labels.sale_badge,featuredBadgeText:dgwt_wcas.labels.featured_badge,isRtl:1==dgwt_wcas.is_rtl,showHeadings:1==dgwt_wcas.show_headings,isPremium:1==dgwt_wcas.is_premium,taxonomyBrands:dgwt_wcas.taxonomy_brands,layoutBreakpoint:dgwt_wcas.layout_breakpoint,mobileOverlayBreakpoint:dgwt_wcas.mobile_overlay_breakpoint,mobileOverlayWrapper:dgwt_wcas.mobile_overlay_wrapper,mobileOverlayDelay:dgwt_wcas.mobile_overlay_delay,debounceWaitMs:dgwt_wcas.debounce_wait_ms,sendGAEvents:dgwt_wcas.send_ga_events,enableGASiteSearchModule:dgwt_wcas.enable_ga_site_search_module,appendTo:void 0!==dgwt_wcas.suggestions_wrapper?dgwt_wcas.suggestions_wrapper:"body",showProductVendor:void 0!==dgwt_wcas.show_product_vendor&&!!dgwt_wcas.show_product_vendor,disableHits:void 0!==dgwt_wcas.disable_hits&&!!dgwt_wcas.disable_hits,disableSubmit:void 0!==dgwt_wcas.disable_submit&&!!dgwt_wcas.disable_submit,voiceSearchEnabled:void 0!==dgwt_wcas.voice_search_enabled&&!!dgwt_wcas.voice_search_enabled,voiceSearchLang:void 0!==dgwt_wcas.voice_search_lang?dgwt_wcas.voice_search_lang:"",showRecentlySearchedProducts:void 0!==dgwt_wcas.show_recently_searched_products&&dgwt_wcas.show_recently_searched_products,showRecentlySearchedPhrases:void 0!==dgwt_wcas.show_recently_searched_phrases&&dgwt_wcas.show_recently_searched_phrases,goToFirstVariationOnSubmit:void 0!==dgwt_wcas.go_to_first_variation_on_submit&&dgwt_wcas.go_to_first_variation_on_submit},e(".dgwt-wcas-search-input").dgwtWcasAutocomplete(window.dgwt_wcas.config)}),t={brokenSearchUi:void 0!==dgwt_wcas.fixer.broken_search_ui&&!!dgwt_wcas.fixer.broken_search_ui,brokenSearchUiAjax:void 0!==dgwt_wcas.fixer.broken_search_ui_ajax&&!!dgwt_wcas.fixer.broken_search_ui_ajax,brokenSearchUiHard:void 0!==dgwt_wcas.fixer.broken_search_ui_hard&&!!dgwt_wcas.fixer.broken_search_ui_hard,brokenSearchElementorPopups:void 0!==dgwt_wcas.fixer.broken_search_elementor_popups&&!!dgwt_wcas.fixer.broken_search_elementor_popups,brokenSearchJetMobileMenu:void 0!==dgwt_wcas.fixer.broken_search_jet_mobile_menu&&!!dgwt_wcas.fixer.broken_search_jet_mobile_menu,brokenSearchBrowserBackArrow:void 0!==dgwt_wcas.fixer.broken_search_browsers_back_arrow&&!!dgwt_wcas.fixer.broken_search_browsers_back_arrow,forceRefreshCheckout:void 0!==dgwt_wcas.fixer.force_refresh_checkout&&!!dgwt_wcas.fixer.force_refresh_checkout,searchBars:[],init:function(){var t=this;t.brokenSearchUi&&e(document).ready(function(){t.fixBrokenSearchUi()}),t.brokenSearchUiAjax&&t.fixBrokenSearchUiAjax(),t.brokenSearchUiHard&&t.fixBrokenSearchUiHard(),t.brokenSearchElementorPopups&&e(document).ready(function(){t.fixBrokenSearchOnElementorPopupsV1(),t.fixBrokenSearchOnElementorPopupsV2()}),t.brokenSearchJetMobileMenu&&e(window).on("load",function(){t.fixSearchInJetMobileMenu()}),t.brokenSearchBrowserBackArrow&&t.fixbrokenSearchBrowserBackArrow(),t.forceRefreshCheckout&&t.fixforceRefreshCheckout()},fixBrokenSearchUi:function(){var t=this;e(document).ready(function(){setTimeout(function(){t.pullAndReconditionSearchBars()},50)}),e(window).on("load",function(){setTimeout(function(){t.pullAndReconditionSearchBars()},500)})},fixBrokenSearchUiAjax:function(){var t=this;e(document).ajaxSuccess(function(e,s,a){!("string"==typeof a.url&&RegExp("search.php|wc-ajax").test(a.url))&&"string"==typeof s.responseText&&s.responseText.includes("dgwt-wcas-search-input")&&setTimeout(function(){t.pullAndReconditionSearchBars()},500)})},fixBrokenSearchUiHard:function(){var t=this;e(document).ready(function(){0===t.searchBars.length&&t.pullAndReconditionSearchBars(),setInterval(function(){t.pullAndReconditionSearchBars()},1e3)})},fixBrokenSearchOnElementorPopupsV1:function(){var t=this;e(document).on("elementor/popup/show",()=>{setTimeout(function(){t.pullAndReconditionSearchBars()},500)})},fixBrokenSearchOnElementorPopupsV2:function(){var t=this;e(document).ready(function(){void 0!==window.elementorFrontend&&void 0!==window.elementorFrontend.documentsManager&&void 0!==window.elementorFrontend.documentsManager.documents&&e.each(elementorFrontend.documentsManager.documents,function(e,s){void 0!==s.getModal&&s.getModal&&s.getModal().on("show",function(){setTimeout(function(){t.pullAndReconditionSearchBars()},500)})})})},fixSearchInJetMobileMenu:function(){var t=this;0!==e(".jet-mobile-menu__toggle").length&&e(document).ajaxSend(function(s){void 0!==s.currentTarget&&"object"==typeof s.currentTarget.activeElement&&e(s.currentTarget.activeElement).hasClass("jet-mobile-menu__toggle")&&setTimeout(function(){e(".jet-mobile-menu__container .dgwt-wcas-search-input").length>0&&t.pullAndReconditionSearchBars()},500)})},fixforceRefreshCheckout:function(){e(document.body).on("added_to_cart",function(){e(document.body).hasClass("woocommerce-checkout")&&e(".dgwt-wcas-search-input").length>0&&e(document.body).trigger("update_checkout")})},fixbrokenSearchBrowserBackArrow:function(){e(window).on("load",function(){var t=0,s=setInterval(function(){var a=document.activeElement;if("object"==typeof a&&e(a).length&&e(a).hasClass("dgwt-wcas-search-input")){var o=e(a).closest(".dgwt-wcas-search-wrapp");o.length&&!o.hasClass("dgwt-wcas-active")&&(o.addClass("dgwt-wcas-active"),clearInterval(s))}t>10&&clearInterval(s),t++},500)})},pullAndReconditionSearchBars:function(){var t=this,s=e(".dgwt-wcas-search-input"),a=0==t.searchBars.length;s.length>0&&s.each(function(){var s,o=e(this),i=!0;if(t.searchBars.length>0){for(s=0;s0)for(var s=0;s0?e(".hide_cart_widget_if_empty").closest(".widget_shopping_cart").show():e(".hide_cart_widget_if_empty").closest(".widget_shopping_cart").hide(),e(document.body).on("adding_to_cart",function(){e(".hide_cart_widget_if_empty").closest(".widget_shopping_cart").show()}),"undefined"!=typeof wp&&wp.customize&&wp.customize.selectiveRefresh&&wp.customize.widgetsPreview&&wp.customize.widgetsPreview.WidgetPartial&&wp.customize.selectiveRefresh.bind("partial-content-rendered",function(){s()})})
;var sb_instagram_js_options={"font_method":"svg","resized_url":"https:\/\/ataicr.com\/wp-content\/uploads\/sb-instagram-feed-images\/","placeholder":"https:\/\/ataicr.com\/wp-content\/plugins\/instagram-feed\/img\/placeholder.png","ajax_url":"https:\/\/ataicr.com\/wp-admin\/admin-ajax.php"}
;var sbi_js_exists=typeof sbi_js_exists!=="undefined"?true:!1;if(!sbi_js_exists){(function($){function sbiAddVisibilityListener(){!function(i){var n={callback:function(){},runOnLoad:!0,frequency:100,sbiPreviousVisibility:null},c={};c.sbiCheckVisibility=function(i,n){if(jQuery.contains(document,i[0])){var e=n.sbiPreviousVisibility,t=i.is(":visible");n.sbiPreviousVisibility=t,null==e?n.runOnLoad&&n.callback(i,t):e!==t&&n.callback(i,t),setTimeout(function(){c.sbiCheckVisibility(i,n)},n.frequency)}},i.fn.sbiVisibilityChanged=function(e){var t=i.extend({},n,e);return this.each(function(){c.sbiCheckVisibility(i(this),t)})}}(jQuery)}function Sbi(){this.feeds={};this.options=sb_instagram_js_options}Sbi.prototype={createPage:function(createFeeds,createFeedsArgs){if(typeof sb_instagram_js_options.ajax_url!=="undefined"&&typeof window.sbiajaxurl==="undefined"){window.sbiajaxurl=sb_instagram_js_options.ajax_url}if(typeof window.sbiajaxurl==="undefined"||window.sbiajaxurl.indexOf(window.location.hostname)===-1){window.sbiajaxurl=location.protocol+"//"+window.location.hostname+"/wp-admin/admin-ajax.php"}if($("#sbi-builder-app").length&&typeof window.sbiresizedImages==="undefined"){if($(".sbi_resized_image_data").length&&typeof $(".sbi_resized_image_data").attr("data-resized")!=="undefined"&&$(".sbi_resized_image_data").attr("data-resized").indexOf('{"')===0){window.sbiresizedImages=JSON.parse($(".sbi_resized_image_data").attr("data-resized"));$(".sbi_resized_image_data").remove()}}$(".sbi_no_js_error_message").remove();$(".sbi_no_js").removeClass("sbi_no_js");createFeeds(createFeedsArgs)},createFeeds:function(args){args.whenFeedsCreated($(".sbi").each(function(index){$(this).attr("data-sbi-index",index+1);var $self=$(this),flags=typeof $self.attr("data-sbi-flags")!=="undefined"?$self.attr("data-sbi-flags").split(","):[],general=typeof $self.attr("data-options")!=="undefined"?JSON.parse($self.attr("data-options")):{};if(flags.indexOf("testAjax")>-1){window.sbi.triggeredTest=!0;var submitData={action:"sbi_on_ajax_test_trigger"},onSuccess=function(data){console.log("did test")};sbiAjax(submitData,onSuccess)}var feedOptions={cols:$self.attr("data-cols"),colsmobile:typeof $self.attr("data-colsmobile")!=="undefined"&&$self.attr("data-colsmobile")!=="same"?$self.attr("data-colsmobile"):$self.attr("data-cols"),colstablet:typeof $self.attr("data-colstablet")!=="undefined"&&$self.attr("data-colstablet")!=="same"?$self.attr("data-colstablet"):$self.attr("data-cols"),num:$self.attr("data-num"),imgRes:$self.attr("data-res"),feedID:$self.attr("data-feedid"),postID:typeof $self.attr("data-postid")!=="undefined"?$self.attr("data-postid"):"unknown",shortCodeAtts:$self.attr("data-shortcode-atts"),resizingEnabled:flags.indexOf("resizeDisable")===-1,imageLoadEnabled:flags.indexOf("imageLoadDisable")===-1,debugEnabled:flags.indexOf("debug")>-1,favorLocal:flags.indexOf("favorLocal")>-1,ajaxPostLoad:flags.indexOf("ajaxPostLoad")>-1,gdpr:flags.indexOf("gdpr")>-1,overrideBlockCDN:flags.indexOf("overrideBlockCDN")>-1,consentGiven:!1,locator:flags.indexOf("locator")>-1,autoMinRes:1,general:general};window.sbi.feeds[index]=sbiGetNewFeed(this,index,feedOptions);window.sbi.feeds[index].setResizedImages();window.sbi.feeds[index].init();var evt=jQuery.Event("sbiafterfeedcreate");evt.feed=window.sbi.feeds[index];jQuery(window).trigger(evt)}))},afterFeedsCreated:function(){$(".sb_instagram_header").each(function(){var $thisHeader=$(this);$thisHeader.find(".sbi_header_link").on("mouseenter mouseleave",function(e){switch(e.type){case"mouseenter":$thisHeader.find(".sbi_header_img_hover").addClass("sbi_fade_in");break;case"mouseleave":$thisHeader.find(".sbi_header_img_hover").removeClass("sbi_fade_in");break}})})},encodeHTML:function(raw){if(typeof raw==="undefined"){return""}var encoded=raw.replace(/(>)/g,">"),encoded=encoded.replace(/(<)/g,"<");encoded=encoded.replace(/(<br\/>)/g,"
");encoded=encoded.replace(/(<br>)/g,"
");return encoded},urlDetect:function(text){var urlRegex=/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g;return text.match(urlRegex)}};function SbiFeed(el,index,settings){this.el=el;this.index=index;this.settings=settings;this.minImageWidth=0;this.imageResolution=150;this.resizedImages={};this.needsResizing=[];this.outOfPages=!1;this.page=1;this.isInitialized=!1}SbiFeed.prototype={init:function(){var feed=this;feed.settings.consentGiven=feed.checkConsent();if($(this.el).find(".sbi_photo").parent("p").length){$(this.el).addClass("sbi_no_autop")}if($(this.el).find("#sbi_mod_error").length){$(this.el).prepend($(this.el).find("#sbi_mod_error"))}if(this.settings.ajaxPostLoad){this.getNewPostSet()}else{this.afterInitialImagesLoaded()}var sbi_delay=function(){var sbi_timer=0;return function(sbi_callback,sbi_ms){clearTimeout(sbi_timer);sbi_timer=setTimeout(sbi_callback,sbi_ms)}}();jQuery(window).on("resize",function(){sbi_delay(function(){feed.afterResize()},500)});$(this.el).find(".sbi_item").each(function(){feed.lazyLoadCheck($(this))})},initLayout:function(){},afterInitialImagesLoaded:function(){this.initLayout();this.loadMoreButtonInit();this.hideExtraImagesForWidth();this.beforeNewImagesRevealed();this.revealNewImages();this.afterNewImagesRevealed()},afterResize:function(){this.setImageHeight();this.setImageResolution();this.maybeRaiseImageResolution();this.setImageSizeClass()},afterLoadMoreClicked:function($button){$button.find(".sbi_loader").removeClass("sbi_hidden");$button.find(".sbi_btn_text").addClass("sbi_hidden");$button.closest(".sbi").find(".sbi_num_diff_hide").addClass("sbi_transition").removeClass("sbi_num_diff_hide")},afterNewImagesLoaded:function(){var $self=$(this.el),feed=this;this.beforeNewImagesRevealed();this.revealNewImages();this.afterNewImagesRevealed();setTimeout(function(){$self.find(".sbi_loader").addClass("sbi_hidden");$self.find(".sbi_btn_text").removeClass("sbi_hidden");feed.maybeRaiseImageResolution()},500)},beforeNewImagesRevealed:function(){this.setImageHeight();this.maybeRaiseImageResolution(!0);this.setImageSizeClass()},revealNewImages:function(){var $self=$(this.el),feed=this;$self.find(".sbi-screenreader").each(function(){$(this).find("img").remove()});if(typeof sbi_custom_js=="function")setTimeout(function(){sbi_custom_js()},100);$self.find(".sbi_item").each(function(index){var $self=jQuery(this);$self.find(".sbi_photo").on("mouseenter mouseleave",function(e){switch(e.type){case"mouseenter":jQuery(this).fadeTo(200,.85);break;case"mouseleave":jQuery(this).stop().fadeTo(500,1);break}})});setTimeout(function(){jQuery("#sbi_images .sbi_item.sbi_new").removeClass("sbi_new");var time=10;$self.find(".sbi_transition").each(function(){var $sbi_item_transition_el=jQuery(this);setTimeout(function(){$sbi_item_transition_el.removeClass("sbi_transition")},time);time+=10})},500)},lazyLoadCheck:function($item){var feed=this;if($item.find(".sbi_photo").length&&!$item.closest(".sbi").hasClass("sbi-no-ll-check")){var imgSrcSet=feed.getImageUrls($item),maxResImage=typeof imgSrcSet[640]!=="undefined"?imgSrcSet[640]:$item.find(".sbi_photo").attr("data-full-res");if(!feed.settings.consentGiven){if(maxResImage.indexOf("scontent")>-1){return}}$item.find(".sbi_photo img").each(function(){if(maxResImage&&typeof $(this).attr("data-src")!=="undefined"){$(this).attr("data-src",maxResImage)}if(maxResImage&&typeof $(this).attr("data-orig-src")!=="undefined"){$(this).attr("data-orig-src",maxResImage)}$(this).on("load",function(){if(!$(this).hasClass("sbi-replaced")&&$(this).attr("src").indexOf("placeholder")>-1){$(this).addClass("sbi-replaced");if(maxResImage){$(this).attr("src",maxResImage);if($(this).closest(".sbi_imgLiquid_bgSize").length){$(this).closest(".sbi_imgLiquid_bgSize").css("background-image","url("+maxResImage+")")}}}})})}},afterNewImagesRevealed:function(){this.listenForVisibilityChange();this.sendNeedsResizingToServer();if(!this.settings.imageLoadEnabled){$(".sbi_no_resraise").removeClass("sbi_no_resraise")}var evt=$.Event("sbiafterimagesloaded");evt.el=$(this.el);$(window).trigger(evt)},setResizedImages:function(){if($(this.el).find(".sbi_resized_image_data").length&&typeof $(this.el).find(".sbi_resized_image_data").attr("data-resized")!=="undefined"&&$(this.el).find(".sbi_resized_image_data").attr("data-resized").indexOf('{"')===0){this.resizedImages=JSON.parse($(this.el).find(".sbi_resized_image_data").attr("data-resized"));$(this.el).find(".sbi_resized_image_data").remove()}else if(typeof window.sbiresizedImages!=="undefined"){this.resizedImages=window.sbiresizedImages}},sendNeedsResizingToServer:function(){var feed=this,$self=$(this.el);if(feed.needsResizing.length>0&&feed.settings.resizingEnabled){var itemOffset=$(this.el).find(".sbi_item").length,cacheAll=typeof feed.settings.general.cache_all!=="undefined"?feed.settings.general.cache_all:!1;var locatorNonce="";if(typeof $self.attr("data-locatornonce")!=="undefined"){locatorNonce=$self.attr("data-locatornonce")}if($("#sbi-builder-app").length){if(typeof window.sbiresizeTriggered!=="undefined"&&window.sbiresizeTriggered){return}else{window.sbiresizeTriggered=!0}}var submitData={action:"sbi_resized_images_submit",needs_resizing:feed.needsResizing,offset:itemOffset,feed_id:feed.settings.feedID,atts:feed.settings.shortCodeAtts,location:feed.locationGuess(),post_id:feed.settings.postID,cache_all:cacheAll,locator_nonce:locatorNonce};var onSuccess=function(data){var response=data;if(typeof data!=="object"&&data.trim().indexOf("{")===0){response=JSON.parse(data.trim())}if(feed.settings.debugEnabled){console.log(response)}for(var property in response){if(response.hasOwnProperty(property)){feed.resizedImages[property]=response[property]}}feed.maybeRaiseImageResolution();setTimeout(function(){feed.afterResize()},500);if($("#sbi-builder-app").length){window.sbiresizeTriggered=!1}};sbiAjax(submitData,onSuccess)}else if(feed.settings.locator){var locatorNonce="";if(typeof $self.attr("data-locatornonce")!=="undefined"){locatorNonce=$self.attr("data-locatornonce")}var submitData={action:"sbi_do_locator",feed_id:feed.settings.feedID,atts:feed.settings.shortCodeAtts,location:feed.locationGuess(),post_id:feed.settings.postID,locator_nonce:locatorNonce};var onSuccess=function(data){};sbiAjax(submitData,onSuccess)}},loadMoreButtonInit:function(){var $self=$(this.el),feed=this;$self.find("#sbi_load .sbi_load_btn").off().on("click",function(){feed.afterLoadMoreClicked(jQuery(this));feed.getNewPostSet()})},getNewPostSet:function(){var $self=$(this.el),feed=this;feed.page++;var locatorNonce="";if(typeof $self.attr("data-locatornonce")!=="undefined"){locatorNonce=$self.attr("data-locatornonce")}var itemOffset=$self.find(".sbi_item").length,submitData={action:"sbi_load_more_clicked",offset:itemOffset,page:feed.page,feed_id:feed.settings.feedID,atts:feed.settings.shortCodeAtts,location:feed.locationGuess(),post_id:feed.settings.postID,current_resolution:feed.imageResolution,locator_nonce:locatorNonce};var onSuccess=function(data){var response=data;if(typeof data!=="object"&&data.trim().indexOf("{")===0){response=JSON.parse(data.trim())}if(feed.settings.debugEnabled){console.log(response)}feed.appendNewPosts(response.html);feed.addResizedImages(response.resizedImages);if(feed.settings.ajaxPostLoad){feed.settings.ajaxPostLoad=!1;feed.afterInitialImagesLoaded()}else{feed.afterNewImagesLoaded()}if(!response.feedStatus.shouldPaginate){feed.outOfPages=!0;$self.find(".sbi_load_btn").hide()}else{feed.outOfPages=!1}$(".sbi_no_js").removeClass("sbi_no_js")};sbiAjax(submitData,onSuccess)},appendNewPosts:function(newPostsHtml){var $self=$(this.el),feed=this;if($self.find("#sbi_images .sbi_item").length){$self.find("#sbi_images .sbi_item").last().after(newPostsHtml)}else{$self.find("#sbi_images").append(newPostsHtml)}},addResizedImages:function(resizedImagesToAdd){for(var imageID in resizedImagesToAdd){this.resizedImages[imageID]=resizedImagesToAdd[imageID]}},setImageHeight:function(){var $self=$(this.el);var sbi_photo_width=$self.find(".sbi_photo").eq(0).innerWidth();var sbi_num_cols=this.getColumnCount();var imagesPadding=$self.find("#sbi_images").innerWidth()-$self.find("#sbi_images").width(),imagepadding=imagesPadding/2;sbi_photo_width_manual=$self.find("#sbi_images").width()/sbi_num_cols-imagesPadding;$self.find(".sbi_photo").css("height",sbi_photo_width);if($self.find(".sbi-owl-nav").length){setTimeout(function(){var sbi_ratio=2;if($self.find(".sbi_owl2row-item").length)sbi_ratio=1;var sbi_arrows_top=$self.find(".sbi_photo").eq(0).innerWidth()/sbi_ratio;sbi_arrows_top+=parseInt(imagepadding)*(2+(2-sbi_ratio));$self.find(".sbi-owl-nav div").css("top",sbi_arrows_top)},100)}},maybeRaiseSingleImageResolution:function($item,index,forceChange){var feed=this,imgSrcSet=feed.getImageUrls($item),currentUrl=$item.find(".sbi_photo img").attr("src"),currentRes=150,imagEl=$item.find("img").get(0),aspectRatio=currentUrl===window.sbi.options.placeholder?1:imagEl.naturalWidth/imagEl.naturalHeight,forceChange=typeof forceChange!=="undefined"?forceChange:!1;if($item.hasClass("sbi_no_resraise")||$item.hasClass("sbi_had_error")||$item.find(".sbi_link_area").length&&$item.find(".sbi_link_area").hasClass("sbi_had_error")){return}if(imgSrcSet.length<1){if($item.find(".sbi_link_area").length){$item.find(".sbi_link_area").attr("href",window.sbi.options.placeholder.replace("placeholder.png","thumb-placeholder.png"))}return}else if($item.find(".sbi_link_area").length&&$item.find(".sbi_link_area").attr("href")===window.sbi.options.placeholder.replace("placeholder.png","thumb-placeholder.png")||!feed.settings.consentGiven){$item.find(".sbi_link_area").attr("href",imgSrcSet[imgSrcSet.length-1])}if(typeof imgSrcSet[640]!=="undefined"){$item.find(".sbi_photo").attr("data-full-res",imgSrcSet[640])}$.each(imgSrcSet,function(index,value){if(value===currentUrl){currentRes=parseInt(index);forceChange=!1}});var newRes=640;switch(feed.settings.imgRes){case"thumb":newRes=150;break;case"medium":newRes=320;break;case"full":newRes=640;break;default:var minImageWidth=Math.max(feed.settings.autoMinRes,$item.find(".sbi_photo").innerWidth()),thisImageReplace=feed.getBestResolutionForAuto(minImageWidth,aspectRatio,$item);switch(thisImageReplace){case 320:newRes=320;break;case 150:newRes=150;break}break}if(newRes>currentRes||currentUrl===window.sbi.options.placeholder||forceChange){if(feed.settings.debugEnabled){var reason=currentUrl===window.sbi.options.placeholder?"was placeholder":"too small";console.log("rais res for "+currentUrl,reason)}var newUrl=imgSrcSet[newRes].split("?ig_cache_key")[0];if(currentUrl!==newUrl){$item.find(".sbi_photo img").attr("src",newUrl)}currentRes=newRes;if(feed.settings.imgRes==="auto"){var checked=!1;$item.find(".sbi_photo img").on("load",function(){var $this_image=$(this);var newAspectRatio=$this_image.get(0).naturalWidth/$this_image.get(0).naturalHeight;if($this_image.get(0).naturalWidth!==1e3&&newAspectRatio>aspectRatio&&!checked){if(feed.settings.debugEnabled){console.log("rais res again for aspect ratio change "+currentUrl)}checked=!0;minImageWidth=$item.find(".sbi_photo").innerWidth();thisImageReplace=feed.getBestResolutionForAuto(minImageWidth,newAspectRatio,$item);newRes=640;switch(thisImageReplace){case 320:newRes=320;break;case 150:newRes=150;break}if(newRes>currentRes){newUrl=imgSrcSet[newRes].split("?ig_cache_key")[0];$this_image.attr("src",newUrl)}if(feed.layout==="masonry"||feed.layout==="highlight"){$(feed.el).find("#sbi_images").smashotope(feed.isotopeArgs);setTimeout(function(){$(feed.el).find("#sbi_images").smashotope(feed.isotopeArgs)},500)}}else{if(feed.settings.debugEnabled){var reason=checked?"already checked":"no aspect ratio change";console.log("not raising res for replacement "+currentUrl,reason)}}})}}$item.find("img").on("error",function(){if(!$(this).hasClass("sbi_img_error")){$(this).addClass("sbi_img_error");var sourceFromAPI=$(this).attr("src").indexOf("media/?size=")>-1||$(this).attr("src").indexOf("cdninstagram")>-1||$(this).attr("src").indexOf("fbcdn")>-1;if(!sourceFromAPI&&feed.settings.consentGiven){if($(this).closest(".sbi_photo").attr("data-img-src-set")!=="undefined"){var srcSet=JSON.parse($(this).closest(".sbi_photo").attr("data-img-src-set").replace(/\\\//g,"/"));if(typeof srcSet.d!=="undefined"){$(this).attr("src",srcSet.d);$(this).closest(".sbi_item").addClass("sbi_had_error").find(".sbi_link_area").attr("href",srcSet[640]).addClass("sbi_had_error")}}}else{feed.settings.favorLocal=!0;var srcSet=feed.getImageUrls($(this).closest(".sbi_item"));if(typeof srcSet[640]!=="undefined"){$(this).attr("src",srcSet[640]);$(this).closest(".sbi_item").addClass("sbi_had_error").find(".sbi_link_area").attr("href",srcSet[640]).addClass("sbi_had_error")}}setTimeout(function(){feed.afterResize()},1500)}else{console.log("unfixed error "+$(this).attr("src"))}})},maybeRaiseImageResolution:function(justNew){var feed=this,itemsSelector=typeof justNew!=="undefined"&&justNew===!0?".sbi_item.sbi_new":".sbi_item",forceChange=!feed.isInitialized?true:!1;$(feed.el).find(itemsSelector).each(function(index){if(!$(this).hasClass("sbi_num_diff_hide")&&$(this).find(".sbi_photo").length&&typeof $(this).find(".sbi_photo").attr("data-img-src-set")!=="undefined"){feed.maybeRaiseSingleImageResolution($(this),index,forceChange)}});feed.isInitialized=!0},getBestResolutionForAuto:function(colWidth,aspectRatio,$item){if(isNaN(aspectRatio)||aspectRatio<1){aspectRatio=1}var bestWidth=colWidth*aspectRatio,bestWidthRounded=Math.ceil(bestWidth/10)*10,customSizes=[150,320,640];if($item.hasClass("sbi_highlighted")){bestWidthRounded=bestWidthRounded*2}if(customSizes.indexOf(parseInt(bestWidthRounded))===-1){var done=!1;$.each(customSizes,function(index,item){if(item>parseInt(bestWidthRounded)&&!done){bestWidthRounded=item;done=!0}})}return bestWidthRounded},hideExtraImagesForWidth:function(){if(this.layout==="carousel"){return}var $self=$(this.el),num=typeof $self.attr("data-num")!=="undefined"&&$self.attr("data-num")!==""?parseInt($self.attr("data-num")):1,nummobile=typeof $self.attr("data-nummobile")!=="undefined"&&$self.attr("data-nummobile")!==""?parseInt($self.attr("data-nummobile")):num;if($(window).width()<480||window.sbi_preview_device==="mobile"){if(nummobile<$self.find(".sbi_item").length){$self.find(".sbi_item").slice(nummobile-$self.find(".sbi_item").length).addClass("sbi_num_diff_hide")}}else{if(num<$self.find(".sbi_item").length){$self.find(".sbi_item").slice(num-$self.find(".sbi_item").length).addClass("sbi_num_diff_hide")}}},setImageSizeClass:function(){var $self=$(this.el);$self.removeClass("sbi_small sbi_medium");var feedWidth=$self.innerWidth(),photoPadding=parseInt($self.find("#sbi_images").outerWidth()-$self.find("#sbi_images").width())/2,cols=this.getColumnCount(),feedWidthSansPadding=feedWidth-photoPadding*(cols+2),colWidth=feedWidthSansPadding/cols;if(colWidth>120&&colWidth<240){$self.addClass("sbi_medium")}else if(colWidth<=120){$self.addClass("sbi_small")}},setMinImageWidth:function(){if($(this.el).find(".sbi_item .sbi_photo").first().length){this.minImageWidth=$(this.el).find(".sbi_item .sbi_photo").first().innerWidth()}else{this.minImageWidth=150}},setImageResolution:function(){if(this.settings.imgRes==="auto"){this.imageResolution="auto"}else{switch(this.settings.imgRes){case"thumb":this.imageResolution=150;break;case"medium":this.imageResolution=320;break;default:this.imageResolution=640}}},getImageUrls:function($item){var srcSet=JSON.parse($item.find(".sbi_photo").attr("data-img-src-set").replace(/\\\//g,"/")),id=$item.attr("id").replace("sbi_","");if(!this.settings.consentGiven&&!this.settings.overrideBlockCDN){srcSet=[]}if(typeof this.resizedImages[id]!=="undefined"&&this.resizedImages[id]!=="video"&&this.resizedImages[id]!=="pending"&&this.resizedImages[id].id!=="error"&&this.resizedImages[id].id!=="video"&&this.resizedImages[id].id!=="pending"){if(typeof this.resizedImages[id].sizes!=="undefined"){var foundSizes=[];var extension=typeof this.resizedImages[id].extension!=="undefined"?this.resizedImages[id].extension:".jpg";if(typeof this.resizedImages[id].sizes.full!=="undefined"){srcSet[640]=sb_instagram_js_options.resized_url+this.resizedImages[id].id+"full"+extension;foundSizes.push(640)}if(typeof this.resizedImages[id].sizes.low!=="undefined"){srcSet[320]=sb_instagram_js_options.resized_url+this.resizedImages[id].id+"low"+extension;foundSizes.push(320)}if(typeof this.resizedImages[id].sizes.thumb!=="undefined"){foundSizes.push(150);srcSet[150]=sb_instagram_js_options.resized_url+this.resizedImages[id].id+"thumb"+extension}if(this.settings.favorLocal){if(foundSizes.indexOf(640)===-1){if(foundSizes.indexOf(320)>-1){srcSet[640]=sb_instagram_js_options.resized_url+this.resizedImages[id].id+"low"+extension}}if(foundSizes.indexOf(320)===-1){if(foundSizes.indexOf(640)>-1){srcSet[320]=sb_instagram_js_options.resized_url+this.resizedImages[id].id+"full"+extension}else if(foundSizes.indexOf(150)>-1){srcSet[320]=sb_instagram_js_options.resized_url+this.resizedImages[id].id+"thumb"+extension}}if(foundSizes.indexOf(150)===-1){if(foundSizes.indexOf(320)>-1){srcSet[150]=sb_instagram_js_options.resized_url+this.resizedImages[id].id+"low"+extension}else if(foundSizes.indexOf(640)>-1){srcSet[150]=sb_instagram_js_options.resized_url+this.resizedImages[id].id+"full"+extension}}}}}else if(typeof this.resizedImages[id]==="undefined"||typeof this.resizedImages[id].id!=="undefined"&&this.resizedImages[id].id!=="pending"&&this.resizedImages[id].id!=="error"){this.addToNeedsResizing(id)}return srcSet},getAvatarUrl:function(username,favorType){if(username===""){return""}var availableAvatars=this.settings.general.avatars,favorType=typeof favorType!=="undefined"?favorType:"local";if(favorType==="local"){if(typeof availableAvatars["LCL"+username]!=="undefined"&&parseInt(availableAvatars["LCL"+username])===1){return sb_instagram_js_options.resized_url+username+".jpg"}else if(typeof availableAvatars[username]!=="undefined"){return availableAvatars[username]}else{return""}}else{if(typeof availableAvatars[username]!=="undefined"){return availableAvatars[username]}else if(typeof availableAvatars["LCL"+username]!=="undefined"&&parseInt(availableAvatars["LCL"+username])===1){return sb_instagram_js_options.resized_url+username+".jpg"}else{return""}}},addToNeedsResizing:function(id){if(this.needsResizing.indexOf(id)===-1){this.needsResizing.push(id)}},listenForVisibilityChange:function(){var feed=this;sbiAddVisibilityListener();if(typeof $(this.el).filter(":hidden").sbiVisibilityChanged=="function"){$(this.el).filter(":hidden").sbiVisibilityChanged({callback:function(element,visible){feed.afterResize()},runOnLoad:!1})}},getColumnCount:function(){var $self=$(this.el),cols=this.settings.cols,colsmobile=this.settings.colsmobile,colstablet=this.settings.colstablet,returnCols=cols;sbiWindowWidth=window.innerWidth;if($self.hasClass("sbi_mob_col_auto")){if(sbiWindowWidth<640&&(parseInt(cols)>2&&parseInt(cols)<7))returnCols=2;if(sbiWindowWidth<640&&(parseInt(cols)>6&&parseInt(cols)<11))returnCols=4;if(sbiWindowWidth<=480&&parseInt(cols)>2)returnCols=1}else if(sbiWindowWidth>480&&sbiWindowWidth<=800){returnCols=colstablet}else if(sbiWindowWidth<=480){returnCols=colsmobile}return parseInt(returnCols)},checkConsent:function(){if(this.settings.consentGiven||!this.settings.gdpr){return!0}if(typeof window.cookieyes!=="undefined"){if(typeof window.cookieyes._ckyConsentStore.get!=="undefined"){this.settings.consentGiven=window.cookieyes._ckyConsentStore.get("functional")==="yes"}}else if(typeof CLI_Cookie!=="undefined"){if(CLI_Cookie.read(CLI_ACCEPT_COOKIE_NAME)!==null){if(CLI_Cookie.read("cookielawinfo-checkbox-non-necessary")!==null){this.settings.consentGiven=CLI_Cookie.read("cookielawinfo-checkbox-non-necessary")==="yes"}if(CLI_Cookie.read("cookielawinfo-checkbox-necessary")!==null){this.settings.consentGiven=CLI_Cookie.read("cookielawinfo-checkbox-necessary")==="yes"}}}else if(typeof window.cnArgs!=="undefined"){var value="; "+document.cookie,parts=value.split("; cookie_notice_accepted=");if(parts.length===2){var val=parts.pop().split(";").shift();this.settings.consentGiven=val==="true"}}else if(typeof window.cookieconsent!=="undefined"){this.settings.consentGiven=sbiCmplzGetCookie("complianz_consent_status")==="allow"}else if(typeof window.Cookiebot!=="undefined"){this.settings.consentGiven=Cookiebot.consented}else if(typeof window.BorlabsCookie!=="undefined"){this.settings.consentGiven=typeof window.BorlabsCookie.Consents!=="undefined"?window.BorlabsCookie.Consents.hasConsent("instagram"):window.BorlabsCookie.checkCookieConsent("instagram")}else if(sbiCmplzGetCookie("moove_gdpr_popup")){var moove_gdpr_popup=JSON.parse(decodeURIComponent(sbiCmplzGetCookie("moove_gdpr_popup")));this.settings.consentGiven=typeof moove_gdpr_popup.thirdparty!=="undefined"&&moove_gdpr_popup.thirdparty==="1"}var evt=jQuery.Event("sbicheckconsent");evt.feed=this;jQuery(window).trigger(evt);return this.settings.consentGiven},afterConsentToggled:function(){if(this.checkConsent()){var feed=this;feed.maybeRaiseImageResolution();setTimeout(function(){feed.afterResize()},500)}},locationGuess:function(){var $feed=$(this.el),location="content";if($feed.closest("footer").length){location="footer"}else if($feed.closest(".header").length||$feed.closest("header").length){location="header"}else if($feed.closest(".sidebar").length||$feed.closest("aside").length){location="sidebar"}return location}};window.sbi_init=function(){window.sbi=new Sbi;window.sbi.createPage(window.sbi.createFeeds,{whenFeedsCreated:window.sbi.afterFeedsCreated})};function sbiGetNewFeed(feed,index,feedOptions){return new SbiFeed(feed,index,feedOptions)}function sbiAjax(submitData,onSuccess){$.ajax({url:sbiajaxurl,type:"post",data:submitData,success:onSuccess})}function sbiCmplzGetCookie(cname){var name=cname+"=";var cArr=window.document.cookie.split(";");for(var i=0;i{try{$.each(window.sbi.feeds,function(index){window.sbi.feeds[index].settings.consentGiven=!0;window.sbi.feeds[index].afterConsentToggled()})}catch(error){}})}$(".moove-gdpr-infobar-allow-all").on("click",function(){setTimeout(function(){$.each(window.sbi.feeds,function(index){window.sbi.feeds[index].afterConsentToggled()})},1e3)})})}
;jQuery(document).ready(function($){if($('body').hasClass('single-product')){$('label[for="pa_parent"]').hide();$('.w-post-elm-before').hide()}})
;jQuery(document).ready(function($){if($('body').hasClass('single-product')){var parentElement=$('.woocommerce-product-attributes-item--attribute_pa_alt-stock-status');if(parentElement.length>0){var parentTextContent=parentElement.text().trim().toLowerCase();if(parentTextContent.includes('descontinuado')||parentTextContent.includes('solo contra pedido')){$('.cwg_popup_submit').hide()}}
var stockStatusElement=$('.stock:first');if(stockStatusElement.length>0){var stockStatusText=stockStatusElement.text().trim();if(stockStatusText==="Hay existencias"){}else if(stockStatusText==="Agotado"){}}}})
;jQuery(document).ready(function($){if($('p.stock.out-of-stock:contains("Agotado")').length>0){var commonAncestor=$('p.stock.out-of-stock:contains("Agotado")').closest('.wpb_wrapper');commonAncestor.find('.wpb_text_column').not(':has(p:contains("Código:"))').hide()}})
;jQuery(document).ready(function($){function checkAndShowHiddenElements(){var $hiddenElements=$("div.product-tax-status.hide");$hiddenElements.each(function(){var $element=$(this);var $termElement=$element.find("span:contains('Solo contra pedido')");var $agotadoElement=$element.find("span:contains('Agotado en el proveedor')");if($termElement.length>0||$agotadoElement.length>0){$element.removeClass('hide')}})}
$(window).on('load',function(){checkAndShowHiddenElements();var observer=new MutationObserver(function(mutations){mutations.forEach(function(mutation){if(mutation.addedNodes){mutation.addedNodes.forEach(function(node){var $productTaxStatusElement=$(node).find('.product-tax-status');if($productTaxStatusElement.length>0){checkAndShowHiddenElements()}})}})});observer.observe(document.body,{childList:!0,subtree:!0})})})
;jQuery(document).ready(function($){var isSoloContraPedido=$("span.woocommerce-product-attributes-item__value:contains('Solo contra pedido')").length>0;var isHayExistenciasAbsent=!$("p.stock.in-stock:contains('Hay existencias')").length;if(isSoloContraPedido&&isHayExistenciasAbsent){$("#quote-pop-up").removeClass('hide')}
if(isSoloContraPedido){$(".stock.out-of-stock").addClass('hide')}})
;jQuery(document).ready(function($){if($('body').hasClass('woocommerce-account')){$('.woocommerce-privacy-policy-text').find('p').text('Sus datos personales se utilizarán para mejorar su experiencia en este sitio web, administrar el acceso a su cuenta y para otros fines descritos en nuestra política de privacidad.')}})
;jQuery(document).ready(function($){$('.norm_row').removeAttr('style')})
;jQuery(document).ready(function($){if($('body').hasClass('page-id-4792')){function updateActiveFilterColor(){$('.g-filters-item').css('color','');$('.g-filters-item.active').css('color','white')}
function changeAllToTodos(){$('.g-filters-item[data-taxonomy="*"] span:first').text('Todos')}
updateActiveFilterColor();changeAllToTodos();$('.g-filters-item').on('click',function(){setTimeout(function(){updateActiveFilterColor();changeAllToTodos()},10)})}})
;jQuery(function($){function hideOutOfStock(){$('.w-grid-item').each(function(){var $item=$(this);if($item.find('.term-solo-contra-pedido').length>0){$item.find('.stock.out-of-stock').hide()}})}
hideOutOfStock();var interval=setInterval(hideOutOfStock,500);setTimeout(function(){clearInterval(interval)},5000);$(document).on('ajaxComplete',hideOutOfStock)})
;(function($){function dgwtWcasImprezaGetActiveInstance(){var $el=$('.dgwt-wcas-search-wrapp.dgwt-wcas-active'),instance;if($el.length>0){$el.each(function(){var $input=$(this).find('.dgwt-wcas-search-input');if(typeof $input.data('autocomplete')=='object'){instance=$input.data('autocomplete');return!1}})}
return instance}
$(document).ready(function(){$('.w-search.layout_modern .w-search-close').on('click',function(){var instance=dgwtWcasImprezaGetActiveInstance();if(typeof instance=='object'){instance.suggestions=[];instance.hide();instance.el.val('')}});$('.w-search-open').on('click',function(e){if($(window).width()<900){e.preventDefault();var $mobileHandler=$(e.target).closest('.w-search').find('.js-dgwt-wcas-enable-mobile-form');if($mobileHandler.length){$mobileHandler[0].click()}
setTimeout(function(){$('.w-search').removeClass('active')},500)}})})})(jQuery)
;