@soma-vertical-web/multi-lib 0.0.41 → 0.0.42

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),f=require("react"),x=require("./Footer-okPVOqRy.js"),Pe=require("zustand"),d=require("@soma-vertical-web/core-components"),kr=require("js-cookie"),Ar=require("jose"),de=require("@soma-vertical-web/foundations"),pt=require("axios"),Tr=require("react-dom"),Q=require("draft-js"),ft=require("@date-fns/tz"),Ke=f.createContext({}),Mr=({data:e,children:n})=>t.jsx(Ke.Provider,{value:{tags:e==null?void 0:e.config},children:n}),Xe=()=>{const{tags:e}=f.useContext(Ke),n=f.useCallback(r=>{var l,i,c,u;const s=(i=(l=e==null?void 0:e.commercial)==null?void 0:l.items)==null?void 0:i.find(m=>{var h;return(h=r??[])==null?void 0:h.find(p=>p.id===m.key)}),o=(u=(c=e==null?void 0:e.institucional)==null?void 0:c.items)==null?void 0:u.find(m=>{var h;return(h=r??[])==null?void 0:h.find(p=>p.id===m.key)}),a=e==null?void 0:e.flagPdp;return{commercial:s,institucional:o,flagPdp:a}},[e]);return{tags:e,getAvailableProductTag:n}},Mt=({gridScrollBack:e})=>{f.useEffect(()=>{typeof window<"u"&&(e!=null&&e.refer)&&sessionStorage.setItem(e==null?void 0:e.refer,"true")},[])},Rt=f.createContext({}),Rr=({children:e,gridScrollBack:n})=>{const r=f.useRef(null);return Mt({gridScrollBack:n}),t.jsx(Rt.Provider,{value:{sizesContainerRef:r},children:e})},Or=()=>{const e=f.useContext(Rt);if(e===void 0)throw new Error("useContext(PDPContext) must be used within a PDPProvider");return e},K=(e,n=!0)=>Intl.NumberFormat("pt-BR",{style:"currency",currency:"BRL",minimumFractionDigits:n?2:0}).format(e),Ye=({valueInCents:e,hasFree:n,freeTaxMessage:r})=>e===0?n?r:K(0):K(e/100),Ot=({items:e,NAME_SPLIT_SYMBOL:n})=>{const r={price:0,listPrice:0,installments:{count:0,value:0}},s=(l,i)=>{var p;i&&(i.sellerId=l.sellerId,i.sellerName=l.sellerName,i.available=!0,i.isSellerDefault=l.sellerDefault);const{Price:c,ListPrice:u,PaymentOptions:{installmentOptions:m}}=l.commertialOffer;r.price=c,r.listPrice=u;const h=(p=m==null?void 0:m[0])==null?void 0:p.installments;if(h){const{count:_,value:g}=h[h.length-1];r.installments={count:_,value:g/100}}};let o=!0;const a=e.reduce((l,i)=>{var m;const c={name:i.name,sku:i.itemId,value:((m=i.Tamanho)==null?void 0:m[0])??x.splitNameAndSizeFromFullName(i.nameComplete??i.name,n).size,available:!1,sellerId:"",sellerName:"",isSellerDefault:!1},u=i.sellers.filter(h=>(h.sellerDefault&&h.commertialOffer.IsAvailable&&(c.available=!0,s(h,c)),h.commertialOffer.IsAvailable));return!c.isSellerDefault&&u.length>0&&(c.available=!0,s(u[0],{...c,sellerId:u[0].sellerId,sellerName:u[0].sellerName})),c.available===!1&&(o=!1),l.push(c),l},[]);return{...r,sizes:a,allSizesAvailable:o}},Lt=e=>e?!e.offers.offers.find(({quantity:n=0})=>n>0):!1,Qe=(e,n)=>{const r=e.find(s=>s.availability.includes("InStock")&&s.quantity&&s.listPrice>0&&s.seller.identifier===n);return r||e.find(s=>s.availability.includes("InStock")&&s.quantity&&s.listPrice>0)},Dt=e=>e.find(n=>n.imageLabel==="10"),zt=(e,n)=>{const r=/\/ids\/(\d+)\//,s=e.match(r);return s?e.replace(`/${s[1]}/`,`/${s[1]}-${n.width}-${n.height}/`):e},Bt=(e,n)=>{const r=/\/ids\/(\d+)-(\d+)-(\d+)\//,s=e.match(r);return s?e.replace(`/${s[1]}-${s[2]}-${s[3]}/`,`/${s[1]}-${n.width}-${n.height}/`):e},$t=({images:e,label:n})=>{const r=e.filter(s=>s.keywords===n.first||s.keywords===n.second||s.alternateName===n.first||s.alternateName===n.second);return r.length===0?[e[0]]:r},Lr=e=>{const[n,r]=e.split("/").map(Number);if(Number.isNaN(n)||Number.isNaN(r))throw new Error("[ERROR ASPECT RATIO IMAGE]: Invalid aspect ratio format");return r/n},Ft=(e,n,r)=>{n&&(e?(n.getAttribute("src")||(n.src=r??""),n.play()):n.pause())},Dr=Object.freeze(Object.defineProperty({__proto__:null,disableSKU:Lt,formatPriceToCurrency:K,freightParsePrice:Ye,getAspectRatio:Lr,getColorAndSizeFromSkuName:x.getColorAndSizeFromSkuName,getFirstImages:$t,getProductNameWithoutSku:x.getProductNameWithoutSku,getSKUName:x.getSKUName,getSkuInfos:Ot,getThumbImage:Dt,getValidOffer:Qe,removeSlashes:x.removeSlashes,resizingImg:zt,setVideoPlay:Ft,splitNameAndSizeFromFullName:x.splitNameAndSizeFromFullName,updatedResizedImg:Bt},Symbol.toStringTag,{value:"Module"})),Ut=f.createContext({}),zr=({children:e,productData:n,isKit:r,PDP_INFO:s,NAME_SPLIT_SYMBOL:o})=>{var R,S;const{sendDataLayerEvent:a,triggerSelectItemEventRef:l}=x.useEventContext(),{productId:i,productName:c,items:u,items:[{images:m,Videos:h}],description:p,["Composição"]:_="",productReference:g,categories:[C]}=n,{getAvailableProductTag:y}=Xe(),v=y(Object.entries(n.clusterHighlights).map(E=>({id:E[0],name:E[1]}))),N=C.slice(1,-1).split("/"),{installments:j,price:w,listPrice:b,sizes:I,allSizesAvailable:k}=Ot({items:u,NAME_SPLIT_SYMBOL:o}),D=Dt(m),F=[{label:`${s.product.description}`,value:"description",content:p},{label:`${s.product.materiais}`,value:"composition",content:_}],M=((S=x.getColorAndSizeFromSkuName((R=n.items)==null?void 0:R[0].name,o))==null?void 0:S.color)??n["Cores Filtráveis"][0]??"",B=()=>({commonData:{...n,sizes:I,price:w,listPrice:b,installments:j},customData:{installments:j==null?void 0:j.count,installment_value:Number(j==null?void 0:j.value).toFixed(2)}}),V=({sku:E,size:A})=>{const{commonData:P,customData:$}=B();a({functionKey:"productEvents",data:{event:"view_item",commonData:P,customData:{...$,...E&&{item_sku:E},...A&&{item_variant2:A}}}})};return f.useEffect(()=>{if(l.current.trigger){const{commonData:E,customData:A}=B();a({functionKey:"productEvents",data:{event:"select_item",commonData:E,customData:{...A,index:l.current.index}}}),l.current.trigger=!1}V({})},[]),t.jsx(Ut.Provider,{value:{productData:n,productId:i,productName:c,productReference:g,tag:v,items:u,sizes:I,allSizesAvailable:k,installments:j,price:w,listPrice:b,thumbImage:D,images:m,video:h[0],descriptionContent:F,breadcrumbList:N,isKit:r,colorName:M,handleViewItemEvent:V},children:e})},Je=()=>{const e=f.useContext(Ut);if(e===void 0)throw new Error("useContext(PDPDataContext) must be used within a PDPDataProvider");return e},ae=(e,n)=>Pe.create(r=>{const s=()=>r({value:e});return n&&n instanceof Set&&n.add(s),{value:e,actions:{setValue:o=>r({value:o}),reset:s}}}),_e={category:null,menuMobileIsOpen:!1,searchModalIsOpen:!1,userMenuIsOpen:!1},xe=new Set,Br=()=>{xe.forEach(e=>{e()})},qt=Pe.create((e,n)=>{const r=()=>e({value:_e.category});return xe.add(r),{value:_e.category,actions:{reset:r,setValue:s=>e(()=>({value:s})),updateValue:s=>{n().value!==s&&e({value:s})}}}}),ke=()=>qt(e=>e.value),re=()=>qt(e=>e.actions),Vt=ae(_e.menuMobileIsOpen,xe),Ze=()=>Vt(e=>e.value),ie=()=>Vt(e=>e.actions),Gt=ae(_e.searchModalIsOpen,xe),$r=()=>Gt(e=>e.value),et=()=>Gt(e=>e.actions),Ht=ae(_e.userMenuIsOpen,xe),Wt=()=>Ht(e=>e.value),ye=()=>Ht(e=>e.actions),Fr=Object.freeze(Object.defineProperty({__proto__:null,resetAllHeaderStores:Br,useActionsHeaderCategory:re,useActionsMenuMobileIsOpen:ie,useActionsSearchModalIsOpen:et,useActionsUserMenuIsOpen:ye,useGetHeaderCategoryStore:ke,useGetMenuMobileIsOpen:Ze,useGetSearchModalIsOpen:$r,useGetUserMenuIsOpen:Wt},Symbol.toStringTag,{value:"Module"})),ue={selectedSkuInfo:{productId:"",name:"",size:"",sku:"",sellerId:"",sellerName:"",available:!1,quantity:1},openLetMeKnow:!1,openMeasurements:!1,showBottomNavigation:!1,showNotify:!1},me=new Set,Ur=()=>{me.forEach(e=>{e()})},Kt=Pe.create(e=>{const n=()=>e({value:ue.selectedSkuInfo});return me.add(n),{value:ue.selectedSkuInfo,actions:{setValue:r=>e(s=>({value:{...s,...r}})),reset:n}}}),qr=()=>Kt(e=>e.value),Vr=()=>Kt(e=>e.actions),Xt=ae(ue.openLetMeKnow,me),Gr=()=>Xt(e=>e.value),Hr=()=>Xt(e=>e.actions),Yt=ae(ue.showNotify,me),Wr=()=>Yt(e=>e.value),Kr=()=>Yt(e=>e.actions),Qt=ae(ue.showBottomNavigation,me),Xr=()=>Qt(e=>e.value),Yr=()=>Qt(e=>e.actions),Jt=ae(ue.openMeasurements,me),Qr=()=>Jt(e=>e.value),Jr=()=>Jt(e=>e.actions),Zr=Object.freeze(Object.defineProperty({__proto__:null,resetAllPDPStores:Ur,useActionsPDPOpenLetMeKnow:Hr,useActionsPDPOpenMeasurements:Jr,useActionsPDPSelectedSkuInfo:Vr,useActionsPDPShowBottomNavigation:Yr,useActionsPDPShowNotify:Kr,useGetPDPOpenLetMeKnow:Gr,useGetPDPOpenMeasurements:Qr,useGetPDPSelectedSkuInfo:qr,useGetPDPShowBottomNavigation:Xr,useGetPDPShowNotify:Wr},Symbol.toStringTag,{value:"Module"})),Zt=f.createContext({}),es=({children:e,headerData:n,...r})=>{var m,h;const s=f.useRef(null),o=f.useRef(null),a=f.useRef(null),l=f.useRef(null),i=f.useRef(null),{mediatorRef:c,currentHeaderConfigsRef:u}=x.useGlobalContext();return(m=c.current)==null||m.subscribe("header:change_variant",p=>{var v,N,j;if(p&&u.current&&(u.current.bannerVariant=p),!s.current)return;const g=document.body.scrollTop>0,C=s.current.getAttribute("data-interactiveVariant"),y=g?C:p??((v=u.current)==null?void 0:v.bannerVariant)??"default";y!==((N=u.current)==null?void 0:N.headerVariant)&&(s.current.setAttribute("data-bottomdivider",String(g)),s.current.setAttribute("data-variant",String(y)),(j=c.current)==null||j.publish("herobanner:change_controllers_variant",y),u.current&&(u.current.headerVariant=y))}),(h=c.current)==null||h.subscribe("header:change_position",p=>{s.current&&(s.current.style.position=p)}),f.useEffect(()=>{const p=new AbortController,_=d.helpers.throttle(()=>{var C;return(C=c.current)==null?void 0:C.publish("header:change_variant",null)},200);document.body.addEventListener("scroll",_,{passive:!0,signal:p.signal});const g=C=>{var v;(v=C.target.closest("a"))==null||v.blur()};return s.current&&(s.current.addEventListener("click",g,{signal:p.signal}),s.current.addEventListener("touchend",g,{signal:p.signal})),()=>{p.abort()}},[]),t.jsx(Zt.Provider,{value:{headerData:n,structureRef:o,rootRef:s,tipbarRef:a,userMenuMobileRef:l,userMenuDesktopRef:i,...r},children:e})},L=()=>f.useContext(Zt),en=f.createContext({}),tn=({children:e})=>{const n=f.useRef(null),r=f.useRef(null),s=Ze(),o=f.useCallback(()=>{var a;{const l=(a=n.current)==null?void 0:a.querySelector("dialog");if(l){l.dataset.animation="out";const i=l.children[0];i.dataset.animation="out"}}},[]);return f.useEffect(()=>{var a;if(s)document.body.dataset.modalopen="true";else{document.body.dataset.modalopen="false";const l=(a=r.current)==null?void 0:a.querySelector("dialog");if(l){l.dataset.animation="out";const i=l.children[0];i.dataset.animation="out"}}},[s]),f.useEffect(()=>{r.current=document.body},[]),t.jsx(en.Provider,{value:{bodyRef:n,handleCloseSubMenu:o,documentBodyRef:r},children:e})},Ce=()=>f.useContext(en),ts=e=>{if(!e||typeof window>"u")return 0;const n=window.getComputedStyle(e);return parseInt(n.padding,10)},ns=(e,n,r)=>{if(!(e instanceof HTMLElement)||!(n instanceof HTMLElement))return{left:0,top:0};const s=n.getBoundingClientRect(),o=e.getBoundingClientRect(),a=e!=null&&e.parentElement?ts(e==null?void 0:e.parentElement):0;return{left:s.left+s.width/2-(o.width+a),top:s.top+s.height+r}},nn=f.createContext({}),rn=({children:e,delay:n=600,gap:r=20,...s})=>{const[o,a]=f.useState(!1),l=f.useRef(null),[i,c]=f.useState(!1),[u,m]=f.useState({left:0,top:0}),h=f.useCallback(()=>{c(!0),typeof window<"u"&&(l.current=window.setTimeout(()=>{a(!1),c(!1)},n))},[c,a,n]);return f.useEffect(()=>{if(typeof window>"u")return;const p=window.document.querySelector("#cart-button"),_=window.document.querySelector("#add-to-cart--tooltip");if(p&&_){const{left:g,top:C}=ns(_,p,r??0);m({left:g,top:C}),c(!1)}},[r,o]),t.jsx(nn.Provider,{value:f.useMemo(()=>({...s,...u,handleClose:h,isLeaving:i,isOpen:o,setIsOpen:a,setIsLeaving:c}),[s,u,h,i,o,a,c]),children:e})},le=()=>{const e=f.useContext(nn);if(e===void 0)throw new Error("useAddToCartContext must be used within a AddToCartProvider");return e},sn=f.createContext({}),rs=({children:e,CARTPROVIDER_MESSAGE_PRODUCT_REMOVE:n,...r})=>{const s=x.useCartStore(),{setRecentlyAdded:o}=x.useUIContext(),a=f.useRef(""),l=x.useGetNotificationsStore(),{addNotification:i,removeNotification:c}=x.useGetNotificationActions(),{addCoupon:u,addItem:m,addSellerCode:h,addMarketingData:p,emptyCart:_,isOpen:g,removeItem:C,shipping:y,shippingUpdate:v,toggleServiceToProduct:N,updateItemQuantity:j}=s;f.useEffect(()=>{const S=kr.get("lastMedias");if(s.id&&S&&a.current!==S){a.current=S;const E=new URLSearchParams(S),A=x.mountMarketingData(E);p(A)}},[s,p]);const w=f.useCallback(async(S,E)=>(E==="coupon"?u(S):h(S)).then(P=>{if(typeof P!="boolean"&&P instanceof Object){if(E==="seller"&&"value"in P){const{statusOk:$,value:z}=P,q=String(z??"").split(" - ");return x.getCode((q==null?void 0:q[0])??"",S,!!$)}return x.getCode(String(P.coupon),S,!0)}return x.getCode("","")}).catch(()=>Promise.resolve({code:400})),[u,h]),b=f.useCallback((S,E,A)=>{const{id:P}=S;j(P,E,A)},[j]),I=f.useCallback((S,E,A=!1)=>{if(!S)return;const{id:P}=S,$=x.findItemIndex(s.items,P);if($!==-1&&!A){const z=Number(s.items[$].quantity),q=s.items[$]?z+1:1;b(S,q,E)}else m({id:P,quantity:(S==null?void 0:S.quantity)??1,seller:S.seller});g||o(z=>[...z,S])},[m,b,s.items,g,o]),k=f.useCallback((S,E)=>{if(!S||!Array.isArray(S))return;o(P=>[...P,...S]);const A=S.map(P=>{const{id:$,quantity:z,seller:q}=P,W=x.findItemIndex(s.items,$),Pr=x.getQuantity(z??1,W);return{id:$,quantity:Pr,seller:q}});m(A,E)},[m,s.items,o]),D=f.useCallback(async(S,E,A)=>S?C(S).then(()=>(i(E??`${n}`,A),x.getCode(S,S))):Promise.resolve(x.getCode("","Product id required")),[i,C]),F=f.useCallback(()=>{s.items.length>0&&_()},[_,s.items]),M=f.useCallback((S,E="BRA")=>y(S,E),[y]),B=f.useCallback(S=>{S&&v(S)},[v]),V=f.useCallback(async(S,E,A)=>{const P=s.items.findIndex(z=>z.id===S);return s.items[P]&&P>=0?N(E,P,A??!1):!1},[s.items,N]),R=f.useCallback(async(S,E)=>j(S,E).then(A=>{if(Array.isArray(A)){const P=A.find($=>$.id===S);if(P&&(P==null?void 0:P.quantity)<E)return String(P.quantity)}return!1}),[j]);return t.jsx(sn.Provider,{value:f.useMemo(()=>({...r,addCouponSeller:w,addToCart:I,addItemsToCart:k,cartStore:s,notifications:l,clearCart:F,addNotification:i,isOpen:s.isOpen,removeNotification:c,removeToCart:D,setIsOpen:s.setIsOpen,shipping:M,shippingUpdateOption:B,toggleGiftItemCart:V,updateItemQuantity:R}),[r,w,I,k,l,F,i,s,c,D,M,B,V,R]),children:e})},Z=()=>{const e=f.useContext(sn);if(e===void 0)throw new Error("useCartContext must be used within a CartProvider");return e},on=f.createContext({}),tt=({children:e,fetch:n})=>{const r=f.useRef(!0),[s,o]=f.useState(null),[a,l]=f.useState(!1);return f.useEffect(()=>{(async()=>{r.current=!0;try{const c=await n();if(!c.ok)throw new Error("Failed to fetch data");const u=await c.json();o(u.data),r.current=!1}catch{r.current=!0,l(!0)}})()},[n]),t.jsx(on.Provider,{value:f.useMemo(()=>({data:s,isLoading:r.current??!1,isError:a}),[s,a,r]),children:e})},nt=()=>{const e=f.useContext(on);if(e===void 0)throw new Error("useProductsContext must be used within a useRootContext");return e},an=f.createContext({}),ln=({children:e,sort:n,state:r,count:s,collectionId:o,CONSTANTS:a})=>{const l=f.useMemo(()=>{var i;return o?[{key:"productclusterids",value:o.toString()}]:(i=r.base)!=null&&i.length?r.base.slice(1).split("/").map((c,u)=>({key:`category-${u+1}`,value:c})):[]},[r.base,o]);return t.jsx(an.Provider,{value:f.useMemo(()=>({state:{...r,facets:[...l,...r.facets??[]]},sort:n,count:s??a.ITEMS_PER_PAGE}),[l,s,n,r]),children:e})},rt=()=>{const e=f.useContext(an);if(e===void 0)throw new Error("useSearchContext must be used within a SearchProvider");return e},cn=f.createContext({}),ss=({children:e,searchParams:n,selectedFacets:r})=>{const{data:s,...o}=nt(),{router:a}=x.useNextContext(),l=f.useCallback((h,p)=>{if(p){if(h.key.toLocaleLowerCase()==="price"){const _=p.getAll("facets");p.delete("facets"),_.forEach(g=>{const[C]=g.split("/");C!==h.key&&p.append("facets",g)})}p.set("page","1"),p.append("facets",`${h.key}/${h.value}`),a.push(`?${p.toString()}`)}},[a]),i=f.useCallback(()=>{const h=new URLSearchParams;h.set("sort",x.PLP_FILTERS_SORT.default_option),h.set("page","1"),a.push(`?${h.toString()}`)},[a]),c=f.useCallback((h,p)=>{if(!p||!p.has&&!p.has("facets"))return;const _=p.getAll("facets");p.delete("facets"),p.set("page","1"),_.forEach(g=>{const[C,y]=g.split("/");(C!==h.key||y!==h.value)&&p.append("facets",g)}),a.push(`?${p.toString()}`)},[a]),u=f.useCallback(h=>{const p=new URLSearchParams(x.convertSearchParams(n));for(const[,_]of p.entries()){const[g,C]=_.split("/");if(g===h.key&&C===h.value)return c(h,p)}return l(h,p)},[l,c,n]),m=f.useCallback(h=>{const p=new URLSearchParams(x.convertSearchParams(n));p.set("sort",h.replace("_",":")),a.push(`?${p.toString()}`)},[a,n]);return t.jsx(cn.Provider,{value:f.useMemo(()=>({...o,breadcrumb:s&&"breadcrumb"in s?s==null?void 0:s.breadcrumb:[],deleteAllFacets:i,facets:s&&"facets"in s?s==null?void 0:s.facets:[],selectedFacets:r,onToggleFacet:u,onSort:m,searchParams:n}),[s,i,m,u,o,r,n]),children:e})},os=({children:e,searchParams:n,forceUpdate:r})=>{const{state:s}=rt();return t.jsx(tt,{fetch:()=>fetch("/api/search/facets",{method:"POST",body:JSON.stringify({...s,forceUpdate:r}),priority:"low"}),children:t.jsx(ss,{selectedFacets:(s==null?void 0:s.facets)??[],searchParams:n,children:e})})},as=()=>{const e=f.useContext(cn);if(e===void 0)throw new Error("useFacetsContext must be used within a FacetsProvider");return e},dn=f.createContext({}),is=({children:e})=>{const{data:n,...r}=nt(),[s,o]=f.useState(0),{sendDataLayerEvent:a}=x.useEventContext();return f.useEffect(()=>{if(n&&"pagination"in n&&n.products.length>0){a({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:n.products}}});const l=n.pagination.count;l&&Number.isInteger(l)&&o(l)}},[n,a,o]),t.jsx(dn.Provider,{value:f.useMemo(()=>({...r,products:n&&"products"in n?n==null?void 0:n.products:[],pagination:n&&"pagination"in n?n==null?void 0:n.pagination:x.SEARCH_PAGE_DEFAULT_PAGINATION,total:s}),[n,r,s]),children:e})},ls=({children:e,query:n,state:r,selectedFacets:s,forceUpdate:o})=>t.jsx(tt,{fetch:()=>fetch("/api/search/product",{method:"POST",body:JSON.stringify({...r,query:n,forceUpdate:o,facets:s??[]})}),children:t.jsx(is,{state:r,children:e})}),cs=()=>{const e=f.useContext(dn);if(e===void 0)throw new Error("useProductsContext must be used within a ProductsProvider");return e},un=f.createContext({}),ds=({children:e,term:n})=>{const[r,s]=f.useState([]),[o,a]=f.useState(!1);return f.useEffect(()=>{if(!n){s([]);return}(async()=>{a(!0);try{const i=await fetch("/api/search/suggestedTerms",{method:"POST",body:JSON.stringify({query:n,locale:"pt-BR"})}),{data:c}=await i.json();s((c==null?void 0:c.searches)||[])}catch(i){console.error("Erro ao buscar sugestões:",i)}})()},[n]),t.jsx(un.Provider,{value:f.useMemo(()=>({suggestedTerms:r,loading:o,setLoading:a}),[r,o]),children:e})},us=({children:e,...n})=>t.jsx(ds,{...n,children:e}),ms=()=>{const e=f.useContext(un);if(!e)throw new Error("useSuggestedTermsContext must be used within a SuggestedTermsProvider");return e},mn=f.createContext({searches:[],isLoading:!1,error:null}),ps=({children:e})=>{const[n,r]=f.useState([]),[s,o]=f.useState(!0),[a,l]=f.useState(null);return f.useEffect(()=>{(async()=>{try{o(!0);const c=await fetch("/api/search/topSearch");if(!c.ok)throw new Error(`Erro ao buscar os dados: ${c.status}`);const u=await c.json();r(u.data.searches||[])}catch(c){l(c instanceof Error?c.message:"Erro desconhecido")}finally{o(!1)}})()},[]),t.jsx(mn.Provider,{value:f.useMemo(()=>({searches:n,isLoading:s,error:a}),[n,s,a]),children:e})},fs=()=>{const e=f.useContext(mn);if(!e)throw new Error("useTopSearches must be used within a TopSearchesProvider");return e},pn=f.createContext({}),hs=({children:e,slug:n,searchParams:r,collectionId:s,itemsPerPage:o=24})=>{const{pathname:a}=x.useNextContext(),[l,i]=f.useState(!1),c=f.useMemo(()=>{const m=new URL(a,"http://localhost"),h=Array.isArray(r==null?void 0:r.facets)?r.facets:[(r==null?void 0:r.facets)??""],p=(r==null?void 0:r.page)??"1",_=(r==null?void 0:r.sort)??(s?"":x.PLP_FILTERS_SORT.default_option);return m.searchParams.set("page",String(p)),m.searchParams.set("sort",String(_)),r!=null&&r.query?(m.searchParams.set("query",r.query),m):(m.searchParams.set("base",Array.isArray(n)?n.join("/"):n),m.searchParams.set("facets",h.join(",")),m)},[s,a,r,n]),u=f.useMemo(()=>{if(Array.isArray(r==null?void 0:r.facets))return x.parseSearchState(c,r.facets);const m=r!=null&&r.facets?[r==null?void 0:r.facets]:[];return x.parseSearchState(c,m)},[c,r]);return t.jsx(pn.Provider,{value:f.useMemo(()=>({openFilters:l,setOpenFilters:i}),[l,i]),children:t.jsx(ln,{CONSTANTS:{ITEMS_PER_PAGE:o},state:f.useMemo(()=>({...u}),[u]),collectionId:s,children:e})})},gs=()=>{const e=f.useContext(pn);if(e===void 0)throw new Error("usePLPContext must be used within a PLPProvider");return e},ze=(e,n)=>{if(e===n)return!0;if(e==null||n==null||typeof e!="object"||typeof n!="object")return!1;if(Array.isArray(e))return!Array.isArray(n)||e.length!==n.length?!1:e.every((o,a)=>ze(o,n[a]));if(Array.isArray(n))return!1;const r=Object.keys(e),s=Object.keys(n);return r.length!==s.length?!1:r.every(o=>Object.prototype.hasOwnProperty.call(n,o)&&ze(e[o],n[o]))},_s=(e,n,r="page")=>Object.keys(n).some(s=>s===r?!1:!ze(n[s],e[s])),ht=async e=>{const n=await fetch("/api/search/product",{method:"POST",body:JSON.stringify(e),priority:"high"});if(!n.ok)throw new Error("[FAILED TO FETCH DATA]");const r=await n.json();return r==null?void 0:r.data},xs=()=>({node:{sku:"",gtin:"",name:"...",description:"",releaseDate:"",slug:"",video:null,categories:[],categoryId:"",categoriesIds:[],id:"skeleton",brand:{name:""},seo:{title:"",description:"",canonical:""},cluster:{generals:[],highlights:[]},availability:{status:!0},breadcrumbList:{itemListElement:[]},image:[{alternateName:"1",url:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR4nGNgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII=",keywords:"1"},{alternateName:"10",url:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR4nGMAAQAABQABDQottgAAAABJRU5ErkJggg==",keywords:"10"}],offers:{lowPrice:1,highPrice:0,offers:[{availability:"true",listPrice:0,price:0,priceValidUntil:"",priceCurrency:"BRL",itemCondition:"",quantity:1,seller:{identifier:"1"}}],priceCurrency:"BRL"},isVariantOf:{productGroupID:"",hasVariant:[{additionalProperty:[{name:"Tamanho",value:"...",valueReference:"SPECIFICATION",propertyID:""}],name:"...",offers:{offers:[{availability:"https://schema.org/InStock",listPrice:0,price:0,quantity:1,seller:{identifier:"1"}}]},sku:"1",slug:"1",productId:"1"}],name:"",additionalProperty:[],skuVariants:null},installments:{count:2,value:1}}}),ys=(e,n,r,s=24)=>{const o=new Set,a=[];if(!Array.isArray(e)||e.length===0)return{taken:o,placedBanners:a};const l=n*s*r;for(const i of e){let c=Number(i.position_grid),u=!1;for(;c<l;){const m=c%r;if(m+i.columns>r){c+=r-m;continue}if(!Array.from({length:i.columns}).some((_,g)=>o.has(c+g))){for(let _=0;_<i.columns;_++)o.add(c+_);a.push(c),u=!0;break}c++}u||console.info(`[PLP INFINITE FAILED BANNER POSITION]: pos=${i.position_grid}, cols=${i.columns}`)}return{taken:o,placedBanners:a}},gt=(e,n,r,s=24)=>{const{placedBanners:o,taken:a}=ys(e??[],n,r),l=[];let i=0;try{for(;l.length<n*s;)a.has(i)||l.push(i),i++;return{banners:o,products:l}}catch(c){console.info(`[PLP INFINITE FAILED TO GEN POSITIONS]: page=${n}`,c)}return{banners:[],products:l}},Te=(e,n,r=24)=>Array.from({length:e},(s,o)=>{const a=o+1;return{loading:e===a,page:a,pagination:n!=null&&n.products.length&&e===a?n==null?void 0:n.pagination:fn(),products:n!=null&&n.products.length&&e===a?n==null?void 0:n.products:Array.from({length:r},()=>xs())}}),Cs=(e,n)=>[...e,{loading:!1,page:n,pagination:fn(),products:[]}],fn=()=>({nextPage:!1,previousPage:!1,startCursor:"0",endCursor:"1",count:1,total:1}),vs=50,bs=Pe.create((e,n)=>{const r=l=>Math.min(l,vs),s=async(l,i)=>{const c=r(l.page);try{const u=await ht({...l,page:c});o(c,m=>i?i(m,u):{...m,...u})}catch(u){console.error(`[PDC - SCROLL INFINITE FAILED TO FETCH PAGE ${c}]: ${u}`),o(c,m=>({...m,loading:!1}))}},o=(l,i)=>{e({load:!0,pages:n().pages.map(c=>c.page===l?i(c):c)})},a=async(l,i)=>{await s(l,(c,u)=>(typeof i=="function"&&i(u),{...c,...u,loading:!0}))};return{banners:[],load:!1,pages:[],total:0,positions:[],products:[],createPages:async(l,i,c,u)=>{var h,p,_;const m=r(Number(l==null?void 0:l.page));e({...i,pages:Te(m,void 0,u)});try{const g=await ht({...l,page:m});if(g){if(!g.products.length&&((h=g==null?void 0:g.pagination)==null?void 0:h.total)<m){a({...l,page:(p=g==null?void 0:g.pagination)==null?void 0:p.total},c),e({pages:Te((_=g==null?void 0:g.pagination)==null?void 0:_.total)});return}typeof c=="function"&&c(g),e({load:!0,pages:Te(m,g),total:Number(g.pagination.count)})}}catch(g){console.error(`[PDC - SCROLL INFINITE TO CREATE PAGES]: page ${m} ${g}`)}},addPage:(l,i,c)=>{const{pages:u}=n(),m=r(l==null?void 0:l.page);u.some(h=>h.page===m)||(e({...i,pages:Cs(u,m)}),a(l,c))},updateProducts:(l,i)=>{const c=n().pages.find(u=>u.page===r(l==null?void 0:l.page));c!=null&&c.loading||a(l,i)}}}),hn=f.createContext({}),js=({banners:e,children:n,itemsPerPage:r=24,searchParams:s})=>{const{router:o}=x.useNextContext(),{sendDataLayerEvent:a}=x.useEventContext(),{isMobile:l}=x.useGlobalContext(),{state:i}=rt(),{addPage:c,createPages:u,updateProducts:m,...h}=bs(),p=l?8:16,_=l?2:4,g=f.useRef(!1),C=f.useRef(i),y=f.useCallback(w=>{w&&"pagination"in w&&a({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:w.products}}})},[a]),v=f.useCallback(w=>{if(w.pagination.nextPage===!0){const b=w.page+1,I=gt(e,b,_,r);c({...i,page:b},I,y)}},[c,e,y,_,r,i]),N=f.useCallback(w=>{w.loading===!1&&m({...i,page:w.page},y)},[y,m,i]),j=f.useCallback(w=>{const b=new URLSearchParams(s);w.page!==Number(b.get("page")??1)&&(b.set("page",String(w.page)),o.replace(`?${b.toString()}`,{scroll:!1}))},[o,s]);return f.useEffect(()=>{const w=!g.current,b=_s(C.current,i),I=gt(e,i.page,_);w?u(i,I,y,r):b&&(u(i,I,y,r),C.current=i),g.current=!0},[e,u,y,_,r,i]),t.jsx(hn.Provider,{value:f.useMemo(()=>({...h,addPage:c,addNewPage:v,createPages:u,gap:p,columns:_,updatePage:N,updateProducts:m,updateParamPage:j}),[c,v,u,p,_,h,N,m,j]),children:n})},Ss=()=>{const e=f.useContext(hn);if(e===void 0)throw new Error("PLPInfiniteScrollContext must be used within a ScrollInfiniteProvider");return e};function gn(e){const r=decodeURIComponent(window.document.cookie).split(";");for(const s of r){const[o,a]=s.trim().split("=");if(o===e)return a}}function st(e,n,r={}){const o={...{path:"/",expires:new Date(Date.now()+36e5)},...r};let a=`${encodeURIComponent(e)}=${encodeURIComponent(n??"")}`;for(const l in o)o[l]!==void 0&&(a+=`; ${l}`,l==="expires"?a+=`=${o[l].toUTCString()}`:typeof o[l]=="boolean"?a+=`; ${o[l]?"true":"false"}`:a+=`=${o[l]}`);window.document.cookie=a}const Ns=()=>{const{sendDataLayerEvent:e}=x.useEventContext(),{user:n}=ot(),{cartStore:r}=Z();return f.useEffect(()=>{if(!n)return;(async()=>{const{userId:o,email:a,firstName:l,lastName:i,phone:c,homePhone:u,postalCode:m,street:h,number:p,city:_,gender:g}=n,C=new TextEncoder().encode(o),y=await crypto.subtle.digest("SHA-256",C),N=Array.from(new Uint8Array(y)).map(j=>j.toString(16).padStart(2,"0")).join("");e({functionKey:"readyEvents",data:{readyData:{user_id:N,email:a,first_name:l,last_name:i,phone:c||u,zip:m,street:h,street_number:p,city:_,gender:g,orderform_id:r==null?void 0:r.id}}})})()},[n,r.id]),null},_n=f.createContext({amount:null,boxes:null,toExpire:null,loading:!0,logout:()=>null,getCurrentCredits:()=>({credits:0,cashback:0})}),Is=({children:e,AUTH_TOKEN_COOKIE:n})=>{const[r,s]=f.useState({amount:null,boxes:null,toExpire:null,loading:!0}),o=f.useCallback(async()=>{try{await fetch("/api/user",{priority:"low"}).then(i=>i.json()).then(i=>{const{userCredits:c,...u}=i;s({amount:c==null?void 0:c.amount,boxes:c==null?void 0:c.boxes,toExpire:c==null?void 0:c.toExpire,user:u,loading:!1})})}catch(i){console.error("my credits request",i),s({...r,loading:!1})}},[s]),a=f.useCallback(()=>{st(n),o()},[o]),l=f.useCallback(()=>r.boxes?r.boxes.reduce((i,c)=>c.gift_card_box.refid==="C1643"?(i.cashback+=c.amount,i):(i.credits+=c.amount,i),{cashback:0,credits:0}):{cashback:0,credits:0},[r]);return f.useEffect(()=>{o()},[o]),t.jsxs(_n.Provider,{value:f.useMemo(()=>({...r,getCurrentCredits:l,logout:a}),[r,l,a]),children:[t.jsx(Ns,{}),e]})},ot=()=>{const e=f.useContext(_n);if(e===void 0)throw new Error("useContext(SessionContext) must be used within a SessionProvider");return e},Es={contexts:{addToCart:{hook:le,provider:rn},cart:{hook:Z,provider:rs},cms:{FlagsAndTags:{context:Ke,hook:Xe,provider:Mr}},events:{hook:x.useEventContext,provider:x.EventProvider},global:{hook:x.useGlobalContext,provider:x.GlobalProvider,mediator:x.Mediator},header:{hook:L,provider:es},menuMobile:{hook:Ce,provider:tn},next:{hook:x.useNextContext,provider:x.NextProvider},pdp:{provider:Rr,hook:Or},plp:{provider:hs,hook:gs},PLPContent:{provider:x.PLPContentProvider,hook:x.usePLPContent},plpInfinite:{provider:js,hook:Ss},pdpdata:{hook:Je,provider:zr},searchFacets:{hook:as,provider:os},searchProducts:{hook:cs,provider:ls},searchRoot:{hook:nt,provider:tt},searchSearch:{hook:rt,provider:ln},searchSuggestedTerms:{hook:ms,provider:us},searchTopSearchs:{hook:fs,provider:ps},session:{hook:ot,provider:Is},ui:{hook:x.useUIContext,provider:x.UIProvider}},hooks:{useBackPDC:Mt},stores:{cart:x.cart,header:Fr,pdp:Zr}},ws=e=>e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/\s+/g,"-").toLowerCase().trim();function Ps(e,n=1e3){let r=!1;return(...s)=>{r||(e(...s),r=!0,setTimeout(()=>{r=!1},n))}}function ks(e,n=1e3){let r;return(...s)=>{clearTimeout(r),r=setTimeout(()=>{e(...s)},n)}}const xn=(e,n)=>n.getTime()>e.getTime()?Math.abs(n.getTime()-e.getTime()):0,fe=(e,n)=>Math.floor(n==="days"?e/(1e3*60*60*24):n==="hours"?e%(1e3*60*60*24)/(1e3*60*60):n==="minutes"?e%(1e3*60*60)/(1e3*60):e%(1e3*60)/1e3),As=e=>{const n=Ar.decodeJwt(e??"");return{email:n.sub,userId:n.userId}},Ts=["name","email","phone","date","cpf","cep"],_t={email:/\S+@\S+\.\S+/,name:new RegExp("^\\p{L}+( \\p{L}+)*$","u"),phone:/^\d{10,11}|\(\d{2}\)\s?\d{4,5}-\d{4}$/,date:/^\d{6,8}|^\d{2}\/\d{2}\/\d{2,4}$/,cep:/^\d{5}[-]?\d{3}$/,cpf:/^\d{11}|\d{3}\.\d{3}\.?\d{3,5}\-[\d]{2}$/},Ms=({type:e,input:n,required:r=!1})=>{if(typeof n!="string"||!r&&n===""||!_t[e])return!0;const s=n.trim();return _t[e].test(s)},Rs=e=>{const n=/\/(\d+)-\d+-\d+\/(.+?)\./,r=typeof e=="string"?e.match(n):null;return r?r[2].replace(/-/g," "):x.DEFAULT_IMAGE_ALT_TEXT},Os=Object.freeze(Object.defineProperty({__proto__:null,FieldTypes:Ts,debounce:ks,getAltTextFromUrl:Rs,getAuthenticatedUser:As,getCookie:gn,getDaysHoursMinutesSeconds:fe,getMilliSeconds:xn,removeAccentsAndReplaceSpaces:ws,setCookie:st,throttle:Ps,validateInput:Ms},Symbol.toStringTag,{value:"Module"})),Ls={cart:x.cart$1,events:x.events,product:Dr,utils:Os},at={helpers:Ls},H={"add-to-cart--card":"_add-to-cart--card_4v41y_1","add-to-cart--card--content":"_add-to-cart--card--content_4v41y_7","add-to-cart--card--name":"_add-to-cart--card--name_4v41y_16","add-to-cart--card--price-quantity":"_add-to-cart--card--price-quantity_4v41y_46","add-to-cart--card--style-size":"_add-to-cart--card--style-size_4v41y_53","add-to-cart--content":"_add-to-cart--content_4v41y_71","add-to-cart--content--title":"_add-to-cart--content--title_4v41y_78","add-to-cart--footer":"_add-to-cart--footer_4v41y_102","add-to-cart--footer--total":"_add-to-cart--footer--total_4v41y_108","add-to-cart--items":"_add-to-cart--items_4v41y_148","add-to-cart--tooltip":"_add-to-cart--tooltip_4v41y_198","add-to-cart__modal":"_add-to-cart__modal_4v41y_211"},yn=({brand:e,className:n,name:r,...s})=>t.jsxs("div",{...s,className:d.helpers.classNameConcat(H["add-to-cart--card--name"],n),children:[t.jsx(d.Tag,{style:{textTransform:"uppercase"},size:"small",variant:"quaternary",title:e,children:e}),t.jsx(d.TextStructure.Root,{children:t.jsx(d.TextStructure.DivWrapper,{alignContent:"flex-start",alignItems:"flex-start",children:t.jsx("p",{className:"typography-style-body-md",children:r})})})]});yn.displayName="AddToCart.Card.Name";const Cn=({className:e,listPrice:n,price:r,quantity:s,productId:o,...a})=>{const l=K(r/100),i=K(n/100);return t.jsx("div",{...a,className:d.helpers.classNameConcat(H["add-to-cart--card--price-quantity"],e),children:t.jsx(d.ProductInfo.Root,{size:"small",layout:"vertical",children:t.jsx(d.ProductInfo.Wrapper,{size:"small",layout:"vertical",children:t.jsx(d.ProductInfo.ValuesWrapper,{children:r!==n?t.jsxs(t.Fragment,{children:[t.jsx(d.ProductInfo.Price,{label:"originalPrice",value:l,size:"small"},"price-list"),t.jsx(d.ProductInfo.Price,{label:"discountPrice",value:i,size:"small"},"price-low")]}):t.jsx(d.ProductInfo.Price,{label:"defaultPrice",value:i,size:"small"},"price-low")})})})})};Cn.displayName="AddToCart.Card.PriceQuantity";const Ds="_skeleton_12b79_1",zs={skeleton:Ds},Bs=({style:e})=>t.jsx("div",{style:e,className:zs.skeleton}),$s="_image_lypfr_1",Fs={image:$s},Us=({alt:e,className:n,objectFit:r,...s})=>{const{nextimage:o}=x.useNextContext();return t.jsx(o,{quality:90,...s,alt:e??"",className:d.helpers.classNameConcat(Fs.image,n),"data-object-fit":r??"cover"})},qs=({videoRef:e,...n})=>t.jsx("video",{...n,ref:e,children:t.jsx("track",{kind:"captions"})}),J={Image:Us,Video:qs},vn=({className:e,productGroupID:n,size:r,texture:s,...o})=>{const{CONSTANTS:{TEXTURE_IMAGE:a,TOGGLE_STYLE_MODIFIER:l}}=le(),[i,c]=f.useState(s??"");return f.useEffect(()=>{i||fetch("/api/catalog/product/info",{method:"POST",priority:"low",body:JSON.stringify({ids:[n]})}).then(u=>u.json()).then(u=>{const m=u.data[0].items[0];if(m){const h=m.images.find(p=>a.includes(p.imageLabel));h!=null&&h.imageUrl?c(h.imageUrl):c(m.images[0].imageUrl)}}).catch(u=>{console.error(u)})},[i,n]),t.jsxs("div",{...o,className:d.helpers.classNameConcat(H["add-to-cart--card--style-size"],e),children:[t.jsx(d.ToggleStyle.Wrapper,{size:"x-small",style:l,children:t.jsx(d.ToggleStyle.Texture,{children:i?t.jsx(J.Image,{alt:"",src:i??"",width:164,height:164,style:l}):t.jsx(Bs,{})})}),t.jsx(d.Utils.Divider,{direction:"vertical",size:"medium",style:{height:24}}),r&&t.jsxs(d.ToggleSize.Wrapper,{size:"small",title:"wrapper-texture",children:[t.jsx(d.ToggleSize.DisabledAdornment,{title:"disabled-adornment-texture"}),t.jsx(d.ToggleSize.Text,{children:r})]})]})};vn.displayName="AddToCart.Card.StyleSize";const{helpers:Vs}=at,bn=({className:e,item:n,texture:r,...s})=>{const{itemOffered:{name:o,brand:a,skuName:l,isVariationOf:{productGroupID:i}},quantity:c,price:u,sellingPrice:m}=n,{CONSTANTS:{NAME_SPLIT_SYMBOL:h}}=le(),{size:p}=Vs.product.getColorAndSizeFromSkuName(l??o,h);return t.jsxs("div",{...s,className:d.helpers.classNameConcat(H["add-to-cart--card--content"],e),children:[t.jsx(yn,{brand:a.name,name:o}),t.jsx(Cn,{price:u,listPrice:m,quantity:c,productId:n.id}),t.jsx(vn,{size:p,texture:r,productGroupID:i})]})};bn.displayName="AddToCart.Card.Content";const jn=({image:e,thumbnail:n=!1})=>t.jsx(J.Image,{alt:e.alternateName??"image","data-thumbnail":n,height:n?152:120,src:e.url,width:n?152:94});jn.displayName="AddToCart.Card";const Sn=({className:e,item:n,texture:r,thumbnail:s,...o})=>{const{itemOffered:{image:[a]}}=n,l=Bt(a.url,{width:200,height:300});return t.jsxs("div",{...o,className:d.helpers.classNameConcat(H["add-to-cart--card"],e),children:[t.jsx(jn,{image:{alternateName:a.alternateName||"Produto",url:l||""},thumbnail:s}),!s&&t.jsx(bn,{item:n,texture:r})]})};Sn.displayName="AddToCart.Card";const Nn=({className:e,children:n,title:r,...s})=>t.jsxs("div",{...s,className:d.helpers.classNameConcat(H["add-to-cart--content"],e),children:[t.jsx("div",{className:H["add-to-cart--content--title"],children:r&&t.jsx("h2",{children:r})}),n,t.jsx(oe.Footer,{})]});Nn.displayName="AddToCart.Layout.Content";const In=({className:e,...n})=>{var _,g;const{isMobile:r,handleClose:s,CONSTANTS:{ADD_TO_CART:o}}=le(),{cartStore:{totalizers:a},setIsOpen:l}=Z(),i=(_=a.find(C=>C.id==="Discounts"))==null?void 0:_.value,c=((g=a.find(C=>C.id==="Items"))==null?void 0:g.value)??0,u=a.find(C=>C.id==="Shipping"),h=(c-Math.abs(i??0)+((u==null?void 0:u.value)??0))/100,p=K(h??0);return t.jsxs("div",{...n,className:d.helpers.classNameConcat(H["add-to-cart--footer"],e),children:[t.jsxs("div",{className:H["add-to-cart--footer--total"],children:[t.jsx("span",{children:"Subtotal:"}),t.jsx("span",{children:p})]}),t.jsx(d.Button,{size:"medium",variant:"primary","data-close":!0,onClick:()=>l(!0),children:o.footer.bag}),r?t.jsx(d.Button,{"data-close":!0,size:"medium",variant:"tertiary",children:o.footer.keep_buying}):t.jsx(d.Button,{onClick:()=>s(),size:"medium",variant:"tertiary",children:o.footer.keep_buying})]})};In.displayName="AddToCart.Layout.Footer";const En=({children:e,className:n,thumbnail:r=!1,...s})=>{const{cartStore:{options:o}}=Z(),{recentlyAddedProducts:a}=x.useUIContext(),l=a.length>3?4:a.length;return t.jsxs("div",{...s,className:H["add-to-cart--items"],"data-thumbnail":r,children:[Array.isArray(a)&&a.filter((i,c)=>c<l).map(i=>{var u;const c=(u=o==null?void 0:o.find(m=>m.id===i.itemOffered.isVariationOf.productGroupID))==null?void 0:u.texture;return t.jsx(oe.Card,{item:i,thumbnail:r,texture:c},i.itemOffered.sku)}),e]})};En.displayName="AddToCart.Layout.Items";const wn=({children:e,Z_INDEX_WAR:n})=>{const{isOpen:r,setIsOpen:s}=le(),{isMobile:o}=x.useGlobalContext();return t.jsxs(d.Modal.Root,{"data-modal":"add-to-cart--modal",className:H["add-to-cart__modal"],isMobile:o??!1,isOpen:r,setIsOpen:s,variant:"sideBottom",style:{zIndex:n.modal},children:[t.jsx(d.Modal.Header,{navigation:"top",children:t.jsx(d.Modal.Controls,{navigation:"top",isMobile:!0})}),t.jsx(d.Modal.Body,{children:e})]})};wn.displayName="AddToCart.Modal";const Gs=({children:e})=>{const{count:n,handleClose:r,setIsOpen:s}=le(),o=f.useRef(n);return f.useEffect(()=>{n>o.current&&s(!0),n<o.current&&o.current>=1&&r(),o.current=n},[n,r,s]),t.jsx(t.Fragment,{children:e})},Pn=({children:e,component:n,CONSTANTS:r,...s})=>{const{recentlyAddedProducts:o}=x.useUIContext(),{isMobile:a}=x.useGlobalContext(),l=o.length>3?4:o.length;return t.jsx(rn,{...s,count:l,isMobile:a,CONSTANTS:r,children:t.jsx(Gs,{children:a?t.jsxs(t.Fragment,{children:[t.jsx(oe.Modal,{Z_INDEX_WAR:r.Z_INDEX_WAR,children:n}),e]}):t.jsx(oe.Tooltip,{component:n,style:{width:350},Z_INDEX_WAR:r.Z_INDEX_WAR,children:e})})})};Pn.displayName="AddToCart.Root";const kn=({children:e,component:n,Z_INDEX_WAR:r,...s})=>{const{contentRef:o,left:a,isLeaving:l,target:i,isOpen:c,top:u}=le();return t.jsx(d.Tooltip.Root,{arrow:"top-right",component:t.jsx("div",{...s,ref:o,children:n}),id:"add-to-cart--tooltip",className:H["add-to-cart--tooltip"],style:{zIndex:r.modal},isLeaving:l,isOpen:c,left:a,size:"medium",position:"top",top:u,children:t.jsx("div",{className:H["add-to-cart--tooltip"],ref:i,children:e})})};kn.displayName="AddToCart.Tooltip";const oe={Card:Sn,Content:Nn,Footer:In,Items:En,Modal:wn,Root:Pn,Tooltip:kn},it=({title:e,...n})=>{const{recentlyAddedProducts:r}=x.useUIContext(),{isMobile:s}=x.useGlobalContext(),o=r.length>3?4:r.length,a=r.length>(o??1),l=r.length>1;return t.jsx(oe.Root,{isMobile:s,count:r.length,component:t.jsx(oe.Content,{title:e,children:t.jsx(oe.Items,{thumbnail:l,children:a&&t.jsx(d.Badge.Count,{count:r.length-o,size:"medium",variant:"secondary"})})}),...n})};it.displayName="AddToCart";const xt={"backtotop-btn":"_backtotop-btn_1shb6_1","card-modifier":"_card-modifier_1shb6_27"},Hs=({children:e,className:n,adornment:r,iconPosition:s,scrollToOptions:o,style:a,...l})=>{const i={top:(o==null?void 0:o.top)??0,left:(o==null?void 0:o.left)??0,behavior:(o==null?void 0:o.behavior)??"smooth"},u=s&&r?{flexDirection:{top:"column",bottom:"column-reverse",left:"row",right:"row-reverse"}[s]}:{},m=()=>{window&&window.document.body.scrollTo({...i})};return t.jsx(d.Card,{...l,shadow:!0,padding:"small",className:d.helpers.classNameConcat(xt["card-modifier"],n),style:{...a,padding:0},children:t.jsxs("button",{className:xt["backtotop-btn"],onClick:m,style:{...u},"data-orientation":s,children:[r,e]})})},lt={"btn-login":"_btn-login_yas63_12","btn-header":"_btn-header_yas63_22","header-animation":"_header-animation_yas63_35"},ct=({id:e})=>{const{setIsOpen:n,cartStore:{items:r}}=Z(),{handleSelectContent:s}=x.useEventContext(),{CONSTANTS:o}=L(),a=r.reduce((l,i)=>l+(i.quantity??0),0);return t.jsx(d.Header.SupportItem,{onClick:()=>{n(!0),s({content:"header:minicart"})},id:e,children:t.jsxs(d.Badge.AutoPositioner,{children:[t.jsx(d.Badge.Count,{count:a,size:"medium",variant:"primary",style:{backgroundColor:"black",display:a>0?"flex":"none"}}),t.jsx(d.Icon,{name:o.header.ICONS.bag,size:"medium"})]})})};ct.displayName="Header.Bag";const ve=({children:e,href:n,...r})=>n&&n!=="#"?t.jsx(x.NextLink,{href:n.startsWith("/")?n:`/${n}`,...r,children:e}):e,An=()=>{const{headerData:e}=L(),{handleSelectContent:n}=x.useEventContext(),{reset:r,updateValue:s}=re(),o=a=>{a?s(a):r()};return t.jsx(d.Header.Categories,{children:Array.isArray(e.categories)&&e.categories.map((a,l)=>t.jsx(ve,{href:a.link,onMouseEnter:()=>o(a.submenuId),onFocus:()=>o(a.submenuId),children:t.jsx(d.Header.CategoryItem,{className:lt["btn-header"],value:a.submenuId??null,adornment:{start:t.jsx(d.Icon,{name:a.iconStart}),end:t.jsx(d.Icon,{name:a.iconEnd})},style:{textWrap:"nowrap",gap:"0"},onClick:()=>{n({content:`header:${a.label}`})},children:a.label})},`category-${a.label}-${l}`))})};An.displayName="Header.Categories";function Ws({SearchModal:e}){const{handleSelectContent:n}=x.useEventContext(),{CONSTANTS:r}=L(),{setValue:s}=et();return t.jsxs(t.Fragment,{children:[t.jsx(d.Header.SupportItem,{onClick:()=>{s(!0),n({content:"header:search"})},children:t.jsx(d.Icon,{name:r.header.ICONS.search,size:"medium"})}),t.jsx(e,{recommendations:!1,trends:!0})]})}const Ks={"menu-subcategories-container":"_menu-subcategories-container_a93cr_1"},Xs={"observer-wrapper":"_observer-wrapper_r43gk_1"};function Ys(e,n,r){const[s,o]=f.useState(!1),{threshold:a}=r||{};return f.useEffect(()=>{if(!e.current)return()=>null;let l=null;const i=new IntersectionObserver(([c])=>{if(r!=null&&r.delay){l&&clearTimeout(l),l=setTimeout(()=>{o(c.isIntersecting),n&&c.isIntersecting&&i.unobserve(e.current)},r.delay);return}o(c.isIntersecting),n&&c.isIntersecting&&i.unobserve(e.current)},{threshold:a||1});return i.observe(e.current),()=>{i.disconnect()}},[e]),s}const Ae=({children:e,eventData:n,observerOptions:r,callBackWhenVisible:s,stopOnIntersection:o=!0,className:a,...l})=>{const i=f.useRef(null),c=Ys(i,o,r),{sendDataLayerEvent:u}=x.useEventContext();return f.useEffect(()=>{c&&(typeof s=="function"&&s(),n&&u({...n}))},[c]),t.jsx("div",{...l,ref:i,className:d.helpers.classNameConcat(Xs["observer-wrapper"],a),children:e})},dt=({thumbnails:e,category:n,isMobile:r=!0,callBack:s})=>{const{handleSelectPromotionEvent:o}=x.useEventContext(),a=50/e.length;return t.jsx("div",{className:Ks["menu-subcategories-container"],children:e.map((l,i)=>{const c=r?l.srcMobile:l.srcDesk;if(!c)return null;const u={creative_name:"banner-menu",creative_slot:`banner-menu:${n}:${i+1}`,promotion_id:c,promotion_name:l.promotion_name};return t.jsx(Ae,{eventData:{functionKey:"readyEvents",data:{event:"view_promotion",readyData:{ecommerce:{...u}}}},observerOptions:{delay:1e3},children:t.jsxs(x.NextLink,{href:l.link??"#",onClick:()=>{typeof s=="function"&&s(),o({updatePromotionRef:!0,promotion:u})},children:[t.jsx(J.Image,{src:c,alt:l.label??c,width:500,height:500,sizes:`(max-width: 768px) 100vw, (max-width: 1023px) 75vw, ${a}vw`}),l.label&&t.jsx("p",{children:l.label})]})},`thumb-${l.label}-${i}`)})})};dt.displayName="Menu.Thumbnail";const Be={"menu-desktop":"_menu-desktop_1b799_1","menu-categories":"_menu-categories_1b799_12"},Qs="_link_w24h0_1",Js="_wrapper_w24h0_98",Zs="_text_w24h0_106",Me={link:Qs,wrapper:Js,text:Zs},ne=({children:e,adornments:n,className:r,disableUnderline:s,href:o,mode:a,size:l,title:i,onClick:c,disablePadding:u,...m})=>{const h=d.helpers.ValidateProp({fieldTypes:de.SizesSmallExtended,property:l,fallback:"medium"}),p=d.helpers.ValidateProp({fieldTypes:de.Mode,property:a,fallback:"default"});return t.jsx(x.NextLink,{...m,className:d.helpers.classNameConcat(Me.link,r),href:o&&o.length>0?o:"#","data-size":h,"data-variant":p,title:i||"NextLink","data-disable-underline":s??!1,"data-disable-padding":u??!0,children:t.jsxs("div",{className:Me.wrapper,onClick:c,children:[n==null?void 0:n.start,t.jsx("p",{className:Me.text,"data-size":h,children:e}),n==null?void 0:n.end]})})},Tn=({children:e,dividerOnRight:n=!0,subMenu:r,...s})=>{var c;const{router:o}=x.useNextContext(),{reset:a}=re(),{handleSelectContent:l}=x.useEventContext(),{CONSTANTS:i}=L();return t.jsxs("div",{...s,className:Be["menu-categories"],children:[(c=r==null?void 0:r.subCategories)==null?void 0:c.map((u,m)=>{var _,g,C;const h=u.listCollapseDesk&&!((_=u.see_all)!=null&&_.link)?{expandAfterRowsQty:u.rowsToShowDesk}:{},p=u.listCollapseDesk&&!((g=u.see_all)!=null&&g.link)?{expansivesAdornments:{open:i.header.ICONS.add,close:i.header.ICONS.minus},expansivesLabels:{open:i.header.COMPONENT_LIST.listExpandLabel,close:i.header.COMPONENT_LIST.listCollapseLabel},iconSize:"x-small"}:{adornment:{end:t.jsx(d.Icon,{name:i.header.ICONS.arrow_right,size:"small"})}};return t.jsxs(d.ComponentList.Structure,{children:[t.jsx(ve,{href:u.linkLabel,title:u.label,onClick:()=>{u.linkLabel&&(a(),l({content:`menu:${u.label??""}:${r.label??""}`}))},children:t.jsx(d.TextStructure.Root,{children:t.jsx(d.TextStructure.DivWrapper,{children:t.jsx("h2",{children:u.label})})})}),t.jsx(d.ComponentList.List,{columns:1,...h,className:Be["submenu-categories"],children:u.items.map((y,v)=>t.jsx(d.ComponentList.ListItem,{id:`list-item-${y.label}-${v}`,children:t.jsx(ne,{href:y.link??"#",size:"x-small",title:y.label??"",disableUnderline:!0,disablePadding:!0,onClick:()=>{a(),l({content:`menu:${u.label??""}:${y.label??""}:${r.label??""}`})},children:y.label})},`list-item-${y.label}-${v}`))}),((C=u.see_all)==null?void 0:C.link)&&t.jsx(d.ComponentList.Support,{...p,size:"small",onClick:()=>{var y;(y=u.see_all)!=null&&y.link&&(a(),l({content:`menu:${u.label??""}:${r.label}`}),o.push(u.see_all.link))},children:u.see_all.link&&u.see_all.label})]},`list-${u.label}-${m}`)}),n&&t.jsx(d.Utils.Divider,{size:"small",direction:"vertical"})]})};Tn.displayName="Menu.Categories";const Mn=({children:e,dividerOnBottom:n=!0,...r})=>{const{CONSTANTS:s}=L();return t.jsxs(t.Fragment,{children:[t.jsx("div",{...r,className:Be["menu-desktop"],style:{...r.style,justifyContent:s.header.ALIGNMENT_MENU},children:e}),n&&t.jsx(d.Utils.Divider,{size:"small"})]})};Mn.displayName="Menu.MenuRoot";const Re={Root:Mn,Categories:Tn,Thumbnail:dt},Rn=()=>{const{headerData:e,CONSTANTS:n}=L(),r=ke(),{reset:s}=re();return t.jsx(d.Header.SubMenu,{children:Array.isArray(e.subMenus)&&e.subMenus.map((o,a)=>{const{thumbnails:l,label:i,id:c}=o,u=c===r,m=l==null?void 0:l.some(h=>!!h.srcDesk);return t.jsxs(Re.Root,{id:c,style:u?{display:"flex",zIndex:n.header.Z_INDEX_WAR.menu_desktop}:{display:"none"},dividerOnBottom:u,children:[t.jsx(Re.Categories,{dividerOnRight:!!m,subMenu:o}),Array.isArray(l)&&t.jsx(Re.Thumbnail,{thumbnails:l,isMobile:!1,category:i,callBack:s})]},`submenu-${c}-${a}`)})})};Rn.displayName="Header.SubMenu";const On=()=>{const{handleSelectContent:e}=x.useEventContext(),{CONSTANTS:n}=L();return t.jsx(x.NextLink,{href:"/favoritos",children:t.jsx(d.Header.SupportItem,{onClick:()=>e({content:"header:wishlist"}),children:t.jsx(d.Icon,{name:n.header.ICONS.favorite_false,size:"medium"})})})};On.displayName="Header.WishList";const Ln=({SearchModal:e})=>{const{CONSTANTS:n,userMenuDesktopRef:r}=L(),{handleSelectContent:s}=x.useEventContext(),{reset:o}=re(),{setValue:a}=ye();return t.jsxs(t.Fragment,{children:[t.jsxs(d.Header.Wrapper,{children:[t.jsx(d.Header.Logo,{style:{width:"100%"},children:t.jsx(x.NextLink,{href:"/",onMouseEnter:o,children:t.jsx(d.Icon,{name:n.header.ICONS.logo,size:"x-large",onClick:()=>{s({content:"header:logo"})}})})}),t.jsx(An,{}),t.jsxs(d.Header.Support,{onMouseEnter:o,style:{justifyContent:"flex-end"},children:[t.jsx(Ws,{SearchModal:e}),t.jsx(d.Header.SupportItem,{onClick:()=>{a(!0),s({content:"header:user_menu"})},className:lt["btn-login"],innerRef:r,children:t.jsx(d.Icon,{name:n.header.ICONS.person,size:"medium"})}),t.jsx(On,{}),t.jsx(ct,{id:"cart-button"})]})]}),t.jsx(Rn,{})]})};Ln.displayName="Header.HeaderDesktopWrapper";const eo="_divider_1lexj_199",O={"modal-modifier":"_modal-modifier_1lexj_1","menu-mobile":"_menu-mobile_1lexj_11","menu-header-container":"_menu-header-container_1lexj_26","menu-header-wrapper":"_menu-header-wrapper_1lexj_35","menu-header-navlinks":"_menu-header-navlinks_1lexj_41","menu-body":"_menu-body_1lexj_57","menu-categories-container":"_menu-categories-container_1lexj_74","menu-categories-btn":"_menu-categories-btn_1lexj_108","menu-body-banner-container-modifier":"_menu-body-banner-container-modifier_1lexj_121","menu-categories__banner":"_menu-categories__banner_1lexj_130","menu-submenu-modal-modifiier":"_menu-submenu-modal-modifiier_1lexj_135","menu-submenu":"_menu-submenu_1lexj_135","menu-submenu--item":"_menu-submenu--item_1lexj_150","menu-submenu--thumbnails":"_menu-submenu--thumbnails_1lexj_156","menu-submenu--component-list-modifier":"_menu-submenu--component-list-modifier_1lexj_184","submenu-categories":"_submenu-categories_1lexj_187","menu-navigationbar":"_menu-navigationbar_1lexj_191",divider:eo,"menu-navigationbar-item":"_menu-navigationbar-item_1lexj_206","menu-categories-textstructure-modifier":"_menu-categories-textstructure-modifier_1lexj_210"},Dn=({children:e,mobileBannerAlt:n,mobileBannerSrc:r,onClick:s,textColor:o,...a})=>t.jsx("button",{onClick:s,className:O["menu-categories-btn"],children:r?t.jsxs(d.Banner.Container,{...a,className:O["menu-body-banner-container-modifier"],children:[t.jsx(d.Banner.ImageWrapper,{style:{width:"100%"},children:t.jsx(J.Image,{src:r,alt:n??r,className:O["menu-categories__banner"],width:343,height:128,unoptimized:!0})}),t.jsx(d.Banner.Slot,{verticalAlignment:"center",horizontalAlignment:"start",children:t.jsx(d.TextStructure.Root,{children:t.jsx(d.TextStructure.DivWrapper,{className:O["menu-categories-textstructure-modifier"],children:t.jsx("h2",{className:"typography-style-body-xs",style:o?{color:o}:{},children:e})})})})]}):t.jsx("h2",{...a,children:e})});Dn.displayName="Menu.MenuCategories";const zn=({children:e,link:n})=>{const{reset:r}=ie();return n?t.jsx(x.NextLink,{href:n??"#",onClick:r,children:e}):e};zn.displayName="Menu.MenuCategoriesWrapper";const Bn=({subcategory:e,submenuLabel:n})=>{var c,u,m;const{router:r}=x.useNextContext(),{reset:s}=ie(),{handleSelectContent:o}=x.useEventContext(),{CONSTANTS:a}=L(),l=e.listCollapseMobile&&!((c=e.see_all)!=null&&c.link)?{expandAfterRowsQty:e.rowsToShowMobile}:{},i=e.listCollapseMobile&&!((u=e.see_all)!=null&&u.link)?{expansivesAdornments:{open:a.header.ICONS.add,close:a.header.ICONS.minus},expansivesLabels:{open:a.header.COMPONENT_LIST.listExpandLabel,close:a.header.COMPONENT_LIST.listCollapseLabel},iconSize:"x-small"}:{adornment:{end:t.jsx(d.Icon,{name:a.header.ICONS.arrow_right,size:"small"})}};return t.jsxs(d.ComponentList.Structure,{className:O["menu-submenu--component-list-modifier"],children:[t.jsx(ve,{href:e.linkLabel,title:e.label,onClick:()=>{s(),o({content:`menu:${e.label??""}:${n}`})},children:t.jsx(d.TextStructure.Root,{children:t.jsx(d.TextStructure.DivWrapper,{children:t.jsx("h2",{className:"typography-style-body-sm-strong",children:e.label})})})}),t.jsx(d.ComponentList.List,{columns:1,...l,className:O["submenu-categories"],children:e.items.map((h,p)=>t.jsx(d.ComponentList.ListItem,{id:`list-item-${h.label}-${p}`,divider:!0,children:t.jsx(ne,{href:h.link??"#",size:"x-small",title:h.label??"",disableUnderline:!0,onClick:()=>{s(),o({content:`menu:${e.label??""}:${h.label}:${n}`})},children:h.label})},`list-item-${h.label}-${p}`))}),((m=e.see_all)==null?void 0:m.link)&&t.jsx(d.ComponentList.Support,{...i,size:"small",onClick:()=>{var h;s(),o({content:`menu:${e.label??""}:${n}`}),(h=e.see_all)!=null&&h.link&&r.push(e.see_all.link)},children:e.see_all.link&&e.see_all.label})]})};Bn.displayName="Menu.SubMenuSubCategory";const $n=({submenu:e})=>{var a;const n=ke(),{handleCloseSubMenu:r}=Ce(),{reset:s}=re(),{CONSTANTS:o}=L();return t.jsxs("div",{className:O["menu-submenu--item"],style:{display:n===e.id?"flex":"none"},children:[t.jsx(d.TextStructure.Root,{adornment:{start:t.jsx(d.Icon,{name:o.header.ICONS.arrow_back,size:"medium",onClick:r})},layoutProps:{textRow:{alignItems:"center",style:{width:"100%",position:"relative"}},columnWrapper:{alignContent:"center",style:{width:"100%"}}},children:e.label&&t.jsx(d.TextStructure.DivWrapper,{style:{position:"absolute",left:"50%",transform:"translate(-50%)"},children:t.jsx("h2",{className:"typography-style-body-md-strong",children:e.label})})}),t.jsx("div",{className:O["menu-submenu--thumbnails"],children:Array.isArray(e.thumbnails)&&t.jsx(dt,{thumbnails:e.thumbnails,isMobile:!0,category:e.label,callBack:s})}),(a=e==null?void 0:e.subCategories)==null?void 0:a.map((l,i)=>t.jsx(Bn,{subcategory:l,submenuLabel:e.label},`list-${l.label}-${i}`))]})};$n.displayName="Menu.SubMenuItem";const Fn=()=>{const{headerData:e}=L(),n=ke(),{reset:r}=re(),{bodyRef:s}=Ce();return t.jsx(d.Modal.RootWithoutPortal,{isOpen:!!n,setIsOpen:r,parent:s.current,variant:"sideLeft",style:{position:"absolute",width:"100%"},className:O["menu-submenu-modal-modifiier"],children:t.jsx("div",{className:O["menu-submenu"],children:e.subMenus.map((o,a)=>t.jsx($n,{submenu:o},`submenu-${o.id}-${a}`))})})};Fn.displayName="Menu.SubMenu";const Un=({className:e,...n})=>{const{headerData:r}=L(),{setValue:s}=re(),{bodyRef:o}=Ce(),{handleSelectContent:a}=x.useEventContext();return t.jsxs("div",{...n,ref:o,id:"menu-body",className:O["menu-body"],children:[t.jsx("div",{className:O["menu-categories-container"],children:r.categories.map((l,i)=>{const c=l.submenuId?{}:{"data-close":!0};return t.jsx(zn,{link:l.submenuId?null:l.link,children:t.jsx(Dn,{onClick:()=>{s(l.submenuId??null),a({content:`menu:${l.label}`})},mobileBannerSrc:l.mobileBannerSrc,mobileBannerAlt:l.mobileBannerAlt,textColor:l.textColor,...c,children:l.mobileBannerAlt})},`menu-categories-${i}`)})}),t.jsx(Fn,{})]})};Un.displayName="Menu.MenuBody";const qn=({title:e,subtitle:n})=>{const{CONSTANTS:r}=L();return t.jsxs("div",{className:O["menu-header-wrapper"],style:n?{alignItems:"start"}:{alignItems:"center"},children:[(e||n)&&t.jsx(d.TextStructure.Root,{children:t.jsxs(d.TextStructure.DivWrapper,{children:[e&&t.jsx("h2",{className:"typography-style-body-md",children:e}),n&&t.jsx("h3",{children:n})]})}),t.jsx(d.Button,{adornment:{end:t.jsx(d.Icon,{name:r.header.ICONS.close})},variant:"tertiary",className:O["menu-close"],"data-close":!0})]})};qn.displayName="Menu.MenuHeaderWrapper";const Vn=({navigationLinks:e})=>{const{reset:n}=ie(),{handleSelectContent:r}=x.useEventContext();return e?t.jsx("nav",{className:O["menu-header-navlinks"],children:e.map((s,o)=>t.jsx(ne,{href:s.link??"#",adornments:{start:s.iconStart&&t.jsx(d.Icon,{name:s.iconStart}),end:s.iconEnd&&t.jsx(d.Icon,{name:s.iconEnd})},onClick:()=>{n(),r({content:`menu:navigationlinks-${s.label}`})},children:s.label},o))}):null};Vn.displayName="Menu.MenuHeaderNavLinks";const Gn=()=>{const{headerData:e}=L();return t.jsxs("div",{className:O["menu-header-container"],children:[t.jsx(qn,{title:e.title,subtitle:e.subtitle}),t.jsx(Vn,{navigationLinks:e.navigationLinks})]})};Gn.displayName="Menu.MenuHeaderContainer";const Hn=({children:e})=>{const{documentBodyRef:n}=Ce(),{CONSTANTS:r}=L(),s=Ze(),{setValue:o}=ie();return t.jsx(d.Modal.RootWithoutPortal,{isOpen:s,setIsOpen:o,parent:n.current,variant:"sideLeft",style:{position:"fixed",zIndex:r.header.Z_INDEX_WAR.menu_mobile,bottom:"unset",top:0,overflowY:"hidden"},className:O["modal-modifier"],children:t.jsx("div",{className:O["menu-mobile"],children:e})})};Hn.displayName="Menu.MenuRoot";const Ie=({children:e,...n})=>t.jsxs(t.Fragment,{children:[t.jsx(d.Button,{...n,className:O["menu-navigationbar-item"],children:e}),t.jsx(d.Utils.Divider,{direction:"vertical",size:"small",className:O.divider})]});Ie.displayName="Menu.NavigationBarItem";const Wn=()=>{const{setIsOpen:e}=Z(),{reset:n}=ie(),{setValue:r}=ye(),{handleSelectContent:s}=x.useEventContext(),{CONSTANTS:o}=L(),{router:a}=x.useNextContext();return t.jsxs(d.Card,{id:"menu-navigationbar",shadow:!0,className:O["menu-navigationbar"],style:{zIndex:o.header.Z_INDEX_WAR.menu_mobile_navigation_bar},children:[t.jsx(Ie,{size:"small",variant:"tertiary",iconNameStart:o.header.MENU_INFO.login.button_icon,onClick:()=>{n(),r(!0),s({content:"menu:user_menu"})},children:o.header.MENU_INFO.login.button_text}),t.jsx(Ie,{size:"small",variant:"tertiary",iconNameStart:o.header.MENU_INFO.bag.button_icon,onClick:()=>{n(),e(!0),s({content:"menu:minicart"})},children:o.header.MENU_INFO.bag.button_text}),t.jsx(Ie,{size:"small",variant:"tertiary",iconNameStart:o.header.MENU_INFO.store.button_icon,onClick:()=>{a.push("/institucional/lojas"),n(),s({content:"menu:store"})},children:o.header.MENU_INFO.store.button_text})]})};Wn.displayName="Menu.NavigationBar";const je={Root:Hn,NavigationBar:Wn,Header:Gn,Body:Un},Kn=({SearchModal:e})=>{const n=f.useRef(null),{CONSTANTS:r,userMenuMobileRef:s}=L(),{MENU_NAVIGATION_BAR_ALLOWED:o,ICONS:a,MENU_MOB_BTN_SIDE:l="right"}=r.header,{handleSelectContent:i}=x.useEventContext(),{setValue:c}=et(),{setValue:u}=ie(),{setValue:m}=ye();return t.jsxs(t.Fragment,{children:[t.jsxs(d.Header.Wrapper,{children:[l==="left"&&t.jsx(d.Header.SupportItem,{onClick:()=>u(!0),innerRef:n,children:t.jsx(d.Icon,{name:a.menu,size:"medium"})}),t.jsx(d.Header.Logo,{style:{width:"100%",justifyContent:"center"},children:t.jsx(x.NextLink,{href:"/",children:t.jsx(d.Icon,{name:a.logo,size:"x-large",onClick:()=>{i({content:"header:logo"})}})})}),t.jsxs(d.Header.Support,{children:[t.jsx(d.Header.SupportItem,{onClick:()=>{c(!0),i({content:"header:search"})},children:t.jsx(d.Icon,{name:a.search,size:"medium"})}),t.jsx(d.Header.SupportItem,{onClick:()=>{m(!0),i({content:"header:user_menu"})},innerRef:s,children:t.jsx(d.Icon,{name:a.person,size:"medium"})}),t.jsx(ct,{}),l==="right"&&t.jsx(d.Header.SupportItem,{onClick:()=>u(!0),innerRef:n,children:t.jsx(d.Icon,{name:a.menu,size:"medium"})})]})]}),t.jsx(e,{recommendations:!1,trends:!0}),t.jsx(tn,{children:t.jsxs(je.Root,{children:[t.jsx(je.Header,{}),t.jsx(je.Body,{}),o?t.jsx(je.NavigationBar,{}):t.jsx(t.Fragment,{})]})})]})};Kn.displayName="Header.HeaderMobileWrapper";const to="_root_wvekm_126",X={"user-menu--credits":"_user-menu--credits_wvekm_1","user-menu--content":"_user-menu--content_wvekm_10","user-menu--login":"_user-menu--login_wvekm_30","user-menu--login--content":"_user-menu--login--content_wvekm_37","user-menu--menu":"_user-menu--menu_wvekm_64","user-menu--tooltip":"_user-menu--tooltip_wvekm_93","tooltip-modifier":"_tooltip-modifier_wvekm_104","modal-controls-modifier":"_modal-controls-modifier_wvekm_109","modal-header-modifier":"_modal-header-modifier_wvekm_117",root:to},Xn=({className:e,children:n,...r})=>t.jsx("div",{...r,className:d.helpers.classNameConcat(X["user-menu--content"],e),children:n});Xn.displayName="UserMenu.Content";var Yn=(e=>(e.Account="account",e))(Yn||{});const Qn=({className:e,cashBack:n,credits:r,link:s,total:o,...a})=>{const l=n?K(n):void 0,i=r?K(r):void 0,c=o?K(o):void 0;return t.jsx(d.Credits.Account,{...a,className:d.helpers.classNameConcat(X["user-menu--credits"],e),icon:"wallet",showIcon:!0,cashBackValue:l,creditsValue:i,linkMore:s,totalValue:c,type:Yn.Account})};Qn.displayName="UserMenu.Credits";const Jn=({className:e,children:n,description:r,text:s,...o})=>{const{isMobile:a}=x.useGlobalContext();return t.jsx("div",{...o,className:d.helpers.classNameConcat(X["user-menu--login"],e),"data-mobile":a,children:t.jsxs("div",{className:X["user-menu--login--content"],children:[t.jsx(d.TextStructure.Root,{children:t.jsxs(d.TextStructure.DivWrapper,{alignContent:"flex-start",alignItems:"flex-start",children:[t.jsx("h3",{className:"typography-style-body-lg-strong",children:s}),t.jsx("p",{children:r})]})}),n]})})};Jn.displayName="UserMenu.Login";const Zn=({className:e,isLogged:n,onLogoutClick:r,ICONS:s,storeConfig:o})=>{const{isMobile:a}=x.useGlobalContext(),l=x.LOGIN_MENU_OPTIONS_ARRAY({ICONS:s,storeConfig:o}).filter(i=>i.deviceShown==="both"||i.deviceShown===(a?"mobile":"desktop"));return t.jsxs("ul",{className:d.helpers.classNameConcat(X["user-menu--menu"],e),children:[Array.isArray(l)&&l.map((i,c)=>t.jsx("li",{children:t.jsx(ne,{href:i.href??"#",size:"small",disableUnderline:!0,adornments:{start:t.jsx(d.Icon,{name:i.icon??"delete"})},children:i.label})},c)),n?t.jsx("li",{children:t.jsx(ne,{href:`${o.secureSubdomain}/api/vtexid/pub/logout?scope=mariafilo&returnUrl=${encodeURIComponent(`${o.storeUrl}`)}`,size:"small",disableUnderline:!0,onClick:r,adornments:{start:t.jsx(d.Icon,{name:x.LOGOUT_ICON(s)})},children:x.LOGOUT_TEXT})}):t.jsx(t.Fragment,{})]})};Zn.displayName="UserMenu.Menu";const no=e=>{const n=f.useRef(null),r=f.useCallback(a=>{n.current&&!n.current.contains(a.target)&&e()},[e]),s=f.useCallback(a=>{n.current&&!n.current.contains(a.target)&&e()},[e]),o=f.useCallback(a=>{a.key==="Escape"&&e()},[e]);return f.useEffect(()=>(document.addEventListener("mousedown",r),document.addEventListener("keydown",o),document.addEventListener("touchstart",s),()=>{document.removeEventListener("mousedown",r),document.removeEventListener("keydown",o),document.removeEventListener("touchstart",s)}),[r,o,s]),{ref:n}},ro=e=>{if(!e||typeof window>"u")return 0;const n=window.getComputedStyle(e);return parseInt(n.padding,10)},so=(e,n,r)=>{if(!(e instanceof HTMLElement)||!(n instanceof HTMLElement))return{left:0,top:0};const{height:s,left:o,top:a,width:l}=n.getBoundingClientRect(),i=e.getBoundingClientRect(),c=e!=null&&e.parentElement?ro(e==null?void 0:e.parentElement):0;return{left:o+l/2-(i.width+c*2),top:a+s+r}},er=f.createContext({}),oo=({children:e,delay:n=600,gap:r=20,isOpen:s,setIsOpen:o,target:a,...l})=>{const i=f.useRef(null),[c,u]=f.useState(!1),[m,h]=f.useState({left:0,top:0}),{ref:p}=no(()=>{u(!0),typeof window<"u"&&(i.current=window.setTimeout(()=>{o(!1),u(!1)},n))});return f.useEffect(()=>{if(a&&(p!=null&&p.current)){const{left:_,top:g}=so(p.current,a,r??0);h({left:_,top:g}),u(!1)}},[r,s,a,p]),t.jsx(er.Provider,{value:f.useMemo(()=>({...l,...m,contentRef:p,isLeaving:c,isOpen:s,setIsOpen:o,setIsLeaving:u,target:a}),[l,m,p,c,s,o,u,a]),children:e})},tr=()=>{const e=f.useContext(er);if(e===void 0)throw new Error("useUserMenuContext must be used within a UserMenuProvider");return e},nr=({children:e,isMobile:n=!1,Z_INDEX_WAR:r})=>{const{isOpen:s,setIsOpen:o}=tr();return t.jsxs(d.Modal.Root,{"data-user":"user-menu--modal",isMobile:n??!1,isOpen:s,setIsOpen:o,variant:"sideBottom",className:X["modal-root-modifier"],style:{zIndex:r.user_menu_mobile},children:[t.jsx(d.Modal.Header,{navigation:"top",className:X["modal-header-modifier"],children:t.jsx(d.Modal.Controls,{navigation:"top",isMobile:!0,className:X["modal-controls-modifier"]})}),t.jsx(d.Modal.Body,{children:e})]})};nr.displayName="UserMenu.Modal";const rr=({children:e,component:n,Z_INDEX_WAR:r,isMobile:s,...o})=>t.jsx(oo,{...o,className:X.root,children:s?t.jsxs(t.Fragment,{children:[t.jsx(se.Modal,{Z_INDEX_WAR:r,children:n}),e]}):t.jsx(se.Tooltip,{component:n,style:{width:304,zIndex:r.user_menu},Z_INDEX_WAR:r,children:e})});rr.displayName="UserMenu.Root";const sr=({children:e,component:n,Z_INDEX_WAR:r,...s})=>{const{contentRef:o,left:a,isLeaving:l,isOpen:i,top:c}=tr();return t.jsx(d.Tooltip.Root,{arrow:"top-right",component:t.jsx("div",{...s,ref:o,children:n}),className:d.helpers.classNameConcat(X["user-menu--tooltip"],X["tooltip-modifier"]),isLeaving:l,isOpen:i,left:a,size:"medium",position:"top",top:c,style:{zIndex:r.user_menu},children:t.jsx("div",{className:X["user-menu--tooltip"],children:e})})};sr.displayName="UserMenu.Tooltip";const se={Credits:Qn,Content:Xn,Login:Jn,Menu:Zn,Modal:nr,Root:rr,Tooltip:sr},ut=()=>{var C,y,v;const e=ot(),{isMobile:n}=x.useGlobalContext(),{userMenuMobileRef:r,userMenuDesktopRef:s,CONSTANTS:{header:o},storeConfig:a}=L(),{ICONS:l,Z_INDEX_WAR:i,MENU_INFO:c}=o,u=Wt(),{setValue:m}=ye(),h=()=>{window.location.href=`${a.secureSubdomain}/api/io/login?returnUrl=${encodeURIComponent(`${a.storeUrl}`)}`},p=!!((C=e.user)!=null&&C.userId),{cashback:_,credits:g}=f.useMemo(()=>{var N,j;return{credits:((N=e==null?void 0:e.getCurrentCredits())==null?void 0:N.credits)??0,cashback:((j=e==null?void 0:e.getCurrentCredits())==null?void 0:j.cashback)??0}},[e]);return t.jsx(se.Root,{component:t.jsxs(se.Content,{children:[t.jsx(se.Login,{description:x.LOGIN_MENU_DESCRIPTION(p),text:x.LOGIN_MENU_TITLE(p,((y=e==null?void 0:e.user)==null?void 0:y.firstName)??((v=e==null?void 0:e.user)==null?void 0:v.email)),children:!p&&t.jsx(d.Button,{size:"medium",variant:"quaternary",onClick:()=>h(),children:c.login.button_text})}),g+_&&p?t.jsx(se.Credits,{credits:g,cashBack:_,link:`${a.secureSubdomain}/account#/meus-creditos`,total:g+_}):t.jsx(t.Fragment,{}),t.jsx(d.Utils.Divider,{}),t.jsx(se.Menu,{isLogged:p,onLogoutClick:()=>e.logout(),ICONS:l,storeConfig:a})]}),target:n?r.current:s.current,isOpen:u,isMobile:n,setIsOpen:m,Z_INDEX_WAR:i})};ut.displayName="UserMenu";const or=({tipBar:e,miniCart:n,SearchModal:r})=>{const{structureRef:s,rootRef:o,CONSTANTS:a}=L(),{header:{HEADER_CONFIGS:l,Z_INDEX_WAR:i}}=a;return t.jsx(d.Header.Structure,{innerRef:s,adornment:{start:e},style:{position:"sticky",top:0,zIndex:i.header},className:lt["header-animation"],children:t.jsxs(d.Header.Root,{innerRef:o,style:{zIndex:i.header},variant:l.default_variant,interactiveVariant:l.interactive_variant,children:[t.jsx("div",{className:x.responsive["responsive-mobile-block"],style:{height:"100%",width:"100%",zIndex:i.header_mobile},children:t.jsx(Kn,{SearchModal:r})}),t.jsx("div",{className:x.responsive["responsive-desktop-block"],style:{height:"100%",width:"100%",zIndex:i.header_desktop},children:t.jsx(Ln,{SearchModal:r})}),n,t.jsx(it,{title:"Produto adicionado à sua sacola!",CONSTANTS:a.addToCart}),t.jsx(ut,{})]})})};or.displayName="Header";const ao="_shippingFreight_6z8rf_6",io="_shippingFreight__postalCodeGrid_6z8rf_10",lo="_shippingFreight__grid_6z8rf_14",co="_shippingFreight__grid__title_6z8rf_18",uo="_shippingFreight__grid__remember_6z8rf_29",mo="_postalCodeContainer_6z8rf_44",po="_deliveryStatusBar__tag_6z8rf_49",fo="_deliveryStatusBarError__tag_6z8rf_66",ho="_deliveryInfo_6z8rf_74",go="_deliveryInfo__content_6z8rf_78",_o="_deliveryInfo__text_6z8rf_84",xo="_deliveryInfo__title_6z8rf_89",yo="_deliveryInfo__subtitle_6z8rf_99",Co="_deliveryInfo__tooltipIcon_6z8rf_109",vo="_deliveryInfo__tooltip_6z8rf_109",bo="_freightGrid_6z8rf_148",jo="_freightContainer_6z8rf_155",So="_freightOption__content_6z8rf_160",No="_freightOption__value_6z8rf_166",Io="_freightOption__title_6z8rf_177",Eo="_freightOption__title_item_6z8rf_181",wo="_freightOption__paragraph_6z8rf_192",T={shippingFreight:ao,shippingFreight__postalCodeGrid:io,shippingFreight__grid:lo,shippingFreight__grid__title:co,shippingFreight__grid__remember:uo,postalCodeContainer:mo,deliveryStatusBar__tag:po,deliveryStatusBarError__tag:fo,deliveryInfo:ho,deliveryInfo__content:go,deliveryInfo__text:_o,deliveryInfo__title:xo,deliveryInfo__subtitle:yo,deliveryInfo__tooltipIcon:Co,deliveryInfo__tooltip:vo,freightGrid:bo,freightContainer:jo,freightOption__content:So,freightOption__value:No,freightOption__title:Io,freightOption__title_item:Eo,freightOption__paragraph:wo,"input-modifier":"_input-modifier_6z8rf_207","freight--tooltip":"_freight--tooltip_6z8rf_227"},Po=({icon:e,title:n,subtitle:r,packageCount:s,packageUnit:o="",labelDescription:a,freightConfig:l,toolTipZIndex:i})=>{const[c,u]=f.useState(!1),m=f.useRef(null),h=()=>u(p=>!p);return t.jsxs("div",{className:T.deliveryInfo,ref:m,children:[t.jsx(d.Tooltip.Root,{arrow:"bottom",component:t.jsx("div",{children:t.jsx("p",{children:l.messages.select_size_tag})}),id:"freight--tooltip",className:T["freight--tooltip"],style:{zIndex:i},isOpen:!0,size:"medium",position:"top",top:"-170%",left:"4%",parent:m.current}),t.jsxs("div",{className:T.deliveryInfo__content,children:[t.jsx("div",{className:T.deliveryInfo__icon,children:t.jsx(d.Icon,{name:e,size:"medium"})}),t.jsxs("div",{className:T.deliveryInfo__text,children:[t.jsxs("span",{className:T.deliveryInfo__title,children:[n," ",s," ",o]}),r&&t.jsx("span",{className:T.deliveryInfo__subtitle,children:r})]}),a&&t.jsxs("div",{className:T.deliveryInfo__tooltipIcon,onMouseEnter:h,onMouseLeave:h,"aria-label":"Mostrar descrição",children:[t.jsx("span",{children:t.jsx(d.Icon,{name:l.icons.feedback_help,size:"small"})}),c&&t.jsx("div",{className:T.deliveryInfo__tooltip,children:a})]})]})]})},ko=({value:e,title:n,paragraph:r})=>t.jsx("div",{className:T.freightOption,children:t.jsxs("div",{className:T.freightOption__content,children:[t.jsx("span",{className:T.freightOption__value,children:e}),t.jsx("span",{className:T.freightOption__title,children:t.jsx(d.TextStructure.Root,{children:t.jsxs(d.TextStructure.DivWrapper,{className:T.footer__item,children:[t.jsx("span",{className:T.freightOption__title_item,children:n}),r&&t.jsx("span",{className:T.freightOption__paragraph,children:r})]})})})]})}),Ao=({children:e})=>t.jsx("div",{className:T.freightContainer,children:e}),To=({children:e})=>t.jsx("div",{className:T.freightGrid,children:e}),Mo=({children:e})=>t.jsx("div",{className:T.postalCodeContainer,children:e}),yt=({message:e,seller:n="",size:r="small",setError:s})=>t.jsx("div",{className:s?T.deliveryStatusBarError:T.deliveryStatusBar,children:t.jsxs(d.Tag,{title:e,className:s?T.deliveryStatusBarError__tag:T.deliveryStatusBar__tag,size:r,children:[e," ",!s&&n]})}),Ro=e=>{const n=parseInt(e,10);return n===1?`${n} dia`:`${n} dias`},Oo=e=>{var r,s,o;const n=[];return(o=(s=(r=e==null?void 0:e.logisticsInfo)==null?void 0:r[0])==null?void 0:s.slas)==null||o.forEach(a=>{n.push({id:a.id,name:a.name,price:a.price,shippingEstimate:a.shippingEstimate})}),n},Lo=({component:e,parent:n,top:r,left:s,target:o,contentRef:a,freightConfig:l,toolTipZIndex:i=999,...c})=>{const{isMobile:u}=x.useGlobalContext();return t.jsx(t.Fragment,{children:u?t.jsx(d.Tooltip.Root,{arrow:"bottom",component:t.jsxs("div",{...c,ref:a,children:[e,t.jsx("p",{children:l.messages.select_size_tag})]}),id:"freight--tooltip",className:T["freight--tooltip"],style:{zIndex:i},isOpen:!0,size:"medium",position:"top",top:"-170%",left:"4%",parent:n}):t.jsx(d.Tooltip.Root,{arrow:"bottom",component:t.jsxs("div",{...c,ref:a,children:[e,t.jsx("p",{children:l.messages.select_size_tag})]}),id:"freight--tooltip",className:T["freight--tooltip"],style:{zIndex:i},isOpen:!0,size:"medium",position:"top",top:"-110%",left:"3%",parent:n})})},Do=({onUpdateFreightItems:e,sellerId:n,size:r,skuId:s,quantity:o,setError:a,setIsButtonClicked:l,component:i,freightConfig:c,toolTipZIndex:u})=>{var B,V,R,S;const m=x.useCartStore(),h=x.useCartStore(E=>E.shipping),[p,_]=f.useState(),[g,C]=f.useState(!1),[y,v]=f.useState(!1),[N,j]=f.useState(!1),w=(V=(B=m.shippingData)==null?void 0:B.address)==null?void 0:V.postalCode,b=!(p!=null&&p.length)&&w?w:p,I=f.useRef(null),k=async E=>{const P=E.target.value.replace(/\D/g,"").slice(0,8);P.length>5?_(P.replace(/^(\d{5})(\d{1,3})/,"$1-$2")):_(P)},D=async E=>{const A=E.target.value.replace(/\D/g,"");try{if((await pt.get(`https://viacep.com.br/ws/${A}/json/`)).data.erro){a&&a(c.messages.cep_not_found),l(!1),v(!0);return}a&&a(""),v(!1)}catch{console.log("Erro ao validar o CEP. Tente novamente mais tarde.")}},F=async()=>{C(!0);try{const E=await pt.post("/api/checkout/simulation",{items:[{id:s,quantity:o,seller:n}],country:"BRA",postalCode:b});e(Oo(E.data))}catch(E){console.error("Erro ao atualizar o documento:",E)}finally{C(!1),h(b,"BRA")}},M=async()=>{if(!s){j(!0),setTimeout(()=>j(!1),1500);return}await D({target:{value:b}}),g||(F(),l(!0))};return t.jsxs("div",{ref:I,style:{position:"relative"},children:[!s&&N?t.jsx(Lo,{component:i,isOpen:N,parent:I.current,toolTipZIndex:u,freightConfig:c}):t.jsx(t.Fragment,{}),t.jsx("div",{style:{position:"relative"},children:t.jsx(d.TextField.Structure,{title:"structure",style:{width:"100%"},input:t.jsx(d.TextField.Input,{defaultValue:(S=(R=m.shippingData)==null?void 0:R.address)==null?void 0:S.postalCode,label:c.messages.text_input_label,title:"textfield",value:p,sizeVariant:r,onMouseOver:()=>s?null:j(!0),onMouseOut:()=>s?null:j(!1),mode:"simple",onChange:k,onKeyDown:E=>{E.key==="Enter"&&M()},className:T["input-modifier"],feedback:y?"error":"none"}),right:t.jsx(d.Button,{onClick:M,size:r,title:"button",children:g?t.jsx(d.Spinner,{size:"small",indicatorColor:"#ffffff"}):c.messages.text_input_btn})})})]})},zo=({children:e,freightConfig:n})=>t.jsxs("div",{className:T.shippingFreight,children:[t.jsxs("div",{className:T.shippingFreight__grid,children:[t.jsx("span",{className:T.shippingFreight__grid__title,children:n.messages.title}),t.jsx("span",{className:T.shippingFreight__grid__remember,children:t.jsx(ne,{href:"https://buscacepinter.correios.com.br/app/endereco/index.php",passHref:!0,target:"_blank",rel:"noopener noreferrer",size:"x-small",disablePadding:!1,title:n.messages.remember_cep,children:n.messages.remember_cep})})]}),t.jsx("div",{className:T.shippingFreight__postalCodeGrid,children:e})]}),Bo=({children:e})=>t.jsx("div",{className:T.freightContainer,children:e}),$o=({className:e,sellerId:n,skuId:r,quantity:s,size:o,seller:a,local:l,CONSTANTS_PROPS:i})=>{const{sendDataLayerEvent:c}=x.useEventContext(),[u,m]=f.useState(""),[h,p]=f.useState([]),[_,g]=f.useState(""),[C,y]=f.useState(!1),v=j=>m(j),N=j=>{p(j),c({functionKey:"readyEvents",data:{event:"search_zipcode",readyData:{shippings:j.map(w=>({shipping_tier:w.id,delivery_time:w.shippingEstimate.replace("bd",""),flag_pickup:w.name.toLowerCase().includes("retirada")?"true":"false",shipping:w.price,currency:i.currency||"BRL"}))}}})};return t.jsxs(Bo,{className:e,children:[t.jsxs(zo,{freightConfig:i.freightConfig,children:[t.jsx(Mo,{children:t.jsx(Do,{onUpdateFreightItems:N,skuId:r,quantity:s,size:o,sellerId:n,local:l,setError:g,setIsButtonClicked:y,freightConfig:i.freightConfig,toolTipZIndex:i.toolTipZIndex})}),_?t.jsx(yt,{size:o,message:_,setError:g}):h.length>0&&t.jsx(yt,{size:o,message:i.freightConfig.messages.delivered_by,seller:a})]}),C&&!_?h.length>0&&t.jsxs(Ao,{children:[t.jsx(To,{children:h.filter(({id:j})=>!j.includes("Retirada")).map(j=>t.jsx(ko,{id:j.id,value:Ye({valueInCents:j.price,hasFree:!1,freeTaxMessage:i.freightConfig.messages.free_tax}),title:j.name,paragraph:`${i.freightConfig.messages.prefix_days}${Ro(j.shippingEstimate)}`,radioValue:u,changeValue:v},j.id))}),i.deliveryInfoBoxesAllowed?t.jsx(Po,{icon:i.freightConfig.icons.delivery_truck,packageUnit:i.freightConfig.messages.unit_amout,title:i.freightConfig.messages.delivered_amount_packages,subtitle:"",packageCount:1,labelDescription:"Label",freightConfig:i.freightConfig,toolTipZIndex:i.toolTipZIndex??999}):t.jsx(t.Fragment,{})]}):null]})},ar=f.createContext({}),Fo=({children:e,item:n,index:r,shelfTitle:s,...o})=>{const[a,l]=f.useState(null),i=f.useRef(null),c=f.useRef({availableSkus:[],priceInfo:{price:0,listPrice:0}}),{sendDataLayerEvent:u,itemListRef:m}=x.useEventContext(),h=C=>{u({functionKey:"productEvents",data:{commonData:{...n,availableSizes:c.current.availableSkus,...c.current.priceInfo},customData:{index:r+1},event:C}})},p=()=>{h("add_to_wishlist")},_=()=>{u({functionKey:"skuEvents",data:{event:"add_to_cart",commonData:{products:[{...n,...c.current.priceInfo}]},supportData:{selectedSku:a,selectedSkus:[a]},customData:{index:r}}})},g=()=>{s&&(m.current={item_list_name:s}),h("select_item")};return t.jsx(ar.Provider,{value:f.useMemo(()=>({...o,index:r,item:n,element:i,selectedSku:a,setSelectedSku:l,eventDataRef:c,sendAddToWishlistEvent:p,sendSelectItemEvent:g,sendAddToCartEvent:_}),[o,n,i,a]),children:e})},Y=()=>{const e=f.useContext(ar);if(e===void 0)throw new Error("useProductCardContext must be used within a ProductCardProvider");return e},U={"product-card--actions":"_product-card--actions_nmzk4_1","product-card--actions--group":"_product-card--actions--group_nmzk4_9","product-card--actions--selectors":"_product-card--actions--selectors_nmzk4_21","product-card--body":"_product-card--body_nmzk4_33","product-card--header":"_product-card--header_nmzk4_47","product-card--footer":"_product-card--footer_nmzk4_67","product-card--image":"_product-card--image_nmzk4_90","product-card--image--container":"_product-card--image--container_nmzk4_97","product-card--outstock":"_product-card--outstock_nmzk4_133","product-card--price":"_product-card--price_nmzk4_155","product-card--title":"_product-card--title_nmzk4_177","product-card--title--tag":"_product-card--title--tag_nmzk4_183","product-card--title--content":"_product-card--title--content_nmzk4_200","product-card--selectors--size":"_product-card--selectors--size_nmzk4_240","product-card--selectors--size--button":"_product-card--selectors--size--button_nmzk4_266","product-card--selectors--size--skus":"_product-card--selectors--size--skus_nmzk4_275","product-card--selectors--style":"_product-card--selectors--style_nmzk4_289","product-card--selectors--style--more":"_product-card--selectors--style--more_nmzk4_299","product-card--video":"_product-card--video_nmzk4_316","product-card--wrapper":"_product-card--wrapper_nmzk4_342"},ir=({callback:e,children:n,className:r,data:s,isKit:o,...a})=>{const{item:{availability:{status:l},image:i}}=Y();return l?t.jsxs("div",{...a,className:d.helpers.classNameConcat(U["product-card--actions"],r),children:[t.jsxs(G.Wrapper,{type:"actions--group",children:[t.jsx(G.Price,{}),t.jsx("div",{className:U["product-card--actions--selectors"],children:!o&&t.jsx(G.StyleSelector,{data:s,images:i,callback:e})})]}),n]}):null};ir.displayName="ProductCard.Actions";const lr=({className:e,isKit:n,...r})=>{const{addToCart:s}=Z(),{isMobile:o=!1,selectedSku:a,outStock:l,item:i,sendAddToCartEvent:c,CONSTANTS:u}=Y(),m=()=>{var _;if(!a)return;const p=Qe(a.offers.offers,u.StoreConfig_MainSellerId);p&&s({id:a==null?void 0:a.sku,quantity:1,seller:p.seller.identifier},{id:i.id,texture:(_=i==null?void 0:i.image.find(g=>u.TEXTURE_IMAGE.includes(g.alternateName)))==null?void 0:_.url}),c()},h=a?u.BUY_BUTTON_LABELS.add_to_cart:u.BUY_BUTTON_LABELS.select_size;return t.jsx(d.Button,{...r,className:d.helpers.classNameConcat(e,"buy-button"),disabled:!n&&!a&&!l,size:o?"medium":"large",variant:l?"secondary":"primary",onClick:l?r.onClick:m,children:l?"Avise-me quando chegar":h})};lr.displayName="ProductCard.Actions.BuyButton";const cr=({product:e,tag:n,size:r="small"})=>{const s=e.offers.offers[0],{CONSTANTS:o,WishListToggle:a}=Y();return t.jsxs(G.Wrapper,{type:"header",style:{zIndex:o.Z_INDEX_WAR.product_card_header},children:[n?t.jsx(d.Tag,{title:n.value,adornment:{start:n.enableIcon&&n.icon?t.jsx(d.Icon,{name:n.icon,size:"small",style:{color:n.iconColor}}):null},size:r,variant:"quaternary",style:{background:n.tagColor,color:n.textColor},children:n.value}):null,o.PRODUCT_CARD_TOP_WISHLIST_TOGGLE&&t.jsx(a,{product:e,priceInfo:{price:s.price,listPrice:s.listPrice},variant:"card"})]})};cr.displayName="ProductCard.Actions.Header";const dr=({className:e,children:n,hasPriority:r=!1,showVideo:s=!1,...o})=>{const{element:a,index:l,item:{image:i,slug:c,video:u},sendSelectItemEvent:m,order:h,CONSTANTS:p}=Y(),_=$t({images:i,label:{first:p.MAIN_IMAGE,second:p.SECOND_IMAGE}});return t.jsxs("div",{...o,className:d.helpers.classNameConcat(U["product-card--image"],e),ref:a,style:{aspectRatio:p.PRODUCT_CARD_IMAGE_ASPECT_RATIO},children:[t.jsx(x.NextLink,{href:`/${c}/p`,onClick:m,onMouseUp:g=>{g.button===1&&m(),p.PLP_INFINITE_SCROLL&&sessionStorage.setItem(p.PLP_GRID_SCROLL_BACK.order,String(h))},children:t.jsx("div",{className:U["product-card--image--container"],children:Array.isArray(_)&&_.map(({url:g,alternateName:C},y)=>f.createElement(J.Image,{...p.PRODUCT_IMAGE_DIMENSIONS.product_card,style:p.PRODUCT_IMAGE_DIMENSIONS.product_card,alt:C??"product image",key:y,...r&&{priority:y===0&&l<4},objectFit:"cover",src:g}))})}),p.PLP_SHOW_VIDEO_ON_PRODUCT_CARD&&s&&u&&t.jsx(G.Video,{url:u,poster:_[0].url}),n]})};dr.displayName="ProductCard.Media.Media";const ur=({className:e,callback:n,children:r,...s})=>{const{isMobile:o,item:a,CONSTANTS:{PRODUCT_CARD_TEXTS:l}}=Y(),{availability:{status:i}}=a;return i?null:t.jsxs("div",{...s,className:d.helpers.classNameConcat(U["product-card--outstock"],e),children:[t.jsx(d.Tag,{size:"small",variant:"secondary",title:l.disabled,children:l.disabled}),t.jsx(d.Button,{className:d.helpers.classNameConcat(e,"buy-button"),size:o?"medium":"large",variant:"quaternary",onClick:()=>{typeof n=="function"&&n(a)},children:l.notify})]})};ur.displayName="ProductCard.OutStock";const mr=({children:e,className:n="",index:r,isMobile:s=!1,item:o,size:a,order:l,outStock:i,shelfTitle:c,CONSTANTS:u,WishListToggle:m,...h})=>t.jsx(Fo,{item:o,isMobile:s,outStock:i,order:l,size:a,index:r,shelfTitle:c,CONSTANTS:u,WishListToggle:m,children:t.jsx("div",{...h,className:d.helpers.classNameConcat(U["product-card--wrapper"],n),"data-size":a,children:e})});mr.displayName="ProductCard.Root";const pr=({disabled:e,label:n,size:r,value:s,onClick:o,...a})=>t.jsxs(d.ToggleSize.Wrapper,{...a,disabled:!1,outOfStock:e,size:r,onClick:o,children:[t.jsx(d.ToggleSize.DisabledAdornment,{}),t.jsx(d.ToggleSize.Text,{children:n})]});pr.displayName="ProductCard.SizeSelector.Item";const fr=({active:e=!1,callback:n,selectedSku:r=null,item:s,setNotify:o})=>{const{item:a,isMobile:l,setSelectedSku:i,eventDataRef:c}=Y();s.productId=a.id;const u=Lt(s),m=x.getSKUName(s,"tamanho");!u&&!c.current.availableSkus.includes(m)&&c.current.availableSkus.push(m);const h=f.useCallback(_=>{const g=r===_?null:_;typeof i=="function"&&i(g),typeof n=="function"&&n(g)},[n,i,r]),p=f.useCallback(()=>{if(u&&typeof o=="function"){o(a,s);return}h(s)},[s,o,h,u,a]);return t.jsx(pr,{active:e,disabled:u,label:m,onClick:()=>p(),size:l?"x-small":"small",value:s})};fr.displayName="ProductCard.SizeSelector.SkuItem";const hr=({callback:e,className:n="",children:r,setNotify:s,...o})=>{const{isMobile:a,item:{isVariantOf:{hasVariant:l}},selectedSku:i}=Y();return t.jsxs("div",{...o,className:d.helpers.classNameConcat(U["product-card--selectors--size"],n),"data-mobile":a,children:[t.jsx("div",{className:U["product-card--selectors--size--skus"],children:Array.isArray(l)&&l.map((c,u)=>t.jsx(fr,{active:i===c,callback:e,item:c,selectedSku:i,setNotify:s},`size--${u}--${c.sku}`))}),t.jsx("div",{className:U["product-card--selectors--size--button"],children:r})]})};hr.displayName="ProductCard.SizeSelector";const $e=({alt:e="",callback:n,more:r,total:s=4,src:o,url:a,...l})=>t.jsxs(d.ToggleStyle.Wrapper,{...l,onClick:()=>{typeof n=="function"&&n(a)},children:[t.jsx(d.ToggleStyle.DisabledAdornment,{}),t.jsxs(d.ToggleStyle.Texture,{children:[o&&t.jsx(J.Image,{alt:e??o,src:o,height:34,width:34}),r&&t.jsx(d.TextStructure.DivWrapper,{className:U["product-card--selectors--style--more"],children:t.jsxs("p",{children:["+ ",s]})})]})]}),Uo=({children:e,callback:n,data:r,total:s=4,size:o,...a})=>{const{index:l}=Y(),{triggerSelectItemEventRef:i}=x.useEventContext();return t.jsxs("div",{...a,children:[e,Array.isArray(r)&&r.slice(0,s).map((c,u)=>t.jsx($e,{callback:m=>{i.current.trigger=!0,i.current.index=l,typeof n=="function"&&n(m)},src:(c==null?void 0:c.textureImage)??"",alt:c==null?void 0:c.textureAlt,url:c==null?void 0:c.slug,size:o},u)),Array.isArray(r)&&(r==null?void 0:r.length)>s&&t.jsx($e,{size:o,total:r.length-s,more:!0})]})},gr=({callback:e,className:n,data:r,images:s=[],findTexture:o,...a})=>{const{CONSTANTS:l}=Y(),i=o||l.TEXTURE_IMAGE,c=s==null?void 0:s.find(u=>i.includes(u.alternateName));return t.jsx(Uo,{...a,callback:e,className:d.helpers.classNameConcat(U["product-card--selectors--style"],n),data:r,size:"x-small",children:c&&t.jsx($e,{active:!0,size:"x-small",src:c.url})})};gr.displayName="ProductCard.StyleSelector";const _r=({className:e,hasDecimal:n,...r})=>{const{isMobile:s,item:{offers:{lowPrice:o,highPrice:a},installments:{count:l,value:i}},eventDataRef:c}=Y();c.current.priceInfo={price:o,listPrice:a};const u=K(a,n),m=K(o,n),h=K(i??0),p=s?"horizontal":"stacked";return t.jsx("div",{...r,className:d.helpers.classNameConcat(U["product-card--price"],e),"data-mobile":s,children:t.jsx(d.ProductInfo.Root,{size:"small",layout:p,children:t.jsxs(d.ProductInfo.Wrapper,{size:"small",layout:p,children:[t.jsx(d.ProductInfo.ValuesWrapper,{children:m!==u?t.jsxs(t.Fragment,{children:[t.jsx(d.ProductInfo.Price,{label:"originalPrice",value:u,size:"small"}),t.jsx(d.ProductInfo.Price,{label:"discountPrice",value:m,size:"small"})]}):t.jsx(d.ProductInfo.Price,{label:"defaultPrice",value:m,size:"small"})}),l&&l>1&&i?t.jsx(d.ProductInfo.Price,{label:"installment",value:`${l}x ${h}`,size:"small"}):null]})})})};_r.displayName="ProductCard.Price";const xr=({tag:e,className:n})=>{const{item:{name:r}}=Y();return t.jsxs("div",{className:d.helpers.classNameConcat(U["product-card--title"],n),children:[t.jsx("div",{className:U["product-card--title--tag"],children:e?t.jsx(d.Tag,{size:"small",title:e.value,variant:"quaternary",adornment:{start:e.enableIcon&&e.icon?t.jsx(d.Icon,{name:e.icon,style:{color:e.iconColor}}):null},style:{background:e.tagColor,color:e.textColor},children:e.value}):t.jsx("div",{})}),t.jsx("div",{className:U["product-card--title--content"],children:r&&t.jsx(d.TextStructure.Root,{children:t.jsx(d.TextStructure.DivWrapper,{children:t.jsx("h3",{children:r})})})})]})};xr.displayName="ProductCard.Title";const yr=({className:e,url:n,poster:r,...s})=>{const{element:o}=Y();return f.useEffect(()=>{if(!(o!=null&&o.current))return;const a=o.current,l=a.querySelector("video");if(l){const i=new IntersectionObserver(m=>{m.forEach(h=>{Ft(h.isIntersecting,l,n)})},{root:null,rootMargin:"0px",threshold:.5}),c=()=>{l.setAttribute("data-loaded","true")},u=()=>{a&&(i.observe(a),l.addEventListener("loadeddata",c))};return document.readyState==="complete"?u():window.addEventListener("load",u),()=>{i.disconnect(),window.removeEventListener("load",u)}}return()=>null},[n,o]),t.jsx("div",{...s,className:d.helpers.classNameConcat(U["product-card--video"],e),children:n&&t.jsx(J.Video,{autoPlay:!1,muted:!0,loop:!0,preload:"none",playsInline:!0,poster:r})})};yr.displayName="ProductCard.Media.Video";const Cr=({children:e,className:n,type:r,...s})=>t.jsx("div",{...s,className:d.helpers.classNameConcat(U[`product-card--${r}`],n),children:e});Cr.displayName="ProductCard.Wrapper";const G={Actions:ir,BuyButton:lr,Header:cr,Media:dr,Root:mr,OutStock:ur,Price:_r,SizeSelector:hr,StyleSelector:gr,Title:xr,Video:yr,Wrapper:Cr},qo=Object.freeze(Object.defineProperty({__proto__:null,Footer:x.Footer,FooterSupport:x.FooterSupport},Symbol.toStringTag,{value:"Module"})),Ct=({image:e,index:n,handleZoom:r,PRODUCT_IMAGE_DIMENSIONS:s})=>{const o=zt(e.imageUrl,s.pdp),{nextimage:a}=x.useNextContext();return t.jsx(a,{src:o,alt:e.imageLabel,objectFit:"contain",...s.pdp,...n<=1&&{priority:!0,loading:"eager"},onClick:()=>{r(n)}},n)},Vo=({video:e,productName:n,poster:r})=>{const{sendDataLayerEvent:s}=x.useEventContext(),o=f.useRef(!1);return t.jsx(J.Video,{src:e,autoPlay:!0,muted:!0,loop:!0,playsInline:!0,style:{zIndex:-1,aspectRatio:"2/3"},onPlaying:()=>{o.current||(o.current=!0,s({functionKey:"readyEvents",data:{event:"video_start",readyData:{product:n}}}))},poster:r})},Go={"gallery-carousel-modifier":"_gallery-carousel-modifier_1dxfy_92"},vr=({images:e,video:n,handleZoom:r,productName:s,PRODUCT_IMAGE_DIMENSIONS:o})=>{var u,m;const{initialize:a,pagination:l,controller:i,itemsStyles:c}=d.Carousel.useCarousel({gap:0,itemsPerPage:1,loop:!1,direction:"row"});return t.jsxs(d.Carousel.Root,{innerRef:h=>{a(h)},className:Go["gallery-carousel-modifier"],children:[t.jsx(d.Carousel.Controller,{position:"absolute",top:"24px",bottom:"unset",left:"16px",children:t.jsx(d.Carousel.Bullets,{page:l.currentPage,total:e.length,onBulletClick:h=>i==null?void 0:i.navigateTo(h)})}),t.jsxs(d.Carousel.Body,{children:[t.jsx(d.Carousel.Item,{style:c,children:t.jsx(Ct,{image:e[0],index:0,handleZoom:r,PRODUCT_IMAGE_DIMENSIONS:o})},"PDP_gallery_0"),n&&t.jsx(d.Carousel.Item,{style:c,children:t.jsx(Vo,{video:n,productName:s,...((u=e[1])==null?void 0:u.imageUrl)&&{poster:(m=e[1])==null?void 0:m.imageUrl}})},"PDP_gallery_video"),e.map((h,p)=>p===0?null:t.jsx(d.Carousel.Item,{style:c,children:t.jsx(Ct,{image:h,index:p,handleZoom:r,PRODUCT_IMAGE_DIMENSIONS:o})},`PDP_gallery_${p}`))]})]})};vr.displayName="PDP.Carousel";const Ho=({productImgs:e,PRODUCT_IMAGE_DIMENSIONS:n})=>{const{video:r,productName:s}=Je(),[o,a]=f.useState({show:!1,initialIndex:0});f.useEffect(()=>(o.show?document.body.classList.add("no-scroll"):document.body.classList.remove("no-scroll"),()=>{document.body.classList.remove("no-scroll")}),[o]);const l=i=>{a({show:!0,initialIndex:i})};return t.jsx(t.Fragment,{children:t.jsx(vr,{images:e,video:r,handleZoom:l,productName:s,PRODUCT_IMAGE_DIMENSIONS:n})})},br=({TEXTURE_IMAGE:e,PRODUCT_IMAGE_DIMENSIONS:n})=>{const{images:r}=Je(),s=f.useMemo(()=>{const o=r.filter(a=>!e.includes(a.imageLabel));return o.length>0?o:r},[]);return t.jsx(Ho,{productImgs:s,PRODUCT_IMAGE_DIMENSIONS:n})};br.displayName="PDP.Gallery";const Wo=Object.freeze(Object.defineProperty({__proto__:null,Gallery:br},Symbol.toStringTag,{value:"Module"})),Ko="_container_1sy8s_16",te={"carousel-container":"_carousel-container_1sy8s_1","add-cart-container":"_add-cart-container_1sy8s_8",container:Ko,"add-itens-to-cart-container":"_add-itens-to-cart-container_1sy8s_38","add-itens-to-cart-container-values":"_add-itens-to-cart-container-values_1sy8s_45","add-itens-to-cart-qty-products":"_add-itens-to-cart-qty-products_1sy8s_50","add-itens-to-cart-total":"_add-itens-to-cart-total_1sy8s_60","add-button":"_add-button_1sy8s_70"},Xo=({selectedProducts:e,handleAddAllToCart:n,CONSTANTS:r})=>{const s=Object.values(e.products).length;return t.jsxs("div",{className:te["add-itens-to-cart-container"],children:[t.jsxs("div",{className:te["add-itens-to-cart-container-values"],children:[t.jsx("div",{className:te["add-itens-to-cart-qty-products"],children:t.jsx("span",{children:s===0?r.BUY_PACKAGE.group_cart.select_all_product:`${s} ${s===1?r.BUY_PACKAGE.group_cart.select_product:r.BUY_PACKAGE.group_cart.select_product+"s"}`})}),t.jsx("div",{className:te["add-itens-to-cart-total"],children:t.jsx("span",{children:Ye({valueInCents:e.totalPrice*100,hasFree:!1,freeTaxMessage:r.FREIGHT_CALCULATION.messages.free_tax})})})]}),t.jsx(d.Button,{onClick:n,className:te["add-button"],size:"large",disabled:s===0,variant:"primary",children:r.BUY_BUTTON_LABELS.add_to_cart})]})},Yo=e=>e.reduce((n,r)=>{var o;const s=n.find(a=>a.node.id===r.node.id);if(!s)return[...n,r];if((o=s==null?void 0:s.node.isVariantOf)!=null&&o.hasVariant){const a=s.node.isVariantOf.hasVariant,l=r.node.isVariantOf.hasVariant;a&&l&&(s.node.isVariantOf.hasVariant=[...a,...l])}return n},[]),Qo=({selectedProduct:e,productId:n,prevState:r,mainSellerId:s})=>{const{products:o,totalPrice:a}=r;try{if(!e){const{[n]:u,...m}=o;return{...r,totalPrice:a-u.price,products:m}}const l=Qe(e.offers.offers,s);if(!l)return r;const i=l.seller.identifier,c=l.price;if(o[n]){const{price:u}=o[n];return o[n]={...o[n],price:c,id:e.sku,seller:i},{totalPrice:a+c-u,products:{...o}}}return{totalPrice:a+c,products:{...o,[n]:{id:e.sku,price:c,seller:i,productId:n}}}}catch(l){return console.error("Error handling SKU selection:",l),r}},Jo="_carousel_245ib_1",Zo="_shelf__container_245ib_14",ea="_shelf_without_carousel_245ib_34",he={carousel:Jo,"custom-controllers":"_custom-controllers_245ib_5",shelf__container:Zo,"controllers-arrows-bullets":"_controllers-arrows-bullets_245ib_23",shelf_without_carousel:ea},vt=({title:e})=>t.jsx("div",{className:he.shelf__container,children:e&&t.jsx(d.TextStructure.Root,{children:t.jsxs(d.TextStructure.DivWrapper,{children:[t.jsx("h2",{className:d.helpers.classNameConcat("typography-style-body-md",x.responsive["responsive-mobile-flex"]),children:e}),t.jsx("h2",{className:d.helpers.classNameConcat("typography-style-heading-md",x.responsive["responsive-desktop-flex"]),children:e})]})})}),ta=({children:e,ICONS:n,itemsPerPage:r,title:s})=>{const{isMobile:o}=x.useGlobalContext(),a=r[o?"mobile":"desktop"],{initialize:l,controller:i,itemsStyles:c,pagination:u}=d.Carousel.useCarousel({itemsPerPage:a,gap:10,loop:!0,direction:"row"}),m=f.Children.toArray(e).length;return o||m>=4?t.jsxs(d.Carousel.Root,{innerRef:p=>{l(p)},className:he.carousel,children:[t.jsxs("div",{className:he["custom-controllers"],children:[s&&t.jsx(vt,{title:s}),a<m&&t.jsxs(d.Carousel.Controller,{className:he["controllers-arrows-bullets"],children:[t.jsxs(d.Carousel.Arrows,{children:[t.jsx(d.Button,{variant:"tertiary",onClick:()=>i==null?void 0:i.prevPage(),adornment:{start:t.jsx(d.Icon,{name:n.arrow_left})}}),t.jsx(d.Button,{variant:"tertiary",onClick:()=>i==null?void 0:i.nextPage(),adornment:{start:t.jsx(d.Icon,{name:n.arrow_right})}})]}),!o&&a>2&&t.jsx(d.Carousel.Bullets,{page:u.currentPage,total:u.totalPages,onBulletClick:p=>i==null?void 0:i.navigateTo(p)})]})]}),t.jsx(d.Carousel.Body,{children:f.Children.map(e,(p,_)=>t.jsx(d.Carousel.Item,{style:{...c,overflow:"hidden"},children:p},`${s}_${_}`))})]}):t.jsxs(t.Fragment,{children:[s&&t.jsx(vt,{title:s}),t.jsx("div",{className:he.shelf_without_carousel,children:e})]})},na={Shelf:ta},ra=({CONSTANTS:e,inView:n,products:r,innerRef:s,WishListToggle:o})=>{const a=f.useMemo(()=>Yo(r),[r]),{isMobile:l}=x.useGlobalContext(),{addItemsToCart:i}=Z(),{sendDataLayerEvent:c}=x.useEventContext(),{getAvailableProductTag:u}=Xe(),[m,h]=f.useState({totalPrice:0,products:{}}),p=()=>{const g=Object.values(m.products);i(g),c({functionKey:"skuEvents",data:{event:"add_to_cart",commonData:{products:g.map(C=>{const y=a.find(v=>v.node.id===C.productId);return y==null?void 0:y.node})},supportData:{selectedSkus:g,price:m.totalPrice}}})},_=({selectedProduct:g,productId:C})=>{const y=Qo({selectedProduct:g,productId:C,prevState:m,mainSellerId:e.StoreConfig_MainSellerId});h(y)};return f.useEffect(()=>{if(!n||a.length===0)return;const g=e.BUY_PACKAGE.header.title;c({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:a},customData:{item_list_name:g},outsideEcommerceData:{item_list_name:g}}})},[n]),t.jsxs("div",{className:te.container,ref:s,children:[t.jsx("div",{className:te["carousel-container"],style:{width:a.length<=3?"max-content":"75%"},children:t.jsx(na.Shelf,{title:e.BUY_PACKAGE.header.title,itemsPerPage:{desktop:3,mobile:a.length>=3?2.2:a.length},ICONS:e.ICONS,children:Array.isArray(a)&&a.map(({node:g},C)=>{var N,j,w;const y=u(g.cluster.highlights),{availability:{status:v}}=g;return v?t.jsxs(G.Root,{item:{...g,image:at.helpers.product.getFirstImages({images:g.image,label:{first:e.MAIN_IMAGE,second:e.SECOND_IMAGE}})},isMobile:l,size:"medium",index:C,shelfTitle:e.BUY_PACKAGE.header.title,CONSTANTS:e,WishListToggle:o,children:[t.jsx(G.Header,{product:g,tag:y.commercial}),t.jsx(G.Media,{}),t.jsxs(G.Wrapper,{type:"body",children:[t.jsx(G.Title,{tag:{value:(N=y.institucional)==null?void 0:N.value,enableIcon:(j=y.institucional)==null?void 0:j.enableIcon,icon:(w=y.institucional)==null?void 0:w.icon}}),t.jsx(G.Actions,{children:t.jsx(G.SizeSelector,{callback:b=>_({selectedProduct:b,productId:g.id})})})]})]},g.id):null})})}),t.jsx("div",{className:te["add-cart-container"],children:t.jsx(Xo,{handleAddAllToCart:p,selectedProducts:m,CONSTANTS:{BUY_BUTTON_LABELS:e.BUY_BUTTON_LABELS,BUY_PACKAGE:e.BUY_PACKAGE,FREIGHT_CALCULATION:e.FREIGHT_CALCULATION}})})]})},sa=({page:e,data:n})=>{const{pathname:r}=x.useNextContext(),s=f.useRef(null),{sendDataLayerEvent:o,currentLocalRef:a,itemListRef:l,promotionEventRef:i}=x.useEventContext();return f.useEffect(()=>{const c=gn("login_event")||"{}",u=JSON.parse(c);if(u.name||u.method){const m=new Date(0);o({functionKey:"readyEvents",data:{event:u.name,readyData:{method:u.method}}}),st("login_event","",{expires:m})}},[]),f.useEffect(()=>{if(s.current===r)return;s.current=r;let c={};switch(e){case"PDP":{const m=n,h={};if(!m){c={page_category:"pdp"};break}m.items.forEach(({itemId:p,sellers:_})=>h[p]=_[0].commertialOffer.AvailableQuantity),c={page_category:"pdp",seller_ids:m.items.map(({sellers:p})=>p[0].sellerId).join(),skuStocks:h,product_reference_id:m.productReference};break}case"PDC":{const{page_category:m,page_departament:h,id:p,name:_}=x.getPageCategoryAndDepartmentFromSlug(),g=_,C=p;c={page_category:"lista_produtos",...h&&{page_departament:h}},l.current={item_list_name:r==="/search"?"busca":g??void 0,item_list_id:r==="/search"?void 0:C??void 0},h&&o({functionKey:"readyEvents",data:{event:"view_category",readyData:{page_category:m,page_departament:h}}});break}default:c={page_category:e},i.current={},l.current={};break}const u={region:e,...c};a.current=e,o({functionKey:"readyEvents",data:{readyData:{vtex_version:"fast",...u}},timeout:0})},[r]),null};var Fe={exports:{}};function oa(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Oe={},Le={},bt;function aa(){return bt||(bt=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"LoadableContext",{enumerable:!0,get:function(){return s}});const s=x._interop_require_default._(f).default.createContext(null);process.env.NODE_ENV!=="production"&&(s.displayName="LoadableContext")}(Le)),Le}var jt;function ia(){return jt||(jt=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return _}});const r=x._interop_require_default._(f),s=aa();function o(g){return g&&g.default?g.default:g}const a=[],l=[];let i=!1;function c(g){let C=g(),y={loading:!0,loaded:null,error:null};return y.promise=C.then(v=>(y.loading=!1,y.loaded=v,v)).catch(v=>{throw y.loading=!1,y.error=v,v}),y}function u(g,C){let y=Object.assign({loader:null,loading:null,delay:200,timeout:null,webpack:null,modules:null},C),v=null;function N(){if(!v){const b=new m(g,y);v={getCurrentValue:b.getCurrentValue.bind(b),subscribe:b.subscribe.bind(b),retry:b.retry.bind(b),promise:b.promise.bind(b)}}return v.promise()}if(typeof window>"u"&&a.push(N),!i&&typeof window<"u"){const b=y.webpack&&typeof oa.resolveWeak=="function"?y.webpack():y.modules;b&&l.push(I=>{for(const k of b)if(I.includes(k))return N()})}function j(){N();const b=r.default.useContext(s.LoadableContext);b&&Array.isArray(y.modules)&&y.modules.forEach(I=>{b(I)})}function w(b,I){j();const k=r.default.useSyncExternalStore(v.subscribe,v.getCurrentValue,v.getCurrentValue);return r.default.useImperativeHandle(I,()=>({retry:v.retry}),[]),r.default.useMemo(()=>k.loading||k.error?r.default.createElement(y.loading,{isLoading:k.loading,pastDelay:k.pastDelay,timedOut:k.timedOut,error:k.error,retry:v.retry}):k.loaded?r.default.createElement(o(k.loaded),b):null,[b,k])}return w.preload=()=>N(),w.displayName="LoadableComponent",r.default.forwardRef(w)}class m{promise(){return this._res.promise}retry(){this._clearTimeouts(),this._res=this._loadFn(this._opts.loader),this._state={pastDelay:!1,timedOut:!1};const{_res:C,_opts:y}=this;C.loading&&(typeof y.delay=="number"&&(y.delay===0?this._state.pastDelay=!0:this._delay=setTimeout(()=>{this._update({pastDelay:!0})},y.delay)),typeof y.timeout=="number"&&(this._timeout=setTimeout(()=>{this._update({timedOut:!0})},y.timeout))),this._res.promise.then(()=>{this._update({}),this._clearTimeouts()}).catch(v=>{this._update({}),this._clearTimeouts()}),this._update({})}_update(C){this._state={...this._state,error:this._res.error,loaded:this._res.loaded,loading:this._res.loading,...C},this._callbacks.forEach(y=>y())}_clearTimeouts(){clearTimeout(this._delay),clearTimeout(this._timeout)}getCurrentValue(){return this._state}subscribe(C){return this._callbacks.add(C),()=>{this._callbacks.delete(C)}}constructor(C,y){this._loadFn=C,this._opts=y,this._callbacks=new Set,this._delay=null,this._timeout=null,this.retry()}}function h(g){return u(c,g)}function p(g,C){let y=[];for(;g.length;){let v=g.pop();y.push(v(C))}return Promise.all(y).then(()=>{if(g.length)return p(g,C)})}h.preloadAll=()=>new Promise((g,C)=>{p(a).then(g,C)}),h.preloadReady=g=>(g===void 0&&(g=[]),new Promise(C=>{const y=()=>(i=!0,C());p(l,g).then(y,y)})),typeof window<"u"&&(window.__NEXT_PRELOADREADY=h.preloadReady);const _=h}(Oe)),Oe}(function(e,n){Object.defineProperty(n,"__esModule",{value:!0});function r(m,h){for(var p in h)Object.defineProperty(m,p,{enumerable:!0,get:h[p]})}r(n,{noSSR:function(){return c},default:function(){return u}});const s=x._interop_require_default,o=s._(f),a=s._(ia()),l=typeof window>"u";function i(m){return{default:(m==null?void 0:m.default)||m}}function c(m,h){if(delete h.webpack,delete h.modules,!l)return m(h);const p=h.loading;return()=>o.default.createElement(p,{error:null,isLoading:!0,pastDelay:!1,timedOut:!1})}function u(m,h){let p=a.default,_={loading:y=>{let{error:v,isLoading:N,pastDelay:j}=y;if(!j)return null;if(process.env.NODE_ENV!=="production"){if(N)return null;if(v)return o.default.createElement("p",null,v.message,o.default.createElement("br",null),v.stack)}return null}};m instanceof Promise?_.loader=()=>m:typeof m=="function"?_.loader=m:typeof m=="object"&&(_={..._,...m}),_={..._,...h};const g=_.loader,C=()=>g!=null?g().then(i):Promise.resolve(i(()=>null));return _.loadableGenerated&&(_={..._,..._.loadableGenerated},delete _.loadableGenerated),typeof _.ssr=="boolean"&&!_.ssr?(delete _.webpack,delete _.modules,c(p,_)):p({..._,loader:C})}(typeof n.default=="function"||typeof n.default=="object"&&n.default!==null)&&typeof n.default.__esModule>"u"&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),e.exports=n.default)})(Fe,Fe.exports);var la=Fe.exports,ca=la;const da=x.getDefaultExportFromCjs(ca);var Ue={exports:{}},Se={exports:{}},St;function ua(){return St||(St=1,function(e,n){Object.defineProperty(n,"__esModule",{value:!0});function r(c,u){for(var m in u)Object.defineProperty(c,m,{enumerable:!0,get:u[m]})}r(n,{DOMAttributeNames:function(){return s},isEqualNode:function(){return a},default:function(){return i}});const s={acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv",noModule:"noModule"};function o(c){let{type:u,props:m}=c;const h=document.createElement(u);for(const g in m){if(!m.hasOwnProperty(g)||g==="children"||g==="dangerouslySetInnerHTML"||m[g]===void 0)continue;const C=s[g]||g.toLowerCase();u==="script"&&(C==="async"||C==="defer"||C==="noModule")?h[C]=!!m[g]:h.setAttribute(C,m[g])}const{children:p,dangerouslySetInnerHTML:_}=m;return _?h.innerHTML=_.__html||"":p&&(h.textContent=typeof p=="string"?p:Array.isArray(p)?p.join(""):""),h}function a(c,u){if(c instanceof HTMLElement&&u instanceof HTMLElement){const m=u.getAttribute("nonce");if(m&&!c.getAttribute("nonce")){const h=u.cloneNode(!0);return h.setAttribute("nonce",""),h.nonce=m,m===c.nonce&&c.isEqualNode(h)}}return c.isEqualNode(u)}let l;process.env.__NEXT_STRICT_NEXT_HEAD?l=(c,u)=>{const m=document.querySelector("head");if(!m)return;const h=m.querySelectorAll('meta[name="next-head"]')||[],p=[];if(c==="meta"){const C=m.querySelector("meta[charset]");C&&p.push(C)}for(let C=0;C<h.length;C++){var _;const v=h[C].nextSibling;(v==null||(_=v.tagName)==null?void 0:_.toLowerCase())===c&&p.push(v)}const g=u.map(o).filter(C=>{for(let y=0,v=p.length;y<v;y++){const N=p[y];if(a(N,C))return p.splice(y,1),!1}return!0});p.forEach(C=>{var y;const v=C.previousSibling;if(v&&v.getAttribute("name")==="next-head"){var N;(N=C.parentNode)==null||N.removeChild(v)}(y=C.parentNode)==null||y.removeChild(C)}),g.forEach(C=>{var y;const v=document.createElement("meta");v.name="next-head",v.content="1",((y=C.tagName)==null?void 0:y.toLowerCase())==="meta"&&C.getAttribute("charset")||m.appendChild(v),m.appendChild(C)})}:l=(c,u)=>{const m=document.getElementsByTagName("head")[0],h=m.querySelector("meta[name=next-head-count]");if(process.env.NODE_ENV!=="production"&&!h){console.error("Warning: next-head-count is missing. https://nextjs.org/docs/messages/next-head-count-missing");return}const p=Number(h.content),_=[];for(let y=0,v=h.previousElementSibling;y<p;y++,v=(v==null?void 0:v.previousElementSibling)||null){var g;(v==null||(g=v.tagName)==null?void 0:g.toLowerCase())===c&&_.push(v)}const C=u.map(o).filter(y=>{for(let v=0,N=_.length;v<N;v++){const j=_[v];if(a(j,y))return _.splice(v,1),!1}return!0});_.forEach(y=>{var v;return(v=y.parentNode)==null?void 0:v.removeChild(y)}),C.forEach(y=>m.insertBefore(y,h)),h.content=(p-_.length+C.length).toString()};function i(){return{mountedInstances:new Set,updateHead:c=>{const u={};c.forEach(p=>{if(p.type==="link"&&p.props["data-optimized-fonts"]){if(document.querySelector('style[data-href="'+p.props["data-href"]+'"]'))return;p.props.href=p.props["data-href"],p.props["data-href"]=void 0}const _=u[p.type]||[];_.push(p),u[p.type]=_});const m=u.title?u.title[0]:null;let h="";if(m){const{children:p}=m.props;h=typeof p=="string"?p:Array.isArray(p)?p.join(""):""}h!==document.title&&(document.title=h),["meta","base","link","style","script"].forEach(p=>{l(p,u[p]||[])})}}}(typeof n.default=="function"||typeof n.default=="object"&&n.default!==null)&&typeof n.default.__esModule>"u"&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),e.exports=n.default)}(Se,Se.exports)),Se.exports}(function(e,n){"use client";Object.defineProperty(n,"__esModule",{value:!0});function r(b,I){for(var k in I)Object.defineProperty(b,k,{enumerable:!0,get:I[k]})}r(n,{handleClientScriptLoad:function(){return C},initScriptLoader:function(){return N},default:function(){return w}});const s=x._interop_require_default,o=x._interop_require_wildcard,a=s._(Tr),l=o._(f),i=x.requireHeadManagerContext_sharedRuntime(),c=ua(),u=x.requireRequestIdleCallback(),m=new Map,h=new Set,p=["onLoad","onReady","dangerouslySetInnerHTML","children","onError","strategy","stylesheets"],_=b=>{if(a.default.preinit){b.forEach(I=>{a.default.preinit(I,{as:"style"})});return}if(typeof window<"u"){let I=document.head;b.forEach(k=>{let D=document.createElement("link");D.type="text/css",D.rel="stylesheet",D.href=k,I.appendChild(D)})}},g=b=>{const{src:I,id:k,onLoad:D=()=>{},onReady:F=null,dangerouslySetInnerHTML:M,children:B="",strategy:V="afterInteractive",onError:R,stylesheets:S}=b,E=k||I;if(E&&h.has(E))return;if(m.has(I)){h.add(E),m.get(I).then(D,R);return}const A=()=>{F&&F(),h.add(E)},P=document.createElement("script"),$=new Promise((z,q)=>{P.addEventListener("load",function(W){z(),D&&D.call(this,W),A()}),P.addEventListener("error",function(W){q(W)})}).catch(function(z){R&&R(z)});M?(P.innerHTML=M.__html||"",A()):B?(P.textContent=typeof B=="string"?B:Array.isArray(B)?B.join(""):"",A()):I&&(P.src=I,m.set(I,$));for(const[z,q]of Object.entries(b)){if(q===void 0||p.includes(z))continue;const W=c.DOMAttributeNames[z]||z.toLowerCase();P.setAttribute(W,q)}V==="worker"&&P.setAttribute("type","text/partytown"),P.setAttribute("data-nscript",V),S&&_(S),document.body.appendChild(P)};function C(b){const{strategy:I="afterInteractive"}=b;I==="lazyOnload"?window.addEventListener("load",()=>{(0,u.requestIdleCallback)(()=>g(b))}):g(b)}function y(b){document.readyState==="complete"?(0,u.requestIdleCallback)(()=>g(b)):window.addEventListener("load",()=>{(0,u.requestIdleCallback)(()=>g(b))})}function v(){[...document.querySelectorAll('[data-nscript="beforeInteractive"]'),...document.querySelectorAll('[data-nscript="beforePageRender"]')].forEach(I=>{const k=I.id||I.getAttribute("src");h.add(k)})}function N(b){b.forEach(C),v()}function j(b){const{id:I,src:k="",onLoad:D=()=>{},onReady:F=null,strategy:M="afterInteractive",onError:B,stylesheets:V,...R}=b,{updateScripts:S,scripts:E,getIsSsr:A,appDir:P,nonce:$}=(0,l.useContext)(i.HeadManagerContext),z=(0,l.useRef)(!1);(0,l.useEffect)(()=>{const W=I||k;z.current||(F&&W&&h.has(W)&&F(),z.current=!0)},[F,I,k]);const q=(0,l.useRef)(!1);if((0,l.useEffect)(()=>{q.current||(M==="afterInteractive"?g(b):M==="lazyOnload"&&y(b),q.current=!0)},[b,M]),(M==="beforeInteractive"||M==="worker")&&(S?(E[M]=(E[M]||[]).concat([{id:I,src:k,onLoad:D,onReady:F,onError:B,...R}]),S(E)):A&&A()?h.add(I||k):A&&!A()&&g(b)),P){if(V&&V.forEach(W=>{a.default.preinit(W,{as:"style"})}),M==="beforeInteractive")return k?(a.default.preload(k,R.integrity?{as:"script",integrity:R.integrity}:{as:"script"}),l.default.createElement("script",{nonce:$,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([k])+")"}})):(R.dangerouslySetInnerHTML&&(R.children=R.dangerouslySetInnerHTML.__html,delete R.dangerouslySetInnerHTML),l.default.createElement("script",{nonce:$,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([0,{...R}])+")"}}));M==="afterInteractive"&&k&&a.default.preload(k,R.integrity?{as:"script",integrity:R.integrity}:{as:"script"})}return null}Object.defineProperty(j,"__nextScript",{value:!0});const w=j;(typeof n.default=="function"||typeof n.default=="object"&&n.default!==null)&&typeof n.default.__esModule>"u"&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),e.exports=n.default)})(Ue,Ue.exports);var ma=Ue.exports,pa=ma;const fa=x.getDefaultExportFromCjs(pa),ha=({children:e,ONE_TRUST:n})=>t.jsxs(t.Fragment,{children:[t.jsx(fa,{src:"https://cdn.cookielaw.org/scripttemplates/otSDKStub.js",defer:!0,strategy:"afterInteractive","data-domain-script":n.siteId,type:"text/javascript"}),e]}),ga=da(()=>Promise.resolve(ha),{ssr:!1}),_a={"snackbar-modifier":"_snackbar-modifier_1va2l_1"},ge=({size:e,adornment:n,title:r,subtitle:s,supportChildren:o,className:a,Z_INDEX_WAR:l,...i})=>t.jsxs(d.SnackBar.Structure,{...i,size:e,className:d.helpers.classNameConcat(_a["snackbar-modifier"],a),width:360,style:{zIndex:l.snackbar},children:[t.jsx(d.SnackBar.Content,{adornment:n,title:r,subtitle:s}),o&&t.jsx(d.SnackBar.Support,{children:o})]});ge.displayName="SnackBar";const jr=({children:e,contentState:n,entityKey:r})=>{const{url:s}=n.getEntity(r).getData();return s?t.jsx(x.NextLink,{href:s,children:e}):e},xa={teamComponents:{AddToCart:it,BackToTop:Hs,BuyPackage:ra,...qo,FreightCalculation:$o,Header:or,Link:ne,Media:J,ProductCard:G,UserMenu:ut},template:{pdp:Wo},utils:{EventCollector:sa,ExternalScripts:ga,LinkOrNotLink:ve,ObserverWrapper:Ae,SnackBarComponent:ge,DraftJsLinkWrapper:jr}},ya=(e,n)=>{const r=e.map(o=>`'${o.source}'`).join(`,
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),h=require("react"),y=require("./Footer-rMb9FYog.js"),Me=require("zustand"),u=require("@soma-vertical-web/core-components"),so=require("js-cookie"),ao=require("jose"),ue=require("@soma-vertical-web/foundations"),wt=require("axios"),io=require("react-dom"),J=require("draft-js"),kt=require("@date-fns/tz"),it=h.createContext({}),co=({data:e,children:t})=>n.jsx(it.Provider,{value:{tags:e==null?void 0:e.config},children:t}),ct=()=>{const{tags:e}=h.useContext(it),t=h.useCallback(r=>{var i,c,l,d;const o=(c=(i=e==null?void 0:e.commercial)==null?void 0:i.items)==null?void 0:c.find(m=>{var p;return(p=r??[])==null?void 0:p.find(f=>f.id===m.key)}),s=(d=(l=e==null?void 0:e.institucional)==null?void 0:l.items)==null?void 0:d.find(m=>{var p;return(p=r??[])==null?void 0:p.find(f=>f.id===m.key)}),a=e==null?void 0:e.flagPdp;return{commercial:o,institucional:s,flagPdp:a}},[e]);return{tags:e,getAvailableProductTag:t}},Jt=({gridScrollBack:e})=>{h.useEffect(()=>{typeof window<"u"&&(e!=null&&e.refer)&&sessionStorage.setItem(e==null?void 0:e.refer,"true")},[])},Qt=h.createContext({}),lo=({children:e,gridScrollBack:t})=>{const r=h.useRef(null);return Jt({gridScrollBack:t}),n.jsx(Qt.Provider,{value:{sizesContainerRef:r},children:e})},uo=()=>{const e=h.useContext(Qt);if(e===void 0)throw new Error("useContext(PDPContext) must be used within a PDPProvider");return e},K=(e,t=!0)=>Intl.NumberFormat("pt-BR",{style:"currency",currency:"BRL",minimumFractionDigits:t?2:0}).format(e),lt=({valueInCents:e,hasFree:t,freeTaxMessage:r})=>e===0?t?r:K(0):K(e/100),Zt=({items:e,NAME_SPLIT_SYMBOL:t})=>{const r={price:0,listPrice:0,installments:{count:0,value:0}},o=(i,c)=>{var f;c&&(c.sellerId=i.sellerId,c.sellerName=i.sellerName,c.available=!0,c.isSellerDefault=i.sellerDefault);const{Price:l,ListPrice:d,PaymentOptions:{installmentOptions:m}}=i.commertialOffer;r.price=l,r.listPrice=d;const p=(f=m==null?void 0:m[0])==null?void 0:f.installments;if(p){const{count:_,value:g}=p[p.length-1];r.installments={count:_,value:g/100}}};let s=!0;const a=e.reduce((i,c)=>{var m;const l={name:c.name,sku:c.itemId,value:((m=c.Tamanho)==null?void 0:m[0])??y.splitNameAndSizeFromFullName(c.nameComplete??c.name,t).size,available:!1,sellerId:"",sellerName:"",isSellerDefault:!1},d=c.sellers.filter(p=>(p.sellerDefault&&p.commertialOffer.IsAvailable&&(l.available=!0,o(p,l)),p.commertialOffer.IsAvailable));return!l.isSellerDefault&&d.length>0&&(l.available=!0,o(d[0],{...l,sellerId:d[0].sellerId,sellerName:d[0].sellerName})),l.available===!1&&(s=!1),i.push(l),i},[]);return{...r,sizes:a,allSizesAvailable:s}},ut=e=>e?!e.offers.offers.find(({quantity:t=0})=>t>0):!1,dt=(e,t)=>{const r=e.find(o=>o.availability.includes("InStock")&&o.quantity&&o.listPrice>0&&o.seller.identifier===t);return r||e.find(o=>o.availability.includes("InStock")&&o.quantity&&o.listPrice>0)},en=e=>e.find(t=>t.imageLabel==="10"),tn=(e,t)=>{const r=/\/ids\/(\d+)\//,o=e.match(r);return o?e.replace(`/${o[1]}/`,`/${o[1]}-${t.width}-${t.height}/`):e},nn=(e,t)=>{const r=/\/ids\/(\d+)-(\d+)-(\d+)\//,o=e.match(r);return o?e.replace(`/${o[1]}-${o[2]}-${o[3]}/`,`/${o[1]}-${t.width}-${t.height}/`):e},rn=({images:e,label:t})=>{const r=e.filter(o=>o.keywords===t.first||o.keywords===t.second||o.alternateName===t.first||o.alternateName===t.second);return r.length===0?[e[0]]:r},fo=e=>{const[t,r]=e.split("/").map(Number);if(Number.isNaN(t)||Number.isNaN(r))throw new Error("[ERROR ASPECT RATIO IMAGE]: Invalid aspect ratio format");return r/t},on=(e,t,r)=>{t&&(e?(t.getAttribute("src")||(t.src=r??""),t.play()):t.pause())},mo=Object.freeze(Object.defineProperty({__proto__:null,disableSKU:ut,formatPriceToCurrency:K,freightParsePrice:lt,getAspectRatio:fo,getColorAndSizeFromSkuName:y.getColorAndSizeFromSkuName,getFirstImages:rn,getProductNameWithoutSku:y.getProductNameWithoutSku,getSKUName:y.getSKUName,getSkuInfos:Zt,getThumbImage:en,getValidOffer:dt,removeSlashes:y.removeSlashes,resizingImg:tn,setVideoPlay:on,splitNameAndSizeFromFullName:y.splitNameAndSizeFromFullName,updatedResizedImg:nn},Symbol.toStringTag,{value:"Module"})),sn=h.createContext({}),po=({children:e,productData:t,isKit:r,PDP_INFO:o,NAME_SPLIT_SYMBOL:s})=>{var T,N;const{sendDataLayerEvent:a,triggerSelectItemEventRef:i}=y.useEventContext(),{productId:c,productName:l,items:d,items:[{images:m,Videos:p}],description:f,["Composição"]:_="",productReference:g,categories:[x]}=t,{getAvailableProductTag:v}=ct(),C=v(Object.entries(t.clusterHighlights).map(P=>({id:P[0],name:P[1]}))),E=x.slice(1,-1).split("/"),{installments:S,price:A,listPrice:I,sizes:j,allSizesAvailable:b}=Zt({items:d,NAME_SPLIT_SYMBOL:s}),R=en(m),D=[{label:`${o.product.description}`,value:"description",content:f},{label:`${o.product.materiais}`,value:"composition",content:_}],k=((N=y.getColorAndSizeFromSkuName((T=t.items)==null?void 0:T[0].name,s))==null?void 0:N.color)??t["Cores Filtráveis"][0]??"",z=()=>({commonData:{...t,sizes:j,price:A,listPrice:I,installments:S},customData:{installments:S==null?void 0:S.count,installment_value:Number(S==null?void 0:S.value).toFixed(2)}}),M=({sku:P,size:O})=>{const{commonData:w,customData:q}=z();a({functionKey:"productEvents",data:{event:"view_item",commonData:w,customData:{...q,...P&&{item_sku:P},...O&&{item_variant2:O}}}})};return h.useEffect(()=>{if(i.current.trigger){const{commonData:P,customData:O}=z();a({functionKey:"productEvents",data:{event:"select_item",commonData:P,customData:{...O,index:i.current.index}}}),i.current.trigger=!1}M({})},[]),n.jsx(sn.Provider,{value:{productData:t,productId:c,productName:l,productReference:g,tag:C,items:d,sizes:j,allSizesAvailable:b,installments:S,price:A,listPrice:I,thumbImage:R,images:m,video:p[0],descriptionContent:D,breadcrumbList:E,isKit:r,colorName:k,handleViewItemEvent:M},children:e})},ft=()=>{const e=h.useContext(sn);if(e===void 0)throw new Error("useContext(PDPDataContext) must be used within a PDPDataProvider");return e},ae=(e,t)=>Me.create(r=>{const o=()=>r({value:e});return t&&t instanceof Set&&t.add(o),{value:e,actions:{setValue:s=>r({value:s}),reset:o}}}),_e={category:null,menuMobileIsOpen:!1,searchModalIsOpen:!1,userMenuIsOpen:!1},xe=new Set,ho=()=>{xe.forEach(e=>{e()})},an=Me.create((e,t)=>{const r=()=>e({value:_e.category});return xe.add(r),{value:_e.category,actions:{reset:r,setValue:o=>e(()=>({value:o})),updateValue:o=>{t().value!==o&&e({value:o})}}}}),Re=()=>an(e=>e.value),re=()=>an(e=>e.actions),cn=ae(_e.menuMobileIsOpen,xe),mt=()=>cn(e=>e.value),ie=()=>cn(e=>e.actions),ln=ae(_e.searchModalIsOpen,xe),go=()=>ln(e=>e.value),pt=()=>ln(e=>e.actions),un=ae(_e.userMenuIsOpen,xe),dn=()=>un(e=>e.value),ye=()=>un(e=>e.actions),_o=Object.freeze(Object.defineProperty({__proto__:null,resetAllHeaderStores:ho,useActionsHeaderCategory:re,useActionsMenuMobileIsOpen:ie,useActionsSearchModalIsOpen:pt,useActionsUserMenuIsOpen:ye,useGetHeaderCategoryStore:Re,useGetMenuMobileIsOpen:mt,useGetSearchModalIsOpen:go,useGetUserMenuIsOpen:dn},Symbol.toStringTag,{value:"Module"})),de={selectedSkuInfo:{productId:"",name:"",size:"",sku:"",sellerId:"",sellerName:"",available:!1,quantity:1},openLetMeKnow:!1,openMeasurements:!1,showBottomNavigation:!1,showNotify:!1},fe=new Set,xo=()=>{fe.forEach(e=>{e()})},fn=Me.create(e=>{const t=()=>e({value:de.selectedSkuInfo});return fe.add(t),{value:de.selectedSkuInfo,actions:{setValue:r=>e(o=>({value:{...o,...r}})),reset:t}}}),yo=()=>fn(e=>e.value),vo=()=>fn(e=>e.actions),mn=ae(de.openLetMeKnow,fe),Co=()=>mn(e=>e.value),bo=()=>mn(e=>e.actions),pn=ae(de.showNotify,fe),jo=()=>pn(e=>e.value),So=()=>pn(e=>e.actions),hn=ae(de.showBottomNavigation,fe),No=()=>hn(e=>e.value),Io=()=>hn(e=>e.actions),gn=ae(de.openMeasurements,fe),Eo=()=>gn(e=>e.value),Po=()=>gn(e=>e.actions),wo=Object.freeze(Object.defineProperty({__proto__:null,resetAllPDPStores:xo,useActionsPDPOpenLetMeKnow:bo,useActionsPDPOpenMeasurements:Po,useActionsPDPSelectedSkuInfo:vo,useActionsPDPShowBottomNavigation:Io,useActionsPDPShowNotify:So,useGetPDPOpenLetMeKnow:Co,useGetPDPOpenMeasurements:Eo,useGetPDPSelectedSkuInfo:yo,useGetPDPShowBottomNavigation:No,useGetPDPShowNotify:jo},Symbol.toStringTag,{value:"Module"})),_n=h.createContext({}),ko=({children:e,headerData:t,...r})=>{var m,p;const o=h.useRef(null),s=h.useRef(null),a=h.useRef(null),i=h.useRef(null),c=h.useRef(null),{mediatorRef:l,currentHeaderConfigsRef:d}=y.useGlobalContext();return(m=l.current)==null||m.subscribe("header:change_variant",f=>{var C,E,S;if(f&&d.current&&(d.current.bannerVariant=f),!o.current)return;const g=document.body.scrollTop>0,x=o.current.getAttribute("data-interactiveVariant"),v=g?x:f??((C=d.current)==null?void 0:C.bannerVariant)??"default";v!==((E=d.current)==null?void 0:E.headerVariant)&&(o.current.setAttribute("data-bottomdivider",String(g)),o.current.setAttribute("data-variant",String(v)),(S=l.current)==null||S.publish("herobanner:change_controllers_variant",v),d.current&&(d.current.headerVariant=v))}),(p=l.current)==null||p.subscribe("header:change_position",f=>{o.current&&(o.current.style.position=f)}),h.useEffect(()=>{const f=new AbortController,_=u.helpers.throttle(()=>{var x;return(x=l.current)==null?void 0:x.publish("header:change_variant",null)},200);document.body.addEventListener("scroll",_,{passive:!0,signal:f.signal});const g=x=>{var C;(C=x.target.closest("a"))==null||C.blur()};return o.current&&(o.current.addEventListener("click",g,{signal:f.signal}),o.current.addEventListener("touchend",g,{signal:f.signal})),()=>{f.abort()}},[]),n.jsx(_n.Provider,{value:{headerData:t,structureRef:s,rootRef:o,tipbarRef:a,userMenuMobileRef:i,userMenuDesktopRef:c,...r},children:e})},F=()=>h.useContext(_n),xn=h.createContext({}),yn=({children:e})=>{const t=h.useRef(null),r=h.useRef(null),o=mt(),s=h.useCallback(()=>{var a;{const i=(a=t.current)==null?void 0:a.querySelector("dialog");if(i){i.dataset.animation="out";const c=i.children[0];c.dataset.animation="out"}}},[]);return h.useEffect(()=>{var a;if(o)document.body.dataset.modalopen="true";else{document.body.dataset.modalopen="false";const i=(a=r.current)==null?void 0:a.querySelector("dialog");if(i){i.dataset.animation="out";const c=i.children[0];c.dataset.animation="out"}}},[o]),h.useEffect(()=>{r.current=document.body},[]),n.jsx(xn.Provider,{value:{bodyRef:t,handleCloseSubMenu:s,documentBodyRef:r},children:e})},ve=()=>h.useContext(xn),Ao=e=>{if(!e||typeof window>"u")return 0;const t=window.getComputedStyle(e);return parseInt(t.padding,10)},To=(e,t,r)=>{if(!(e instanceof HTMLElement)||!(t instanceof HTMLElement))return{left:0,top:0};const o=t.getBoundingClientRect(),s=e.getBoundingClientRect(),a=e!=null&&e.parentElement?Ao(e==null?void 0:e.parentElement):0;return{left:o.left+o.width/2-(s.width+a),top:o.top+o.height+r}},vn=h.createContext({}),Cn=({children:e,delay:t=600,gap:r=20,...o})=>{const[s,a]=h.useState(!1),i=h.useRef(null),[c,l]=h.useState(!1),[d,m]=h.useState({left:0,top:0}),p=h.useCallback(()=>{l(!0),typeof window<"u"&&(i.current=window.setTimeout(()=>{a(!1),l(!1)},t))},[l,a,t]);return h.useEffect(()=>{if(typeof window>"u")return;const f=window.document.querySelector("#cart-button"),_=window.document.querySelector("#add-to-cart--tooltip");if(f&&_){const{left:g,top:x}=To(_,f,r??0);m({left:g,top:x}),l(!1)}},[r,s]),n.jsx(vn.Provider,{value:h.useMemo(()=>({...o,...d,handleClose:p,isLeaving:c,isOpen:s,setIsOpen:a,setIsLeaving:l}),[o,d,p,c,s,a,l]),children:e})},ce=()=>{const e=h.useContext(vn);if(e===void 0)throw new Error("useAddToCartContext must be used within a AddToCartProvider");return e},bn=h.createContext({}),Mo=({children:e,CARTPROVIDER_MESSAGE_PRODUCT_REMOVE:t,...r})=>{const o=y.useCartStore(),{setRecentlyAdded:s}=y.useUIContext(),a=h.useRef(""),i=y.useGetNotificationsStore(),{addNotification:c,removeNotification:l}=y.useGetNotificationActions(),{addCoupon:d,addItem:m,addSellerCode:p,addMarketingData:f,emptyCart:_,isOpen:g,removeItem:x,shipping:v,shippingUpdate:C,toggleServiceToProduct:E,updateItemQuantity:S}=o;h.useEffect(()=>{const N=so.get("lastMedias");if(o.id&&N&&a.current!==N){a.current=N;const P=new URLSearchParams(N),O=y.mountMarketingData(P);f(O)}},[o,f]);const A=h.useCallback(async(N,P)=>(P==="coupon"?d(N):p(N)).then(w=>{if(typeof w!="boolean"&&w instanceof Object){if(P==="seller"&&"value"in w){const{statusOk:q,value:U}=w,H=String(U??"").split(" - ");return y.getCode((H==null?void 0:H[0])??"",N,!!q)}return y.getCode(String(w.coupon),N,!0)}return y.getCode("","")}).catch(()=>Promise.resolve({code:400})),[d,p]),I=h.useCallback((N,P,O)=>{const{id:w}=N;S(w,P,O)},[S]),j=h.useCallback((N,P,O=!1)=>{if(!N)return;const{id:w}=N,q=y.findItemIndex(o.items,w);if(q!==-1&&!O){const U=Number(o.items[q].quantity),H=o.items[q]?U+1:1;I(N,H,P)}else m({id:w,quantity:(N==null?void 0:N.quantity)??1,seller:N.seller});g||s(U=>[...U,N])},[m,I,o.items,g,s]),b=h.useCallback((N,P)=>{if(!N||!Array.isArray(N))return;s(w=>[...w,...N]);const O=N.map(w=>{const{id:q,quantity:U,seller:H}=w,W=y.findItemIndex(o.items,q),oo=y.getQuantity(U??1,W);return{id:q,quantity:oo,seller:H}});m(O,P)},[m,o.items,s]),R=h.useCallback(async(N,P,O)=>N?x(N).then(()=>(c(P??`${t}`,O),y.getCode(N,N))):Promise.resolve(y.getCode("","Product id required")),[c,x]),D=h.useCallback(()=>{o.items.length>0&&_()},[_,o.items]),k=h.useCallback((N,P="BRA")=>v(N,P),[v]),z=h.useCallback(N=>{N&&C(N)},[C]),M=h.useCallback(async(N,P,O)=>{const w=o.items.findIndex(U=>U.id===N);return o.items[w]&&w>=0?E(P,w,O??!1):!1},[o.items,E]),T=h.useCallback(async(N,P)=>S(N,P).then(O=>{if(Array.isArray(O)){const w=O.find(q=>q.id===N);if(w&&(w==null?void 0:w.quantity)<P)return String(w.quantity)}return!1}),[S]);return n.jsx(bn.Provider,{value:h.useMemo(()=>({...r,addCouponSeller:A,addToCart:j,addItemsToCart:b,cartStore:o,notifications:i,clearCart:D,addNotification:c,isOpen:o.isOpen,removeNotification:l,removeToCart:R,setIsOpen:o.setIsOpen,shipping:k,shippingUpdateOption:z,toggleGiftItemCart:M,updateItemQuantity:T}),[r,A,j,b,i,D,c,o,l,R,k,z,M,T]),children:e})},Z=()=>{const e=h.useContext(bn);if(e===void 0)throw new Error("useCartContext must be used within a CartProvider");return e},jn=h.createContext({}),ht=({children:e,fetch:t})=>{const r=h.useRef(!0),[o,s]=h.useState(null),[a,i]=h.useState(!1);return h.useEffect(()=>{(async()=>{r.current=!0;try{const l=await t();if(!l.ok)throw new Error("Failed to fetch data");const d=await l.json();s(d.data),r.current=!1}catch{r.current=!0,i(!0)}})()},[t]),n.jsx(jn.Provider,{value:h.useMemo(()=>({data:o,isLoading:r.current??!1,isError:a}),[o,a,r]),children:e})},gt=()=>{const e=h.useContext(jn);if(e===void 0)throw new Error("useProductsContext must be used within a useRootContext");return e},Sn=h.createContext({}),Nn=({children:e,sort:t,state:r,count:o,collectionId:s,CONSTANTS:a})=>{const i=h.useMemo(()=>{var c;return s?[{key:"productclusterids",value:s.toString()}]:(c=r.base)!=null&&c.length?r.base.slice(1).split("/").map((l,d)=>({key:`category-${d+1}`,value:l})):[]},[r.base,s]);return n.jsx(Sn.Provider,{value:h.useMemo(()=>({state:{...r,facets:[...i,...r.facets??[]]},sort:t,count:o??a.ITEMS_PER_PAGE}),[i,o,t,r]),children:e})},_t=()=>{const e=h.useContext(Sn);if(e===void 0)throw new Error("useSearchContext must be used within a SearchProvider");return e},In=h.createContext({}),Ro=({children:e,searchParams:t,selectedFacets:r})=>{const{data:o,...s}=gt(),{router:a}=y.useNextContext(),i=h.useCallback((p,f)=>{if(f){if(p.key.toLocaleLowerCase()==="price"){const _=f.getAll("facets");f.delete("facets"),_.forEach(g=>{const[x]=g.split("/");x!==p.key&&f.append("facets",g)})}f.set("page","1"),f.append("facets",`${p.key}/${p.value}`),a.push(`?${f.toString()}`)}},[a]),c=h.useCallback(()=>{const p=new URLSearchParams;p.set("sort",y.PLP_FILTERS_SORT.default_option),p.set("page","1"),a.push(`?${p.toString()}`)},[a]),l=h.useCallback((p,f)=>{if(!f||!f.has&&!f.has("facets"))return;const _=f.getAll("facets");f.delete("facets"),f.set("page","1"),_.forEach(g=>{const[x,v]=g.split("/");(x!==p.key||v!==p.value)&&f.append("facets",g)}),a.push(`?${f.toString()}`)},[a]),d=h.useCallback(p=>{const f=new URLSearchParams(y.convertSearchParams(t));for(const[,_]of f.entries()){const[g,x]=_.split("/");if(g===p.key&&x===p.value)return l(p,f)}return i(p,f)},[i,l,t]),m=h.useCallback(p=>{const f=new URLSearchParams(y.convertSearchParams(t));f.set("sort",p.replace("_",":")),a.push(`?${f.toString()}`)},[a,t]);return n.jsx(In.Provider,{value:h.useMemo(()=>({...s,breadcrumb:o&&"breadcrumb"in o?o==null?void 0:o.breadcrumb:[],deleteAllFacets:c,facets:o&&"facets"in o?o==null?void 0:o.facets:[],selectedFacets:r,onToggleFacet:d,onSort:m,searchParams:t}),[o,c,m,d,s,r,t]),children:e})},Oo=({children:e,searchParams:t,forceUpdate:r})=>{const{state:o}=_t();return n.jsx(ht,{fetch:()=>fetch("/api/search/facets",{method:"POST",body:JSON.stringify({...o,forceUpdate:r}),priority:"low"}),children:n.jsx(Ro,{selectedFacets:(o==null?void 0:o.facets)??[],searchParams:t,children:e})})},Lo=()=>{const e=h.useContext(In);if(e===void 0)throw new Error("useFacetsContext must be used within a FacetsProvider");return e},En=h.createContext({}),Do=({children:e})=>{const{data:t,...r}=gt(),[o,s]=h.useState(0),{sendDataLayerEvent:a}=y.useEventContext();return h.useEffect(()=>{if(t&&"pagination"in t&&t.products.length>0){a({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:t.products}}});const i=t.pagination.count;i&&Number.isInteger(i)&&s(i)}},[t,a,s]),n.jsx(En.Provider,{value:h.useMemo(()=>({...r,products:t&&"products"in t?t==null?void 0:t.products:[],pagination:t&&"pagination"in t?t==null?void 0:t.pagination:y.SEARCH_PAGE_DEFAULT_PAGINATION,total:o}),[t,r,o]),children:e})},zo=({children:e,query:t,state:r,selectedFacets:o,forceUpdate:s})=>n.jsx(ht,{fetch:()=>fetch("/api/search/product",{method:"POST",body:JSON.stringify({...r,query:t,forceUpdate:s,facets:o??[]})}),children:n.jsx(Do,{state:r,children:e})}),Bo=()=>{const e=h.useContext(En);if(e===void 0)throw new Error("useProductsContext must be used within a ProductsProvider");return e},Pn=h.createContext({}),$o=({children:e,term:t})=>{const[r,o]=h.useState([]),[s,a]=h.useState(!1);return h.useEffect(()=>{if(!t){o([]);return}(async()=>{a(!0);try{const c=await fetch("/api/search/suggestedTerms",{method:"POST",body:JSON.stringify({query:t,locale:"pt-BR"})}),{data:l}=await c.json();o((l==null?void 0:l.searches)||[])}catch(c){console.error("Erro ao buscar sugestões:",c)}})()},[t]),n.jsx(Pn.Provider,{value:h.useMemo(()=>({suggestedTerms:r,loading:s,setLoading:a}),[r,s]),children:e})},Fo=({children:e,...t})=>n.jsx($o,{...t,children:e}),Uo=()=>{const e=h.useContext(Pn);if(!e)throw new Error("useSuggestedTermsContext must be used within a SuggestedTermsProvider");return e},wn=h.createContext({searches:[],isLoading:!1,error:null}),qo=({children:e})=>{const[t,r]=h.useState([]),[o,s]=h.useState(!0),[a,i]=h.useState(null);return h.useEffect(()=>{(async()=>{try{s(!0);const l=await fetch("/api/search/topSearch");if(!l.ok)throw new Error(`Erro ao buscar os dados: ${l.status}`);const d=await l.json();r(d.data.searches||[])}catch(l){i(l instanceof Error?l.message:"Erro desconhecido")}finally{s(!1)}})()},[]),n.jsx(wn.Provider,{value:h.useMemo(()=>({searches:t,isLoading:o,error:a}),[t,o,a]),children:e})},Vo=()=>{const e=h.useContext(wn);if(!e)throw new Error("useTopSearches must be used within a TopSearchesProvider");return e},kn=h.createContext({}),Ho=({children:e,slug:t,searchParams:r,collectionId:o,itemsPerPage:s=24})=>{const{pathname:a}=y.useNextContext(),[i,c]=h.useState(!1),l=h.useMemo(()=>{const m=new URL(a,"http://localhost"),p=Array.isArray(r==null?void 0:r.facets)?r.facets:[(r==null?void 0:r.facets)??""],f=(r==null?void 0:r.page)??"1",_=(r==null?void 0:r.sort)??(o?"":y.PLP_FILTERS_SORT.default_option);return m.searchParams.set("page",String(f)),m.searchParams.set("sort",String(_)),r!=null&&r.query?(m.searchParams.set("query",r.query),m):(m.searchParams.set("base",Array.isArray(t)?t.join("/"):t),m.searchParams.set("facets",p.join(",")),m)},[o,a,r,t]),d=h.useMemo(()=>{if(Array.isArray(r==null?void 0:r.facets))return y.parseSearchState(l,r.facets);const m=r!=null&&r.facets?[r==null?void 0:r.facets]:[];return y.parseSearchState(l,m)},[l,r]);return n.jsx(kn.Provider,{value:h.useMemo(()=>({openFilters:i,setOpenFilters:c}),[i,c]),children:n.jsx(Nn,{CONSTANTS:{ITEMS_PER_PAGE:s},state:h.useMemo(()=>({...d}),[d]),collectionId:o,children:e})})},Go=()=>{const e=h.useContext(kn);if(e===void 0)throw new Error("usePLPContext must be used within a PLPProvider");return e},ke=(e,t)=>{if(e===t)return!0;if(e==null||t==null||typeof e!="object"||typeof t!="object")return!1;if(Array.isArray(e))return!Array.isArray(t)||e.length!==t.length?!1:e.every((s,a)=>ke(s,t[a]));if(Array.isArray(t))return!1;const r=Object.keys(e),o=Object.keys(t);return r.length!==o.length?!1:r.every(s=>Object.prototype.hasOwnProperty.call(t,s)&&ke(e[s],t[s]))},An=(e,t,r="page")=>Object.keys(t).some(o=>o===r?!1:!ke(t[o],e[o])),qe=async e=>{const t=await fetch("/api/search/product",{method:"POST",body:JSON.stringify(e),priority:"high"});if(!t.ok)throw new Error("[FAILED TO FETCH DATA]");const r=await t.json();return r==null?void 0:r.data},Tn=()=>({node:{sku:"",gtin:"",name:"...",description:"",releaseDate:"",slug:"",video:null,categories:[],categoryId:"",categoriesIds:[],id:"skeleton",brand:{name:""},seo:{title:"",description:"",canonical:""},cluster:{generals:[],highlights:[]},availability:{status:!0},breadcrumbList:{itemListElement:[]},image:[{alternateName:"1",url:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR4nGNgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII=",keywords:"1"},{alternateName:"10",url:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR4nGMAAQAABQABDQottgAAAABJRU5ErkJggg==",keywords:"10"}],offers:{lowPrice:1,highPrice:0,offers:[{availability:"true",listPrice:0,price:0,priceValidUntil:"",priceCurrency:"BRL",itemCondition:"",quantity:1,seller:{identifier:"1"}}],priceCurrency:"BRL"},isVariantOf:{productGroupID:"",hasVariant:[{additionalProperty:[{name:"Tamanho",value:"...",valueReference:"SPECIFICATION",propertyID:""}],name:"...",offers:{offers:[{availability:"https://schema.org/InStock",listPrice:0,price:0,quantity:1,seller:{identifier:"1"}}]},sku:"1",slug:"1",productId:"1"}],name:"",additionalProperty:[],skuVariants:null},installments:{count:2,value:1}}}),Mn=(e,t,r,o=24)=>{const s=new Set,a=[];if(!Array.isArray(e)||e.length===0)return{taken:s,placedBanners:a};const i=t*o*r;for(const c of e){let l=Number(c.position_grid),d=!1;for(;l<i;){const m=l%r;if(m+c.columns>r){l+=r-m;continue}if(!Array.from({length:c.columns}).some((_,g)=>s.has(l+g))){for(let _=0;_<c.columns;_++)s.add(l+_);a.push(l),d=!0;break}l++}d||console.info(`[PLP INFINITE FAILED BANNER POSITION]: pos=${c.position_grid}, cols=${c.columns}`)}return{taken:s,placedBanners:a}},Ve=(e,t,r,o=24)=>{const{placedBanners:s,taken:a}=Mn(e??[],t,r),i=[];let c=0;try{for(;i.length<t*o;)a.has(c)||i.push(c),c++;return{banners:s,products:i}}catch(l){console.info(`[PLP INFINITE FAILED TO GEN POSITIONS]: page=${t}`,l)}return{banners:[],products:i}},Pe=(e,t,r=24)=>Array.from({length:e},(o,s)=>{const a=s+1;return{loading:e===a,page:a,pagination:t!=null&&t.products.length&&e===a?t==null?void 0:t.pagination:xt(),products:t!=null&&t.products.length&&e===a?t==null?void 0:t.products:Array.from({length:r},()=>Tn())}}),Rn=(e,t)=>[...e,{loading:!1,page:t,pagination:xt(),products:[]}],xt=()=>({nextPage:!1,previousPage:!1,startCursor:"0",endCursor:"1",count:1,total:1}),Wo=(e,t,r,o,s)=>{const a=e[e.length-1],i=(a==null?void 0:a.products.length)??s,c=(e.length-1)*s+i-1,l=r[c];return t.filter((d,m)=>{const p=o[m];return p<=l||s>i&&p>l})},On=(e,t)=>{const r=new Map;for(const s of e){const a=Math.floor(s/t);r.has(a)||r.set(a,[]),r.get(a).push(s)}const o=[];for(const[,s]of r){const a=s[Math.floor(Math.random()*s.length)];o.push(a)}return o},Ko=(e,t)=>{if(!e)return[];const r=e.map((o,s)=>o.video&&o.video!==""?s:null).filter(o=>o);return On(r,t)},Xo=Object.freeze(Object.defineProperty({__proto__:null,createPage:Rn,createPages:Pe,createPagination:xt,createProduct:Tn,deepEqual:ke,fetchPage:qe,getBanners:Mn,getPositions:Ve,getProductsWithVideo:Ko,getRandomVideoPerRow:On,getVisibleBanners:Wo,hasStateChangedExceptPage:An},Symbol.toStringTag,{value:"Module"})),Yo=50,Jo=Me.create((e,t)=>{const r=i=>Math.min(i,Yo),o=async(i,c)=>{const l=r(i.page);try{const d=await qe({...i,page:l});s(l,m=>c?c(m,d):{...m,...d})}catch(d){console.error(`[PDC - SCROLL INFINITE FAILED TO FETCH PAGE ${l}]: ${d}`),s(l,m=>({...m,loading:!1}))}},s=(i,c)=>{e({load:!0,pages:t().pages.map(l=>l.page===i?c(l):l)})},a=async(i,c)=>{await o(i,(l,d)=>(typeof c=="function"&&c(d),{...l,...d,loading:!0}))};return{banners:[],load:!1,pages:[],total:0,positions:[],products:[],createPages:async(i,c,l,d)=>{var p,f,_;const m=r(Number(i==null?void 0:i.page));e({...c,pages:Pe(m,void 0,d)});try{const g=await qe({...i,page:m});if(g){if(!g.products.length&&((p=g==null?void 0:g.pagination)==null?void 0:p.total)<m){a({...i,page:(f=g==null?void 0:g.pagination)==null?void 0:f.total},l),e({pages:Pe((_=g==null?void 0:g.pagination)==null?void 0:_.total)});return}typeof l=="function"&&l(g),e({load:!0,pages:Pe(m,g),total:Number(g.pagination.count)})}}catch(g){console.error(`[PDC - SCROLL INFINITE TO CREATE PAGES]: page ${m} ${g}`)}},addPage:(i,c,l)=>{const{pages:d}=t(),m=r(i==null?void 0:i.page);d.some(p=>p.page===m)||(e({...c,pages:Rn(d,m)}),a(i,l))},updateProducts:(i,c)=>{const l=t().pages.find(d=>d.page===r(i==null?void 0:i.page));l!=null&&l.loading||a(i,c)}}}),Qo=(e,t,r,o=0)=>{if(!e.length)return[];let s=0;const a=[];for(let i=0;i<e.length;i+=r){const c=e.slice(i,i+r),l=c.findIndex(d=>{var m;return(m=d.node)==null?void 0:m.video});for(let d=0;d<c.length;d++){const m=i+d,p=o+m,f=t.find(g=>g.position_grid===p+1),_=p+s+1;f&&(s+=f.columns),a.push({position:_,canPlayVideo:d===l})}}return a},Zo=(e,t,r)=>{const o=(t-1)*r,s=t*r;return e>=o&&e<=s},Ln=e=>{var t;return(t=e==null?void 0:e.map(r=>({disable:ut(r),size:y.getSKUName(r),skuID:"sku"in r&&r.sku})))==null?void 0:t.filter(r=>r.disable)},es=Object.freeze(Object.defineProperty({__proto__:null,createGridPosAndVideo:Qo,getSkusNotify:Ln,isPositionInCurrentPage:Zo},Symbol.toStringTag,{value:"Module"})),Dn=h.createContext({}),ts=({banners:e,children:t,itemsPerPage:r=24,searchParams:o,Notification:s})=>{const{router:a}=y.useNextContext(),{sendDataLayerEvent:i}=y.useEventContext(),{isMobile:c}=y.useGlobalContext(),{state:l}=_t(),{addPage:d,createPages:m,updateProducts:p,...f}=Jo(),_=c?8:16,g=c?2:4,x=h.useRef(!1),v=h.useRef(l),[C,E]=h.useState(!1),[S,A]=h.useState(null),[I,j]=h.useState([]),b=h.useCallback(M=>{M&&"pagination"in M&&i({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:M.products}}})},[i]),R=h.useCallback(M=>{if(M.pagination.nextPage===!0){const T=M.page+1,N=Ve(e,T,g,r);d({...l,page:T},N,b)}},[d,e,b,g,r,l]),D=h.useCallback(M=>{M.loading===!1&&p({...l,page:M.page},b)},[b,p,l]),k=h.useCallback(M=>{const T=new URLSearchParams(o);M.page!==Number(T.get("page")??1)&&(T.set("page",String(M.page)),a.replace(`?${T.toString()}`,{scroll:!1}))},[a,o]),z=h.useCallback((M,T)=>{const N=T?Ln([T]):null;j(M),A(N!=null&&N.length?N[0]:null),E(!0)},[]);return h.useEffect(()=>{const M=!x.current,T=An(v.current,l),N=Ve(e,l.page,g);M?m(l,N,b,r):T&&(m(l,N,b,r),v.current=l),x.current=!0},[e,m,b,g,r,l]),n.jsxs(Dn.Provider,{value:h.useMemo(()=>({...f,addPage:d,addNewPage:R,createPages:m,gap:_,columns:g,handleNotify:z,updatePage:D,updateProducts:p,updateParamPage:k}),[d,R,m,z,_,g,f,D,p,k]),children:[t,n.jsx(s,{notify:C,sku:S,skus:I,setSku:A,setNotify:E})]})},ns=()=>{const e=h.useContext(Dn);if(e===void 0)throw new Error("PLPInfiniteScrollContext must be used within a ScrollInfiniteProvider");return e};function zn(e){const r=decodeURIComponent(window.document.cookie).split(";");for(const o of r){const[s,a]=o.trim().split("=");if(s===e)return a}}function yt(e,t,r={}){const s={...{path:"/",expires:new Date(Date.now()+36e5)},...r};let a=`${encodeURIComponent(e)}=${encodeURIComponent(t??"")}`;for(const i in s)s[i]!==void 0&&(a+=`; ${i}`,i==="expires"?a+=`=${s[i].toUTCString()}`:typeof s[i]=="boolean"?a+=`; ${s[i]?"true":"false"}`:a+=`=${s[i]}`);window.document.cookie=a}const rs=()=>{const{sendDataLayerEvent:e}=y.useEventContext(),{user:t}=vt(),{cartStore:r}=Z();return h.useEffect(()=>{if(!t)return;(async()=>{const{userId:s,email:a,firstName:i,lastName:c,phone:l,homePhone:d,postalCode:m,street:p,number:f,city:_,gender:g}=t,x=new TextEncoder().encode(s),v=await crypto.subtle.digest("SHA-256",x),E=Array.from(new Uint8Array(v)).map(S=>S.toString(16).padStart(2,"0")).join("");e({functionKey:"readyEvents",data:{readyData:{user_id:E,email:a,first_name:i,last_name:c,phone:l||d,zip:m,street:p,street_number:f,city:_,gender:g,orderform_id:r==null?void 0:r.id}}})})()},[t,r.id]),null},Bn=h.createContext({amount:null,boxes:null,toExpire:null,loading:!0,logout:()=>null,getCurrentCredits:()=>({credits:0,cashback:0})}),os=({children:e,AUTH_TOKEN_COOKIE:t})=>{const[r,o]=h.useState({amount:null,boxes:null,toExpire:null,loading:!0}),s=h.useCallback(async()=>{try{await fetch("/api/user",{priority:"low"}).then(c=>c.json()).then(c=>{const{userCredits:l,...d}=c;o({amount:l==null?void 0:l.amount,boxes:l==null?void 0:l.boxes,toExpire:l==null?void 0:l.toExpire,user:d,loading:!1})})}catch(c){console.error("my credits request",c),o({...r,loading:!1})}},[o]),a=h.useCallback(()=>{yt(t),s()},[s]),i=h.useCallback(()=>r.boxes?r.boxes.reduce((c,l)=>l.gift_card_box.refid==="C1643"?(c.cashback+=l.amount,c):(c.credits+=l.amount,c),{cashback:0,credits:0}):{cashback:0,credits:0},[r]);return h.useEffect(()=>{s()},[s]),n.jsxs(Bn.Provider,{value:h.useMemo(()=>({...r,getCurrentCredits:i,logout:a}),[r,i,a]),children:[n.jsx(rs,{}),e]})},vt=()=>{const e=h.useContext(Bn);if(e===void 0)throw new Error("useContext(SessionContext) must be used within a SessionProvider");return e},ss={contexts:{addToCart:{hook:ce,provider:Cn},cart:{hook:Z,provider:Mo},cms:{FlagsAndTags:{context:it,hook:ct,provider:co}},events:{hook:y.useEventContext,provider:y.EventProvider},global:{hook:y.useGlobalContext,provider:y.GlobalProvider,mediator:y.Mediator},header:{hook:F,provider:ko},menuMobile:{hook:ve,provider:yn},next:{hook:y.useNextContext,provider:y.NextProvider},pdp:{provider:lo,hook:uo},plp:{provider:Ho,hook:Go},PLPContent:{provider:y.PLPContentProvider,hook:y.usePLPContent},plpInfinite:{provider:ts,hook:ns},pdpdata:{hook:ft,provider:po},searchFacets:{hook:Lo,provider:Oo},searchProducts:{hook:Bo,provider:zo},searchRoot:{hook:gt,provider:ht},searchSearch:{hook:_t,provider:Nn},searchSuggestedTerms:{hook:Uo,provider:Fo},searchTopSearchs:{hook:Vo,provider:qo},session:{hook:vt,provider:os},ui:{hook:y.useUIContext,provider:y.UIProvider}},hooks:{useBackPDC:Jt},stores:{cart:y.cart,header:_o,pdp:wo}},as=e=>e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/\s+/g,"-").toLowerCase().trim();function is(e,t=1e3){let r=!1;return(...o)=>{r||(e(...o),r=!0,setTimeout(()=>{r=!1},t))}}function cs(e,t=1e3){let r;return(...o)=>{clearTimeout(r),r=setTimeout(()=>{e(...o)},t)}}const $n=(e,t)=>t.getTime()>e.getTime()?Math.abs(t.getTime()-e.getTime()):0,pe=(e,t)=>Math.floor(t==="days"?e/(1e3*60*60*24):t==="hours"?e%(1e3*60*60*24)/(1e3*60*60):t==="minutes"?e%(1e3*60*60)/(1e3*60):e%(1e3*60)/1e3),ls=e=>{const t=ao.decodeJwt(e??"");return{email:t.sub,userId:t.userId}},us=["name","email","phone","date","cpf","cep"],At={email:/\S+@\S+\.\S+/,name:new RegExp("^\\p{L}+( \\p{L}+)*$","u"),phone:/^\d{10,11}|\(\d{2}\)\s?\d{4,5}-\d{4}$/,date:/^\d{6,8}|^\d{2}\/\d{2}\/\d{2,4}$/,cep:/^\d{5}[-]?\d{3}$/,cpf:/^\d{11}|\d{3}\.\d{3}\.?\d{3,5}\-[\d]{2}$/},ds=({type:e,input:t,required:r=!1})=>{if(typeof t!="string"||!r&&t===""||!At[e])return!0;const o=t.trim();return At[e].test(o)},fs=e=>{const t=/\/(\d+)-\d+-\d+\/(.+?)\./,r=typeof e=="string"?e.match(t):null;return r?r[2].replace(/-/g," "):y.DEFAULT_IMAGE_ALT_TEXT},ms=Object.freeze(Object.defineProperty({__proto__:null,FieldTypes:us,debounce:cs,getAltTextFromUrl:fs,getAuthenticatedUser:ls,getCookie:zn,getDaysHoursMinutesSeconds:pe,getMilliSeconds:$n,removeAccentsAndReplaceSpaces:as,setCookie:yt,throttle:is,validateInput:ds},Symbol.toStringTag,{value:"Module"})),ps={cart:y.cart$1,events:y.events,plp:Xo,product:mo,utils:ms},Ct={helpers:ps},G={"add-to-cart--card":"_add-to-cart--card_4v41y_1","add-to-cart--card--content":"_add-to-cart--card--content_4v41y_7","add-to-cart--card--name":"_add-to-cart--card--name_4v41y_16","add-to-cart--card--price-quantity":"_add-to-cart--card--price-quantity_4v41y_46","add-to-cart--card--style-size":"_add-to-cart--card--style-size_4v41y_53","add-to-cart--content":"_add-to-cart--content_4v41y_71","add-to-cart--content--title":"_add-to-cart--content--title_4v41y_78","add-to-cart--footer":"_add-to-cart--footer_4v41y_102","add-to-cart--footer--total":"_add-to-cart--footer--total_4v41y_108","add-to-cart--items":"_add-to-cart--items_4v41y_148","add-to-cart--tooltip":"_add-to-cart--tooltip_4v41y_198","add-to-cart__modal":"_add-to-cart__modal_4v41y_211"},Fn=({brand:e,className:t,name:r,...o})=>n.jsxs("div",{...o,className:u.helpers.classNameConcat(G["add-to-cart--card--name"],t),children:[n.jsx(u.Tag,{style:{textTransform:"uppercase"},size:"small",variant:"quaternary",title:e,children:e}),n.jsx(u.TextStructure.Root,{children:n.jsx(u.TextStructure.DivWrapper,{alignContent:"flex-start",alignItems:"flex-start",children:n.jsx("p",{className:"typography-style-body-md",children:r})})})]});Fn.displayName="AddToCart.Card.Name";const Un=({className:e,listPrice:t,price:r,quantity:o,productId:s,...a})=>{const i=K(r/100),c=K(t/100);return n.jsx("div",{...a,className:u.helpers.classNameConcat(G["add-to-cart--card--price-quantity"],e),children:n.jsx(u.ProductInfo.Root,{size:"small",layout:"vertical",children:n.jsx(u.ProductInfo.Wrapper,{size:"small",layout:"vertical",children:n.jsx(u.ProductInfo.ValuesWrapper,{children:r!==t?n.jsxs(n.Fragment,{children:[n.jsx(u.ProductInfo.Price,{label:"originalPrice",value:i,size:"small"},"price-list"),n.jsx(u.ProductInfo.Price,{label:"discountPrice",value:c,size:"small"},"price-low")]}):n.jsx(u.ProductInfo.Price,{label:"defaultPrice",value:c,size:"small"},"price-low")})})})})};Un.displayName="AddToCart.Card.PriceQuantity";const hs="_skeleton_12b79_1",gs={skeleton:hs},_s=({style:e})=>n.jsx("div",{style:e,className:gs.skeleton}),xs="_image_lypfr_1",ys={image:xs},vs=({alt:e,className:t,objectFit:r,...o})=>{const{nextimage:s}=y.useNextContext();return n.jsx(s,{quality:90,...o,alt:e??"",className:u.helpers.classNameConcat(ys.image,t),"data-object-fit":r??"cover"})},Cs=({videoRef:e,...t})=>n.jsx("video",{...t,ref:e,children:n.jsx("track",{kind:"captions"})}),Q={Image:vs,Video:Cs},qn=({className:e,productGroupID:t,size:r,texture:o,...s})=>{const{CONSTANTS:{TEXTURE_IMAGE:a,TOGGLE_STYLE_MODIFIER:i}}=ce(),[c,l]=h.useState(o??"");return h.useEffect(()=>{c||fetch("/api/catalog/product/info",{method:"POST",priority:"low",body:JSON.stringify({ids:[t]})}).then(d=>d.json()).then(d=>{const m=d.data[0].items[0];if(m){const p=m.images.find(f=>a.includes(f.imageLabel));p!=null&&p.imageUrl?l(p.imageUrl):l(m.images[0].imageUrl)}}).catch(d=>{console.error(d)})},[c,t]),n.jsxs("div",{...s,className:u.helpers.classNameConcat(G["add-to-cart--card--style-size"],e),children:[n.jsx(u.ToggleStyle.Wrapper,{size:"x-small",style:i,children:n.jsx(u.ToggleStyle.Texture,{children:c?n.jsx(Q.Image,{alt:"",src:c??"",width:164,height:164,style:i}):n.jsx(_s,{})})}),n.jsx(u.Utils.Divider,{direction:"vertical",size:"medium",style:{height:24}}),r&&n.jsxs(u.ToggleSize.Wrapper,{size:"small",title:"wrapper-texture",children:[n.jsx(u.ToggleSize.DisabledAdornment,{title:"disabled-adornment-texture"}),n.jsx(u.ToggleSize.Text,{children:r})]})]})};qn.displayName="AddToCart.Card.StyleSize";const{helpers:bs}=Ct,Vn=({className:e,item:t,texture:r,...o})=>{const{itemOffered:{name:s,brand:a,skuName:i,isVariationOf:{productGroupID:c}},quantity:l,price:d,sellingPrice:m}=t,{CONSTANTS:{NAME_SPLIT_SYMBOL:p}}=ce(),{size:f}=bs.product.getColorAndSizeFromSkuName(i??s,p);return n.jsxs("div",{...o,className:u.helpers.classNameConcat(G["add-to-cart--card--content"],e),children:[n.jsx(Fn,{brand:a.name,name:s}),n.jsx(Un,{price:d,listPrice:m,quantity:l,productId:t.id}),n.jsx(qn,{size:f,texture:r,productGroupID:c})]})};Vn.displayName="AddToCart.Card.Content";const Hn=({image:e,thumbnail:t=!1})=>n.jsx(Q.Image,{alt:e.alternateName??"image","data-thumbnail":t,height:t?152:120,src:e.url,width:t?152:94});Hn.displayName="AddToCart.Card";const Gn=({className:e,item:t,texture:r,thumbnail:o,...s})=>{const{itemOffered:{image:[a]}}=t,i=nn(a.url,{width:200,height:300});return n.jsxs("div",{...s,className:u.helpers.classNameConcat(G["add-to-cart--card"],e),children:[n.jsx(Hn,{image:{alternateName:a.alternateName||"Produto",url:i||""},thumbnail:o}),!o&&n.jsx(Vn,{item:t,texture:r})]})};Gn.displayName="AddToCart.Card";const Wn=({className:e,children:t,title:r,...o})=>n.jsxs("div",{...o,className:u.helpers.classNameConcat(G["add-to-cart--content"],e),children:[n.jsx("div",{className:G["add-to-cart--content--title"],children:r&&n.jsx("h2",{children:r})}),t,n.jsx(se.Footer,{})]});Wn.displayName="AddToCart.Layout.Content";const Kn=({className:e,...t})=>{var _,g;const{isMobile:r,handleClose:o,CONSTANTS:{ADD_TO_CART:s}}=ce(),{cartStore:{totalizers:a},setIsOpen:i}=Z(),c=(_=a.find(x=>x.id==="Discounts"))==null?void 0:_.value,l=((g=a.find(x=>x.id==="Items"))==null?void 0:g.value)??0,d=a.find(x=>x.id==="Shipping"),p=(l-Math.abs(c??0)+((d==null?void 0:d.value)??0))/100,f=K(p??0);return n.jsxs("div",{...t,className:u.helpers.classNameConcat(G["add-to-cart--footer"],e),children:[n.jsxs("div",{className:G["add-to-cart--footer--total"],children:[n.jsx("span",{children:"Subtotal:"}),n.jsx("span",{children:f})]}),n.jsx(u.Button,{size:"medium",variant:"primary","data-close":!0,onClick:()=>i(!0),children:s.footer.bag}),r?n.jsx(u.Button,{"data-close":!0,size:"medium",variant:"tertiary",children:s.footer.keep_buying}):n.jsx(u.Button,{onClick:()=>o(),size:"medium",variant:"tertiary",children:s.footer.keep_buying})]})};Kn.displayName="AddToCart.Layout.Footer";const Xn=({children:e,className:t,thumbnail:r=!1,...o})=>{const{cartStore:{options:s}}=Z(),{recentlyAddedProducts:a}=y.useUIContext(),i=a.length>3?4:a.length;return n.jsxs("div",{...o,className:G["add-to-cart--items"],"data-thumbnail":r,children:[Array.isArray(a)&&a.filter((c,l)=>l<i).map(c=>{var d;const l=(d=s==null?void 0:s.find(m=>m.id===c.itemOffered.isVariationOf.productGroupID))==null?void 0:d.texture;return n.jsx(se.Card,{item:c,thumbnail:r,texture:l},c.itemOffered.sku)}),e]})};Xn.displayName="AddToCart.Layout.Items";const Yn=({children:e,Z_INDEX_WAR:t})=>{const{isOpen:r,setIsOpen:o}=ce(),{isMobile:s}=y.useGlobalContext();return n.jsxs(u.Modal.Root,{"data-modal":"add-to-cart--modal",className:G["add-to-cart__modal"],isMobile:s??!1,isOpen:r,setIsOpen:o,variant:"sideBottom",style:{zIndex:t.modal},children:[n.jsx(u.Modal.Header,{navigation:"top",children:n.jsx(u.Modal.Controls,{navigation:"top",isMobile:!0})}),n.jsx(u.Modal.Body,{children:e})]})};Yn.displayName="AddToCart.Modal";const js=({children:e})=>{const{count:t,handleClose:r,setIsOpen:o}=ce(),s=h.useRef(t);return h.useEffect(()=>{t>s.current&&o(!0),t<s.current&&s.current>=1&&r(),s.current=t},[t,r,o]),n.jsx(n.Fragment,{children:e})},Jn=({children:e,component:t,CONSTANTS:r,...o})=>{const{recentlyAddedProducts:s}=y.useUIContext(),{isMobile:a}=y.useGlobalContext(),i=s.length>3?4:s.length;return n.jsx(Cn,{...o,count:i,isMobile:a,CONSTANTS:r,children:n.jsx(js,{children:a?n.jsxs(n.Fragment,{children:[n.jsx(se.Modal,{Z_INDEX_WAR:r.Z_INDEX_WAR,children:t}),e]}):n.jsx(se.Tooltip,{component:t,style:{width:350},Z_INDEX_WAR:r.Z_INDEX_WAR,children:e})})})};Jn.displayName="AddToCart.Root";const Qn=({children:e,component:t,Z_INDEX_WAR:r,...o})=>{const{contentRef:s,left:a,isLeaving:i,target:c,isOpen:l,top:d}=ce();return n.jsx(u.Tooltip.Root,{arrow:"top-right",component:n.jsx("div",{...o,ref:s,children:t}),id:"add-to-cart--tooltip",className:G["add-to-cart--tooltip"],style:{zIndex:r.modal},isLeaving:i,isOpen:l,left:a,size:"medium",position:"top",top:d,children:n.jsx("div",{className:G["add-to-cart--tooltip"],ref:c,children:e})})};Qn.displayName="AddToCart.Tooltip";const se={Card:Gn,Content:Wn,Footer:Kn,Items:Xn,Modal:Yn,Root:Jn,Tooltip:Qn},bt=({title:e,...t})=>{const{recentlyAddedProducts:r}=y.useUIContext(),{isMobile:o}=y.useGlobalContext(),s=r.length>3?4:r.length,a=r.length>(s??1),i=r.length>1;return n.jsx(se.Root,{isMobile:o,count:r.length,component:n.jsx(se.Content,{title:e,children:n.jsx(se.Items,{thumbnail:i,children:a&&n.jsx(u.Badge.Count,{count:r.length-s,size:"medium",variant:"secondary"})})}),...t})};bt.displayName="AddToCart";const Tt={"backtotop-btn":"_backtotop-btn_1shb6_1","card-modifier":"_card-modifier_1shb6_27"},Ss=({children:e,className:t,adornment:r,iconPosition:o,scrollToOptions:s,style:a,...i})=>{const c={top:(s==null?void 0:s.top)??0,left:(s==null?void 0:s.left)??0,behavior:(s==null?void 0:s.behavior)??"smooth"},d=o&&r?{flexDirection:{top:"column",bottom:"column-reverse",left:"row",right:"row-reverse"}[o]}:{},m=()=>{window&&window.document.body.scrollTo({...c})};return n.jsx(u.Card,{...i,shadow:!0,padding:"small",className:u.helpers.classNameConcat(Tt["card-modifier"],t),style:{...a,padding:0},children:n.jsxs("button",{className:Tt["backtotop-btn"],onClick:m,style:{...d},"data-orientation":o,children:[r,e]})})},jt={"btn-login":"_btn-login_yas63_12","btn-header":"_btn-header_yas63_22","header-animation":"_header-animation_yas63_35"},St=({id:e})=>{const{setIsOpen:t,cartStore:{items:r}}=Z(),{handleSelectContent:o}=y.useEventContext(),{CONSTANTS:s}=F(),a=r.reduce((i,c)=>i+(c.quantity??0),0);return n.jsx(u.Header.SupportItem,{onClick:()=>{t(!0),o({content:"header:minicart"})},id:e,children:n.jsxs(u.Badge.AutoPositioner,{children:[n.jsx(u.Badge.Count,{count:a,size:"medium",variant:"primary",style:{backgroundColor:"black",display:a>0?"flex":"none"}}),n.jsx(u.Icon,{name:s.header.ICONS.bag,size:"medium"})]})})};St.displayName="Header.Bag";const Ce=({children:e,href:t,...r})=>t&&t!=="#"?n.jsx(y.NextLink,{href:t.startsWith("/")?t:`/${t}`,...r,children:e}):e,Zn=()=>{const{headerData:e}=F(),{handleSelectContent:t}=y.useEventContext(),{reset:r,updateValue:o}=re(),s=a=>{a?o(a):r()};return n.jsx(u.Header.Categories,{children:Array.isArray(e.categories)&&e.categories.map((a,i)=>n.jsx(Ce,{href:a.link,onMouseEnter:()=>s(a.submenuId),onFocus:()=>s(a.submenuId),children:n.jsx(u.Header.CategoryItem,{className:jt["btn-header"],value:a.submenuId??null,adornment:{start:n.jsx(u.Icon,{name:a.iconStart}),end:n.jsx(u.Icon,{name:a.iconEnd})},style:{textWrap:"nowrap",gap:"0"},onClick:()=>{t({content:`header:${a.label}`})},children:a.label})},`category-${a.label}-${i}`))})};Zn.displayName="Header.Categories";function Ns({SearchModal:e}){const{handleSelectContent:t}=y.useEventContext(),{CONSTANTS:r}=F(),{setValue:o}=pt();return n.jsxs(n.Fragment,{children:[n.jsx(u.Header.SupportItem,{onClick:()=>{o(!0),t({content:"header:search"})},children:n.jsx(u.Icon,{name:r.header.ICONS.search,size:"medium"})}),n.jsx(e,{recommendations:!1,trends:!0})]})}const Is={"menu-subcategories-container":"_menu-subcategories-container_a93cr_1"},Es={"observer-wrapper":"_observer-wrapper_r43gk_1"};function Ps(e,t,r){const[o,s]=h.useState(!1),{threshold:a}=r||{};return h.useEffect(()=>{if(!e.current)return()=>null;let i=null;const c=new IntersectionObserver(([l])=>{if(r!=null&&r.delay){i&&clearTimeout(i),i=setTimeout(()=>{s(l.isIntersecting),t&&l.isIntersecting&&c.unobserve(e.current)},r.delay);return}s(l.isIntersecting),t&&l.isIntersecting&&c.unobserve(e.current)},{threshold:a||1});return c.observe(e.current),()=>{c.disconnect()}},[e]),o}const Oe=({children:e,eventData:t,observerOptions:r,callBackWhenVisible:o,stopOnIntersection:s=!0,className:a,...i})=>{const c=h.useRef(null),l=Ps(c,s,r),{sendDataLayerEvent:d}=y.useEventContext();return h.useEffect(()=>{l&&(typeof o=="function"&&o(),t&&d({...t}))},[l]),n.jsx("div",{...i,ref:c,className:u.helpers.classNameConcat(Es["observer-wrapper"],a),children:e})},Nt=({thumbnails:e,category:t,isMobile:r=!0,callBack:o})=>{const{handleSelectPromotionEvent:s}=y.useEventContext(),a=50/e.length;return n.jsx("div",{className:Is["menu-subcategories-container"],children:e.map((i,c)=>{const l=r?i.srcMobile:i.srcDesk;if(!l)return null;const d={creative_name:"banner-menu",creative_slot:`banner-menu:${t}:${c+1}`,promotion_id:l,promotion_name:i.promotion_name};return n.jsx(Oe,{eventData:{functionKey:"readyEvents",data:{event:"view_promotion",readyData:{ecommerce:{...d}}}},observerOptions:{delay:1e3},children:n.jsxs(y.NextLink,{href:i.link??"#",onClick:()=>{typeof o=="function"&&o(),s({updatePromotionRef:!0,promotion:d})},children:[n.jsx(Q.Image,{src:l,alt:i.label??l,width:500,height:500,sizes:`(max-width: 768px) 100vw, (max-width: 1023px) 75vw, ${a}vw`}),i.label&&n.jsx("p",{children:i.label})]})},`thumb-${i.label}-${c}`)})})};Nt.displayName="Menu.Thumbnail";const He={"menu-desktop":"_menu-desktop_1b799_1","menu-categories":"_menu-categories_1b799_12"},ws="_link_w24h0_1",ks="_wrapper_w24h0_98",As="_text_w24h0_106",Le={link:ws,wrapper:ks,text:As},ne=({children:e,adornments:t,className:r,disableUnderline:o,href:s,mode:a,size:i,title:c,onClick:l,disablePadding:d,...m})=>{const p=u.helpers.ValidateProp({fieldTypes:ue.SizesSmallExtended,property:i,fallback:"medium"}),f=u.helpers.ValidateProp({fieldTypes:ue.Mode,property:a,fallback:"default"});return n.jsx(y.NextLink,{...m,className:u.helpers.classNameConcat(Le.link,r),href:s&&s.length>0?s:"#","data-size":p,"data-variant":f,title:c||"NextLink","data-disable-underline":o??!1,"data-disable-padding":d??!0,children:n.jsxs("div",{className:Le.wrapper,onClick:l,children:[t==null?void 0:t.start,n.jsx("p",{className:Le.text,"data-size":p,children:e}),t==null?void 0:t.end]})})},er=({children:e,dividerOnRight:t=!0,subMenu:r,...o})=>{var l;const{router:s}=y.useNextContext(),{reset:a}=re(),{handleSelectContent:i}=y.useEventContext(),{CONSTANTS:c}=F();return n.jsxs("div",{...o,className:He["menu-categories"],children:[(l=r==null?void 0:r.subCategories)==null?void 0:l.map((d,m)=>{var _,g,x;const p=d.listCollapseDesk&&!((_=d.see_all)!=null&&_.link)?{expandAfterRowsQty:d.rowsToShowDesk}:{},f=d.listCollapseDesk&&!((g=d.see_all)!=null&&g.link)?{expansivesAdornments:{open:c.header.ICONS.add,close:c.header.ICONS.minus},expansivesLabels:{open:c.header.COMPONENT_LIST.listExpandLabel,close:c.header.COMPONENT_LIST.listCollapseLabel},iconSize:"x-small"}:{adornment:{end:n.jsx(u.Icon,{name:c.header.ICONS.arrow_right,size:"small"})}};return n.jsxs(u.ComponentList.Structure,{children:[n.jsx(Ce,{href:d.linkLabel,title:d.label,onClick:()=>{d.linkLabel&&(a(),i({content:`menu:${d.label??""}:${r.label??""}`}))},children:n.jsx(u.TextStructure.Root,{children:n.jsx(u.TextStructure.DivWrapper,{children:n.jsx("h2",{children:d.label})})})}),n.jsx(u.ComponentList.List,{columns:1,...p,className:He["submenu-categories"],children:d.items.map((v,C)=>n.jsx(u.ComponentList.ListItem,{id:`list-item-${v.label}-${C}`,children:n.jsx(ne,{href:v.link??"#",size:"x-small",title:v.label??"",disableUnderline:!0,disablePadding:!0,onClick:()=>{a(),i({content:`menu:${d.label??""}:${v.label??""}:${r.label??""}`})},children:v.label})},`list-item-${v.label}-${C}`))}),((x=d.see_all)==null?void 0:x.link)&&n.jsx(u.ComponentList.Support,{...f,size:"small",onClick:()=>{var v;(v=d.see_all)!=null&&v.link&&(a(),i({content:`menu:${d.label??""}:${r.label}`}),s.push(d.see_all.link))},children:d.see_all.link&&d.see_all.label})]},`list-${d.label}-${m}`)}),t&&n.jsx(u.Utils.Divider,{size:"small",direction:"vertical"})]})};er.displayName="Menu.Categories";const tr=({children:e,dividerOnBottom:t=!0,...r})=>{const{CONSTANTS:o}=F();return n.jsxs(n.Fragment,{children:[n.jsx("div",{...r,className:He["menu-desktop"],style:{...r.style,justifyContent:o.header.ALIGNMENT_MENU},children:e}),t&&n.jsx(u.Utils.Divider,{size:"small"})]})};tr.displayName="Menu.MenuRoot";const De={Root:tr,Categories:er,Thumbnail:Nt},nr=()=>{const{headerData:e,CONSTANTS:t}=F(),r=Re(),{reset:o}=re();return n.jsx(u.Header.SubMenu,{children:Array.isArray(e.subMenus)&&e.subMenus.map((s,a)=>{const{thumbnails:i,label:c,id:l}=s,d=l===r,m=i==null?void 0:i.some(p=>!!p.srcDesk);return n.jsxs(De.Root,{id:l,style:d?{display:"flex",zIndex:t.header.Z_INDEX_WAR.menu_desktop}:{display:"none"},dividerOnBottom:d,children:[n.jsx(De.Categories,{dividerOnRight:!!m,subMenu:s}),Array.isArray(i)&&n.jsx(De.Thumbnail,{thumbnails:i,isMobile:!1,category:c,callBack:o})]},`submenu-${l}-${a}`)})})};nr.displayName="Header.SubMenu";const rr=()=>{const{handleSelectContent:e}=y.useEventContext(),{CONSTANTS:t}=F();return n.jsx(y.NextLink,{href:"/favoritos",children:n.jsx(u.Header.SupportItem,{onClick:()=>e({content:"header:wishlist"}),children:n.jsx(u.Icon,{name:t.header.ICONS.favorite_false,size:"medium"})})})};rr.displayName="Header.WishList";const or=({SearchModal:e})=>{const{CONSTANTS:t,userMenuDesktopRef:r}=F(),{handleSelectContent:o}=y.useEventContext(),{reset:s}=re(),{setValue:a}=ye();return n.jsxs(n.Fragment,{children:[n.jsxs(u.Header.Wrapper,{children:[n.jsx(u.Header.Logo,{style:{width:"100%"},children:n.jsx(y.NextLink,{href:"/",onMouseEnter:s,children:n.jsx(u.Icon,{name:t.header.ICONS.logo,size:"x-large",onClick:()=>{o({content:"header:logo"})}})})}),n.jsx(Zn,{}),n.jsxs(u.Header.Support,{onMouseEnter:s,style:{justifyContent:"flex-end"},children:[n.jsx(Ns,{SearchModal:e}),n.jsx(u.Header.SupportItem,{onClick:()=>{a(!0),o({content:"header:user_menu"})},className:jt["btn-login"],innerRef:r,children:n.jsx(u.Icon,{name:t.header.ICONS.person,size:"medium"})}),n.jsx(rr,{}),n.jsx(St,{id:"cart-button"})]})]}),n.jsx(nr,{})]})};or.displayName="Header.HeaderDesktopWrapper";const Ts="_divider_1lexj_199",$={"modal-modifier":"_modal-modifier_1lexj_1","menu-mobile":"_menu-mobile_1lexj_11","menu-header-container":"_menu-header-container_1lexj_26","menu-header-wrapper":"_menu-header-wrapper_1lexj_35","menu-header-navlinks":"_menu-header-navlinks_1lexj_41","menu-body":"_menu-body_1lexj_57","menu-categories-container":"_menu-categories-container_1lexj_74","menu-categories-btn":"_menu-categories-btn_1lexj_108","menu-body-banner-container-modifier":"_menu-body-banner-container-modifier_1lexj_121","menu-categories__banner":"_menu-categories__banner_1lexj_130","menu-submenu-modal-modifiier":"_menu-submenu-modal-modifiier_1lexj_135","menu-submenu":"_menu-submenu_1lexj_135","menu-submenu--item":"_menu-submenu--item_1lexj_150","menu-submenu--thumbnails":"_menu-submenu--thumbnails_1lexj_156","menu-submenu--component-list-modifier":"_menu-submenu--component-list-modifier_1lexj_184","submenu-categories":"_submenu-categories_1lexj_187","menu-navigationbar":"_menu-navigationbar_1lexj_191",divider:Ts,"menu-navigationbar-item":"_menu-navigationbar-item_1lexj_206","menu-categories-textstructure-modifier":"_menu-categories-textstructure-modifier_1lexj_210"},sr=({children:e,mobileBannerAlt:t,mobileBannerSrc:r,onClick:o,textColor:s,...a})=>n.jsx("button",{onClick:o,className:$["menu-categories-btn"],children:r?n.jsxs(u.Banner.Container,{...a,className:$["menu-body-banner-container-modifier"],children:[n.jsx(u.Banner.ImageWrapper,{style:{width:"100%"},children:n.jsx(Q.Image,{src:r,alt:t??r,className:$["menu-categories__banner"],width:343,height:128,unoptimized:!0})}),n.jsx(u.Banner.Slot,{verticalAlignment:"center",horizontalAlignment:"start",children:n.jsx(u.TextStructure.Root,{children:n.jsx(u.TextStructure.DivWrapper,{className:$["menu-categories-textstructure-modifier"],children:n.jsx("h2",{className:"typography-style-body-xs",style:s?{color:s}:{},children:e})})})})]}):n.jsx("h2",{...a,children:e})});sr.displayName="Menu.MenuCategories";const ar=({children:e,link:t})=>{const{reset:r}=ie();return t?n.jsx(y.NextLink,{href:t??"#",onClick:r,children:e}):e};ar.displayName="Menu.MenuCategoriesWrapper";const ir=({subcategory:e,submenuLabel:t})=>{var l,d,m;const{router:r}=y.useNextContext(),{reset:o}=ie(),{handleSelectContent:s}=y.useEventContext(),{CONSTANTS:a}=F(),i=e.listCollapseMobile&&!((l=e.see_all)!=null&&l.link)?{expandAfterRowsQty:e.rowsToShowMobile}:{},c=e.listCollapseMobile&&!((d=e.see_all)!=null&&d.link)?{expansivesAdornments:{open:a.header.ICONS.add,close:a.header.ICONS.minus},expansivesLabels:{open:a.header.COMPONENT_LIST.listExpandLabel,close:a.header.COMPONENT_LIST.listCollapseLabel},iconSize:"x-small"}:{adornment:{end:n.jsx(u.Icon,{name:a.header.ICONS.arrow_right,size:"small"})}};return n.jsxs(u.ComponentList.Structure,{className:$["menu-submenu--component-list-modifier"],children:[n.jsx(Ce,{href:e.linkLabel,title:e.label,onClick:()=>{o(),s({content:`menu:${e.label??""}:${t}`})},children:n.jsx(u.TextStructure.Root,{children:n.jsx(u.TextStructure.DivWrapper,{children:n.jsx("h2",{className:"typography-style-body-sm-strong",children:e.label})})})}),n.jsx(u.ComponentList.List,{columns:1,...i,className:$["submenu-categories"],children:e.items.map((p,f)=>n.jsx(u.ComponentList.ListItem,{id:`list-item-${p.label}-${f}`,divider:!0,children:n.jsx(ne,{href:p.link??"#",size:"x-small",title:p.label??"",disableUnderline:!0,onClick:()=>{o(),s({content:`menu:${e.label??""}:${p.label}:${t}`})},children:p.label})},`list-item-${p.label}-${f}`))}),((m=e.see_all)==null?void 0:m.link)&&n.jsx(u.ComponentList.Support,{...c,size:"small",onClick:()=>{var p;o(),s({content:`menu:${e.label??""}:${t}`}),(p=e.see_all)!=null&&p.link&&r.push(e.see_all.link)},children:e.see_all.link&&e.see_all.label})]})};ir.displayName="Menu.SubMenuSubCategory";const cr=({submenu:e})=>{var a;const t=Re(),{handleCloseSubMenu:r}=ve(),{reset:o}=re(),{CONSTANTS:s}=F();return n.jsxs("div",{className:$["menu-submenu--item"],style:{display:t===e.id?"flex":"none"},children:[n.jsx(u.TextStructure.Root,{adornment:{start:n.jsx(u.Icon,{name:s.header.ICONS.arrow_back,size:"medium",onClick:r})},layoutProps:{textRow:{alignItems:"center",style:{width:"100%",position:"relative"}},columnWrapper:{alignContent:"center",style:{width:"100%"}}},children:e.label&&n.jsx(u.TextStructure.DivWrapper,{style:{position:"absolute",left:"50%",transform:"translate(-50%)"},children:n.jsx("h2",{className:"typography-style-body-md-strong",children:e.label})})}),n.jsx("div",{className:$["menu-submenu--thumbnails"],children:Array.isArray(e.thumbnails)&&n.jsx(Nt,{thumbnails:e.thumbnails,isMobile:!0,category:e.label,callBack:o})}),(a=e==null?void 0:e.subCategories)==null?void 0:a.map((i,c)=>n.jsx(ir,{subcategory:i,submenuLabel:e.label},`list-${i.label}-${c}`))]})};cr.displayName="Menu.SubMenuItem";const lr=()=>{const{headerData:e}=F(),t=Re(),{reset:r}=re(),{bodyRef:o}=ve();return n.jsx(u.Modal.RootWithoutPortal,{isOpen:!!t,setIsOpen:r,parent:o.current,variant:"sideLeft",style:{position:"absolute",width:"100%"},className:$["menu-submenu-modal-modifiier"],children:n.jsx("div",{className:$["menu-submenu"],children:e.subMenus.map((s,a)=>n.jsx(cr,{submenu:s},`submenu-${s.id}-${a}`))})})};lr.displayName="Menu.SubMenu";const ur=({className:e,...t})=>{const{headerData:r}=F(),{setValue:o}=re(),{bodyRef:s}=ve(),{handleSelectContent:a}=y.useEventContext();return n.jsxs("div",{...t,ref:s,id:"menu-body",className:$["menu-body"],children:[n.jsx("div",{className:$["menu-categories-container"],children:r.categories.map((i,c)=>{const l=i.submenuId?{}:{"data-close":!0};return n.jsx(ar,{link:i.submenuId?null:i.link,children:n.jsx(sr,{onClick:()=>{o(i.submenuId??null),a({content:`menu:${i.label}`})},mobileBannerSrc:i.mobileBannerSrc,mobileBannerAlt:i.mobileBannerAlt,textColor:i.textColor,...l,children:i.mobileBannerAlt})},`menu-categories-${c}`)})}),n.jsx(lr,{})]})};ur.displayName="Menu.MenuBody";const dr=({title:e,subtitle:t})=>{const{CONSTANTS:r}=F();return n.jsxs("div",{className:$["menu-header-wrapper"],style:t?{alignItems:"start"}:{alignItems:"center"},children:[(e||t)&&n.jsx(u.TextStructure.Root,{children:n.jsxs(u.TextStructure.DivWrapper,{children:[e&&n.jsx("h2",{className:"typography-style-body-md",children:e}),t&&n.jsx("h3",{children:t})]})}),n.jsx(u.Button,{adornment:{end:n.jsx(u.Icon,{name:r.header.ICONS.close})},variant:"tertiary",className:$["menu-close"],"data-close":!0})]})};dr.displayName="Menu.MenuHeaderWrapper";const fr=({navigationLinks:e})=>{const{reset:t}=ie(),{handleSelectContent:r}=y.useEventContext();return e?n.jsx("nav",{className:$["menu-header-navlinks"],children:e.map((o,s)=>n.jsx(ne,{href:o.link??"#",adornments:{start:o.iconStart&&n.jsx(u.Icon,{name:o.iconStart}),end:o.iconEnd&&n.jsx(u.Icon,{name:o.iconEnd})},onClick:()=>{t(),r({content:`menu:navigationlinks-${o.label}`})},children:o.label},s))}):null};fr.displayName="Menu.MenuHeaderNavLinks";const mr=()=>{const{headerData:e}=F();return n.jsxs("div",{className:$["menu-header-container"],children:[n.jsx(dr,{title:e.title,subtitle:e.subtitle}),n.jsx(fr,{navigationLinks:e.navigationLinks})]})};mr.displayName="Menu.MenuHeaderContainer";const pr=({children:e})=>{const{documentBodyRef:t}=ve(),{CONSTANTS:r}=F(),o=mt(),{setValue:s}=ie();return n.jsx(u.Modal.RootWithoutPortal,{isOpen:o,setIsOpen:s,parent:t.current,variant:"sideLeft",style:{position:"fixed",zIndex:r.header.Z_INDEX_WAR.menu_mobile,bottom:"unset",top:0,overflowY:"hidden"},className:$["modal-modifier"],children:n.jsx("div",{className:$["menu-mobile"],children:e})})};pr.displayName="Menu.MenuRoot";const we=({children:e,...t})=>n.jsxs(n.Fragment,{children:[n.jsx(u.Button,{...t,className:$["menu-navigationbar-item"],children:e}),n.jsx(u.Utils.Divider,{direction:"vertical",size:"small",className:$.divider})]});we.displayName="Menu.NavigationBarItem";const hr=()=>{const{setIsOpen:e}=Z(),{reset:t}=ie(),{setValue:r}=ye(),{handleSelectContent:o}=y.useEventContext(),{CONSTANTS:s}=F(),{router:a}=y.useNextContext();return n.jsxs(u.Card,{id:"menu-navigationbar",shadow:!0,className:$["menu-navigationbar"],style:{zIndex:s.header.Z_INDEX_WAR.menu_mobile_navigation_bar},children:[n.jsx(we,{size:"small",variant:"tertiary",iconNameStart:s.header.MENU_INFO.login.button_icon,onClick:()=>{t(),r(!0),o({content:"menu:user_menu"})},children:s.header.MENU_INFO.login.button_text}),n.jsx(we,{size:"small",variant:"tertiary",iconNameStart:s.header.MENU_INFO.bag.button_icon,onClick:()=>{t(),e(!0),o({content:"menu:minicart"})},children:s.header.MENU_INFO.bag.button_text}),n.jsx(we,{size:"small",variant:"tertiary",iconNameStart:s.header.MENU_INFO.store.button_icon,onClick:()=>{a.push("/institucional/lojas"),t(),o({content:"menu:store"})},children:s.header.MENU_INFO.store.button_text})]})};hr.displayName="Menu.NavigationBar";const je={Root:pr,NavigationBar:hr,Header:mr,Body:ur},gr=({SearchModal:e})=>{const t=h.useRef(null),{CONSTANTS:r,userMenuMobileRef:o}=F(),{MENU_NAVIGATION_BAR_ALLOWED:s,ICONS:a,MENU_MOB_BTN_SIDE:i="right"}=r.header,{handleSelectContent:c}=y.useEventContext(),{setValue:l}=pt(),{setValue:d}=ie(),{setValue:m}=ye();return n.jsxs(n.Fragment,{children:[n.jsxs(u.Header.Wrapper,{children:[i==="left"&&n.jsx(u.Header.SupportItem,{onClick:()=>d(!0),innerRef:t,children:n.jsx(u.Icon,{name:a.menu,size:"medium"})}),n.jsx(u.Header.Logo,{style:{width:"100%",justifyContent:"center"},children:n.jsx(y.NextLink,{href:"/",children:n.jsx(u.Icon,{name:a.logo,size:"x-large",onClick:()=>{c({content:"header:logo"})}})})}),n.jsxs(u.Header.Support,{children:[n.jsx(u.Header.SupportItem,{onClick:()=>{l(!0),c({content:"header:search"})},children:n.jsx(u.Icon,{name:a.search,size:"medium"})}),n.jsx(u.Header.SupportItem,{onClick:()=>{m(!0),c({content:"header:user_menu"})},innerRef:o,children:n.jsx(u.Icon,{name:a.person,size:"medium"})}),n.jsx(St,{}),i==="right"&&n.jsx(u.Header.SupportItem,{onClick:()=>d(!0),innerRef:t,children:n.jsx(u.Icon,{name:a.menu,size:"medium"})})]})]}),n.jsx(e,{recommendations:!1,trends:!0}),n.jsx(yn,{children:n.jsxs(je.Root,{children:[n.jsx(je.Header,{}),n.jsx(je.Body,{}),s?n.jsx(je.NavigationBar,{}):n.jsx(n.Fragment,{})]})})]})};gr.displayName="Header.HeaderMobileWrapper";const Ms="_root_wvekm_126",X={"user-menu--credits":"_user-menu--credits_wvekm_1","user-menu--content":"_user-menu--content_wvekm_10","user-menu--login":"_user-menu--login_wvekm_30","user-menu--login--content":"_user-menu--login--content_wvekm_37","user-menu--menu":"_user-menu--menu_wvekm_64","user-menu--tooltip":"_user-menu--tooltip_wvekm_93","tooltip-modifier":"_tooltip-modifier_wvekm_104","modal-controls-modifier":"_modal-controls-modifier_wvekm_109","modal-header-modifier":"_modal-header-modifier_wvekm_117",root:Ms},_r=({className:e,children:t,...r})=>n.jsx("div",{...r,className:u.helpers.classNameConcat(X["user-menu--content"],e),children:t});_r.displayName="UserMenu.Content";var xr=(e=>(e.Account="account",e))(xr||{});const yr=({className:e,cashBack:t,credits:r,link:o,total:s,...a})=>{const i=t?K(t):void 0,c=r?K(r):void 0,l=s?K(s):void 0;return n.jsx(u.Credits.Account,{...a,className:u.helpers.classNameConcat(X["user-menu--credits"],e),icon:"wallet",showIcon:!0,cashBackValue:i,creditsValue:c,linkMore:o,totalValue:l,type:xr.Account})};yr.displayName="UserMenu.Credits";const vr=({className:e,children:t,description:r,text:o,...s})=>{const{isMobile:a}=y.useGlobalContext();return n.jsx("div",{...s,className:u.helpers.classNameConcat(X["user-menu--login"],e),"data-mobile":a,children:n.jsxs("div",{className:X["user-menu--login--content"],children:[n.jsx(u.TextStructure.Root,{children:n.jsxs(u.TextStructure.DivWrapper,{alignContent:"flex-start",alignItems:"flex-start",children:[n.jsx("h3",{className:"typography-style-body-lg-strong",children:o}),n.jsx("p",{children:r})]})}),t]})})};vr.displayName="UserMenu.Login";const Cr=({className:e,isLogged:t,onLogoutClick:r,ICONS:o,storeConfig:s})=>{const{isMobile:a}=y.useGlobalContext(),i=y.LOGIN_MENU_OPTIONS_ARRAY({ICONS:o,storeConfig:s}).filter(c=>c.deviceShown==="both"||c.deviceShown===(a?"mobile":"desktop"));return n.jsxs("ul",{className:u.helpers.classNameConcat(X["user-menu--menu"],e),children:[Array.isArray(i)&&i.map((c,l)=>n.jsx("li",{children:n.jsx(ne,{href:c.href??"#",size:"small",disableUnderline:!0,adornments:{start:n.jsx(u.Icon,{name:c.icon??"delete"})},children:c.label})},l)),t?n.jsx("li",{children:n.jsx(ne,{href:`${s.secureSubdomain}/api/vtexid/pub/logout?scope=mariafilo&returnUrl=${encodeURIComponent(`${s.storeUrl}`)}`,size:"small",disableUnderline:!0,onClick:r,adornments:{start:n.jsx(u.Icon,{name:y.LOGOUT_ICON(o)})},children:y.LOGOUT_TEXT})}):n.jsx(n.Fragment,{})]})};Cr.displayName="UserMenu.Menu";const Rs=e=>{const t=h.useRef(null),r=h.useCallback(a=>{t.current&&!t.current.contains(a.target)&&e()},[e]),o=h.useCallback(a=>{t.current&&!t.current.contains(a.target)&&e()},[e]),s=h.useCallback(a=>{a.key==="Escape"&&e()},[e]);return h.useEffect(()=>(document.addEventListener("mousedown",r),document.addEventListener("keydown",s),document.addEventListener("touchstart",o),()=>{document.removeEventListener("mousedown",r),document.removeEventListener("keydown",s),document.removeEventListener("touchstart",o)}),[r,s,o]),{ref:t}},Os=e=>{if(!e||typeof window>"u")return 0;const t=window.getComputedStyle(e);return parseInt(t.padding,10)},Ls=(e,t,r)=>{if(!(e instanceof HTMLElement)||!(t instanceof HTMLElement))return{left:0,top:0};const{height:o,left:s,top:a,width:i}=t.getBoundingClientRect(),c=e.getBoundingClientRect(),l=e!=null&&e.parentElement?Os(e==null?void 0:e.parentElement):0;return{left:s+i/2-(c.width+l*2),top:a+o+r}},br=h.createContext({}),Ds=({children:e,delay:t=600,gap:r=20,isOpen:o,setIsOpen:s,target:a,...i})=>{const c=h.useRef(null),[l,d]=h.useState(!1),[m,p]=h.useState({left:0,top:0}),{ref:f}=Rs(()=>{d(!0),typeof window<"u"&&(c.current=window.setTimeout(()=>{s(!1),d(!1)},t))});return h.useEffect(()=>{if(a&&(f!=null&&f.current)){const{left:_,top:g}=Ls(f.current,a,r??0);p({left:_,top:g}),d(!1)}},[r,o,a,f]),n.jsx(br.Provider,{value:h.useMemo(()=>({...i,...m,contentRef:f,isLeaving:l,isOpen:o,setIsOpen:s,setIsLeaving:d,target:a}),[i,m,f,l,o,s,d,a]),children:e})},jr=()=>{const e=h.useContext(br);if(e===void 0)throw new Error("useUserMenuContext must be used within a UserMenuProvider");return e},Sr=({children:e,isMobile:t=!1,Z_INDEX_WAR:r})=>{const{isOpen:o,setIsOpen:s}=jr();return n.jsxs(u.Modal.Root,{"data-user":"user-menu--modal",isMobile:t??!1,isOpen:o,setIsOpen:s,variant:"sideBottom",className:X["modal-root-modifier"],style:{zIndex:r.user_menu_mobile},children:[n.jsx(u.Modal.Header,{navigation:"top",className:X["modal-header-modifier"],children:n.jsx(u.Modal.Controls,{navigation:"top",isMobile:!0,className:X["modal-controls-modifier"]})}),n.jsx(u.Modal.Body,{children:e})]})};Sr.displayName="UserMenu.Modal";const Nr=({children:e,component:t,Z_INDEX_WAR:r,isMobile:o,...s})=>n.jsx(Ds,{...s,className:X.root,children:o?n.jsxs(n.Fragment,{children:[n.jsx(oe.Modal,{Z_INDEX_WAR:r,children:t}),e]}):n.jsx(oe.Tooltip,{component:t,style:{width:304,zIndex:r.user_menu},Z_INDEX_WAR:r,children:e})});Nr.displayName="UserMenu.Root";const Ir=({children:e,component:t,Z_INDEX_WAR:r,...o})=>{const{contentRef:s,left:a,isLeaving:i,isOpen:c,top:l}=jr();return n.jsx(u.Tooltip.Root,{arrow:"top-right",component:n.jsx("div",{...o,ref:s,children:t}),className:u.helpers.classNameConcat(X["user-menu--tooltip"],X["tooltip-modifier"]),isLeaving:i,isOpen:c,left:a,size:"medium",position:"top",top:l,style:{zIndex:r.user_menu},children:n.jsx("div",{className:X["user-menu--tooltip"],children:e})})};Ir.displayName="UserMenu.Tooltip";const oe={Credits:yr,Content:_r,Login:vr,Menu:Cr,Modal:Sr,Root:Nr,Tooltip:Ir},It=()=>{var x,v,C;const e=vt(),{isMobile:t}=y.useGlobalContext(),{userMenuMobileRef:r,userMenuDesktopRef:o,CONSTANTS:{header:s},storeConfig:a}=F(),{ICONS:i,Z_INDEX_WAR:c,MENU_INFO:l}=s,d=dn(),{setValue:m}=ye(),p=()=>{window.location.href=`${a.secureSubdomain}/api/io/login?returnUrl=${encodeURIComponent(`${a.storeUrl}`)}`},f=!!((x=e.user)!=null&&x.userId),{cashback:_,credits:g}=h.useMemo(()=>{var E,S;return{credits:((E=e==null?void 0:e.getCurrentCredits())==null?void 0:E.credits)??0,cashback:((S=e==null?void 0:e.getCurrentCredits())==null?void 0:S.cashback)??0}},[e]);return n.jsx(oe.Root,{component:n.jsxs(oe.Content,{children:[n.jsx(oe.Login,{description:y.LOGIN_MENU_DESCRIPTION(f),text:y.LOGIN_MENU_TITLE(f,((v=e==null?void 0:e.user)==null?void 0:v.firstName)??((C=e==null?void 0:e.user)==null?void 0:C.email)),children:!f&&n.jsx(u.Button,{size:"medium",variant:"quaternary",onClick:()=>p(),children:l.login.button_text})}),g+_&&f?n.jsx(oe.Credits,{credits:g,cashBack:_,link:`${a.secureSubdomain}/account#/meus-creditos`,total:g+_}):n.jsx(n.Fragment,{}),n.jsx(u.Utils.Divider,{}),n.jsx(oe.Menu,{isLogged:f,onLogoutClick:()=>e.logout(),ICONS:i,storeConfig:a})]}),target:t?r.current:o.current,isOpen:d,isMobile:t,setIsOpen:m,Z_INDEX_WAR:c})};It.displayName="UserMenu";const Er=({tipBar:e,miniCart:t,SearchModal:r})=>{const{structureRef:o,rootRef:s,CONSTANTS:a}=F(),{header:{HEADER_CONFIGS:i,Z_INDEX_WAR:c}}=a;return n.jsx(u.Header.Structure,{innerRef:o,adornment:{start:e},style:{position:"sticky",top:0,zIndex:c.header},className:jt["header-animation"],children:n.jsxs(u.Header.Root,{innerRef:s,style:{zIndex:c.header},variant:i.default_variant,interactiveVariant:i.interactive_variant,children:[n.jsx("div",{className:y.responsive["responsive-mobile-block"],style:{height:"100%",width:"100%",zIndex:c.header_mobile},children:n.jsx(gr,{SearchModal:r})}),n.jsx("div",{className:y.responsive["responsive-desktop-block"],style:{height:"100%",width:"100%",zIndex:c.header_desktop},children:n.jsx(or,{SearchModal:r})}),t,n.jsx(bt,{title:"Produto adicionado à sua sacola!",CONSTANTS:a.addToCart}),n.jsx(It,{})]})})};Er.displayName="Header";const zs="_shippingFreight_6z8rf_6",Bs="_shippingFreight__postalCodeGrid_6z8rf_10",$s="_shippingFreight__grid_6z8rf_14",Fs="_shippingFreight__grid__title_6z8rf_18",Us="_shippingFreight__grid__remember_6z8rf_29",qs="_postalCodeContainer_6z8rf_44",Vs="_deliveryStatusBar__tag_6z8rf_49",Hs="_deliveryStatusBarError__tag_6z8rf_66",Gs="_deliveryInfo_6z8rf_74",Ws="_deliveryInfo__content_6z8rf_78",Ks="_deliveryInfo__text_6z8rf_84",Xs="_deliveryInfo__title_6z8rf_89",Ys="_deliveryInfo__subtitle_6z8rf_99",Js="_deliveryInfo__tooltipIcon_6z8rf_109",Qs="_deliveryInfo__tooltip_6z8rf_109",Zs="_freightGrid_6z8rf_148",ea="_freightContainer_6z8rf_155",ta="_freightOption__content_6z8rf_160",na="_freightOption__value_6z8rf_166",ra="_freightOption__title_6z8rf_177",oa="_freightOption__title_item_6z8rf_181",sa="_freightOption__paragraph_6z8rf_192",L={shippingFreight:zs,shippingFreight__postalCodeGrid:Bs,shippingFreight__grid:$s,shippingFreight__grid__title:Fs,shippingFreight__grid__remember:Us,postalCodeContainer:qs,deliveryStatusBar__tag:Vs,deliveryStatusBarError__tag:Hs,deliveryInfo:Gs,deliveryInfo__content:Ws,deliveryInfo__text:Ks,deliveryInfo__title:Xs,deliveryInfo__subtitle:Ys,deliveryInfo__tooltipIcon:Js,deliveryInfo__tooltip:Qs,freightGrid:Zs,freightContainer:ea,freightOption__content:ta,freightOption__value:na,freightOption__title:ra,freightOption__title_item:oa,freightOption__paragraph:sa,"input-modifier":"_input-modifier_6z8rf_207","freight--tooltip":"_freight--tooltip_6z8rf_227"},aa=({icon:e,title:t,subtitle:r,packageCount:o,packageUnit:s="",labelDescription:a,freightConfig:i,toolTipZIndex:c})=>{const[l,d]=h.useState(!1),m=h.useRef(null),p=()=>d(f=>!f);return n.jsxs("div",{className:L.deliveryInfo,ref:m,children:[n.jsx(u.Tooltip.Root,{arrow:"bottom",component:n.jsx("div",{children:n.jsx("p",{children:i.messages.select_size_tag})}),id:"freight--tooltip",className:L["freight--tooltip"],style:{zIndex:c},isOpen:!0,size:"medium",position:"top",top:"-170%",left:"4%",parent:m.current}),n.jsxs("div",{className:L.deliveryInfo__content,children:[n.jsx("div",{className:L.deliveryInfo__icon,children:n.jsx(u.Icon,{name:e,size:"medium"})}),n.jsxs("div",{className:L.deliveryInfo__text,children:[n.jsxs("span",{className:L.deliveryInfo__title,children:[t," ",o," ",s]}),r&&n.jsx("span",{className:L.deliveryInfo__subtitle,children:r})]}),a&&n.jsxs("div",{className:L.deliveryInfo__tooltipIcon,onMouseEnter:p,onMouseLeave:p,"aria-label":"Mostrar descrição",children:[n.jsx("span",{children:n.jsx(u.Icon,{name:i.icons.feedback_help,size:"small"})}),l&&n.jsx("div",{className:L.deliveryInfo__tooltip,children:a})]})]})]})},ia=({value:e,title:t,paragraph:r})=>n.jsx("div",{className:L.freightOption,children:n.jsxs("div",{className:L.freightOption__content,children:[n.jsx("span",{className:L.freightOption__value,children:e}),n.jsx("span",{className:L.freightOption__title,children:n.jsx(u.TextStructure.Root,{children:n.jsxs(u.TextStructure.DivWrapper,{className:L.footer__item,children:[n.jsx("span",{className:L.freightOption__title_item,children:t}),r&&n.jsx("span",{className:L.freightOption__paragraph,children:r})]})})})]})}),ca=({children:e})=>n.jsx("div",{className:L.freightContainer,children:e}),la=({children:e})=>n.jsx("div",{className:L.freightGrid,children:e}),ua=({children:e})=>n.jsx("div",{className:L.postalCodeContainer,children:e}),Mt=({message:e,seller:t="",size:r="small",setError:o})=>n.jsx("div",{className:o?L.deliveryStatusBarError:L.deliveryStatusBar,children:n.jsxs(u.Tag,{title:e,className:o?L.deliveryStatusBarError__tag:L.deliveryStatusBar__tag,size:r,children:[e," ",!o&&t]})}),da=e=>{const t=parseInt(e,10);return t===1?`${t} dia`:`${t} dias`},fa=e=>{var r,o,s;const t=[];return(s=(o=(r=e==null?void 0:e.logisticsInfo)==null?void 0:r[0])==null?void 0:o.slas)==null||s.forEach(a=>{t.push({id:a.id,name:a.name,price:a.price,shippingEstimate:a.shippingEstimate})}),t},ma=({component:e,parent:t,top:r,left:o,target:s,contentRef:a,freightConfig:i,toolTipZIndex:c=999,...l})=>{const{isMobile:d}=y.useGlobalContext();return n.jsx(n.Fragment,{children:d?n.jsx(u.Tooltip.Root,{arrow:"bottom",component:n.jsxs("div",{...l,ref:a,children:[e,n.jsx("p",{children:i.messages.select_size_tag})]}),id:"freight--tooltip",className:L["freight--tooltip"],style:{zIndex:c},isOpen:!0,size:"medium",position:"top",top:"-170%",left:"4%",parent:t}):n.jsx(u.Tooltip.Root,{arrow:"bottom",component:n.jsxs("div",{...l,ref:a,children:[e,n.jsx("p",{children:i.messages.select_size_tag})]}),id:"freight--tooltip",className:L["freight--tooltip"],style:{zIndex:c},isOpen:!0,size:"medium",position:"top",top:"-110%",left:"3%",parent:t})})},pa=({onUpdateFreightItems:e,sellerId:t,size:r,skuId:o,quantity:s,setError:a,setIsButtonClicked:i,component:c,freightConfig:l,toolTipZIndex:d})=>{var z,M,T,N;const m=y.useCartStore(),p=y.useCartStore(P=>P.shipping),[f,_]=h.useState(),[g,x]=h.useState(!1),[v,C]=h.useState(!1),[E,S]=h.useState(!1),A=(M=(z=m.shippingData)==null?void 0:z.address)==null?void 0:M.postalCode,I=!(f!=null&&f.length)&&A?A:f,j=h.useRef(null),b=async P=>{const w=P.target.value.replace(/\D/g,"").slice(0,8);w.length>5?_(w.replace(/^(\d{5})(\d{1,3})/,"$1-$2")):_(w)},R=async P=>{const O=P.target.value.replace(/\D/g,"");try{if((await wt.get(`https://viacep.com.br/ws/${O}/json/`)).data.erro){a&&a(l.messages.cep_not_found),i(!1),C(!0);return}a&&a(""),C(!1)}catch{console.log("Erro ao validar o CEP. Tente novamente mais tarde.")}},D=async()=>{x(!0);try{const P=await wt.post("/api/checkout/simulation",{items:[{id:o,quantity:s,seller:t}],country:"BRA",postalCode:I});e(fa(P.data))}catch(P){console.error("Erro ao atualizar o documento:",P)}finally{x(!1),p(I,"BRA")}},k=async()=>{if(!o){S(!0),setTimeout(()=>S(!1),1500);return}await R({target:{value:I}}),g||(D(),i(!0))};return n.jsxs("div",{ref:j,style:{position:"relative"},children:[!o&&E?n.jsx(ma,{component:c,isOpen:E,parent:j.current,toolTipZIndex:d,freightConfig:l}):n.jsx(n.Fragment,{}),n.jsx("div",{style:{position:"relative"},children:n.jsx(u.TextField.Structure,{title:"structure",style:{width:"100%"},input:n.jsx(u.TextField.Input,{defaultValue:(N=(T=m.shippingData)==null?void 0:T.address)==null?void 0:N.postalCode,label:l.messages.text_input_label,title:"textfield",value:f,sizeVariant:r,onMouseOver:()=>o?null:S(!0),onMouseOut:()=>o?null:S(!1),mode:"simple",onChange:b,onKeyDown:P=>{P.key==="Enter"&&k()},className:L["input-modifier"],feedback:v?"error":"none"}),right:n.jsx(u.Button,{onClick:k,size:r,title:"button",children:g?n.jsx(u.Spinner,{size:"small",indicatorColor:"#ffffff"}):l.messages.text_input_btn})})})]})},ha=({children:e,freightConfig:t})=>n.jsxs("div",{className:L.shippingFreight,children:[n.jsxs("div",{className:L.shippingFreight__grid,children:[n.jsx("span",{className:L.shippingFreight__grid__title,children:t.messages.title}),n.jsx("span",{className:L.shippingFreight__grid__remember,children:n.jsx(ne,{href:"https://buscacepinter.correios.com.br/app/endereco/index.php",passHref:!0,target:"_blank",rel:"noopener noreferrer",size:"x-small",disablePadding:!1,title:t.messages.remember_cep,children:t.messages.remember_cep})})]}),n.jsx("div",{className:L.shippingFreight__postalCodeGrid,children:e})]}),ga=({children:e})=>n.jsx("div",{className:L.freightContainer,children:e}),_a=({className:e,sellerId:t,skuId:r,quantity:o,size:s,seller:a,local:i,CONSTANTS_PROPS:c})=>{const{sendDataLayerEvent:l}=y.useEventContext(),[d,m]=h.useState(""),[p,f]=h.useState([]),[_,g]=h.useState(""),[x,v]=h.useState(!1),C=S=>m(S),E=S=>{f(S),l({functionKey:"readyEvents",data:{event:"search_zipcode",readyData:{shippings:S.map(A=>({shipping_tier:A.id,delivery_time:A.shippingEstimate.replace("bd",""),flag_pickup:A.name.toLowerCase().includes("retirada")?"true":"false",shipping:A.price,currency:c.currency||"BRL"}))}}})};return n.jsxs(ga,{className:e,children:[n.jsxs(ha,{freightConfig:c.freightConfig,children:[n.jsx(ua,{children:n.jsx(pa,{onUpdateFreightItems:E,skuId:r,quantity:o,size:s,sellerId:t,local:i,setError:g,setIsButtonClicked:v,freightConfig:c.freightConfig,toolTipZIndex:c.toolTipZIndex})}),_?n.jsx(Mt,{size:s,message:_,setError:g}):p.length>0&&n.jsx(Mt,{size:s,message:c.freightConfig.messages.delivered_by,seller:a})]}),x&&!_?p.length>0&&n.jsxs(ca,{children:[n.jsx(la,{children:p.filter(({id:S})=>!S.includes("Retirada")).map(S=>n.jsx(ia,{id:S.id,value:lt({valueInCents:S.price,hasFree:!1,freeTaxMessage:c.freightConfig.messages.free_tax}),title:S.name,paragraph:`${c.freightConfig.messages.prefix_days}${da(S.shippingEstimate)}`,radioValue:d,changeValue:C},S.id))}),c.deliveryInfoBoxesAllowed?n.jsx(aa,{icon:c.freightConfig.icons.delivery_truck,packageUnit:c.freightConfig.messages.unit_amout,title:c.freightConfig.messages.delivered_amount_packages,subtitle:"",packageCount:1,labelDescription:"Label",freightConfig:c.freightConfig,toolTipZIndex:c.toolTipZIndex??999}):n.jsx(n.Fragment,{})]}):null]})},Pr=h.createContext({}),xa=({children:e,item:t,index:r,shelfTitle:o,...s})=>{const[a,i]=h.useState(null),c=h.useRef(null),l=h.useRef({availableSkus:[],priceInfo:{price:0,listPrice:0}}),{sendDataLayerEvent:d,itemListRef:m}=y.useEventContext(),p=x=>{d({functionKey:"productEvents",data:{commonData:{...t,availableSizes:l.current.availableSkus,...l.current.priceInfo},customData:{index:r+1},event:x}})},f=()=>{p("add_to_wishlist")},_=()=>{d({functionKey:"skuEvents",data:{event:"add_to_cart",commonData:{products:[{...t,...l.current.priceInfo}]},supportData:{selectedSku:a,selectedSkus:[a]},customData:{index:r}}})},g=()=>{o&&(m.current={item_list_name:o}),p("select_item")};return n.jsx(Pr.Provider,{value:h.useMemo(()=>({...s,index:r,item:t,element:c,selectedSku:a,setSelectedSku:i,eventDataRef:l,sendAddToWishlistEvent:f,sendSelectItemEvent:g,sendAddToCartEvent:_}),[s,t,c,a]),children:e})},Y=()=>{const e=h.useContext(Pr);if(e===void 0)throw new Error("useProductCardContext must be used within a ProductCardProvider");return e},V={"product-card--actions":"_product-card--actions_nmzk4_1","product-card--actions--group":"_product-card--actions--group_nmzk4_9","product-card--actions--selectors":"_product-card--actions--selectors_nmzk4_21","product-card--body":"_product-card--body_nmzk4_33","product-card--header":"_product-card--header_nmzk4_47","product-card--footer":"_product-card--footer_nmzk4_67","product-card--image":"_product-card--image_nmzk4_90","product-card--image--container":"_product-card--image--container_nmzk4_97","product-card--outstock":"_product-card--outstock_nmzk4_133","product-card--price":"_product-card--price_nmzk4_155","product-card--title":"_product-card--title_nmzk4_177","product-card--title--tag":"_product-card--title--tag_nmzk4_183","product-card--title--content":"_product-card--title--content_nmzk4_200","product-card--selectors--size":"_product-card--selectors--size_nmzk4_240","product-card--selectors--size--button":"_product-card--selectors--size--button_nmzk4_266","product-card--selectors--size--skus":"_product-card--selectors--size--skus_nmzk4_275","product-card--selectors--style":"_product-card--selectors--style_nmzk4_289","product-card--selectors--style--more":"_product-card--selectors--style--more_nmzk4_299","product-card--video":"_product-card--video_nmzk4_316","product-card--wrapper":"_product-card--wrapper_nmzk4_342"},wr=({callback:e,children:t,className:r,data:o,isKit:s,...a})=>{const{item:{availability:{status:i},image:c}}=Y();return i?n.jsxs("div",{...a,className:u.helpers.classNameConcat(V["product-card--actions"],r),children:[n.jsxs(B.Wrapper,{type:"actions--group",children:[n.jsx(B.Price,{}),n.jsx("div",{className:V["product-card--actions--selectors"],children:!s&&n.jsx(B.StyleSelector,{data:o,images:c,callback:e})})]}),t]}):null};wr.displayName="ProductCard.Actions";const kr=({className:e,isKit:t,...r})=>{const{addToCart:o}=Z(),{isMobile:s=!1,selectedSku:a,outStock:i,item:c,sendAddToCartEvent:l,CONSTANTS:d}=Y(),m=()=>{var _;if(!a)return;const f=dt(a.offers.offers,d.StoreConfig_MainSellerId);f&&o({id:a==null?void 0:a.sku,quantity:1,seller:f.seller.identifier},{id:c.id,texture:(_=c==null?void 0:c.image.find(g=>d.TEXTURE_IMAGE.includes(g.alternateName)))==null?void 0:_.url}),l()},p=a?d.BUY_BUTTON_LABELS.add_to_cart:d.BUY_BUTTON_LABELS.select_size;return n.jsx(u.Button,{...r,className:u.helpers.classNameConcat(e,"buy-button"),disabled:!t&&!a&&!i,size:s?"medium":"large",variant:i?"secondary":"primary",onClick:i?r.onClick:m,children:i?"Avise-me quando chegar":p})};kr.displayName="ProductCard.Actions.BuyButton";const Ar=({product:e,tag:t,size:r="small"})=>{const o=e.offers.offers[0],{CONSTANTS:s,WishListToggle:a}=Y();return n.jsxs(B.Wrapper,{type:"header",style:{zIndex:s.Z_INDEX_WAR.product_card_header},children:[t?n.jsx(u.Tag,{title:t.value,adornment:{start:t.enableIcon&&t.icon?n.jsx(u.Icon,{name:t.icon,size:"small",style:{color:t.iconColor}}):null},size:r,variant:"quaternary",style:{background:t.tagColor,color:t.textColor},children:t.value}):null,s.PRODUCT_CARD_TOP_WISHLIST_TOGGLE&&n.jsx(a,{product:e,priceInfo:{price:o.price,listPrice:o.listPrice},variant:"card"})]})};Ar.displayName="ProductCard.Actions.Header";const Tr=({className:e,children:t,hasPriority:r=!1,showVideo:o=!1,...s})=>{const{element:a,index:i,item:{image:c,slug:l,video:d},sendSelectItemEvent:m,order:p,CONSTANTS:f}=Y(),_=rn({images:c,label:{first:f.MAIN_IMAGE,second:f.SECOND_IMAGE}});return n.jsxs("div",{...s,className:u.helpers.classNameConcat(V["product-card--image"],e),ref:a,style:{aspectRatio:f.PRODUCT_CARD_IMAGE_ASPECT_RATIO},children:[n.jsx(y.NextLink,{href:`/${l}/p`,onClick:m,onMouseUp:g=>{g.button===1&&m(),f.PLP_INFINITE_SCROLL&&sessionStorage.setItem(f.PLP_GRID_SCROLL_BACK.order,String(p))},children:n.jsx("div",{className:V["product-card--image--container"],children:Array.isArray(_)&&_.map(({url:g,alternateName:x},v)=>h.createElement(Q.Image,{...f.PRODUCT_IMAGE_DIMENSIONS.product_card,style:f.PRODUCT_IMAGE_DIMENSIONS.product_card,alt:x??"product image",key:v,...r&&{priority:v===0&&i<4},objectFit:"cover",src:g}))})}),f.PLP_SHOW_VIDEO_ON_PRODUCT_CARD&&o&&d&&n.jsx(B.Video,{url:d,poster:_[0].url}),t]})};Tr.displayName="ProductCard.Media.Media";const Mr=({className:e,callback:t,children:r,...o})=>{const{isMobile:s,item:a,CONSTANTS:{PRODUCT_CARD_TEXTS:i}}=Y(),{availability:{status:c}}=a;return c?null:n.jsxs("div",{...o,className:u.helpers.classNameConcat(V["product-card--outstock"],e),children:[n.jsx(u.Tag,{size:"small",variant:"secondary",title:i.disabled,children:i.disabled}),n.jsx(u.Button,{className:u.helpers.classNameConcat(e,"buy-button"),size:s?"medium":"large",variant:"quaternary",onClick:()=>{typeof t=="function"&&t(a)},children:i.notify})]})};Mr.displayName="ProductCard.OutStock";const Rr=({children:e,className:t="",index:r,isMobile:o=!1,item:s,size:a,order:i,outStock:c,shelfTitle:l,CONSTANTS:d,WishListToggle:m,...p})=>n.jsx(xa,{item:s,isMobile:o,outStock:c,order:i,size:a,index:r,shelfTitle:l,CONSTANTS:d,WishListToggle:m,children:n.jsx("div",{...p,className:u.helpers.classNameConcat(V["product-card--wrapper"],t),"data-size":a,children:e})});Rr.displayName="ProductCard.Root";const Or=({disabled:e,label:t,size:r,value:o,onClick:s,...a})=>n.jsxs(u.ToggleSize.Wrapper,{...a,disabled:!1,outOfStock:e,size:r,onClick:s,children:[n.jsx(u.ToggleSize.DisabledAdornment,{}),n.jsx(u.ToggleSize.Text,{children:t})]});Or.displayName="ProductCard.SizeSelector.Item";const Lr=({active:e=!1,callback:t,selectedSku:r=null,item:o,setNotify:s})=>{const{item:a,isMobile:i,setSelectedSku:c,eventDataRef:l}=Y();o.productId=a.id;const d=ut(o),m=y.getSKUName(o,"tamanho");!d&&!l.current.availableSkus.includes(m)&&l.current.availableSkus.push(m);const p=h.useCallback(_=>{const g=r===_?null:_;typeof c=="function"&&c(g),typeof t=="function"&&t(g)},[t,c,r]),f=h.useCallback(()=>{if(d&&typeof s=="function"){s(a,o);return}p(o)},[o,s,p,d,a]);return n.jsx(Or,{active:e,disabled:d,label:m,onClick:()=>f(),size:i?"x-small":"small",value:o})};Lr.displayName="ProductCard.SizeSelector.SkuItem";const Dr=({callback:e,className:t="",children:r,setNotify:o,...s})=>{const{isMobile:a,item:{isVariantOf:{hasVariant:i}},selectedSku:c}=Y();return n.jsxs("div",{...s,className:u.helpers.classNameConcat(V["product-card--selectors--size"],t),"data-mobile":a,children:[n.jsx("div",{className:V["product-card--selectors--size--skus"],children:Array.isArray(i)&&i.map((l,d)=>n.jsx(Lr,{active:c===l,callback:e,item:l,selectedSku:c,setNotify:o},`size--${d}--${l.sku}`))}),n.jsx("div",{className:V["product-card--selectors--size--button"],children:r})]})};Dr.displayName="ProductCard.SizeSelector";const Ge=({alt:e="",callback:t,more:r,total:o=4,src:s,url:a,...i})=>n.jsxs(u.ToggleStyle.Wrapper,{...i,onClick:()=>{typeof t=="function"&&t(a)},children:[n.jsx(u.ToggleStyle.DisabledAdornment,{}),n.jsxs(u.ToggleStyle.Texture,{children:[s&&n.jsx(Q.Image,{alt:e??s,src:s,height:34,width:34}),r&&n.jsx(u.TextStructure.DivWrapper,{className:V["product-card--selectors--style--more"],children:n.jsxs("p",{children:["+ ",o]})})]})]}),ya=({children:e,callback:t,data:r,total:o=4,size:s,...a})=>{const{index:i}=Y(),{triggerSelectItemEventRef:c}=y.useEventContext();return n.jsxs("div",{...a,children:[e,Array.isArray(r)&&r.slice(0,o).map((l,d)=>n.jsx(Ge,{callback:m=>{c.current.trigger=!0,c.current.index=i,typeof t=="function"&&t(m)},src:(l==null?void 0:l.textureImage)??"",alt:l==null?void 0:l.textureAlt,url:l==null?void 0:l.slug,size:s},d)),Array.isArray(r)&&(r==null?void 0:r.length)>o&&n.jsx(Ge,{size:s,total:r.length-o,more:!0})]})},zr=({callback:e,className:t,data:r,images:o=[],findTexture:s,...a})=>{const{CONSTANTS:i}=Y(),c=s||i.TEXTURE_IMAGE,l=o==null?void 0:o.find(d=>c.includes(d.alternateName));return n.jsx(ya,{...a,callback:e,className:u.helpers.classNameConcat(V["product-card--selectors--style"],t),data:r,size:"x-small",children:l&&n.jsx(Ge,{active:!0,size:"x-small",src:l.url})})};zr.displayName="ProductCard.StyleSelector";const Br=({className:e,hasDecimal:t,...r})=>{const{isMobile:o,item:{offers:{lowPrice:s,highPrice:a},installments:{count:i,value:c}},eventDataRef:l}=Y();l.current.priceInfo={price:s,listPrice:a};const d=K(a,t),m=K(s,t),p=K(c??0),f=o?"horizontal":"stacked";return n.jsx("div",{...r,className:u.helpers.classNameConcat(V["product-card--price"],e),"data-mobile":o,children:n.jsx(u.ProductInfo.Root,{size:"small",layout:f,children:n.jsxs(u.ProductInfo.Wrapper,{size:"small",layout:f,children:[n.jsx(u.ProductInfo.ValuesWrapper,{children:m!==d?n.jsxs(n.Fragment,{children:[n.jsx(u.ProductInfo.Price,{label:"originalPrice",value:d,size:"small"}),n.jsx(u.ProductInfo.Price,{label:"discountPrice",value:m,size:"small"})]}):n.jsx(u.ProductInfo.Price,{label:"defaultPrice",value:m,size:"small"})}),i&&i>1&&c?n.jsx(u.ProductInfo.Price,{label:"installment",value:`${i}x ${p}`,size:"small"}):null]})})})};Br.displayName="ProductCard.Price";const $r=({tag:e,className:t})=>{const{item:{name:r}}=Y();return n.jsxs("div",{className:u.helpers.classNameConcat(V["product-card--title"],t),children:[n.jsx("div",{className:V["product-card--title--tag"],children:e?n.jsx(u.Tag,{size:"small",title:e.value,variant:"quaternary",adornment:{start:e.enableIcon&&e.icon?n.jsx(u.Icon,{name:e.icon,style:{color:e.iconColor}}):null},style:{background:e.tagColor,color:e.textColor},children:e.value}):n.jsx("div",{})}),n.jsx("div",{className:V["product-card--title--content"],children:r&&n.jsx(u.TextStructure.Root,{children:n.jsx(u.TextStructure.DivWrapper,{children:n.jsx("h3",{children:r})})})})]})};$r.displayName="ProductCard.Title";const Fr=({className:e,url:t,poster:r,...o})=>{const{element:s}=Y();return h.useEffect(()=>{if(!(s!=null&&s.current))return;const a=s.current,i=a.querySelector("video");if(i){const c=new IntersectionObserver(m=>{m.forEach(p=>{on(p.isIntersecting,i,t)})},{root:null,rootMargin:"0px",threshold:.5}),l=()=>{i.setAttribute("data-loaded","true")},d=()=>{a&&(c.observe(a),i.addEventListener("loadeddata",l))};return document.readyState==="complete"?d():window.addEventListener("load",d),()=>{c.disconnect(),window.removeEventListener("load",d)}}return()=>null},[t,s]),n.jsx("div",{...o,className:u.helpers.classNameConcat(V["product-card--video"],e),children:t&&n.jsx(Q.Video,{autoPlay:!1,muted:!0,loop:!0,preload:"none",playsInline:!0,poster:r})})};Fr.displayName="ProductCard.Media.Video";const Ur=({children:e,className:t,type:r,...o})=>n.jsx("div",{...o,className:u.helpers.classNameConcat(V[`product-card--${r}`],t),children:e});Ur.displayName="ProductCard.Wrapper";const B={Actions:wr,BuyButton:kr,Header:Ar,Media:Tr,Root:Rr,OutStock:Mr,Price:Br,SizeSelector:Dr,StyleSelector:zr,Title:$r,Video:Fr,Wrapper:Ur},va=Object.freeze(Object.defineProperty({__proto__:null,Footer:y.Footer,FooterSupport:y.FooterSupport},Symbol.toStringTag,{value:"Module"})),Rt=({image:e,index:t,handleZoom:r,PRODUCT_IMAGE_DIMENSIONS:o})=>{const s=tn(e.imageUrl,o.pdp),{nextimage:a}=y.useNextContext();return n.jsx(a,{src:s,alt:e.imageLabel,objectFit:"contain",...o.pdp,...t<=1&&{priority:!0,loading:"eager"},onClick:()=>{r(t)}},t)},Ca=({video:e,productName:t,poster:r})=>{const{sendDataLayerEvent:o}=y.useEventContext(),s=h.useRef(!1);return n.jsx(Q.Video,{src:e,autoPlay:!0,muted:!0,loop:!0,playsInline:!0,style:{zIndex:-1,aspectRatio:"2/3"},onPlaying:()=>{s.current||(s.current=!0,o({functionKey:"readyEvents",data:{event:"video_start",readyData:{product:t}}}))},poster:r})},ba={"gallery-carousel-modifier":"_gallery-carousel-modifier_1dxfy_92"},qr=({images:e,video:t,handleZoom:r,productName:o,PRODUCT_IMAGE_DIMENSIONS:s})=>{var d,m;const{initialize:a,pagination:i,controller:c,itemsStyles:l}=u.Carousel.useCarousel({gap:0,itemsPerPage:1,loop:!1,direction:"row"});return n.jsxs(u.Carousel.Root,{innerRef:p=>{a(p)},className:ba["gallery-carousel-modifier"],children:[n.jsx(u.Carousel.Controller,{position:"absolute",top:"24px",bottom:"unset",left:"16px",children:n.jsx(u.Carousel.Bullets,{page:i.currentPage,total:e.length,onBulletClick:p=>c==null?void 0:c.navigateTo(p)})}),n.jsxs(u.Carousel.Body,{children:[n.jsx(u.Carousel.Item,{style:l,children:n.jsx(Rt,{image:e[0],index:0,handleZoom:r,PRODUCT_IMAGE_DIMENSIONS:s})},"PDP_gallery_0"),t&&n.jsx(u.Carousel.Item,{style:l,children:n.jsx(Ca,{video:t,productName:o,...((d=e[1])==null?void 0:d.imageUrl)&&{poster:(m=e[1])==null?void 0:m.imageUrl}})},"PDP_gallery_video"),e.map((p,f)=>f===0?null:n.jsx(u.Carousel.Item,{style:l,children:n.jsx(Rt,{image:p,index:f,handleZoom:r,PRODUCT_IMAGE_DIMENSIONS:s})},`PDP_gallery_${f}`))]})]})};qr.displayName="PDP.Carousel";const ja=({productImgs:e,PRODUCT_IMAGE_DIMENSIONS:t})=>{const{video:r,productName:o}=ft(),[s,a]=h.useState({show:!1,initialIndex:0});h.useEffect(()=>(s.show?document.body.classList.add("no-scroll"):document.body.classList.remove("no-scroll"),()=>{document.body.classList.remove("no-scroll")}),[s]);const i=c=>{a({show:!0,initialIndex:c})};return n.jsx(n.Fragment,{children:n.jsx(qr,{images:e,video:r,handleZoom:i,productName:o,PRODUCT_IMAGE_DIMENSIONS:t})})},Vr=({TEXTURE_IMAGE:e,PRODUCT_IMAGE_DIMENSIONS:t})=>{const{images:r}=ft(),o=h.useMemo(()=>{const s=r.filter(a=>!e.includes(a.imageLabel));return s.length>0?s:r},[]);return n.jsx(ja,{productImgs:o,PRODUCT_IMAGE_DIMENSIONS:t})};Vr.displayName="PDP.Gallery";const Sa=Object.freeze(Object.defineProperty({__proto__:null,Gallery:Vr},Symbol.toStringTag,{value:"Module"})),Na="_container_1sy8s_16",te={"carousel-container":"_carousel-container_1sy8s_1","add-cart-container":"_add-cart-container_1sy8s_8",container:Na,"add-itens-to-cart-container":"_add-itens-to-cart-container_1sy8s_38","add-itens-to-cart-container-values":"_add-itens-to-cart-container-values_1sy8s_45","add-itens-to-cart-qty-products":"_add-itens-to-cart-qty-products_1sy8s_50","add-itens-to-cart-total":"_add-itens-to-cart-total_1sy8s_60","add-button":"_add-button_1sy8s_70"},Ia=({selectedProducts:e,handleAddAllToCart:t,CONSTANTS:r})=>{const o=Object.values(e.products).length;return n.jsxs("div",{className:te["add-itens-to-cart-container"],children:[n.jsxs("div",{className:te["add-itens-to-cart-container-values"],children:[n.jsx("div",{className:te["add-itens-to-cart-qty-products"],children:n.jsx("span",{children:o===0?r.BUY_PACKAGE.group_cart.select_all_product:`${o} ${o===1?r.BUY_PACKAGE.group_cart.select_product:r.BUY_PACKAGE.group_cart.select_product+"s"}`})}),n.jsx("div",{className:te["add-itens-to-cart-total"],children:n.jsx("span",{children:lt({valueInCents:e.totalPrice*100,hasFree:!1,freeTaxMessage:r.FREIGHT_CALCULATION.messages.free_tax})})})]}),n.jsx(u.Button,{onClick:t,className:te["add-button"],size:"large",disabled:o===0,variant:"primary",children:r.BUY_BUTTON_LABELS.add_to_cart})]})},Ea=e=>e.reduce((t,r)=>{var s;const o=t.find(a=>a.node.id===r.node.id);if(!o)return[...t,r];if((s=o==null?void 0:o.node.isVariantOf)!=null&&s.hasVariant){const a=o.node.isVariantOf.hasVariant,i=r.node.isVariantOf.hasVariant;a&&i&&(o.node.isVariantOf.hasVariant=[...a,...i])}return t},[]),Pa=({selectedProduct:e,productId:t,prevState:r,mainSellerId:o})=>{const{products:s,totalPrice:a}=r;try{if(!e){const{[t]:d,...m}=s;return{...r,totalPrice:a-d.price,products:m}}const i=dt(e.offers.offers,o);if(!i)return r;const c=i.seller.identifier,l=i.price;if(s[t]){const{price:d}=s[t];return s[t]={...s[t],price:l,id:e.sku,seller:c},{totalPrice:a+l-d,products:{...s}}}return{totalPrice:a+l,products:{...s,[t]:{id:e.sku,price:l,seller:c,productId:t}}}}catch(i){return console.error("Error handling SKU selection:",i),r}},wa="_carousel_245ib_1",ka="_shelf__container_245ib_14",Aa="_shelf_without_carousel_245ib_34",he={carousel:wa,"custom-controllers":"_custom-controllers_245ib_5",shelf__container:ka,"controllers-arrows-bullets":"_controllers-arrows-bullets_245ib_23",shelf_without_carousel:Aa},Ot=({title:e})=>n.jsx("div",{className:he.shelf__container,children:e&&n.jsx(u.TextStructure.Root,{children:n.jsxs(u.TextStructure.DivWrapper,{children:[n.jsx("h2",{className:u.helpers.classNameConcat("typography-style-body-md",y.responsive["responsive-mobile-flex"]),children:e}),n.jsx("h2",{className:u.helpers.classNameConcat("typography-style-heading-md",y.responsive["responsive-desktop-flex"]),children:e})]})})}),Ta=({children:e,ICONS:t,itemsPerPage:r,title:o})=>{const{isMobile:s}=y.useGlobalContext(),a=r[s?"mobile":"desktop"],{initialize:i,controller:c,itemsStyles:l,pagination:d}=u.Carousel.useCarousel({itemsPerPage:a,gap:10,loop:!0,direction:"row"}),m=h.Children.toArray(e).length;return s||m>=4?n.jsxs(u.Carousel.Root,{innerRef:f=>{i(f)},className:he.carousel,children:[n.jsxs("div",{className:he["custom-controllers"],children:[o&&n.jsx(Ot,{title:o}),a<m&&n.jsxs(u.Carousel.Controller,{className:he["controllers-arrows-bullets"],children:[n.jsxs(u.Carousel.Arrows,{children:[n.jsx(u.Button,{variant:"tertiary",onClick:()=>c==null?void 0:c.prevPage(),adornment:{start:n.jsx(u.Icon,{name:t.arrow_left})}}),n.jsx(u.Button,{variant:"tertiary",onClick:()=>c==null?void 0:c.nextPage(),adornment:{start:n.jsx(u.Icon,{name:t.arrow_right})}})]}),!s&&a>2&&n.jsx(u.Carousel.Bullets,{page:d.currentPage,total:d.totalPages,onBulletClick:f=>c==null?void 0:c.navigateTo(f)})]})]}),n.jsx(u.Carousel.Body,{children:h.Children.map(e,(f,_)=>n.jsx(u.Carousel.Item,{style:{...l,overflow:"hidden"},children:f},`${o}_${_}`))})]}):n.jsxs(n.Fragment,{children:[o&&n.jsx(Ot,{title:o}),n.jsx("div",{className:he.shelf_without_carousel,children:e})]})},Ma={Shelf:Ta},Ra=({CONSTANTS:e,inView:t,products:r,innerRef:o,WishListToggle:s})=>{const a=h.useMemo(()=>Ea(r),[r]),{isMobile:i}=y.useGlobalContext(),{addItemsToCart:c}=Z(),{sendDataLayerEvent:l}=y.useEventContext(),{getAvailableProductTag:d}=ct(),[m,p]=h.useState({totalPrice:0,products:{}}),f=()=>{const g=Object.values(m.products);c(g),l({functionKey:"skuEvents",data:{event:"add_to_cart",commonData:{products:g.map(x=>{const v=a.find(C=>C.node.id===x.productId);return v==null?void 0:v.node})},supportData:{selectedSkus:g,price:m.totalPrice}}})},_=({selectedProduct:g,productId:x})=>{const v=Pa({selectedProduct:g,productId:x,prevState:m,mainSellerId:e.StoreConfig_MainSellerId});p(v)};return h.useEffect(()=>{if(!t||a.length===0)return;const g=e.BUY_PACKAGE.header.title;l({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:a},customData:{item_list_name:g},outsideEcommerceData:{item_list_name:g}}})},[t]),n.jsxs("div",{className:te.container,ref:o,children:[n.jsx("div",{className:te["carousel-container"],style:{width:a.length<=3?"max-content":"75%"},children:n.jsx(Ma.Shelf,{title:e.BUY_PACKAGE.header.title,itemsPerPage:{desktop:3,mobile:a.length>=3?2.2:a.length},ICONS:e.ICONS,children:Array.isArray(a)&&a.map(({node:g},x)=>{var E,S,A;const v=d(g.cluster.highlights),{availability:{status:C}}=g;return C?n.jsxs(B.Root,{item:{...g,image:Ct.helpers.product.getFirstImages({images:g.image,label:{first:e.MAIN_IMAGE,second:e.SECOND_IMAGE}})},isMobile:i,size:"medium",index:x,shelfTitle:e.BUY_PACKAGE.header.title,CONSTANTS:e,WishListToggle:s,children:[n.jsx(B.Header,{product:g,tag:v.commercial}),n.jsx(B.Media,{}),n.jsxs(B.Wrapper,{type:"body",children:[n.jsx(B.Title,{tag:{value:(E=v.institucional)==null?void 0:E.value,enableIcon:(S=v.institucional)==null?void 0:S.enableIcon,icon:(A=v.institucional)==null?void 0:A.icon}}),n.jsx(B.Actions,{children:n.jsx(B.SizeSelector,{callback:I=>_({selectedProduct:I,productId:g.id})})})]})]},g.id):null})})}),n.jsx("div",{className:te["add-cart-container"],children:n.jsx(Ia,{handleAddAllToCart:f,selectedProducts:m,CONSTANTS:{BUY_BUTTON_LABELS:e.BUY_BUTTON_LABELS,BUY_PACKAGE:e.BUY_PACKAGE,FREIGHT_CALCULATION:e.FREIGHT_CALCULATION}})})]})},Oa=({page:e,data:t})=>{const{pathname:r}=y.useNextContext(),o=h.useRef(null),{sendDataLayerEvent:s,currentLocalRef:a,itemListRef:i,promotionEventRef:c}=y.useEventContext();return h.useEffect(()=>{const l=zn("login_event")||"{}",d=JSON.parse(l);if(d.name||d.method){const m=new Date(0);s({functionKey:"readyEvents",data:{event:d.name,readyData:{method:d.method}}}),yt("login_event","",{expires:m})}},[]),h.useEffect(()=>{if(o.current===r)return;o.current=r;let l={};switch(e){case"PDP":{const m=t,p={};if(!m){l={page_category:"pdp"};break}m.items.forEach(({itemId:f,sellers:_})=>p[f]=_[0].commertialOffer.AvailableQuantity),l={page_category:"pdp",seller_ids:m.items.map(({sellers:f})=>f[0].sellerId).join(),skuStocks:p,product_reference_id:m.productReference};break}case"PDC":{const{page_category:m,page_departament:p,id:f,name:_}=y.getPageCategoryAndDepartmentFromSlug(),g=_,x=f;l={page_category:"lista_produtos",...p&&{page_departament:p}},i.current={item_list_name:r==="/search"?"busca":g??void 0,item_list_id:r==="/search"?void 0:x??void 0},p&&s({functionKey:"readyEvents",data:{event:"view_category",readyData:{page_category:m,page_departament:p}}});break}default:l={page_category:e},c.current={},i.current={};break}const d={region:e,...l};a.current=e,s({functionKey:"readyEvents",data:{readyData:{vtex_version:"fast",...d}},timeout:0})},[r]),null};var We={exports:{}};function La(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var ze={},Be={},Lt;function Da(){return Lt||(Lt=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"LoadableContext",{enumerable:!0,get:function(){return o}});const o=y._interop_require_default._(h).default.createContext(null);process.env.NODE_ENV!=="production"&&(o.displayName="LoadableContext")}(Be)),Be}var Dt;function za(){return Dt||(Dt=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return _}});const r=y._interop_require_default._(h),o=Da();function s(g){return g&&g.default?g.default:g}const a=[],i=[];let c=!1;function l(g){let x=g(),v={loading:!0,loaded:null,error:null};return v.promise=x.then(C=>(v.loading=!1,v.loaded=C,C)).catch(C=>{throw v.loading=!1,v.error=C,C}),v}function d(g,x){let v=Object.assign({loader:null,loading:null,delay:200,timeout:null,webpack:null,modules:null},x),C=null;function E(){if(!C){const I=new m(g,v);C={getCurrentValue:I.getCurrentValue.bind(I),subscribe:I.subscribe.bind(I),retry:I.retry.bind(I),promise:I.promise.bind(I)}}return C.promise()}if(typeof window>"u"&&a.push(E),!c&&typeof window<"u"){const I=v.webpack&&typeof La.resolveWeak=="function"?v.webpack():v.modules;I&&i.push(j=>{for(const b of I)if(j.includes(b))return E()})}function S(){E();const I=r.default.useContext(o.LoadableContext);I&&Array.isArray(v.modules)&&v.modules.forEach(j=>{I(j)})}function A(I,j){S();const b=r.default.useSyncExternalStore(C.subscribe,C.getCurrentValue,C.getCurrentValue);return r.default.useImperativeHandle(j,()=>({retry:C.retry}),[]),r.default.useMemo(()=>b.loading||b.error?r.default.createElement(v.loading,{isLoading:b.loading,pastDelay:b.pastDelay,timedOut:b.timedOut,error:b.error,retry:C.retry}):b.loaded?r.default.createElement(s(b.loaded),I):null,[I,b])}return A.preload=()=>E(),A.displayName="LoadableComponent",r.default.forwardRef(A)}class m{promise(){return this._res.promise}retry(){this._clearTimeouts(),this._res=this._loadFn(this._opts.loader),this._state={pastDelay:!1,timedOut:!1};const{_res:x,_opts:v}=this;x.loading&&(typeof v.delay=="number"&&(v.delay===0?this._state.pastDelay=!0:this._delay=setTimeout(()=>{this._update({pastDelay:!0})},v.delay)),typeof v.timeout=="number"&&(this._timeout=setTimeout(()=>{this._update({timedOut:!0})},v.timeout))),this._res.promise.then(()=>{this._update({}),this._clearTimeouts()}).catch(C=>{this._update({}),this._clearTimeouts()}),this._update({})}_update(x){this._state={...this._state,error:this._res.error,loaded:this._res.loaded,loading:this._res.loading,...x},this._callbacks.forEach(v=>v())}_clearTimeouts(){clearTimeout(this._delay),clearTimeout(this._timeout)}getCurrentValue(){return this._state}subscribe(x){return this._callbacks.add(x),()=>{this._callbacks.delete(x)}}constructor(x,v){this._loadFn=x,this._opts=v,this._callbacks=new Set,this._delay=null,this._timeout=null,this.retry()}}function p(g){return d(l,g)}function f(g,x){let v=[];for(;g.length;){let C=g.pop();v.push(C(x))}return Promise.all(v).then(()=>{if(g.length)return f(g,x)})}p.preloadAll=()=>new Promise((g,x)=>{f(a).then(g,x)}),p.preloadReady=g=>(g===void 0&&(g=[]),new Promise(x=>{const v=()=>(c=!0,x());f(i,g).then(v,v)})),typeof window<"u"&&(window.__NEXT_PRELOADREADY=p.preloadReady);const _=p}(ze)),ze}(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(m,p){for(var f in p)Object.defineProperty(m,f,{enumerable:!0,get:p[f]})}r(t,{noSSR:function(){return l},default:function(){return d}});const o=y._interop_require_default,s=o._(h),a=o._(za()),i=typeof window>"u";function c(m){return{default:(m==null?void 0:m.default)||m}}function l(m,p){if(delete p.webpack,delete p.modules,!i)return m(p);const f=p.loading;return()=>s.default.createElement(f,{error:null,isLoading:!0,pastDelay:!1,timedOut:!1})}function d(m,p){let f=a.default,_={loading:v=>{let{error:C,isLoading:E,pastDelay:S}=v;if(!S)return null;if(process.env.NODE_ENV!=="production"){if(E)return null;if(C)return s.default.createElement("p",null,C.message,s.default.createElement("br",null),C.stack)}return null}};m instanceof Promise?_.loader=()=>m:typeof m=="function"?_.loader=m:typeof m=="object"&&(_={..._,...m}),_={..._,...p};const g=_.loader,x=()=>g!=null?g().then(c):Promise.resolve(c(()=>null));return _.loadableGenerated&&(_={..._,..._.loadableGenerated},delete _.loadableGenerated),typeof _.ssr=="boolean"&&!_.ssr?(delete _.webpack,delete _.modules,l(f,_)):f({..._,loader:x})}(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)})(We,We.exports);var Ba=We.exports,$a=Ba;const Fa=y.getDefaultExportFromCjs($a);var Ke={exports:{}},Se={exports:{}},zt;function Ua(){return zt||(zt=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(l,d){for(var m in d)Object.defineProperty(l,m,{enumerable:!0,get:d[m]})}r(t,{DOMAttributeNames:function(){return o},isEqualNode:function(){return a},default:function(){return c}});const o={acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv",noModule:"noModule"};function s(l){let{type:d,props:m}=l;const p=document.createElement(d);for(const g in m){if(!m.hasOwnProperty(g)||g==="children"||g==="dangerouslySetInnerHTML"||m[g]===void 0)continue;const x=o[g]||g.toLowerCase();d==="script"&&(x==="async"||x==="defer"||x==="noModule")?p[x]=!!m[g]:p.setAttribute(x,m[g])}const{children:f,dangerouslySetInnerHTML:_}=m;return _?p.innerHTML=_.__html||"":f&&(p.textContent=typeof f=="string"?f:Array.isArray(f)?f.join(""):""),p}function a(l,d){if(l instanceof HTMLElement&&d instanceof HTMLElement){const m=d.getAttribute("nonce");if(m&&!l.getAttribute("nonce")){const p=d.cloneNode(!0);return p.setAttribute("nonce",""),p.nonce=m,m===l.nonce&&l.isEqualNode(p)}}return l.isEqualNode(d)}let i;process.env.__NEXT_STRICT_NEXT_HEAD?i=(l,d)=>{const m=document.querySelector("head");if(!m)return;const p=m.querySelectorAll('meta[name="next-head"]')||[],f=[];if(l==="meta"){const x=m.querySelector("meta[charset]");x&&f.push(x)}for(let x=0;x<p.length;x++){var _;const C=p[x].nextSibling;(C==null||(_=C.tagName)==null?void 0:_.toLowerCase())===l&&f.push(C)}const g=d.map(s).filter(x=>{for(let v=0,C=f.length;v<C;v++){const E=f[v];if(a(E,x))return f.splice(v,1),!1}return!0});f.forEach(x=>{var v;const C=x.previousSibling;if(C&&C.getAttribute("name")==="next-head"){var E;(E=x.parentNode)==null||E.removeChild(C)}(v=x.parentNode)==null||v.removeChild(x)}),g.forEach(x=>{var v;const C=document.createElement("meta");C.name="next-head",C.content="1",((v=x.tagName)==null?void 0:v.toLowerCase())==="meta"&&x.getAttribute("charset")||m.appendChild(C),m.appendChild(x)})}:i=(l,d)=>{const m=document.getElementsByTagName("head")[0],p=m.querySelector("meta[name=next-head-count]");if(process.env.NODE_ENV!=="production"&&!p){console.error("Warning: next-head-count is missing. https://nextjs.org/docs/messages/next-head-count-missing");return}const f=Number(p.content),_=[];for(let v=0,C=p.previousElementSibling;v<f;v++,C=(C==null?void 0:C.previousElementSibling)||null){var g;(C==null||(g=C.tagName)==null?void 0:g.toLowerCase())===l&&_.push(C)}const x=d.map(s).filter(v=>{for(let C=0,E=_.length;C<E;C++){const S=_[C];if(a(S,v))return _.splice(C,1),!1}return!0});_.forEach(v=>{var C;return(C=v.parentNode)==null?void 0:C.removeChild(v)}),x.forEach(v=>m.insertBefore(v,p)),p.content=(f-_.length+x.length).toString()};function c(){return{mountedInstances:new Set,updateHead:l=>{const d={};l.forEach(f=>{if(f.type==="link"&&f.props["data-optimized-fonts"]){if(document.querySelector('style[data-href="'+f.props["data-href"]+'"]'))return;f.props.href=f.props["data-href"],f.props["data-href"]=void 0}const _=d[f.type]||[];_.push(f),d[f.type]=_});const m=d.title?d.title[0]:null;let p="";if(m){const{children:f}=m.props;p=typeof f=="string"?f:Array.isArray(f)?f.join(""):""}p!==document.title&&(document.title=p),["meta","base","link","style","script"].forEach(f=>{i(f,d[f]||[])})}}}(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(Se,Se.exports)),Se.exports}(function(e,t){"use client";Object.defineProperty(t,"__esModule",{value:!0});function r(I,j){for(var b in j)Object.defineProperty(I,b,{enumerable:!0,get:j[b]})}r(t,{handleClientScriptLoad:function(){return x},initScriptLoader:function(){return E},default:function(){return A}});const o=y._interop_require_default,s=y._interop_require_wildcard,a=o._(io),i=s._(h),c=y.requireHeadManagerContext_sharedRuntime(),l=Ua(),d=y.requireRequestIdleCallback(),m=new Map,p=new Set,f=["onLoad","onReady","dangerouslySetInnerHTML","children","onError","strategy","stylesheets"],_=I=>{if(a.default.preinit){I.forEach(j=>{a.default.preinit(j,{as:"style"})});return}if(typeof window<"u"){let j=document.head;I.forEach(b=>{let R=document.createElement("link");R.type="text/css",R.rel="stylesheet",R.href=b,j.appendChild(R)})}},g=I=>{const{src:j,id:b,onLoad:R=()=>{},onReady:D=null,dangerouslySetInnerHTML:k,children:z="",strategy:M="afterInteractive",onError:T,stylesheets:N}=I,P=b||j;if(P&&p.has(P))return;if(m.has(j)){p.add(P),m.get(j).then(R,T);return}const O=()=>{D&&D(),p.add(P)},w=document.createElement("script"),q=new Promise((U,H)=>{w.addEventListener("load",function(W){U(),R&&R.call(this,W),O()}),w.addEventListener("error",function(W){H(W)})}).catch(function(U){T&&T(U)});k?(w.innerHTML=k.__html||"",O()):z?(w.textContent=typeof z=="string"?z:Array.isArray(z)?z.join(""):"",O()):j&&(w.src=j,m.set(j,q));for(const[U,H]of Object.entries(I)){if(H===void 0||f.includes(U))continue;const W=l.DOMAttributeNames[U]||U.toLowerCase();w.setAttribute(W,H)}M==="worker"&&w.setAttribute("type","text/partytown"),w.setAttribute("data-nscript",M),N&&_(N),document.body.appendChild(w)};function x(I){const{strategy:j="afterInteractive"}=I;j==="lazyOnload"?window.addEventListener("load",()=>{(0,d.requestIdleCallback)(()=>g(I))}):g(I)}function v(I){document.readyState==="complete"?(0,d.requestIdleCallback)(()=>g(I)):window.addEventListener("load",()=>{(0,d.requestIdleCallback)(()=>g(I))})}function C(){[...document.querySelectorAll('[data-nscript="beforeInteractive"]'),...document.querySelectorAll('[data-nscript="beforePageRender"]')].forEach(j=>{const b=j.id||j.getAttribute("src");p.add(b)})}function E(I){I.forEach(x),C()}function S(I){const{id:j,src:b="",onLoad:R=()=>{},onReady:D=null,strategy:k="afterInteractive",onError:z,stylesheets:M,...T}=I,{updateScripts:N,scripts:P,getIsSsr:O,appDir:w,nonce:q}=(0,i.useContext)(c.HeadManagerContext),U=(0,i.useRef)(!1);(0,i.useEffect)(()=>{const W=j||b;U.current||(D&&W&&p.has(W)&&D(),U.current=!0)},[D,j,b]);const H=(0,i.useRef)(!1);if((0,i.useEffect)(()=>{H.current||(k==="afterInteractive"?g(I):k==="lazyOnload"&&v(I),H.current=!0)},[I,k]),(k==="beforeInteractive"||k==="worker")&&(N?(P[k]=(P[k]||[]).concat([{id:j,src:b,onLoad:R,onReady:D,onError:z,...T}]),N(P)):O&&O()?p.add(j||b):O&&!O()&&g(I)),w){if(M&&M.forEach(W=>{a.default.preinit(W,{as:"style"})}),k==="beforeInteractive")return b?(a.default.preload(b,T.integrity?{as:"script",integrity:T.integrity}:{as:"script"}),i.default.createElement("script",{nonce:q,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([b])+")"}})):(T.dangerouslySetInnerHTML&&(T.children=T.dangerouslySetInnerHTML.__html,delete T.dangerouslySetInnerHTML),i.default.createElement("script",{nonce:q,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([0,{...T}])+")"}}));k==="afterInteractive"&&b&&a.default.preload(b,T.integrity?{as:"script",integrity:T.integrity}:{as:"script"})}return null}Object.defineProperty(S,"__nextScript",{value:!0});const A=S;(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)})(Ke,Ke.exports);var qa=Ke.exports,Va=qa;const Ha=y.getDefaultExportFromCjs(Va),Ga=({children:e,ONE_TRUST:t})=>n.jsxs(n.Fragment,{children:[n.jsx(Ha,{src:"https://cdn.cookielaw.org/scripttemplates/otSDKStub.js",defer:!0,strategy:"afterInteractive","data-domain-script":t.siteId,type:"text/javascript"}),e]}),Wa=Fa(()=>Promise.resolve(Ga),{ssr:!1}),Ka={"snackbar-modifier":"_snackbar-modifier_1va2l_1"},ge=({size:e,adornment:t,title:r,subtitle:o,supportChildren:s,className:a,Z_INDEX_WAR:i,...c})=>n.jsxs(u.SnackBar.Structure,{...c,size:e,className:u.helpers.classNameConcat(Ka["snackbar-modifier"],a),width:360,style:{zIndex:i.snackbar},children:[n.jsx(u.SnackBar.Content,{adornment:t,title:r,subtitle:o}),s&&n.jsx(u.SnackBar.Support,{children:s})]});ge.displayName="SnackBar";const Hr=({children:e,contentState:t,entityKey:r})=>{const{url:o}=t.getEntity(r).getData();return o?n.jsx(y.NextLink,{href:o,children:e}):e},Et={"product-list--banner":"_product-list--banner_sfibj_1","product-list--card":"_product-list--card_sfibj_30","product-list":"_product-list_sfibj_1"},Gr=({className:e,children:t,columns:r=1,isMobile:o=!1,gap:s=8,position_grid:a,totalColumns:i=4,PRODUCT_CARD_IMAGE_ASPECT_RATIO:c,...l})=>{const d=h.useMemo(()=>r%i===0?"initial":o||r<2?c:c.split("/").reverse().join("/"),[r,i,o]);return n.jsx("div",{...l,className:u.helpers.classNameConcat(Et["product-list--banner"],e),style:{aspectRatio:d,maxWidth:`${r/i*100}%`,order:a,padding:s/2},children:t})};Gr.displayName="ProductList.Banner";var Xe={exports:{}},Wr={};(function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0});function t(i,c){for(var l in c)Object.defineProperty(i,l,{enumerable:!0,get:c[l]})}t(e,{SearchParamsContext:function(){return o},PathnameContext:function(){return s},PathParamsContext:function(){return a}});const r=h,o=(0,r.createContext)(null),s=(0,r.createContext)(null),a=(0,r.createContext)(null);process.env.NODE_ENV!=="production"&&(o.displayName="SearchParamsContext",s.displayName="PathnameContext",a.displayName="PathParamsContext")})(Wr);var Ye={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"clientHookInServerComponentError",{enumerable:!0,get:function(){return s}});const o=y._interop_require_default._(h);function s(a){if(process.env.NODE_ENV!=="production"&&!o.default.useState)throw new Error(""+a+' only works in Client Components. Add the "use client" directive at the top of the file to use it. Read more: https://nextjs.org/docs/messages/react-client-hook-in-server-component')}(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)})(Ye,Ye.exports);var Xa=Ye.exports,Je={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getSegmentValue",{enumerable:!0,get:function(){return r}});function r(o){return Array.isArray(o)?o[1]:o}(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)})(Je,Je.exports);var Ya=Je.exports,Kr={};(function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0});function t(i,c){for(var l in c)Object.defineProperty(i,l,{enumerable:!0,get:c[l]})}t(e,{ServerInsertedHTMLContext:function(){return s},useServerInsertedHTML:function(){return a}});const o=y._interop_require_wildcard._(h),s=o.default.createContext(null);function a(i){const c=(0,o.useContext)(s);c&&c(i)}})(Kr);var Qe={exports:{}},Ze={exports:{}},et={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createAsyncLocalStorage",{enumerable:!0,get:function(){return a}});const r=new Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available");class o{disable(){throw r}getStore(){}run(){throw r}exit(){throw r}enterWith(){throw r}}const s=globalThis.AsyncLocalStorage;function a(){return s?new s:new o}(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)})(et,et.exports);var Xr=et.exports;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"requestAsyncStorage",{enumerable:!0,get:function(){return o}});const o=(0,Xr.createAsyncLocalStorage)();(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)})(Ze,Ze.exports);var Ja=Ze.exports;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(f,_){for(var g in _)Object.defineProperty(f,g,{enumerable:!0,get:_[g]})}r(t,{RedirectType:function(){return a},getRedirectError:function(){return i},redirect:function(){return c},permanentRedirect:function(){return l},isRedirectError:function(){return d},getURLFromRedirectError:function(){return m},getRedirectTypeFromError:function(){return p}});const o=Ja,s="NEXT_REDIRECT";var a;(function(f){f.push="push",f.replace="replace"})(a||(a={}));function i(f,_,g){g===void 0&&(g=!1);const x=new Error(s);x.digest=s+";"+_+";"+f+";"+g;const v=o.requestAsyncStorage.getStore();return v&&(x.mutableCookies=v.mutableCookies),x}function c(f,_){throw _===void 0&&(_="replace"),i(f,_,!1)}function l(f,_){throw _===void 0&&(_="replace"),i(f,_,!0)}function d(f){if(typeof(f==null?void 0:f.digest)!="string")return!1;const[_,g,x,v]=f.digest.split(";",4);return _===s&&(g==="replace"||g==="push")&&typeof x=="string"&&(v==="true"||v==="false")}function m(f){return d(f)?f.digest.split(";",3)[2]:null}function p(f){if(!d(f))throw new Error("Not a redirect error");return f.digest.split(";",3)[1]}(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)})(Qe,Qe.exports);var Qa=Qe.exports,tt={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(i,c){for(var l in c)Object.defineProperty(i,l,{enumerable:!0,get:c[l]})}r(t,{notFound:function(){return s},isNotFoundError:function(){return a}});const o="NEXT_NOT_FOUND";function s(){const i=new Error(o);throw i.digest=o,i}function a(i){return(i==null?void 0:i.digest)===o}(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)})(tt,tt.exports);var Za=tt.exports,Ne={exports:{}},$e={},Fe={},Bt;function ei(){return Bt||(Bt=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"NEXT_DYNAMIC_NO_SSR_CODE",{enumerable:!0,get:function(){return t}});const t="NEXT_DYNAMIC_NO_SSR_CODE"}(Fe)),Fe}var $t;function ti(){return $t||($t=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0});function t(a,i){for(var c in i)Object.defineProperty(a,c,{enumerable:!0,get:i[c]})}t(e,{suspense:function(){return o},NoSSR:function(){return s}});const r=ei();function o(){const a=new Error(r.NEXT_DYNAMIC_NO_SSR_CODE);throw a.digest=r.NEXT_DYNAMIC_NO_SSR_CODE,a}function s(a){let{children:i}=a;return typeof window>"u"&&o(),i}}($e)),$e}var Ie={exports:{}},Ft;function ni(){return Ft||(Ft=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"staticGenerationAsyncStorage",{enumerable:!0,get:function(){return o}});const o=(0,Xr.createAsyncLocalStorage)();(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(Ie,Ie.exports)),Ie.exports}var Ut;function ri(){return Ut||(Ut=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"bailoutToClientRendering",{enumerable:!0,get:function(){return s}});const r=ti(),o=ni();function s(){const a=o.staticGenerationAsyncStorage.getStore();return a!=null&&a.forceStatic?!0:(a!=null&&a.isStaticGeneration&&(0,r.suspense)(),!1)}(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(Ne,Ne.exports)),Ne.exports}(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(j,b){for(var R in b)Object.defineProperty(j,R,{enumerable:!0,get:b[R]})}r(t,{ReadonlyURLSearchParams:function(){return _},useSearchParams:function(){return g},usePathname:function(){return x},ServerInsertedHTMLContext:function(){return l.ServerInsertedHTMLContext},useServerInsertedHTML:function(){return l.useServerInsertedHTML},useRouter:function(){return v},useParams:function(){return E},useSelectedLayoutSegments:function(){return A},useSelectedLayoutSegment:function(){return I},redirect:function(){return d.redirect},permanentRedirect:function(){return d.permanentRedirect},RedirectType:function(){return d.RedirectType},notFound:function(){return m.notFound}});const o=h,s=y.requireAppRouterContext_sharedRuntime(),a=Wr,i=Xa,c=Ya,l=Kr,d=Qa,m=Za,p=Symbol("internal for urlsearchparams readonly");function f(){return new Error("ReadonlyURLSearchParams cannot be modified")}class _{[Symbol.iterator](){return this[p][Symbol.iterator]()}append(){throw f()}delete(){throw f()}set(){throw f()}sort(){throw f()}constructor(b){this[p]=b,this.entries=b.entries.bind(b),this.forEach=b.forEach.bind(b),this.get=b.get.bind(b),this.getAll=b.getAll.bind(b),this.has=b.has.bind(b),this.keys=b.keys.bind(b),this.values=b.values.bind(b),this.toString=b.toString.bind(b),this.size=b.size}}function g(){(0,i.clientHookInServerComponentError)("useSearchParams");const j=(0,o.useContext)(a.SearchParamsContext),b=(0,o.useMemo)(()=>j?new _(j):null,[j]);if(typeof window>"u"){const{bailoutToClientRendering:R}=ri();if(R())return b}return b}function x(){return(0,i.clientHookInServerComponentError)("usePathname"),(0,o.useContext)(a.PathnameContext)}function v(){(0,i.clientHookInServerComponentError)("useRouter");const j=(0,o.useContext)(s.AppRouterContext);if(j===null)throw new Error("invariant expected app router to be mounted");return j}function C(j,b){b===void 0&&(b={});const R=j[1];for(const D of Object.values(R)){const k=D[0],z=Array.isArray(k),M=z?k[1]:k;if(!M||M.startsWith("__PAGE__"))continue;z&&(k[2]==="c"||k[2]==="oc")?b[k[0]]=k[1].split("/"):z&&(b[k[0]]=k[1]),b=C(D,b)}return b}function E(){(0,i.clientHookInServerComponentError)("useParams");const j=(0,o.useContext)(s.GlobalLayoutRouterContext),b=(0,o.useContext)(a.PathParamsContext);return(0,o.useMemo)(()=>j!=null&&j.tree?C(j.tree):b,[j==null?void 0:j.tree,b])}function S(j,b,R,D){R===void 0&&(R=!0),D===void 0&&(D=[]);let k;if(R)k=j[1][b];else{const N=j[1];var z;k=(z=N.children)!=null?z:Object.values(N)[0]}if(!k)return D;const M=k[0],T=(0,c.getSegmentValue)(M);return!T||T.startsWith("__PAGE__")?D:(D.push(T),S(k,b,!1,D))}function A(j){j===void 0&&(j="children"),(0,i.clientHookInServerComponentError)("useSelectedLayoutSegments");const{tree:b}=(0,o.useContext)(s.LayoutRouterContext);return S(b,j)}function I(j){j===void 0&&(j="children"),(0,i.clientHookInServerComponentError)("useSelectedLayoutSegment");const b=A(j);return b.length===0?null:b[0]}(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)})(Xe,Xe.exports);var oi=Xe.exports,si=oi;const Yr=({isKit:e,parent:t,productId:r,setNotify:o,CONSTANTS:s})=>{const a=si.useRouter(),i=h.useRef(!1),c=h.useRef(null),[l,d]=h.useState([]),m=g=>a.push(g??""),p=async g=>{try{const x=await fetch("/api/catalog/product/similars",{method:"POST",body:JSON.stringify({productId:g,filterTexture:s.TEXTURE_IMAGE}),priority:"low"});if(!x.ok)throw new Error("Erro ao buscar similares.");const v=await x.json();d(v)}catch(x){console.error(x)}},f=h.useCallback(g=>{!r||!g||(typeof p=="function"&&p(r),i.current=!0)},[r]),_=h.useCallback((g,x)=>{if(!g.isIntersecting){s.PLP_INFINITE_SCROLL&&c.current&&(clearTimeout(c.current),c.current=null);return}if(g.intersectionRatio>=x.threshold&&!i.current){if(s.PLP_INFINITE_SCROLL){c.current=setTimeout(()=>{f(!0)},s.PLP_PRODUCT_SIMILAR_DELAY);return}f(!0)}},[f]);return h.useEffect(()=>{if(e||!t.current)return;const g={root:null,threshold:.1},x=new IntersectionObserver(([v])=>{_(v,g)},g);return x.observe(t.current),()=>{c.current&&clearTimeout(c.current),x.disconnect()}},[_,t,e]),n.jsx(B.Actions,{...l,callback:m,isKit:e,children:!e&&n.jsx(B.SizeSelector,{setNotify:o})})};Yr.displayName="ProductList.Card.Actions";const Jr=({className:e,children:t,gap:r=32,item:o,isMobile:s,order:a,tag:i,hasMaxWidth:c=!0,index:l,setSkuSelected:d,showVideo:m,CONSTANTS:p,WishListToggle:f,..._})=>{const g=h.useRef(null),{availability:{status:x}}=o,v=h.useCallback((E,S)=>{var A;typeof d=="function"&&d((A=E.isVariantOf)==null?void 0:A.hasVariant,S)},[d]),C=o.name.substring(0,4).toLowerCase()==="kit ";return n.jsxs("div",{..._,className:u.helpers.classNameConcat(Et["product-list--card"],e),"data-mobile":s,"data-order":a,ref:g,style:{...c&&{maxWidth:s?"50%":"25%"},order:a,padding:r/2},children:[n.jsxs(B.Root,{item:o,isMobile:s,index:l,size:s?"small":"medium",order:a,outStock:!x,CONSTANTS:p,WishListToggle:f,children:[n.jsx(B.Header,{product:o,tag:i==null?void 0:i.commercial}),n.jsx(B.Media,{showVideo:m,hasPriority:!0}),n.jsxs(B.Wrapper,{type:"body",children:[n.jsx(B.Title,{tag:i==null?void 0:i.institucional}),n.jsx(Yr,{productId:o.isVariantOf.productGroupID,parent:g,setNotify:v,isKit:C,CONSTANTS:p}),!C&&n.jsx(B.OutStock,{callback:v})]}),n.jsx(B.Wrapper,{type:"footer",children:x&&n.jsx(B.BuyButton,{isKit:C})})]}),t]})};Jr.displayName="ProductList.Card";const Qr=({children:e,className:t,...r})=>n.jsx("div",{...r,className:u.helpers.classNameConcat(Et["product-list"],t),children:e});Qr.displayName="ProductList.Grid";const ai={Banner:Gr,Card:Jr,Root:Qr,helpers:es},ii={teamComponents:{AddToCart:bt,BackToTop:Ss,BuyPackage:Ra,...va,FreightCalculation:_a,Header:Er,Link:ne,Media:Q,ProductCard:B,ProductList:ai,UserMenu:It},template:{pdp:Sa},utils:{EventCollector:Oa,ExternalScripts:Wa,LinkOrNotLink:Ce,ObserverWrapper:Oe,SnackBarComponent:ge,DraftJsLinkWrapper:Hr}},ci=(e,t)=>{const r=e.map(s=>`'${s.source}'`).join(`,
2
2
  `);return`
3
3
  import type { NextRequest } from 'next/server'
4
4
  import { NextResponse } from 'next/server'
@@ -18,7 +18,7 @@
18
18
 
19
19
  if (redirect?.destination) {
20
20
  try {
21
- const redirectUrl = new URL(redirect.destination, '${n}')
21
+ const redirectUrl = new URL(redirect.destination, '${t}')
22
22
  return NextResponse.redirect(redirectUrl, 301)
23
23
  } catch (e) {
24
24
  console.error('[ERROR INVALID URL]:', redirect.destination)
@@ -38,4 +38,4 @@
38
38
  ${r}
39
39
  ]
40
40
  }
41
- `},Ca=Object.freeze(Object.defineProperty({__proto__:null,generateMiddleware:ya},Symbol.toStringTag,{value:"Module"})),va={helpers:Ca},ba=(e,n,r)=>{e.findEntityRanges(s=>{const o=s.getEntity();return o===null?!1:r.getEntity(o).getType()==="LINK"},n)},Ee=e=>{const n=new Q.CompositeDecorator([{strategy:ba,component:jr}]),r=Q.convertFromRaw(e);return Q.EditorState.createWithContent(r,n)},ja=e=>Q.convertFromRaw(e),we=Q.DefaultDraftBlockRenderMap.set("unstyled",{element:"div",aliasedElements:["div"]}),Nt="superior-direita",Ne="dentro-inferior-centro",Sa="inferior-direita",De="dentro-inferior-esquerda",Sr=e=>({position:e===Ne||e===De?"absolute":"default",shouldRender:[Nt,Ne,De].includes(e)?"top":"bottom",alignItems:[Ne].includes(e)?"center":[Nt,Sa].includes(e)?"flex-end":"flex-start",left:e===De?"16px":e===Ne?"45%":"unset"}),Na=Object.freeze(Object.defineProperty({__proto__:null,CREATE_CONTENT:Ee,EXTENDED_BLOCK_RENDER_MAP:we,GET_CONTENT_STATE:ja,controllersPositionsAdapter:Sr},Symbol.toStringTag,{value:"Module"})),ce=e=>({centro:"center",esquerda:"start",direita:"end"})[e],Ia=({expanded:e,content:n})=>t.jsxs("details",{open:e,children:[n.textStructureReduced?t.jsx("summary",{onClick:r=>r.preventDefault(),children:t.jsx(Q.Editor,{editorKey:"draft-editor-1",blockRenderMap:we,editorState:n!=null&&n.textStructureReduced?Ee(JSON.parse(n.textStructureReduced)):Q.EditorState.createEmpty(),onChange:()=>null,readOnly:!0})}):t.jsx(t.Fragment,{}),n.showTextStructureExpander&&n.textStructure?t.jsx(t.Fragment,{children:t.jsx(Q.Editor,{editorKey:"draft-editor-1",blockRenderMap:we,editorState:n.textStructure?Ee(JSON.parse(n.textStructure)):Q.EditorState.createEmpty(),onChange:()=>null,readOnly:!0})}):t.jsx(t.Fragment,{})]}),qe={"draftjs-text-modifier":"_draftjs-text-modifier_1itwm_2"},Ea="_textContentWrapper_1bigo_5",wa="_textContentSection_1bigo_13",Ve={"link-modifier":"_link-modifier_1bigo_1",textContentWrapper:Ea,textContentSection:wa},Nr=({data:e,ICONS:n})=>{var o;const[r,s]=f.useState(!1);return t.jsx(d.TextStructure.Root,{layoutProps:{textRow:{alignContent:ce(e.textStructureAlignment),alignItems:ce(e.textStructureAlignment)},columnWrapper:{alignContent:ce(e.textStructureAlignment),alignItems:ce(e.textStructureAlignment)}},adornment:{bottom:e.showTextStructureExpander&&e.textStructure?t.jsx(d.Button,{variant:"tertiary",adornment:{end:t.jsx(d.Icon,{name:r?`${n.arrow_up}`:`${n.arrow_down}`})},onClick:()=>s(a=>!a),size:"small",children:r?"Ver Menos":"Ver Mais"}):t.jsx(t.Fragment,{})},children:t.jsxs(d.Utils.Column,{className:Ve.textContentWrapper,style:{alignItems:ce(e.textStructureAlignment)},children:[t.jsx(d.TextStructure.DivWrapper,{style:{textAlign:ce(e.textStructureAlignment)},mode:e.textStructureMode??"default",className:qe["draftjs-text-modifier"],children:e.textStructureReduced?t.jsx(Ia,{content:e,expanded:r}):t.jsx(t.Fragment,{})}),e.textStructureButtonLabel?t.jsx(ne,{mode:e.textStructureMode??"default",href:e.textStructureButtonHref??"#",size:e.textStructureButtonSize,className:Ve["link-modifier"],adornments:(o=e.textStructureButtonIcon)!=null&&o.length&&e.enableIcon?{end:t.jsx(d.Icon,{name:e.textStructureButtonIcon})}:void 0,children:e.textStructureButtonLabel}):t.jsx(t.Fragment,{})]})})},Pa=e=>({centro:{verticalAlignment:"center",horizontalAlignment:"center"},"centro-esquerda":{verticalAlignment:"center",horizontalAlignment:"start"},"centro-direita":{verticalAlignment:"center",horizontalAlignment:"end"},"superior-centro":{verticalAlignment:"start",horizontalAlignment:"center"},"superior-esquerda":{verticalAlignment:"start",horizontalAlignment:"start"},"superior-direita":{verticalAlignment:"start",horizontalAlignment:"end"},"inferior-centro":{verticalAlignment:"end",horizontalAlignment:"center"},"inferior-esquerda":{verticalAlignment:"end",horizontalAlignment:"start"},"inferior-direita":{verticalAlignment:"end",horizontalAlignment:"end"}})[e],It=e=>({centro:"center",esquerda:"start",direita:"end"})[e],Ge=({dateEnd:e,dateInit:n,TIME_ZONE:r="America/Sao_Paulo",...s})=>{const[o,a]=f.useState(xn(new ft.TZDate(Date.now(),r),new ft.TZDate(e,r))),[l,i]=f.useState(!1);f.useEffect(()=>{l||i(!0);const u=setInterval(()=>{if(o<=0){clearInterval(u);return}a(o-1e3)},1e3);return()=>{clearInterval(u)}},[o,a,l]);const c=fe(o,"days");return l&&o>0?t.jsxs(d.Timer.Root,{...s,children:[c?t.jsxs(t.Fragment,{children:[t.jsx(d.Timer.Digit,{label:"dias",value:c}),t.jsx(d.Timer.Separator,{})]}):null,t.jsx(d.Timer.Digit,{label:"horas",value:fe(o,"hours")}),t.jsx(d.Timer.Separator,{}),t.jsx(d.Timer.Digit,{label:"min",value:fe(o,"minutes")}),t.jsx(d.Timer.Separator,{}),t.jsx(d.Timer.Digit,{label:"segs",value:fe(o),suppressHydrationWarning:!0})]}):t.jsx(t.Fragment,{})},Et={"content-modifier":"_content-modifier_16y4u_5","banner-image-wrapper-modifier":"_banner-image-wrapper-modifier_16y4u_13"},wt=({data:e,videoUrl:n,priority:r,videoRef:s,ICONS:o,...a})=>{const{video:l,image:i,imageHref:c,imageOpacity:u,altImage:m,backgroundColor:h,position:p,contentAlignment:_,showTimer:g,contentOrder:C,timerMode:y,timerEnd:v,timerInit:N,textStructure:j,textStructureReduced:w}=e.banner,b=(c==null?void 0:c.trim())||(i==null?void 0:i.trim())||null,{nextimage:I}=x.useNextContext();return t.jsxs(d.Banner.Container,{...a,children:[t.jsxs(d.Banner.ImageWrapper,{className:Et["banner-image-wrapper-modifier"],style:u?{background:h}:void 0,children:[l&&t.jsx(J.Video,{videoRef:s,src:n,autoPlay:r,loop:!0,playsInline:!0,muted:!0}),b&&!(l!=null&&l.length)&&t.jsx(I,{src:b,width:"1920",height:"1080",alt:m??i??"",...r?{priority:r}:{},style:u?{opacity:"0"}:void 0}),!i&&!(l!=null&&l.length)&&t.jsx("div",{style:{background:h}})]}),g||w||j?t.jsx(d.Banner.Slot,{...Pa(p??"centro"),className:Et["content-modifier"],style:{textAlign:It(_)},children:t.jsxs(d.Utils.Column,{gap:"16px",alignItems:It(_),children:[g&&C==="timer-first"&&t.jsx(Ge,{mode:y??"default",size:"small",dateEnd:v?new Date(v):new Date,dateInit:N?new Date(N):new Date}),t.jsx(Nr,{data:e.banner,ICONS:o}),g&&C!=="timer-first"&&t.jsx(Ge,{mode:y??"default",size:"small",dateEnd:v?new Date(v):new Date,dateInit:N?new Date(N):new Date})]})}):t.jsx(t.Fragment,{})]})},mt=({data:e,className:n,priority:r,creative:s,...o})=>{const{handleSelectPromotionEvent:a,currentLocalRef:l}=x.useEventContext(),{banner:{promotion_name:i},index:c,componentIndex:u}=e,m=typeof c=="number"?`:${c+1}`:"",h={creative_name:s,creative_slot:`${s}-${l.current}:${u+1}${m}`,promotion_id:e.banner.href,promotion_name:i},p=f.useRef(null),_=f.useMemo(()=>{var C;if((C=e.banner.video)!=null&&C.includes("player.vimeo")){const y=e.banner.video.split("?")[1],v=y==null?void 0:y.split("&"),N=v==null?void 0:v.filter(w=>w.includes("loc")||w.includes("signature")||w.includes("user_id")),j=N==null?void 0:N.join("&");return`${e.banner.video.split("?")[0]}?${j}`}return e.banner.video},[e]),g=()=>{var C;(C=p.current)!=null&&C.paused&&p.current.play()};return t.jsx(Ae,{eventData:{functionKey:"readyEvents",data:{event:"view_promotion",readyData:{ecommerce:{...h,index:c}}}},observerOptions:{delay:100,..._&&{threshold:.1}},..._&&{callBackWhenVisible:g},children:e.banner.href?t.jsx(x.NextLink,{href:e.banner.href,onClick:()=>{a({updatePromotionRef:!0,promotion:h,index:c})},children:t.jsx(wt,{data:e,videoUrl:_,priority:r,videoRef:p,...o})}):t.jsx(wt,{data:e,videoUrl:_,priority:r,videoRef:p,...o})})},Ir=e=>t.jsx(mt,{...e}),He={"custom-carousel":"_custom-carousel_t5fgp_1","carrousel-arrows-display-controller":"_carrousel-arrows-display-controller_t5fgp_10","carousel-controllers-modifier":"_carousel-controllers-modifier_t5fgp_19"};function ka(e,n){const{mediatorRef:r}=x.useGlobalContext();f.useEffect(()=>r.current.subscribe(e,n),[e,n])}const Pt=({prevOnClick:e,nextOnClick:n,onBulletClick:r,currentPage:s,totalPages:o,position:a,hideControllers:l,left:i,isFirst:c,ICONS:u})=>{const[m,h]=f.useState("default");return ka("herobanner:change_controllers_variant",p=>{c&&h(p.includes("white")?"inverse":"default")}),t.jsxs(d.Carousel.Controller,{className:He["carousel-controllers-modifier"],position:a??"absolute","data-hide-controllers":l,bottom:"16px",top:"unset",left:i,children:[t.jsxs(d.Carousel.Arrows,{className:He["carrousel-arrows-display-controller"],children:[t.jsx(d.Button,{variant:"tertiary",onClick:e,adornment:{start:t.jsx(d.Icon,{name:u.arrow_left})},mode:m}),t.jsx(d.Button,{variant:"tertiary",onClick:n,adornment:{start:t.jsx(d.Icon,{name:u.arrow_right})},mode:m})]}),t.jsx(d.Carousel.Bullets,{page:s,total:o,onBulletClick:r,mode:m})]})},Aa=({children:e,data:n,banner:r,...s})=>{const{mediatorRef:o}=x.useGlobalContext();return n.data.first?t.jsx(Ae,{observerOptions:{threshold:.51},stopOnIntersection:!1,callBackWhenVisible:()=>{o.current.publish("header:change_variant",r.headerVariant)},...s,children:e}):t.jsx(t.Fragment,{children:e})},Ta=({data:e,ICONS:n})=>{var h;const{initialize:r,pagination:s,controller:o,itemsStyles:a}=d.Carousel.useCarousel({gap:e.data.config.gap,itemsPerPage:e.data.config.slidesPerView,direction:"row"}),l=f.useRef(void 0),i=f.useMemo(()=>Sr(e.data.config.controllerPosition??"dentro-inferior-centro"),[e]),c=f.useCallback(()=>{e.data.config.slideDuration&&s.totalPages>1&&(l.current=setInterval(()=>{o==null||o.nextPage()},e.data.config.slideDuration*1e3))},[o,e.data.config.slideDuration,s.totalPages]),u=f.useCallback(p=>{clearInterval(l.current),c(),p()},[c]),m=f.useMemo(()=>{var p;return{nextOnClick:()=>u(()=>o==null?void 0:o.nextPage()),prevOnClick:()=>u(()=>o==null?void 0:o.prevPage()),onBulletClick:_=>u(()=>o==null?void 0:o.navigateTo(_)),currentPage:s.currentPage,totalPages:s.totalPages,position:i.position,hideControllers:((p=e.data.config)==null?void 0:p.hideControllers)??!1,left:i.left}},[s.currentPage,s.totalPages,i.position,e.data.config.hideControllers,u,o]);return f.useEffect(()=>(c(),()=>clearInterval(l.current)),[c]),t.jsxs(d.Carousel.Root,{innerRef:p=>{r(p)},className:d.helpers.classNameConcat(He["custom-carousel"],e.data.config.fullWidth?"":"common-section"),"data-infinity-border":!0,style:{...e.data.config.marginTop!=="0px"&&{marginTop:`-${e.data.config.marginTop}`},...e.data.config.marginBottom!=="0px"&&{marginBottom:`-${e.data.config.marginBottom}`}},children:[i.shouldRender==="top"&&s.totalPages>1?t.jsx(Pt,{ICONS:n,...m,isFirst:e.data.first}):t.jsx(t.Fragment,{}),t.jsx(d.Carousel.Body,{children:(h=e==null?void 0:e.data)==null?void 0:h.banners.map((p,_)=>t.jsx(d.Carousel.Item,{style:a,children:t.jsx(Aa,{data:e,banner:p,children:t.jsx(mt,{ICONS:n,suppressContentEditableWarning:!0,suppressHydrationWarning:!0,data:{banner:p,index:_,componentIndex:e.data.componentIndex},creative:"banner-carousel",...e.data.first&&_===0&&{priority:!0}})})},`hero-banner-item-${_}`))}),i.shouldRender==="bottom"&&s.totalPages>1?t.jsx(Pt,{ICONS:n,...m}):t.jsx(t.Fragment,{})]})},Ma={Banner:Ir},pe={"row-controller-modifier":"_row-controller-modifier_co4wb_1","carousel-title-modifier":"_carousel-title-modifier_co4wb_18","carousel-modifier":"_carousel-modifier_co4wb_22","card-modifier":"_card-modifier_co4wb_26"},Ra=({data:e,CONSTANTS:n})=>{var u;const{isMobile:r}=x.useGlobalContext(),s=e.config.size??"medium",o=e.config.disableCarouselMobile??!1,{initialize:a,pagination:l,controller:i,itemsStyles:c}=d.Carousel.useCarousel({itemsPerPage:r?e==null?void 0:e.config.slidesPerViewMobile:(u=e==null?void 0:e.config)==null?void 0:u.slidesPerView,gap:r?e.config.gapMobile:e.config.gap,direction:r&&o?"column":"row"});return t.jsx(d.Utils.Column,{style:{width:s==="small"?"70%":"100%"},alignContent:"center",justifyContent:"center",alignItems:"center",children:t.jsxs(d.Carousel.Root,{innerRef:m=>{a(m)},className:d.helpers.classNameConcat(pe["carousel-modifier"],"common-section"),children:[s==="medium"?t.jsxs(d.TextStructure.Root,{children:[t.jsx(d.TextStructure.DivWrapper,{className:pe["carousel-title-modifier"],children:t.jsx("h2",{className:"typography-style-body-lg",children:n.BENNEFITS_BAR_TITLE})}),r&&l.totalPages>1?t.jsx(d.Carousel.Controller,{className:pe["row-controller-modifier"],children:t.jsxs(d.Carousel.Arrows,{children:[t.jsx(d.Button,{variant:"tertiary",onClick:()=>i==null?void 0:i.prevPage(),adornment:{start:t.jsx(d.Icon,{name:n.ICONS.arrow_left})}}),t.jsx(d.Button,{variant:"tertiary",onClick:()=>i==null?void 0:i.nextPage(),adornment:{start:t.jsx(d.Icon,{name:n.ICONS.arrow_right})}})]})}):t.jsx(t.Fragment,{})]}):t.jsx(t.Fragment,{}),t.jsx(d.Carousel.Body,{children:e.bennefit.map((m,h)=>t.jsx(d.Carousel.Item,{className:pe["card-modifier"],style:c,children:t.jsx(d.Card,{stroke:!0,padding:"small",children:t.jsx(d.TextStructure.Root,{layoutProps:{columnWrapper:{alignContent:"start",alignItems:"start",justifyContent:"start"},textRow:{alignContent:"center",alignItems:"center",justifyContent:"center"}},adornment:{[s==="medium"?"top":"start"]:t.jsx(d.Icon,{name:m.icon,size:s==="medium"?"medium":"small"})},children:t.jsxs(d.TextStructure.DivWrapper,{alignItems:"start",children:[t.jsx("h3",{className:"typography-style-body-md",children:m.title}),m.subtitle&&m.subtitle.length?t.jsx("p",{className:"typography-style-body-xs",children:m.subtitle}):t.jsx(t.Fragment,{})]})})})},`bennefit=${h}`))}),!r&&l.totalPages>1?t.jsxs(d.Carousel.Controller,{className:pe["row-controller-modifier"],children:[t.jsxs(d.Carousel.Arrows,{children:[t.jsx(d.Button,{variant:"tertiary",onClick:()=>i==null?void 0:i.prevPage(),adornment:{start:t.jsx(d.Icon,{name:n.ICONS.arrow_left})}}),t.jsx(d.Button,{variant:"tertiary",onClick:()=>i==null?void 0:i.nextPage(),adornment:{start:t.jsx(d.Icon,{name:n.ICONS.arrow_right})}})]}),t.jsx(d.Carousel.Bullets,{page:l.currentPage,total:l.totalPages,onBulletClick:m=>i==null?void 0:i.navigateTo(m)})]}):t.jsx(t.Fragment,{})]})})},Oa=({data:e,ICONS:n})=>t.jsx("div",{className:d.helpers.classNameConcat(Ve.textContentSection),style:e.borderTop?{borderTop:"none"}:void 0,children:t.jsx(Nr,{data:e,ICONS:n})}),kt={"accordion-modifier":"_accordion-modifier_1we16_1","accordion-body-modifier":"_accordion-body-modifier_1we16_7"},La=({data:e,id:n,ICONS:r})=>{var a;const[s,o]=f.useState([]);return t.jsxs(d.Utils.Column,{gap:"var(--gap-vertical-sm)",children:[e.titleAccordion?t.jsx(d.TextStructure.Root,{children:t.jsx(d.TextStructure.DivWrapper,{children:t.jsx("h2",{className:d.helpers.classNameConcat("typography-style-heading-sm","common-section"),style:{fontWeight:500},children:e.titleAccordion})})}):t.jsx(t.Fragment,{}),(a=e.accordions)==null?void 0:a.map((l,i)=>t.jsxs(d.Accordion.Wrapper,{className:kt["accordion-modifier"],children:[t.jsx(d.Accordion.Header,{id:`${n}-text-accordion-${i}`,openIndicator:t.jsx(d.Icon,{name:r.arrow_down}),closeIndicator:t.jsx(d.Icon,{name:r.arrow_up}),startOpen:s.includes(i),onClick:()=>o(c=>c.includes(i)?c.filter(u=>u!==i):[...c,i]),children:t.jsx(d.TextStructure.Root,{children:t.jsxs(d.TextStructure.DivWrapper,{className:qe["draftjs-text-modifier"],children:[t.jsx("h3",{className:"typography-style-body-md-strong",children:l.title}),l.subtitle&&l.subtitle.length?t.jsx("h2",{children:l.subtitle}):t.jsx(t.Fragment,{})]})})}),t.jsx(d.Accordion.Body,{children:t.jsx(d.TextStructure.Root,{children:t.jsx(d.TextStructure.DivWrapper,{className:d.helpers.classNameConcat(kt["accordion-body-modifier"],qe["draftjs-text-modifier"]),children:t.jsx(Q.Editor,{editorKey:`${n}-editor-${i}`,blockRenderMap:we,editorState:l.text?Ee(JSON.parse(l.text)):Q.EditorState.createEmpty(),onChange:()=>null})})})})]},`${n}-accordion-${i}-${s.includes(i)}`))]})},Er=f.createContext({}),Da=({data:e,children:n,...r})=>{var g,C,y,v,N,j,w,b,I,k,D,F,M;const[s,o]=f.useState(!0),{initialize:a,controller:l,itemsStyles:i}=d.Carousel.useCarousel({gap:0,itemsPerPage:1}),c={slideTranstionTimer:(C=(g=e==null?void 0:e.staticConfig)==null?void 0:g.staticConfig)==null?void 0:C.slideTranstionTimer,showCarouselArrows:(v=(y=e==null?void 0:e.staticConfig)==null?void 0:y.staticConfig)==null?void 0:v.showCarouselArrows,hasCloseBtn:(j=(N=e==null?void 0:e.staticConfig)==null?void 0:N.staticConfig)==null?void 0:j.hasCloseBtn,backgroundColor:(b=(w=e==null?void 0:e.staticConfig)==null?void 0:w.staticConfig)==null?void 0:b.backgroundColor,textColorVariant:(k=(I=e==null?void 0:e.staticConfig)==null?void 0:I.staticConfig)==null?void 0:k.textColorVariant,content:((F=(D=e==null?void 0:e.content)==null?void 0:D.content)==null?void 0:F.items)??[]},u=(M=c.content)==null?void 0:M.filter(B=>!B.countDownEndDate||new Date(B.countDownEndDate)>new Date),m=u.length>1,h={...c.backgroundColor?{backgroundColor:c.backgroundColor}:{}},p=()=>{o(!1)},_=d.helpers.ValidateProp({fieldTypes:de.Mode,property:c.textColorVariant,fallback:"default"});return t.jsx(Er.Provider,{value:{isOpen:s,setIsOpen:o,hasCarousel:m,backgroundStyle:h,handleCloseTipbar:p,mode:_,slideTranstionTimer:c.slideTranstionTimer,showCarouselArrows:c.showCarouselArrows,hasCloseBtn:c.hasCloseBtn,slices:u,carouselProps:{initialize:a,controller:l,itemsStyles:i},...r},children:n})},ee=()=>f.useContext(Er),za=({dateEnd:e,...n})=>{const{CONSTANTS:{TIME_ZONE:r}}=ee();return t.jsx(Ge,{dateEnd:new Date(e),TIME_ZONE:r,...n})},Ba="_tipbar_bt3p0_1",$a="_tipbar__carousel_bt3p0_15",be={tipbar:Ba,tipbar__carousel:$a,"tipbar__close-btn":"_tipbar__close-btn_bt3p0_29","tipbar-item":"_tipbar-item_bt3p0_37","tipbar-item__coupon":"_tipbar-item__coupon_bt3p0_45"},Fa=({coupon:e,feedbackTitle:n,feedbackDescription:r,...s})=>{const{CONSTANTS:o}=ee(),{addCouponSeller:a,cartStore:l}=Z(),[i,c]=f.useState({status:!1,showSnackBar:!1}),[u,m]=f.useState(!1),[h,p]=f.useState(!1),_=async()=>{if(!l.items.length){p(!0);return}(await a(e,"coupon")).code===200?c({status:!0,showSnackBar:!0}):m(!0)};return f.useEffect(()=>{i.showSnackBar&&setTimeout(()=>{c(g=>({...g,showSnackBar:!1}))},o.TIPBAR_CONFIGS.snackbar_timeout)},[i.showSnackBar]),f.useEffect(()=>{u&&setTimeout(()=>{m(!1)},o.TIPBAR_CONFIGS.snackbar_timeout)},[u]),f.useEffect(()=>{h&&setTimeout(()=>{p(!1)},o.TIPBAR_CONFIGS.snackbar_timeout)},[h]),t.jsxs(t.Fragment,{children:[t.jsx(d.Button,{...s,onClick:_,disabled:i.status,className:be["tipbar-item__coupon"],children:i.status?`${o.TIPBAR_CONFIGS.coupon_applied_message}`:`${o.TIPBAR_CONFIGS.coupon_default_message}`}),i.showSnackBar&&(n||r)&&t.jsx(ge,{title:n,subtitle:r,Z_INDEX_WAR:o.Z_INDEX_WAR},`feedback-coupon-${e}`),u&&t.jsx(ge,{title:o.TIPBAR_CONFIGS.coupon_error_title,subtitle:o.TIPBAR_CONFIGS.coupon_error_message,Z_INDEX_WAR:o.Z_INDEX_WAR},`error-coupon-${e}`),h&&t.jsx(ge,{title:o.TIPBAR_CONFIGS.coupon_cart_empty_title,subtitle:o.TIPBAR_CONFIGS.coupon_cart_empty_message,Z_INDEX_WAR:o.Z_INDEX_WAR},`error-cart-empty-${e}`)]})},Ua=({title:e,description:n,style:r,mode:s,className:o})=>t.jsx(d.TextStructure.Root,{children:t.jsxs(d.TextStructure.DivWrapper,{mode:s,className:o,children:[e&&t.jsx("h3",{className:"typography-style-body-sm",style:r,children:e}),n&&t.jsx("p",{className:"typography-style-caption",style:r,children:n})]})}),qa=({coupon:e,...n})=>{const{CONSTANTS:r}=ee();return t.jsx(d.Copy,{...n,iconCopy:r.ICONS.copy,iconSuccess:r.ICONS.check,children:e})},Va=({staticZone:e,type:n,className:r,description:s,title:o})=>{const{mode:a}=ee();if(n==="countdown")return t.jsx(za,{dateEnd:e.countDownEndDate,size:"x-small",mode:a});if(n==="coupon"){const l=d.helpers.ValidateProp({fieldTypes:de.Mode,property:e.couponButtonMode,fallback:"default"}),i=d.helpers.ValidateProp({fieldTypes:de.VariantsExtended,property:e.couponButtonVariant,fallback:"primary"});return e.coupon?t.jsx(Fa,{coupon:e.coupon,mode:l,variant:i,feedbackTitle:e.couponFeedbackTitle,feedbackDescription:e.couponFeedbackDescription}):null}if(n==="copy"){const l=d.helpers.ValidateProp({fieldTypes:de.Mode,property:e.couponButtonMode,fallback:"default"});return e.coupon?t.jsx(qa,{coupon:e.coupon,mode:l}):null}return t.jsx(Ua,{title:o,description:s,mode:a,className:r})},At=({handleCloseTipbar:e,mode:n})=>{const{CONSTANTS:r}=ee();return t.jsx(d.Button,{title:"fechar tipbar",className:be["tipbar__close-btn"],onClick:e,variant:"tertiary",mode:n,adornment:{start:t.jsx(d.Icon,{name:r.ICONS.close})}})},Ga=({children:e,mode:n="default",showCarouselArrows:r=!0,slideTranstionTimer:s})=>{const{carouselProps:o,CONSTANTS:a}=ee(),l=f.useRef(null),i=(u,m)=>{var h,p;u.stopPropagation(),u.preventDefault(),m==="prev"?(h=o.controller)==null||h.prevPage():(p=o.controller)==null||p.nextPage(),l.current&&(clearInterval(l.current),c())},c=f.useCallback(()=>{if(s&&o.controller){const u=setInterval(()=>{var m;(m=o.controller)==null||m.nextPage()},s);l.current=u}},[s,o]);return f.useEffect(()=>(c(),()=>{l.current&&clearInterval(l.current)}),[s,c]),t.jsxs(d.Carousel.Root,{innerRef:u=>{o.initialize(u)},className:be.tipbar__carousel,style:{flexDirection:"row",alignItems:"center"},children:[r&&t.jsx(d.Button,{variant:"tertiary",mode:n,onClick:u=>i(u,"prev"),adornment:{start:t.jsx(d.Icon,{name:a.ICONS.arrow_left})}}),t.jsx(d.Carousel.Body,{children:e}),r&&t.jsx(d.Button,{variant:"tertiary",mode:n,onClick:u=>i(u,"next"),adornment:{start:t.jsx(d.Icon,{name:a.ICONS.arrow_right})}})]})},Ha=({children:e,className:n})=>{const{hasCarousel:r,mode:s,hasCloseBtn:o,backgroundStyle:a,showCarouselArrows:l,slideTranstionTimer:i,handleCloseTipbar:c}=ee(),u=r&&l;return t.jsx("div",{style:a,"data-hasclosebtn":o,className:d.helpers.classNameConcat(be.tipbar,n),children:r?t.jsxs(t.Fragment,{children:[t.jsx(Ga,{mode:s,showCarouselArrows:u,slideTranstionTimer:i,children:e}),o&&t.jsx(At,{handleCloseTipbar:c,showCarouselArrows:u,mode:s})]}):t.jsxs(t.Fragment,{children:[e,o&&t.jsx(At,{handleCloseTipbar:c,mode:s})]})})},Wa=({children:e,highlightFirstSection:n,...r})=>{const{hasCarousel:s,carouselProps:o}=ee(),a=t.jsx("div",{...r,className:be["tipbar-item"],children:e});return s?t.jsx(d.Carousel.Item,{style:o.itemsStyles,children:a}):a},wr=({className:e})=>{const{isOpen:n,slices:r}=ee();return r.length&&n?t.jsx(Ha,{children:r.map((s,o)=>{var a;return t.jsx(t.Fragment,{children:t.jsx(ve,{href:s.link,children:t.jsx(Wa,{highlightFirstSection:s.highlightFirstSection,"data-justifyhighlightedsection":s.horizontalAlignHighlightedSection?s.horizontalAlignHighlightedSection:"center",children:s&&((a=s==null?void 0:s.items)!=null&&a.length)?s.items.map((l,i)=>t.jsx(Va,{staticZone:s,type:l.type,title:l.title,description:l.description,className:e},`tipbar-slice-field-${i}`)):null})})},`tipbar-slice-${o}`)})}):null};wr.displayName="TipBar.Root";const We=({className:e,...n})=>t.jsx(Da,{...n,children:t.jsx(wr,{className:e})});We.displayName="TipBar";const Ka=({CONSTANTS:e,data:n})=>{const{tipbarRef:r}=L(),s=n==null?void 0:n.find(a=>{var l,i;return((i=(l=a.staticConfig)==null?void 0:l.staticConfig)==null?void 0:i.deviceType)==="desktop"}),o=n==null?void 0:n.find(a=>{var l,i;return((i=(l=a.staticConfig)==null?void 0:l.staticConfig)==null?void 0:i.deviceType)==="mobile"});return t.jsxs("div",{ref:r,className:x.responsive["responsive-flex"],children:[o?t.jsx("div",{className:x.responsive["responsive-mobile-flex"],children:t.jsx(We,{data:o,CONSTANTS:e})}):null,s?t.jsx("div",{className:x.responsive["responsive-desktop-flex"],children:t.jsx(We,{data:s,CONSTANTS:e})}):null]})},Tt={"card-image-wrapper":"_card-image-wrapper_10mul_1","card-image-container":"_card-image-container_10mul_9"},Xa=e=>{const{nextimage:n}=x.useNextContext();return t.jsx(t.Fragment,{children:e.data.banners.map((r,s)=>t.jsx("div",{className:Tt["card-image-wrapper"],children:t.jsx("div",{className:Tt["card-image-container"],children:t.jsx(n,{src:r.image,alt:r.altImage?r.altImage:"Banner Coleção",width:500,height:600})})},s))})},Ya={Banner:Ma,BannerSection:mt,BennefitsBarSection:Ra,SingleBannerSection:Ir,TextContentSection:Oa,BannerCarousel:Ta,TextAccordionSection:La,TipbarScreening:Ka,ImageGrid:Xa,PLPContentProvider:x.PLPContentProvider},Qa={Components:Ya,helpers:Na};exports.cms=Qa;exports.contexts=Es;exports.data=at;exports.layout=xa;exports.scripts=va;
41
+ `},li=Object.freeze(Object.defineProperty({__proto__:null,generateMiddleware:ci},Symbol.toStringTag,{value:"Module"})),ui={helpers:li},di=(e,t,r)=>{e.findEntityRanges(o=>{const s=o.getEntity();return s===null?!1:r.getEntity(s).getType()==="LINK"},t)},Ae=e=>{const t=new J.CompositeDecorator([{strategy:di,component:Hr}]),r=J.convertFromRaw(e);return J.EditorState.createWithContent(r,t)},fi=e=>J.convertFromRaw(e),Te=J.DefaultDraftBlockRenderMap.set("unstyled",{element:"div",aliasedElements:["div"]}),qt="superior-direita",Ee="dentro-inferior-centro",mi="inferior-direita",Ue="dentro-inferior-esquerda",Zr=e=>({position:e===Ee||e===Ue?"absolute":"default",shouldRender:[qt,Ee,Ue].includes(e)?"top":"bottom",alignItems:[Ee].includes(e)?"center":[qt,mi].includes(e)?"flex-end":"flex-start",left:e===Ue?"16px":e===Ee?"45%":"unset"}),pi=Object.freeze(Object.defineProperty({__proto__:null,CREATE_CONTENT:Ae,EXTENDED_BLOCK_RENDER_MAP:Te,GET_CONTENT_STATE:fi,controllersPositionsAdapter:Zr},Symbol.toStringTag,{value:"Module"})),le=e=>({centro:"center",esquerda:"start",direita:"end"})[e],hi=({expanded:e,content:t})=>n.jsxs("details",{open:e,children:[t.textStructureReduced?n.jsx("summary",{onClick:r=>r.preventDefault(),children:n.jsx(J.Editor,{editorKey:"draft-editor-1",blockRenderMap:Te,editorState:t!=null&&t.textStructureReduced?Ae(JSON.parse(t.textStructureReduced)):J.EditorState.createEmpty(),onChange:()=>null,readOnly:!0})}):n.jsx(n.Fragment,{}),t.showTextStructureExpander&&t.textStructure?n.jsx(n.Fragment,{children:n.jsx(J.Editor,{editorKey:"draft-editor-1",blockRenderMap:Te,editorState:t.textStructure?Ae(JSON.parse(t.textStructure)):J.EditorState.createEmpty(),onChange:()=>null,readOnly:!0})}):n.jsx(n.Fragment,{})]}),nt={"draftjs-text-modifier":"_draftjs-text-modifier_1itwm_2"},gi="_textContentWrapper_1bigo_5",_i="_textContentSection_1bigo_13",rt={"link-modifier":"_link-modifier_1bigo_1",textContentWrapper:gi,textContentSection:_i},eo=({data:e,ICONS:t})=>{var s;const[r,o]=h.useState(!1);return n.jsx(u.TextStructure.Root,{layoutProps:{textRow:{alignContent:le(e.textStructureAlignment),alignItems:le(e.textStructureAlignment)},columnWrapper:{alignContent:le(e.textStructureAlignment),alignItems:le(e.textStructureAlignment)}},adornment:{bottom:e.showTextStructureExpander&&e.textStructure?n.jsx(u.Button,{variant:"tertiary",adornment:{end:n.jsx(u.Icon,{name:r?`${t.arrow_up}`:`${t.arrow_down}`})},onClick:()=>o(a=>!a),size:"small",children:r?"Ver Menos":"Ver Mais"}):n.jsx(n.Fragment,{})},children:n.jsxs(u.Utils.Column,{className:rt.textContentWrapper,style:{alignItems:le(e.textStructureAlignment)},children:[n.jsx(u.TextStructure.DivWrapper,{style:{textAlign:le(e.textStructureAlignment)},mode:e.textStructureMode??"default",className:nt["draftjs-text-modifier"],children:e.textStructureReduced?n.jsx(hi,{content:e,expanded:r}):n.jsx(n.Fragment,{})}),e.textStructureButtonLabel?n.jsx(ne,{mode:e.textStructureMode??"default",href:e.textStructureButtonHref??"#",size:e.textStructureButtonSize,className:rt["link-modifier"],adornments:(s=e.textStructureButtonIcon)!=null&&s.length&&e.enableIcon?{end:n.jsx(u.Icon,{name:e.textStructureButtonIcon})}:void 0,children:e.textStructureButtonLabel}):n.jsx(n.Fragment,{})]})})},xi=e=>({centro:{verticalAlignment:"center",horizontalAlignment:"center"},"centro-esquerda":{verticalAlignment:"center",horizontalAlignment:"start"},"centro-direita":{verticalAlignment:"center",horizontalAlignment:"end"},"superior-centro":{verticalAlignment:"start",horizontalAlignment:"center"},"superior-esquerda":{verticalAlignment:"start",horizontalAlignment:"start"},"superior-direita":{verticalAlignment:"start",horizontalAlignment:"end"},"inferior-centro":{verticalAlignment:"end",horizontalAlignment:"center"},"inferior-esquerda":{verticalAlignment:"end",horizontalAlignment:"start"},"inferior-direita":{verticalAlignment:"end",horizontalAlignment:"end"}})[e],Vt=e=>({centro:"center",esquerda:"start",direita:"end"})[e],ot=({dateEnd:e,dateInit:t,TIME_ZONE:r="America/Sao_Paulo",...o})=>{const[s,a]=h.useState($n(new kt.TZDate(Date.now(),r),new kt.TZDate(e,r))),[i,c]=h.useState(!1);h.useEffect(()=>{i||c(!0);const d=setInterval(()=>{if(s<=0){clearInterval(d);return}a(s-1e3)},1e3);return()=>{clearInterval(d)}},[s,a,i]);const l=pe(s,"days");return i&&s>0?n.jsxs(u.Timer.Root,{...o,children:[l?n.jsxs(n.Fragment,{children:[n.jsx(u.Timer.Digit,{label:"dias",value:l}),n.jsx(u.Timer.Separator,{})]}):null,n.jsx(u.Timer.Digit,{label:"horas",value:pe(s,"hours")}),n.jsx(u.Timer.Separator,{}),n.jsx(u.Timer.Digit,{label:"min",value:pe(s,"minutes")}),n.jsx(u.Timer.Separator,{}),n.jsx(u.Timer.Digit,{label:"segs",value:pe(s),suppressHydrationWarning:!0})]}):n.jsx(n.Fragment,{})},Ht={"content-modifier":"_content-modifier_16y4u_5","banner-image-wrapper-modifier":"_banner-image-wrapper-modifier_16y4u_13"},Gt=({data:e,videoUrl:t,priority:r,videoRef:o,ICONS:s,...a})=>{const{video:i,image:c,imageHref:l,imageOpacity:d,altImage:m,backgroundColor:p,position:f,contentAlignment:_,showTimer:g,contentOrder:x,timerMode:v,timerEnd:C,timerInit:E,textStructure:S,textStructureReduced:A}=e.banner,I=(l==null?void 0:l.trim())||(c==null?void 0:c.trim())||null,{nextimage:j}=y.useNextContext();return n.jsxs(u.Banner.Container,{...a,children:[n.jsxs(u.Banner.ImageWrapper,{className:Ht["banner-image-wrapper-modifier"],style:d?{background:p}:void 0,children:[i&&n.jsx(Q.Video,{videoRef:o,src:t,autoPlay:r,loop:!0,playsInline:!0,muted:!0}),I&&!(i!=null&&i.length)&&n.jsx(j,{src:I,width:"1920",height:"1080",alt:m??c??"",...r?{priority:r}:{},style:d?{opacity:"0"}:void 0}),!c&&!(i!=null&&i.length)&&n.jsx("div",{style:{background:p}})]}),g||A||S?n.jsx(u.Banner.Slot,{...xi(f??"centro"),className:Ht["content-modifier"],style:{textAlign:Vt(_)},children:n.jsxs(u.Utils.Column,{gap:"16px",alignItems:Vt(_),children:[g&&x==="timer-first"&&n.jsx(ot,{mode:v??"default",size:"small",dateEnd:C?new Date(C):new Date,dateInit:E?new Date(E):new Date}),n.jsx(eo,{data:e.banner,ICONS:s}),g&&x!=="timer-first"&&n.jsx(ot,{mode:v??"default",size:"small",dateEnd:C?new Date(C):new Date,dateInit:E?new Date(E):new Date})]})}):n.jsx(n.Fragment,{})]})},Pt=({data:e,className:t,priority:r,creative:o,...s})=>{const{handleSelectPromotionEvent:a,currentLocalRef:i}=y.useEventContext(),{banner:{promotion_name:c},index:l,componentIndex:d}=e,m=typeof l=="number"?`:${l+1}`:"",p={creative_name:o,creative_slot:`${o}-${i.current}:${d+1}${m}`,promotion_id:e.banner.href,promotion_name:c},f=h.useRef(null),_=h.useMemo(()=>{var x;if((x=e.banner.video)!=null&&x.includes("player.vimeo")){const v=e.banner.video.split("?")[1],C=v==null?void 0:v.split("&"),E=C==null?void 0:C.filter(A=>A.includes("loc")||A.includes("signature")||A.includes("user_id")),S=E==null?void 0:E.join("&");return`${e.banner.video.split("?")[0]}?${S}`}return e.banner.video},[e]),g=()=>{var x;(x=f.current)!=null&&x.paused&&f.current.play()};return n.jsx(Oe,{eventData:{functionKey:"readyEvents",data:{event:"view_promotion",readyData:{ecommerce:{...p,index:l}}}},observerOptions:{delay:100,..._&&{threshold:.1}},..._&&{callBackWhenVisible:g},children:e.banner.href?n.jsx(y.NextLink,{href:e.banner.href,onClick:()=>{a({updatePromotionRef:!0,promotion:p,index:l})},children:n.jsx(Gt,{data:e,videoUrl:_,priority:r,videoRef:f,...s})}):n.jsx(Gt,{data:e,videoUrl:_,priority:r,videoRef:f,...s})})},to=e=>n.jsx(Pt,{...e}),st={"custom-carousel":"_custom-carousel_t5fgp_1","carrousel-arrows-display-controller":"_carrousel-arrows-display-controller_t5fgp_10","carousel-controllers-modifier":"_carousel-controllers-modifier_t5fgp_19"};function yi(e,t){const{mediatorRef:r}=y.useGlobalContext();h.useEffect(()=>r.current.subscribe(e,t),[e,t])}const Wt=({prevOnClick:e,nextOnClick:t,onBulletClick:r,currentPage:o,totalPages:s,position:a,hideControllers:i,left:c,isFirst:l,ICONS:d})=>{const[m,p]=h.useState("default");return yi("herobanner:change_controllers_variant",f=>{l&&p(f.includes("white")?"inverse":"default")}),n.jsxs(u.Carousel.Controller,{className:st["carousel-controllers-modifier"],position:a??"absolute","data-hide-controllers":i,bottom:"16px",top:"unset",left:c,children:[n.jsxs(u.Carousel.Arrows,{className:st["carrousel-arrows-display-controller"],children:[n.jsx(u.Button,{variant:"tertiary",onClick:e,adornment:{start:n.jsx(u.Icon,{name:d.arrow_left})},mode:m}),n.jsx(u.Button,{variant:"tertiary",onClick:t,adornment:{start:n.jsx(u.Icon,{name:d.arrow_right})},mode:m})]}),n.jsx(u.Carousel.Bullets,{page:o,total:s,onBulletClick:r,mode:m})]})},vi=({children:e,data:t,banner:r,...o})=>{const{mediatorRef:s}=y.useGlobalContext();return t.data.first?n.jsx(Oe,{observerOptions:{threshold:.51},stopOnIntersection:!1,callBackWhenVisible:()=>{s.current.publish("header:change_variant",r.headerVariant)},...o,children:e}):n.jsx(n.Fragment,{children:e})},Ci=({data:e,ICONS:t})=>{var p;const{initialize:r,pagination:o,controller:s,itemsStyles:a}=u.Carousel.useCarousel({gap:e.data.config.gap,itemsPerPage:e.data.config.slidesPerView,direction:"row"}),i=h.useRef(void 0),c=h.useMemo(()=>Zr(e.data.config.controllerPosition??"dentro-inferior-centro"),[e]),l=h.useCallback(()=>{e.data.config.slideDuration&&o.totalPages>1&&(i.current=setInterval(()=>{s==null||s.nextPage()},e.data.config.slideDuration*1e3))},[s,e.data.config.slideDuration,o.totalPages]),d=h.useCallback(f=>{clearInterval(i.current),l(),f()},[l]),m=h.useMemo(()=>{var f;return{nextOnClick:()=>d(()=>s==null?void 0:s.nextPage()),prevOnClick:()=>d(()=>s==null?void 0:s.prevPage()),onBulletClick:_=>d(()=>s==null?void 0:s.navigateTo(_)),currentPage:o.currentPage,totalPages:o.totalPages,position:c.position,hideControllers:((f=e.data.config)==null?void 0:f.hideControllers)??!1,left:c.left}},[o.currentPage,o.totalPages,c.position,e.data.config.hideControllers,d,s]);return h.useEffect(()=>(l(),()=>clearInterval(i.current)),[l]),n.jsxs(u.Carousel.Root,{innerRef:f=>{r(f)},className:u.helpers.classNameConcat(st["custom-carousel"],e.data.config.fullWidth?"":"common-section"),"data-infinity-border":!0,style:{...e.data.config.marginTop!=="0px"&&{marginTop:`-${e.data.config.marginTop}`},...e.data.config.marginBottom!=="0px"&&{marginBottom:`-${e.data.config.marginBottom}`}},children:[c.shouldRender==="top"&&o.totalPages>1?n.jsx(Wt,{ICONS:t,...m,isFirst:e.data.first}):n.jsx(n.Fragment,{}),n.jsx(u.Carousel.Body,{children:(p=e==null?void 0:e.data)==null?void 0:p.banners.map((f,_)=>n.jsx(u.Carousel.Item,{style:a,children:n.jsx(vi,{data:e,banner:f,children:n.jsx(Pt,{ICONS:t,suppressContentEditableWarning:!0,suppressHydrationWarning:!0,data:{banner:f,index:_,componentIndex:e.data.componentIndex},creative:"banner-carousel",...e.data.first&&_===0&&{priority:!0}})})},`hero-banner-item-${_}`))}),c.shouldRender==="bottom"&&o.totalPages>1?n.jsx(Wt,{ICONS:t,...m}):n.jsx(n.Fragment,{})]})},bi={Banner:to},me={"row-controller-modifier":"_row-controller-modifier_co4wb_1","carousel-title-modifier":"_carousel-title-modifier_co4wb_18","carousel-modifier":"_carousel-modifier_co4wb_22","card-modifier":"_card-modifier_co4wb_26"},ji=({data:e,CONSTANTS:t})=>{var d;const{isMobile:r}=y.useGlobalContext(),o=e.config.size??"medium",s=e.config.disableCarouselMobile??!1,{initialize:a,pagination:i,controller:c,itemsStyles:l}=u.Carousel.useCarousel({itemsPerPage:r?e==null?void 0:e.config.slidesPerViewMobile:(d=e==null?void 0:e.config)==null?void 0:d.slidesPerView,gap:r?e.config.gapMobile:e.config.gap,direction:r&&s?"column":"row"});return n.jsx(u.Utils.Column,{style:{width:o==="small"?"70%":"100%"},alignContent:"center",justifyContent:"center",alignItems:"center",children:n.jsxs(u.Carousel.Root,{innerRef:m=>{a(m)},className:u.helpers.classNameConcat(me["carousel-modifier"],"common-section"),children:[o==="medium"?n.jsxs(u.TextStructure.Root,{children:[n.jsx(u.TextStructure.DivWrapper,{className:me["carousel-title-modifier"],children:n.jsx("h2",{className:"typography-style-body-lg",children:t.BENNEFITS_BAR_TITLE})}),r&&i.totalPages>1?n.jsx(u.Carousel.Controller,{className:me["row-controller-modifier"],children:n.jsxs(u.Carousel.Arrows,{children:[n.jsx(u.Button,{variant:"tertiary",onClick:()=>c==null?void 0:c.prevPage(),adornment:{start:n.jsx(u.Icon,{name:t.ICONS.arrow_left})}}),n.jsx(u.Button,{variant:"tertiary",onClick:()=>c==null?void 0:c.nextPage(),adornment:{start:n.jsx(u.Icon,{name:t.ICONS.arrow_right})}})]})}):n.jsx(n.Fragment,{})]}):n.jsx(n.Fragment,{}),n.jsx(u.Carousel.Body,{children:e.bennefit.map((m,p)=>n.jsx(u.Carousel.Item,{className:me["card-modifier"],style:l,children:n.jsx(u.Card,{stroke:!0,padding:"small",children:n.jsx(u.TextStructure.Root,{layoutProps:{columnWrapper:{alignContent:"start",alignItems:"start",justifyContent:"start"},textRow:{alignContent:"center",alignItems:"center",justifyContent:"center"}},adornment:{[o==="medium"?"top":"start"]:n.jsx(u.Icon,{name:m.icon,size:o==="medium"?"medium":"small"})},children:n.jsxs(u.TextStructure.DivWrapper,{alignItems:"start",children:[n.jsx("h3",{className:"typography-style-body-md",children:m.title}),m.subtitle&&m.subtitle.length?n.jsx("p",{className:"typography-style-body-xs",children:m.subtitle}):n.jsx(n.Fragment,{})]})})})},`bennefit=${p}`))}),!r&&i.totalPages>1?n.jsxs(u.Carousel.Controller,{className:me["row-controller-modifier"],children:[n.jsxs(u.Carousel.Arrows,{children:[n.jsx(u.Button,{variant:"tertiary",onClick:()=>c==null?void 0:c.prevPage(),adornment:{start:n.jsx(u.Icon,{name:t.ICONS.arrow_left})}}),n.jsx(u.Button,{variant:"tertiary",onClick:()=>c==null?void 0:c.nextPage(),adornment:{start:n.jsx(u.Icon,{name:t.ICONS.arrow_right})}})]}),n.jsx(u.Carousel.Bullets,{page:i.currentPage,total:i.totalPages,onBulletClick:m=>c==null?void 0:c.navigateTo(m)})]}):n.jsx(n.Fragment,{})]})})},Si=({data:e,ICONS:t})=>n.jsx("div",{className:u.helpers.classNameConcat(rt.textContentSection),style:e.borderTop?{borderTop:"none"}:void 0,children:n.jsx(eo,{data:e,ICONS:t})}),Kt={"accordion-modifier":"_accordion-modifier_1we16_1","accordion-body-modifier":"_accordion-body-modifier_1we16_7"},Ni=({data:e,id:t,ICONS:r})=>{var a;const[o,s]=h.useState([]);return n.jsxs(u.Utils.Column,{gap:"var(--gap-vertical-sm)",children:[e.titleAccordion?n.jsx(u.TextStructure.Root,{children:n.jsx(u.TextStructure.DivWrapper,{children:n.jsx("h2",{className:u.helpers.classNameConcat("typography-style-heading-sm","common-section"),style:{fontWeight:500},children:e.titleAccordion})})}):n.jsx(n.Fragment,{}),(a=e.accordions)==null?void 0:a.map((i,c)=>n.jsxs(u.Accordion.Wrapper,{className:Kt["accordion-modifier"],children:[n.jsx(u.Accordion.Header,{id:`${t}-text-accordion-${c}`,openIndicator:n.jsx(u.Icon,{name:r.arrow_down}),closeIndicator:n.jsx(u.Icon,{name:r.arrow_up}),startOpen:o.includes(c),onClick:()=>s(l=>l.includes(c)?l.filter(d=>d!==c):[...l,c]),children:n.jsx(u.TextStructure.Root,{children:n.jsxs(u.TextStructure.DivWrapper,{className:nt["draftjs-text-modifier"],children:[n.jsx("h3",{className:"typography-style-body-md-strong",children:i.title}),i.subtitle&&i.subtitle.length?n.jsx("h2",{children:i.subtitle}):n.jsx(n.Fragment,{})]})})}),n.jsx(u.Accordion.Body,{children:n.jsx(u.TextStructure.Root,{children:n.jsx(u.TextStructure.DivWrapper,{className:u.helpers.classNameConcat(Kt["accordion-body-modifier"],nt["draftjs-text-modifier"]),children:n.jsx(J.Editor,{editorKey:`${t}-editor-${c}`,blockRenderMap:Te,editorState:i.text?Ae(JSON.parse(i.text)):J.EditorState.createEmpty(),onChange:()=>null})})})})]},`${t}-accordion-${c}-${o.includes(c)}`))]})},no=h.createContext({}),Ii=({data:e,children:t,...r})=>{var g,x,v,C,E,S,A,I,j,b,R,D,k;const[o,s]=h.useState(!0),{initialize:a,controller:i,itemsStyles:c}=u.Carousel.useCarousel({gap:0,itemsPerPage:1}),l={slideTranstionTimer:(x=(g=e==null?void 0:e.staticConfig)==null?void 0:g.staticConfig)==null?void 0:x.slideTranstionTimer,showCarouselArrows:(C=(v=e==null?void 0:e.staticConfig)==null?void 0:v.staticConfig)==null?void 0:C.showCarouselArrows,hasCloseBtn:(S=(E=e==null?void 0:e.staticConfig)==null?void 0:E.staticConfig)==null?void 0:S.hasCloseBtn,backgroundColor:(I=(A=e==null?void 0:e.staticConfig)==null?void 0:A.staticConfig)==null?void 0:I.backgroundColor,textColorVariant:(b=(j=e==null?void 0:e.staticConfig)==null?void 0:j.staticConfig)==null?void 0:b.textColorVariant,content:((D=(R=e==null?void 0:e.content)==null?void 0:R.content)==null?void 0:D.items)??[]},d=(k=l.content)==null?void 0:k.filter(z=>!z.countDownEndDate||new Date(z.countDownEndDate)>new Date),m=d.length>1,p={...l.backgroundColor?{backgroundColor:l.backgroundColor}:{}},f=()=>{s(!1)},_=u.helpers.ValidateProp({fieldTypes:ue.Mode,property:l.textColorVariant,fallback:"default"});return n.jsx(no.Provider,{value:{isOpen:o,setIsOpen:s,hasCarousel:m,backgroundStyle:p,handleCloseTipbar:f,mode:_,slideTranstionTimer:l.slideTranstionTimer,showCarouselArrows:l.showCarouselArrows,hasCloseBtn:l.hasCloseBtn,slices:d,carouselProps:{initialize:a,controller:i,itemsStyles:c},...r},children:t})},ee=()=>h.useContext(no),Ei=({dateEnd:e,...t})=>{const{CONSTANTS:{TIME_ZONE:r}}=ee();return n.jsx(ot,{dateEnd:new Date(e),TIME_ZONE:r,...t})},Pi="_tipbar_bt3p0_1",wi="_tipbar__carousel_bt3p0_15",be={tipbar:Pi,tipbar__carousel:wi,"tipbar__close-btn":"_tipbar__close-btn_bt3p0_29","tipbar-item":"_tipbar-item_bt3p0_37","tipbar-item__coupon":"_tipbar-item__coupon_bt3p0_45"},ki=({coupon:e,feedbackTitle:t,feedbackDescription:r,...o})=>{const{CONSTANTS:s}=ee(),{addCouponSeller:a,cartStore:i}=Z(),[c,l]=h.useState({status:!1,showSnackBar:!1}),[d,m]=h.useState(!1),[p,f]=h.useState(!1),_=async()=>{if(!i.items.length){f(!0);return}(await a(e,"coupon")).code===200?l({status:!0,showSnackBar:!0}):m(!0)};return h.useEffect(()=>{c.showSnackBar&&setTimeout(()=>{l(g=>({...g,showSnackBar:!1}))},s.TIPBAR_CONFIGS.snackbar_timeout)},[c.showSnackBar]),h.useEffect(()=>{d&&setTimeout(()=>{m(!1)},s.TIPBAR_CONFIGS.snackbar_timeout)},[d]),h.useEffect(()=>{p&&setTimeout(()=>{f(!1)},s.TIPBAR_CONFIGS.snackbar_timeout)},[p]),n.jsxs(n.Fragment,{children:[n.jsx(u.Button,{...o,onClick:_,disabled:c.status,className:be["tipbar-item__coupon"],children:c.status?`${s.TIPBAR_CONFIGS.coupon_applied_message}`:`${s.TIPBAR_CONFIGS.coupon_default_message}`}),c.showSnackBar&&(t||r)&&n.jsx(ge,{title:t,subtitle:r,Z_INDEX_WAR:s.Z_INDEX_WAR},`feedback-coupon-${e}`),d&&n.jsx(ge,{title:s.TIPBAR_CONFIGS.coupon_error_title,subtitle:s.TIPBAR_CONFIGS.coupon_error_message,Z_INDEX_WAR:s.Z_INDEX_WAR},`error-coupon-${e}`),p&&n.jsx(ge,{title:s.TIPBAR_CONFIGS.coupon_cart_empty_title,subtitle:s.TIPBAR_CONFIGS.coupon_cart_empty_message,Z_INDEX_WAR:s.Z_INDEX_WAR},`error-cart-empty-${e}`)]})},Ai=({title:e,description:t,style:r,mode:o,className:s})=>n.jsx(u.TextStructure.Root,{children:n.jsxs(u.TextStructure.DivWrapper,{mode:o,className:s,children:[e&&n.jsx("h3",{className:"typography-style-body-sm",style:r,children:e}),t&&n.jsx("p",{className:"typography-style-caption",style:r,children:t})]})}),Ti=({coupon:e,...t})=>{const{CONSTANTS:r}=ee();return n.jsx(u.Copy,{...t,iconCopy:r.ICONS.copy,iconSuccess:r.ICONS.check,children:e})},Mi=({staticZone:e,type:t,className:r,description:o,title:s})=>{const{mode:a}=ee();if(t==="countdown")return n.jsx(Ei,{dateEnd:e.countDownEndDate,size:"x-small",mode:a});if(t==="coupon"){const i=u.helpers.ValidateProp({fieldTypes:ue.Mode,property:e.couponButtonMode,fallback:"default"}),c=u.helpers.ValidateProp({fieldTypes:ue.VariantsExtended,property:e.couponButtonVariant,fallback:"primary"});return e.coupon?n.jsx(ki,{coupon:e.coupon,mode:i,variant:c,feedbackTitle:e.couponFeedbackTitle,feedbackDescription:e.couponFeedbackDescription}):null}if(t==="copy"){const i=u.helpers.ValidateProp({fieldTypes:ue.Mode,property:e.couponButtonMode,fallback:"default"});return e.coupon?n.jsx(Ti,{coupon:e.coupon,mode:i}):null}return n.jsx(Ai,{title:s,description:o,mode:a,className:r})},Xt=({handleCloseTipbar:e,mode:t})=>{const{CONSTANTS:r}=ee();return n.jsx(u.Button,{title:"fechar tipbar",className:be["tipbar__close-btn"],onClick:e,variant:"tertiary",mode:t,adornment:{start:n.jsx(u.Icon,{name:r.ICONS.close})}})},Ri=({children:e,mode:t="default",showCarouselArrows:r=!0,slideTranstionTimer:o})=>{const{carouselProps:s,CONSTANTS:a}=ee(),i=h.useRef(null),c=(d,m)=>{var p,f;d.stopPropagation(),d.preventDefault(),m==="prev"?(p=s.controller)==null||p.prevPage():(f=s.controller)==null||f.nextPage(),i.current&&(clearInterval(i.current),l())},l=h.useCallback(()=>{if(o&&s.controller){const d=setInterval(()=>{var m;(m=s.controller)==null||m.nextPage()},o);i.current=d}},[o,s]);return h.useEffect(()=>(l(),()=>{i.current&&clearInterval(i.current)}),[o,l]),n.jsxs(u.Carousel.Root,{innerRef:d=>{s.initialize(d)},className:be.tipbar__carousel,style:{flexDirection:"row",alignItems:"center"},children:[r&&n.jsx(u.Button,{variant:"tertiary",mode:t,onClick:d=>c(d,"prev"),adornment:{start:n.jsx(u.Icon,{name:a.ICONS.arrow_left})}}),n.jsx(u.Carousel.Body,{children:e}),r&&n.jsx(u.Button,{variant:"tertiary",mode:t,onClick:d=>c(d,"next"),adornment:{start:n.jsx(u.Icon,{name:a.ICONS.arrow_right})}})]})},Oi=({children:e,className:t})=>{const{hasCarousel:r,mode:o,hasCloseBtn:s,backgroundStyle:a,showCarouselArrows:i,slideTranstionTimer:c,handleCloseTipbar:l}=ee(),d=r&&i;return n.jsx("div",{style:a,"data-hasclosebtn":s,className:u.helpers.classNameConcat(be.tipbar,t),children:r?n.jsxs(n.Fragment,{children:[n.jsx(Ri,{mode:o,showCarouselArrows:d,slideTranstionTimer:c,children:e}),s&&n.jsx(Xt,{handleCloseTipbar:l,showCarouselArrows:d,mode:o})]}):n.jsxs(n.Fragment,{children:[e,s&&n.jsx(Xt,{handleCloseTipbar:l,mode:o})]})})},Li=({children:e,highlightFirstSection:t,...r})=>{const{hasCarousel:o,carouselProps:s}=ee(),a=n.jsx("div",{...r,className:be["tipbar-item"],children:e});return o?n.jsx(u.Carousel.Item,{style:s.itemsStyles,children:a}):a},ro=({className:e})=>{const{isOpen:t,slices:r}=ee();return r.length&&t?n.jsx(Oi,{children:r.map((o,s)=>{var a;return n.jsx(n.Fragment,{children:n.jsx(Ce,{href:o.link,children:n.jsx(Li,{highlightFirstSection:o.highlightFirstSection,"data-justifyhighlightedsection":o.horizontalAlignHighlightedSection?o.horizontalAlignHighlightedSection:"center",children:o&&((a=o==null?void 0:o.items)!=null&&a.length)?o.items.map((i,c)=>n.jsx(Mi,{staticZone:o,type:i.type,title:i.title,description:i.description,className:e},`tipbar-slice-field-${c}`)):null})})},`tipbar-slice-${s}`)})}):null};ro.displayName="TipBar.Root";const at=({className:e,...t})=>n.jsx(Ii,{...t,children:n.jsx(ro,{className:e})});at.displayName="TipBar";const Di=({CONSTANTS:e,data:t})=>{const{tipbarRef:r}=F(),o=t==null?void 0:t.find(a=>{var i,c;return((c=(i=a.staticConfig)==null?void 0:i.staticConfig)==null?void 0:c.deviceType)==="desktop"}),s=t==null?void 0:t.find(a=>{var i,c;return((c=(i=a.staticConfig)==null?void 0:i.staticConfig)==null?void 0:c.deviceType)==="mobile"});return n.jsxs("div",{ref:r,className:y.responsive["responsive-flex"],children:[s?n.jsx("div",{className:y.responsive["responsive-mobile-flex"],children:n.jsx(at,{data:s,CONSTANTS:e})}):null,o?n.jsx("div",{className:y.responsive["responsive-desktop-flex"],children:n.jsx(at,{data:o,CONSTANTS:e})}):null]})},Yt={"card-image-wrapper":"_card-image-wrapper_10mul_1","card-image-container":"_card-image-container_10mul_9"},zi=e=>{const{nextimage:t}=y.useNextContext();return n.jsx(n.Fragment,{children:e.data.banners.map((r,o)=>n.jsx("div",{className:Yt["card-image-wrapper"],children:n.jsx("div",{className:Yt["card-image-container"],children:n.jsx(t,{src:r.image,alt:r.altImage?r.altImage:"Banner Coleção",width:500,height:600})})},o))})},Bi={Banner:bi,BannerSection:Pt,BennefitsBarSection:ji,SingleBannerSection:to,TextContentSection:Si,BannerCarousel:Ci,TextAccordionSection:Ni,TipbarScreening:Di,ImageGrid:zi,PLPContentProvider:y.PLPContentProvider},$i={Components:Bi,helpers:pi};exports.cms=$i;exports.contexts=ss;exports.data=Ct;exports.layout=ii;exports.scripts=ui;