(window.webpackJsonp=window.webpackJsonp||[]).push([[0,136],{310:function(t,e,r){"use strict";r.r(e);var o=r(2);function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,o)}return r}function c(t){for(var e=1;e({flyToCartAnimationConfig:{tt:0,ll:0,ballFlag:!1}}),computed:{flyToCartWrapperId(){return"fly-to-cart-wrapper-".concat(this.product.codigo)}},methods:{fireFlyToCartAnimation(){var{y:t,w:e}=this.getFlyToCartAnimationPositions();this.flyToCartAnimationConfig=c(c({},this.flyToCartAnimationConfig),{},{tt:t,ll:e,ballFlag:!this.flyToCartAnimationConfig.ballFlag}),this.$store.commit("cart/SET_PRODUCT_RECENTLY_ADDED",!1)},onFlyToCartAnimationEnter(t,e){var r=this.getBallRef().getBoundingClientRect(),o=document.getElementById("smallball").getBoundingClientRect(),n=o.left-r.left,c=o.top-r.top;t.style.transform="translate(".concat(n,"px,").concat(c,"px)"),t.style.transition="all 5.0s",e()},beforeFlyToCartAnimationEnter(t){t.style.transform="translate(0,0)"},afterFlyToCartAnimationEnter(){this.flyToCartAnimationConfig.ballFlag=!this.flyToCartAnimationConfig.ballFlag},getBallRef(){return this.$refs["fly-to-cart-animation-ball"]},getFlyToCartAnimationPositions(){var div=document.getElementById(this.flyToCartWrapperId),rect=div.getBoundingClientRect();return{y:div.clientHeight-100,w:rect.width/2}}}}},312:function(t,e,r){"use strict";r.r(e);r(137);var o=r(2),n=(r(15),r(34),r(12)),c=r(22),l=r(4),d=r(63),f=r(310),m=r(38);function h(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,o)}return r}function v(t){for(var e=1;e!1}},data:()=>({qty:0,showProductImg:!1,time:!1,sheet:!1,OFFER_TYPES:c.a.OFFER_TYPES,networks:[{network:"whatsapp",name:"Whatsapp",icon:"fab fa-whatsapp",color:"#25d366"},{network:"facebook",name:"Facebook",icon:"fab fa-facebook-f",color:"#1877f2"},{network:"twitter",name:"Twitter",icon:"fab fa-twitter",color:"#1da1f2"},{network:"email",name:"Email",icon:"far fa-envelope",color:"#333333"},{network:"messenger",name:"Messenger",icon:"fab fa-facebook-messenger",color:"#0084ff"},{network:"telegram",name:"Telegram",icon:"fab fa-telegram-plane",color:"#0088cc"},{network:"flipboard",name:"Flipboard",icon:"fab fa-flipboard",color:"#e12828"}]}),computed:v(v({},Object(n.b)({products:"cart/products",productRecentlyAdded:"cart/productRecentlyAdded"})),{},{productUrl(){return{name:this.isPriceListPage?"price-list.products.show":"products.show",params:{product:this.product.slug,category:Object(l.x)(this.product.category.nombre)}}},productCoverUrl(){var t=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);return this.product.coverUrl?this.requestResizedImage(this.product.coverUrl,{w:200,q:60,fm:t?"":"webp",fit:"max",sharp:0}):"/images/product/IMAGEN-NO-DISPO.png"},optimizedProductCoverUrl(){if(!this.product.coverUrl)return"/images/product/IMAGEN-NO-DISPO.png";var t=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);return this.requestResizedImage(this.product.coverUrl,{w:this.responsiveWidth,h:this.responsiveHeight,fit:"cover",q:this.calculateQuality(),fm:t?"jpg":"webp",dpr:1,crop:"entropy"})},placeholderUrl(){return this.product.coverUrl?this.requestResizedImage(this.product.coverUrl,{w:20,q:10,blur:5,fm:"webp"}):"/images/product/IMAGEN-NO-DISPO.png"},responsiveWidth(){return this.$vuetify.breakpoint.xl?280:this.$vuetify.breakpoint.lg?240:this.$vuetify.breakpoint.md?210:160},responsiveHeight(){return this.$vuetify.breakpoint.xl?280:this.$vuetify.breakpoint.lg?240:this.$vuetify.breakpoint.md?210:160},responsive(){return{xs:{tab:!0,btnDetails:!1,cardText:"50px",imageHeight:"120px",productName:this.screenWith<375?37:54},sm:{tab:!0,btnDetails:!1,cardText:"48px",imageHeight:"108px",productName:54},md:{tab:!1,btnDetails:!0,cardText:"46px",imageHeight:"150px",productName:55},lg:{tab:!1,btnDetails:!0,cardText:"50px",imageHeight:"150px",productName:65},xl:{tab:!1,btnDetails:!0,cardText:"55px",imageHeight:"290px",productName:75}}[this.$vuetify.breakpoint.name]},screenWith(){return this.$vuetify.breakpoint.width},transitionClasses(){var t="d-flex transition-fast-in-fast-out darken-2 font-weight-bold white--text v-card--reveal";return this.responsive.btnDetails?t:"".concat(t,"-movil")},isHomePage(){return this.routeIs("home")},isCartPage(){return this.routeIs("cart")},isHidenPage(){return this.routeIs("products.show")||this.routeIs("price-list.products.show")||this.routeIs("cart")||this.routeIs("price-list.cart")},isPriceListPage(){return this.routeIs("price-list")||this.routeIs("price-list.cart")||this.routeIs("price-list.products.show")},isMobile(){return this.$isMobile()},total(){return Object(l.l)(this.product,this.qty||1)},categories(){return this.$store.getters["commons/categories"]},sharing(){var t=this.product,e=[{text:"",isValid:!t.hasOffer},{text:"".concat(t.offer_2x1_value,"x1"),isValid:t.offerIs2X1},{text:"".concat(t.preciooferta,"%"),isValid:t.tipooferta===this.OFFER_TYPES.percentage},{text:"".concat(this.percentage(t.preciooferta,t.precio),"%"),isValid:!0}].find(label=>label.isValid).text,title="Mira lo que encontré en FBX!! 🤩 ".concat(t.nombre.toUpperCase()," 🐟🦀🐙 *se encuentra en OFERTA ").concat(e,"* aprovecha antes que se agote. Pincha el siguiente link 👇🏻"),r=this.isPriceListPage?"lista-de-precios/productos":"productos";return{hashtags:"FBX,",title:title.replace("*se encuentra en OFERTA *","").replace(" ",""),description:"¡¡echemos un vistazo!!🤩",url:"".concat("https://test.fishboxchile.cl","/").concat(r,"/").concat(this.product.category.nombre.replace(" ","-").toLowerCase(),"/").concat(this.product.codigo),img:this.productCoverUrl}}}),watch:{qty(t){var e=0;this.products.forEach(p=>{p.codigo===this.product.codigo&&t+p.qty>999&&(e=999-p.qty)}),this.$emit("input",e>0?e:this.qty)}},created(){setTimeout(()=>{this.showProductImg=!0},2)},methods:{calculateQuality(){return this.$vuetify.breakpoint.mobile?62:68},percentage:(t,e)=>Math.round(100*(1-t/e)),clear(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.qty=0,t&&this.products.some(t=>t.codigo===this.product.codigo)&&this.fireFlyToCartAnimation()},productDetail(){this.isCartPage||this.$router.push(this.productUrl)},afterFlyToCartAnimationEnter(){this.flyToCartAnimationConfig.ballFlag=!this.flyToCartAnimationConfig.ballFlag,this.triggerPremiumCartEffect()},triggerPremiumCartEffect(){var t=document.getElementById("smallball");if(t){var e=document.createElement("div");e.className="premium-cart-effect";var rect=t.getBoundingClientRect();e.style.cssText="\n position: fixed;\n top: ".concat(rect.top+rect.height/2,"px;\n left: ").concat(rect.left+rect.width/2,"px;\n transform: translate(-50%, -50%);\n z-index: 10000;\n pointer-events: none;\n "),document.body.appendChild(e),setTimeout(()=>{e.parentNode&&e.parentNode.removeChild(e)},2e3)}}}},C=y,_=(r(876),r(877),r(1)),component=Object(_.a)(C,function(){var t=this,e=t._self._c;return e("v-hover",{scopedSlots:t._u([{key:"default",fn:function(r){var{hover:o}=r;return[e("v-card",{staticClass:"premium-product-card",class:{"card-hover":o},attrs:{id:t.flyToCartWrapperId,height:"auto","min-width":"95%","max-width":"100%",color:"white",elevation:o?12:4}},[e("div",{staticClass:"premium-badge-container"},[e("transition",{attrs:{name:"fly-to-cart"},on:{enter:t.onFlyToCartAnimationEnter,"before-enter":t.beforeFlyToCartAnimationEnter,"after-enter":t.afterFlyToCartAnimationEnter}},[t.flyToCartAnimationConfig.ballFlag?e("img",{ref:"fly-to-cart-animation-ball",staticClass:"ball elevation-12",style:{top:"".concat(t.flyToCartAnimationConfig.tt,"px"),left:"".concat(t.flyToCartAnimationConfig.ll,"px")},attrs:{loading:"lazy",src:t.productCoverUrl,"lazy-src":t.productCoverUrl}}):t._e()]),t._v(" "),e("div",{staticClass:"status-badges"},[e("v-fade-transition",[t.product.hasOffer?e("div",{staticClass:"premium-offer-badge",class:t.time?"pulse-animation":""},[e("span",{staticClass:"text-uppercase badge-text",style:"background: linear-gradient(135deg, ".concat(t.product.preferences.offer_tag.color||"#F47530"," 0%, ").concat(t.product.preferences.offer_tag.color||"#F47530","B3 100%) !important;"),domProps:{textContent:t._s(t.product.preferences.offer_tag.label||"¡Oferta!")}})]):t.product.isNew||t.product.agotado?e("div",{staticClass:"premium-status-badge",class:t.time?"pulse-animation":""},[e("span",{staticClass:"text-uppercase badge-text",style:"background: ".concat(t.product.agotado?"linear-gradient(135deg, #EF9A9A 0%, #D50000 100%)":"linear-gradient(135deg, #69F0AE 0%, #1B5E20 100%)"," !important;")},[t._v("\n "+t._s(t.product.agotado?"Agotado":"Nuevo")+"\n ")])]):t._e()])],1)],1),t._v(" "),e("v-lazy",{attrs:{options:{threshold:0}}},[e("div",{staticClass:"image-container"},[e("v-card",{staticClass:"premium-image-card",attrs:{flat:"",color:"white"}},[e("v-img",{staticClass:"premium-product-image align-end",class:{"image-hover":o},attrs:{loading:"lazy",src:t.optimizedProductCoverUrl,"lazy-src":t.placeholderUrl,alt:t.product.name||"Producto FBX",height:t.responsive.imageHeight,"aspect-ratio":1,contain:""},on:{click:t.productDetail},scopedSlots:t._u([{key:"placeholder",fn:function(){return[e("v-row",{staticClass:"fill-height ma-0",attrs:{align:"center",justify:"center"}},[e("v-progress-circular",{attrs:{size:t.$isMobile()?40:60,width:t.$isMobile()?4:8,indeterminate:"",color:"fishboxColor","aria-label":"cargando"}})],1)]},proxy:!0}],null,!0)},[t._v(" "),t.responsive.btnDetails?e("v-expand-transition",[o?e("div",{staticClass:"premium-overlay",class:t.transitionClasses,attrs:{"x-small":t.responsive.tab}},[e("v-btn",{staticClass:"overlay-btn",attrs:{icon:"",large:"",color:"white","aria-label":"Ver detalle del producto"},on:{click:function(e){return e.stopPropagation(),t.productDetail.apply(null,arguments)}}},[e("v-icon",[t._v("fa-eye")])],1)],1):t._e()]):t._e()],1)],1)],1)]),t._v(" "),t.isCartPage?t._e():e("v-btn",{staticClass:"premium-share-btn",attrs:{color:"white",fab:"",dark:"","x-small":"",absolute:"",top:"",right:"","aria-label":"Compartir producto"},on:{click:function(e){t.sheet=!0}}},[e("v-icon",{attrs:{size:"16"}},[t._v("fa-share-alt")])],1),t._v(" "),e("div",{staticClass:"premium-product-info"},[e("v-card-text",{staticClass:"premium-product-name py-2 px-3"},[e("p",{staticClass:"mt-1 font-weight-bold text-capitalize product-title",domProps:{textContent:t._s(t.str_limit(t.product.nombre.toLowerCase(),t.responsive.productName))},on:{click:t.productDetail}})]),t._v(" "),t.product.state?e("div",{staticClass:"premium-product-state px-3 py-1"},[e("v-icon",{staticClass:"state-icon",attrs:{color:"fresh"===t.product.state?"red":"light-blue",size:"16"}},[t._v("\n fas "+t._s("fresh"===t.product.state?"fa-fish":"fa-snowflake")+"\n ")]),t._v(" "),e("span",{staticClass:"state-text"},[t._v("\n Producto "+t._s("fresh"===t.product.state?"Fresco":"Congelado")+"\n ")])],1):t._e(),t._v(" "),e("v-col",{staticClass:"px-3 py-0",attrs:{cols:"12"}},[e("v-row",{attrs:{"no-gutters":"",align:"center"}},[e("v-col",{staticClass:"my-auto",attrs:{cols:"7"}},[e("v-card-actions",{staticClass:"pa-0 premium-rating"},[e("app-rating",{attrs:{readonly:"",size:"15",value:t.product.rating||0,length:t.screenWith<376?1:5}})],1)],1),t._v(" "),t.product.hasOffer?e("v-col",{staticClass:"text-right",attrs:{cols:"5"}},[e("v-chip",{staticClass:"premium-offer-chip font-weight-bold",attrs:{color:t.product.preferences.offer_tag.color||"pink","text-color":"white"}},[t.product.offerIs2X1?e("strong",[t._v("\n "+t._s(t.product.offer_2x1_value)+"x1\n ")]):t.product.tipooferta===t.OFFER_TYPES.percentage?e("strong",[t._v("\n - "+t._s(t.product.preciooferta)+"%\n ")]):e("strong",[t._v("\n - "+t._s(t.percentage(t.product.preciooferta,t.product.precio))+"%\n ")])])],1):t._e()],1)],1),t._v(" "),t.product.preferences.retail.length&&!t.isHidenPage?[e("v-divider",{staticClass:"premium-divider mx-4"}),t._v(" "),e("p",{staticClass:"premium-retail-title text-center mb-0 font-weight-bold"},[t._v("\n Valor Retail\n ")]),t._v(" "),e("v-card-actions",{staticClass:"pa-0 premium-retail-chips"},[e("v-spacer"),t._v(" "),t._l(t.product.preferences.retail,function(r,o){return e("div",{key:"retail_wrapper".concat(o)},[e("v-tooltip",{attrs:{top:"",color:r.color||"#1565C0"},scopedSlots:t._u([{key:"activator",fn:function(o){var{on:n,attrs:c}=o;return[e("v-chip",t._g(t._b({staticClass:"ma-0 retail-chip",attrs:{dark:"","x-small":"",color:r.color||"#1565C0"}},"v-chip",c,!1),n),[t._v("\n "+t._s(r.value)+"% +\n ")])]}}],null,!0)},[t._v(" "),e("span",{domProps:{textContent:t._s(r.text)}})]),t._v(" "),o=t.product.cant_min_oferta?50:null,flat:t.isMobile}},[e("v-spacer"),t._v(" "),t.product.hasOffer&&t.product.price=t.product.cant_min_oferta?[e("div",{tag:"component",staticClass:"text-center orange--text text-decoration-line-through original-price"},[t._v("\n "+t._s(t.$toCurrency(t.product.precio))+"\n ")]),t._v(" "),t.isMobile?e("div",{staticClass:"premium-price-separator"}):[t._v("\n   \n ")]]:t._e(),t._v(" "),e("div",{tag:"component",staticClass:"text-center current-price"},[t._v("\n "+t._s(t.$toCurrency(t.total))+"\n "),e("span",{staticClass:"body-2 unit"},[e("strong",{domProps:{textContent:t._s(t.product.unidad)}})])]),t._v(" "),e("v-spacer")],2),t._v(" "),t.product.hasOffer&&!t.product.offerIs2X1?e("v-col",{staticClass:"premium-offer-info pa-0 ma-0 text-center",attrs:{cols:"12"}},[e("strong",{staticClass:"font-weight-bold offer-text",class:t.isMobile?"":"text-caption",style:"color: ".concat(t.product.preferences.offer_tag.color,";")},[t._v("\n Agrega\n "+t._s(t.product.cant_min_oferta?t.product.cant_min_oferta:t.product.cantidaddesde)+"\n "+t._s(t.product.unidad)+" y obtén un\n "),t.product.tipooferta===t.OFFER_TYPES.percentage?e("strong",[t._v("\n "+t._s(t.product.preciooferta)+"%\n ")]):e("strong",[t._v("\n "+t._s(t.percentage(t.product.preciooferta,t.product.precio))+"%\n ")]),t._v("\n de descuento\n ")])]):t._e(),t._v(" "),e("v-divider",{staticClass:"premium-divider mx-4"}),t._v(" "),e("v-card-actions",{staticClass:"premium-quantity-actions pa-1"},[e("v-spacer"),t._v(" "),e("quantity-input",{staticClass:"mx-auto premium-quantity-input",attrs:{product:t.product},model:{value:t.qty,callback:function(e){t.qty=e},expression:"qty"}}),t._v(" "),e("v-spacer")],1)],2),t._v(" "),t.isCartPage?t._e():e("v-btn",{staticClass:"premium-details-btn",attrs:{dark:"",block:"",to:t.productUrl,color:"fishboxColor",disabled:t.disabled,small:!t.responsive.tab,"x-small":t.responsive.tab}},[e("v-icon",{attrs:{left:"",size:"18"}},[t._v("fa-info-circle")]),t._v(" "),e("strong",[t._v("\n Ver Detalles\n ")])],1),t._v(" "),e("v-bottom-sheet",{attrs:{inset:""},model:{value:t.sheet,callback:function(e){t.sheet=e},expression:"sheet"}},[e("v-sheet",{staticClass:"premium-share-sheet text-center rounded-t-xl"},[e("v-card",{staticClass:"premium-share-card"},[e("v-card-title",{staticClass:"premium-share-title justify-center py-3"},[t._v("\n Compartir Producto\n "),e("v-btn",{staticClass:"closeShareNetwork",attrs:{absolute:"","x-small":"",top:"",right:"",fab:"",color:"error","aria-label":"Cerrar opciones para compartir"},on:{click:function(e){t.sheet=!t.sheet}}},[e("v-icon",[t._v("\n fa-times\n ")])],1)],1),t._v(" "),t.sheet?e("v-card-text",{staticClass:"px-1 py-3"},t._l(t.networks,function(r,i){return e("ShareNetwork",{key:i,staticStyle:{"text-decoration":"none !important"},attrs:{url:t.sharing.url,title:t.sharing.title,quote:t.sharing.quote,network:r.network,hashtags:t.sharing.hashtags,description:t.sharing.description,"twitter-user":t.sharing.twitterUser,media:t.sharing.img}},[e("v-btn",{staticClass:"ma-1 premium-share-network-btn",attrs:{"x-small":t.$isMobile(),fab:"",color:r.color,dark:"","aria-label":"Compartir por ".concat(r.name)},on:{click:function(e){t.sheet=!1}}},[e("v-icon",{attrs:{size:t.$isMobile()?18:24}},[t._v(t._s(r.icon))])],1)],1)}),1):t._e()],1)],1)],1)],1)]}}])})},[],!1,null,"8ef422ca",null);e.default=component.exports},808:function(t,e,r){t.exports={}},809:function(t,e,r){t.exports={}},876:function(t,e,r){"use strict";r(808)},877:function(t,e,r){"use strict";r(809)}}]);