1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4157],{44157:function(i,r,l){l.r(r);var e=l(21857),a=l.n(e),s=l(27378),t=l(30704),d=l(74891),o=l(42354),n=l(64251),u=l(57764),c=l(1814),m=l(53714),p=l(24246),trimOptional=i=>{var r=null==i?void 0:i.trim();return""===r?void 0:r},formatProductUrl=i=>{var r=null==i?void 0:i.trim();return r?"/".concat(r,"/p"):"#"},getSearchTerm=(i,r)=>{var l,e=null==i?void 0:i.trim().substring(0,5);return null!==(l=null!=e?e:null==r?void 0:r.trim())&&void 0!==l?l:""},formatCtaUrl=i=>{var r,l,e,{currentProductReference:a,productId:s,searchTerm:t,url:d}=i;return(null!==(r=trimOptional(d))&&void 0!==r?r:"/s?query={{searchTerm}}").replace(/{{searchTerm}}/g,encodeURIComponent(t)).replace(/{{productReference}}/g,encodeURIComponent(null!==(l=null==a?void 0:a.trim())&&void 0!==l?l:"")).replace(/{{productId}}/g,encodeURIComponent(null!==(e=null==s?void 0:s.trim())&&void 0!==e?e:""))},getDisplayProducts=(i,r)=>{var l,e=null!==(l=null==r?void 0:r.trim())&&void 0!==l?l:"";return i.filter(i=>{var r,l,a,s,t=null!==(r=null!==(l=null===(a=i.sku)||void 0===a?void 0:a.trim())&&void 0!==l?l:null===(s=i.id)||void 0===s?void 0:s.trim())&&void 0!==r?r:"";return!e||t!==e}).map(i=>{var r,l,e,a,s,t,d,o,n,u,c,m,p,v,f,h,x,g=null!==(r=null!==(l=null===(e=i.sku)||void 0===e?void 0:e.trim())&&void 0!==l?l:null===(a=i.id)||void 0===a?void 0:a.trim())&&void 0!==r?r:"",j=null!==(s=null===(t=i.offers)||void 0===t?void 0:null===(d=t.offers)||void 0===d?void 0:null===(o=d[0])||void 0===o?void 0:o.price)&&void 0!==s?s:0,k=null!==(n=null===(u=i.offers)||void 0===u?void 0:null===(c=u.offers)||void 0===c?void 0:null===(m=c[0])||void 0===m?void 0:m.listPrice)&&void 0!==n?n:j,y=null===(p=i.image)||void 0===p?void 0:p.find(i=>null==i?void 0:i.url);return!g||j<=0?null:{colorHex:"#d9d9d9",colorName:"",href:formatProductUrl(i.slug),imageAlt:null!==(v=null!==(f=null==y?void 0:y.alternateName)&&void 0!==f?f:i.name)&&void 0!==v?v:g,imageUrl:null!==(h=null==y?void 0:y.url)&&void 0!==h?h:"",isNewColor:!1,itemId:g,listPrice:k,name:null!==(x=i.name)&&void 0!==x?x:g,price:j,referenceId:g}}).filter(i=>!!i)};r.default=function(i){var r,l,e,v,f,h,x,g,{categoryUrl:j,ctaLabel:k,ctaUrl:y,currentProductGroupID:C,currentProductReference:N,currentSku:U,currentVoltage:I,productId:P,title:b}=i,w=null!==(r=null==P?void 0:P.trim())&&void 0!==r?r:"",O=trimOptional(C),Z=null!==(l=trimOptional(b))&&void 0!==l?l:"Outras op\xe7\xf5es dispon\xedveis para voc\xea",z=null!==(e=trimOptional(k))&&void 0!==e?e:"Ver todos os produtos",{globalDeliveryFacets:F}=(0,n.n)(),T=getSearchTerm(N,w),_=(0,s.useMemo)(()=>{var i=O?[{key:"similars",value:O}]:[];return a()((0,c.qo)(i),F)},[F,O]),R=(0,u.k)({after:"0",first:4,sort:"score_desc",term:T,selectedFacets:_},{suspense:!1}),A=null!==(v=null==R?void 0:null===(f=R.search)||void 0===f?void 0:null===(h=f.products)||void 0===h?void 0:null===(x=h.edges)||void 0===x?void 0:x.map(i=>i.node))&&void 0!==v?v:[],L=(0,s.useMemo)(()=>getDisplayProducts(A,U),[U,A]),S=null!==(g=trimOptional(j))&&void 0!==g?g:formatCtaUrl({currentProductReference:N,productId:w,searchTerm:T,url:y});return w?null==R?(0,p.jsxs)(o.Z,{"data-fs-similar-products":!0,"data-loading":"true","aria-busy":"true","aria-label":"Carregando produtos similares",children:[(0,p.jsx)("h2",{"data-fs-similar-products-title":!0,"aria-hidden":"true",children:(0,p.jsx)("span",{"data-fs-similar-products-skeleton-title":!0,"data-testid":"similar-products-skeleton-title"})}),(0,p.jsx)("ul",{"data-fs-similar-products-list":!0,"aria-hidden":"true",children:Array.from({length:4}).map((i,r)=>(0,p.jsx)("li",{"data-fs-similar-products-item":!0,children:(0,p.jsxs)("span",{"data-fs-similar-products-card":!0,"data-skeleton":"true","data-testid":"similar-products-skeleton-card",children:[(0,p.jsx)("span",{"data-fs-similar-products-skeleton-image":!0}),(0,p.jsxs)("span",{"data-fs-similar-products-content":!0,children:[(0,p.jsx)("span",{"data-fs-similar-products-skeleton-line":!0,"data-size":"small"}),(0,p.jsx)("span",{"data-fs-similar-products-skeleton-line":!0,"data-size":"large"}),(0,p.jsx)("span",{"data-fs-similar-products-skeleton-line":!0,"data-size":"medium"}),(0,p.jsx)("span",{"data-fs-similar-products-skeleton-line":!0,"data-size":"price"})]})]})},r))}),(0,p.jsx)("span",{"data-fs-similar-products-divider":!0,"aria-hidden":"true"}),(0,p.jsx)("span",{"data-fs-similar-products-see-all":!0,"aria-hidden":"true",children:(0,p.jsx)("span",{"data-fs-similar-products-skeleton-cta":!0,"data-testid":"similar-products-skeleton-cta"})})]}):0===A.length||0===L.length?null:(0,p.jsxs)(o.Z,{"data-fs-similar-products":!0,"aria-label":"Produtos similares dispon\xedveis",children:[(0,p.jsx)("h2",{"data-fs-similar-products-title":!0,children:Z}),(0,p.jsx)("ul",{"data-fs-similar-products-list":!0,children:L.map(i=>(0,p.jsx)("li",{"data-fs-similar-products-item":!0,"data-color":i.colorName?i.colorName:void 0,"data-color-hex":i.colorHex,"data-is-new-color":i.isNewColor?"true":"false",children:(0,p.jsxs)(t.Z,{"data-fs-similar-products-card":!0,href:i.href,children:[i.imageUrl&&(0,p.jsx)("span",{"data-fs-similar-products-image":!0,children:(0,p.jsx)(d.Z,{mediaType:"image",sizes:"90px",imageSources:{desktop:{src:i.imageUrl,alt:i.imageAlt,width:160,height:160,loading:"lazy",fetchPriority:"low"}}})}),(0,p.jsxs)("span",{"data-fs-similar-products-content":!0,children:[(0,p.jsx)("span",{"data-fs-similar-products-reference":!0,children:i.referenceId}),(0,p.jsx)("strong",{"data-fs-similar-products-name":!0,children:i.name}),i.listPrice>i.price&&(0,p.jsx)("span",{"data-fs-similar-products-list-price":!0,children:(0,m.L)(i.listPrice)}),(0,p.jsx)("span",{"data-fs-similar-products-price":!0,children:(0,m.L)(i.price)})]})]})},i.referenceId))}),(0,p.jsx)("span",{"data-fs-similar-products-divider":!0,"aria-hidden":"true"}),(0,p.jsx)(t.Z,{"data-fs-similar-products-see-all":!0,href:S,children:z})]}):null}},53714:function(i,r,l){l.d(r,{L:function(){return priceFormatter}});var e=l(68890),priceFormatter=function(i){var{locale:r=e.ZW,currency:l=e.a7,minimumFractionDigits:a=2,maximumFractionDigits:s=2}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=Number.isFinite(i)?i:0;return new Intl.NumberFormat(r,{style:"currency",currency:l,minimumFractionDigits:a,maximumFractionDigits:s}).format(t)};r.Z=priceFormatter}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.