@ecomplus/widget-search 1.0.0-beta.17 → 1.0.0-beta.170

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,2 +1,2 @@
1
- var widgetSearch=function(t){var e={};function s(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,s),r.l=!0,r.exports}return s.m=t,s.c=e,s.d=function(t,e,i){s.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},s.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},s.t=function(t,e){if(1&e&&(t=s(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(s.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)s.d(i,r,function(e){return t[e]}.bind(null,r));return i},s.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return s.d(e,"a",e),e},s.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},s.p="/assets/vendor/",s(s.s=27)}([function(t,e){t.exports=void 0},function(t,e,s){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var s=function(t,e){var s=t[1]||"",i=t[3];if(!i)return s;if(e&&"function"==typeof btoa){var r=(n=i,o=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),c="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(o),"/*# ".concat(c," */")),a=i.sources.map((function(t){return"/*# sourceURL=".concat(i.sourceRoot||"").concat(t," */")}));return[s].concat(a).concat([r]).join("\n")}var n,o,c;return[s].join("\n")}(e,t);return e[2]?"@media ".concat(e[2]," {").concat(s,"}"):s})).join("")},e.i=function(t,s,i){"string"==typeof t&&(t=[[null,t,""]]);var r={};if(i)for(var a=0;a<this.length;a++){var n=this[a][0];null!=n&&(r[n]=!0)}for(var o=0;o<t.length;o++){var c=[].concat(t[o]);i&&r[c[0]]||(s&&(c[2]?c[2]="".concat(s," and ").concat(c[2]):c[2]=s),e.push(c))}},e}},function(t,e,s){"use strict";function i(t,e){for(var s=[],i={},r=0;r<e.length;r++){var a=e[r],n=a[0],o={id:t+":"+r,css:a[1],media:a[2],sourceMap:a[3]};i[n]?i[n].parts.push(o):s.push(i[n]={id:n,parts:[o]})}return s}s.r(e),s.d(e,"default",(function(){return p}));var r="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!r)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var a={},n=r&&(document.head||document.getElementsByTagName("head")[0]),o=null,c=0,l=!1,d=function(){},u=null,h="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function p(t,e,s,r){l=s,u=r||{};var n=i(t,e);return m(n),function(e){for(var s=[],r=0;r<n.length;r++){var o=n[r];(c=a[o.id]).refs--,s.push(c)}e?m(n=i(t,e)):n=[];for(r=0;r<s.length;r++){var c;if(0===(c=s[r]).refs){for(var l=0;l<c.parts.length;l++)c.parts[l]();delete a[c.id]}}}}function m(t){for(var e=0;e<t.length;e++){var s=t[e],i=a[s.id];if(i){i.refs++;for(var r=0;r<i.parts.length;r++)i.parts[r](s.parts[r]);for(;r<s.parts.length;r++)i.parts.push(f(s.parts[r]));i.parts.length>s.parts.length&&(i.parts.length=s.parts.length)}else{var n=[];for(r=0;r<s.parts.length;r++)n.push(f(s.parts[r]));a[s.id]={id:s.id,refs:1,parts:n}}}}function _(){var t=document.createElement("style");return t.type="text/css",n.appendChild(t),t}function f(t){var e,s,i=document.querySelector('style[data-vue-ssr-id~="'+t.id+'"]');if(i){if(l)return d;i.parentNode.removeChild(i)}if(h){var r=c++;i=o||(o=_()),e=v.bind(null,i,r,!1),s=v.bind(null,i,r,!0)}else i=_(),e=y.bind(null,i),s=function(){i.parentNode.removeChild(i)};return e(t),function(i){if(i){if(i.css===t.css&&i.media===t.media&&i.sourceMap===t.sourceMap)return;e(t=i)}else s()}}var g,b=(g=[],function(t,e){return g[t]=e,g.filter(Boolean).join("\n")});function v(t,e,s,i){var r=s?"":i.css;if(t.styleSheet)t.styleSheet.cssText=b(e,r);else{var a=document.createTextNode(r),n=t.childNodes;n[e]&&t.removeChild(n[e]),n.length?t.insertBefore(a,n[e]):t.appendChild(a)}}function y(t,e){var s=e.css,i=e.media,r=e.sourceMap;if(i&&t.setAttribute("media",i),u.ssrId&&t.setAttribute("data-vue-ssr-id",e.id),r&&(s+="\n/*# sourceURL="+r.sources[0]+" */",s+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */"),t.styleSheet)t.styleSheet.cssText=s;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(s))}}},function(t,e,s){var i=s(16);"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);(0,s(2).default)("141f21aa",i,!0,{})},function(t,e,s){var i=s(18);"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);(0,s(2).default)("4bf118f0",i,!0,{})},function(t,e,s){var i=s(20);"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);(0,s(2).default)("0c5c80fc",i,!0,{})},function(t,e,s){var i=s(22);"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);(0,s(2).default)("ea0c0c4c",i,!0,{})},function(t,e,s){var i=s(24);"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);(0,s(2).default)("af492ce0",i,!0,{})},function(t,e,s){var i=s(26);"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);(0,s(2).default)("135ff686",i,!0,{})},function(t,e){t.exports=lozad},,function(t,e){t.exports=void 0},function(t,e){t.exports=void 0},function(t,e){t.exports=void 0},function(t,e){t.exports=void 0},function(t,e,s){"use strict";var i=s(3);s.n(i).a},function(t,e,s){(e=s(1)(!1)).push([t.i,".backdrop{position:fixed;top:-100vh;left:0;width:100vw;height:100vh;background-color:var(--dark);opacity:.65;cursor:pointer;z-index:-100}",""]),t.exports=e},function(t,e,s){"use strict";var i=s(4);s.n(i).a},function(t,e,s){(e=s(1)(!1)).push([t.i,".picture{display:inline-block;width:100%;transition:opacity .2s;overflow:hidden}.picture:not(.loaded){background:linear-gradient(25deg,var(--light) 40%,var(--gray) 200%);opacity:.3;height:100%;min-height:50px}.picture img{max-width:100%;height:auto;margin:0 auto}",""]),t.exports=e},function(t,e,s){"use strict";var i=s(5);s.n(i).a},function(t,e,s){(e=s(1)(!1)).push([t.i,".prices{line-height:var(--line-height-sm)}.prices:not(.prices--big){font-size:var(--font-size-sm)}.prices:not(.prices--big) .prices__installments{font-weight:var(--font-light)}.prices__value{display:block;font-size:var(--font-size-lg)}.prices--big{font-size:var(--font-size)}.prices--big .prices__value{font-size:var(--h1);margin-bottom:var(--spacer-1)}.prices--literal .prices__discount span,.prices--literal .prices__installments span{font-weight:var(--font-bold)}.prices--literal small{font-size:100%;text-transform:lowercase}.prices:not(.prices--literal) .prices__compare{color:var(--gray)}",""]),t.exports=e},function(t,e,s){"use strict";var i=s(6);s.n(i).a},function(t,e,s){(e=s(1)(!1)).push([t.i,".product-card{position:relative;padding:var(--spacer-2);font-size:var(--font-size);border-radius:var(--border-radius)}.product-card__offer-stamp{background-color:var(--success);color:var(--success-yiq);min-width:55px;font-size:80%;line-height:2.2;text-align:center;position:absolute;z-index:9;top:1rem;right:0;border-radius:var(--border-radius);transition:border-radius .3s;opacity:.9}.product-card__offer-stamp i,.product-card__offer-stamp svg{font-size:85%;opacity:.8}.product-card__link{outline:none}.product-card__pictures{position:relative;display:flex;align-items:center;text-align:center;overflow:hidden}.product-card__picture{position:absolute;display:block;border-radius:var(--border-radius);flex:0 0 100%}.product-card__picture img{max-width:100%}.product-card__picture:not(:last-child){opacity:0}.product-card__picture:not(:last-child).picture{background-color:none}.product-card__picture.loaded:last-child{transition:opacity .15s ease-out .1s;position:inherit;opacity:1}.product-card__pictures{height:180px}@media (min-width:576px){.product-card__pictures{height:200px}}@media (min-width:992px){.product-card__pictures{height:250px}}.product-card__picture img{max-height:180px}@media (min-width:576px){.product-card__picture img{max-height:200px}}@media (min-width:992px){.product-card__picture img{max-height:250px}}.product-card__name{padding-top:var(--spacer-1);font-size:var(--font-size-sm);line-height:var(--line-height-sm);height:calc(var(--line-height-sm)*var(--font-size-sm)*3);box-sizing:content-box!important;overflow:hidden;font-weight:var(--font-normal);display:block;z-index:1}.product-card__prices .prices__value:first-child{margin-top:calc(var(--line-height)*var(--font-size))}.product-card__buy{margin-top:var(--spacer-1)}.product-card:hover{box-shadow:var(--box-shadow-sm)}.product-card:hover .product-card__offer-stamp{border-top-right-radius:0;border-bottom-right-radius:0}.product-card:hover .product-card__picture.loaded{position:inherit;opacity:1}.product-card:hover .product-card__picture.loaded+.picture{position:absolute;opacity:0;z-index:-1}.product-card:hover .product-card__buy{opacity:1}.product-card--inactive,.product-card--inactive img{opacity:.7}.product-card--small .product-card__pictures{height:90px}@media (min-width:576px){.product-card--small .product-card__pictures{height:100px}}@media (min-width:992px){.product-card--small .product-card__pictures{height:125px}}.product-card--small .product-card__picture img{max-height:90px}@media (min-width:576px){.product-card--small .product-card__picture img{max-height:100px}}@media (min-width:992px){.product-card--small .product-card__picture img{max-height:125px}}.product-card--small .product-card__name{padding-top:var(--spacer-2);height:auto;white-space:nowrap;text-overflow:ellipsis}.product-card--small .product-card__buy{position:absolute;bottom:var(--spacer-3);right:var(--spacer-3)}",""]),t.exports=e},function(t,e,s){"use strict";var i=s(7);s.n(i).a},function(t,e,s){(e=s(1)(!1)).push([t.i,'.search-engine{position:relative}.search-engine__nav{padding:var(--spacer-2);margin-bottom:var(--spacer-3);background:var(--light);color:var(--gray)}.search-engine__nav>div{display:flex;align-items:center;justify-content:space-between}.search-engine__toggles{display:flex}.search-engine__toggles button{margin-left:var(--spacer-1);color:var(--secondary)}.search-engine__count{position:relative}.search-engine__spinner{position:absolute;top:50%;right:-3rem;width:1.75rem;height:1.75rem;margin-top:-.875rem;color:var(--secondary)}.search-engine__aside{position:fixed;width:280px;max-width:100%;height:100%;top:0;right:0;z-index:1100;border-radius:0}.search-engine__aside .card-body{overflow-y:auto}.search-engine__aside-open{position:fixed;right:0;bottom:50vh;text-align:right;z-index:890;border-top-right-radius:0;border-bottom-right-radius:0}.search-engine__aside-open .spinner-border{margin-bottom:3px}.search-engine__aside-open .fa-search{opacity:.6}.search-engine__filter:not(:first-child){margin-top:var(--spacer-2)}.search-engine__filter:last-child{margin-bottom:var(--spacer-4)}.search-engine__filter button{padding-left:0;color:var(--secondary);font-size:var(--font-size-lg);font-weight:var(--font-light)}.search-engine__filter button i,.search-engine__filter button svg{font-size:var(--font-size);margin-right:var(--spacer-1);color:var(--gray);opacity:.5;transition:opacity .25s}.search-engine__filter button .fa-chevron-up,.search-engine__filter button[aria-expanded=true] .fa-chevron-down{display:none}.search-engine__filter button[aria-expanded=true] .fa-chevron-up{display:inherit}.search-engine__filter button:hover i,.search-engine__filter button:hover svg{opacity:1}.search-engine__filter button:focus{box-shadow:none}.search-engine__option{color:var(--primary-light)}.search-engine__option small{color:var(--gray)}.search-engine__selected{margin-left:var(--spacer-2);margin-bottom:var(--spacer-2)}.search-engine__selected>small{color:var(--gray)}.search-engine__selected>small:before{content:" / "}.search-engine__info{padding-bottom:var(--spacer-3)}.search-engine__terms>span{font-weight:var(--font-light)}.search-engine__terms>span:not(:last-of-type){color:var(--text-muted)}.search-engine__retail{padding:var(--spacer-2) 0}.search-engine__item{margin-bottom:var(--spacer-3)}',""]),t.exports=e},function(t,e,s){"use strict";var i=s(8);s.n(i).a},function(t,e,s){(e=s(1)(!1)).push([t.i,".search__box{z-index:1090;position:fixed;top:0;left:0;width:100vw;max-height:100vh;border-radius:0}@media (min-width:576px){.search__box{width:90vw;margin-left:5vw;max-height:90vh;margin-top:5vh;border-radius:var(--border-radius)}}@media (min-width:992px){.search__box{width:80vw;margin-left:10vw}}.search__header{position:relative;display:flex;align-items:center}.search__status .close{transition:opacity .2s}.search__status .close:not(:only-child){opacity:0}.search__spinner{position:absolute;height:2rem;width:2rem;top:50%;margin-top:-1rem;right:1rem}.search__input-group{position:relative;width:100%;padding-right:var(--spacer-3)}.search__input{padding-right:var(--spacer-5)}.search__submit{border:none;background:none;position:absolute;top:50%;margin-top:-1.25rem;right:var(--spacer-4);font-size:1.5rem;line-height:1;padding:.5rem;color:var(--secondary-lighter);transition:color .15s}.search__submit svg{vertical-align:top}.search__submit:hover{color:var(--primary-light)}.search__body{overflow-y:auto;overflow-x:hidden;min-height:7rem;padding-left:0;padding-right:0}@media (min-width:576px){.search__body{padding-left:var(--spacer-2);padding-right:var(--spacer-2)}}@media (min-width:992px){.search__body{min-height:10rem}}.search__loading{display:block;height:3rem;width:3rem;margin:var(--spacer-5)}.search__footer{display:flex;align-items:center;justify-content:space-between}.search__count{color:var(--text-muted);line-height:var(--line-height-lg);min-width:250px}.search__history{overflow-x:auto;white-space:nowrap;font-weight:var(--font-light);font-size:var(--font-size-lg);color:var(--text-muted)}.search__history-link{margin-left:var(--spacer-2)}",""]),t.exports=e},function(t,e,s){"use strict";s.r(e);var i=s(12),r=s.n(i);const a={en_us:"As of",pt_br:"A partir de"},n={en_us:"Buy",pt_br:"Comprar"},o={en_us:"Brands",pt_br:"Marcas"},c={en_us:"Categories",pt_br:"Categorias"},l={en_us:"Clear filters",pt_br:"Limpar filtros"},d={en_us:"Close",pt_br:"Fechar"},u={en_us:"Close filters",pt_br:"Fechar filtros"},h={en_us:"Connection error, click product to try again",pt_br:"Erro de conexão, clique no produto para tentar novamente"},p={en_us:"Did you mean",pt_br:"Você quis dizer"},m={en_us:"Filter",pt_br:"Filtro"},_={en_us:"Filter results",pt_br:"Filtrar resultados"},f={en_us:"From",pt_br:"De"},g={en_us:"Highest price",pt_br:"Maior preço"},b={en_us:"Interest free",pt_br:"Sem juros"},v={en_us:"Items",pt_br:"Itens"},y={en_us:"Items found",pt_br:"Itens encontrados"},x={en_us:"Lowest price",pt_br:"Menor preço"},S={en_us:"No results for",pt_br:"Nenhum produto encontrado para"},w={en_us:"Of",pt_br:"De"},C={en_us:"Out of stock",pt_br:"Sem estoque"},O={en_us:"Popular products",pt_br:"Produtos populares"},k={en_us:"Refine search",pt_br:"Refinar busca"},I={en_us:"Relevance",pt_br:"Relevância"},j={en_us:"Results",pt_br:"Resultados"},F={en_us:"Sales",pt_br:"Vendas"},T={en_us:"Search",pt_br:"Buscar"},R={en_us:"Search again",pt_br:"Buscar novamente"},z={en_us:"Searching for",pt_br:"Buscando por"},B={en_us:"Couldn't perform search, please check your internet connection.",pt_br:"Não foi possível realizar a busca, por favor verique sua conexão."},$={en_us:"Search products",pt_br:"Buscar produtos"},P={en_us:"See all",pt_br:"Ver todos"},L={en_us:"Sort",pt_br:"Ordenar"},N={en_us:"To",pt_br:"Por"},M={en_us:"Unavailable",pt_br:"Indisponível"},A={en_us:"Up to",pt_br:"Até"};var E=s(0),V={name:"ABackdrop",props:{isVisible:{type:Boolean,default:!0},zIndexOnShow:{type:Number,default:1080},transitionMs:{type:Number,default:150}},data:()=>({opacity:0,zIndex:null,top:null}),computed:{style(){const{top:t,zIndex:e,transitionMs:s,opacity:i}=this;return{top:t,transition:`opacity ${s}ms linear`,opacity:i,zIndex:e}}},methods:{hide(){this.$emit("update:is-visible",!1),this.$emit("hide")},lockBodyScroll(){document.body.style.maxWidth=`${document.body.offsetWidth}px`,document.body.style.overflow="hidden"}},watch:{isVisible(t){t?(this.opacity=null,this.lockBodyScroll()):(this.opacity=0,document.body.style.overflow=document.body.style.maxWidth=null)},opacity(t){0===t?setTimeout(()=>{this.top=this.zIndex=null},this.transitionMs):(this.zIndex=this.zIndexOnShow,this.top=0)}},mounted(){this.isVisible&&(setTimeout(()=>{this.opacity=null},this.transitionMs),this.lockBodyScroll())}};s(15);function D(t,e,s,i,r,a,n,o){var c,l="function"==typeof t?t.options:t;if(e&&(l.render=e,l.staticRenderFns=s,l._compiled=!0),i&&(l.functional=!0),a&&(l._scopeId="data-v-"+a),n?(c=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),r&&r.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(n)},l._ssrRegister=c):r&&(c=o?function(){r.call(this,(l.functional?this.parent:this).$root.$options.shadowRoot)}:r),c)if(l.functional){l._injectStyles=c;var d=l.render;l.render=function(t,e){return c.call(e),d(t,e)}}else{var u=l.beforeCreate;l.beforeCreate=u?[].concat(u,c):[c]}return{exports:t,options:l}}var H=D(V,(function(){var t=this.$createElement;return(this._self._c||t)("div",{staticClass:"backdrop",style:this.style,on:{click:this.hide}})}),[],!1,null,null,null).exports,U=s(9),q=s.n(U),W=s(11),G=s.n(W),J=s(13),X=s(14),Y=s.n(X),K=D({name:"ALink",props:{href:String,to:[String,Object]},computed:{isRouter(){return!!this.$router&&(!this.href||Boolean(this.$router.options.routes.find(({path:t})=>t===this.href)))}}},(function(){var t=this.$createElement;return(this._self._c||t)(this.isRouter?"router-link":"a",{tag:"component",attrs:{href:this.isRouter?null:this.href,to:this.isRouter?this.to||this.href:null}},[this._t("default")],2)}),[],!1,null,null,null).exports;var Q={name:"APicture",props:{src:[String,Object],fallbackSrc:String,alt:String,canCalcHeight:{type:Boolean,default:!0},placeholder:{type:String,default:"/assets/img-placeholder.png"},containerBreakpoints:{type:Object,default:()=>({zoom:null,big:800,[E.$ecomConfig.get("default_img_size")||"normal"]:400})},lozadOptions:{type:Object,default:()=>({rootMargin:"350px 0px",threshold:0})}},data:()=>({sources:[],height:null,opacity:null}),computed:{defaultImgObj(){return"object"==typeof this.src&&this.src?Object(E.img)(this.src)||this.src:{}},localFallbackSrc(){const{src:t,defaultImgObj:e,fallbackSrc:s}=this;if(s)return s;const i="object"==typeof t?t.zoom?t.zoom.url:e.url:t;return i?i.replace(/\.webp$/,""):this.placeholder},localAlt(){const{alt:t,src:e,defaultImgObj:s}=this;return t||(e?s.alt||"Product":"No image")}},methods:{updateSources(){const t=[];let e;if("object"==typeof this.src){const{clientWidth:t,clientHeight:s}=this.$el,i=((t,e,s,i)=>{let r,a;for(const n in i){const o=i[n];if(void 0!==o&&t[n]){if(void 0!==a)if(null===o){if(a>=e)continue}else if(o<e||o-50<=s||null!==a&&o>a)continue;r=n,a=o}}return r})(this.src,t,s,this.containerBreakpoints),r=this.src[i],{url:a,size:n}=r||this.defaultImgObj;if(e=a,t&&n&&this.canCalcHeight){const[e,s]=n.split("x").map(t=>parseInt(t,10));s&&(this.height=`${t>=e?s:t*s/e}px`)}}else e=this.src;e&&(e.endsWith(".webp")?t.push({srcset:e,type:"image/webp"},{srcset:e.replace(/\.webp$/,""),type:`image/${"png"===e.substr(-9,4)?"png":"jpeg"}`}):t.push({srcset:e})),this.sources=t}},mounted(){this.updateSources(),this.$nextTick(()=>{const t=this.$el;q()(t,{...this.lozadOptions,loaded:t=>{const{localFallbackSrc:e}=this,s="IMG"===t.tagName?t:t.lastChild;s.style.opacity=0,s.onerror=function(){console.error(new Error("Image load error"),this),t.style.display="none";const s=document.createElement("IMG");s.src=e,t.parentNode.insertBefore(s,t.nextSibling)},s.onload=()=>{this.opacity=0,t.classList.add("loaded"),this.$nextTick(()=>{this.opacity=s.style.opacity=null,this.$emit("load")})}}}).observe()})}},Z=(s(17),D(Q,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("picture",{staticClass:"picture",style:{height:t.height,opacity:t.opacity},attrs:{"data-iesrc":t.localFallbackSrc,"data-alt":t.localAlt}},[t.sources.length?t._l(t.sources,(function(t,e){var i=t.srcset,r=t.type;return s("source",{key:e,attrs:{srcset:i,type:r}})})):s("source",{attrs:{srcset:t.localFallbackSrc}})],2)}),[],!1,null,null,null).exports);const tt=(t,e)=>{const{type:s,value:i}=e;if(i)return"percentage"===s?t*(100-i)/100:t-i};var et={name:"APrices",props:{product:{type:Object,required:!0},isLiteral:Boolean,isBig:Boolean,installmentsOption:Object,discountOption:Object,discountText:{type:[String,Boolean],default:""}},data(){return{installmentsNumber:0,monthlyInterest:0,discount:{type:null,value:0},extraDiscount:{type:null,value:0},discountLabel:this.discountText}},computed:{i19asOf:()=>Object(E.i18n)(a),i19from:()=>Object(E.i18n)(f),i19interestFree:()=>Object(E.i18n)(b),i19of:()=>Object(E.i18n)(w),i19to:()=>Object(E.i18n)(N),i19upTo:()=>Object(E.i18n)(A),price(){const t=Object(E.price)(this.product);return this.extraDiscount.value?tt(t,this.extraDiscount):t},comparePrice(){return Object(E.onPromotion)(this.product)?this.product.base_price:this.extraDiscount.value?Object(E.price)(this.product):void 0},priceWithDiscount(){return tt(this.price,this.discount)},installmentValue(){if(this.installmentsNumber>=2){if(this.monthlyInterest){const t=this.monthlyInterest/100;return this.price*t/(1-Math.pow(1+t,-this.installmentsNumber))}return this.price/this.installmentsNumber}return 0}},methods:{formatMoney:E.formatMoney,updateInstallments(t){if(t){this.monthlyInterest=t.monthly_interest;const e=t.min_installment||5,s=parseInt(this.price/e,10);this.installmentsNumber=Math.min(s,t.max_number)}},updateDiscount(t){t&&(!t.min_amount||t.min_amount<=this.price)&&(this.discount=t,!this.discountText&&!1!==this.discountText&&t.label&&(this.discountLabel=`via ${t.label}`))}},watch:{price:{handler(t){this.$emit("fix-price",t)},immediate:!0}},created(){const t="object"==typeof window&&window.storefront;if(this.discountOption)this.updateDiscount(this.discountOption);else if(t){const e=()=>{const e=t.info&&t.info.apply_discount;if(e){const t=e.available_extra_discount;return t&&(this.extraDiscount=t),Object.keys(e).length>0}return!1};e()||t.on("info:apply_discount",e)}if(this.installmentsOption)this.updateInstallments(this.installmentsOption);else if(t){const e=()=>{const e=t.info&&t.info.list_payments;return!!e&&(this.updateInstallments(e.installments_option),this.updateDiscount(e.discount_option),Object.keys(e).length>0)};e()||t.on("info:list_payments",e)}}},st=(s(19),{name:"ProductCard",components:{ALink:K,APicture:Z,APrices:D(et,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"prices",class:{"prices--literal":t.isLiteral,"prices--big":t.isBig}},[t.comparePrice?s("span",{staticClass:"prices__compare"},[t.isLiteral?[s("small",[t._v(t._s(t.i19from))]),s("s",[t._v(t._s(t.formatMoney(t.comparePrice)))]),s("small",[t._v(t._s(t.i19to))])]:s("s",[t._v(t._s(t.formatMoney(t.comparePrice)))])],2):t._e(),s("strong",{staticClass:"prices__value"},[t._v(" "+t._s(t.formatMoney(t.price))+" ")]),s("transition-group",{attrs:{"enter-active-class":"animated slideInDown"}},[t.installmentsNumber>1?s("div",{key:"installments",staticClass:"prices__installments"},[t.isLiteral?s("small",[t._v(" "+t._s(t.i19upTo)+" ")]):t._e(),t._v(" "+t._s(t.installmentsNumber)+"x "),t.isLiteral?s("small",[t._v(" "+t._s(t.i19of)+" ")]):t._e(),s("span",[t._v(" "+t._s(t.formatMoney(t.installmentValue))+" ")]),!t.monthlyInterest&&t.isLiteral?s("small",[t._v(" "+t._s(t.i19interestFree)+" ")]):t._e()]):t._e(),"number"==typeof t.priceWithDiscount&&t.priceWithDiscount<t.price?s("div",{key:"discount",staticClass:"prices__discount"},["string"==typeof t.discountLabel&&t.discountLabel?[s("span",[t._v(" "+t._s(t.formatMoney(t.priceWithDiscount))+" ")]),s("small",[t._v(" "+t._s(t.discountLabel)+" ")])]:[s("small",[t._v(" "+t._s(t.i19asOf)+" ")]),s("span",[t._v(" "+t._s(t.formatMoney(t.priceWithDiscount))+" ")])]],2):t._e()])],1)}),[],!1,null,null,null).exports},props:{product:Object,productId:String,isSmall:Boolean,headingTag:{type:String,default:"h3"},buyText:String,canAddToCart:{type:Boolean,default:!0},isLoaded:Boolean},data:()=>({body:{},isLoading:!1,isHovered:!1,error:""}),computed:{i19outOfStock:()=>Object(E.i18n)(C),i19unavailable:()=>Object(E.i18n)(M),buyHtml:()=>"object"==typeof window&&window.productCardBuyHtml,footerHtml:()=>"object"==typeof window&&window.productCardFooterHtml,name(){return Object(E.name)(this.body)},strBuy(){return this.buyText||"object"==typeof window&&window.productCardBuyText||Object(E.i18n)(n)},isInStock(){return Object(E.inStock)(this.body)},isActive(){return this.body.available&&this.body.visible&&this.isInStock},discount(){const{body:t}=this;return Object(E.onPromotion)(t)?Math.round(100*(t.base_price-Object(E.price)(t))/t.base_price):0}},methods:{setBody(t){this.body=Object.assign({},t),delete this.body.body_html,delete this.body.body_text},fetchItem(){if(this.productId){this.isLoading=!0;const{storeId:t,productId:e}=this;Object(J.store)({url:`/products/${e}.json`,storeId:t}).then(({data:t})=>{this.$emit("update:product",t),this.setBody(t),this.$emit("update:is-loaded",!0)}).catch(t=>{console.error(t),this.body.name&&this.body.slug&&this.body.pictures||(this.error=Object(E.i18n)(h))}).finally(()=>{this.isLoading=!1})}},buy(){const t=this.body;if(this.$emit("buy",{product:t}),this.canAddToCart){const{variations:e,slug:s}=t;e&&e.length?window.location=`/${s}`:Y.a.addProduct(t)}}},created(){this.product&&(this.setBody(this.product),void 0===this.product.available&&(this.body.available=!0),void 0===this.product.visible&&(this.body.visible=!0)),this.isLoaded||this.fetchItem()}}),it=(s(21),D(st,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"product-card",class:{"product-card--inactive":t.body._id&&!t.isActive,"product-card--small":t.isSmall},on:{mouseover:function(e){t.isHovered=!0}}},[s("transition",{attrs:{"enter-active-class":"animated fadeIn"}},[t.isLoading?t._e():s("section",[t._t("discount-tag",[t.isActive&&t.discount>0?s("span",{staticClass:"product-card__offer-stamp"},[s("i",{staticClass:"fas fa-arrow-down"}),t._v(" "),s("b",[t._v(t._s(t.discount))]),t._v("% ")]):t._e()],null,{discount:t.discount}),t._t("body",[s("a-link",{staticClass:"product-card__link",attrs:{href:"/"+t.body.slug,title:t.name}},[t._t("header"),s("div",{staticClass:"product-card__pictures"},[t.body.pictures&&t.body.pictures.length?t._l(t.body.pictures.slice(0,2).reverse(),(function(e,i){return 1===t.body.pictures.length||1===i||t.isHovered?s("a-picture",{key:i,staticClass:"product-card__picture",attrs:{src:e,"can-calc-height":!1}}):t._e()})):s("a-picture",{staticClass:"product-card__picture"})],2),t._t("title",[s(t.headingTag,{tag:"component",staticClass:"product-card__name"},[t._v(" "+t._s(t.name)+" ")])])],2)]),t._t("rating",[t._m(0)]),t.body.available&&t.body.visible?t.isInStock?[t._t("prices",[s("a-prices",{staticClass:"product-card__prices",attrs:{product:t.body}})]),s("div",{staticClass:"product-card__buy fade",on:{click:t.buy}},[t._t("buy",[t.buyHtml?s("div",{domProps:{innerHTML:t._s(t.buyHtml)}}):t._e(),s("button",{staticClass:"btn btn-primary",class:t.isSmall?"btn-sm":"btn-block",attrs:{type:"button"}},[t._t("buy-button-content",[s("i",{staticClass:"fas fa-shopping-bag mr-1"}),t._v(" "+t._s(t.strBuy)+" ")])],2)])],2)]:t._t("out-of-stock",[s("p",{staticClass:"badge badge-dark"},[t._v(" "+t._s(t.i19outOfStock)+" ")])]):t._t("unavailable",[s("p",{staticClass:"badge badge-warning"},[t._v(" "+t._s(t.i19unavailable)+" ")])]),t._t("footer",[t.footerHtml?s("div",{domProps:{innerHTML:t._s(t.footerHtml)}}):t._e()])],2)]),t.isLoading?[t._t("default"),t.error?s("div",{staticClass:"alert alert-warning small",attrs:{role:"alert"}},[t._v(" "+t._s(t.error)+" ")]):t._e()]:t._e()],2)}),[function(){var t=this.$createElement;return(this._self._c||t)("div",{staticClass:"product-card__rating",attrs:{"data-sku":this.body.sku}})}],!1,null,null,null).exports);const rt=({ecomSearch:t,term:e,page:s,defaultSort:i})=>{t.reset(),i&&t.setSortOrder(i),e&&t.setSearchTerm(e),s&&t.setPageNumber(s)};var at={name:"SearchEngine",components:{ABackdrop:H,ProductCard:it},props:{term:String,page:{type:Number,default:1},pageSize:{type:Number,default:24},brands:Array,categories:Array,isFixedBrands:Boolean,isFixedCategories:Boolean,defaultSort:String,autoFixScore:{type:Number,default:.6},isFilterable:{type:Boolean,default:!0},hasPopularItems:{type:Boolean,default:!0},canLoadMore:{type:Boolean,default:!0},canRetry:{type:Boolean,default:!0},productCardProps:Object,gridsData:{type:Array,default(){if("object"==typeof window&&window.storefront&&window.storefront.data)return window.storefront.data.grids}}},data:()=>({suggestedTerm:"",resultItems:[],totalSearchResults:0,hasSearched:!1,noResultsTerm:"",keepNoResultsTerm:!1,filters:[],lastSelectedFilter:null,selectedOptions:{},selectedSortOption:null,countOpenRequests:0,lastRequestId:null,isScheduled:!1,isLoadingMore:!1,hasNetworkError:!1,popularItems:[],hasSetPopularItems:!1,isAsideVisible:!1,searchFilterId:0}),computed:{i19clearFilters:()=>Object(E.i18n)(l),i19closeFilters:()=>Object(E.i18n)(u),i19didYouMean:()=>Object(E.i18n)(p),i19filter:()=>Object(E.i18n)(m),i19filterResults:()=>Object(E.i18n)(_),i19itemsFound:()=>Object(E.i18n)(y),i19noResultsFor:()=>Object(E.i18n)(S),i19popularProducts:()=>Object(E.i18n)(O),i19relevance:()=>Object(E.i18n)(I),i19refineSearch:()=>Object(E.i18n)(k),i19results:()=>Object(E.i18n)(j),i19searchAgain:()=>Object(E.i18n)(R),i19searchingFor:()=>Object(E.i18n)(z),i19searchOfflineErrorMsg:()=>Object(E.i18n)(B),i19sort:()=>Object(E.i18n)(L),ecomSearch:()=>new G.a,isSearching(){return this.countOpenRequests>0},hasEmptyResult(){return this.hasSearched&&!this.resultItems.length},sortOptions:()=>[{value:null,label:Object(E.i18n)(I)},{value:"sales",label:Object(E.i18n)(F)},{value:"lowest_price",label:Object(E.i18n)(x)},{value:"highest_price",label:Object(E.i18n)(g)}],hasSelectedOptions(){for(const t in this.selectedOptions)if(this.selectedOptions[t]&&this.selectedOptions[t].length)return!0;return!1},isNavVisible(){return this.hasSearched&&this.isFilterable&&(this.isSearching||this.totalSearchResults>8||this.hasSelectedOptions)},isResultsVisible(){return this.hasSearched&&!this.isSearching||this.suggestedItems.length},hasFilters(){return this.hasSelectedOptions||this.filters.find(({options:t})=>t.length)},suggestedItems(){return this.resultItems.length?this.resultItems:this.popularItems},loadObserver(){return this.canLoadMore&&q()("#search-engine-load-more",{load:()=>{this.isLoadingMore=!0,this.fetchItems()}})}},methods:{fetchItems(t,e){const s=e?new G.a:this.ecomSearch,i=Date.now();this.countOpenRequests++,this.lastRequestId=i,this.isLoadingMore&&s.setPageNumber(this.page+Math.ceil(this.resultItems.length/this.pageSize));const r=s.setPageSize(this.pageSize).fetch().then(()=>{this.lastRequestId===i&&(this.hasNetworkError=!1,e||this.handleSearchResult()),!e&&(this.term||this.brands||this.categories)||(this.hasSetPopularItems=!0,this.popularItems=s.getItems())}).catch(s=>{console.error(s),(this.lastRequestId===i||e)&&(!this.canRetry||t||s.response&&400===s.response.status?this.hasNetworkError=!0:this.fetchItems(!0,e))}).finally(()=>{this.countOpenRequests--,this.isLoadingMore=!1});this.$emit("fetch",{ecomSearch:s,fetching:r})},updateFilters(){const t=[],e=(e,s,i)=>{let r=this.filters.findIndex(t=>t.filter===e);if(e!==this.lastSelectedFilter){if(-1===r&&(r=this.filters.length),this[`isFixed${e}`]){const t=this[e.toLowerCase()];t&&(s=s.filter(({key:e})=>-1===t.indexOf(e)))}this.filters[r]={filter:e,options:s,isSpec:i};const t=this.selectedOptions[e]?this.selectedOptions[e].filter(t=>s.find(({key:e})=>e===t)):[];this.$set(this.selectedOptions,e,t)}t.push(r)};e("Brands",this.ecomSearch.getBrands()),e("Categories",this.ecomSearch.getCategories()),this.ecomSearch.getSpecs().forEach(({key:t,options:s},i)=>{e(t,s,!0)}),this.filters=this.filters.filter((e,s)=>t.includes(s)),this.searchFilterId=Date.now()},handleSuggestions(){const{ecomSearch:t,term:e}=this;let s=e,i=!1;this.suggestedTerm="",t.getTermSuggestions().forEach(({options:t,text:r})=>{if(t.length){const a=t[0];!this.totalSearchResults&&this.autoFixScore>0&&a.score>=this.autoFixScore&&-1===a.text.indexOf(e)&&(i=!0),s=s.replace(r,a.text)}}),this.keepNoResultsTerm?this.keepNoResultsTerm=!1:this.noResultsTerm="",s!==e&&(i?(this.noResultsTerm=e,this.keepNoResultsTerm=!0,this.$emit("update:term",s)):this.suggestedTerm=s,t.history.shift())},handleSearchResult(){const{ecomSearch:t}=this;this.totalSearchResults=t.getTotalCount(),this.resultItems=this.isLoadingMore?this.resultItems.concat(t.getItems()):t.getItems(),this.updateFilters(),this.handleSuggestions(),this.totalSearchResults||!this.hasPopularItems||this.hasSetPopularItems||this.fetchItems(!1,!0),this.$emit(this.isLoadingMore?"load-more":"search",{ecomSearch:t}),this.hasSearched||this.$nextTick(()=>{setTimeout(()=>{this.hasSearched=!0},100)})},scheduleFetch(){this.isScheduled||(this.isScheduled=!0,this.$nextTick(()=>{setTimeout(()=>{this.fetchItems(),this.isScheduled=!1},30)}))},resetAndFetch(){rt(this),this.handlePresetedOptions(),this.scheduleFetch()},toggleFilters(t){this.isAsideVisible="boolean"==typeof t?t:!this.isAsideVisible},getFilterLabel(t){switch(t){case"Brands":return Object(E.i18n)(o);case"Categories":return Object(E.i18n)(c);default:if(this.gridsData){const e=this.gridsData.find(e=>e.grid_id===t);if(e)return e.title||e.grid_id}}return t},handlePresetedOptions(){["brands","categories"].forEach(t=>{if(this[t]&&this[t].length){const e=t.charAt(0).toUpperCase()+t.slice(1);this[`isFixed${e}`]||(this.selectedOptions[e]=this[t]),this.updateSearchFilter(e)}})},updateSearchFilter(t){const{ecomSearch:e}=this;let s=this.selectedOptions[t];switch(void 0!==s&&s.length||(s=null),t){case"Brands":this.isFixedBrands&&this.brands&&(s=s?s.concat(this.brands):this.brands),e.setBrandNames(s);break;case"Categories":e.setCategoryNames(s),this.isFixedCategories&&this.categories&&e.mergeFilter({terms:{"categories.name":this.categories}});break;default:e.setSpec(t,s)}},setFilterOption(t,e,s){const{selectedOptions:i}=this,r=i[t];if(s)this.lastSelectedFilter=t,r.push(e);else{const s=r.indexOf(e);s>-1&&r.splice(s,1),r.length||this.lastSelectedFilter!==t||(this.lastSelectedFilter=null)}this.updateSearchFilter(t),this.scheduleFetch()},clearFilters(){const{selectedOptions:t}=this;for(const e in t)t[e]&&(t[e]=[],this.updateSearchFilter(e));this.fetchItems()},setSortOrder(t){this.selectedSortOption=t,this.ecomSearch.setSortOrder(t),this.scheduleFetch()}},watch:{term(){this.resetAndFetch()},brands(){this.resetAndFetch()},categories(){this.resetAndFetch()},page(t){this.ecomSearch.setPageNumber(t),this.scheduleFetch()},isSearching(t){!t&&this.loadObserver&&this.$nextTick(()=>{this.loadObserver.observe()})}},created(){rt(this),this.handlePresetedOptions(),this.fetchItems()}},nt=(s(23),{name:"InstantSearch",components:{ABackdrop:H,SearchEngine:D(at,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("section",{staticClass:"search-engine"},[s("a-backdrop",{attrs:{"is-visible":t.isAsideVisible},on:{"update:isVisible":function(e){t.isAsideVisible=e},"update:is-visible":function(e){t.isAsideVisible=e}}}),s("transition",{attrs:{"enter-active-class":"animated slideInRight","leave-active-class":"animated slideOutRight"}},[s("aside",{directives:[{name:"show",rawName:"v-show",value:t.isAsideVisible,expression:"isAsideVisible"}],staticClass:"search-engine__aside card shadow"},[t._t("filters",[s("header",{staticClass:"card-header"},[t._v(" "+t._s(t.i19refineSearch)+" "),s("button",{staticClass:"close",attrs:{type:"button","aria-label":t.i19closeFilters},on:{click:t.toggleFilters}},[s("span",{attrs:{"aria-hidden":"true"}},[t._v("×")])])]),s("div",{key:t.searchFilterId,staticClass:"card-body"},t._l(t.filters,(function(e,i){var r=e.filter,a=e.options,n=e.isSpec;return a.length?s("div",{key:"filters-"+r,staticClass:"search-engine__filter",class:"search-engine__filter--"+r},[t._o([s("button",{staticClass:"btn",attrs:{type:"button","data-toggle":"collapse","data-target":"#collapse-"+r,"aria-expanded":i<5?"true":"false","aria-controls":"collapse-"+r}},[s("i",{staticClass:"fas fa-chevron-down"}),s("i",{staticClass:"fas fa-chevron-up"}),t._v(" "+t._s(t.getFilterLabel(r))+" ")]),s("div",{staticClass:"collapse",class:i<5?"show":null,attrs:{id:"collapse-"+r}},t._l(a,(function(e,i){return s("div",{key:r+"-"+i,staticClass:"search-engine__option custom-control custom-checkbox"},[s("input",{staticClass:"custom-control-input",attrs:{type:"checkbox",id:r+"-"+i},domProps:{checked:t.selectedOptions[r].indexOf(e.key)>-1},on:{change:function(s){return t.setFilterOption(r,e.key,s.target.checked)}}}),s("label",{staticClass:"custom-control-label",attrs:{for:r+"-"+i}},[t._v(" "+t._s(e.key)+" "),n?t._e():s("small",[t._v(" ("+t._s(e.doc_count)+") ")])])])})),0)],0,"filters-"+r)],2):t._e()})),0),s("footer",{staticClass:"card-footer"},[s("button",{staticClass:"btn btn-sm btn-block btn-outline-secondary",attrs:{type:"button"},on:{click:t.clearFilters}},[s("span",{staticClass:"mr-1"},[s("i",{staticClass:"fas fa-trash-alt"})]),t._v(" "+t._s(t.i19clearFilters)+" ")])])])],2)]),s("transition",{attrs:{"enter-active-class":"animated fadeInRight slower","leave-active-class":"animated fadeOutRight"}},[t.isNavVisible&&t.hasFilters?s("button",{staticClass:"search-engine__aside-open btn btn-secondary",attrs:{type:"button","aria-label":t.i19filterResults,disabled:t.isSearching},on:{click:function(e){return t.toggleFilters(!0)}}},[t.isSearching?s("span",{staticClass:"spinner-border spinner-border-sm",attrs:{role:"status"}},[s("span",{staticClass:"sr-only"},[t._v("Loading...")])]):s("span",[s("span",{staticClass:"d-none d-md-inline"},[s("i",{staticClass:"fas fa-search"})]),s("i",{staticClass:"fas fa-filter"})])]):t._e()]),s("transition",{attrs:{"enter-active-class":"animated fadeInDown","leave-active-class":"animated fadeOutUp fast position-absolute"}},[t.isNavVisible?s("div",{staticClass:"search-engine__nav"},[s("div",{staticClass:"container"},[t._t("nav",[s("div",{staticClass:"search-engine__count"},[s("strong",[t._v(t._s(t.totalSearchResults))]),t._v(" "+t._s(t.i19itemsFound)+" "),t.isSearching?s("div",{staticClass:"search-engine__spinner spinner-grow",attrs:{role:"status"}},[s("span",{staticClass:"sr-only"},[t._v("Loading...")])]):t._e()]),t.isFilterable?s("div",{staticClass:"search-engine__toggles"},[t.hasFilters?s("button",{staticClass:"btn btn-light",attrs:{type:"button"},on:{click:function(e){return t.toggleFilters(!0)}}},[s("i",{staticClass:"fas fa-filter mr-1"}),s("span",{staticClass:"d-none d-md-inline"},[t._v(" "+t._s(t.i19filterResults)+" ")]),s("span",{staticClass:"d-md-none"},[t._v(" "+t._s(t.i19filter)+" ")])]):t._e(),s("div",{staticClass:"dropdown"},[s("button",{staticClass:"btn btn-light",attrs:{type:"button",id:"search-engine-sort","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"}},[s("i",{staticClass:"fas fa-sort mr-1"}),t._v(" "+t._s(t.i19sort)+" ")]),s("div",{staticClass:"dropdown-menu dropdown-menu-right",attrs:{"aria-labelledby":"search-engine-sort"}},t._l(t.sortOptions,(function(e,i){var r=e.value,a=e.label;return s("a",{key:"sort-"+i,staticClass:"dropdown-item",attrs:{href:"#",active:t.selectedSortOption===r},on:{click:function(e){return e.preventDefault(),t.setSortOrder(r)}}},[t._v(" "+t._s(a)+" ")])})),0)])]):t._e()],null,{totalSearchResults:t.totalSearchResults,toggleFilters:t.toggleFilters})],2)]):t._e()]),s("transition",{attrs:{"enter-active-class":"animated fadeIn slower"}},[t.isResultsVisible?s("div",{staticClass:"search-engine__results fade",style:{opacity:t.isSearching&&!t.isLoadingMore?.4:1}},[s("div",{staticClass:"container"},[s("div",{staticClass:"search-engine__info px-lg-4"},[t.term?[t.hasEmptyResult?s("div",{staticClass:"search-engine__no-results"},[s("div",{staticClass:"lead mb-2"},[t.suggestedTerm?s("span",[t._v(" "+t._s(t.i19didYouMean)+" "),s("a",{attrs:{href:"#"},domProps:{textContent:t._s(t.suggestedTerm)},on:{click:function(e){return e.preventDefault(),t.$emit("update:term",t.suggestedTerm)}}}),t._v(" ? ")]):t._e(),t._v(" "+t._s(t.i19noResultsFor)+" "),s("em",[t._v(t._s(t.term))])]),t.popularItems.length?s("h4",[t._v(" "+t._s(t.i19popularProducts)+" ")]):t._e()]):s("div",{staticClass:"search-engine__terms"},[t.noResultsTerm?s("span",{staticClass:"d-none d-lg-inline"},[t._v(" "+t._s(t.i19noResultsFor)+" "),s("s",[t._v(t._s(t.noResultsTerm))]),t._v(". ")]):t._e(),s("span",{staticClass:"d-none d-md-inline"},[t._v(" "+t._s(t.i19searchingFor)+": ")]),s("h1",[t._v(t._s(t.term))])])]:t.popularItems.length?s("h3",[t._v(" "+t._s(t.i19popularProducts)+" ")]):t._e(),s("transition",{attrs:{"enter-active-class":"animated fadeInDown","leave-active-class":"animated fadeOutUp"}},[t.hasSelectedOptions&&t.isFilterable?s("div",[s("button",{staticClass:"btn btn-sm btn-outline-secondary",attrs:{type:"button"},on:{click:t.clearFilters}},[s("i",{staticClass:"fas fa-trash-alt mr-1"}),t._v(" "+t._s(t.i19clearFilters)+" ")]),t._l(t.selectedOptions,(function(e,i){return t._l(e,(function(e){return s("button",{staticClass:"search-engine__selected btn btn-sm btn-light",attrs:{type:"button"},on:{click:function(s){return t.setFilterOption(i,e,!1)}}},[s("i",{staticClass:"fas fa-times mr-1"}),t._v(" "+t._s(e)+" "),s("small",[t._v(t._s(t.getFilterLabel(i)))])])}))}))],2):t._e()])],2),s("article",{staticClass:"search-engine__retail"},[s("div",{staticClass:"row"},t._l(t.suggestedItems,(function(e){return s("div",{key:e._id,staticClass:"col-6 col-md-4 col-lg-3"},[t._t("product-card",[s("product-card",t._b({staticClass:"search-engine__item",attrs:{product:e}},"product-card",t.productCardProps,!1))],null,{product:e})],2)})),0)]),s("transition",{attrs:{"enter-active-class":"animated fadeInDown"}},[t.hasNetworkError?s("div",{staticClass:"alert alert-warning",attrs:{role:"alert"}},[s("i",{staticClass:"fas fa-wifi mr-2"}),t._v(" "+t._s(t.i19searchOfflineErrorMsg)+" "),s("a",{staticClass:"alert-link",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.fetchItems(e)}}},[t._v(" "+t._s(t.i19searchAgain)+" ")])]):t._e()])],1)]):t._e()]),s("transition",{attrs:{"leave-active-class":"animated fadeOut"}},[!t.hasSearched||t.isLoadingMore?t._t("default"):t._e()],2),t.resultItems.length<t.totalSearchResults?s("div",{key:t.lastRequestId,staticStyle:{width:"100%","margin-top":"20px",height:"5px"},attrs:{id:"search-engine-load-more"}}):t._e()],1)}),[],!1,null,null,null).exports},props:{term:{type:String,default:""},isVisible:{type:Boolean,default:!0},pageSize:{type:Number,default:8},autoFixScore:{type:Number,default:.83},searchEngineProps:Object,productCardProps:{type:Object,default:()=>({isSmall:!0})}},data(){return{localTerm:this.term,searchTriggerTimer:null,searchTerm:"",history:[],totalSearchResults:0,isSearching:!1,hasSearched:!1}},computed:{i19close:()=>Object(E.i18n)(d),i19items:()=>Object(E.i18n)(v),i19search:()=>Object(E.i18n)(T),i19searchProducts:()=>Object(E.i18n)($),i19seeAll:()=>Object(E.i18n)(P)},methods:{hide(){this.$emit("update:is-visible",!1)},setSearchTerm(t){const e=this.$el.parentElement;if(e&&"FORM"===e.tagName){const s=e.elements;for(let e=0;e<s.length;e++)if("term"===s[e].name){s[e].value=t;break}e.submit()}else this.localTerm=t},handleFetching({fetching:t}){this.isSearching=!0,t.finally(()=>{this.isSearching=!1})},handleSearch({ecomSearch:t}){this.totalSearchResults=t.getTotalCount(),this.history=t.history.filter(t=>t.length>2&&-1===this.localTerm.indexOf(t)).slice(0,6),this.hasSearched||(this.hasSearched=!0)}},watch:{isVisible:{handler(t){t&&this.$nextTick(()=>{this.$refs.input&&this.$refs.input.focus()})},immediate:!0},localTerm:{handler(t){const e=t.length>2?t:"";e!==this.searchTerm&&(clearTimeout(this.searchTriggerTimer),this.searchTriggerTimer=setTimeout(()=>{this.searchTerm=e},400)),this.$emit("update:term",t)},immediate:!0}}}),ot=(s(25),D(nt,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"search"},[s("a-backdrop",{attrs:{"is-visible":t.isVisible},on:{hide:t.hide}}),s("transition",{attrs:{"enter-active-class":"animated zoomIn","leave-active-class":"animated fadeOutUp slow"}},[t.isVisible||t.hasSearched?s("div",{directives:[{name:"show",rawName:"v-show",value:t.isVisible,expression:"isVisible"}],staticClass:"search__box card"},[t._t("header",[s("header",{staticClass:"search__header card-header"},[s("div",{staticClass:"search__input-group"},[s("input",{directives:[{name:"model",rawName:"v-model",value:t.localTerm,expression:"localTerm"}],ref:"input",staticClass:"search__input form-control form-control-lg",attrs:{type:"search",autocomplete:"off",placeholder:t.i19searchProducts},domProps:{value:t.localTerm},on:{input:function(e){e.target.composing||(t.localTerm=e.target.value)}}}),s("button",{staticClass:"search__submit",attrs:{type:"submit","aria-label":t.i19search}},[s("i",{staticClass:"fas fa-search"})])]),s("div",{staticClass:"search__status"},[t.isSearching?s("div",{staticClass:"search__spinner spinner-grow",attrs:{role:"status"}},[s("span",{staticClass:"sr-only"},[t._v("Loading...")])]):t._e(),s("button",{staticClass:"close",attrs:{type:"button","aria-label":t.i19close},on:{click:t.hide}},[s("i",{staticClass:"fas fa-times-circle"})])])])],null,{isSearching:t.isSearching}),s("article",{staticClass:"search__body card-body"},[t._t("search-engine",[s("SearchEngine",t._b({attrs:{term:t.searchTerm,"is-filterable":!1,"product-card-props":t.productCardProps},on:{"update:term":function(e){t.searchTerm=e},fetch:t.handleFetching,search:t.handleSearch}},"SearchEngine",Object.assign({},t.searchEngineProps,{pageSize:t.pageSize,autoFixScore:t.autoFixScore}),!1),[s("div",{staticClass:"search__loading spinner-border",attrs:{role:"status"}},[s("span",{staticClass:"sr-only"},[t._v("Loading...")])])])],null,{term:t.searchTerm})],2),s("footer",{staticClass:"search__footer card-footer"},[t._t("count-results",[s("transition",{attrs:{"enter-active-class":"animated fadeInDown"}},[t.hasSearched?s("div",{staticClass:"search__count"},[s("strong",[t._v(t._s(t.totalSearchResults))]),t._v(" "+t._s(t.i19items.toLowerCase())+" "),t.totalSearchResults>t.pageSize?s("button",{staticClass:"ml-2 btn btn-primary",attrs:{type:"submit"}},[t._v(" "+t._s(t.i19seeAll)+" ")]):t._e()]):t._e()])],null,{hasSearched:t.hasSearched,totalSearchResults:t.totalSearchResults}),t._t("history",[s("transition",{attrs:{"enter-active-class":"animated fadeInDown"}},[t.history.length?s("div",{staticClass:"search__history d-none d-lg-block"},[s("i",{staticClass:"fas fa-history"}),t._l(t.history,(function(e){return s("a",{staticClass:"search__history-link",attrs:{href:"#"},domProps:{textContent:t._s(e)},on:{click:function(s){return s.preventDefault(),t.setSearchTerm(e)}}})}))],2):t._e()])],null,{history:t.history})],2)],2):t._e()])],1)}),[],!1,null,null,null).exports);e.default=(t={},e="instant-search",s="search-input")=>{const i=document.getElementById(e),a=document.getElementById(s);if(i&&a){const s=window.storefront&&window.storefront.getScopedSlots;new r.a({data:{isVisible:!1,term:""},created(){a.addEventListener("focusin",()=>{this.isVisible=!0,this.term=a.value})},render(r){const n=this;return r(ot,{attrs:{id:e},props:{...t.props,term:n.term,isVisible:n.isVisible},on:{"update:is-visible"(t){n.isVisible=t},"update:term"(t){a.value=t}},scopedSlots:"function"==typeof s?s(i,r):void 0})}}).$mount(i)}}}]).default;
1
+ var widgetSearch=function(t){function e(e){for(var i,a,o=e[0],c=e[1],u=e[3]||[],d=0,p=[];d<o.length;d++)a=o[d],Object.prototype.hasOwnProperty.call(s,a)&&s[a]&&p.push(s[a][0]),s[a]=0;for(i in c)Object.prototype.hasOwnProperty.call(c,i)&&(t[i]=c[i]);for(l&&l(e),u.forEach((function(t){if(void 0===s[t]){s[t]=null;var e=document.createElement("link");n.nc&&e.setAttribute("nonce",n.nc),e.rel="prefetch",e.as="script",e.href=r(t),document.head.appendChild(e)}}));p.length;)p.shift()()}var i={},s={0:0};function r(t){return n.p+"widget-search."+({}[t]||t)+".min.js"}function n(e){if(i[e])return i[e].exports;var s=i[e]={i:e,l:!1,exports:{}};return t[e].call(s.exports,s,s.exports,n),s.l=!0,s.exports}n.e=function(t){var e=[],i=s[t];if(0!==i)if(i)e.push(i[2]);else{var a=new Promise((function(e,r){i=s[t]=[e,r]}));e.push(i[2]=a);var o,c=document.createElement("script");c.charset="utf-8",c.timeout=120,n.nc&&c.setAttribute("nonce",n.nc),c.src=r(t);var l=new Error;o=function(e){c.onerror=c.onload=null,clearTimeout(u);var i=s[t];if(0!==i){if(i){var r=e&&("load"===e.type?"missing":e.type),n=e&&e.target&&e.target.src;l.message="Loading chunk "+t+" failed.\n("+r+": "+n+")",l.name="ChunkLoadError",l.type=r,l.request=n,i[1](l)}s[t]=void 0}};var u=setTimeout((function(){o({type:"timeout",target:c})}),12e4);c.onerror=c.onload=o,document.head.appendChild(c)}return Promise.all(e)},n.m=t,n.c=i,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)n.d(i,s,function(e){return t[e]}.bind(null,s));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/assets/vendor/",n.oe=function(t){throw console.error(t),t};var a=window.webpackJsonpwidgetSearch=window.webpackJsonpwidgetSearch||[],o=a.push.bind(a);a.push=e,a=a.slice();for(var c=0;c<a.length;c++)e(a[c]);var l=o;return n(n.s=36)}([function(t,e){t.exports=void 0},function(t,e,i){"use strict";function s(t,e,i,s,r,n,a,o){var c,l="function"==typeof t?t.options:t;if(e&&(l.render=e,l.staticRenderFns=i,l._compiled=!0),s&&(l.functional=!0),n&&(l._scopeId="data-v-"+n),a?(c=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),r&&r.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},l._ssrRegister=c):r&&(c=o?function(){r.call(this,(l.functional?this.parent:this).$root.$options.shadowRoot)}:r),c)if(l.functional){l._injectStyles=c;var u=l.render;l.render=function(t,e){return c.call(e),u(t,e)}}else{var d=l.beforeCreate;l.beforeCreate=d?[].concat(d,c):[c]}return{exports:t,options:l}}i.d(e,"a",(function(){return s}))},function(t,e){t.exports=void 0},function(t,e,i){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var i=function(t,e){var i=t[1]||"",s=t[3];if(!s)return i;if(e&&"function"==typeof btoa){var r=(a=s,o=btoa(unescape(encodeURIComponent(JSON.stringify(a)))),c="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(o),"/*# ".concat(c," */")),n=s.sources.map((function(t){return"/*# sourceURL=".concat(s.sourceRoot||"").concat(t," */")}));return[i].concat(n).concat([r]).join("\n")}var a,o,c;return[i].join("\n")}(e,t);return e[2]?"@media ".concat(e[2]," {").concat(i,"}"):i})).join("")},e.i=function(t,i,s){"string"==typeof t&&(t=[[null,t,""]]);var r={};if(s)for(var n=0;n<this.length;n++){var a=this[n][0];null!=a&&(r[a]=!0)}for(var o=0;o<t.length;o++){var c=[].concat(t[o]);s&&r[c[0]]||(i&&(c[2]?c[2]="".concat(i," and ").concat(c[2]):c[2]=i),e.push(c))}},e}},function(t,e,i){"use strict";function s(t,e){for(var i=[],s={},r=0;r<e.length;r++){var n=e[r],a=n[0],o={id:t+":"+r,css:n[1],media:n[2],sourceMap:n[3]};s[a]?s[a].parts.push(o):i.push(s[a]={id:a,parts:[o]})}return i}i.r(e),i.d(e,"default",(function(){return h}));var r="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!r)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var n={},a=r&&(document.head||document.getElementsByTagName("head")[0]),o=null,c=0,l=!1,u=function(){},d=null,p="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function h(t,e,i,r){l=i,d=r||{};var a=s(t,e);return f(a),function(e){for(var i=[],r=0;r<a.length;r++){var o=a[r];(c=n[o.id]).refs--,i.push(c)}e?f(a=s(t,e)):a=[];for(r=0;r<i.length;r++){var c;if(0===(c=i[r]).refs){for(var l=0;l<c.parts.length;l++)c.parts[l]();delete n[c.id]}}}}function f(t){for(var e=0;e<t.length;e++){var i=t[e],s=n[i.id];if(s){s.refs++;for(var r=0;r<s.parts.length;r++)s.parts[r](i.parts[r]);for(;r<i.parts.length;r++)s.parts.push(_(i.parts[r]));s.parts.length>i.parts.length&&(s.parts.length=i.parts.length)}else{var a=[];for(r=0;r<i.parts.length;r++)a.push(_(i.parts[r]));n[i.id]={id:i.id,refs:1,parts:a}}}}function m(){var t=document.createElement("style");return t.type="text/css",a.appendChild(t),t}function _(t){var e,i,s=document.querySelector('style[data-vue-ssr-id~="'+t.id+'"]');if(s){if(l)return u;s.parentNode.removeChild(s)}if(p){var r=c++;s=o||(o=m()),e=v.bind(null,s,r,!1),i=v.bind(null,s,r,!0)}else s=m(),e=y.bind(null,s),i=function(){s.parentNode.removeChild(s)};return e(t),function(s){if(s){if(s.css===t.css&&s.media===t.media&&s.sourceMap===t.sourceMap)return;e(t=s)}else i()}}var g,b=(g=[],function(t,e){return g[t]=e,g.filter(Boolean).join("\n")});function v(t,e,i,s){var r=i?"":s.css;if(t.styleSheet)t.styleSheet.cssText=b(e,r);else{var n=document.createTextNode(r),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(n,a[e]):t.appendChild(n)}}function y(t,e){var i=e.css,s=e.media,r=e.sourceMap;if(s&&t.setAttribute("media",s),d.ssrId&&t.setAttribute("data-vue-ssr-id",e.id),r&&(i+="\n/*# sourceURL="+r.sources[0]+" */",i+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */"),t.styleSheet)t.styleSheet.cssText=i;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(i))}}},function(t,e){t.exports=void 0},function(t,e){t.exports=lozad},function(t,e,i){"use strict";var s={name:"ABackdrop",props:{isVisible:{type:Boolean,default:!0},zIndexOnShow:{type:Number,default:1080},transitionMs:{type:Number,default:150}},data:()=>({opacity:0,zIndex:null,top:null}),computed:{style(){const{top:t,zIndex:e,transitionMs:i,opacity:s}=this;return{top:t,transition:`opacity ${i}ms linear`,opacity:s,zIndex:e}}},methods:{hide(){this.$emit("update:is-visible",!1),this.$emit("hide")},lockBodyScroll(){document.body.style.maxWidth=document.body.offsetWidth+"px",document.body.style.overflow="hidden"}},watch:{isVisible(t){t?(this.opacity=null,this.lockBodyScroll()):(this.opacity=0,document.body.style.overflow=document.body.style.maxWidth=null)},opacity(t){0===t?setTimeout(()=>{this.top=this.zIndex=null},this.transitionMs):(this.zIndex=this.zIndexOnShow,this.top=0)}},mounted(){this.isVisible&&(setTimeout(()=>{this.opacity=null},this.transitionMs),this.lockBodyScroll())}},r=(i(24),i(1)),n=Object(r.a)(s,(function(){var t=this.$createElement;return(this._self._c||t)("div",{staticClass:"backdrop",style:this.style,on:{click:this.hide}})}),[],!1,null,null,null);e.a=n.exports},,function(t,e){t.exports=void 0},function(t,e){t.exports=void 0},function(t,e,i){"use strict";i.d(e,"b",(function(){return n})),i.d(e,"a",(function(){return a}));var s=i(5),r=i.n(s);const n=(t,e=r.a)=>{const i=e.getCustomer().favorites||[],s=a(t,e);if(s){const e=i.indexOf(t);i.splice(e,1)}else i.push(t);return e.requestApi("/me.json","patch",{favorites:i}),!s},a=(t,e)=>{const{favorites:i}=e.getCustomer();return i&&i.includes(t)}},function(t,e){t.exports=void 0},function(t,e,i){"use strict";var s={name:"ALink",props:{href:String,to:[String,Object]},computed:{isRouter(){return!!this.$router&&(!this.href||Boolean(this.$router.options.routes.find(({path:t})=>t===this.href)))}}},r=i(1),n=Object(r.a)(s,(function(){var t=this.$createElement;return(this._self._c||t)(this.isRouter?"router-link":"a",{tag:"component",attrs:{href:this.isRouter?null:this.href,to:this.isRouter?this.to||this.href:null}},[this._t("default")],2)}),[],!1,null,null,null);e.a=n.exports},function(t,e,i){"use strict";var s=i(0),r=i(6),n=i.n(r);var a={name:"APicture",props:{src:[String,Object],fallbackSrc:String,alt:String,canCalcHeight:{type:Boolean,default:!0},placeholder:{type:String,default:"/assets/img-placeholder.png"},containerBreakpoints:{type:Object,default:()=>({zoom:null,big:800,[s.$ecomConfig.get("default_img_size")||"normal"]:400})},lozadOptions:{type:Object,default:()=>({rootMargin:"350px 0px",threshold:0})}},data:()=>({sources:[],imgWidth:0,imgHeight:0,height:null,opacity:null}),computed:{defaultImgObj(){return"object"==typeof this.src&&this.src?Object(s.img)(this.src)||this.src:{}},localFallbackSrc(){const{src:t,defaultImgObj:e,fallbackSrc:i}=this;if(i)return i;const s="object"==typeof t?t.zoom?t.zoom.url:e.url:t;return s?s.replace(/\.webp$/,""):this.placeholder},localAlt(){const{alt:t,src:e,defaultImgObj:i}=this;return t||(e?i.alt||"Product":"No image")}},methods:{updateSources(){const t=[];let e;if("object"==typeof this.src){const{clientWidth:t,clientHeight:i}=this.$el,s=((t,e,i,s)=>{let r,n;for(const a in s){const o=s[a];if(void 0!==o&&t[a]){if(void 0!==n)if(null===o){if(n>=e)continue}else if(o<e||o-50<=i||null!==n&&o>n)continue;r=a,n=o}}return r})(this.src,t,i,this.containerBreakpoints),r=this.src[s],{url:n,size:a}=r||this.defaultImgObj;e=n,a&&([this.imgWidth,this.imgHeight]=a.split("x").map(t=>parseInt(t,10)),t&&this.imgHeight&&this.canCalcHeight&&(this.height=(t>=this.imgWidth?this.imgHeight:t*this.imgHeight/this.imgWidth)+"px"))}else e=this.src;e&&(e.endsWith(".webp")?t.push({srcset:e,type:"image/webp"},{srcset:/\/imgs\/[0-9]{3}px/.test(e)?e.replace(/\/imgs\/[0-9]{3}px/,""):e.replace(/\.webp$/,""),type:"image/"+(".png"===e.substr(-9,4)?"png":"jpeg")}):e.endsWith(".avif")?t.push({srcset:e,type:"image/avif"},{srcset:e.replace(".avif",".webp"),type:"image/webp"}):t.push({srcset:e})),this.sources=t}},mounted(){this.updateSources(),this.$nextTick(()=>{const t=this.$el;n()(t,{...this.lozadOptions,loaded:t=>{const{localFallbackSrc:e}=this,i="IMG"===t.tagName?t:t.lastChild;i.style.opacity=0,this.imgHeight&&(i.height=this.imgHeight,i.width=this.imgWidth),i.onerror=function(){console.error(new Error("Image load error"),this),t.style.display="none";const i=document.createElement("IMG");i.src=e,t.parentNode.insertBefore(i,t.nextSibling)},i.onload=()=>{this.opacity=0,t.classList.add("loaded"),this.$nextTick(()=>{this.opacity=i.style.opacity=null,this.$emit("load")})}}}).observe()})}},o=(i(26),i(1)),c=Object(o.a)(a,(function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("picture",{staticClass:"picture",style:{height:t.height,opacity:t.opacity},attrs:{"data-iesrc":t.localFallbackSrc,"data-alt":t.localAlt}},[t.sources.length?t._l(t.sources,(function(t,e){var s=t.srcset,r=t.type;return i("source",{key:e,attrs:{srcset:s,type:r}})})):i("source",{attrs:{srcset:t.localFallbackSrc}})],2)}),[],!1,null,null,null);e.a=c.exports},function(t,e,i){"use strict";var s=i(39),r=i(0),n=(t,e)=>new Promise(i=>{const s="object"==typeof window&&window.storefront;if(s){const r=()=>{let r=s.info&&s.info[t];return!!(r&&(e&&(r=r[e]),r&&Object.keys(r).length))&&(i(r),!0)};r()||s.on("info:"+t,r)}});const a=(t,e)=>{const{type:i,value:s}=e;let r;if(s)return r="percentage"===i?t*(100-s)/100:t-s,r>0?r:0};var o={name:"APrices",props:{product:{type:Object,required:!0},isLiteral:Boolean,isBig:Boolean,isAmountTotal:Boolean,installmentsOption:Object,discountOption:Object,discountText:{type:[String,Boolean],default:""},canShowPriceOptions:{type:Boolean,default:!0}},data(){return{installmentsNumber:0,monthlyInterest:0,discount:{type:null,value:0},extraDiscount:{type:null,value:0,min_amount:0},discountLabel:this.discountText,pointsProgramName:null,pointsMinPrice:0,earnPointsFactor:0}},computed:{i19asOf:()=>Object(r.i18n)(s.e),i19from:()=>Object(r.i18n)(s.z),i19interestFree:()=>Object(r.i18n)(s.C),i19of:()=>Object(r.i18n)(s.N),i19to:()=>Object(r.i18n)(s.yb),i19upTo:()=>Object(r.i18n)(s.Db),i19youEarn:()=>Object(r.i18n)(s.Gb),price(){const t=Object(r.price)(this.product);return this.extraDiscount.value&&(!this.extraDiscount.min_amount||t>this.extraDiscount.min_amount)?a(t,this.extraDiscount):t},comparePrice(){return Object(r.onPromotion)(this.product)?this.product.base_price:this.extraDiscount.value?Object(r.price)(this.product):void 0},hasVariedPrices(){const{variations:t}=this.product;if(t){const e=Object(r.price)(this.product);for(let i=0;i<t.length;i++){if(Object(r.price)({...this.product,...t[i]})>e)return!0}}return!1},priceWithDiscount(){return this.canShowPriceOptions&&a(this.price,this.discount)},installmentValue(){if(this.canShowPriceOptions&&this.installmentsNumber>=2){if(this.monthlyInterest){const t=this.monthlyInterest/100;return this.price*t/(1-Math.pow(1+t,-this.installmentsNumber))}return this.price/this.installmentsNumber}return 0}},methods:{formatMoney:r.formatMoney,updateInstallments(t){if(t){this.monthlyInterest=t.monthly_interest;const e=t.min_installment||5,i=parseInt(this.price/e,10);this.installmentsNumber=Math.min(i,t.max_number)}},updateDiscount(t){!t||t.min_amount&&!(t.min_amount<=this.price)||this.isAmountTotal&&"total"!==t.apply_at||(this.discount=t,!this.discountText&&!1!==this.discountText&&t.label&&(this.discountLabel="via "+t.label))}},watch:{price:{handler(t){this.$emit("fix-price",t)},immediate:!0}},created(){this.canShowPriceOptions&&(this.discountOption?this.updateDiscount(this.discountOption):n("apply_discount").then(t=>{t.available_extra_discount&&(this.extraDiscount=t.available_extra_discount)}),this.installmentsOption?this.updateInstallments(this.installmentsOption):n("list_payments").then(t=>{this.updateInstallments(t.installments_option),this.updateDiscount(t.discount_option);const e=t.loyalty_points_programs;this.isLiteral&&e&&this.$nextTick(()=>{for(const t in e){const i=e[t];if(i&&i.earn_percentage>0){this.pointsMinPrice=i.min_subtotal_to_earn,this.pointsProgramName=i.name,this.earnPointsFactor=i.earn_percentage/100;break}}})}))}},c=(i(28),i(1)),l=Object(c.a)(o,(function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"prices",class:{"prices--literal":t.isLiteral,"prices--big":t.isBig}},[t.comparePrice?i("span",{staticClass:"prices__compare"},[t.isLiteral?[i("small",[t._v(" "+t._s(t.i19from)+" ")]),i("s",[t._v(t._s(t.formatMoney(t.comparePrice)))]),i("small",[t._v(" "+t._s(t.i19to)+" ")])]:i("s",[t._v(t._s(t.formatMoney(t.comparePrice)))])],2):t._e(),i("strong",{staticClass:"prices__value"},[t.hasVariedPrices?i("small",[t._v(" "+t._s(t.i19asOf)+" ")]):t._e(),t._v(" "+t._s(t.formatMoney(t.price))+" ")]),i("transition-group",{attrs:{"enter-active-class":"animated slideInDown"}},[t.earnPointsFactor>0&&!(t.pointsMinPrice>t.price)?i("div",{key:"points",staticClass:"prices__points"},[i("i",{staticClass:"i-check-circle"}),t._v(" "+t._s(t.i19youEarn)+" "),i("span",[t._v(" +"+t._s((t.earnPointsFactor*t.price).toFixed(1))+" ")]),i("em",[t._v(t._s(t.pointsProgramName))])]):t._e(),t.installmentsNumber>1&&t.installmentValue?i("div",{key:"installments",staticClass:"prices__installments"},[t.isLiteral?i("small",[t._v(" "+t._s(t.i19upTo)+" ")]):t._e(),t._v(" "+t._s(t.installmentsNumber)+"x "),t.isLiteral?i("small",[t._v(" "+t._s(t.i19of)+" ")]):t._e(),i("span",[t._v(" "+t._s(t.formatMoney(t.installmentValue))+" ")]),!t.monthlyInterest&&t.isLiteral?i("small",[t._v(" "+t._s(t.i19interestFree)+" ")]):t._e()]):t._e(),"number"==typeof t.priceWithDiscount&&t.priceWithDiscount<t.price?i("div",{key:"discount",staticClass:"prices__discount"},["string"==typeof t.discountLabel&&t.discountLabel?[i("span",[t._v(" "+t._s(t.formatMoney(t.priceWithDiscount))+" ")]),i("small",{staticClass:"prices__discount-label"},[t._v(" "+t._s(t.discountLabel)+" ")])]:[i("small",[t._v(" "+t._s(t.i19asOf)+" ")]),i("span",[t._v(" "+t._s(t.formatMoney(t.priceWithDiscount))+" ")])]],2):t._e()])],1)}),[],!1,null,null,null);e.a=l.exports},function(t,e,i){"use strict";i.d(e,"a",(function(){return u}));var s=i(2),r=i.n(s);function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var a={selector:"vue-portal-target-".concat(((t=21)=>{let e="",i=t;for(;i--;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e})())},o=function(t){return a.selector=t},c="undefined"!=typeof window&&void 0!==("undefined"==typeof document?"undefined":n(document)),l=r.a.extend({abstract:!0,name:"PortalOutlet",props:["nodes","tag"],data:function(t){return{updatedNodes:t.nodes}},render:function(t){var e=this.updatedNodes&&this.updatedNodes();return e?1!==e.length||e[0].text?t(this.tag||"DIV",e):e:t()},destroyed:function(){var t=this.$el;t&&t.parentNode.removeChild(t)}}),u=r.a.extend({name:"VueSimplePortal",props:{disabled:{type:Boolean},prepend:{type:Boolean},selector:{type:String,default:function(){return"#".concat(a.selector)}},tag:{type:String,default:"DIV"}},render:function(t){if(this.disabled){var e=this.$scopedSlots&&this.$scopedSlots.default();return e?e.length<2&&!e[0].text?e:t(this.tag,e):t()}return t()},created:function(){this.getTargetEl()||this.insertTargetEl()},updated:function(){var t=this;this.$nextTick((function(){t.disabled||t.slotFn===t.$scopedSlots.default||(t.container.updatedNodes=t.$scopedSlots.default),t.slotFn=t.$scopedSlots.default}))},beforeDestroy:function(){this.unmount()},watch:{disabled:{immediate:!0,handler:function(t){t?this.unmount():this.$nextTick(this.mount)}}},methods:{getTargetEl:function(){if(c)return document.querySelector(this.selector)},insertTargetEl:function(){if(c){var t=document.querySelector("body"),e=document.createElement(this.tag);e.id=this.selector.substring(1),t.appendChild(e)}},mount:function(){if(c){var t=this.getTargetEl(),e=document.createElement("DIV");this.prepend&&t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e),this.container=new l({el:e,parent:this,propsData:{tag:this.tag,nodes:this.$scopedSlots.default}})}},unmount:function(){this.container&&(this.container.$destroy(),delete this.container)}}});function d(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.component(e.name||"portal",u),e.defaultSelector&&o(e.defaultSelector)}"undefined"!=typeof window&&window.Vue&&window.Vue===r.a&&r.a.use(d)},function(t,e,i){var s=i(25);s.__esModule&&(s=s.default),"string"==typeof s&&(s=[[t.i,s,""]]),s.locals&&(t.exports=s.locals);(0,i(4).default)("15e38591",s,!0,{})},function(t,e,i){"use strict";e.a=(t,e=0)=>{for(;t.offsetParent;)e+=t.offsetTop,t=t.offsetParent;return window.scroll({top:e,behavior:"smooth"})}},function(t,e,i){var s=i(27);s.__esModule&&(s=s.default),"string"==typeof s&&(s=[[t.i,s,""]]),s.locals&&(t.exports=s.locals);(0,i(4).default)("8b7473ca",s,!0,{})},function(t,e,i){var s=i(29);s.__esModule&&(s=s.default),"string"==typeof s&&(s=[[t.i,s,""]]),s.locals&&(t.exports=s.locals);(0,i(4).default)("2c6ad45e",s,!0,{})},function(t,e,i){var s=i(31);s.__esModule&&(s=s.default),"string"==typeof s&&(s=[[t.i,s,""]]),s.locals&&(t.exports=s.locals);(0,i(4).default)("9d3e525e",s,!0,{})},function(t,e,i){var s=i(33);s.__esModule&&(s=s.default),"string"==typeof s&&(s=[[t.i,s,""]]),s.locals&&(t.exports=s.locals);(0,i(4).default)("14a14b81",s,!0,{})},function(t,e,i){var s=i(35);s.__esModule&&(s=s.default),"string"==typeof s&&(s=[[t.i,s,""]]),s.locals&&(t.exports=s.locals);(0,i(4).default)("59e3a05e",s,!0,{})},function(t,e,i){"use strict";i(17)},function(t,e,i){(e=i(3)(!1)).push([t.i,".backdrop{background-color:var(--dark);cursor:pointer;height:100vh;left:0;opacity:.65;position:fixed;top:-100vh;width:100vw;z-index:-100}",""]),t.exports=e},function(t,e,i){"use strict";i(19)},function(t,e,i){(e=i(3)(!1)).push([t.i,".picture{display:inline-block;overflow:hidden;transition:opacity .2s;width:100%}.picture:not(.loaded){background:linear-gradient(25deg,var(--light) 40%,var(--gray) 200%);font-size:0;height:100%;min-height:50px;opacity:.3}.picture img{height:auto;margin:0 auto;max-width:100%;width:auto}",""]),t.exports=e},function(t,e,i){"use strict";i(20)},function(t,e,i){(e=i(3)(!1)).push([t.i,".prices{line-height:var(--line-height-sm)}.prices small:not(.prices__discount-label){text-transform:lowercase}.prices:not(.prices--big){font-size:var(--font-size-sm)}.prices:not(.prices--big) .prices__installments{font-weight:var(--font-light)}.prices__value{display:block;font-size:var(--font-size-lg)}.prices__value small{font-size:var(--font-size-sm)}.prices--big{font-size:var(--font-size)}.prices--big .prices__value{font-size:var(--h1);margin-bottom:var(--spacer-1)}.prices--literal .prices__discount span,.prices--literal .prices__installments span{font-weight:var(--font-bold)}.prices--literal small{font-size:100%}.prices__points{color:var(--secondary);margin-bottom:var(--spacer-2)}.prices:not(.prices--literal) .prices__compare{color:var(--gray)}",""]),t.exports=e},function(t,e,i){"use strict";i(21)},function(t,e,i){(e=i(3)(!1)).push([t.i,".product-card{border-radius:var(--border-radius);font-size:var(--font-size);height:100%;padding:var(--spacer-2);position:relative}.product-card>section{display:flex;flex-direction:column;height:100%}.product-card__prices{display:flex;flex:1;flex-direction:column;justify-content:flex-end}.product-card__offer-stamp{background-color:var(--success);border-radius:var(--border-radius);color:var(--success-yiq);font-size:80%;line-height:2.2;min-width:55px;opacity:.9;position:absolute;right:0;text-align:center;top:1rem;transition:border-radius .3s;z-index:9}.product-card__offer-stamp i,.product-card__offer-stamp svg{font-size:85%;opacity:.8}.product-card__link{outline:none}.product-card__pictures{align-items:center;display:flex;overflow:hidden;position:relative;text-align:center}.product-card__picture{display:block;flex:0 0 100%;position:absolute}.product-card__picture img{max-width:100%}.product-card__picture:not(:last-child){opacity:0}.product-card__picture:not(:last-child).picture{background-color:none}.product-card__picture.loaded:last-child{opacity:1;position:inherit;transition:opacity .15s ease-out .1s}.product-card__pictures{height:180px}@media(min-width:576px){.product-card__pictures{height:200px}}@media(min-width:992px){.product-card__pictures{height:250px}}.product-card__picture img{max-height:180px}@media(min-width:576px){.product-card__picture img{max-height:200px}}@media(min-width:992px){.product-card__picture img{max-height:250px}}.product-card__name{--max-lines:3;-webkit-line-clamp:var(--max-lines);-webkit-box-orient:vertical;display:-webkit-box;font-size:var(--font-size-sm);font-weight:var(--font-normal);line-height:var(--line-height-sm);overflow:hidden;padding-top:var(--spacer-1);z-index:1}@media(min-width:992px){.product-card__name{--max-lines:2}}.product-card__favorite{font-size:var(--font-size-lg);position:absolute;top:var(--spacer-1);z-index:9}.product-card__favorite .active{color:var(--red)}.product-card__buy{margin-top:var(--spacer-1);position:relative}.product-card__buy-loading{left:var(--spacer-2);margin-top:-8px;position:absolute;top:50%}@media(hover:hover){.product-card:hover{box-shadow:var(--box-shadow-sm)}.product-card:hover .product-card__offer-stamp{border-bottom-right-radius:0;border-top-right-radius:0}.product-card:hover .product-card__picture.loaded{opacity:1;position:inherit}.product-card:hover .product-card__picture.loaded+.picture{opacity:0;position:absolute;z-index:-1}.product-card:hover .product-card__buy{opacity:1}.product-card:hover .product-card__favorite{opacity:.7}}.product-card--inactive,.product-card--inactive img{opacity:.7}.product-card--small .product-card__pictures{height:90px}@media(min-width:576px){.product-card--small .product-card__pictures{height:100px}}@media(min-width:992px){.product-card--small .product-card__pictures{height:125px}}.product-card--small .product-card__picture img{max-height:90px}@media(min-width:576px){.product-card--small .product-card__picture img{max-height:100px}}@media(min-width:992px){.product-card--small .product-card__picture img{max-height:125px}}.product-card--small .product-card__name{--max-lines:2;margin-bottom:0;padding-top:var(--spacer-2)}.product-card--small .product-card__buy{bottom:var(--spacer-3);position:absolute;right:var(--spacer-3)}",""]),t.exports=e},function(t,e,i){"use strict";i(22)},function(t,e,i){(e=i(3)(!1)).push([t.i,'.search-engine{position:relative}.search-engine__nav{background:var(--light);color:var(--gray);margin-bottom:var(--spacer-3);padding:var(--spacer-2)}.search-engine__nav>div{align-items:center;display:flex;justify-content:space-between}.search-engine__toggles{display:flex}.search-engine__toggles button{color:var(--secondary);margin-left:var(--spacer-1)}.search-engine__count{position:relative}.search-engine__spinner{color:var(--secondary);height:1.75rem;margin-top:-.875rem;position:absolute;right:-3rem;top:50%;width:1.75rem}.search-engine__aside{border-radius:0;height:100%;max-width:100%;position:fixed;right:0;top:0;width:280px;z-index:1100}.search-engine__aside .card-body{overflow-y:auto}.search-engine__aside-open{border-bottom-right-radius:0;border-top-right-radius:0;bottom:50vh;position:fixed;right:0;text-align:right;z-index:890}.search-engine__aside-open .spinner-border{margin-bottom:3px}.search-engine__aside-open .i-search{opacity:.6}.search-engine__filter:not(:first-child){margin-top:var(--spacer-2)}.search-engine__filter:last-child{margin-bottom:var(--spacer-4)}.search-engine__filter button{color:var(--secondary);font-size:var(--font-size-lg);font-weight:var(--font-light);max-width:100%;padding-left:0}.search-engine__filter button i,.search-engine__filter button svg{color:var(--gray);font-size:var(--font-size);margin-right:var(--spacer-1);opacity:.5;transition:opacity .25s}.search-engine__filter button .i-chevron-up,.search-engine__filter button[aria-expanded=true] .i-chevron-down{display:none}.search-engine__filter button[aria-expanded=true] .i-chevron-up{display:inherit}.search-engine__filter button:hover i,.search-engine__filter button:hover svg{opacity:1}.search-engine__filter button:focus{box-shadow:none}.search-engine__option{color:var(--primary-light)}.search-engine__option small{color:var(--gray)}.search-engine__selected{margin-left:var(--spacer-2)}.search-engine__selected>small{color:var(--gray)}.search-engine__selected>small:before{content:" / "}.search-engine__info{padding-bottom:var(--spacer-3)}.search-engine__info button{margin-bottom:var(--spacer-2)}.search-engine__terms>span{font-weight:var(--font-light)}.search-engine__terms>span:not(:last-of-type){color:var(--text-muted)}.search-engine__retail{padding:var(--spacer-2) 0}.search-engine__item{margin-bottom:var(--spacer-3)}',""]),t.exports=e},function(t,e,i){"use strict";i(23)},function(t,e,i){(e=i(3)(!1)).push([t.i,".search__box{border-radius:0;left:0;max-height:100vh;position:fixed;top:0;width:100vw;z-index:1090}@media(min-width:576px){.search__box{border-radius:var(--border-radius);margin-left:5vw;margin-top:5vh;max-height:90vh;width:90vw}}@media(min-width:992px){.search__box{margin-left:10vw;width:80vw}}.search__header{align-items:center;display:flex;position:relative}.search__status .close{transition:opacity .2s}.search__status .close:not(:only-child){opacity:0}.search__spinner{height:2rem;margin-top:-1rem;position:absolute;right:1rem;top:50%;width:2rem}.search__input-group{padding-right:var(--spacer-3);position:relative;width:100%}.search__input{padding-right:var(--spacer-5)}.search__submit{background:none;border:none;color:var(--secondary-lighter);font-size:1.5rem;line-height:1;margin-top:-1.25rem;padding:.5rem;position:absolute;right:var(--spacer-4);top:50%;transition:color .15s}.search__submit i,.search__submit svg{vertical-align:top}.search__submit:hover{color:var(--primary-light)}.search__body{min-height:7rem;overflow-x:hidden;overflow-y:auto;padding-left:0;padding-right:0}@media(min-width:576px){.search__body{padding-left:var(--spacer-2);padding-right:var(--spacer-2)}}@media(min-width:992px){.search__body{min-height:10rem}}.search__loading{display:block;height:3rem;margin:var(--spacer-5);width:3rem}.search__footer{align-items:center;display:flex;justify-content:space-between}.search__count{color:var(--text-muted);line-height:var(--line-height-lg);min-width:250px}.search__history{color:var(--text-muted);font-size:var(--font-size-lg);font-weight:var(--font-light);overflow-x:auto;white-space:nowrap}.search__history-link{margin-left:var(--spacer-2)}",""]),t.exports=e},function(t,e,i){"use strict";i.r(e);var s=i(2),r=i.n(s),n=i(39),a=i(0),o=i(7),c=i(6),l=i.n(c),u=i(10),d=i.n(u),p=i(16),h=i(18),f=i(9),m=i(12),_=i.n(m),g=i(13),b=i(14),v=i(15),y=i(5),S=i.n(y),x=i(11);const w=(t,e)=>{if("object"==typeof window){t=`productCard${t}Html`;const i="function"==typeof window[t]?window[t](e):window[t];if("string"==typeof i)return i}};var O={name:"ProductCard",components:{ALink:g.a,APicture:b.a,APrices:v.a},props:{product:Object,productId:String,isSmall:Boolean,headingTag:{type:String,default:"h3"},buyText:String,transitionClass:{type:String,default:"animated fadeIn"},canAddToCart:{type:Boolean,default:!0},ecomPassport:{type:Object,default:()=>S.a},accountUrl:{type:String,default:"/app/#/account/"},isLoaded:Boolean,installmentsOption:Object,discountOption:Object},data:()=>({body:{},isLoading:!1,isWaitingBuy:!1,isHovered:!1,isFavorite:!1,error:""}),computed:{i19addToFavorites:()=>Object(a.i18n)(n.c),i19outOfStock:()=>Object(a.i18n)(n.U),i19unavailable:()=>Object(a.i18n)(n.zb),i19uponRequest:()=>"Sob consulta",isWithoutPrice(){return!Object(a.price)(this.body)},ratingHtml(){return w("Rating",this.body)},buyHtml(){return w("Buy",this.body)},footerHtml(){return w("Footer",this.body)},name(){return Object(a.name)(this.body)},strBuy(){return this.buyText||"object"==typeof window&&window.productCardBuyText||Object(a.i18n)(n.h)},isInStock(){return Object(a.inStock)(this.body)},isActive(){return this.body.available&&this.body.visible&&this.isInStock},isLogged:()=>S.a.checkAuthorization(),discount(){const{body:t}=this;return Object(a.onPromotion)(t)?Math.round(100*(t.base_price-Object(a.price)(t))/t.base_price):0}},methods:{setBody(t){this.body=Object.assign({},t),delete this.body.body_html,delete this.body.body_text,delete this.body.inventory_records,delete this.body.price_change_records,this.isFavorite=Object(x.a)(this.body._id,this.ecomPassport)},fetchItem(){this.productId&&(this.isLoading=!0,Object(f.store)({url:`/products/${this.productId}.json`}).then(({data:t})=>{this.$emit("update:product",t),this.setBody(t),this.$emit("update:is-loaded",!0)}).catch(t=>{console.error(t),this.body.name&&this.body.slug&&this.body.pictures||(this.error=Object(a.i18n)(n.o))}).finally(()=>{this.isLoading=!1}))},toggleFavorite(){this.isLogged&&(this.isFavorite=Object(x.b)(this.body._id,this.ecomPassport))},buy(){const t=this.body;this.$emit("buy",{product:t}),this.canAddToCart&&(this.isWaitingBuy=!0,Object(f.store)({url:`/products/${t._id}.json`}).then(({data:e})=>{const s=["variations","customizations","kit_composition"];for(let t=0;t<s.length;t++){const n=e[s[t]];if(n&&n.length)return Promise.all([i.e(2),i.e(1)]).then(i.bind(null,73)).then(t=>{new r.a({render:i=>i(t.default,{props:{product:e}})}).$mount(this.$refs.quickview)})}const{quantity:n,price:a}=e;_.a.addProduct({...t,quantity:n,price:a})}).catch(e=>{console.error(e),window.location="/"+t.slug}).finally(()=>{this.isWaitingBuy=!1}))}},created(){this.product&&(this.setBody(this.product),void 0===this.product.available&&(this.body.available=!0),void 0===this.product.visible&&(this.body.visible=!0)),this.isLoaded||this.fetchItem()}},C=(i(30),i(1)),k=Object(C.a)(O,(function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"product-card",class:{"product-card--inactive":t.body._id&&!t.isActive,"product-card--small":t.isSmall},attrs:{"data-product-id":t.body._id,"data-sku":t.body.sku},on:{mouseover:function(e){t.isHovered=!0}}},[i("transition",{attrs:{"enter-active-class":t.transitionClass}},[t.isLoading?t._e():i("section",[t._t("discount-tag",(function(){return[t.isActive&&t.discount>0?i("span",{staticClass:"product-card__offer-stamp"},[i("i",{staticClass:"i-arrow-down"}),t._v(" "),i("b",[t._v(t._s(t.discount))]),t._v("% ")]):t._e()]}),null,{discount:t.discount}),t._t("stamps"),t._t("body",(function(){return[i("a-link",{staticClass:"product-card__link",attrs:{href:"/"+t.body.slug,title:t.name}},[t._t("header"),i("div",{staticClass:"product-card__pictures"},[t.body.pictures&&t.body.pictures.length?t._l(t.body.pictures.slice(0,2).reverse(),(function(e,s){return 1===t.body.pictures.length||1===s||t.isHovered?i("a-picture",{key:s,staticClass:"product-card__picture",attrs:{src:e,"can-calc-height":!1}}):t._e()})):i("a-picture",{staticClass:"product-card__picture"})],2),t._t("title",(function(){return[i(t.headingTag,{tag:"component",staticClass:"product-card__name"},[t._v(" "+t._s(t.name)+" ")])]}))],2)]})),t._t("rating",(function(){return[t._m(0)]})),t.body.available&&t.body.visible?t.isInStock?t.isWithoutPrice?t._t("without-price",(function(){return[i("p",{staticClass:"badge badge-info mt-auto"},[t._v(" "+t._s(t.i19uponRequest)+" ")])]})):[t._t("prices",(function(){return[i("a-prices",{staticClass:"product-card__prices",attrs:{product:t.body,"installments-option":t.installmentsOption,"discount-option":t.discountOption}})]})),i("div",{staticClass:"product-card__buy fade",on:{click:t.buy}},[t._t("buy",(function(){return[t.buyHtml?i("div",{domProps:{innerHTML:t._s(t.buyHtml)}}):t._e(),i("button",{staticClass:"btn btn-primary",class:t.isSmall?"btn-sm":"btn-block",attrs:{type:"button",disabled:t.isWaitingBuy}},[t.isWaitingBuy?i("span",{staticClass:"product-card__buy-loading spinner-grow spinner-grow-sm",attrs:{role:"status"}},[i("span",{staticClass:"sr-only"},[t._v("Loading...")])]):t._e(),t._t("buy-button-content",(function(){return[i("i",{staticClass:"i-shopping-bag mr-1"}),t._v(" "+t._s(t.strBuy)+" ")]}))],2)]}))],2)]:t._t("out-of-stock",(function(){return[i("p",{staticClass:"badge badge-dark mt-auto"},[t._v(" "+t._s(t.i19outOfStock)+" ")])]})):t._t("unavailable",(function(){return[i("p",{staticClass:"badge badge-warning mt-auto"},[t._v(" "+t._s(t.i19unavailable)+" ")])]})),t._t("favorite",(function(){return[i("a",{staticClass:"btn product-card__favorite fade",attrs:{href:t.isLogged?null:t.accountUrl,"aria-label":t.i19addToFavorites},on:{click:t.toggleFavorite}},[i("i",{staticClass:"i-heart mr-1",class:t.isFavorite?"active":null})])]})),t._t("footer",(function(){return[t.footerHtml?i("div",{domProps:{innerHTML:t._s(t.footerHtml)}}):t._e()]}))],2)]),t.isLoading?[t._t("default"),t.error?i("div",{staticClass:"alert alert-warning small",attrs:{role:"alert"}},[t._v(" "+t._s(t.error)+" ")]):t._e()]:t._e(),i("div",{ref:"quickview"})],2)}),[function(){var t=this.$createElement;return(this._self._c||t)("div",{staticClass:"product-card__rating",attrs:{"data-sku":this.body.sku},domProps:{innerHTML:this._s(this.ratingHtml)}})}],!1,null,null,null).exports;const j=({ecomSearch:t,term:e,page:i,defaultSort:s})=>{t.reset(),s&&t.setSortOrder(s),e&&t.setSearchTerm(e),i&&t.setPageNumber(i)};var P={name:"SearchEngine",components:{Portal:p.a,ABackdrop:o.a,ProductCard:k},props:{term:String,page:{type:Number,default:1},pageSize:{type:Number,default:24},brands:Array,categories:Array,isFixedBrands:Boolean,isFixedCategories:Boolean,defaultSort:String,defaultFilters:Object,autoFixScore:{type:Number,default:.6},isFilterable:{type:Boolean,default:!0},hasPopularItems:{type:Boolean,default:!0},canLoadMore:{type:Boolean,default:!0},loadMoreSelector:String,canRetry:{type:Boolean,default:!0},canShowItems:{type:Boolean,default:!0},productCardProps:Object,gridsData:{type:Array,default(){if("object"==typeof window&&window.storefront&&window.storefront.data)return window.storefront.data.grids}}},data:()=>({suggestedTerm:"",resultItems:[],totalSearchResults:0,hasSearched:!1,noResultsTerm:"",keepNoResultsTerm:!1,filters:[],priceRange:{},priceOptions:[],hasSetPriceRange:!1,lastSelectedFilter:null,selectedOptions:{},selectedSortOption:null,countOpenRequests:0,lastRequestId:null,isScheduled:!1,isLoadingMore:!1,mustSkipLoadMore:!1,hasNetworkError:!1,popularItems:[],hasSetPopularItems:!1,isAsideVisible:!1,searchFilterId:0}),computed:{i19all:()=>Object(a.i18n)(n.d),i19clearFilters:()=>Object(a.i18n)(n.l),i19closeFilters:()=>Object(a.i18n)(n.n),i19didYouMean:()=>Object(a.i18n)(n.q),i19filter:()=>Object(a.i18n)(n.u),i19filterResults:()=>Object(a.i18n)(n.v),i19itemsFound:()=>Object(a.i18n)(n.F),i19noResultsFor:()=>Object(a.i18n)(n.M),i19popularProducts:()=>Object(a.i18n)(n.Y),i19price:()=>Object(a.i18n)(n.ab),i19refineSearch:()=>Object(a.i18n)(n.eb),i19relevance:()=>Object(a.i18n)(n.gb),i19results:()=>Object(a.i18n)(n.ib),i19searchAgain:()=>Object(a.i18n)(n.mb),i19searchingFor:()=>Object(a.i18n)(n.pb),i19searchOfflineErrorMsg:()=>Object(a.i18n)(n.nb),i19sort:()=>Object(a.i18n)(n.xb),ecomSearch:()=>new d.a,isSearching(){return this.countOpenRequests>0},hasEmptyResult(){return this.hasSearched&&!this.resultItems.length},sortOptions:()=>[{value:null,label:Object(a.i18n)(n.gb)},{value:"sales",label:Object(a.i18n)(n.kb)},{value:"lowest_price",label:Object(a.i18n)(n.H)},{value:"highest_price",label:Object(a.i18n)(n.B)},{value:"news",label:Object(a.i18n)(n.fb)},{value:"slug",label:Object(a.i18n)(n.K)}],hasSelectedOptions(){for(const t in this.selectedOptions)if(this.selectedOptions[t]&&this.selectedOptions[t].length)return!0;return!1},isNavVisible(){return this.hasSearched&&this.isFilterable&&(this.isSearching||this.totalSearchResults>8||this.hasSelectedOptions||this.hasSetPriceRange)},isResultsVisible(){return this.hasSearched&&!this.isSearching||this.suggestedItems.length},hasFilters(){return this.hasSelectedOptions||this.filters.find(({options:t})=>t.length)||this.hasSetPriceRange},suggestedItems(){return this.resultItems.length?this.resultItems:this.popularItems},loadObserver(){return this.canLoadMore&&l()("#search-engine-load-more",{load:()=>{this.mustSkipLoadMore||(this.mustSkipLoadMore=this.isLoadingMore=!0,this.fetchItems())}})},pageAnchorIndex(){const t=this.suggestedItems.length,e=t%this.pageSize;return(0===e?t-this.pageSize:t-e)-1}},methods:{fetchItems(t,e){const i=e?new d.a:this.ecomSearch,s=Date.now();this.countOpenRequests++,this.lastRequestId=s,this.isLoadingMore&&i.setPageNumber(this.page+Math.ceil(this.resultItems.length/this.pageSize));const r=i.setPageSize(this.pageSize).fetch().then(t=>(this.lastRequestId===s&&(this.hasNetworkError=!1,e||this.handleSearchResult()),!e&&(this.term||this.brands||this.categories)||(this.hasSetPopularItems=!0,this.popularItems=i.getItems()),t)).catch(i=>{console.error(i),(this.lastRequestId===s||e)&&(!this.canRetry||t||i.response&&400===i.response.status?this.hasNetworkError=!0:this.fetchItems(!0,e))}).finally(()=>{this.countOpenRequests--,this.isLoadingMore&&(this.isLoadingMore=!1,this.$nextTick(()=>setTimeout(()=>{this.mustSkipLoadMore=!1,this.loadObserver.observe()},300)))});this.$emit("fetch",{ecomSearch:i,fetching:r,isPopularItems:e})},updateFilters(){const t=[],e=(e,i,s)=>{let r=this.filters.findIndex(t=>t.filter===e);if(e!==this.lastSelectedFilter){if(-1===r&&(r=this.filters.length),this["isFixed"+e]){const t=this[e.toLowerCase()];t&&(i=i.filter(({key:e})=>-1===t.indexOf(e)))}this.filters[r]={filter:e,options:i,isSpec:s};const t=this.selectedOptions[e]?this.selectedOptions[e].filter(t=>i.find(({key:e})=>e===t)):[];this.$set(this.selectedOptions,e,t)}t.push(r)};e("Brands",this.ecomSearch.getBrands()),e("Categories",this.ecomSearch.getCategories()),this.ecomSearch.getSpecs().forEach(({key:t,options:i})=>{e(t,i,!0)}),this.filters=this.filters.filter((e,i)=>t.includes(i)),this.searchFilterId=Date.now()},updatePriceOptions(){if(this.priceRange=this.ecomSearch.getPriceRange(),Math.round(this.priceRange.min)<Math.round(this.priceRange.avg)){const t=Math.ceil(Math.max(1.5*this.priceRange.min,this.priceRange.avg/2)),e=Math.ceil(Math.min(this.priceRange.max/1.5,2*this.priceRange.avg));if(t!==e)return void(this.priceOptions=[Math.min(t,e),Math.max(t,e),null].map((t,e,i)=>{const s=i[e-1];return{min:s,max:t,label:s?e<2?`${Object(a.formatMoney)(s)} - ${Object(a.formatMoney)(t)}`:`${Object(a.i18n)(n.e)} ${Object(a.formatMoney)(s)}`:`${Object(a.i18n)(n.Db)} ${Object(a.formatMoney)(t)}`}}))}this.priceOptions=[]},handleSuggestions(){if(this.term){const{ecomSearch:t}=this,e=this.term.toLowerCase();let i=e,s=!1;this.suggestedTerm="",t.getTermSuggestions().forEach(({options:t,text:r})=>{if(t.length){const n=t[0],a=n.text.toLowerCase();!this.totalSearchResults&&this.autoFixScore>0&&n.score>=this.autoFixScore&&-1===a.indexOf(e)&&(s=!0),i=i.replace(new RegExp(r,"i"),a)}}),this.keepNoResultsTerm?this.keepNoResultsTerm=!1:this.noResultsTerm="",i!==e&&(s?(this.noResultsTerm=e,this.keepNoResultsTerm=!0,this.$emit("update:term",i)):this.suggestedTerm=i,t.history.shift())}},handleSearchResult(){const{ecomSearch:t}=this;if(this.totalSearchResults=t.getTotalCount(),this.resultItems=this.isLoadingMore?this.resultItems.concat(t.getItems()):t.getItems(),this.updateFilters(),!this.hasSearched&&this.defaultFilters)for(const t in this.defaultFilters){const e=this.defaultFilters[t];Array.isArray(e)?e.forEach(e=>this.setFilterOption(t,e,!0)):"string"==typeof e&&this.setFilterOption(t,e,!0)}this.updatePriceOptions(),this.handleSuggestions(),this.totalSearchResults||!this.hasPopularItems||this.hasSetPopularItems||this.fetchItems(!1,!0),this.$emit(this.isLoadingMore?"load-more":"search",{ecomSearch:t}),this.hasSearched||this.$nextTick(()=>{setTimeout(()=>{this.hasSearched=!0},100)})},scheduleFetch(){this.isScheduled||(this.isScheduled=!0,this.$nextTick(()=>{setTimeout(()=>{this.fetchItems(),this.isScheduled=!1},30)}))},resetAndFetch(){j(this),this.handlePresetedOptions(),this.scheduleFetch()},toggleFilters(t){this.isAsideVisible="boolean"==typeof t?t:!this.isAsideVisible},getFilterLabel(t){switch(t){case"Brands":return Object(a.i18n)(n.g);case"Categories":return Object(a.i18n)(n.k);default:if(this.gridsData){const e=this.gridsData.find(e=>e.grid_id===t);if(e)return e.title||e.grid_id}}return t},handlePresetedOptions(){["brands","categories"].forEach(t=>{if(this[t]&&this[t].length){const e=t.charAt(0).toUpperCase()+t.slice(1);this["isFixed"+e]||(this.selectedOptions[e]=this[t]),this.updateSearchFilter(e)}})},updateSearchFilter(t){const{ecomSearch:e}=this;let i=this.selectedOptions[t];switch(void 0!==i&&i.length||(i=null),t){case"Brands":this.isFixedBrands&&this.brands&&(i=i?i.concat(this.brands):this.brands),e.setBrandNames(i);break;case"Categories":e.setCategoryNames(i),this.isFixedCategories&&this.categories&&e.mergeFilter({terms:{"categories.name":this.categories}});break;default:e.setSpec(t,i)}},handlePriceInputs(){const{inputMinPrice:t,inputMaxPrice:e}=this.$refs,i=Number(t.value)||null,s=Number(e.value)||null;(i&&!s||i<=s)&&this.setPriceRange(i,s),t.value=i||"",e.value=s||""},setPriceRange(t,e){if(t&&t!==this.priceRange.min||e&&e!==this.priceRange.max)this.hasSetPriceRange=!0;else{if(!this.hasSetPriceRange)return;this.hasSetPriceRange=!1}this.ecomSearch.setPriceRange(t,e),this.scheduleFetch()},setFilterOption(t,e,i){const{selectedOptions:s}=this,r=s[t];if(r){const s=r.indexOf(e);i?-1===s&&(this.lastSelectedFilter=t,r.push(e)):(s>-1&&r.splice(s,1),r.length||this.lastSelectedFilter!==t||(this.lastSelectedFilter=null)),this.updateSearchFilter(t),this.scheduleFetch()}},clearFilters(){const{selectedOptions:t}=this;for(const e in t)t[e]&&(t[e]=[],this.updateSearchFilter(e));this.fetchItems()},setSortOrder(t){this.selectedSortOption=t,this.ecomSearch.setSortOrder(t),this.page>1?this.page=1:this.scheduleFetch()}},watch:{term(){this.resetAndFetch()},brands(){this.resetAndFetch()},categories(){this.resetAndFetch()},page(t){this.ecomSearch.setPageNumber(t),this.scheduleFetch()},isSearching(t){!t&&this.loadObserver&&this.$nextTick(()=>{this.mustSkipLoadMore?setTimeout(()=>Object(h.a)(this.$refs.pageAnchor[0],40),100):this.loadObserver.observe()})}},created(){j(this),this.handlePresetedOptions(),this.fetchItems()}},F=(i(32),Object(C.a)(P,(function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("section",{staticClass:"search-engine"},[i("a-backdrop",{attrs:{"is-visible":t.isAsideVisible},on:{"update:isVisible":function(e){t.isAsideVisible=e},"update:is-visible":function(e){t.isAsideVisible=e}}}),i("transition",{attrs:{"enter-active-class":"animated slideInRight","leave-active-class":"animated slideOutRight"}},[i("aside",{directives:[{name:"show",rawName:"v-show",value:t.isAsideVisible,expression:"isAsideVisible"}],staticClass:"search-engine__aside card shadow"},[t._t("filters",(function(){return[i("header",{staticClass:"card-header"},[t._v(" "+t._s(t.i19refineSearch)+" "),i("button",{staticClass:"close",attrs:{type:"button","aria-label":t.i19closeFilters},on:{click:t.toggleFilters}},[i("span",{attrs:{"aria-hidden":"true"}},[t._v("×")])])]),i("div",{key:t.searchFilterId,staticClass:"card-body"},[t.hasSetPriceRange||t.priceOptions.length?i("div",{staticClass:"search-engine__filter search-engine__filter--price"},[i("h5",[t._v(t._s(t.i19price))]),t.hasSetPriceRange?i("a",{staticClass:"btn btn-link btn-sm mb-2",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.setPriceRange()}}},[i("i",{staticClass:"i-arrow-left mr-1"}),t._v(" "+t._s(t.i19all)+" ")]):t._e(),t._l(t.priceOptions,(function(e,s){var r=e.label,n=e.min,a=e.max;return i("div",{key:"Price-"+s,staticClass:"search-engine__option custom-control custom-radio"},[i("input",{staticClass:"custom-control-input",attrs:{type:"radio",name:"price-option",id:"Price-"+s},on:{click:function(e){return t.setPriceRange(n,a)}}}),i("label",{staticClass:"custom-control-label",attrs:{for:"Price-"+s}},[t._v(" "+t._s(r)+" ")])])})),t.priceRange.max-t.priceRange.min>2?i("div",{staticClass:"search-engine__option-range input-group input-group-sm mt-2"},[i("input",{ref:"inputMinPrice",staticClass:"form-control",attrs:{type:"text","aria-describedby":"search-engine-price-range","aria-label":"Min "+t.i19price,placeholder:"Min: "+Math.floor(t.priceRange.min)}}),i("input",{ref:"inputMaxPrice",staticClass:"form-control",attrs:{type:"text","aria-label":"Max","aria-describedby":"search-engine-price-range","aria-label":"Max "+t.i19price,placeholder:"Max: "+Math.ceil(t.priceRange.max)}}),i("div",{staticClass:"input-group-append"},[i("button",{staticClass:"btn btn-outline-secondary",attrs:{type:"button",id:"search-engine-price-range"},on:{click:function(e){return t.handlePriceInputs()}}},[i("i",{staticClass:"i-chevron-right"})])])]):t._e()],2):t._e(),t._l(t.filters,(function(e,s){var r=e.filter,n=e.options,a=e.isSpec;return n.length?i("div",{key:"filters-"+r,staticClass:"search-engine__filter",class:"search-engine__filter--"+r},[t._o([i("button",{staticClass:"btn text-truncate",attrs:{type:"button","data-toggle":"collapse","data-target":"#collapse-"+r,"aria-expanded":s<5?"true":"false","aria-controls":"collapse-"+r}},[i("i",{staticClass:"i-chevron-down"}),i("i",{staticClass:"i-chevron-up"}),t._v(" "+t._s(t.getFilterLabel(r))+" ")]),i("div",{staticClass:"collapse",class:s<5?"show":null,attrs:{id:"collapse-"+r}},t._l(n,(function(e,s){return i("div",{key:r+"-"+s,staticClass:"search-engine__option custom-control custom-checkbox"},[i("input",{staticClass:"custom-control-input",attrs:{type:"checkbox",id:r+"-"+s},domProps:{checked:t.selectedOptions[r].indexOf(e.key)>-1},on:{change:function(i){return t.setFilterOption(r,e.key,i.target.checked)}}}),i("label",{staticClass:"custom-control-label",attrs:{for:r+"-"+s}},[t._v(" "+t._s(e.key)+" "),a?t._e():i("small",[t._v("("+t._s(e.doc_count)+")")])])])})),0)],0,"filters-"+r)],2):t._e()}))],2),i("footer",{staticClass:"card-footer"},[i("button",{staticClass:"btn btn-sm btn-block btn-outline-secondary",attrs:{type:"button"},on:{click:t.clearFilters}},[i("span",{staticClass:"mr-1"},[i("i",{staticClass:"i-trash"})]),t._v(" "+t._s(t.i19clearFilters)+" ")])])]}))],2)]),i("transition",{attrs:{"enter-active-class":"animated fadeInRight slower","leave-active-class":"animated fadeOutRight"}},[t.isNavVisible&&t.hasFilters?i("button",{staticClass:"search-engine__aside-open btn btn-secondary",attrs:{type:"button","aria-label":t.i19filterResults,disabled:t.isSearching},on:{click:function(e){return t.toggleFilters(!0)}}},[t.isSearching?i("span",{staticClass:"spinner-border spinner-border-sm",attrs:{role:"status"}},[i("span",{staticClass:"sr-only"},[t._v("Loading...")])]):i("span",[i("span",{staticClass:"d-none d-md-inline"},[i("i",{staticClass:"i-search"})]),i("i",{staticClass:"i-filter"})])]):t._e()]),i("transition",{attrs:{"enter-active-class":"animated fadeInDown","leave-active-class":"animated fadeOutUp fast position-absolute"}},[t.isNavVisible?i("div",{staticClass:"search-engine__nav"},[i("div",{staticClass:"container"},[t._t("nav",(function(){return[i("div",{staticClass:"search-engine__count"},[i("strong",[t._v(t._s(t.totalSearchResults))]),t._v(" "+t._s(t.i19itemsFound)+" "),t.isSearching?i("div",{staticClass:"search-engine__spinner spinner-grow",attrs:{role:"status"}},[i("span",{staticClass:"sr-only"},[t._v("Loading...")])]):t._e()]),t.isFilterable?i("div",{staticClass:"search-engine__toggles"},[t.hasFilters?i("button",{staticClass:"btn btn-light",attrs:{type:"button"},on:{click:function(e){return t.toggleFilters(!0)}}},[i("i",{staticClass:"i-filter mr-1"}),i("span",{staticClass:"d-none d-md-inline-block"},[t._v(" "+t._s(t.i19filterResults)+" ")]),i("span",{staticClass:"d-md-none"},[t._v(" "+t._s(t.i19filter)+" ")])]):t._e(),i("div",{staticClass:"dropdown"},[i("button",{staticClass:"btn btn-light",attrs:{type:"button",id:"search-engine-sort","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"}},[i("i",{staticClass:"i-sort mr-1"}),t._v(" "+t._s(t.i19sort)+" ")]),i("div",{staticClass:"dropdown-menu dropdown-menu-right",attrs:{"aria-labelledby":"search-engine-sort"}},t._l(t.sortOptions,(function(e,s){var r=e.value,n=e.label;return i("a",{key:"sort-"+s,staticClass:"dropdown-item",class:"search-engine__sort--"+r,attrs:{href:"#",active:t.selectedSortOption===r},on:{click:function(e){return e.preventDefault(),t.setSortOrder(r)}}},[t._v(" "+t._s(n)+" ")])})),0)])]):t._e()]}),null,{totalSearchResults:t.totalSearchResults,toggleFilters:t.toggleFilters})],2)]):t._e()]),i("transition",{attrs:{"enter-active-class":"animated fadeIn slower"}},[t.isResultsVisible?i("div",{staticClass:"search-engine__results fade",style:{opacity:t.isSearching&&!t.isLoadingMore?.4:1}},[i("div",{staticClass:"container"},[i("div",{staticClass:"search-engine__info px-lg-4"},[t.term?[t.hasEmptyResult?i("div",{staticClass:"search-engine__no-results"},[i("div",{staticClass:"lead mb-2"},[t.suggestedTerm?i("span",[t._v(" "+t._s(t.i19didYouMean)+" "),i("a",{attrs:{href:"#"},domProps:{textContent:t._s(t.suggestedTerm)},on:{click:function(e){return e.preventDefault(),t.$emit("update:term",t.suggestedTerm)}}}),t._v(" ? ")]):t._e(),t._v(" "+t._s(t.i19noResultsFor)+" "),i("em",[t._v(t._s(t.term))])]),t.popularItems.length?i("h4",[t._v(" "+t._s(t.i19popularProducts)+" ")]):t._e()]):i("div",{staticClass:"search-engine__terms"},[t.noResultsTerm?i("span",{staticClass:"d-none d-lg-inline"},[t._v(" "+t._s(t.i19noResultsFor)+" "),i("s",[t._v(t._s(t.noResultsTerm))]),t._v(". ")]):t._e(),i("span",{staticClass:"d-none d-md-inline"},[t._v(" "+t._s(t.i19searchingFor)+": ")]),i("h1",[t._v(t._s(t.term))])])]:t.hasEmptyResult&&t.popularItems.length?i("h3",[t._v(" "+t._s(t.i19popularProducts)+" ")]):t._e(),i("transition",{attrs:{"enter-active-class":"animated fadeInDown","leave-active-class":"animated fadeOutUp"}},[t.hasSelectedOptions&&t.isFilterable?i("div",[i("button",{staticClass:"btn btn-sm btn-outline-secondary",attrs:{type:"button"},on:{click:t.clearFilters}},[i("i",{staticClass:"i-trash mr-1"}),t._v(" "+t._s(t.i19clearFilters)+" ")]),t._l(t.selectedOptions,(function(e,s){return t._l(e,(function(e){return i("button",{staticClass:"search-engine__selected btn btn-sm btn-light",attrs:{type:"button"},on:{click:function(i){return t.setFilterOption(s,e,!1)}}},[i("i",{staticClass:"i-times mr-1"}),t._v(" "+t._s(e)+" "),i("small",[t._v(t._s(t.getFilterLabel(s)))])])}))}))],2):t._e()])],2),t.canShowItems?i("article",{staticClass:"search-engine__retail"},[i("div",{staticClass:"row"},t._l(t.suggestedItems,(function(e,s){return i("div",{key:e._id,ref:s===t.pageAnchorIndex?"pageAnchor":null,refInFor:!0,staticClass:"col-6 col-md-4 col-lg-3"},[t._t("product-card",(function(){return[i("product-card",t._b({staticClass:"search-engine__item",attrs:{product:e}},"product-card",t.productCardProps,!1))]}),null,{product:e})],2)})),0)]):t._e(),i("transition",{attrs:{"enter-active-class":"animated fadeInDown"}},[t.hasNetworkError?i("div",{staticClass:"alert alert-warning",attrs:{role:"alert"}},[i("i",{staticClass:"i-wifi mr-2"}),t._v(" "+t._s(t.i19searchOfflineErrorMsg)+" "),i("a",{staticClass:"alert-link",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.fetchItems.apply(null,arguments)}}},[t._v(" "+t._s(t.i19searchAgain)+" ")])]):t._e()])],1)]):t._e()]),i("transition",{attrs:{"leave-active-class":"animated fadeOut"}},[!t.hasSearched||t.isLoadingMore?t._t("default"):t._e()],2),i(t.loadMoreSelector?"portal":"div",{tag:"component",attrs:{selector:t.loadMoreSelector}},[t.resultItems.length<t.totalSearchResults?i("div",{key:t.lastRequestId,staticStyle:{width:"100%","margin-top":"20px",height:"5px"},attrs:{id:"search-engine-load-more"}}):t._e()])],1)}),[],!1,null,null,null).exports),R={name:"InstantSearch",components:{ABackdrop:o.a,SearchEngine:F},props:{term:{type:String,default:""},isVisible:{type:Boolean,default:!0},pageSize:{type:Number,default:8},autoFixScore:{type:Number,default:.83},searchEngineProps:Object,productCardProps:{type:Object,default:()=>({isSmall:!0})}},data(){return{localTerm:this.term,searchTriggerTimer:null,searchTerm:"",history:[],totalSearchResults:0,isSearching:!1,hasSearched:!1}},computed:{i19close:()=>Object(a.i18n)(n.m),i19items:()=>Object(a.i18n)(n.E),i19search:()=>Object(a.i18n)(n.lb),i19searchProducts:()=>Object(a.i18n)(n.ob),i19seeAll:()=>Object(a.i18n)(n.qb)},methods:{hide(){this.$emit("update:is-visible",!1)},setSearchTerm(t){const e=this.$el.parentElement;if(e&&"FORM"===e.tagName){const i=e.elements;for(let e=0;e<i.length;e++)if("term"===i[e].name){i[e].value=t;break}e.submit()}else this.localTerm=t},handleFetching({fetching:t}){this.isSearching=!0,t.finally(()=>{this.isSearching=!1})},handleSearch({ecomSearch:t}){this.totalSearchResults=t.getTotalCount(),this.history=t.history.filter(t=>t.length>2&&-1===this.localTerm.indexOf(t)).slice(0,6),this.hasSearched||(this.hasSearched=!0)}},watch:{isVisible:{handler(t){t&&this.$nextTick(()=>{this.$refs.input&&this.$refs.input.focus()})},immediate:!0},localTerm:{handler(t){const e=t.length>2?t:"";e!==this.searchTerm&&(clearTimeout(this.searchTriggerTimer),this.searchTriggerTimer=setTimeout(()=>{this.searchTerm=e},400)),this.$emit("update:term",t)},immediate:!0}}},I=(i(34),Object(C.a)(R,(function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"search"},[i("a-backdrop",{attrs:{"is-visible":t.isVisible},on:{hide:t.hide}}),i("transition",{attrs:{"enter-active-class":"animated zoomIn","leave-active-class":"animated fadeOutUp slow"}},[t.isVisible||t.hasSearched?i("div",{directives:[{name:"show",rawName:"v-show",value:t.isVisible,expression:"isVisible"}],staticClass:"search__box card"},[t._t("header",(function(){return[i("header",{staticClass:"search__header card-header"},[i("div",{staticClass:"search__input-group"},[i("input",{directives:[{name:"model",rawName:"v-model",value:t.localTerm,expression:"localTerm"}],ref:"input",staticClass:"search__input form-control form-control-lg",attrs:{type:"search",autocomplete:"off",placeholder:t.i19searchProducts},domProps:{value:t.localTerm},on:{input:function(e){e.target.composing||(t.localTerm=e.target.value)}}}),i("button",{staticClass:"search__submit",attrs:{type:"submit","aria-label":t.i19search}},[i("i",{staticClass:"i-search"})])]),i("div",{staticClass:"search__status"},[t.isSearching?i("div",{staticClass:"search__spinner spinner-grow",attrs:{role:"status"}},[i("span",{staticClass:"sr-only"},[t._v("Loading...")])]):t._e(),i("button",{staticClass:"close",attrs:{type:"button","aria-label":t.i19close},on:{click:t.hide}},[i("i",{staticClass:"i-times-circle"})])])])]}),null,{isSearching:t.isSearching}),i("article",{staticClass:"search__body card-body"},[t._t("search-engine",(function(){return[i("SearchEngine",t._b({attrs:{term:t.searchTerm,"is-filterable":!1,"product-card-props":t.productCardProps},on:{"update:term":function(e){t.searchTerm=e},fetch:t.handleFetching,search:t.handleSearch}},"SearchEngine",Object.assign({},t.searchEngineProps,{pageSize:t.pageSize,autoFixScore:t.autoFixScore}),!1),[i("div",{staticClass:"search__loading spinner-border",attrs:{role:"status"}},[i("span",{staticClass:"sr-only"},[t._v("Loading...")])])])]}),null,{term:t.searchTerm})],2),i("footer",{staticClass:"search__footer card-footer"},[t._t("count-results",(function(){return[i("transition",{attrs:{"enter-active-class":"animated fadeInDown"}},[t.hasSearched?i("div",{staticClass:"search__count"},[i("strong",[t._v(t._s(t.totalSearchResults))]),t._v(" "+t._s(t.i19items.toLowerCase())+" "),t.totalSearchResults>t.pageSize?i("button",{staticClass:"ml-2 btn btn-primary",attrs:{type:"submit"}},[t._v(" "+t._s(t.i19seeAll)+" ")]):t._e()]):t._e()])]}),null,{hasSearched:t.hasSearched,totalSearchResults:t.totalSearchResults}),t._t("history",(function(){return[i("transition",{attrs:{"enter-active-class":"animated fadeInDown"}},[t.history.length?i("div",{staticClass:"search__history d-none d-lg-block"},[i("i",{staticClass:"i-history"}),t._l(t.history,(function(e){return i("a",{staticClass:"search__history-link",attrs:{href:"#"},domProps:{textContent:t._s(e)},on:{click:function(i){return i.preventDefault(),t.setSearchTerm(e)}}})}))],2):t._e()])]}),null,{history:t.history})],2)],2):t._e()])],1)}),[],!1,null,null,null).exports);e.default=(t={},e="instant-search",i="search-input")=>{const s=document.getElementById(e),n=document.getElementById(i);if(s&&n){const i=window.storefront&&window.storefront.getScopedSlots;new r.a({data:{isVisible:!1,term:""},created(){n.addEventListener("focusin",()=>{this.isVisible=!0,this.term=n.value})},render(r){const a=this;return r(I,{attrs:{id:e},props:{...t.props,term:a.term,isVisible:a.isVisible},on:{"update:is-visible"(t){a.isVisible=t},"update:term"(t){n.value=t}},scopedSlots:"function"==typeof i?i(s,r):void 0})}}).$mount(s)}}},function(t,e){t.exports=void 0},function(t,e){t.exports=void 0},function(t,e,i){"use strict";i.d(e,"b",(function(){return s})),i.d(e,"c",(function(){return r})),i.d(e,"a",(function(){return n})),i.d(e,"d",(function(){return a})),i.d(e,"e",(function(){return o})),i.d(e,"f",(function(){return c})),i.d(e,"h",(function(){return l})),i.d(e,"i",(function(){return u})),i.d(e,"g",(function(){return d})),i.d(e,"j",(function(){return p})),i.d(e,"k",(function(){return h})),i.d(e,"l",(function(){return f})),i.d(e,"m",(function(){return m})),i.d(e,"n",(function(){return _})),i.d(e,"o",(function(){return g})),i.d(e,"p",(function(){return b})),i.d(e,"q",(function(){return v})),i.d(e,"r",(function(){return y})),i.d(e,"s",(function(){return S})),i.d(e,"t",(function(){return x})),i.d(e,"u",(function(){return w})),i.d(e,"v",(function(){return O})),i.d(e,"w",(function(){return C})),i.d(e,"x",(function(){return k})),i.d(e,"y",(function(){return j})),i.d(e,"z",(function(){return P})),i.d(e,"A",(function(){return F})),i.d(e,"B",(function(){return R})),i.d(e,"C",(function(){return I})),i.d(e,"D",(function(){return T})),i.d(e,"E",(function(){return M})),i.d(e,"F",(function(){return $})),i.d(e,"G",(function(){return z})),i.d(e,"H",(function(){return A})),i.d(e,"I",(function(){return B})),i.d(e,"J",(function(){return L})),i.d(e,"K",(function(){return N})),i.d(e,"L",(function(){return E})),i.d(e,"M",(function(){return D})),i.d(e,"N",(function(){return V})),i.d(e,"O",(function(){return q})),i.d(e,"P",(function(){return H})),i.d(e,"Q",(function(){return U})),i.d(e,"R",(function(){return W})),i.d(e,"S",(function(){return G})),i.d(e,"T",(function(){return J})),i.d(e,"U",(function(){return Q})),i.d(e,"V",(function(){return Y})),i.d(e,"W",(function(){return X})),i.d(e,"X",(function(){return K})),i.d(e,"Y",(function(){return Z})),i.d(e,"Z",(function(){return tt})),i.d(e,"ab",(function(){return et})),i.d(e,"bb",(function(){return it})),i.d(e,"cb",(function(){return st})),i.d(e,"db",(function(){return rt})),i.d(e,"eb",(function(){return nt})),i.d(e,"fb",(function(){return at})),i.d(e,"gb",(function(){return ot})),i.d(e,"hb",(function(){return ct})),i.d(e,"ib",(function(){return lt})),i.d(e,"jb",(function(){return ut})),i.d(e,"kb",(function(){return dt})),i.d(e,"lb",(function(){return pt})),i.d(e,"mb",(function(){return ht})),i.d(e,"pb",(function(){return ft})),i.d(e,"nb",(function(){return mt})),i.d(e,"ob",(function(){return _t})),i.d(e,"qb",(function(){return gt})),i.d(e,"rb",(function(){return bt})),i.d(e,"sb",(function(){return vt})),i.d(e,"tb",(function(){return yt})),i.d(e,"ub",(function(){return St})),i.d(e,"vb",(function(){return xt})),i.d(e,"wb",(function(){return wt})),i.d(e,"xb",(function(){return Ot})),i.d(e,"yb",(function(){return Ct})),i.d(e,"zb",(function(){return kt})),i.d(e,"Ab",(function(){return jt})),i.d(e,"Bb",(function(){return Pt})),i.d(e,"Cb",(function(){return Ft})),i.d(e,"Db",(function(){return Rt})),i.d(e,"Eb",(function(){return It})),i.d(e,"Fb",(function(){return Tt})),i.d(e,"Gb",(function(){return Mt})),i.d(e,"Hb",(function(){return $t}));const s={en_us:"Add to cart",pt_br:"Adicionar ao carrinho"},r={en_us:"Add to favorites",pt_br:"Adicionar aos favoritos"},n={en_us:"Add $1 to earn",pt_br:"Adicione $1 para ganhar"},a={en_us:"All",pt_br:"Todos"},o={en_us:"As of",pt_br:"A partir de"},c={en_us:"At sight",pt_br:"À vista"},l={en_us:"Buy",pt_br:"Comprar"},u={en_us:"Buy kit",pt_br:"Comprar kit"},d={en_us:"Brands",pt_br:"Marcas"},p={en_us:"Calculate shipping",pt_br:"Calcular frete"},h={en_us:"Categories",pt_br:"Categorias"},f={en_us:"Clear filters",pt_br:"Limpar filtros"},m={en_us:"Close",pt_br:"Fechar"},_={en_us:"Close filters",pt_br:"Fechar filtros"},g={en_us:"Connection error, click product to try again",pt_br:"Erro de conexão, clique no produto para tentar novamente"},b={en_us:"Days",pt_br:"Dias"},v={en_us:"Did you mean",pt_br:"Você quis dizer"},y={en_us:"Discount of",pt_br:"Desconto de"},S={en_us:"Email",pt_br:"E-mail"},x={en_us:"Ends in",pt_br:"Acaba em"},w={en_us:"Filter",pt_br:"Filtro"},O={en_us:"Filter results",pt_br:"Filtrar resultados"},C={en_us:"Free",pt_br:"Grátis"},k={en_us:"Free shipping",pt_br:"Frete grátis"},j={en_us:"Free shipping from",pt_br:"Frete grátis a partir de"},P={en_us:"From",pt_br:"De"},F={en_us:"Fullscreen",pt_br:"Tela cheia"},R={en_us:"Highest price",pt_br:"Maior preço"},I={en_us:"Interest free",pt_br:"Sem juros"},T={en_us:"Item",pt_br:"Item"},M={en_us:"Items",pt_br:"Itens"},$={en_us:"Items found",pt_br:"Itens encontrados"},z={en_us:"Unable to load product information, please check your internet connection.",pt_br:"Não foi possível carregar informações do produto, por favor verifique sua conexão."},A={en_us:"Lowest price",pt_br:"Menor preço"},B={en_us:"Max quantity",pt_br:"Quantidade máxima"},L={en_us:"Minimum quantity",pt_br:"Quantidade mínima"},N={en_us:"Name",pt_br:"Nome"},E={en_us:"Next",pt_br:"Próximo"},D={en_us:"No results for",pt_br:"Nenhum produto encontrado para"},V={en_us:"Of",pt_br:"De"},q={en_us:"Of discount",pt_br:"De desconto"},H={en_us:"Offer",pt_br:"Oferta"},U={en_us:"On",pt_br:"No"},W={en_us:"On freight",pt_br:"No frete"},G={en_us:"Only",pt_br:"Apenas"},J={en_us:"Open gallery",pt_br:"Abrir galería"},Q={en_us:"Out of stock",pt_br:"Sem estoque"},Y={en_us:"Payment options",pt_br:"Opções de pagamento"},X={en_us:"Per unit",pt_br:"Por unidade"},K={en_us:"Pick up today",pt_br:"Retire hoje"},Z={en_us:"Popular products",pt_br:"Produtos populares"},tt={en_us:"Previous",pt_br:"Anterior"},et={en_us:"Price",pt_br:"Preço"},it={en_us:"Production deadline",pt_br:"Prazo de produção"},st={en_us:"Quantity",pt_br:"Quantidade"},rt={en_us:"Receive today",pt_br:"Receba hoje"},nt={en_us:"Refine search",pt_br:"Refinar busca"},at={en_us:"Releases",pt_br:"Lançamentos"},ot={en_us:"Relevance",pt_br:"Relevância"},ct={en_us:"Remove from favorites",pt_br:"Remover dos favoritos"},lt={en_us:"Results",pt_br:"Resultados"},ut={en_us:"Retry",pt_br:"Tentar novamente"},dt={en_us:"Sales",pt_br:"Vendas"},pt={en_us:"Search",pt_br:"Buscar"},ht={en_us:"Search again",pt_br:"Buscar novamente"},ft={en_us:"Searching for",pt_br:"Buscando por"},mt={en_us:"Couldn't perform search, please check your internet connection.",pt_br:"Não foi possível realizar a busca, por favor verique sua conexão."},_t={en_us:"Search products",pt_br:"Buscar produtos"},gt={en_us:"See all",pt_br:"Ver todos"},bt={en_us:"See more info",pt_br:"Veja mais informações"},vt={en_us:"Select",pt_br:"Selecionar"},yt={en_us:"Select variation",pt_br:"Selecionar variação"},St={en_us:"Please select an option in each field above",pt_br:"Por favor selecione uma opção em cada campo acima"},xt={en_us:"Share",pt_br:"Compartilhar"},wt={en_us:"Share on Facebook",pt_br:"Compartilhar no Facebook"},Ot={en_us:"Sort",pt_br:"Ordenar"},Ct={en_us:"To",pt_br:"Por"},kt={en_us:"Unavailable",pt_br:"Indisponível"},jt={en_us:"Units",pt_br:"Unidades"},Pt={en_us:"Units in stock",pt_br:"Unidades em estoque"},Ft={en_us:"Until tomorrow",pt_br:"Até amanhã"},Rt={en_us:"Up to",pt_br:"Até"},It={en_us:"Video",pt_br:"Vídeo"},Tt={en_us:"Working days",pt_br:"Dias úteis"},Mt={en_us:"You earn",pt_br:"Você ganha"},$t={en_us:"Zip code",pt_br:"CEP"}}]).default;
2
2
  //# sourceMappingURL=widget-search.var.min.js.map