@soma-vertical-web/multi-lib 1.0.27 → 1.0.28
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-BM8vTUKg.mjs +2289 -0
- package/index-CZjoMPpQ.js +4 -0
- package/index.js +15 -15
- package/index.mjs +2505 -2498
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
"use strict";var km=Object.defineProperty;var Om=(e,t,r)=>t in e?km(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var vt=(e,t,r)=>Om(e,typeof t!="symbol"?t+"":t,r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),g=require("react"),D=require("./index-By2TIGCS.js"),Je=require("idb-keyval"),Rt=require("zustand"),Qr=require("js-cookie"),d=require("@soma-vertical-web/core-components"),St=require("axios"),Zr=require("@date-fns/tz"),Lm=require("jose"),$t=require("@soma-vertical-web/foundations"),Rs=require("react-dom"),tt=require("draft-js"),$a=require("react-intersection-observer"),Ts=g.createContext({}),Mm=({data:e,children:t})=>n.jsx(Ts.Provider,{value:{tags:e==null?void 0:e.config},children:t}),yt=()=>{const{tags:e}=g.useContext(Ts),t=g.useCallback(r=>{var c,l,u,p;const s=(l=(c=e==null?void 0:e.commercial)==null?void 0:c.items)==null?void 0:l.find(m=>{var f;return(f=r??[])==null?void 0:f.find(h=>h.id===m.key)}),o=(p=(u=e==null?void 0:e.institucional)==null?void 0:u.items)==null?void 0:p.find(m=>{var f;return(f=r??[])==null?void 0:f.find(h=>h.id===m.key)}),a=e==null?void 0:e.flagPdp,i=(r==null?void 0:r.find(m=>{var f;return m.id===((f=e==null?void 0:e.flagGoldenPdp)==null?void 0:f.key)}))&&(e==null?void 0:e.flagGoldenPdp);return{commercial:s,institucional:o,flagPdp:a,flagGoldenPdp:i}},[e]);return{tags:e,getAvailableProductTag:t}},za=({gridScrollBack:e})=>{g.useEffect(()=>{typeof window<"u"&&(e!=null&&e.refer)&&sessionStorage.setItem(e==null?void 0:e.refer,"true")},[])},Fa=g.createContext({}),Dm=({children:e,gridScrollBack:t})=>{const r=g.useRef(null);return za({gridScrollBack:t}),n.jsx(Fa.Provider,{value:{sizesContainerRef:r},children:e})},Ba=()=>{const e=g.useContext(Fa);if(e===void 0)throw new Error("useContext(PDPContext) must be used within a PDPProvider");return e},pt=({event:e,data:t})=>{const r=(window==null?void 0:window.dataLayer)||[];t.ecommerce&&r.push({ecommerce:null}),r.push({...e&&{event:`custom_${e}`},...t})},Se={configs:{PLP_FILTERS:[{key:"",label:"",eventLabel:"",order:0}],currency:"BRL",categoryOff:"bazar",storeUrl:"https://www.example.com",MAIN_IMAGE:"1",NAME_SPLIT_SYMBOL:"-",VENDOR_CODE:""},productEvents:(e,t)=>{const{event:r,commonData:s,customData:o,promotionInfo:a,itemList:i,outsideEcommerceData:c}=e,{availableSizes:l,sizes:u,price:p}=s,m={...r==="view_item"?{currency:Se.configs.currency,value:p,grade_disponivel:l??(u?Ua(u):"")}:{},...r==="add_to_wishlist"||r==="remove_from_wishlist"?{value:p,currency:Se.configs.currency}:{}},f=gn({data:s,customData:{...o,...i,...a},configs:Se.configs});pt({event:r,data:{...c,ecommerce:{...i,...m,items:[f]}}}),typeof t=="function"&&t(f,m)},productListEvent:e=>{const{commonData:{products:t},promotionInfo:r,itemList:s,outsideEcommerceData:o,customData:a}=e;if(t.length===0)return;const i=t.map(({node:c},l)=>gn({data:{...c},customData:{...r,index:l,...a!=null&&a.item_list_name?{item_list_name:a==null?void 0:a.item_list_name}:s},configs:Se.configs}));pt({event:"view_item_list",data:{...o,ecommerce:{...a!=null&&a.item_list_name?{item_list_name:a==null?void 0:a.item_list_name}:s,items:i}}})},skuEvents:e=>{const{event:t,commonData:{products:r},customData:s,supportData:{selectedSkus:o,price:a},promotionInfo:i,itemList:c,outsideEcommerceData:l}=e;let u=0;const p=r.map(m=>{var y,x,v,C,j,b,w,P,S;const f=o==null?void 0:o.find(N=>(m.productId??m.id)===N.productId);let h={...i,...c};if(f){const N=Ha(),R=Va(N,f);R&&(h={...h,...R}),t==="add_to_cart"&&(i||c)&&Jr({persistedData:N,type:"add",sku:(f==null?void 0:f.id)??(f==null?void 0:f.sku),newData:{promotionInfo:i,itemList:c}}),t==="remove_from_cart"&&Jr({persistedData:N,type:"remove",sku:(f==null?void 0:f.id)??(f==null?void 0:f.sku)})}u+=m.price??((v=(x=(y=f==null?void 0:f.offers)==null?void 0:y.offers)==null?void 0:x[0])==null?void 0:v.price)??0;const _=(f==null?void 0:f.size)??D.getColorAndSizeFromSkuName((f==null?void 0:f.skuName)??(f==null?void 0:f.name)??((C=m.itemOffered)==null?void 0:C.skuName),Se.configs.NAME_SPLIT_SYMBOL).size;return gn({data:m,customData:{...s,...h??{...i,...c},item_sku:(f==null?void 0:f.id)??(f==null?void 0:f.sku)??((j=m.itemOffered)==null?void 0:j.sku),quantity:(s==null?void 0:s.quantity)??m.quantity??1,item_variant2:_,seller_id:(f==null?void 0:f.sellerId)??(f==null?void 0:f.seller)??((S=(P=(w=(b=f==null?void 0:f.offers)==null?void 0:b.offers)==null?void 0:w[0])==null?void 0:P.seller)==null?void 0:S.identifier)??m.seller},configs:Se.configs})});pt({event:t,data:{...l,ecommerce:{value:a??u,currency:Se.configs.currency,items:p}}})},filterEvent:e=>{var i;const{commonData:t,customData:r,outsideEcommerceData:s}=e,o={},a={};Array.isArray(t==null?void 0:t.selectedFacets)&&((i=t==null?void 0:t.selectedFacets)!=null&&i.length)&&((t==null?void 0:t.selectedFacets).forEach(({key:c,value:l})=>{var m;const u=((m=Se.configs.PLP_FILTERS.find(f=>f.key===c))==null?void 0:m.eventLabel)??c,p=(o==null?void 0:o[u])||[];u==="price_range"&&l.replace(":","-"),o[u]=[...p,l]}),Object.keys(o).forEach(c=>a[c]=o[c].join(", "))),pt({event:"filter",data:{...s,...a,...r}})},viewCartEvent:e=>{var p,m,f,h,_,y,x,v,C,j;const{commonData:t,outsideEcommerceData:r}=e,{cartStore:s}=t;if(!s)return;const o=window.localStorage.getItem("persistedCartEventsData"),a=o?JSON.parse(o):{},i=s.items.map(b=>{const{promotionInfo:w,itemList:P}=a[b.id]??{};return gn({data:{...b,price:b.price/100,listPrice:b.listPrice/100},customData:{...w,...P,item_sku:b.id??b.itemOffered.sku,quantity:b.quantity??1},configs:Se.configs})}),c=(((p=s.totalizers.find(b=>b.name==="Total dos Itens"))==null?void 0:p.value)??0)/100,l=(((m=s.totalizers.find(b=>b.name==="Total dos Descontos"))==null?void 0:m.value)??0)/100,u=((f=s.marketingData)==null?void 0:f.utmiCampaign)===Se.configs.VENDOR_CODE?(h=s.marketingData)==null?void 0:h.utmCampaign:(y=String((_=s.openTextField)==null?void 0:_.value))==null?void 0:y.split(" - ")[0];pt({event:"view_cart",data:{...r,ecommerce:{currency:Se.configs.currency,value:c+l,total_discount:Math.abs(l),cep_preenchido:!!((v=(x=s.shippingData)==null?void 0:x.address)!=null&&v.postalCode),...u?{seller_coupon_name:u}:{},...((C=s.marketingData)==null?void 0:C.coupon)&&{sale_coupon_name:(j=s.marketingData)==null?void 0:j.coupon},subtotal:c,items:i}}})},readyEvents:e=>{const{event:t,readyData:r}=e;pt({event:t,data:{...r}})}},Ua=e=>e.reduce((t,r)=>(r.available&&t.push(r.value),t),[]).toString(),$m=e=>{const t=e.length;return{...e&&e.length>0?{item_category:e[0].includes(Se.configs.categoryOff)?"Bazar":"Coleção",...e[1]?{item_category2:e[1]}:{},...t>2?{item_category3:e[t-1]}:{}}:{}}},gn=({data:e,customData:t,configs:r})=>({...zm(e,r==null?void 0:r.MAIN_IMAGE),...Fm(e),...Bm(e),...Um(e),...t}),qa=()=>{var e,t;return document?((t=(e=window.document.head.querySelector('meta[name="category"]'))==null?void 0:e.getAttribute("content"))==null?void 0:t.split("_"))??[]:[]},Ha=()=>{const e=window.localStorage.getItem("persistedCartEventsData");return e?JSON.parse(e):null},Va=(e,t)=>e==null?void 0:e[t],Jr=({persistedData:e,type:t,sku:r,newData:s})=>{if(!e&&t==="add"){window.localStorage.setItem("persistedCartEventsData",JSON.stringify({[r]:s}));return}if(e&&t==="add"){window.localStorage.setItem("persistedCartEventsData",JSON.stringify({...e,[r]:s}));return}e&&t==="remove"&&(delete e[r],window.localStorage.setItem("persistedCartEventsData",JSON.stringify(e)))},zm=(e,t="1")=>{var a,i,c,l,u,p,m,f,h,_,y;const r=e.productReference??e.gtin??e.productRefId,s=e.image??((i=(a=e.items)==null?void 0:a[0])==null?void 0:i.images)??((c=e.itemOffered)==null?void 0:c.image),o=s==null?void 0:s.find(x=>x.alternateName===t||x.imageLabel===t||x.keywords===t);return{item_id:e.productId??((l=e.isVariantOf)==null?void 0:l.productGroupID)??((u=e.isVariationOf)==null?void 0:u.productGroupID)??((m=(p=e.itemOffered)==null?void 0:p.isVariationOf)==null?void 0:m.productGroupID),item_ref:/_\d$/.test(r)?r.slice(0,-2):r,item_name:e.productTitle??e.productName??e.name??D.splitNameAndSizeFromFullName((f=e.itemOffered)==null?void 0:f.name,Se.configs.NAME_SPLIT_SYMBOL).name,item_brand:((h=e.brand)==null?void 0:h.brandName)??((_=e.brand)==null?void 0:_.name)??e.brand??((y=e.itemOffered)==null?void 0:y.brand.name),item_url:`${Se.configs.storeUrl}${e.linkText}/p`,item_image:(o==null?void 0:o.url)??(o==null?void 0:o.imageUrl)}},bo=e=>Array.isArray(e)?e.reduce((t,r)=>(r.length>t.length&&(t=r),t),""):e,Fm=e=>{var u,p;const{categories:t,categoriesIds:r}=e,s=t??((u=e.itemOffered)==null?void 0:u.categories),o=r??((p=e.itemOffered)==null?void 0:p.categoriesIds),a=bo(s),i=bo(o),c=a.slice(1,-1).split("/"),l=i.slice(1,-1).split("/");return{item_category:c[0].toLowerCase().includes(Se.configs.categoryOff)?"Bazar":"Coleção",...c[1]&&{item_category2:c[1]},...c.length>2&&{item_category3:c[c.length-1]},item_category_id:l[l.length-1],...l.length>1&&{item_parent_category_id:l[l.length-2]}}},Bm=e=>{var o,a,i,c,l,u;const t=((o=e.itemOffered)==null?void 0:o.skuName)??((c=(i=(a=e.isVariantOf)==null?void 0:a.hasVariant)==null?void 0:i[0])==null?void 0:c.name)??((u=(l=e.items)==null?void 0:l[0])==null?void 0:u.name),{color:r,size:s}=D.getColorAndSizeFromSkuName(t,Se.configs.NAME_SPLIT_SYMBOL);return{item_variant:r,...e.itemOffered&&{item_variant2:s}}},Um=e=>{var l,u;const{price:t,listPrice:r,installments:s}=e,o=t??((l=e.offers)==null?void 0:l.lowPrice)??0,a=r??((u=e.offers)==null?void 0:u.highPrice)??0,i=a?a-o:0,c=i%1===0?i:Number(i.toFixed(2));return{...t&&{price:o??a},...a&&{list_price:a,discount:c},...s&&{installments:s==null?void 0:s.count,installment_value:s==null?void 0:s.value},item_currency:Se.configs.currency}},Wa=()=>{const[e,t]=qa(),[r,s]=e.split("-"),o=r.includes("shop")||r.includes("sale")?r:"";return{page_category:o&&s?s:"",page_departament:o,id:t,name:e}},qm=Object.freeze(Object.defineProperty({__proto__:null,eventsFunctions:Se,findDataInPersistedData:Va,getAvailablesSizes:Ua,getCategories:$m,getPageCategoryAndDepartmentFromSlug:Wa,getPersistedData:Ha,getProductListInfoFromHead:qa,pushDatalayer:pt,updatePersistedData:Jr},Symbol.toStringTag,{value:"Module"})),Ga=g.createContext({}),Hm=({children:e,evtFunctionsConfigs:t})=>{const r=g.useRef({}),s=g.useRef(null),o=g.useRef(null),a=g.useRef({}),i=g.useRef({trigger:!1,index:0}),c=({functionKey:p,data:m,callBack:f,timeout:h=100})=>{window.dataLayer||(window.dataLayer=[]),Se.configs=t;try{typeof Se[p]=="function"&&setTimeout(()=>{var _;m.promotionInfo=r.current,(_=o.current)!=null&&_.item_list_name&&(m.itemList=o.current),Se[p](m,f)},h)}catch(_){pt({event:"error_event",data:{error_message:(_==null?void 0:_.message)??_}})}},l=({content:p})=>{c({functionKey:"readyEvents",data:{event:"select_content",readyData:{content_type:p.replace("::",":")}}})},u=({updatePromotionRef:p,promotion:m,index:f})=>{p&&(r.current={...m}),c({functionKey:"readyEvents",data:{event:"select_promotion",readyData:{ecommerce:{...m,...f!==void 0&&{index:f}}}}})};return n.jsx(Ga.Provider,{value:{sendDataLayerEvent:c,triggerSelectItemEventRef:i,promotionEventRef:r,currentLocalRef:s,itemListRef:o,cartProductsFullDataRef:a,handleSelectContent:l,handleSelectPromotionEvent:u},children:e})},ae=()=>g.useContext(Ga),Ka=g.createContext({}),Vm=({children:e,productData:t,isKit:r,PDP_INFO:s,NAME_SPLIT_SYMBOL:o,TEXTURE_IMAGE:a})=>{var M,U;const{sendDataLayerEvent:i,triggerSelectItemEventRef:c}=ae(),{productId:l,productName:u,items:p,items:[{images:m,Videos:f}],description:h,["Composição"]:_="",productReference:y,categories:[x]}=t,{getAvailableProductTag:v}=yt(),C=v(Object.entries(t.clusterHighlights).map(Y=>({id:Y[0],name:Y[1]}))),j=x.slice(1,-1).split("/"),{installments:b,price:w,listPrice:P,sizes:S,allSizesAvailable:N}=D.getSkuInfos({items:p,NAME_SPLIT_SYMBOL:o}),R=D.getThumbImage({images:m,TEXTURE_IMAGE:a}),A=[{label:`${s.product.description}`,value:"description",content:h},{label:`${s.product.materiais}`,value:"composition",content:_}],L=((U=D.getColorAndSizeFromSkuName((M=t.items)==null?void 0:M[0].name,o))==null?void 0:U.color)??t["Cores Filtráveis"][0]??"",O=()=>({commonData:{...t,sizes:S,price:w,listPrice:P,installments:b},customData:{installments:b==null?void 0:b.count,installment_value:Number(b==null?void 0:b.value).toFixed(2)}}),G=({sku:Y,size:X})=>{const{commonData:W,customData:z}=O();i({functionKey:"productEvents",data:{event:"view_item",commonData:W,customData:{...z,...Y&&{item_sku:Y},...X&&{item_variant2:X}}}})};return g.useEffect(()=>{if(c.current.trigger){const{commonData:Y,customData:X}=O();i({functionKey:"productEvents",data:{event:"select_item",commonData:Y,customData:{...X,index:c.current.index}}}),c.current.trigger=!1}G({})},[]),n.jsx(Ka.Provider,{value:{productData:t,productId:l,productName:u,productReference:y,tag:C,items:p,sizes:S,allSizesAvailable:N,installments:b,price:w,listPrice:P,thumbImage:R,images:m,video:f[0],descriptionContent:A,breadcrumbList:j,isKit:r,colorName:L,handleViewItemEvent:G},children:e})},Me=()=>{const e=g.useContext(Ka);if(e===void 0)throw new Error("useContext(PDPDataContext) must be used within a PDPDataProvider");return e},Wm=()=>{const[e,t]=g.useState(null);return[e,async s=>{if(!(navigator!=null&&navigator.clipboard))return console.warn("Clipboard not supported"),!1;try{return await navigator.clipboard.writeText(s),t(s),!0}catch(o){return console.warn("Copy failed",o),t(null),!1}}]},Xa=()=>{g.useEffect(()=>{const e=t=>{t.preventDefault()};return document.addEventListener("gesturestart",e),document.addEventListener("gesturechange",e),document.addEventListener("dblclick",e),document.addEventListener("wheel",t=>{t.ctrlKey&&e(t)}),()=>{document.removeEventListener("gesturestart",e),document.removeEventListener("gesturechange",e),document.removeEventListener("dblclick",e),document.removeEventListener("wheel",e)}},[])},Gm=typeof window>"u",Km=(e,t)=>{const[r,s]=g.useState(()=>{if(Gm)return null;const a=localStorage.getItem(e);return a===null?t:JSON.parse(a||"{}")});return g.useEffect(()=>{const a=i=>{i.storageArea===localStorage&&i.key===e&&s(JSON.parse(i.newValue))};return window.addEventListener("storage",a),()=>{window.removeEventListener("storage",a)}},[e,t]),[r,a=>{s(i=>{const c=typeof a=="function"?a(i):a;return localStorage.setItem(e,JSON.stringify(c)),c})}]};function As(e,t,r){const[s,o]=g.useState(!1),{threshold:a}=r||{};return g.useEffect(()=>{if(!e.current)return()=>null;let i=null;const c=new IntersectionObserver(([l])=>{if(r!=null&&r.delay){i&&clearTimeout(i),i=setTimeout(()=>{o(l.isIntersecting),t&&l.isIntersecting&&c.unobserve(e.current)},r.delay);return}o(l.isIntersecting),t&&l.isIntersecting&&c.unobserve(e.current)},{threshold:a||1});return c.observe(e.current),()=>{c.disconnect()}},[e]),s}const Kn=({callback:e,onEnterViewportOnce:t,options:r})=>{const s=g.useRef(null);return g.useEffect(()=>{const o=s.current;if(!o)return;const a=new IntersectionObserver(([i])=>{i.isIntersecting&&typeof e=="function"&&(e(),t&&(a.unobserve(o),a.disconnect()))},r);return a.observe(o),()=>{t&&a.unobserve(o),a.disconnect()}},[e,t,r]),{element:s}},Ya=({defaultScale:e=1,maxScale:t=3})=>{const r=g.useRef(null),s=g.useRef(null),[o,a]=g.useState(e),i=g.useRef(0),c=g.useRef({x:0,y:0}),l=g.useRef({x:0,y:0}),u=()=>{if(!s.current||!r.current)return{minX:0,maxX:0,minY:0,maxY:0};const h=r.current.getBoundingClientRect(),_=s.current.children[0].getBoundingClientRect(),y=_.width,x=_.height,v=Math.min(0,(h.width-y)/2),C=Math.max(0,(y-h.width)/2),j=Math.min(0,(h.height-x)/2),b=Math.max(0,(x-h.height)/2);return{minX:v,maxX:C,minY:j,maxY:b}},p=(h,_,y)=>{if(s.current){const x=s.current.children[0];x&&requestAnimationFrame(()=>{x.style.transform=`translate(calc(-50% + ${h}px), calc(-50% + ${_}px)) scale(${y})`})}},m=g.useCallback(h=>{const{minX:_,maxX:y,minY:x,maxY:v}=u(),{x:C,y:j}=l.current,b=Math.max(_,Math.min(y,C)),w=Math.max(x,Math.min(v,j));if(h.touches.length>1){const P=h.touches[0],S=h.touches[1],N=P.pageX-S.pageX,R=P.pageY-S.pageY;i.current=Math.sqrt(N*N+R*R),c.current={x:(P.pageX+S.pageX)/2,y:(P.pageY+S.pageY)/2}}else h.touches.length===1&&(c.current={x:h.touches[0].pageX-b,y:h.touches[0].pageY-w})},[o,l]),f=g.useCallback(h=>{if(!s.current||!r.current)return;const{minX:_,maxX:y,minY:x,maxY:v}=u();if(h.touches.length>1){h.preventDefault();const C=h.touches[0],j=h.touches[1],b=C.pageX-j.pageX,w=C.pageY-j.pageY,P=Math.sqrt(b*b+w*w);if(!i.current){i.current=P;return}const S=P/i.current,N=Math.max(1,Math.min(t,o*S));if(o===N)return;a(N);const R=(C.pageX+j.pageX)/2,A=(C.pageY+j.pageY)/2;let L=R-c.current.x,O=A-c.current.y;L=Math.max(_,Math.min(y,L)),O=Math.max(x,Math.min(v,O)),l.current={x:L,y:O},i.current=P,p(L,O,N)}else if(h.touches.length===1){const C=h.touches[0].pageX,j=h.touches[0].pageY;let b=C-c.current.x,w=j-c.current.y;b=Math.max(_,Math.min(y,b)),w=Math.max(x,Math.min(v,w)),l.current={x:b,y:w},p(b,w,o)}},[t,o]);return g.useEffect(()=>(document.addEventListener("touchstart",m),document.addEventListener("touchmove",f,{passive:!1}),()=>{document.removeEventListener("touchstart",m),document.removeEventListener("touchmove",f)}),[f,m]),{containerRef:r,imgRef:s,scale:o}},Xm={attachment:"ATTACHMENT",specification:"SPECIFICATION",attribute:"ATTRIBUTE"},Ve=Promise.resolve(!1),es={id:"",isOpen:!1,items:[],loading:!1,marketingData:null,messages:[],openTextField:{},paymentData:null,shippingData:null,totalizers:[],itemMetadata:[],recentlyAddedProducts:[],addCoupon:()=>Ve,addItem:()=>Ve,addSellerCode:()=>Ve,addMarketingData:()=>Ve,emptyCart:()=>({}),removeItem:()=>Ve,setIsOpen:()=>({}),shipping:()=>Ve,shippingUpdate:()=>Ve,toggleServiceToProduct:()=>Ve,updateItemQuantity:()=>Ve,insertProfileEmail:()=>Ve,setRecentlyAddedProducts:()=>({})},ks=e=>e===0,Qa=(e,t)=>{if(!e||e.length===0)return[];let r="";const s=[],o=e.match(/\d+/g)??[];for(const a of o){const i=t[Number(a)];i&&(r+=(r?"/":"")+i,s.push(r))}return s},Za=(e,t)=>{const{availability:r,additionalInfo:{brandName:s},bundleItems:o,id:a,uniqueId:i,detailUrl:c,ean:l,imageUrl:u,name:p,listPrice:m,quantity:f,price:h,priceDefinition:_,productCategories:y,productCategoryIds:x,productId:v,refId:C,seller:j,referenceId:b,offerings:w,productRefId:P,skuName:S,sellingPrice:N}=e;return{availability:r,bundleItems:o,referenceId:b,productRefId:P,id:a,ean:l,uniqueId:i,itemOffered:{additionalProperty:[],brand:{name:s},categories:Qa(x,y),categoriesIds:x,gtin:C,image:[{alternateName:(t==null?void 0:t.MAIN_IMAGE)??"1",url:u}],name:p,isVariationOf:{name:p,productGroupID:v},sku:a,slug:c,skuName:S},listPrice:m,quantity:f,offerings:w,price:h,priceDefinition:_,sellingPrice:N,seller:j}},Ja=(e,t)=>{const r=e.map(s=>({id:s.uniqueId,quantity:s.quantity,seller:s.seller}));return Array.isArray(t)?[...r,...t]:[...r,t]},ei=(e,t)=>{const r=e.find(s=>s.id===t);if(r){const s=e.map((o,a)=>{var i,c;return{id:((i=o.itemOffered)==null?void 0:i.sku)??"",index:a,quantity:(r==null?void 0:r.id)===((c=o.itemOffered)==null?void 0:c.sku)?0:o.quantity,seller:o.seller??""}});return{updateItems:s,filterItems:s.filter(o=>o.id!==t)}}return{updateItems:[],filterItems:[]}},ti=(e,t,r)=>e.filter(s=>s.availability!=="withoutStock"&&s.availability!=="https://schema.org/OutOfStock").map((s,o)=>{var a,i;return s.id===t?{id:s.id,index:o,quantity:r,seller:s.seller,sku:((a=s.itemOffered)==null?void 0:a.sku)??""}:{id:s.id,index:o,quantity:s.quantity,seller:s.seller,sku:((i=s.itemOffered)==null?void 0:i.sku)??""}}),ts=(e,t)=>e.filter(r=>r.availability!=="withoutStock").findIndex(({id:r})=>r===t),Ym=(e,t)=>{var r;return Array.isArray(e)?(((r=e==null?void 0:e.find(s=>{var o;return((o=s==null?void 0:s.id)==null?void 0:o.toLowerCase())===t}))==null?void 0:r.value)??0)/100:0},Qm=e=>{const t=e.reduce((o,a)=>{const i=ks(a.price)?0:a.quantity;return o+i},0),r=e.reduce((o,a)=>o+a.price*a.quantity,0),s=e.reduce((o,a)=>o+a.listPrice*a.quantity,0);return{totalItems:t,total:r,subTotal:s}},Zm=e=>Array.isArray(e)?e.filter(t=>t.availability!=="withoutStock").reduce((t,r)=>t+(ks(r==null?void 0:r.price)?0:r.quantity),0):0,ni=(e,t)=>{const{items:r,orderFormId:s,...o}=e;return{...o,id:s,items:Array.isArray(r)?r.map(a=>Za(a,t)):[]}},ri=(e,t)=>{const r=e.find(s=>s.id===t);return r?r.availability==="unavailableItemFulfillment":!1},Jm=(e,t)=>{const r=e.sku,s=e.isVariantOf.hasVariant.find(o=>o.sku===r);return s?s.name.split(t)[1]:"--"},Lt=(e,t,r=!1)=>!e&&t!==""?{code:300,value:t,statusOk:r}:e===t?{code:200,value:t,statusOk:r}:{code:400,value:t,statusOk:r},ep=(e,t)=>{const r=new Set;return[e,...t].filter(s=>!r.has(s)&&r.add(s),r)},si=(e,t)=>t&&Array.isArray(t)&&t.find(s=>s.id===e)?Promise.resolve(e):Promise.resolve(!1),oi=(e,t)=>t?Promise.resolve(e[t]):Promise.resolve(!1),ai=async e=>{try{const t=await e();if(typeof t!="boolean")return t}catch(t){console.error(`[Error orderForm]: ${t}`)}return!1},ii=(e,t)=>{if(t!==-1){const r=Number(e);return r?r+1:1}return e??1},ci=(e,t)=>Array.isArray(e)?e.filter(r=>t==null?void 0:t.some(s=>s.id===r.id)):[],li=async(e,t)=>e.then(r=>[...r??[],...t??[]]),ke=async(e,t,r,s)=>{const{priority:o="auto",body:a}=t;return fetch(e,{headers:{"Content-Type":"application/json"},priority:o,method:"POST",body:JSON.stringify(a)}).then(async i=>{const c=await i.json();return r?c:ni(c,s)})},ui=(e,t,r)=>({notifications:[...e.notifications,{id:Date.now(),message:t,callback:r}]}),di=e=>[...Array.isArray(e)?e:[e],"faststore"],mi=e=>{const t=e.get("utm_source")||jt("utm_source"),r=e.get("utm_campaign")||jt("utm_campaign"),s=e.get("utm_medium")||jt("utm_medium"),o=e.get("utmi_cp")||jt("utmi_cp"),a=e.get("utmi_pc")||jt("utmi_pc"),i=e.get("utmi_p")||jt("utmi_p");return{...t&&{utmSource:t},...s&&{utmMedium:s},...r&&{utmCampaign:r},...o&&{utmiCampaign:o},...a&&{utmiPart:a},...i&&{utmipage:i}}},jt=e=>{if(!e||typeof window>"u")return;const t=window.location.href;e=e.replace(/[[\]]/g,"\\$&");const r=new RegExp("[?&]"+e+"(=([^&#]*)|&|#|$)"),s=r.exec(t);return s?s[2]?decodeURIComponent(s[2].replace(/\+/g," ")):"":null},pi=(e,t,r="BR")=>{const s=t,o={country:r,addressType:"",postalCode:e||null,city:"",state:"",street:"",number:"",neighborhood:"",complement:"",reference:"",geoCoordinates:[]};if(s){const a=typeof s=="object"&&"latitude"in s?s.latitude:null,i=typeof s=="object"&&"longitude"in s?s.longitude:null;o.geoCoordinates=typeof a=="number"&&typeof i=="number"?{latitude:a,longitude:i}:null}return[o]},tp=Object.freeze(Object.defineProperty({__proto__:null,VALUE_REFERENCES:Xm,addItemOrder:Ja,addNotification:ui,createItemOrder:Za,createNewAddress:pi,fetchCartAPI:ke,findItemIndex:ts,findOptions:ci,findTotalizerValue:Ym,getCategories:Qa,getCode:Lt,getQuantity:ii,getRemoveId:si,getSize:Jm,getTotalItems:Zm,getTotalizer:Qm,getUrlParameter:jt,getValue:oi,initialState:es,isGift:ks,marketingTagsBuilder:di,mergeOptionsPromise:li,mountMarketingData:mi,orderFormValues:ni,promiseDefault:Ve,removeQuantity:ei,updateItemSellerExternal:ri,updateOrderFormPromise:ai,updateQuantity:ti,wishlistArray:ep},Symbol.toStringTag,{value:"Module"})),np=()=>{const e=async(h,_)=>ke("/api/checkout/order-form/coupon",{body:{orderFormId:h,coupon:_}}),t=async(h,_,y={},x)=>{if(x)if(_){const v=_.includes(" - ")?_.split(" - ")[0]:_,C=await ke("/api/checkout/order-form/seller-code",{body:{orderFormId:h,sellerCode:v}},!0);return C instanceof Object&&y.name in C&&C[y.status]===!0?ke("/api/checkout/order-form/attachments",{body:{orderFormId:h,sellerCode:v,sellerName:C[y.name]}}).then(b=>({...b,openTextField:{...(b==null?void 0:b.openTextField)??{},statusOk:!0}})):Promise.resolve({paymentData:null,openTextField:{statusOk:!1,value:v}})}else return ke("/api/checkout/order-form/attachments",{body:{orderFormId:h,sellerCode:"",sellerName:""}})},r=async(h,_)=>ke("/api/checkout/order-form/attachments/marketing-data",{body:{orderFormId:h,marketingData:_}}),s=async(h,_,y)=>ke("/api/checkout/order-form/items",{body:{orderFormId:h,orderItems:Ja(_,y)}}),o=async(h,_,y,x=!1)=>ke("/api/checkout/order-form/offerings",{body:{id:_,itemIndex:y,orderFormId:h,remove:x}}),a=async h=>ke("/api/checkout/order-form/items/remove-all",{body:{orderFormId:h}}),i=async(h,_="low")=>ke("/api/checkout/order-form",{priority:_,body:{orderFormId:h??""}}),c=async(h,_)=>ke("/api/checkout/order-form/profile",{body:{orderFormId:h,email:_}}),l=async(h,_,y)=>{const x=ei(_,y);return ke("/api/checkout/order-form/items/update",{body:{orderItems:x.updateItems,orderFormId:h}})},u=async(h,_,y,x,v,C,j)=>{var P,S;const b=j?{startDateUtc:(P=C==null?void 0:C.deliveryWindow)==null?void 0:P.startDate,endDateUtc:(S=C==null?void 0:C.deliveryWindow)==null?void 0:S.endDate}:null,w={logisticsInfo:Array.from({length:x},(N,R)=>({itemIndex:R,selectedDeliveryChannel:(C==null?void 0:C.deliveryChannel)||null,selectedSla:(C==null?void 0:C.deliveryMethod)||null,deliveryWindow:b})),selectedAddresses:v,clearAddressIfPostalCodeNotFound:!0};return ke("/api/checkout/order-form/shipping",{body:{...w,orderFormId:h,country:y,postalCode:_}})},p=async(h,_,y)=>ke("/api/checkout/order-form/shipping/update",{body:{orderFormId:h,options:_,selectedAddresses:y}}),m=async(h,_,y,x)=>{const v=ti(_,y,x);return ke("/api/checkout/order-form/items/update",{body:{orderFormId:h,orderItems:v}})};return{addCoupon:e,addItem:s,addSellerCode:t,addMarketingData:r,giftItem:o,emptyCart:a,getOrderForm:i,insertProfileEmail:c,removeItem:l,shipping:u,shippingUpdate:p,updateItemQuantity:async(h,_,y,x,v)=>m(h,_,y,x).then(C=>C&&Array.isArray(C.items)?ri(C.items,y)?m(h,_,y,v):C:!1)}},Bn="soma::cart",Xt="soma::options",Pt=Rt.create((e,t)=>{const r=np(),s=async(o,a,i)=>{e({loading:!0});const c=await ai(o);if(typeof c!="boolean"){e({...c});const l=await li(Je.get(Xt),i);return Je.set(Xt,l),oi(c,a).finally(()=>e({loading:!1,options:l}))}return Ve};if(typeof window<"u"){const o=async a=>{if(a){const i=await Je.get(Xt).then(u=>ci(u,a.items));Je.set(Bn,a),Je.set(Xt,i),e({...a,options:i});const c=new URLSearchParams(window.location.search),l=c.get("utm_campaign")||c.get("utmi_campaign")||"";l&&s(()=>r.addSellerCode(t().id,l.toUpperCase()),"openTextField")}};return Je.get(Bn).then(a=>r.getOrderForm(a?a.id:"").then(o)),{...es,addCoupon:async a=>s(()=>r.addCoupon(t().id,a),"marketingData"),addItem:(a,i)=>{s(()=>r.addItem(t().id,t().items,a),"items",i)},addSellerCode:async(a,i)=>s(()=>r.addSellerCode(t().id,a,i,t().isOpen),"openTextField"),addMarketingData:async a=>s(()=>r.addMarketingData(t().id,a),"marketingData"),emptyCart:()=>{s(()=>r.emptyCart(t().id))},removeItem:async a=>{const i=await s(()=>r.removeItem(t().id,t().items,a),"items");return si(a,i)},shipping:async(a,i="BR")=>s(()=>r.shipping(t().id,a??"",i,t().items.length,pi(a??"",null,i)),"shippingData"),shippingUpdate:async a=>s(()=>{var i;return r.shippingUpdate(t().id,a,(i=t().shippingData)==null?void 0:i.selectedAddresses)},"shippingData"),toggleServiceToProduct:async(a,i,c)=>s(()=>r.giftItem(t().id,a,i,c),"items"),updateItemQuantity:async(a,i,c)=>{const{id:l,items:u}=t();return s(()=>{var p;return r.updateItemQuantity(l,u,a,i,((p=u.find(m=>m.id===a))==null?void 0:p.quantity)??1)},"items",c?[c]:void 0)},insertProfileEmail:async a=>s(()=>r.insertProfileEmail(t().id,a),"clientProfileData"),setIsOpen:a=>e({isOpen:a})}}return es}),rp=()=>Pt(e=>e),fi=Rt.create(e=>({notifications:[],actions:{addNotification:(t,r)=>e(s=>ui(s,t,r)),removeNotification:t=>e(r=>({notifications:r.notifications.filter(s=>s.id!==t)}))}})),Os=()=>fi(e=>e.notifications),Ls=()=>fi(e=>e.actions),sp=Object.freeze(Object.defineProperty({__proto__:null,KEY_INDEXED_OPTIONS:Xt,KEY_INDEXED_STORE:Bn,useCartStore:Pt,useGetCartStoreState:rp,useGetNotificationActions:Ls,useGetNotificationsStore:Os},Symbol.toStringTag,{value:"Module"})),op=6e3,hi=g.createContext({}),_i=({children:e,...t})=>{const{items:r}=Pt(),[s,o]=g.useState([]),a=g.useRef(null),i=g.useMemo(()=>Array.isArray(s)&&s.length>0?s.map(c=>r.find(l=>l.id===c.id)).filter(c=>c!==void 0):[],[r,s]);return g.useEffect(()=>{s.length&&(clearTimeout(a.current??0),a.current=setTimeout(()=>{o([])},op))},[s]),n.jsx(hi.Provider,{value:g.useMemo(()=>({...t,setRecentlyAdded:o,recentlyAddedProducts:i}),[t,o,i]),children:e})},on=()=>{const e=g.useContext(hi);if(e===void 0)throw new Error("useUIContext must be used within a UIProvider");return e};class gi{constructor(){vt(this,"events",{});vt(this,"prevData",{})}subscribe(t,r){return this.events[t]||(this.events[t]=[]),this.events[t].push(r),()=>{this.events[t]=this.events[t].filter(s=>s!==r)}}publish(t,r){this.events[t]&&this.events[t].forEach(s=>{this.prevData[t]=r,s(r)})}}const yi=g.createContext({}),ap=({children:e,headerConfigs:t,pathname:r,...s})=>{const[o,a]=g.useState(!0),[i,c]=g.useState(!1),l=r==="/",u=g.useRef(new gi),p=h=>h?{headerVariant:t.home_default_variant,bannerVariant:t.home_default_variant,position:t.home_default_position}:{headerVariant:t.default_variant,bannerVariant:t.default_variant,position:t.default_position},m=p(l),f=g.useRef(m);return g.useEffect(()=>{var y;const h=((y=new URLSearchParams(window.location.search))==null?void 0:y.toString())??"";(h.includes("utm_")||h.includes("gclid"))&&(Qr.get("lastMedias")||Qr.set("lastMedias",`${h}`,{expires:1/24}));const _=()=>{const x=typeof(window==null?void 0:window.navigator)>"u"?"":navigator==null?void 0:navigator.userAgent,v=window.innerWidth<1024||!!x.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile|WPDesktop/i);i||c(!0),o!==v&&(a(v),c(!0))};return i||_(),window.addEventListener("resize",_,{passive:!0}),()=>window.removeEventListener("resize",_)},[o,i]),g.useEffect(()=>{const h=p(l);u.current.publish("header:change_variant",h.headerVariant),u.current.publish("header:change_position",h.position),f.current=h},[l]),n.jsx(yi.Provider,{value:{isMobile:o,mediatorRef:u,currentHeaderConfigsRef:f,deviceValidated:i,...s},children:n.jsx(_i,{children:e})})},ne=()=>g.useContext(yi),xi=g.createContext({}),ip=({children:e,...t})=>n.jsx(xi.Provider,{value:{...t},children:e}),ce=()=>g.useContext(xi),Tt=(e,t)=>Rt.create(r=>{const s=()=>r({value:e});return t&&t instanceof Set&&t.add(s),{value:e,actions:{setValue:o=>r({value:o}),reset:s}}}),tn={category:null,menuMobileIsOpen:!1,searchModalIsOpen:!1,userMenuIsOpen:!1},an=new Set,cp=()=>{an.forEach(e=>{e()})},vi=Rt.create((e,t)=>{const r=()=>e({value:tn.category});return an.add(r),{value:tn.category,actions:{reset:r,setValue:s=>e(()=>({value:s})),updateValue:s=>{t().value!==s&&e({value:s})}}}}),bi=()=>vi(e=>e.value),cn=()=>vi(e=>e.actions),ji=Tt(tn.menuMobileIsOpen,an),Ci=()=>ji(e=>e.value),Si=()=>ji(e=>e.actions),wi=Tt(tn.searchModalIsOpen,an),Pi=()=>wi(e=>e.value),Xn=()=>wi(e=>e.actions),Ni=Tt(tn.userMenuIsOpen,an),Ms=()=>Ni(e=>e.value),Ds=()=>Ni(e=>e.actions),lp=Object.freeze(Object.defineProperty({__proto__:null,resetAllHeaderStores:cp,useActionsHeaderCategory:cn,useActionsMenuMobileIsOpen:Si,useActionsSearchModalIsOpen:Xn,useActionsUserMenuIsOpen:Ds,useGetHeaderCategoryStore:bi,useGetMenuMobileIsOpen:Ci,useGetSearchModalIsOpen:Pi,useGetUserMenuIsOpen:Ms},Symbol.toStringTag,{value:"Module"})),Bt={selectedSkuInfo:{productId:"",name:"",size:"",sku:"",sellerId:"",sellerName:"",available:!1,quantity:1},openLetMeKnow:!1,openMeasurements:!1,showBottomNavigation:!1,showNotify:!1},Ut=new Set,up=()=>{Ut.forEach(e=>{e()})},Ei=Rt.create(e=>{const t=()=>e({value:Bt.selectedSkuInfo});return Ut.add(t),{value:Bt.selectedSkuInfo,actions:{setValue:r=>e(s=>({value:{...s,...r}})),reset:t}}}),ln=()=>Ei(e=>e.value),Ii=()=>Ei(e=>e.actions),Ri=Tt(Bt.openLetMeKnow,Ut),dp=()=>Ri(e=>e.value),mp=()=>Ri(e=>e.actions),Ti=Tt(Bt.showNotify,Ut),Ai=()=>Ti(e=>e.value),$s=()=>Ti(e=>e.actions),ki=Tt(Bt.showBottomNavigation,Ut),pp=()=>ki(e=>e.value),fp=()=>ki(e=>e.actions),Oi=Tt(Bt.openMeasurements,Ut),Li=()=>Oi(e=>e.value),Mi=()=>Oi(e=>e.actions),hp=Object.freeze(Object.defineProperty({__proto__:null,resetAllPDPStores:up,useActionsPDPOpenLetMeKnow:mp,useActionsPDPOpenMeasurements:Mi,useActionsPDPSelectedSkuInfo:Ii,useActionsPDPShowBottomNavigation:fp,useActionsPDPShowNotify:$s,useGetPDPOpenLetMeKnow:dp,useGetPDPOpenMeasurements:Li,useGetPDPSelectedSkuInfo:ln,useGetPDPShowBottomNavigation:pp,useGetPDPShowNotify:Ai},Symbol.toStringTag,{value:"Module"})),jo={feedback:{active:!1,action:"add"},list:[]},zs=Rt.create((e,t)=>({value:jo,actions:{reset:()=>e({value:jo}),setValue:s=>e(()=>({value:s})),toggleProduct:s=>e(o=>o.value.list.includes(s)?{value:{feedback:{active:!0,action:"remove"},list:o.value.list.filter(a=>a!==s)}}:{value:{feedback:{active:!0,action:"add"},list:[...o.value.list,s]}}),updateList:s=>e(o=>({value:{...o.value,list:s}})),resetFeedback:()=>e(s=>({value:{...s.value,feedback:{active:!1,action:""}}}))}})),qt=()=>zs(e=>e.value.list),Fs=()=>zs(e=>e.value.feedback),At=()=>zs(e=>e.actions),_p=Object.freeze(Object.defineProperty({__proto__:null,useActionsWishlistStore:At,useGetWishlistFeedbackStore:Fs,useGetWishlistStore:qt},Symbol.toStringTag,{value:"Module"})),Di=g.createContext({}),gp=({children:e,headerData:t,...r})=>{var p,m;const s=g.useRef(null),o=g.useRef(null),a=g.useRef(null),i=g.useRef(null),c=g.useRef(null),{mediatorRef:l,currentHeaderConfigsRef:u}=ne();return(p=l.current)==null||p.subscribe("header:change_variant",f=>{var v,C,j;if(f&&u.current&&(u.current.bannerVariant=f),!s.current)return;const _=document.body.scrollTop>0,y=s.current.getAttribute("data-interactiveVariant"),x=_?y:f??((v=u.current)==null?void 0:v.bannerVariant)??"default";x!==((C=u.current)==null?void 0:C.headerVariant)&&(s.current.setAttribute("data-bottomdivider",String(_)),s.current.setAttribute("data-variant",String(x)),(j=l.current)==null||j.publish("herobanner:change_controllers_variant",x),u.current&&(u.current.headerVariant=x))}),(m=l.current)==null||m.subscribe("header:change_position",f=>{s.current&&(s.current.style.position=f)}),g.useEffect(()=>{const f=new AbortController,h=d.helpers.throttle(()=>{var y;return(y=l.current)==null?void 0:y.publish("header:change_variant",null)},200);document.body.addEventListener("scroll",h,{passive:!0,signal:f.signal});const _=y=>{var v;(v=y.target.closest("a"))==null||v.blur()};return s.current&&(s.current.addEventListener("click",_,{signal:f.signal}),s.current.addEventListener("touchend",_,{signal:f.signal})),()=>{f.abort()}},[]),n.jsx(Di.Provider,{value:{headerData:t,structureRef:o,rootRef:s,tipbarRef:a,userMenuMobileRef:i,userMenuDesktopRef:c,...r},children:e})},Ne=()=>g.useContext(Di),$i=g.createContext({}),zi=({children:e,...t})=>n.jsx($i.Provider,{value:g.useMemo(()=>t,[t]),children:e}),Bs=()=>{const e=g.useContext($i);if(e===void 0)throw new Error("useMenuMobileContext must be used within a MenuMobileProvider");return e},yp=e=>{if(!e||typeof window>"u")return 0;const t=window.getComputedStyle(e);return parseInt(t.padding,10)},xp=(e,t,r)=>{if(!(e instanceof HTMLElement)||!(t instanceof HTMLElement))return{left:0,top:0};const s=t.getBoundingClientRect(),o=e.getBoundingClientRect(),a=e!=null&&e.parentElement?yp(e==null?void 0:e.parentElement):0;return{left:s.left+s.width/2-(o.width+a),top:s.top+s.height+r}},Fi=g.createContext({}),Bi=({children:e,delay:t=600,gap:r=20,...s})=>{const[o,a]=g.useState(!1),i=g.useRef(null),[c,l]=g.useState(!1),[u,p]=g.useState({left:0,top:0}),m=g.useCallback(()=>{l(!0),typeof window<"u"&&(i.current=window.setTimeout(()=>{a(!1),l(!1)},t))},[l,a,t]);return g.useEffect(()=>{if(typeof window>"u")return;const f=window.document.querySelector("#cart-button"),h=window.document.querySelector("#add-to-cart--tooltip");if(f&&h){const{left:_,top:y}=xp(h,f,r??0);p({left:_,top:y}),l(!1)}},[r,o]),n.jsx(Fi.Provider,{value:g.useMemo(()=>({...s,...u,handleClose:m,isLeaving:c,isOpen:o,setIsOpen:a,setIsLeaving:l}),[s,u,m,c,o,a,l]),children:e})},xt=()=>{const e=g.useContext(Fi);if(e===void 0)throw new Error("useAddToCartContext must be used within a AddToCartProvider");return e},Ui=g.createContext({}),vp=({children:e,SELLER_CODE_VALIDATION_KEYS:t,CARTPROVIDER_MESSAGE_PRODUCT_REMOVE:r,data:s,...o})=>{var se,le,oe,ue;const a=Pt(),{setRecentlyAdded:i}=on(),c=g.useRef(""),l=Os(),{addNotification:u,removeNotification:p}=Ls(),[m,f]=g.useState(null),{addCoupon:h,addItem:_,addSellerCode:y,addMarketingData:x,emptyCart:v,isOpen:C,removeItem:j,shipping:b,shippingUpdate:w,toggleServiceToProduct:P,updateItemQuantity:S}=a;g.useEffect(()=>{(async()=>{var E,V;if(!a.id||!((V=(E=s==null?void 0:s.promotion)==null?void 0:E.promotionCart)!=null&&V.idPromotion))return;const ee=await fetch("/api/buywin",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({orderFormId:a.id,promotionId:s.promotion.promotionCart.idPromotion,web:(s==null?void 0:s.promotion.promotionCart.versionAPI)==="Original"})}).then(ie=>ie.json());f(ee)})()},[a.id,a.items.length,s==null?void 0:s.versionId,(le=(se=s==null?void 0:s.promotion)==null?void 0:se.promotionCart)==null?void 0:le.idPromotion,(ue=(oe=s==null?void 0:s.promotion)==null?void 0:oe.promotionCart)==null?void 0:ue.versionAPI]),g.useEffect(()=>{const $=Qr.get("lastMedias");if(a.id&&$&&c.current!==$){c.current=$;const ee=new URLSearchParams($),E=mi(ee);x(E)}},[a,x]);const N=g.useCallback(async($,ee)=>(ee==="coupon"?h($):y($,t??{})).then(V=>{if(typeof V!="boolean"&&V instanceof Object){if(ee==="seller"&&"value"in V){const{statusOk:ie,value:_e}=V,I=String(_e??"").split(" - ");return Lt((I==null?void 0:I[0])??"",$,!!ie)}return Lt(String(V.coupon),$,!0)}return Lt("","")}).catch(()=>Promise.resolve({code:400})),[h,y]),R=g.useCallback(($,ee,E)=>{const{id:V}=$;S(V,ee,E)},[S]),A=g.useCallback(($,ee,E=!1)=>{if(!$)return;const{id:V}=$,ie=ts(a.items,V);if(ie!==-1&&!E){const _e=Number(a.items[ie].quantity),I=a.items[ie]?_e+1:1;R($,I,ee)}else _({id:V,quantity:($==null?void 0:$.quantity)??1,seller:$.seller});C||i(_e=>[..._e,$])},[_,R,a.items,C,i]),L=g.useCallback(($,ee)=>{if(!$||!Array.isArray($))return;i(V=>[...V,...$]);const E=$.map(V=>{const{id:ie,quantity:_e,seller:I}=V,T=ts(a.items,ie),Te=ii(_e??1,T);return{id:ie,quantity:Te,seller:I}});_(E,ee)},[_,a.items,i]),O=g.useCallback(async($,ee,E)=>$?j($).then(()=>(u(ee??`${r}`,E),Lt($,$))):Promise.resolve(Lt("","Product id required")),[u,j]),G=g.useCallback(()=>{a.items.length>0&&v()},[v,a.items]),M=g.useCallback(($,ee="BRA")=>b($,ee),[b]),U=g.useCallback($=>{$&&w($)},[w]),Y=g.useCallback(async($,ee,E=!1)=>{const V=a.items.findIndex(_e=>_e.uniqueId===$);return a.items[V]&&V>=0?P(ee,V,E):!1},[a.items,P]),X=g.useCallback(async($,ee)=>S($,ee).then(E=>{if(Array.isArray(E)){const V=E.find(ie=>ie.id===$);if(V&&(V==null?void 0:V.quantity)<ee)return String(V.quantity)}return!1}),[S]),W=g.useCallback(async()=>{await x({...a.marketingData,coupon:""})},[x,a.marketingData]),z=g.useCallback(async()=>{await x({...a.marketingData,utmiCampaign:"",utmCampaign:"",utmSource:"",utmMedium:""})},[x,a.marketingData]),J=g.useCallback(async()=>{await b("","BRA")},[b]);return n.jsx(Ui.Provider,{value:g.useMemo(()=>({...o,data:s,addCouponSeller:N,addToCart:A,addItemsToCart:L,cartStore:a,notifications:l,clearCart:G,addNotification:u,isOpen:a.isOpen,removeNotification:p,removeToCart:O,setIsOpen:a.setIsOpen,shipping:M,shippingUpdateOption:U,toggleGiftItemCart:Y,updateItemQuantity:X,removeCoupon:W,removeSellerCode:z,removeCEP:J,promotionRules:m,setPromotionRules:f}),[o,s,N,A,L,l,G,u,a,p,O,M,U,Y,X,W,z,J,m,f]),children:e})},ve=()=>{const e=g.useContext(Ui);if(e===void 0)throw new Error("useCartContext must be used within a CartProvider");return e},qi=g.createContext({}),Us=({children:e,fetch:t})=>{const r=g.useRef(!0),[s,o]=g.useState(null),[a,i]=g.useState(!1);return g.useEffect(()=>{(async()=>{r.current=!0;try{const l=await t();if(!l.ok)throw new Error("Failed to fetch data");const u=await l.json();o(u.data),r.current=!1}catch{r.current=!0,i(!0)}})()},[t]),n.jsx(qi.Provider,{value:g.useMemo(()=>({data:s,isLoading:r.current??!1,isError:a}),[s,a,r]),children:e})},qs=()=>{const e=g.useContext(qi);if(e===void 0)throw new Error("useProductsContext must be used within a useRootContext");return e},Hi=g.createContext({}),Hs=({children:e,sort:t,state:r,count:s,collectionId:o,brand:a,searchParams:i,ITEMS_PER_PAGE:c})=>{const l=g.useMemo(()=>{var u;return o?[{key:"productclusterids",value:o.toString()}]:a?[{key:"brand",value:a}]:(u=r.base)!=null&&u.length?r.base.slice(1).split("/").map((p,m)=>({key:`category-${m+1}`,value:p})):[]},[r.base,o]);return n.jsx(Hi.Provider,{value:g.useMemo(()=>({state:{...r,facets:[...l,...r.facets??[]]},sort:t,count:s??c,searchParams:i}),[l,s,t,r,i]),children:e})},Fe=()=>{const e=g.useContext(Hi);if(e===void 0)throw new Error("useSearchContext must be used within a SearchProvider");return e},Vi=g.createContext({}),bp=({children:e,...t})=>n.jsx(Vi.Provider,{value:t,children:e}),$e=()=>{const e=g.useContext(Vi);if(e===void 0)throw new Error("usePLPConstants must be used within a PLPConstantsProvider");return e},Wi=g.createContext({}),jp=({children:e,selectedFacets:t})=>{const{data:r,...s}=qs(),{router:o}=ce(),{searchParams:a,PLP_SORT_DEFAULT:i}=$e(),c=g.useCallback((f,h)=>{if(h){if(f.key.toLocaleLowerCase()==="price"){const _=h.getAll("facets");h.delete("facets"),_.forEach(y=>{const[x]=y.split("/");x!==f.key&&h.append("facets",y)})}h.set("page","1"),h.append("facets",`${f.key}/${f.value}`),o.push(`?${h.toString()}`)}},[o]),l=g.useCallback(()=>{const f=new URLSearchParams;f.set("sort",i),f.set("page","1"),o.push(`?${f.toString()}`)},[o]),u=g.useCallback((f,h)=>{if(!h||!h.has&&!h.has("facets"))return;const _=h.getAll("facets");h.delete("facets"),h.set("page","1"),_.forEach(y=>{const[x,v]=y.split("/");(x!==f.key||v!==f.value)&&h.append("facets",y)}),o.push(`?${h.toString()}`)},[o]),p=g.useCallback(f=>{const h=a?new URLSearchParams(a):new URLSearchParams;for(const[,_]of h.entries()){const[y,x]=_.split("/");if(y===f.key&&x===f.value)return u(f,h)}return c(f,h)},[c,u,a]),m=g.useCallback(f=>{const h=a?new URLSearchParams(a):new URLSearchParams;h.set("sort",f.replace("_",":")),o.push(`?${h.toString()}`)},[o,a]);return n.jsx(Wi.Provider,{value:g.useMemo(()=>({...s,breadcrumb:r&&"breadcrumb"in r?r==null?void 0:r.breadcrumb:[],deleteAllFacets:l,facets:r&&"facets"in r?r==null?void 0:r.facets:[],selectedFacets:t,onToggleFacet:p,onSort:m,searchParams:a}),[r,l,m,p,s,t,a]),children:e})},Gi=({children:e,forceUpdate:t,storeId:r})=>{const{state:s}=Fe();return n.jsx(Us,{fetch:()=>fetch(`https://${r}.myvtex.com/_v/proxy/search/facets`,{method:"POST",body:JSON.stringify({...s,forceUpdate:t})}),children:n.jsx(jp,{selectedFacets:(s==null?void 0:s.facets)??[],children:e})})},Ki=()=>{const e=g.useContext(Wi);if(e===void 0)throw new Error("useFacetsContext must be used within a FacetsProvider");return e},Wt={placeholder:"Ordernar por",options:{score_desc:"Mais Relevantes",orders_desc:"Mais Vendidos",price_desc:"Maior Preço",price_asc:"Menor Preço",release_desc:"Novidades",discount_desc:"Maior Desconto",name_asc:"De A a Z"}},Cp={nextPage:!1,previousPage:!1,startCursor:"0",endCursor:"0",count:0,total:0},Sp="Imagem do produto",Co=1,wp="Sair",Pp=e=>e.exit,So=({ICONS:e,storeConfig:t})=>[{icon:e.person,label:"Minha conta",href:`${t.secureSubdomain}/api/io/account#/profile`,needToBeAuth:!1,deviceShown:"both"},{icon:e.delivery_truck,label:"Meus pedidos",href:`${t.secureSubdomain}/api/io/account#/orders`,needToBeAuth:!1,deviceShown:"both"},{icon:e.favorite_false,label:t.wishlistConfig.label,href:t.wishlistConfig.path,needToBeAuth:!1,deviceShown:"mobile"},{icon:e.help,label:t.termsConfig.label,href:t.termsConfig.path,needToBeAuth:!1,deviceShown:"mobile"}],Np=(e,t)=>{const r=(t??"").split("@")[0];return e?`Olá${r.length?", ":" "}${r}!`:"Olá!"},Ep=e=>"Seja bem vindo!",Ip="Marque a caixa para aceitar os termos de política de privacidade.",Rp="Algumas informações estão incorretas ou não foram preenchidas",Tp="Enviar",Xi=g.createContext({}),Ap=({children:e})=>{const{data:t,...r}=qs(),[s,o]=g.useState(0),{sendDataLayerEvent:a}=ae();return g.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)&&o(i)}},[t,a,o]),n.jsx(Xi.Provider,{value:g.useMemo(()=>({...r,products:t&&"products"in t?t==null?void 0:t.products:[],pagination:t&&"pagination"in t?t==null?void 0:t.pagination:Cp,total:s}),[t,r,s]),children:e})},Vs=({children:e,query:t,forceUpdate:r,storeId:s})=>{const{count:o,state:a}=Fe(),i={...a,count:o};return n.jsx(Us,{fetch:()=>fetch(`https://${s}.myvtex.com/_v/proxy/search/product`,{method:"POST",body:JSON.stringify({...i,query:t,forceUpdate:r,facets:a.facets??[]})}),children:n.jsx(Ap,{children:e})})},un=()=>{const e=g.useContext(Xi);if(e===void 0)throw new Error("useProductsContext must be used within a ProductsProvider");return e},Yi=g.createContext({}),kp=({children:e,slug:t,searchParams:r,collectionId:s,brand:o,itemsPerPage:a=24,PLP_SORT_DEFAULT:i})=>{const{pathname:c}=ce(),l=g.useRef(""),[u,p]=g.useState(!1),m=g.useMemo(()=>{const h=new URL(c,"http://localhost"),_=(r==null?void 0:r.getAll("facets"))??[],y=(r==null?void 0:r.get("page"))??"1",x=(r==null?void 0:r.get("sort"))??(s?"":i);return h.searchParams.set("page",String(y)),h.searchParams.set("sort",String(x)),r!=null&&r.get("query")?(h.searchParams.set("query",r.get("query")),h):(h.searchParams.set("base",Array.isArray(t)?t.join("/"):t),h.searchParams.set("facets",_.join(",")),h)},[s,c,r,t]),f=g.useMemo(()=>{if(Array.isArray(r==null?void 0:r.getAll("facets")))return D.parseSearchState(m,r.getAll("facets")??[""]);const h=(r==null?void 0:r.getAll("facets"))??[];return D.parseSearchState(m,h)},[m,r]);return g.useEffect(()=>{l.current!==c&&(l.current=c,window.document.body.scrollTo(0,0))},[c]),n.jsx(Yi.Provider,{value:g.useMemo(()=>({openFilters:u,setOpenFilters:p}),[u,p]),children:n.jsx(Hs,{ITEMS_PER_PAGE:a,searchParams:r??new URLSearchParams,state:g.useMemo(()=>({...f}),[f]),collectionId:s,brand:o,children:e})})},Ws=()=>{const e=g.useContext(Yi);if(e===void 0)throw new Error("usePLPContext must be used within a PLPProvider");return e},Un=(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((o,a)=>Un(o,t[a]));if(Array.isArray(t))return!1;const r=Object.keys(e),s=Object.keys(t);return r.length!==s.length?!1:r.every(o=>Object.prototype.hasOwnProperty.call(t,o)&&Un(e[o],t[o]))},Qi=(e,t,r="page")=>Object.keys(t).some(s=>s===r?!1:!Un(t[s],e[s])),ns=async(e,t)=>{const r=await fetch(`https://${t}.myvtex.com/_v/proxy/search/product`,{method:"POST",body:JSON.stringify(e)});if(!r.ok)throw new Error("[FAILED TO FETCH DATA]");const s=await r.json();return s==null?void 0:s.data},Zi=()=>({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}}}),Ji=(e,t,r,s=24)=>{const o=new Set,a=[];if(!Array.isArray(e)||e.length===0)return{taken:o,placedBanners:a};const i=t*s*r;for(const c of e){let l=Number(c.position_grid),u=!1;for(;l<i;){const p=l%r;if(p+c.columns>r){l+=r-p;continue}if(!Array.from({length:c.columns}).some((h,_)=>o.has(l+_))){for(let h=0;h<c.columns;h++)o.add(l+h);a.push(l),u=!0;break}l++}u||console.info(`[PLP INFINITE FAILED BANNER POSITION]: pos=${c.position_grid}, cols=${c.columns}`)}return{taken:o,placedBanners:a}},rs=(e,t,r,s=24)=>{const{placedBanners:o,taken:a}=Ji(e??[],t,r),i=[];let c=0;try{for(;i.length<t*s;)a.has(c)||i.push(c),c++;return{banners:o,products:i}}catch(l){console.info(`[PLP INFINITE FAILED TO GEN POSITIONS]: page=${t}`,l)}return{banners:[],products:i}},Dn=(e,t,r=24)=>Array.from({length:e},(s,o)=>{const a=o+1;return{loading:e===a,page:a,pagination:t!=null&&t.products.length&&e===a?t==null?void 0:t.pagination:Gs(),products:t!=null&&t.products.length&&e===a?t==null?void 0:t.products:Array.from({length:r},()=>Zi())}}),ec=(e,t)=>[...e,{loading:!1,page:t,pagination:Gs(),products:[]}],Gs=()=>({nextPage:!1,previousPage:!1,startCursor:"0",endCursor:"1",count:1,total:1}),Op=(e,t,r,s,o)=>{const a=e[e.length-1],i=(a==null?void 0:a.products.length)??o,c=(e.length-1)*o+i-1,l=r[c];return t.filter((u,p)=>{const m=s[p];return m<=l||o>i&&m>l})},tc=(e,t)=>{const r=new Map;for(const o of e){const a=Math.floor(o/t);r.has(a)||r.set(a,[]),r.get(a).push(o)}const s=[];for(const[,o]of r){const a=o[Math.floor(Math.random()*o.length)];s.push(a)}return s},nc=(e,t)=>{if(!e)return[];const r=e.map((s,o)=>s.video&&s.video!==""?o:null).filter(s=>s);return tc(r,t)},rc=e=>Array.isArray(e)?e.map((t,r)=>({href:`/${e.slice(0,r+1).join("/")}`,name:t})):[],Lp=Object.freeze(Object.defineProperty({__proto__:null,createBreadcrumb:rc,createPage:ec,createPages:Dn,createPagination:Gs,createProduct:Zi,deepEqual:Un,fetchPage:ns,getBanners:Ji,getPositions:rs,getProductsWithVideo:nc,getRandomVideoPerRow:tc,getVisibleBanners:Op,hasStateChangedExceptPage:Qi},Symbol.toStringTag,{value:"Module"})),Mp=50,Dp=Rt.create((e,t)=>{const r=i=>Math.min(i,Mp),s=async(i,c,l)=>{const u=r(i.page);try{const p=await ns({...i,page:u},c);o(u,m=>l?l(m,p):{...m,...p})}catch(p){console.error(`[PDC - SCROLL INFINITE FAILED TO FETCH PAGE ${u}]: ${p}`),o(u,m=>({...m,loading:!1}))}},o=(i,c)=>{e({load:!0,pages:t().pages.map(l=>l.page===i?c(l):l)})},a=async(i,c,l)=>{await s(i,c,(u,p)=>(typeof l=="function"&&l(p),{...u,...p,loading:!0}))};return{banners:[],load:!1,pages:[],total:0,positions:[],products:[],createPages:async(i,c,l,u,p)=>{var f,h,_;const m=r(Number(i==null?void 0:i.page));if(e({...c,pages:Dn(m,void 0,u)}),!!p)try{const y=await ns({...i,page:m},p);if(y){if(!y.products.length&&((f=y==null?void 0:y.pagination)==null?void 0:f.total)<m){p&&a({...i,page:(h=y==null?void 0:y.pagination)==null?void 0:h.total},p,l),e({pages:Dn((_=y==null?void 0:y.pagination)==null?void 0:_.total)});return}typeof l=="function"&&l(y),e({load:!0,pages:Dn(m,y),total:Number(y.pagination.count)})}}catch(y){console.error(`[PDC - SCROLL INFINITE TO CREATE PAGES]: page ${m} ${y}`)}},addPage:(i,c,l,u,p)=>{const{pages:m}=t(),f=r(i==null?void 0:i.page);m.some(h=>h.page===f)||(e({...c,pages:ec(m,f)}),p&&a(i,p,l))},updateProducts:(i,c,l)=>{const u=t().pages.find(p=>p.page===r(i==null?void 0:i.page));!(u!=null&&u.loading)&&l&&a(i,l,c)}}}),$p=(e,t,r,s=0)=>{if(!e.length)return[];let o=0;const a=[];for(let i=0;i<e.length;i+=r){const c=e.slice(i,i+r),l=c.findIndex(u=>{var p;return(p=u.node)==null?void 0:p.video});for(let u=0;u<c.length;u++){const p=i+u,m=s+p,f=t.find(_=>_.position_grid===m+1),h=m+o+1;f&&(o+=f.columns),a.push({position:h,canPlayVideo:u===l})}}return a},sc=(e,t,r)=>{const s=(t-1)*r,o=t*r;return e>=s&&e<=o},Yn=e=>{var t;return(t=e==null?void 0:e.map(r=>({disable:D.disableSKU(r),size:D.getSKUName(r),skuID:"sku"in r&&r.sku})))==null?void 0:t.filter(r=>r.disable)},zp=Object.freeze(Object.defineProperty({__proto__:null,createGridPosAndVideo:$p,getSkusNotify:Yn,isPositionInCurrentPage:sc},Symbol.toStringTag,{value:"Module"})),oc=({isMobile:e,ICONS:t,NOTIFY_INFO:r})=>n.jsxs(n.Fragment,{children:[n.jsx(d.Modal.Controls,{navigation:e?"top":"middle",isMobile:e??!1,children:!e&&n.jsxs(n.Fragment,{children:[n.jsx(d.Button,{"data-close":!0,iconNameStart:t.arrow_left,size:"small",variant:"tertiary"}),n.jsx(d.Button,{"data-close":!0,iconNameStart:t.close,size:"small",variant:"tertiary"})]})}),n.jsx(d.Modal.Title,{navigation:e?"top":"middle",title:r.title})]});oc.displayName="Notify.Controls";const et={"notify--header-modifier":"_notify--header-modifier_xlomp_1","notify--container":"_notify--container_xlomp_4","notify--form":"_notify--form_xlomp_20","notify--status":"_notify--status_xlomp_36","notify--status--success":"_notify--status--success_xlomp_50","notify--status--error":"_notify--status--error_xlomp_50","notify--modal--body":"_notify--modal--body_xlomp_99","notify--loading":"_notify--loading_xlomp_102","notify--selector":"_notify--selector_xlomp_122","notify--selector--header":"_notify--selector--header_xlomp_138","modal-modifier":"_modal-modifier_xlomp_168"};function ac(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 Ks(e,t,r={}){const o={...{path:"/",expires:new Date(Date.now()+36e5)},...r};let a=`${encodeURIComponent(e)}=${encodeURIComponent(t??"")}`;for(const i in o)o[i]!==void 0&&(a+=`; ${i}`,i==="expires"?a+=`=${o[i].toUTCString()}`:typeof o[i]=="boolean"?a+=`; ${o[i]?"true":"false"}`:a+=`=${o[i]}`);window.document.cookie=a}const ic=g.createContext({amount:null,boxes:null,toExpire:null,loading:!0,logout:()=>null,getCurrentCredits:()=>({credits:0,cashback:0})}),Fp=({children:e,AUTH_TOKEN_COOKIE:t})=>{var p;const{shipping:r,cartStore:s}=ve(),[o,a]=g.useState({amount:null,boxes:null,toExpire:null,loading:!0}),i=g.useCallback(async()=>{try{await fetch("/api/user",{priority:"low"}).then(m=>m.json()).then(m=>{const{userCredits:f,userId:h,sub:_,...y}=m,{wishlist:x,...v}=y;a({amount:f==null?void 0:f.amount,boxes:f==null?void 0:f.boxes,toExpire:f==null?void 0:f.toExpire,user:{...v,userId:h,sub:_??""},loading:!1,wishlist:(typeof x=="string"?x.split(","):x)??[]})})}catch(m){console.error("user info and my credits request",m),a({...o,loading:!1})}},[a]),c=g.useCallback(()=>{Ks(t),i()},[i]),l=g.useCallback(()=>o.boxes?o.boxes.reduce((m,f)=>f.gift_card_box.refid==="C1643"?(m.cashback+=f.amount,m):(m.credits+=f.amount,m),{cashback:0,credits:0}):{cashback:0,credits:0},[o]),u=g.useCallback(async()=>{var m,f,h;if((m=o.user)!=null&&m.postalCode&&(s!=null&&s.id)&&!(s!=null&&s.loading)&&!((h=(f=s==null?void 0:s.shippingData)==null?void 0:f.address)!=null&&h.postalCode))try{await r(o.user.postalCode)}catch(_){console.error("Error auto-filling CEP:",_)}},[(p=o.user)==null?void 0:p.postalCode]);return g.useEffect(()=>{i()},[i]),g.useEffect(()=>{u()},[u]),n.jsx(ic.Provider,{value:g.useMemo(()=>({...o,getCurrentCredits:l,logout:c}),[o,l,c]),children:e})},Ht=()=>{const e=g.useContext(ic);if(e===void 0)throw new Error("useContext(SessionContext) must be used within a SessionProvider");return e},cc=({color:e,delay:t=3e3,sku:r,setStatus:s,setIsLoading:o,NEWSLETTER_CONFIGS:a,NOTIFY_INFO:i})=>{const c=g.useRef(null),[l,u]=g.useState(null),{sendDataLayerEvent:p}=ae(),{user:m}=Ht(),f=m!=null&&m.firstName?`${m==null?void 0:m.firstName} ${m==null?void 0:m.lastName}`:"";return n.jsx("div",{className:et["notify--form"],children:n.jsxs("form",{action:"POST",onSubmit:async h=>{var x;h.preventDefault();const _=h.currentTarget,y=((x=_.querySelector("input"))==null?void 0:x.value)??"";fetch("/api/aviseme",{method:"POST",body:JSON.stringify({userName:f,email:y,sku:r==null?void 0:r.skuID})}).then(v=>s(v.ok)).finally(()=>{o(!1),_.reset(),p({functionKey:"readyEvents",data:{event:"notify_me",readyData:{size:r==null?void 0:r.size,item_id:r==null?void 0:r.skuID,color:e}}}),c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{var v;(v=document.body)==null||v.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0})),u(!0),s(null)},t)})},children:[n.jsx(d.TextField.Structure,{input:n.jsx(d.TextField.Input,{feedback:typeof l=="boolean"&&l?"error":"none",type:"email",label:i.email_placeholder,mode:"over-label",variant:"outlined",sizeVariant:"large",onChange:h=>u(!h.target.validity.valid),required:!0}),supportText:typeof l=="boolean"&&l?n.jsx(d.TextField.SupportText,{text:a.messages.invalid_email,feedback:"error"}):n.jsx(n.Fragment,{})}),n.jsx(d.Button,{disabled:!(l===!1||!r)||!r,type:"submit",size:"large",children:i.button})]})})};cc.displayName="Notify.Form";const lc=({isLoading:e=!1})=>n.jsx("div",{className:et["notify--loading"],"data-loading":e,children:n.jsx(d.Spinner,{})});lc.displayName="Notify.Loading";const Xs={"product-variation-list--list":"_product-variation-list--list_e0he8_1","product-variation-list--title":"_product-variation-list--title_e0he8_10","product-variation-list":"_product-variation-list_e0he8_1"},uc=({children:e,...t})=>n.jsx("div",{...t,className:Xs["product-variation-list--list"],children:e});uc.displayName="ProductVariationList.List";const dc=({fill:e="#1352C7",src:t="",type:r="size",text:s,...o})=>{const{nextimage:a}=ce();return r==="size"?n.jsxs(d.ToggleSize.Wrapper,{...o,size:"large",variation:"ghost",children:[n.jsx(d.ToggleSize.DisabledAdornment,{title:"disabled-adornment-size"}),n.jsx(d.ToggleSize.Text,{children:s})]}):n.jsxs(d.ToggleStyle.Wrapper,{...o,size:"small",title:"wrapper-texture",children:[n.jsx(d.ToggleStyle.DisabledAdornment,{title:"disabled-adornment-texture"}),r==="color"?n.jsx(d.ToggleStyle.Color,{background:e,title:"color"}):n.jsx(d.ToggleStyle.Texture,{title:"texture",children:n.jsx(a,{alt:s??"image",height:40,src:t,width:40})})]})};dc.displayName="ProductVariationList.Option";const mc=({children:e,...t})=>n.jsx("div",{className:Xs["product-variation-list"],...t,children:e});mc.displayName="ProductVariationList.Root";const pc=({children:e,title:t,...r})=>n.jsxs("div",{...r,className:Xs["product-variation-list--title"],children:[t?n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.SectionWrapper,{children:n.jsx("p",{children:t})})}):n.jsx(n.Fragment,{}),e]});pc.displayName="ProductVariationList.Title";const nt={List:uc,Option:dc,Title:pc,Root:mc},Bp=(e,t)=>{if(!e||!t)return!1;const r=Object.keys(e);return r.length!==Object.keys(t).length?!1:r.every(s=>e[s]===t[s])},fc=({children:e,label:t="",skus:r,sku:s,setSku:o})=>n.jsxs(n.Fragment,{children:[n.jsx("div",{className:et["notify--selector--header"],children:e}),n.jsxs(nt.Root,{className:et["notify--selector"],children:[n.jsx(nt.Title,{title:t}),n.jsx(nt.List,{children:Array.isArray(r)&&r.map((a,i)=>{const c=Bp(s,a);return n.jsx(nt.Option,{active:c,onClick:()=>o(c?null:a),text:String(a.size),type:"size"},i)})})]})]});fc.displayName="Notify.Selector";const wo=({type:e,icon:t,title:r,subtitle:s})=>n.jsx("div",{className:et[`notify--status--${e}`],children:n.jsx(d.TextStructure.Root,{adornment:{start:n.jsx(d.Icon,{name:t,size:"large"})},children:n.jsxs(d.TextStructure.DivWrapper,{children:[n.jsx("h2",{children:r}),n.jsx("h3",{children:s})]})})}),hc=({status:e,ICONS:t,PRODUCT_CARD_TEXTS:r})=>n.jsxs("div",{className:et["notify--status"],"data-status":e,children:[n.jsx(wo,{...r.success,icon:t.check_circle,type:"success"}),n.jsx(wo,{...r.error,icon:t.alert_circle,type:"error"})]});hc.displayName="Notify.Status";const Ys=({color:e,open:t,setVisible:r,skus:s,sku:o,setSku:a,ICONS:i,NEWSLETTER_CONFIGS:c,NOTIFY_INFO:l,PRODUCT_CARD_TEXTS:u,Z_INDEX_WAR:p})=>{const[m,f]=g.useState(!1),[h,_]=g.useState(null),{isMobile:y}=ne();return n.jsxs(d.Modal.Root,{isMobile:y??!1,isOpen:t,setIsOpen:r,variant:y?"sideBottom":"sideLeft",style:{zIndex:p.modal},className:et["modal-modifier"],children:[n.jsx(d.Modal.Header,{navigation:"top",className:et["notify--header-modifier"],children:n.jsx(oc,{isMobile:y??!1,ICONS:i,NOTIFY_INFO:l})}),n.jsxs(d.Modal.Body,{className:et["notify--modal--body"],children:[n.jsxs("div",{className:et["notify--container"],children:[n.jsxs(fc,{label:l.selector_label,sku:o,skus:s,setSku:a,children:[n.jsx("p",{children:l.subtitle}),n.jsx("span",{children:l.description})]}),n.jsx(cc,{delay:4e3,sku:o,setStatus:_,setIsLoading:f,color:e,NEWSLETTER_CONFIGS:c,NOTIFY_INFO:l}),n.jsx(lc,{isLoading:m}),n.jsx("div",{className:et["notify--selector--header"],children:n.jsx("span",{children:l.legal})})]}),n.jsx(hc,{status:h,ICONS:i,PRODUCT_CARD_TEXTS:u})]})]})};Ys.displayName="Notify";const Qn=({skus:e,ICONS:t,NEWSLETTER_CONFIGS:r,NOTIFY_INFO:s,PRODUCT_CARD_TEXTS:o,Z_INDEX_WAR:a,...i})=>{const c=Yn(e??[]);return n.jsx(Ys,{skus:c,ICONS:t,NEWSLETTER_CONFIGS:r,NOTIFY_INFO:s,PRODUCT_CARD_TEXTS:o,Z_INDEX_WAR:a,...i})};Qn.displayName="PDC.Notification";const _c=g.createContext({}),gc=({banners:e,children:t})=>{const{searchParams:r,ITEMS_PER_PAGE:s,ICONS:o,NEWSLETTER_CONFIGS:a,NOTIFY_INFO:i,PRODUCT_CARD_TEXTS:c,Z_INDEX_WAR:l,storeId:u}=$e(),{router:p}=ce(),{sendDataLayerEvent:m}=ae(),{isMobile:f}=ne(),{state:h}=Fe(),{addPage:_,createPages:y,updateProducts:x,...v}=Dp(),C=f?8:16,j=f?2:4,b=g.useRef(!1),w=g.useRef(h),[P,S]=g.useState(!1),[N,R]=g.useState(null),[A,L]=g.useState([]),O=g.useCallback(X=>{X&&"pagination"in X&&m({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:X.products}}})},[m]),G=g.useCallback(X=>{if(X.pagination.nextPage===!0){const W=X.page+1,z=rs(e,W,j,s);_({...h,page:W},z,O,s,u)}},[_,e,O,j,s,h,u]),M=g.useCallback(X=>{X.loading===!1&&x({...h,page:X.page},O,u)},[O,x,h,u]),U=g.useCallback(X=>{const W=new URLSearchParams(r);X.page!==Number(W.get("page")??1)&&(W.set("page",String(X.page)),p.replace(`?${W.toString()}`,{scroll:!1}))},[p,r]),Y=g.useCallback((X,W)=>{const z=W?Yn([W]):null;L(X),R(z!=null&&z.length?z[0]:null),S(!0)},[]);return g.useEffect(()=>{const X=!b.current,W=Qi(w.current,h),z=rs(e,h.page,j);X?y(h,z,O,s,u):W&&(y(h,z,O,s,u),w.current=h),b.current=!0},[e,y,O,j,s,h,u]),n.jsxs(_c.Provider,{value:g.useMemo(()=>({...v,addPage:_,addNewPage:G,createPages:y,gap:C,columns:j,handleNotify:Y,updatePage:M,updateProducts:x,updateParamPage:U}),[_,G,y,Y,C,j,v,M,x,U]),children:[t,n.jsx(Qn,{open:P,sku:N,skus:A,setSku:R,setVisible:S,ICONS:o,NEWSLETTER_CONFIGS:a,NOTIFY_INFO:i,PRODUCT_CARD_TEXTS:c,Z_INDEX_WAR:l})]})},dt=()=>{const e=g.useContext(_c);if(e===void 0)throw new Error("PLPInfiniteScrollContext must be used within a ScrollInfiniteProvider");return e},yc=g.createContext({gridBanners:void 0,banners:[]}),Up=({children:e,data:t,device:r,SectionZone:s,COMMON_PAGE_COLUMN_GAP_PDC:o})=>{const{isMobile:a}=ne(),i=(t==null?void 0:t.sections.filter(m=>m.name!=="List Product Banners"))??[],c=i.slice(0,Co),l=i.slice(Co,i.length),u=t==null?void 0:t.sections.find(m=>m.name==="List Product Banners"),p=g.useMemo(()=>{var m,f;return((f=(m=u==null?void 0:u.data)==null?void 0:m.banners)==null?void 0:f.map(h=>({...h.banner,columns:h.bannerWidth,position_grid:h.bannerPosition})))??[]},[u]);return a&&r==="mobile"||!a&&r==="desktop"?n.jsxs(yc.Provider,{value:{gridBanners:u,banners:p},children:[n.jsx(s,{data:c??[]}),n.jsxs(d.Utils.Column,{gap:o,className:d.helpers.classNameConcat("utils-column-modifier"),children:[e,n.jsx(s,{data:l??[]})]})]}):n.jsx(n.Fragment,{})},Zn=()=>{const e=g.useContext(yc);return e===void 0&&console.error("Needs PLPContentContext on parent component"),e},xc=g.createContext({}),vc=({children:e,filters:t,PLP_FILTERS:r,...s})=>{var a;const o=(a=t.facets)==null?void 0:a.filter(i=>r.find(c=>c.key===i.key));return n.jsx(xc.Provider,{value:g.useMemo(()=>({...s,filters:{...t,facets:o}}),[t,o,s]),children:e})},Vt=()=>{const e=g.useContext(xc);if(e===void 0)throw new Error("useFilterContext must be used within a FilterProvider");return e},bc=g.createContext({product:void 0}),qp=({children:e,data:t,productId:r,COMMON_PAGE_COLUMN_GAP:s,SectionZone:o})=>n.jsxs(bc.Provider,{value:{productId:r},children:[e,n.jsx(d.Utils.Column,{gap:s,className:d.helpers.classNameConcat("utils-column-modifier"),children:n.jsx(o,{data:(t==null?void 0:t.sections)??[]})})]}),jc=()=>{const e=g.useContext(bc);return e||console.error("use this hook only inside PDPContentProvider hierarchy"),e},ss=e=>e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/\s+/g,"-").toLowerCase().trim();function Hp(e,t=1e3){let r=!1;return(...s)=>{r||(e(...s),r=!0,setTimeout(()=>{r=!1},t))}}function Vp(e,t=1e3){let r;return(...s)=>{clearTimeout(r),r=setTimeout(()=>{e(...s)},t)}}const Cc=(e,t)=>t.getTime()>e.getTime()?Math.abs(t.getTime()-e.getTime()):0,Yt=(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),Wp=e=>{const t=Lm.decodeJwt(e??"");return{email:t.sub,userId:t.userId}},Gp=["name","email","phone","date","cpf","cep"],Po={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}$/},Sc=({type:e,input:t,required:r=!1})=>{if(typeof t!="string"||!r&&t===""||!Po[e])return!0;const s=t.trim();return Po[e].test(s)},Kp=e=>{const t=/\/(\d+)-\d+-\d+\/(.+?)\./,r=typeof e=="string"?e.match(t):null;return r?r[2].replace(/-/g," "):Sp},Xp=Object.freeze(Object.defineProperty({__proto__:null,FieldTypes:Gp,debounce:Vp,getAltTextFromUrl:Kp,getAuthenticatedUser:Wp,getCookie:ac,getDaysHoursMinutesSeconds:Yt,getMilliSeconds:Cc,removeAccentsAndReplaceSpaces:ss,setCookie:Ks,throttle:Hp,validateInput:Sc},Symbol.toStringTag,{value:"Module"})),Yp=({fields:e})=>{const t={};return{mountedFields:(e==null?void 0:e.reduce((s,o)=>(t[o.master_data_field]="none",{...s,[o.master_data_field]:o}),{}))??{},mountedInputsStatus:t}},Qp=({formData:e,mountedFields:t,inputsStatus:r,hasTermsAndConditions:s,checkboxRef:o,setFormStatus:a})=>{let i=!1,c=!1;const l={...r};return s&&!o.current&&(a("unchecked"),i=!0),e.forEach((u,p)=>{var h;if(p==="terms-and-conditions")return;const m=(h=t[p])==null?void 0:h.required;if(m&&!u){l[p]="required",i=!0;return}Sc({type:t[p].type,input:u,required:m})||(l[p]="error",c=!0),typeof u=="string"&&e.set(p,u.toString().trim())}),{hasEmptyFields:i,hasErrors:c,inputStatusToUpdate:l}},wc=g.createContext({}),Pc=({children:e,masterDataEmailField:t,fields:r,variant:s,CONSTANTS:{MASTER_DATA_ENTITY:o,NEWSLETTER_CONFIGS:a}})=>{const{sendDataLayerEvent:i}=ae(),c=a.hasTermsAndConditions,{mountedFields:l,mountedInputsStatus:u}=g.useMemo(()=>Yp({fields:r}),[r]),p=g.useRef(!1),[m,f]=g.useState("idle"),[h,_]=g.useState(u),y=async({searchFields:P,entity:S})=>{const N=await St.post("/api/master-data/search",{body:{masterDataEntity:S,searchFields:P,headers:{"REST-Range":"resources=0-49"}}});return console.info(N),N.data},x=async({documentId:P,fieldsToBeUpdated:S,entity:N})=>(await St.post("/api/master-data/update",{dataEntityName:N,documentId:P,fieldsToBeUpdated:S})).status,v=g.useCallback(async({payload:P,response:S},N,R)=>{var M;const{email:A,...L}=P,[O]=await y({searchFields:{[N]:A},entity:R??o.newsletter}),G=Array.isArray(O)?(M=O[0])==null?void 0:M.id:void 0;return O&&await x({documentId:G,fieldsToBeUpdated:L,entity:R??o.newsletter})!==204?{...S,status:"error"}:{...S,status:"success"}},[]),C=g.useCallback(async({formData:P},S,N)=>{const R={status:"idle",inputsStatus:{}},A={};P.forEach((L,O)=>{A[O]=L});try{const O=(await St.post("/api/master-data",{body:{payload:A,masterDataEntity:S??o.newsletter}})).data;return(O==null?void 0:O.Message)==="duplicated entry"?v({payload:A,response:R},N,S):O!=null&&O.Id?{...R,status:"success"}:{...R,status:"error"}}catch(L){return console.error("error",L),{...R,status:"error"}}},[v]),j=g.useCallback(async(P,S,N)=>{P.preventDefault();const R=new FormData(P.target);if(R.append("acceptedTerms",p.current?"true":"false"),p.current){const L=new Zr.TZDate(new Date,"America/Sao_Paulo").toISOString();R.append("termsAcceptedAt",L)}S&&Object.keys(S).forEach(L=>{R.append(L,S[L])});const A=await C({formData:R},N??"",t);A&&(f(A==null?void 0:A.status),_(A.inputsStatus),A.status==="success"&&i({functionKey:"readyEvents",data:{event:"generate_lead"}}))},[t,C,f,_,i]),b=g.useCallback(P=>{const S=new FormData(P.currentTarget.parentElement),{hasEmptyFields:N,hasErrors:R,inputStatusToUpdate:A}=Qp({formData:S,mountedFields:l,inputsStatus:h,hasTermsAndConditions:c,checkboxRef:p,setFormStatus:f});if(_(A),N||R){P.preventDefault();return}f("loading")},[l,h,c,p]),w=g.useCallback(()=>{f("idle"),_(u)},[u]);return n.jsx(wc.Provider,{value:g.useMemo(()=>({formStatus:m,handleSubmit:j,setFormStatus:f,inputsStatus:h,setInputsStatus:_,hasTermsAndConditions:c,handleClickToSubmit:b,checkboxRef:p,masterDataEmailField:t,fields:r,variant:s,resetNewsletter:w}),[m,j,f,h,_,b,c,p,t,r,s,w]),children:e})},Qs=()=>{const e=g.useContext(wc);if(e===void 0)throw new Error("useNewsletterContext must be used within a NewsletterProvider");return e},Nc=g.createContext({}),Ec=({children:e,data:t})=>{const[r,s]=g.useState(),[o,a]=g.useState(),i=g.useCallback(u=>{const p=t.filter(m=>m.cidade===u);s(p)},[t]),c=g.useCallback(u=>{a(u)},[]),l=g.useCallback(()=>{a("")},[]);return n.jsx(Nc.Provider,{value:g.useMemo(()=>({clearSelectedStore:l,data:t,handleSelectCity:i,handleSelectStore:c,selectedCity:r,selectedStore:o}),[l,t,i,c,r,o]),children:e})},Jn=()=>{const e=g.useContext(Nc);if(e===void 0)throw new Error("useLPStoreContext must be used within a LPStoreProvider");return e},nn={contexts:{addToCart:{hook:xt,provider:Bi},cart:{hook:ve,provider:vp},cms:{FlagsAndTags:{context:Ts,hook:yt,provider:Mm}},newsletter:{hook:Qs,provider:Pc},events:{hook:ae,provider:Hm},global:{hook:ne,provider:ap,mediator:gi},header:{hook:Ne,provider:gp},menuMobile:{hook:Bs,provider:zi},next:{hook:ce,provider:ip},pdp:{provider:Dm},PDPContent:{provider:qp,hook:jc},plp:{provider:kp,hook:Ws},plpFilter:{hook:Vt,provider:vc},PLPContent:{provider:Up,hook:Zn},plpInfinite:{provider:gc,hook:dt},pdpdata:{provider:Vm},searchFacets:{hook:Ki,provider:Gi},searchProducts:{hook:un,provider:Vs},searchRoot:{hook:qs,provider:Us},searchSearch:{hook:Fe,provider:Hs},session:{hook:Ht,provider:Fp},ui:{hook:on,provider:_i},lpStore:{hook:Jn,provider:Ec}},hooks:{useBackPDC:za,useClipboard:Wm,useDisableZoom:Xa,useLocalStorage:Km,useOnScreen:As,useSentinel:Kn,useTouchZoomPan:Ya},stores:{cart:sp,header:lp,pdp:hp,wishlist:_p}},Zp={cart:tp,events:qm,plp:Lp,product:D.productHelpers,utils:Xp},Zs={helpers:Zp},He={"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"},Ic=({brand:e,className:t,name:r,...s})=>n.jsxs("div",{...s,className:d.helpers.classNameConcat(He["add-to-cart--card--name"],t),children:[n.jsx(d.Tag,{style:{textTransform:"uppercase"},size:"small",variant:"quaternary",title:e,children:e}),n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{alignContent:"flex-start",alignItems:"flex-start",children:n.jsx("p",{className:"typography-style-body-md",children:r})})})]});Ic.displayName="AddToCart.Card.Name";const Rc=({className:e,listPrice:t,price:r,quantity:s,productId:o,...a})=>{const i=D.formatPriceToCurrency(r/100),c=D.formatPriceToCurrency(t/100);return n.jsx("div",{...a,className:d.helpers.classNameConcat(He["add-to-cart--card--price-quantity"],e),children:n.jsx(d.ProductInfo.Root,{size:"small",layout:"vertical",children:n.jsx(d.ProductInfo.Wrapper,{size:"small",layout:"vertical",children:n.jsx(d.ProductInfo.ValuesWrapper,{children:r!==t?n.jsxs(n.Fragment,{children:[n.jsx(d.ProductInfo.Price,{label:"originalPrice",value:i,size:"small"},"price-list"),n.jsx(d.ProductInfo.Price,{label:"discountPrice",value:c,size:"small"},"price-low")]}):n.jsx(d.ProductInfo.Price,{label:"defaultPrice",value:c,size:"small"},"price-low")})})})})};Rc.displayName="AddToCart.Card.PriceQuantity";const Jp="_skeleton_12b79_1",ef={skeleton:Jp},Tc=({style:e})=>n.jsx("div",{style:e,className:ef.skeleton}),tf="_image_1y08u_1",nf={image:tf},rf=({alt:e,className:t,objectFit:r,...s})=>{const{nextimage:o}=ce();return n.jsx(o,{quality:90,...s,alt:e??"",className:d.helpers.classNameConcat(nf.image,t),"data-object-fit":r??"cover"})},sf=({videoRef:e,...t})=>n.jsx("video",{...t,ref:e,children:n.jsx("track",{kind:"captions"})}),Pe={Image:rf,Video:sf},Ac=({className:e,productGroupID:t,size:r,texture:s,storeId:o,...a})=>{const{CONSTANTS:{TEXTURE_IMAGE:i,TOGGLE_STYLE_MODIFIER:c}}=xt(),[l,u]=g.useState(s??"");return g.useEffect(()=>{l||fetch(`https://${o}.myvtex.com/_v/proxy/catalog/product/info`,{method:"POST",body:JSON.stringify({ids:[t]})}).then(p=>p.json()).then(p=>{const m=p.data[0].items[0];if(m){const f=m.images.find(h=>i.includes(h.imageLabel));f!=null&&f.imageUrl?u(f.imageUrl):u(m.images[0].imageUrl)}}).catch(p=>{console.error(p)})},[l,t,o]),n.jsxs("div",{...a,className:d.helpers.classNameConcat(He["add-to-cart--card--style-size"],e),children:[n.jsx(d.ToggleStyle.Wrapper,{size:"x-small",style:c,children:n.jsx(d.ToggleStyle.Texture,{children:l?n.jsx(Pe.Image,{alt:"",src:l??"",width:164,height:164,style:c}):n.jsx(Tc,{})})}),n.jsx(d.Utils.Divider,{direction:"vertical",size:"medium",style:{height:24}}),r&&n.jsxs(d.ToggleSize.Wrapper,{size:"small",title:"wrapper-texture",children:[n.jsx(d.ToggleSize.DisabledAdornment,{title:"disabled-adornment-texture"}),n.jsx(d.ToggleSize.Text,{children:r})]})]})};Ac.displayName="AddToCart.Card.StyleSize";const{helpers:of}=Zs,kc=({className:e,item:t,texture:r,storeId:s,...o})=>{const{itemOffered:{name:a,brand:i,skuName:c,isVariationOf:{productGroupID:l}},quantity:u,price:p,sellingPrice:m}=t,{CONSTANTS:{NAME_SPLIT_SYMBOL:f}}=xt(),{size:h}=of.product.getColorAndSizeFromSkuName(c??a,f);return n.jsxs("div",{...o,className:d.helpers.classNameConcat(He["add-to-cart--card--content"],e),children:[n.jsx(Ic,{brand:i.name,name:a}),n.jsx(Rc,{price:p,listPrice:m,quantity:u,productId:t.id}),n.jsx(Ac,{size:h,texture:r,productGroupID:l,storeId:s})]})};kc.displayName="AddToCart.Card.Content";const Oc=({image:e,thumbnail:t=!1})=>n.jsx(Pe.Image,{alt:e.alternateName??"image","data-thumbnail":t,height:t?152:120,src:e.url,width:t?152:94});Oc.displayName="AddToCart.Card";const Lc=({className:e,item:t,texture:r,thumbnail:s,storeId:o,...a})=>{const{itemOffered:{image:[i]}}=t,c=D.updatedResizedImg(i.url,{width:200,height:300});return n.jsxs("div",{...a,className:d.helpers.classNameConcat(He["add-to-cart--card"],e),children:[n.jsx(Oc,{image:{alternateName:i.alternateName||"Produto",url:c||""},thumbnail:s}),!s&&n.jsx(kc,{item:t,texture:r,storeId:o})]})};Lc.displayName="AddToCart.Card";const Mc=({className:e,children:t,title:r,...s})=>n.jsxs("div",{...s,className:d.helpers.classNameConcat(He["add-to-cart--content"],e),children:[n.jsx("div",{className:He["add-to-cart--content--title"],children:r&&n.jsx("h2",{children:r})}),t,n.jsx(wt.Footer,{})]});Mc.displayName="AddToCart.Layout.Content";const Dc=({className:e,...t})=>{var h,_;const{isMobile:r,handleClose:s,CONSTANTS:{ADD_TO_CART:o}}=xt(),{cartStore:{totalizers:a},setIsOpen:i}=ve(),c=(h=a.find(y=>y.id==="Discounts"))==null?void 0:h.value,l=((_=a.find(y=>y.id==="Items"))==null?void 0:_.value)??0,u=a.find(y=>y.id==="Shipping"),m=(l-Math.abs(c??0)+((u==null?void 0:u.value)??0))/100,f=D.formatPriceToCurrency(m??0);return n.jsxs("div",{...t,className:d.helpers.classNameConcat(He["add-to-cart--footer"],e),children:[n.jsxs("div",{className:He["add-to-cart--footer--total"],children:[n.jsx("span",{children:"Subtotal:"}),n.jsx("span",{children:f})]}),n.jsx(d.Button,{size:"medium",variant:"primary","data-close":!0,onClick:()=>i(!0),children:o.footer.bag}),r?n.jsx(d.Button,{"data-close":!0,size:"medium",variant:"tertiary",children:o.footer.keep_buying}):n.jsx(d.Button,{onClick:()=>s(),size:"medium",variant:"tertiary",children:o.footer.keep_buying})]})};Dc.displayName="AddToCart.Layout.Footer";const $c=({children:e,className:t,thumbnail:r=!1,...s})=>{const{cartStore:{options:o}}=ve(),{recentlyAddedProducts:a}=on(),{CONSTANTS:{storeId:i}}=xt(),c=a.length>3?4:a.length;return n.jsxs("div",{...s,className:He["add-to-cart--items"],"data-thumbnail":r,children:[Array.isArray(a)&&a.filter((l,u)=>u<c).map(l=>{var p;const u=(p=o==null?void 0:o.find(m=>m.id===l.itemOffered.isVariationOf.productGroupID))==null?void 0:p.texture;return n.jsx(wt.Card,{item:l,thumbnail:r,texture:u,storeId:i},l.itemOffered.sku)}),e]})};$c.displayName="AddToCart.Layout.Items";const zc=({children:e,Z_INDEX_WAR:t})=>{const{isOpen:r,setIsOpen:s}=xt(),{isMobile:o}=ne();return n.jsxs(d.Modal.Root,{"data-modal":"add-to-cart--modal",className:He["add-to-cart__modal"],isMobile:o??!1,isOpen:r,setIsOpen:s,variant:"sideBottom",style:{zIndex:t.modal},children:[n.jsx(d.Modal.Header,{navigation:"top",children:n.jsx(d.Modal.Controls,{navigation:"top",isMobile:!0})}),n.jsx(d.Modal.Body,{children:e})]})};zc.displayName="AddToCart.Modal";const af=({children:e})=>{const{count:t,handleClose:r,setIsOpen:s}=xt(),o=g.useRef(t);return g.useEffect(()=>{t>o.current&&s(!0),t<o.current&&o.current>=1&&r(),o.current=t},[t,r,s]),n.jsx(n.Fragment,{children:e})},Fc=({children:e,component:t,CONSTANTS:r,...s})=>{const{recentlyAddedProducts:o}=on(),{isMobile:a}=ne(),i=o.length>3?4:o.length;return n.jsx(Bi,{...s,count:i,isMobile:a,CONSTANTS:r,children:n.jsx(af,{children:a?n.jsxs(n.Fragment,{children:[n.jsx(wt.Modal,{Z_INDEX_WAR:r.Z_INDEX_WAR,children:t}),e]}):n.jsx(wt.Tooltip,{component:t,style:{width:350},Z_INDEX_WAR:r.Z_INDEX_WAR,children:e})})})};Fc.displayName="AddToCart.Root";const Bc=({children:e,component:t,Z_INDEX_WAR:r,...s})=>{const{contentRef:o,left:a,isLeaving:i,target:c,isOpen:l,top:u}=xt();return n.jsx(d.Tooltip.Root,{arrow:"top-right",component:n.jsx("div",{...s,ref:o,children:t}),id:"add-to-cart--tooltip",className:He["add-to-cart--tooltip"],style:{zIndex:r.modal},isLeaving:i,isOpen:l,left:a,size:"medium",position:"top",top:u,children:n.jsx("div",{className:He["add-to-cart--tooltip"],ref:c,children:e})})};Bc.displayName="AddToCart.Tooltip";const wt={Card:Lc,Content:Mc,Footer:Dc,Items:$c,Modal:zc,Root:Fc,Tooltip:Bc},Js=({title:e,...t})=>{const{recentlyAddedProducts:r}=on(),{isMobile:s}=ne(),o=r.length>3?4:r.length,a=r.length>(o??1),i=r.length>1;return n.jsx(wt.Root,{isMobile:s,count:r.length,component:n.jsx(wt.Content,{title:e,children:n.jsx(wt.Items,{thumbnail:i,children:a&&n.jsx(d.Badge.Count,{count:r.length-o,size:"medium",variant:"secondary"})})}),...t})};Js.displayName="AddToCart";const No={"backtotop-btn":"_backtotop-btn_1shb6_1","card-modifier":"_card-modifier_1shb6_27"},cf=({children:e,className:t,classNameButton:r,adornment:s,iconPosition:o,scrollToOptions:a,style:i,...c})=>{const l={top:(a==null?void 0:a.top)??0,left:(a==null?void 0:a.left)??0,behavior:(a==null?void 0:a.behavior)??"smooth"},p=o&&s?{flexDirection:{top:"column",bottom:"column-reverse",left:"row",right:"row-reverse"}[o]}:{},m=()=>{window&&window.document.body.scrollTo({...l})};return n.jsx(d.Card,{...c,shadow:!0,padding:"small",className:d.helpers.classNameConcat(No["card-modifier"],t),style:{...i,padding:0},children:n.jsxs("button",{className:d.helpers.classNameConcat(No["backtotop-btn"],r),onClick:m,style:{...p},"data-orientation":o,children:[s,e]})})},lf="_container_1sy8s_16",ht={"carousel-container":"_carousel-container_1sy8s_1","add-cart-container":"_add-cart-container_1sy8s_8",container:lf,"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"},uf=({selectedProducts:e,handleAddAllToCart:t,CONSTANTS:r})=>{const s=Object.values(e.products).length;return n.jsxs("div",{className:ht["add-itens-to-cart-container"],children:[n.jsxs("div",{className:ht["add-itens-to-cart-container-values"],children:[n.jsx("div",{className:ht["add-itens-to-cart-qty-products"],children:n.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"}`})}),n.jsx("div",{className:ht["add-itens-to-cart-total"],children:n.jsx("span",{children:D.freightParsePrice({valueInCents:e.totalPrice*100,hasFree:!1,freeTaxMessage:r.FREIGHT_CALCULATION.messages.free_tax})})})]}),n.jsx(d.Button,{onClick:t,className:ht["add-button"],size:"large",disabled:s===0,variant:"primary",children:r.BUY_BUTTON_LABELS.add_to_cart})]})},df=e=>e.reduce((t,r)=>{var o;const s=t.find(a=>a.node.id===r.node.id);if(!s)return[...t,r];if((o=s==null?void 0:s.node.isVariantOf)!=null&&o.hasVariant){const a=s.node.isVariantOf.hasVariant,i=r.node.isVariantOf.hasVariant;a&&i&&(s.node.isVariantOf.hasVariant=[...a,...i])}return t},[]),mf=({selectedProduct:e,productId:t,prevState:r,mainSellerId:s})=>{const{products:o,totalPrice:a}=r;try{if(!e){const{[t]:u,...p}=o;return{...r,totalPrice:a-u.price,products:p}}const i=D.getValidOffer(e.offers.offers,s);if(!i)return r;const c=i.seller.identifier,l=i.price;if(o[t]){const{price:u}=o[t];return o[t]={...o[t],price:l,id:e.sku,seller:c},{totalPrice:a+l-u,products:{...o}}}return{totalPrice:a+l,products:{...o,[t]:{id:e.sku,price:l,seller:c,productId:t}}}}catch(i){return console.error("Error handling SKU selection:",i),r}},Uc=g.createContext({}),pf=({children:e,item:t,index:r,shelfTitle:s,...o})=>{const[a,i]=g.useState(null),c=g.useRef(null),l=g.useRef({availableSkus:[],priceInfo:{price:0,listPrice:0}}),{sendDataLayerEvent:u,itemListRef:p}=ae(),m=y=>{u({functionKey:"productEvents",data:{commonData:{...t,availableSizes:l.current.availableSkus,...l.current.priceInfo},customData:{index:r+1},event:y}})},f=()=>{m("add_to_wishlist")},h=()=>{u({functionKey:"skuEvents",data:{event:"add_to_cart",commonData:{products:[{...t,...l.current.priceInfo}]},supportData:{selectedSku:a,selectedSkus:[a]},customData:{index:r}}})},_=()=>{s&&(p.current={item_list_name:s}),m("select_item")};return n.jsx(Uc.Provider,{value:g.useMemo(()=>({...o,index:r,item:t,element:c,selectedSku:a,setSelectedSku:i,eventDataRef:l,sendAddToWishlistEvent:f,sendSelectItemEvent:_,sendAddToCartEvent:h}),[o,t,c,a]),children:e})},Ye=()=>{const e=g.useContext(Uc);if(e===void 0)throw new Error("useProductCardContext must be used within a ProductCardProvider");return e},Re={"product-card--actions":"_product-card--actions_bndjh_1","product-card--actions--group":"_product-card--actions--group_bndjh_9","product-card--actions--selectors":"_product-card--actions--selectors_bndjh_21","product-card--body":"_product-card--body_bndjh_33","product-card--header":"_product-card--header_bndjh_47","product-card--footer":"_product-card--footer_bndjh_67","product-card--image":"_product-card--image_bndjh_90","product-card--image--container":"_product-card--image--container_bndjh_97","product-card--outstock":"_product-card--outstock_bndjh_133","product-card--price":"_product-card--price_bndjh_155","product-card--title":"_product-card--title_bndjh_177","product-card--title--tag":"_product-card--title--tag_bndjh_183","product-card--title--content":"_product-card--title--content_bndjh_200","product-card--selectors--size":"_product-card--selectors--size_bndjh_240","product-card--selectors--size--button":"_product-card--selectors--size--button_bndjh_266","product-card--selectors--size--skus":"_product-card--selectors--size--skus_bndjh_275","product-card--selectors--style":"_product-card--selectors--style_bndjh_289","product-card--selectors--style--more":"_product-card--selectors--style--more_bndjh_299","product-card--video":"_product-card--video_bndjh_316","product-card--wrapper":"_product-card--wrapper_bndjh_342"},qc=({callback:e,children:t,className:r,data:s,isKit:o,...a})=>{const{item:{availability:{status:i},image:c}}=Ye();return i?n.jsxs("div",{...a,className:d.helpers.classNameConcat(Re["product-card--actions"],r),children:[n.jsxs(fe.Wrapper,{type:"actions--group",children:[n.jsx(fe.Price,{}),n.jsx("div",{className:Re["product-card--actions--selectors"],children:!o&&n.jsx(fe.StyleSelector,{data:s,images:c,callback:e})})]}),t]}):null};qc.displayName="ProductCard.Actions";const Hc=({className:e,isKit:t,...r})=>{const{addToCart:s}=ve(),{isMobile:o=!1,selectedSku:a,outStock:i,item:c,sendAddToCartEvent:l,CONSTANTS:u}=Ye(),p=()=>{var h;if(!a)return;const f=D.getValidOffer(a.offers.offers,u.StoreConfig_MainSellerId);f&&s({id:a==null?void 0:a.sku,quantity:1,seller:f.seller.identifier},{id:c.id,texture:(h=c==null?void 0:c.image.find(_=>u.TEXTURE_IMAGE.includes(_.alternateName)))==null?void 0:h.url}),l()},m=a?u.BUY_BUTTON_LABELS.add_to_cart:u.BUY_BUTTON_LABELS.select_size;return n.jsx(d.Button,{...r,className:d.helpers.classNameConcat(e,"buy-button"),disabled:!t&&!a&&!i,size:o?"medium":"large",variant:i?"secondary":"primary",onClick:i?r.onClick:p,children:i?"Avise-me quando chegar":m})};Hc.displayName="ProductCard.Actions.BuyButton";const ff={"snackbar-modifier":"_snackbar-modifier_1va2l_1"},zt=({size:e,adornment:t,title:r,subtitle:s,supportChildren:o,className:a,Z_INDEX_WAR:i,...c})=>n.jsxs(d.SnackBar.Structure,{...c,size:e,className:d.helpers.classNameConcat(ff["snackbar-modifier"],a),width:360,style:{zIndex:i.snackbar},children:[n.jsx(d.SnackBar.Content,{adornment:t,title:r,subtitle:s}),o&&n.jsx(d.SnackBar.Support,{children:o})]});zt.displayName="SnackBar";const Jt={"wishlist--snack":"_wishlist--snack_3qi1o_9","wishlist--snack--actions":"_wishlist--snack--actions_3qi1o_25","wishlist-grid":"_wishlist-grid_3qi1o_31","wishlist-grid--container":"_wishlist-grid--container_3qi1o_39","pdc-empty-modifier":"_pdc-empty-modifier_3qi1o_49"};var os={exports:{}},Oe={};Oe._=Oe._interop_require_default=hf;function hf(e){return e&&e.__esModule?e:{default:e}}var yn={exports:{}},pr={},Eo;function Vc(){return Eo||(Eo=1,function(e){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,{assign:function(){return a},searchParamsToUrlQuery:function(){return r},urlQueryToSearchParams:function(){return o}});function r(i){const c={};return i.forEach((l,u)=>{typeof c[u]>"u"?c[u]=l:Array.isArray(c[u])?c[u].push(l):c[u]=[c[u],l]}),c}function s(i){return typeof i=="string"||typeof i=="number"&&!isNaN(i)||typeof i=="boolean"?String(i):""}function o(i){const c=new URLSearchParams;return Object.entries(i).forEach(l=>{let[u,p]=l;Array.isArray(p)?p.forEach(m=>c.append(u,s(m))):c.set(u,s(p))}),c}function a(i){for(var c=arguments.length,l=new Array(c>1?c-1:0),u=1;u<c;u++)l[u-1]=arguments[u];return l.forEach(p=>{Array.from(p.keys()).forEach(m=>i.delete(m)),p.forEach((m,f)=>i.append(f,m))}),i}}(pr)),pr}var fr={},Nt={};function Wc(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,r=new WeakMap;return(Wc=function(s){return s?r:t})(e)}Nt._=Nt._interop_require_wildcard=_f;function _f(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var r=Wc(t);if(r&&r.has(e))return r.get(e);var s={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(a!=="default"&&Object.prototype.hasOwnProperty.call(e,a)){var i=o?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(s,a,i):s[a]=e[a]}return s.default=e,r&&r.set(e,s),s}var Io;function Gc(){return Io||(Io=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(l,u){for(var p in u)Object.defineProperty(l,p,{enumerable:!0,get:u[p]})}t(e,{formatUrl:function(){return a},formatWithValidation:function(){return c},urlObjectKeys:function(){return i}});const s=Nt._(Vc()),o=/https?|ftp|gopher|file/;function a(l){let{auth:u,hostname:p}=l,m=l.protocol||"",f=l.pathname||"",h=l.hash||"",_=l.query||"",y=!1;u=u?encodeURIComponent(u).replace(/%3A/i,":")+"@":"",l.host?y=u+l.host:p&&(y=u+(~p.indexOf(":")?"["+p+"]":p),l.port&&(y+=":"+l.port)),_&&typeof _=="object"&&(_=String(s.urlQueryToSearchParams(_)));let x=l.search||_&&"?"+_||"";return m&&!m.endsWith(":")&&(m+=":"),l.slashes||(!m||o.test(m))&&y!==!1?(y="//"+(y||""),f&&f[0]!=="/"&&(f="/"+f)):y||(y=""),h&&h[0]!=="#"&&(h="#"+h),x&&x[0]!=="?"&&(x="?"+x),f=f.replace(/[?#]/g,encodeURIComponent),x=x.replace("#","%23"),""+m+y+f+x+h}const i=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function c(l){return process.env.NODE_ENV==="development"&&l!==null&&typeof l=="object"&&Object.keys(l).forEach(u=>{i.includes(u)||console.warn("Unknown key passed via urlObject into url.format: "+u)}),a(l)}}(fr)),fr}var hr={},Ro;function gf(){return Ro||(Ro=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"omit",{enumerable:!0,get:function(){return t}});function t(r,s){const o={};return Object.keys(r).forEach(a=>{s.includes(a)||(o[a]=r[a])}),o}}(hr)),hr}var _r={},To;function er(){return To||(To=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(b,w){for(var P in w)Object.defineProperty(b,P,{enumerable:!0,get:w[P]})}t(e,{DecodeError:function(){return _},MiddlewareNotFoundError:function(){return C},MissingStaticPage:function(){return v},NormalizeError:function(){return y},PageNotFoundError:function(){return x},SP:function(){return f},ST:function(){return h},WEB_VITALS:function(){return r},execOnce:function(){return s},getDisplayName:function(){return l},getLocationOrigin:function(){return i},getURL:function(){return c},isAbsoluteUrl:function(){return a},isResSent:function(){return u},loadGetInitialProps:function(){return m},normalizeRepeatedSlashes:function(){return p},stringifyError:function(){return j}});const r=["CLS","FCP","FID","INP","LCP","TTFB"];function s(b){let w=!1,P;return function(){for(var S=arguments.length,N=new Array(S),R=0;R<S;R++)N[R]=arguments[R];return w||(w=!0,P=b(...N)),P}}const o=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,a=b=>o.test(b);function i(){const{protocol:b,hostname:w,port:P}=window.location;return b+"//"+w+(P?":"+P:"")}function c(){const{href:b}=window.location,w=i();return b.substring(w.length)}function l(b){return typeof b=="string"?b:b.displayName||b.name||"Unknown"}function u(b){return b.finished||b.headersSent}function p(b){const w=b.split("?");return w[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(w[1]?"?"+w.slice(1).join("?"):"")}async function m(b,w){if(process.env.NODE_ENV!=="production"){var P;if((P=b.prototype)!=null&&P.getInitialProps){const R='"'+l(b)+'.getInitialProps()" is defined as an instance method - visit https://nextjs.org/docs/messages/get-initial-props-as-an-instance-method for more information.';throw new Error(R)}}const S=w.res||w.ctx&&w.ctx.res;if(!b.getInitialProps)return w.ctx&&w.Component?{pageProps:await m(w.Component,w.ctx)}:{};const N=await b.getInitialProps(w);if(S&&u(S))return N;if(!N){const R='"'+l(b)+'.getInitialProps()" should resolve to an object. But found "'+N+'" instead.';throw new Error(R)}return process.env.NODE_ENV!=="production"&&Object.keys(N).length===0&&!w.ctx&&console.warn(""+l(b)+" returned an empty object from `getInitialProps`. This de-optimizes and prevents automatic static optimization. https://nextjs.org/docs/messages/empty-object-getInitialProps"),N}const f=typeof performance<"u",h=f&&["mark","measure","getEntriesByName"].every(b=>typeof performance[b]=="function");class _ extends Error{}class y extends Error{}class x extends Error{constructor(w){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message="Cannot find module for page: "+w}}class v extends Error{constructor(w,P){super(),this.message="Failed to load static file for page: "+w+" "+P}}class C extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function j(b){return JSON.stringify({message:b.message,stack:b.stack})}}(_r)),_r}var xn={exports:{}},Ao;function tr(){return Ao||(Ao=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizePathTrailingSlash",{enumerable:!0,get:function(){return o}});const r=D.removeTrailingSlash,s=D.parsePath,o=a=>{if(!a.startsWith("/")||process.env.__NEXT_MANUAL_TRAILING_SLASH)return a;const{pathname:i,query:c,hash:l}=(0,s.parsePath)(a);return process.env.__NEXT_TRAILING_SLASH?/\.[^/]+\/?$/.test(i)?""+(0,r.removeTrailingSlash)(i)+c+l:i.endsWith("/")?""+i+c+l:i+"/"+c+l:""+(0,r.removeTrailingSlash)(i)+c+l};(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)}(xn,xn.exports)),xn.exports}var gr={},vn={exports:{}},ko;function yf(){return ko||(ko=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"hasBasePath",{enumerable:!0,get:function(){return o}});const r=D.pathHasPrefix,s=process.env.__NEXT_ROUTER_BASEPATH||"";function o(a){return(0,r.pathHasPrefix)(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)}(vn,vn.exports)),vn.exports}var Oo;function Kc(){return Oo||(Oo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"isLocalURL",{enumerable:!0,get:function(){return s}});const t=er(),r=yf();function s(o){if(!(0,t.isAbsoluteUrl)(o))return!0;try{const a=(0,t.getLocationOrigin)(),i=new URL(o,a);return i.origin===a&&(0,r.hasBasePath)(i.pathname)}catch{return!1}}}(gr)),gr}var yr={},xr={},Lo;function xf(){return Lo||(Lo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getSortedRoutes",{enumerable:!0,get:function(){return r}});class t{insert(o){this._insert(o.split("/").filter(Boolean),[],!1)}smoosh(){return this._smoosh()}_smoosh(o){o===void 0&&(o="/");const a=[...this.children.keys()].sort();this.slugName!==null&&a.splice(a.indexOf("[]"),1),this.restSlugName!==null&&a.splice(a.indexOf("[...]"),1),this.optionalRestSlugName!==null&&a.splice(a.indexOf("[[...]]"),1);const i=a.map(c=>this.children.get(c)._smoosh(""+o+c+"/")).reduce((c,l)=>[...c,...l],[]);if(this.slugName!==null&&i.push(...this.children.get("[]")._smoosh(o+"["+this.slugName+"]/")),!this.placeholder){const c=o==="/"?"/":o.slice(0,-1);if(this.optionalRestSlugName!=null)throw new Error('You cannot define a route with the same specificity as a optional catch-all route ("'+c+'" and "'+c+"[[..."+this.optionalRestSlugName+']]").');i.unshift(c)}return this.restSlugName!==null&&i.push(...this.children.get("[...]")._smoosh(o+"[..."+this.restSlugName+"]/")),this.optionalRestSlugName!==null&&i.push(...this.children.get("[[...]]")._smoosh(o+"[[..."+this.optionalRestSlugName+"]]/")),i}_insert(o,a,i){if(o.length===0){this.placeholder=!1;return}if(i)throw new Error("Catch-all must be the last part of the URL.");let c=o[0];if(c.startsWith("[")&&c.endsWith("]")){let p=function(m,f){if(m!==null&&m!==f)throw new Error("You cannot use different slug names for the same dynamic path ('"+m+"' !== '"+f+"').");a.forEach(h=>{if(h===f)throw new Error('You cannot have the same slug name "'+f+'" repeat within a single dynamic path');if(h.replace(/\W/g,"")===c.replace(/\W/g,""))throw new Error('You cannot have the slug names "'+h+'" and "'+f+'" differ only by non-word symbols within a single dynamic path')}),a.push(f)},l=c.slice(1,-1),u=!1;if(l.startsWith("[")&&l.endsWith("]")&&(l=l.slice(1,-1),u=!0),l.startsWith("...")&&(l=l.substring(3),i=!0),l.startsWith("[")||l.endsWith("]"))throw new Error("Segment names may not start or end with extra brackets ('"+l+"').");if(l.startsWith("."))throw new Error("Segment names may not start with erroneous periods ('"+l+"').");if(i)if(u){if(this.restSlugName!=null)throw new Error('You cannot use both an required and optional catch-all route at the same level ("[...'+this.restSlugName+']" and "'+o[0]+'" ).');p(this.optionalRestSlugName,l),this.optionalRestSlugName=l,c="[[...]]"}else{if(this.optionalRestSlugName!=null)throw new Error('You cannot use both an optional and required catch-all route at the same level ("[[...'+this.optionalRestSlugName+']]" and "'+o[0]+'").');p(this.restSlugName,l),this.restSlugName=l,c="[...]"}else{if(u)throw new Error('Optional route parameters are not yet supported ("'+o[0]+'").');p(this.slugName,l),this.slugName=l,c="[]"}}this.children.has(c)||this.children.set(c,new t),this.children.get(c)._insert(o.slice(1),a,i)}constructor(){this.placeholder=!0,this.children=new Map,this.slugName=null,this.restSlugName=null,this.optionalRestSlugName=null}}function r(s){const o=new t;return s.forEach(a=>o.insert(a)),o.smoosh()}}(xr)),xr}var vr={},br={},jr={},Cr={},Mo;function vf(){return Mo||(Mo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"ensureLeadingSlash",{enumerable:!0,get:function(){return t}});function t(r){return r.startsWith("/")?r:"/"+r}}(Cr)),Cr}var eo={};(function(e){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,{DEFAULT_SEGMENT_KEY:function(){return o},PAGE_SEGMENT_KEY:function(){return s},isGroupSegment:function(){return r}});function r(a){return a[0]==="("&&a.endsWith(")")}const s="__PAGE__",o="__DEFAULT__"})(eo);var Do;function bf(){return Do||(Do=1,function(e){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,{normalizeAppPath:function(){return o},normalizeRscURL:function(){return a}});const r=vf(),s=eo;function o(i){return(0,r.ensureLeadingSlash)(i.split("/").reduce((c,l,u,p)=>!l||(0,s.isGroupSegment)(l)||l[0]==="@"||(l==="page"||l==="route")&&u===p.length-1?c:c+"/"+l,""))}function a(i){return i.replace(/\.rsc($|\?)/,"$1")}}(jr)),jr}var $o;function Xc(){return $o||($o=1,function(e){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,{INTERCEPTION_ROUTE_MARKERS:function(){return s},extractInterceptionRouteInformation:function(){return a},isInterceptionRouteAppPath:function(){return o}});const r=bf(),s=["(..)(..)","(.)","(..)","(...)"];function o(i){return i.split("/").find(c=>s.find(l=>c.startsWith(l)))!==void 0}function a(i){let c,l,u;for(const p of i.split("/"))if(l=s.find(m=>p.startsWith(m)),l){[c,u]=i.split(l,2);break}if(!c||!l||!u)throw new Error(`Invalid interception route: ${i}. Must be in the format /<intercepting route>/(..|...|..)(..)/<intercepted route>`);switch(c=(0,r.normalizeAppPath)(c),l){case"(.)":c==="/"?u=`/${u}`:u=c+"/"+u;break;case"(..)":if(c==="/")throw new Error(`Invalid interception route: ${i}. Cannot use (..) marker at the root level, use (.) instead.`);u=c.split("/").slice(0,-1).concat(u).join("/");break;case"(...)":u="/"+u;break;case"(..)(..)":const p=c.split("/");if(p.length<=2)throw new Error(`Invalid interception route: ${i}. Cannot use (..)(..) marker at the root level or one level up.`);u=p.slice(0,-2).concat(u).join("/");break;default:throw new Error("Invariant: unexpected marker")}return{interceptingRoute:c,interceptedRoute:u}}}(br)),br}var zo;function jf(){return zo||(zo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"isDynamicRoute",{enumerable:!0,get:function(){return s}});const t=Xc(),r=/\/\[[^/]+?\](?=\/|$)/;function s(o){return(0,t.isInterceptionRouteAppPath)(o)&&(o=(0,t.extractInterceptionRouteInformation)(o).interceptedRoute),r.test(o)}}(vr)),vr}var Fo;function Cf(){return Fo||(Fo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(o,a){for(var i in a)Object.defineProperty(o,i,{enumerable:!0,get:a[i]})}t(e,{getSortedRoutes:function(){return r.getSortedRoutes},isDynamicRoute:function(){return s.isDynamicRoute}});const r=xf(),s=jf()}(yr)),yr}var Sr={},wr={},Bo;function Sf(){return Bo||(Bo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getRouteMatcher",{enumerable:!0,get:function(){return r}});const t=er();function r(s){let{re:o,groups:a}=s;return i=>{const c=o.exec(i);if(!c)return!1;const l=p=>{try{return decodeURIComponent(p)}catch{throw new t.DecodeError("failed to decode param")}},u={};return Object.keys(a).forEach(p=>{const m=a[p],f=c[m.pos];f!==void 0&&(u[p]=~f.indexOf("/")?f.split("/").map(h=>l(h)):m.repeat?[l(f)]:l(f))}),u}}}(wr)),wr}var Pr={},Nr={},Uo;function wf(){return Uo||(Uo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"escapeStringRegexp",{enumerable:!0,get:function(){return s}});const t=/[|\\{}()[\]^$+*?.-]/,r=/[|\\{}()[\]^$+*?.-]/g;function s(o){return t.test(o)?o.replace(r,"\\$&"):o}}(Nr)),Nr}var qo;function Pf(){return qo||(qo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(_,y){for(var x in y)Object.defineProperty(_,x,{enumerable:!0,get:y[x]})}t(e,{getNamedMiddlewareRegex:function(){return h},getNamedRouteRegex:function(){return f},getRouteRegex:function(){return l},parseParameter:function(){return i}});const r=D.constants,s=Xc(),o=wf(),a=D.removeTrailingSlash;function i(_){const y=_.startsWith("[")&&_.endsWith("]");y&&(_=_.slice(1,-1));const x=_.startsWith("...");return x&&(_=_.slice(3)),{key:_,repeat:x,optional:y}}function c(_){const y=(0,a.removeTrailingSlash)(_).slice(1).split("/"),x={};let v=1;return{parameterizedRoute:y.map(C=>{const j=s.INTERCEPTION_ROUTE_MARKERS.find(w=>C.startsWith(w)),b=C.match(/\[((?:\[.*\])|.+)\]/);if(j&&b){const{key:w,optional:P,repeat:S}=i(b[1]);return x[w]={pos:v++,repeat:S,optional:P},"/"+(0,o.escapeStringRegexp)(j)+"([^/]+?)"}else if(b){const{key:w,repeat:P,optional:S}=i(b[1]);return x[w]={pos:v++,repeat:P,optional:S},P?S?"(?:/(.+?))?":"/(.+?)":"/([^/]+?)"}else return"/"+(0,o.escapeStringRegexp)(C)}).join(""),groups:x}}function l(_){const{parameterizedRoute:y,groups:x}=c(_);return{re:new RegExp("^"+y+"(?:/)?$"),groups:x}}function u(){let _=0;return()=>{let y="",x=++_;for(;x>0;)y+=String.fromCharCode(97+(x-1)%26),x=Math.floor((x-1)/26);return y}}function p(_){let{interceptionMarker:y,getSafeRouteKey:x,segment:v,routeKeys:C,keyPrefix:j}=_;const{key:b,optional:w,repeat:P}=i(v);let S=b.replace(/\W/g,"");j&&(S=""+j+S);let N=!1;(S.length===0||S.length>30)&&(N=!0),isNaN(parseInt(S.slice(0,1)))||(N=!0),N&&(S=x()),j?C[S]=""+j+b:C[S]=b;const R=y?(0,o.escapeStringRegexp)(y):"";return P?w?"(?:/"+R+"(?<"+S+">.+?))?":"/"+R+"(?<"+S+">.+?)":"/"+R+"(?<"+S+">[^/]+?)"}function m(_,y){const x=(0,a.removeTrailingSlash)(_).slice(1).split("/"),v=u(),C={};return{namedParameterizedRoute:x.map(j=>{const b=s.INTERCEPTION_ROUTE_MARKERS.some(P=>j.startsWith(P)),w=j.match(/\[((?:\[.*\])|.+)\]/);if(b&&w){const[P]=j.split(w[0]);return p({getSafeRouteKey:v,interceptionMarker:P,segment:w[1],routeKeys:C,keyPrefix:y?r.NEXT_INTERCEPTION_MARKER_PREFIX:void 0})}else return w?p({getSafeRouteKey:v,segment:w[1],routeKeys:C,keyPrefix:y?r.NEXT_QUERY_PARAM_PREFIX:void 0}):"/"+(0,o.escapeStringRegexp)(j)}).join(""),routeKeys:C}}function f(_,y){const x=m(_,y);return{...l(_),namedRegex:"^"+x.namedParameterizedRoute+"(?:/)?$",routeKeys:x.routeKeys}}function h(_,y){const{parameterizedRoute:x}=c(_),{catchAll:v=!0}=y;if(x==="/")return{namedRegex:"^/"+(v?".*":"")+"$"};const{namedParameterizedRoute:C}=m(_,!1);let j=v?"(?:(/.*)?)":"";return{namedRegex:"^"+C+j+"$"}}}(Pr)),Pr}var Ho;function Nf(){return Ho||(Ho=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"interpolateAs",{enumerable:!0,get:function(){return s}});const t=Sf(),r=Pf();function s(o,a,i){let c="";const l=(0,r.getRouteRegex)(o),u=l.groups,p=(a!==o?(0,t.getRouteMatcher)(l)(a):"")||i;c=o;const m=Object.keys(u);return m.every(f=>{let h=p[f]||"";const{repeat:_,optional:y}=u[f];let x="["+(_?"...":"")+f+"]";return y&&(x=(h?"":"/")+"["+x+"]"),_&&!Array.isArray(h)&&(h=[h]),(y||f in p)&&(c=c.replace(x,_?h.map(v=>encodeURIComponent(v)).join("/"):encodeURIComponent(h))||"/")})||(c=""),{params:m,result:c}}}(Sr)),Sr}var Vo;function Ef(){return Vo||(Vo=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"resolveHref",{enumerable:!0,get:function(){return p}});const r=Vc(),s=Gc(),o=gf(),a=er(),i=tr(),c=Kc(),l=Cf(),u=Nf();function p(m,f,h){let _,y=typeof f=="string"?f:(0,s.formatWithValidation)(f);const x=y.match(/^[a-zA-Z]{1,}:\/\//),v=x?y.slice(x[0].length):y;if((v.split("?",1)[0]||"").match(/(\/\/|\\)/)){console.error("Invalid href '"+y+"' passed to next/router in page: '"+m.pathname+"'. Repeated forward-slashes (//) or backslashes \\ are not valid in the href.");const j=(0,a.normalizeRepeatedSlashes)(v);y=(x?x[0]:"")+j}if(!(0,c.isLocalURL)(y))return h?[y]:y;try{_=new URL(y.startsWith("#")?m.asPath:m.pathname,"http://n")}catch{_=new URL("/","http://n")}try{const j=new URL(y,_);j.pathname=(0,i.normalizePathTrailingSlash)(j.pathname);let b="";if((0,l.isDynamicRoute)(j.pathname)&&j.searchParams&&h){const P=(0,r.searchParamsToUrlQuery)(j.searchParams),{result:S,params:N}=(0,u.interpolateAs)(j.pathname,j.pathname,P);S&&(b=(0,s.formatWithValidation)({pathname:S,hash:j.hash,query:(0,o.omit)(P,N)}))}const w=j.origin===_.origin?j.href.slice(j.origin.length):j.href;return h?[w,b||w]:w}catch{return h?[y]:y}}(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)}(yn,yn.exports)),yn.exports}var bn={exports:{}},Wo;function If(){return Wo||(Wo=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addLocale",{enumerable:!0,get:function(){return s}});const r=tr(),s=function(o){for(var a=arguments.length,i=new Array(a>1?a-1:0),c=1;c<a;c++)i[c-1]=arguments[c];return process.env.__NEXT_I18N_SUPPORT?(0,r.normalizePathTrailingSlash)(D.addLocale.addLocale(o,...i)):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)}(bn,bn.exports)),bn.exports}var Er={},Go;function Yc(){return Go||(Go=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"RouterContext",{enumerable:!0,get:function(){return s}});const s=Oe._(g).default.createContext(null);process.env.NODE_ENV!=="production"&&(s.displayName="RouterContext")}(Er)),Er}var to={};(function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0});function t(u,p){for(var m in p)Object.defineProperty(u,m,{enumerable:!0,get:p[m]})}t(e,{AppRouterContext:function(){return o},GlobalLayoutRouterContext:function(){return i},LayoutRouterContext:function(){return a},MissingSlotContext:function(){return l},TemplateContext:function(){return c}});const s=Oe._(g),o=s.default.createContext(null),a=s.default.createContext(null),i=s.default.createContext(null),c=s.default.createContext(null);process.env.NODE_ENV!=="production"&&(o.displayName="AppRouterContext",a.displayName="LayoutRouterContext",i.displayName="GlobalLayoutRouterContext",c.displayName="TemplateContext");const l=s.default.createContext(new Set)})(to);var jn={exports:{}},Cn={exports:{}},Ko;function Qc(){return Ko||(Ko=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(a,i){for(var c in i)Object.defineProperty(a,c,{enumerable:!0,get:i[c]})}r(t,{cancelIdleCallback:function(){return o},requestIdleCallback:function(){return s}});const s=typeof self<"u"&&self.requestIdleCallback&&self.requestIdleCallback.bind(window)||function(a){let i=Date.now();return self.setTimeout(function(){a({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-i))}})},1)},o=typeof self<"u"&&self.cancelIdleCallback&&self.cancelIdleCallback.bind(window)||function(a){return clearTimeout(a)};(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)}(Cn,Cn.exports)),Cn.exports}var Xo;function Rf(){return Xo||(Xo=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useIntersection",{enumerable:!0,get:function(){return u}});const r=g,s=Qc(),o=typeof IntersectionObserver=="function",a=new Map,i=[];function c(p){const m={root:p.root||null,margin:p.rootMargin||""},f=i.find(x=>x.root===m.root&&x.margin===m.margin);let h;if(f&&(h=a.get(f),h))return h;const _=new Map,y=new IntersectionObserver(x=>{x.forEach(v=>{const C=_.get(v.target),j=v.isIntersecting||v.intersectionRatio>0;C&&j&&C(j)})},p);return h={id:m,observer:y,elements:_},i.push(m),a.set(m,h),h}function l(p,m,f){const{id:h,observer:_,elements:y}=c(f);return y.set(p,m),_.observe(p),function(){if(y.delete(p),_.unobserve(p),y.size===0){_.disconnect(),a.delete(h);const v=i.findIndex(C=>C.root===h.root&&C.margin===h.margin);v>-1&&i.splice(v,1)}}}function u(p){let{rootRef:m,rootMargin:f,disabled:h}=p;const _=h||!o,[y,x]=(0,r.useState)(!1),v=(0,r.useRef)(null),C=(0,r.useCallback)(b=>{v.current=b},[]);(0,r.useEffect)(()=>{if(o){if(_||y)return;const b=v.current;if(b&&b.tagName)return l(b,P=>P&&x(P),{root:m==null?void 0:m.current,rootMargin:f})}else if(!y){const b=(0,s.requestIdleCallback)(()=>x(!0));return()=>(0,s.cancelIdleCallback)(b)}},[_,f,m,y,v.current]);const j=(0,r.useCallback)(()=>{x(!1)},[]);return[C,y,j]}(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)}(jn,jn.exports)),jn.exports}var Sn={exports:{}},wn={exports:{}},Yo;function Tf(){return Yo||(Yo=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizeLocalePath",{enumerable:!0,get:function(){return r}});const r=(s,o)=>process.env.__NEXT_I18N_SUPPORT?D.normalizeLocalePath.normalizeLocalePath(s,o):{pathname:s,detectedLocale:void 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)}(wn,wn.exports)),wn.exports}var Pn={exports:{}},Qo;function Af(){return Qo||(Qo=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"detectDomainLocale",{enumerable:!0,get:function(){return r}});const r=function(){for(var s=arguments.length,o=new Array(s),a=0;a<s;a++)o[a]=arguments[a];if(process.env.__NEXT_I18N_SUPPORT)return D.detectDomainLocale.detectDomainLocale(...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)}(Pn,Pn.exports)),Pn.exports}var Zo;function kf(){return Zo||(Zo=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getDomainLocale",{enumerable:!0,get:function(){return o}});const r=tr(),s=process.env.__NEXT_ROUTER_BASEPATH||"";function o(a,i,c,l){if(process.env.__NEXT_I18N_SUPPORT){const u=Tf().normalizeLocalePath,p=Af().detectDomainLocale,m=i||u(a,c).detectedLocale,f=p(l,void 0,m);if(f){const h="http"+(f.http?"":"s")+"://",_=m===f.defaultLocale?"":"/"+m;return""+h+f.domain+(0,r.normalizePathTrailingSlash)(""+s+_+a)}return!1}else return!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)}(Sn,Sn.exports)),Sn.exports}var Nn={exports:{}},Jo;function Of(){return Jo||(Jo=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addBasePath",{enumerable:!0,get:function(){return a}});const r=D.addPathPrefix,s=tr(),o=process.env.__NEXT_ROUTER_BASEPATH||"";function a(i,c){return(0,s.normalizePathTrailingSlash)(process.env.__NEXT_MANUAL_CLIENT_BASE_PATH&&!c?i:(0,r.addPathPrefix)(i,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)}(Nn,Nn.exports)),Nn.exports}var En={exports:{}},ea;function Lf(){return ea||(ea=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(h,_){for(var y in _)Object.defineProperty(h,y,{enumerable:!0,get:_[y]})}r(t,{ACTION_FAST_REFRESH:function(){return l},ACTION_NAVIGATE:function(){return o},ACTION_PREFETCH:function(){return c},ACTION_REFRESH:function(){return s},ACTION_RESTORE:function(){return a},ACTION_SERVER_ACTION:function(){return u},ACTION_SERVER_PATCH:function(){return i},PrefetchCacheEntryStatus:function(){return m},PrefetchKind:function(){return p},isThenable:function(){return f}});const s="refresh",o="navigate",a="restore",i="server-patch",c="prefetch",l="fast-refresh",u="server-action";var p;(function(h){h.AUTO="auto",h.FULL="full",h.TEMPORARY="temporary"})(p||(p={}));var m;(function(h){h.fresh="fresh",h.reusable="reusable",h.expired="expired",h.stale="stale"})(m||(m={}));function f(h){return h&&(typeof h=="object"||typeof h=="function")&&typeof h.then=="function"}(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)}(En,En.exports)),En.exports}(function(e,t){"use client";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return P}});const r=Oe,s=n,o=r._(g),a=Ef(),i=Kc(),c=Gc(),l=er(),u=If(),p=Yc(),m=to,f=Rf(),h=kf(),_=Of(),y=Lf(),x=new Set;function v(S,N,R,A,L,O){if(typeof window>"u"||!O&&!(0,i.isLocalURL)(N))return;if(!A.bypassPrefetchedCheck){const M=typeof A.locale<"u"?A.locale:"locale"in S?S.locale:void 0,U=N+"%"+R+"%"+M;if(x.has(U))return;x.add(U)}(async()=>O?S.prefetch(N,L):S.prefetch(N,R,A))().catch(M=>{if(process.env.NODE_ENV!=="production")throw M})}function C(S){const R=S.currentTarget.getAttribute("target");return R&&R!=="_self"||S.metaKey||S.ctrlKey||S.shiftKey||S.altKey||S.nativeEvent&&S.nativeEvent.which===2}function j(S,N,R,A,L,O,G,M,U){const{nodeName:Y}=S.currentTarget;if(Y.toUpperCase()==="A"&&(C(S)||!U&&!(0,i.isLocalURL)(R)))return;S.preventDefault();const W=()=>{const z=G??!0;"beforePopState"in N?N[L?"replace":"push"](R,A,{shallow:O,locale:M,scroll:z}):N[L?"replace":"push"](A||R,{scroll:z})};U?o.default.startTransition(W):W()}function b(S){return typeof S=="string"?S:(0,c.formatUrl)(S)}const P=o.default.forwardRef(function(N,R){let A;const{href:L,as:O,children:G,prefetch:M=null,passHref:U,replace:Y,shallow:X,scroll:W,locale:z,onClick:J,onMouseEnter:se,onTouchStart:le,legacyBehavior:oe=!1,...ue}=N;A=G,oe&&(typeof A=="string"||typeof A=="number")&&(A=(0,s.jsx)("a",{children:A}));const $=o.default.useContext(p.RouterContext),ee=o.default.useContext(m.AppRouterContext),E=$??ee,V=!$,ie=M!==!1,_e=M===null?y.PrefetchKind.AUTO:y.PrefetchKind.FULL;if(process.env.NODE_ENV!=="production"){let F=function(B){return new Error("Failed prop type: The prop `"+B.key+"` expects a "+B.expected+" in `<Link>`, but got `"+B.actual+"` instead."+(typeof window<"u"?`
|
|
2
|
-
Open your browser's console to view the Component stack trace.`:""))};Object.keys({href:!0}).forEach(B=>{if(B==="href"&&(N[B]==null||typeof N[B]!="string"&&typeof N[B]!="object"))throw F({key:B,expected:"`string` or `object`",actual:N[B]===null?"null":typeof N[B]})}),Object.keys({as:!0,replace:!0,scroll:!0,shallow:!0,passHref:!0,prefetch:!0,locale:!0,onClick:!0,onMouseEnter:!0,onTouchStart:!0,legacyBehavior:!0}).forEach(B=>{const te=typeof N[B];if(B==="as"){if(N[B]&&te!=="string"&&te!=="object")throw F({key:B,expected:"`string` or `object`",actual:te})}else if(B==="locale"){if(N[B]&&te!=="string")throw F({key:B,expected:"`string`",actual:te})}else if(B==="onClick"||B==="onMouseEnter"||B==="onTouchStart"){if(N[B]&&te!=="function")throw F({key:B,expected:"`function`",actual:te})}else if((B==="replace"||B==="scroll"||B==="shallow"||B==="passHref"||B==="prefetch"||B==="legacyBehavior")&&N[B]!=null&&te!=="boolean")throw F({key:B,expected:"`boolean`",actual:te})});const k=
|
|
3
|
-
Open your browser's console to view the Component stack trace.`:"")):new Error("No children were passed to <Link> with `href` of `"+L+"` but one child is required https://nextjs.org/docs/messages/link-no-children")}}else Q=
|
|
4
|
-
Learn more: https://nextjs.org/docs/messages/invalid-new-link-with-extra-anchor`);const be=oe?Q&&typeof Q=="object"&&Q.ref:R,[Ie,je,ge]=(0,f.useIntersection)({rootMargin:"200px"}),Ae=o.default.useCallback(F=>{(H.current!==T||Te.current!==I)&&(ge(),H.current=T,Te.current=I),Ie(F),be&&(typeof be=="function"?be(F):typeof be=="object"&&(be.current=F))},[T,be,I,ge,Ie]);o.default.useEffect(()=>{process.env.NODE_ENV==="production"&&E&&(!je||!ie||v(E,I,T,{locale:z},{kind:_e},V))},[T,I,je,z,ie,$==null?void 0:$.locale,E,V,_e]);const Ce={ref:Ae,onClick(F){if(process.env.NODE_ENV!=="production"&&!F)throw new Error('Component rendered inside next/link has to pass click event to "onClick" prop.');!oe&&typeof J=="function"&&J(F),oe&&Q.props&&typeof Q.props.onClick=="function"&&Q.props.onClick(F),E&&(F.defaultPrevented||j(F,E,I,T,Y,X,W,z,V))},onMouseEnter(F){!oe&&typeof se=="function"&&se(F),oe&&Q.props&&typeof Q.props.onMouseEnter=="function"&&Q.props.onMouseEnter(F),E&&((!ie||process.env.NODE_ENV==="development")&&V||v(E,I,T,{locale:z,priority:!0,bypassPrefetchedCheck:!0},{kind:_e},V))},onTouchStart:process.env.__NEXT_LINK_NO_TOUCH_START?void 0:function(pe){!oe&&typeof le=="function"&&le(pe),oe&&Q.props&&typeof Q.props.onTouchStart=="function"&&Q.props.onTouchStart(pe),E&&(!ie&&V||v(E,I,T,{locale:z,priority:!0,bypassPrefetchedCheck:!0},{kind:_e},V))}};if((0,l.isAbsoluteUrl)(T))Ce.href=T;else if(!oe||U||Q.type==="a"&&!("href"in Q.props)){const F=typeof z<"u"?z:$==null?void 0:$.locale,pe=($==null?void 0:$.isLocaleDomain)&&(0,h.getDomainLocale)(T,F,$==null?void 0:$.locales,$==null?void 0:$.domainLocales);Ce.href=pe||(0,_.addBasePath)((0,u.addLocale)(T,F,$==null?void 0:$.defaultLocale))}return oe?o.default.cloneElement(Q,Ce):(0,s.jsx)("a",{...ue,...Ce,children:A})});(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)})(os,os.exports);var Mf=os.exports,Df=Mf;const ze=D.getDefaultExportFromCjs(Df),$f="_link_w24h0_1",zf="_wrapper_w24h0_98",Ff="_text_w24h0_106",Ir={link:$f,wrapper:zf,text:Ff},Le=({children:e,adornments:t,className:r,disableUnderline:s,href:o,mode:a,size:i,title:c,onClick:l,disablePadding:u,...p})=>{const m=d.helpers.ValidateProp({fieldTypes:$t.SizesSmallExtended,property:i,fallback:"medium"}),f=d.helpers.ValidateProp({fieldTypes:$t.Mode,property:a,fallback:"default"});return n.jsx(ze,{...p,className:d.helpers.classNameConcat(Ir.link,r),href:o&&o.length>0?o:"#","data-size":m,"data-variant":f,title:c||"NextLink","data-disable-underline":s??!1,"data-disable-padding":u??!0,children:n.jsxs("div",{className:Ir.wrapper,onClick:l,children:[t==null?void 0:t.start,n.jsx("p",{className:Ir.text,"data-size":m,children:e}),t==null?void 0:t.end]})})},Bf=({ICONS:e})=>{const{resetFeedback:t}=At();return n.jsxs("div",{className:Jt["wishlist--snack--actions"],children:[n.jsx(Le,{href:"/favoritos",children:"Ver Favoritos"}),n.jsx(d.Button,{variant:"tertiary",size:"small",onClick:t,adornment:{start:n.jsx(d.Icon,{name:e.close})}})]})},no=({WISHLIST_INFO:e,ICONS:t,Z_INDEX_WAR:r})=>{const s=Fs(),{resetFeedback:o}=At(),a=g.useRef(null);return g.useEffect(()=>{a.current&&clearTimeout(a.current),s&&(a.current=setTimeout(()=>{o()},5e3))},[s,o]),(s==null?void 0:s.active)&&n.jsx(zt,{Z_INDEX_WAR:r,className:Jt["wishlist--snack"],"data-action":s.action,title:s.action==="add"?e.messages.add:e.messages.remove,supportChildren:n.jsx(Bf,{ICONS:t}),size:"medium"})};no.displayName="WishList.Feedback";const ro={"product-list--banner":"_product-list--banner_sfibj_1","product-list--card":"_product-list--card_sfibj_30","product-list":"_product-list_sfibj_1"},Zc=({className:e,children:t,columns:r=1,isMobile:s=!1,gap:o=8,position_grid:a,totalColumns:i=4,PRODUCT_CARD_IMAGE_ASPECT_RATIO:c,...l})=>{const u=g.useMemo(()=>r%i===0?"initial":s||r<2?c:c.split("/").reverse().join("/"),[r,i,s]);return n.jsx("div",{...l,className:d.helpers.classNameConcat(ro["product-list--banner"],e),style:{aspectRatio:u,maxWidth:`${r/i*100}%`,order:a,padding:o/2},children:t})};Zc.displayName="ProductList.Banner";class Uf{constructor(){vt(this,"cache",new Map);vt(this,"pendingRequests",new Map);vt(this,"rafId",null)}request(t,r,s){const o=this.getCacheKey(t,s==null?void 0:s.filterTexture);if(this.cache.has(o)){r(this.cache.get(o));return}const a=this.pendingRequests.get(o);a?a.callbacks.push(r):this.pendingRequests.set(o,{productId:t,callbacks:[r],filterTexture:s.filterTexture,storeId:s.storeId}),this.rafId===null&&(this.rafId=requestAnimationFrame(()=>this.executeGroup()))}getCacheKey(t,r){return r!=null&&r.length?`${t}|${r.sort().join(",")}`:t}async executeGroup(){this.rafId=null;const t=this.pendingRequests;if(t.size===0)return;const r=[],s=[];if(t.forEach((a,i)=>{this.cache.has(i)?s.push([i,a]):r.push(a)}),s.forEach(([a,i])=>{const c=this.cache.get(a);c&&i.callbacks.forEach(l=>l(c)),t.delete(a)}),r.length===0)return;const o=new Map;r.forEach(a=>{var l;const i=((l=a.filterTexture)==null?void 0:l.sort().join(","))||"no-filter",c=o.get(i)||[];c.push(a),o.set(i,c)}),await Promise.all(Array.from(o.values()).map(a=>this.executeGroupRequest(a)))}async executeGroupRequest(t){const r=t.map(i=>i.productId),s=t[0].filterTexture,a=`https://${t[0].storeId}.myvtex.com/_v/proxy/catalog/product/similars`;try{const i=await fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({ids:r})});if(!i.ok)throw new Error("Erro ao buscar similares.");const c=await i.json();t.forEach(l=>{const u=c[l.productId]||[],p=s&&u.length?D.formattedSimilars(u,s):u,m=this.getCacheKey(l.productId,s);this.cache.set(m,p),l.callbacks.forEach(f=>f(p)),this.pendingRequests.delete(m)})}catch(i){console.error("Erro ao buscar similares:",i),t.forEach(c=>{const l=this.getCacheKey(c.productId,s);c.callbacks.forEach(u=>u([])),this.pendingRequests.delete(l)})}}clearCache(){this.cache.clear()}}const ta=new Uf;function so(e,t){const[r,s]=g.useState([]),o=g.useRef(!1);g.useEffect(()=>{o.current=!1},[e]);const a=g.useCallback(()=>{!e||o.current||(o.current=!0,ta.request(e,s,t))},[e,t]),i=g.useCallback(()=>ta.clearCache(),[]);return{items:r,loadSimilars:a,clearCache:i}}const Jc=({isKit:e,parent:t,productId:r,setNotify:s,CONSTANTS:o})=>{const{router:a}=ce(),{items:i,loadSimilars:c}=so(r,{filterTexture:o.TEXTURE_IMAGE,storeId:o.storeId}),l=g.useRef(!1),u=g.useRef(null),p=h=>a.push(h??""),m=g.useCallback(h=>{!r||!h||c()},[r,c]),f=g.useCallback((h,_)=>{if(!h.isIntersecting){o.PLP_INFINITE_SCROLL&&u.current&&(clearTimeout(u.current),u.current=null);return}if(h.intersectionRatio>=_.threshold&&!l.current){if(o.PLP_INFINITE_SCROLL){u.current=setTimeout(()=>{m(!0)},o.PLP_PRODUCT_SIMILAR_DELAY);return}m(!0)}},[m]);return g.useEffect(()=>{if(e||!t.current)return;const h={root:null,threshold:.1},_=new IntersectionObserver(([y])=>{f(y,h)},h);return _.observe(t.current),()=>{u.current&&clearTimeout(u.current),_.disconnect()}},[f,t,e]),n.jsx(fe.Actions,{data:i,callback:p,isKit:e,children:!e&&n.jsx(fe.SizeSelector,{setNotify:s,PLP_SIZE_ORDER:o.PLP_SIZE_ORDER})})};Jc.displayName="ProductList.Card.Actions";const el=({className:e,children:t,gap:r=32,item:s,isMobile:o,order:a,tag:i,hasMaxWidth:c=!0,index:l,setSkuSelected:u,showVideo:p,CONSTANTS:m,...f})=>{const h=g.useRef(null),{availability:{status:_}}=s,y=g.useCallback((v,C)=>{var j;typeof u=="function"&&u((j=v.isVariantOf)==null?void 0:j.hasVariant,C)},[u]),x=s.name.substring(0,4).toLowerCase()==="kit ";return n.jsxs("div",{...f,className:d.helpers.classNameConcat(ro["product-list--card"],e),"data-mobile":o,"data-order":a,ref:h,style:{...c&&{maxWidth:o?"50%":"25%"},order:a,padding:r/2},children:[n.jsxs(fe.Root,{item:s,isMobile:o,index:l,size:o?"small":"medium",order:a,outStock:!_,CONSTANTS:m,children:[n.jsx(fe.Header,{product:s,tag:i==null?void 0:i.commercial}),n.jsx(fe.Media,{showVideo:p,hasPriority:!0}),n.jsxs(fe.Wrapper,{type:"body",children:[n.jsx(fe.Title,{tag:i==null?void 0:i.institucional}),n.jsx(Jc,{productId:s.isVariantOf.productGroupID,parent:h,setNotify:y,isKit:x,CONSTANTS:m}),!x&&n.jsx(fe.OutStock,{callback:y})]}),n.jsx(fe.Wrapper,{type:"footer",children:_&&n.jsx(fe.BuyButton,{isKit:x})})]}),t]})};el.displayName="ProductList.Card";const tl=({children:e,className:t,...r})=>n.jsx("div",{...r,className:d.helpers.classNameConcat(ro["product-list"],t),children:e});tl.displayName="ProductList.Grid";const at={Banner:Zc,Card:el,Root:tl,helpers:zp},qf="_pdc_alo7z_1",Xe={"pdc--empty":"_pdc--empty_alo7z_1","pdc--grid":"_pdc--grid_alo7z_17","pdc--grid--content":"_pdc--grid--content_alo7z_26","pdc--infinite":"_pdc--infinite_alo7z_41","pdc--infinite--loader":"_pdc--infinite--loader_alo7z_44","pdc--infinite--loader--page":"_pdc--infinite--loader--page_alo7z_54","pdc--infinite--card--disabled":"_pdc--infinite--card--disabled_alo7z_58","pdc--infinite--next-page":"_pdc--infinite--next-page_alo7z_91","pdc--infinite--next-page--card":"_pdc--infinite--next-page--card_alo7z_101","pdc--infinite--next-page--spinner":"_pdc--infinite--next-page--spinner_alo7z_111","pdc--pagination":"_pdc--pagination_alo7z_118",pdc:qf},oo=({className:e,ICONS:t,PLP_NOT_RESULT:r})=>{const{router:s}=ce(),{isMobile:o}=ne(),a=()=>{s.push(r==null?void 0:r.link)};return n.jsxs("div",{className:d.helpers.classNameConcat(Xe["pdc--empty"],e),children:[n.jsxs(d.TextStructure.DivWrapper,{className:Xe["pdc--empty-wrapper"],children:[n.jsx("span",{className:o?"typography-style-body-md":"typography-style-heading-sm",children:r.title}),n.jsx("p",{className:o?"typography-style-body-xs":"typography-style-body-sm",children:r.subtitle})]}),n.jsx(d.Button,{adornment:{end:n.jsx(d.Icon,{name:t.arrow_right})},className:"typography-style-body-sm-strong",onClick:()=>a(),variant:"tertiary",children:n.jsx("b",{children:r.text})})]})};oo.displayName="PDC.Empty";const nr=e=>n.jsx("div",{...e,className:Xe["pdc--infinite--next-page"],children:n.jsx(d.Spinner,{className:Xe["pdc--infinite--next-page--spinner"]})});nr.displayName="PDC.Spinner";function nl({CONSTANTS:e}){const{sendDataLayerEvent:t}=ae(),{isMobile:r}=ne(),{getAvailableProductTag:s}=yt(),[o,a]=g.useState([]),[i,c]=g.useState(!0),l=qt(),u=l.join(","),p=r?16:32;return g.useEffect(()=>{const m=async()=>{l.length?await fetch("/api/wishlist/products",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({productIds:l})}).then(f=>f.json()).then(f=>{a(f),t({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:f}}})}).catch(f=>console.error(f)):a([]),c(!1)};if(l.length){m();return}if(l.length===0&&o.length===0){c(!1);return}a([]),c(!1)},[u]),n.jsx("section",{className:Jt["wishlist-grid"],children:n.jsxs("div",{className:Jt["wishlist-grid--container"],children:[i&&n.jsx(nr,{}),!l.length&&!(o!=null&&o.length)&&!i&&n.jsx(oo,{className:Jt["pdc-empty-modifier"],ICONS:e.ICONS,PLP_NOT_RESULT:e.WISHLIST_NOT_RESULT}),n.jsx(at.Root,{children:Array.isArray(o)&&o.map((m,f)=>{const h=m.node.cluster.highlights||[],_=s(h);return n.jsx(at.Card,{gap:p,isMobile:r??!1,item:m.node,tag:_,index:f,CONSTANTS:{BUY_BUTTON_LABELS:e.BUY_BUTTON_LABELS,MAIN_IMAGE:e.MAIN_IMAGE,PLP_GRID_SCROLL_BACK:e.PLP_GRID_SCROLL_BACK,PLP_INFINITE_SCROLL:e.PLP_INFINITE_SCROLL,PLP_SIZE_ORDER:e.PLP_SIZE_ORDER,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:e.PLP_SHOW_VIDEO_ON_PRODUCT_CARD,PLP_PRODUCT_SIMILAR_DELAY:e.PLP_PRODUCT_SIMILAR_DELAY,PRODUCT_CARD_IMAGE_ASPECT_RATIO:e.PRODUCT_CARD_IMAGE_ASPECT_RATIO,PRODUCT_CARD_TEXTS:e.PRODUCT_CARD_TEXTS,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:e.PRODUCT_CARD_TOP_WISHLIST_TOGGLE,PRODUCT_IMAGE_DIMENSIONS:e.PRODUCT_IMAGE_DIMENSIONS,SECOND_IMAGE:e.SECOND_IMAGE,StoreConfig_MainSellerId:e.StoreConfig_MainSellerId,TEXTURE_IMAGE:e.TEXTURE_IMAGE,Z_INDEX_WAR:e.Z_INDEX_WAR,ICONS:e.ICONS,storeId:e.storeId}},m.node.sku)})})]})})}nl.displayName="Wishlist.Grid";const Hf=e=>e.map(t=>{var r;return(r=t.isVariantOf)==null?void 0:r.productGroupID})??[],rl=({WISHLIST_INFO:e,ICONS:t,Z_INDEX_WAR:r})=>{const s=Ht(),o=qt(),a=Fs(),{updateList:i}=At();return g.useEffect(()=>{var l,u;a.active&&Je.set("fs::wishlist",o);const c=async()=>{var p;await fetch("/api/wishlist/documents",{method:"PATCH",body:JSON.stringify({productIds:o,docId:(p=s==null?void 0:s.user)==null?void 0:p.id})}).catch(m=>{console.error("Error updating wishlist:",m)})};a.active&&((l=s.user)!=null&&l.id)&&o.length!==((u=s.wishlist)==null?void 0:u.length)&&c()},[a,s,o]),g.useEffect(()=>{var u;const c=async()=>{const p=await Je.get("fs::wishlist");p&&(p==null?void 0:p.length)!==o.length&&i(p)},l=async()=>{var h;const p=await Je.get("fs::wishlist")??[],m=s.wishlist?typeof s.wishlist[0]=="object"?Hf(s.wishlist):s.wishlist:[],f=[...new Set([...p,...m])];i(f),Je.set("fs::wishlist",o),m.length!==f.length&&await fetch("/api/wishlist/documents",{method:"PATCH",body:JSON.stringify({productIds:f,docId:(h=s.user)==null?void 0:h.id})}).catch(_=>{console.error("Error updating wishlist:",_)})};if((u=s.user)!=null&&u.id){l();return}c()},[s,i,o]),n.jsx(no,{ICONS:t,Z_INDEX_WAR:r,WISHLIST_INFO:e})};rl.displayName="Wishlist.Init";const sl=({product:e,priceInfo:t,size:r="medium",style:s,ICONS:o})=>{const{sendDataLayerEvent:a,currentLocalRef:i}=ae(),c=qt(),{toggleProduct:l}=At(),{isVariantOf:{productGroupID:u}}=e;return n.jsx(d.Button,{adornment:{start:n.jsx(d.Icon,{size:r,name:c.includes(u)?o.favorite_true:o.favorite_false})},onClick:()=>{l(u),a({functionKey:"productEvents",data:{event:c.includes(u)?"remove_from_wishlist":"add_to_wishlist",outsideEcommerceData:{region:i.current},commonData:{...e,...t}}})},style:{...s,border:"none"},variant:"tertiary"})};sl.displayName="WishList.Toggle";const ol={Feedback:no,Toggle:sl,Grid:nl,Init:rl},al=({product:e,tag:t,size:r="small"})=>{const{CONSTANTS:s}=Ye(),{tags:o}=yt(),a=e.offers.offers[0],i=D.getDiscountPercent(a.listPrice,a.price),c=o==null?void 0:o.flagDiscount;return n.jsxs(fe.Wrapper,{type:"header",style:{zIndex:s.Z_INDEX_WAR.product_card_header},children:[i>0&&!t&&(c==null?void 0:c.enableTag)&&n.jsxs(d.Tag,{title:`${i}% ${c==null?void 0:c.tagText}`,variant:"quaternary",size:"small",style:{background:c==null?void 0:c.tagColor,color:c==null?void 0:c.tagTextColor},children:[i,"% ",c==null?void 0:c.tagText]}),t?n.jsx(d.Tag,{title:t.value,adornment:{start:t.enableIcon&&t.icon?n.jsx(d.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(ol.Toggle,{product:e,priceInfo:{price:a.price,listPrice:a.listPrice},variant:"card",ICONS:s.ICONS})]})};al.displayName="ProductCard.Actions.Header";const il=({className:e,children:t,hasPriority:r=!1,showVideo:s=!1,...o})=>{const{element:a,index:i,item:{image:c,slug:l,video:u},sendSelectItemEvent:p,order:m,CONSTANTS:f}=Ye(),h=D.getFirstImages({images:c,label:{first:f.MAIN_IMAGE,second:f.SECOND_IMAGE}});return n.jsxs("div",{...o,className:d.helpers.classNameConcat(Re["product-card--image"],e),ref:a,style:{aspectRatio:f.PRODUCT_CARD_IMAGE_ASPECT_RATIO},children:[n.jsx(ze,{href:`/${l}/p`,onClick:p,onMouseUp:_=>{_.button===1&&p(),f.PLP_INFINITE_SCROLL&&sessionStorage.setItem(f.PLP_GRID_SCROLL_BACK.order,String(m))},children:n.jsx("div",{className:Re["product-card--image--container"],children:Array.isArray(h)&&h.map(({url:_,alternateName:y},x)=>g.createElement(Pe.Image,{...f.PRODUCT_IMAGE_DIMENSIONS.product_card,style:f.PRODUCT_IMAGE_DIMENSIONS.product_card,alt:y??"product image",key:x,...r&&{priority:x===0&&i<4},objectFit:"cover",src:_}))})}),f.PLP_SHOW_VIDEO_ON_PRODUCT_CARD&&s&&u&&n.jsx(fe.Video,{url:u,poster:h[0].url}),t]})};il.displayName="ProductCard.Media.Media";const cl=({className:e,callback:t,children:r,...s})=>{const{isMobile:o,item:a,CONSTANTS:{PRODUCT_CARD_TEXTS:i}}=Ye(),{availability:{status:c}}=a;return c?null:n.jsxs("div",{...s,className:d.helpers.classNameConcat(Re["product-card--outstock"],e),children:[n.jsx(d.Tag,{size:"small",variant:"secondary",title:i.disabled,children:i.disabled}),n.jsx(d.Button,{className:d.helpers.classNameConcat(e,"buy-button"),size:o?"medium":"large",variant:"quaternary",onClick:()=>{typeof t=="function"&&t(a)},children:i.notify})]})};cl.displayName="ProductCard.OutStock";const ll=({children:e,className:t="",index:r,isMobile:s=!1,item:o,size:a,order:i,outStock:c,shelfTitle:l,CONSTANTS:u,...p})=>n.jsx(pf,{item:o,isMobile:s,outStock:c,order:i,size:a,index:r,shelfTitle:l,CONSTANTS:u,children:n.jsx("div",{...p,className:d.helpers.classNameConcat(Re["product-card--wrapper"],t),"data-size":a,children:e})});ll.displayName="ProductCard.Root";const ul=({disabled:e,label:t,size:r,value:s,onClick:o,...a})=>n.jsxs(d.ToggleSize.Wrapper,{...a,disabled:!1,outOfStock:e,size:r,onClick:o,children:[n.jsx(d.ToggleSize.DisabledAdornment,{}),n.jsx(d.ToggleSize.Text,{children:t})]});ul.displayName="ProductCard.SizeSelector.Item";const dl=({active:e=!1,callback:t,selectedSku:r=null,item:s,setNotify:o})=>{const{item:a,isMobile:i,setSelectedSku:c,eventDataRef:l}=Ye();s.productId=a.id;const u=D.disableSKU(s),p=D.getSKUName(s,"tamanho");!u&&!l.current.availableSkus.includes(p)&&l.current.availableSkus.push(p);const m=g.useCallback(h=>{const _=r===h?null:h;typeof c=="function"&&c(_),typeof t=="function"&&t(_)},[t,c,r]),f=g.useCallback(()=>{if(u&&typeof o=="function"){o(a,s);return}m(s)},[s,o,m,u,a]);return n.jsx(ul,{active:e,disabled:u,label:p,onClick:()=>f(),size:i?"x-small":"small",value:s})};dl.displayName="ProductCard.SizeSelector.SkuItem";const ml=({items:e,getLabel:t,PLP_SIZE_ORDER:r})=>Array.isArray(e)?[...e].sort((s,o)=>{const a=t(s).toUpperCase(),i=t(o).toUpperCase(),c=r.indexOf(a)-r.indexOf(i);return c!==0?c:a.localeCompare(i,"pt-BR")}):[],pl=({callback:e,className:t="",children:r,setNotify:s,PLP_SIZE_ORDER:o,...a})=>{const{isMobile:i,item:{isVariantOf:{hasVariant:c}},selectedSku:l}=Ye(),u=g.useMemo(()=>Array.isArray(c)?ml({items:c,getLabel:p=>D.getSKUName(p,"tamanho"),PLP_SIZE_ORDER:o}):[],[c]);return n.jsxs("div",{...a,className:d.helpers.classNameConcat(Re["product-card--selectors--size"],t),"data-mobile":i,children:[n.jsx("div",{className:Re["product-card--selectors--size--skus"],children:u.map((p,m)=>n.jsx(dl,{active:l===p,callback:e,item:p,selectedSku:l,setNotify:s},`size--${m}--${p.sku}`))}),n.jsx("div",{className:Re["product-card--selectors--size--button"],children:r})]})};pl.displayName="ProductCard.SizeSelector";const as=({alt:e="",callback:t,more:r,total:s=4,src:o,url:a,...i})=>n.jsxs(d.ToggleStyle.Wrapper,{...i,onClick:()=>{typeof t=="function"&&t(a)},children:[n.jsx(d.ToggleStyle.DisabledAdornment,{}),n.jsxs(d.ToggleStyle.Texture,{children:[o&&n.jsx(Pe.Image,{alt:e??o,src:o,height:34,width:34}),r&&n.jsx(d.TextStructure.DivWrapper,{className:Re["product-card--selectors--style--more"],children:n.jsxs("p",{children:["+ ",s]})})]})]}),Vf=({children:e,callback:t,data:r,total:s=4,size:o,...a})=>{const{index:i}=Ye(),{triggerSelectItemEventRef:c}=ae();return n.jsxs("div",{...a,children:[e,Array.isArray(r)&&r.slice(0,s).map((l,u)=>n.jsx(as,{callback:p=>{c.current.trigger=!0,c.current.index=i,typeof t=="function"&&t(p)},src:(l==null?void 0:l.textureImage)??"",alt:l==null?void 0:l.textureAlt,url:l==null?void 0:l.slug,size:o},u)),Array.isArray(r)&&(r==null?void 0:r.length)>s&&n.jsx(as,{size:o,total:r.length-s,more:!0})]})},fl=({callback:e,className:t,data:r,images:s=[],findTexture:o,...a})=>{const{CONSTANTS:i}=Ye(),c=o||i.TEXTURE_IMAGE,l=s==null?void 0:s.find(u=>c.includes(u.alternateName));return n.jsx(Vf,{...a,callback:e,className:d.helpers.classNameConcat(Re["product-card--selectors--style"],t),data:r,size:"x-small",children:l&&n.jsx(as,{active:!0,size:"x-small",src:l.url})})};fl.displayName="ProductCard.StyleSelector";const hl=({className:e,hasDecimal:t,...r})=>{const{isMobile:s,item:{offers:{lowPrice:o,highPrice:a},installments:{count:i,value:c}},eventDataRef:l}=Ye();l.current.priceInfo={price:o,listPrice:a};const u=D.formatPriceToCurrency(a,t),p=D.formatPriceToCurrency(o,t),m=D.formatPriceToCurrency(c??0),f=s?"horizontal":"stacked";return n.jsx("div",{...r,className:d.helpers.classNameConcat(Re["product-card--price"],e),"data-mobile":s,children:n.jsx(d.ProductInfo.Root,{size:"small",layout:f,children:n.jsxs(d.ProductInfo.Wrapper,{size:"small",layout:f,children:[n.jsx(d.ProductInfo.ValuesWrapper,{children:p!==u?n.jsxs(n.Fragment,{children:[n.jsx(d.ProductInfo.Price,{label:"originalPrice",value:u,size:"small"}),n.jsx(d.ProductInfo.Price,{label:"discountPrice",value:p,size:"small"})]}):n.jsx(d.ProductInfo.Price,{label:"defaultPrice",value:p,size:"small"})}),i&&i>1&&c?n.jsx(d.ProductInfo.Price,{label:"installment",value:`${i}x ${m}`,size:"small"}):null]})})})};hl.displayName="ProductCard.Price";const _l=({tag:e,className:t})=>{const{item:{name:r}}=Ye();return n.jsxs("div",{className:d.helpers.classNameConcat(Re["product-card--title"],t),children:[n.jsx("div",{className:Re["product-card--title--tag"],children:e?n.jsx(d.Tag,{size:"small",title:e.value,variant:"quaternary",adornment:{start:e.enableIcon&&e.icon?n.jsx(d.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:Re["product-card--title--content"],children:r&&n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{children:n.jsx("h3",{children:r})})})})]})};_l.displayName="ProductCard.Title";const gl=({className:e,url:t,poster:r,...s})=>{const{element:o}=Ye();return g.useEffect(()=>{if(!(o!=null&&o.current))return;const a=o.current,i=a.querySelector("video");if(i){const c=new IntersectionObserver(p=>{p.forEach(m=>{D.setVideoPlay(m.isIntersecting,i,t)})},{root:null,rootMargin:"0px",threshold:.5}),l=()=>{i.setAttribute("data-loaded","true")},u=()=>{a&&(c.observe(a),i.addEventListener("loadeddata",l))};return document.readyState==="complete"?u():window.addEventListener("load",u),()=>{c.disconnect(),window.removeEventListener("load",u)}}return()=>null},[t,o]),n.jsx("div",{...s,className:d.helpers.classNameConcat(Re["product-card--video"],e),children:t&&n.jsx(Pe.Video,{autoPlay:!1,muted:!0,loop:!0,preload:"none",playsInline:!0,poster:r})})};gl.displayName="ProductCard.Media.Video";const yl=({children:e,className:t,type:r,...s})=>n.jsx("div",{...s,className:d.helpers.classNameConcat(Re[`product-card--${r}`],t),children:e});yl.displayName="ProductCard.Wrapper";const fe={Actions:qc,BuyButton:Hc,Header:al,Media:il,Root:ll,OutStock:cl,Price:hl,SizeSelector:pl,StyleSelector:fl,Title:_l,Video:gl,Wrapper:yl},Wf="_carousel_rzsga_1",Gf="_shelf__container_rzsga_14",Kf="_shelf_without_carousel_rzsga_34",Xf="_card_container_rzsga_55",Dt={carousel:Wf,"custom-controllers":"_custom-controllers_rzsga_5",shelf__container:Gf,"controllers-arrows-bullets":"_controllers-arrows-bullets_rzsga_23",shelf_without_carousel:Kf,card_container:Xf},na=({title:e})=>n.jsx("div",{className:Dt.shelf__container,children:e&&n.jsx(d.TextStructure.Root,{children:n.jsxs(d.TextStructure.DivWrapper,{children:[n.jsx("h2",{className:d.helpers.classNameConcat("typography-style-body-md",D.responsive["responsive-mobile-flex"]),children:e}),n.jsx("h2",{className:d.helpers.classNameConcat("typography-style-heading-md",D.responsive["responsive-desktop-flex"]),children:e})]})})}),Yf=({children:e,ICONS:t,itemsPerPage:r,title:s})=>{const{isMobile:o}=ne(),a=r[o?"mobile":"desktop"],{initialize:i,controller:c,itemsStyles:l,pagination:u}=d.Carousel.useCarousel({itemsPerPage:a,gap:10,loop:!0,direction:"row"}),p=g.Children.toArray(e).length;return o||p>=4?n.jsxs(d.Carousel.Root,{innerRef:f=>{i(f)},className:Dt.carousel,children:[n.jsxs("div",{className:Dt["custom-controllers"],children:[s&&n.jsx(na,{title:s}),a<p&&n.jsxs(d.Carousel.Controller,{className:Dt["controllers-arrows-bullets"],children:[n.jsxs(d.Carousel.Arrows,{children:[n.jsx(d.Button,{variant:"tertiary",onClick:()=>c==null?void 0:c.prevPage(),adornment:{start:n.jsx(d.Icon,{name:t.arrow_left})}}),n.jsx(d.Button,{variant:"tertiary",onClick:()=>c==null?void 0:c.nextPage(),adornment:{start:n.jsx(d.Icon,{name:t.arrow_right})}})]}),!o&&a>2&&n.jsx(d.Carousel.Bullets,{page:u.currentPage,total:u.totalPages,onBulletClick:f=>c==null?void 0:c.navigateTo(f)})]})]}),n.jsx(d.Carousel.Body,{children:g.Children.map(e,(f,h)=>n.jsx(d.Carousel.Item,{style:{...l,overflow:"hidden"},children:f},`${s}_${h}`))})]}):n.jsxs(n.Fragment,{children:[s&&n.jsx(na,{title:s}),n.jsx("div",{className:Dt.shelf_without_carousel,children:e})]})},xl=({className:e,item:t,isMobile:r,size:s,shelfTitle:o,...a})=>{const i=g.useRef(null),{getAvailableProductTag:c}=yt(),{availability:{status:l}}=t,u=m=>{const f=m.filter(h=>!a.CONSTANTS.TEXTURE_IMAGE.includes(h.keywords));return r?f.splice(0,2):f},p=c(t.cluster.highlights);return n.jsx("div",{ref:i,className:Dt.card_container,children:n.jsxs(fe.Root,{...a,item:{...t,image:u(t.image)},isMobile:r,size:r?"small":"medium",outStock:!l,shelfTitle:o,children:[n.jsx(fe.Header,{product:t,tag:p==null?void 0:p.commercial}),n.jsx(fe.Media,{}),n.jsxs(fe.Wrapper,{type:"body",children:[n.jsx(fe.Title,{tag:p==null?void 0:p.institucional}),n.jsx(fe.Actions,{})]}),n.jsx(fe.Wrapper,{type:"footer"})]})})};xl.displayName="ProductList.Card";const rn={Shelf:Yf,Card:xl},vl=({CONSTANTS:e,inView:t,products:r,innerRef:s})=>{const o=g.useMemo(()=>df(r),[r]),{isMobile:a}=ne(),{addItemsToCart:i}=ve(),{sendDataLayerEvent:c}=ae(),{getAvailableProductTag:l}=yt(),[u,p]=g.useState({totalPrice:0,products:{}}),m=()=>{const h=Object.values(u.products);i(h),c({functionKey:"skuEvents",data:{event:"add_to_cart",commonData:{products:h.map(_=>{const y=o.find(x=>x.node.id===_.productId);return y==null?void 0:y.node})},supportData:{selectedSkus:h,price:u.totalPrice}}})},f=({selectedProduct:h,productId:_})=>{const y=mf({selectedProduct:h,productId:_,prevState:u,mainSellerId:e.StoreConfig_MainSellerId});p(y)};return g.useEffect(()=>{if(!t||o.length===0)return;const h=e.BUY_PACKAGE.header.title;c({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:o},customData:{item_list_name:h},outsideEcommerceData:{item_list_name:h}}})},[t]),n.jsxs("div",{className:ht.container,ref:s,children:[n.jsx("div",{className:ht["carousel-container"],style:{width:o.length<=3?"max-content":"75%"},children:n.jsx(rn.Shelf,{title:e.BUY_PACKAGE.header.title,itemsPerPage:{desktop:3,mobile:o.length>=3?2.2:o.length},ICONS:e.ICONS,children:Array.isArray(o)&&o.map(({node:h},_)=>{var v,C,j;const y=l(h.cluster.highlights),{availability:{status:x}}=h;return x?n.jsxs(fe.Root,{item:{...h,image:Zs.helpers.product.getFirstImages({images:h.image,label:{first:e.MAIN_IMAGE,second:e.SECOND_IMAGE}})},isMobile:a,size:"medium",index:_,shelfTitle:e.BUY_PACKAGE.header.title,CONSTANTS:e,children:[n.jsx(fe.Header,{product:h,tag:y.commercial}),n.jsx(fe.Media,{}),n.jsxs(fe.Wrapper,{type:"body",children:[n.jsx(fe.Title,{tag:{value:(v=y.institucional)==null?void 0:v.value,enableIcon:(C=y.institucional)==null?void 0:C.enableIcon,icon:(j=y.institucional)==null?void 0:j.icon}}),n.jsx(fe.Actions,{children:n.jsx(fe.SizeSelector,{callback:b=>f({selectedProduct:b,productId:h.id}),PLP_SIZE_ORDER:e.PLP_SIZE_ORDER})})]})]},h.id):null})})}),n.jsx("div",{className:ht["add-cart-container"],children:n.jsx(uf,{handleAddAllToCart:m,selectedProducts:u,CONSTANTS:{BUY_BUTTON_LABELS:e.BUY_BUTTON_LABELS,BUY_PACKAGE:e.BUY_PACKAGE,FREIGHT_CALCULATION:e.FREIGHT_CALCULATION}})})]})},ao={"btn-login":"_btn-login_yas63_12","btn-header":"_btn-header_yas63_22","header-animation":"_header-animation_yas63_35"},io=({id:e})=>{const{setIsOpen:t,cartStore:{items:r}}=ve(),{handleSelectContent:s}=ae(),{CONSTANTS:o}=Ne(),a=r.reduce((i,c)=>i+(c.quantity??0),0);return n.jsx(d.Header.SupportItem,{onClick:()=>{t(!0),s({content:"header:minicart"})},id:e,children:n.jsxs(d.Badge.AutoPositioner,{children:[n.jsx(d.Badge.Count,{count:a,size:"medium",variant:"primary",style:{backgroundColor:"black",display:a>0?"flex":"none"}}),n.jsx(d.Icon,{name:o.header.ICONS.bag,size:"medium"})]})})};io.displayName="Header.Bag";const dn=({children:e,href:t,...r})=>t&&t!=="#"?n.jsx(ze,{href:t.startsWith("/")?t:`/${t}`,...r,children:e}):e,bl=()=>{const{headerData:e}=Ne(),{handleSelectContent:t}=ae(),{reset:r,updateValue:s}=cn(),o=a=>{a?s(a):r()};return n.jsx(d.Header.Categories,{children:Array.isArray(e.categories)&&e.categories.map((a,i)=>n.jsx(dn,{href:a.link,onMouseEnter:()=>o(a.submenuId),onFocus:()=>o(a.submenuId),children:n.jsx(d.Header.CategoryItem,{className:ao["btn-header"],value:a.submenuId??null,adornment:{start:n.jsx(d.Icon,{name:a.iconStart}),end:n.jsx(d.Icon,{name:a.iconEnd})},style:{textWrap:"nowrap",gap:"0"},onClick:()=>{t({content:`header:${a.label}`})},children:a.label})},`category-${a.label}-${i}`))})};bl.displayName="Header.Categories";function Qf(){const{handleSelectContent:e}=ae(),{CONSTANTS:t}=Ne(),{setValue:r}=Xn();return n.jsx(d.Header.SupportItem,{onClick:()=>{r(!0),e({content:"header:search"})},children:n.jsx(d.Icon,{name:t.header.ICONS.search,size:"medium"})})}const Zf={"menu-subcategories-container":"_menu-subcategories-container_a93cr_1"},Jf={"observer-wrapper":"_observer-wrapper_r43gk_1"},rr=({children:e,eventData:t,observerOptions:r,callBackWhenVisible:s,stopOnIntersection:o=!0,className:a,...i})=>{const c=g.useRef(null),l=As(c,o,r),{sendDataLayerEvent:u}=ae();return g.useEffect(()=>{l&&(typeof s=="function"&&s(),t&&u({...t}))},[l]),n.jsx("div",{...i,ref:c,className:d.helpers.classNameConcat(Jf["observer-wrapper"],a),children:e})},jl=({thumbnails:e,category:t,isMobile:r=!0,callBack:s})=>{const{handleSelectPromotionEvent:o}=ae(),a=50/e.length;return n.jsx("div",{className:Zf["menu-subcategories-container"],children:e.map((i,c)=>{const l=r?i.srcMobile:i.srcDesk;if(!l)return null;const u={creative_name:"banner-menu",creative_slot:`banner-menu:${t}:${c+1}`,promotion_id:l,promotion_name:i.promotion_name};return n.jsx(rr,{eventData:{functionKey:"readyEvents",data:{event:"view_promotion",readyData:{ecommerce:{...u}}}},observerOptions:{delay:1e3},children:n.jsxs(ze,{href:i.link??"#",onClick:()=>{typeof s=="function"&&s(),o({updatePromotionRef:!0,promotion:u})},children:[n.jsx(Pe.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}`)})})};jl.displayName="Menu.Thumbnail";const is={"menu-desktop":"_menu-desktop_1b799_1","menu-categories":"_menu-categories_1b799_12"},Cl=({children:e,dividerOnRight:t=!0,subMenu:r,...s})=>{var l;const{router:o}=ce(),{reset:a}=cn(),{handleSelectContent:i}=ae(),{CONSTANTS:c}=Ne();return n.jsxs("div",{...s,className:is["menu-categories"],children:[(l=r==null?void 0:r.subCategories)==null?void 0:l.map((u,p)=>{var h,_,y,x;const m=u.listCollapseDesk&&!((h=u.see_all)!=null&&h.link)?{expandAfterRowsQty:u.rowsToShowDesk}:{},f=u.listCollapseDesk&&!((_=u.see_all)!=null&&_.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(d.Icon,{name:c.header.ICONS.arrow_right,size:"small"})}};return n.jsxs(d.ComponentList.Structure,{children:[n.jsx(dn,{href:u.linkLabel,title:u.label,onClick:()=>{u.linkLabel&&(a(),i({content:`menu:${u.label??""}:${r.label??""}`}))},children:n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{children:n.jsx("h2",{children:u.label})})})}),n.jsx(d.ComponentList.List,{columns:1,...m,className:is["submenu-categories"],children:(y=u.items)==null?void 0:y.map((v,C)=>n.jsx(d.ComponentList.ListItem,{id:`list-item-${v.label}-${C}`,children:n.jsx(Le,{href:v.link??"#",size:"x-small",title:v.label??"",disableUnderline:!0,disablePadding:!0,onClick:()=>{a(),i({content:`menu:${u.label??""}:${v.label??""}:${r.label??""}`})},children:v.label})},`list-item-${v.label}-${C}`))}),((x=u.see_all)==null?void 0:x.link)&&n.jsx(d.ComponentList.Support,{...f,size:"small",onClick:()=>{var v;(v=u.see_all)!=null&&v.link&&(a(),i({content:`menu:${u.label??""}:${r.label}`}),o.push(u.see_all.link))},children:u.see_all.link&&u.see_all.label})]},`list-${u.label}-${p}`)}),t&&n.jsx(d.Utils.Divider,{size:"small",direction:"vertical"})]})};Cl.displayName="Menu.Categories";const Sl=({children:e,dividerOnBottom:t=!0,...r})=>{const{CONSTANTS:s}=Ne();return n.jsxs(n.Fragment,{children:[n.jsx("div",{...r,className:is["menu-desktop"],style:{...r.style,justifyContent:s.header.ALIGNMENT_MENU},children:e}),t&&n.jsx(d.Utils.Divider,{size:"small"})]})};Sl.displayName="Menu.MenuRoot";const Rr={Root:Sl,Categories:Cl,Thumbnail:jl},wl=()=>{const{headerData:e,CONSTANTS:t}=Ne(),r=bi(),{reset:s}=cn();return n.jsx(d.Header.SubMenu,{className:"header-desktop-submenu",children:Array.isArray(e.subMenus)&&e.subMenus.map((o,a)=>{const{thumbnails:i,label:c,id:l}=o,u=l===r,p=i==null?void 0:i.some(m=>!!m.srcDesk);return n.jsxs(Rr.Root,{id:l,style:u?{display:"flex",zIndex:t.header.Z_INDEX_WAR.menu_desktop}:{display:"none"},dividerOnBottom:u,children:[n.jsx(Rr.Categories,{dividerOnRight:!!p,subMenu:o}),Array.isArray(i)&&n.jsx(Rr.Thumbnail,{thumbnails:i,isMobile:!1,category:c,callBack:s})]},`submenu-${l}-${a}`)})})};wl.displayName="Header.SubMenu";const Pl=()=>{const{handleSelectContent:e}=ae(),{CONSTANTS:t}=Ne();return n.jsx(ze,{href:"/favoritos",children:n.jsx(d.Header.SupportItem,{onClick:()=>e({content:"header:wishlist"}),children:n.jsx(d.Icon,{name:t.header.ICONS.favorite_false,size:"medium"})})})};Pl.displayName="Header.WishList";const eh="_root_im5yf_125",We={"user-menu--credits":"_user-menu--credits_im5yf_1","user-menu--content":"_user-menu--content_im5yf_10","user-menu--login":"_user-menu--login_im5yf_30","user-menu--login--content":"_user-menu--login--content_im5yf_37","user-menu--menu":"_user-menu--menu_im5yf_64","user-menu--tooltip":"_user-menu--tooltip_im5yf_92","tooltip-modifier":"_tooltip-modifier_im5yf_103","modal-controls-modifier":"_modal-controls-modifier_im5yf_108","modal-header-modifier":"_modal-header-modifier_im5yf_116",root:eh},Nl=({className:e,children:t,...r})=>n.jsx("div",{...r,className:d.helpers.classNameConcat(We["user-menu--content"],e),children:t});Nl.displayName="UserMenu.Content";var El=(e=>(e.Account="account",e))(El||{});const Il=({className:e,cashBack:t,credits:r,link:s,total:o,...a})=>{const i=t?D.formatPriceToCurrency(t):void 0,c=r?D.formatPriceToCurrency(r):void 0,l=o?D.formatPriceToCurrency(o):void 0;return n.jsx(d.Credits.Account,{...a,className:d.helpers.classNameConcat(We["user-menu--credits"],e),icon:"wallet",showIcon:!0,cashBackValue:i,creditsValue:c,linkMore:s,totalValue:l,type:El.Account})};Il.displayName="UserMenu.Credits";const Rl=({className:e,children:t,description:r,text:s,...o})=>{const{isMobile:a}=ne();return n.jsx("div",{...o,className:d.helpers.classNameConcat(We["user-menu--login"],e),"data-mobile":a,children:n.jsxs("div",{className:We["user-menu--login--content"],children:[n.jsx(d.TextStructure.Root,{children:n.jsxs(d.TextStructure.DivWrapper,{alignContent:"flex-start",alignItems:"flex-start",children:[n.jsx("h3",{className:"typography-style-body-lg-strong",children:s}),n.jsx("p",{children:r})]})}),t]})})};Rl.displayName="UserMenu.Login";const Tl=({className:e,isLogged:t,onLogoutClick:r,ICONS:s,storeConfig:o,isMobile:a})=>{const i=a?So:So({ICONS:s,storeConfig:o}).filter(c=>c.deviceShown==="both"||c.deviceShown===(a?"mobile":"desktop"));return n.jsxs("ul",{className:d.helpers.classNameConcat(We["user-menu--menu"],e),children:[Array.isArray(i)&&i.map((c,l)=>n.jsx("li",{children:n.jsx(Le,{href:c.href??"#",size:"small",disableUnderline:!0,adornments:{start:n.jsx(d.Icon,{name:c.icon??"delete"})},children:c.label})},l)),t?n.jsx("li",{children:n.jsx(Le,{href:`${o.secureSubdomain}/api/vtexid/pub/logout?scope=mariafilo&returnUrl=${encodeURIComponent(`${o.storeUrl}`)}`,size:"small",disableUnderline:!0,onClick:r,adornments:{start:n.jsx(d.Icon,{name:Pp(s)})},children:wp})}):n.jsx(n.Fragment,{})]})};Tl.displayName="UserMenu.Menu";const Al=e=>{const t=g.useRef(null),r=g.useCallback(a=>{t.current&&!t.current.contains(a.target)&&e()},[e]),s=g.useCallback(a=>{t.current&&!t.current.contains(a.target)&&e()},[e]),o=g.useCallback(a=>{a.key==="Escape"&&e()},[e]);return g.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:t}},th=e=>{if(!e||typeof window>"u")return 0;const t=window.getComputedStyle(e);return parseInt(t.padding,10)},nh=(e,t,r)=>{if(!(e instanceof HTMLElement)||!(t instanceof HTMLElement))return{left:0,top:0};const{height:s,left:o,top:a,width:i}=t.getBoundingClientRect(),c=e.getBoundingClientRect(),l=e!=null&&e.parentElement?th(e==null?void 0:e.parentElement):0;return{left:o+i/2-(c.width+l*2),top:a+s+r}},kl=g.createContext({}),rh=({children:e,delay:t=600,gap:r=20,isOpen:s,setIsOpen:o,target:a,...i})=>{const c=g.useRef(null),[l,u]=g.useState(!1),[p,m]=g.useState({left:0,top:0}),{ref:f}=Al(()=>{u(!0),typeof window<"u"&&(c.current=window.setTimeout(()=>{o(!1),u(!1)},t))});return g.useEffect(()=>{if(a&&(f!=null&&f.current)){const{left:h,top:_}=nh(f.current,a,r??0);m({left:h,top:_}),u(!1)}},[r,s,a,f]),n.jsx(kl.Provider,{value:g.useMemo(()=>({...i,...p,contentRef:f,isLeaving:l,isOpen:s,setIsOpen:o,setIsLeaving:u,target:a}),[i,p,f,l,s,o,u,a]),children:e})},Ol=()=>{const e=g.useContext(kl);if(e===void 0)throw new Error("useUserMenuContext must be used within a UserMenuProvider");return e},Ll=({children:e,isMobile:t=!1,Z_INDEX_WAR:r})=>{const{isOpen:s,setIsOpen:o}=Ol();return n.jsxs(d.Modal.Root,{"data-user":"user-menu--modal",isMobile:t??!1,isOpen:s,setIsOpen:o,variant:"sideBottom",className:We["modal-root-modifier"],style:{zIndex:r.user_menu_mobile},children:[n.jsx(d.Modal.Header,{navigation:"top",className:We["modal-header-modifier"],children:n.jsx(d.Modal.Controls,{navigation:"top",isMobile:!0,className:We["modal-controls-modifier"]})}),n.jsx(d.Modal.Body,{children:e})]})};Ll.displayName="UserMenu.Modal";const Ml=({children:e,component:t,Z_INDEX_WAR:r,isMobile:s,...o})=>n.jsx(rh,{...o,className:We.root,children:s?n.jsxs(n.Fragment,{children:[n.jsx(ft.Modal,{Z_INDEX_WAR:r,children:t}),e]}):n.jsx(ft.Tooltip,{component:t,style:{width:304,zIndex:r.user_menu},Z_INDEX_WAR:r,children:e})});Ml.displayName="UserMenu.Root";const Dl=({children:e,component:t,Z_INDEX_WAR:r,...s})=>{const{contentRef:o,left:a,isLeaving:i,isOpen:c,top:l}=Ol();return n.jsx(d.Tooltip.Root,{arrow:"top-right",component:n.jsx("div",{...s,ref:o,children:t}),className:d.helpers.classNameConcat(We["user-menu--tooltip"],We["tooltip-modifier"]),isLeaving:i,isOpen:c,left:a,size:"medium",position:"top",top:l,style:{zIndex:r.user_menu},children:n.jsx("div",{className:We["user-menu--tooltip"],children:e})})};Dl.displayName="UserMenu.Tooltip";const ft={Credits:Il,Content:Nl,Login:Rl,Menu:Tl,Modal:Ll,Root:Ml,Tooltip:Dl},sr=({children:e,isOpen:t,setIsOpen:r,desktopUserMenuTarget:s,mobileUserMenuTarget:o,storeConfig:a})=>{var h,_,y;const{isMobile:i}=ne(),{CONSTANTS:c}=Ne(),l=Ht(),u=()=>{window.location.href=`${a.secureSubdomain}/api/io/login?returnUrl=${encodeURIComponent(`${window.location.href}`)}`},p=!!((h=l.user)!=null&&h.userId),{cashback:m,credits:f}=g.useMemo(()=>{var x,v;return{credits:((x=l==null?void 0:l.getCurrentCredits())==null?void 0:x.credits)??0,cashback:((v=l==null?void 0:l.getCurrentCredits())==null?void 0:v.cashback)??0}},[l]);return n.jsx(ft.Root,{component:n.jsxs(ft.Content,{children:[n.jsx(ft.Login,{description:Ep(p),text:Np(p,((_=l==null?void 0:l.user)==null?void 0:_.firstName)??((y=l==null?void 0:l.user)==null?void 0:y.email)),children:!p&&n.jsx(d.Button,{id:"conta",size:"medium",variant:"quaternary",onClick:()=>u(),children:c.header.MENU_INFO.login.button_text})}),f+m&&p?n.jsx(ft.Credits,{credits:f,cashBack:m,link:`${a.secureSubdomain}/account#/meus-creditos`,total:f+m}):n.jsx(n.Fragment,{}),n.jsx(d.Utils.Divider,{}),n.jsx(ft.Menu,{ICONS:c.header.ICONS,storeConfig:a,isLogged:p,className:D.responsive["responsive-desktop-flex"],onLogoutClick:()=>l.logout()}),n.jsx(ft.Menu,{ICONS:c.header.ICONS,storeConfig:a,isMobile:!0,isLogged:p,className:D.responsive["responsive-mobile-flex"],onLogoutClick:()=>l.logout()})]}),isOpen:t,isMobile:i,setIsOpen:r,target:i?o:s,Z_INDEX_WAR:c.header.Z_INDEX_WAR,children:e})};sr.displayName="UserMenu";const $l=({storeConfig:e})=>{const{CONSTANTS:t}=Ne(),{handleSelectContent:r}=ae(),{reset:s}=cn(),{setValue:o}=Ds(),a=Ms(),i=g.useRef(null);return n.jsxs(n.Fragment,{children:[n.jsxs(d.Header.Wrapper,{className:"header-desktop-wrapper",children:[n.jsx(d.Header.Logo,{style:{width:"100%"},children:n.jsx(ze,{href:"/",onMouseEnter:s,children:n.jsx(d.Icon,{name:t.header.ICONS.logo,onClick:()=>{r({content:"header:logo"})}})})}),n.jsx(bl,{}),n.jsxs(d.Header.Support,{onMouseEnter:s,style:{justifyContent:"flex-end"},children:[n.jsx(Qf,{}),n.jsx(sr,{isOpen:a,setIsOpen:o,desktopUserMenuTarget:i.current,storeConfig:e,children:n.jsx(d.Header.SupportItem,{onClick:()=>{o(!0),r({content:"header:user_menu"})},className:ao["btn-login"],innerRef:i,children:n.jsx(d.Icon,{name:t.header.ICONS.person,size:"medium"})})}),n.jsx(Pl,{}),n.jsx(io,{id:"cart-button"})]})]}),n.jsx(wl,{})]})};$l.displayName="Header.HeaderDesktopWrapper";const Be={"menu--banners":"_menu--banners_j3ev9_1","menu--banners--item":"_menu--banners--item_j3ev9_6","menu--banners--item--text":"_menu--banners--item--text_j3ev9_17","menu--banners--list":"_menu--banners--list_j3ev9_21","menu--dummy-close":"_menu--dummy-close_j3ev9_46","menu--body":"_menu--body_j3ev9_54","menu--categories":"_menu--categories_j3ev9_67","menu--categories--title":"_menu--categories--title_j3ev9_80","menu--step":"_menu--step_j3ev9_92","menu--sub-category":"_menu--sub-category_j3ev9_108","menu--sub-category--item":"_menu--sub-category--item_j3ev9_115","menu--sub-category--list":"_menu--sub-category--list_j3ev9_121"},zl=({children:e,mobileBannerAlt:t,mobileBannerSrc:r,textColor:s,submenuId:o,label:a,...i})=>n.jsx("button",{...i,className:Be["menu--banners--item"],children:r?n.jsxs(d.Banner.Container,{children:[n.jsx(d.Banner.ImageWrapper,{children:n.jsx(Pe.Image,{alt:t??r,height:128,src:r,width:343,unoptimized:!0})}),n.jsx(d.Banner.Slot,{verticalAlignment:"end",horizontalAlignment:"center",children:n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{className:Be["menu--banners--item--text"],children:n.jsx("h2",{className:"typography-style-body-xs",style:s?{color:s}:{},children:e})})})})]}):n.jsx("h2",{...i,children:e})});zl.displayName="Menu.Mobile.Category";const Fl=({label:e,...t})=>{const{CONSTANTS:r}=Ne();return n.jsx(d.Button,{...t,adornment:{end:n.jsx(d.Icon,{name:r.header.ICONS.arrow_right,size:"medium"})},mode:"inverse",size:"medium",variant:"primary",children:e})};Fl.displayName="Menu.Mobile.Body.Category";const Bl=({subCategory:e,submenuLabel:t,onHandleOut:r,...s})=>n.jsx("div",{...s,className:Be["menu--sub-category--list"],children:Array.isArray(e==null?void 0:e.items)&&(e==null?void 0:e.items.map((o,a)=>n.jsx(Le,{disableUnderline:!0,disablePadding:!1,href:o.link??"#",onClick:()=>r(o.label,t),size:"medium",title:o.label??"",children:o.label},a)))});Bl.displayName="Menu.Mobile.List";const Ul=({current:e,onHandleOut:t})=>{var r;return e?n.jsx("div",{className:Be["menu--sub-category"],children:Array.isArray(e==null?void 0:e.subCategories)&&((r=e==null?void 0:e.subCategories)==null?void 0:r.map((s,o)=>n.jsxs("div",{className:Be["menu--sub-category--item"],children:[n.jsx(en.Title,{onHandleOut:t,subCategory:s,submenuLabel:e==null?void 0:e.id}),n.jsx(en.List,{onHandleOut:t,subCategory:s,submenuLabel:e==null?void 0:e.id})]},o)))}):n.jsx(n.Fragment,{})};Ul.displayName="Menu.Mobile.Body.SubCategory";const ql=({subCategory:e,submenuLabel:t,onHandleOut:r,...s})=>{var c;const{router:o}=ce(),{handleSelectContent:a}=ae(),{CONSTANTS:i}=Ne();return n.jsxs("div",{...s,className:Be["menu--categories--title"],children:[n.jsx(dn,{href:e==null?void 0:e.linkLabel,title:e==null?void 0:e.linkLabel,onClick:()=>{a({content:`menu:${e.label??""}:${t}`})},children:n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{children:n.jsx("h2",{className:"typography-style-body-md",children:e==null?void 0:e.label})})})}),((c=e==null?void 0:e.see_all)==null?void 0:c.link)&&n.jsx(d.ComponentList.Support,{adornment:{end:n.jsx(d.Icon,{name:i.header.ICONS.arrow_right,size:"small"})},size:"small",onClick:()=>{var l;r(e.label,t),(l=e==null?void 0:e.see_all)!=null&&l.link&&o.push(e.see_all.link)},children:e.see_all.label})]})};ql.displayName="Menu.Mobile";const en={Banner:zl,Category:Fl,List:Bl,SubCategory:Ul,Title:ql},Hl=g.createContext({}),sh=({children:e})=>{const[t,r]=g.useState(null),s=g.useCallback(()=>{r(null)},[]),o=a=>{a!==t&&r(a)};return n.jsx(Hl.Provider,{value:{currentCategory:t,setCurrentCategory:r,handleCloseMenu:s,handleChangeSubMenuOpened:o},children:e})},Vl=()=>g.useContext(Hl),Wl=e=>{const{router:t}=ce(),{headerData:r}=Ne(),{handleSelectContent:s}=ae(),{currentCategory:o,setCurrentCategory:a}=Vl(),i=g.useRef(null),c=()=>{if(i.current){const h=i.current;h&&(a(null),h==null||h.click())}},l=(h,_)=>{s({content:`menu:${h}`}),t.push(_),c()},u=(h,_)=>{s({content:`menu:${h}:${_}`}),c()},p=Array.isArray(r==null?void 0:r.categories)?r==null?void 0:r.categories:[],m=Array.isArray(r==null?void 0:r.subMenus)?r==null?void 0:r.subMenus:[],f=h=>{h.submenuId?a(h.submenuId):l(h.label,h.link)};return n.jsxs("div",{...e,className:Be["menu--body"],style:{transform:`translate3d(calc(-100% * ${o?1:0}), 0px, 0px)`},children:[n.jsx("button",{className:Be["menu--dummy-close"],ref:i,"data-close":!0}),n.jsxs("div",{className:Be["menu--step"],"data-active":"true",children:[n.jsx("div",{className:Be["menu--banners"],children:n.jsx("div",{className:Be["menu--banners--list"],children:p.map((h,_)=>g.createElement(en.Banner,{...h,key:_,onClick:()=>l(h.label,h.link)},h.mobileBannerAlt))})}),n.jsx("div",{className:Be["menu--categories"],children:p.map((h,_)=>n.jsx(en.Category,{label:h.label,onClick:()=>f(h)},_))})]}),n.jsx("div",{className:Be["menu--step"],"data-active":!!o,children:n.jsx(en.SubCategory,{current:m.find(h=>h.id===o),onHandleOut:u})})]})};Wl.displayName="Menu.Mobile.Body";const oh={"menu--header":"_menu--header_1ozdf_1"},Gl=()=>{var o;const{headerData:e}=Ne(),{currentCategory:t,setCurrentCategory:r}=Vl(),s=(o=e==null?void 0:e.categories)==null?void 0:o.find(a=>a.submenuId===t);return n.jsxs("div",{className:oh["menu--header"],children:[n.jsx(d.Button,{"data-out":!s,iconNameStart:"arrow-left",mode:"inverse",onClick:()=>r(null)}),s&&n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{alignContent:"center",children:n.jsx("h2",{className:"typography-style-body-lg",children:s==null?void 0:s.label})})}),n.jsx(d.Button,{iconNameStart:"close","data-close":!0,"data-only":!s,mode:"inverse",onClick:()=>r(null)})]})};Gl.displayName="Menu.Mobile.Header";var cs={exports:{}};function ah(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 Tr={},Ar={},ra;function ih(){return ra||(ra=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"LoadableContext",{enumerable:!0,get:function(){return s}});const s=Oe._(g).default.createContext(null);process.env.NODE_ENV!=="production"&&(s.displayName="LoadableContext")}(Ar)),Ar}var sa;function ch(){return sa||(sa=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return h}});const r=Oe._(g),s=ih();function o(_){return _&&_.default?_.default:_}const a=[],i=[];let c=!1;function l(_){let y=_(),x={loading:!0,loaded:null,error:null};return x.promise=y.then(v=>(x.loading=!1,x.loaded=v,v)).catch(v=>{throw x.loading=!1,x.error=v,v}),x}function u(_,y){let x=Object.assign({loader:null,loading:null,delay:200,timeout:null,webpack:null,modules:null},y),v=null;function C(){if(!v){const w=new p(_,x);v={getCurrentValue:w.getCurrentValue.bind(w),subscribe:w.subscribe.bind(w),retry:w.retry.bind(w),promise:w.promise.bind(w)}}return v.promise()}if(typeof window>"u"&&a.push(C),!c&&typeof window<"u"){const w=x.webpack&&typeof ah.resolveWeak=="function"?x.webpack():x.modules;w&&i.push(P=>{for(const S of w)if(P.includes(S))return C()})}function j(){C();const w=r.default.useContext(s.LoadableContext);w&&Array.isArray(x.modules)&&x.modules.forEach(P=>{w(P)})}function b(w,P){j();const S=r.default.useSyncExternalStore(v.subscribe,v.getCurrentValue,v.getCurrentValue);return r.default.useImperativeHandle(P,()=>({retry:v.retry}),[]),r.default.useMemo(()=>S.loading||S.error?r.default.createElement(x.loading,{isLoading:S.loading,pastDelay:S.pastDelay,timedOut:S.timedOut,error:S.error,retry:v.retry}):S.loaded?r.default.createElement(o(S.loaded),w):null,[w,S])}return b.preload=()=>C(),b.displayName="LoadableComponent",r.default.forwardRef(b)}class p{promise(){return this._res.promise}retry(){this._clearTimeouts(),this._res=this._loadFn(this._opts.loader),this._state={pastDelay:!1,timedOut:!1};const{_res:y,_opts:x}=this;y.loading&&(typeof x.delay=="number"&&(x.delay===0?this._state.pastDelay=!0:this._delay=setTimeout(()=>{this._update({pastDelay:!0})},x.delay)),typeof x.timeout=="number"&&(this._timeout=setTimeout(()=>{this._update({timedOut:!0})},x.timeout))),this._res.promise.then(()=>{this._update({}),this._clearTimeouts()}).catch(v=>{this._update({}),this._clearTimeouts()}),this._update({})}_update(y){this._state={...this._state,error:this._res.error,loaded:this._res.loaded,loading:this._res.loading,...y},this._callbacks.forEach(x=>x())}_clearTimeouts(){clearTimeout(this._delay),clearTimeout(this._timeout)}getCurrentValue(){return this._state}subscribe(y){return this._callbacks.add(y),()=>{this._callbacks.delete(y)}}constructor(y,x){this._loadFn=y,this._opts=x,this._callbacks=new Set,this._delay=null,this._timeout=null,this.retry()}}function m(_){return u(l,_)}function f(_,y){let x=[];for(;_.length;){let v=_.pop();x.push(v(y))}return Promise.all(x).then(()=>{if(_.length)return f(_,y)})}m.preloadAll=()=>new Promise((_,y)=>{f(a).then(_,y)}),m.preloadReady=_=>(_===void 0&&(_=[]),new Promise(y=>{const x=()=>(c=!0,y());f(i,_).then(x,x)})),typeof window<"u"&&(window.__NEXT_PRELOADREADY=m.preloadReady);const h=m}(Tr)),Tr}(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(p,m){for(var f in m)Object.defineProperty(p,f,{enumerable:!0,get:m[f]})}r(t,{default:function(){return u},noSSR:function(){return l}});const s=Oe,o=n,a=s._(ch()),i=typeof window>"u";function c(p){return{default:(p==null?void 0:p.default)||p}}function l(p,m){if(delete m.webpack,delete m.modules,!i)return p(m);const f=m.loading;return()=>(0,o.jsx)(f,{error:null,isLoading:!0,pastDelay:!1,timedOut:!1})}function u(p,m){let f=a.default,h={loading:x=>{let{error:v,isLoading:C,pastDelay:j}=x;if(!j)return null;if(process.env.NODE_ENV!=="production"){if(C)return null;if(v)return(0,o.jsxs)("p",{children:[v.message,(0,o.jsx)("br",{}),v.stack]})}return null}};p instanceof Promise?h.loader=()=>p:typeof p=="function"?h.loader=p:typeof p=="object"&&(h={...h,...p}),h={...h,...m};const _=h.loader,y=()=>_!=null?_().then(c):Promise.resolve(c(()=>null));return h.loadableGenerated&&(h={...h,...h.loadableGenerated},delete h.loadableGenerated),typeof h.ssr=="boolean"&&!h.ssr?(delete h.webpack,delete h.modules,l(f,h)):f({...h,loader:y})}(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)})(cs,cs.exports);var lh=cs.exports,uh=lh;const Kl=D.getDefaultExportFromCjs(uh),qn={"modal-modifier":"_modal-modifier_10zw4_1","menu--navigation-bar":"_menu--navigation-bar_10zw4_15","menu--root":"_menu--root_10zw4_26"},Xl=({children:e})=>{const{menuIsOpen:t,setMenuIsOpen:r}=Bs(),{CONSTANTS:s}=Ne();return n.jsxs(d.Modal.RootWithoutPortal,{className:d.helpers.classNameConcat(qn["modal-modifier"],"menu-mobile-root"),isOpen:t,setIsOpen:r,variant:"sideRight",style:{bottom:"unset",overflowY:"hidden",position:"fixed",top:0,zIndex:s.header.Z_INDEX_WAR.menu_mobile},children:[n.jsx(Gl,{}),n.jsx(d.Modal.Body,{className:qn["menu--root"],children:e})]})};Xl.displayName="Menu.MenuRoot";const dh=Kl(()=>Promise.resolve(Xl),{ssr:!1}),Yl=({children:e,last:t=!1,...r})=>n.jsxs(n.Fragment,{children:[n.jsx(d.Button,{...r,"data-close":!0,size:"small",variant:"tertiary",children:e}),!t&&n.jsx(d.Utils.Divider,{direction:"vertical",size:"small",className:qn.divider})]});Yl.displayName="Menu.NavigationBarItem";const Ql=()=>{const{setUserMenuIsOpen:e}=Bs(),{handleSelectContent:t}=ae(),{CONSTANTS:r}=Ne(),{router:s}=ce(),o=[{iconNameStart:r.header.ICONS.person,onClick:()=>{e(!0),t({content:"menu:user_menu"})},text:r.header.MENU_INFO.login.button_text},{iconNameStart:r.header.MENU_INFO.bag.button_icon,onClick:()=>{t({content:"menu:wishlist"}),s.push("/favoritos")},text:r.header.MENU_INFO.bag.button_text},{last:!0,iconNameStart:r.header.MENU_INFO.store.button_icon,onClick:()=>{t({content:"menu:store"}),s.push("/institucional/lojas")},text:r.header.MENU_INFO.store.button_text}];return n.jsx(d.Card,{id:"menu-navigationbar",shadow:!0,className:qn["menu--navigation-bar"],style:{zIndex:r.header.Z_INDEX_WAR.menu_mobile_navigation_bar},children:Array.isArray(o)&&o.map((a,i)=>g.createElement(Yl,{...a,key:i},a.text))})};Ql.displayName="Menu.NavigationBar";const kr={Body:Wl,NavigationBar:Ql,Root:dh},Zl=({storeConfig:e})=>{const t=g.useRef(null),{CONSTANTS:r}=Ne(),{MENU_NAVIGATION_BAR_ALLOWED:s,ICONS:o}=r.header,{handleSelectContent:a}=ae(),{setValue:i}=Xn(),{setValue:c}=Si(),{setValue:l}=Ds(),u=Ms(),p=Ci(),{isMobile:m}=ne();return n.jsxs(n.Fragment,{children:[n.jsxs(d.Header.Wrapper,{className:"header-mobile-wrapper",children:[n.jsx(d.Header.Logo,{style:{width:"100%"},children:n.jsx(ze,{href:"/",children:n.jsx(d.Icon,{name:o.logo,size:"x-large",onClick:()=>{a({content:"header:logo"})}})})}),n.jsxs(d.Header.Support,{children:[n.jsx(d.Header.SupportItem,{onClick:()=>{i(!0),a({content:"header:search"})},children:n.jsx(d.Icon,{name:o.search,size:"medium"})}),n.jsx(io,{}),n.jsxs(d.Header.SupportItem,{onClick:()=>c(!0),children:[n.jsx("span",{ref:t}),n.jsx(d.Icon,{name:o.menu,size:"medium"})]})]})]}),m&&n.jsx(zi,{menuIsOpen:p,setMenuIsOpen:c,userMenuIsOpen:p,setUserMenuIsOpen:l,children:n.jsx(sr,{storeConfig:e,isOpen:u,setIsOpen:l,mobileUserMenuTarget:t==null?void 0:t.current,children:n.jsxs(kr.Root,{children:[n.jsx(kr.Body,{}),s?n.jsx(kr.NavigationBar,{}):n.jsx(n.Fragment,{})]})})})]})};Zl.displayName="Header.HeaderMobileWrapper";const mh=g.createContext({}),ph=({children:e})=>{const{sendDataLayerEvent:t}=ae(),{cartStore:r,isOpen:s}=ve();g.useEffect(()=>{s&&t({functionKey:"viewCartEvent",data:{commonData:{cartStore:r}}})},[s]),g.useEffect(()=>{var a,i,c;if(r.id&&!((i=(a=r.marketingData)==null?void 0:a.marketingTags)!=null&&i.includes("faststore"))){const{id:l}=r;St.post("/api/checkout/order-form/attachments/marketing-data",{orderFormId:l,marketingData:{...r==null?void 0:r.marketingData,marketingTags:di(((c=r.marketingData)==null?void 0:c.marketingTags)??[])}}).catch(u=>{console.error(u)})}},[r]);const o=({cartItem:a,oldQuantity:i,newQuantity:c})=>{t({functionKey:"skuEvents",data:{event:i>c?"remove_from_cart":"add_to_cart",commonData:{products:[{...a,price:a.price/100,listPrice:a.listPrice/100}]},customData:{quantity:c},supportData:{selectedSkus:[a]}}})};return n.jsx(mh.Provider,{value:{handleUpdateItemQuantityEvent:o},children:e})},fh="var(--color-background-brand-primary-lighter)",hh="_fadeInOut_1l5ow_1",_h="_fadeOut_1l5ow_1",re={brandPrimaryLighter:fh,"mc--cashback":"_mc--cashback_1l5ow_1","mc--cashback--positive":"_mc--cashback--positive_1l5ow_21","mc--cashback--alert":"_mc--cashback--alert_1l5ow_24","mc--container--actions":"_mc--container--actions_1l5ow_28","mc--container--actions--secondary":"_mc--container--actions--secondary_1l5ow_36","mc-container-actions--toggle-size-modifier":"_mc-container-actions--toggle-size-modifier_1l5ow_55","mc--footer":"_mc--footer_1l5ow_63","mc--footer--actions":"_mc--footer--actions_1l5ow_72","mc--footer--actions-button":"_mc--footer--actions-button_1l5ow_77","mc--footer--total":"_mc--footer--total_1l5ow_93","mc--footer--total--info":"_mc--footer--total--info_1l5ow_98","mc--footer--total--info--content":"_mc--footer--total--info--content_1l5ow_103","mc--field":"_mc--field_1l5ow_149","mc--body":"_mc--body_1l5ow_189","mc--body--products":"_mc--body--products_1l5ow_196","mc--body--empty--feedback":"_mc--body--empty--feedback_1l5ow_204","mc--body--empty--text":"_mc--body--empty--text_1l5ow_209","mc--body--promotion":"_mc--body--promotion_1l5ow_222","mc--body--promotion--closeness":"_mc--body--promotion--closeness_1l5ow_225","mc--body--promotion--closeness--success":"_mc--body--promotion--closeness--success_1l5ow_248","mc--body--coupon-tag":"_mc--body--coupon-tag_1l5ow_260","mc--body--coupon-tag--text":"_mc--body--coupon-tag--text_1l5ow_278","mc--body--coupon-tag--button":"_mc--body--coupon-tag--button_1l5ow_284","mc--header":"_mc--header_1l5ow_290","mc--header--subtitle":"_mc--header--subtitle_1l5ow_316","mc--notify":"_mc--notify_1l5ow_357","mc--notify--content":"_mc--notify--content_1l5ow_372","mc--notify--item":"_mc--notify--item_1l5ow_385",fadeInOut:hh,fadeOut:_h,"mc--card":"_mc--card_1l5ow_447","mc--card--actions":"_mc--card--actions_1l5ow_452","mc--card--actions--secondary":"_mc--card--actions--secondary_1l5ow_460","mc--card--actions--add-remove":"_mc--card--actions--add-remove_1l5ow_487","mc--card--actions--gift":"_mc--card--actions--gift_1l5ow_501","mc--card--content-info":"_mc--card--content-info_1l5ow_514","mc--card--details":"_mc--card--details_1l5ow_521","mc--card--link":"_mc--card--link_1l5ow_526","mc--product--unavailable":"_mc--product--unavailable_1l5ow_534","mc--card--name":"_mc--card--name_1l5ow_537","mc--card--price":"_mc--card--price_1l5ow_552","mc--card--price--old-price":"_mc--card--price--old-price_1l5ow_562","mc--card--price--price-details":"_mc--card--price--price-details_1l5ow_566","mc--card--product-link":"_mc--card--product-link_1l5ow_577","mc--discount":"_mc--discount_1l5ow_587","mc--discount--header":"_mc--discount--header_1l5ow_590","inputs--tooltip":"_inputs--tooltip_1l5ow_590","mc--discount--body":"_mc--discount--body_1l5ow_609","minicart--modal-modifier":"_minicart--modal-modifier_1l5ow_630"},Jl=({item:{id:e,message:t,callback:r},removeNotification:s,ICONS:o})=>{const a=g.useRef(null),i=()=>{var l;(l=a.current)==null||l.setAttribute("data-animation-out","true")},c=l=>{s(l)};return n.jsx("div",{className:re["mc--notify--item"],ref:a,onAnimationEnd:()=>c(e),children:n.jsxs(d.SnackBar.Structure,{size:"medium",children:[n.jsx(d.SnackBar.Content,{title:t}),n.jsxs(d.SnackBar.Support,{children:[typeof r=="function"&&n.jsx(d.Button,{onClick:()=>{r(),i()},size:"small",variant:"tertiary",children:"Desfazer"}),n.jsx(d.Button,{iconNameStart:o.close,iconSize:"small",onClick:()=>i(),variant:"tertiary"})]})]})},e)};Jl.displayName="MiniCart.Notify.Item";const eu=({ICONS:e})=>{const t=Os(),{removeNotification:r}=Ls(),s=t.length?[...t].sort((o,a)=>a.id-o.id):[];return s.length?n.jsx("div",{className:re["mc--notify"],children:n.jsx("div",{className:re["mc--notify--content"],children:Array.isArray(s)&&s.map(o=>n.jsx(Jl,{item:o,removeNotification:r,ICONS:e},o.id))})}):null};eu.displayName="MiniCart.Notifications";const gh=({handleSendEvent:e,onHandleRemove:t,product:r,MINICART_CONFIG:s,...o})=>{const a=qt(),{toggleProduct:i}=At(),{itemOffered:{isVariationOf:{productGroupID:c}},quantity:l}=r;return n.jsx(d.Button,{...o,adornment:{end:n.jsx(d.Icon,{name:`favorite-${a.includes(c)?"true":"false"}`,size:"small"})},onClick:()=>{i(c),a.includes(c)||t({texture:"mini-cart-wishlist",title:`${s.messages.add_wishlist}`},l,()=>i(c)),e(a.includes(c)?"remove_from_wishlist":"add_to_wishlist","productEvents")},children:s.messages.add_wishlist_button})},tu=({handleSendEvent:e,product:t,ICONS:r,MINICART_CONFIG:s,...o})=>{const{addToCart:a,removeToCart:i}=ve(),{bundleItems:c=[],id:l,uniqueId:u,seller:p,offerings:m,quantity:f}=t,h=(_,y,x)=>{i(l,_.title,()=>{typeof x=="function"&&x(),a({id:l,quantity:y,seller:p},{id:l,texture:_.texture},!0)})};return n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:re["mc--card--actions--add-remove"],children:[s.has_wishlist_button&&n.jsx(gh,{...o,product:t,handleSendEvent:e,onHandleRemove:h,ICONS:r,MINICART_CONFIG:s}),n.jsx(d.Button,{...o,adornment:{end:n.jsx(d.Icon,{name:r.delete,size:"small"})},underline:!0,variant:"secondary",state:"danger",onClick:()=>{h({texture:"mini-cart",title:`${s.messages.remove}`},f),e("remove_from_cart","skuEvents")},children:s.messages.remove_button})]}),s.has_gift_option&&n.jsx(Mt.Gift,{uniqueId:u,bundleItems:c,offerings:m,ICONS:r,MINICART_CONFIG:s})]})};tu.displayName="MiniCart.Card.Actions";const nu=({bundleItems:e,offerings:t,uniqueId:r,ICONS:s,MINICART_CONFIG:o})=>{const[a,i]=g.useState(!1),{toggleGiftItemCart:c}=ve(),l=()=>{if(t instanceof Object&&Array.isArray(t)){const[m]=t;if(m){i(!0);const f=e.some(h=>h.id===m.id);c(r,String(m.id),f).then(()=>i(!1))}}},u=t[0],p=e.find(m=>m.id===u.id);return u&&"id"in u?n.jsx("div",{className:re["mc--card--actions--gift"],children:n.jsx(d.Checkbox,{adornment:n.jsx(d.Icon,{name:s.check}),checked:!!p,disabled:a,label:o.messages.giftPackage,onChange:l})}):null};nu.displayName="MiniCart.Card.Gift";const ru=({itemOffered:e})=>{const t=D.updatedResizedImg(e==null?void 0:e.image[0].url,{width:200,height:300});return n.jsx(ze,{href:`${e==null?void 0:e.slug}`,className:re["mc--card--product-link"],children:n.jsx(Pe.Image,{alt:(e==null?void 0:e.image[0].alternateName)||"Produto",src:t||"",width:108,height:164,objectFit:"unset"})})};ru.displayName="MiniCart.Card.Media";const su=({name:e,skuName:t,tagName:r,className:s})=>n.jsxs(n.Fragment,{children:[r&&n.jsx(d.Tag,{variant:"quaternary",title:r,style:{textTransform:"uppercase"},children:r}),n.jsx("p",{className:d.helpers.classNameConcat(re["mc--card--name"],s),children:D.getProductNameWithoutSku(e??"",t??"")})]});su.displayName="MiniCart.Card.Name";const ou=({total:e,totalList:t})=>n.jsx(d.ProductInfo.Root,{children:n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{className:re["mc--card--price"],children:n.jsx(d.ProductInfo.Wrapper,{className:re["mc--card--price--details"],size:"small",layout:"horizontal",children:t&&e!==t?n.jsxs(n.Fragment,{children:[n.jsx(d.ProductInfo.Price,{label:"originalPrice",value:D.formatPriceToCurrency(t),size:"small"}),n.jsx(d.ProductInfo.Price,{label:"discountPrice",value:D.formatPriceToCurrency(e),size:"small"})]}):n.jsx(d.ProductInfo.Price,{label:"defaultPrice",value:D.formatPriceToCurrency(e),size:"small"})})})})});ou.displayName="MiniCart.ProductPrice";const au=({product:e,TEXTURE_IMAGE:t,TOGGLE_STYLE_MODIFIER:r,storeId:s})=>{var p;const[o,a]=g.useState(""),i=g.useRef(null),{cartStore:{options:c}}=ve(),l=e.itemOffered.isVariationOf.productGroupID,u=g.useCallback(()=>{var f;const m=(f=c==null?void 0:c.find(h=>h.id===l))==null?void 0:f.texture;if(m){a(m);return}fetch(`https://${s}.myvtex.com/_v/proxy/catalog/product/info`,{method:"POST",body:JSON.stringify({ids:[l]})}).then(h=>h.json()).then(h=>{const _=h.data[0].items.find(y=>y.itemId===e.id);if(_){const y=_.images.find(x=>t.includes(x.imageLabel));if(y!=null&&y.imageUrl){a(y.imageUrl);return}a(_.images[0].imageUrl)}}).catch(h=>{console.error(h)})},[c,l,e.id,s]);return g.useEffect(()=>{if(!i.current)return;const m=new IntersectionObserver(f=>{f[0].isIntersecting&&u()});return m.observe(i.current),()=>{m.disconnect()}},[u]),n.jsx("div",{ref:i,children:n.jsx(d.ToggleStyle.Wrapper,{size:"small",style:r,children:n.jsx(d.ToggleStyle.Texture,{children:o?n.jsx(Pe.Image,{alt:((p=e.itemOffered)==null?void 0:p.image[0].alternateName)??"Produto",src:o,width:164,height:164,style:r}):n.jsx(Tc,{})})})})};au.displayName="MiniCart.Card.Style";const iu=({product:e,MINICART_CONFIG:t,NAME_SPLIT_SYMBOL:r,TEXTURE_IMAGE:s,TOGGLE_STYLE_MODIFIER:o,storeId:a})=>{const{size:i}=D.getColorAndSizeFromSkuName(e.itemOffered.skuName??"",r);return n.jsxs(d.Utils.Row,{alignItems:"center",children:[n.jsx(au,{product:e,TEXTURE_IMAGE:s,TOGGLE_STYLE_MODIFIER:o,storeId:a}),n.jsx(d.Utils.Divider,{direction:"vertical",size:"small",style:{height:24}}),i&&n.jsx(d.ToggleSize.Wrapper,{size:t.product_card.sku.size??"small",variation:t.product_card.sku.variation??"fill",className:re["mc-container-actions--toggle-size-modifier"],style:{backgroundColor:`${re.brandPrimaryLighter}`},children:n.jsx(d.ToggleSize.Text,{children:i})})]})};iu.displayName="MiniCart.Card.Sku";const Mt={Actions:tu,Gift:nu,Media:ru,Name:su,Price:ou,Sku:iu},yh=e=>{var t;return{price:e.sellingPrice/100,listPrice:e.listPrice/100,totalPrice:(((t=e.priceDefinition)==null?void 0:t.total)??0)/100,totalListPrice:e.listPrice*e.quantity/100}},cu=({available:e=!0,index:t,product:r,ICONS:s,MINICART_CONFIG:o,NAME_SPLIT_SYMBOL:a,TEXTURE_IMAGE:i,TOGGLE_STYLE_MODIFIER:c,storeId:l})=>{var f,h;const{sendDataLayerEvent:u}=ae(),p=yh(r),m=(_,y)=>{const x={commonData:{...r,...p},customData:{index:t},event:_};if(y==="skuEvents"){const v={...r,...p};x.supportData={selectedSkus:[v]},x.commonData.products=[v]}u({functionKey:y,data:x})};return n.jsxs("div",{className:d.helpers.classNameConcat(re["mc--card"],e?"":re["mc--card--unavailable"]),children:[n.jsx(Mt.Media,{itemOffered:r.itemOffered}),n.jsxs("div",{className:re["mc--card--content-info"],children:[n.jsx(Mt.Name,{name:((f=r.itemOffered)==null?void 0:f.name)??"",skuName:(h=r.itemOffered)==null?void 0:h.skuName}),n.jsxs("div",{className:re["mc--card--details"],children:[n.jsx("div",{className:re["mc--card--actions"],children:e?n.jsx(Mt.Price,{total:p.price,totalList:p.listPrice}):n.jsx(d.Tag,{variant:"secondary",size:"small",children:"Indisponível"})}),n.jsxs("div",{className:re["mc--card--actions--secondary"],children:[e&&n.jsx(Mt.Sku,{product:r,MINICART_CONFIG:o,NAME_SPLIT_SYMBOL:a,TEXTURE_IMAGE:i,TOGGLE_STYLE_MODIFIER:c,storeId:l}),n.jsx(Mt.Actions,{handleSendEvent:m,product:r,size:"small",variant:"tertiary",ICONS:s,MINICART_CONFIG:o})]})]})]})]})};cu.displayName="MiniCart.Card";const lu=({type:e="positive",ICONS:t,MESSAGE_CASHBACK:r})=>{var a;const{toExpire:s}=Ht(),o=((a=s==null?void 0:s.cashback)==null?void 0:a.reduce((i,c)=>i+c.remaining_value,0))??0;return o>0?n.jsxs("div",{className:d.helpers.classNameConcat(re["mc--cashback"],re[`mc--cashback--${e}`]),children:[n.jsx(d.Icon,{name:t.alert_circle,size:"medium"}),n.jsxs("p",{children:[n.jsx("span",{children:D.formatPriceToCurrency(o)})," ",r.title]})]}):null};lu.displayName="MiniCart.Cashback";const uu=({type:e,ICONS:t,MINICART_CONFIG:r})=>{const{addCouponSeller:s,removeCoupon:o,removeSellerCode:a,cartStore:{marketingData:i,openTextField:c}}=ve(),[l,u]=g.useState(!1),[p,m]=g.useState(!1),f=g.useCallback(()=>{let x="";return e==="coupon"?x=(i==null?void 0:i.coupon)??"":x=String((c==null?void 0:c.value)??""),x.toUpperCase()??""},[i,c,e]),[h,_]=g.useState(!!f()),y=async x=>{m(!0),!!f()&&(e==="coupon"?await o():await a(),_(!1),u(!1)),await s(x,e).then(C=>{if(!C.statusOk&&x||C.code!==200){x?(u(!0),_(!1)):u(!1);return}_(!0),u(!1)}).catch(()=>u(!0)).finally(()=>m(!1))};return n.jsx(De.Field,{hasError:l,hasSuccess:h,isLoading:p,onHandler:y,type:e,title:e==="coupon"?`${r.messages.descount_cupom_placeholder}`:`${r.messages.sellers_code_placeholder}`,value:f(),MINICART_CONFIG:r,ICONS:t})};uu.displayName="MiniCart.CouponSeller";const du=({ICONS:e,MINICART_CONFIG:t,PLP_NOT_RESULT:r})=>{const{router:s}=ce(),o=()=>{s.push(r.link)};return n.jsxs(d.Utils.Column,{alignContent:"center",alignItems:"center",gap:"24px",className:re["mc--body--empty--feedback"],children:[n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{children:n.jsxs("p",{className:`typography-style-body-xs ${re["mc--body--empty--text"]}`,children:[t.messages.empty_card," "]})})}),n.jsx(d.Button,{variant:"tertiary",size:"large",onClick:()=>o(),"data-close":!0,adornment:{end:n.jsx(d.Icon,{name:e.arrow_right,size:"medium"})},children:t.messages.empty_bag})]})};du.displayName="MiniCart.Feedback";const xh=e=>{const t=e.replace(/\D/g,"");return t.length>5?`${t.slice(0,5)}-${t.slice(5,8)}`:t},mu=({feedback:e,hasError:t,onHandler:r,hasSuccess:s,type:o,title:a,value:i,ICONS:c})=>{const[l,u]=g.useState(i);g.useEffect(()=>{t||u(i)},[i,t]);const p=()=>t?n.jsx(d.Icon,{name:c.delete_circle}):String(i).length&&s?n.jsx(d.Icon,{name:c.check_circle}):null,m=()=>{if(o==="seller"){const y=String(i).includes(" - ")?String(i).split(" - ")[0]:l;u(y)}},f=()=>{if(o==="seller"){const y=String(i).includes(" - ")?i:l;u(y)}},h=y=>{const x=y.currentTarget.value;if(x===""&&typeof r=="function"||s&&String(i).length>0&&x!==String(i)||t&&x!==String(i)){u(""),r("");return}if(o==="cep"){const C=xh(x);u(C)}else u(x)},_=y=>{if(y.key.toLocaleLowerCase()==="enter"&&typeof r=="function"){const x=y.currentTarget.value;r(x)}};return n.jsx(d.TextField.Input,{adornment:{end:p()},mode:"over-label",label:a,feedback:e,value:l,type:"text",onFocus:m,onBlur:f,onChange:h,onKeyDown:_})};mu.displayName="MiniCart.Field.Input";const pu=({title:e,ICONS:t,MINICART_CONFIG:r,...s})=>{const o=g.useRef(null),{hasSuccess:a,hasError:i,isLoading:c,onHandler:l,type:u,value:p}=s,m=()=>i?"error":String(p).length&&a?"success":"none",f=g.useCallback(()=>{if(o.current){const y=o.current.querySelector("input");y&&typeof l=="function"&&(p!==""||i?(l(""),y.value=""):l((y==null?void 0:y.value)??""))}},[l,p,i]),h=m();return n.jsx("div",{ref:o,children:n.jsx(d.TextField.Structure,{className:re["mc--field"],input:n.jsx(mu,{...s,feedback:h,title:e,ICONS:t}),right:n.jsx(d.Button,{"data-has-success":!a,size:"medium",title:String(p).length&&a||i?"Remover":"Aplicar",onClick:()=>f(),disabled:c,children:String(p).length&&a||i?n.jsx(d.Icon,{name:"close",size:"small"}):`${r.messages.promo_code_button}`}),supportText:u==="cep"&&h==="success"?n.jsx(d.TextField.SupportText,{text:"Mais informações de frete na etapa a seguir",feedback:"success",title:"support"}):null})})};pu.displayName="MiniCart.Field";const oa=e=>{const t=e*100;return Math.round(t)},vh=e=>(e/100).toFixed(2).replace(".",","),bh=(e,t)=>{const{valueType:r,remainingValueToActivate:s}=e;if(r==="quantity")return`Adicione mais ${s} ${s===1?"item":"itens"} ${t}`;if(r==="price"){const o=s===100?"Falta":"Faltam",a=vh(s);return`${o} R$ ${a} ${t}`}return t},fu=({ICONS:e})=>{var v;const{promotionRules:t,data:r,cartStore:s,cartStore:{items:o,marketingData:a},addCouponSeller:i,setIsOpen:c}=ve(),{sendDataLayerEvent:l}=ae(),u=(v=r==null?void 0:r.promotion)==null?void 0:v.promotionCart,p=g.useRef(!1),{router:m}=ce();if(g.useEffect(()=>{(u==null?void 0:u.selectPromotion)==="Cupom"&&(t==null?void 0:t.remainingValueToActivate)&&(t==null?void 0:t.remainingValueToActivate)<=0&&(u==null?void 0:u.cupom)&&!p.current&&(a==null?void 0:a.coupon)!==u.cupom&&(p.current=!0,i(u.cupom,"coupon")),t!=null&&t.remainingValueToActivate&&(t==null?void 0:t.remainingValueToActivate)<=0&&l({functionKey:"viewCartEvent",data:{event:"closeness_filled",commonData:{cartStore:s}}}),t!=null&&t.remainingValueToActivate&&(t==null?void 0:t.remainingValueToActivate)>0&&(p.current=!1)},[u==null?void 0:u.selectPromotion,t==null?void 0:t.remainingValueToActivate,u==null?void 0:u.cupom,a==null?void 0:a.coupon,i]),!t||!u||u.selectPromotion==="Desativar"||o.length===0)return null;const f=u.title,h=u.subtitle,_=u.titleSuccess,y=u.subtitleSuccess,x=u.linkLabel;return n.jsxs("div",{className:re["mc--body--promotion"],children:[t.remainingValueToActivate>0&&n.jsx(d.Closeness,{className:re["mc--body--promotion--closeness"],title:bh(t,f),subtitle:h,percentage:oa(t.completeness),iconLink:e.arrow_right,linkLabel:x,onClick:()=>{l({functionKey:"viewCartEvent",data:{event:"closeness_view_more",commonData:{cartStore:s}}}),m.push(`${u.link}`),c(!1)}}),t.remainingValueToActivate<=0&&n.jsx(d.Closeness,{className:`${re["mc--body--promotion--closeness"]} ${re["mc--body--promotion--closeness--success"]}`,title:_,subtitle:y,percentage:oa(t.completeness)})]})};fu.displayName="MiniCart.Modal.Body.Promotion";const hu=({TIPBAR_CONFIGS:e})=>{const{data:t,cartStore:r,cartStore:{items:s,marketingData:o},addCouponSeller:a}=ve(),i=t==null?void 0:t.flags.flagCart.flagCupom,c=(o==null?void 0:o.coupon)===(i==null?void 0:i.valueCupom),[l,u]=g.useState(!1),[p,m]=g.useState(!1);if(g.useEffect(()=>{l&&setTimeout(()=>{u(!1)},e.snackbar_timeout)},[l]),g.useEffect(()=>{p&&setTimeout(()=>{m(!1)},e.snackbar_timeout)},[p]),!i||i.active==="Desativar"||i.valueCupom===""||s.length===0)return null;const f=async()=>{if(!r.items.length){m(!0);return}(await a(i==null?void 0:i.valueCupom,"coupon")).code!==200&&u(!0)};return n.jsxs("div",{className:re["mc--body--coupon-tag"],style:{backgroundColor:`${i.tagColor}`,color:`${i.textColor}`},children:[n.jsx("div",{className:re["mc--body--coupon-tag--text"],dangerouslySetInnerHTML:{__html:i.value}}),n.jsx("div",{className:re["mc--body--coupon-tag--button"],children:n.jsx(d.Button,{variant:"quaternary",mode:"inverse",onClick:f,disabled:c,children:c?"Cupom Aplicado":"Aplicar Cupom"})})]})};hu.displayName="MiniCart.Modal.Body.CouponTag";const _u=({children:e,ICONS:t,MINICART_CONFIG:r,NAME_SPLIT_SYMBOL:s,PLP_NOT_RESULT:o,TEXTURE_IMAGE:a,TIPBAR_CONFIGS:i,TOGGLE_STYLE_MODIFIER:c,storeId:l})=>{const{cartStore:{items:u,messages:p}}=ve();return n.jsxs(d.Modal.Body,{className:re["mc--body"],children:[e,n.jsx(fu,{ICONS:t}),n.jsx(hu,{TIPBAR_CONFIGS:i}),n.jsx("div",{className:re["mc--body--products"],children:Array.isArray(u)&&u.length?u.map((m,f)=>{const h=p.find(_=>{var y;return _.code==="withoutStock"&&((y=_.fields)==null?void 0:y.ean)===m.ean})!==void 0;return n.jsx(De.Card,{available:!m.availability.includes("outStock")||!h,index:f,product:m,ICONS:t,MINICART_CONFIG:r,NAME_SPLIT_SYMBOL:s,TEXTURE_IMAGE:a,TOGGLE_STYLE_MODIFIER:c,storeId:l},`${m.id}-${m.itemOffered.sku}-${f}`)}):n.jsx(De.Feedback,{ICONS:t,MINICART_CONFIG:r,PLP_NOT_RESULT:o})})]})};_u.displayName="MiniCart.Body";const gu=({children:e,storeConfig:t,MINICART_CONFIG:r})=>{const{cartStore:s}=ve();if(s.items.length===0)return null;const o=()=>{var i;const a=new URLSearchParams({orderFormId:s.id,...((i=s.marketingData)==null?void 0:i.utmCampaign)&&{utm_campaign:s.marketingData.utmCampaign}});window.location.href=`${t.checkoutUrl}?${a.toString()}#/cart`};return n.jsxs(d.Modal.Footer,{className:re["mc--footer"],children:[e,n.jsx("div",{className:re["mc--footer--actions"],children:n.jsx(d.Button,{variant:"primary",size:"large","data-close":!0,className:re["mc--footer--actions-button"],onClick:o,children:r.messages.checkout_button})})]})};gu.displayName="MiniCart.Modal.Footer";const yu=({children:e,ICONS:t,MINICART_CONFIG:r,Z_INDEX_WAR:s})=>{const[o,a]=g.useState(!1),i=g.useRef(null),c=()=>a(l=>!l);return n.jsxs(n.Fragment,{children:[o&&n.jsx(d.Tooltip.Root,{arrow:"right",position:"top",top:-3,left:-3,component:n.jsx("p",{children:"Código da vendedora, cupom ou cálculo do frete"}),id:"inputs--tooltip",className:re["inputs--tooltip"],style:{zIndex:s.modal},isOpen:!0,size:"medium",parent:i.current}),n.jsxs(d.Accordion.Wrapper,{className:re["mc--discount"],children:[n.jsx(d.Accordion.Header,{id:"frete",title:"Frete",closeIndicator:n.jsx(d.Icon,{name:t.arrow_up,size:"medium"}),openIndicator:n.jsx(d.Icon,{name:t.arrow_down,size:"medium"}),className:d.helpers.classNameConcat(re["mc--discount--header"]),startOpen:r.promotion_input_starts_open,children:n.jsxs(d.TextStructure.Root,{children:[n.jsx(d.TextStructure.DivWrapper,{children:n.jsxs("h3",{className:"typography-style-body-sm",children:[r.messages.promo_code_title," "]})}),n.jsx("div",{ref:i,onMouseEnter:c,onMouseLeave:c,"aria-label":"Mostrar descrição",children:n.jsx(d.Icon,{name:t.alert_circle,size:"small"})})]})}),n.jsx(d.Accordion.Body,{className:re["mc--discount--body"],children:e})]})]})};yu.displayName="MiniCart.Discount";const xu=({discount:e,shipping:t,total:r})=>{var l,u;const{data:s}=ve(),o=(u=(l=s==null?void 0:s.flags)==null?void 0:l.flagCart)==null?void 0:u.flagTotal,a=r-Math.abs(e??0)+(t??0),i=t===0?"Frete Grátis":D.formatPriceToCurrency((t??0)/100),c=[{title:"Frete",value:t===void 0?"A calcular":i},{title:"Desconto",value:D.formatPriceToCurrency((e??0)/100)},{message:(o==null?void 0:o.value)??"",title:"Total",value:`1x de ${D.formatPriceToCurrency(a/100)}`}];return n.jsx("div",{className:re["mc--footer--total"],children:Array.isArray(c)&&c.map((p,m)=>n.jsxs("div",{className:re["mc--footer--total--info"],"data-discount":p.title==="Desconto",children:[n.jsx("p",{children:p.title}),n.jsxs("div",{className:re["mc--footer--total--info--content"],children:[p.message&&(o==null?void 0:o.active)==="Ativar"&&n.jsx(d.Tag,{variant:"primary",title:p.message,style:{backgroundColor:o==null?void 0:o.tagColor,color:o==null?void 0:o.textColor},children:p.message}),n.jsx(d.ProductInfo.Price,{className:re["mc--footer--total--info"],label:p.title,value:p.value})]})]},m))})};xu.displayName="MiniCart.Modal.Footer.Resume.Items";const vu=()=>{var o,a,i;const{totalizers:e}=Pt(),t=((o=e.find(c=>c.id==="Items"))==null?void 0:o.value)??0,r=(a=e.find(c=>c.id==="Discounts"))==null?void 0:a.value,s=(i=e.find(c=>c.id==="Shipping"))==null?void 0:i.value;return n.jsx(xu,{discount:r??0,total:t,shipping:s})};vu.displayName="MiniCart.Modal.Footer.Totals";const bu=({ICONS:e,MINICART_CONFIG:t})=>{const{isMobile:r}=ne(),{cartStore:{items:s}}=ve(),o=s.reduce((a,i)=>a+(i.quantity??0),0);return n.jsx(d.Modal.Header,{navigation:"top",className:re["mc--header"],children:n.jsxs(d.Modal.Controls,{navigation:"top",isMobile:!!r,children:[n.jsx(d.Modal.Title,{navigation:"top",title:t.messages.title}),n.jsx("span",{className:re["mc--header--subtitle"],children:o!==1?`[${o}] Produtos`:`[${o}] Produto`}),n.jsx(d.Button,{"data-close":!0,iconNameStart:e.close,size:"small",variant:"tertiary"})]})})};bu.displayName="MiniCart.Modal.Header";const ju=({ICONS:e,MINICART_CONFIG:t})=>{const{cartStore:{shippingData:r},shipping:s,removeCEP:o}=ve(),{sendDataLayerEvent:a}=ae(),[i,c]=g.useState(!1),[l,u]=g.useState(!1),p=g.useCallback(()=>{var C;const v=((C=r==null?void 0:r.address)==null?void 0:C.postalCode)??"";return v.length===8&&!v.includes("-")?`${v.slice(0,5)}-${v.slice(5)}`:v},[r]),[m,f]=g.useState(!!p()),h=()=>{f(!1),c(!1)},_=v=>{var C;if(typeof v=="object"&&(v!=null&&v.logisticsInfo))return(C=v.logisticsInfo)==null?void 0:C.reduce((j,b)=>{var R;const w=(R=b==null?void 0:b.slas)==null?void 0:R.find(A=>(A==null?void 0:A.id)===(b==null?void 0:b.selectedSla));if(!w)return j;const P=parseInt(String((w==null?void 0:w.shippingEstimate)??"").replace("bd","")),S=Number((((w==null?void 0:w.price)??0)/100).toFixed(2));if(j.shipping_tier===void 0)return j.shipping_tier=b==null?void 0:b.selectedSla,j.delivery_time=P.toString(),j.shipping=S,j.flag_retirada=(b==null?void 0:b.selectedDeliveryChannel)==="delivery"?"false":"true",j;const N=parseInt(j.delivery_time??"0");return P>N&&(j.delivery_time=P.toString()),j.shipping=(j.shipping??0)+S,j},{shipping_tier:void 0,delivery_time:void 0,flag_retirada:void 0,shipping:void 0,currency:"BRL"})},y=async v=>{const C=v.replace(/\D/g,"");if(C.length!==8)return!1;try{return!(await St.get(`https://viacep.com.br/ws/${C}/json/`)).data.erro}catch{return!1}},x=async v=>{if(u(!0),!!p()||!(v!=null&&v.trim())){await o(),h(),u(!1);return}if(!await y(v)){c(!0),f(!1),u(!1);return}try{const w=await s(v);if(c(!1),w){f(!0);const P=_(w);P&&a({functionKey:"readyEvents",data:{event:"search_zipcode",readyData:P}})}}catch{c(!0)}finally{u(!1)}};return n.jsx(De.Field,{hasSuccess:m,hasError:i,isLoading:l,onHandler:x,title:`${t.messages.shipping_calculation_placeholder}`,type:"cep",value:p(),ICONS:e,MINICART_CONFIG:t})};ju.displayName="MiniCart.Shipping";const Cu=()=>{var r,s;const{data:e}=ve(),t=(s=(r=e==null?void 0:e.flags)==null?void 0:r.flagCart)==null?void 0:s.flagHeader;return t!=null&&t.value?n.jsx(d.Tag,{variant:"tertiary",title:t==null?void 0:t.value,size:"small",adornment:{start:t!=null&&t.enableIcon&&(t!=null&&t.icon)?n.jsx(d.Icon,{name:t==null?void 0:t.icon,style:{color:t==null?void 0:t.iconColor}}):null},style:{background:t==null?void 0:t.tagColor,color:t==null?void 0:t.textColor,width:"100%"},children:t==null?void 0:t.value}):null};Cu.displayName="MiniCart.TagMessage";const De={Body:_u,Card:cu,Cashback:lu,CouponSeller:uu,Discount:yu,Field:pu,Feedback:du,Shipping:ju,Footer:gu,Header:bu,TagMessage:Cu,Totals:vu},jh=({ICONS:e,MINICART_CONFIG:t,NAME_SPLIT_SYMBOL:r,PLP_NOT_RESULT:s,TEXTURE_IMAGE:o,TIPBAR_CONFIGS:a,TOGGLE_STYLE_MODIFIER:i,Z_INDEX_WAR:c,storeConfig:l,minicartStyleModifiers:u})=>{const{isOpen:p,setIsOpen:m}=ve(),{isMobile:f}=ne();return n.jsxs(d.Modal.Root,{className:d.helpers.classNameConcat(re["minicart--modal-modifier"],u),isMobile:!0,isOpen:p,setIsOpen:m,style:{zIndex:c.modal},variant:f?"sideBottom":"sideRight",children:[n.jsx(De.Header,{ICONS:e,MINICART_CONFIG:t}),n.jsx(De.Body,{ICONS:e,MINICART_CONFIG:t,NAME_SPLIT_SYMBOL:r,PLP_NOT_RESULT:s,TEXTURE_IMAGE:o,TOGGLE_STYLE_MODIFIER:i,TIPBAR_CONFIGS:a,storeId:l.api.storeId,children:n.jsx(De.TagMessage,{})}),n.jsxs(De.Footer,{MINICART_CONFIG:t,storeConfig:l,children:[n.jsxs(De.Discount,{ICONS:e,MINICART_CONFIG:t,Z_INDEX_WAR:c,children:[n.jsx(De.CouponSeller,{type:"seller",ICONS:e,MINICART_CONFIG:t}),n.jsx(De.CouponSeller,{type:"coupon",ICONS:e,MINICART_CONFIG:t}),n.jsx(De.Shipping,{ICONS:e,MINICART_CONFIG:t})]}),n.jsx(De.Totals,{})]}),n.jsx(eu,{ICONS:e})]})},Su=({tipBar:e,minicartStyleModifiers:t,menuV2:r,storeConfig:s,className:o})=>{const{structureRef:a,rootRef:i,CONSTANTS:c}=Ne(),{header:{HEADER_CONFIGS:l,Z_INDEX_WAR:u},minicart:p}=c;return n.jsx(d.Header.Structure,{innerRef:a,adornment:{start:e},style:{position:"sticky",top:0,zIndex:u.header},className:d.helpers.classNameConcat(ao["header-animation"],o),children:n.jsxs(d.Header.Root,{innerRef:i,style:{zIndex:u.header},variant:l.default_variant,interactiveVariant:l.interactive_variant,children:[r??n.jsxs(sh,{children:[n.jsx("div",{className:D.responsive["responsive-mobile-block"],style:{height:"100%",width:"100%",zIndex:u.header_mobile},children:n.jsx(Zl,{storeConfig:s})}),n.jsx("div",{className:D.responsive["responsive-desktop-block"],style:{height:"100%",width:"100%",zIndex:u.header_desktop},children:n.jsx($l,{storeConfig:s})})]}),n.jsx(ph,{children:n.jsx(jh,{...p,minicartStyleModifiers:t})}),n.jsx(Js,{title:"Produto adicionado à sua sacola!",CONSTANTS:c.addToCart})]})})};Su.displayName="Header";const Ch="_shippingFreight_6z8rf_6",Sh="_shippingFreight__postalCodeGrid_6z8rf_10",wh="_shippingFreight__grid_6z8rf_14",Ph="_shippingFreight__grid__title_6z8rf_18",Nh="_shippingFreight__grid__remember_6z8rf_29",Eh="_postalCodeContainer_6z8rf_44",Ih="_deliveryStatusBar__tag_6z8rf_49",Rh="_deliveryStatusBarError__tag_6z8rf_66",Th="_deliveryInfo_6z8rf_74",Ah="_deliveryInfo__content_6z8rf_78",kh="_deliveryInfo__text_6z8rf_84",Oh="_deliveryInfo__title_6z8rf_89",Lh="_deliveryInfo__subtitle_6z8rf_99",Mh="_deliveryInfo__tooltipIcon_6z8rf_109",Dh="_deliveryInfo__tooltip_6z8rf_109",$h="_freightGrid_6z8rf_148",zh="_freightContainer_6z8rf_155",Fh="_freightOption__content_6z8rf_160",Bh="_freightOption__value_6z8rf_166",Uh="_freightOption__title_6z8rf_177",qh="_freightOption__title_item_6z8rf_181",Hh="_freightOption__paragraph_6z8rf_192",de={shippingFreight:Ch,shippingFreight__postalCodeGrid:Sh,shippingFreight__grid:wh,shippingFreight__grid__title:Ph,shippingFreight__grid__remember:Nh,postalCodeContainer:Eh,deliveryStatusBar__tag:Ih,deliveryStatusBarError__tag:Rh,deliveryInfo:Th,deliveryInfo__content:Ah,deliveryInfo__text:kh,deliveryInfo__title:Oh,deliveryInfo__subtitle:Lh,deliveryInfo__tooltipIcon:Mh,deliveryInfo__tooltip:Dh,freightGrid:$h,freightContainer:zh,freightOption__content:Fh,freightOption__value:Bh,freightOption__title:Uh,freightOption__title_item:qh,freightOption__paragraph:Hh,"input-modifier":"_input-modifier_6z8rf_207","freight--tooltip":"_freight--tooltip_6z8rf_227"},Vh=({icon:e,title:t,subtitle:r,packageCount:s,packageUnit:o="",labelDescription:a,freightConfig:i,toolTipZIndex:c})=>{const[l,u]=g.useState(!1),p=g.useRef(null),m=()=>u(f=>!f);return n.jsxs("div",{className:de.deliveryInfo,ref:p,children:[n.jsx(d.Tooltip.Root,{arrow:"bottom",component:n.jsx("div",{children:n.jsx("p",{children:i.messages.select_size_tag})}),id:"freight--tooltip",className:de["freight--tooltip"],style:{zIndex:c},isOpen:!0,size:"medium",position:"top",top:"-170%",left:"4%",parent:p.current}),n.jsxs("div",{className:de.deliveryInfo__content,children:[n.jsx("div",{className:de.deliveryInfo__icon,children:n.jsx(d.Icon,{name:e,size:"medium"})}),n.jsxs("div",{className:de.deliveryInfo__text,children:[n.jsxs("span",{className:de.deliveryInfo__title,children:[t," ",s," ",o]}),r&&n.jsx("span",{className:de.deliveryInfo__subtitle,children:r})]}),a&&n.jsxs("div",{className:de.deliveryInfo__tooltipIcon,onMouseEnter:m,onMouseLeave:m,"aria-label":"Mostrar descrição",children:[n.jsx("span",{children:n.jsx(d.Icon,{name:i.icons.feedback_help,size:"small"})}),l&&n.jsx("div",{className:de.deliveryInfo__tooltip,children:a})]})]})]})},Wh=({value:e,title:t,paragraph:r})=>n.jsx("div",{className:de.freightOption,children:n.jsxs("div",{className:de.freightOption__content,children:[n.jsx("span",{className:de.freightOption__value,children:e}),n.jsx("span",{className:de.freightOption__title,children:n.jsx(d.TextStructure.Root,{children:n.jsxs(d.TextStructure.DivWrapper,{className:de.footer__item,children:[n.jsx("span",{className:de.freightOption__title_item,children:t}),r&&n.jsx("span",{className:de.freightOption__paragraph,children:r})]})})})]})}),Gh=({children:e})=>n.jsx("div",{className:de.freightContainer,children:e}),Kh=({children:e})=>n.jsx("div",{className:de.freightGrid,children:e}),Xh=({children:e})=>n.jsx("div",{className:de.postalCodeContainer,children:e}),aa=({message:e,seller:t="",size:r="small",setError:s})=>n.jsx("div",{className:s?de.deliveryStatusBarError:de.deliveryStatusBar,children:n.jsxs(d.Tag,{title:e,className:s?de.deliveryStatusBarError__tag:de.deliveryStatusBar__tag,size:r,children:[e," ",!s&&t]})}),Yh=e=>{const t=parseInt(e,10);return t===1?`${t} dia`:`${t} dias`},Qh=e=>{var r,s,o;const t=[];return(o=(s=(r=e==null?void 0:e.logisticsInfo)==null?void 0:r[0])==null?void 0:s.slas)==null||o.forEach(a=>{t.push({id:a.id,name:a.name,price:a.price,shippingEstimate:a.shippingEstimate})}),t},Zh=({component:e,parent:t,top:r,left:s,target:o,contentRef:a,freightConfig:i,toolTipZIndex:c=999,...l})=>{const{isMobile:u}=ne();return n.jsx(n.Fragment,{children:u?n.jsx(d.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:de["freight--tooltip"],style:{zIndex:c},isOpen:!0,size:"medium",position:"top",top:"-170%",left:"4%",parent:t}):n.jsx(d.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:de["freight--tooltip"],style:{zIndex:c},isOpen:!0,size:"medium",position:"top",top:"-110%",left:"3%",parent:t})})},Jh=({onUpdateFreightItems:e,sellerId:t,size:r,skuId:s,quantity:o,setError:a,setIsButtonClicked:i,component:c,freightConfig:l,toolTipZIndex:u})=>{var L,O,G,M;const p=Pt(),m=Pt(U=>U.shipping),[f,h]=g.useState(),[_,y]=g.useState(!1),[x,v]=g.useState(!1),[C,j]=g.useState(!1),b=(O=(L=p.shippingData)==null?void 0:L.address)==null?void 0:O.postalCode,w=!(f!=null&&f.length)&&b?b:f,P=g.useRef(null),S=async U=>{const X=U.target.value.replace(/\D/g,"").slice(0,8);X.length>5?h(X.replace(/^(\d{5})(\d{1,3})/,"$1-$2")):h(X)},N=async U=>{const Y=U.target.value.replace(/\D/g,"");try{if((await St.get(`https://viacep.com.br/ws/${Y}/json/`)).data.erro){a&&a(l.messages.cep_not_found),i(!1),v(!0);return}a&&a(""),v(!1)}catch{console.log("Erro ao validar o CEP. Tente novamente mais tarde.")}},R=async()=>{y(!0);try{const U=await St.post("/api/checkout/simulation",{items:[{id:s,quantity:o,seller:t}],country:"BRA",postalCode:w});e(Qh(U.data))}catch(U){console.error("Erro ao atualizar o documento:",U)}finally{y(!1),m(w,"BRA")}},A=async()=>{if(!s){j(!0),setTimeout(()=>j(!1),1500);return}await N({target:{value:w}}),_||(R(),i(!0))};return n.jsxs("div",{ref:P,style:{position:"relative"},children:[!s&&C?n.jsx(Zh,{component:c,isOpen:C,parent:P.current,toolTipZIndex:u,freightConfig:l}):n.jsx(n.Fragment,{}),n.jsx("div",{style:{position:"relative"},children:n.jsx(d.TextField.Structure,{title:"structure",style:{width:"100%"},input:n.jsx(d.TextField.Input,{defaultValue:(M=(G=p.shippingData)==null?void 0:G.address)==null?void 0:M.postalCode,label:l.messages.text_input_label,title:"textfield",value:f,sizeVariant:r,onMouseOver:()=>s?null:j(!0),onMouseOut:()=>s?null:j(!1),mode:"simple",onChange:S,onKeyDown:U=>{U.key==="Enter"&&A()},className:de["input-modifier"],feedback:x?"error":"none"}),right:n.jsx(d.Button,{onClick:A,size:r,title:"button",children:_?n.jsx(d.Spinner,{size:"small",indicatorColor:"#ffffff"}):l.messages.text_input_btn})})})]})},e_=({children:e,freightConfig:t})=>n.jsxs("div",{className:de.shippingFreight,children:[n.jsxs("div",{className:de.shippingFreight__grid,children:[n.jsx("span",{className:de.shippingFreight__grid__title,children:t.messages.title}),n.jsx("span",{className:de.shippingFreight__grid__remember,children:n.jsx(Le,{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:de.shippingFreight__postalCodeGrid,children:e})]}),t_=({children:e})=>n.jsx("div",{className:de.freightContainer,children:e}),wu=({className:e,sellerId:t,skuId:r,quantity:s,size:o,seller:a,local:i,CONSTANTS_PROPS:c})=>{const{sendDataLayerEvent:l}=ae(),[u,p]=g.useState(""),[m,f]=g.useState([]),[h,_]=g.useState(""),[y,x]=g.useState(!1),v=j=>p(j),C=j=>{f(j),l({functionKey:"readyEvents",data:{event:"search_zipcode",readyData:{shippings:j.map(b=>({shipping_tier:b.id,delivery_time:b.shippingEstimate.replace("bd",""),flag_pickup:b.name.toLowerCase().includes("retirada")?"true":"false",shipping:b.price,currency:c.currency||"BRL"}))}}})};return n.jsxs(t_,{className:e,children:[n.jsxs(e_,{freightConfig:c.freightConfig,children:[n.jsx(Xh,{children:n.jsx(Jh,{onUpdateFreightItems:C,skuId:r,quantity:s,size:o,sellerId:t,local:i,setError:_,setIsButtonClicked:x,freightConfig:c.freightConfig,toolTipZIndex:c.toolTipZIndex})}),h?n.jsx(aa,{size:o,message:h,setError:_}):m.length>0&&n.jsx(aa,{size:o,message:c.freightConfig.messages.delivered_by,seller:a})]}),y&&!h?m.length>0&&n.jsxs(Gh,{children:[n.jsx(Kh,{children:m.filter(({id:j})=>!j.includes("Retirada")).map(j=>n.jsx(Wh,{id:j.id,value:D.freightParsePrice({valueInCents:j.price,hasFree:!1,freeTaxMessage:c.freightConfig.messages.free_tax}),title:j.name,paragraph:`${c.freightConfig.messages.prefix_days}${Yh(j.shippingEstimate)}`,radioValue:u,changeValue:v},j.id))}),c.deliveryInfoBoxesAllowed?n.jsx(Vh,{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]})},Et={"pcd-navigation--breadcrumb":"_pcd-navigation--breadcrumb_1243w_1","pdc-navigation--content":"_pdc-navigation--content_1243w_28","pdc-navigation--filters":"_pdc-navigation--filters_1243w_54","pdc-navigation--filters--content":"_pdc-navigation--filters--content_1243w_67","pdc-navigation--selected":"_pdc-navigation--selected_1243w_139","pdc-navigation--selected--container":"_pdc-navigation--selected--container_1243w_152","pdc-navigation":"_pdc-navigation_1243w_28"},n_=({children:e,href:t,isLast:r,title:s,ICONS:o})=>n.jsx(d.BreadCrumb.Item,{adornment:{end:r&&n.jsx(d.Icon,{name:o.arrow_right})},children:r?n.jsx(Le,{href:t??"/",size:"medium",title:s,disableUnderline:!0,children:e}):e}),Pu=()=>{var a;const{state:e}=Fe(),{ICONS:t}=$e(),r=e!=null&&e.term&&e.term.length>0?`/${e.term}`:"",s=decodeURIComponent((a=e==null?void 0:e.base)!=null&&a.length?e.base:r??r).slice(1).split("/"),o=rc(s);return n.jsx("div",{className:Et["pcd-navigation--breadcrumb"],children:n.jsx(d.BreadCrumb.DivWrapper,{children:n.jsx(d.BreadCrumb.List,{children:Array.isArray(o)&&o.map((i,c)=>{var l,u;return g.createElement(n_,{...i,isLast:c!==o.length-1,key:i.href,title:(l=i.name)==null?void 0:l.replace(/-/g," "),ICONS:t},(u=i.name)==null?void 0:u.replace(/-/g," "))})})})})};Pu.displayName="PLPNavigation.BreadCrumb";const Nu=({children:e,...t})=>n.jsxs("div",{...t,className:Et["pdc-navigation--content"],children:[n.jsx(gt.Filters,{}),e]});Nu.displayName="PLPNavigation.Content";const r_="_sort_35wro_1",or={sort:r_,"sort-list-wrapper":"_sort-list-wrapper_35wro_8","sort-list":"_sort-list_35wro_8","sort-button":"_sort-button_35wro_25"},s_=({children:e,sortListOpen:t,btnAdornment:r,style:s,...o})=>n.jsx(d.Button,{...o,adornment:{end:t?r==null?void 0:r.listOpen:r==null?void 0:r.listClosed},size:"small",variant:"tertiary",style:{...s,textDecoration:"none"},className:or["sort-button"],children:e}),o_=e=>n.jsx(d.RadioButton.Radio,{...e}),a_=({children:e,className:t,name:r,...s})=>n.jsx(d.RadioButton.Group,{...s,name:r||"sort-group",className:d.helpers.classNameConcat(or["sort-list"],t),children:e}),i_=({children:e,className:t,shadow:r=!0,padding:s="small",height:o="fit-content",...a})=>n.jsx(d.Card,{...a,shadow:r,className:d.helpers.classNameConcat(or["sort-list-wrapper"],t),padding:s,height:o,children:e}),Eu=g.forwardRef(({children:e,className:t,...r},s)=>n.jsx("div",{...r,ref:s,className:d.helpers.classNameConcat(or.sort,t),children:e}));Eu.displayName="SortRoot";const ar=({handleSelectValue:e,sortListOpen:t,setSortListOpen:r,searchParams:s,ICONS:o,...a})=>{var f;const i=(f=s==null?void 0:s.get("sort"))==null?void 0:f.replace(":","_"),[c,l]=g.useState(i),{sendDataLayerEvent:u}=ae();g.useEffect(()=>{l(i||void 0)},[i]);const{ref:p}=Al(()=>r(!1)),m=h=>{const _=h.target.value;l(_),typeof e=="function"&&e(_),u({functionKey:"filterEvent",data:{customData:{ordering:Wt.options[_]}}}),r(!1)};return n.jsxs(Eu,{...a,ref:p,children:[n.jsx(s_,{btnAdornment:{listOpen:n.jsx(d.Icon,{name:o.arrow_up,size:"small"}),listClosed:n.jsx(d.Icon,{name:o.arrow_down,size:"small"})},sortListOpen:t,onClick:()=>r(!t),children:c?Wt.options[c]:Wt.placeholder},"sort-button"),t&&n.jsx(i_,{children:n.jsx(a_,{name:"sort-group",value:c??"",onChange:m,children:Object.keys(Wt.options).map(h=>n.jsx(o_,{label:Wt.options[h],value:h},h))})})]})};ar.displayName="Sort";const Iu=g.createContext({}),c_=({children:e,...t})=>{const[r,s]=g.useState(!1);return n.jsx(Iu.Provider,{value:g.useMemo(()=>({...t,openOrderBy:r,setOpenOrderBy:s}),[t,r,s]),children:e})},l_=()=>{const e=g.useContext(Iu);if(e===void 0)throw new Error("usePLPNavigationContext must be used within a PDCNavigationProvider");return e},Ru=()=>{const{openOrderBy:e,onSort:t,setOpenFilters:r,setOpenOrderBy:s}=l_(),{ICONS:o,PDC_NAVIGATION:a,searchParams:i}=$e();return n.jsxs("div",{className:Et["pdc-navigation--filters"],children:[n.jsx(gt.BreadCrumb,{}),n.jsxs("div",{className:Et["pdc-navigation--filters--content"],children:[n.jsx(ar,{handleSelectValue:c=>t(c??"release_desc"),sortListOpen:e,setSortListOpen:s,ICONS:o,searchParams:i}),n.jsx(d.Button,{adornment:{end:n.jsx(d.Icon,{name:o.arrow_down})},onClick:()=>r(!0),size:"small",variant:"tertiary",children:a.filter_button}),n.jsx(gt.Total,{})]})]})};Ru.displayName="PLPNavigation.Filters";const Tu=({children:e,onSort:t,setOpenFilters:r,style:s,...o})=>{const a=g.useRef(null);return n.jsx(c_,{onSort:t,setOpenFilters:r,children:n.jsx("div",{...o,className:Et["pdc-navigation"],ref:a,style:{...s},children:n.jsx(gt.Content,{children:e})})})};Tu.displayName="Root";const Au=({callback:e,selected:t,...r})=>n.jsx("div",{...r,className:Et["pdc-navigation--selected"],children:n.jsx("div",{className:Et["pdc-navigation--selected--container"],children:Array.isArray(t)?t.map(s=>s.key==="productclusterids"?null:n.jsx(gt.SelectedItem,{callback:e,facet:s},s.value)):null})});Au.displayName="PLPNavigation.Selected";const co=({key:e,PLP_FILTERS:t})=>t.some(r=>r.key===e)?e==="cores-filtraveis":!1,lo=({value:e,PLP_FILTERS_COLORS:t})=>{var r;return((r=t.find(s=>s.value===e))==null?void 0:r.color)??"#F2F2F2"},ku=({key:e,PLP_FILTERS:t})=>{var r;return(r=t.find(s=>s.key===e))==null?void 0:r.label},Ou=({key:e,PLP_FILTERS:t})=>{var r;return((r=t.find(s=>s.key===e))==null?void 0:r.order)??0},ls=({value:e})=>{const[t,r]=e.split(":").length===2?e.split(":"):[0,0],s=D.formatPriceToCurrency(Number(r));return`${D.formatPriceToCurrency(Number(t))} até ${s}`},Lu=({items:e})=>{const t=e.flatMap(o=>[o.range.from,o.range.to]),r=Math.min(...t.map(Math.abs)),s=Math.max(...t.map(Math.abs));return[r,s]},Mu=Object.freeze(Object.defineProperty({__proto__:null,checkedColor:co,createTagPrice:ls,getAbsoluteMinMax:Lu,getColor:lo,getName:ku,getOrder:Ou},Symbol.toStringTag,{value:"Module"})),Ge={"filter--empty":"_filter--empty_1mjas_1","filter--item":"_filter--item_1mjas_14","filter--item--price":"_filter--item--price_1mjas_19","filter--item--toggle":"_filter--item--toggle_1mjas_19","filter--item--toggle--container":"_filter--item--toggle--container_1mjas_30","filter--modal--body":"_filter--modal--body_1mjas_79","filter--modal--body--content":"_filter--modal--body--content_1mjas_87","filter--modal--footer":"_filter--modal--footer_1mjas_96","filter--modal":"_filter--modal_1mjas_79","filter--loading":"_filter--loading_1mjas_176","filter--selected":"_filter--selected_1mjas_206","filter--selected--content":"_filter--selected--content_1mjas_210"},Du=({columns:e=2,CONSTANTS:t,...r})=>{var a;const{filters:s,onToggleFacet:o}=Vt();return n.jsxs("div",{...r,className:Ge["filter--modal--body--content"],children:[Array.isArray(s.facets)&&s.facets.map(i=>n.jsx(ut.Item,{columns:e,facet:i,onToggleFacet:o,CONSTANTS:t},i.key)),!((a=s.facets)!=null&&a.length)&&n.jsx(ut.Empty,{PLP_FILTERS_EMPTY:t.PLP_FILTERS_EMPTY})]})};Du.displayName="Filter.Item.Content";const $u=({PLP_FILTERS_EMPTY:e})=>{const t=()=>{window.history.back()};return n.jsxs("div",{className:Ge["filter--empty"],children:[n.jsxs(d.TextStructure.DivWrapper,{children:[n.jsx("h4",{children:e.title}),n.jsx("p",{children:e.subtitle})]}),n.jsx(d.Button,{onClick:()=>t(),variant:"tertiary",children:e.button})]})};$u.displayName="Filter.Empty";const zu=({columns:e,facet:t,onToggleFacet:r,CONSTANTS:s,...o})=>{const a=Ou({key:t.key,PLP_FILTERS:s.PLP_FILTERS}),i=()=>{if(t.__typename==="FacetBoolean"){if(t.key==="cores-filtraveis")return n.jsx(ut.Colors,{onToggleFacet:r,values:t.values,PLP_FILTERS:s.PLP_FILTERS,PLP_FILTERS_COLORS:s.PLP_FILTERS_COLORS});if(t.key==="tamanho")return n.jsx(ut.Sizes,{onToggleFacet:r,values:t.values,PLP_SIZE_ORDER:s.PLP_SIZE_ORDER});if(t.key==="category-2")return n.jsx(ut.Toggle,{columns:e,facetKey:t.key,onToggleFacet:r,values:t.values,ICONS:s.ICONS})}return t.__typename==="FacetRange"?n.jsx(ut.Price,{facet:t}):n.jsx("p",{children:"Filter not support!!!"})};return n.jsx("div",{...o,className:Ge["filter--item"],style:{order:a},children:n.jsxs(d.Accordion.Wrapper,{style:{width:"100%"},children:[n.jsx(d.Accordion.Header,{id:t.key,closeIndicator:n.jsx(d.Icon,{name:s.ICONS.arrow_up}),openIndicator:n.jsx(d.Icon,{name:s.ICONS.arrow_down}),children:n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{children:n.jsx("h4",{className:"typography-style-body-sm",children:ku({key:t.key,PLP_FILTERS:s.PLP_FILTERS})})})})}),n.jsx(d.Accordion.Body,{children:i()})]})})};zu.displayName="Filter.Item";const Fu=({onToggleFacet:e,values:t,PLP_FILTERS:r,PLP_FILTERS_COLORS:s,...o})=>n.jsx(nt.Root,{...o,children:n.jsx(nt.List,{children:Array.isArray(t)&&t.map(({key:a,selected:i,value:c})=>n.jsx(nt.Option,{active:i,"data-color":co({key:a,PLP_FILTERS:r}),fill:lo({value:c,PLP_FILTERS_COLORS:s}),onClick:()=>e({key:a,value:c}),type:"color"},`${a}-${c}`))})});Fu.displayName="Filter.Item.Color";const Bu=({facet:e,...t})=>{var u,p;const{filters:{selected:r},price:s,onToggleFacet:o}=Vt(),[a,i]=(s==null?void 0:s.split(":").map(Number))??[0,100],[c,l]=((p=(u=r==null?void 0:r.find(({key:m})=>m==="price"))==null?void 0:u.value)==null?void 0:p.split(":").map(Number))??[a,i];return n.jsx("div",{...t,className:Ge["filter--item--price"],children:n.jsxs(d.Slider.SliderDual,{format:"price",initialValue:[c<a?a:c,l>i?i:l],min:a,max:i,type:"dual",step:1,onFinish:m=>{var f,h;m&&o({key:"price",value:`${(f=m.range)==null?void 0:f.min}:${(h=m.range)==null?void 0:h.max}`})},children:[n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{children:n.jsx("p",{"data-min-value":!0})})}),n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{children:n.jsx("p",{"data-max-value":!0})})})]})})};Bu.displayName="Filter.Item.Price";const Uu=({onToggleFacet:e,values:t,PLP_SIZE_ORDER:r,...s})=>{const o=[...t].sort((a,i)=>{const c=r.indexOf(a.name),l=r.indexOf(i.name);return c-l});return n.jsx(nt.Root,{...s,children:n.jsx(nt.List,{children:Array.isArray(o)&&o.map(({key:a,selected:i,value:c})=>n.jsx(nt.Option,{active:i,text:c,type:"size",onClick:()=>e({key:a,value:c})},c))})})};Uu.displayName="Filter.Item.Sizes";const qu=({columns:e,facetKey:t,onToggleFacet:r,values:s,ICONS:o,...a})=>n.jsx("div",{...a,className:Ge["filter--item--toggle"],children:n.jsx("div",{className:Ge["filter--item--toggle--container"],style:{gridTemplateColumns:`repeat(${e}, 1fr)`},children:Array.isArray(s)&&s.map(i=>n.jsx(d.Checkbox,{label:(i==null?void 0:i.name)??"",adornment:n.jsx(d.Icon,{name:o.check}),checked:i.selected,onChange:()=>r(i)},i.value))})});qu.displayName="Filter.Item.Toggle";const Hu=({...e})=>{const{isLoading:t}=Vt();return n.jsx("div",{className:Ge["filter--loading"],"data-active":t,...e,children:n.jsx(d.Spinner,{indicatorColor:"#000",background:"#222"})})};Hu.displayName="Filter.Loading";const Vu=({children:e,className:t,isMobile:r=!1,CONSTANTS:{PLP_FILTERS_TITLE:s,ICONS:o}})=>{var p;const{deleteAllFacets:a,filters:i,isOpen:c,target:l,setIsOpen:u}=Vt();return n.jsxs(d.Modal.Root,{className:d.helpers.classNameConcat(Ge["filter--modal"],t),isMobile:r??!1,isOpen:c,parent:l,setIsOpen:u,variant:r?"sideBottom":"sideRight",style:{zIndex:99},children:[n.jsxs(d.Modal.Header,{navigation:"top",children:[n.jsx(d.Modal.Controls,{navigation:"top",isMobile:r,children:n.jsx(d.Button,{"data-close":!0,iconNameStart:o.close,size:"small",variant:"tertiary",style:{marginLeft:"auto"}})}),n.jsx(d.Modal.Title,{navigation:"top",title:s})]}),n.jsxs(d.Modal.Body,{style:{width:500},children:[n.jsx("div",{className:Ge["filter--modal--body"],children:e}),n.jsx(ut.Loading,{})]}),n.jsx(d.Modal.Footer,{children:n.jsxs("div",{className:Ge["filter--modal--footer"],children:[n.jsx(d.Button,{"data-close":!0,size:"large",variant:"primary",children:(p=i.facets)!=null&&p.length?"ver resultados":"fechar"}),n.jsx(d.Button,{"data-close":!0,onClick:()=>a(),variant:"tertiary",children:"limpar filtros"})]})})]})};Vu.displayName="Filter.Modal";const Wu=({children:e,className:t,isMobile:r,CONSTANTS:s,...o})=>n.jsx(vc,{...o,PLP_FILTERS:s.PLP_FILTERS,children:n.jsx(ut.Modal,{className:t,isMobile:r,CONSTANTS:s,children:e})});Wu.displayName="Filter.Root";const Gu=({ICONS:e,PLP_FILTERS_COLORS:t,PLP_FILTERS:r})=>{const{filters:s,onToggleFacet:o}=Vt();return n.jsx("div",{className:Ge["filter--selected"],children:n.jsx("div",{className:Ge["filter--selected--content"],children:Array.isArray(s.selected)&&s.selected.map(({key:a,value:i})=>a==="productclusterids"?null:n.jsx(d.Tag,{title:a==="price"?ls({value:i}):i,adornment:{end:n.jsx(d.Icon,{name:e.close,size:"x-small"})},colorSquare:lo({value:i,PLP_FILTERS_COLORS:t}),onClick:()=>o({key:a,value:i}),squareShow:co({key:a,PLP_FILTERS:r}),size:"medium",variant:"primary",children:a==="price"?ls({value:i}):i},i))})})};Gu.displayName="Filter.Selected";const ut={Colors:Fu,Content:Du,Empty:$u,Modal:Vu,Item:zu,Root:Wu,Loading:Hu,Selected:Gu,Price:Bu,Sizes:Uu,Toggle:qu},{checkedColor:u_,createTagPrice:ia,getColor:d_}=Mu,Ku=({callback:e,facet:t})=>{const{ICONS:r,PLP_FILTERS_COLORS:s,PLP_FILTERS:o}=$e();return n.jsx(d.Tag,{title:(t==null?void 0:t.key)==="price"?ia({value:t.value}):t.value.toUpperCase(),adornment:{end:n.jsx(d.Icon,{name:r.close,size:"x-small"})},colorSquare:d_({value:t.value,PLP_FILTERS_COLORS:s}),onClick:()=>{typeof e=="function"&&e(t,!0)},squareShow:u_({key:t.key,PLP_FILTERS:o}),size:"medium",variant:"primary",children:(t==null?void 0:t.key)==="price"?ia({value:t.value}):t.value.toUpperCase()})};Ku.displayName="PLPNavigation.Selected.Item";const Xu=()=>n.jsx(d.TextStructure.Root,{children:n.jsx("p",{id:"pdc-navigation--total"})});Xu.displayName="PLPNavigation.Total";const gt={BreadCrumb:Pu,Content:Nu,Filters:Ru,Root:Tu,Selected:Au,SelectedItem:Ku,Total:Xu},m_="_footer__bottom_198g6_2",p_="_footer__wrapper_198g6_10",f_="_footer__main_198g6_39",h_="_footer__legalInformation_198g6_55",__="_footer__column_198g6_77",g_="_footer__columnContent_198g6_87",y_="_footer__item_198g6_91",x_="_footer__itemLink_198g6_107",v_="_footer__columnTitle_198g6_122",b_="_footer__columnTitleIcon_198g6_134",j_="_footer__iconList_198g6_147",C_="_footer__itemSmallText_198g6_157",S_="_payment_198g6_168",w_="_footer__iconContainer_198g6_173",P_="_footer__iconListSubHeader_198g6_178",N_="_accordionWrapper_198g6_200",E_="_accordionHeader_198g6_204",I_="_accordionTextWrapper_198g6_208",me={footer__bottom:m_,footer__wrapper:p_,footer__main:f_,footer__legalInformation:h_,footer__column:__,footer__columnContent:g_,footer__item:y_,footer__itemLink:x_,footer__columnTitle:v_,footer__columnTitleIcon:b_,footer__iconList:j_,footer__itemSmallText:C_,payment:S_,footer__iconContainer:w_,footer__iconListSubHeader:P_,accordionWrapper:N_,accordionHeader:E_,accordionTextWrapper:I_,"footer--stamps":"_footer--stamps_198g6_247","footer--stamps--company":"_footer--stamps--company_198g6_254","support-container":"_support-container_198g6_258","support-section":"_support-section_198g6_277","support-text":"_support-text_198g6_319","support-items":"_support-items_198g6_329","support-item":"_support-item_198g6_329"};var Yu={},uo={},ir={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"warnOnce",{enumerable:!0,get:function(){return t}});let t=r=>{};if(process.env.NODE_ENV!=="production"){const r=new Set;t=s=>{r.has(s)||console.warn(s),r.add(s)}}})(ir);var Qu={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getImageBlurSvg",{enumerable:!0,get:function(){return t}});function t(r){let{widthInt:s,heightInt:o,blurWidth:a,blurHeight:i,blurDataURL:c,objectFit:l}=r;const u=20,p=a?a*40:s,m=i?i*40:o,f=p&&m?"viewBox='0 0 "+p+" "+m+"'":"",h=f?"none":l==="contain"?"xMidYMid":l==="cover"?"xMidYMid slice":"none";return"%3Csvg xmlns='http://www.w3.org/2000/svg' "+f+"%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='"+u+"'/%3E%3CfeColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 100 -1' result='s'/%3E%3CfeFlood x='0' y='0' width='100%25' height='100%25'/%3E%3CfeComposite operator='out' in='s'/%3E%3CfeComposite in2='SourceGraphic'/%3E%3CfeGaussianBlur stdDeviation='"+u+"'/%3E%3C/filter%3E%3Cimage width='100%25' height='100%25' x='0' y='0' preserveAspectRatio='"+h+"' style='filter: url(%23b);' href='"+c+"'/%3E%3C/svg%3E"}})(Qu);var cr={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(o,a){for(var i in a)Object.defineProperty(o,i,{enumerable:!0,get:a[i]})}t(e,{VALID_LOADERS:function(){return r},imageConfigDefault:function(){return s}});const r=["default","imgix","cloudinary","akamai","custom"],s={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image",loader:"default",loaderFile:"",domains:[],disableStaticImages:!1,minimumCacheTTL:60,formats:["image/webp"],dangerouslyAllowSVG:!1,contentSecurityPolicy:"script-src 'none'; frame-src 'none'; sandbox;",contentDispositionType:"inline",localPatterns:void 0,remotePatterns:[],qualities:void 0,unoptimized:!1}})(cr);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getImgProps",{enumerable:!0,get:function(){return h}});const t=ir,r=Qu,s=cr,o=["lazy","eager",void 0];function a(_){return _.default!==void 0}function i(_){return _.src!==void 0}function c(_){return typeof _=="object"&&(a(_)||i(_))}const l=new Map;let u;function p(_){return typeof _>"u"?_:typeof _=="number"?Number.isFinite(_)?_:NaN:typeof _=="string"&&/^[0-9]+$/.test(_)?parseInt(_,10):NaN}function m(_,y,x){let{deviceSizes:v,allSizes:C}=_;if(x){const b=/(^|\s)(1?\d?\d)vw/g,w=[];for(let P;P=b.exec(x);P)w.push(parseInt(P[2]));if(w.length){const P=Math.min(...w)*.01;return{widths:C.filter(S=>S>=v[0]*P),kind:"w"}}return{widths:C,kind:"w"}}return typeof y!="number"?{widths:v,kind:"w"}:{widths:[...new Set([y,y*2].map(b=>C.find(w=>w>=b)||C[C.length-1]))],kind:"x"}}function f(_){let{config:y,src:x,unoptimized:v,width:C,quality:j,sizes:b,loader:w}=_;if(v)return{src:x,srcSet:void 0,sizes:void 0};const{widths:P,kind:S}=m(y,C,b),N=P.length-1;return{sizes:!b&&S==="w"?"100vw":b,srcSet:P.map((R,A)=>w({config:y,src:x,quality:j,width:R})+" "+(S==="w"?R:A+1)+S).join(", "),src:w({config:y,src:x,quality:j,width:P[N]})}}function h(_,y){let{src:x,sizes:v,unoptimized:C=!1,priority:j=!1,loading:b,className:w,quality:P,width:S,height:N,fill:R=!1,style:A,overrideSrc:L,onLoad:O,onLoadingComplete:G,placeholder:M="empty",blurDataURL:U,fetchPriority:Y,decoding:X="async",layout:W,objectFit:z,objectPosition:J,lazyBoundary:se,lazyRoot:le,...oe}=_;const{imgConf:ue,showAltText:$,blurComplete:ee,defaultLoader:E}=y;let V,ie=ue||s.imageConfigDefault;if("allSizes"in ie)V=ie;else{var _e;const K=[...ie.deviceSizes,...ie.imageSizes].sort((te,he)=>te-he),k=ie.deviceSizes.sort((te,he)=>te-he),B=(_e=ie.qualities)==null?void 0:_e.sort((te,he)=>te-he);V={...ie,allSizes:K,deviceSizes:k,qualities:B}}if(typeof E>"u")throw new Error(`images.loaderFile detected but the file is missing default export.
|
|
5
|
-
Read more: https://nextjs.org/docs/messages/invalid-images-config`);let I=
|
|
6
|
-
Read more: https://nextjs.org/docs/messages/next-image-missing-loader`)}else{const K=I;I=k=>{const{config:B,...te}=k;return K(te)}}if(W){W==="fill"&&(R=!0);const K={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}},k={responsive:"100vw",fill:"100vw"},B=K[W];B&&(A={...A,...B});const te=k[W];te&&!v&&(v=te)}let Te="",H=p(S),Q=p(N),be,Ie;if(c(x)){const K=a(x)?x.default:x;if(!K.src)throw new Error("An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received "+JSON.stringify(K));if(!K.height||!K.width)throw new Error("An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received "+JSON.stringify(K));if(be=K.blurWidth,Ie=K.blurHeight,U=U||K.blurDataURL,Te=K.src,!R){if(!H&&!Q)H=K.width,Q=K.height;else if(H&&!Q){const k=H/K.width;Q=Math.round(K.height*k)}else if(!H&&Q){const k=Q/K.height;H=Math.round(K.width*k)}}}x=typeof x=="string"?x:Te;let je=!j&&(b==="lazy"||typeof b>"u");(!x||x.startsWith("data:")||x.startsWith("blob:"))&&(C=!0,je=!1),V.unoptimized&&(C=!0),T&&x.endsWith(".svg")&&!V.dangerouslyAllowSVG&&(C=!0),j&&(Y="high");const ge=p(P);if(process.env.NODE_ENV!=="production"){if(V.output==="export"&&T&&!C)throw new Error("Image Optimization using the default loader is not compatible with `{ output: 'export' }`.\n Possible solutions:\n - Remove `{ output: 'export' }` and run \"next start\" to run server mode including the Image Optimization API.\n - Configure `{ images: { unoptimized: true } }` in `next.config.js` to disable the Image Optimization API.\n Read more: https://nextjs.org/docs/messages/export-image-api");if(!x)C=!0;else if(R){if(S)throw new Error('Image with src "'+x+'" has both "width" and "fill" properties. Only one should be used.');if(N)throw new Error('Image with src "'+x+'" has both "height" and "fill" properties. Only one should be used.');if(A!=null&&A.position&&A.position!=="absolute")throw new Error('Image with src "'+x+'" has both "fill" and "style.position" properties. Images with "fill" always use position absolute - it cannot be modified.');if(A!=null&&A.width&&A.width!=="100%")throw new Error('Image with src "'+x+'" has both "fill" and "style.width" properties. Images with "fill" always use width 100% - it cannot be modified.');if(A!=null&&A.height&&A.height!=="100%")throw new Error('Image with src "'+x+'" has both "fill" and "style.height" properties. Images with "fill" always use height 100% - it cannot be modified.')}else{if(typeof H>"u")throw new Error('Image with src "'+x+'" is missing required "width" property.');if(isNaN(H))throw new Error('Image with src "'+x+'" has invalid "width" property. Expected a numeric value in pixels but received "'+S+'".');if(typeof Q>"u")throw new Error('Image with src "'+x+'" is missing required "height" property.');if(isNaN(Q))throw new Error('Image with src "'+x+'" has invalid "height" property. Expected a numeric value in pixels but received "'+N+'".')}if(!
|
|
1
|
+
"use strict";var Mm=Object.defineProperty;var Dm=(e,t,n)=>t in e?Mm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var vt=(e,t,n)=>Dm(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),g=require("react"),D=require("./index-By2TIGCS.js"),Je=require("idb-keyval"),It=require("zustand"),Jr=require("js-cookie"),d=require("@soma-vertical-web/core-components"),St=require("axios"),eo=require("@date-fns/tz"),$m=require("jose"),Dt=require("@soma-vertical-web/foundations"),ko=require("react-dom"),tt=require("draft-js"),Ba=require("react-intersection-observer"),Oo=g.createContext({}),zm=({data:e,children:t})=>r.jsx(Oo.Provider,{value:{tags:e==null?void 0:e.config},children:t}),yt=()=>{const{tags:e}=g.useContext(Oo),t=g.useCallback(n=>{var c,l,u,p;const o=(l=(c=e==null?void 0:e.commercial)==null?void 0:c.items)==null?void 0:l.find(m=>{var f;return(f=n??[])==null?void 0:f.find(h=>h.id===m.key)}),s=(p=(u=e==null?void 0:e.institucional)==null?void 0:u.items)==null?void 0:p.find(m=>{var f;return(f=n??[])==null?void 0:f.find(h=>h.id===m.key)}),a=e==null?void 0:e.flagPdp,i=(n==null?void 0:n.find(m=>{var f;return m.id===((f=e==null?void 0:e.flagGoldenPdp)==null?void 0:f.key)}))&&(e==null?void 0:e.flagGoldenPdp);return{commercial:o,institucional:s,flagPdp:a,flagGoldenPdp:i}},[e]);return{tags:e,getAvailableProductTag:t}},Ua=({gridScrollBack:e})=>{g.useEffect(()=>{typeof window<"u"&&(e!=null&&e.refer)&&sessionStorage.setItem(e==null?void 0:e.refer,"true")},[])},qa=g.createContext({}),Fm=({children:e,gridScrollBack:t})=>{const n=g.useRef(null);return Ua({gridScrollBack:t}),r.jsx(qa.Provider,{value:{sizesContainerRef:n},children:e})},Ha=()=>{const e=g.useContext(qa);if(e===void 0)throw new Error("useContext(PDPContext) must be used within a PDPProvider");return e},pt=({event:e,data:t})=>{const n=(window==null?void 0:window.dataLayer)||[];t.ecommerce&&n.push({ecommerce:null}),n.push({...e&&{event:`custom_${e}`},...t})},Se={configs:{PLP_FILTERS:[{key:"",label:"",eventLabel:"",order:0}],currency:"BRL",categoryOff:"bazar",storeUrl:"https://www.example.com",MAIN_IMAGE:"1",NAME_SPLIT_SYMBOL:"-",VENDOR_CODE:""},productEvents:(e,t)=>{const{event:n,commonData:o,customData:s,promotionInfo:a,itemList:i,outsideEcommerceData:c}=e,{availableSizes:l,sizes:u,price:p}=o,m={...n==="view_item"?{currency:Se.configs.currency,value:p,grade_disponivel:l??(u?Va(u):"")}:{},...n==="add_to_wishlist"||n==="remove_from_wishlist"?{value:p,currency:Se.configs.currency}:{}},f=gn({data:o,customData:{...s,...i,...a},configs:Se.configs});pt({event:n,data:{...c,ecommerce:{...i,...m,items:[f]}}}),typeof t=="function"&&t(f,m)},productListEvent:e=>{const{commonData:{products:t},promotionInfo:n,itemList:o,outsideEcommerceData:s,customData:a}=e;if(t.length===0)return;const i=t.map(({node:c},l)=>gn({data:{...c},customData:{...n,index:l,...a!=null&&a.item_list_name?{item_list_name:a==null?void 0:a.item_list_name}:o},configs:Se.configs}));pt({event:"view_item_list",data:{...s,ecommerce:{...a!=null&&a.item_list_name?{item_list_name:a==null?void 0:a.item_list_name}:o,items:i}}})},skuEvents:e=>{const{event:t,commonData:{products:n},customData:o,supportData:{selectedSkus:s,price:a},promotionInfo:i,itemList:c,outsideEcommerceData:l}=e;let u=0;const p=n.map(m=>{var y,x,v,C,j,b,w,P,S;const f=s==null?void 0:s.find(N=>(m.productId??m.id)===N.productId);let h={...i,...c};if(f){const N=Ga(),R=Ka(N,f);R&&(h={...h,...R}),t==="add_to_cart"&&(i||c)&&to({persistedData:N,type:"add",sku:(f==null?void 0:f.id)??(f==null?void 0:f.sku),newData:{promotionInfo:i,itemList:c}}),t==="remove_from_cart"&&to({persistedData:N,type:"remove",sku:(f==null?void 0:f.id)??(f==null?void 0:f.sku)})}u+=m.price??((v=(x=(y=f==null?void 0:f.offers)==null?void 0:y.offers)==null?void 0:x[0])==null?void 0:v.price)??0;const _=(f==null?void 0:f.size)??D.getColorAndSizeFromSkuName((f==null?void 0:f.skuName)??(f==null?void 0:f.name)??((C=m.itemOffered)==null?void 0:C.skuName),Se.configs.NAME_SPLIT_SYMBOL).size;return gn({data:m,customData:{...o,...h??{...i,...c},item_sku:(f==null?void 0:f.id)??(f==null?void 0:f.sku)??((j=m.itemOffered)==null?void 0:j.sku),quantity:(o==null?void 0:o.quantity)??m.quantity??1,item_variant2:_,seller_id:(f==null?void 0:f.sellerId)??(f==null?void 0:f.seller)??((S=(P=(w=(b=f==null?void 0:f.offers)==null?void 0:b.offers)==null?void 0:w[0])==null?void 0:P.seller)==null?void 0:S.identifier)??m.seller},configs:Se.configs})});pt({event:t,data:{...l,ecommerce:{value:a??u,currency:Se.configs.currency,items:p}}})},filterEvent:e=>{var i;const{commonData:t,customData:n,outsideEcommerceData:o}=e,s={},a={};Array.isArray(t==null?void 0:t.selectedFacets)&&((i=t==null?void 0:t.selectedFacets)!=null&&i.length)&&((t==null?void 0:t.selectedFacets).forEach(({key:c,value:l})=>{var m;const u=((m=Se.configs.PLP_FILTERS.find(f=>f.key===c))==null?void 0:m.eventLabel)??c,p=(s==null?void 0:s[u])||[];u==="price_range"&&l.replace(":","-"),s[u]=[...p,l]}),Object.keys(s).forEach(c=>a[c]=s[c].join(", "))),pt({event:"filter",data:{...o,...a,...n}})},viewCartEvent:e=>{var p,m,f,h,_,y,x,v,C,j;const{commonData:t,outsideEcommerceData:n}=e,{cartStore:o}=t;if(!o)return;const s=window.localStorage.getItem("persistedCartEventsData"),a=s?JSON.parse(s):{},i=o.items.map(b=>{const{promotionInfo:w,itemList:P}=a[b.id]??{};return gn({data:{...b,price:b.price/100,listPrice:b.listPrice/100},customData:{...w,...P,item_sku:b.id??b.itemOffered.sku,quantity:b.quantity??1},configs:Se.configs})}),c=(((p=o.totalizers.find(b=>b.name==="Total dos Itens"))==null?void 0:p.value)??0)/100,l=(((m=o.totalizers.find(b=>b.name==="Total dos Descontos"))==null?void 0:m.value)??0)/100,u=((f=o.marketingData)==null?void 0:f.utmiCampaign)===Se.configs.VENDOR_CODE?(h=o.marketingData)==null?void 0:h.utmCampaign:(y=String((_=o.openTextField)==null?void 0:_.value))==null?void 0:y.split(" - ")[0];pt({event:"view_cart",data:{...n,ecommerce:{currency:Se.configs.currency,value:c+l,total_discount:Math.abs(l),cep_preenchido:!!((v=(x=o.shippingData)==null?void 0:x.address)!=null&&v.postalCode),...u?{seller_coupon_name:u}:{},...((C=o.marketingData)==null?void 0:C.coupon)&&{sale_coupon_name:(j=o.marketingData)==null?void 0:j.coupon},subtotal:c,items:i}}})},readyEvents:e=>{const{event:t,readyData:n}=e;pt({event:t,data:{...n}})}},Va=e=>e.reduce((t,n)=>(n.available&&t.push(n.value),t),[]).toString(),Bm=e=>{const t=e.length;return{...e&&e.length>0?{item_category:e[0].includes(Se.configs.categoryOff)?"Bazar":"Coleção",...e[1]?{item_category2:e[1]}:{},...t>2?{item_category3:e[t-1]}:{}}:{}}},gn=({data:e,customData:t,configs:n})=>({...Um(e,n==null?void 0:n.MAIN_IMAGE),...qm(e),...Hm(e),...Vm(e),...t}),Wa=()=>{var e,t;return document?((t=(e=window.document.head.querySelector('meta[name="category"]'))==null?void 0:e.getAttribute("content"))==null?void 0:t.split("_"))??[]:[]},Ga=()=>{const e=window.localStorage.getItem("persistedCartEventsData");return e?JSON.parse(e):null},Ka=(e,t)=>e==null?void 0:e[t],to=({persistedData:e,type:t,sku:n,newData:o})=>{if(!e&&t==="add"){window.localStorage.setItem("persistedCartEventsData",JSON.stringify({[n]:o}));return}if(e&&t==="add"){window.localStorage.setItem("persistedCartEventsData",JSON.stringify({...e,[n]:o}));return}e&&t==="remove"&&(delete e[n],window.localStorage.setItem("persistedCartEventsData",JSON.stringify(e)))},Um=(e,t="1")=>{var a,i,c,l,u,p,m,f,h,_,y;const n=e.productReference??e.gtin??e.productRefId,o=e.image??((i=(a=e.items)==null?void 0:a[0])==null?void 0:i.images)??((c=e.itemOffered)==null?void 0:c.image),s=o==null?void 0:o.find(x=>x.alternateName===t||x.imageLabel===t||x.keywords===t);return{item_id:e.productId??((l=e.isVariantOf)==null?void 0:l.productGroupID)??((u=e.isVariationOf)==null?void 0:u.productGroupID)??((m=(p=e.itemOffered)==null?void 0:p.isVariationOf)==null?void 0:m.productGroupID),item_ref:/_\d$/.test(n)?n.slice(0,-2):n,item_name:e.productTitle??e.productName??e.name??D.splitNameAndSizeFromFullName((f=e.itemOffered)==null?void 0:f.name,Se.configs.NAME_SPLIT_SYMBOL).name,item_brand:((h=e.brand)==null?void 0:h.brandName)??((_=e.brand)==null?void 0:_.name)??e.brand??((y=e.itemOffered)==null?void 0:y.brand.name),item_url:`${Se.configs.storeUrl}${e.linkText}/p`,item_image:(s==null?void 0:s.url)??(s==null?void 0:s.imageUrl)}},js=e=>Array.isArray(e)?e.reduce((t,n)=>(n.length>t.length&&(t=n),t),""):e,qm=e=>{var u,p;const{categories:t,categoriesIds:n}=e,o=t??((u=e.itemOffered)==null?void 0:u.categories),s=n??((p=e.itemOffered)==null?void 0:p.categoriesIds),a=js(o),i=js(s),c=a.slice(1,-1).split("/"),l=i.slice(1,-1).split("/");return{item_category:c[0].toLowerCase().includes(Se.configs.categoryOff)?"Bazar":"Coleção",...c[1]&&{item_category2:c[1]},...c.length>2&&{item_category3:c[c.length-1]},item_category_id:l[l.length-1],...l.length>1&&{item_parent_category_id:l[l.length-2]}}},Hm=e=>{var s,a,i,c,l,u;const t=((s=e.itemOffered)==null?void 0:s.skuName)??((c=(i=(a=e.isVariantOf)==null?void 0:a.hasVariant)==null?void 0:i[0])==null?void 0:c.name)??((u=(l=e.items)==null?void 0:l[0])==null?void 0:u.name),{color:n,size:o}=D.getColorAndSizeFromSkuName(t,Se.configs.NAME_SPLIT_SYMBOL);return{item_variant:n,...e.itemOffered&&{item_variant2:o}}},Vm=e=>{var l,u;const{price:t,listPrice:n,installments:o}=e,s=t??((l=e.offers)==null?void 0:l.lowPrice)??0,a=n??((u=e.offers)==null?void 0:u.highPrice)??0,i=a?a-s:0,c=i%1===0?i:Number(i.toFixed(2));return{...t&&{price:s??a},...a&&{list_price:a,discount:c},...o&&{installments:o==null?void 0:o.count,installment_value:o==null?void 0:o.value},item_currency:Se.configs.currency}},Xa=()=>{const[e,t]=Wa(),[n,o]=e.split("-"),s=n.includes("shop")||n.includes("sale")?n:"";return{page_category:s&&o?o:"",page_departament:s,id:t,name:e}},Wm=Object.freeze(Object.defineProperty({__proto__:null,eventsFunctions:Se,findDataInPersistedData:Ka,getAvailablesSizes:Va,getCategories:Bm,getPageCategoryAndDepartmentFromSlug:Xa,getPersistedData:Ga,getProductListInfoFromHead:Wa,pushDatalayer:pt,updatePersistedData:to},Symbol.toStringTag,{value:"Module"})),Ya=g.createContext({}),Gm=({children:e,evtFunctionsConfigs:t})=>{const n=g.useRef({}),o=g.useRef(null),s=g.useRef(null),a=g.useRef({}),i=g.useRef({trigger:!1,index:0}),c=({functionKey:p,data:m,callBack:f,timeout:h=100})=>{window.dataLayer||(window.dataLayer=[]),Se.configs=t;try{typeof Se[p]=="function"&&setTimeout(()=>{var _;m.promotionInfo=n.current,(_=s.current)!=null&&_.item_list_name&&(m.itemList=s.current),Se[p](m,f)},h)}catch(_){pt({event:"error_event",data:{error_message:(_==null?void 0:_.message)??_}})}},l=({content:p})=>{c({functionKey:"readyEvents",data:{event:"select_content",readyData:{content_type:p.replace("::",":")}}})},u=({updatePromotionRef:p,promotion:m,index:f})=>{p&&(n.current={...m}),c({functionKey:"readyEvents",data:{event:"select_promotion",readyData:{ecommerce:{...m,...f!==void 0&&{index:f}}}}})};return r.jsx(Ya.Provider,{value:{sendDataLayerEvent:c,triggerSelectItemEventRef:i,promotionEventRef:n,currentLocalRef:o,itemListRef:s,cartProductsFullDataRef:a,handleSelectContent:l,handleSelectPromotionEvent:u},children:e})},ae=()=>g.useContext(Ya),Qa=g.createContext({}),Km=({children:e,productData:t,isKit:n,PDP_INFO:o,NAME_SPLIT_SYMBOL:s,TEXTURE_IMAGE:a})=>{var M,U;const{sendDataLayerEvent:i,triggerSelectItemEventRef:c}=ae(),{productId:l,productName:u,items:p,items:[{images:m,Videos:f}],description:h,["Composição"]:_="",productReference:y,categories:[x]}=t,{getAvailableProductTag:v}=yt(),C=v(Object.entries(t.clusterHighlights).map(Y=>({id:Y[0],name:Y[1]}))),j=x.slice(1,-1).split("/"),{installments:b,price:w,listPrice:P,sizes:S,allSizesAvailable:N}=D.getSkuInfos({items:p,NAME_SPLIT_SYMBOL:s}),R=D.getThumbImage({images:m,TEXTURE_IMAGE:a}),A=[{label:`${o.product.description}`,value:"description",content:h},{label:`${o.product.materiais}`,value:"composition",content:_}],L=((U=D.getColorAndSizeFromSkuName((M=t.items)==null?void 0:M[0].name,s))==null?void 0:U.color)??t["Cores Filtráveis"][0]??"",O=()=>({commonData:{...t,sizes:S,price:w,listPrice:P,installments:b},customData:{installments:b==null?void 0:b.count,installment_value:Number(b==null?void 0:b.value).toFixed(2)}}),G=({sku:Y,size:X})=>{const{commonData:W,customData:z}=O();i({functionKey:"productEvents",data:{event:"view_item",commonData:W,customData:{...z,...Y&&{item_sku:Y},...X&&{item_variant2:X}}}})};return g.useEffect(()=>{if(c.current.trigger){const{commonData:Y,customData:X}=O();i({functionKey:"productEvents",data:{event:"select_item",commonData:Y,customData:{...X,index:c.current.index}}}),c.current.trigger=!1}G({})},[]),r.jsx(Qa.Provider,{value:{productData:t,productId:l,productName:u,productReference:y,tag:C,items:p,sizes:S,allSizesAvailable:N,installments:b,price:w,listPrice:P,thumbImage:R,images:m,video:f[0],descriptionContent:A,breadcrumbList:j,isKit:n,colorName:L,handleViewItemEvent:G},children:e})},Me=()=>{const e=g.useContext(Qa);if(e===void 0)throw new Error("useContext(PDPDataContext) must be used within a PDPDataProvider");return e},Xm=()=>{const[e,t]=g.useState(null);return[e,async o=>{if(!(navigator!=null&&navigator.clipboard))return console.warn("Clipboard not supported"),!1;try{return await navigator.clipboard.writeText(o),t(o),!0}catch(s){return console.warn("Copy failed",s),t(null),!1}}]},Za=()=>{g.useEffect(()=>{const e=t=>{t.preventDefault()};return document.addEventListener("gesturestart",e),document.addEventListener("gesturechange",e),document.addEventListener("dblclick",e),document.addEventListener("wheel",t=>{t.ctrlKey&&e(t)}),()=>{document.removeEventListener("gesturestart",e),document.removeEventListener("gesturechange",e),document.removeEventListener("dblclick",e),document.removeEventListener("wheel",e)}},[])},Ym=typeof window>"u",Qm=(e,t)=>{const[n,o]=g.useState(()=>{if(Ym)return null;const a=localStorage.getItem(e);return a===null?t:JSON.parse(a||"{}")});return g.useEffect(()=>{const a=i=>{i.storageArea===localStorage&&i.key===e&&o(JSON.parse(i.newValue))};return window.addEventListener("storage",a),()=>{window.removeEventListener("storage",a)}},[e,t]),[n,a=>{o(i=>{const c=typeof a=="function"?a(i):a;return localStorage.setItem(e,JSON.stringify(c)),c})}]};function Lo(e,t,n){const[o,s]=g.useState(!1),{threshold:a}=n||{};return g.useEffect(()=>{if(!e.current)return()=>null;let i=null;const c=new IntersectionObserver(([l])=>{if(n!=null&&n.delay){i&&clearTimeout(i),i=setTimeout(()=>{s(l.isIntersecting),t&&l.isIntersecting&&c.unobserve(e.current)},n.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 Xn=({callback:e,onEnterViewportOnce:t,options:n})=>{const o=g.useRef(null);return g.useEffect(()=>{const s=o.current;if(!s)return;const a=new IntersectionObserver(([i])=>{i.isIntersecting&&typeof e=="function"&&(e(),t&&(a.unobserve(s),a.disconnect()))},n);return a.observe(s),()=>{t&&a.unobserve(s),a.disconnect()}},[e,t,n]),{element:o}},Ja=({defaultScale:e=1,maxScale:t=3})=>{const n=g.useRef(null),o=g.useRef(null),[s,a]=g.useState(e),i=g.useRef(0),c=g.useRef({x:0,y:0}),l=g.useRef({x:0,y:0}),u=()=>{if(!o.current||!n.current)return{minX:0,maxX:0,minY:0,maxY:0};const h=n.current.getBoundingClientRect(),_=o.current.children[0].getBoundingClientRect(),y=_.width,x=_.height,v=Math.min(0,(h.width-y)/2),C=Math.max(0,(y-h.width)/2),j=Math.min(0,(h.height-x)/2),b=Math.max(0,(x-h.height)/2);return{minX:v,maxX:C,minY:j,maxY:b}},p=(h,_,y)=>{if(o.current){const x=o.current.children[0];x&&requestAnimationFrame(()=>{x.style.transform=`translate(calc(-50% + ${h}px), calc(-50% + ${_}px)) scale(${y})`})}},m=g.useCallback(h=>{const{minX:_,maxX:y,minY:x,maxY:v}=u(),{x:C,y:j}=l.current,b=Math.max(_,Math.min(y,C)),w=Math.max(x,Math.min(v,j));if(h.touches.length>1){const P=h.touches[0],S=h.touches[1],N=P.pageX-S.pageX,R=P.pageY-S.pageY;i.current=Math.sqrt(N*N+R*R),c.current={x:(P.pageX+S.pageX)/2,y:(P.pageY+S.pageY)/2}}else h.touches.length===1&&(c.current={x:h.touches[0].pageX-b,y:h.touches[0].pageY-w})},[s,l]),f=g.useCallback(h=>{if(!o.current||!n.current)return;const{minX:_,maxX:y,minY:x,maxY:v}=u();if(h.touches.length>1){h.preventDefault();const C=h.touches[0],j=h.touches[1],b=C.pageX-j.pageX,w=C.pageY-j.pageY,P=Math.sqrt(b*b+w*w);if(!i.current){i.current=P;return}const S=P/i.current,N=Math.max(1,Math.min(t,s*S));if(s===N)return;a(N);const R=(C.pageX+j.pageX)/2,A=(C.pageY+j.pageY)/2;let L=R-c.current.x,O=A-c.current.y;L=Math.max(_,Math.min(y,L)),O=Math.max(x,Math.min(v,O)),l.current={x:L,y:O},i.current=P,p(L,O,N)}else if(h.touches.length===1){const C=h.touches[0].pageX,j=h.touches[0].pageY;let b=C-c.current.x,w=j-c.current.y;b=Math.max(_,Math.min(y,b)),w=Math.max(x,Math.min(v,w)),l.current={x:b,y:w},p(b,w,s)}},[t,s]);return g.useEffect(()=>(document.addEventListener("touchstart",m),document.addEventListener("touchmove",f,{passive:!1}),()=>{document.removeEventListener("touchstart",m),document.removeEventListener("touchmove",f)}),[f,m]),{containerRef:n,imgRef:o,scale:s}},Zm={attachment:"ATTACHMENT",specification:"SPECIFICATION",attribute:"ATTRIBUTE"},Ve=Promise.resolve(!1),no={id:"",isOpen:!1,items:[],loading:!1,marketingData:null,messages:[],openTextField:{},paymentData:null,shippingData:null,totalizers:[],itemMetadata:[],recentlyAddedProducts:[],addCoupon:()=>Ve,addItem:()=>Ve,addSellerCode:()=>Ve,addMarketingData:()=>Ve,emptyCart:()=>({}),removeItem:()=>Ve,setIsOpen:()=>({}),shipping:()=>Ve,shippingUpdate:()=>Ve,toggleServiceToProduct:()=>Ve,updateItemQuantity:()=>Ve,insertProfileEmail:()=>Ve,setRecentlyAddedProducts:()=>({})},Mo=e=>e===0,ei=(e,t)=>{if(!e||e.length===0)return[];let n="";const o=[],s=e.match(/\d+/g)??[];for(const a of s){const i=t[Number(a)];i&&(n+=(n?"/":"")+i,o.push(n))}return o},ti=(e,t)=>{const{availability:n,additionalInfo:{brandName:o},bundleItems:s,id:a,uniqueId:i,detailUrl:c,ean:l,imageUrl:u,name:p,listPrice:m,quantity:f,price:h,priceDefinition:_,productCategories:y,productCategoryIds:x,productId:v,refId:C,seller:j,referenceId:b,offerings:w,productRefId:P,skuName:S,sellingPrice:N}=e;return{availability:n,bundleItems:s,referenceId:b,productRefId:P,id:a,ean:l,uniqueId:i,itemOffered:{additionalProperty:[],brand:{name:o},categories:ei(x,y),categoriesIds:x,gtin:C,image:[{alternateName:(t==null?void 0:t.MAIN_IMAGE)??"1",url:u}],name:p,isVariationOf:{name:p,productGroupID:v},sku:a,slug:c,skuName:S},listPrice:m,quantity:f,offerings:w,price:h,priceDefinition:_,sellingPrice:N,seller:j}},ni=(e,t)=>{const n=e.map(o=>({id:o.uniqueId,quantity:o.quantity,seller:o.seller}));return Array.isArray(t)?[...n,...t]:[...n,t]},ri=(e,t)=>{const n=e.find(o=>o.id===t);if(n){const o=e.map((s,a)=>{var i,c;return{id:((i=s.itemOffered)==null?void 0:i.sku)??"",index:a,quantity:(n==null?void 0:n.id)===((c=s.itemOffered)==null?void 0:c.sku)?0:s.quantity,seller:s.seller??""}});return{updateItems:o,filterItems:o.filter(s=>s.id!==t)}}return{updateItems:[],filterItems:[]}},oi=(e,t,n)=>e.filter(o=>o.availability!=="withoutStock"&&o.availability!=="https://schema.org/OutOfStock").map((o,s)=>{var a,i;return o.id===t?{id:o.id,index:s,quantity:n,seller:o.seller,sku:((a=o.itemOffered)==null?void 0:a.sku)??""}:{id:o.id,index:s,quantity:o.quantity,seller:o.seller,sku:((i=o.itemOffered)==null?void 0:i.sku)??""}}),ro=(e,t)=>e.filter(n=>n.availability!=="withoutStock").findIndex(({id:n})=>n===t),Jm=(e,t)=>{var n;return Array.isArray(e)?(((n=e==null?void 0:e.find(o=>{var s;return((s=o==null?void 0:o.id)==null?void 0:s.toLowerCase())===t}))==null?void 0:n.value)??0)/100:0},ep=e=>{const t=e.reduce((s,a)=>{const i=Mo(a.price)?0:a.quantity;return s+i},0),n=e.reduce((s,a)=>s+a.price*a.quantity,0),o=e.reduce((s,a)=>s+a.listPrice*a.quantity,0);return{totalItems:t,total:n,subTotal:o}},tp=e=>Array.isArray(e)?e.filter(t=>t.availability!=="withoutStock").reduce((t,n)=>t+(Mo(n==null?void 0:n.price)?0:n.quantity),0):0,si=(e,t)=>{const{items:n,orderFormId:o,...s}=e;return{...s,id:o,items:Array.isArray(n)?n.map(a=>ti(a,t)):[]}},ai=(e,t)=>{const n=e.find(o=>o.id===t);return n?n.availability==="unavailableItemFulfillment":!1},np=(e,t)=>{const n=e.sku,o=e.isVariantOf.hasVariant.find(s=>s.sku===n);return o?o.name.split(t)[1]:"--"},Ot=(e,t,n=!1)=>!e&&t!==""?{code:300,value:t,statusOk:n}:e===t?{code:200,value:t,statusOk:n}:{code:400,value:t,statusOk:n},rp=(e,t)=>{const n=new Set;return[e,...t].filter(o=>!n.has(o)&&n.add(o),n)},ii=(e,t)=>t&&Array.isArray(t)&&t.find(o=>o.id===e)?Promise.resolve(e):Promise.resolve(!1),ci=(e,t)=>t?Promise.resolve(e[t]):Promise.resolve(!1),li=async e=>{try{const t=await e();if(typeof t!="boolean")return t}catch(t){console.error(`[Error orderForm]: ${t}`)}return!1},ui=(e,t)=>{if(t!==-1){const n=Number(e);return n?n+1:1}return e??1},di=(e,t)=>Array.isArray(e)?e.filter(n=>t==null?void 0:t.some(o=>o.id===n.id)):[],mi=async(e,t)=>e.then(n=>[...n??[],...t??[]]),ke=async(e,t,n,o)=>{const{priority:s="auto",body:a}=t;return fetch(e,{headers:{"Content-Type":"application/json"},priority:s,method:"POST",body:JSON.stringify(a)}).then(async i=>{const c=await i.json();return n?c:si(c,o)})},pi=(e,t,n)=>({notifications:[...e.notifications,{id:Date.now(),message:t,callback:n}]}),fi=e=>[...Array.isArray(e)?e:[e],"faststore"],hi=e=>{const t=e.get("utm_source")||jt("utm_source"),n=e.get("utm_campaign")||jt("utm_campaign"),o=e.get("utm_medium")||jt("utm_medium"),s=e.get("utmi_cp")||jt("utmi_cp"),a=e.get("utmi_pc")||jt("utmi_pc"),i=e.get("utmi_p")||jt("utmi_p");return{...t&&{utmSource:t},...o&&{utmMedium:o},...n&&{utmCampaign:n},...s&&{utmiCampaign:s},...a&&{utmiPart:a},...i&&{utmipage:i}}},jt=e=>{if(!e||typeof window>"u")return;const t=window.location.href;e=e.replace(/[[\]]/g,"\\$&");const n=new RegExp("[?&]"+e+"(=([^&#]*)|&|#|$)"),o=n.exec(t);return o?o[2]?decodeURIComponent(o[2].replace(/\+/g," ")):"":null},_i=(e,t,n="BR")=>{const o=t,s={country:n,addressType:"",postalCode:e||null,city:"",state:"",street:"",number:"",neighborhood:"",complement:"",reference:"",geoCoordinates:[]};if(o){const a=typeof o=="object"&&"latitude"in o?o.latitude:null,i=typeof o=="object"&&"longitude"in o?o.longitude:null;s.geoCoordinates=typeof a=="number"&&typeof i=="number"?{latitude:a,longitude:i}:null}return[s]},op=Object.freeze(Object.defineProperty({__proto__:null,VALUE_REFERENCES:Zm,addItemOrder:ni,addNotification:pi,createItemOrder:ti,createNewAddress:_i,fetchCartAPI:ke,findItemIndex:ro,findOptions:di,findTotalizerValue:Jm,getCategories:ei,getCode:Ot,getQuantity:ui,getRemoveId:ii,getSize:np,getTotalItems:tp,getTotalizer:ep,getUrlParameter:jt,getValue:ci,initialState:no,isGift:Mo,marketingTagsBuilder:fi,mergeOptionsPromise:mi,mountMarketingData:hi,orderFormValues:si,promiseDefault:Ve,removeQuantity:ri,updateItemSellerExternal:ai,updateOrderFormPromise:li,updateQuantity:oi,wishlistArray:rp},Symbol.toStringTag,{value:"Module"})),sp=()=>{const e=async(h,_)=>ke("/api/checkout/order-form/coupon",{body:{orderFormId:h,coupon:_}}),t=async(h,_,y={},x)=>{if(x)if(_){const v=_.includes(" - ")?_.split(" - ")[0]:_,C=await ke("/api/checkout/order-form/seller-code",{body:{orderFormId:h,sellerCode:v}},!0);return C instanceof Object&&y.name in C&&C[y.status]===!0?ke("/api/checkout/order-form/attachments",{body:{orderFormId:h,sellerCode:v,sellerName:C[y.name]}}).then(b=>({...b,openTextField:{...(b==null?void 0:b.openTextField)??{},statusOk:!0}})):Promise.resolve({paymentData:null,openTextField:{statusOk:!1,value:v}})}else return ke("/api/checkout/order-form/attachments",{body:{orderFormId:h,sellerCode:"",sellerName:""}})},n=async(h,_)=>ke("/api/checkout/order-form/attachments/marketing-data",{body:{orderFormId:h,marketingData:_}}),o=async(h,_,y)=>ke("/api/checkout/order-form/items",{body:{orderFormId:h,orderItems:ni(_,y)}}),s=async(h,_,y,x=!1)=>ke("/api/checkout/order-form/offerings",{body:{id:_,itemIndex:y,orderFormId:h,remove:x}}),a=async h=>ke("/api/checkout/order-form/items/remove-all",{body:{orderFormId:h}}),i=async(h,_="low")=>ke("/api/checkout/order-form",{priority:_,body:{orderFormId:h??""}}),c=async(h,_)=>ke("/api/checkout/order-form/profile",{body:{orderFormId:h,email:_}}),l=async(h,_,y)=>{const x=ri(_,y);return ke("/api/checkout/order-form/items/update",{body:{orderItems:x.updateItems,orderFormId:h}})},u=async(h,_,y,x,v,C,j)=>{var P,S;const b=j?{startDateUtc:(P=C==null?void 0:C.deliveryWindow)==null?void 0:P.startDate,endDateUtc:(S=C==null?void 0:C.deliveryWindow)==null?void 0:S.endDate}:null,w={logisticsInfo:Array.from({length:x},(N,R)=>({itemIndex:R,selectedDeliveryChannel:(C==null?void 0:C.deliveryChannel)||null,selectedSla:(C==null?void 0:C.deliveryMethod)||null,deliveryWindow:b})),selectedAddresses:v,clearAddressIfPostalCodeNotFound:!0};return ke("/api/checkout/order-form/shipping",{body:{...w,orderFormId:h,country:y,postalCode:_}})},p=async(h,_,y)=>ke("/api/checkout/order-form/shipping/update",{body:{orderFormId:h,options:_,selectedAddresses:y}}),m=async(h,_,y,x)=>{const v=oi(_,y,x);return ke("/api/checkout/order-form/items/update",{body:{orderFormId:h,orderItems:v}})};return{addCoupon:e,addItem:o,addSellerCode:t,addMarketingData:n,giftItem:s,emptyCart:a,getOrderForm:i,insertProfileEmail:c,removeItem:l,shipping:u,shippingUpdate:p,updateItemQuantity:async(h,_,y,x,v)=>m(h,_,y,x).then(C=>C&&Array.isArray(C.items)?ai(C.items,y)?m(h,_,y,v):C:!1)}},Un="soma::cart",Kt="soma::options",Pt=It.create((e,t)=>{const n=sp(),o=async(s,a,i)=>{e({loading:!0});const c=await li(s);if(typeof c!="boolean"){e({...c});const l=await mi(Je.get(Kt),i);return Je.set(Kt,l),ci(c,a).finally(()=>e({loading:!1,options:l}))}return Ve};if(typeof window<"u"){const s=async a=>{if(a){const i=await Je.get(Kt).then(u=>di(u,a.items));Je.set(Un,a),Je.set(Kt,i),e({...a,options:i});const c=new URLSearchParams(window.location.search),l=c.get("utm_campaign")||c.get("utmi_campaign")||"";l&&o(()=>n.addSellerCode(t().id,l.toUpperCase()),"openTextField")}};return Je.get(Un).then(a=>n.getOrderForm(a?a.id:"").then(s)),{...no,addCoupon:async a=>o(()=>n.addCoupon(t().id,a),"marketingData"),addItem:(a,i)=>{o(()=>n.addItem(t().id,t().items,a),"items",i)},addSellerCode:async(a,i)=>o(()=>n.addSellerCode(t().id,a,i,t().isOpen),"openTextField"),addMarketingData:async a=>o(()=>n.addMarketingData(t().id,a),"marketingData"),emptyCart:()=>{o(()=>n.emptyCart(t().id))},removeItem:async a=>{const i=await o(()=>n.removeItem(t().id,t().items,a),"items");return ii(a,i)},shipping:async(a,i="BR")=>o(()=>n.shipping(t().id,a??"",i,t().items.length,_i(a??"",null,i)),"shippingData"),shippingUpdate:async a=>o(()=>{var i;return n.shippingUpdate(t().id,a,(i=t().shippingData)==null?void 0:i.selectedAddresses)},"shippingData"),toggleServiceToProduct:async(a,i,c)=>o(()=>n.giftItem(t().id,a,i,c),"items"),updateItemQuantity:async(a,i,c)=>{const{id:l,items:u}=t();return o(()=>{var p;return n.updateItemQuantity(l,u,a,i,((p=u.find(m=>m.id===a))==null?void 0:p.quantity)??1)},"items",c?[c]:void 0)},insertProfileEmail:async a=>o(()=>n.insertProfileEmail(t().id,a),"clientProfileData"),setIsOpen:a=>e({isOpen:a})}}return no}),ap=()=>Pt(e=>e),gi=It.create(e=>({notifications:[],actions:{addNotification:(t,n)=>e(o=>pi(o,t,n)),removeNotification:t=>e(n=>({notifications:n.notifications.filter(o=>o.id!==t)}))}})),Do=()=>gi(e=>e.notifications),$o=()=>gi(e=>e.actions),ip=Object.freeze(Object.defineProperty({__proto__:null,KEY_INDEXED_OPTIONS:Kt,KEY_INDEXED_STORE:Un,useCartStore:Pt,useGetCartStoreState:ap,useGetNotificationActions:$o,useGetNotificationsStore:Do},Symbol.toStringTag,{value:"Module"})),cp=6e3,yi=g.createContext({}),xi=({children:e,...t})=>{const{items:n}=Pt(),[o,s]=g.useState([]),a=g.useRef(null),i=g.useMemo(()=>Array.isArray(o)&&o.length>0?o.map(c=>n.find(l=>l.id===c.id)).filter(c=>c!==void 0):[],[n,o]);return g.useEffect(()=>{o.length&&(clearTimeout(a.current??0),a.current=setTimeout(()=>{s([])},cp))},[o]),r.jsx(yi.Provider,{value:g.useMemo(()=>({...t,setRecentlyAdded:s,recentlyAddedProducts:i}),[t,s,i]),children:e})},on=()=>{const e=g.useContext(yi);if(e===void 0)throw new Error("useUIContext must be used within a UIProvider");return e};class vi{constructor(){vt(this,"events",{});vt(this,"prevData",{})}subscribe(t,n){return this.events[t]||(this.events[t]=[]),this.events[t].push(n),()=>{this.events[t]=this.events[t].filter(o=>o!==n)}}publish(t,n){this.events[t]&&this.events[t].forEach(o=>{this.prevData[t]=n,o(n)})}}const bi=g.createContext({}),lp=({children:e,headerConfigs:t,pathname:n,...o})=>{const[s,a]=g.useState(!0),[i,c]=g.useState(!1),l=n==="/",u=g.useRef(new vi),p=h=>h?{headerVariant:t.home_default_variant,bannerVariant:t.home_default_variant,position:t.home_default_position}:{headerVariant:t.default_variant,bannerVariant:t.default_variant,position:t.default_position},m=p(l),f=g.useRef(m);return g.useEffect(()=>{var y;const h=((y=new URLSearchParams(window.location.search))==null?void 0:y.toString())??"";(h.includes("utm_")||h.includes("gclid"))&&(Jr.get("lastMedias")||Jr.set("lastMedias",`${h}`,{expires:1/24}));const _=()=>{const x=typeof(window==null?void 0:window.navigator)>"u"?"":navigator==null?void 0:navigator.userAgent,v=window.innerWidth<1024||!!x.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile|WPDesktop/i);i||c(!0),s!==v&&(a(v),c(!0))};return i||_(),window.addEventListener("resize",_,{passive:!0}),()=>window.removeEventListener("resize",_)},[s,i]),g.useEffect(()=>{const h=p(l);u.current.publish("header:change_variant",h.headerVariant),u.current.publish("header:change_position",h.position),f.current=h},[l]),r.jsx(bi.Provider,{value:{isMobile:s,mediatorRef:u,currentHeaderConfigsRef:f,deviceValidated:i,...o},children:r.jsx(xi,{children:e})})},ne=()=>g.useContext(bi),ji=g.createContext({}),up=({children:e,...t})=>r.jsx(ji.Provider,{value:{...t},children:e}),ce=()=>g.useContext(ji),Rt=(e,t)=>It.create(n=>{const o=()=>n({value:e});return t&&t instanceof Set&&t.add(o),{value:e,actions:{setValue:s=>n({value:s}),reset:o}}}),en={category:null,menuMobileIsOpen:!1,searchModalIsOpen:!1,userMenuIsOpen:!1},sn=new Set,dp=()=>{sn.forEach(e=>{e()})},Ci=It.create((e,t)=>{const n=()=>e({value:en.category});return sn.add(n),{value:en.category,actions:{reset:n,setValue:o=>e(()=>({value:o})),updateValue:o=>{t().value!==o&&e({value:o})}}}}),Si=()=>Ci(e=>e.value),an=()=>Ci(e=>e.actions),wi=Rt(en.menuMobileIsOpen,sn),Pi=()=>wi(e=>e.value),Ni=()=>wi(e=>e.actions),Ei=Rt(en.searchModalIsOpen,sn),Ii=()=>Ei(e=>e.value),Yn=()=>Ei(e=>e.actions),Ri=Rt(en.userMenuIsOpen,sn),zo=()=>Ri(e=>e.value),Fo=()=>Ri(e=>e.actions),mp=Object.freeze(Object.defineProperty({__proto__:null,resetAllHeaderStores:dp,useActionsHeaderCategory:an,useActionsMenuMobileIsOpen:Ni,useActionsSearchModalIsOpen:Yn,useActionsUserMenuIsOpen:Fo,useGetHeaderCategoryStore:Si,useGetMenuMobileIsOpen:Pi,useGetSearchModalIsOpen:Ii,useGetUserMenuIsOpen:zo},Symbol.toStringTag,{value:"Module"})),Ft={selectedSkuInfo:{productId:"",name:"",size:"",sku:"",sellerId:"",sellerName:"",available:!1,quantity:1},openLetMeKnow:!1,openMeasurements:!1,showBottomNavigation:!1,showNotify:!1},Bt=new Set,pp=()=>{Bt.forEach(e=>{e()})},Ti=It.create(e=>{const t=()=>e({value:Ft.selectedSkuInfo});return Bt.add(t),{value:Ft.selectedSkuInfo,actions:{setValue:n=>e(o=>({value:{...o,...n}})),reset:t}}}),cn=()=>Ti(e=>e.value),Ai=()=>Ti(e=>e.actions),ki=Rt(Ft.openLetMeKnow,Bt),fp=()=>ki(e=>e.value),hp=()=>ki(e=>e.actions),Oi=Rt(Ft.showNotify,Bt),Li=()=>Oi(e=>e.value),Bo=()=>Oi(e=>e.actions),Mi=Rt(Ft.showBottomNavigation,Bt),_p=()=>Mi(e=>e.value),gp=()=>Mi(e=>e.actions),Di=Rt(Ft.openMeasurements,Bt),$i=()=>Di(e=>e.value),zi=()=>Di(e=>e.actions),yp=Object.freeze(Object.defineProperty({__proto__:null,resetAllPDPStores:pp,useActionsPDPOpenLetMeKnow:hp,useActionsPDPOpenMeasurements:zi,useActionsPDPSelectedSkuInfo:Ai,useActionsPDPShowBottomNavigation:gp,useActionsPDPShowNotify:Bo,useGetPDPOpenLetMeKnow:fp,useGetPDPOpenMeasurements:$i,useGetPDPSelectedSkuInfo:cn,useGetPDPShowBottomNavigation:_p,useGetPDPShowNotify:Li},Symbol.toStringTag,{value:"Module"})),Cs={feedback:{active:!1,action:"add"},list:[]},Uo=It.create((e,t)=>({value:Cs,actions:{reset:()=>e({value:Cs}),setValue:o=>e(()=>({value:o})),toggleProduct:o=>e(s=>s.value.list.includes(o)?{value:{feedback:{active:!0,action:"remove"},list:s.value.list.filter(a=>a!==o)}}:{value:{feedback:{active:!0,action:"add"},list:[...s.value.list,o]}}),updateList:o=>e(s=>({value:{...s.value,list:o}})),resetFeedback:()=>e(o=>({value:{...o.value,feedback:{active:!1,action:""}}}))}})),Ut=()=>Uo(e=>e.value.list),qo=()=>Uo(e=>e.value.feedback),Tt=()=>Uo(e=>e.actions),xp=Object.freeze(Object.defineProperty({__proto__:null,useActionsWishlistStore:Tt,useGetWishlistFeedbackStore:qo,useGetWishlistStore:Ut},Symbol.toStringTag,{value:"Module"})),Fi=g.createContext({}),vp=({children:e,headerData:t,...n})=>{var p,m;const o=g.useRef(null),s=g.useRef(null),a=g.useRef(null),i=g.useRef(null),c=g.useRef(null),{mediatorRef:l,currentHeaderConfigsRef:u}=ne();return(p=l.current)==null||p.subscribe("header:change_variant",f=>{var v,C,j;if(f&&u.current&&(u.current.bannerVariant=f),!o.current)return;const _=document.body.scrollTop>0,y=o.current.getAttribute("data-interactiveVariant"),x=_?y:f??((v=u.current)==null?void 0:v.bannerVariant)??"default";x!==((C=u.current)==null?void 0:C.headerVariant)&&(o.current.setAttribute("data-bottomdivider",String(_)),o.current.setAttribute("data-variant",String(x)),(j=l.current)==null||j.publish("herobanner:change_controllers_variant",x),u.current&&(u.current.headerVariant=x))}),(m=l.current)==null||m.subscribe("header:change_position",f=>{o.current&&(o.current.style.position=f)}),g.useEffect(()=>{const f=new AbortController,h=d.helpers.throttle(()=>{var y;return(y=l.current)==null?void 0:y.publish("header:change_variant",null)},200);document.body.addEventListener("scroll",h,{passive:!0,signal:f.signal});const _=y=>{var v;(v=y.target.closest("a"))==null||v.blur()};return o.current&&(o.current.addEventListener("click",_,{signal:f.signal}),o.current.addEventListener("touchend",_,{signal:f.signal})),()=>{f.abort()}},[]),r.jsx(Fi.Provider,{value:{headerData:t,structureRef:s,rootRef:o,tipbarRef:a,userMenuMobileRef:i,userMenuDesktopRef:c,...n},children:e})},Ne=()=>g.useContext(Fi),Bi=g.createContext({}),Ui=({children:e,...t})=>r.jsx(Bi.Provider,{value:g.useMemo(()=>t,[t]),children:e}),Ho=()=>{const e=g.useContext(Bi);if(e===void 0)throw new Error("useMenuMobileContext must be used within a MenuMobileProvider");return e},bp=e=>{if(!e||typeof window>"u")return 0;const t=window.getComputedStyle(e);return parseInt(t.padding,10)},jp=(e,t,n)=>{if(!(e instanceof HTMLElement)||!(t instanceof HTMLElement))return{left:0,top:0};const o=t.getBoundingClientRect(),s=e.getBoundingClientRect(),a=e!=null&&e.parentElement?bp(e==null?void 0:e.parentElement):0;return{left:o.left+o.width/2-(s.width+a),top:o.top+o.height+n}},qi=g.createContext({}),Hi=({children:e,delay:t=600,gap:n=20,...o})=>{const[s,a]=g.useState(!1),i=g.useRef(null),[c,l]=g.useState(!1),[u,p]=g.useState({left:0,top:0}),m=g.useCallback(()=>{l(!0),typeof window<"u"&&(i.current=window.setTimeout(()=>{a(!1),l(!1)},t))},[l,a,t]);return g.useEffect(()=>{if(typeof window>"u")return;const f=window.document.querySelector("#cart-button"),h=window.document.querySelector("#add-to-cart--tooltip");if(f&&h){const{left:_,top:y}=jp(h,f,n??0);p({left:_,top:y}),l(!1)}},[n,s]),r.jsx(qi.Provider,{value:g.useMemo(()=>({...o,...u,handleClose:m,isLeaving:c,isOpen:s,setIsOpen:a,setIsLeaving:l}),[o,u,m,c,s,a,l]),children:e})},xt=()=>{const e=g.useContext(qi);if(e===void 0)throw new Error("useAddToCartContext must be used within a AddToCartProvider");return e},Vi=g.createContext({}),Cp=({children:e,SELLER_CODE_VALIDATION_KEYS:t,CARTPROVIDER_MESSAGE_PRODUCT_REMOVE:n,data:o,...s})=>{var oe,le,se,ue;const a=Pt(),{setRecentlyAdded:i}=on(),c=g.useRef(""),l=Do(),{addNotification:u,removeNotification:p}=$o(),[m,f]=g.useState(null),{addCoupon:h,addItem:_,addSellerCode:y,addMarketingData:x,emptyCart:v,isOpen:C,removeItem:j,shipping:b,shippingUpdate:w,toggleServiceToProduct:P,updateItemQuantity:S}=a;g.useEffect(()=>{(async()=>{var E,V;if(!a.id||!((V=(E=o==null?void 0:o.promotion)==null?void 0:E.promotionCart)!=null&&V.idPromotion))return;const ee=await fetch("/api/buywin",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({orderFormId:a.id,promotionId:o.promotion.promotionCart.idPromotion,web:(o==null?void 0:o.promotion.promotionCart.versionAPI)==="Original"})}).then(ie=>ie.json());f(ee)})()},[a.id,a.items.length,o==null?void 0:o.versionId,(le=(oe=o==null?void 0:o.promotion)==null?void 0:oe.promotionCart)==null?void 0:le.idPromotion,(ue=(se=o==null?void 0:o.promotion)==null?void 0:se.promotionCart)==null?void 0:ue.versionAPI]),g.useEffect(()=>{const $=Jr.get("lastMedias");if(a.id&&$&&c.current!==$){c.current=$;const ee=new URLSearchParams($),E=hi(ee);x(E)}},[a,x]);const N=g.useCallback(async($,ee)=>(ee==="coupon"?h($):y($,t??{})).then(V=>{if(typeof V!="boolean"&&V instanceof Object){if(ee==="seller"&&"value"in V){const{statusOk:ie,value:_e}=V,I=String(_e??"").split(" - ");return Ot((I==null?void 0:I[0])??"",$,!!ie)}return Ot(String(V.coupon),$,!0)}return Ot("","")}).catch(()=>Promise.resolve({code:400})),[h,y]),R=g.useCallback(($,ee,E)=>{const{id:V}=$;S(V,ee,E)},[S]),A=g.useCallback(($,ee,E=!1)=>{if(!$)return;const{id:V}=$,ie=ro(a.items,V);if(ie!==-1&&!E){const _e=Number(a.items[ie].quantity),I=a.items[ie]?_e+1:1;R($,I,ee)}else _({id:V,quantity:($==null?void 0:$.quantity)??1,seller:$.seller});C||i(_e=>[..._e,$])},[_,R,a.items,C,i]),L=g.useCallback(($,ee)=>{if(!$||!Array.isArray($))return;i(V=>[...V,...$]);const E=$.map(V=>{const{id:ie,quantity:_e,seller:I}=V,T=ro(a.items,ie),Te=ui(_e??1,T);return{id:ie,quantity:Te,seller:I}});_(E,ee)},[_,a.items,i]),O=g.useCallback(async($,ee,E)=>$?j($).then(()=>(u(ee??`${n}`,E),Ot($,$))):Promise.resolve(Ot("","Product id required")),[u,j]),G=g.useCallback(()=>{a.items.length>0&&v()},[v,a.items]),M=g.useCallback(($,ee="BRA")=>b($,ee),[b]),U=g.useCallback($=>{$&&w($)},[w]),Y=g.useCallback(async($,ee,E=!1)=>{const V=a.items.findIndex(_e=>_e.uniqueId===$);return a.items[V]&&V>=0?P(ee,V,E):!1},[a.items,P]),X=g.useCallback(async($,ee)=>S($,ee).then(E=>{if(Array.isArray(E)){const V=E.find(ie=>ie.id===$);if(V&&(V==null?void 0:V.quantity)<ee)return String(V.quantity)}return!1}),[S]),W=g.useCallback(async()=>{await x({...a.marketingData,coupon:""})},[x,a.marketingData]),z=g.useCallback(async()=>{await x({...a.marketingData,utmiCampaign:"",utmCampaign:"",utmSource:"",utmMedium:""})},[x,a.marketingData]),J=g.useCallback(async()=>{await b("","BRA")},[b]);return r.jsx(Vi.Provider,{value:g.useMemo(()=>({...s,data:o,addCouponSeller:N,addToCart:A,addItemsToCart:L,cartStore:a,notifications:l,clearCart:G,addNotification:u,isOpen:a.isOpen,removeNotification:p,removeToCart:O,setIsOpen:a.setIsOpen,shipping:M,shippingUpdateOption:U,toggleGiftItemCart:Y,updateItemQuantity:X,removeCoupon:W,removeSellerCode:z,removeCEP:J,promotionRules:m,setPromotionRules:f}),[s,o,N,A,L,l,G,u,a,p,O,M,U,Y,X,W,z,J,m,f]),children:e})},ve=()=>{const e=g.useContext(Vi);if(e===void 0)throw new Error("useCartContext must be used within a CartProvider");return e},Wi=g.createContext({}),Vo=({children:e,fetch:t})=>{const n=g.useRef(!0),[o,s]=g.useState(null),[a,i]=g.useState(!1);return g.useEffect(()=>{(async()=>{n.current=!0;try{const l=await t();if(!l.ok)throw new Error("Failed to fetch data");const u=await l.json();s(u.data),n.current=!1}catch{n.current=!0,i(!0)}})()},[t]),r.jsx(Wi.Provider,{value:g.useMemo(()=>({data:o,isLoading:n.current??!1,isError:a}),[o,a,n]),children:e})},Wo=()=>{const e=g.useContext(Wi);if(e===void 0)throw new Error("useProductsContext must be used within a useRootContext");return e},Gi=g.createContext({}),Go=({children:e,sort:t,state:n,count:o,collectionId:s,brand:a,searchParams:i,ITEMS_PER_PAGE:c})=>{const l=g.useMemo(()=>{var u;return s?[{key:"productclusterids",value:s.toString()}]:a?[{key:"brand",value:a}]:(u=n.base)!=null&&u.length?n.base.slice(1).split("/").map((p,m)=>({key:`category-${m+1}`,value:p})):[]},[n.base,s]);return r.jsx(Gi.Provider,{value:g.useMemo(()=>({state:{...n,facets:[...l,...n.facets??[]]},sort:t,count:o??c,searchParams:i}),[l,o,t,n,i]),children:e})},Fe=()=>{const e=g.useContext(Gi);if(e===void 0)throw new Error("useSearchContext must be used within a SearchProvider");return e},Ki=g.createContext({}),Sp=({children:e,...t})=>r.jsx(Ki.Provider,{value:t,children:e}),$e=()=>{const e=g.useContext(Ki);if(e===void 0)throw new Error("usePLPConstants must be used within a PLPConstantsProvider");return e},Xi=g.createContext({}),wp=({children:e,selectedFacets:t})=>{const{data:n,...o}=Wo(),{router:s}=ce(),{searchParams:a,PLP_SORT_DEFAULT:i}=$e(),c=g.useCallback((f,h)=>{if(h){if(f.key.toLocaleLowerCase()==="price"){const _=h.getAll("facets");h.delete("facets"),_.forEach(y=>{const[x]=y.split("/");x!==f.key&&h.append("facets",y)})}h.set("page","1"),h.append("facets",`${f.key}/${f.value}`),s.push(`?${h.toString()}`)}},[s]),l=g.useCallback(()=>{const f=new URLSearchParams;f.set("sort",i),f.set("page","1"),s.push(`?${f.toString()}`)},[s]),u=g.useCallback((f,h)=>{if(!h||!h.has&&!h.has("facets"))return;const _=h.getAll("facets");h.delete("facets"),h.set("page","1"),_.forEach(y=>{const[x,v]=y.split("/");(x!==f.key||v!==f.value)&&h.append("facets",y)}),s.push(`?${h.toString()}`)},[s]),p=g.useCallback(f=>{const h=a?new URLSearchParams(a):new URLSearchParams;for(const[,_]of h.entries()){const[y,x]=_.split("/");if(y===f.key&&x===f.value)return u(f,h)}return c(f,h)},[c,u,a]),m=g.useCallback(f=>{const h=a?new URLSearchParams(a):new URLSearchParams;h.set("sort",f.replace("_",":")),s.push(`?${h.toString()}`)},[s,a]);return r.jsx(Xi.Provider,{value:g.useMemo(()=>({...o,breadcrumb:n&&"breadcrumb"in n?n==null?void 0:n.breadcrumb:[],deleteAllFacets:l,facets:n&&"facets"in n?n==null?void 0:n.facets:[],selectedFacets:t,onToggleFacet:p,onSort:m,searchParams:a}),[n,l,m,p,o,t,a]),children:e})},Yi=({children:e,forceUpdate:t,storeId:n})=>{const{state:o}=Fe();return r.jsx(Vo,{fetch:()=>fetch(`https://${n}.myvtex.com/_v/proxy/search/facets`,{method:"POST",body:JSON.stringify({...o,forceUpdate:t})}),children:r.jsx(wp,{selectedFacets:(o==null?void 0:o.facets)??[],children:e})})},Qi=()=>{const e=g.useContext(Xi);if(e===void 0)throw new Error("useFacetsContext must be used within a FacetsProvider");return e},Vt={placeholder:"Ordernar por",options:{score_desc:"Mais Relevantes",orders_desc:"Mais Vendidos",price_desc:"Maior Preço",price_asc:"Menor Preço",release_desc:"Novidades",discount_desc:"Maior Desconto",name_asc:"De A a Z"}},Pp={nextPage:!1,previousPage:!1,startCursor:"0",endCursor:"0",count:0,total:0},Np="Imagem do produto",Ss=1,Ep="Sair",Ip=e=>e.exit,ws=({ICONS:e,storeConfig:t})=>[{icon:e.person,label:"Minha conta",href:`${t.secureSubdomain}/api/io/account#/profile`,needToBeAuth:!1,deviceShown:"both"},{icon:e.delivery_truck,label:"Meus pedidos",href:`${t.secureSubdomain}/api/io/account#/orders`,needToBeAuth:!1,deviceShown:"both"},{icon:e.favorite_false,label:t.wishlistConfig.label,href:t.wishlistConfig.path,needToBeAuth:!1,deviceShown:"mobile"},{icon:e.help,label:t.termsConfig.label,href:t.termsConfig.path,needToBeAuth:!1,deviceShown:"mobile"}],Rp=(e,t)=>{const n=(t??"").split("@")[0];return e?`Olá${n.length?", ":" "}${n}!`:"Olá!"},Tp=e=>"Seja bem vindo!",Ap="Marque a caixa para aceitar os termos de política de privacidade.",kp="Algumas informações estão incorretas ou não foram preenchidas",Op="Enviar",Zi=g.createContext({}),Lp=({children:e})=>{const{data:t,...n}=Wo(),[o,s]=g.useState(0),{sendDataLayerEvent:a}=ae();return g.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]),r.jsx(Zi.Provider,{value:g.useMemo(()=>({...n,products:t&&"products"in t?t==null?void 0:t.products:[],pagination:t&&"pagination"in t?t==null?void 0:t.pagination:Pp,total:o}),[t,n,o]),children:e})},Ko=({children:e,query:t,forceUpdate:n,storeId:o})=>{const{count:s,state:a}=Fe(),i={...a,count:s};return r.jsx(Vo,{fetch:()=>fetch(`https://${o}.myvtex.com/_v/proxy/search/product`,{method:"POST",body:JSON.stringify({...i,query:t,forceUpdate:n,facets:a.facets??[]})}),children:r.jsx(Lp,{children:e})})},ln=()=>{const e=g.useContext(Zi);if(e===void 0)throw new Error("useProductsContext must be used within a ProductsProvider");return e},Ji=g.createContext({}),Mp=({children:e,slug:t,searchParams:n,collectionId:o,brand:s,itemsPerPage:a=24,PLP_SORT_DEFAULT:i})=>{const{pathname:c}=ce(),l=g.useRef(""),[u,p]=g.useState(!1),m=g.useMemo(()=>{const h=new URL(c,"http://localhost"),_=(n==null?void 0:n.getAll("facets"))??[],y=(n==null?void 0:n.get("page"))??"1",x=(n==null?void 0:n.get("sort"))??(o?"":i);return h.searchParams.set("page",String(y)),h.searchParams.set("sort",String(x)),n!=null&&n.get("query")?(h.searchParams.set("query",n.get("query")),h):(h.searchParams.set("base",Array.isArray(t)?t.join("/"):t),h.searchParams.set("facets",_.join(",")),h)},[o,c,n,t]),f=g.useMemo(()=>{if(Array.isArray(n==null?void 0:n.getAll("facets")))return D.parseSearchState(m,n.getAll("facets")??[""]);const h=(n==null?void 0:n.getAll("facets"))??[];return D.parseSearchState(m,h)},[m,n]);return g.useEffect(()=>{l.current!==c&&(l.current=c,window.document.body.scrollTo(0,0))},[c]),r.jsx(Ji.Provider,{value:g.useMemo(()=>({openFilters:u,setOpenFilters:p}),[u,p]),children:r.jsx(Go,{ITEMS_PER_PAGE:a,searchParams:n??new URLSearchParams,state:g.useMemo(()=>({...f}),[f]),collectionId:o,brand:s,children:e})})},Xo=()=>{const e=g.useContext(Ji);if(e===void 0)throw new Error("usePLPContext must be used within a PLPProvider");return e},qn=(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)=>qn(s,t[a]));if(Array.isArray(t))return!1;const n=Object.keys(e),o=Object.keys(t);return n.length!==o.length?!1:n.every(s=>Object.prototype.hasOwnProperty.call(t,s)&&qn(e[s],t[s]))},ec=(e,t,n="page")=>Object.keys(t).some(o=>o===n?!1:!qn(t[o],e[o])),oo=async(e,t)=>{const n=await fetch(`https://${t}.myvtex.com/_v/proxy/search/product`,{method:"POST",body:JSON.stringify(e)});if(!n.ok)throw new Error("[FAILED TO FETCH DATA]");const o=await n.json();return o==null?void 0:o.data},tc=()=>({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}}}),nc=(e,t,n,o=24)=>{const s=new Set,a=[];if(!Array.isArray(e)||e.length===0)return{taken:s,placedBanners:a};const i=t*o*n;for(const c of e){let l=Number(c.position_grid),u=!1;for(;l<i;){const p=l%n;if(p+c.columns>n){l+=n-p;continue}if(!Array.from({length:c.columns}).some((h,_)=>s.has(l+_))){for(let h=0;h<c.columns;h++)s.add(l+h);a.push(l),u=!0;break}l++}u||console.info(`[PLP INFINITE FAILED BANNER POSITION]: pos=${c.position_grid}, cols=${c.columns}`)}return{taken:s,placedBanners:a}},so=(e,t,n,o=24)=>{const{placedBanners:s,taken:a}=nc(e??[],t,n),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}},$n=(e,t,n=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:Yo(),products:t!=null&&t.products.length&&e===a?t==null?void 0:t.products:Array.from({length:n},()=>tc())}}),rc=(e,t)=>[...e,{loading:!1,page:t,pagination:Yo(),products:[]}],Yo=()=>({nextPage:!1,previousPage:!1,startCursor:"0",endCursor:"1",count:1,total:1}),Dp=(e,t,n,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=n[c];return t.filter((u,p)=>{const m=o[p];return m<=l||s>i&&m>l})},oc=(e,t)=>{const n=new Map;for(const s of e){const a=Math.floor(s/t);n.has(a)||n.set(a,[]),n.get(a).push(s)}const o=[];for(const[,s]of n){const a=s[Math.floor(Math.random()*s.length)];o.push(a)}return o},sc=(e,t)=>{if(!e)return[];const n=e.map((o,s)=>o.video&&o.video!==""?s:null).filter(o=>o);return oc(n,t)},ac=e=>Array.isArray(e)?e.map((t,n)=>({href:`/${e.slice(0,n+1).join("/")}`,name:t})):[],$p=Object.freeze(Object.defineProperty({__proto__:null,createBreadcrumb:ac,createPage:rc,createPages:$n,createPagination:Yo,createProduct:tc,deepEqual:qn,fetchPage:oo,getBanners:nc,getPositions:so,getProductsWithVideo:sc,getRandomVideoPerRow:oc,getVisibleBanners:Dp,hasStateChangedExceptPage:ec},Symbol.toStringTag,{value:"Module"})),zp=50,Fp=It.create((e,t)=>{const n=i=>Math.min(i,zp),o=async(i,c,l)=>{const u=n(i.page);try{const p=await oo({...i,page:u},c);s(u,m=>l?l(m,p):{...m,...p})}catch(p){console.error(`[PDC - SCROLL INFINITE FAILED TO FETCH PAGE ${u}]: ${p}`),s(u,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,l)=>{await o(i,c,(u,p)=>(typeof l=="function"&&l(p),{...u,...p,loading:!0}))};return{banners:[],load:!1,pages:[],total:0,positions:[],products:[],createPages:async(i,c,l,u,p)=>{var f,h,_;const m=n(Number(i==null?void 0:i.page));if(e({...c,pages:$n(m,void 0,u)}),!!p)try{const y=await oo({...i,page:m},p);if(y){if(!y.products.length&&((f=y==null?void 0:y.pagination)==null?void 0:f.total)<m){p&&a({...i,page:(h=y==null?void 0:y.pagination)==null?void 0:h.total},p,l),e({pages:$n((_=y==null?void 0:y.pagination)==null?void 0:_.total)});return}typeof l=="function"&&l(y),e({load:!0,pages:$n(m,y),total:Number(y.pagination.count)})}}catch(y){console.error(`[PDC - SCROLL INFINITE TO CREATE PAGES]: page ${m} ${y}`)}},addPage:(i,c,l,u,p)=>{const{pages:m}=t(),f=n(i==null?void 0:i.page);m.some(h=>h.page===f)||(e({...c,pages:rc(m,f)}),p&&a(i,p,l))},updateProducts:(i,c,l)=>{const u=t().pages.find(p=>p.page===n(i==null?void 0:i.page));!(u!=null&&u.loading)&&l&&a(i,l,c)}}}),Bp=(e,t,n,o=0)=>{if(!e.length)return[];let s=0;const a=[];for(let i=0;i<e.length;i+=n){const c=e.slice(i,i+n),l=c.findIndex(u=>{var p;return(p=u.node)==null?void 0:p.video});for(let u=0;u<c.length;u++){const p=i+u,m=o+p,f=t.find(_=>_.position_grid===m+1),h=m+s+1;f&&(s+=f.columns),a.push({position:h,canPlayVideo:u===l})}}return a},ic=(e,t,n)=>{const o=(t-1)*n,s=t*n;return e>=o&&e<=s},Qn=e=>{var t;return(t=e==null?void 0:e.map(n=>({disable:D.disableSKU(n),size:D.getSKUName(n),skuID:"sku"in n&&n.sku})))==null?void 0:t.filter(n=>n.disable)},Up=Object.freeze(Object.defineProperty({__proto__:null,createGridPosAndVideo:Bp,getSkusNotify:Qn,isPositionInCurrentPage:ic},Symbol.toStringTag,{value:"Module"})),cc=({isMobile:e,ICONS:t,NOTIFY_INFO:n})=>r.jsxs(r.Fragment,{children:[r.jsx(d.Modal.Controls,{navigation:e?"top":"middle",isMobile:e??!1,children:!e&&r.jsxs(r.Fragment,{children:[r.jsx(d.Button,{"data-close":!0,iconNameStart:t.arrow_left,size:"small",variant:"tertiary"}),r.jsx(d.Button,{"data-close":!0,iconNameStart:t.close,size:"small",variant:"tertiary"})]})}),r.jsx(d.Modal.Title,{navigation:e?"top":"middle",title:n.title})]});cc.displayName="Notify.Controls";const et={"notify--header-modifier":"_notify--header-modifier_xlomp_1","notify--container":"_notify--container_xlomp_4","notify--form":"_notify--form_xlomp_20","notify--status":"_notify--status_xlomp_36","notify--status--success":"_notify--status--success_xlomp_50","notify--status--error":"_notify--status--error_xlomp_50","notify--modal--body":"_notify--modal--body_xlomp_99","notify--loading":"_notify--loading_xlomp_102","notify--selector":"_notify--selector_xlomp_122","notify--selector--header":"_notify--selector--header_xlomp_138","modal-modifier":"_modal-modifier_xlomp_168"};function lc(e){const n=decodeURIComponent(window.document.cookie).split(";");for(const o of n){const[s,a]=o.trim().split("=");if(s===e)return a}}function Qo(e,t,n={}){const s={...{path:"/",expires:new Date(Date.now()+36e5)},...n};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 uc=g.createContext({amount:null,boxes:null,toExpire:null,loading:!0,logout:()=>null,getCurrentCredits:()=>({credits:0,cashback:0})}),qp=({children:e,AUTH_TOKEN_COOKIE:t})=>{var p;const{shipping:n,cartStore:o}=ve(),[s,a]=g.useState({amount:null,boxes:null,toExpire:null,loading:!0}),i=g.useCallback(async()=>{try{await fetch("/api/user",{priority:"low"}).then(m=>m.json()).then(m=>{const{userCredits:f,userId:h,sub:_,...y}=m,{wishlist:x,...v}=y;a({amount:f==null?void 0:f.amount,boxes:f==null?void 0:f.boxes,toExpire:f==null?void 0:f.toExpire,user:{...v,userId:h,sub:_??""},loading:!1,wishlist:(typeof x=="string"?x.split(","):x)??[]})})}catch(m){console.error("user info and my credits request",m),a({...s,loading:!1})}},[a]),c=g.useCallback(()=>{Qo(t),i()},[i]),l=g.useCallback(()=>s.boxes?s.boxes.reduce((m,f)=>f.gift_card_box.refid==="C1643"?(m.cashback+=f.amount,m):(m.credits+=f.amount,m),{cashback:0,credits:0}):{cashback:0,credits:0},[s]),u=g.useCallback(async()=>{var m,f,h;if((m=s.user)!=null&&m.postalCode&&(o!=null&&o.id)&&!(o!=null&&o.loading)&&!((h=(f=o==null?void 0:o.shippingData)==null?void 0:f.address)!=null&&h.postalCode))try{await n(s.user.postalCode)}catch(_){console.error("Error auto-filling CEP:",_)}},[(p=s.user)==null?void 0:p.postalCode]);return g.useEffect(()=>{i()},[i]),g.useEffect(()=>{u()},[u]),r.jsx(uc.Provider,{value:g.useMemo(()=>({...s,getCurrentCredits:l,logout:c}),[s,l,c]),children:e})},qt=()=>{const e=g.useContext(uc);if(e===void 0)throw new Error("useContext(SessionContext) must be used within a SessionProvider");return e},dc=({color:e,delay:t=3e3,sku:n,setStatus:o,setIsLoading:s,NEWSLETTER_CONFIGS:a,NOTIFY_INFO:i})=>{const c=g.useRef(null),[l,u]=g.useState(null),{sendDataLayerEvent:p}=ae(),{user:m}=qt(),f=m!=null&&m.firstName?`${m==null?void 0:m.firstName} ${m==null?void 0:m.lastName}`:"";return r.jsx("div",{className:et["notify--form"],children:r.jsxs("form",{action:"POST",onSubmit:async h=>{var x;h.preventDefault();const _=h.currentTarget,y=((x=_.querySelector("input"))==null?void 0:x.value)??"";fetch("/api/aviseme",{method:"POST",body:JSON.stringify({userName:f,email:y,sku:n==null?void 0:n.skuID})}).then(v=>o(v.ok)).finally(()=>{s(!1),_.reset(),p({functionKey:"readyEvents",data:{event:"notify_me",readyData:{size:n==null?void 0:n.size,item_id:n==null?void 0:n.skuID,color:e}}}),c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{var v;(v=document.body)==null||v.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0})),u(!0),o(null)},t)})},children:[r.jsx(d.TextField.Structure,{input:r.jsx(d.TextField.Input,{feedback:typeof l=="boolean"&&l?"error":"none",type:"email",label:i.email_placeholder,mode:"over-label",variant:"outlined",sizeVariant:"large",onChange:h=>u(!h.target.validity.valid),required:!0}),supportText:typeof l=="boolean"&&l?r.jsx(d.TextField.SupportText,{text:a.messages.invalid_email,feedback:"error"}):r.jsx(r.Fragment,{})}),r.jsx(d.Button,{disabled:!(l===!1||!n)||!n,type:"submit",size:"large",children:i.button})]})})};dc.displayName="Notify.Form";const mc=({isLoading:e=!1})=>r.jsx("div",{className:et["notify--loading"],"data-loading":e,children:r.jsx(d.Spinner,{})});mc.displayName="Notify.Loading";const Zo={"product-variation-list--list":"_product-variation-list--list_e0he8_1","product-variation-list--title":"_product-variation-list--title_e0he8_10","product-variation-list":"_product-variation-list_e0he8_1"},pc=({children:e,...t})=>r.jsx("div",{...t,className:Zo["product-variation-list--list"],children:e});pc.displayName="ProductVariationList.List";const fc=({fill:e="#1352C7",src:t="",type:n="size",text:o,...s})=>{const{nextimage:a}=ce();return n==="size"?r.jsxs(d.ToggleSize.Wrapper,{...s,size:"large",variation:"ghost",children:[r.jsx(d.ToggleSize.DisabledAdornment,{title:"disabled-adornment-size"}),r.jsx(d.ToggleSize.Text,{children:o})]}):r.jsxs(d.ToggleStyle.Wrapper,{...s,size:"small",title:"wrapper-texture",children:[r.jsx(d.ToggleStyle.DisabledAdornment,{title:"disabled-adornment-texture"}),n==="color"?r.jsx(d.ToggleStyle.Color,{background:e,title:"color"}):r.jsx(d.ToggleStyle.Texture,{title:"texture",children:r.jsx(a,{alt:o??"image",height:40,src:t,width:40})})]})};fc.displayName="ProductVariationList.Option";const hc=({children:e,...t})=>r.jsx("div",{className:Zo["product-variation-list"],...t,children:e});hc.displayName="ProductVariationList.Root";const _c=({children:e,title:t,...n})=>r.jsxs("div",{...n,className:Zo["product-variation-list--title"],children:[t?r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.SectionWrapper,{children:r.jsx("p",{children:t})})}):r.jsx(r.Fragment,{}),e]});_c.displayName="ProductVariationList.Title";const nt={List:pc,Option:fc,Title:_c,Root:hc},Hp=(e,t)=>{if(!e||!t)return!1;const n=Object.keys(e);return n.length!==Object.keys(t).length?!1:n.every(o=>e[o]===t[o])},gc=({children:e,label:t="",skus:n,sku:o,setSku:s})=>r.jsxs(r.Fragment,{children:[r.jsx("div",{className:et["notify--selector--header"],children:e}),r.jsxs(nt.Root,{className:et["notify--selector"],children:[r.jsx(nt.Title,{title:t}),r.jsx(nt.List,{children:Array.isArray(n)&&n.map((a,i)=>{const c=Hp(o,a);return r.jsx(nt.Option,{active:c,onClick:()=>s(c?null:a),text:String(a.size),type:"size"},i)})})]})]});gc.displayName="Notify.Selector";const Ps=({type:e,icon:t,title:n,subtitle:o})=>r.jsx("div",{className:et[`notify--status--${e}`],children:r.jsx(d.TextStructure.Root,{adornment:{start:r.jsx(d.Icon,{name:t,size:"large"})},children:r.jsxs(d.TextStructure.DivWrapper,{children:[r.jsx("h2",{children:n}),r.jsx("h3",{children:o})]})})}),yc=({status:e,ICONS:t,PRODUCT_CARD_TEXTS:n})=>r.jsxs("div",{className:et["notify--status"],"data-status":e,children:[r.jsx(Ps,{...n.success,icon:t.check_circle,type:"success"}),r.jsx(Ps,{...n.error,icon:t.alert_circle,type:"error"})]});yc.displayName="Notify.Status";const Jo=({color:e,open:t,setVisible:n,skus:o,sku:s,setSku:a,ICONS:i,NEWSLETTER_CONFIGS:c,NOTIFY_INFO:l,PRODUCT_CARD_TEXTS:u,Z_INDEX_WAR:p})=>{const[m,f]=g.useState(!1),[h,_]=g.useState(null),{isMobile:y}=ne();return r.jsxs(d.Modal.Root,{isMobile:y??!1,isOpen:t,setIsOpen:n,variant:y?"sideBottom":"sideLeft",style:{zIndex:p.modal},className:et["modal-modifier"],children:[r.jsx(d.Modal.Header,{navigation:"top",className:et["notify--header-modifier"],children:r.jsx(cc,{isMobile:y??!1,ICONS:i,NOTIFY_INFO:l})}),r.jsxs(d.Modal.Body,{className:et["notify--modal--body"],children:[r.jsxs("div",{className:et["notify--container"],children:[r.jsxs(gc,{label:l.selector_label,sku:s,skus:o,setSku:a,children:[r.jsx("p",{children:l.subtitle}),r.jsx("span",{children:l.description})]}),r.jsx(dc,{delay:4e3,sku:s,setStatus:_,setIsLoading:f,color:e,NEWSLETTER_CONFIGS:c,NOTIFY_INFO:l}),r.jsx(mc,{isLoading:m}),r.jsx("div",{className:et["notify--selector--header"],children:r.jsx("span",{children:l.legal})})]}),r.jsx(yc,{status:h,ICONS:i,PRODUCT_CARD_TEXTS:u})]})]})};Jo.displayName="Notify";const Zn=({skus:e,ICONS:t,NEWSLETTER_CONFIGS:n,NOTIFY_INFO:o,PRODUCT_CARD_TEXTS:s,Z_INDEX_WAR:a,...i})=>{const c=Qn(e??[]);return r.jsx(Jo,{skus:c,ICONS:t,NEWSLETTER_CONFIGS:n,NOTIFY_INFO:o,PRODUCT_CARD_TEXTS:s,Z_INDEX_WAR:a,...i})};Zn.displayName="PDC.Notification";const xc=g.createContext({}),vc=({banners:e,children:t})=>{const{searchParams:n,ITEMS_PER_PAGE:o,ICONS:s,NEWSLETTER_CONFIGS:a,NOTIFY_INFO:i,PRODUCT_CARD_TEXTS:c,Z_INDEX_WAR:l,storeId:u}=$e(),{router:p}=ce(),{sendDataLayerEvent:m}=ae(),{isMobile:f}=ne(),{state:h}=Fe(),{addPage:_,createPages:y,updateProducts:x,...v}=Fp(),C=f?8:16,j=f?2:4,b=g.useRef(!1),w=g.useRef(h),[P,S]=g.useState(!1),[N,R]=g.useState(null),[A,L]=g.useState([]),O=g.useCallback(X=>{X&&"pagination"in X&&m({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:X.products}}})},[m]),G=g.useCallback(X=>{if(X.pagination.nextPage===!0){const W=X.page+1,z=so(e,W,j,o);_({...h,page:W},z,O,o,u)}},[_,e,O,j,o,h,u]),M=g.useCallback(X=>{X.loading===!1&&x({...h,page:X.page},O,u)},[O,x,h,u]),U=g.useCallback(X=>{const W=new URLSearchParams(n);X.page!==Number(W.get("page")??1)&&(W.set("page",String(X.page)),p.replace(`?${W.toString()}`,{scroll:!1}))},[p,n]),Y=g.useCallback((X,W)=>{const z=W?Qn([W]):null;L(X),R(z!=null&&z.length?z[0]:null),S(!0)},[]);return g.useEffect(()=>{const X=!b.current,W=ec(w.current,h),z=so(e,h.page,j);X?y(h,z,O,o,u):W&&(y(h,z,O,o,u),w.current=h),b.current=!0},[e,y,O,j,o,h,u]),r.jsxs(xc.Provider,{value:g.useMemo(()=>({...v,addPage:_,addNewPage:G,createPages:y,gap:C,columns:j,handleNotify:Y,updatePage:M,updateProducts:x,updateParamPage:U}),[_,G,y,Y,C,j,v,M,x,U]),children:[t,r.jsx(Zn,{open:P,sku:N,skus:A,setSku:R,setVisible:S,ICONS:s,NEWSLETTER_CONFIGS:a,NOTIFY_INFO:i,PRODUCT_CARD_TEXTS:c,Z_INDEX_WAR:l})]})},dt=()=>{const e=g.useContext(xc);if(e===void 0)throw new Error("PLPInfiniteScrollContext must be used within a ScrollInfiniteProvider");return e},bc=g.createContext({gridBanners:void 0,banners:[]}),Vp=({children:e,data:t,device:n,SectionZone:o,COMMON_PAGE_COLUMN_GAP_PDC:s})=>{const{isMobile:a}=ne(),i=(t==null?void 0:t.sections.filter(m=>m.name!=="List Product Banners"))??[],c=i.slice(0,Ss),l=i.slice(Ss,i.length),u=t==null?void 0:t.sections.find(m=>m.name==="List Product Banners"),p=g.useMemo(()=>{var m,f;return((f=(m=u==null?void 0:u.data)==null?void 0:m.banners)==null?void 0:f.map(h=>({...h.banner,columns:h.bannerWidth,position_grid:h.bannerPosition})))??[]},[u]);return a&&n==="mobile"||!a&&n==="desktop"?r.jsxs(bc.Provider,{value:{gridBanners:u,banners:p},children:[r.jsx(o,{data:c??[]}),r.jsxs(d.Utils.Column,{gap:s,className:d.helpers.classNameConcat("utils-column-modifier"),children:[e,r.jsx(o,{data:l??[]})]})]}):r.jsx(r.Fragment,{})},Jn=()=>{const e=g.useContext(bc);return e===void 0&&console.error("Needs PLPContentContext on parent component"),e},jc=g.createContext({}),Cc=({children:e,filters:t,PLP_FILTERS:n,...o})=>{var a;const s=(a=t.facets)==null?void 0:a.filter(i=>n.find(c=>c.key===i.key));return r.jsx(jc.Provider,{value:g.useMemo(()=>({...o,filters:{...t,facets:s}}),[t,s,o]),children:e})},Ht=()=>{const e=g.useContext(jc);if(e===void 0)throw new Error("useFilterContext must be used within a FilterProvider");return e},Sc=g.createContext({product:void 0}),Wp=({children:e,data:t,productId:n,COMMON_PAGE_COLUMN_GAP:o,SectionZone:s})=>r.jsxs(Sc.Provider,{value:{productId:n},children:[e,r.jsx(d.Utils.Column,{gap:o,className:d.helpers.classNameConcat("utils-column-modifier"),children:r.jsx(s,{data:(t==null?void 0:t.sections)??[]})})]}),wc=()=>{const e=g.useContext(Sc);return e||console.error("use this hook only inside PDPContentProvider hierarchy"),e},ao=e=>e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/\s+/g,"-").toLowerCase().trim();function Gp(e,t=1e3){let n=!1;return(...o)=>{n||(e(...o),n=!0,setTimeout(()=>{n=!1},t))}}function Kp(e,t=1e3){let n;return(...o)=>{clearTimeout(n),n=setTimeout(()=>{e(...o)},t)}}const Pc=(e,t)=>t.getTime()>e.getTime()?Math.abs(t.getTime()-e.getTime()):0,Xt=(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),Xp=e=>{const t=$m.decodeJwt(e??"");return{email:t.sub,userId:t.userId}},Yp=["name","email","phone","date","cpf","cep"],Ns={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}$/},Nc=({type:e,input:t,required:n=!1})=>{if(typeof t!="string"||!n&&t===""||!Ns[e])return!0;const o=t.trim();return Ns[e].test(o)},Qp=e=>{const t=/\/(\d+)-\d+-\d+\/(.+?)\./,n=typeof e=="string"?e.match(t):null;return n?n[2].replace(/-/g," "):Np},Zp=Object.freeze(Object.defineProperty({__proto__:null,FieldTypes:Yp,debounce:Kp,getAltTextFromUrl:Qp,getAuthenticatedUser:Xp,getCookie:lc,getDaysHoursMinutesSeconds:Xt,getMilliSeconds:Pc,removeAccentsAndReplaceSpaces:ao,setCookie:Qo,throttle:Gp,validateInput:Nc},Symbol.toStringTag,{value:"Module"})),Jp=({fields:e})=>{const t={};return{mountedFields:(e==null?void 0:e.reduce((o,s)=>(t[s.master_data_field]="none",{...o,[s.master_data_field]:s}),{}))??{},mountedInputsStatus:t}},ef=({formData:e,mountedFields:t,inputsStatus:n,hasTermsAndConditions:o,checkboxRef:s,setFormStatus:a})=>{let i=!1,c=!1;const l={...n};return o&&!s.current&&(a("unchecked"),i=!0),e.forEach((u,p)=>{var h;if(p==="terms-and-conditions")return;const m=(h=t[p])==null?void 0:h.required;if(m&&!u){l[p]="required",i=!0;return}Nc({type:t[p].type,input:u,required:m})||(l[p]="error",c=!0),typeof u=="string"&&e.set(p,u.toString().trim())}),{hasEmptyFields:i,hasErrors:c,inputStatusToUpdate:l}},Ec=g.createContext({}),Ic=({children:e,masterDataEmailField:t,fields:n,variant:o,CONSTANTS:{MASTER_DATA_ENTITY:s,NEWSLETTER_CONFIGS:a}})=>{const{sendDataLayerEvent:i}=ae(),c=a.hasTermsAndConditions,{mountedFields:l,mountedInputsStatus:u}=g.useMemo(()=>Jp({fields:n}),[n]),p=g.useRef(!1),[m,f]=g.useState("idle"),[h,_]=g.useState(u),y=async({searchFields:P,entity:S})=>{const N=await St.post("/api/master-data/search",{body:{masterDataEntity:S,searchFields:P,headers:{"REST-Range":"resources=0-49"}}});return console.info(N),N.data},x=async({documentId:P,fieldsToBeUpdated:S,entity:N})=>(await St.post("/api/master-data/update",{dataEntityName:N,documentId:P,fieldsToBeUpdated:S})).status,v=g.useCallback(async({payload:P,response:S},N,R)=>{var M;const{email:A,...L}=P,[O]=await y({searchFields:{[N]:A},entity:R??s.newsletter}),G=Array.isArray(O)?(M=O[0])==null?void 0:M.id:void 0;return O&&await x({documentId:G,fieldsToBeUpdated:L,entity:R??s.newsletter})!==204?{...S,status:"error"}:{...S,status:"success"}},[]),C=g.useCallback(async({formData:P},S,N)=>{const R={status:"idle",inputsStatus:{}},A={};P.forEach((L,O)=>{A[O]=L});try{const O=(await St.post("/api/master-data",{body:{payload:A,masterDataEntity:S??s.newsletter}})).data;return(O==null?void 0:O.Message)==="duplicated entry"?v({payload:A,response:R},N,S):O!=null&&O.Id?{...R,status:"success"}:{...R,status:"error"}}catch(L){return console.error("error",L),{...R,status:"error"}}},[v]),j=g.useCallback(async(P,S,N)=>{P.preventDefault();const R=new FormData(P.target);if(R.append("acceptedTerms",p.current?"true":"false"),p.current){const L=new eo.TZDate(new Date,"America/Sao_Paulo").toISOString();R.append("termsAcceptedAt",L)}S&&Object.keys(S).forEach(L=>{R.append(L,S[L])});const A=await C({formData:R},N??"",t);A&&(f(A==null?void 0:A.status),_(A.inputsStatus),A.status==="success"&&i({functionKey:"readyEvents",data:{event:"generate_lead"}}))},[t,C,f,_,i]),b=g.useCallback(P=>{const S=new FormData(P.currentTarget.parentElement),{hasEmptyFields:N,hasErrors:R,inputStatusToUpdate:A}=ef({formData:S,mountedFields:l,inputsStatus:h,hasTermsAndConditions:c,checkboxRef:p,setFormStatus:f});if(_(A),N||R){P.preventDefault();return}f("loading")},[l,h,c,p]),w=g.useCallback(()=>{f("idle"),_(u)},[u]);return r.jsx(Ec.Provider,{value:g.useMemo(()=>({formStatus:m,handleSubmit:j,setFormStatus:f,inputsStatus:h,setInputsStatus:_,hasTermsAndConditions:c,handleClickToSubmit:b,checkboxRef:p,masterDataEmailField:t,fields:n,variant:o,resetNewsletter:w}),[m,j,f,h,_,b,c,p,t,n,o,w]),children:e})},es=()=>{const e=g.useContext(Ec);if(e===void 0)throw new Error("useNewsletterContext must be used within a NewsletterProvider");return e},Rc=g.createContext({}),Tc=({children:e,data:t})=>{const[n,o]=g.useState(),[s,a]=g.useState(),i=g.useCallback(u=>{const p=t.filter(m=>m.cidade===u);o(p)},[t]),c=g.useCallback(u=>{a(u)},[]),l=g.useCallback(()=>{a("")},[]);return r.jsx(Rc.Provider,{value:g.useMemo(()=>({clearSelectedStore:l,data:t,handleSelectCity:i,handleSelectStore:c,selectedCity:n,selectedStore:s}),[l,t,i,c,n,s]),children:e})},er=()=>{const e=g.useContext(Rc);if(e===void 0)throw new Error("useLPStoreContext must be used within a LPStoreProvider");return e},tn={contexts:{addToCart:{hook:xt,provider:Hi},cart:{hook:ve,provider:Cp},cms:{FlagsAndTags:{context:Oo,hook:yt,provider:zm}},newsletter:{hook:es,provider:Ic},events:{hook:ae,provider:Gm},global:{hook:ne,provider:lp,mediator:vi},header:{hook:Ne,provider:vp},menuMobile:{hook:Ho,provider:Ui},next:{hook:ce,provider:up},pdp:{provider:Fm},PDPContent:{provider:Wp,hook:wc},plp:{provider:Mp,hook:Xo},plpFilter:{hook:Ht,provider:Cc},PLPContent:{provider:Vp,hook:Jn},plpInfinite:{provider:vc,hook:dt},pdpdata:{provider:Km},searchFacets:{hook:Qi,provider:Yi},searchProducts:{hook:ln,provider:Ko},searchRoot:{hook:Wo,provider:Vo},searchSearch:{hook:Fe,provider:Go},session:{hook:qt,provider:qp},ui:{hook:on,provider:xi},lpStore:{hook:er,provider:Tc}},hooks:{useBackPDC:Ua,useClipboard:Xm,useDisableZoom:Za,useLocalStorage:Qm,useOnScreen:Lo,useSentinel:Xn,useTouchZoomPan:Ja},stores:{cart:ip,header:mp,pdp:yp,wishlist:xp}},tf={cart:op,events:Wm,plp:$p,product:D.productHelpers,utils:Zp},ts={helpers:tf},He={"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"},Ac=({brand:e,className:t,name:n,...o})=>r.jsxs("div",{...o,className:d.helpers.classNameConcat(He["add-to-cart--card--name"],t),children:[r.jsx(d.Tag,{style:{textTransform:"uppercase"},size:"small",variant:"quaternary",title:e,children:e}),r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{alignContent:"flex-start",alignItems:"flex-start",children:r.jsx("p",{className:"typography-style-body-md",children:n})})})]});Ac.displayName="AddToCart.Card.Name";const kc=({className:e,listPrice:t,price:n,quantity:o,productId:s,...a})=>{const i=D.formatPriceToCurrency(n/100),c=D.formatPriceToCurrency(t/100);return r.jsx("div",{...a,className:d.helpers.classNameConcat(He["add-to-cart--card--price-quantity"],e),children:r.jsx(d.ProductInfo.Root,{size:"small",layout:"vertical",children:r.jsx(d.ProductInfo.Wrapper,{size:"small",layout:"vertical",children:r.jsx(d.ProductInfo.ValuesWrapper,{children:n!==t?r.jsxs(r.Fragment,{children:[r.jsx(d.ProductInfo.Price,{label:"originalPrice",value:i,size:"small"},"price-list"),r.jsx(d.ProductInfo.Price,{label:"discountPrice",value:c,size:"small"},"price-low")]}):r.jsx(d.ProductInfo.Price,{label:"defaultPrice",value:c,size:"small"},"price-low")})})})})};kc.displayName="AddToCart.Card.PriceQuantity";const nf="_skeleton_12b79_1",rf={skeleton:nf},Oc=({style:e})=>r.jsx("div",{style:e,className:rf.skeleton}),of="_image_1y08u_1",sf={image:of},af=({alt:e,className:t,objectFit:n,...o})=>{const{nextimage:s}=ce();return r.jsx(s,{quality:90,...o,alt:e??"",className:d.helpers.classNameConcat(sf.image,t),"data-object-fit":n??"cover"})},cf=({videoRef:e,...t})=>r.jsx("video",{...t,ref:e,children:r.jsx("track",{kind:"captions"})}),Pe={Image:af,Video:cf},Lc=({className:e,productGroupID:t,size:n,texture:o,storeId:s,...a})=>{const{CONSTANTS:{TEXTURE_IMAGE:i,TOGGLE_STYLE_MODIFIER:c}}=xt(),[l,u]=g.useState(o??"");return g.useEffect(()=>{l||fetch(`https://${s}.myvtex.com/_v/proxy/catalog/product/info`,{method:"POST",body:JSON.stringify({ids:[t]})}).then(p=>p.json()).then(p=>{const m=p.data[0].items[0];if(m){const f=m.images.find(h=>i.includes(h.imageLabel));f!=null&&f.imageUrl?u(f.imageUrl):u(m.images[0].imageUrl)}}).catch(p=>{console.error(p)})},[l,t,s]),r.jsxs("div",{...a,className:d.helpers.classNameConcat(He["add-to-cart--card--style-size"],e),children:[r.jsx(d.ToggleStyle.Wrapper,{size:"x-small",style:c,children:r.jsx(d.ToggleStyle.Texture,{children:l?r.jsx(Pe.Image,{alt:"",src:l??"",width:164,height:164,style:c}):r.jsx(Oc,{})})}),r.jsx(d.Utils.Divider,{direction:"vertical",size:"medium",style:{height:24}}),n&&r.jsxs(d.ToggleSize.Wrapper,{size:"small",title:"wrapper-texture",children:[r.jsx(d.ToggleSize.DisabledAdornment,{title:"disabled-adornment-texture"}),r.jsx(d.ToggleSize.Text,{children:n})]})]})};Lc.displayName="AddToCart.Card.StyleSize";const{helpers:lf}=ts,Mc=({className:e,item:t,texture:n,storeId:o,...s})=>{const{itemOffered:{name:a,brand:i,skuName:c,isVariationOf:{productGroupID:l}},quantity:u,price:p,sellingPrice:m}=t,{CONSTANTS:{NAME_SPLIT_SYMBOL:f}}=xt(),{size:h}=lf.product.getColorAndSizeFromSkuName(c??a,f);return r.jsxs("div",{...s,className:d.helpers.classNameConcat(He["add-to-cart--card--content"],e),children:[r.jsx(Ac,{brand:i.name,name:a}),r.jsx(kc,{price:p,listPrice:m,quantity:u,productId:t.id}),r.jsx(Lc,{size:h,texture:n,productGroupID:l,storeId:o})]})};Mc.displayName="AddToCart.Card.Content";const Dc=({image:e,thumbnail:t=!1})=>r.jsx(Pe.Image,{alt:e.alternateName??"image","data-thumbnail":t,height:t?152:120,src:e.url,width:t?152:94});Dc.displayName="AddToCart.Card";const $c=({className:e,item:t,texture:n,thumbnail:o,storeId:s,...a})=>{const{itemOffered:{image:[i]}}=t,c=D.updatedResizedImg(i.url,{width:200,height:300});return r.jsxs("div",{...a,className:d.helpers.classNameConcat(He["add-to-cart--card"],e),children:[r.jsx(Dc,{image:{alternateName:i.alternateName||"Produto",url:c||""},thumbnail:o}),!o&&r.jsx(Mc,{item:t,texture:n,storeId:s})]})};$c.displayName="AddToCart.Card";const zc=({className:e,children:t,title:n,...o})=>r.jsxs("div",{...o,className:d.helpers.classNameConcat(He["add-to-cart--content"],e),children:[r.jsx("div",{className:He["add-to-cart--content--title"],children:n&&r.jsx("h2",{children:n})}),t,r.jsx(wt.Footer,{})]});zc.displayName="AddToCart.Layout.Content";const Fc=({className:e,...t})=>{var h,_;const{isMobile:n,handleClose:o,CONSTANTS:{ADD_TO_CART:s}}=xt(),{cartStore:{totalizers:a},setIsOpen:i}=ve(),c=(h=a.find(y=>y.id==="Discounts"))==null?void 0:h.value,l=((_=a.find(y=>y.id==="Items"))==null?void 0:_.value)??0,u=a.find(y=>y.id==="Shipping"),m=(l-Math.abs(c??0)+((u==null?void 0:u.value)??0))/100,f=D.formatPriceToCurrency(m??0);return r.jsxs("div",{...t,className:d.helpers.classNameConcat(He["add-to-cart--footer"],e),children:[r.jsxs("div",{className:He["add-to-cart--footer--total"],children:[r.jsx("span",{children:"Subtotal:"}),r.jsx("span",{children:f})]}),r.jsx(d.Button,{size:"medium",variant:"primary","data-close":!0,onClick:()=>i(!0),children:s.footer.bag}),n?r.jsx(d.Button,{"data-close":!0,size:"medium",variant:"tertiary",children:s.footer.keep_buying}):r.jsx(d.Button,{onClick:()=>o(),size:"medium",variant:"tertiary",children:s.footer.keep_buying})]})};Fc.displayName="AddToCart.Layout.Footer";const Bc=({children:e,className:t,thumbnail:n=!1,...o})=>{const{cartStore:{options:s}}=ve(),{recentlyAddedProducts:a}=on(),{CONSTANTS:{storeId:i}}=xt(),c=a.length>3?4:a.length;return r.jsxs("div",{...o,className:He["add-to-cart--items"],"data-thumbnail":n,children:[Array.isArray(a)&&a.filter((l,u)=>u<c).map(l=>{var p;const u=(p=s==null?void 0:s.find(m=>m.id===l.itemOffered.isVariationOf.productGroupID))==null?void 0:p.texture;return r.jsx(wt.Card,{item:l,thumbnail:n,texture:u,storeId:i},l.itemOffered.sku)}),e]})};Bc.displayName="AddToCart.Layout.Items";const Uc=({children:e,Z_INDEX_WAR:t})=>{const{isOpen:n,setIsOpen:o}=xt(),{isMobile:s}=ne();return r.jsxs(d.Modal.Root,{"data-modal":"add-to-cart--modal",className:He["add-to-cart__modal"],isMobile:s??!1,isOpen:n,setIsOpen:o,variant:"sideBottom",style:{zIndex:t.modal},children:[r.jsx(d.Modal.Header,{navigation:"top",children:r.jsx(d.Modal.Controls,{navigation:"top",isMobile:!0})}),r.jsx(d.Modal.Body,{children:e})]})};Uc.displayName="AddToCart.Modal";const uf=({children:e})=>{const{count:t,handleClose:n,setIsOpen:o}=xt(),s=g.useRef(t);return g.useEffect(()=>{t>s.current&&o(!0),t<s.current&&s.current>=1&&n(),s.current=t},[t,n,o]),r.jsx(r.Fragment,{children:e})},qc=({children:e,component:t,CONSTANTS:n,...o})=>{const{recentlyAddedProducts:s}=on(),{isMobile:a}=ne(),i=s.length>3?4:s.length;return r.jsx(Hi,{...o,count:i,isMobile:a,CONSTANTS:n,children:r.jsx(uf,{children:a?r.jsxs(r.Fragment,{children:[r.jsx(wt.Modal,{Z_INDEX_WAR:n.Z_INDEX_WAR,children:t}),e]}):r.jsx(wt.Tooltip,{component:t,style:{width:350},Z_INDEX_WAR:n.Z_INDEX_WAR,children:e})})})};qc.displayName="AddToCart.Root";const Hc=({children:e,component:t,Z_INDEX_WAR:n,...o})=>{const{contentRef:s,left:a,isLeaving:i,target:c,isOpen:l,top:u}=xt();return r.jsx(d.Tooltip.Root,{arrow:"top-right",component:r.jsx("div",{...o,ref:s,children:t}),id:"add-to-cart--tooltip",className:He["add-to-cart--tooltip"],style:{zIndex:n.modal},isLeaving:i,isOpen:l,left:a,size:"medium",position:"top",top:u,children:r.jsx("div",{className:He["add-to-cart--tooltip"],ref:c,children:e})})};Hc.displayName="AddToCart.Tooltip";const wt={Card:$c,Content:zc,Footer:Fc,Items:Bc,Modal:Uc,Root:qc,Tooltip:Hc},ns=({title:e,...t})=>{const{recentlyAddedProducts:n}=on(),{isMobile:o}=ne(),s=n.length>3?4:n.length,a=n.length>(s??1),i=n.length>1;return r.jsx(wt.Root,{isMobile:o,count:n.length,component:r.jsx(wt.Content,{title:e,children:r.jsx(wt.Items,{thumbnail:i,children:a&&r.jsx(d.Badge.Count,{count:n.length-s,size:"medium",variant:"secondary"})})}),...t})};ns.displayName="AddToCart";const Es={"backtotop-btn":"_backtotop-btn_1shb6_1","card-modifier":"_card-modifier_1shb6_27"},df=({children:e,className:t,classNameButton:n,adornment:o,iconPosition:s,scrollToOptions:a,style:i,...c})=>{const l={top:(a==null?void 0:a.top)??0,left:(a==null?void 0:a.left)??0,behavior:(a==null?void 0:a.behavior)??"smooth"},p=s&&o?{flexDirection:{top:"column",bottom:"column-reverse",left:"row",right:"row-reverse"}[s]}:{},m=()=>{window&&window.document.body.scrollTo({...l})};return r.jsx(d.Card,{...c,shadow:!0,padding:"small",className:d.helpers.classNameConcat(Es["card-modifier"],t),style:{...i,padding:0},children:r.jsxs("button",{className:d.helpers.classNameConcat(Es["backtotop-btn"],n),onClick:m,style:{...p},"data-orientation":s,children:[o,e]})})},mf="_container_1sy8s_16",ht={"carousel-container":"_carousel-container_1sy8s_1","add-cart-container":"_add-cart-container_1sy8s_8",container:mf,"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"},pf=({selectedProducts:e,handleAddAllToCart:t,CONSTANTS:n})=>{const o=Object.values(e.products).length;return r.jsxs("div",{className:ht["add-itens-to-cart-container"],children:[r.jsxs("div",{className:ht["add-itens-to-cart-container-values"],children:[r.jsx("div",{className:ht["add-itens-to-cart-qty-products"],children:r.jsx("span",{children:o===0?n.BUY_PACKAGE.group_cart.select_all_product:`${o} ${o===1?n.BUY_PACKAGE.group_cart.select_product:n.BUY_PACKAGE.group_cart.select_product+"s"}`})}),r.jsx("div",{className:ht["add-itens-to-cart-total"],children:r.jsx("span",{children:D.freightParsePrice({valueInCents:e.totalPrice*100,hasFree:!1,freeTaxMessage:n.FREIGHT_CALCULATION.messages.free_tax})})})]}),r.jsx(d.Button,{onClick:t,className:ht["add-button"],size:"large",disabled:o===0,variant:"primary",children:n.BUY_BUTTON_LABELS.add_to_cart})]})},ff=e=>e.reduce((t,n)=>{var s;const o=t.find(a=>a.node.id===n.node.id);if(!o)return[...t,n];if((s=o==null?void 0:o.node.isVariantOf)!=null&&s.hasVariant){const a=o.node.isVariantOf.hasVariant,i=n.node.isVariantOf.hasVariant;a&&i&&(o.node.isVariantOf.hasVariant=[...a,...i])}return t},[]),hf=({selectedProduct:e,productId:t,prevState:n,mainSellerId:o})=>{const{products:s,totalPrice:a}=n;try{if(!e){const{[t]:u,...p}=s;return{...n,totalPrice:a-u.price,products:p}}const i=D.getValidOffer(e.offers.offers,o);if(!i)return n;const c=i.seller.identifier,l=i.price;if(s[t]){const{price:u}=s[t];return s[t]={...s[t],price:l,id:e.sku,seller:c},{totalPrice:a+l-u,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),n}},Vc=g.createContext({}),_f=({children:e,item:t,index:n,shelfTitle:o,...s})=>{const[a,i]=g.useState(null),c=g.useRef(null),l=g.useRef({availableSkus:[],priceInfo:{price:0,listPrice:0}}),{sendDataLayerEvent:u,itemListRef:p}=ae(),m=y=>{u({functionKey:"productEvents",data:{commonData:{...t,availableSizes:l.current.availableSkus,...l.current.priceInfo},customData:{index:n+1},event:y}})},f=()=>{m("add_to_wishlist")},h=()=>{u({functionKey:"skuEvents",data:{event:"add_to_cart",commonData:{products:[{...t,...l.current.priceInfo}]},supportData:{selectedSku:a,selectedSkus:[a]},customData:{index:n}}})},_=()=>{o&&(p.current={item_list_name:o}),m("select_item")};return r.jsx(Vc.Provider,{value:g.useMemo(()=>({...s,index:n,item:t,element:c,selectedSku:a,setSelectedSku:i,eventDataRef:l,sendAddToWishlistEvent:f,sendSelectItemEvent:_,sendAddToCartEvent:h}),[s,t,c,a]),children:e})},Ye=()=>{const e=g.useContext(Vc);if(e===void 0)throw new Error("useProductCardContext must be used within a ProductCardProvider");return e},Re={"product-card--actions":"_product-card--actions_bndjh_1","product-card--actions--group":"_product-card--actions--group_bndjh_9","product-card--actions--selectors":"_product-card--actions--selectors_bndjh_21","product-card--body":"_product-card--body_bndjh_33","product-card--header":"_product-card--header_bndjh_47","product-card--footer":"_product-card--footer_bndjh_67","product-card--image":"_product-card--image_bndjh_90","product-card--image--container":"_product-card--image--container_bndjh_97","product-card--outstock":"_product-card--outstock_bndjh_133","product-card--price":"_product-card--price_bndjh_155","product-card--title":"_product-card--title_bndjh_177","product-card--title--tag":"_product-card--title--tag_bndjh_183","product-card--title--content":"_product-card--title--content_bndjh_200","product-card--selectors--size":"_product-card--selectors--size_bndjh_240","product-card--selectors--size--button":"_product-card--selectors--size--button_bndjh_266","product-card--selectors--size--skus":"_product-card--selectors--size--skus_bndjh_275","product-card--selectors--style":"_product-card--selectors--style_bndjh_289","product-card--selectors--style--more":"_product-card--selectors--style--more_bndjh_299","product-card--video":"_product-card--video_bndjh_316","product-card--wrapper":"_product-card--wrapper_bndjh_342"},Wc=({callback:e,children:t,className:n,data:o,isKit:s,...a})=>{const{item:{availability:{status:i},image:c}}=Ye();return i?r.jsxs("div",{...a,className:d.helpers.classNameConcat(Re["product-card--actions"],n),children:[r.jsxs(fe.Wrapper,{type:"actions--group",children:[r.jsx(fe.Price,{}),r.jsx("div",{className:Re["product-card--actions--selectors"],children:!s&&r.jsx(fe.StyleSelector,{data:o,images:c,callback:e})})]}),t]}):null};Wc.displayName="ProductCard.Actions";const Gc=({className:e,isKit:t,...n})=>{const{addToCart:o}=ve(),{isMobile:s=!1,selectedSku:a,outStock:i,item:c,sendAddToCartEvent:l,CONSTANTS:u}=Ye(),p=()=>{var h;if(!a)return;const f=D.getValidOffer(a.offers.offers,u.StoreConfig_MainSellerId);f&&o({id:a==null?void 0:a.sku,quantity:1,seller:f.seller.identifier},{id:c.id,texture:(h=c==null?void 0:c.image.find(_=>u.TEXTURE_IMAGE.includes(_.alternateName)))==null?void 0:h.url}),l()},m=a?u.BUY_BUTTON_LABELS.add_to_cart:u.BUY_BUTTON_LABELS.select_size;return r.jsx(d.Button,{...n,className:d.helpers.classNameConcat(e,"buy-button"),disabled:!t&&!a&&!i,size:s?"medium":"large",variant:i?"secondary":"primary",onClick:i?n.onClick:p,children:i?"Avise-me quando chegar":m})};Gc.displayName="ProductCard.Actions.BuyButton";const gf={"snackbar-modifier":"_snackbar-modifier_1va2l_1"},$t=({size:e,adornment:t,title:n,subtitle:o,supportChildren:s,className:a,Z_INDEX_WAR:i,...c})=>r.jsxs(d.SnackBar.Structure,{...c,size:e,className:d.helpers.classNameConcat(gf["snackbar-modifier"],a),width:360,style:{zIndex:i.snackbar},children:[r.jsx(d.SnackBar.Content,{adornment:t,title:n,subtitle:o}),s&&r.jsx(d.SnackBar.Support,{children:s})]});$t.displayName="SnackBar";const Zt={"wishlist--snack":"_wishlist--snack_3qi1o_9","wishlist--snack--actions":"_wishlist--snack--actions_3qi1o_25","wishlist-grid":"_wishlist-grid_3qi1o_31","wishlist-grid--container":"_wishlist-grid--container_3qi1o_39","pdc-empty-modifier":"_pdc-empty-modifier_3qi1o_49"};var io={exports:{}},Oe={};Oe._=Oe._interop_require_default=yf;function yf(e){return e&&e.__esModule?e:{default:e}}var yn={exports:{}},fr={},Is;function Kc(){return Is||(Is=1,function(e){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,{assign:function(){return a},searchParamsToUrlQuery:function(){return n},urlQueryToSearchParams:function(){return s}});function n(i){const c={};return i.forEach((l,u)=>{typeof c[u]>"u"?c[u]=l:Array.isArray(c[u])?c[u].push(l):c[u]=[c[u],l]}),c}function o(i){return typeof i=="string"||typeof i=="number"&&!isNaN(i)||typeof i=="boolean"?String(i):""}function s(i){const c=new URLSearchParams;return Object.entries(i).forEach(l=>{let[u,p]=l;Array.isArray(p)?p.forEach(m=>c.append(u,o(m))):c.set(u,o(p))}),c}function a(i){for(var c=arguments.length,l=new Array(c>1?c-1:0),u=1;u<c;u++)l[u-1]=arguments[u];return l.forEach(p=>{Array.from(p.keys()).forEach(m=>i.delete(m)),p.forEach((m,f)=>i.append(f,m))}),i}}(fr)),fr}var hr={},xn={},Rs;function un(){if(Rs)return xn;Rs=1;function e(n){if(typeof WeakMap!="function")return null;var o=new WeakMap,s=new WeakMap;return(e=function(a){return a?s:o})(n)}xn._=xn._interop_require_wildcard=t;function t(n,o){if(!o&&n&&n.__esModule)return n;if(n===null||typeof n!="object"&&typeof n!="function")return{default:n};var s=e(o);if(s&&s.has(n))return s.get(n);var a={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var c in n)if(c!=="default"&&Object.prototype.hasOwnProperty.call(n,c)){var l=i?Object.getOwnPropertyDescriptor(n,c):null;l&&(l.get||l.set)?Object.defineProperty(a,c,l):a[c]=n[c]}return a.default=n,s&&s.set(n,a),a}return xn}var Ts;function Xc(){return Ts||(Ts=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(l,u){for(var p in u)Object.defineProperty(l,p,{enumerable:!0,get:u[p]})}t(e,{formatUrl:function(){return a},formatWithValidation:function(){return c},urlObjectKeys:function(){return i}});const o=un()._(Kc()),s=/https?|ftp|gopher|file/;function a(l){let{auth:u,hostname:p}=l,m=l.protocol||"",f=l.pathname||"",h=l.hash||"",_=l.query||"",y=!1;u=u?encodeURIComponent(u).replace(/%3A/i,":")+"@":"",l.host?y=u+l.host:p&&(y=u+(~p.indexOf(":")?"["+p+"]":p),l.port&&(y+=":"+l.port)),_&&typeof _=="object"&&(_=String(o.urlQueryToSearchParams(_)));let x=l.search||_&&"?"+_||"";return m&&!m.endsWith(":")&&(m+=":"),l.slashes||(!m||s.test(m))&&y!==!1?(y="//"+(y||""),f&&f[0]!=="/"&&(f="/"+f)):y||(y=""),h&&h[0]!=="#"&&(h="#"+h),x&&x[0]!=="?"&&(x="?"+x),f=f.replace(/[?#]/g,encodeURIComponent),x=x.replace("#","%23"),""+m+y+f+x+h}const i=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function c(l){return process.env.NODE_ENV==="development"&&l!==null&&typeof l=="object"&&Object.keys(l).forEach(u=>{i.includes(u)||console.warn("Unknown key passed via urlObject into url.format: "+u)}),a(l)}}(hr)),hr}var _r={},As;function xf(){return As||(As=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"omit",{enumerable:!0,get:function(){return t}});function t(n,o){const s={};return Object.keys(n).forEach(a=>{o.includes(a)||(s[a]=n[a])}),s}}(_r)),_r}var gr={},ks;function tr(){return ks||(ks=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(b,w){for(var P in w)Object.defineProperty(b,P,{enumerable:!0,get:w[P]})}t(e,{DecodeError:function(){return _},MiddlewareNotFoundError:function(){return C},MissingStaticPage:function(){return v},NormalizeError:function(){return y},PageNotFoundError:function(){return x},SP:function(){return f},ST:function(){return h},WEB_VITALS:function(){return n},execOnce:function(){return o},getDisplayName:function(){return l},getLocationOrigin:function(){return i},getURL:function(){return c},isAbsoluteUrl:function(){return a},isResSent:function(){return u},loadGetInitialProps:function(){return m},normalizeRepeatedSlashes:function(){return p},stringifyError:function(){return j}});const n=["CLS","FCP","FID","INP","LCP","TTFB"];function o(b){let w=!1,P;return function(){for(var S=arguments.length,N=new Array(S),R=0;R<S;R++)N[R]=arguments[R];return w||(w=!0,P=b(...N)),P}}const s=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,a=b=>s.test(b);function i(){const{protocol:b,hostname:w,port:P}=window.location;return b+"//"+w+(P?":"+P:"")}function c(){const{href:b}=window.location,w=i();return b.substring(w.length)}function l(b){return typeof b=="string"?b:b.displayName||b.name||"Unknown"}function u(b){return b.finished||b.headersSent}function p(b){const w=b.split("?");return w[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(w[1]?"?"+w.slice(1).join("?"):"")}async function m(b,w){if(process.env.NODE_ENV!=="production"){var P;if((P=b.prototype)!=null&&P.getInitialProps){const R='"'+l(b)+'.getInitialProps()" is defined as an instance method - visit https://nextjs.org/docs/messages/get-initial-props-as-an-instance-method for more information.';throw new Error(R)}}const S=w.res||w.ctx&&w.ctx.res;if(!b.getInitialProps)return w.ctx&&w.Component?{pageProps:await m(w.Component,w.ctx)}:{};const N=await b.getInitialProps(w);if(S&&u(S))return N;if(!N){const R='"'+l(b)+'.getInitialProps()" should resolve to an object. But found "'+N+'" instead.';throw new Error(R)}return process.env.NODE_ENV!=="production"&&Object.keys(N).length===0&&!w.ctx&&console.warn(""+l(b)+" returned an empty object from `getInitialProps`. This de-optimizes and prevents automatic static optimization. https://nextjs.org/docs/messages/empty-object-getInitialProps"),N}const f=typeof performance<"u",h=f&&["mark","measure","getEntriesByName"].every(b=>typeof performance[b]=="function");class _ extends Error{}class y extends Error{}class x extends Error{constructor(w){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message="Cannot find module for page: "+w}}class v extends Error{constructor(w,P){super(),this.message="Failed to load static file for page: "+w+" "+P}}class C extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function j(b){return JSON.stringify({message:b.message,stack:b.stack})}}(gr)),gr}var vn={exports:{}},Os;function nr(){return Os||(Os=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizePathTrailingSlash",{enumerable:!0,get:function(){return s}});const n=D.removeTrailingSlash,o=D.parsePath,s=a=>{if(!a.startsWith("/")||process.env.__NEXT_MANUAL_TRAILING_SLASH)return a;const{pathname:i,query:c,hash:l}=(0,o.parsePath)(a);return process.env.__NEXT_TRAILING_SLASH?/\.[^/]+\/?$/.test(i)?""+(0,n.removeTrailingSlash)(i)+c+l:i.endsWith("/")?""+i+c+l:i+"/"+c+l:""+(0,n.removeTrailingSlash)(i)+c+l};(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)}(vn,vn.exports)),vn.exports}var yr={},bn={exports:{}},Ls;function vf(){return Ls||(Ls=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"hasBasePath",{enumerable:!0,get:function(){return s}});const n=D.pathHasPrefix,o=process.env.__NEXT_ROUTER_BASEPATH||"";function s(a){return(0,n.pathHasPrefix)(a,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)}(bn,bn.exports)),bn.exports}var Ms;function Yc(){return Ms||(Ms=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"isLocalURL",{enumerable:!0,get:function(){return o}});const t=tr(),n=vf();function o(s){if(!(0,t.isAbsoluteUrl)(s))return!0;try{const a=(0,t.getLocationOrigin)(),i=new URL(s,a);return i.origin===a&&(0,n.hasBasePath)(i.pathname)}catch{return!1}}}(yr)),yr}var xr={},vr={},Ds;function bf(){return Ds||(Ds=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getSortedRoutes",{enumerable:!0,get:function(){return n}});class t{insert(s){this._insert(s.split("/").filter(Boolean),[],!1)}smoosh(){return this._smoosh()}_smoosh(s){s===void 0&&(s="/");const a=[...this.children.keys()].sort();this.slugName!==null&&a.splice(a.indexOf("[]"),1),this.restSlugName!==null&&a.splice(a.indexOf("[...]"),1),this.optionalRestSlugName!==null&&a.splice(a.indexOf("[[...]]"),1);const i=a.map(c=>this.children.get(c)._smoosh(""+s+c+"/")).reduce((c,l)=>[...c,...l],[]);if(this.slugName!==null&&i.push(...this.children.get("[]")._smoosh(s+"["+this.slugName+"]/")),!this.placeholder){const c=s==="/"?"/":s.slice(0,-1);if(this.optionalRestSlugName!=null)throw new Error('You cannot define a route with the same specificity as a optional catch-all route ("'+c+'" and "'+c+"[[..."+this.optionalRestSlugName+']]").');i.unshift(c)}return this.restSlugName!==null&&i.push(...this.children.get("[...]")._smoosh(s+"[..."+this.restSlugName+"]/")),this.optionalRestSlugName!==null&&i.push(...this.children.get("[[...]]")._smoosh(s+"[[..."+this.optionalRestSlugName+"]]/")),i}_insert(s,a,i){if(s.length===0){this.placeholder=!1;return}if(i)throw new Error("Catch-all must be the last part of the URL.");let c=s[0];if(c.startsWith("[")&&c.endsWith("]")){let p=function(m,f){if(m!==null&&m!==f)throw new Error("You cannot use different slug names for the same dynamic path ('"+m+"' !== '"+f+"').");a.forEach(h=>{if(h===f)throw new Error('You cannot have the same slug name "'+f+'" repeat within a single dynamic path');if(h.replace(/\W/g,"")===c.replace(/\W/g,""))throw new Error('You cannot have the slug names "'+h+'" and "'+f+'" differ only by non-word symbols within a single dynamic path')}),a.push(f)},l=c.slice(1,-1),u=!1;if(l.startsWith("[")&&l.endsWith("]")&&(l=l.slice(1,-1),u=!0),l.startsWith("...")&&(l=l.substring(3),i=!0),l.startsWith("[")||l.endsWith("]"))throw new Error("Segment names may not start or end with extra brackets ('"+l+"').");if(l.startsWith("."))throw new Error("Segment names may not start with erroneous periods ('"+l+"').");if(i)if(u){if(this.restSlugName!=null)throw new Error('You cannot use both an required and optional catch-all route at the same level ("[...'+this.restSlugName+']" and "'+s[0]+'" ).');p(this.optionalRestSlugName,l),this.optionalRestSlugName=l,c="[[...]]"}else{if(this.optionalRestSlugName!=null)throw new Error('You cannot use both an optional and required catch-all route at the same level ("[[...'+this.optionalRestSlugName+']]" and "'+s[0]+'").');p(this.restSlugName,l),this.restSlugName=l,c="[...]"}else{if(u)throw new Error('Optional route parameters are not yet supported ("'+s[0]+'").');p(this.slugName,l),this.slugName=l,c="[]"}}this.children.has(c)||this.children.set(c,new t),this.children.get(c)._insert(s.slice(1),a,i)}constructor(){this.placeholder=!0,this.children=new Map,this.slugName=null,this.restSlugName=null,this.optionalRestSlugName=null}}function n(o){const s=new t;return o.forEach(a=>s.insert(a)),s.smoosh()}}(vr)),vr}var br={},jr={},Cr={},Sr={},$s;function jf(){return $s||($s=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"ensureLeadingSlash",{enumerable:!0,get:function(){return t}});function t(n){return n.startsWith("/")?n:"/"+n}}(Sr)),Sr}var rs={};(function(e){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,{DEFAULT_SEGMENT_KEY:function(){return s},PAGE_SEGMENT_KEY:function(){return o},isGroupSegment:function(){return n}});function n(a){return a[0]==="("&&a.endsWith(")")}const o="__PAGE__",s="__DEFAULT__"})(rs);var zs;function Cf(){return zs||(zs=1,function(e){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,{normalizeAppPath:function(){return s},normalizeRscURL:function(){return a}});const n=jf(),o=rs;function s(i){return(0,n.ensureLeadingSlash)(i.split("/").reduce((c,l,u,p)=>!l||(0,o.isGroupSegment)(l)||l[0]==="@"||(l==="page"||l==="route")&&u===p.length-1?c:c+"/"+l,""))}function a(i){return i.replace(/\.rsc($|\?)/,"$1")}}(Cr)),Cr}var Fs;function Qc(){return Fs||(Fs=1,function(e){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,{INTERCEPTION_ROUTE_MARKERS:function(){return o},extractInterceptionRouteInformation:function(){return a},isInterceptionRouteAppPath:function(){return s}});const n=Cf(),o=["(..)(..)","(.)","(..)","(...)"];function s(i){return i.split("/").find(c=>o.find(l=>c.startsWith(l)))!==void 0}function a(i){let c,l,u;for(const p of i.split("/"))if(l=o.find(m=>p.startsWith(m)),l){[c,u]=i.split(l,2);break}if(!c||!l||!u)throw new Error(`Invalid interception route: ${i}. Must be in the format /<intercepting route>/(..|...|..)(..)/<intercepted route>`);switch(c=(0,n.normalizeAppPath)(c),l){case"(.)":c==="/"?u=`/${u}`:u=c+"/"+u;break;case"(..)":if(c==="/")throw new Error(`Invalid interception route: ${i}. Cannot use (..) marker at the root level, use (.) instead.`);u=c.split("/").slice(0,-1).concat(u).join("/");break;case"(...)":u="/"+u;break;case"(..)(..)":const p=c.split("/");if(p.length<=2)throw new Error(`Invalid interception route: ${i}. Cannot use (..)(..) marker at the root level or one level up.`);u=p.slice(0,-2).concat(u).join("/");break;default:throw new Error("Invariant: unexpected marker")}return{interceptingRoute:c,interceptedRoute:u}}}(jr)),jr}var Bs;function Sf(){return Bs||(Bs=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"isDynamicRoute",{enumerable:!0,get:function(){return o}});const t=Qc(),n=/\/\[[^/]+?\](?=\/|$)/;function o(s){return(0,t.isInterceptionRouteAppPath)(s)&&(s=(0,t.extractInterceptionRouteInformation)(s).interceptedRoute),n.test(s)}}(br)),br}var Us;function wf(){return Us||(Us=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(s,a){for(var i in a)Object.defineProperty(s,i,{enumerable:!0,get:a[i]})}t(e,{getSortedRoutes:function(){return n.getSortedRoutes},isDynamicRoute:function(){return o.isDynamicRoute}});const n=bf(),o=Sf()}(xr)),xr}var wr={},Pr={},qs;function Pf(){return qs||(qs=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getRouteMatcher",{enumerable:!0,get:function(){return n}});const t=tr();function n(o){let{re:s,groups:a}=o;return i=>{const c=s.exec(i);if(!c)return!1;const l=p=>{try{return decodeURIComponent(p)}catch{throw new t.DecodeError("failed to decode param")}},u={};return Object.keys(a).forEach(p=>{const m=a[p],f=c[m.pos];f!==void 0&&(u[p]=~f.indexOf("/")?f.split("/").map(h=>l(h)):m.repeat?[l(f)]:l(f))}),u}}}(Pr)),Pr}var Nr={},Er={},Hs;function Nf(){return Hs||(Hs=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"escapeStringRegexp",{enumerable:!0,get:function(){return o}});const t=/[|\\{}()[\]^$+*?.-]/,n=/[|\\{}()[\]^$+*?.-]/g;function o(s){return t.test(s)?s.replace(n,"\\$&"):s}}(Er)),Er}var Vs;function Ef(){return Vs||(Vs=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(_,y){for(var x in y)Object.defineProperty(_,x,{enumerable:!0,get:y[x]})}t(e,{getNamedMiddlewareRegex:function(){return h},getNamedRouteRegex:function(){return f},getRouteRegex:function(){return l},parseParameter:function(){return i}});const n=D.constants,o=Qc(),s=Nf(),a=D.removeTrailingSlash;function i(_){const y=_.startsWith("[")&&_.endsWith("]");y&&(_=_.slice(1,-1));const x=_.startsWith("...");return x&&(_=_.slice(3)),{key:_,repeat:x,optional:y}}function c(_){const y=(0,a.removeTrailingSlash)(_).slice(1).split("/"),x={};let v=1;return{parameterizedRoute:y.map(C=>{const j=o.INTERCEPTION_ROUTE_MARKERS.find(w=>C.startsWith(w)),b=C.match(/\[((?:\[.*\])|.+)\]/);if(j&&b){const{key:w,optional:P,repeat:S}=i(b[1]);return x[w]={pos:v++,repeat:S,optional:P},"/"+(0,s.escapeStringRegexp)(j)+"([^/]+?)"}else if(b){const{key:w,repeat:P,optional:S}=i(b[1]);return x[w]={pos:v++,repeat:P,optional:S},P?S?"(?:/(.+?))?":"/(.+?)":"/([^/]+?)"}else return"/"+(0,s.escapeStringRegexp)(C)}).join(""),groups:x}}function l(_){const{parameterizedRoute:y,groups:x}=c(_);return{re:new RegExp("^"+y+"(?:/)?$"),groups:x}}function u(){let _=0;return()=>{let y="",x=++_;for(;x>0;)y+=String.fromCharCode(97+(x-1)%26),x=Math.floor((x-1)/26);return y}}function p(_){let{interceptionMarker:y,getSafeRouteKey:x,segment:v,routeKeys:C,keyPrefix:j}=_;const{key:b,optional:w,repeat:P}=i(v);let S=b.replace(/\W/g,"");j&&(S=""+j+S);let N=!1;(S.length===0||S.length>30)&&(N=!0),isNaN(parseInt(S.slice(0,1)))||(N=!0),N&&(S=x()),j?C[S]=""+j+b:C[S]=b;const R=y?(0,s.escapeStringRegexp)(y):"";return P?w?"(?:/"+R+"(?<"+S+">.+?))?":"/"+R+"(?<"+S+">.+?)":"/"+R+"(?<"+S+">[^/]+?)"}function m(_,y){const x=(0,a.removeTrailingSlash)(_).slice(1).split("/"),v=u(),C={};return{namedParameterizedRoute:x.map(j=>{const b=o.INTERCEPTION_ROUTE_MARKERS.some(P=>j.startsWith(P)),w=j.match(/\[((?:\[.*\])|.+)\]/);if(b&&w){const[P]=j.split(w[0]);return p({getSafeRouteKey:v,interceptionMarker:P,segment:w[1],routeKeys:C,keyPrefix:y?n.NEXT_INTERCEPTION_MARKER_PREFIX:void 0})}else return w?p({getSafeRouteKey:v,segment:w[1],routeKeys:C,keyPrefix:y?n.NEXT_QUERY_PARAM_PREFIX:void 0}):"/"+(0,s.escapeStringRegexp)(j)}).join(""),routeKeys:C}}function f(_,y){const x=m(_,y);return{...l(_),namedRegex:"^"+x.namedParameterizedRoute+"(?:/)?$",routeKeys:x.routeKeys}}function h(_,y){const{parameterizedRoute:x}=c(_),{catchAll:v=!0}=y;if(x==="/")return{namedRegex:"^/"+(v?".*":"")+"$"};const{namedParameterizedRoute:C}=m(_,!1);let j=v?"(?:(/.*)?)":"";return{namedRegex:"^"+C+j+"$"}}}(Nr)),Nr}var Ws;function If(){return Ws||(Ws=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"interpolateAs",{enumerable:!0,get:function(){return o}});const t=Pf(),n=Ef();function o(s,a,i){let c="";const l=(0,n.getRouteRegex)(s),u=l.groups,p=(a!==s?(0,t.getRouteMatcher)(l)(a):"")||i;c=s;const m=Object.keys(u);return m.every(f=>{let h=p[f]||"";const{repeat:_,optional:y}=u[f];let x="["+(_?"...":"")+f+"]";return y&&(x=(h?"":"/")+"["+x+"]"),_&&!Array.isArray(h)&&(h=[h]),(y||f in p)&&(c=c.replace(x,_?h.map(v=>encodeURIComponent(v)).join("/"):encodeURIComponent(h))||"/")})||(c=""),{params:m,result:c}}}(wr)),wr}var Gs;function Rf(){return Gs||(Gs=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"resolveHref",{enumerable:!0,get:function(){return p}});const n=Kc(),o=Xc(),s=xf(),a=tr(),i=nr(),c=Yc(),l=wf(),u=If();function p(m,f,h){let _,y=typeof f=="string"?f:(0,o.formatWithValidation)(f);const x=y.match(/^[a-zA-Z]{1,}:\/\//),v=x?y.slice(x[0].length):y;if((v.split("?",1)[0]||"").match(/(\/\/|\\)/)){console.error("Invalid href '"+y+"' passed to next/router in page: '"+m.pathname+"'. Repeated forward-slashes (//) or backslashes \\ are not valid in the href.");const j=(0,a.normalizeRepeatedSlashes)(v);y=(x?x[0]:"")+j}if(!(0,c.isLocalURL)(y))return h?[y]:y;try{_=new URL(y.startsWith("#")?m.asPath:m.pathname,"http://n")}catch{_=new URL("/","http://n")}try{const j=new URL(y,_);j.pathname=(0,i.normalizePathTrailingSlash)(j.pathname);let b="";if((0,l.isDynamicRoute)(j.pathname)&&j.searchParams&&h){const P=(0,n.searchParamsToUrlQuery)(j.searchParams),{result:S,params:N}=(0,u.interpolateAs)(j.pathname,j.pathname,P);S&&(b=(0,o.formatWithValidation)({pathname:S,hash:j.hash,query:(0,s.omit)(P,N)}))}const w=j.origin===_.origin?j.href.slice(j.origin.length):j.href;return h?[w,b||w]:w}catch{return h?[y]:y}}(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)}(yn,yn.exports)),yn.exports}var jn={exports:{}},Ks;function Tf(){return Ks||(Ks=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addLocale",{enumerable:!0,get:function(){return o}});const n=nr(),o=function(s){for(var a=arguments.length,i=new Array(a>1?a-1:0),c=1;c<a;c++)i[c-1]=arguments[c];return process.env.__NEXT_I18N_SUPPORT?(0,n.normalizePathTrailingSlash)(D.addLocale.addLocale(s,...i)):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)}(jn,jn.exports)),jn.exports}var Ir={},Xs;function Zc(){return Xs||(Xs=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"RouterContext",{enumerable:!0,get:function(){return o}});const o=Oe._(g).default.createContext(null);process.env.NODE_ENV!=="production"&&(o.displayName="RouterContext")}(Ir)),Ir}var Rr={},Ys;function Jc(){return Ys||(Ys=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0});function t(u,p){for(var m in p)Object.defineProperty(u,m,{enumerable:!0,get:p[m]})}t(e,{AppRouterContext:function(){return s},GlobalLayoutRouterContext:function(){return i},LayoutRouterContext:function(){return a},MissingSlotContext:function(){return l},TemplateContext:function(){return c}});const o=Oe._(g),s=o.default.createContext(null),a=o.default.createContext(null),i=o.default.createContext(null),c=o.default.createContext(null);process.env.NODE_ENV!=="production"&&(s.displayName="AppRouterContext",a.displayName="LayoutRouterContext",i.displayName="GlobalLayoutRouterContext",c.displayName="TemplateContext");const l=o.default.createContext(new Set)}(Rr)),Rr}var Cn={exports:{}},Sn={exports:{}},Qs;function el(){return Qs||(Qs=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function n(a,i){for(var c in i)Object.defineProperty(a,c,{enumerable:!0,get:i[c]})}n(t,{cancelIdleCallback:function(){return s},requestIdleCallback:function(){return o}});const o=typeof self<"u"&&self.requestIdleCallback&&self.requestIdleCallback.bind(window)||function(a){let i=Date.now();return self.setTimeout(function(){a({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-i))}})},1)},s=typeof self<"u"&&self.cancelIdleCallback&&self.cancelIdleCallback.bind(window)||function(a){return clearTimeout(a)};(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)}(Sn,Sn.exports)),Sn.exports}var Zs;function Af(){return Zs||(Zs=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useIntersection",{enumerable:!0,get:function(){return u}});const n=g,o=el(),s=typeof IntersectionObserver=="function",a=new Map,i=[];function c(p){const m={root:p.root||null,margin:p.rootMargin||""},f=i.find(x=>x.root===m.root&&x.margin===m.margin);let h;if(f&&(h=a.get(f),h))return h;const _=new Map,y=new IntersectionObserver(x=>{x.forEach(v=>{const C=_.get(v.target),j=v.isIntersecting||v.intersectionRatio>0;C&&j&&C(j)})},p);return h={id:m,observer:y,elements:_},i.push(m),a.set(m,h),h}function l(p,m,f){const{id:h,observer:_,elements:y}=c(f);return y.set(p,m),_.observe(p),function(){if(y.delete(p),_.unobserve(p),y.size===0){_.disconnect(),a.delete(h);const v=i.findIndex(C=>C.root===h.root&&C.margin===h.margin);v>-1&&i.splice(v,1)}}}function u(p){let{rootRef:m,rootMargin:f,disabled:h}=p;const _=h||!s,[y,x]=(0,n.useState)(!1),v=(0,n.useRef)(null),C=(0,n.useCallback)(b=>{v.current=b},[]);(0,n.useEffect)(()=>{if(s){if(_||y)return;const b=v.current;if(b&&b.tagName)return l(b,P=>P&&x(P),{root:m==null?void 0:m.current,rootMargin:f})}else if(!y){const b=(0,o.requestIdleCallback)(()=>x(!0));return()=>(0,o.cancelIdleCallback)(b)}},[_,f,m,y,v.current]);const j=(0,n.useCallback)(()=>{x(!1)},[]);return[C,y,j]}(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)}(Cn,Cn.exports)),Cn.exports}var wn={exports:{}},Pn={exports:{}},Js;function kf(){return Js||(Js=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizeLocalePath",{enumerable:!0,get:function(){return n}});const n=(o,s)=>process.env.__NEXT_I18N_SUPPORT?D.normalizeLocalePath.normalizeLocalePath(o,s):{pathname:o,detectedLocale:void 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)}(Pn,Pn.exports)),Pn.exports}var Nn={exports:{}},ea;function Of(){return ea||(ea=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"detectDomainLocale",{enumerable:!0,get:function(){return n}});const n=function(){for(var o=arguments.length,s=new Array(o),a=0;a<o;a++)s[a]=arguments[a];if(process.env.__NEXT_I18N_SUPPORT)return D.detectDomainLocale.detectDomainLocale(...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)}(Nn,Nn.exports)),Nn.exports}var ta;function Lf(){return ta||(ta=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getDomainLocale",{enumerable:!0,get:function(){return s}});const n=nr(),o=process.env.__NEXT_ROUTER_BASEPATH||"";function s(a,i,c,l){if(process.env.__NEXT_I18N_SUPPORT){const u=kf().normalizeLocalePath,p=Of().detectDomainLocale,m=i||u(a,c).detectedLocale,f=p(l,void 0,m);if(f){const h="http"+(f.http?"":"s")+"://",_=m===f.defaultLocale?"":"/"+m;return""+h+f.domain+(0,n.normalizePathTrailingSlash)(""+o+_+a)}return!1}else return!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)}(wn,wn.exports)),wn.exports}var En={exports:{}},na;function Mf(){return na||(na=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addBasePath",{enumerable:!0,get:function(){return a}});const n=D.addPathPrefix,o=nr(),s=process.env.__NEXT_ROUTER_BASEPATH||"";function a(i,c){return(0,o.normalizePathTrailingSlash)(process.env.__NEXT_MANUAL_CLIENT_BASE_PATH&&!c?i:(0,n.addPathPrefix)(i,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)}(En,En.exports)),En.exports}var In={exports:{}},ra;function Df(){return ra||(ra=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function n(h,_){for(var y in _)Object.defineProperty(h,y,{enumerable:!0,get:_[y]})}n(t,{ACTION_FAST_REFRESH:function(){return l},ACTION_NAVIGATE:function(){return s},ACTION_PREFETCH:function(){return c},ACTION_REFRESH:function(){return o},ACTION_RESTORE:function(){return a},ACTION_SERVER_ACTION:function(){return u},ACTION_SERVER_PATCH:function(){return i},PrefetchCacheEntryStatus:function(){return m},PrefetchKind:function(){return p},isThenable:function(){return f}});const o="refresh",s="navigate",a="restore",i="server-patch",c="prefetch",l="fast-refresh",u="server-action";var p;(function(h){h.AUTO="auto",h.FULL="full",h.TEMPORARY="temporary"})(p||(p={}));var m;(function(h){h.fresh="fresh",h.reusable="reusable",h.expired="expired",h.stale="stale"})(m||(m={}));function f(h){return h&&(typeof h=="object"||typeof h=="function")&&typeof h.then=="function"}(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)}(In,In.exports)),In.exports}(function(e,t){"use client";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return P}});const n=Oe,o=r,s=n._(g),a=Rf(),i=Yc(),c=Xc(),l=tr(),u=Tf(),p=Zc(),m=Jc(),f=Af(),h=Lf(),_=Mf(),y=Df(),x=new Set;function v(S,N,R,A,L,O){if(typeof window>"u"||!O&&!(0,i.isLocalURL)(N))return;if(!A.bypassPrefetchedCheck){const M=typeof A.locale<"u"?A.locale:"locale"in S?S.locale:void 0,U=N+"%"+R+"%"+M;if(x.has(U))return;x.add(U)}(async()=>O?S.prefetch(N,L):S.prefetch(N,R,A))().catch(M=>{if(process.env.NODE_ENV!=="production")throw M})}function C(S){const R=S.currentTarget.getAttribute("target");return R&&R!=="_self"||S.metaKey||S.ctrlKey||S.shiftKey||S.altKey||S.nativeEvent&&S.nativeEvent.which===2}function j(S,N,R,A,L,O,G,M,U){const{nodeName:Y}=S.currentTarget;if(Y.toUpperCase()==="A"&&(C(S)||!U&&!(0,i.isLocalURL)(R)))return;S.preventDefault();const W=()=>{const z=G??!0;"beforePopState"in N?N[L?"replace":"push"](R,A,{shallow:O,locale:M,scroll:z}):N[L?"replace":"push"](A||R,{scroll:z})};U?s.default.startTransition(W):W()}function b(S){return typeof S=="string"?S:(0,c.formatUrl)(S)}const P=s.default.forwardRef(function(N,R){let A;const{href:L,as:O,children:G,prefetch:M=null,passHref:U,replace:Y,shallow:X,scroll:W,locale:z,onClick:J,onMouseEnter:oe,onTouchStart:le,legacyBehavior:se=!1,...ue}=N;A=G,se&&(typeof A=="string"||typeof A=="number")&&(A=(0,o.jsx)("a",{children:A}));const $=s.default.useContext(p.RouterContext),ee=s.default.useContext(m.AppRouterContext),E=$??ee,V=!$,ie=M!==!1,_e=M===null?y.PrefetchKind.AUTO:y.PrefetchKind.FULL;if(process.env.NODE_ENV!=="production"){let F=function(B){return new Error("Failed prop type: The prop `"+B.key+"` expects a "+B.expected+" in `<Link>`, but got `"+B.actual+"` instead."+(typeof window<"u"?`
|
|
2
|
+
Open your browser's console to view the Component stack trace.`:""))};Object.keys({href:!0}).forEach(B=>{if(B==="href"&&(N[B]==null||typeof N[B]!="string"&&typeof N[B]!="object"))throw F({key:B,expected:"`string` or `object`",actual:N[B]===null?"null":typeof N[B]})}),Object.keys({as:!0,replace:!0,scroll:!0,shallow:!0,passHref:!0,prefetch:!0,locale:!0,onClick:!0,onMouseEnter:!0,onTouchStart:!0,legacyBehavior:!0}).forEach(B=>{const te=typeof N[B];if(B==="as"){if(N[B]&&te!=="string"&&te!=="object")throw F({key:B,expected:"`string` or `object`",actual:te})}else if(B==="locale"){if(N[B]&&te!=="string")throw F({key:B,expected:"`string`",actual:te})}else if(B==="onClick"||B==="onMouseEnter"||B==="onTouchStart"){if(N[B]&&te!=="function")throw F({key:B,expected:"`function`",actual:te})}else if((B==="replace"||B==="scroll"||B==="shallow"||B==="passHref"||B==="prefetch"||B==="legacyBehavior")&&N[B]!=null&&te!=="boolean")throw F({key:B,expected:"`boolean`",actual:te})});const k=s.default.useRef(!1);N.prefetch&&!k.current&&!V&&(k.current=!0,console.warn("Next.js auto-prefetches automatically based on viewport. The prefetch attribute is no longer needed. More: https://nextjs.org/docs/messages/prefetch-true-deprecated"))}if(process.env.NODE_ENV!=="production"&&V&&!O){let F;if(typeof L=="string"?F=L:typeof L=="object"&&typeof L.pathname=="string"&&(F=L.pathname),F&&F.split("/").some(ye=>ye.startsWith("[")&&ye.endsWith("]")))throw new Error("Dynamic href `"+F+"` found in <Link> while using the `/app` router, this is not supported. Read more: https://nextjs.org/docs/messages/app-dir-dynamic-href")}const{href:I,as:T}=s.default.useMemo(()=>{if(!$){const ye=b(L);return{href:ye,as:O?b(O):ye}}const[F,pe]=(0,a.resolveHref)($,L,!0);return{href:F,as:O?(0,a.resolveHref)($,O):pe||F}},[$,L,O]),Te=s.default.useRef(I),H=s.default.useRef(T);let Q;if(se)if(process.env.NODE_ENV==="development"){J&&console.warn('"onClick" was passed to <Link> with `href` of `'+L+'` but "legacyBehavior" was set. The legacy behavior requires onClick be set on the child of next/link'),oe&&console.warn('"onMouseEnter" was passed to <Link> with `href` of `'+L+'` but "legacyBehavior" was set. The legacy behavior requires onMouseEnter be set on the child of next/link');try{Q=s.default.Children.only(A)}catch{throw A?new Error("Multiple children were passed to <Link> with `href` of `"+L+"` but only one child is supported https://nextjs.org/docs/messages/link-multiple-children"+(typeof window<"u"?`
|
|
3
|
+
Open your browser's console to view the Component stack trace.`:"")):new Error("No children were passed to <Link> with `href` of `"+L+"` but one child is required https://nextjs.org/docs/messages/link-no-children")}}else Q=s.default.Children.only(A);else if(process.env.NODE_ENV==="development"&&(A==null?void 0:A.type)==="a")throw new Error(`Invalid <Link> with <a> child. Please remove <a> or use <Link legacyBehavior>.
|
|
4
|
+
Learn more: https://nextjs.org/docs/messages/invalid-new-link-with-extra-anchor`);const be=se?Q&&typeof Q=="object"&&Q.ref:R,[Ie,je,ge]=(0,f.useIntersection)({rootMargin:"200px"}),Ae=s.default.useCallback(F=>{(H.current!==T||Te.current!==I)&&(ge(),H.current=T,Te.current=I),Ie(F),be&&(typeof be=="function"?be(F):typeof be=="object"&&(be.current=F))},[T,be,I,ge,Ie]);s.default.useEffect(()=>{process.env.NODE_ENV==="production"&&E&&(!je||!ie||v(E,I,T,{locale:z},{kind:_e},V))},[T,I,je,z,ie,$==null?void 0:$.locale,E,V,_e]);const Ce={ref:Ae,onClick(F){if(process.env.NODE_ENV!=="production"&&!F)throw new Error('Component rendered inside next/link has to pass click event to "onClick" prop.');!se&&typeof J=="function"&&J(F),se&&Q.props&&typeof Q.props.onClick=="function"&&Q.props.onClick(F),E&&(F.defaultPrevented||j(F,E,I,T,Y,X,W,z,V))},onMouseEnter(F){!se&&typeof oe=="function"&&oe(F),se&&Q.props&&typeof Q.props.onMouseEnter=="function"&&Q.props.onMouseEnter(F),E&&((!ie||process.env.NODE_ENV==="development")&&V||v(E,I,T,{locale:z,priority:!0,bypassPrefetchedCheck:!0},{kind:_e},V))},onTouchStart:process.env.__NEXT_LINK_NO_TOUCH_START?void 0:function(pe){!se&&typeof le=="function"&&le(pe),se&&Q.props&&typeof Q.props.onTouchStart=="function"&&Q.props.onTouchStart(pe),E&&(!ie&&V||v(E,I,T,{locale:z,priority:!0,bypassPrefetchedCheck:!0},{kind:_e},V))}};if((0,l.isAbsoluteUrl)(T))Ce.href=T;else if(!se||U||Q.type==="a"&&!("href"in Q.props)){const F=typeof z<"u"?z:$==null?void 0:$.locale,pe=($==null?void 0:$.isLocaleDomain)&&(0,h.getDomainLocale)(T,F,$==null?void 0:$.locales,$==null?void 0:$.domainLocales);Ce.href=pe||(0,_.addBasePath)((0,u.addLocale)(T,F,$==null?void 0:$.defaultLocale))}return se?s.default.cloneElement(Q,Ce):(0,o.jsx)("a",{...ue,...Ce,children:A})});(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)})(io,io.exports);var $f=io.exports,zf=$f;const ze=D.getDefaultExportFromCjs(zf),Ff="_link_w24h0_1",Bf="_wrapper_w24h0_98",Uf="_text_w24h0_106",Tr={link:Ff,wrapper:Bf,text:Uf},Le=({children:e,adornments:t,className:n,disableUnderline:o,href:s,mode:a,size:i,title:c,onClick:l,disablePadding:u,...p})=>{const m=d.helpers.ValidateProp({fieldTypes:Dt.SizesSmallExtended,property:i,fallback:"medium"}),f=d.helpers.ValidateProp({fieldTypes:Dt.Mode,property:a,fallback:"default"});return r.jsx(ze,{...p,className:d.helpers.classNameConcat(Tr.link,n),href:s&&s.length>0?s:"#","data-size":m,"data-variant":f,title:c||"NextLink","data-disable-underline":o??!1,"data-disable-padding":u??!0,children:r.jsxs("div",{className:Tr.wrapper,onClick:l,children:[t==null?void 0:t.start,r.jsx("p",{className:Tr.text,"data-size":m,children:e}),t==null?void 0:t.end]})})},qf=({ICONS:e})=>{const{resetFeedback:t}=Tt();return r.jsxs("div",{className:Zt["wishlist--snack--actions"],children:[r.jsx(Le,{href:"/favoritos",children:"Ver Favoritos"}),r.jsx(d.Button,{variant:"tertiary",size:"small",onClick:t,adornment:{start:r.jsx(d.Icon,{name:e.close})}})]})},os=({WISHLIST_INFO:e,ICONS:t,Z_INDEX_WAR:n})=>{const o=qo(),{resetFeedback:s}=Tt(),a=g.useRef(null);return g.useEffect(()=>{a.current&&clearTimeout(a.current),o&&(a.current=setTimeout(()=>{s()},5e3))},[o,s]),(o==null?void 0:o.active)&&r.jsx($t,{Z_INDEX_WAR:n,className:Zt["wishlist--snack"],"data-action":o.action,title:o.action==="add"?e.messages.add:e.messages.remove,supportChildren:r.jsx(qf,{ICONS:t}),size:"medium"})};os.displayName="WishList.Feedback";const ss={"product-list--banner":"_product-list--banner_sfibj_1","product-list--card":"_product-list--card_sfibj_30","product-list":"_product-list_sfibj_1"},tl=({className:e,children:t,columns:n=1,isMobile:o=!1,gap:s=8,position_grid:a,totalColumns:i=4,PRODUCT_CARD_IMAGE_ASPECT_RATIO:c,...l})=>{const u=g.useMemo(()=>n%i===0?"initial":o||n<2?c:c.split("/").reverse().join("/"),[n,i,o]);return r.jsx("div",{...l,className:d.helpers.classNameConcat(ss["product-list--banner"],e),style:{aspectRatio:u,maxWidth:`${n/i*100}%`,order:a,padding:s/2},children:t})};tl.displayName="ProductList.Banner";class Hf{constructor(){vt(this,"cache",new Map);vt(this,"pendingRequests",new Map);vt(this,"rafId",null)}request(t,n,o){const s=this.getCacheKey(t,o==null?void 0:o.filterTexture);if(this.cache.has(s)){n(this.cache.get(s));return}const a=this.pendingRequests.get(s);a?a.callbacks.push(n):this.pendingRequests.set(s,{productId:t,callbacks:[n],filterTexture:o.filterTexture,storeId:o.storeId}),this.rafId===null&&(this.rafId=requestAnimationFrame(()=>this.executeGroup()))}getCacheKey(t,n){return n!=null&&n.length?`${t}|${n.sort().join(",")}`:t}async executeGroup(){this.rafId=null;const t=this.pendingRequests;if(t.size===0)return;const n=[],o=[];if(t.forEach((a,i)=>{this.cache.has(i)?o.push([i,a]):n.push(a)}),o.forEach(([a,i])=>{const c=this.cache.get(a);c&&i.callbacks.forEach(l=>l(c)),t.delete(a)}),n.length===0)return;const s=new Map;n.forEach(a=>{var l;const i=((l=a.filterTexture)==null?void 0:l.sort().join(","))||"no-filter",c=s.get(i)||[];c.push(a),s.set(i,c)}),await Promise.all(Array.from(s.values()).map(a=>this.executeGroupRequest(a)))}async executeGroupRequest(t){const n=t.map(i=>i.productId),o=t[0].filterTexture,a=`https://${t[0].storeId}.myvtex.com/_v/proxy/catalog/product/similars`;try{const i=await fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({ids:n})});if(!i.ok)throw new Error("Erro ao buscar similares.");const c=await i.json();t.forEach(l=>{const u=c[l.productId]||[],p=o&&u.length?D.formattedSimilars(u,o):u,m=this.getCacheKey(l.productId,o);this.cache.set(m,p),l.callbacks.forEach(f=>f(p)),this.pendingRequests.delete(m)})}catch(i){console.error("Erro ao buscar similares:",i),t.forEach(c=>{const l=this.getCacheKey(c.productId,o);c.callbacks.forEach(u=>u([])),this.pendingRequests.delete(l)})}}clearCache(){this.cache.clear()}}const oa=new Hf;function as(e,t){const[n,o]=g.useState([]),s=g.useRef(!1);g.useEffect(()=>{s.current=!1},[e]);const a=g.useCallback(()=>{!e||s.current||(s.current=!0,oa.request(e,o,t))},[e,t]),i=g.useCallback(()=>oa.clearCache(),[]);return{items:n,loadSimilars:a,clearCache:i}}const nl=({isKit:e,parent:t,productId:n,setNotify:o,CONSTANTS:s})=>{const{router:a}=ce(),{items:i,loadSimilars:c}=as(n,{filterTexture:s.TEXTURE_IMAGE,storeId:s.storeId}),l=g.useRef(!1),u=g.useRef(null),p=h=>a.push(h??""),m=g.useCallback(h=>{!n||!h||c()},[n,c]),f=g.useCallback((h,_)=>{if(!h.isIntersecting){s.PLP_INFINITE_SCROLL&&u.current&&(clearTimeout(u.current),u.current=null);return}if(h.intersectionRatio>=_.threshold&&!l.current){if(s.PLP_INFINITE_SCROLL){u.current=setTimeout(()=>{m(!0)},s.PLP_PRODUCT_SIMILAR_DELAY);return}m(!0)}},[m]);return g.useEffect(()=>{if(e||!t.current)return;const h={root:null,threshold:.1},_=new IntersectionObserver(([y])=>{f(y,h)},h);return _.observe(t.current),()=>{u.current&&clearTimeout(u.current),_.disconnect()}},[f,t,e]),r.jsx(fe.Actions,{data:i,callback:p,isKit:e,children:!e&&r.jsx(fe.SizeSelector,{setNotify:o,PLP_SIZE_ORDER:s.PLP_SIZE_ORDER})})};nl.displayName="ProductList.Card.Actions";const rl=({className:e,children:t,gap:n=32,item:o,isMobile:s,order:a,tag:i,hasMaxWidth:c=!0,index:l,setSkuSelected:u,showVideo:p,CONSTANTS:m,...f})=>{const h=g.useRef(null),{availability:{status:_}}=o,y=g.useCallback((v,C)=>{var j;typeof u=="function"&&u((j=v.isVariantOf)==null?void 0:j.hasVariant,C)},[u]),x=o.name.substring(0,4).toLowerCase()==="kit ";return r.jsxs("div",{...f,className:d.helpers.classNameConcat(ss["product-list--card"],e),"data-mobile":s,"data-order":a,ref:h,style:{...c&&{maxWidth:s?"50%":"25%"},order:a,padding:n/2},children:[r.jsxs(fe.Root,{item:o,isMobile:s,index:l,size:s?"small":"medium",order:a,outStock:!_,CONSTANTS:m,children:[r.jsx(fe.Header,{product:o,tag:i==null?void 0:i.commercial}),r.jsx(fe.Media,{showVideo:p,hasPriority:!0}),r.jsxs(fe.Wrapper,{type:"body",children:[r.jsx(fe.Title,{tag:i==null?void 0:i.institucional}),r.jsx(nl,{productId:o.isVariantOf.productGroupID,parent:h,setNotify:y,isKit:x,CONSTANTS:m}),!x&&r.jsx(fe.OutStock,{callback:y})]}),r.jsx(fe.Wrapper,{type:"footer",children:_&&r.jsx(fe.BuyButton,{isKit:x})})]}),t]})};rl.displayName="ProductList.Card";const ol=({children:e,className:t,...n})=>r.jsx("div",{...n,className:d.helpers.classNameConcat(ss["product-list"],t),children:e});ol.displayName="ProductList.Grid";const at={Banner:tl,Card:rl,Root:ol,helpers:Up},Vf="_pdc_alo7z_1",Xe={"pdc--empty":"_pdc--empty_alo7z_1","pdc--grid":"_pdc--grid_alo7z_17","pdc--grid--content":"_pdc--grid--content_alo7z_26","pdc--infinite":"_pdc--infinite_alo7z_41","pdc--infinite--loader":"_pdc--infinite--loader_alo7z_44","pdc--infinite--loader--page":"_pdc--infinite--loader--page_alo7z_54","pdc--infinite--card--disabled":"_pdc--infinite--card--disabled_alo7z_58","pdc--infinite--next-page":"_pdc--infinite--next-page_alo7z_91","pdc--infinite--next-page--card":"_pdc--infinite--next-page--card_alo7z_101","pdc--infinite--next-page--spinner":"_pdc--infinite--next-page--spinner_alo7z_111","pdc--pagination":"_pdc--pagination_alo7z_118",pdc:Vf},is=({className:e,ICONS:t,PLP_NOT_RESULT:n})=>{const{router:o}=ce(),{isMobile:s}=ne(),a=()=>{o.push(n==null?void 0:n.link)};return r.jsxs("div",{className:d.helpers.classNameConcat(Xe["pdc--empty"],e),children:[r.jsxs(d.TextStructure.DivWrapper,{className:Xe["pdc--empty-wrapper"],children:[r.jsx("span",{className:s?"typography-style-body-md":"typography-style-heading-sm",children:n.title}),r.jsx("p",{className:s?"typography-style-body-xs":"typography-style-body-sm",children:n.subtitle})]}),r.jsx(d.Button,{adornment:{end:r.jsx(d.Icon,{name:t.arrow_right})},className:"typography-style-body-sm-strong",onClick:()=>a(),variant:"tertiary",children:r.jsx("b",{children:n.text})})]})};is.displayName="PDC.Empty";const rr=e=>r.jsx("div",{...e,className:Xe["pdc--infinite--next-page"],children:r.jsx(d.Spinner,{className:Xe["pdc--infinite--next-page--spinner"]})});rr.displayName="PDC.Spinner";function sl({CONSTANTS:e}){const{sendDataLayerEvent:t}=ae(),{isMobile:n}=ne(),{getAvailableProductTag:o}=yt(),[s,a]=g.useState([]),[i,c]=g.useState(!0),l=Ut(),u=l.join(","),p=n?16:32;return g.useEffect(()=>{const m=async()=>{l.length?await fetch("/api/wishlist/products",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({productIds:l})}).then(f=>f.json()).then(f=>{a(f),t({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:f}}})}).catch(f=>console.error(f)):a([]),c(!1)};if(l.length){m();return}if(l.length===0&&s.length===0){c(!1);return}a([]),c(!1)},[u]),r.jsx("section",{className:Zt["wishlist-grid"],children:r.jsxs("div",{className:Zt["wishlist-grid--container"],children:[i&&r.jsx(rr,{}),!l.length&&!(s!=null&&s.length)&&!i&&r.jsx(is,{className:Zt["pdc-empty-modifier"],ICONS:e.ICONS,PLP_NOT_RESULT:e.WISHLIST_NOT_RESULT}),r.jsx(at.Root,{children:Array.isArray(s)&&s.map((m,f)=>{const h=m.node.cluster.highlights||[],_=o(h);return r.jsx(at.Card,{gap:p,isMobile:n??!1,item:m.node,tag:_,index:f,CONSTANTS:{BUY_BUTTON_LABELS:e.BUY_BUTTON_LABELS,MAIN_IMAGE:e.MAIN_IMAGE,PLP_GRID_SCROLL_BACK:e.PLP_GRID_SCROLL_BACK,PLP_INFINITE_SCROLL:e.PLP_INFINITE_SCROLL,PLP_SIZE_ORDER:e.PLP_SIZE_ORDER,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:e.PLP_SHOW_VIDEO_ON_PRODUCT_CARD,PLP_PRODUCT_SIMILAR_DELAY:e.PLP_PRODUCT_SIMILAR_DELAY,PRODUCT_CARD_IMAGE_ASPECT_RATIO:e.PRODUCT_CARD_IMAGE_ASPECT_RATIO,PRODUCT_CARD_TEXTS:e.PRODUCT_CARD_TEXTS,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:e.PRODUCT_CARD_TOP_WISHLIST_TOGGLE,PRODUCT_IMAGE_DIMENSIONS:e.PRODUCT_IMAGE_DIMENSIONS,SECOND_IMAGE:e.SECOND_IMAGE,StoreConfig_MainSellerId:e.StoreConfig_MainSellerId,TEXTURE_IMAGE:e.TEXTURE_IMAGE,Z_INDEX_WAR:e.Z_INDEX_WAR,ICONS:e.ICONS,storeId:e.storeId}},m.node.sku)})})]})})}sl.displayName="Wishlist.Grid";const Wf=e=>e.map(t=>{var n;return(n=t.isVariantOf)==null?void 0:n.productGroupID})??[],al=({WISHLIST_INFO:e,ICONS:t,Z_INDEX_WAR:n})=>{const o=qt(),s=Ut(),a=qo(),{updateList:i}=Tt();return g.useEffect(()=>{var l,u;a.active&&Je.set("fs::wishlist",s);const c=async()=>{var p;await fetch("/api/wishlist/documents",{method:"PATCH",body:JSON.stringify({productIds:s,docId:(p=o==null?void 0:o.user)==null?void 0:p.id})}).catch(m=>{console.error("Error updating wishlist:",m)})};a.active&&((l=o.user)!=null&&l.id)&&s.length!==((u=o.wishlist)==null?void 0:u.length)&&c()},[a,o,s]),g.useEffect(()=>{var u;const c=async()=>{const p=await Je.get("fs::wishlist");p&&(p==null?void 0:p.length)!==s.length&&i(p)},l=async()=>{var h;const p=await Je.get("fs::wishlist")??[],m=o.wishlist?typeof o.wishlist[0]=="object"?Wf(o.wishlist):o.wishlist:[],f=[...new Set([...p,...m])];i(f),Je.set("fs::wishlist",s),m.length!==f.length&&await fetch("/api/wishlist/documents",{method:"PATCH",body:JSON.stringify({productIds:f,docId:(h=o.user)==null?void 0:h.id})}).catch(_=>{console.error("Error updating wishlist:",_)})};if((u=o.user)!=null&&u.id){l();return}c()},[o,i,s]),r.jsx(os,{ICONS:t,Z_INDEX_WAR:n,WISHLIST_INFO:e})};al.displayName="Wishlist.Init";const il=({product:e,priceInfo:t,size:n="medium",style:o,ICONS:s})=>{const{sendDataLayerEvent:a,currentLocalRef:i}=ae(),c=Ut(),{toggleProduct:l}=Tt(),{isVariantOf:{productGroupID:u}}=e;return r.jsx(d.Button,{adornment:{start:r.jsx(d.Icon,{size:n,name:c.includes(u)?s.favorite_true:s.favorite_false})},onClick:()=>{l(u),a({functionKey:"productEvents",data:{event:c.includes(u)?"remove_from_wishlist":"add_to_wishlist",outsideEcommerceData:{region:i.current},commonData:{...e,...t}}})},style:{...o,border:"none"},variant:"tertiary"})};il.displayName="WishList.Toggle";const cl={Feedback:os,Toggle:il,Grid:sl,Init:al},ll=({product:e,tag:t,size:n="small"})=>{const{CONSTANTS:o}=Ye(),{tags:s}=yt(),a=e.offers.offers[0],i=D.getDiscountPercent(a.listPrice,a.price),c=s==null?void 0:s.flagDiscount;return r.jsxs(fe.Wrapper,{type:"header",style:{zIndex:o.Z_INDEX_WAR.product_card_header},children:[i>0&&!t&&(c==null?void 0:c.enableTag)&&r.jsxs(d.Tag,{title:`${i}% ${c==null?void 0:c.tagText}`,variant:"quaternary",size:"small",style:{background:c==null?void 0:c.tagColor,color:c==null?void 0:c.tagTextColor},children:[i,"% ",c==null?void 0:c.tagText]}),t?r.jsx(d.Tag,{title:t.value,adornment:{start:t.enableIcon&&t.icon?r.jsx(d.Icon,{name:t.icon,size:"small",style:{color:t.iconColor}}):null},size:n,variant:"quaternary",style:{background:t.tagColor,color:t.textColor},children:t.value}):null,o.PRODUCT_CARD_TOP_WISHLIST_TOGGLE&&r.jsx(cl.Toggle,{product:e,priceInfo:{price:a.price,listPrice:a.listPrice},variant:"card",ICONS:o.ICONS})]})};ll.displayName="ProductCard.Actions.Header";const ul=({className:e,children:t,hasPriority:n=!1,showVideo:o=!1,...s})=>{const{element:a,index:i,item:{image:c,slug:l,video:u},sendSelectItemEvent:p,order:m,CONSTANTS:f}=Ye(),h=D.getFirstImages({images:c,label:{first:f.MAIN_IMAGE,second:f.SECOND_IMAGE}});return r.jsxs("div",{...s,className:d.helpers.classNameConcat(Re["product-card--image"],e),ref:a,style:{aspectRatio:f.PRODUCT_CARD_IMAGE_ASPECT_RATIO},children:[r.jsx(ze,{href:`/${l}/p`,onClick:p,onMouseUp:_=>{_.button===1&&p(),f.PLP_INFINITE_SCROLL&&sessionStorage.setItem(f.PLP_GRID_SCROLL_BACK.order,String(m))},children:r.jsx("div",{className:Re["product-card--image--container"],children:Array.isArray(h)&&h.map(({url:_,alternateName:y},x)=>g.createElement(Pe.Image,{...f.PRODUCT_IMAGE_DIMENSIONS.product_card,style:f.PRODUCT_IMAGE_DIMENSIONS.product_card,alt:y??"product image",key:x,...n&&{priority:x===0&&i<4},objectFit:"cover",src:_}))})}),f.PLP_SHOW_VIDEO_ON_PRODUCT_CARD&&o&&u&&r.jsx(fe.Video,{url:u,poster:h[0].url}),t]})};ul.displayName="ProductCard.Media.Media";const dl=({className:e,callback:t,children:n,...o})=>{const{isMobile:s,item:a,CONSTANTS:{PRODUCT_CARD_TEXTS:i}}=Ye(),{availability:{status:c}}=a;return c?null:r.jsxs("div",{...o,className:d.helpers.classNameConcat(Re["product-card--outstock"],e),children:[r.jsx(d.Tag,{size:"small",variant:"secondary",title:i.disabled,children:i.disabled}),r.jsx(d.Button,{className:d.helpers.classNameConcat(e,"buy-button"),size:s?"medium":"large",variant:"quaternary",onClick:()=>{typeof t=="function"&&t(a)},children:i.notify})]})};dl.displayName="ProductCard.OutStock";const ml=({children:e,className:t="",index:n,isMobile:o=!1,item:s,size:a,order:i,outStock:c,shelfTitle:l,CONSTANTS:u,...p})=>r.jsx(_f,{item:s,isMobile:o,outStock:c,order:i,size:a,index:n,shelfTitle:l,CONSTANTS:u,children:r.jsx("div",{...p,className:d.helpers.classNameConcat(Re["product-card--wrapper"],t),"data-size":a,children:e})});ml.displayName="ProductCard.Root";const pl=({disabled:e,label:t,size:n,value:o,onClick:s,...a})=>r.jsxs(d.ToggleSize.Wrapper,{...a,disabled:!1,outOfStock:e,size:n,onClick:s,children:[r.jsx(d.ToggleSize.DisabledAdornment,{}),r.jsx(d.ToggleSize.Text,{children:t})]});pl.displayName="ProductCard.SizeSelector.Item";const fl=({active:e=!1,callback:t,selectedSku:n=null,item:o,setNotify:s})=>{const{item:a,isMobile:i,setSelectedSku:c,eventDataRef:l}=Ye();o.productId=a.id;const u=D.disableSKU(o),p=D.getSKUName(o,"tamanho");!u&&!l.current.availableSkus.includes(p)&&l.current.availableSkus.push(p);const m=g.useCallback(h=>{const _=n===h?null:h;typeof c=="function"&&c(_),typeof t=="function"&&t(_)},[t,c,n]),f=g.useCallback(()=>{if(u&&typeof s=="function"){s(a,o);return}m(o)},[o,s,m,u,a]);return r.jsx(pl,{active:e,disabled:u,label:p,onClick:()=>f(),size:i?"x-small":"small",value:o})};fl.displayName="ProductCard.SizeSelector.SkuItem";const hl=({items:e,getLabel:t,PLP_SIZE_ORDER:n})=>Array.isArray(e)?[...e].sort((o,s)=>{const a=t(o).toUpperCase(),i=t(s).toUpperCase(),c=n.indexOf(a)-n.indexOf(i);return c!==0?c:a.localeCompare(i,"pt-BR")}):[],_l=({callback:e,className:t="",children:n,setNotify:o,PLP_SIZE_ORDER:s,...a})=>{const{isMobile:i,item:{isVariantOf:{hasVariant:c}},selectedSku:l}=Ye(),u=g.useMemo(()=>Array.isArray(c)?hl({items:c,getLabel:p=>D.getSKUName(p,"tamanho"),PLP_SIZE_ORDER:s}):[],[c]);return r.jsxs("div",{...a,className:d.helpers.classNameConcat(Re["product-card--selectors--size"],t),"data-mobile":i,children:[r.jsx("div",{className:Re["product-card--selectors--size--skus"],children:u.map((p,m)=>r.jsx(fl,{active:l===p,callback:e,item:p,selectedSku:l,setNotify:o},`size--${m}--${p.sku}`))}),r.jsx("div",{className:Re["product-card--selectors--size--button"],children:n})]})};_l.displayName="ProductCard.SizeSelector";const co=({alt:e="",callback:t,more:n,total:o=4,src:s,url:a,...i})=>r.jsxs(d.ToggleStyle.Wrapper,{...i,onClick:()=>{typeof t=="function"&&t(a)},children:[r.jsx(d.ToggleStyle.DisabledAdornment,{}),r.jsxs(d.ToggleStyle.Texture,{children:[s&&r.jsx(Pe.Image,{alt:e??s,src:s,height:34,width:34}),n&&r.jsx(d.TextStructure.DivWrapper,{className:Re["product-card--selectors--style--more"],children:r.jsxs("p",{children:["+ ",o]})})]})]}),Gf=({children:e,callback:t,data:n,total:o=4,size:s,...a})=>{const{index:i}=Ye(),{triggerSelectItemEventRef:c}=ae();return r.jsxs("div",{...a,children:[e,Array.isArray(n)&&n.slice(0,o).map((l,u)=>r.jsx(co,{callback:p=>{c.current.trigger=!0,c.current.index=i,typeof t=="function"&&t(p)},src:(l==null?void 0:l.textureImage)??"",alt:l==null?void 0:l.textureAlt,url:l==null?void 0:l.slug,size:s},u)),Array.isArray(n)&&(n==null?void 0:n.length)>o&&r.jsx(co,{size:s,total:n.length-o,more:!0})]})},gl=({callback:e,className:t,data:n,images:o=[],findTexture:s,...a})=>{const{CONSTANTS:i}=Ye(),c=s||i.TEXTURE_IMAGE,l=o==null?void 0:o.find(u=>c.includes(u.alternateName));return r.jsx(Gf,{...a,callback:e,className:d.helpers.classNameConcat(Re["product-card--selectors--style"],t),data:n,size:"x-small",children:l&&r.jsx(co,{active:!0,size:"x-small",src:l.url})})};gl.displayName="ProductCard.StyleSelector";const yl=({className:e,hasDecimal:t,...n})=>{const{isMobile:o,item:{offers:{lowPrice:s,highPrice:a},installments:{count:i,value:c}},eventDataRef:l}=Ye();l.current.priceInfo={price:s,listPrice:a};const u=D.formatPriceToCurrency(a,t),p=D.formatPriceToCurrency(s,t),m=D.formatPriceToCurrency(c??0),f=o?"horizontal":"stacked";return r.jsx("div",{...n,className:d.helpers.classNameConcat(Re["product-card--price"],e),"data-mobile":o,children:r.jsx(d.ProductInfo.Root,{size:"small",layout:f,children:r.jsxs(d.ProductInfo.Wrapper,{size:"small",layout:f,children:[r.jsx(d.ProductInfo.ValuesWrapper,{children:p!==u?r.jsxs(r.Fragment,{children:[r.jsx(d.ProductInfo.Price,{label:"originalPrice",value:u,size:"small"}),r.jsx(d.ProductInfo.Price,{label:"discountPrice",value:p,size:"small"})]}):r.jsx(d.ProductInfo.Price,{label:"defaultPrice",value:p,size:"small"})}),i&&i>1&&c?r.jsx(d.ProductInfo.Price,{label:"installment",value:`${i}x ${m}`,size:"small"}):null]})})})};yl.displayName="ProductCard.Price";const xl=({tag:e,className:t})=>{const{item:{name:n}}=Ye();return r.jsxs("div",{className:d.helpers.classNameConcat(Re["product-card--title"],t),children:[r.jsx("div",{className:Re["product-card--title--tag"],children:e?r.jsx(d.Tag,{size:"small",title:e.value,variant:"quaternary",adornment:{start:e.enableIcon&&e.icon?r.jsx(d.Icon,{name:e.icon,style:{color:e.iconColor}}):null},style:{background:e.tagColor,color:e.textColor},children:e.value}):r.jsx("div",{})}),r.jsx("div",{className:Re["product-card--title--content"],children:n&&r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{children:r.jsx("h3",{children:n})})})})]})};xl.displayName="ProductCard.Title";const vl=({className:e,url:t,poster:n,...o})=>{const{element:s}=Ye();return g.useEffect(()=>{if(!(s!=null&&s.current))return;const a=s.current,i=a.querySelector("video");if(i){const c=new IntersectionObserver(p=>{p.forEach(m=>{D.setVideoPlay(m.isIntersecting,i,t)})},{root:null,rootMargin:"0px",threshold:.5}),l=()=>{i.setAttribute("data-loaded","true")},u=()=>{a&&(c.observe(a),i.addEventListener("loadeddata",l))};return document.readyState==="complete"?u():window.addEventListener("load",u),()=>{c.disconnect(),window.removeEventListener("load",u)}}return()=>null},[t,s]),r.jsx("div",{...o,className:d.helpers.classNameConcat(Re["product-card--video"],e),children:t&&r.jsx(Pe.Video,{autoPlay:!1,muted:!0,loop:!0,preload:"none",playsInline:!0,poster:n})})};vl.displayName="ProductCard.Media.Video";const bl=({children:e,className:t,type:n,...o})=>r.jsx("div",{...o,className:d.helpers.classNameConcat(Re[`product-card--${n}`],t),children:e});bl.displayName="ProductCard.Wrapper";const fe={Actions:Wc,BuyButton:Gc,Header:ll,Media:ul,Root:ml,OutStock:dl,Price:yl,SizeSelector:_l,StyleSelector:gl,Title:xl,Video:vl,Wrapper:bl},Kf="_carousel_rzsga_1",Xf="_shelf__container_rzsga_14",Yf="_shelf_without_carousel_rzsga_34",Qf="_card_container_rzsga_55",Mt={carousel:Kf,"custom-controllers":"_custom-controllers_rzsga_5",shelf__container:Xf,"controllers-arrows-bullets":"_controllers-arrows-bullets_rzsga_23",shelf_without_carousel:Yf,card_container:Qf},sa=({title:e})=>r.jsx("div",{className:Mt.shelf__container,children:e&&r.jsx(d.TextStructure.Root,{children:r.jsxs(d.TextStructure.DivWrapper,{children:[r.jsx("h2",{className:d.helpers.classNameConcat("typography-style-body-md",D.responsive["responsive-mobile-flex"]),children:e}),r.jsx("h2",{className:d.helpers.classNameConcat("typography-style-heading-md",D.responsive["responsive-desktop-flex"]),children:e})]})})}),Zf=({children:e,ICONS:t,itemsPerPage:n,title:o})=>{const{isMobile:s}=ne(),a=n[s?"mobile":"desktop"],{initialize:i,controller:c,itemsStyles:l,pagination:u}=d.Carousel.useCarousel({itemsPerPage:a,gap:10,loop:!0,direction:"row"}),p=g.Children.toArray(e).length;return s||p>=4?r.jsxs(d.Carousel.Root,{innerRef:f=>{i(f)},className:Mt.carousel,children:[r.jsxs("div",{className:Mt["custom-controllers"],children:[o&&r.jsx(sa,{title:o}),a<p&&r.jsxs(d.Carousel.Controller,{className:Mt["controllers-arrows-bullets"],children:[r.jsxs(d.Carousel.Arrows,{children:[r.jsx(d.Button,{variant:"tertiary",onClick:()=>c==null?void 0:c.prevPage(),adornment:{start:r.jsx(d.Icon,{name:t.arrow_left})}}),r.jsx(d.Button,{variant:"tertiary",onClick:()=>c==null?void 0:c.nextPage(),adornment:{start:r.jsx(d.Icon,{name:t.arrow_right})}})]}),!s&&a>2&&r.jsx(d.Carousel.Bullets,{page:u.currentPage,total:u.totalPages,onBulletClick:f=>c==null?void 0:c.navigateTo(f)})]})]}),r.jsx(d.Carousel.Body,{children:g.Children.map(e,(f,h)=>r.jsx(d.Carousel.Item,{style:{...l,overflow:"hidden"},children:f},`${o}_${h}`))})]}):r.jsxs(r.Fragment,{children:[o&&r.jsx(sa,{title:o}),r.jsx("div",{className:Mt.shelf_without_carousel,children:e})]})},jl=({className:e,item:t,isMobile:n,size:o,shelfTitle:s,...a})=>{const i=g.useRef(null),{getAvailableProductTag:c}=yt(),{availability:{status:l}}=t,u=m=>{const f=m.filter(h=>!a.CONSTANTS.TEXTURE_IMAGE.includes(h.keywords));return n?f.splice(0,2):f},p=c(t.cluster.highlights);return r.jsx("div",{ref:i,className:Mt.card_container,children:r.jsxs(fe.Root,{...a,item:{...t,image:u(t.image)},isMobile:n,size:n?"small":"medium",outStock:!l,shelfTitle:s,children:[r.jsx(fe.Header,{product:t,tag:p==null?void 0:p.commercial}),r.jsx(fe.Media,{}),r.jsxs(fe.Wrapper,{type:"body",children:[r.jsx(fe.Title,{tag:p==null?void 0:p.institucional}),r.jsx(fe.Actions,{})]}),r.jsx(fe.Wrapper,{type:"footer"})]})})};jl.displayName="ProductList.Card";const nn={Shelf:Zf,Card:jl},Cl=({CONSTANTS:e,inView:t,products:n,innerRef:o})=>{const s=g.useMemo(()=>ff(n),[n]),{isMobile:a}=ne(),{addItemsToCart:i}=ve(),{sendDataLayerEvent:c}=ae(),{getAvailableProductTag:l}=yt(),[u,p]=g.useState({totalPrice:0,products:{}}),m=()=>{const h=Object.values(u.products);i(h),c({functionKey:"skuEvents",data:{event:"add_to_cart",commonData:{products:h.map(_=>{const y=s.find(x=>x.node.id===_.productId);return y==null?void 0:y.node})},supportData:{selectedSkus:h,price:u.totalPrice}}})},f=({selectedProduct:h,productId:_})=>{const y=hf({selectedProduct:h,productId:_,prevState:u,mainSellerId:e.StoreConfig_MainSellerId});p(y)};return g.useEffect(()=>{if(!t||s.length===0)return;const h=e.BUY_PACKAGE.header.title;c({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:s},customData:{item_list_name:h},outsideEcommerceData:{item_list_name:h}}})},[t]),r.jsxs("div",{className:ht.container,ref:o,children:[r.jsx("div",{className:ht["carousel-container"],style:{width:s.length<=3?"max-content":"75%"},children:r.jsx(nn.Shelf,{title:e.BUY_PACKAGE.header.title,itemsPerPage:{desktop:3,mobile:s.length>=3?2.2:s.length},ICONS:e.ICONS,children:Array.isArray(s)&&s.map(({node:h},_)=>{var v,C,j;const y=l(h.cluster.highlights),{availability:{status:x}}=h;return x?r.jsxs(fe.Root,{item:{...h,image:ts.helpers.product.getFirstImages({images:h.image,label:{first:e.MAIN_IMAGE,second:e.SECOND_IMAGE}})},isMobile:a,size:"medium",index:_,shelfTitle:e.BUY_PACKAGE.header.title,CONSTANTS:e,children:[r.jsx(fe.Header,{product:h,tag:y.commercial}),r.jsx(fe.Media,{}),r.jsxs(fe.Wrapper,{type:"body",children:[r.jsx(fe.Title,{tag:{value:(v=y.institucional)==null?void 0:v.value,enableIcon:(C=y.institucional)==null?void 0:C.enableIcon,icon:(j=y.institucional)==null?void 0:j.icon}}),r.jsx(fe.Actions,{children:r.jsx(fe.SizeSelector,{callback:b=>f({selectedProduct:b,productId:h.id}),PLP_SIZE_ORDER:e.PLP_SIZE_ORDER})})]})]},h.id):null})})}),r.jsx("div",{className:ht["add-cart-container"],children:r.jsx(pf,{handleAddAllToCart:m,selectedProducts:u,CONSTANTS:{BUY_BUTTON_LABELS:e.BUY_BUTTON_LABELS,BUY_PACKAGE:e.BUY_PACKAGE,FREIGHT_CALCULATION:e.FREIGHT_CALCULATION}})})]})},cs={"btn-login":"_btn-login_yas63_12","btn-header":"_btn-header_yas63_22","header-animation":"_header-animation_yas63_35"},ls=({id:e})=>{const{setIsOpen:t,cartStore:{items:n}}=ve(),{handleSelectContent:o}=ae(),{CONSTANTS:s}=Ne(),a=n.reduce((i,c)=>i+(c.quantity??0),0);return r.jsx(d.Header.SupportItem,{onClick:()=>{t(!0),o({content:"header:minicart"})},id:e,children:r.jsxs(d.Badge.AutoPositioner,{children:[r.jsx(d.Badge.Count,{count:a,size:"medium",variant:"primary",style:{backgroundColor:"black",display:a>0?"flex":"none"}}),r.jsx(d.Icon,{name:s.header.ICONS.bag,size:"medium"})]})})};ls.displayName="Header.Bag";const dn=({children:e,href:t,...n})=>t&&t!=="#"?r.jsx(ze,{href:t.startsWith("/")?t:`/${t}`,...n,children:e}):e,Sl=()=>{const{headerData:e}=Ne(),{handleSelectContent:t}=ae(),{reset:n,updateValue:o}=an(),s=a=>{a?o(a):n()};return r.jsx(d.Header.Categories,{children:Array.isArray(e.categories)&&e.categories.map((a,i)=>r.jsx(dn,{href:a.link,onMouseEnter:()=>s(a.submenuId),onFocus:()=>s(a.submenuId),children:r.jsx(d.Header.CategoryItem,{className:cs["btn-header"],value:a.submenuId??null,adornment:{start:r.jsx(d.Icon,{name:a.iconStart}),end:r.jsx(d.Icon,{name:a.iconEnd})},style:{textWrap:"nowrap",gap:"0"},onClick:()=>{t({content:`header:${a.label}`})},children:a.label})},`category-${a.label}-${i}`))})};Sl.displayName="Header.Categories";function Jf(){const{handleSelectContent:e}=ae(),{CONSTANTS:t}=Ne(),{setValue:n}=Yn();return r.jsx(d.Header.SupportItem,{onClick:()=>{n(!0),e({content:"header:search"})},children:r.jsx(d.Icon,{name:t.header.ICONS.search,size:"medium"})})}const eh={"menu-subcategories-container":"_menu-subcategories-container_a93cr_1"},th={"observer-wrapper":"_observer-wrapper_r43gk_1"},or=({children:e,eventData:t,observerOptions:n,callBackWhenVisible:o,stopOnIntersection:s=!0,className:a,...i})=>{const c=g.useRef(null),l=Lo(c,s,n),{sendDataLayerEvent:u}=ae();return g.useEffect(()=>{l&&(typeof o=="function"&&o(),t&&u({...t}))},[l]),r.jsx("div",{...i,ref:c,className:d.helpers.classNameConcat(th["observer-wrapper"],a),children:e})},wl=({thumbnails:e,category:t,isMobile:n=!0,callBack:o})=>{const{handleSelectPromotionEvent:s}=ae(),a=50/e.length;return r.jsx("div",{className:eh["menu-subcategories-container"],children:e.map((i,c)=>{const l=n?i.srcMobile:i.srcDesk;if(!l)return null;const u={creative_name:"banner-menu",creative_slot:`banner-menu:${t}:${c+1}`,promotion_id:l,promotion_name:i.promotion_name};return r.jsx(or,{eventData:{functionKey:"readyEvents",data:{event:"view_promotion",readyData:{ecommerce:{...u}}}},observerOptions:{delay:1e3},children:r.jsxs(ze,{href:i.link??"#",onClick:()=>{typeof o=="function"&&o(),s({updatePromotionRef:!0,promotion:u})},children:[r.jsx(Pe.Image,{src:l,alt:i.label??l,width:500,height:500,sizes:`(max-width: 768px) 100vw, (max-width: 1023px) 75vw, ${a}vw`}),i.label&&r.jsx("p",{children:i.label})]})},`thumb-${i.label}-${c}`)})})};wl.displayName="Menu.Thumbnail";const lo={"menu-desktop":"_menu-desktop_1b799_1","menu-categories":"_menu-categories_1b799_12"},Pl=({children:e,dividerOnRight:t=!0,subMenu:n,...o})=>{var l;const{router:s}=ce(),{reset:a}=an(),{handleSelectContent:i}=ae(),{CONSTANTS:c}=Ne();return r.jsxs("div",{...o,className:lo["menu-categories"],children:[(l=n==null?void 0:n.subCategories)==null?void 0:l.map((u,p)=>{var h,_,y,x;const m=u.listCollapseDesk&&!((h=u.see_all)!=null&&h.link)?{expandAfterRowsQty:u.rowsToShowDesk}:{},f=u.listCollapseDesk&&!((_=u.see_all)!=null&&_.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:r.jsx(d.Icon,{name:c.header.ICONS.arrow_right,size:"small"})}};return r.jsxs(d.ComponentList.Structure,{children:[r.jsx(dn,{href:u.linkLabel,title:u.label,onClick:()=>{u.linkLabel&&(a(),i({content:`menu:${u.label??""}:${n.label??""}`}))},children:r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{children:r.jsx("h2",{children:u.label})})})}),r.jsx(d.ComponentList.List,{columns:1,...m,className:lo["submenu-categories"],children:(y=u.items)==null?void 0:y.map((v,C)=>r.jsx(d.ComponentList.ListItem,{id:`list-item-${v.label}-${C}`,children:r.jsx(Le,{href:v.link??"#",size:"x-small",title:v.label??"",disableUnderline:!0,disablePadding:!0,onClick:()=>{a(),i({content:`menu:${u.label??""}:${v.label??""}:${n.label??""}`})},children:v.label})},`list-item-${v.label}-${C}`))}),((x=u.see_all)==null?void 0:x.link)&&r.jsx(d.ComponentList.Support,{...f,size:"small",onClick:()=>{var v;(v=u.see_all)!=null&&v.link&&(a(),i({content:`menu:${u.label??""}:${n.label}`}),s.push(u.see_all.link))},children:u.see_all.link&&u.see_all.label})]},`list-${u.label}-${p}`)}),t&&r.jsx(d.Utils.Divider,{size:"small",direction:"vertical"})]})};Pl.displayName="Menu.Categories";const Nl=({children:e,dividerOnBottom:t=!0,...n})=>{const{CONSTANTS:o}=Ne();return r.jsxs(r.Fragment,{children:[r.jsx("div",{...n,className:lo["menu-desktop"],style:{...n.style,justifyContent:o.header.ALIGNMENT_MENU},children:e}),t&&r.jsx(d.Utils.Divider,{size:"small"})]})};Nl.displayName="Menu.MenuRoot";const Ar={Root:Nl,Categories:Pl,Thumbnail:wl},El=()=>{const{headerData:e,CONSTANTS:t}=Ne(),n=Si(),{reset:o}=an();return r.jsx(d.Header.SubMenu,{className:"header-desktop-submenu",children:Array.isArray(e.subMenus)&&e.subMenus.map((s,a)=>{const{thumbnails:i,label:c,id:l}=s,u=l===n,p=i==null?void 0:i.some(m=>!!m.srcDesk);return r.jsxs(Ar.Root,{id:l,style:u?{display:"flex",zIndex:t.header.Z_INDEX_WAR.menu_desktop}:{display:"none"},dividerOnBottom:u,children:[r.jsx(Ar.Categories,{dividerOnRight:!!p,subMenu:s}),Array.isArray(i)&&r.jsx(Ar.Thumbnail,{thumbnails:i,isMobile:!1,category:c,callBack:o})]},`submenu-${l}-${a}`)})})};El.displayName="Header.SubMenu";const Il=()=>{const{handleSelectContent:e}=ae(),{CONSTANTS:t}=Ne();return r.jsx(ze,{href:"/favoritos",children:r.jsx(d.Header.SupportItem,{onClick:()=>e({content:"header:wishlist"}),children:r.jsx(d.Icon,{name:t.header.ICONS.favorite_false,size:"medium"})})})};Il.displayName="Header.WishList";const nh="_root_im5yf_125",We={"user-menu--credits":"_user-menu--credits_im5yf_1","user-menu--content":"_user-menu--content_im5yf_10","user-menu--login":"_user-menu--login_im5yf_30","user-menu--login--content":"_user-menu--login--content_im5yf_37","user-menu--menu":"_user-menu--menu_im5yf_64","user-menu--tooltip":"_user-menu--tooltip_im5yf_92","tooltip-modifier":"_tooltip-modifier_im5yf_103","modal-controls-modifier":"_modal-controls-modifier_im5yf_108","modal-header-modifier":"_modal-header-modifier_im5yf_116",root:nh},Rl=({className:e,children:t,...n})=>r.jsx("div",{...n,className:d.helpers.classNameConcat(We["user-menu--content"],e),children:t});Rl.displayName="UserMenu.Content";var Tl=(e=>(e.Account="account",e))(Tl||{});const Al=({className:e,cashBack:t,credits:n,link:o,total:s,...a})=>{const i=t?D.formatPriceToCurrency(t):void 0,c=n?D.formatPriceToCurrency(n):void 0,l=s?D.formatPriceToCurrency(s):void 0;return r.jsx(d.Credits.Account,{...a,className:d.helpers.classNameConcat(We["user-menu--credits"],e),icon:"wallet",showIcon:!0,cashBackValue:i,creditsValue:c,linkMore:o,totalValue:l,type:Tl.Account})};Al.displayName="UserMenu.Credits";const kl=({className:e,children:t,description:n,text:o,...s})=>{const{isMobile:a}=ne();return r.jsx("div",{...s,className:d.helpers.classNameConcat(We["user-menu--login"],e),"data-mobile":a,children:r.jsxs("div",{className:We["user-menu--login--content"],children:[r.jsx(d.TextStructure.Root,{children:r.jsxs(d.TextStructure.DivWrapper,{alignContent:"flex-start",alignItems:"flex-start",children:[r.jsx("h3",{className:"typography-style-body-lg-strong",children:o}),r.jsx("p",{children:n})]})}),t]})})};kl.displayName="UserMenu.Login";const Ol=({className:e,isLogged:t,onLogoutClick:n,ICONS:o,storeConfig:s,isMobile:a})=>{const i=a?ws:ws({ICONS:o,storeConfig:s}).filter(c=>c.deviceShown==="both"||c.deviceShown===(a?"mobile":"desktop"));return r.jsxs("ul",{className:d.helpers.classNameConcat(We["user-menu--menu"],e),children:[Array.isArray(i)&&i.map((c,l)=>r.jsx("li",{children:r.jsx(Le,{href:c.href??"#",size:"small",disableUnderline:!0,adornments:{start:r.jsx(d.Icon,{name:c.icon??"delete"})},children:c.label})},l)),t?r.jsx("li",{children:r.jsx(Le,{href:`${s.secureSubdomain}/api/vtexid/pub/logout?scope=mariafilo&returnUrl=${encodeURIComponent(`${s.storeUrl}`)}`,size:"small",disableUnderline:!0,onClick:n,adornments:{start:r.jsx(d.Icon,{name:Ip(o)})},children:Ep})}):r.jsx(r.Fragment,{})]})};Ol.displayName="UserMenu.Menu";const Ll=e=>{const t=g.useRef(null),n=g.useCallback(a=>{t.current&&!t.current.contains(a.target)&&e()},[e]),o=g.useCallback(a=>{t.current&&!t.current.contains(a.target)&&e()},[e]),s=g.useCallback(a=>{a.key==="Escape"&&e()},[e]);return g.useEffect(()=>(document.addEventListener("mousedown",n),document.addEventListener("keydown",s),document.addEventListener("touchstart",o),()=>{document.removeEventListener("mousedown",n),document.removeEventListener("keydown",s),document.removeEventListener("touchstart",o)}),[n,s,o]),{ref:t}},rh=e=>{if(!e||typeof window>"u")return 0;const t=window.getComputedStyle(e);return parseInt(t.padding,10)},oh=(e,t,n)=>{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?rh(e==null?void 0:e.parentElement):0;return{left:s+i/2-(c.width+l*2),top:a+o+n}},Ml=g.createContext({}),sh=({children:e,delay:t=600,gap:n=20,isOpen:o,setIsOpen:s,target:a,...i})=>{const c=g.useRef(null),[l,u]=g.useState(!1),[p,m]=g.useState({left:0,top:0}),{ref:f}=Ll(()=>{u(!0),typeof window<"u"&&(c.current=window.setTimeout(()=>{s(!1),u(!1)},t))});return g.useEffect(()=>{if(a&&(f!=null&&f.current)){const{left:h,top:_}=oh(f.current,a,n??0);m({left:h,top:_}),u(!1)}},[n,o,a,f]),r.jsx(Ml.Provider,{value:g.useMemo(()=>({...i,...p,contentRef:f,isLeaving:l,isOpen:o,setIsOpen:s,setIsLeaving:u,target:a}),[i,p,f,l,o,s,u,a]),children:e})},Dl=()=>{const e=g.useContext(Ml);if(e===void 0)throw new Error("useUserMenuContext must be used within a UserMenuProvider");return e},$l=({children:e,isMobile:t=!1,Z_INDEX_WAR:n})=>{const{isOpen:o,setIsOpen:s}=Dl();return r.jsxs(d.Modal.Root,{"data-user":"user-menu--modal",isMobile:t??!1,isOpen:o,setIsOpen:s,variant:"sideBottom",className:We["modal-root-modifier"],style:{zIndex:n.user_menu_mobile},children:[r.jsx(d.Modal.Header,{navigation:"top",className:We["modal-header-modifier"],children:r.jsx(d.Modal.Controls,{navigation:"top",isMobile:!0,className:We["modal-controls-modifier"]})}),r.jsx(d.Modal.Body,{children:e})]})};$l.displayName="UserMenu.Modal";const zl=({children:e,component:t,Z_INDEX_WAR:n,isMobile:o,...s})=>r.jsx(sh,{...s,className:We.root,children:o?r.jsxs(r.Fragment,{children:[r.jsx(ft.Modal,{Z_INDEX_WAR:n,children:t}),e]}):r.jsx(ft.Tooltip,{component:t,style:{width:304,zIndex:n.user_menu},Z_INDEX_WAR:n,children:e})});zl.displayName="UserMenu.Root";const Fl=({children:e,component:t,Z_INDEX_WAR:n,...o})=>{const{contentRef:s,left:a,isLeaving:i,isOpen:c,top:l}=Dl();return r.jsx(d.Tooltip.Root,{arrow:"top-right",component:r.jsx("div",{...o,ref:s,children:t}),className:d.helpers.classNameConcat(We["user-menu--tooltip"],We["tooltip-modifier"]),isLeaving:i,isOpen:c,left:a,size:"medium",position:"top",top:l,style:{zIndex:n.user_menu},children:r.jsx("div",{className:We["user-menu--tooltip"],children:e})})};Fl.displayName="UserMenu.Tooltip";const ft={Credits:Al,Content:Rl,Login:kl,Menu:Ol,Modal:$l,Root:zl,Tooltip:Fl},sr=({children:e,isOpen:t,setIsOpen:n,desktopUserMenuTarget:o,mobileUserMenuTarget:s,storeConfig:a})=>{var h,_,y;const{isMobile:i}=ne(),{CONSTANTS:c}=Ne(),l=qt(),u=()=>{window.location.href=`${a.secureSubdomain}/api/io/login?returnUrl=${encodeURIComponent(`${window.location.href}`)}`},p=!!((h=l.user)!=null&&h.userId),{cashback:m,credits:f}=g.useMemo(()=>{var x,v;return{credits:((x=l==null?void 0:l.getCurrentCredits())==null?void 0:x.credits)??0,cashback:((v=l==null?void 0:l.getCurrentCredits())==null?void 0:v.cashback)??0}},[l]);return r.jsx(ft.Root,{component:r.jsxs(ft.Content,{children:[r.jsx(ft.Login,{description:Tp(p),text:Rp(p,((_=l==null?void 0:l.user)==null?void 0:_.firstName)??((y=l==null?void 0:l.user)==null?void 0:y.email)),children:!p&&r.jsx(d.Button,{id:"conta",size:"medium",variant:"quaternary",onClick:()=>u(),children:c.header.MENU_INFO.login.button_text})}),f+m&&p?r.jsx(ft.Credits,{credits:f,cashBack:m,link:`${a.secureSubdomain}/account#/meus-creditos`,total:f+m}):r.jsx(r.Fragment,{}),r.jsx(d.Utils.Divider,{}),r.jsx(ft.Menu,{ICONS:c.header.ICONS,storeConfig:a,isLogged:p,className:D.responsive["responsive-desktop-flex"],onLogoutClick:()=>l.logout()}),r.jsx(ft.Menu,{ICONS:c.header.ICONS,storeConfig:a,isMobile:!0,isLogged:p,className:D.responsive["responsive-mobile-flex"],onLogoutClick:()=>l.logout()})]}),isOpen:t,isMobile:i,setIsOpen:n,target:i?s:o,Z_INDEX_WAR:c.header.Z_INDEX_WAR,children:e})};sr.displayName="UserMenu";const Bl=({storeConfig:e})=>{const{CONSTANTS:t}=Ne(),{handleSelectContent:n}=ae(),{reset:o}=an(),{setValue:s}=Fo(),a=zo(),i=g.useRef(null);return r.jsxs(r.Fragment,{children:[r.jsxs(d.Header.Wrapper,{className:"header-desktop-wrapper",children:[r.jsx(d.Header.Logo,{style:{width:"100%"},children:r.jsx(ze,{href:"/",onMouseEnter:o,children:r.jsx(d.Icon,{name:t.header.ICONS.logo,onClick:()=>{n({content:"header:logo"})}})})}),r.jsx(Sl,{}),r.jsxs(d.Header.Support,{onMouseEnter:o,style:{justifyContent:"flex-end"},children:[r.jsx(Jf,{}),r.jsx(sr,{isOpen:a,setIsOpen:s,desktopUserMenuTarget:i.current,storeConfig:e,children:r.jsx(d.Header.SupportItem,{onClick:()=>{s(!0),n({content:"header:user_menu"})},className:cs["btn-login"],innerRef:i,children:r.jsx(d.Icon,{name:t.header.ICONS.person,size:"medium"})})}),r.jsx(Il,{}),r.jsx(ls,{id:"cart-button"})]})]}),r.jsx(El,{})]})};Bl.displayName="Header.HeaderDesktopWrapper";const Be={"menu--banners":"_menu--banners_j3ev9_1","menu--banners--item":"_menu--banners--item_j3ev9_6","menu--banners--item--text":"_menu--banners--item--text_j3ev9_17","menu--banners--list":"_menu--banners--list_j3ev9_21","menu--dummy-close":"_menu--dummy-close_j3ev9_46","menu--body":"_menu--body_j3ev9_54","menu--categories":"_menu--categories_j3ev9_67","menu--categories--title":"_menu--categories--title_j3ev9_80","menu--step":"_menu--step_j3ev9_92","menu--sub-category":"_menu--sub-category_j3ev9_108","menu--sub-category--item":"_menu--sub-category--item_j3ev9_115","menu--sub-category--list":"_menu--sub-category--list_j3ev9_121"},Ul=({children:e,mobileBannerAlt:t,mobileBannerSrc:n,textColor:o,submenuId:s,label:a,...i})=>r.jsx("button",{...i,className:Be["menu--banners--item"],children:n?r.jsxs(d.Banner.Container,{children:[r.jsx(d.Banner.ImageWrapper,{children:r.jsx(Pe.Image,{alt:t??n,height:128,src:n,width:343,unoptimized:!0})}),r.jsx(d.Banner.Slot,{verticalAlignment:"end",horizontalAlignment:"center",children:r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{className:Be["menu--banners--item--text"],children:r.jsx("h2",{className:"typography-style-body-xs",style:o?{color:o}:{},children:e})})})})]}):r.jsx("h2",{...i,children:e})});Ul.displayName="Menu.Mobile.Category";const ql=({label:e,...t})=>{const{CONSTANTS:n}=Ne();return r.jsx(d.Button,{...t,adornment:{end:r.jsx(d.Icon,{name:n.header.ICONS.arrow_right,size:"medium"})},mode:"inverse",size:"medium",variant:"primary",children:e})};ql.displayName="Menu.Mobile.Body.Category";const Hl=({subCategory:e,submenuLabel:t,onHandleOut:n,...o})=>r.jsx("div",{...o,className:Be["menu--sub-category--list"],children:Array.isArray(e==null?void 0:e.items)&&(e==null?void 0:e.items.map((s,a)=>r.jsx(Le,{disableUnderline:!0,disablePadding:!1,href:s.link??"#",onClick:()=>n(s.label,t),size:"medium",title:s.label??"",children:s.label},a)))});Hl.displayName="Menu.Mobile.List";const Vl=({current:e,onHandleOut:t})=>{var n;return e?r.jsx("div",{className:Be["menu--sub-category"],children:Array.isArray(e==null?void 0:e.subCategories)&&((n=e==null?void 0:e.subCategories)==null?void 0:n.map((o,s)=>r.jsxs("div",{className:Be["menu--sub-category--item"],children:[r.jsx(Jt.Title,{onHandleOut:t,subCategory:o,submenuLabel:e==null?void 0:e.id}),r.jsx(Jt.List,{onHandleOut:t,subCategory:o,submenuLabel:e==null?void 0:e.id})]},s)))}):r.jsx(r.Fragment,{})};Vl.displayName="Menu.Mobile.Body.SubCategory";const Wl=({subCategory:e,submenuLabel:t,onHandleOut:n,...o})=>{var c;const{router:s}=ce(),{handleSelectContent:a}=ae(),{CONSTANTS:i}=Ne();return r.jsxs("div",{...o,className:Be["menu--categories--title"],children:[r.jsx(dn,{href:e==null?void 0:e.linkLabel,title:e==null?void 0:e.linkLabel,onClick:()=>{a({content:`menu:${e.label??""}:${t}`})},children:r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{children:r.jsx("h2",{className:"typography-style-body-md",children:e==null?void 0:e.label})})})}),((c=e==null?void 0:e.see_all)==null?void 0:c.link)&&r.jsx(d.ComponentList.Support,{adornment:{end:r.jsx(d.Icon,{name:i.header.ICONS.arrow_right,size:"small"})},size:"small",onClick:()=>{var l;n(e.label,t),(l=e==null?void 0:e.see_all)!=null&&l.link&&s.push(e.see_all.link)},children:e.see_all.label})]})};Wl.displayName="Menu.Mobile";const Jt={Banner:Ul,Category:ql,List:Hl,SubCategory:Vl,Title:Wl},Gl=g.createContext({}),ah=({children:e})=>{const[t,n]=g.useState(null),o=g.useCallback(()=>{n(null)},[]),s=a=>{a!==t&&n(a)};return r.jsx(Gl.Provider,{value:{currentCategory:t,setCurrentCategory:n,handleCloseMenu:o,handleChangeSubMenuOpened:s},children:e})},Kl=()=>g.useContext(Gl),Xl=e=>{const{router:t}=ce(),{headerData:n}=Ne(),{handleSelectContent:o}=ae(),{currentCategory:s,setCurrentCategory:a}=Kl(),i=g.useRef(null),c=()=>{if(i.current){const h=i.current;h&&(a(null),h==null||h.click())}},l=(h,_)=>{o({content:`menu:${h}`}),t.push(_),c()},u=(h,_)=>{o({content:`menu:${h}:${_}`}),c()},p=Array.isArray(n==null?void 0:n.categories)?n==null?void 0:n.categories:[],m=Array.isArray(n==null?void 0:n.subMenus)?n==null?void 0:n.subMenus:[],f=h=>{h.submenuId?a(h.submenuId):l(h.label,h.link)};return r.jsxs("div",{...e,className:Be["menu--body"],style:{transform:`translate3d(calc(-100% * ${s?1:0}), 0px, 0px)`},children:[r.jsx("button",{className:Be["menu--dummy-close"],ref:i,"data-close":!0}),r.jsxs("div",{className:Be["menu--step"],"data-active":"true",children:[r.jsx("div",{className:Be["menu--banners"],children:r.jsx("div",{className:Be["menu--banners--list"],children:p.map((h,_)=>g.createElement(Jt.Banner,{...h,key:_,onClick:()=>l(h.label,h.link)},h.mobileBannerAlt))})}),r.jsx("div",{className:Be["menu--categories"],children:p.map((h,_)=>r.jsx(Jt.Category,{label:h.label,onClick:()=>f(h)},_))})]}),r.jsx("div",{className:Be["menu--step"],"data-active":!!s,children:r.jsx(Jt.SubCategory,{current:m.find(h=>h.id===s),onHandleOut:u})})]})};Xl.displayName="Menu.Mobile.Body";const ih={"menu--header":"_menu--header_1ozdf_1"},Yl=()=>{var s;const{headerData:e}=Ne(),{currentCategory:t,setCurrentCategory:n}=Kl(),o=(s=e==null?void 0:e.categories)==null?void 0:s.find(a=>a.submenuId===t);return r.jsxs("div",{className:ih["menu--header"],children:[r.jsx(d.Button,{"data-out":!o,iconNameStart:"arrow-left",mode:"inverse",onClick:()=>n(null)}),o&&r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{alignContent:"center",children:r.jsx("h2",{className:"typography-style-body-lg",children:o==null?void 0:o.label})})}),r.jsx(d.Button,{iconNameStart:"close","data-close":!0,"data-only":!o,mode:"inverse",onClick:()=>n(null)})]})};Yl.displayName="Menu.Mobile.Header";var uo={exports:{}};function ch(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 kr={},Or={},aa;function lh(){return aa||(aa=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"LoadableContext",{enumerable:!0,get:function(){return o}});const o=Oe._(g).default.createContext(null);process.env.NODE_ENV!=="production"&&(o.displayName="LoadableContext")}(Or)),Or}var ia;function uh(){return ia||(ia=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return h}});const n=Oe._(g),o=lh();function s(_){return _&&_.default?_.default:_}const a=[],i=[];let c=!1;function l(_){let y=_(),x={loading:!0,loaded:null,error:null};return x.promise=y.then(v=>(x.loading=!1,x.loaded=v,v)).catch(v=>{throw x.loading=!1,x.error=v,v}),x}function u(_,y){let x=Object.assign({loader:null,loading:null,delay:200,timeout:null,webpack:null,modules:null},y),v=null;function C(){if(!v){const w=new p(_,x);v={getCurrentValue:w.getCurrentValue.bind(w),subscribe:w.subscribe.bind(w),retry:w.retry.bind(w),promise:w.promise.bind(w)}}return v.promise()}if(typeof window>"u"&&a.push(C),!c&&typeof window<"u"){const w=x.webpack&&typeof ch.resolveWeak=="function"?x.webpack():x.modules;w&&i.push(P=>{for(const S of w)if(P.includes(S))return C()})}function j(){C();const w=n.default.useContext(o.LoadableContext);w&&Array.isArray(x.modules)&&x.modules.forEach(P=>{w(P)})}function b(w,P){j();const S=n.default.useSyncExternalStore(v.subscribe,v.getCurrentValue,v.getCurrentValue);return n.default.useImperativeHandle(P,()=>({retry:v.retry}),[]),n.default.useMemo(()=>S.loading||S.error?n.default.createElement(x.loading,{isLoading:S.loading,pastDelay:S.pastDelay,timedOut:S.timedOut,error:S.error,retry:v.retry}):S.loaded?n.default.createElement(s(S.loaded),w):null,[w,S])}return b.preload=()=>C(),b.displayName="LoadableComponent",n.default.forwardRef(b)}class p{promise(){return this._res.promise}retry(){this._clearTimeouts(),this._res=this._loadFn(this._opts.loader),this._state={pastDelay:!1,timedOut:!1};const{_res:y,_opts:x}=this;y.loading&&(typeof x.delay=="number"&&(x.delay===0?this._state.pastDelay=!0:this._delay=setTimeout(()=>{this._update({pastDelay:!0})},x.delay)),typeof x.timeout=="number"&&(this._timeout=setTimeout(()=>{this._update({timedOut:!0})},x.timeout))),this._res.promise.then(()=>{this._update({}),this._clearTimeouts()}).catch(v=>{this._update({}),this._clearTimeouts()}),this._update({})}_update(y){this._state={...this._state,error:this._res.error,loaded:this._res.loaded,loading:this._res.loading,...y},this._callbacks.forEach(x=>x())}_clearTimeouts(){clearTimeout(this._delay),clearTimeout(this._timeout)}getCurrentValue(){return this._state}subscribe(y){return this._callbacks.add(y),()=>{this._callbacks.delete(y)}}constructor(y,x){this._loadFn=y,this._opts=x,this._callbacks=new Set,this._delay=null,this._timeout=null,this.retry()}}function m(_){return u(l,_)}function f(_,y){let x=[];for(;_.length;){let v=_.pop();x.push(v(y))}return Promise.all(x).then(()=>{if(_.length)return f(_,y)})}m.preloadAll=()=>new Promise((_,y)=>{f(a).then(_,y)}),m.preloadReady=_=>(_===void 0&&(_=[]),new Promise(y=>{const x=()=>(c=!0,y());f(i,_).then(x,x)})),typeof window<"u"&&(window.__NEXT_PRELOADREADY=m.preloadReady);const h=m}(kr)),kr}(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function n(p,m){for(var f in m)Object.defineProperty(p,f,{enumerable:!0,get:m[f]})}n(t,{default:function(){return u},noSSR:function(){return l}});const o=Oe,s=r,a=o._(uh()),i=typeof window>"u";function c(p){return{default:(p==null?void 0:p.default)||p}}function l(p,m){if(delete m.webpack,delete m.modules,!i)return p(m);const f=m.loading;return()=>(0,s.jsx)(f,{error:null,isLoading:!0,pastDelay:!1,timedOut:!1})}function u(p,m){let f=a.default,h={loading:x=>{let{error:v,isLoading:C,pastDelay:j}=x;if(!j)return null;if(process.env.NODE_ENV!=="production"){if(C)return null;if(v)return(0,s.jsxs)("p",{children:[v.message,(0,s.jsx)("br",{}),v.stack]})}return null}};p instanceof Promise?h.loader=()=>p:typeof p=="function"?h.loader=p:typeof p=="object"&&(h={...h,...p}),h={...h,...m};const _=h.loader,y=()=>_!=null?_().then(c):Promise.resolve(c(()=>null));return h.loadableGenerated&&(h={...h,...h.loadableGenerated},delete h.loadableGenerated),typeof h.ssr=="boolean"&&!h.ssr?(delete h.webpack,delete h.modules,l(f,h)):f({...h,loader:y})}(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)})(uo,uo.exports);var dh=uo.exports,mh=dh;const Ql=D.getDefaultExportFromCjs(mh),Hn={"modal-modifier":"_modal-modifier_10zw4_1","menu--navigation-bar":"_menu--navigation-bar_10zw4_15","menu--root":"_menu--root_10zw4_26"},Zl=({children:e})=>{const{menuIsOpen:t,setMenuIsOpen:n}=Ho(),{CONSTANTS:o}=Ne();return r.jsxs(d.Modal.RootWithoutPortal,{className:d.helpers.classNameConcat(Hn["modal-modifier"],"menu-mobile-root"),isOpen:t,setIsOpen:n,variant:"sideRight",style:{bottom:"unset",overflowY:"hidden",position:"fixed",top:0,zIndex:o.header.Z_INDEX_WAR.menu_mobile},children:[r.jsx(Yl,{}),r.jsx(d.Modal.Body,{className:Hn["menu--root"],children:e})]})};Zl.displayName="Menu.MenuRoot";const ph=Ql(()=>Promise.resolve(Zl),{ssr:!1}),Jl=({children:e,last:t=!1,...n})=>r.jsxs(r.Fragment,{children:[r.jsx(d.Button,{...n,"data-close":!0,size:"small",variant:"tertiary",children:e}),!t&&r.jsx(d.Utils.Divider,{direction:"vertical",size:"small",className:Hn.divider})]});Jl.displayName="Menu.NavigationBarItem";const eu=()=>{const{setUserMenuIsOpen:e}=Ho(),{handleSelectContent:t}=ae(),{CONSTANTS:n}=Ne(),{router:o}=ce(),s=[{iconNameStart:n.header.ICONS.person,onClick:()=>{e(!0),t({content:"menu:user_menu"})},text:n.header.MENU_INFO.login.button_text},{iconNameStart:n.header.MENU_INFO.bag.button_icon,onClick:()=>{t({content:"menu:wishlist"}),o.push("/favoritos")},text:n.header.MENU_INFO.bag.button_text},{last:!0,iconNameStart:n.header.MENU_INFO.store.button_icon,onClick:()=>{t({content:"menu:store"}),o.push("/institucional/lojas")},text:n.header.MENU_INFO.store.button_text}];return r.jsx(d.Card,{id:"menu-navigationbar",shadow:!0,className:Hn["menu--navigation-bar"],style:{zIndex:n.header.Z_INDEX_WAR.menu_mobile_navigation_bar},children:Array.isArray(s)&&s.map((a,i)=>g.createElement(Jl,{...a,key:i},a.text))})};eu.displayName="Menu.NavigationBar";const Lr={Body:Xl,NavigationBar:eu,Root:ph},tu=({storeConfig:e})=>{const t=g.useRef(null),{CONSTANTS:n}=Ne(),{MENU_NAVIGATION_BAR_ALLOWED:o,ICONS:s}=n.header,{handleSelectContent:a}=ae(),{setValue:i}=Yn(),{setValue:c}=Ni(),{setValue:l}=Fo(),u=zo(),p=Pi(),{isMobile:m}=ne();return r.jsxs(r.Fragment,{children:[r.jsxs(d.Header.Wrapper,{className:"header-mobile-wrapper",children:[r.jsx(d.Header.Logo,{style:{width:"100%"},children:r.jsx(ze,{href:"/",children:r.jsx(d.Icon,{name:s.logo,size:"x-large",onClick:()=>{a({content:"header:logo"})}})})}),r.jsxs(d.Header.Support,{children:[r.jsx(d.Header.SupportItem,{onClick:()=>{i(!0),a({content:"header:search"})},children:r.jsx(d.Icon,{name:s.search,size:"medium"})}),r.jsx(ls,{}),r.jsxs(d.Header.SupportItem,{onClick:()=>c(!0),children:[r.jsx("span",{ref:t}),r.jsx(d.Icon,{name:s.menu,size:"medium"})]})]})]}),m&&r.jsx(Ui,{menuIsOpen:p,setMenuIsOpen:c,userMenuIsOpen:p,setUserMenuIsOpen:l,children:r.jsx(sr,{storeConfig:e,isOpen:u,setIsOpen:l,mobileUserMenuTarget:t==null?void 0:t.current,children:r.jsxs(Lr.Root,{children:[r.jsx(Lr.Body,{}),o?r.jsx(Lr.NavigationBar,{}):r.jsx(r.Fragment,{})]})})})]})};tu.displayName="Header.HeaderMobileWrapper";const fh=g.createContext({}),hh=({children:e})=>{const{sendDataLayerEvent:t}=ae(),{cartStore:n,isOpen:o}=ve();g.useEffect(()=>{o&&t({functionKey:"viewCartEvent",data:{commonData:{cartStore:n}}})},[o]),g.useEffect(()=>{var a,i,c;if(n.id&&!((i=(a=n.marketingData)==null?void 0:a.marketingTags)!=null&&i.includes("faststore"))){const{id:l}=n;St.post("/api/checkout/order-form/attachments/marketing-data",{orderFormId:l,marketingData:{...n==null?void 0:n.marketingData,marketingTags:fi(((c=n.marketingData)==null?void 0:c.marketingTags)??[])}}).catch(u=>{console.error(u)})}},[n]);const s=({cartItem:a,oldQuantity:i,newQuantity:c})=>{t({functionKey:"skuEvents",data:{event:i>c?"remove_from_cart":"add_to_cart",commonData:{products:[{...a,price:a.price/100,listPrice:a.listPrice/100}]},customData:{quantity:c},supportData:{selectedSkus:[a]}}})};return r.jsx(fh.Provider,{value:{handleUpdateItemQuantityEvent:s},children:e})},_h="var(--color-background-brand-primary-lighter)",gh="_fadeInOut_1l5ow_1",yh="_fadeOut_1l5ow_1",re={brandPrimaryLighter:_h,"mc--cashback":"_mc--cashback_1l5ow_1","mc--cashback--positive":"_mc--cashback--positive_1l5ow_21","mc--cashback--alert":"_mc--cashback--alert_1l5ow_24","mc--container--actions":"_mc--container--actions_1l5ow_28","mc--container--actions--secondary":"_mc--container--actions--secondary_1l5ow_36","mc-container-actions--toggle-size-modifier":"_mc-container-actions--toggle-size-modifier_1l5ow_55","mc--footer":"_mc--footer_1l5ow_63","mc--footer--actions":"_mc--footer--actions_1l5ow_72","mc--footer--actions-button":"_mc--footer--actions-button_1l5ow_77","mc--footer--total":"_mc--footer--total_1l5ow_93","mc--footer--total--info":"_mc--footer--total--info_1l5ow_98","mc--footer--total--info--content":"_mc--footer--total--info--content_1l5ow_103","mc--field":"_mc--field_1l5ow_149","mc--body":"_mc--body_1l5ow_189","mc--body--products":"_mc--body--products_1l5ow_196","mc--body--empty--feedback":"_mc--body--empty--feedback_1l5ow_204","mc--body--empty--text":"_mc--body--empty--text_1l5ow_209","mc--body--promotion":"_mc--body--promotion_1l5ow_222","mc--body--promotion--closeness":"_mc--body--promotion--closeness_1l5ow_225","mc--body--promotion--closeness--success":"_mc--body--promotion--closeness--success_1l5ow_248","mc--body--coupon-tag":"_mc--body--coupon-tag_1l5ow_260","mc--body--coupon-tag--text":"_mc--body--coupon-tag--text_1l5ow_278","mc--body--coupon-tag--button":"_mc--body--coupon-tag--button_1l5ow_284","mc--header":"_mc--header_1l5ow_290","mc--header--subtitle":"_mc--header--subtitle_1l5ow_316","mc--notify":"_mc--notify_1l5ow_357","mc--notify--content":"_mc--notify--content_1l5ow_372","mc--notify--item":"_mc--notify--item_1l5ow_385",fadeInOut:gh,fadeOut:yh,"mc--card":"_mc--card_1l5ow_447","mc--card--actions":"_mc--card--actions_1l5ow_452","mc--card--actions--secondary":"_mc--card--actions--secondary_1l5ow_460","mc--card--actions--add-remove":"_mc--card--actions--add-remove_1l5ow_487","mc--card--actions--gift":"_mc--card--actions--gift_1l5ow_501","mc--card--content-info":"_mc--card--content-info_1l5ow_514","mc--card--details":"_mc--card--details_1l5ow_521","mc--card--link":"_mc--card--link_1l5ow_526","mc--product--unavailable":"_mc--product--unavailable_1l5ow_534","mc--card--name":"_mc--card--name_1l5ow_537","mc--card--price":"_mc--card--price_1l5ow_552","mc--card--price--old-price":"_mc--card--price--old-price_1l5ow_562","mc--card--price--price-details":"_mc--card--price--price-details_1l5ow_566","mc--card--product-link":"_mc--card--product-link_1l5ow_577","mc--discount":"_mc--discount_1l5ow_587","mc--discount--header":"_mc--discount--header_1l5ow_590","inputs--tooltip":"_inputs--tooltip_1l5ow_590","mc--discount--body":"_mc--discount--body_1l5ow_609","minicart--modal-modifier":"_minicart--modal-modifier_1l5ow_630"},nu=({item:{id:e,message:t,callback:n},removeNotification:o,ICONS:s})=>{const a=g.useRef(null),i=()=>{var l;(l=a.current)==null||l.setAttribute("data-animation-out","true")},c=l=>{o(l)};return r.jsx("div",{className:re["mc--notify--item"],ref:a,onAnimationEnd:()=>c(e),children:r.jsxs(d.SnackBar.Structure,{size:"medium",children:[r.jsx(d.SnackBar.Content,{title:t}),r.jsxs(d.SnackBar.Support,{children:[typeof n=="function"&&r.jsx(d.Button,{onClick:()=>{n(),i()},size:"small",variant:"tertiary",children:"Desfazer"}),r.jsx(d.Button,{iconNameStart:s.close,iconSize:"small",onClick:()=>i(),variant:"tertiary"})]})]})},e)};nu.displayName="MiniCart.Notify.Item";const ru=({ICONS:e})=>{const t=Do(),{removeNotification:n}=$o(),o=t.length?[...t].sort((s,a)=>a.id-s.id):[];return o.length?r.jsx("div",{className:re["mc--notify"],children:r.jsx("div",{className:re["mc--notify--content"],children:Array.isArray(o)&&o.map(s=>r.jsx(nu,{item:s,removeNotification:n,ICONS:e},s.id))})}):null};ru.displayName="MiniCart.Notifications";const xh=({handleSendEvent:e,onHandleRemove:t,product:n,MINICART_CONFIG:o,...s})=>{const a=Ut(),{toggleProduct:i}=Tt(),{itemOffered:{isVariationOf:{productGroupID:c}},quantity:l}=n;return r.jsx(d.Button,{...s,adornment:{end:r.jsx(d.Icon,{name:`favorite-${a.includes(c)?"true":"false"}`,size:"small"})},onClick:()=>{i(c),a.includes(c)||t({texture:"mini-cart-wishlist",title:`${o.messages.add_wishlist}`},l,()=>i(c)),e(a.includes(c)?"remove_from_wishlist":"add_to_wishlist","productEvents")},children:o.messages.add_wishlist_button})},ou=({handleSendEvent:e,product:t,ICONS:n,MINICART_CONFIG:o,...s})=>{const{addToCart:a,removeToCart:i}=ve(),{bundleItems:c=[],id:l,uniqueId:u,seller:p,offerings:m,quantity:f}=t,h=(_,y,x)=>{i(l,_.title,()=>{typeof x=="function"&&x(),a({id:l,quantity:y,seller:p},{id:l,texture:_.texture},!0)})};return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:re["mc--card--actions--add-remove"],children:[o.has_wishlist_button&&r.jsx(xh,{...s,product:t,handleSendEvent:e,onHandleRemove:h,ICONS:n,MINICART_CONFIG:o}),r.jsx(d.Button,{...s,adornment:{end:r.jsx(d.Icon,{name:n.delete,size:"small"})},underline:!0,variant:"secondary",state:"danger",onClick:()=>{h({texture:"mini-cart",title:`${o.messages.remove}`},f),e("remove_from_cart","skuEvents")},children:o.messages.remove_button})]}),o.has_gift_option&&r.jsx(Lt.Gift,{uniqueId:u,bundleItems:c,offerings:m,ICONS:n,MINICART_CONFIG:o})]})};ou.displayName="MiniCart.Card.Actions";const su=({bundleItems:e,offerings:t,uniqueId:n,ICONS:o,MINICART_CONFIG:s})=>{const[a,i]=g.useState(!1),{toggleGiftItemCart:c}=ve(),l=()=>{if(t instanceof Object&&Array.isArray(t)){const[m]=t;if(m){i(!0);const f=e.some(h=>h.id===m.id);c(n,String(m.id),f).then(()=>i(!1))}}},u=t[0],p=e.find(m=>m.id===u.id);return u&&"id"in u?r.jsx("div",{className:re["mc--card--actions--gift"],children:r.jsx(d.Checkbox,{adornment:r.jsx(d.Icon,{name:o.check}),checked:!!p,disabled:a,label:s.messages.giftPackage,onChange:l})}):null};su.displayName="MiniCart.Card.Gift";const au=({itemOffered:e})=>{const t=D.updatedResizedImg(e==null?void 0:e.image[0].url,{width:200,height:300});return r.jsx(ze,{href:`${e==null?void 0:e.slug}`,className:re["mc--card--product-link"],children:r.jsx(Pe.Image,{alt:(e==null?void 0:e.image[0].alternateName)||"Produto",src:t||"",width:108,height:164,objectFit:"unset"})})};au.displayName="MiniCart.Card.Media";const iu=({name:e,skuName:t,tagName:n,className:o})=>r.jsxs(r.Fragment,{children:[n&&r.jsx(d.Tag,{variant:"quaternary",title:n,style:{textTransform:"uppercase"},children:n}),r.jsx("p",{className:d.helpers.classNameConcat(re["mc--card--name"],o),children:D.getProductNameWithoutSku(e??"",t??"")})]});iu.displayName="MiniCart.Card.Name";const cu=({total:e,totalList:t})=>r.jsx(d.ProductInfo.Root,{children:r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{className:re["mc--card--price"],children:r.jsx(d.ProductInfo.Wrapper,{className:re["mc--card--price--details"],size:"small",layout:"horizontal",children:t&&e!==t?r.jsxs(r.Fragment,{children:[r.jsx(d.ProductInfo.Price,{label:"originalPrice",value:D.formatPriceToCurrency(t),size:"small"}),r.jsx(d.ProductInfo.Price,{label:"discountPrice",value:D.formatPriceToCurrency(e),size:"small"})]}):r.jsx(d.ProductInfo.Price,{label:"defaultPrice",value:D.formatPriceToCurrency(e),size:"small"})})})})});cu.displayName="MiniCart.ProductPrice";const lu=({product:e,TEXTURE_IMAGE:t,TOGGLE_STYLE_MODIFIER:n,storeId:o})=>{var p;const[s,a]=g.useState(""),i=g.useRef(null),{cartStore:{options:c}}=ve(),l=e.itemOffered.isVariationOf.productGroupID,u=g.useCallback(()=>{var f;const m=(f=c==null?void 0:c.find(h=>h.id===l))==null?void 0:f.texture;if(m){a(m);return}fetch(`https://${o}.myvtex.com/_v/proxy/catalog/product/info`,{method:"POST",body:JSON.stringify({ids:[l]})}).then(h=>h.json()).then(h=>{const _=h.data[0].items.find(y=>y.itemId===e.id);if(_){const y=_.images.find(x=>t.includes(x.imageLabel));if(y!=null&&y.imageUrl){a(y.imageUrl);return}a(_.images[0].imageUrl)}}).catch(h=>{console.error(h)})},[c,l,e.id,o]);return g.useEffect(()=>{if(!i.current)return;const m=new IntersectionObserver(f=>{f[0].isIntersecting&&u()});return m.observe(i.current),()=>{m.disconnect()}},[u]),r.jsx("div",{ref:i,children:r.jsx(d.ToggleStyle.Wrapper,{size:"small",style:n,children:r.jsx(d.ToggleStyle.Texture,{children:s?r.jsx(Pe.Image,{alt:((p=e.itemOffered)==null?void 0:p.image[0].alternateName)??"Produto",src:s,width:164,height:164,style:n}):r.jsx(Oc,{})})})})};lu.displayName="MiniCart.Card.Style";const uu=({product:e,MINICART_CONFIG:t,NAME_SPLIT_SYMBOL:n,TEXTURE_IMAGE:o,TOGGLE_STYLE_MODIFIER:s,storeId:a})=>{const{size:i}=D.getColorAndSizeFromSkuName(e.itemOffered.skuName??"",n);return r.jsxs(d.Utils.Row,{alignItems:"center",children:[r.jsx(lu,{product:e,TEXTURE_IMAGE:o,TOGGLE_STYLE_MODIFIER:s,storeId:a}),r.jsx(d.Utils.Divider,{direction:"vertical",size:"small",style:{height:24}}),i&&r.jsx(d.ToggleSize.Wrapper,{size:t.product_card.sku.size??"small",variation:t.product_card.sku.variation??"fill",className:re["mc-container-actions--toggle-size-modifier"],style:{backgroundColor:`${re.brandPrimaryLighter}`},children:r.jsx(d.ToggleSize.Text,{children:i})})]})};uu.displayName="MiniCart.Card.Sku";const Lt={Actions:ou,Gift:su,Media:au,Name:iu,Price:cu,Sku:uu},vh=e=>{var t;return{price:e.sellingPrice/100,listPrice:e.listPrice/100,totalPrice:(((t=e.priceDefinition)==null?void 0:t.total)??0)/100,totalListPrice:e.listPrice*e.quantity/100}},du=({available:e=!0,index:t,product:n,ICONS:o,MINICART_CONFIG:s,NAME_SPLIT_SYMBOL:a,TEXTURE_IMAGE:i,TOGGLE_STYLE_MODIFIER:c,storeId:l})=>{var f,h;const{sendDataLayerEvent:u}=ae(),p=vh(n),m=(_,y)=>{const x={commonData:{...n,...p},customData:{index:t},event:_};if(y==="skuEvents"){const v={...n,...p};x.supportData={selectedSkus:[v]},x.commonData.products=[v]}u({functionKey:y,data:x})};return r.jsxs("div",{className:d.helpers.classNameConcat(re["mc--card"],e?"":re["mc--card--unavailable"]),children:[r.jsx(Lt.Media,{itemOffered:n.itemOffered}),r.jsxs("div",{className:re["mc--card--content-info"],children:[r.jsx(Lt.Name,{name:((f=n.itemOffered)==null?void 0:f.name)??"",skuName:(h=n.itemOffered)==null?void 0:h.skuName}),r.jsxs("div",{className:re["mc--card--details"],children:[r.jsx("div",{className:re["mc--card--actions"],children:e?r.jsx(Lt.Price,{total:p.price,totalList:p.listPrice}):r.jsx(d.Tag,{variant:"secondary",size:"small",children:"Indisponível"})}),r.jsxs("div",{className:re["mc--card--actions--secondary"],children:[e&&r.jsx(Lt.Sku,{product:n,MINICART_CONFIG:s,NAME_SPLIT_SYMBOL:a,TEXTURE_IMAGE:i,TOGGLE_STYLE_MODIFIER:c,storeId:l}),r.jsx(Lt.Actions,{handleSendEvent:m,product:n,size:"small",variant:"tertiary",ICONS:o,MINICART_CONFIG:s})]})]})]})]})};du.displayName="MiniCart.Card";const mu=({type:e="positive",ICONS:t,MESSAGE_CASHBACK:n})=>{var a;const{toExpire:o}=qt(),s=((a=o==null?void 0:o.cashback)==null?void 0:a.reduce((i,c)=>i+c.remaining_value,0))??0;return s>0?r.jsxs("div",{className:d.helpers.classNameConcat(re["mc--cashback"],re[`mc--cashback--${e}`]),children:[r.jsx(d.Icon,{name:t.alert_circle,size:"medium"}),r.jsxs("p",{children:[r.jsx("span",{children:D.formatPriceToCurrency(s)})," ",n.title]})]}):null};mu.displayName="MiniCart.Cashback";const pu=({type:e,ICONS:t,MINICART_CONFIG:n})=>{const{addCouponSeller:o,removeCoupon:s,removeSellerCode:a,cartStore:{marketingData:i,openTextField:c}}=ve(),[l,u]=g.useState(!1),[p,m]=g.useState(!1),f=g.useCallback(()=>{let x="";return e==="coupon"?x=(i==null?void 0:i.coupon)??"":x=String((c==null?void 0:c.value)??""),x.toUpperCase()??""},[i,c,e]),[h,_]=g.useState(!!f()),y=async x=>{m(!0),!!f()&&(e==="coupon"?await s():await a(),_(!1),u(!1)),await o(x,e).then(C=>{if(!C.statusOk&&x||C.code!==200){x?(u(!0),_(!1)):u(!1);return}_(!0),u(!1)}).catch(()=>u(!0)).finally(()=>m(!1))};return r.jsx(De.Field,{hasError:l,hasSuccess:h,isLoading:p,onHandler:y,type:e,title:e==="coupon"?`${n.messages.descount_cupom_placeholder}`:`${n.messages.sellers_code_placeholder}`,value:f(),MINICART_CONFIG:n,ICONS:t})};pu.displayName="MiniCart.CouponSeller";const fu=({ICONS:e,MINICART_CONFIG:t,PLP_NOT_RESULT:n})=>{const{router:o}=ce(),s=()=>{o.push(n.link)};return r.jsxs(d.Utils.Column,{alignContent:"center",alignItems:"center",gap:"24px",className:re["mc--body--empty--feedback"],children:[r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{children:r.jsxs("p",{className:`typography-style-body-xs ${re["mc--body--empty--text"]}`,children:[t.messages.empty_card," "]})})}),r.jsx(d.Button,{variant:"tertiary",size:"large",onClick:()=>s(),"data-close":!0,adornment:{end:r.jsx(d.Icon,{name:e.arrow_right,size:"medium"})},children:t.messages.empty_bag})]})};fu.displayName="MiniCart.Feedback";const bh=e=>{const t=e.replace(/\D/g,"");return t.length>5?`${t.slice(0,5)}-${t.slice(5,8)}`:t},hu=({feedback:e,hasError:t,onHandler:n,hasSuccess:o,type:s,title:a,value:i,ICONS:c})=>{const[l,u]=g.useState(i);g.useEffect(()=>{t||u(i)},[i,t]);const p=()=>t?r.jsx(d.Icon,{name:c.delete_circle}):String(i).length&&o?r.jsx(d.Icon,{name:c.check_circle}):null,m=()=>{if(s==="seller"){const y=String(i).includes(" - ")?String(i).split(" - ")[0]:l;u(y)}},f=()=>{if(s==="seller"){const y=String(i).includes(" - ")?i:l;u(y)}},h=y=>{const x=y.currentTarget.value;if(x===""&&typeof n=="function"||o&&String(i).length>0&&x!==String(i)||t&&x!==String(i)){u(""),n("");return}if(s==="cep"){const C=bh(x);u(C)}else u(x)},_=y=>{if(y.key.toLocaleLowerCase()==="enter"&&typeof n=="function"){const x=y.currentTarget.value;n(x)}};return r.jsx(d.TextField.Input,{adornment:{end:p()},mode:"over-label",label:a,feedback:e,value:l,type:"text",onFocus:m,onBlur:f,onChange:h,onKeyDown:_})};hu.displayName="MiniCart.Field.Input";const _u=({title:e,ICONS:t,MINICART_CONFIG:n,...o})=>{const s=g.useRef(null),{hasSuccess:a,hasError:i,isLoading:c,onHandler:l,type:u,value:p}=o,m=()=>i?"error":String(p).length&&a?"success":"none",f=g.useCallback(()=>{if(s.current){const y=s.current.querySelector("input");y&&typeof l=="function"&&(p!==""||i?(l(""),y.value=""):l((y==null?void 0:y.value)??""))}},[l,p,i]),h=m();return r.jsx("div",{ref:s,children:r.jsx(d.TextField.Structure,{className:re["mc--field"],input:r.jsx(hu,{...o,feedback:h,title:e,ICONS:t}),right:r.jsx(d.Button,{"data-has-success":!a,size:"medium",title:String(p).length&&a||i?"Remover":"Aplicar",onClick:()=>f(),disabled:c,children:String(p).length&&a||i?r.jsx(d.Icon,{name:"close",size:"small"}):`${n.messages.promo_code_button}`}),supportText:u==="cep"&&h==="success"?r.jsx(d.TextField.SupportText,{text:"Mais informações de frete na etapa a seguir",feedback:"success",title:"support"}):null})})};_u.displayName="MiniCart.Field";const ca=e=>{const t=e*100;return Math.round(t)},jh=e=>(e/100).toFixed(2).replace(".",","),Ch=(e,t)=>{const{valueType:n,remainingValueToActivate:o}=e;if(n==="quantity")return`Adicione mais ${o} ${o===1?"item":"itens"} ${t}`;if(n==="price"){const s=o===100?"Falta":"Faltam",a=jh(o);return`${s} R$ ${a} ${t}`}return t},gu=({ICONS:e})=>{var v;const{promotionRules:t,data:n,cartStore:o,cartStore:{items:s,marketingData:a},addCouponSeller:i,setIsOpen:c}=ve(),{sendDataLayerEvent:l}=ae(),u=(v=n==null?void 0:n.promotion)==null?void 0:v.promotionCart,p=g.useRef(!1),{router:m}=ce();if(g.useEffect(()=>{(u==null?void 0:u.selectPromotion)==="Cupom"&&(t==null?void 0:t.remainingValueToActivate)&&(t==null?void 0:t.remainingValueToActivate)<=0&&(u==null?void 0:u.cupom)&&!p.current&&(a==null?void 0:a.coupon)!==u.cupom&&(p.current=!0,i(u.cupom,"coupon")),t!=null&&t.remainingValueToActivate&&(t==null?void 0:t.remainingValueToActivate)<=0&&l({functionKey:"viewCartEvent",data:{event:"closeness_filled",commonData:{cartStore:o}}}),t!=null&&t.remainingValueToActivate&&(t==null?void 0:t.remainingValueToActivate)>0&&(p.current=!1)},[u==null?void 0:u.selectPromotion,t==null?void 0:t.remainingValueToActivate,u==null?void 0:u.cupom,a==null?void 0:a.coupon,i]),!t||!u||u.selectPromotion==="Desativar"||s.length===0)return null;const f=u.title,h=u.subtitle,_=u.titleSuccess,y=u.subtitleSuccess,x=u.linkLabel;return r.jsxs("div",{className:re["mc--body--promotion"],children:[t.remainingValueToActivate>0&&r.jsx(d.Closeness,{className:re["mc--body--promotion--closeness"],title:Ch(t,f),subtitle:h,percentage:ca(t.completeness),iconLink:e.arrow_right,linkLabel:x,onClick:()=>{l({functionKey:"viewCartEvent",data:{event:"closeness_view_more",commonData:{cartStore:o}}}),m.push(`${u.link}`),c(!1)}}),t.remainingValueToActivate<=0&&r.jsx(d.Closeness,{className:`${re["mc--body--promotion--closeness"]} ${re["mc--body--promotion--closeness--success"]}`,title:_,subtitle:y,percentage:ca(t.completeness)})]})};gu.displayName="MiniCart.Modal.Body.Promotion";const yu=({TIPBAR_CONFIGS:e})=>{const{data:t,cartStore:n,cartStore:{items:o,marketingData:s},addCouponSeller:a}=ve(),i=t==null?void 0:t.flags.flagCart.flagCupom,c=(s==null?void 0:s.coupon)===(i==null?void 0:i.valueCupom),[l,u]=g.useState(!1),[p,m]=g.useState(!1);if(g.useEffect(()=>{l&&setTimeout(()=>{u(!1)},e.snackbar_timeout)},[l]),g.useEffect(()=>{p&&setTimeout(()=>{m(!1)},e.snackbar_timeout)},[p]),!i||i.active==="Desativar"||i.valueCupom===""||o.length===0)return null;const f=async()=>{if(!n.items.length){m(!0);return}(await a(i==null?void 0:i.valueCupom,"coupon")).code!==200&&u(!0)};return r.jsxs("div",{className:re["mc--body--coupon-tag"],style:{backgroundColor:`${i.tagColor}`,color:`${i.textColor}`},children:[r.jsx("div",{className:re["mc--body--coupon-tag--text"],dangerouslySetInnerHTML:{__html:i.value}}),r.jsx("div",{className:re["mc--body--coupon-tag--button"],children:r.jsx(d.Button,{variant:"quaternary",mode:"inverse",onClick:f,disabled:c,children:c?"Cupom Aplicado":"Aplicar Cupom"})})]})};yu.displayName="MiniCart.Modal.Body.CouponTag";const xu=({children:e,ICONS:t,MINICART_CONFIG:n,NAME_SPLIT_SYMBOL:o,PLP_NOT_RESULT:s,TEXTURE_IMAGE:a,TIPBAR_CONFIGS:i,TOGGLE_STYLE_MODIFIER:c,storeId:l})=>{const{cartStore:{items:u,messages:p}}=ve();return r.jsxs(d.Modal.Body,{className:re["mc--body"],children:[e,r.jsx(gu,{ICONS:t}),r.jsx(yu,{TIPBAR_CONFIGS:i}),r.jsx("div",{className:re["mc--body--products"],children:Array.isArray(u)&&u.length?u.map((m,f)=>{const h=p.find(_=>{var y;return _.code==="withoutStock"&&((y=_.fields)==null?void 0:y.ean)===m.ean})!==void 0;return r.jsx(De.Card,{available:!m.availability.includes("outStock")||!h,index:f,product:m,ICONS:t,MINICART_CONFIG:n,NAME_SPLIT_SYMBOL:o,TEXTURE_IMAGE:a,TOGGLE_STYLE_MODIFIER:c,storeId:l},`${m.id}-${m.itemOffered.sku}-${f}`)}):r.jsx(De.Feedback,{ICONS:t,MINICART_CONFIG:n,PLP_NOT_RESULT:s})})]})};xu.displayName="MiniCart.Body";const vu=({children:e,storeConfig:t,MINICART_CONFIG:n})=>{const{cartStore:o}=ve();if(o.items.length===0)return null;const s=()=>{var i;const a=new URLSearchParams({orderFormId:o.id,...((i=o.marketingData)==null?void 0:i.utmCampaign)&&{utm_campaign:o.marketingData.utmCampaign}});window.location.href=`${t.checkoutUrl}?${a.toString()}#/cart`};return r.jsxs(d.Modal.Footer,{className:re["mc--footer"],children:[e,r.jsx("div",{className:re["mc--footer--actions"],children:r.jsx(d.Button,{variant:"primary",size:"large","data-close":!0,className:re["mc--footer--actions-button"],onClick:s,children:n.messages.checkout_button})})]})};vu.displayName="MiniCart.Modal.Footer";const bu=({children:e,ICONS:t,MINICART_CONFIG:n,Z_INDEX_WAR:o})=>{const[s,a]=g.useState(!1),i=g.useRef(null),c=()=>a(l=>!l);return r.jsxs(r.Fragment,{children:[s&&r.jsx(d.Tooltip.Root,{arrow:"right",position:"top",top:-3,left:-3,component:r.jsx("p",{children:"Código da vendedora, cupom ou cálculo do frete"}),id:"inputs--tooltip",className:re["inputs--tooltip"],style:{zIndex:o.modal},isOpen:!0,size:"medium",parent:i.current}),r.jsxs(d.Accordion.Wrapper,{className:re["mc--discount"],children:[r.jsx(d.Accordion.Header,{id:"frete",title:"Frete",closeIndicator:r.jsx(d.Icon,{name:t.arrow_up,size:"medium"}),openIndicator:r.jsx(d.Icon,{name:t.arrow_down,size:"medium"}),className:d.helpers.classNameConcat(re["mc--discount--header"]),startOpen:n.promotion_input_starts_open,children:r.jsxs(d.TextStructure.Root,{children:[r.jsx(d.TextStructure.DivWrapper,{children:r.jsxs("h3",{className:"typography-style-body-sm",children:[n.messages.promo_code_title," "]})}),r.jsx("div",{ref:i,onMouseEnter:c,onMouseLeave:c,"aria-label":"Mostrar descrição",children:r.jsx(d.Icon,{name:t.alert_circle,size:"small"})})]})}),r.jsx(d.Accordion.Body,{className:re["mc--discount--body"],children:e})]})]})};bu.displayName="MiniCart.Discount";const ju=({discount:e,shipping:t,total:n})=>{var l,u;const{data:o}=ve(),s=(u=(l=o==null?void 0:o.flags)==null?void 0:l.flagCart)==null?void 0:u.flagTotal,a=n-Math.abs(e??0)+(t??0),i=t===0?"Frete Grátis":D.formatPriceToCurrency((t??0)/100),c=[{title:"Frete",value:t===void 0?"A calcular":i},{title:"Desconto",value:D.formatPriceToCurrency((e??0)/100)},{message:(s==null?void 0:s.value)??"",title:"Total",value:`1x de ${D.formatPriceToCurrency(a/100)}`}];return r.jsx("div",{className:re["mc--footer--total"],children:Array.isArray(c)&&c.map((p,m)=>r.jsxs("div",{className:re["mc--footer--total--info"],"data-discount":p.title==="Desconto",children:[r.jsx("p",{children:p.title}),r.jsxs("div",{className:re["mc--footer--total--info--content"],children:[p.message&&(s==null?void 0:s.active)==="Ativar"&&r.jsx(d.Tag,{variant:"primary",title:p.message,style:{backgroundColor:s==null?void 0:s.tagColor,color:s==null?void 0:s.textColor},children:p.message}),r.jsx(d.ProductInfo.Price,{className:re["mc--footer--total--info"],label:p.title,value:p.value})]})]},m))})};ju.displayName="MiniCart.Modal.Footer.Resume.Items";const Cu=()=>{var s,a,i;const{totalizers:e}=Pt(),t=((s=e.find(c=>c.id==="Items"))==null?void 0:s.value)??0,n=(a=e.find(c=>c.id==="Discounts"))==null?void 0:a.value,o=(i=e.find(c=>c.id==="Shipping"))==null?void 0:i.value;return r.jsx(ju,{discount:n??0,total:t,shipping:o})};Cu.displayName="MiniCart.Modal.Footer.Totals";const Su=({ICONS:e,MINICART_CONFIG:t})=>{const{isMobile:n}=ne(),{cartStore:{items:o}}=ve(),s=o.reduce((a,i)=>a+(i.quantity??0),0);return r.jsx(d.Modal.Header,{navigation:"top",className:re["mc--header"],children:r.jsxs(d.Modal.Controls,{navigation:"top",isMobile:!!n,children:[r.jsx(d.Modal.Title,{navigation:"top",title:t.messages.title}),r.jsx("span",{className:re["mc--header--subtitle"],children:s!==1?`[${s}] Produtos`:`[${s}] Produto`}),r.jsx(d.Button,{"data-close":!0,iconNameStart:e.close,size:"small",variant:"tertiary"})]})})};Su.displayName="MiniCart.Modal.Header";const wu=({ICONS:e,MINICART_CONFIG:t})=>{const{cartStore:{shippingData:n},shipping:o,removeCEP:s}=ve(),{sendDataLayerEvent:a}=ae(),[i,c]=g.useState(!1),[l,u]=g.useState(!1),p=g.useCallback(()=>{var C;const v=((C=n==null?void 0:n.address)==null?void 0:C.postalCode)??"";return v.length===8&&!v.includes("-")?`${v.slice(0,5)}-${v.slice(5)}`:v},[n]),[m,f]=g.useState(!!p()),h=()=>{f(!1),c(!1)},_=v=>{var C;if(typeof v=="object"&&(v!=null&&v.logisticsInfo))return(C=v.logisticsInfo)==null?void 0:C.reduce((j,b)=>{var R;const w=(R=b==null?void 0:b.slas)==null?void 0:R.find(A=>(A==null?void 0:A.id)===(b==null?void 0:b.selectedSla));if(!w)return j;const P=parseInt(String((w==null?void 0:w.shippingEstimate)??"").replace("bd","")),S=Number((((w==null?void 0:w.price)??0)/100).toFixed(2));if(j.shipping_tier===void 0)return j.shipping_tier=b==null?void 0:b.selectedSla,j.delivery_time=P.toString(),j.shipping=S,j.flag_retirada=(b==null?void 0:b.selectedDeliveryChannel)==="delivery"?"false":"true",j;const N=parseInt(j.delivery_time??"0");return P>N&&(j.delivery_time=P.toString()),j.shipping=(j.shipping??0)+S,j},{shipping_tier:void 0,delivery_time:void 0,flag_retirada:void 0,shipping:void 0,currency:"BRL"})},y=async v=>{const C=v.replace(/\D/g,"");if(C.length!==8)return!1;try{return!(await St.get(`https://viacep.com.br/ws/${C}/json/`)).data.erro}catch{return!1}},x=async v=>{if(u(!0),!!p()||!(v!=null&&v.trim())){await s(),h(),u(!1);return}if(!await y(v)){c(!0),f(!1),u(!1);return}try{const w=await o(v);if(c(!1),w){f(!0);const P=_(w);P&&a({functionKey:"readyEvents",data:{event:"search_zipcode",readyData:P}})}}catch{c(!0)}finally{u(!1)}};return r.jsx(De.Field,{hasSuccess:m,hasError:i,isLoading:l,onHandler:x,title:`${t.messages.shipping_calculation_placeholder}`,type:"cep",value:p(),ICONS:e,MINICART_CONFIG:t})};wu.displayName="MiniCart.Shipping";const Pu=()=>{var n,o;const{data:e}=ve(),t=(o=(n=e==null?void 0:e.flags)==null?void 0:n.flagCart)==null?void 0:o.flagHeader;return t!=null&&t.value?r.jsx(d.Tag,{variant:"tertiary",title:t==null?void 0:t.value,size:"small",adornment:{start:t!=null&&t.enableIcon&&(t!=null&&t.icon)?r.jsx(d.Icon,{name:t==null?void 0:t.icon,style:{color:t==null?void 0:t.iconColor}}):null},style:{background:t==null?void 0:t.tagColor,color:t==null?void 0:t.textColor,width:"100%"},children:t==null?void 0:t.value}):null};Pu.displayName="MiniCart.TagMessage";const De={Body:xu,Card:du,Cashback:mu,CouponSeller:pu,Discount:bu,Field:_u,Feedback:fu,Shipping:wu,Footer:vu,Header:Su,TagMessage:Pu,Totals:Cu},Sh=({ICONS:e,MINICART_CONFIG:t,NAME_SPLIT_SYMBOL:n,PLP_NOT_RESULT:o,TEXTURE_IMAGE:s,TIPBAR_CONFIGS:a,TOGGLE_STYLE_MODIFIER:i,Z_INDEX_WAR:c,storeConfig:l,minicartStyleModifiers:u})=>{const{isOpen:p,setIsOpen:m}=ve(),{isMobile:f}=ne();return r.jsxs(d.Modal.Root,{className:d.helpers.classNameConcat(re["minicart--modal-modifier"],u),isMobile:!0,isOpen:p,setIsOpen:m,style:{zIndex:c.modal},variant:f?"sideBottom":"sideRight",children:[r.jsx(De.Header,{ICONS:e,MINICART_CONFIG:t}),r.jsx(De.Body,{ICONS:e,MINICART_CONFIG:t,NAME_SPLIT_SYMBOL:n,PLP_NOT_RESULT:o,TEXTURE_IMAGE:s,TOGGLE_STYLE_MODIFIER:i,TIPBAR_CONFIGS:a,storeId:l.api.storeId,children:r.jsx(De.TagMessage,{})}),r.jsxs(De.Footer,{MINICART_CONFIG:t,storeConfig:l,children:[r.jsxs(De.Discount,{ICONS:e,MINICART_CONFIG:t,Z_INDEX_WAR:c,children:[r.jsx(De.CouponSeller,{type:"seller",ICONS:e,MINICART_CONFIG:t}),r.jsx(De.CouponSeller,{type:"coupon",ICONS:e,MINICART_CONFIG:t}),r.jsx(De.Shipping,{ICONS:e,MINICART_CONFIG:t})]}),r.jsx(De.Totals,{})]}),r.jsx(ru,{ICONS:e})]})},Nu=({tipBar:e,minicartStyleModifiers:t,menuV2:n,storeConfig:o,className:s})=>{const{structureRef:a,rootRef:i,CONSTANTS:c}=Ne(),{header:{HEADER_CONFIGS:l,Z_INDEX_WAR:u},minicart:p}=c;return r.jsx(d.Header.Structure,{innerRef:a,adornment:{start:e},style:{position:"sticky",top:0,zIndex:u.header},className:d.helpers.classNameConcat(cs["header-animation"],s),children:r.jsxs(d.Header.Root,{innerRef:i,style:{zIndex:u.header},variant:l.default_variant,interactiveVariant:l.interactive_variant,children:[n??r.jsxs(ah,{children:[r.jsx("div",{className:D.responsive["responsive-mobile-block"],style:{height:"100%",width:"100%",zIndex:u.header_mobile},children:r.jsx(tu,{storeConfig:o})}),r.jsx("div",{className:D.responsive["responsive-desktop-block"],style:{height:"100%",width:"100%",zIndex:u.header_desktop},children:r.jsx(Bl,{storeConfig:o})})]}),r.jsx(hh,{children:r.jsx(Sh,{...p,minicartStyleModifiers:t})}),r.jsx(ns,{title:"Produto adicionado à sua sacola!",CONSTANTS:c.addToCart})]})})};Nu.displayName="Header";const wh="_shippingFreight_6z8rf_6",Ph="_shippingFreight__postalCodeGrid_6z8rf_10",Nh="_shippingFreight__grid_6z8rf_14",Eh="_shippingFreight__grid__title_6z8rf_18",Ih="_shippingFreight__grid__remember_6z8rf_29",Rh="_postalCodeContainer_6z8rf_44",Th="_deliveryStatusBar__tag_6z8rf_49",Ah="_deliveryStatusBarError__tag_6z8rf_66",kh="_deliveryInfo_6z8rf_74",Oh="_deliveryInfo__content_6z8rf_78",Lh="_deliveryInfo__text_6z8rf_84",Mh="_deliveryInfo__title_6z8rf_89",Dh="_deliveryInfo__subtitle_6z8rf_99",$h="_deliveryInfo__tooltipIcon_6z8rf_109",zh="_deliveryInfo__tooltip_6z8rf_109",Fh="_freightGrid_6z8rf_148",Bh="_freightContainer_6z8rf_155",Uh="_freightOption__content_6z8rf_160",qh="_freightOption__value_6z8rf_166",Hh="_freightOption__title_6z8rf_177",Vh="_freightOption__title_item_6z8rf_181",Wh="_freightOption__paragraph_6z8rf_192",de={shippingFreight:wh,shippingFreight__postalCodeGrid:Ph,shippingFreight__grid:Nh,shippingFreight__grid__title:Eh,shippingFreight__grid__remember:Ih,postalCodeContainer:Rh,deliveryStatusBar__tag:Th,deliveryStatusBarError__tag:Ah,deliveryInfo:kh,deliveryInfo__content:Oh,deliveryInfo__text:Lh,deliveryInfo__title:Mh,deliveryInfo__subtitle:Dh,deliveryInfo__tooltipIcon:$h,deliveryInfo__tooltip:zh,freightGrid:Fh,freightContainer:Bh,freightOption__content:Uh,freightOption__value:qh,freightOption__title:Hh,freightOption__title_item:Vh,freightOption__paragraph:Wh,"input-modifier":"_input-modifier_6z8rf_207","freight--tooltip":"_freight--tooltip_6z8rf_227"},Gh=({icon:e,title:t,subtitle:n,packageCount:o,packageUnit:s="",labelDescription:a,freightConfig:i,toolTipZIndex:c})=>{const[l,u]=g.useState(!1),p=g.useRef(null),m=()=>u(f=>!f);return r.jsxs("div",{className:de.deliveryInfo,ref:p,children:[r.jsx(d.Tooltip.Root,{arrow:"bottom",component:r.jsx("div",{children:r.jsx("p",{children:i.messages.select_size_tag})}),id:"freight--tooltip",className:de["freight--tooltip"],style:{zIndex:c},isOpen:!0,size:"medium",position:"top",top:"-170%",left:"4%",parent:p.current}),r.jsxs("div",{className:de.deliveryInfo__content,children:[r.jsx("div",{className:de.deliveryInfo__icon,children:r.jsx(d.Icon,{name:e,size:"medium"})}),r.jsxs("div",{className:de.deliveryInfo__text,children:[r.jsxs("span",{className:de.deliveryInfo__title,children:[t," ",o," ",s]}),n&&r.jsx("span",{className:de.deliveryInfo__subtitle,children:n})]}),a&&r.jsxs("div",{className:de.deliveryInfo__tooltipIcon,onMouseEnter:m,onMouseLeave:m,"aria-label":"Mostrar descrição",children:[r.jsx("span",{children:r.jsx(d.Icon,{name:i.icons.feedback_help,size:"small"})}),l&&r.jsx("div",{className:de.deliveryInfo__tooltip,children:a})]})]})]})},Kh=({value:e,title:t,paragraph:n})=>r.jsx("div",{className:de.freightOption,children:r.jsxs("div",{className:de.freightOption__content,children:[r.jsx("span",{className:de.freightOption__value,children:e}),r.jsx("span",{className:de.freightOption__title,children:r.jsx(d.TextStructure.Root,{children:r.jsxs(d.TextStructure.DivWrapper,{className:de.footer__item,children:[r.jsx("span",{className:de.freightOption__title_item,children:t}),n&&r.jsx("span",{className:de.freightOption__paragraph,children:n})]})})})]})}),Xh=({children:e})=>r.jsx("div",{className:de.freightContainer,children:e}),Yh=({children:e})=>r.jsx("div",{className:de.freightGrid,children:e}),Qh=({children:e})=>r.jsx("div",{className:de.postalCodeContainer,children:e}),la=({message:e,seller:t="",size:n="small",setError:o})=>r.jsx("div",{className:o?de.deliveryStatusBarError:de.deliveryStatusBar,children:r.jsxs(d.Tag,{title:e,className:o?de.deliveryStatusBarError__tag:de.deliveryStatusBar__tag,size:n,children:[e," ",!o&&t]})}),Zh=e=>{const t=parseInt(e,10);return t===1?`${t} dia`:`${t} dias`},Jh=e=>{var n,o,s;const t=[];return(s=(o=(n=e==null?void 0:e.logisticsInfo)==null?void 0:n[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},e_=({component:e,parent:t,top:n,left:o,target:s,contentRef:a,freightConfig:i,toolTipZIndex:c=999,...l})=>{const{isMobile:u}=ne();return r.jsx(r.Fragment,{children:u?r.jsx(d.Tooltip.Root,{arrow:"bottom",component:r.jsxs("div",{...l,ref:a,children:[e,r.jsx("p",{children:i.messages.select_size_tag})]}),id:"freight--tooltip",className:de["freight--tooltip"],style:{zIndex:c},isOpen:!0,size:"medium",position:"top",top:"-170%",left:"4%",parent:t}):r.jsx(d.Tooltip.Root,{arrow:"bottom",component:r.jsxs("div",{...l,ref:a,children:[e,r.jsx("p",{children:i.messages.select_size_tag})]}),id:"freight--tooltip",className:de["freight--tooltip"],style:{zIndex:c},isOpen:!0,size:"medium",position:"top",top:"-110%",left:"3%",parent:t})})},t_=({onUpdateFreightItems:e,sellerId:t,size:n,skuId:o,quantity:s,setError:a,setIsButtonClicked:i,component:c,freightConfig:l,toolTipZIndex:u})=>{var L,O,G,M;const p=Pt(),m=Pt(U=>U.shipping),[f,h]=g.useState(),[_,y]=g.useState(!1),[x,v]=g.useState(!1),[C,j]=g.useState(!1),b=(O=(L=p.shippingData)==null?void 0:L.address)==null?void 0:O.postalCode,w=!(f!=null&&f.length)&&b?b:f,P=g.useRef(null),S=async U=>{const X=U.target.value.replace(/\D/g,"").slice(0,8);X.length>5?h(X.replace(/^(\d{5})(\d{1,3})/,"$1-$2")):h(X)},N=async U=>{const Y=U.target.value.replace(/\D/g,"");try{if((await St.get(`https://viacep.com.br/ws/${Y}/json/`)).data.erro){a&&a(l.messages.cep_not_found),i(!1),v(!0);return}a&&a(""),v(!1)}catch{console.log("Erro ao validar o CEP. Tente novamente mais tarde.")}},R=async()=>{y(!0);try{const U=await St.post("/api/checkout/simulation",{items:[{id:o,quantity:s,seller:t}],country:"BRA",postalCode:w});e(Jh(U.data))}catch(U){console.error("Erro ao atualizar o documento:",U)}finally{y(!1),m(w,"BRA")}},A=async()=>{if(!o){j(!0),setTimeout(()=>j(!1),1500);return}await N({target:{value:w}}),_||(R(),i(!0))};return r.jsxs("div",{ref:P,style:{position:"relative"},children:[!o&&C?r.jsx(e_,{component:c,isOpen:C,parent:P.current,toolTipZIndex:u,freightConfig:l}):r.jsx(r.Fragment,{}),r.jsx("div",{style:{position:"relative"},children:r.jsx(d.TextField.Structure,{title:"structure",style:{width:"100%"},input:r.jsx(d.TextField.Input,{defaultValue:(M=(G=p.shippingData)==null?void 0:G.address)==null?void 0:M.postalCode,label:l.messages.text_input_label,title:"textfield",value:f,sizeVariant:n,onMouseOver:()=>o?null:j(!0),onMouseOut:()=>o?null:j(!1),mode:"simple",onChange:S,onKeyDown:U=>{U.key==="Enter"&&A()},className:de["input-modifier"],feedback:x?"error":"none"}),right:r.jsx(d.Button,{onClick:A,size:n,title:"button",children:_?r.jsx(d.Spinner,{size:"small",indicatorColor:"#ffffff"}):l.messages.text_input_btn})})})]})},n_=({children:e,freightConfig:t})=>r.jsxs("div",{className:de.shippingFreight,children:[r.jsxs("div",{className:de.shippingFreight__grid,children:[r.jsx("span",{className:de.shippingFreight__grid__title,children:t.messages.title}),r.jsx("span",{className:de.shippingFreight__grid__remember,children:r.jsx(Le,{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})})]}),r.jsx("div",{className:de.shippingFreight__postalCodeGrid,children:e})]}),r_=({children:e})=>r.jsx("div",{className:de.freightContainer,children:e}),Eu=({className:e,sellerId:t,skuId:n,quantity:o,size:s,seller:a,local:i,CONSTANTS_PROPS:c})=>{const{sendDataLayerEvent:l}=ae(),[u,p]=g.useState(""),[m,f]=g.useState([]),[h,_]=g.useState(""),[y,x]=g.useState(!1),v=j=>p(j),C=j=>{f(j),l({functionKey:"readyEvents",data:{event:"search_zipcode",readyData:{shippings:j.map(b=>({shipping_tier:b.id,delivery_time:b.shippingEstimate.replace("bd",""),flag_pickup:b.name.toLowerCase().includes("retirada")?"true":"false",shipping:b.price,currency:c.currency||"BRL"}))}}})};return r.jsxs(r_,{className:e,children:[r.jsxs(n_,{freightConfig:c.freightConfig,children:[r.jsx(Qh,{children:r.jsx(t_,{onUpdateFreightItems:C,skuId:n,quantity:o,size:s,sellerId:t,local:i,setError:_,setIsButtonClicked:x,freightConfig:c.freightConfig,toolTipZIndex:c.toolTipZIndex})}),h?r.jsx(la,{size:s,message:h,setError:_}):m.length>0&&r.jsx(la,{size:s,message:c.freightConfig.messages.delivered_by,seller:a})]}),y&&!h?m.length>0&&r.jsxs(Xh,{children:[r.jsx(Yh,{children:m.filter(({id:j})=>!j.includes("Retirada")).map(j=>r.jsx(Kh,{id:j.id,value:D.freightParsePrice({valueInCents:j.price,hasFree:!1,freeTaxMessage:c.freightConfig.messages.free_tax}),title:j.name,paragraph:`${c.freightConfig.messages.prefix_days}${Zh(j.shippingEstimate)}`,radioValue:u,changeValue:v},j.id))}),c.deliveryInfoBoxesAllowed?r.jsx(Gh,{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}):r.jsx(r.Fragment,{})]}):null]})},Nt={"pcd-navigation--breadcrumb":"_pcd-navigation--breadcrumb_1243w_1","pdc-navigation--content":"_pdc-navigation--content_1243w_28","pdc-navigation--filters":"_pdc-navigation--filters_1243w_54","pdc-navigation--filters--content":"_pdc-navigation--filters--content_1243w_67","pdc-navigation--selected":"_pdc-navigation--selected_1243w_139","pdc-navigation--selected--container":"_pdc-navigation--selected--container_1243w_152","pdc-navigation":"_pdc-navigation_1243w_28"},o_=({children:e,href:t,isLast:n,title:o,ICONS:s})=>r.jsx(d.BreadCrumb.Item,{adornment:{end:n&&r.jsx(d.Icon,{name:s.arrow_right})},children:n?r.jsx(Le,{href:t??"/",size:"medium",title:o,disableUnderline:!0,children:e}):e}),Iu=()=>{var a;const{state:e}=Fe(),{ICONS:t}=$e(),n=e!=null&&e.term&&e.term.length>0?`/${e.term}`:"",o=decodeURIComponent((a=e==null?void 0:e.base)!=null&&a.length?e.base:n??n).slice(1).split("/"),s=ac(o);return r.jsx("div",{className:Nt["pcd-navigation--breadcrumb"],children:r.jsx(d.BreadCrumb.DivWrapper,{children:r.jsx(d.BreadCrumb.List,{children:Array.isArray(s)&&s.map((i,c)=>{var l,u;return g.createElement(o_,{...i,isLast:c!==s.length-1,key:i.href,title:(l=i.name)==null?void 0:l.replace(/-/g," "),ICONS:t},(u=i.name)==null?void 0:u.replace(/-/g," "))})})})})};Iu.displayName="PLPNavigation.BreadCrumb";const Ru=({children:e,...t})=>r.jsxs("div",{...t,className:Nt["pdc-navigation--content"],children:[r.jsx(gt.Filters,{}),e]});Ru.displayName="PLPNavigation.Content";const s_="_sort_35wro_1",ar={sort:s_,"sort-list-wrapper":"_sort-list-wrapper_35wro_8","sort-list":"_sort-list_35wro_8","sort-button":"_sort-button_35wro_25"},a_=({children:e,sortListOpen:t,btnAdornment:n,style:o,...s})=>r.jsx(d.Button,{...s,adornment:{end:t?n==null?void 0:n.listOpen:n==null?void 0:n.listClosed},size:"small",variant:"tertiary",style:{...o,textDecoration:"none"},className:ar["sort-button"],children:e}),i_=e=>r.jsx(d.RadioButton.Radio,{...e}),c_=({children:e,className:t,name:n,...o})=>r.jsx(d.RadioButton.Group,{...o,name:n||"sort-group",className:d.helpers.classNameConcat(ar["sort-list"],t),children:e}),l_=({children:e,className:t,shadow:n=!0,padding:o="small",height:s="fit-content",...a})=>r.jsx(d.Card,{...a,shadow:n,className:d.helpers.classNameConcat(ar["sort-list-wrapper"],t),padding:o,height:s,children:e}),Tu=g.forwardRef(({children:e,className:t,...n},o)=>r.jsx("div",{...n,ref:o,className:d.helpers.classNameConcat(ar.sort,t),children:e}));Tu.displayName="SortRoot";const ir=({handleSelectValue:e,sortListOpen:t,setSortListOpen:n,searchParams:o,ICONS:s,...a})=>{var f;const i=(f=o==null?void 0:o.get("sort"))==null?void 0:f.replace(":","_"),[c,l]=g.useState(i),{sendDataLayerEvent:u}=ae();g.useEffect(()=>{l(i||void 0)},[i]);const{ref:p}=Ll(()=>n(!1)),m=h=>{const _=h.target.value;l(_),typeof e=="function"&&e(_),u({functionKey:"filterEvent",data:{customData:{ordering:Vt.options[_]}}}),n(!1)};return r.jsxs(Tu,{...a,ref:p,children:[r.jsx(a_,{btnAdornment:{listOpen:r.jsx(d.Icon,{name:s.arrow_up,size:"small"}),listClosed:r.jsx(d.Icon,{name:s.arrow_down,size:"small"})},sortListOpen:t,onClick:()=>n(!t),children:c?Vt.options[c]:Vt.placeholder},"sort-button"),t&&r.jsx(l_,{children:r.jsx(c_,{name:"sort-group",value:c??"",onChange:m,children:Object.keys(Vt.options).map(h=>r.jsx(i_,{label:Vt.options[h],value:h},h))})})]})};ir.displayName="Sort";const Au=g.createContext({}),u_=({children:e,...t})=>{const[n,o]=g.useState(!1);return r.jsx(Au.Provider,{value:g.useMemo(()=>({...t,openOrderBy:n,setOpenOrderBy:o}),[t,n,o]),children:e})},d_=()=>{const e=g.useContext(Au);if(e===void 0)throw new Error("usePLPNavigationContext must be used within a PDCNavigationProvider");return e},ku=()=>{const{openOrderBy:e,onSort:t,setOpenFilters:n,setOpenOrderBy:o}=d_(),{ICONS:s,PDC_NAVIGATION:a,searchParams:i}=$e();return r.jsxs("div",{className:Nt["pdc-navigation--filters"],children:[r.jsx(gt.BreadCrumb,{}),r.jsxs("div",{className:Nt["pdc-navigation--filters--content"],children:[r.jsx(ir,{handleSelectValue:c=>t(c??"release_desc"),sortListOpen:e,setSortListOpen:o,ICONS:s,searchParams:i}),r.jsx(d.Button,{adornment:{end:r.jsx(d.Icon,{name:s.arrow_down})},onClick:()=>n(!0),size:"small",variant:"tertiary",children:a.filter_button}),r.jsx(gt.Total,{})]})]})};ku.displayName="PLPNavigation.Filters";const Ou=({children:e,onSort:t,setOpenFilters:n,style:o,...s})=>{const a=g.useRef(null);return r.jsx(u_,{onSort:t,setOpenFilters:n,children:r.jsx("div",{...s,className:Nt["pdc-navigation"],ref:a,style:{...o},children:r.jsx(gt.Content,{children:e})})})};Ou.displayName="Root";const Lu=({callback:e,selected:t,...n})=>r.jsx("div",{...n,className:Nt["pdc-navigation--selected"],children:r.jsx("div",{className:Nt["pdc-navigation--selected--container"],children:Array.isArray(t)?t.map(o=>o.key==="productclusterids"?null:r.jsx(gt.SelectedItem,{callback:e,facet:o},o.value)):null})});Lu.displayName="PLPNavigation.Selected";const us=({key:e,PLP_FILTERS:t})=>t.some(n=>n.key===e)?e==="cores-filtraveis":!1,ds=({value:e,PLP_FILTERS_COLORS:t})=>{var n;return((n=t.find(o=>o.value===e))==null?void 0:n.color)??"#F2F2F2"},Mu=({key:e,PLP_FILTERS:t})=>{var n;return(n=t.find(o=>o.key===e))==null?void 0:n.label},Du=({key:e,PLP_FILTERS:t})=>{var n;return((n=t.find(o=>o.key===e))==null?void 0:n.order)??0},mo=({value:e})=>{const[t,n]=e.split(":").length===2?e.split(":"):[0,0],o=D.formatPriceToCurrency(Number(n));return`${D.formatPriceToCurrency(Number(t))} até ${o}`},$u=({items:e})=>{const t=e.flatMap(s=>[s.range.from,s.range.to]),n=Math.min(...t.map(Math.abs)),o=Math.max(...t.map(Math.abs));return[n,o]},zu=Object.freeze(Object.defineProperty({__proto__:null,checkedColor:us,createTagPrice:mo,getAbsoluteMinMax:$u,getColor:ds,getName:Mu,getOrder:Du},Symbol.toStringTag,{value:"Module"})),Ge={"filter--empty":"_filter--empty_1mjas_1","filter--item":"_filter--item_1mjas_14","filter--item--price":"_filter--item--price_1mjas_19","filter--item--toggle":"_filter--item--toggle_1mjas_19","filter--item--toggle--container":"_filter--item--toggle--container_1mjas_30","filter--modal--body":"_filter--modal--body_1mjas_79","filter--modal--body--content":"_filter--modal--body--content_1mjas_87","filter--modal--footer":"_filter--modal--footer_1mjas_96","filter--modal":"_filter--modal_1mjas_79","filter--loading":"_filter--loading_1mjas_176","filter--selected":"_filter--selected_1mjas_206","filter--selected--content":"_filter--selected--content_1mjas_210"},Fu=({columns:e=2,CONSTANTS:t,...n})=>{var a;const{filters:o,onToggleFacet:s}=Ht();return r.jsxs("div",{...n,className:Ge["filter--modal--body--content"],children:[Array.isArray(o.facets)&&o.facets.map(i=>r.jsx(ut.Item,{columns:e,facet:i,onToggleFacet:s,CONSTANTS:t},i.key)),!((a=o.facets)!=null&&a.length)&&r.jsx(ut.Empty,{PLP_FILTERS_EMPTY:t.PLP_FILTERS_EMPTY})]})};Fu.displayName="Filter.Item.Content";const Bu=({PLP_FILTERS_EMPTY:e})=>{const t=()=>{window.history.back()};return r.jsxs("div",{className:Ge["filter--empty"],children:[r.jsxs(d.TextStructure.DivWrapper,{children:[r.jsx("h4",{children:e.title}),r.jsx("p",{children:e.subtitle})]}),r.jsx(d.Button,{onClick:()=>t(),variant:"tertiary",children:e.button})]})};Bu.displayName="Filter.Empty";const Uu=({columns:e,facet:t,onToggleFacet:n,CONSTANTS:o,...s})=>{const a=Du({key:t.key,PLP_FILTERS:o.PLP_FILTERS}),i=()=>{if(t.__typename==="FacetBoolean"){if(t.key==="cores-filtraveis")return r.jsx(ut.Colors,{onToggleFacet:n,values:t.values,PLP_FILTERS:o.PLP_FILTERS,PLP_FILTERS_COLORS:o.PLP_FILTERS_COLORS});if(t.key==="tamanho")return r.jsx(ut.Sizes,{onToggleFacet:n,values:t.values,PLP_SIZE_ORDER:o.PLP_SIZE_ORDER});if(t.key==="category-2")return r.jsx(ut.Toggle,{columns:e,facetKey:t.key,onToggleFacet:n,values:t.values,ICONS:o.ICONS})}return t.__typename==="FacetRange"?r.jsx(ut.Price,{facet:t}):r.jsx("p",{children:"Filter not support!!!"})};return r.jsx("div",{...s,className:Ge["filter--item"],style:{order:a},children:r.jsxs(d.Accordion.Wrapper,{style:{width:"100%"},children:[r.jsx(d.Accordion.Header,{id:t.key,closeIndicator:r.jsx(d.Icon,{name:o.ICONS.arrow_up}),openIndicator:r.jsx(d.Icon,{name:o.ICONS.arrow_down}),children:r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{children:r.jsx("h4",{className:"typography-style-body-sm",children:Mu({key:t.key,PLP_FILTERS:o.PLP_FILTERS})})})})}),r.jsx(d.Accordion.Body,{children:i()})]})})};Uu.displayName="Filter.Item";const qu=({onToggleFacet:e,values:t,PLP_FILTERS:n,PLP_FILTERS_COLORS:o,...s})=>r.jsx(nt.Root,{...s,children:r.jsx(nt.List,{children:Array.isArray(t)&&t.map(({key:a,selected:i,value:c})=>r.jsx(nt.Option,{active:i,"data-color":us({key:a,PLP_FILTERS:n}),fill:ds({value:c,PLP_FILTERS_COLORS:o}),onClick:()=>e({key:a,value:c}),type:"color"},`${a}-${c}`))})});qu.displayName="Filter.Item.Color";const Hu=({facet:e,...t})=>{var u,p;const{filters:{selected:n},price:o,onToggleFacet:s}=Ht(),[a,i]=(o==null?void 0:o.split(":").map(Number))??[0,100],[c,l]=((p=(u=n==null?void 0:n.find(({key:m})=>m==="price"))==null?void 0:u.value)==null?void 0:p.split(":").map(Number))??[a,i];return r.jsx("div",{...t,className:Ge["filter--item--price"],children:r.jsxs(d.Slider.SliderDual,{format:"price",initialValue:[c<a?a:c,l>i?i:l],min:a,max:i,type:"dual",step:1,onFinish:m=>{var f,h;m&&s({key:"price",value:`${(f=m.range)==null?void 0:f.min}:${(h=m.range)==null?void 0:h.max}`})},children:[r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{children:r.jsx("p",{"data-min-value":!0})})}),r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{children:r.jsx("p",{"data-max-value":!0})})})]})})};Hu.displayName="Filter.Item.Price";const Vu=({onToggleFacet:e,values:t,PLP_SIZE_ORDER:n,...o})=>{const s=[...t].sort((a,i)=>{const c=n.indexOf(a.name),l=n.indexOf(i.name);return c-l});return r.jsx(nt.Root,{...o,children:r.jsx(nt.List,{children:Array.isArray(s)&&s.map(({key:a,selected:i,value:c})=>r.jsx(nt.Option,{active:i,text:c,type:"size",onClick:()=>e({key:a,value:c})},c))})})};Vu.displayName="Filter.Item.Sizes";const Wu=({columns:e,facetKey:t,onToggleFacet:n,values:o,ICONS:s,...a})=>r.jsx("div",{...a,className:Ge["filter--item--toggle"],children:r.jsx("div",{className:Ge["filter--item--toggle--container"],style:{gridTemplateColumns:`repeat(${e}, 1fr)`},children:Array.isArray(o)&&o.map(i=>r.jsx(d.Checkbox,{label:(i==null?void 0:i.name)??"",adornment:r.jsx(d.Icon,{name:s.check}),checked:i.selected,onChange:()=>n(i)},i.value))})});Wu.displayName="Filter.Item.Toggle";const Gu=({...e})=>{const{isLoading:t}=Ht();return r.jsx("div",{className:Ge["filter--loading"],"data-active":t,...e,children:r.jsx(d.Spinner,{indicatorColor:"#000",background:"#222"})})};Gu.displayName="Filter.Loading";const Ku=({children:e,className:t,isMobile:n=!1,CONSTANTS:{PLP_FILTERS_TITLE:o,ICONS:s}})=>{var p;const{deleteAllFacets:a,filters:i,isOpen:c,target:l,setIsOpen:u}=Ht();return r.jsxs(d.Modal.Root,{className:d.helpers.classNameConcat(Ge["filter--modal"],t),isMobile:n??!1,isOpen:c,parent:l,setIsOpen:u,variant:n?"sideBottom":"sideRight",style:{zIndex:99},children:[r.jsxs(d.Modal.Header,{navigation:"top",children:[r.jsx(d.Modal.Controls,{navigation:"top",isMobile:n,children:r.jsx(d.Button,{"data-close":!0,iconNameStart:s.close,size:"small",variant:"tertiary",style:{marginLeft:"auto"}})}),r.jsx(d.Modal.Title,{navigation:"top",title:o})]}),r.jsxs(d.Modal.Body,{style:{width:500},children:[r.jsx("div",{className:Ge["filter--modal--body"],children:e}),r.jsx(ut.Loading,{})]}),r.jsx(d.Modal.Footer,{children:r.jsxs("div",{className:Ge["filter--modal--footer"],children:[r.jsx(d.Button,{"data-close":!0,size:"large",variant:"primary",children:(p=i.facets)!=null&&p.length?"ver resultados":"fechar"}),r.jsx(d.Button,{"data-close":!0,onClick:()=>a(),variant:"tertiary",children:"limpar filtros"})]})})]})};Ku.displayName="Filter.Modal";const Xu=({children:e,className:t,isMobile:n,CONSTANTS:o,...s})=>r.jsx(Cc,{...s,PLP_FILTERS:o.PLP_FILTERS,children:r.jsx(ut.Modal,{className:t,isMobile:n,CONSTANTS:o,children:e})});Xu.displayName="Filter.Root";const Yu=({ICONS:e,PLP_FILTERS_COLORS:t,PLP_FILTERS:n})=>{const{filters:o,onToggleFacet:s}=Ht();return r.jsx("div",{className:Ge["filter--selected"],children:r.jsx("div",{className:Ge["filter--selected--content"],children:Array.isArray(o.selected)&&o.selected.map(({key:a,value:i})=>a==="productclusterids"?null:r.jsx(d.Tag,{title:a==="price"?mo({value:i}):i,adornment:{end:r.jsx(d.Icon,{name:e.close,size:"x-small"})},colorSquare:ds({value:i,PLP_FILTERS_COLORS:t}),onClick:()=>s({key:a,value:i}),squareShow:us({key:a,PLP_FILTERS:n}),size:"medium",variant:"primary",children:a==="price"?mo({value:i}):i},i))})})};Yu.displayName="Filter.Selected";const ut={Colors:qu,Content:Fu,Empty:Bu,Modal:Ku,Item:Uu,Root:Xu,Loading:Gu,Selected:Yu,Price:Hu,Sizes:Vu,Toggle:Wu},{checkedColor:m_,createTagPrice:ua,getColor:p_}=zu,Qu=({callback:e,facet:t})=>{const{ICONS:n,PLP_FILTERS_COLORS:o,PLP_FILTERS:s}=$e();return r.jsx(d.Tag,{title:(t==null?void 0:t.key)==="price"?ua({value:t.value}):t.value.toUpperCase(),adornment:{end:r.jsx(d.Icon,{name:n.close,size:"x-small"})},colorSquare:p_({value:t.value,PLP_FILTERS_COLORS:o}),onClick:()=>{typeof e=="function"&&e(t,!0)},squareShow:m_({key:t.key,PLP_FILTERS:s}),size:"medium",variant:"primary",children:(t==null?void 0:t.key)==="price"?ua({value:t.value}):t.value.toUpperCase()})};Qu.displayName="PLPNavigation.Selected.Item";const Zu=()=>r.jsx(d.TextStructure.Root,{children:r.jsx("p",{id:"pdc-navigation--total"})});Zu.displayName="PLPNavigation.Total";const gt={BreadCrumb:Iu,Content:Ru,Filters:ku,Root:Ou,Selected:Lu,SelectedItem:Qu,Total:Zu},f_="_footer__bottom_198g6_2",h_="_footer__wrapper_198g6_10",__="_footer__main_198g6_39",g_="_footer__legalInformation_198g6_55",y_="_footer__column_198g6_77",x_="_footer__columnContent_198g6_87",v_="_footer__item_198g6_91",b_="_footer__itemLink_198g6_107",j_="_footer__columnTitle_198g6_122",C_="_footer__columnTitleIcon_198g6_134",S_="_footer__iconList_198g6_147",w_="_footer__itemSmallText_198g6_157",P_="_payment_198g6_168",N_="_footer__iconContainer_198g6_173",E_="_footer__iconListSubHeader_198g6_178",I_="_accordionWrapper_198g6_200",R_="_accordionHeader_198g6_204",T_="_accordionTextWrapper_198g6_208",me={footer__bottom:f_,footer__wrapper:h_,footer__main:__,footer__legalInformation:g_,footer__column:y_,footer__columnContent:x_,footer__item:v_,footer__itemLink:b_,footer__columnTitle:j_,footer__columnTitleIcon:C_,footer__iconList:S_,footer__itemSmallText:w_,payment:P_,footer__iconContainer:N_,footer__iconListSubHeader:E_,accordionWrapper:I_,accordionHeader:R_,accordionTextWrapper:T_,"footer--stamps":"_footer--stamps_198g6_247","footer--stamps--company":"_footer--stamps--company_198g6_254","support-container":"_support-container_198g6_258","support-section":"_support-section_198g6_277","support-text":"_support-text_198g6_319","support-items":"_support-items_198g6_329","support-item":"_support-item_198g6_329"};var Ju={},ms={},cr={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"warnOnce",{enumerable:!0,get:function(){return t}});let t=n=>{};if(process.env.NODE_ENV!=="production"){const n=new Set;t=o=>{n.has(o)||console.warn(o),n.add(o)}}})(cr);var ed={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getImageBlurSvg",{enumerable:!0,get:function(){return t}});function t(n){let{widthInt:o,heightInt:s,blurWidth:a,blurHeight:i,blurDataURL:c,objectFit:l}=n;const u=20,p=a?a*40:o,m=i?i*40:s,f=p&&m?"viewBox='0 0 "+p+" "+m+"'":"",h=f?"none":l==="contain"?"xMidYMid":l==="cover"?"xMidYMid slice":"none";return"%3Csvg xmlns='http://www.w3.org/2000/svg' "+f+"%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='"+u+"'/%3E%3CfeColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 100 -1' result='s'/%3E%3CfeFlood x='0' y='0' width='100%25' height='100%25'/%3E%3CfeComposite operator='out' in='s'/%3E%3CfeComposite in2='SourceGraphic'/%3E%3CfeGaussianBlur stdDeviation='"+u+"'/%3E%3C/filter%3E%3Cimage width='100%25' height='100%25' x='0' y='0' preserveAspectRatio='"+h+"' style='filter: url(%23b);' href='"+c+"'/%3E%3C/svg%3E"}})(ed);var lr={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(s,a){for(var i in a)Object.defineProperty(s,i,{enumerable:!0,get:a[i]})}t(e,{VALID_LOADERS:function(){return n},imageConfigDefault:function(){return o}});const n=["default","imgix","cloudinary","akamai","custom"],o={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image",loader:"default",loaderFile:"",domains:[],disableStaticImages:!1,minimumCacheTTL:60,formats:["image/webp"],dangerouslyAllowSVG:!1,contentSecurityPolicy:"script-src 'none'; frame-src 'none'; sandbox;",contentDispositionType:"inline",localPatterns:void 0,remotePatterns:[],qualities:void 0,unoptimized:!1}})(lr);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getImgProps",{enumerable:!0,get:function(){return h}});const t=cr,n=ed,o=lr,s=["lazy","eager",void 0];function a(_){return _.default!==void 0}function i(_){return _.src!==void 0}function c(_){return typeof _=="object"&&(a(_)||i(_))}const l=new Map;let u;function p(_){return typeof _>"u"?_:typeof _=="number"?Number.isFinite(_)?_:NaN:typeof _=="string"&&/^[0-9]+$/.test(_)?parseInt(_,10):NaN}function m(_,y,x){let{deviceSizes:v,allSizes:C}=_;if(x){const b=/(^|\s)(1?\d?\d)vw/g,w=[];for(let P;P=b.exec(x);P)w.push(parseInt(P[2]));if(w.length){const P=Math.min(...w)*.01;return{widths:C.filter(S=>S>=v[0]*P),kind:"w"}}return{widths:C,kind:"w"}}return typeof y!="number"?{widths:v,kind:"w"}:{widths:[...new Set([y,y*2].map(b=>C.find(w=>w>=b)||C[C.length-1]))],kind:"x"}}function f(_){let{config:y,src:x,unoptimized:v,width:C,quality:j,sizes:b,loader:w}=_;if(v)return{src:x,srcSet:void 0,sizes:void 0};const{widths:P,kind:S}=m(y,C,b),N=P.length-1;return{sizes:!b&&S==="w"?"100vw":b,srcSet:P.map((R,A)=>w({config:y,src:x,quality:j,width:R})+" "+(S==="w"?R:A+1)+S).join(", "),src:w({config:y,src:x,quality:j,width:P[N]})}}function h(_,y){let{src:x,sizes:v,unoptimized:C=!1,priority:j=!1,loading:b,className:w,quality:P,width:S,height:N,fill:R=!1,style:A,overrideSrc:L,onLoad:O,onLoadingComplete:G,placeholder:M="empty",blurDataURL:U,fetchPriority:Y,decoding:X="async",layout:W,objectFit:z,objectPosition:J,lazyBoundary:oe,lazyRoot:le,...se}=_;const{imgConf:ue,showAltText:$,blurComplete:ee,defaultLoader:E}=y;let V,ie=ue||o.imageConfigDefault;if("allSizes"in ie)V=ie;else{var _e;const K=[...ie.deviceSizes,...ie.imageSizes].sort((te,he)=>te-he),k=ie.deviceSizes.sort((te,he)=>te-he),B=(_e=ie.qualities)==null?void 0:_e.sort((te,he)=>te-he);V={...ie,allSizes:K,deviceSizes:k,qualities:B}}if(typeof E>"u")throw new Error(`images.loaderFile detected but the file is missing default export.
|
|
5
|
+
Read more: https://nextjs.org/docs/messages/invalid-images-config`);let I=se.loader||E;delete se.loader,delete se.srcSet;const T="__next_img_default"in I;if(T){if(V.loader==="custom")throw new Error('Image with src "'+x+`" is missing "loader" prop.
|
|
6
|
+
Read more: https://nextjs.org/docs/messages/next-image-missing-loader`)}else{const K=I;I=k=>{const{config:B,...te}=k;return K(te)}}if(W){W==="fill"&&(R=!0);const K={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}},k={responsive:"100vw",fill:"100vw"},B=K[W];B&&(A={...A,...B});const te=k[W];te&&!v&&(v=te)}let Te="",H=p(S),Q=p(N),be,Ie;if(c(x)){const K=a(x)?x.default:x;if(!K.src)throw new Error("An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received "+JSON.stringify(K));if(!K.height||!K.width)throw new Error("An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received "+JSON.stringify(K));if(be=K.blurWidth,Ie=K.blurHeight,U=U||K.blurDataURL,Te=K.src,!R){if(!H&&!Q)H=K.width,Q=K.height;else if(H&&!Q){const k=H/K.width;Q=Math.round(K.height*k)}else if(!H&&Q){const k=Q/K.height;H=Math.round(K.width*k)}}}x=typeof x=="string"?x:Te;let je=!j&&(b==="lazy"||typeof b>"u");(!x||x.startsWith("data:")||x.startsWith("blob:"))&&(C=!0,je=!1),V.unoptimized&&(C=!0),T&&x.endsWith(".svg")&&!V.dangerouslyAllowSVG&&(C=!0),j&&(Y="high");const ge=p(P);if(process.env.NODE_ENV!=="production"){if(V.output==="export"&&T&&!C)throw new Error("Image Optimization using the default loader is not compatible with `{ output: 'export' }`.\n Possible solutions:\n - Remove `{ output: 'export' }` and run \"next start\" to run server mode including the Image Optimization API.\n - Configure `{ images: { unoptimized: true } }` in `next.config.js` to disable the Image Optimization API.\n Read more: https://nextjs.org/docs/messages/export-image-api");if(!x)C=!0;else if(R){if(S)throw new Error('Image with src "'+x+'" has both "width" and "fill" properties. Only one should be used.');if(N)throw new Error('Image with src "'+x+'" has both "height" and "fill" properties. Only one should be used.');if(A!=null&&A.position&&A.position!=="absolute")throw new Error('Image with src "'+x+'" has both "fill" and "style.position" properties. Images with "fill" always use position absolute - it cannot be modified.');if(A!=null&&A.width&&A.width!=="100%")throw new Error('Image with src "'+x+'" has both "fill" and "style.width" properties. Images with "fill" always use width 100% - it cannot be modified.');if(A!=null&&A.height&&A.height!=="100%")throw new Error('Image with src "'+x+'" has both "fill" and "style.height" properties. Images with "fill" always use height 100% - it cannot be modified.')}else{if(typeof H>"u")throw new Error('Image with src "'+x+'" is missing required "width" property.');if(isNaN(H))throw new Error('Image with src "'+x+'" has invalid "width" property. Expected a numeric value in pixels but received "'+S+'".');if(typeof Q>"u")throw new Error('Image with src "'+x+'" is missing required "height" property.');if(isNaN(Q))throw new Error('Image with src "'+x+'" has invalid "height" property. Expected a numeric value in pixels but received "'+N+'".')}if(!s.includes(b))throw new Error('Image with src "'+x+'" has invalid "loading" property. Provided "'+b+'" should be one of '+s.map(String).join(",")+".");if(j&&b==="lazy")throw new Error('Image with src "'+x+`" has both "priority" and "loading='lazy'" properties. Only one should be used.`);if(M!=="empty"&&M!=="blur"&&!M.startsWith("data:image/"))throw new Error('Image with src "'+x+'" has invalid "placeholder" property "'+M+'".');if(M!=="empty"&&H&&Q&&H*Q<1600&&(0,t.warnOnce)('Image with src "'+x+'" is smaller than 40x40. Consider removing the "placeholder" property to improve performance.'),M==="blur"&&!U){const K=["jpeg","png","webp","avif"];throw new Error('Image with src "'+x+`" has "placeholder='blur'" property but is missing the "blurDataURL" property.
|
|
7
7
|
Possible solutions:
|
|
8
8
|
- Add a "blurDataURL" property, the contents should be a small Data URL to represent the image
|
|
9
9
|
- Change the "src" property to a static import with one of the supported file types: `+K.join(",")+` (animated images not supported)
|
|
10
10
|
- Remove the "placeholder" property, effectively no blur effect
|
|
11
|
-
Read more: https://nextjs.org/docs/messages/placeholder-blur-data-url`)}if("ref"in
|
|
12
|
-
Read more: https://nextjs.org/docs/messages/next-image-missing-loader-width`)}G&&(0,t.warnOnce)('Image with src "'+x+'" is using deprecated "onLoadingComplete" property. Please use the "onLoad" property instead.');for(const[K,k]of Object.entries({layout:W,objectFit:z,objectPosition:J,lazyBoundary:
|
|
11
|
+
Read more: https://nextjs.org/docs/messages/placeholder-blur-data-url`)}if("ref"in se&&(0,t.warnOnce)('Image with src "'+x+'" is using unsupported "ref" property. Consider using the "onLoad" property instead.'),!C&&!T){const K=I({config:V,src:x,width:H||400,quality:ge||75});let k;try{k=new URL(K)}catch{}(K===x||k&&k.pathname===x&&!k.search)&&(0,t.warnOnce)('Image with src "'+x+`" has a "loader" property that does not implement width. Please implement it or use the "unoptimized" property instead.
|
|
12
|
+
Read more: https://nextjs.org/docs/messages/next-image-missing-loader-width`)}G&&(0,t.warnOnce)('Image with src "'+x+'" is using deprecated "onLoadingComplete" property. Please use the "onLoad" property instead.');for(const[K,k]of Object.entries({layout:W,objectFit:z,objectPosition:J,lazyBoundary:oe,lazyRoot:le}))k&&(0,t.warnOnce)('Image with src "'+x+'" has legacy prop "'+K+`". Did you forget to run the codemod?
|
|
13
13
|
Read more: https://nextjs.org/docs/messages/next-image-upgrade-to-13`);if(typeof window<"u"&&!u&&window.PerformanceObserver){u=new PerformanceObserver(K=>{for(const B of K.getEntries()){var k;const te=(B==null||(k=B.element)==null?void 0:k.src)||"",he=l.get(te);he&&!he.priority&&he.placeholder==="empty"&&!he.src.startsWith("data:")&&!he.src.startsWith("blob:")&&(0,t.warnOnce)('Image with src "'+he.src+`" was detected as the Largest Contentful Paint (LCP). Please add the "priority" property if this image is above the fold.
|
|
14
|
-
Read more: https://nextjs.org/docs/api-reference/next/image#priority`)}});try{u.observe({type:"largest-contentful-paint",buffered:!0})}catch(K){console.error(K)}}}const Ae=Object.assign(R?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:z,objectPosition:J}:{},$?{}:{color:"transparent"},A),Ce=!ee&&M!=="empty"?M==="blur"?'url("data:image/svg+xml;charset=utf-8,'+(0,
|
|
14
|
+
Read more: https://nextjs.org/docs/api-reference/next/image#priority`)}});try{u.observe({type:"largest-contentful-paint",buffered:!0})}catch(K){console.error(K)}}}const Ae=Object.assign(R?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:z,objectPosition:J}:{},$?{}:{color:"transparent"},A),Ce=!ee&&M!=="empty"?M==="blur"?'url("data:image/svg+xml;charset=utf-8,'+(0,n.getImageBlurSvg)({widthInt:H,heightInt:Q,blurWidth:be,blurHeight:Ie,blurDataURL:U||"",objectFit:Ae.objectFit})+'")':'url("'+M+'")':null;let F=Ce?{backgroundSize:Ae.objectFit||"cover",backgroundPosition:Ae.objectPosition||"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:Ce}:{};process.env.NODE_ENV==="development"&&F.backgroundImage&&M==="blur"&&U!=null&&U.startsWith("/")&&(F.backgroundImage='url("'+U+'")');const pe=f({config:V,src:x,unoptimized:C,width:H,quality:ge,sizes:v,loader:I});if(process.env.NODE_ENV!=="production"&&typeof window<"u"){let K;try{K=new URL(pe.src)}catch{K=new URL(pe.src,window.location.href)}l.set(K.href,{src:x,priority:j,placeholder:M})}return{props:{...se,loading:je?"lazy":b,fetchPriority:Y,width:H,height:Q,decoding:X,className:w,style:{...Ae,...F},sizes:pe.sizes,srcSet:pe.srcSet,src:L||pe.src},meta:{unoptimized:C,priority:j,placeholder:M,fill:R}}}})(ms);var po={exports:{}},Rn={exports:{}},Mr={},da;function A_(){return da||(da=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return a}});const t=g,n=typeof window>"u",o=n?()=>{}:t.useLayoutEffect,s=n?()=>{}:t.useEffect;function a(i){const{headManager:c,reduceComponentsToState:l}=i;function u(){if(c&&c.mountedInstances){const m=t.Children.toArray(Array.from(c.mountedInstances).filter(Boolean));c.updateHead(l(m,i))}}if(n){var p;c==null||(p=c.mountedInstances)==null||p.add(i.children),u()}return o(()=>{var m;return c==null||(m=c.mountedInstances)==null||m.add(i.children),()=>{var f;c==null||(f=c.mountedInstances)==null||f.delete(i.children)}}),o(()=>(c&&(c._pendingUpdate=u),()=>{c&&(c._pendingUpdate=u)})),s(()=>(c&&c._pendingUpdate&&(c._pendingUpdate(),c._pendingUpdate=null),()=>{c&&c._pendingUpdate&&(c._pendingUpdate(),c._pendingUpdate=null)})),null}}(Mr)),Mr}var Dr={},ma;function k_(){return ma||(ma=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"AmpStateContext",{enumerable:!0,get:function(){return o}});const o=Oe._(g).default.createContext({});process.env.NODE_ENV!=="production"&&(o.displayName="AmpStateContext")}(Dr)),Dr}var $r={},pa;function td(){return pa||(pa=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"HeadManagerContext",{enumerable:!0,get:function(){return o}});const o=Oe._(g).default.createContext({});process.env.NODE_ENV!=="production"&&(o.displayName="HeadManagerContext")}($r)),$r}var zr={},fa;function O_(){return fa||(fa=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"isInAmpMode",{enumerable:!0,get:function(){return t}});function t(n){let{ampFirst:o=!1,hybrid:s=!1,hasQuery:a=!1}=n===void 0?{}:n;return o||s&&a}}(zr)),zr}var ha;function L_(){return ha||(ha=1,function(e,t){"use client";Object.defineProperty(t,"__esModule",{value:!0});function n(j,b){for(var w in b)Object.defineProperty(j,w,{enumerable:!0,get:b[w]})}n(t,{default:function(){return C},defaultHead:function(){return f}});const o=Oe,s=un(),a=r,i=s._(g),c=o._(A_()),l=k_(),u=td(),p=O_(),m=cr;function f(j){j===void 0&&(j=!1);const b=[(0,a.jsx)("meta",{charSet:"utf-8"})];return j||b.push((0,a.jsx)("meta",{name:"viewport",content:"width=device-width"})),b}function h(j,b){return typeof b=="string"||typeof b=="number"?j:b.type===i.default.Fragment?j.concat(i.default.Children.toArray(b.props.children).reduce((w,P)=>typeof P=="string"||typeof P=="number"?w:w.concat(P),[])):j.concat(b)}const _=["name","httpEquiv","charSet","itemProp"];function y(){const j=new Set,b=new Set,w=new Set,P={};return S=>{let N=!0,R=!1;if(S.key&&typeof S.key!="number"&&S.key.indexOf("$")>0){R=!0;const A=S.key.slice(S.key.indexOf("$")+1);j.has(A)?N=!1:j.add(A)}switch(S.type){case"title":case"base":b.has(S.type)?N=!1:b.add(S.type);break;case"meta":for(let A=0,L=_.length;A<L;A++){const O=_[A];if(S.props.hasOwnProperty(O))if(O==="charSet")w.has(O)?N=!1:w.add(O);else{const G=S.props[O],M=P[O]||new Set;(O!=="name"||!R)&&M.has(G)?N=!1:(M.add(G),P[O]=M)}}break}return N}}function x(j,b){const{inAmpMode:w}=b;return j.reduce(h,[]).reverse().concat(f(w).reverse()).filter(y()).reverse().map((P,S)=>{const N=P.key||S;if(process.env.NODE_ENV!=="development"&&process.env.__NEXT_OPTIMIZE_FONTS&&!w&&P.type==="link"&&P.props.href&&["https://fonts.googleapis.com/css","https://use.typekit.net/"].some(R=>P.props.href.startsWith(R))){const R={...P.props||{}};return R["data-href"]=R.href,R.href=void 0,R["data-optimized-fonts"]=!0,i.default.cloneElement(P,R)}if(process.env.NODE_ENV==="development")if(P.type==="script"&&P.props.type!=="application/ld+json"){const R=P.props.src?'<script> tag with src="'+P.props.src+'"':"inline <script>";(0,m.warnOnce)("Do not add <script> tags using next/head (see "+R+`). Use next/script instead.
|
|
15
15
|
See more info here: https://nextjs.org/docs/messages/no-script-tags-in-head-component`)}else P.type==="link"&&P.props.rel==="stylesheet"&&(0,m.warnOnce)('Do not add stylesheets using next/head (see <link rel="stylesheet"> tag with href="'+P.props.href+`"). Use Document instead.
|
|
16
|
-
See more info here: https://nextjs.org/docs/messages/no-stylesheets-in-head-component`);return i.default.cloneElement(P,{key:N})})}function v(j){let{children:b}=j;const w=(0,i.useContext)(l.AmpStateContext),P=(0,i.useContext)(u.HeadManagerContext);return(0,a.jsx)(c.default,{reduceComponentsToState:x,headManager:P,inAmpMode:(0,p.isInAmpMode)(w),children:b})}const C=v;(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)}(In,In.exports)),In.exports}var $r={},pa;function O_(){return pa||(pa=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"ImageConfigContext",{enumerable:!0,get:function(){return o}});const r=Oe._(g),s=cr,o=r.default.createContext(s.imageConfigDefault);process.env.NODE_ENV!=="production"&&(o.displayName="ImageConfigContext")}($r)),$r}var zr={},Fr={},Br={exports:{}},fa;function Ju(){return fa||(fa=1,(()=>{var e={170:(o,a,i)=>{const c=i(510),l=()=>{if(typeof navigator<"u"&&navigator.platform){const p=navigator.platform.toLowerCase();return p==="win32"||p==="windows"}return typeof process<"u"&&process.platform?process.platform==="win32":!1};function u(p,m,f=!1){return m&&(m.windows===null||m.windows===void 0)&&(m={...m,windows:l()}),c(p,m,f)}Object.assign(u,c),o.exports=u},154:o=>{const a="\\\\/",i=`[^${a}]`,c="\\.",l="\\+",u="\\?",p="\\/",m="(?=.)",f="[^/]",h=`(?:${p}|$)`,_=`(?:^|${p})`,y=`${c}{1,2}${h}`,x=`(?!${c})`,v=`(?!${_}${y})`,C=`(?!${c}{0,1}${h})`,j=`(?!${y})`,b=`[^.${p}]`,w=`${f}*?`,S={DOT_LITERAL:c,PLUS_LITERAL:l,QMARK_LITERAL:u,SLASH_LITERAL:p,ONE_CHAR:m,QMARK:f,END_ANCHOR:h,DOTS_SLASH:y,NO_DOT:x,NO_DOTS:v,NO_DOT_SLASH:C,NO_DOTS_SLASH:j,QMARK_NO_DOT:b,STAR:w,START_ANCHOR:_,SEP:"/"},N={...S,SLASH_LITERAL:`[${a}]`,QMARK:i,STAR:`${i}*?`,DOTS_SLASH:`${c}{1,2}(?:[${a}]|$)`,NO_DOT:`(?!${c})`,NO_DOTS:`(?!(?:^|[${a}])${c}{1,2}(?:[${a}]|$))`,NO_DOT_SLASH:`(?!${c}{0,1}(?:[${a}]|$))`,NO_DOTS_SLASH:`(?!${c}{1,2}(?:[${a}]|$))`,QMARK_NO_DOT:`[^.${a}]`,START_ANCHOR:`(?:^|[${a}])`,END_ANCHOR:`(?:[${a}]|$)`,SEP:"\\"},R={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};o.exports={MAX_LENGTH:65536,POSIX_REGEX_SOURCE:R,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars(A){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${A.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(A){return A===!0?N:S}}},697:(o,a,i)=>{const c=i(154),l=i(96),{MAX_LENGTH:u,POSIX_REGEX_SOURCE:p,REGEX_NON_SPECIAL_CHARS:m,REGEX_SPECIAL_CHARS_BACKREF:f,REPLACEMENTS:h}=c,_=(v,C)=>{if(typeof C.expandRange=="function")return C.expandRange(...v,C);v.sort();const j=`[${v.join("-")}]`;try{new RegExp(j)}catch{return v.map(w=>l.escapeRegex(w)).join("..")}return j},y=(v,C)=>`Missing ${v}: "${C}" - use "\\\\${C}" to match literal characters`,x=(v,C)=>{if(typeof v!="string")throw new TypeError("Expected a string");v=h[v]||v;const j={...C},b=typeof j.maxLength=="number"?Math.min(u,j.maxLength):u;let w=v.length;if(w>b)throw new SyntaxError(`Input length: ${w}, exceeds maximum allowed length: ${b}`);const P={type:"bos",value:"",output:j.prepend||""},S=[P],N=j.capture?"":"?:",R=c.globChars(j.windows),A=c.extglobChars(R),{DOT_LITERAL:L,PLUS_LITERAL:O,SLASH_LITERAL:G,ONE_CHAR:M,DOTS_SLASH:U,NO_DOT:Y,NO_DOT_SLASH:X,NO_DOTS_SLASH:W,QMARK:z,QMARK_NO_DOT:J,STAR:se,START_ANCHOR:le}=R,oe=q=>`(${N}(?:(?!${le}${q.dot?U:L}).)*?)`,ue=j.dot?"":Y,$=j.dot?z:J;let ee=j.bash===!0?oe(j):se;j.capture&&(ee=`(${ee})`),typeof j.noext=="boolean"&&(j.noextglob=j.noext);const E={input:v,index:-1,start:0,dot:j.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:S};v=l.removePrefix(v,E),w=v.length;const V=[],ie=[],_e=[];let I=P,T;const Te=()=>E.index===w-1,H=E.peek=(q=1)=>v[E.index+q],Q=E.advance=()=>v[++E.index]||"",be=()=>v.slice(E.index+1),Ie=(q="",K=0)=>{E.consumed+=q,E.index+=K},je=q=>{E.output+=q.output!=null?q.output:q.value,Ie(q.value)},ge=()=>{let q=1;for(;H()==="!"&&(H(2)!=="("||H(3)==="?");)Q(),E.start++,q++;return q%2===0?!1:(E.negated=!0,E.start++,!0)},Ae=q=>{E[q]++,_e.push(q)},Ce=q=>{E[q]--,_e.pop()},F=q=>{if(I.type==="globstar"){const K=E.braces>0&&(q.type==="comma"||q.type==="brace"),k=q.extglob===!0||V.length&&(q.type==="pipe"||q.type==="paren");q.type!=="slash"&&q.type!=="paren"&&!K&&!k&&(E.output=E.output.slice(0,-I.output.length),I.type="star",I.value="*",I.output=ee,E.output+=I.output)}if(V.length&&q.type!=="paren"&&(V[V.length-1].inner+=q.value),(q.value||q.output)&&je(q),I&&I.type==="text"&&q.type==="text"){I.output=(I.output||I.value)+q.value,I.value+=q.value;return}q.prev=I,S.push(q),I=q},pe=(q,K)=>{const k={...A[K],conditions:1,inner:""};k.prev=I,k.parens=E.parens,k.output=E.output;const B=(j.capture?"(":"")+k.open;Ae("parens"),F({type:q,value:K,output:E.output?"":M}),F({type:"paren",extglob:!0,value:Q(),output:B}),V.push(k)},ye=q=>{let K=q.close+(j.capture?")":""),k;if(q.type==="negate"){let B=ee;if(q.inner&&q.inner.length>1&&q.inner.includes("/")&&(B=oe(j)),(B!==ee||Te()||/^\)+$/.test(be()))&&(K=q.close=`)$))${B}`),q.inner.includes("*")&&(k=be())&&/^\.[^\\/.]+$/.test(k)){const te=x(k,{...C,fastpaths:!1}).output;K=q.close=`)${te})${B})`}q.prev.type==="bos"&&(E.negatedExtglob=!0)}F({type:"paren",extglob:!0,value:T,output:K}),Ce("parens")};if(j.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(v)){let q=!1,K=v.replace(f,(k,B,te,he,Ee,mr)=>he==="\\"?(q=!0,k):he==="?"?B?B+he+(Ee?z.repeat(Ee.length):""):mr===0?$+(Ee?z.repeat(Ee.length):""):z.repeat(te.length):he==="."?L.repeat(te.length):he==="*"?B?B+he+(Ee?ee:""):ee:B?k:`\\${k}`);return q===!0&&(j.unescape===!0?K=K.replace(/\\/g,""):K=K.replace(/\\+/g,k=>k.length%2===0?"\\\\":k?"\\":"")),K===v&&j.contains===!0?(E.output=v,E):(E.output=l.wrapOutput(K,E,C),E)}for(;!Te();){if(T=Q(),T==="\0")continue;if(T==="\\"){const k=H();if(k==="/"&&j.bash!==!0||k==="."||k===";")continue;if(!k){T+="\\",F({type:"text",value:T});continue}const B=/^\\+/.exec(be());let te=0;if(B&&B[0].length>2&&(te=B[0].length,E.index+=te,te%2!==0&&(T+="\\")),j.unescape===!0?T=Q():T+=Q(),E.brackets===0){F({type:"text",value:T});continue}}if(E.brackets>0&&(T!=="]"||I.value==="["||I.value==="[^")){if(j.posix!==!1&&T===":"){const k=I.value.slice(1);if(k.includes("[")&&(I.posix=!0,k.includes(":"))){const B=I.value.lastIndexOf("["),te=I.value.slice(0,B),he=I.value.slice(B+2),Ee=p[he];if(Ee){I.value=te+Ee,E.backtrack=!0,Q(),!P.output&&S.indexOf(I)===1&&(P.output=M);continue}}}(T==="["&&H()!==":"||T==="-"&&H()==="]")&&(T=`\\${T}`),T==="]"&&(I.value==="["||I.value==="[^")&&(T=`\\${T}`),j.posix===!0&&T==="!"&&I.value==="["&&(T="^"),I.value+=T,je({value:T});continue}if(E.quotes===1&&T!=='"'){T=l.escapeRegex(T),I.value+=T,je({value:T});continue}if(T==='"'){E.quotes=E.quotes===1?0:1,j.keepQuotes===!0&&F({type:"text",value:T});continue}if(T==="("){Ae("parens"),F({type:"paren",value:T});continue}if(T===")"){if(E.parens===0&&j.strictBrackets===!0)throw new SyntaxError(y("opening","("));const k=V[V.length-1];if(k&&E.parens===k.parens+1){ye(V.pop());continue}F({type:"paren",value:T,output:E.parens?")":"\\)"}),Ce("parens");continue}if(T==="["){if(j.nobracket===!0||!be().includes("]")){if(j.nobracket!==!0&&j.strictBrackets===!0)throw new SyntaxError(y("closing","]"));T=`\\${T}`}else Ae("brackets");F({type:"bracket",value:T});continue}if(T==="]"){if(j.nobracket===!0||I&&I.type==="bracket"&&I.value.length===1){F({type:"text",value:T,output:`\\${T}`});continue}if(E.brackets===0){if(j.strictBrackets===!0)throw new SyntaxError(y("opening","["));F({type:"text",value:T,output:`\\${T}`});continue}Ce("brackets");const k=I.value.slice(1);if(I.posix!==!0&&k[0]==="^"&&!k.includes("/")&&(T=`/${T}`),I.value+=T,je({value:T}),j.literalBrackets===!1||l.hasRegexChars(k))continue;const B=l.escapeRegex(I.value);if(E.output=E.output.slice(0,-I.value.length),j.literalBrackets===!0){E.output+=B,I.value=B;continue}I.value=`(${N}${B}|${I.value})`,E.output+=I.value;continue}if(T==="{"&&j.nobrace!==!0){Ae("braces");const k={type:"brace",value:T,output:"(",outputIndex:E.output.length,tokensIndex:E.tokens.length};ie.push(k),F(k);continue}if(T==="}"){const k=ie[ie.length-1];if(j.nobrace===!0||!k){F({type:"text",value:T,output:T});continue}let B=")";if(k.dots===!0){const te=S.slice(),he=[];for(let Ee=te.length-1;Ee>=0&&(S.pop(),te[Ee].type!=="brace");Ee--)te[Ee].type!=="dots"&&he.unshift(te[Ee].value);B=_(he,j),E.backtrack=!0}if(k.comma!==!0&&k.dots!==!0){const te=E.output.slice(0,k.outputIndex),he=E.tokens.slice(k.tokensIndex);k.value=k.output="\\{",T=B="\\}",E.output=te;for(const Ee of he)E.output+=Ee.output||Ee.value}F({type:"brace",value:T,output:B}),Ce("braces"),ie.pop();continue}if(T==="|"){V.length>0&&V[V.length-1].conditions++,F({type:"text",value:T});continue}if(T===","){let k=T;const B=ie[ie.length-1];B&&_e[_e.length-1]==="braces"&&(B.comma=!0,k="|"),F({type:"comma",value:T,output:k});continue}if(T==="/"){if(I.type==="dot"&&E.index===E.start+1){E.start=E.index+1,E.consumed="",E.output="",S.pop(),I=P;continue}F({type:"slash",value:T,output:G});continue}if(T==="."){if(E.braces>0&&I.type==="dot"){I.value==="."&&(I.output=L);const k=ie[ie.length-1];I.type="dots",I.output+=T,I.value+=T,k.dots=!0;continue}if(E.braces+E.parens===0&&I.type!=="bos"&&I.type!=="slash"){F({type:"text",value:T,output:L});continue}F({type:"dot",value:T,output:L});continue}if(T==="?"){if(!(I&&I.value==="(")&&j.noextglob!==!0&&H()==="("&&H(2)!=="?"){pe("qmark",T);continue}if(I&&I.type==="paren"){const B=H();let te=T;(I.value==="("&&!/[!=<:]/.test(B)||B==="<"&&!/<([!=]|\w+>)/.test(be()))&&(te=`\\${T}`),F({type:"text",value:T,output:te});continue}if(j.dot!==!0&&(I.type==="slash"||I.type==="bos")){F({type:"qmark",value:T,output:J});continue}F({type:"qmark",value:T,output:z});continue}if(T==="!"){if(j.noextglob!==!0&&H()==="("&&(H(2)!=="?"||!/[!=<:]/.test(H(3)))){pe("negate",T);continue}if(j.nonegate!==!0&&E.index===0){ge();continue}}if(T==="+"){if(j.noextglob!==!0&&H()==="("&&H(2)!=="?"){pe("plus",T);continue}if(I&&I.value==="("||j.regex===!1){F({type:"plus",value:T,output:O});continue}if(I&&(I.type==="bracket"||I.type==="paren"||I.type==="brace")||E.parens>0){F({type:"plus",value:T});continue}F({type:"plus",value:O});continue}if(T==="@"){if(j.noextglob!==!0&&H()==="("&&H(2)!=="?"){F({type:"at",extglob:!0,value:T,output:""});continue}F({type:"text",value:T});continue}if(T!=="*"){(T==="$"||T==="^")&&(T=`\\${T}`);const k=m.exec(be());k&&(T+=k[0],E.index+=k[0].length),F({type:"text",value:T});continue}if(I&&(I.type==="globstar"||I.star===!0)){I.type="star",I.star=!0,I.value+=T,I.output=ee,E.backtrack=!0,E.globstar=!0,Ie(T);continue}let q=be();if(j.noextglob!==!0&&/^\([^?]/.test(q)){pe("star",T);continue}if(I.type==="star"){if(j.noglobstar===!0){Ie(T);continue}const k=I.prev,B=k.prev,te=k.type==="slash"||k.type==="bos",he=B&&(B.type==="star"||B.type==="globstar");if(j.bash===!0&&(!te||q[0]&&q[0]!=="/")){F({type:"star",value:T,output:""});continue}const Ee=E.braces>0&&(k.type==="comma"||k.type==="brace"),mr=V.length&&(k.type==="pipe"||k.type==="paren");if(!te&&k.type!=="paren"&&!Ee&&!mr){F({type:"star",value:T,output:""});continue}for(;q.slice(0,3)==="/**";){const _n=v[E.index+4];if(_n&&_n!=="/")break;q=q.slice(3),Ie("/**",3)}if(k.type==="bos"&&Te()){I.type="globstar",I.value+=T,I.output=oe(j),E.output=I.output,E.globstar=!0,Ie(T);continue}if(k.type==="slash"&&k.prev.type!=="bos"&&!he&&Te()){E.output=E.output.slice(0,-(k.output+I.output).length),k.output=`(?:${k.output}`,I.type="globstar",I.output=oe(j)+(j.strictSlashes?")":"|$)"),I.value+=T,E.globstar=!0,E.output+=k.output+I.output,Ie(T);continue}if(k.type==="slash"&&k.prev.type!=="bos"&&q[0]==="/"){const _n=q[1]!==void 0?"|$":"";E.output=E.output.slice(0,-(k.output+I.output).length),k.output=`(?:${k.output}`,I.type="globstar",I.output=`${oe(j)}${G}|${G}${_n})`,I.value+=T,E.output+=k.output+I.output,E.globstar=!0,Ie(T+Q()),F({type:"slash",value:"/",output:""});continue}if(k.type==="bos"&&q[0]==="/"){I.type="globstar",I.value+=T,I.output=`(?:^|${G}|${oe(j)}${G})`,E.output=I.output,E.globstar=!0,Ie(T+Q()),F({type:"slash",value:"/",output:""});continue}E.output=E.output.slice(0,-I.output.length),I.type="globstar",I.output=oe(j),I.value+=T,E.output+=I.output,E.globstar=!0,Ie(T);continue}const K={type:"star",value:T,output:ee};if(j.bash===!0){K.output=".*?",(I.type==="bos"||I.type==="slash")&&(K.output=ue+K.output),F(K);continue}if(I&&(I.type==="bracket"||I.type==="paren")&&j.regex===!0){K.output=T,F(K);continue}(E.index===E.start||I.type==="slash"||I.type==="dot")&&(I.type==="dot"?(E.output+=X,I.output+=X):j.dot===!0?(E.output+=W,I.output+=W):(E.output+=ue,I.output+=ue),H()!=="*"&&(E.output+=M,I.output+=M)),F(K)}for(;E.brackets>0;){if(j.strictBrackets===!0)throw new SyntaxError(y("closing","]"));E.output=l.escapeLast(E.output,"["),Ce("brackets")}for(;E.parens>0;){if(j.strictBrackets===!0)throw new SyntaxError(y("closing",")"));E.output=l.escapeLast(E.output,"("),Ce("parens")}for(;E.braces>0;){if(j.strictBrackets===!0)throw new SyntaxError(y("closing","}"));E.output=l.escapeLast(E.output,"{"),Ce("braces")}if(j.strictSlashes!==!0&&(I.type==="star"||I.type==="bracket")&&F({type:"maybe_slash",value:"",output:`${G}?`}),E.backtrack===!0){E.output="";for(const q of E.tokens)E.output+=q.output!=null?q.output:q.value,q.suffix&&(E.output+=q.suffix)}return E};x.fastpaths=(v,C)=>{const j={...C},b=typeof j.maxLength=="number"?Math.min(u,j.maxLength):u,w=v.length;if(w>b)throw new SyntaxError(`Input length: ${w}, exceeds maximum allowed length: ${b}`);v=h[v]||v;const{DOT_LITERAL:P,SLASH_LITERAL:S,ONE_CHAR:N,DOTS_SLASH:R,NO_DOT:A,NO_DOTS:L,NO_DOTS_SLASH:O,STAR:G,START_ANCHOR:M}=c.globChars(j.windows),U=j.dot?L:A,Y=j.dot?O:A,X=j.capture?"":"?:",W={negated:!1,prefix:""};let z=j.bash===!0?".*?":G;j.capture&&(z=`(${z})`);const J=ue=>ue.noglobstar===!0?z:`(${X}(?:(?!${M}${ue.dot?R:P}).)*?)`,se=ue=>{switch(ue){case"*":return`${U}${N}${z}`;case".*":return`${P}${N}${z}`;case"*.*":return`${U}${z}${P}${N}${z}`;case"*/*":return`${U}${z}${S}${N}${Y}${z}`;case"**":return U+J(j);case"**/*":return`(?:${U}${J(j)}${S})?${Y}${N}${z}`;case"**/*.*":return`(?:${U}${J(j)}${S})?${Y}${z}${P}${N}${z}`;case"**/.*":return`(?:${U}${J(j)}${S})?${P}${N}${z}`;default:{const $=/^(.*?)\.(\w+)$/.exec(ue);if(!$)return;const ee=se($[1]);return ee?ee+P+$[2]:void 0}}},le=l.removePrefix(v,W);let oe=se(le);return oe&&j.strictSlashes!==!0&&(oe+=`${S}?`),oe},o.exports=x},510:(o,a,i)=>{const c=i(716),l=i(697),u=i(96),p=i(154),m=h=>h&&typeof h=="object"&&!Array.isArray(h),f=(h,_,y=!1)=>{if(Array.isArray(h)){const S=h.map(R=>f(R,_,y));return R=>{for(const A of S){const L=A(R);if(L)return L}return!1}}const x=m(h)&&h.tokens&&h.input;if(h===""||typeof h!="string"&&!x)throw new TypeError("Expected pattern to be a non-empty string");const v=_||{},C=v.windows,j=x?f.compileRe(h,_):f.makeRe(h,_,!1,!0),b=j.state;delete j.state;let w=()=>!1;if(v.ignore){const S={..._,ignore:null,onMatch:null,onResult:null};w=f(v.ignore,S,y)}const P=(S,N=!1)=>{const{isMatch:R,match:A,output:L}=f.test(S,j,_,{glob:h,posix:C}),O={glob:h,state:b,regex:j,posix:C,input:S,output:L,match:A,isMatch:R};return typeof v.onResult=="function"&&v.onResult(O),R===!1?(O.isMatch=!1,N?O:!1):w(S)?(typeof v.onIgnore=="function"&&v.onIgnore(O),O.isMatch=!1,N?O:!1):(typeof v.onMatch=="function"&&v.onMatch(O),N?O:!0)};return y&&(P.state=b),P};f.test=(h,_,y,{glob:x,posix:v}={})=>{if(typeof h!="string")throw new TypeError("Expected input to be a string");if(h==="")return{isMatch:!1,output:""};const C=y||{},j=C.format||(v?u.toPosixSlashes:null);let b=h===x,w=b&&j?j(h):h;return b===!1&&(w=j?j(h):h,b=w===x),(b===!1||C.capture===!0)&&(C.matchBase===!0||C.basename===!0?b=f.matchBase(h,_,y,v):b=_.exec(w)),{isMatch:!!b,match:b,output:w}},f.matchBase=(h,_,y)=>(_ instanceof RegExp?_:f.makeRe(_,y)).test(u.basename(h)),f.isMatch=(h,_,y)=>f(_,y)(h),f.parse=(h,_)=>Array.isArray(h)?h.map(y=>f.parse(y,_)):l(h,{..._,fastpaths:!1}),f.scan=(h,_)=>c(h,_),f.compileRe=(h,_,y=!1,x=!1)=>{if(y===!0)return h.output;const v=_||{},C=v.contains?"":"^",j=v.contains?"":"$";let b=`${C}(?:${h.output})${j}`;h&&h.negated===!0&&(b=`^(?!${b}).*$`);const w=f.toRegex(b,_);return x===!0&&(w.state=h),w},f.makeRe=(h,_={},y=!1,x=!1)=>{if(!h||typeof h!="string")throw new TypeError("Expected a non-empty string");let v={negated:!1,fastpaths:!0};return _.fastpaths!==!1&&(h[0]==="."||h[0]==="*")&&(v.output=l.fastpaths(h,_)),v.output||(v=l(h,_)),f.compileRe(v,_,y,x)},f.toRegex=(h,_)=>{try{const y=_||{};return new RegExp(h,y.flags||(y.nocase?"i":""))}catch(y){if(_&&_.debug===!0)throw y;return/$^/}},f.constants=p,o.exports=f},716:(o,a,i)=>{const c=i(96),{CHAR_ASTERISK:l,CHAR_AT:u,CHAR_BACKWARD_SLASH:p,CHAR_COMMA:m,CHAR_DOT:f,CHAR_EXCLAMATION_MARK:h,CHAR_FORWARD_SLASH:_,CHAR_LEFT_CURLY_BRACE:y,CHAR_LEFT_PARENTHESES:x,CHAR_LEFT_SQUARE_BRACKET:v,CHAR_PLUS:C,CHAR_QUESTION_MARK:j,CHAR_RIGHT_CURLY_BRACE:b,CHAR_RIGHT_PARENTHESES:w,CHAR_RIGHT_SQUARE_BRACKET:P}=i(154),S=A=>A===_||A===p,N=A=>{A.isPrefix!==!0&&(A.depth=A.isGlobstar?1/0:1)},R=(A,L)=>{const O=L||{},G=A.length-1,M=O.parts===!0||O.scanToEnd===!0,U=[],Y=[],X=[];let W=A,z=-1,J=0,se=0,le=!1,oe=!1,ue=!1,$=!1,ee=!1,E=!1,V=!1,ie=!1,_e=!1,I=!1,T=0,Te,H,Q={value:"",depth:0,isGlob:!1};const be=()=>z>=G,Ie=()=>W.charCodeAt(z+1),je=()=>(Te=H,W.charCodeAt(++z));for(;z<G;){H=je();let pe;if(H===p){V=Q.backslashes=!0,H=je(),H===y&&(E=!0);continue}if(E===!0||H===y){for(T++;be()!==!0&&(H=je());){if(H===p){V=Q.backslashes=!0,je();continue}if(H===y){T++;continue}if(E!==!0&&H===f&&(H=je())===f){if(le=Q.isBrace=!0,ue=Q.isGlob=!0,I=!0,M===!0)continue;break}if(E!==!0&&H===m){if(le=Q.isBrace=!0,ue=Q.isGlob=!0,I=!0,M===!0)continue;break}if(H===b&&(T--,T===0)){E=!1,le=Q.isBrace=!0,I=!0;break}}if(M===!0)continue;break}if(H===_){if(U.push(z),Y.push(Q),Q={value:"",depth:0,isGlob:!1},I===!0)continue;if(Te===f&&z===J+1){J+=2;continue}se=z+1;continue}if(O.noext!==!0&&(H===C||H===u||H===l||H===j||H===h)===!0&&Ie()===x){if(ue=Q.isGlob=!0,$=Q.isExtglob=!0,I=!0,H===h&&z===J&&(_e=!0),M===!0){for(;be()!==!0&&(H=je());){if(H===p){V=Q.backslashes=!0,H=je();continue}if(H===w){ue=Q.isGlob=!0,I=!0;break}}continue}break}if(H===l){if(Te===l&&(ee=Q.isGlobstar=!0),ue=Q.isGlob=!0,I=!0,M===!0)continue;break}if(H===j){if(ue=Q.isGlob=!0,I=!0,M===!0)continue;break}if(H===v){for(;be()!==!0&&(pe=je());){if(pe===p){V=Q.backslashes=!0,je();continue}if(pe===P){oe=Q.isBracket=!0,ue=Q.isGlob=!0,I=!0;break}}if(M===!0)continue;break}if(O.nonegate!==!0&&H===h&&z===J){ie=Q.negated=!0,J++;continue}if(O.noparen!==!0&&H===x){if(ue=Q.isGlob=!0,M===!0){for(;be()!==!0&&(H=je());){if(H===x){V=Q.backslashes=!0,H=je();continue}if(H===w){I=!0;break}}continue}break}if(ue===!0){if(I=!0,M===!0)continue;break}}O.noext===!0&&($=!1,ue=!1);let ge=W,Ae="",Ce="";J>0&&(Ae=W.slice(0,J),W=W.slice(J),se-=J),ge&&ue===!0&&se>0?(ge=W.slice(0,se),Ce=W.slice(se)):ue===!0?(ge="",Ce=W):ge=W,ge&&ge!==""&&ge!=="/"&&ge!==W&&S(ge.charCodeAt(ge.length-1))&&(ge=ge.slice(0,-1)),O.unescape===!0&&(Ce&&(Ce=c.removeBackslashes(Ce)),ge&&V===!0&&(ge=c.removeBackslashes(ge)));const F={prefix:Ae,input:A,start:J,base:ge,glob:Ce,isBrace:le,isBracket:oe,isGlob:ue,isExtglob:$,isGlobstar:ee,negated:ie,negatedExtglob:_e};if(O.tokens===!0&&(F.maxDepth=0,S(H)||Y.push(Q),F.tokens=Y),O.parts===!0||O.tokens===!0){let pe;for(let ye=0;ye<U.length;ye++){const q=pe?pe+1:J,K=U[ye],k=A.slice(q,K);O.tokens&&(ye===0&&J!==0?(Y[ye].isPrefix=!0,Y[ye].value=Ae):Y[ye].value=k,N(Y[ye]),F.maxDepth+=Y[ye].depth),(ye!==0||k!=="")&&X.push(k),pe=K}if(pe&&pe+1<A.length){const ye=A.slice(pe+1);X.push(ye),O.tokens&&(Y[Y.length-1].value=ye,N(Y[Y.length-1]),F.maxDepth+=Y[Y.length-1].depth)}F.slashes=U,F.parts=X}return F};o.exports=R},96:(o,a,i)=>{const{REGEX_BACKSLASH:c,REGEX_REMOVE_BACKSLASH:l,REGEX_SPECIAL_CHARS:u,REGEX_SPECIAL_CHARS_GLOBAL:p}=i(154);a.isObject=m=>m!==null&&typeof m=="object"&&!Array.isArray(m),a.hasRegexChars=m=>u.test(m),a.isRegexChar=m=>m.length===1&&a.hasRegexChars(m),a.escapeRegex=m=>m.replace(p,"\\$1"),a.toPosixSlashes=m=>m.replace(c,"/"),a.removeBackslashes=m=>m.replace(l,f=>f==="\\"?"":f),a.escapeLast=(m,f,h)=>{const _=m.lastIndexOf(f,h);return _===-1?m:m[_-1]==="\\"?a.escapeLast(m,f,_-1):`${m.slice(0,_)}\\${m.slice(_)}`},a.removePrefix=(m,f={})=>{let h=m;return h.startsWith("./")&&(h=h.slice(2),f.prefix="./"),h},a.wrapOutput=(m,f={},h={})=>{const _=h.contains?"":"^",y=h.contains?"":"$";let x=`${_}(?:${m})${y}`;return f.negated===!0&&(x=`(?:^(?!${x}).*$)`),x},a.basename=(m,{windows:f}={})=>{const h=m.split(f?/[\\/]/:"/"),_=h[h.length-1];return _===""?h[h.length-2]:_}}},t={};function r(o){var a=t[o];if(a!==void 0)return a.exports;var i=t[o]={exports:{}},c=!0;try{e[o](i,i.exports,r),c=!1}finally{c&&delete t[o]}return i.exports}typeof r<"u"&&(r.ab=__dirname+"/");var s=r(170);Br.exports=s})()),Br.exports}var ha;function L_(){return ha||(ha=1,function(e){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,{hasLocalMatch:function(){return o},matchLocalPattern:function(){return s}});const r=Ju();function s(a,i){if(a.search!==void 0&&a.search!==i.search)return!1;var c;return!!(0,r.makeRe)((c=a.pathname)!=null?c:"**",{dot:!0}).test(i.pathname)}function o(a,i){if(!a)return!0;const c=new URL(i,"http://n");return a.some(l=>s(l,c))}}(Fr)),Fr}var Ur={},_a;function M_(){return _a||(_a=1,function(e){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,{hasRemoteMatch:function(){return o},matchRemotePattern:function(){return s}});const r=Ju();function s(a,i){if(a.protocol!==void 0){const l=i.protocol.slice(0,-1);if(a.protocol!==l)return!1}if(a.port!==void 0&&a.port!==i.port)return!1;if(a.hostname===void 0)throw new Error(`Pattern should define hostname but found
|
|
17
|
-
`+JSON.stringify(a));if(!(0,r.makeRe)(a.hostname).test(i.hostname)||a.search!==void 0&&a.search!==i.search)return!1;var c;return!!(0,r.makeRe)((c=a.pathname)!=null?c:"**",{dot:!0}).test(i.pathname)}function o(a,i,c){return a.some(l=>c.hostname===l)||i.some(l=>s(l,c))}}(Ur)),Ur}var ga;function ed(){return ga||(ga=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return s}});const t=75;function r(o){let{config:a,src:i,width:c,quality:l}=o;var u;if(process.env.NODE_ENV!=="production"){const m=[];if(i||m.push("src"),c||m.push("width"),m.length>0)throw new Error("Next Image Optimization requires "+m.join(", ")+" to be provided. Make sure you pass them as props to the `next/image` component. Received: "+JSON.stringify({src:i,width:c,quality:l}));if(i.startsWith("//"))throw new Error('Failed to parse src "'+i+'" on `next/image`, protocol-relative URL (//) must be changed to an absolute URL (http:// or https://)');if(i.startsWith("/")&&a.localPatterns&&process.env.NODE_ENV!=="test"&&process.env.NEXT_RUNTIME!=="edge"){const{hasLocalMatch:f}=L_();if(!f(a.localPatterns,i))throw new Error("Invalid src prop ("+i+") on `next/image` does not match `images.localPatterns` configured in your `next.config.js`\nSee more info: https://nextjs.org/docs/messages/next-image-unconfigured-localpatterns")}if(!i.startsWith("/")&&(a.domains||a.remotePatterns)){let f;try{f=new URL(i)}catch(h){throw console.error(h),new Error('Failed to parse src "'+i+'" on `next/image`, if using relative image it must start with a leading slash "/" or be an absolute URL (http:// or https://)')}if(process.env.NODE_ENV!=="test"&&process.env.NEXT_RUNTIME!=="edge"){const{hasRemoteMatch:h}=M_();if(!h(a.domains,a.remotePatterns,f))throw new Error("Invalid src prop ("+i+') on `next/image`, hostname "'+f.hostname+'" is not configured under images in your `next.config.js`\nSee more info: https://nextjs.org/docs/messages/next-image-unconfigured-host')}}if(l&&a.qualities&&!a.qualities.includes(l))throw new Error("Invalid quality prop ("+l+") on `next/image` does not match `images.qualities` configured in your `next.config.js`\nSee more info: https://nextjs.org/docs/messages/next-image-unconfigured-qualities")}const p=l||((u=a.qualities)==null?void 0:u.reduce((m,f)=>Math.abs(f-t)<Math.abs(m-t)?f:m))||t;return a.path+"?url="+encodeURIComponent(i)+"&w="+c+"&q="+p+(process.env.NEXT_DEPLOYMENT_ID?"&dpl="+process.env.NEXT_DEPLOYMENT_ID:"")}r.__next_img_default=!0;const s=r}(zr)),zr}(function(e,t){"use client";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Image",{enumerable:!0,get:function(){return j}});const r=Oe,s=Nt,o=n,a=s._(g),i=r._(Rs),c=r._(k_()),l=uo,u=cr,p=O_(),m=ir,f=Yc(),h=r._(ed()),_=process.env.__NEXT_IMAGE_OPTS;typeof window>"u"&&(globalThis.__NEXT_IMAGE_IMPORTED=!0);function y(b,w,P,S,N,R,A){const L=b==null?void 0:b.src;if(!b||b["data-loaded-src"]===L)return;b["data-loaded-src"]=L,("decode"in b?b.decode():Promise.resolve()).catch(()=>{}).then(()=>{if(!(!b.parentElement||!b.isConnected)){if(w!=="empty"&&N(!0),P!=null&&P.current){const G=new Event("load");Object.defineProperty(G,"target",{writable:!1,value:b});let M=!1,U=!1;P.current({...G,nativeEvent:G,currentTarget:b,target:b,isDefaultPrevented:()=>M,isPropagationStopped:()=>U,persist:()=>{},preventDefault:()=>{M=!0,G.preventDefault()},stopPropagation:()=>{U=!0,G.stopPropagation()}})}if(S!=null&&S.current&&S.current(b),process.env.NODE_ENV!=="production"){const G=new URL(L,"http://n").searchParams.get("url")||L;if(b.getAttribute("data-nimg")==="fill"){if(!R&&(!A||A==="100vw")&&b.getBoundingClientRect().width/window.innerWidth<.6&&(A==="100vw"?(0,m.warnOnce)('Image with src "'+G+'" has "fill" prop and "sizes" prop of "100vw", but image is not rendered at full viewport width. Please adjust "sizes" to improve page performance. Read more: https://nextjs.org/docs/api-reference/next/image#sizes'):(0,m.warnOnce)('Image with src "'+G+'" has "fill" but is missing "sizes" prop. Please add it to improve page performance. Read more: https://nextjs.org/docs/api-reference/next/image#sizes')),b.parentElement){const{position:Y}=window.getComputedStyle(b.parentElement),X=["absolute","fixed","relative"];X.includes(Y)||(0,m.warnOnce)('Image with src "'+G+'" has "fill" and parent element with invalid "position". Provided "'+Y+'" should be one of '+X.map(String).join(",")+".")}b.height===0&&(0,m.warnOnce)('Image with src "'+G+'" has "fill" and a height value of 0. This is likely because the parent element of the image has not been styled to have a set height.')}const M=b.height.toString()!==b.getAttribute("height"),U=b.width.toString()!==b.getAttribute("width");(M&&!U||!M&&U)&&(0,m.warnOnce)('Image with src "'+G+`" has either width or height modified, but not the other. If you use CSS to change the size of your image, also include the styles 'width: "auto"' or 'height: "auto"' to maintain the aspect ratio.`)}}})}function x(b){return a.use?{fetchPriority:b}:{fetchpriority:b}}const v=(0,a.forwardRef)((b,w)=>{let{src:P,srcSet:S,sizes:N,height:R,width:A,decoding:L,className:O,style:G,fetchPriority:M,placeholder:U,loading:Y,unoptimized:X,fill:W,onLoadRef:z,onLoadingCompleteRef:J,setBlurComplete:se,setShowAltText:le,sizesInput:oe,onLoad:ue,onError:$,...ee}=b;return(0,o.jsx)("img",{...ee,...x(M),loading:Y,width:A,height:R,decoding:L,"data-nimg":W?"fill":"1",className:O,style:G,sizes:N,srcSet:S,src:P,ref:(0,a.useCallback)(E=>{w&&(typeof w=="function"?w(E):typeof w=="object"&&(w.current=E)),E&&($&&(E.src=E.src),process.env.NODE_ENV!=="production"&&(P||console.error('Image is missing required "src" property:',E),E.getAttribute("alt")===null&&console.error('Image is missing required "alt" property. Please add Alternative Text to describe the image for screen readers and search engines.')),E.complete&&y(E,U,z,J,se,X,oe))},[P,U,z,J,se,$,X,oe,w]),onLoad:E=>{const V=E.currentTarget;y(V,U,z,J,se,X,oe)},onError:E=>{le(!0),U!=="empty"&&se(!0),$&&$(E)}})});function C(b){let{isAppRouter:w,imgAttributes:P}=b;const S={as:"image",imageSrcSet:P.srcSet,imageSizes:P.sizes,crossOrigin:P.crossOrigin,referrerPolicy:P.referrerPolicy,...x(P.fetchPriority)};return w&&i.default.preload?(i.default.preload(P.src,S),null):(0,o.jsx)(c.default,{children:(0,o.jsx)("link",{rel:"preload",href:P.srcSet?void 0:P.src,...S},"__nimg-"+P.src+P.srcSet+P.sizes)})}const j=(0,a.forwardRef)((b,w)=>{const S=!(0,a.useContext)(f.RouterContext),N=(0,a.useContext)(p.ImageConfigContext),R=(0,a.useMemo)(()=>{var J;const se=_||N||u.imageConfigDefault,le=[...se.deviceSizes,...se.imageSizes].sort(($,ee)=>$-ee),oe=se.deviceSizes.sort(($,ee)=>$-ee),ue=(J=se.qualities)==null?void 0:J.sort(($,ee)=>$-ee);return{...se,allSizes:le,deviceSizes:oe,qualities:ue}},[N]),{onLoad:A,onLoadingComplete:L}=b,O=(0,a.useRef)(A);(0,a.useEffect)(()=>{O.current=A},[A]);const G=(0,a.useRef)(L);(0,a.useEffect)(()=>{G.current=L},[L]);const[M,U]=(0,a.useState)(!1),[Y,X]=(0,a.useState)(!1),{props:W,meta:z}=(0,l.getImgProps)(b,{defaultLoader:h.default,imgConf:R,blurComplete:M,showAltText:Y});return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(v,{...W,unoptimized:z.unoptimized,placeholder:z.placeholder,fill:z.fill,onLoadRef:O,onLoadingCompleteRef:G,setBlurComplete:U,setShowAltText:X,sizesInput:b.sizes,ref:w}),z.priority?(0,o.jsx)(C,{isAppRouter:S,imgAttributes:W}):null]})});(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)})(us,us.exports);var D_=us.exports;(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(l,u){for(var p in u)Object.defineProperty(l,p,{enumerable:!0,get:u[p]})}t(e,{default:function(){return c},getImageProps:function(){return i}});const r=Oe,s=uo,o=D_,a=r._(ed());function i(l){const{props:u}=(0,s.getImgProps)(l,{defaultLoader:a.default,imgConf:process.env.__NEXT_IMAGE_OPTS});for(const[p,m]of Object.entries(u))m===void 0&&delete u[p];return{props:u}}const c=o.Image})(Yu);var $_=Yu;const sn=D.getDefaultExportFromCjs($_),z_=({item:e,CONSTANTS:t})=>{const r=e.icon?t.PAYMENT_FLAGS.includes(e.icon)?"payment":"social":null,s=r==="payment"?t.PAYMENT_FLAGS_DICTIONARY[e.icon]:e.icon;return e.link?n.jsxs(ze,{href:e.link,target:"_blank",rel:"noopener noreferrer",className:me["support-item"],children:[e.image&&n.jsx("img",{src:e.image,alt:"",loading:"lazy"}),r==="payment"?n.jsx(sn,{alt:s,src:`/assets/${s}.svg`,width:20,height:20}):n.jsx(d.Icon,{size:"small",name:s})]}):n.jsxs("div",{className:me["support-item"],children:[e.image&&n.jsx("img",{src:e.image,alt:"",loading:"lazy"}),r==="payment"?n.jsx(sn,{alt:s,src:`/assets/${s}.svg`,width:20,height:20}):n.jsx(d.Icon,{size:"small",name:s})]})},F_=({content:e,CONSTANTS:t})=>n.jsx("div",{className:me["support-container"],children:e==null?void 0:e.map((r,s)=>n.jsxs("div",{"data-device":r.device,className:me["support-section"],children:[n.jsxs("div",{className:me["support-text"],children:[r.title&&n.jsx("h3",{children:r.title}),r.description&&n.jsx("p",{children:r.description})]}),Array.isArray(r.items)&&r.items.length&&n.jsx("div",{className:me["support-items"],"data-gap":r.gap,children:r.items.map((o,a)=>n.jsx(z_,{item:o,CONSTANTS:t},`footer-support-item-${a}`))})]},`footer-support-${s}`))}),B_=({name:e,nameIcon:t,maxWidth:r,rowAlignContent:s,columnAlignContent:o,columnAlignItems:a,textAlignContent:i,textAlignItems:c,children:l})=>n.jsx(d.TextStructure.Root,{layoutProps:{textRow:{alignContent:s,alignItems:s},columnWrapper:{alignContent:o,alignItems:a}},children:n.jsxs(d.TextStructure.DivWrapper,{alignContent:i,alignItems:c,className:me.footer__column,children:[n.jsxs("div",{className:t?me.footer__columnTitleIcon:me.footer__columnTitle,children:[n.jsx(d.Icon,{name:`${t}`,size:"small"}),e&&n.jsx("div",{children:e})]}),n.jsx("div",{className:me.footer__columnContent,style:{maxWidth:`${r}px`},children:l})]})}),U_=({name:e,nameIcon:t,maxWidth:r,children:s,ICONS:o,...a})=>n.jsxs(d.Accordion.Wrapper,{className:me.accordionWrapper,title:"accordion-wrapper",...a,children:[n.jsx(d.Accordion.Header,{id:(a==null?void 0:a.id)??"",className:me.accordionHeader,closeIndicator:n.jsx(d.Icon,{name:o.arrow_up,size:"medium"}),openIndicator:n.jsx(d.Icon,{name:o.arrow_down,size:"medium"}),title:"accordion-header",children:n.jsx(d.TextStructure.Root,{children:n.jsxs(d.TextStructure.DivWrapper,{className:t?me.accordionTextWrapper:"",children:[n.jsx(d.Icon,{name:`${t}`,size:"medium"}),n.jsx("h2",{className:"typography-style-body-md",children:e})]})})}),n.jsx(d.Accordion.Body,{title:"accordion-body",children:n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{className:me.footer__columnContent,style:{maxWidth:`${r}px`},children:s})})})]}),qr=e=>{const{isMobile:t}=ne();return t?n.jsx(U_,{...e}):n.jsx(B_,{...e})},Rn=({type:e,children:t,className:r,collumnName:s,collumnNameIcon:o,icons:a,iconLink:i,iconSize:c,link:l,paymentDisclaimer:u,paymentTitle:p,rowAlignContent:m,columnAlignContent:f,columnAlignItems:h,textAlignContent:_,textAlignItems:y,...x})=>{let v;const{handleSelectContent:C}=ae(),{nextimage:j}=ce();switch(e){case"menu":v=n.jsx(ze,{className:me.footer__itemLink,href:l??"#",prefetch:!1,children:n.jsx("span",{onClick:()=>{C({content:`footer:${s}:${t}`})},children:t})});break;case"payment":v=n.jsxs("div",{className:d.helpers.classNameConcat(me.payment,me.footer__itemSmallText),...x,children:[u,n.jsxs("div",{className:d.helpers.classNameConcat(me.footer__iconContainer,me.footer__iconListSubHeader),children:[p,n.jsx("div",{className:me.footer__iconList,children:a==null?void 0:a.map((b,w)=>n.jsx(j,{alt:b,src:`/assets/${b}.svg`,width:c??20,height:c??20},w))})]})]});break;case"social-media":v=n.jsx("div",{className:me.footer__iconContainer,...x,children:n.jsx("div",{className:me.footer__iconList,children:i==null?void 0:i.map((b,w)=>n.jsx(ze,{prefetch:!1,href:b.link??"#",target:"_blank",children:n.jsx(d.Icon,{size:"medium",name:b.icon,onClick:()=>C({content:`footer:redes-sociais:${b.icon}`})})},w))})});break;default:v=n.jsx("div",{className:r,...x,children:t})}return n.jsx(d.TextStructure.Root,{layoutProps:{textRow:{alignContent:m,alignItems:m},columnWrapper:{alignContent:f,alignItems:h}},...x,children:n.jsx(d.TextStructure.DivWrapper,{alignContent:_,alignItems:y,className:d.helpers.classNameConcat(me.footer__item,r),children:v})})},q_=({className:e,text:t,...r})=>n.jsx("div",{...r,className:d.helpers.classNameConcat(me.footer__legalInformation,e),children:n.jsx("span",{children:t})}),td=()=>{const{nextimage:e}=ce();return n.jsx("div",{className:me["footer--stamps"],children:n.jsx(e,{alt:"Empresa B",className:me["footer--stamps--company"],src:"/images/Footer/new_certfB.png",width:56,height:64})})};td.displayName="Footer.Stamps";const nd=({children:e,legalTextSlot:t,adornment:r,className:s,...o})=>{const{isMobile:a}=ne(),i=g.Children.toArray(e).filter(Boolean),c=i.length;return n.jsxs("div",{className:me.footer__main,children:[(r==null?void 0:r.top)&&n.jsx("div",{className:me.footer__top,children:r==null?void 0:r.top}),c>0&&n.jsx("div",{...o,className:d.helpers.classNameConcat(me.footer__wrapper,s),children:i.map((l,u)=>n.jsx("div",{style:{flexGrow:1,maxWidth:`calc(100% / ${a?1:"fit-content"})`},children:l},u))}),(r==null?void 0:r.bottom)&&n.jsx("div",{className:me.footer__bottom,children:r.bottom}),t&&n.jsx("div",{className:me.footer__legalText,children:t})]})};nd.displayName="Footer.Wrapper";const rd=({data:{links:{links:e}},payments:t,socialInfo:r,socialMedias:s,adornment:o,LEGAL_INFORMATION_TEXT:a,ICONS:i,className:c,hasFooterStamps:l})=>{var u;return n.jsxs(nd,{className:c,adornment:o,legalTextSlot:n.jsx(q_,{text:a}),children:[Array.isArray(e.column)&&e.column.map((p,m)=>n.jsx(qr,{id:`${m}column-menu`,name:p.name,nameIcon:p.nameIcon,ICONS:i,children:p.items.map((f,h)=>n.jsx(Rn,{type:"menu",link:f.link,collumnName:p.name,collumnNameIcon:p.nameIcon,children:f.text},h))},m)),t&&((u=t.acceptedFlags)==null?void 0:u.length)>0&&n.jsx(qr,{id:"payment-column",name:t==null?void 0:t.title,nameIcon:t==null?void 0:t.titleIcon,maxWidth:150,ICONS:i,children:n.jsx(Rn,{type:"payment",paymentDisclaimer:t==null?void 0:t.text,paymentTitle:t==null?void 0:t.flagsTitle,iconSize:16,icons:t==null?void 0:t.acceptedFlags})}),n.jsxs(qr,{id:"social-media-column",name:r==null?void 0:r.title,ICONS:i,children:[r!=null&&r.subTitle?n.jsx(Rn,{children:r==null?void 0:r.subTitle}):null,n.jsx(Rn,{type:"social-media",iconSize:24,iconLink:s}),l&&n.jsx(td,{})]})]})};rd.displayName="Footer";const H_=Object.freeze(Object.defineProperty({__proto__:null,Footer:rd,FooterSupport:F_},Symbol.toStringTag,{value:"Module"})),V_="_header_9xxjk_57",W_="_actions_9xxjk_131",G_="_breadcrumb_9xxjk_142",K_="_credits_9xxjk_157",X_="_pdplinks_9xxjk_185",Y_="_similars_9xxjk_212",Q_="_sizes_9xxjk_251",Z_="_measurementTable_9xxjk_267",J_="_measurementHead_9xxjk_280",eg="_measurementRows_9xxjk_285",tg="_measurementRowsTitle_9xxjk_302",ng="_measurementRowsText_9xxjk_314",rg="_measurementImage_9xxjk_325",sg="_measurementImageContainer_9xxjk_328",og="_measurementContent_9xxjk_337",ag="_measurementTitle_9xxjk_341",ig="_measurementClose_9xxjk_352",cg="_productref_9xxjk_417",lg="_slideOut_9xxjk_1",ug="_slideIn_9xxjk_1",dg="_content_9xxjk_397",mg="_pdp_9xxjk_185",pg="_divider_9xxjk_575",Z={"bottom-navigation":"_bottom-navigation_9xxjk_1","bottom-navigation__credits-modifier":"_bottom-navigation__credits-modifier_9xxjk_18","bottom-navigation__header":"_bottom-navigation__header_9xxjk_21","bottom-navigation__header-content":"_bottom-navigation__header-content_9xxjk_26","golden-tag-content":"_golden-tag-content_9xxjk_45","bottom-navigation__price-and-promo":"_bottom-navigation__price-and-promo_9xxjk_48",header:V_,"golden-tag":"_golden-tag_9xxjk_45","golden-tag-video":"_golden-tag-video_9xxjk_86","golden-tag-content-text":"_golden-tag-content-text_9xxjk_105",actions:W_,"add-to-cart":"_add-to-cart_9xxjk_138",breadcrumb:G_,"breadcrumb--active":"_breadcrumb--active_9xxjk_147",credits:K_,"gallery-carousel-modifier":"_gallery-carousel-modifier_9xxjk_162",pdplinks:X_,"links-wrapper":"_links-wrapper_9xxjk_195",similars:Y_,"similars-info":"_similars-info_9xxjk_224","toggle-style-modifier":"_toggle-style-modifier_9xxjk_233","accessibility-info":"_accessibility-info_9xxjk_237",sizes:Q_,"price-wrapper":"_price-wrapper_9xxjk_263",measurementTable:Z_,measurementHead:J_,measurementRows:eg,measurementRowsTitle:tg,measurementRowsText:ng,measurementImage:rg,measurementImageContainer:sg,measurementContent:og,measurementTitle:ag,measurementClose:ig,"tabs-root-modifier":"_tabs-root-modifier_9xxjk_358","tabs-list-modifier":"_tabs-list-modifier_9xxjk_376","tabs-item-modifier":"_tabs-item-modifier_9xxjk_393","content-wrapper":"_content-wrapper_9xxjk_397",productref:cg,"tabs-panel":"_tabs-panel_9xxjk_428","tabs-panel-exit":"_tabs-panel-exit_9xxjk_434",slideOut:lg,"tabs-panel-enter":"_tabs-panel-enter_9xxjk_438",slideIn:ug,content:dg,pdp:mg,"pdp-main":"_pdp-main_9xxjk_496","pdp-main__gallery-wrapper":"_pdp-main__gallery-wrapper_9xxjk_501","pdp-main__info":"_pdp-main__info_9xxjk_518","pdp-main__info-main-content":"_pdp-main__info-main-content_9xxjk_533","pdp-main__info-subsection":"_pdp-main__info-subsection_9xxjk_533","subsection-product-info":"_subsection-product-info_9xxjk_544","subsection-similars":"_subsection-similars_9xxjk_547","subsection-sizes":"_subsection-sizes_9xxjk_550","subsection-actions":"_subsection-actions_9xxjk_553","pdp-main__info-secondary-content":"_pdp-main__info-secondary-content_9xxjk_557","sections-title":"_sections-title_9xxjk_563",divider:pg,"breadcrumbs-desktop":"_breadcrumbs-desktop_9xxjk_580","breadcrumbs-mobile":"_breadcrumbs-mobile_9xxjk_589"},fg=({children:e,link:t,TOGGLE_STYLE_MODIFIER:r})=>{const{isMobile:s}=ne(),{router:o}=ce(),a=()=>{t&&o.push(t)},i=g.useRef(null);return n.jsx(d.ToggleStyle.Wrapper,{size:s?"medium":"small",style:{...r,border:`${i.current===t?"2":"1"}`,overflow:"hidden",padding:"0"},onClick:a,active:i.current===t,children:e})},sd=({productId:e,similars:t,TOGGLE_STYLE_MODIFIER:r})=>{const{thumbImage:s}=Me(),o=[{productId:e,slug:"",textureImage:(s==null?void 0:s.imageUrl)??"",textureAlt:(s==null?void 0:s.imageText)??""},...t];return n.jsx("div",{children:o.map((a,i)=>a.textureImage?n.jsxs(fg,{link:a.slug?a.slug:null,TOGGLE_STYLE_MODIFIER:r,children:[n.jsx(d.ToggleStyle.DisabledAdornment,{}),n.jsx(d.ToggleStyle.Texture,{children:n.jsx(Pe.Image,{alt:a.textureAlt,src:a.textureImage,height:34,width:34,style:{borderRadius:0,height:"100%"}})})]},`similars-item-${i}`):null)})},hg=({children:e,storeId:t,productId:r,PDP_INFO:s,TEXTURE_IMAGE:o,TOGGLE_STYLE_MODIFIER:a})=>{const{items:i,loadSimilars:c}=so(r,{filterTexture:o,storeId:t});return g.useEffect(()=>{c()},[c]),n.jsxs("div",{className:Z.similars,children:[n.jsxs("div",{className:Z["similars-info"],children:[n.jsx("span",{className:Z["sections-title"],children:s.product.color_title}),e]}),n.jsx(sd,{productId:r,similars:i,TOGGLE_STYLE_MODIFIER:a})]})},_g=()=>{const{colorName:e}=Me();return n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{className:e.length===0?"":Z["accessibility-info"],children:n.jsx("p",{children:e})})})},lr=({className:e,titleId:t})=>{var o,a,i;const{productName:r,tag:s}=Me();return n.jsxs("div",{className:d.helpers.classNameConcat(Z.header,e),children:[s!=null&&s.commercial?n.jsx(d.Tag,{size:"small",title:(o=s.commercial)==null?void 0:o.value,variant:"quaternary",adornment:{start:(a=s.commercial)!=null&&a.icon?n.jsx(d.Icon,{name:s.commercial.icon}):null},children:(i=s.commercial)==null?void 0:i.value}):null,n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{children:n.jsx("h1",{id:t,children:r})})})]})};lr.displayName="PDP.PDPHeader";const mo=({layout:e="horizontal"})=>{const{price:t,listPrice:r,installments:s}=Me(),{count:o,value:a}=s,i=D.formatPriceToCurrency(r??0,!0),c=D.formatPriceToCurrency(t??0,!0),l=D.formatPriceToCurrency(a??0);return n.jsx(d.ProductInfo.Root,{size:"small",layout:e,children:n.jsxs(d.ProductInfo.Wrapper,{layout:e,size:"small",className:Z["price-wrapper"],children:[n.jsx(d.ProductInfo.ValuesWrapper,{children:t!==r?n.jsxs(n.Fragment,{children:[n.jsx(d.ProductInfo.Price,{label:"originalPrice",value:i.toString(),size:"small"}),n.jsx(d.ProductInfo.Price,{label:"discountPrice",value:c.toString(),size:"small"})]}):n.jsx(d.ProductInfo.Price,{label:"defaultPrice",value:c.toString(),size:"small"})}),o&&o>1&&a?n.jsx(d.ProductInfo.Price,{label:"installment",value:`ou ${o}x ${l}`,size:"small"}):null]})})},ds=({onAddCallBack:e,onDisabledClickCallBack:t,addToCartBtnSize:r,BUY_BUTTON_LABELS:s})=>{const o=ln(),{productId:a,productData:i,price:c,listPrice:l,thumbImage:u,isKit:p}=Me(),{isMobile:m}=ne(),{addToCart:f}=ve(),{sendDataLayerEvent:h}=ae(),_=!p&&(!o.sku||!o.available),y=()=>{if(_&&typeof t=="function"){t();return}typeof e=="function"&&e({id:o.sku,quantity:o.quantity,seller:o.sellerId,sku:a}),f({id:o.sku,quantity:o.quantity,seller:o.sellerId},{id:a,texture:u==null?void 0:u.imageUrl}),h({functionKey:"skuEvents",data:{event:"add_to_cart",commonData:{products:[{...i,price:c,listPrice:l}]},supportData:{selectedSkus:[o]},customData:{quantity:o.quantity}}})};return n.jsx(d.Button,{className:Z["add-to-cart"],size:m?(r==null?void 0:r.mobile)??"large":(r==null?void 0:r.desktop)??"x-large",onClick:y,children:o.sku&&o.available?`${s.add_to_cart}`:`${s.select_size}`})},gg=({addToCartBtnSize:e,BUY_BUTTON_LABELS:t})=>{const{isMobile:r}=ne(),s=ln(),{sizesContainerRef:o}=Ba(),{structureRef:a}=Ne();return s.sku&&s.available?n.jsx(ds,{addToCartBtnSize:e,BUY_BUTTON_LABELS:t}):n.jsx(d.Button,{className:Z["add-to-cart"],size:r?(e==null?void 0:e.mobile)??"large":(e==null?void 0:e.desktop)??"x-large",onClick:()=>{o.current&&a.current&&window.document.body.scrollTo({top:o.current.offsetTop-a.current.offsetHeight,behavior:"smooth"})},children:s.sku&&s.available?t.add_to_cart:t.select_size})},Tn=({value:e,label:t,suppressHydrationWarning:r=!1},s)=>{const o={value:e,...r&&{suppressHydrationWarning:!0}},a=s==="compact"?o:{...o,label:t};return n.jsx(d.Timer.Digit,{...a})},Hn=({dateEnd:e,dateInit:t,type:r="default",TIME_ZONE:s,...o})=>{const[a,i]=g.useState(Cc(new Zr.TZDate(Date.now(),s),new Zr.TZDate(e,s))),[c,l]=g.useState(!1);if(g.useEffect(()=>{l(!0);const h=setInterval(()=>{i(_=>_<=0?(clearInterval(h),0):_-1e3)},1e3);return()=>clearInterval(h)},[]),!c||a<=0)return n.jsx(n.Fragment,{});const u=Yt(a,"days"),p=Yt(a,"hours"),m=Yt(a,"minutes"),f=Yt(a);return n.jsxs(d.Timer.Root,{...o,children:[u?n.jsxs(n.Fragment,{children:[Tn({value:u,label:"dias"},r),n.jsx(d.Timer.Separator,{})]}):null,Tn({value:p,label:"horas"},r),n.jsx(d.Timer.Separator,{}),Tn({value:m,label:"min"},r),n.jsx(d.Timer.Separator,{}),Tn({value:f,label:"segs",suppressHydrationWarning:!0},r)]})},po=({TIME_ZONE:e})=>{const{tag:t}=Me(),r=t==null?void 0:t.flagGoldenPdp,s=g.useMemo(()=>{var o;if((o=r==null?void 0:r.tagImage)!=null&&o.includes("player.vimeo")){const a=r.tagImage.split("?")[1],i=a==null?void 0:a.split("&"),c=i==null?void 0:i.filter(u=>u.includes("loc")||u.includes("signature")||u.includes("user_id")),l=c==null?void 0:c.join("&");return`${r.tagImage.split("?")[0]}?${l}`}return r==null?void 0:r.tagImage},[r==null?void 0:r.tagImage]);return r!=null&&r.enableTag?n.jsxs("div",{className:Z["golden-tag"],style:(r==null?void 0:r.backgroundSelect)==="color"?{backgroundColor:r==null?void 0:r.backgroundColor}:(r==null?void 0:r.backgroundSelect)==="image"?{backgroundImage:`url(${r==null?void 0:r.tagImage})`}:void 0,children:[(r==null?void 0:r.backgroundSelect)==="video"&&n.jsx("div",{className:Z["golden-tag-video"],children:n.jsx(Pe.Video,{src:s,autoPlay:!0,muted:!0,loop:!0,playsInline:!0})}),n.jsxs("div",{className:Z["golden-tag-content"],children:[n.jsx("span",{className:Z["golden-tag-content-text"],style:{color:r==null?void 0:r.textColor},children:r==null?void 0:r.value}),(r==null?void 0:r.countDownEndDate)&&n.jsx(Hn,{mode:r==null?void 0:r.timerMode,size:"x-small",type:"compact",dateEnd:new Date((r==null?void 0:r.countDownEndDate)??""),TIME_ZONE:e})]})]}):null};po.displayName="PDP.GoldenTag";const yg=({addToCartBtnSize:e,BUY_BUTTON_LABELS:t,TIME_ZONE:r,Z_INDEX_WAR:s})=>{const{isMobile:o}=ne();return o?n.jsxs(d.Card,{className:Z["bottom-navigation"],shadow:!0,style:{zIndex:s.pdp_bottom_navigation},children:[n.jsxs("div",{className:Z["bottom-navigation__header"],children:[n.jsx(po,{TIME_ZONE:r}),n.jsxs("div",{className:Z["bottom-navigation__header-content"],children:[n.jsx(lr,{}),n.jsx(mo,{layout:"name-vertical"})]})]}),n.jsx(gg,{addToCartBtnSize:e,BUY_BUTTON_LABELS:t})]}):null},xg=({children:e,setShowBottomNavigation:t})=>{const r=g.useRef(null),s=As(r),o=g.useRef(s);return g.useEffect(()=>{var i;const{top:a}=((i=r.current)==null?void 0:i.getBoundingClientRect())??{top:0};o.current!==s&&a>0&&(t(!s),o.current=s)},[s]),n.jsx("div",{ref:r,style:{width:"100%"},children:e})},vg=({ICONS:e})=>{const{isMobile:t}=ne(),{price:r,listPrice:s,productData:o,productId:a}=Me(),{sendDataLayerEvent:i}=ae(),c=qt(),{toggleProduct:l}=At();return n.jsx(d.Button,{adornment:{start:n.jsx(d.Icon,{name:e[c.includes(a)?"favorite_true":"favorite_false"],size:"medium"})},className:Z["add-to-wishlist"],size:t?"medium":"x-large",variant:"tertiary",onClick:()=>{l(a),i({functionKey:"productEvents",data:{event:c.includes(a)?"remove_from_wishlist":"add_to_wishlist",outsideEcommerceData:{region:"PDP"},commonData:{...o,price:r,listPrice:s}}})}})},od=({showWishlist:e=!0,callBack:t,addToCartBtnSize:r,BUY_BUTTON_LABELS:s,ICONS:o,TIME_ZONE:a,Z_INDEX_WAR:i})=>{const{isMobile:c}=ne(),[l,u]=g.useState(!0);return n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:Z.actions,children:[c?n.jsx(xg,{setShowBottomNavigation:u,children:n.jsx(ds,{onAddCallBack:t,addToCartBtnSize:r,BUY_BUTTON_LABELS:s})}):n.jsx(ds,{onAddCallBack:t,addToCartBtnSize:r,BUY_BUTTON_LABELS:s}),e&&n.jsx(vg,{ICONS:o})]}),c&&l&&n.jsx(yg,{addToCartBtnSize:r,BUY_BUTTON_LABELS:s,Z_INDEX_WAR:i,TIME_ZONE:a})]})},ad=({className:e,device:t,ICONS:r})=>{const{breadcrumbList:s,productName:o}=Me(),a=i=>i.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"");return n.jsx(d.BreadCrumb.DivWrapper,{className:d.helpers.classNameConcat(Z.breadcrumb,[t==="mobile"?Z["breadcrumbs-mobile"]:Z["breadcrumbs-desktop"],e]),children:n.jsxs(d.BreadCrumb.List,{children:[Array.isArray(s)&&s.map((i,c)=>{const l=a(s.slice(0,c+1).map(u=>u.replace(/\s/g,"-").toLowerCase()).join("/"));return n.jsx(d.BreadCrumb.Item,{adornment:{end:n.jsx(d.Icon,{name:r.arrow_right})},role:"listitem",children:n.jsx(ze,{href:`/${l}`,children:i})},`pdp-breadcrumb-${l}-${c}`)}),n.jsx(d.BreadCrumb.Item,{role:"listitem",className:d.helpers.classNameConcat(Z["breadcrumb--active"],e),children:o},"pdp-breadcrumb-productName")]})})};ad.displayName="PDP.BreadCrumb";const id=({className:e})=>{var s;const{tag:t}=Me(),r=t==null?void 0:t.flagPdp;return r&&((s=r==null?void 0:r.value)!=null&&s.length)?n.jsx(d.Tag,{className:d.helpers.classNameConcat(Z.credits,e),variant:"tertiary",title:r==null?void 0:r.value,size:"small",adornment:{start:r!=null&&r.enableIcon&&(r!=null&&r.icon)?n.jsx(d.Icon,{name:r==null?void 0:r.icon,style:{color:r==null?void 0:r.iconColor}}):null},style:{background:r==null?void 0:r.tagColor,color:r==null?void 0:r.textColor},children:r==null?void 0:r.value}):n.jsx(n.Fragment,{})};id.displayName="PDPCredits";const bg=()=>{const{descriptionContent:e,productReference:t}=Me(),[r,s]=g.useState("description");return n.jsxs(d.Tabs.Root,{className:Z["tabs-root-modifier"],children:[n.jsx(d.Tabs.TabList,{className:Z["tabs-list-modifier"],children:e==null?void 0:e.map(({label:o,value:a})=>n.jsx(d.Tabs.Item,{label:o,value:a,activeTab:r,onTabChange:s,size:"large",className:`${Z["tabs-item-modifier"]} ${r===a?Z["tabs-item-active"]:""}`},a))}),n.jsxs("div",{className:Z["content-wrapper"],children:[r==="description"?n.jsx("div",{children:n.jsxs("span",{className:Z.productref,children:["Ref:",t]})}):"",e==null?void 0:e.map(({value:o,content:a})=>r===o?n.jsx(d.Tabs.Panel,{className:`${Z["tabs-panel"]} ${r===o?Z["tabs-panel-enter"]:Z["tabs-panel-exit"]}`,children:n.jsx("div",{className:Z.content,dangerouslySetInnerHTML:{__html:a}})},o):null)]})]})},jg=({CURRENCY:e,DELIVERY_INFO_BOXES_ALLOWED:t,FREIGHT_CALCULATION:r,Z_INDEX_WAR:s})=>{const o=ln(),{isMobile:a}=ne();return n.jsxs(n.Fragment,{children:[a?n.jsx(d.Utils.Divider,{direction:"horizontal",size:"small"}):null,n.jsx(wu,{skuId:o.available?o.sku:"",size:a?r.inputSize.mobile:r.inputSize.desktop,quantity:o.quantity,sellerId:o.sellerId,seller:o.sellerName,local:"PDP",CONSTANTS_PROPS:{freightConfig:r,deliveryInfoBoxesAllowed:t,toolTipZIndex:s.modal,currency:e}}),a?n.jsx(d.Utils.Divider,{direction:"horizontal",size:"small"}):null]})},ya=({image:e,index:t,handleZoom:r,PRODUCT_IMAGE_DIMENSIONS:s})=>{const o=D.resizingImg(e.imageUrl,s.pdp),{nextimage:a}=ce();return n.jsx(a,{src:o,alt:e.imageLabel,objectFit:"contain",...s.pdp,...t<=1&&{priority:!0,loading:"eager"},onClick:()=>{r(t)}},t)},Cg=({video:e,productName:t,poster:r})=>{const{sendDataLayerEvent:s}=ae(),o=g.useRef(!1);return n.jsx(Pe.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:t}}}))},poster:r})},cd=({images:e,video:t,handleZoom:r,productName:s,PRODUCT_IMAGE_DIMENSIONS:o})=>{var u,p;const{initialize:a,pagination:i,controller:c,itemsStyles:l}=d.Carousel.useCarousel({gap:0,itemsPerPage:1,loop:!1,direction:"row"});return n.jsxs(d.Carousel.Root,{innerRef:m=>{a(m)},className:Z["gallery-carousel-modifier"],children:[n.jsx(d.Carousel.Controller,{position:"absolute",top:"24px",bottom:"unset",left:"16px",children:n.jsx(d.Carousel.Bullets,{page:i.currentPage,total:e.length,onBulletClick:m=>c==null?void 0:c.navigateTo(m)})}),n.jsxs(d.Carousel.Body,{children:[n.jsx(d.Carousel.Item,{style:l,children:n.jsx(ya,{image:e[0],index:0,handleZoom:r,PRODUCT_IMAGE_DIMENSIONS:o})},"PDP_gallery_0"),t&&n.jsx(d.Carousel.Item,{style:l,children:n.jsx(Cg,{video:t,productName:s,...((u=e[1])==null?void 0:u.imageUrl)&&{poster:(p=e[1])==null?void 0:p.imageUrl}})},"PDP_gallery_video"),e.map((m,f)=>f===0?null:n.jsx(d.Carousel.Item,{style:l,children:n.jsx(ya,{image:m,index:f,handleZoom:r,PRODUCT_IMAGE_DIMENSIONS:o})},`PDP_gallery_${f}`))]})]})};cd.displayName="PDP.Carousel";const Sg="_thumbs_1fbzz_65",wg="_selected_1fbzz_93",Pg="_carousel_1fbzz_162",Ng="_bullets_1fbzz_199",we={"image-zoom-wrapper-desktop":"_image-zoom-wrapper-desktop_1fbzz_1","button-close-container":"_button-close-container_1fbzz_10","button-close":"_button-close_1fbzz_10","main-image-container":"_main-image-container_1fbzz_22","image-desktop":"_image-desktop_1fbzz_52",thumbs:Sg,selected:wg,"image-zoom-wrapper-mobile":"_image-zoom-wrapper-mobile_1fbzz_115","image-mobile":"_image-mobile_1fbzz_145","image-zoom--image":"_image-zoom--image_1fbzz_159",carousel:Pg,"carousel-controller":"_carousel-controller_1fbzz_167","arrow-left":"_arrow-left_1fbzz_177","arrow-right":"_arrow-right_1fbzz_178",bullets:Ng,"zoom-popup":"_zoom-popup_1fbzz_210","image-zoom--mobile":"_image-zoom--mobile_1fbzz_250","image-zoom--image--img":"_image-zoom--image--img_1fbzz_280"},xa=({onClose:e,ICONS:t})=>n.jsx("div",{className:`${we["button-close-container"]}`,children:n.jsx(d.Button,{iconNameStart:t.close,iconSize:"medium",className:`${we["button-close"]}`,variant:"tertiary",state:"default",size:"medium",onClick:e,style:{textDecoration:"none"}})}),Eg=({children:e,Z_INDEX_WAR:t,...r})=>n.jsx("div",{...r,className:we["image-zoom-wrapper-desktop"],style:{zIndex:t.pdp_image_zoom},children:e}),ld=({images:e,setCurrent:t,setFirstImgLoaded:r,ICONS:s,PRODUCT_IMAGE_DIMENSIONS:o})=>{const{nextimage:a}=ce();let i=null;const c=g.useRef(null),{initialize:l,controller:u,pagination:p,itemsStyles:m}=d.Carousel.useCarousel({itemsPerPage:1,gap:10,loop:!1,direction:"row"}),f=_=>{u==null||u.navigateTo(_)},h=()=>{r(!0)};return g.useEffect(()=>{t(p.currentPage)},[p.currentPage,t]),n.jsxs(d.Carousel.Root,{innerRef:_=>{_&&!i&&(i=_,l(i))},className:we.carousel,children:[n.jsxs(d.Carousel.Controller,{className:we["carousel-controller"],children:[n.jsx(d.Button,{variant:"tertiary",onClick:()=>u==null?void 0:u.prevPage(),className:we["arrow-left"],adornment:{start:n.jsx(d.Icon,{name:s.arrow_left})}}),n.jsx(d.Button,{variant:"tertiary",onClick:()=>u==null?void 0:u.nextPage(),className:we["arrow-right"],adornment:{start:n.jsx(d.Icon,{name:s.arrow_right})}})]}),n.jsx(d.Carousel.Body,{children:Array.isArray(e)&&e.map((_,y)=>n.jsx(d.Carousel.Item,{style:m,children:n.jsx(a,{...o.image_zoom.mobile,...y===0&&{priority:!0,loading:"eager"},ref:c,className:we.imageMobile,src:_.imageUrl,alt:_.imageText,quality:100,...y===0&&{onLoad:h}})},y))}),n.jsx(d.Carousel.Bullets,{className:we.bullets,page:p.currentPage,total:p.totalPages,onBulletClick:f})]})};ld.displayName="ImageZoom.Mobile.Carousel";const ud=({imgRef:e,image:t,PRODUCT_IMAGE_DIMENSIONS:r})=>{Xa();const{nextimage:s}=ce();return n.jsx("div",{className:we["image-zoom--image"],ref:e,children:n.jsx(s,{...r.image_zoom.mobile,alt:t.imageText,className:we["image-zoom--image--img"],quality:100,src:t.imageUrl})})};ud.displayName="ImageZoom.ImageZoom";const dd=({loaded:e=!1})=>n.jsx("div",{className:we["zoom-popup"],"data-loaded":e,children:n.jsxs("svg",{width:"38",height:"39",viewBox:"0 0 38 39",xmlns:"http://www.w3.org/2000/svg",children:[n.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.93 5.382a3.711 3.711 0 0 1 2.55-1.007c.949 0 1.864.36 2.549 1.007a3.534 3.534 0 0 1 1.113 2.472v11.357l10.118 3.332c.587.193 1.1.56 1.465 1.053.366.494.565 1.089.566 1.7v.004c0 .22-.025.44-.075.653v.005l-2.98 12.52a.625.625 0 0 1-1.215-.29l2.977-12.515v-.002c.029-.122.043-.247.044-.372a1.619 1.619 0 0 0-.321-.958 1.729 1.729 0 0 0-.851-.61L24.32 20.257a.625.625 0 0 1-.43-.594V7.88a2.285 2.285 0 0 0-.72-1.59 2.462 2.462 0 0 0-1.691-.665c-.635 0-1.241.24-1.69.666a2.285 2.285 0 0 0-.722 1.59v19.04a.625.625 0 0 1-1.115.388l-.056-.071-.161-.202a178.922 178.922 0 0 0-2.333-2.858l-.002-.002a2.581 2.581 0 0 0-.897-.69 2.677 2.677 0 0 0-1.122-.25H12.37c-.307 0-.61.078-.874.225a1.712 1.712 0 0 0-.635.61 1.625 1.625 0 0 0-.016 1.653l7.128 12.296a.625.625 0 0 1-1.082.627L9.762 26.35a2.876 2.876 0 0 1 .027-2.924 2.962 2.962 0 0 1 1.098-1.057 3.05 3.05 0 0 1 1.482-.384h1.016c.57.002 1.133.127 1.648.368.515.24.97.59 1.33 1.024.514.614 1.026 1.239 1.455 1.768V7.855a3.535 3.535 0 0 1 1.113-2.473ZM6.446 10.22a.625.625 0 0 1 0 .884l-5.324 5.324a.625.625 0 0 1-.884-.884l5.324-5.324a.625.625 0 0 1 .884 0Z"}),n.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M.68 12.033c.345 0 .625.28.625.625v2.703h2.702a.625.625 0 1 1 0 1.25H.68a.625.625 0 0 1-.625-.625v-3.328c0-.345.28-.625.625-.625ZM16.429.237a.625.625 0 0 1 0 .884l-5.325 5.324a.625.625 0 0 1-.884-.883L15.545.237a.625.625 0 0 1 .884 0Z"}),n.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.034.68c0-.346.28-.626.625-.626h3.328c.345 0 .625.28.625.625v3.328a.625.625 0 1 1-1.25 0V1.304h-2.703a.625.625 0 0 1-.625-.625Z"})]})});dd.displayName="ImageZoom.ZoomPopup";const md=({images:e,ICONS:t,PRODUCT_IMAGE_DIMENSIONS:r,...s})=>{const[o,a]=g.useState(!1),[i,c]=g.useState(0),{containerRef:l,imgRef:u,scale:p}=Ya({defaultScale:1,maxScale:3});return n.jsxs("div",{...s,className:we["image-mobile"],"data-disable-carrousel-pan":p>1,children:[n.jsx(dd,{loaded:o}),n.jsx(ld,{images:e,setCurrent:c,setFirstImgLoaded:a,ICONS:t,PRODUCT_IMAGE_DIMENSIONS:r}),n.jsx("div",{className:we["image-zoom--mobile"],ref:l,children:n.jsx(ud,{imgRef:u,image:e[i],PRODUCT_IMAGE_DIMENSIONS:r})})]})};md.displayName="ImageZoom.ImageMobile";const Ig=({children:e,Z_INDEX_WAR:t,...r})=>n.jsx("div",{...r,className:we["image-zoom-wrapper-mobile"],style:{zIndex:t.pdp_image_zoom},children:e}),Rg="_modal_1u87b_1",st={modal:Rg,"quick-shop__modal":"_quick-shop__modal_1u87b_4","shop-bag":"_shop-bag_1u87b_9","modal-product-body":"_modal-product-body_1u87b_25","pdp-main__info-modifier":"_pdp-main__info-modifier_1u87b_32","modal-header":"_modal-header_1u87b_38","modal-header__title":"_modal-header__title_1u87b_41"};function Tg({headerTitle:e,isMobile:t,ICONS:r}){return n.jsx(d.Modal.Header,{navigation:"top",className:st["modal-header"],children:n.jsxs(d.Modal.Controls,{navigation:"top",isMobile:t,children:[n.jsx("div",{className:st["modal-header__title"],children:n.jsx(d.Modal.Title,{navigation:"top",className:st["quick-shop__title"],title:e})}),n.jsx(d.Button,{className:st["modal-header__close-button"],"data-close":!0,iconNameStart:r.close,size:"small",variant:"tertiary"})]})})}const pd=({PDP_INFO:e,PLP_SIZE_ORDER:t,ICONS:r,NEWSLETTER_CONFIGS:s,NOTIFY_INFO:o,PRODUCT_CARD_TEXTS:a,Z_INDEX_WAR:i})=>{const{sizes:c,productId:l,handleViewItemEvent:u}=Me(),p=g.useMemo(()=>c!=null&&c.length?ml({items:c,getLabel:b=>b.value,PLP_SIZE_ORDER:t}):[],[c]),{sizesContainerRef:m}=Ba(),{isMobile:f}=ne(),h=ln(),_=Ai(),{setValue:y}=Ii(),{setValue:x}=$s(),v=g.useRef({}),[C,j]=g.useState(null);return n.jsxs("div",{ref:m,className:d.helpers.classNameConcat(Z.sizes,"PDP_sizes"),children:[n.jsx("span",{className:Z["sections-title"],children:e.product.size_title}),n.jsx("div",{children:p.map(b=>(!b.available&&!v.current[b.value]&&(v.current[b.value]={disable:!b.available,size:b.value,skuID:b.sku}),n.jsxs(d.ToggleSize.Wrapper,{size:f?"medium":"large",title:b.value,outOfStock:!b.available,onClick:()=>{b.available||(j({skuID:b.sku,size:b.value,disable:!0}),x(!0)),h.sku!==b.sku&&(y({...h,productId:l,name:b.name,size:b.value,sku:b.sku,sellerId:b.sellerId,sellerName:b.sellerName,available:b.available}),u({sku:b.sku,size:b.value}))},active:h.sku===b.sku,children:[n.jsx(d.ToggleSize.DisabledAdornment,{title:"disabled-adornment-texture"}),n.jsx(d.ToggleSize.Text,{children:b==null?void 0:b.value})]},`sizes-${b.sku}-${b.value}`)))}),n.jsx(Ys,{open:_,setVisible:x,sku:C,setSku:j,skus:Object.values(v.current),ICONS:r,NEWSLETTER_CONFIGS:s,NOTIFY_INFO:o,PRODUCT_CARD_TEXTS:a,Z_INDEX_WAR:i})]})},Qt=({children:e,className:t,type:r})=>n.jsx("div",{className:d.helpers.classNameConcat(Z["pdp-main__info-subsection"],[Z[`subsection-${r}`],t]),children:e}),fd=({children:e,className:t})=>{const{structureRef:r,tipbarRef:s}=Ne(),o=g.useMemo(()=>{var c,l;const a=((c=r.current)==null?void 0:c.clientHeight)||0,i=((l=s.current)==null?void 0:l.clientHeight)||0;return a+i},[r,s]);return n.jsx("div",{className:d.helpers.classNameConcat(Z["pdp-main__info"],t),id:"pdpmaininfo",style:{top:o},children:e})},hd=({storeId:e,TEXTURE_IMAGE:t,TOGGLE_STYLE_MODIFIER:r})=>{const{productId:s}=Me(),{items:o,loadSimilars:a}=so(s,{filterTexture:t,storeId:e});return g.useEffect(()=>{a()},[a]),n.jsxs("div",{className:Z.similars,children:[n.jsx("span",{className:Z["sections-title"],children:"Cor"}),n.jsx(sd,{productId:s,similars:o,TOGGLE_STYLE_MODIFIER:r})]})};hd.displayName="PDP.Info.Similars";const Ag=({callBackProductAdded:e,BUY_BUTTON_LABELS:t,ICONS:r,NEWSLETTER_CONFIGS:s,NOTIFY_INFO:o,PDP_INFO:a,PLP_SIZE_ORDER:i,PRODUCT_CARD_TEXTS:c,TEXTURE_IMAGE:l,TIME_ZONE:u,TOGGLE_STYLE_MODIFIER:p,Z_INDEX_WAR:m,storeId:f})=>n.jsx(d.Modal.Body,{className:st["modal-product-body"],children:n.jsxs(fd,{className:st["pdp-main__info-modifier"],children:[n.jsxs(Qt,{type:"product-info",children:[n.jsx(lr,{}),n.jsx(mo,{})]}),n.jsx(Qt,{type:"similars",children:n.jsx(hd,{storeId:f,TEXTURE_IMAGE:l,TOGGLE_STYLE_MODIFIER:p})}),n.jsx(Qt,{type:"sizes",children:n.jsx(pd,{ICONS:r,NEWSLETTER_CONFIGS:s,NOTIFY_INFO:o,PDP_INFO:a,PLP_SIZE_ORDER:i,PRODUCT_CARD_TEXTS:c,Z_INDEX_WAR:m})}),n.jsx(Qt,{type:"actions",children:n.jsx(od,{showWishlist:!1,callBack:e,addToCartBtnSize:{mobile:"medium",desktop:"large"},BUY_BUTTON_LABELS:t,ICONS:r,TIME_ZONE:u,Z_INDEX_WAR:m})})]})});function kg({callBackProductAdded:e,QUICKSHOP:t,ICONS:r,...s}){const[o,a]=g.useState(!1),i=()=>a(c=>!c);return n.jsxs("div",{className:st["quick-shop"],children:[n.jsx(d.Button,{onClick:i,size:"x-large",className:st["shop-bag"],iconNameStart:r.bag,iconSize:"medium"}),n.jsxs(d.Modal.Root,{isOpen:o,setIsOpen:a,className:`${st.modal} ${st["quick-shop__modal"]}`,style:{position:"fixed",height:"100svh",width:"100%",top:0,zIndex:1e3,bottom:"unset",overflowY:"hidden"},variant:"sideRight",children:[n.jsx(Tg,{headerTitle:t.title,ICONS:r}),n.jsx(Ag,{callBackProductAdded:e,ICONS:r,...s})]})]})}const Og=({image:e})=>n.jsx(sn,{src:D.resizingImg(e.imageUrl,{width:50,height:75})||"",alt:e.imageText,className:we.mainImage,layout:"fill",objectFit:"cover",priority:!0,quality:10,style:{position:"absolute",inset:0,filter:"blur(10px)"}}),Lg=({images:e,selectedImageIndex:t,PRODUCT_IMAGE_DIMENSIONS:r,...s})=>{const[o,a]=g.useState(!1),{nextimage:i}=ce();return n.jsx("div",{...s,className:we["main-image-container"],children:n.jsxs("div",{className:we["image-desktop"],children:[!o&&n.jsx(Og,{image:e==null?void 0:e[t]}),n.jsx(i,{src:D.resizingImg(e==null?void 0:e[t].imageUrl,{...r.image_zoom.desktop})||"",alt:e==null?void 0:e[t].imageText,className:we.mainImage,layout:"fill",objectFit:"cover",priority:!0,quality:100,onLoad:()=>{a(!0)}})]})})},Mg=({images:e,onThumbnailClick:t,selectedImageIndex:r})=>{const{nextimage:s}=ce();return n.jsx("div",{className:we.thumbs,children:e.map((o,a)=>n.jsx("div",{role:"button",tabIndex:0,onClick:()=>t(a),onKeyDown:i=>{(i.key==="Enter"||i.key===" ")&&t(a)},className:a===r?we.selected:"",children:n.jsx(s,{src:o.imageUrl,alt:o.imageText,layout:"responsive",width:100,height:100,objectFit:"cover",priority:!1})},a))})},_d=({images:e,initialSelectedImageIndex:t=0,setShowImageZoom:r,ICONS:s,PRODUCT_IMAGE_DIMENSIONS:o,Z_INDEX_WAR:a,...i})=>{const{isMobile:c}=ne(),[l,u]=g.useState(t),p=m=>{u(m)};return c?n.jsxs(Ig,{Z_INDEX_WAR:a,children:[n.jsx(xa,{onClose:()=>r({show:!1,initialIndex:0}),ICONS:s}),n.jsx(md,{images:e,ICONS:s,PRODUCT_IMAGE_DIMENSIONS:o})]}):n.jsxs(Eg,{Z_INDEX_WAR:a,children:[n.jsx(xa,{onClose:()=>r({show:!1,initialIndex:0}),ICONS:s}),n.jsx(Lg,{images:e,selectedImageIndex:l,onThumbnailClick:p,PRODUCT_IMAGE_DIMENSIONS:o},e[l].imageId??`${e[l].imageText}-${l}`),n.jsx(Mg,{images:e,selectedImageIndex:l,onThumbnailClick:p}),n.jsx(kg,{callBackProductAdded:()=>{r({initialIndex:0,show:!1})},ICONS:s,Z_INDEX_WAR:a,...i})]})};_d.displayName="ImageZoom";const Dg=({productImgs:e,PRODUCT_IMAGE_DIMENSIONS:t,...r})=>{const{video:s,productName:o}=Me(),[a,i]=g.useState({show:!1,initialIndex:0});g.useEffect(()=>(a.show?document.body.classList.add("no-scroll"):document.body.classList.remove("no-scroll"),()=>{document.body.classList.remove("no-scroll")}),[a]);const c=l=>{i({show:!0,initialIndex:l})};return n.jsxs(n.Fragment,{children:[n.jsx(cd,{images:e,video:s,handleZoom:c,productName:o,PRODUCT_IMAGE_DIMENSIONS:t}),a.show&&n.jsx(_d,{images:e,initialSelectedImageIndex:a.initialIndex,setShowImageZoom:i,PRODUCT_IMAGE_DIMENSIONS:t,...r})]})},gd=({TEXTURE_IMAGE:e,PRODUCT_IMAGE_DIMENSIONS:t,...r})=>{const{images:s}=Me(),o=g.useMemo(()=>{const a=s.filter(i=>!e.includes(i.imageLabel));return a.length>0?a:s},[]);return n.jsx(Dg,{productImgs:o,TEXTURE_IMAGE:e,PRODUCT_IMAGE_DIMENSIONS:t,...r})};gd.displayName="PDP.Gallery";const $g=({className:e,hasIcons:t=!0,ICONS:r,PDP_INFO:s})=>{const{allSizesAvailable:o,productId:a}=Me(),{setValue:i}=$s(),{sendDataLayerEvent:c}=ae();return n.jsx("div",{className:d.helpers.classNameConcat(Z.links,e),id:"pdp-container","data-product-id":a,children:n.jsxs("div",{className:Z["links-wrapper"],children:[!o&&n.jsx(d.Button,{adornment:t?{start:n.jsx(d.Icon,{name:r.product})}:{},size:"x-small",variant:"tertiary",onClick:()=>i(!0),underline:!0,children:s.links_and_stepper.size_out_of_stock}),n.jsx(d.Button,{adornment:t?{start:n.jsx(d.Icon,{name:r.ruler})}:{},size:"x-small",variant:"tertiary",underline:!0,onClick:()=>{var l,u;(u=window.SizebayParams)==null||u.openChart((l=window.SizebayParams)==null?void 0:l.id),c({functionKey:"readyEvents",data:{event:"select_content",readyData:{content_type:"pdp:guia-de-medidas"}}})},children:s.links_and_stepper.size_table_title}),n.jsx(d.Button,{size:"x-small",variant:"tertiary",className:"sizebay",underline:!0,onClick:()=>{var l,u;return(u=window.SizebayParams)==null?void 0:u.openVFR((l=window.SizebayParams)==null?void 0:l.id)},children:s.links_and_stepper.sizebay})]})})},zg=({children:e})=>n.jsx("div",{className:Z["pdp-main__info-main-content"],children:e}),Fg=({head:e,className:t})=>n.jsx("thead",{className:t,children:n.jsx("tr",{children:e.map((r,s)=>n.jsx("th",{children:r},`head-title-${s}`))})}),Bg=({rows:e,className:t})=>n.jsx("tbody",{className:t,children:e.map((r,s)=>n.jsx("tr",{children:r.map(o=>typeof o=="string"&&o.includes("blocks")?JSON.parse(o).blocks.map(a=>`${a.text}
|
|
18
|
-
`):o).map((o,a)=>n.jsx("td",{children:o},`cell-content-${a}`))},`row-content-${s}`))}),Ug="_tableContainer_1yxy2_1",qg={tableContainer:Ug},Hg=({children:e,className:t=""})=>n.jsx("table",{className:`${qg.tableContainer} ${t}`,children:e}),$n={Head:Fg,Rows:Bg,Root:Hg},Vg=({title:e,text:t})=>n.jsxs("p",{className:Z.measurementRowsText,children:[n.jsx("h1",{className:Z.measurementRowsTitle,children:e}),t]}),Wg=({ICONS:e,SIZES:t,Z_INDEX_WAR:r})=>{const s=Li(),{setValue:o}=Mi();return n.jsx(d.Modal.Root,{isMobile:!0,style:{zIndex:r.modal},setIsOpen:o,isOpen:s,className:Z.measurementModal,children:n.jsx(d.Modal.Body,{children:n.jsxs("div",{className:Z.measurementContainer,children:[n.jsx("h1",{className:Z.measurementTitle,children:t.title}),n.jsxs("div",{className:Z.measurementContent,children:[n.jsx("div",{className:Z.measurementImageContainer,children:n.jsx(sn,{width:264,height:402,alt:"",className:Z.measurementImage,src:t.bannerImage})}),n.jsxs($n.Root,{className:Z.measurementTable,children:[n.jsx($n.Head,{className:Z.measurementHead,head:t.head}),n.jsx($n.Rows,{className:Z.measurementRows,rows:t.rows.map((a,i)=>[n.jsx(Vg,{title:t.descriptions[i].title,text:t.descriptions[i].text},i),...a])})]})]}),n.jsx(d.Button,{onClick:()=>o(!1),className:Z.measurementClose,variant:"tertiary",children:n.jsx(d.Icon,{name:e.close})})]})})},"minicart")},Gg=({children:e,className:t,...r})=>n.jsx("div",{className:d.helpers.classNameConcat(Z["pdp-main__gallery-wrapper"],t),...r,children:e}),Kg=({children:e,className:t,...r})=>n.jsx("div",{className:d.helpers.classNameConcat(Z.pdp,t),...r,children:e}),Xg=({children:e,className:t,...r})=>n.jsx("div",{className:d.helpers.classNameConcat(Z["pdp-main"],t),...r,children:e}),Yg=({children:e,className:t,...r})=>n.jsx("div",{className:d.helpers.classNameConcat(Z["pdp-main__info-secondary-content"],t),...r,children:e}),Qg={gallery:Gg,pdp:Kg,main:Xg,secondary:Yg},Zg=({className:e,...t})=>n.jsx(d.Utils.Divider,{...t,className:d.helpers.classNameConcat(Z.divider,e)}),Jg=Object.freeze(Object.defineProperty({__proto__:null,AccessibilityInfo:_g,Actions:od,BreadCrumb:ad,Credits:id,DescriptionsTabs:bg,Divider:Zg,Freight:jg,Gallery:gd,GoldenTag:po,Header:lr,Links:$g,MainContent:zg,MainInfo:fd,PDPSimilars:hg,Price:mo,ProductMeasurements:Wg,Sizes:pd,SubSectionWrapper:Qt,containers:Qg},Symbol.toStringTag,{value:"Module"})),ey=(e,t)=>{const[r,s]=Lu({items:e}),[o,a]=t.split(":").map(Number);return isNaN(o)||isNaN(a)?[r,s]:[r<o?r:o,s>a?s:a]},ty=()=>{var P;const{ICONS:e,PLP_FILTERS:t,PLP_FILTERS_COLORS:r,PLP_FILTERS_EMPTY:s,PLP_FILTERS_TITLE:o,PLP_SIZE_ORDER:a}=$e(),[i,c]=g.useState("10000:0"),{isMobile:l}=ne(),{sendDataLayerEvent:u}=ae(),{openFilters:p,setOpenFilters:m}=Ws(),{state:f}=Fe(),{breadcrumb:h,deleteAllFacets:_,isLoading:y=!1,facets:x,onToggleFacet:v,selectedFacets:C}=nn.contexts.searchFacets.hook(),j=g.useRef(""),b={isLast:!0,href:(P=f.term)!=null&&P.length?`/${f.term}`:"",name:f.term},w=D.filterNonRootFacets(C,f==null?void 0:f.base);return g.useEffect(()=>{const S=x.find(({key:N})=>N==="price");if(S){const[N,R]=ey(S.values,i??"10000:0");c(`${N}:${R}`)}},[x,i,c]),g.useEffect(()=>{if(!w.length)return;const S=JSON.stringify(w);j.current!==S&&(j.current=S,u({functionKey:"filterEvent",data:{commonData:{selectedFacets:w}}}))},[w]),n.jsxs(Fn.teamComponents.Filter.Root,{CONSTANTS:{ICONS:e,PLP_FILTERS_TITLE:o,PLP_FILTERS:t},breadcrumb:h.length?h:[b],deleteAllFacets:_,filters:{facets:D.filterNonCategorySelected(x,f==null?void 0:f.base),selected:w},isMobile:l??!1,isLoading:y,isOpen:p,price:i,onToggleFacet:v,setIsOpen:m,target:document.body,children:[n.jsx(Fn.teamComponents.Filter.Selected,{ICONS:e,PLP_FILTERS:t,PLP_FILTERS_COLORS:r}),n.jsx(Fn.teamComponents.Filter.Content,{columns:2,CONSTANTS:{ICONS:e,PLP_FILTERS:t,PLP_FILTERS_COLORS:r,PLP_FILTERS_EMPTY:s,PLP_SIZE_ORDER:a}})]})},yd=()=>typeof document>"u"?null:n.jsx(ty,{});yd.displayName="Filters";const fo=({total:e=0})=>{const{SEARCH_TOTAL_PORTAL_ID:t}=$e();if(typeof window>"u")return null;const r=document.getElementById(t);return r?Rs.createPortal(n.jsxs("span",{children:["[",e,"] produto",e>1?"s":""]}),r):null};fo.displayName="PDC.Grid.NavigationTotal";const ny=({productCount:e,PLP_GRID_SCROLL_BACK:t})=>{g.useEffect(()=>{var a;const s=new URLSearchParams(window.location.search).get("page");if(e){const[i,c]=((a=sessionStorage.getItem(t.key))==null?void 0:a.split("-"))??["0",null],l=sessionStorage.getItem(t.refer);i&&l==="true"&&(c===(s||"null")&&window.document.body.scrollTo({top:parseInt(i,10),behavior:"smooth"}),sessionStorage.setItem(t.refer,"false"))}const o=()=>{e>0&&window.document.body.scrollTop&&sessionStorage.setItem(t.key,`${window.document.body.scrollTop.toString()}-${s}`)};return window.document.body.addEventListener("scroll",o,{passive:!0}),()=>{window.document.body.removeEventListener("scroll",o)}},[e])},ry=()=>{const{isMobile:e}=ne(),{isLoading:t,products:r,total:s}=un(),o=$e();return ny({productCount:r.length,PLP_GRID_SCROLL_BACK:o.PLP_GRID_SCROLL_BACK}),n.jsxs(n.Fragment,{children:[n.jsx(rt.Products,{isMobile:e??!1,items:r,...o}),!r.length&&!t&&n.jsx(rt.Empty,{ICONS:o.ICONS,PLP_NOT_RESULT:o.PLP_NOT_RESULT}),n.jsx(fo,{total:s})]})},xd=({infinite:e=!1})=>n.jsx("div",{className:Xe["pdc--grid"],children:n.jsx("div",{className:Xe["pdc--grid--content"],children:e?n.jsx(rt.InfiniteScroller,{}):n.jsx(ry,{})})});xd.displayName="Grid";const kt=e=>({centro:"center",esquerda:"start",direita:"end"})[e],vd=({children:e,contentState:t,entityKey:r})=>{const{url:s}=t.getEntity(r).getData();return s?n.jsx(ze,{href:s,children:e}):e},sy=(e,t,r)=>{e.findEntityRanges(s=>{const o=s.getEntity();return o===null?!1:r.getEntity(o).getType()==="LINK"},t)},Vn=e=>{const t=new tt.CompositeDecorator([{strategy:sy,component:vd}]),r=tt.convertFromRaw(e);return tt.EditorState.createWithContent(r,t)},oy=e=>tt.convertFromRaw(e),Wn=tt.DefaultDraftBlockRenderMap.set("unstyled",{element:"div",aliasedElements:["div"]}),va="superior-direita",An="dentro-inferior-centro",ay="inferior-direita",Hr="dentro-inferior-esquerda",bd=e=>({position:e===An||e===Hr?"absolute":"default",shouldRender:[va,An,Hr].includes(e)?"top":"bottom",alignItems:[An].includes(e)?"center":[va,ay].includes(e)?"flex-end":"flex-start",left:e===Hr?"16px":e===An?"45%":"unset"}),iy=Object.freeze(Object.defineProperty({__proto__:null,CREATE_CONTENT:Vn,EXTENDED_BLOCK_RENDER_MAP:Wn,GET_CONTENT_STATE:oy,controllersPositionsAdapter:bd},Symbol.toStringTag,{value:"Module"})),cy=({expanded:e,content:t})=>n.jsxs("details",{open:e,children:[t.textStructureReduced?n.jsx("summary",{onClick:r=>r.preventDefault(),children:n.jsx(tt.Editor,{editorKey:"draft-editor-1",blockRenderMap:Wn,editorState:t!=null&&t.textStructureReduced?Vn(JSON.parse(t.textStructureReduced)):tt.EditorState.createEmpty(),onChange:()=>null,readOnly:!0})}):n.jsx(n.Fragment,{}),t.showTextStructureExpander&&t.textStructure?n.jsx(n.Fragment,{children:n.jsx(tt.Editor,{editorKey:"draft-editor-1",blockRenderMap:Wn,editorState:t.textStructure?Vn(JSON.parse(t.textStructure)):tt.EditorState.createEmpty(),onChange:()=>null,readOnly:!0})}):n.jsx(n.Fragment,{})]}),ly="_textContentWrapper_1bigo_5",uy="_textContentSection_1bigo_13",ms={"link-modifier":"_link-modifier_1bigo_1",textContentWrapper:ly,textContentSection:uy},jd=({data:e,ICONS:t,TEXTCONTENT_EXPANDED:r})=>{var a;const[s,o]=g.useState(!1);return n.jsx(d.TextStructure.Root,{layoutProps:{textRow:{alignContent:kt(e.textStructureAlignment),alignItems:kt(e.textStructureAlignment)},columnWrapper:{alignContent:kt(e.textStructureAlignment),alignItems:kt(e.textStructureAlignment)}},adornment:{bottom:e.showTextStructureExpander&&e.textStructure?n.jsx(d.Button,{variant:"tertiary",adornment:{end:n.jsx(d.Icon,{name:s?`${t.arrow_up}`:`${t.arrow_down}`})},onClick:()=>o(i=>!i),size:"small",children:s?(r==null?void 0:r.less)??"Ver Menos":(r==null?void 0:r.more)??"Ver Mais"}):n.jsx(n.Fragment,{})},children:n.jsxs(d.Utils.Column,{className:ms.textContentWrapper,style:{alignItems:kt(e.textStructureAlignment)},children:[n.jsx(d.TextStructure.DivWrapper,{style:{textAlign:kt(e.textStructureAlignment)},mode:e.textStructureMode??"default",children:e.textStructureReduced?n.jsx(cy,{content:e,expanded:s}):n.jsx(n.Fragment,{})}),e.textStructureButtonLabel?n.jsx(Le,{mode:e.textStructureMode??"default",href:e.textStructureButtonHref??"#",size:e.textStructureButtonSize,className:ms["link-modifier"],adornments:(a=e.textStructureButtonIcon)!=null&&a.length&&e.enableIcon?{end:n.jsx(d.Icon,{name:e.textStructureButtonIcon})}:void 0,children:e.textStructureButtonLabel}):n.jsx(n.Fragment,{})]})})},dy=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],ba=e=>({centro:"center",esquerda:"start",direita:"end"})[e],ja={"content-modifier":"_content-modifier_16y4u_5","banner-image-wrapper-modifier":"_banner-image-wrapper-modifier_16y4u_13"},Ca=({data:e,videoUrl:t,priority:r,videoRef:s,ICONS:o,TEXTCONTENT_EXPANDED:a,TIME_ZONE:i,className:c,...l})=>{const{video:u,image:p,imageHref:m,imageOpacity:f,altImage:h,backgroundColor:_,position:y,contentAlignment:x,showTimer:v,contentOrder:C,timerMode:j,timerEnd:b,timerInit:w,textStructure:P,textStructureReduced:S}=e.banner,N=(m==null?void 0:m.trim())||(p==null?void 0:p.trim())||null,{nextimage:R}=ce();return n.jsxs(d.Banner.Container,{...l,children:[n.jsxs(d.Banner.ImageWrapper,{className:ja["banner-image-wrapper-modifier"],style:f?{background:_}:void 0,children:[u&&n.jsx(Pe.Video,{videoRef:s,src:t,autoPlay:r,loop:!0,playsInline:!0,muted:!0}),N&&!(u!=null&&u.length)&&n.jsx(R,{src:N,width:"1920",height:"1080",alt:h??p??"",...r?{priority:r}:{},style:f?{opacity:"0"}:void 0}),!p&&!(u!=null&&u.length)&&n.jsx("div",{style:{background:_}})]}),v||S||P?n.jsx(d.Banner.Slot,{...dy(y??"centro"),className:d.helpers.classNameConcat(ja["content-modifier"],c),style:{textAlign:ba(x)},children:n.jsxs(d.Utils.Column,{gap:"16px",alignItems:ba(x),children:[v&&C==="timer-first"&&n.jsx(Hn,{mode:j??"default",size:"small",dateEnd:b?new Date(b):new Date,dateInit:w?new Date(w):new Date,TIME_ZONE:i}),n.jsx(jd,{data:e.banner,ICONS:o,TEXTCONTENT_EXPANDED:a}),v&&C!=="timer-first"&&n.jsx(Hn,{mode:j??"default",size:"small",dateEnd:b?new Date(b):new Date,dateInit:w?new Date(w):new Date,TIME_ZONE:i})]})}):n.jsx(n.Fragment,{})]})};class Qe extends g.Component{constructor(){super(...arguments);vt(this,"state",{hasError:!1,error:null})}static getDerivedStateFromError(){return{hasError:!0,error:null}}componentDidCatch(r,s){if(process.env.NODE_ENV!=="production"){if(this.props.debugger)debugger;console.groupCollapsed("Error Boundary CMS",this.props.name),console.log("Error:",(r==null?void 0:r.message)??r),console.log("Error Info:",s),console.groupEnd()}}render(){const{hasError:r}=this.state,{children:s,fallback:o}=this.props;return r&&process.env.NODE_ENV==="production"?null:r&&o!==void 0?o:s}}const mn=({data:e,className:t,priority:r,creative:s,name:o,...a})=>{const{handleSelectPromotionEvent:i,currentLocalRef:c}=ae(),{banner:{promotion_name:l},index:u,componentIndex:p}=e,m=typeof u=="number"?`:${u+1}`:"",f={creative_name:s,creative_slot:`${s}-${c.current}:${p+1}${m}`,promotion_id:e.banner.href,promotion_name:l},h=g.useRef(null),_=g.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("&"),j=C==null?void 0:C.filter(w=>w.includes("loc")||w.includes("signature")||w.includes("user_id")),b=j==null?void 0:j.join("&");return`${e.banner.video.split("?")[0]}?${b}`}return e.banner.video},[e]),y=()=>{var x;(x=h.current)!=null&&x.paused&&h.current.play()};return n.jsx(Qe,{name:o,children:n.jsx(rr,{eventData:{functionKey:"readyEvents",data:{event:"view_promotion",readyData:{ecommerce:{...f,index:u}}}},observerOptions:{delay:100,..._&&{threshold:.1}},..._&&{callBackWhenVisible:y},children:e.banner.href?n.jsx(ze,{href:e.banner.href,onClick:()=>{i({updatePromotionRef:!0,promotion:f,index:u})},children:n.jsx(Ca,{data:e,videoUrl:_,priority:r,videoRef:h,className:t,...a})}):n.jsx(Ca,{data:e,videoUrl:_,priority:r,videoRef:h,className:t,...a})})})},ho=e=>n.jsx(Qe,{name:e.name,children:n.jsx(mn,{...e})}),Cd=({columns:e,count:t,gap:r,className:s})=>{var x;const{banners:o,pages:a,products:i}=dt(),{isMobile:c}=ne(),{banners:l}=Zn(),{ICONS:u,PRODUCT_CARD_IMAGE_ASPECT_RATIO:p,TEXTCONTENT_EXPANDED:m,TIME_ZONE:f}=$e(),h=((x=a[a.length-1])==null?void 0:x.products.length)??t,_=i[(a.length-1)*t+h-1],y=l.filter((v,C)=>o[C]<_);return Array.isArray(y)?y.map((v,C)=>n.jsx(at.Banner,{columns:v.columns,gap:r,isMobile:c??!1,position_grid:o[C]+1,totalColumns:e,PRODUCT_CARD_IMAGE_ASPECT_RATIO:p,children:n.jsx(mn,{name:"Banner Carousel",data:{banner:v,componentIndex:C},creative:"banner_grid",ICONS:u,TEXTCONTENT_EXPANDED:m,TIME_ZONE:f,className:s})},`${v.position_grid}-${C}`)):null};Cd.displayName="PDC.InfiniteScroller.Banners";const Sd=e=>{var s;const{pages:t}=dt(),r=t[t.length-1];return(r==null?void 0:r.page)!==((s=r==null?void 0:r.pagination)==null?void 0:s.total)&&!(r!=null&&r.loading)?n.jsx(nr,{...e}):null};Sd.displayName="PDC.InfiniteScroller.Loading";const wd=({page:e,...t})=>{const{updateParamPage:r}=dt(),{element:s}=Kn({callback:()=>r(e),options:{threshold:0}});return n.jsx("div",{...t,id:`pdc-scroll-infinite-${e.page}`,className:Xe["pdc--infinite--loader"],"data-page":e.page,ref:s})};wd.displayName="PDC.Page.Anchor";const Pd=({first:e,gap:t,isMobile:r=!1,item:s,index:o,last:a=!1,order:i,page:c,showVideo:l=!1})=>{const{load:u,handleNotify:p}=dt(),{getAvailableProductTag:m}=yt(),{BUY_BUTTON_LABELS:f,MAIN_IMAGE:h,PLP_GRID_SCROLL_BACK:_,PLP_INFINITE_SCROLL:y,PLP_PRODUCT_SIMILAR_DELAY:x,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:v,PLP_SIZE_ORDER:C,PRODUCT_CARD_IMAGE_ASPECT_RATIO:j,PRODUCT_CARD_TEXTS:b,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:w,PRODUCT_IMAGE_DIMENSIONS:P,SECOND_IMAGE:S,StoreConfig_MainSellerId:N,TEXTURE_IMAGE:R,Z_INDEX_WAR:A,ICONS:L,storeId:O}=$e(),G=m(s==null?void 0:s.cluster.highlights);return n.jsx(at.Card,{className:s.id==="skeleton"?Xe["pdc--infinite--card--disabled"]:"",gap:t,isMobile:r??!1,item:s,order:i,tag:G,index:o,setSkuSelected:p,showVideo:l,CONSTANTS:{BUY_BUTTON_LABELS:f,MAIN_IMAGE:h,PLP_GRID_SCROLL_BACK:_,PLP_INFINITE_SCROLL:y,PLP_PRODUCT_SIMILAR_DELAY:x,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:v,PLP_SIZE_ORDER:C,PRODUCT_CARD_IMAGE_ASPECT_RATIO:j,PRODUCT_CARD_TEXTS:b,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:w,PRODUCT_IMAGE_DIMENSIONS:P,SECOND_IMAGE:S,StoreConfig_MainSellerId:N,TEXTURE_IMAGE:R,Z_INDEX_WAR:A,ICONS:L,storeId:O},children:c&&u&&n.jsxs(n.Fragment,{children:[e&&n.jsx(zn.Anchor,{page:c}),!c.loading&&n.jsx(zn.Loader,{page:c}),a&&c.loading&&n.jsx(zn.NextPage,{page:c})]})})};Pd.displayName="PDC.Page.Card";const Nd=({type:e="default",page:t,...r})=>{const{load:s,updatePage:o}=dt(),{element:a}=Kn({callback:()=>o(t),onEnterViewportOnce:!0,options:{threshold:1}});return s===!0&&n.jsx("div",{...r,className:Xe[`pdc--infinite--loader${e==="page"?"--page":""}`],ref:a})};Nd.displayName="PDC.Page.Loader";const Ed=({page:e,...t})=>{var o;const{addNewPage:r}=dt(),{element:s}=Kn({callback:()=>{r(e)},onEnterViewportOnce:!0,options:{threshold:[.5,1]}});return((o=e==null?void 0:e.pagination)==null?void 0:o.nextPage)===!0&&e.loading===!0?n.jsx("div",{...t,className:Xe["pdc--infinite--next-page--card"],"data-next-page":!0,ref:s}):null};Ed.displayName="PDC.Page.NextPage";const zn={Anchor:wd,Card:Pd,Loader:Nd,NextPage:Ed},Id=({count:e,gap:t,page:r})=>{const{isMobile:s}=ne(),{columns:o,products:a}=dt(),i=(r.page-1)*e,c=nc(r.products,o);return Array.isArray(r.products)?r.products.map((l,u)=>n.jsx(zn.Card,{first:u===0,last:u===r.products.length-1,gap:t,index:u,item:l.node,isMobile:s??!1,order:a[i+u]+1,page:u===0||u===r.products.length-1?r:void 0,showVideo:!!c.indexOf(u)},a[i+u]+1)):null};Id.displayName="PDC.Page";const my=({pages:e,load:t,PLP_GRID_SCROLL_BACK:r})=>{const s=g.useRef(!1);g.useEffect(()=>{const o=e[e.length-1];if(t&&o&&!s.current){const a=sessionStorage.getItem(r.refer),i=sessionStorage.getItem(r.order),c=document.querySelector(a==="true"?`[data-order="${i}"]`:`#pdc-scroll-infinite-${o.page}`);c&&(s.current=!0,sessionStorage.setItem(r.refer,"false"),o.page>1&&c.scrollIntoView({behavior:"instant",block:"start"}))}if(!t&&s.current){s.current=!1;const a=document.querySelector("body > main");a&&a.scrollIntoView({behavior:"instant",block:"start"})}},[t,e])},py=()=>{var l,u;const{count:e}=Fe(),{columns:t,gap:r,load:s,pages:o,total:a}=dt(),i=$e(),{PLP_GRID_SCROLL_BACK:c}=$e();return my({pages:o,load:s,PLP_GRID_SCROLL_BACK:c}),n.jsxs(n.Fragment,{children:[s===!0&&((u=(l=o[0])==null?void 0:l.pagination)==null?void 0:u.count)===0&&n.jsx(rt.Empty,{ICONS:i.ICONS,PLP_NOT_RESULT:i.PLP_NOT_RESULT}),n.jsxs(at.Root,{children:[Array.isArray(o)&&o.map((p,m)=>n.jsx(Id,{count:e,gap:r,page:p},m)),n.jsx(Cd,{columns:t,count:e,gap:r})]}),n.jsx(fo,{total:a}),n.jsx(Sd,{})]})},Rd=()=>{const{banners:e}=Zn();return n.jsx(gc,{banners:e,children:n.jsx(py,{})})};Rd.displayName="PDC.InfiniteScroller";const Td=()=>{const{setOpenFilters:e}=Ws(),{selectedFacets:t,onToggleFacet:r,onSort:s}=Ki(),{state:o}=Fe(),{Z_INDEX_WAR:a}=$e(),i=D.filterNonRootFacets(t,o==null?void 0:o.base);return n.jsx(gt.Root,{onSort:s,setOpenFilters:e,style:{zIndex:a.plp_navigation},children:n.jsx(gt.Selected,{callback:r,selected:i})})};Td.displayName="Navigation";const ps=({currentPage:e,callback:t,type:r,...s})=>n.jsx(d.Button,{...s,iconNameStart:`arrow-${r}`,onClick:()=>{typeof t=="function"&&t(r==="left"?"prev":"")},size:"large",variant:"tertiary"});ps.displayName="Arrow";const fs=({active:e,prev:t,ellipses:r,page:s,selectedPage:o})=>n.jsxs(n.Fragment,{children:[r&&t&&n.jsx(d.Button,{size:"large",variant:"tertiary",children:"..."}),e&&n.jsx(d.Pagination.Item,{isActive:!1,index:s,variant:"tertiary",onClick:()=>{typeof o=="function"&&o(s)},children:s}),r&&!t&&n.jsx(d.Button,{size:"large",variant:"tertiary",children:"..."})]});fs.displayName="PageEllipses";const Ad=({children:e,endPage:t,page:r,total:s,selectedPage:o,ITEMS_PER_SECTION:a})=>n.jsxs(n.Fragment,{children:[n.jsx(fs,{active:r>=a&&s>a,selectedPage:o,currentPage:r,prev:!1,ellipses:r>a&&s>a,page:1}),e,n.jsx(fs,{active:s-r>1&&s!==t,selectedPage:o,currentPage:r,prev:!0,ellipses:t<s-1,page:s})]});Ad.displayName="Pagination.Layout";const fy=(e,t,r)=>{const s=new URLSearchParams(r);return s.set(e,t),s.toString()},hy=(e,t)=>{const r=[];for(let s=e;s<=t;s++)r.push(s);return r},_y=({currentPage:e,total:t,maxVisiblePages:r,SEARCH_PAGE_ITEM_THRESHOLD:s})=>{const o=t>=s?s:t,a=Math.max(1,e===o?o-r+1:e-Math.floor(r/2)),i=Math.min(o,a+r-1);return{startPage:a,endPage:i,totalPages:o}},kd=({currentPage:e,pages:t,searchParams:r,VARIANT_PAGINATION:s})=>{const{router:o,pathname:a}=ce();return Array.isArray(t)?t.map(i=>n.jsx(d.Pagination.Item,{isActive:e===i,index:i,variant:e===i?s.active:s.default,onClick:()=>o.push(`${a}?${fy("page",i.toString(),r)}`),children:i},i)):null};kd.displayName="Pages";const _o=({query:e,type:t="default",searchParams:r,ITEMS_DEFAULT_SORT:s,ITEMS_PER_SECTION:o,ITEMS_PER_PAGE:a,SEARCH_PAGE_ITEM_THRESHOLD:i,VARIANT_PAGINATION:c,...l})=>{const{router:u,pathname:p}=ce(),{state:{page:m=1}}=Fe(),{pagination:{total:f}}=un(),{endPage:h,totalPages:_,startPage:y}=_y({currentPage:m,total:f,maxVisiblePages:o,SEARCH_PAGE_ITEM_THRESHOLD:i}),x=C=>{const j=C.toString(),b=new URLSearchParams(r.toString());t==="default"&&b.set("page",j),t==="search"&&(b.set("query",e??""),b.set("count",a.toString()),b.set("page",j),s&&b.set("sort",s.replace("_",":")));const P=`${t==="search"?"/search":p}?${b.toString()}`;u.push(P)},v=C=>{x(C==="prev"?m-1:m+1)};return f?n.jsx("div",{...l,className:Xe["pdc--pagination"],children:n.jsx(d.Pagination.Wrapper,{adornment:{start:n.jsx(ps,{callback:v,currentPage:m,disabled:m<2,type:"left"}),end:n.jsx(ps,{callback:v,currentPage:m,disabled:m>=_,type:"right"})},children:n.jsx(Ad,{endPage:h,page:m,selectedPage:x,total:f,ITEMS_PER_SECTION:o,children:n.jsx(kd,{currentPage:m,pages:hy(y,h),searchParams:r,VARIANT_PAGINATION:c})})})}):n.jsx(n.Fragment,{})};_o.displayName="Pagination";const Od=({gap:e,isMobile:t,className:r})=>{const{count:s,state:o}=Fe(),{banners:a}=Zn(),{ICONS:i,PRODUCT_CARD_IMAGE_ASPECT_RATIO:c,TEXTCONTENT_EXPANDED:l,TIME_ZONE:u}=$e(),p=a.filter(m=>sc(m.position_grid,o.page,s));return Array.isArray(p)?p.map((m,f)=>n.jsx(at.Banner,{columns:m.columns,gap:e,isMobile:t,position_grid:m.position_grid,totalColumns:t?2:4,PRODUCT_CARD_IMAGE_ASPECT_RATIO:c,children:n.jsx(mn,{name:"Banner Carousel",data:{banner:m,componentIndex:f},creative:"banner_grid",ICONS:i,TEXTCONTENT_EXPANDED:l,TIME_ZONE:u,className:r})},m.position_grid)):null};Od.displayName="PDC.Grid.Banners";const go=({isMobile:e=!1,items:t,BUY_BUTTON_LABELS:r,ICONS:s,MAIN_IMAGE:o,NEWSLETTER_CONFIGS:a,NOTIFY_INFO:i,PLP_GRID_SCROLL_BACK:c,PLP_INFINITE_SCROLL:l,PLP_PRODUCT_SIMILAR_DELAY:u,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:p,PLP_SIZE_ORDER:m,PRODUCT_CARD_IMAGE_ASPECT_RATIO:f,PRODUCT_CARD_TEXTS:h,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:_,PRODUCT_IMAGE_DIMENSIONS:y,SECOND_IMAGE:x,StoreConfig_MainSellerId:v,TEXTURE_IMAGE:C,Z_INDEX_WAR:j,storeId:b})=>{const{getAvailableProductTag:w}=yt(),{count:P,state:S}=Fe(),[N,R]=g.useState(!1),[A,L]=g.useState(null),[O,G]=g.useState([]),M=g.useCallback((W,z)=>{const J=z?Yn([z]):null;G(W),L(J!=null&&J.length?J[0]:null),R(!0)},[]),U=e?8:16,Y=(S.page-1)*P,X=at.helpers.createGridPosAndVideo(t,[],e?2:4,S.page);return n.jsxs(n.Fragment,{children:[n.jsxs(at.Root,{children:[Array.isArray(t)&&t.map((W,z)=>{var se,le;const J=w(W.node.cluster.highlights);return n.jsx(at.Card,{gap:U,isMobile:e??!1,item:W.node,order:Y+(((se=X[z])==null?void 0:se.position)??0),tag:J,index:z,setSkuSelected:M,showVideo:(le=X[z])==null?void 0:le.canPlayVideo,CONSTANTS:{BUY_BUTTON_LABELS:r,MAIN_IMAGE:o,PLP_GRID_SCROLL_BACK:c,PLP_INFINITE_SCROLL:l,PLP_PRODUCT_SIMILAR_DELAY:u,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:p,PLP_SIZE_ORDER:m,PRODUCT_CARD_IMAGE_ASPECT_RATIO:f,PRODUCT_CARD_TEXTS:h,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:_,PRODUCT_IMAGE_DIMENSIONS:y,SECOND_IMAGE:x,StoreConfig_MainSellerId:v,TEXTURE_IMAGE:C,Z_INDEX_WAR:j,ICONS:s,storeId:b}},W.node.sku)}),t.length>0&&n.jsx(Od,{gap:U,isMobile:e??!1})]}),n.jsx(Qn,{open:N,sku:A,skus:O,setSku:L,setVisible:R,ICONS:s,NEWSLETTER_CONFIGS:a,NOTIFY_INFO:i,PRODUCT_CARD_TEXTS:h,Z_INDEX_WAR:j})]})};go.displayName="PDC.Products";const rt={Empty:oo,Filters:yd,Grid:xd,InfiniteScroller:Rd,Spinner:nr,Navigation:Td,Notification:Qn,Pagination:_o,Products:go},Ld=({className:e,...t})=>{const{searchParams:r,storeId:s,ITEMS_DEFAULT_SORT:o,ITEMS_PER_SECTION:a,ITEMS_PER_PAGE:i,PLP_INFINITE_SCROLL:c,SEARCH_PAGE_ITEM_THRESHOLD:l,VARIANT_PAGINATION:u}=t;return n.jsx(bp,{...t,children:n.jsxs("div",{className:d.helpers.classNameConcat(Xe.pdc,e),children:[n.jsxs(Gi,{forceUpdate:!0,storeId:s,children:[n.jsx(rt.Navigation,{}),n.jsx(rt.Filters,{})]}),c===!0?n.jsx(rt.Grid,{infinite:!0}):n.jsxs(Vs,{forceUpdate:!0,query:r.get("query")??void 0,storeId:s,children:[n.jsx(rt.Grid,{}),n.jsx(rt.Pagination,{searchParams:r,ITEMS_DEFAULT_SORT:o,ITEMS_PER_SECTION:a,ITEMS_PER_PAGE:i,SEARCH_PAGE_ITEM_THRESHOLD:l,VARIANT_PAGINATION:u})]})]})})};Ld.displayName="Templates.PDC";const Md=g.createContext({}),gy=({children:e,...t})=>n.jsx(Md.Provider,{value:t,children:e}),pn=()=>{const e=g.useContext(Md);if(e===void 0)throw new Error("useSearchConstants must be used within a SearchConstantsProvider");return e},yy="_grid_e75z7_21",xy="_navigation_e75z7_44",vy="_spinner_e75z7_70",by="_sort_e75z7_76",_t={"rearch-result--empty":"_rearch-result--empty_e75z7_1",grid:yy,"grid-header":"_grid-header_e75z7_37",navigation:xy,"result-disclaimer":"_result-disclaimer_e75z7_51",spinner:vy,sort:by,"search-result":"_search-result_e75z7_91"},Dd=({term:e})=>{const{router:t}=ce(),{SEARCH_RESULT:r,ICONS:s}=pn(),o=()=>{t.push(r.EMPTY.ALL_TERMS)};return n.jsxs("div",{className:_t["rearch-result--empty"],children:[n.jsxs(d.TextStructure.DivWrapper,{children:[n.jsx("div",{className:D.responsive["responsive-desktop-flex"],children:n.jsx("h2",{className:"typography-style-heading-sm",children:r.EMPTY.NOT_FOUND})}),n.jsx("div",{className:D.responsive["responsive-mobile-flex"],children:n.jsx("h2",{className:"typography-style-body-md",children:r.EMPTY.NOT_FOUND})}),n.jsxs("p",{children:[r.EMPTY.NOT_FOUND_P," ",`"${e}"`]})]}),n.jsx(d.Button,{onClick:()=>o(),variant:"tertiary",size:"medium",adornment:{end:n.jsx(d.Icon,{name:s.arrow_right,size:"medium"})},children:r.EMPTY.ALL_TERMS_LABEL})]})};Dd.displayName="RearchResult.Empty";const jy=e=>n.jsxs(n.Fragment,{children:[n.jsx("div",{className:D.responsive["responsive-desktop-flex"],children:n.jsx("h2",{className:"typography-style-heading-sm",children:e.SEARCH.SEARCHING})}),n.jsx("div",{className:D.responsive["responsive-mobile-flex"],children:n.jsx("h2",{className:"typography-style-body-md",children:e.SEARCH.SEARCHING})}),n.jsx(d.Spinner,{className:_t.spinner})]}),Cy=(e,t,r)=>n.jsxs(n.Fragment,{children:[n.jsx("div",{className:D.responsive["responsive-desktop-flex"],children:n.jsx("h2",{className:"typography-style-heading-sm",children:t.SEARCH.SEARCHED})}),n.jsx("div",{className:D.responsive["responsive-mobile-flex"],children:n.jsx("h2",{className:"typography-style-body-md",children:t.SEARCH.SEARCHED})}),n.jsxs("p",{children:[t.SEARCH.SEARCHED_P_START," ",e," ",t.SEARCH.SEARCHED_P_END," ",`"${r}"`]})]}),$d=({isLoading:e,quantity:t,term:r})=>{const{SEARCH_RESULT:s}=pn();return n.jsx(d.TextStructure.DivWrapper,{children:e?jy(s):Cy(t,s,r)})};$d.displayName="Search.Loading";const Sy=({term:e})=>{const[t,r]=g.useState(!1),{router:s}=ce(),{searchParams:o}=Fe(),{ITEMS_DEFAULT_SORT:a,ITEMS_PER_PAGE:i,ICONS:c}=pn(),l=u=>{D.navigateToSearchPage(s,e,i,1,u??a)};return n.jsx("div",{className:_t.sort,children:n.jsx(ar,{handleSelectValue:u=>l(u??"release_desc"),sortListOpen:t,setSortListOpen:r,searchParams:o,ICONS:c})})},wy=({query:e})=>{const{isLoading:t,products:r,pagination:s}=un();return n.jsxs("div",{className:_t["grid-header"],children:[n.jsxs("div",{className:_t.navigation,children:[!t&&(r!=null&&r.length)?n.jsx(Sy,{term:e}):null,n.jsx(d.Utils.Divider,{})]}),!t&&(r!=null&&r.length)?n.jsx("div",{className:_t["result-disclaimer"],children:n.jsx($d,{term:e,isLoading:t,quantity:s.count})}):null]})},zd=({isMobile:e=!1,query:t})=>{const{isLoading:r,products:s,pagination:o}=un(),{searchParams:a}=Fe(),i=pn(),{sendDataLayerEvent:c}=ae(),l=g.useRef({query:t,sended:!1}),u=g.useMemo(()=>!r&&s.length>0&&o.count>0,[r,s.length,o.count]);return g.useEffect(()=>{if(!r){if(l.current.query!==t){l.current.sended=!1,l.current.query=t;return}l.current.sended||(c({functionKey:"readyEvents",data:{event:"view_search_results",readyData:{search_term:t,search_found:(s==null?void 0:s.length)>0}}}),l.current.sended=!0)}},[t,s,r,c]),n.jsxs("div",{className:_t.grid,children:[u?n.jsx(wy,{query:t}):n.jsx(n.Fragment,{}),!r&&(s!=null&&s.length)?n.jsx(go,{isMobile:e??!1,items:s,...i}):n.jsx(n.Fragment,{}),(s==null?void 0:s.length)===0&&!r?n.jsx(Dd,{term:t}):null,u&&n.jsx(_o,{searchParams:a,...i})]})};zd.displayName="SearchResultContent";const Py=({className:e})=>{const{state:t}=Fe(),{isMobile:r}=ne(),{storeId:s}=pn();return n.jsx(Vs,{forceUpdate:!1,query:t.term??"",storeId:s,children:n.jsx("div",{className:d.helpers.classNameConcat(_t["search-result"],e),children:n.jsx(zd,{currentPage:t.page,isMobile:r??!1,query:t.term??""})})})},Fd=({className:e,searchParams:t,CONSTANTS:r})=>{const s=new URLSearchParams(t??""),o=String((s==null?void 0:s.get("query"))??""),a=Number((s==null?void 0:s.get("count"))??0),i=Number((s==null?void 0:s.get("page"))??0),c=String((s==null?void 0:s.get("sort"))??"");return n.jsx(gy,{...r,children:n.jsx(Hs,{sort:c,state:{sort:c,base:"",facets:[],term:o,page:i,count:a},count:a,searchParams:s,ITEMS_PER_PAGE:r.ITEMS_PER_PAGE,children:n.jsx(Py,{className:e})})})};Fd.displayName="Search";const Ny=({page:e,data:t})=>{const{pathname:r}=ce(),s=g.useRef(null),{sendDataLayerEvent:o,currentLocalRef:a,itemListRef:i,promotionEventRef:c}=ae();return g.useEffect(()=>{const l=ac("login_event")||"{}",u=JSON.parse(l);if(u.name||u.method){const p=new Date(0);o({functionKey:"readyEvents",data:{event:u.name,readyData:{method:u.method}}}),Ks("login_event","",{expires:p})}},[]),g.useEffect(()=>{if(s.current===r)return;s.current=r;let l={};switch(e){case"PDP":{const p=t,m={};if(!p){l={page_category:"pdp"};break}p.items.forEach(({itemId:f,sellers:h})=>m[f]=h[0].commertialOffer.AvailableQuantity),l={page_category:"pdp",seller_ids:p.items.map(({sellers:f})=>f[0].sellerId).join(),skuStocks:m,product_reference_id:p.productReference};break}case"PDC":{const{page_category:p,page_departament:m,id:f,name:h}=Wa(),_=h,y=f;l={page_category:"lista_produtos",...m&&{page_departament:m}},i.current={item_list_name:r==="/search"?"busca":_??void 0,item_list_id:r==="/search"?void 0:y??void 0},m&&o({functionKey:"readyEvents",data:{event:"view_category",readyData:{page_category:p,page_departament:m}}});break}default:l={page_category:e},c.current={},i.current={};break}const u={region:e,...l};a.current=e,o({functionKey:"readyEvents",data:{readyData:{vtex_version:"fast",...u}},timeout:0})},[r]),null};var hs={exports:{}},kn={exports:{}},Sa;function Ey(){return Sa||(Sa=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(l,u){for(var p in u)Object.defineProperty(l,p,{enumerable:!0,get:u[p]})}r(t,{DOMAttributeNames:function(){return s},default:function(){return c},isEqualNode:function(){return a}});const s={acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv",noModule:"noModule"};function o(l){let{type:u,props:p}=l;const m=document.createElement(u);for(const _ in p){if(!p.hasOwnProperty(_)||_==="children"||_==="dangerouslySetInnerHTML"||p[_]===void 0)continue;const y=s[_]||_.toLowerCase();u==="script"&&(y==="async"||y==="defer"||y==="noModule")?m[y]=!!p[_]:m.setAttribute(y,p[_])}const{children:f,dangerouslySetInnerHTML:h}=p;return h?m.innerHTML=h.__html||"":f&&(m.textContent=typeof f=="string"?f:Array.isArray(f)?f.join(""):""),m}function a(l,u){if(l instanceof HTMLElement&&u instanceof HTMLElement){const p=u.getAttribute("nonce");if(p&&!l.getAttribute("nonce")){const m=u.cloneNode(!0);return m.setAttribute("nonce",""),m.nonce=p,p===l.nonce&&l.isEqualNode(m)}}return l.isEqualNode(u)}let i;process.env.__NEXT_STRICT_NEXT_HEAD?i=(l,u)=>{const p=document.querySelector("head");if(!p)return;const m=p.querySelectorAll('meta[name="next-head"]')||[],f=[];if(l==="meta"){const y=p.querySelector("meta[charset]");y&&f.push(y)}for(let y=0;y<m.length;y++){var h;const v=m[y].nextSibling;(v==null||(h=v.tagName)==null?void 0:h.toLowerCase())===l&&f.push(v)}const _=u.map(o).filter(y=>{for(let x=0,v=f.length;x<v;x++){const C=f[x];if(a(C,y))return f.splice(x,1),!1}return!0});f.forEach(y=>{var x;const v=y.previousSibling;if(v&&v.getAttribute("name")==="next-head"){var C;(C=y.parentNode)==null||C.removeChild(v)}(x=y.parentNode)==null||x.removeChild(y)}),_.forEach(y=>{var x;const v=document.createElement("meta");v.name="next-head",v.content="1",((x=y.tagName)==null?void 0:x.toLowerCase())==="meta"&&y.getAttribute("charset")||p.appendChild(v),p.appendChild(y)})}:i=(l,u)=>{const p=document.getElementsByTagName("head")[0],m=p.querySelector("meta[name=next-head-count]");if(process.env.NODE_ENV!=="production"&&!m){console.error("Warning: next-head-count is missing. https://nextjs.org/docs/messages/next-head-count-missing");return}const f=Number(m.content),h=[];for(let x=0,v=m.previousElementSibling;x<f;x++,v=(v==null?void 0:v.previousElementSibling)||null){var _;(v==null||(_=v.tagName)==null?void 0:_.toLowerCase())===l&&h.push(v)}const y=u.map(o).filter(x=>{for(let v=0,C=h.length;v<C;v++){const j=h[v];if(a(j,x))return h.splice(v,1),!1}return!0});h.forEach(x=>{var v;return(v=x.parentNode)==null?void 0:v.removeChild(x)}),y.forEach(x=>p.insertBefore(x,m)),m.content=(f-h.length+y.length).toString()};function c(){return{mountedInstances:new Set,updateHead:l=>{const u={};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 h=u[f.type]||[];h.push(f),u[f.type]=h});const p=u.title?u.title[0]:null;let m="";if(p){const{children:f}=p.props;m=typeof f=="string"?f:Array.isArray(f)?f.join(""):""}m!==document.title&&(document.title=m),["meta","base","link","style","script"].forEach(f=>{i(f,u[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)}(kn,kn.exports)),kn.exports}(function(e,t){"use client";Object.defineProperty(t,"__esModule",{value:!0});function r(P,S){for(var N in S)Object.defineProperty(P,N,{enumerable:!0,get:S[N]})}r(t,{default:function(){return w},handleClientScriptLoad:function(){return x},initScriptLoader:function(){return j}});const s=Oe,o=Nt,a=n,i=s._(Rs),c=o._(g),l=Zu(),u=Ey(),p=Qc(),m=new Map,f=new Set,h=["onLoad","onReady","dangerouslySetInnerHTML","children","onError","strategy","stylesheets"],_=P=>{if(i.default.preinit){P.forEach(S=>{i.default.preinit(S,{as:"style"})});return}if(typeof window<"u"){let S=document.head;P.forEach(N=>{let R=document.createElement("link");R.type="text/css",R.rel="stylesheet",R.href=N,S.appendChild(R)})}},y=P=>{const{src:S,id:N,onLoad:R=()=>{},onReady:A=null,dangerouslySetInnerHTML:L,children:O="",strategy:G="afterInteractive",onError:M,stylesheets:U}=P,Y=N||S;if(Y&&f.has(Y))return;if(m.has(S)){f.add(Y),m.get(S).then(R,M);return}const X=()=>{A&&A(),f.add(Y)},W=document.createElement("script"),z=new Promise((J,se)=>{W.addEventListener("load",function(le){J(),R&&R.call(this,le),X()}),W.addEventListener("error",function(le){se(le)})}).catch(function(J){M&&M(J)});L?(W.innerHTML=L.__html||"",X()):O?(W.textContent=typeof O=="string"?O:Array.isArray(O)?O.join(""):"",X()):S&&(W.src=S,m.set(S,z));for(const[J,se]of Object.entries(P)){if(se===void 0||h.includes(J))continue;const le=u.DOMAttributeNames[J]||J.toLowerCase();W.setAttribute(le,se)}G==="worker"&&W.setAttribute("type","text/partytown"),W.setAttribute("data-nscript",G),U&&_(U),document.body.appendChild(W)};function x(P){const{strategy:S="afterInteractive"}=P;S==="lazyOnload"?window.addEventListener("load",()=>{(0,p.requestIdleCallback)(()=>y(P))}):y(P)}function v(P){document.readyState==="complete"?(0,p.requestIdleCallback)(()=>y(P)):window.addEventListener("load",()=>{(0,p.requestIdleCallback)(()=>y(P))})}function C(){[...document.querySelectorAll('[data-nscript="beforeInteractive"]'),...document.querySelectorAll('[data-nscript="beforePageRender"]')].forEach(S=>{const N=S.id||S.getAttribute("src");f.add(N)})}function j(P){P.forEach(x),C()}function b(P){const{id:S,src:N="",onLoad:R=()=>{},onReady:A=null,strategy:L="afterInteractive",onError:O,stylesheets:G,...M}=P,{updateScripts:U,scripts:Y,getIsSsr:X,appDir:W,nonce:z}=(0,c.useContext)(l.HeadManagerContext),J=(0,c.useRef)(!1);(0,c.useEffect)(()=>{const le=S||N;J.current||(A&&le&&f.has(le)&&A(),J.current=!0)},[A,S,N]);const se=(0,c.useRef)(!1);if((0,c.useEffect)(()=>{se.current||(L==="afterInteractive"?y(P):L==="lazyOnload"&&v(P),se.current=!0)},[P,L]),(L==="beforeInteractive"||L==="worker")&&(U?(Y[L]=(Y[L]||[]).concat([{id:S,src:N,onLoad:R,onReady:A,onError:O,...M}]),U(Y)):X&&X()?f.add(S||N):X&&!X()&&y(P)),W){if(G&&G.forEach(le=>{i.default.preinit(le,{as:"style"})}),L==="beforeInteractive")return N?(i.default.preload(N,M.integrity?{as:"script",integrity:M.integrity,nonce:z,crossOrigin:M.crossOrigin}:{as:"script",nonce:z,crossOrigin:M.crossOrigin}),(0,a.jsx)("script",{nonce:z,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([N,{...M,id:S}])+")"}})):(M.dangerouslySetInnerHTML&&(M.children=M.dangerouslySetInnerHTML.__html,delete M.dangerouslySetInnerHTML),(0,a.jsx)("script",{nonce:z,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([0,{...M,id:S}])+")"}}));L==="afterInteractive"&&N&&i.default.preload(N,M.integrity?{as:"script",integrity:M.integrity,nonce:z,crossOrigin:M.crossOrigin}:{as:"script",nonce:z,crossOrigin:M.crossOrigin})}return null}Object.defineProperty(b,"__nextScript",{value:!0});const w=b;(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)})(hs,hs.exports);var Iy=hs.exports,Ry=Iy;const yo=D.getDefaultExportFromCjs(Ry),Ty=({children:e,ONE_TRUST:t})=>n.jsxs(n.Fragment,{children:[n.jsx(yo,{src:"https://cdn.cookielaw.org/scripttemplates/otSDKStub.js",defer:!0,strategy:"afterInteractive","data-domain-script":t.siteId,type:"text/javascript"}),e]}),Ay=Kl(()=>Promise.resolve(Ty),{ssr:!1}),ky="_lgpd_8ojiy_82",Oy="_success_8ojiy_248",Ly="_error_8ojiy_312",xe={"newsletter-root":"_newsletter-root_8ojiy_1","has-border-top":"_has-border-top_8ojiy_9","has-border-bottom":"_has-border-bottom_8ojiy_12","newsletter-container":"_newsletter-container_8ojiy_20","content-text":"_content-text_8ojiy_35","form-wrapper":"_form-wrapper_8ojiy_39","newsletter-container-banner":"_newsletter-container-banner_8ojiy_64",lgpd:ky,"textfield-structure-modifier":"_textfield-structure-modifier_8ojiy_190","input-wrapper-modifier":"_input-wrapper-modifier_8ojiy_196","submit-btn":"_submit-btn_8ojiy_200","loading-spinner":"_loading-spinner_8ojiy_211","terms-and-conditions-checkbox":"_terms-and-conditions-checkbox_8ojiy_217","terms-and-conditions-unchecked":"_terms-and-conditions-unchecked_8ojiy_230","terms-and-conditions-checked":"_terms-and-conditions-checked_8ojiy_244",success:Oy,"text-structure-modifier":"_text-structure-modifier_8ojiy_257","success-title":"_success-title_8ojiy_297","close-button":"_close-button_8ojiy_302",error:Ly,"newsletter-wrapper":"_newsletter-wrapper_8ojiy_332","banner-container":"_banner-container_8ojiy_345","newsletter-provider-wrapper":"_newsletter-provider-wrapper_8ojiy_358","newsletter-root-banner":"_newsletter-root-banner_8ojiy_371","banner-background":"_banner-background_8ojiy_392","newsletter-provider-wrapper-background":"_newsletter-provider-wrapper-background_8ojiy_401"},Bd=({invalid_message:e,master_data_field:t,placeholder:r,required:s=!1,CONSTANTS:o})=>{const{isMobile:a}=ne(),{inputsStatus:i,setInputsStatus:c,setFormStatus:l,variant:u}=Qs();return n.jsx(d.TextField.Structure,{className:`${xe["textfield-structure-modifier"]} ${u}`,input:n.jsx(d.TextField.Input,{mode:"simple",label:r,sizeVariant:a?o.NEWSLETTER_CONFIGS.interactionSizeMob:o.NEWSLETTER_CONFIGS.interactionSizeDesk,name:t,className:`${xe["input-wrapper-modifier"]} ${u}`,feedback:i[t]==="required"?"error":i[t],onChange:()=>{i[t]!=="none"&&(c(p=>({...p,[t]:"none"})),l("idle"))},required:s}),supportText:i[t]==="error"||i[t]==="required"?n.jsx("div",{className:u==="horizontal"?xe["support-text-modifier"]:"",children:n.jsx(d.TextField.SupportText,{text:i[t]==="error"?e??o.NEWSLETTER_CONFIGS.messages.invalid_generic:o.NEWSLETTER_CONFIGS.messages.required_field,feedback:"error"})}):null})};Bd.displayName="Newsletter.Input";const Ud=({formStatus:e,fields:t,CONSTANTS:r})=>n.jsxs(n.Fragment,{children:[Array.isArray(t)&&t.map((s,o)=>n.jsx(Bd,{invalid_message:s.invalid_message,master_data_field:s.master_data_field,placeholder:s.placeholder,required:s.required,type:s.type,CONSTANTS:r},`nt-field-${s.master_data_field}-${o}`)),e==="error"&&n.jsx("div",{className:xe.error,children:n.jsx("p",{children:r.NEWSLETTER_CONFIGS.form.status.error})})]});Ud.displayName="Newsletter.FormFields";const qd=({formStatus:e,CONSTANTS:t,...r})=>{const{isMobile:s}=ne();return n.jsxs(d.Button,{...r,className:xe["submit-btn"],disabled:e==="success",size:s?"medium":"large",children:[n.jsx("span",{"data-loading":e==="loading","data-label":!0,children:t.NEWSLETTER_CONFIGS.submitLabel}),t.NEWSLETTER_CONFIGS.hasLoadingState&&e==="loading"&&n.jsx(d.Spinner,{className:xe["loading-spinner"],size:"small"})]})};qd.displayName="Newsletter.SubmitButton";const Hd=({checkboxRef:e,formStatus:t,setFormStatus:r,CONSTANTS:s})=>{const o=a=>{a.target.checked?(e.current=!0,t==="unchecked"&&r("idle")):e.current=!1};return n.jsxs(n.Fragment,{children:[n.jsx(d.Checkbox,{adornment:n.jsx(d.Icon,{name:s.ICONS.check,size:"x-small"}),defaultChecked:e.current,disabled:t==="success",name:"terms-and-conditions",label:s.NEWSLETTER_CONFIGS.messages.accept_terms_and_conditions,onChange:o,sizeVariant:"small",className:xe["terms-and-conditions-checkbox"]}),t==="unchecked"&&n.jsx("div",{className:xe["terms-and-conditions-unchecked"],children:n.jsx(d.TextStructure.Root,{adornment:{start:n.jsx(d.Icon,{name:s.ICONS.alert_circle,size:"small"})},children:n.jsx(d.TextStructure.DivWrapper,{children:n.jsx("p",{children:s.NEWSLETTER_CONFIGS.messages.terms_and_conditions_not_accepted})})})})]})};Hd.displayName="Newsletter.Terms";const Vd=({title:e,description:t,CONSTANTS:r})=>n.jsx("div",{className:xe.success,children:n.jsx(d.TextStructure.Root,{children:n.jsxs(d.TextStructure.DivWrapper,{className:xe["text-structure-modifier"],children:[n.jsxs("div",{className:xe["success-title"],children:[n.jsx(d.Icon,{name:r.ICONS.check_circle,size:"medium"}),n.jsx("h3",{children:e})]}),n.jsx("p",{children:t})]})})});Vd.displayName="Newsletter.Success";const Wd=({formPayloadOptionals:e,masterDataEntity:t,banner:r,termsDescription:s,lgpdLinkLable:o,lgpdLink:a,variant:i,CONSTANTS:c})=>{const{checkboxRef:l,fields:u,formStatus:p,hasTermsAndConditions:m,handleClickToSubmit:f,handleSubmit:h,setFormStatus:_}=Qs();return n.jsx(n.Fragment,{children:p==="success"?n.jsx(Vd,{description:c.NEWSLETTER_CONFIGS.messages.success_description,title:c.NEWSLETTER_CONFIGS.messages.success_title,CONSTANTS:c}):n.jsxs(n.Fragment,{children:[n.jsxs("form",{className:xe["form-wrapper"],onSubmit:y=>h(y,e,t),children:[n.jsx(Ud,{formStatus:p,fields:u,CONSTANTS:c}),m&&n.jsx(Hd,{checkboxRef:l,formStatus:p,setFormStatus:_,CONSTANTS:c}),n.jsx(qd,{formStatus:p,type:"submit",variant:"primary",onClick:f,CONSTANTS:c})]}),(r||i==="vertical")&&n.jsxs("div",{className:xe.lgpd,children:[s&&n.jsx("p",{children:s}),o&&n.jsx(Le,{href:a,children:o})]})]})})};Wd.displayName="Newsletter.Form";const My=["horizontal","vertical"],xo=({className:e,description:t,formPayloadOptionals:r,fields:s,masterDataEntity:o,masterDataEmailField:a,masterDataNameField:i,banner:c,altBanner:l,bannerBackground:u,termsDescription:p,lgpdLinkLable:m,lgpdLink:f,title:h,variant:_,borderTop:y,borderBottom:x,CONSTANTS:v,...C})=>{if(!a||!i)return null;const j=d.helpers.ValidateProp({fieldTypes:My,property:_,fallback:"horizontal"});return n.jsxs("div",{className:c?u?xe["banner-background"]:xe["newsletter-wrapper"]:"",children:[c&&n.jsx(d.Banner.Container,{className:xe["banner-container"],children:n.jsx(d.Banner.ImageWrapper,{children:n.jsx(Pe.Image,{src:c,alt:l,width:"1920",height:"500"})})}),n.jsx("div",{className:c?xe["newsletter-provider-wrapper"+(u?"-background":"")]:"",children:n.jsx(Pc,{fields:s,masterDataEmailField:a,masterDataNameField:i,variant:j,CONSTANTS:v,children:n.jsx("div",{...C,className:d.helpers.classNameConcat(xe["newsletter-root"+(c||j==="vertical"?"-banner":"")],[y&&xe["has-border-top"],x&&xe["has-border-bottom"],e].filter(Boolean)),"data-variant":j,children:n.jsxs("div",{className:c||j==="vertical"?xe["newsletter-container-banner"]:xe["newsletter-container"],children:[n.jsxs("div",{className:xe["content-text"],children:[n.jsx("h2",{children:h}),n.jsx("p",{children:t}),!c&&j==="horizontal"&&n.jsxs("div",{className:xe.lgpd,children:[n.jsx("p",{children:p}),m&&n.jsx(Le,{target:"_blank",href:f,children:m})]})]}),n.jsx(Wd,{formPayloadOptionals:r,masterDataEntity:o,CONSTANTS:v,banner:c,lgpdLink:f,lgpdLinkLable:m,termsDescription:p,variant:j})]})})})})]})};xo.displayName="Newsletter";const Gd=({children:e,...t})=>n.jsx("div",{...t,children:e});Gd.displayName="CallToAction";const Dy="_wrapper_aejhu_1",$y="_body_aejhu_8",Gn={wrapper:Dy,body:$y,"wrapper-body":"_wrapper-body_aejhu_16","accordion-modifier":"_accordion-modifier_aejhu_32"},zy=({children:e,className:t,...r})=>n.jsx("div",{...r,className:d.helpers.classNameConcat(Gn.wrapper,t),children:e}),Fy=({data:e,ICONS:t})=>{const[r,s]=g.useState(null),o=i=>{s(c=>c===i?null:i)},{router:a}=ce();return n.jsx("div",{className:d.helpers.classNameConcat(Gn.body),children:Array.isArray(e)&&(e==null?void 0:e.map((i,c)=>{var m;const l=r===i.id,u=i.buttonHref&&i.buttonHref!=="#",p=i.buttonHref&&i.type==="button"&&u?{onClick:()=>{var f;if((f=i.buttonHref)!=null&&f.startsWith("/")){a.push(i.buttonHref);return}window.open(i.buttonHref,"_blank")}}:{};return n.jsx("div",{children:i.type==="button"?n.jsxs(n.Fragment,{children:[n.jsx(d.Button,{variant:"tertiary",mode:i.buttonMode??"default",size:i.buttonSize??"medium",iconNameStart:t[i.buttonIcon]??i.buttonIcon,...p,style:{marginTop:16},children:i.buttonLabel}),n.jsx(d.Utils.Divider,{direction:"horizontal",size:"small",style:{height:16}})]}):n.jsxs(d.Accordion.Wrapper,{className:d.helpers.classNameConcat(Gn["accordion-modifier"]),children:[n.jsx(d.Accordion.Header,{id:`${c}-${i.title}`,closeIndicator:l?n.jsx(d.Icon,{name:t.arrow_up,size:"medium"}):void 0,openIndicator:l?void 0:n.jsx(d.Icon,{name:t.arrow_down,size:"medium"}),title:"accordion-header",onClick:()=>o(i.id),children:n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{children:n.jsx("h2",{className:"typography-style-body-sm",children:i.title})})})}),n.jsx(d.Accordion.Body,{title:"accordion-body",children:n.jsx(d.TextStructure.Root,{children:l&&n.jsxs(d.TextStructure.DivWrapper,{children:[i.subtitle?n.jsx("h3",{className:"typography-style-body-md",children:i.subtitle}):n.jsx(n.Fragment,{}),n.jsx("p",{className:"typography-style-caption",children:i.description}),i.buttonLabel&&i.buttonHref?n.jsx(Le,{href:i.buttonHref??"#",mode:i.buttonMode??"default",size:i.buttonSize??"medium",adornments:(m=i.buttonIcon)!=null&&m.length?{end:n.jsx(d.Icon,{name:t[i.buttonIcon]??i.buttonIcon})}:void 0,children:i.buttonLabel}):n.jsx(n.Fragment,{})]})})})]})},i.id)}))})},By=({className:e,data:t,ICONS:r,...s})=>{const[o,a]=g.useState(!1),[i,c]=g.useState(null);g.useEffect(()=>{!o&&!i&&t&&c(t)},[o,i]);const l=g.useCallback(()=>{a(u=>!u)},[]);return i?n.jsxs(zy,{...s,className:e,children:[n.jsx("div",{className:Gn["wrapper-body"],hidden:!o,children:o&&n.jsx(Fy,{data:i.content,ICONS:r})}),n.jsx(Gd,{children:n.jsx("div",{onClick:l,children:o?n.jsx(d.Button,{iconNameEnd:r.close,size:(i==null?void 0:i.helpButtonSize)??"x-large"}):n.jsx(d.Button,{iconNameStart:(i==null?void 0:i.iconLabel)??r.help,size:(i==null?void 0:i.helpButtonSize)??"x-large",children:i==null?void 0:i.label})})})]}):n.jsx(n.Fragment,{})},Uy="_formContainer_zwlly_1",qy="_formFieldGroup_zwlly_6",Hy="_formFieldGroupName_zwlly_10",Vy="_formFieldWrapper_zwlly_20",Wy="_formFieldInput_zwlly_30",Gy="_success_zwlly_73",Ky="_button_zwlly_110",Xy="_error_zwlly_114",it={formContainer:Uy,formFieldGroup:qy,formFieldGroupName:Hy,formFieldWrapper:Vy,formFieldInput:Wy,success:Gy,"text-structure-modifier":"_text-structure-modifier_zwlly_85",button:Ky,error:Xy},Yy=({group:e,children:t,className:r})=>n.jsx(n.Fragment,{children:n.jsxs("div",{className:d.helpers.classNameConcat(it.formFieldGroup,r),children:[n.jsx("h1",{className:it.formFieldGroupName,children:e.groupLabel}),t]},e.groupLabel)});async function Qy(e){const t=new TextEncoder().encode(e),r=await crypto.subtle.digest("SHA-1",t);return Array.from(new Uint8Array(r)).map(a=>a.toString(16).padStart(2,"0")).join("")}const Zy=async e=>await fetch("/api/dito-ingest",{method:"POST",body:JSON.stringify(e)}).then(r=>r.json()),Kd=g.createContext({});function Xd({children:e,groups:t,masterDataEntity:r,postFn:s,actionName:o="",originName:a="",POPUP_SUBMITTED_STORAGE:i}){const[c,l]=g.useState(!1),[u,p]=g.useState({}),[m,f]=g.useState([]),[h,_]=g.useState("idle"),[y,x]=g.useState(""),v=({target:{name:j,value:b}})=>{p({...u,[j]:b})},C=j=>{j.preventDefault(),s({body:{masterDataEntity:r,payload:u}}).then(async({Message:b})=>{if(b){const P=b.match(/'(.*?[^\\])'/g)||[];var w="-";for(const S of P){const N=S.substring(1,S.length-1),A=t.flatMap(L=>L.fields).find(({name:L})=>L===N);x(N),A&&(w=A.name)}return _("error"),f([w])}if(u.email){const P=await Qy(u.email||""),S=new Date().toISOString();Zy([{user_id:P,timestamp:S,type:"IDENTIFY",traits:{id:P,created_at:S,name:u.name,email:u.email,phone:u==null?void 0:u.phone}},{action:o,timestamp:S,type:"TRACK",user_id:P,context:{user_agent:navigator.userAgent},properties:{custom_data:{email:u.email,nome:u.name,origem:a,...u}}}])}return window.localStorage.setItem(i,"true"),p({}),l(!0),_("success"),f([])})};return n.jsx(Kd.Provider,{value:{formErrors:m,handleInputChange:v,submitForm:C,formData:u,status:h,fieldMessage:y,success:c,setSuccess:l},children:e})}function ur(){return g.useContext(Kd)}const Jy=({fields:e,className:t})=>{const{formData:r,handleInputChange:s,formErrors:o}=ur();return n.jsx("div",{className:d.helpers.classNameConcat(it.formFieldWrapper,t),children:e.map(({label:a,name:i,required:c,width:l="medium"})=>n.jsx(d.TextField.Input,{label:`${a}${c?"*":""}`,title:i,value:r[i]||"",name:i,sizeVariant:"large",onChange:s,required:c,feedback:o.includes(i)?"error":"none",className:it.formFieldInput,"data-inputsize":l},i))})},ex=({FORM_CONFIGS:e,ICONS:t})=>{const{router:r}=ce();return n.jsxs("div",{className:it.success,children:[n.jsx(d.TextStructure.Root,{adornment:{start:n.jsx(d.Icon,{name:t.check_circle,size:"medium"})},children:n.jsx(d.TextStructure.DivWrapper,{className:it["text-structure-modifier"],children:n.jsx("p",{children:e.successMessage})})}),n.jsx(d.Button,{size:"large",onClick:()=>r.push("/"),className:it.button,children:e.returnButton})]})},tx=({FORM_CONFIGS:e,ICONS:t})=>{const{fieldMessage:r}=ur();return n.jsx("div",{className:it.error,children:n.jsx(d.TextStructure.Root,{adornment:{start:n.jsx(d.Icon,{name:t.delete_circle,size:"small"})},children:n.jsx(d.TextStructure.DivWrapper,{className:it["text-structure-modifier"],children:n.jsxs("p",{children:[e.errorMessage,r]})})})})},nx=({children:e,className:t,ICONS:r,FORM_CONFIGS:s})=>{const{submitForm:o,status:a}=ur();return n.jsx("form",{onSubmit:o,className:d.helpers.classNameConcat(it.formContainer,t),children:a==="success"?n.jsx(ex,{ICONS:r,FORM_CONFIGS:s}):n.jsxs(n.Fragment,{children:[e,a==="error"&&n.jsx(tx,{ICONS:r,FORM_CONFIGS:s})]})})},rx=e=>{const{children:t,className:r}=e;return n.jsx(Xd,{...e,children:n.jsx(nx,{ICONS:e.ICONS,FORM_CONFIGS:e.FORM_CONFIGS,className:r,children:t})})},Ft={Root:rx,FieldGroup:Yy,FieldWrapper:Jy},sx="_button_1e35m_39",bt={"banner-container":"_banner-container_1e35m_1","banner-background":"_banner-background_1e35m_6","form-root":"_form-root_1e35m_15",button:sx,"form-fied-wrapper":"_form-fied-wrapper_1e35m_52"};function ox({content:e,sections:t,FORM_CONFIGS:r,ICONS:s,postFn:o,POPUP_SUBMITTED_STORAGE:a}){var l;const{isMobile:i}=ne(),c=((l=t.find(({name:u})=>u==="Form"))==null?void 0:l.data)||{};return n.jsx("div",{children:n.jsxs(d.Banner.Container,{className:bt["banner-container"],children:[n.jsx(d.Banner.ImageWrapper,{children:n.jsx(Pe.Image,{className:bt["banner-background"],src:i?e.bannerMobile:e.bannerDesk,alt:e.altBanner,width:"1920",height:"500"})}),n.jsxs(Ft.Root,{postFn:o,ICONS:s,FORM_CONFIGS:r,groups:c.groups||[],masterDataEntity:c.masterDataEntity||"",className:bt["form-root"],POPUP_SUBMITTED_STORAGE:a,children:[c.groups.map(u=>n.jsx(Ft.FieldGroup,{group:u,children:n.jsx(Ft.FieldWrapper,{fields:u.fields,className:bt["form-fied-wrapper"]})},u.groupLabel)),n.jsxs("div",{children:[n.jsx(d.TextStructure.DivWrapper,{children:n.jsx("p",{className:"typography-style-body-xs",children:e.requiredMessage})}),n.jsx("div",{className:bt["button-wrapper"],children:n.jsx("div",{className:bt["button-frame"],children:n.jsx(d.Button,{size:"large",type:"submit",className:bt.button,children:e.buttonLabel})})})]})]})]})})}const ax="_content_1jj9i_36",ix="_trends_1jj9i_47",cx="_modal_1jj9i_1",qe={"modal-header":"_modal-header_1jj9i_1","modal-header__close-button":"_modal-header__close-button_1jj9i_7","search-modal__title":"_search-modal__title_1jj9i_10",content:ax,trends:ix,"trends-content":"_trends-content_1jj9i_57","trends-item":"_trends-item_1jj9i_62","modal-auto-complete":"_modal-auto-complete_1jj9i_76","modal-search-empty":"_modal-search-empty_1jj9i_88",modal:cx,"search-modal__modal":"_search-modal__modal_1jj9i_100"},Yd=g.createContext({}),lx=({children:e,term:t,storeId:r})=>{const[s,o]=g.useState([]),[a,i]=g.useState(!1);return g.useEffect(()=>{if(!t){o([]);return}(async()=>{i(!0);try{const l=await fetch(`https://${r}.myvtex.com/_v/proxy/search/suggestedTerms`,{method:"POST",body:JSON.stringify({query:t,locale:"pt-BR"})}),{data:u}=await l.json();o((u==null?void 0:u.searches)||[])}catch(l){console.error("Erro ao buscar sugestões:",l)}})()},[t,r]),n.jsx(Yd.Provider,{value:g.useMemo(()=>({suggestedTerms:s,loading:a,setLoading:i}),[s,a]),children:e})},ux=({children:e,...t})=>n.jsx(lx,{...t,children:e}),dx=()=>{const e=g.useContext(Yd);if(!e)throw new Error("useSuggestedTermsContext must be used within a SuggestedTermsProvider");return e},Vr=(e,t,r=24,s=1,o="release:desc")=>{const a=`/search?query=${t??""}&count=${r}&page=${s}${o?`&sort=${o.replace("_",":")}`:""}`;e.push(a)},Qd=({placeholder:e,noResultsTitle:t,noResultsLabel:r,noResultsTermText:s,handleClose:o,setTerm:a,ICONS:i,ITEMS_DEFAULT_SORT:c,ITEMS_PER_PAGE:l,SEARCH_MODAL:u})=>{const[p,m]=g.useState(""),{suggestedTerms:f,loading:h,setLoading:_}=dx(),{router:y}=ce(),x=g.useRef(null),v=b=>{m(b.target.value),clearTimeout(x.current),b.target.value.length>2&&(a(b.target.value),x.current=setTimeout(()=>{a(b.target.value),_(!1)},2e3))},C=b=>{b.key==="Enter"&&(p==null?void 0:p.length)>2&&(o(),Vr(y,p,l,1,c))},j=b=>{o(),Vr(y,b,l,1,c)};return g.useEffect(()=>{if(clearTimeout(x.current),p.length<=2||f.length>0){_(!1);return}return _(!0),x.current=setTimeout(()=>{Vr(y,p,l,1,c),_(!1),o()},2e3),()=>{clearTimeout(x.current)}},[p,f]),n.jsx(d.DropDown.AutoComplete,{className:qe["modal-auto-complete"],onKeyDown:C,onInputChange:v,placeholder:e,stopClickPropagation:!1,adornment:{end:h?n.jsx(d.Spinner,{size:"small"}):n.jsx(d.Button,{variant:"tertiary",size:"small",iconNameStart:i.search,onClick:()=>{j(p)},disabled:!(p.length>2)})},children:(f==null?void 0:f.length)>0&&n.jsx(n.Fragment,{children:(f==null?void 0:f.length)>0&&(p==null?void 0:p.length)>2?n.jsx(d.DropDown.AutoCompleteList,{className:qe["modal-auto-complete__dropdown"],seeAll:n.jsx("span",{onClick:()=>j(p),children:s+p}),children:f.map((b,w)=>n.jsx(d.DropDown.ListItemWithLink,{children:n.jsx(Le,{href:`/search?query=${b.term}&count=${l}&page=1`,size:"x-small",title:b.term,disableUnderline:!0,disablePadding:!1,onClick:P=>{P.preventDefault(),o()},children:b.term})},`key-${b.term}-${w}`))}):!h&&(p==null?void 0:p.length)>3&&(f==null?void 0:f.length)===0&&n.jsxs(d.DropDown.AutoCompleteList,{className:qe["modal-search-empty"],children:[n.jsx(d.DropDown.NotResults,{description:r,title:t}),n.jsx(d.Button,{className:"all-terms",onClick:()=>{o(),y.push(u.EMPTY.ALL_TERMS)},variant:"tertiary",size:"medium",title:u.EMPTY.ALL_TERMS_LABEL,adornment:{end:n.jsx(d.Icon,{name:i.arrow_right,size:"medium"})},children:u.EMPTY.ALL_TERMS_LABEL})]})})})};Qd.displayName="SearchModal.AutoComplete";function mx({title:e,ICONS:t}){const{isMobile:r}=ne();return n.jsx(d.Modal.Header,{navigation:"top",className:qe["modal-header"],children:n.jsxs(d.Modal.Controls,{navigation:"top",isMobile:!!r,children:[n.jsx(d.Button,{"data-close":!0,iconNameStart:t.arrow_left,size:"small",variant:"tertiary"}),n.jsx(d.Modal.Title,{navigation:"top",className:qe["search-modal__title"],title:e}),n.jsx(d.Button,{className:qe["modal-header__close-button"],"data-close":!0,iconNameStart:t.close,size:"small",variant:"tertiary"})]})})}const Zd=g.createContext({searches:[],isLoading:!1,error:null});let Wr=null;const px=({children:e,storeId:t})=>{const[r,s]=g.useState([]),[o,a]=g.useState(!0),[i,c]=g.useState(null);return g.useEffect(()=>{(async()=>{try{if(a(!0),Wr){s(Wr),a(!1);return}const u=await fetch(`https://${t}.myvtex.com/_v/proxy/search/topSearch`);if(!u.ok)throw new Error(`Erro ao buscar os dados: ${u.status}`);const m=(await u.json()).data.searches||[];Wr=m,s(m)}catch(u){c(u instanceof Error?u.message:"Erro desconhecido")}finally{a(!1)}})()},[t]),n.jsx(Zd.Provider,{value:g.useMemo(()=>({searches:r,isLoading:o,error:i}),[r,o,i]),children:e})},fx=()=>{const e=g.useContext(Zd);if(!e)throw new Error("useTopSearches must be used within a TopSearchesProvider");return e},hx=({title:e,allTermsLabel:t,allTermsUrl:r,qtyTrends:s,handleClose:o,ICONS:a,ITEMS_PER_PAGE:i})=>{const{searches:c,isLoading:l}=fx(),{router:u}=ce(),p=Array.isArray(c)?c:[];return n.jsx(n.Fragment,{children:!l&&p.length>0?n.jsx(d.ComponentList.Structure,{className:qe.trends,title:e,children:n.jsxs("div",{className:qe["trends-content"],children:[n.jsx(d.ComponentList.List,{columns:1,children:p.slice(0,s).map((m,f)=>n.jsx(d.ComponentList.ListItem,{className:qe["trends-item"],children:n.jsx(Le,{href:`/search?query=${m.term}&count=${i}&page=1`,size:"x-small",adornments:{end:n.jsx(d.Icon,{name:a.arrow_right,size:"x-small"})},disableUnderline:!0,title:m.term,onClick:()=>o(),children:m.term})},`list-item-${f}`))}),n.jsx(d.Button,{className:"all-terms",variant:"tertiary",size:"x-small",underline:!1,onClick:()=>{o(),u.push(r)},adornment:{end:n.jsx(d.Icon,{name:a.arrow_right,size:"x-small"})},children:t})]})}):null})};function _x({SectionZone:e}){var s;const[t,r]=g.useState(null);return g.useEffect(()=>{(async()=>{try{const a=await fetch("/api/cms/content-type-client",{method:"POST",body:JSON.stringify({contentType:"search"})});if(!a.ok)return;const i=await a.json();r(i)}catch(a){console.error("[CMS FETCH ERROR]",a)}})()},[]),n.jsx("div",{className:qe.content,children:t!==null&&n.jsx(e,{data:((s=t[0])==null?void 0:s.sections)??[],componentConfigs:{"Product Carousel":{searchModal:!0}}})})}const Jd=({className:e,trends:t,CONSTANTS:r,SectionZone:s})=>{const[o,a]=g.useState(""),{isMobile:i}=ne(),c=Pi(),{setValue:l}=Xn(),{SEARCH_MODAL:u,ICONS:p,ITEMS_PER_PAGE:m,ITEMS_DEFAULT_SORT:f,storeId:h}=r;return n.jsxs(d.Modal.Root,{isMobile:i??!1,variant:i?"sideBottom":"sideRight",isOpen:c,setIsOpen:l,className:`${qe.modal} ${qe["search-modal__modal"]} ${e??""}`,children:[n.jsx(mx,{title:u.HEADER.TITLE,ICONS:p}),n.jsxs(d.Modal.Body,{className:qe["modal-content-body"],children:[n.jsx(ux,{term:o,storeId:h,children:n.jsx(Qd,{placeholder:u.AUTOCOMPLETE.PLACEHOLDER,noResultsTitle:u.EMPTY.NOT_FOUND,noResultsLabel:u.EMPTY.NOT_FOUND_P,noResultsTermUrl:u.AUTOCOMPLETE.NO_RESULTS.NO_RESULTS_TERM_URL,noResultsTermText:u.AUTOCOMPLETE.NO_RESULTS.NO_RESULTS_TERM_TEXT,handleClose:()=>l(!1),setTerm:a,ICONS:p,ITEMS_DEFAULT_SORT:f,ITEMS_PER_PAGE:m,SEARCH_MODAL:u})}),t?n.jsx(px,{storeId:h,children:n.jsx(hx,{title:u.TRENDS.TITLE,allTermsUrl:u.TRENDS.ALL_TERMS_URL,allTermsLabel:u.TRENDS.ALL_TERMS_LABEL,qtyTrends:u.TRENDS.QTY_TERMS,handleClose:()=>l(!1),ICONS:p,ITEMS_PER_PAGE:m})}):null,n.jsx(_x,{SectionZone:s})]})]})};Jd.displayName="SearchModal";const Ke={"store--page-title":"_store--page-title_1rs1a_1","store--page-title--title":"_store--page-title--title_1rs1a_4","store--return-button":"_store--return-button_1rs1a_14","store--section":"_store--section_1rs1a_36","store--section--img":"_store--section--img_1rs1a_41","store--details":"_store--details_1rs1a_51","store--details--title":"_store--details--title_1rs1a_59","store--details--subtitle":"_store--details--subtitle_1rs1a_68","store--details--text":"_store--details--text_1rs1a_77","store--details--vendor":"_store--details--vendor_1rs1a_87","store--select":"_store--select_1rs1a_91","store--wrapper":"_store--wrapper_1rs1a_115"},em=({LPLOJAS_TEMPLATE_RETURN_BUTTON:e,ICONS:t,showVendor:r})=>{const{selectedCity:s,selectedStore:o}=Jn();return n.jsx(d.Card,{padding:"small",shadow:!0,className:Ke["store--wrapper"],children:o?n.jsxs(n.Fragment,{children:[n.jsx(ot.ReturnButton,{ICONS:t,children:e}),n.jsx(ot.Details,{ICONS:t,showVendor:r,store:s==null?void 0:s.find(a=>a.nome===o)})]}):n.jsx(ot.Select,{ICONS:t})})};em.displayName="LPStores.Content";const Zt=({title:e,text:t,type:r,...s})=>n.jsx(d.TextStructure.DivWrapper,{...s,children:r==="title"?n.jsx("h4",{className:Ke["store--details--title"],children:e}):n.jsxs(n.Fragment,{children:[n.jsx("h5",{className:Ke["store--details--subtitle"],children:e}),n.jsx("p",{className:Ke["store--details--text"],children:t})]})});Zt.displayName="LPStores.Details";const tm=({vendor:e,ICONS:t})=>{const r=e?e.split(","):[];return n.jsxs(d.Accordion.Wrapper,{style:{width:"100%"},children:[n.jsx(d.Accordion.Header,{id:"accordion-header-vendor",closeIndicator:n.jsx(d.Icon,{name:t.arrow_up,size:"small"}),openIndicator:n.jsx(d.Icon,{name:t.arrow_down,size:"small"}),title:"Código de vendedor (A)",children:n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{gap:0,children:n.jsx("h3",{className:"typography-style-body-md",children:"Código de vendedor (A)"})})})}),n.jsx(d.Accordion.Body,{children:n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{className:Ke["store--details--vendor"],children:r.map((s,o)=>n.jsx("p",{className:"typography-style-body-sm",children:s.trim()},o))})})})]})};tm.displayName="LPStores.Details";const nm=({store:e,showVendor:t,ICONS:r})=>n.jsxs("div",{className:Ke["store--details"],children:[n.jsx(Zt,{alignItems:"left",title:String(e==null?void 0:e.nome),type:"title"}),n.jsx(Zt,{title:"Endereço",text:String(e.endereco)}),e.telefone&&n.jsx(Zt,{title:"Telefone",text:String(e.telefone)}),e.horario&&n.jsx(Zt,{title:"Horário de funcionamento",text:String(e.horario)}),t&&n.jsx(tm,{ICONS:r,vendor:String(e.vendedoras)})]});nm.displayName="LPStores.Details";const rm=({ICONS:e,arrowDownIcon:t=n.jsx(d.Icon,{name:e.arrow_down,size:"small"}),arrowUpIcon:r=n.jsx(d.Icon,{name:e.arrow_up,size:"small"}),list:s,selectText:o,...a})=>n.jsx(d.DropDown.DefaultDropDown,{...a,"aria-placeholder":o,adornmentListClosed:{end:t},adornmentListOpened:{end:r},mode:"simple",placeholder:o,sizeVariant:"large",children:n.jsx(d.DropDown.DefaultDropDownList,{placeholder:o,supportText:o,maxHeight:400,children:Array.isArray(s)&&(s==null?void 0:s.map(i=>n.jsx(d.DropDown.ListItem,{value:i,children:i},i.replace(/\s/g,""))))})});rm.displayName="LPStores.DropDown";const sm=({children:e,ICONS:t})=>{const{clearSelectedStore:r}=Jn(),s=()=>{typeof r=="function"&&r()};return n.jsxs("button",{"aria-label":String(e),className:Ke["store--return-button"],onClick:s,onKeyDown:s,children:[n.jsx(d.Icon,{name:t.arrow_left,size:"small"}),e]})};sm.displayName="LPStores.ReturnButton";const om=({children:e,data:t})=>n.jsx(Ec,{data:t,children:e});om.displayName="LPStores.Root";const am=({children:e,imgAlt:t,imgSrcDesk:r,imgSrcMob:s})=>{const{isMobile:o}=ne();return n.jsxs("section",{className:Ke["store--section"],children:[n.jsx(sn,{src:o?s:r,alt:t,fill:!0,className:Ke["store--section--img"]}),e]})};am.displayName="LPStores.Section";const im=({ICONS:e})=>{const{data:t,handleSelectCity:r,selectedCity:s,handleSelectStore:o}=Jn(),a=new Set(t.map(c=>c.cidade)),i=Array.from(a).filter(c=>typeof c=="string");return n.jsxs("div",{className:Ke["store--select"],children:[n.jsx(ot.DropDown,{selectText:"Selecione a cidade",handleSelectedValue:r,list:i,defaultValue:s==null?void 0:s[0].cidade,ICONS:e}),n.jsx(ot.DropDown,{"data-selected-city":!!s,selectText:"Selecione a loja",handleSelectedValue:o,list:s?s==null?void 0:s.map(c=>String(c.nome)):[],ICONS:e},s==null?void 0:s[0].cidade)]})};im.displayName="LPStores.Select";const cm=({children:e})=>n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{className:Ke["store--page-title"],children:n.jsx("h2",{className:Ke["store--page-title--title"],children:e})})});cm.displayName="LPStores.Title";const ot={Content:em,Details:nm,DropDown:rm,ReturnButton:sm,Root:om,Section:am,Select:im,Title:cm};var lm={CUSTOM_VIEW_CART:{name:"custom_view_cart",destinations:["DataLayer"],requiredParams:["brand","region","line_items","currency","value","total_discount","subtotal","items"]},ADD_TO_WISHLIST:{name:"add_to_wishlist",destinations:["DataLayer"],requiredParams:["brand","region","line_items","currency","value","items"]},ADD_TO_CART:{name:"add_to_cart",destinations:["DataLayer"],requiredParams:["brand","region","line_items","currency","value","items"]},REMOVE_FROM_CART:{name:"remove_from_cart",destinations:["DataLayer"],requiredParams:["brand","region","line_items","currency","value","items"]},ADD_COUPON:{name:"add_coupon",destinations:["DataLayer"],requiredParams:["brand","region","coupon","coupon_message","seller_cod_name"]},SEARCH:{name:"search",destinations:["DataLayer"],requiredParams:["brand","search_term","search_found","search_quantity"]},SEARCH_ZIPCODE:{name:"search_zipcode",destinations:["DataLayer"],requiredParams:["brand","region","shippings","zipcode","flag_pickup"]},VIEW_PROMOTION:{name:"view_promotion",destinations:["DataLayer"],requiredParams:["brand","region","currency","promotion_name","creative_slot","creative_name","items"]},SELECT_PROMOTION:{name:"select_promotion",destinations:["DataLayer"],requiredParams:["brand","region","currency","promotion_name","creative_slot","creative_name","items"]},SELECT_CONTENT:{name:"select_content",destinations:["DataLayer"],requiredParams:["brand","content_type"]},SELECT_ITEM:{name:"select_item",destinations:["DataLayer"],requiredParams:["brand","region","items","line_items"]},VIEW_ITEM:{name:"view_item",destinations:["DataLayer"],requiredParams:["brand","line_items","currency","value","available_grid","items"]},VIEW_ITEM_LIST:{name:"view_item_list",destinations:["DataLayer"],requiredParams:["region","brand","line_items","items"]},BEGIN_CHECKOUT:{name:"begin_checkout",destinations:["DataLayer"],requiredParams:["brand","line_items","currency","value","total_discount","subtotal","items"]},CUSTOM_BEGIN_CHECKOUT:{name:"custom_begin_checkout",destinations:["DataLayer"],requiredParams:["brand","line_items","currency","value","total_discount","subtotal","items"]},AUTH_ACTION:{name:"auth_action",requiredParams:["region"]},ADD_PERSONAL_INFO:{name:"add_personal_info",destinations:["DataLayer"],requiredParams:["brand","pre_filled","line_items","currency","value","total_discount","subtotal"]},CUSTOM_ADD_SHIPPING_INFO:{name:"add_shipping_info",destinations:["DataLayer"],requiredParams:["brand","pre_filled","shipping","shipping_tier","line_items","currency","value","total_discount","subtotal","items"]},CUSTOM_ADD_PAYMENT_INFO:{name:"add_payment_info",destinations:["DataLayer"],requiredParams:["brand","pre_filled","line_items","currency","value","total_discount","payment_type","subtotal","items"]},ORDER_REVIEWED:{name:"order_reviewed",destinations:["DataLayer"],requiredParams:["brand","line_items","currency","value","total_discount","subtotal","payment_type"]},PURCHASE:{name:"purchase",destinations:["DataLayer"],requiredParams:["brand","shipping_tier","line_items","currency","value","shipping","transaction_id","total_discount","payment_type","seller_cod_name","subtotal","coupon","items"]},CUSTOM_PURCHASE:{name:"custom_purchase",destinations:["DataLayer"],requiredParams:["brand","shipping_tier","line_items","currency","value","shipping","transaction_id","total_discount","payment_type","seller_cod_name","subtotal","coupon","items"]},CUSTOM_USER_INFO:{name:"custom_user_info",destinations:["DataLayer"],requiredParams:["user_info"]},NOTIFY_ME:{name:"notify_me",destinations:["DataLayer"],requiredParams:["brand","line_items","size","item_ref"]}};function gx(e,t,r){const s=t.window,o=Object.assign({},t);if(delete o.window,s){s.dataLayer=s.dataLayer||[],s.dataLayer.push({event:e,ecommerce:o});return}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:e,ecommerce:o})}function yx(e,t,r){console.log(`%c[DT - ${r}] EVENTO DISPARADO:%c `,`background: ${t}; color: white; font-weight: bold; padding: 2px 4px; border-radius: 3px;`,"color: #fff;",e||"")}var um=[["vale","vale crédito"],["pagaleve","pix"],["pix parcel","pix parcelado"],["pix","pix"],["apple","apple pay"],["google","google pay"],["boleto","boleto"],["paypal","paypal"],["cred","cartão"],["visa","cartão"],["master","cartão"],["amex","cartão"],["elo","cartão"],["hiper","cartão"],["diner","cartão"],["deb","cartão"]];function xx(e,t,r){yx({id:e,custom_data:t},"#00c851",r)}var vx={DataLayer:gx,Dito:xx};async function bx(e,t){const r=lm[e];r&&await Promise.allSettled(r.destinations.map(async s=>{try{await vx[s](e.toLowerCase(),t,s)}catch(o){console.error(`[DT] Failed to send ${e} to ${s}:`,o)}}))}async function jx(e){try{return await(await fetch(`/api/catalog_system/pub/products/search?fq=productId:${e}`)).json()}catch(t){console.log("[DT] Erro ao buscar dados do produto",t)}}function Cx(e){try{const{pathname:t}=new URL(e,window.location.origin);return/\/p\/?$/.test(t)}catch{return!1}}function dm(e){if(!e)return null;const t=(()=>{try{return new URL(e,location.origin).pathname}catch{return e.split("?")[0]}})(),r=decodeURIComponent(t).match(/(\d+-\d+)(?=\/p|$)/);return r?r[1].replace("-","_"):null}async function Sx(e){const t=dm(e);if(!t)return console.error("Não foi possível extrair o RefId da URL"),null;try{const r=await fetch(`/api/catalog_system/pub/products/search?fq=alternateIds_RefId:${t}`);if(!r.ok)throw new Error(`Erro na API: ${r.status}`);const s=await r.json();return(s==null?void 0:s[0])||null}catch(r){return console.error("Erro ao buscar dados do produto:",r),null}}function mm(e,t){var r,s,o,a;const i=(s=(r=e==null?void 0:e.shippingData)==null?void 0:r.logisticsInfo)==null?void 0:s.find(l=>l.itemId===t.id),c=(o=i==null?void 0:i.slas)==null?void 0:o.find(l=>l.id===i.selectedSla);return(a=c==null?void 0:c.pickupStoreInfo)!=null&&a.friendlyName?`retirada em loja: ${c.pickupStoreInfo.friendlyName}`:c!=null&&c.name?`Receba em casa: ${c.name}`:null}async function pm(e){var t,r;const s=await jx(e.productId||e.productID||e.item_group_id);return s.length&&(r=(t=s[0].items.find(o=>o.name===e.skuName))==null?void 0:t.itemId)!=null?r:null}function dr(e){return e.discount||e.discount===0?e.discount:parseFloat(Math.max(e.listPrice-e.sellingPrice,0).toFixed(2))/100||0}function It(e){const t=[()=>{var r;return((r=e==null?void 0:e.productCategories)==null?void 0:r[39])==="BAZAR"?"Sale":"Coleção"},()=>e.item_category||e.category,()=>e.categories[0]];for(const r of t){const s=r();if(s!=null)return s}return null}function fn(e){const t=[()=>Object.values((e==null?void 0:e.productCategories)||{}).pop(),()=>Object.values((e==null?void 0:e.categories)||{}).pop(),()=>{var r,s,o,a,i;return(i=(a=(o=(s=(r=e==null?void 0:e.category)==null?void 0:r.split)==null?void 0:s.call(r,">"))==null?void 0:o[1])==null?void 0:a.trim)==null?void 0:i.call(a)},()=>e.item_category2];for(const r of t){const s=r();if(s!=null)return s}return null}function fm(e){var t;const r=((t=e==null?void 0:e.additionalInfo)==null?void 0:t.tags)||(e==null?void 0:e.tags);return Array.isArray(r)&&r.length?r.join(","):null}var wx={farm:"farmrio","farm etc":"farmetc","farm rio":"farmrio"};function wa(e){if(!e)return null;const t=e.toLowerCase().trim();return wx[t]||null}function ct(e){var t;let r=[];if(Array.isArray(e)&&e.every(a=>typeof a=="string"))r=e;else if(Array.isArray(e))r=e.map(a=>{var i;return((i=a.additionalInfo)==null?void 0:i.brandName)||a.brand});else if(typeof e=="object"&&e!==null&&"brand"in e)r=[((t=e.additionalInfo)==null?void 0:t.brandName)||e.brand];else return typeof e=="string"?wa(e):null;const s=r.map(wa).filter(a=>a!==null),o=[...new Set(s)].sort();return o.length>0?o.join("_"):null}function Px(e){var t;if(!e.orderForm&&!((t=e.orderForm.items)!=null&&t.length))return null;const r=e.orderForm.items;return ct(r)}function Nx(e){var t;const{item:r}=e;return ct(((t=r==null?void 0:r.additionalInfo)==null?void 0:t.brandName)||r.brand||r.item_brand)}function Ex(e,t){if(e!=null&&e.brand)return ct(e.brand)||e.brand||null;switch(t){case"CUSTOM_VIEW_CART":case"ADD_COUPON":case"ADD_PERSONAL_INFO":case"CUSTOM_ADD_SHIPPING_INFO":case"CUSTOM_ADD_PAYMENT_INFO":case"BEGIN_CHECKOUT":case"CUSTOM_BEGIN_CHECKOUT":case"SEARCH_ZIPCODE":case"ORDER_REVIEWED":case"PURCHASE":case"CUSTOM_PURCHASE":return Px(e);case"ADD_TO_CART":case"REMOVE_FROM_CART":return Nx(e);default:return null}}async function Ix(e){var t;const r=((t=e.orderForm)==null?void 0:t.items)||[];return r.length?await Promise.all(r.map(async s=>{var o,a,i;return{item_id:s.productId,item_category2:fn(s),item_category4:fm(s),item_shipping_tier:mm(e.orderForm,s),price:parseFloat((s.price/100).toFixed(2))||0,quantity:s.quantity||1,item_ref:s.refId||null,item_brand:ct((o=s.additionalInfo)==null?void 0:o.brandName)||((a=s.additionalInfo)==null?void 0:a.brandName)||null,item_sku:await pm(s)||s.id||null,item_name:s.name||s.id||null,item_category:It(s)||null,item_variant:s.skuName.split(/[-/]/)[0].trim(),item_variant2:((i=s.skuName.split(/[-/]/).pop())==null?void 0:i.trim())||"",discount:dr(s)}})):[]}async function Rx(e,t){var r,s,o;const{item:a,orderForm:i}=e;return[{index:0,quantity:1,item_id:a.productId||a.item_group_id||a.sku||null,item_category2:fn(a),item_category4:fm(a),item_shipping_tier:t==="REMOVE_FROM_CART"?mm(i,a):null,price:a.listPrice||parseFloat((a.price/100).toFixed(2))||0,item_ref:a.refId||a.item_ref||(a==null?void 0:a.additionalProperty.find(c=>c.name==="RefId").value)||null,item_brand:((r=a.additionalInfo)==null?void 0:r.brandName)||a.item_brand||a.brand.name||null,item_sku:a.sku||a.id||a.item_id||await pm(a)||null,item_name:a.name||a.item_name||null,item_category:It(a)||null,item_variant:(a.skuName||a.item_variant||a.name).split(/[-/]/)[0].trim()||null,item_variant2:a.size||((s=a==null?void 0:a.itemAttributes)==null?void 0:s.size)||((o=(a.skuName||a.name).split(/[-/]/).pop())==null?void 0:o.trim())||null,discount:dr(a),item_list_name:It(a)||null,item_url:a.item_url||null}]}async function Tx(e){return((e==null?void 0:e.list)||[]).map(t=>{var r,s,o,a,i;return{price:((r=t==null?void 0:t.price)==null?void 0:r.list)||(t==null?void 0:t.price)||((s=t==null?void 0:t.offers)==null?void 0:s.lowPrice)||0,quantity:1,item_ref:(t==null?void 0:t.ref)||(t==null?void 0:t.item_ref)||(t==null?void 0:t.referenceId[0].Value)||(t==null?void 0:t.additionalProperty.find(c=>c.name==="RefId").value)||null,index:typeof(e==null?void 0:e.index)=="number"?e.index:null,item_brand:ct((o=t==null?void 0:t.brand)==null?void 0:o.name)||ct(e.brand)||ct(t==null?void 0:t.item_brand)||null,item_name:(t==null?void 0:t.productName)||(t==null?void 0:t.alternateName)||(t==null?void 0:t.item_name)||((a=t==null?void 0:t.seo)==null?void 0:a.title)||null,item_category:It(t)||null,item_variant:((i=t==null?void 0:t.name)==null?void 0:i.split("-")[0].trim())||(t==null?void 0:t.item_variant)||null,item_category2:fn(t)||null,item_id:(t==null?void 0:t.productID)||(t==null?void 0:t.productId)||(t==null?void 0:t.item_id)||(t==null?void 0:t.id)||null,discount:dr(t)||null,item_list_name:(e==null?void 0:e.itemListName)||It(t)||null}})}async function Ax(e){var t,r,s;const{item:o}=e;return[{price:e.value||0,quantity:1,item_ref:o.ref||o.additionalProperty.find(a=>a.name==="RefId").value||null,item_brand:ct(o.brand.name)||ct(e.brand)||null,item_name:o.productName||o.alternateName||null,item_category:It(o)||null,item_variant:((t=o==null?void 0:o.name)==null?void 0:t.split("-")[0].trim())||null,item_category2:fn(o)||((s=(r=o==null?void 0:o.category)==null?void 0:r.split(">")[1])==null?void 0:s.trim())||null,item_id:(o==null?void 0:o.productID)||(o==null?void 0:o.productId)||o.item_group_id||null,discount:dr(o)||null,item_sku:(o==null?void 0:o.sku)||(o==null?void 0:o.productId)||null,item_url:o.url||o.item_url||null,seller_id:o.seller||null}]}async function kx(e){var t;if(!Cx(e==null?void 0:e.bannerUrl))return[];const s=await Sx(e==null?void 0:e.bannerUrl),o=s==null?void 0:s.items[0];return{price:(o==null?void 0:o.sellers[0].commertialOffer.Price)||0,quantity:1,item_ref:dm(e==null?void 0:e.bannerUrl),item_brand:ct(s.brand)||null,item_name:(s==null?void 0:s.productName)||(s==null?void 0:s.alternateName)||(s==null?void 0:s.item_name)||null,item_category:It(s)||null,item_variant:((t=o==null?void 0:o.name)==null?void 0:t.split("-").pop().trim())||null,item_category2:fn(s)||null,item_id:(s==null?void 0:s.productId)||null,discount:(o==null?void 0:o.sellers[0].commertialOffer.ListPrice)-(o==null?void 0:o.sellers[0].commertialOffer.Price)||null}}function Ox(e,t){if(e!=null&&e.items)return e.items;switch(t){case"CUSTOM_VIEW_CART":case"BEGIN_CHECKOUT":case"CUSTOM_BEGIN_CHECKOUT":case"CUSTOM_ADD_SHIPPING_INFO":case"CUSTOM_ADD_PAYMENT_INFO":case"PURCHASE":case"CUSTOM_PURCHASE":return Ix(e);case"ADD_TO_CART":case"ADD_TO_WISHLIST":case"REMOVE_FROM_CART":return Rx(e,t);case"SELECT_ITEM":case"VIEW_ITEM_LIST":return Tx(e);case"VIEW_ITEM":return Ax(e);case"VIEW_PROMOTION":case"SELECT_PROMOTION":return kx(e);default:return null}}function Lx(e){var t,r,s;if(!e.orderForm)return null;const o=((t=e.orderForm.paymentData)==null?void 0:t.payments)||[],a=((r=e.orderForm.paymentData)==null?void 0:r.paymentSystems)||[];if(!o.length||!a.length)return null;const i=o.find(m=>m==null?void 0:m.paymentSystem)||o[0],c=String((i==null?void 0:i.paymentSystem)||"").trim();if(!c)return null;const l=a.find(m=>String(m.id)===c),u=((s=l==null?void 0:l.name)==null?void 0:s.toLowerCase())||"",p=um.find(([m])=>u.includes(m));return p?p[1]:null}function Mx(e){var t,r,s,o;if(!e.orderForm)return null;const a=((t=e.orderForm.paymentData)==null?void 0:t.transactions)||[];if(!a.length)return null;const i=((r=a[0])==null?void 0:r.payments)||[];if(!i.length)return null;const c=((o=(s=i[0])==null?void 0:s.paymentSystemName)==null?void 0:o.toLowerCase())||"",l=um.find(([u])=>c.includes(u));return l?l[1]:null}function Dx(e,t){if(e!=null&&e.paymentType)return e.paymentType;switch(t){case"ORDER_REVIEWED":case"CUSTOM_ADD_PAYMENT_INFO":return Lx(e);case"PURCHASE":case"CUSTOM_PURCHASE":return Mx(e);default:return null}}var $x={brand:Ex,items:Ox,payment_type:Dx,user_info:async(e,t)=>{var r;const o=(r={animale:{store:"https://www.animale.com.br",checkout:"https://secure.animale.com.br"},farm:{store:"https://lojafarm.myvtex.com"},mariafilo:{store:"https://mariafilo.myvtex.com",checkout:"https://secure.mariafilo.com.br"},lojacrisbarros:{store:"https://lojacrisbarros.myvtex.com",checkout:"https://secure.crisbarros.com.br"},lojaoffpremium:{store:"https://lojaoffpremium.myvtex.com",checkout:"https://secure.lojaoffpremium.com.br"}}[e.account||"https://www.animale.com.br"])==null?void 0:r[e.platform||"store"];if(!o)return{customer:{email:e.userEmail,id:e==null?void 0:e.userId},address:null};try{const a=`${o}/_v/user-info`,i=await fetch(a,{method:"POST",body:JSON.stringify({email:e.userEmail})});return i.status!==200?{customer:{email:e.userEmail,id:e==null?void 0:e.userId},address:null}:await i.json()}catch{return{customer:{email:e.userEmail,id:e==null?void 0:e.userId},address:null}}},content_type:(e,t)=>"regiao".concat(":"+e.category).concat(e.subcategory?":"+e.subcategory:"").concat(":"+e.componentName)||null,region:(e,t)=>e.region||null,line_items:(e,t)=>e!=null&&e.lineItems?e.lineItems:e!=null&&e.item?[e.item.productId||e.item.productID||e.item.item_id]:e!=null&&e.list?e.list.map(r=>r.productID||(r==null?void 0:r.id)):(e.orderForm.items||[]).map(r=>r.productId).join(","),currency:(e,t)=>{var r,s,o,a;return e!=null&&e.currency?e.currency:e!=null&&e.bannerUrl?"BRL":e!=null&&e.item?((s=(r=e.item)==null?void 0:r.offers)==null?void 0:s.priceCurrency)||"BRL":((a=(o=e.orderForm)==null?void 0:o.storePreferencesData)==null?void 0:a.currencyCode)||null},value:(e,t)=>{var r;return e!=null&&e.value?e.value:e.item?e.item.price:((r=e.orderForm)==null?void 0:r.value)!=null?e.orderForm.value/100:null},total_discount:(e,t)=>{var r,s;const a=(((r=e.orderForm)==null?void 0:r.totalizers)||((s=e.orderForm)==null?void 0:s.totals)||[]).find(i=>i.id==="Discounts");return a?Math.abs(a.value)/100:0},subtotal:(e,t)=>{var r,s;return(((r=e.orderForm)==null?void 0:r.totalizers)||((s=e.orderForm)==null?void 0:s.totals)||[]).filter(i=>i.id==="Items").reduce((i,c)=>i+(c.value||0),0)/100||0},coupon_message:(e,t)=>{var r;if(e.couponMessage)return e.couponMessage;const s=((r=e.orderForm)==null?void 0:r.messages)||[];if(s.length===0)return null;const o=s.filter(a=>a.text.toLowerCase().includes("cupom"));return o.length===0?null:o.map(a=>a.text).join(" | ")},seller_cod_name:(e,t)=>e.appliedSellerCodName||(e==null?void 0:e.orderForm.marketingData.utmiCampaign)||null,coupon:(e,t)=>{var r,s;return e.appliedCoupon||((s=(r=e==null?void 0:e.orderForm)==null?void 0:r.marketingData)==null?void 0:s.coupon)||null},pre_filled:(e,t)=>!!e.preFilled,search_term:(e,t)=>e.searchTerm||null,search_found:(e,t)=>!!e.searchFound,search_quantity:(e,t)=>e.searchQuantity||0,promotion_name:(e,t)=>e.promotionName||null,creative_name:(e,t)=>e.creativeName||null,creative_slot:(e,t)=>e.creativeSlot||null,zipcode:(e,t)=>e.zipCode||null,size:(e,t)=>e.size||null,item_ref:(e,t)=>e.itemRef||null,flag_pickup:(e,t)=>{var r;const s=e.orderForm;return s?(((r=s.shippingData)==null?void 0:r.logisticsInfo)||[]).some(i=>{var c;return(c=i.slas)==null?void 0:c.some(l=>l.deliveryChannel==="pickup-in-point")}):null},shippings:(e,t)=>{const r=e.orderForm;if(!r)return null;const s={};for(const a of r.shippingData.logisticsInfo){const i=r.items[a.itemIndex];if(i)for(const c of a.slas){const l=c.name;s[l]||(s[l]={shipping_tier:c.name,delivery_time:parseInt(c.shippingEstimate),shipping:parseFloat((c.price/100).toFixed(1)),line_items:[]}),s[l].line_items.push(i.id)}}return Object.values(s).map(a=>({shipping:a.shipping,shipping_tier:a.shipping_tier,delivery_time:a.delivery_time,line_items:a.line_items.join(",")}))||null},shipping:(e,t)=>{var r,s,o;return((o=(s=(r=e==null?void 0:e.orderForm)==null?void 0:r.shippingData)==null?void 0:s.logisticsInfo)!=null?o:[]).reduce((i,c)=>{var l,u;const p=(l=c.slas)==null?void 0:l.find(m=>m.id===c.selectedSla);return i+((u=p==null?void 0:p.price)!=null?u:0)},0)},shipping_tier:(e,t)=>{var r,s,o,a;const c=((o=(s=(r=e==null?void 0:e.orderForm)==null?void 0:r.shippingData)==null?void 0:s.logisticsInfo)!=null?o:[]).find(f=>f.selectedSla);if(!c)return null;const l=(a=c.slas)==null?void 0:a.find(f=>f.id===c.selectedSla);if(!l)return null;const{deliveryChannel:u,name:p,pickupStoreInfo:m}=l;return u==="pickup-in-point"?`retirada em loja${m!=null&&m.friendlyName?`: ${m.friendlyName}`:""}`:u==="delivery"?`receba em casa${p?`: ${p}`:""}`:null},transaction_id:(e,t)=>{var r,s;return((s=(r=e.orderForm)==null?void 0:r.orderGroup)==null?void 0:s.toString())||null},available_grid:(e,t)=>e.availableGrid||null};async function zx(e={},t){const r=lm[t];return r?Object.fromEntries(await Promise.all(r.requiredParams.map(async o=>{const a=$x[o];return typeof a!="function"?(console.error(`[DT] Missing paramGetter for param: ${o}`),[o,null]):[o,await a(e,t)]}))):void 0}async function Fx(e,t={}){try{const r=await zx(t,e);return await bx(e,Object.assign({},r,{window:t.window}))}catch(r){return console.error(`[DT] Error tracking event ${e}:`,r)}}var _s={exports:{}},hm={};(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,{PathParamsContext:function(){return a},PathnameContext:function(){return o},SearchParamsContext:function(){return s}});const r=g,s=(0,r.createContext)(null),o=(0,r.createContext)(null),a=(0,r.createContext)(null);process.env.NODE_ENV!=="production"&&(s.displayName="SearchParamsContext",o.displayName="PathnameContext",a.displayName="PathParamsContext")})(hm);var gs={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getSegmentValue",{enumerable:!0,get:function(){return r}});function r(s){return Array.isArray(s)?s[1]: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)})(gs,gs.exports);var Bx=gs.exports,ys={exports:{}},xs={exports:{}},vs={exports:{}},bs={exports:{}},js={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 s{disable(){throw r}getStore(){}run(){throw r}exit(){throw r}enterWith(){throw r}}const o=globalThis.AsyncLocalStorage;function a(){return o?new o:new 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)})(js,js.exports);var vo=js.exports;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"requestAsyncStorage",{enumerable:!0,get:function(){return s}});const s=(0,vo.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)})(bs,bs.exports);var Ux=bs.exports;(function(e,t){"TURBOPACK { transition: next-shared }";Object.defineProperty(t,"__esModule",{value:!0});function r(a,i){for(var c in i)Object.defineProperty(a,c,{enumerable:!0,get:i[c]})}r(t,{getExpectedRequestStore:function(){return o},requestAsyncStorage:function(){return s.requestAsyncStorage}});const s=Ux;function o(a){const i=s.requestAsyncStorage.getStore();if(i)return i;throw new Error("`"+a+"` was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context")}(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)})(vs,vs.exports);var qx=vs.exports,Cs={exports:{}},Ss={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"actionAsyncStorage",{enumerable:!0,get:function(){return s}});const s=(0,vo.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)})(Ss,Ss.exports);var Hx=Ss.exports;(function(e,t){"TURBOPACK { transition: next-shared }";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"actionAsyncStorage",{enumerable:!0,get:function(){return r.actionAsyncStorage}});const r=Hx;(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)})(Cs,Cs.exports);var Vx=Cs.exports,ws={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"RedirectStatusCode",{enumerable:!0,get:function(){return r}});var r;(function(s){s[s.SeeOther=303]="SeeOther",s[s.TemporaryRedirect=307]="TemporaryRedirect",s[s.PermanentRedirect=308]="PermanentRedirect"})(r||(r={})),(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)})(ws,ws.exports);var Wx=ws.exports;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(y,x){for(var v in x)Object.defineProperty(y,v,{enumerable:!0,get:x[v]})}r(t,{RedirectType:function(){return c},getRedirectError:function(){return l},getRedirectStatusCodeFromError:function(){return _},getRedirectTypeFromError:function(){return h},getURLFromRedirectError:function(){return f},isRedirectError:function(){return m},permanentRedirect:function(){return p},redirect:function(){return u}});const s=qx,o=Vx,a=Wx,i="NEXT_REDIRECT";var c;(function(y){y.push="push",y.replace="replace"})(c||(c={}));function l(y,x,v){v===void 0&&(v=a.RedirectStatusCode.TemporaryRedirect);const C=new Error(i);C.digest=i+";"+x+";"+y+";"+v+";";const j=s.requestAsyncStorage.getStore();return j&&(C.mutableCookies=j.mutableCookies),C}function u(y,x){x===void 0&&(x="replace");const v=o.actionAsyncStorage.getStore();throw l(y,x,v!=null&&v.isAction?a.RedirectStatusCode.SeeOther:a.RedirectStatusCode.TemporaryRedirect)}function p(y,x){x===void 0&&(x="replace");const v=o.actionAsyncStorage.getStore();throw l(y,x,v!=null&&v.isAction?a.RedirectStatusCode.SeeOther:a.RedirectStatusCode.PermanentRedirect)}function m(y){if(typeof y!="object"||y===null||!("digest"in y)||typeof y.digest!="string")return!1;const[x,v,C,j]=y.digest.split(";",4),b=Number(j);return x===i&&(v==="replace"||v==="push")&&typeof C=="string"&&!isNaN(b)&&b in a.RedirectStatusCode}function f(y){return m(y)?y.digest.split(";",3)[2]:null}function h(y){if(!m(y))throw new Error("Not a redirect error");return y.digest.split(";",2)[1]}function _(y){if(!m(y))throw new Error("Not a redirect error");return Number(y.digest.split(";",4)[3])}(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)})(xs,xs.exports);var Gx=xs.exports,Ps={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,{isNotFoundError:function(){return a},notFound:function(){return o}});const s="NEXT_NOT_FOUND";function o(){const i=new Error(s);throw i.digest=s,i}function a(i){return typeof i!="object"||i===null||!("digest"in i)?!1:i.digest===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)})(Ps,Ps.exports);var Kx=Ps.exports;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(c,l){for(var u in l)Object.defineProperty(c,u,{enumerable:!0,get:l[u]})}r(t,{ReadonlyURLSearchParams:function(){return i},RedirectType:function(){return s.RedirectType},notFound:function(){return o.notFound},permanentRedirect:function(){return s.permanentRedirect},redirect:function(){return s.redirect}});const s=Gx,o=Kx;class a extends Error{constructor(){super("Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams")}}class i extends URLSearchParams{append(){throw new a}delete(){throw new a}set(){throw new a}sort(){throw new a}}(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)})(ys,ys.exports);var Xx=ys.exports,_m={};(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 o},useServerInsertedHTML:function(){return a}});const s=Nt._(g),o=s.default.createContext(null);function a(i){const c=(0,s.useContext)(o);c&&c(i)}})(_m);var On={exports:{}},Gr={},Pa;function Yx(){return Pa||(Pa=1,function(e){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,{BailoutToCSRError:function(){return s},isBailoutToCSRError:function(){return o}});const r="BAILOUT_TO_CLIENT_SIDE_RENDERING";class s extends Error{constructor(i){super("Bail out to client-side rendering: "+i),this.reason=i,this.digest=r}}function o(a){return typeof a!="object"||a===null||!("digest"in a)?!1:a.digest===r}}(Gr)),Gr}var Ln={exports:{}},Mn={exports:{}},Na;function Qx(){return Na||(Na=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"staticGenerationAsyncStorage",{enumerable:!0,get:function(){return s}});const s=(0,vo.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)}(Mn,Mn.exports)),Mn.exports}var Ea;function Zx(){return Ea||(Ea=1,function(e,t){"TURBOPACK { transition: next-shared }";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"staticGenerationAsyncStorage",{enumerable:!0,get:function(){return r.staticGenerationAsyncStorage}});const r=Qx();(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)}(Ln,Ln.exports)),Ln.exports}var Ia;function Jx(){return Ia||(Ia=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"bailoutToClientRendering",{enumerable:!0,get:function(){return o}});const r=Yx(),s=Zx();function o(a){const i=s.staticGenerationAsyncStorage.getStore();if(!(i!=null&&i.forceStatic)&&i!=null&&i.isStaticGeneration)throw new r.BailoutToCSRError(a)}(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)}(On,On.exports)),On.exports}(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(v,C){for(var j in C)Object.defineProperty(v,j,{enumerable:!0,get:C[j]})}r(t,{ReadonlyURLSearchParams:function(){return l.ReadonlyURLSearchParams},RedirectType:function(){return l.RedirectType},ServerInsertedHTMLContext:function(){return u.ServerInsertedHTMLContext},notFound:function(){return l.notFound},permanentRedirect:function(){return l.permanentRedirect},redirect:function(){return l.redirect},useParams:function(){return h},usePathname:function(){return m},useRouter:function(){return f},useSearchParams:function(){return p},useSelectedLayoutSegment:function(){return x},useSelectedLayoutSegments:function(){return y},useServerInsertedHTML:function(){return u.useServerInsertedHTML}});const s=g,o=to,a=hm,i=Bx,c=eo,l=Xx,u=_m;function p(){const v=(0,s.useContext)(a.SearchParamsContext),C=(0,s.useMemo)(()=>v?new l.ReadonlyURLSearchParams(v):null,[v]);if(typeof window>"u"){const{bailoutToClientRendering:j}=Jx();j("useSearchParams()")}return C}function m(){return(0,s.useContext)(a.PathnameContext)}function f(){const v=(0,s.useContext)(o.AppRouterContext);if(v===null)throw new Error("invariant expected app router to be mounted");return v}function h(){return(0,s.useContext)(a.PathParamsContext)}function _(v,C,j,b){j===void 0&&(j=!0),b===void 0&&(b=[]);let w;if(j)w=v[1][C];else{const R=v[1];var P;w=(P=R.children)!=null?P:Object.values(R)[0]}if(!w)return b;const S=w[0],N=(0,i.getSegmentValue)(S);return!N||N.startsWith(c.PAGE_SEGMENT_KEY)?b:(b.push(N),_(w,C,!1,b))}function y(v){v===void 0&&(v="children");const C=(0,s.useContext)(o.LayoutRouterContext);return C?_(C.tree,v):null}function x(v){v===void 0&&(v="children");const C=y(v);if(!C||C.length===0)return null;const j=v==="children"?C[0]:C[C.length-1];return j===c.DEFAULT_SEGMENT_KEY?null:j}(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)})(_s,_s.exports);var ev=_s.exports,Ra=ev;function tv({accountName:e}){const{user:t}=Ht(),r=Ra.usePathname(),s=Ra.useSearchParams(),o=(t==null?void 0:t.sub)||(t==null?void 0:t.email),a=t==null?void 0:t.userId;return g.useEffect(()=>{o&&a?Fx("CUSTOM_USER_INFO",{userId:a,userEmail:o,platform:"store",account:e}):console.warn("[DT] Usuário deslogado ou sessão carregando...")},[r,s,o,a]),null}const nv="_active_6vo4c_380",rv="_banner_6vo4c_655",sv="_container_6vo4c_689",ov="_slugs_6vo4c_703",av="_root_6vo4c_785",iv="_otContainer_6vo4c_797",Ct={active:nv,banner:rv,container:sv,slugs:ov,"content-page-modifier":"_content-page-modifier_6vo4c_741",root:av,otContainer:iv};function cv({title:e,srcImages:t,children:r,className:s,...o}){const{isMobile:a}=ne(),i=a?t.mobile:t.desktop;return n.jsxs("div",{...o,className:d.helpers.classNameConcat(Ct.banner,s),children:[n.jsx(Pe.Image,{src:i,alt:e,fill:!0}),r||n.jsx("h1",{children:e})]})}const Ns=({children:e,className:t})=>n.jsx("div",{className:d.helpers.classNameConcat(Ct.container,t),children:e});Ns.displayName="Politicas.Container";const lv=({oneTrust:e})=>{const t=()=>{window.OneTrust&&window.OneTrust.NoticeApi&&window.OneTrust.NoticeApi.Initialized&&window.OneTrust.NoticeApi.Initialized.then(function(){window.OneTrust.NoticeApi.LoadNotices([e.policyScript])})};return g.useEffect(()=>{window.OneTrust&&t()},[]),n.jsxs(n.Fragment,{children:[n.jsx(yo,{onLoad:t,id:"otprivacy-notice-script",src:"https://privacyportal-cdn.onetrust.com/privacy-notice-scripts/otnotice-1.0.min.js"}),n.jsx("div",{className:Ct.otContainer,children:n.jsx("div",{id:"otnotice-container",children:n.jsx("div",{id:`otnotice-${e.policyId}`,className:"otnotice"})})})]})},Ta={"card-image-wrapper":"_card-image-wrapper_10mul_1","card-image-container":"_card-image-container_10mul_9"},gm=e=>{const{nextimage:t}=ce();return n.jsx(Qe,{name:e.name,children:e.data.banners.map((r,s)=>n.jsx("div",{className:Ta["card-image-wrapper"],children:n.jsx("div",{className:Ta["card-image-container"],children:n.jsx(t,{src:r.image,alt:r.altImage?r.altImage:"Banner Coleção",width:500,height:600})})},s))})},uv="_embedLiveContainer_1ss0l_2",dv="_embedLivePlayer_1ss0l_7",Aa={embedLiveContainer:uv,embedLivePlayer:dv},ym=({data:e,name:t})=>n.jsx(Qe,{name:t,children:n.jsx("div",{className:Aa.embedLiveContainer,children:n.jsx("div",{className:Aa.embedLivePlayer,children:e.banner.videosrc?n.jsx(Pe.Video,{src:e.banner.videosrc??"",playsInline:!0,autoPlay:!0,loop:!0,muted:!0,title:"Live",controls:!0}):n.jsxs("div",{children:[n.jsx("iframe",{src:e.banner.embed_source??"",allow:"autoplay; fullscreen; picture-in-picture; loop;",title:"Live"}),n.jsx(yo,{src:"https://player.vimeo.com/api/player.js",defer:!0,strategy:"lazyOnload"})]})})})}),Es={"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 mv(e,t){const{mediatorRef:r}=ne();g.useEffect(()=>r.current.subscribe(e,t),[e,t])}const ka=({prevOnClick:e,nextOnClick:t,onBulletClick:r,currentPage:s,totalPages:o,position:a,hideControllers:i,left:c,isFirst:l,ICONS:u})=>{const[p,m]=g.useState("default");return mv("herobanner:change_controllers_variant",f=>{l&&m(f.includes("white")?"inverse":"default")}),n.jsxs(d.Carousel.Controller,{className:Es["carousel-controllers-modifier"],position:a??"absolute","data-hide-controllers":i,bottom:"16px",top:"unset",left:c,children:[n.jsxs(d.Carousel.Arrows,{className:Es["carrousel-arrows-display-controller"],children:[n.jsx(d.Button,{variant:"tertiary",onClick:e,adornment:{start:n.jsx(d.Icon,{name:u.arrow_left})},mode:p}),n.jsx(d.Button,{variant:"tertiary",onClick:t,adornment:{start:n.jsx(d.Icon,{name:u.arrow_right})},mode:p})]}),n.jsx(d.Carousel.Bullets,{page:s,total:o,onBulletClick:r,mode:p})]})},pv=({children:e,data:t,banner:r,...s})=>{const{mediatorRef:o}=ne();return t.data.first?n.jsx(rr,{observerOptions:{threshold:.51},stopOnIntersection:!1,callBackWhenVisible:()=>{o.current.publish("header:change_variant",r.headerVariant)},...s,children:e}):n.jsx(n.Fragment,{children:e})},xm=e=>{const{initialize:t,pagination:r,controller:s,itemsStyles:o}=d.Carousel.useCarousel({gap:e.data.config.gap,itemsPerPage:e.data.config.slidesPerView,direction:"row"}),a=g.useRef(void 0),i=g.useMemo(()=>bd(e.data.config.controllerPosition??"dentro-inferior-centro"),[e]),c=g.useCallback(()=>{e.data.config.slideDuration&&r.totalPages>1&&(a.current=setInterval(()=>{s==null||s.nextPage()},e.data.config.slideDuration*1e3))},[s,e.data.config.slideDuration,r.totalPages]),l=g.useCallback(p=>{clearInterval(a.current),c(),p()},[c]),u=g.useMemo(()=>{var p;return{nextOnClick:()=>l(()=>s==null?void 0:s.nextPage()),prevOnClick:()=>l(()=>s==null?void 0:s.prevPage()),onBulletClick:m=>l(()=>s==null?void 0:s.navigateTo(m)),currentPage:r.currentPage,totalPages:r.totalPages,position:i.position,hideControllers:((p=e.data.config)==null?void 0:p.hideControllers)??!1,left:i.left}},[r.currentPage,r.totalPages,i.position,e.data.config.hideControllers,l,s]);return g.useEffect(()=>(c(),()=>clearInterval(a.current)),[c]),n.jsx(Qe,{name:e.name,children:n.jsxs(d.Carousel.Root,{innerRef:p=>{t(p)},className:d.helpers.classNameConcat(Es["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"&&r.totalPages>1?n.jsx(ka,{ICONS:e.ICONS,...u,isFirst:e.data.first}):n.jsx(n.Fragment,{}),n.jsx(d.Carousel.Body,{children:e==null?void 0:e.data.banners.map((p,m)=>n.jsx(d.Carousel.Item,{style:o,children:n.jsx(pv,{data:e,banner:p,children:n.jsx(mn,{name:"Banner Carousel",ICONS:e.ICONS,TEXTCONTENT_EXPANDED:e.TEXTCONTENT_EXPANDED,TIME_ZONE:e.TIME_ZONE,suppressContentEditableWarning:!0,suppressHydrationWarning:!0,className:e.className,data:{banner:p,index:m,componentIndex:e.data.componentIndex},creative:"banner-carousel",...e.data.first&&m===0&&{priority:!0}})})},`hero-banner-item-${m}`))}),i.shouldRender==="bottom"&&r.totalPages>1?n.jsx(ka,{ICONS:e.ICONS,...u}):n.jsx(n.Fragment,{})]})})},Ot={"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"},vm=({data:e,name:t,CONSTANTS:r})=>{var p;const{isMobile:s}=ne(),o=e.config.size??"medium",a=e.config.disableCarouselMobile??!1,{initialize:i,pagination:c,controller:l,itemsStyles:u}=d.Carousel.useCarousel({itemsPerPage:s?e==null?void 0:e.config.slidesPerViewMobile:(p=e==null?void 0:e.config)==null?void 0:p.slidesPerView,gap:s?e.config.gapMobile:e.config.gap,direction:s&&a?"column":"row"});return n.jsx(Qe,{name:t,children:n.jsx(d.Utils.Column,{style:{width:o==="small"?"70%":"100%"},alignContent:"center",justifyContent:"center",alignItems:"center",children:n.jsxs(d.Carousel.Root,{innerRef:m=>{i(m)},className:d.helpers.classNameConcat(Ot["carousel-modifier"],"common-section"),children:[o==="medium"?n.jsxs(d.TextStructure.Root,{children:[r.ACTIVE_BENNEFITS_BAR_TITLE&&n.jsx(d.TextStructure.DivWrapper,{className:Ot["carousel-title-modifier"],children:n.jsx("h2",{className:"typography-style-body-lg",children:r.BENNEFITS_BAR_TITLE})}),s&&c.totalPages>1&&n.jsx(d.Carousel.Controller,{className:d.helpers.classNameConcat(Ot["row-controller-modifier"],r.ACTIVE_BENNEFITS_BAR_TITLE?Ot["title-on"]:void 0),children:n.jsxs(d.Carousel.Arrows,{children:[n.jsx(d.Button,{variant:"tertiary",onClick:()=>l==null?void 0:l.prevPage(),adornment:{start:n.jsx(d.Icon,{name:r.ICONS.arrow_left})}}),n.jsx(d.Button,{variant:"tertiary",onClick:()=>l==null?void 0:l.nextPage(),adornment:{start:n.jsx(d.Icon,{name:r.ICONS.arrow_right})}})]})})]}):n.jsx(n.Fragment,{}),n.jsx(d.Carousel.Body,{children:e.bennefit.map((m,f)=>n.jsx(d.Carousel.Item,{className:Ot["card-modifier"],style:u,children:n.jsx(d.Card,{stroke:!0,padding:"small",children:n.jsx(d.TextStructure.Root,{layoutProps:{columnWrapper:{alignContent:"start",alignItems:"start",justifyContent:"start"},textRow:{alignContent:"center",alignItems:"center",justifyContent:"center"}},adornment:{[o==="medium"?"top":"start"]:n.jsx(d.Icon,{name:m.icon,size:o==="medium"?"medium":"small"})},children:n.jsxs(d.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=${f}`))}),!s&&c.totalPages>1?n.jsxs(d.Carousel.Controller,{className:Ot["row-controller-modifier"],children:[n.jsxs(d.Carousel.Arrows,{children:[n.jsx(d.Button,{variant:"tertiary",onClick:()=>l==null?void 0:l.prevPage(),adornment:{start:n.jsx(d.Icon,{name:r.ICONS.arrow_left})}}),n.jsx(d.Button,{variant:"tertiary",onClick:()=>l==null?void 0:l.nextPage(),adornment:{start:n.jsx(d.Icon,{name:r.ICONS.arrow_right})}})]}),n.jsx(d.Carousel.Bullets,{page:c.currentPage,total:c.totalPages,onBulletClick:m=>l==null?void 0:l.navigateTo(m)})]}):n.jsx(n.Fragment,{})]})})})},bm=({data:{componentIndex:e,...t},name:r,CONSTANTS:s})=>n.jsx(Qe,{name:r,children:n.jsx(xo,{...t,CONSTANTS:s})}),jm=({data:e,ICONS:t,TEXTCONTENT_EXPANDED:r,className:s,name:o})=>n.jsx(Qe,{name:o,children:n.jsx("div",{className:d.helpers.classNameConcat(ms.textContentSection,s??""),style:e.borderTop?{borderTop:"none"}:void 0,children:n.jsx(jd,{data:e,ICONS:t,TEXTCONTENT_EXPANDED:r})})}),Oa={"accordion-modifier":"_accordion-modifier_1we16_1","accordion-body-modifier":"_accordion-body-modifier_1we16_7"},Cm=({data:e,id:t,ICONS:r,className:s,name:o})=>{var c;const[a,i]=g.useState([]);return n.jsx(Qe,{name:o,children:n.jsxs(d.Utils.Column,{gap:"var(--gap-vertical-sm)",className:s??"",children:[e.titleAccordion?n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{children:n.jsx("h2",{className:d.helpers.classNameConcat("typography-style-heading-sm","common-section"),style:{fontWeight:500},children:e.titleAccordion})})}):n.jsx(n.Fragment,{}),(c=e.accordions)==null?void 0:c.map((l,u)=>n.jsxs(d.Accordion.Wrapper,{className:Oa["accordion-modifier"],children:[n.jsx(d.Accordion.Header,{id:`${t}-text-accordion-${u}`,openIndicator:n.jsx(d.Icon,{name:r.arrow_down}),closeIndicator:n.jsx(d.Icon,{name:r.arrow_up}),startOpen:a.includes(u),onClick:()=>i(p=>p.includes(u)?p.filter(m=>m!==u):[...p,u]),children:n.jsx(d.TextStructure.Root,{children:n.jsxs(d.TextStructure.DivWrapper,{children:[n.jsx("h3",{className:"typography-style-body-md-strong",children:l.title}),l.subtitle&&l.subtitle.length?n.jsx("h2",{children:l.subtitle}):n.jsx(n.Fragment,{})]})})}),n.jsx(d.Accordion.Body,{children:n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{className:Oa["accordion-body-modifier"],children:n.jsx(tt.Editor,{editorKey:`${t}-editor-${u}`,blockRenderMap:Wn,editorState:l.text?Vn(JSON.parse(l.text)):tt.EditorState.createEmpty(),onChange:()=>null})})})})]},`${t}-accordion-${u}-${a.includes(u)}`))]})})},Sm=async e=>{const{type:t,storeId:r}=e,s=t==="collectionSearch"?`https://${r}.myvtex.com/_v/proxy/search/product`:`https://${r}.myvtex.com/_v/proxy/search/crosselling`,o=JSON.stringify(t==="collectionSearch"?{...e.params,facets:e.facets,term:e.term,forceUpdate:!1}:e.facets);return(await fetch(s,{method:"POST",headers:{"Content-Type":"application/json"},body:o}).then(i=>i.json()).then(i=>t==="collectionSearch"?i.data.products:i.products)).filter(i=>!!i.node.availability.status)},fv="_shelf__container_bi04n_10",wm={shelf__container:fv},hv=({collectionSearch:e,title:t,CONSTANTS:r,searchModal:s})=>{const[o,a]=g.useState([]),{isMobile:i}=ne(),{ref:c,inView:l}=$a.useInView({threshold:.7,delay:100,triggerOnce:!0}),{sendDataLayerEvent:u}=ae();return g.useEffect(()=>{if(!e)return;function p(){var m,f;Sm({type:"collectionSearch",term:e==null?void 0:e.term,facets:e==null?void 0:e.facets,params:{count:((m=e==null?void 0:e.params)==null?void 0:m.count)??12,sort:((f=e==null?void 0:e.params)==null?void 0:f.sort)??r.ITEMS_DEFAULT_SORT},storeId:r.storeId}).then(h=>{a(h)})}p()},[e]),g.useEffect(()=>{!l||o.length===0||u({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:o},customData:{item_list_name:t??"Você também pode gostar"}}})},[l,o]),o.length===0?null:n.jsx("div",{ref:c,className:wm.shelf__container,children:n.jsx(rn.Shelf,{title:t??"Você também pode gostar",itemsPerPage:s?{desktop:2,mobile:1.4}:{desktop:4.4,mobile:2.2},ICONS:r.ICONS,children:Array.isArray(o)&&o.map(({node:p},m)=>{const{availability:{status:f}}=p;return f?n.jsx(rn.Card,{item:p,isMobile:i,size:"medium",index:m,shelfTitle:t??"Você também pode gostar",CONSTANTS:r},p.id):null})})})},_v=({recommendationSearch:e,title:t,CONSTANTS:r})=>{const[s,o]=g.useState([]),{isMobile:a}=ne(),{ref:i,inView:c}=$a.useInView({threshold:.7,delay:100,triggerOnce:!0}),{sendDataLayerEvent:l}=ae(),u=g.useMemo(()=>e?[{key:e.type,value:e.productId}]:[],[e]);return g.useEffect(()=>{if(!e)return;function p(){var m;Sm({type:"recommendationSearch",facets:u,params:{count:((m=e==null?void 0:e.params)==null?void 0:m.count)??12,sort:r.ITEMS_DEFAULT_SORT},storeId:r.storeId}).then(f=>o(f))}p()},[u,e]),g.useEffect(()=>{if(!c||s.length===0||(e==null?void 0:e.type)==="suggestions")return;const p=t??"Você também pode gostar";l({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:s},customData:{item_list_name:p},outsideEcommerceData:{item_list_name:p}}})},[c,s]),(s==null?void 0:s.length)===0?null:(e==null?void 0:e.type)==="suggestions"?n.jsx(vl,{products:s,innerRef:i,inView:c,CONSTANTS:r}):n.jsx("div",{ref:i,className:wm.shelf__container,children:n.jsx(rn.Shelf,{title:t??"Você também pode gostar",itemsPerPage:{desktop:4.4,mobile:2.2},ICONS:r.ICONS,children:Array.isArray(s)&&s.map(({node:p},m)=>{const{availability:{status:f}}=p;return f?n.jsx(rn.Card,{item:p,isMobile:a,size:"medium",index:m,shelfTitle:t??"Você também pode gostar",CONSTANTS:r},p.id):null})})})},Pm=({data:e,name:t,CONSTANTS:r})=>{const{productId:s}=jc();return!(e!=null&&e.productLists)||e.productLists.length===0?null:e.productLists.map((o,a)=>n.jsx(Qe,{name:t,children:n.jsx(_v,{title:o.title,recommendationSearch:{type:o.product_group_option,productId:s,params:{count:o.number_of_items,sort:"score:desc"}},CONSTANTS:r},`shelf=${a}`)}))},Nm=({data:e,CONSTANTS:t,searchModal:r,name:s})=>{var a;const o=(a=e==null?void 0:e.productLists)==null?void 0:a.filter(i=>!!i.collectionId||!!i.search_base_name);return!o||o.length===0?null:o.map((i,c)=>{const l=i.collectionId?{term:"",facets:[{key:"productclusterids",value:`${i.collectionId}`}]}:{term:i.search_base_name,facets:[]};return n.jsx(Qe,{name:s,children:n.jsx(hv,{title:i.title,collectionSearch:{params:{count:i.number_of_items,sort:i.sort},...l},searchModal:r,CONSTANTS:t},`shelf=${c}`)})})},gv="_popup_5taxs_9",yv="_popup__overlay_5taxs_19",xv="_popup__modal_5taxs_27",Ue={popup:gv,popup__overlay:yv,popup__modal:xv,"popup__modal--form":"_popup__modal--form_5taxs_49","popup__modal--header":"_popup__modal--header_5taxs_66","popup__modal--status":"_popup__modal--status_5taxs_69","popup__modal--checkbox":"_popup__modal--checkbox_5taxs_78","popup__modal--success":"_popup__modal--success_5taxs_90","popup__modal--close":"_popup__modal--close_5taxs_101"},vv=e=>n.jsx("div",{className:Ue["popup__modal--success"],children:n.jsx(d.TextStructure.Root,{adornment:{start:n.jsx(d.Icon,{name:e.ICONS.check_circle,size:"large"})},children:n.jsxs(d.TextStructure.DivWrapper,{className:Ue["text-structure-modifier"],children:[n.jsx("h3",{className:"typography-style-body-sm-strong",children:e.successTitle}),n.jsx("p",{className:"typography-style-body-caption",children:e.successDescription})]})})}),bv=e=>{const{title:t,description:r,groups:s,ICONS:o}=e,{formErrors:a,submitForm:i,success:c}=ur(),[l,u]=g.useState(!1);return n.jsx("form",{onSubmit:i,className:Ue.formContainer,children:n.jsxs("div",{className:Ue["popup__modal--form"],children:[n.jsxs(d.TextStructure.DivWrapper,{className:Ue["popup__modal--header"],children:[n.jsx("strong",{className:"typography-style-body-md-strong",children:t}),n.jsx("p",{className:"typography-style-body-xs",children:r})]}),c?n.jsx(vv,{...e}):n.jsxs(n.Fragment,{children:[s.map(p=>n.jsx(Ft.FieldGroup,{group:p,children:n.jsx(Ft.FieldWrapper,{fields:p.fields})},p.groupLabel)),n.jsx(d.Checkbox,{className:Ue["popup__modal--checkbox"],adornment:n.jsx(d.Icon,{name:o.check,size:"small"}),name:"terms-and-conditions",label:"Li e aceito os termos de política de privacidade abaixo.",sizeVariant:"small",checked:l,onChange:()=>u(!l)}),n.jsxs("div",{children:[!l&&n.jsx(d.TextStructure.DivWrapper,{className:Ue["popup__modal--status"],children:n.jsxs("p",{className:"typography-style-body-caption",children:[n.jsx(d.Icon,{size:"small",name:o.alert_circle}),Ip]})}),n.jsx(d.Button,{disabled:!l,size:"medium",type:"submit",children:Tp}),a.length?n.jsx(d.TextStructure.DivWrapper,{className:Ue["popup__modal--status"],children:n.jsx("p",{className:d.helpers.classNameConcat(Ue.formSubmitWarning,"typography-style-body-xs"),children:Rp})}):null]})]})]})})},Em=({data:e,name:t,CONSTANTS:r})=>{const[s,o]=g.useState(!1),a=typeof window<"u"?window.sessionStorage.getItem(r.POPUP_TRACK_STORAGE)||window.localStorage.getItem(r.POPUP_SUBMITTED_STORAGE):null,i=()=>{o(!1),window.sessionStorage.setItem(r.POPUP_TRACK_STORAGE,"true")};return g.useEffect(()=>{setTimeout(()=>!a&&o(!0),2e3)},[]),e.active&&s?n.jsx(Qe,{name:t,children:n.jsxs("div",{className:Ue.popup,children:[n.jsx("div",{onClick:i,className:Ue.popup__overlay}),n.jsxs("div",{className:Ue.popup__modal,children:[n.jsx(d.Button,{onClick:i,variant:"tertiary",className:Ue["popup__modal--close"],children:n.jsx(d.Icon,{style:{color:e.closeColor||"#000"},name:r.ICONS.close,size:"medium"})}),n.jsx("div",{children:n.jsx(Pe.Image,{src:e.imageUrl,width:"459",height:"418",alt:e.title})}),n.jsx(Xd,{...e,children:n.jsx(bv,{...e,ICONS:r.ICONS})})]})]})}):null},jv={"Image Grid":gm,"Embed Live":ym,"Banner Carousel":xm,Banner:ho,"Bennefits Bar":vm,newsletter:bm,TextContent:jm,TextAccordion:Cm,"Product Carousel":Nm,"PDP Product Carousel":Pm,"Popup Modal":Em},Im=({data:e,identifyWhoIsFirst:t=!1,componentConfigs:r})=>e==null?void 0:e.map((s,o)=>{const a=jv[s.name],i={...(r==null?void 0:r[s.name])??{}};return t&&o===0&&(s.data.first=!0),s.data.componentIndex=o,s.name==="TextAccordion"&&(i.id=`text-accordion-${o}`),a?n.jsx(a,{name:s.name,data:s.data,...i},`section-zone-component-${o}`):null});async function Cv({slug:e,pageData:t,tabsData:r,oneTrust:s}){var c,l,u,p;const a=(r?[...r].sort((m,f)=>m.config.tabConfig.order-f.config.tabConfig.order):[]).map(m=>({slug:m.config.seo.slug||ss(m.config.tabConfig.title),title:m.config.tabConfig.title})),i=r==null?void 0:r.find(m=>m.config.seo.slug===`/${decodeURIComponent(e)}`);return i&&(i.id=ss(i.config.seo.slug||"")),n.jsxs("div",{className:Ct.root,children:[n.jsx(Ns,{children:n.jsx(cv,{title:(c=t==null?void 0:t.config.banners)==null?void 0:c.altImageBackgroud,srcImages:{desktop:(l=t==null?void 0:t.config.banners)==null?void 0:l.imageBackgroudDesk,mobile:(p=(u=t==null?void 0:t.config)==null?void 0:u.banners)==null?void 0:p.imageBackgroudMobile}})}),n.jsxs(Ns,{children:[n.jsx("div",{className:Ct.slugs,children:a.map(m=>n.jsx(Le,{href:m.slug?`/politicas/${m.slug.replace(/^\/+/,"")}`:"#",className:m.slug===(i==null?void 0:i.id)?Ct.active:"",title:m.title,scroll:!1,children:m.title},m.slug.replace(/^\/+/,"")))}),n.jsx("div",{className:Ct["content-page-modifier"],children:e==="privacidade-e-seguranca"?n.jsx(lv,{oneTrust:s}):n.jsx(Im,{data:(i==null?void 0:i.sections)??[]})})]})]})}const lt={"banner-wrapper":"_banner-wrapper_jrphb_5","banner-image":"_banner-image_jrphb_15","banner-desktop":"_banner-desktop_jrphb_21","banner-mobile":"_banner-mobile_jrphb_24","text-wrapper":"_text-wrapper_jrphb_37","custom-row":"_custom-row_jrphb_53","text-area":"_text-area_jrphb_58","text-wrapper-modifier":"_text-wrapper-modifier_jrphb_68","text-area-modifier":"_text-area-modifier_jrphb_77"},Rm=({data:e,ERROR_TEMPLATE_RETURN_BUTTON:t})=>{const{router:r}=ce();return n.jsx("div",{children:n.jsxs(d.Banner.Container,{className:lt["banner-wrapper"],children:[n.jsxs(d.Banner.ImageWrapper,{className:lt["banner-image"],children:[n.jsx(Pe.Image,{className:lt["banner-desktop"],alt:e.altImageBackgroud??e.imageBackgroudDesk,src:e.imageBackgroudDesk,width:1366,height:695,priority:!0}),n.jsx(Pe.Image,{className:lt["banner-mobile"],alt:e.altImageBackgroud??e.imageBackgroudMobile,src:e.imageBackgroudMobile,width:375,height:755,priority:!0})]}),n.jsx(d.Banner.Slot,{className:d.helpers.classNameConcat(lt["text-wrapper"],lt["text-wrapper-modifier"]),margin:107,children:n.jsxs(d.TextStructure.Root,{layoutProps:{textRow:{className:lt["custom-row"]}},children:[n.jsxs(d.TextStructure.DivWrapper,{className:d.helpers.classNameConcat(lt["text-area"],lt["text-area-modifier"]),children:[n.jsx("h1",{className:"typography-style-display-strong",children:e.title}),n.jsx("h2",{className:"typography-style-body-lg",children:e.subTitle}),n.jsx("p",{className:"typography-style-body-sm",children:e.description})]}),n.jsx(d.Button,{onClick:()=>r.push("/"),children:t})]})})]})})};Rm.displayName="ErrorTemplate";const Sv={codVenderoda:"",orderformId:"",cupom:"",setCodVendedora:()=>null,setCupom:()=>null,setOrderformId:()=>null,setConfiguration:()=>null,update:()=>!1,isValidSharedCart:()=>!1},wv=g.createContext(Sv);function Pv(){return g.useContext(wv)}function Kr(e,t=""){if(!e)return;if(!t)if(typeof window<"u")t=window.location.href;else return;e=e.replace(/[[\]]/g,"\\$&");const s=new RegExp(`[?&]${e}(=([^&#]*)|&|#|$)`).exec(t);return s?s[2]?decodeURIComponent(s[2].replace(/\+/g," ")):"":null}function Xr(){if(window){localStorage.getItem("cleverapp")&&(localStorage.removeItem("vendedora"),localStorage.removeItem("atendimento")),localStorage.getItem("atendimento")&&(localStorage.removeItem("vendedora"),localStorage.removeItem("televendas"));const{hostname:e,origin:t}=window.location;document.cookie=`checkout.vtex.com=;Domain=.${e};path=/;expires=Thu, 01-Jan-1970 00:00:01 GMT`,document.cookie=`checkout.vtex.com=;Domain=${e.replace("www","")};path=/;expires=Thu, 01-Jan-1970 00:00:01 GMT`,window.location.replace(`${t}`)}}const Nv="_container_df1ql_11",Yr={"action-button":"_action-button_df1ql_1",container:Nv,"container-icon":"_container-icon_df1ql_31"};function Ev({icon:e,text:t,onClick:r,isActive:s=!1}){const o=a=>{a.preventDefault(),s&&r()};return n.jsxs("div",{className:d.helpers.classNameConcat(Yr["action-button"],s?"":"disable"),onClick:a=>o(a),children:[n.jsx("div",{className:d.helpers.classNameConcat(Yr["container-icon"],s?"":"disable"),children:n.jsx("img",{src:e,alt:"icon"})}),n.jsxs("div",{className:d.helpers.classNameConcat(Yr.container,s?"":"disable"),children:[n.jsx("span",{children:t}),n.jsx("img",{src:"/images/Widget_open/navigate_next-black-18dp.png",alt:"next"})]})]})}const Iv="_container_k11me_1",Rv="_header_k11me_18",Tv="_body_k11me_45",Gt={container:Iv,header:Rv,body:Tv,"copy-cart-button":"_copy-cart-button_k11me_78","reset-orderform-button":"_reset-orderform-button_k11me_110"};function Av(e,t=!1,r){const{base:s,orderformId:o}=e,a=r==null?void 0:r.split("codigo: ")[1],i=localStorage.getItem("maiscarrinho"),c={medium:t?"&utm_medium=carrinho_compartilhado":"&utm_medium=linkvendedor",campaign:`&utm_campaign=${encodeURIComponent(r??"")}`,cp:a?`&utmi_cp=${a}`:"",source:`&utm_source=${i}`};return t?`${s}/checkout/?orderFormId=${o}${c.source}${c.campaign}${c.cp}${c.medium}#/cart`:`${s}/checkout/?orderFormId=${o}${c.source}${c.campaign}${c.cp}${c.medium}#/payment`}function kv(e){const t=`https://mais-carrinho-dkwr66gouq-uc.a.run.app/url-shortner/${encodeURIComponent(e)}`;return fetch(t).then(r=>r.json()).then(r=>r.url.shortLink).catch(()=>e)}function La({mode:e,config:t,newCart:r}){const[s,o]=g.useState(!1),[a,i]=g.useState(""),c=Av(t,e==="cart",t.sellerCode),{useClipboard:l}=nn.hooks,[,u]=l();function p(){o(!0);const m=document.createElement("textArea");m.readOnly=!0,m.contentEditable="true",m.value=a,document.body.appendChild(m),m.select(),u(m.value),document.body.removeChild(m),setTimeout(()=>{o(!1)},3e3)}return g.useEffect(()=>{i(""),i("Gerando link..."),kv(c).then(m=>i(m)).catch(()=>i("Algo deu errado, tente novamente mais tarde"))},[c]),n.jsxs("div",{className:Gt.container,children:[n.jsxs("div",{className:Gt.header,children:[n.jsx("img",{src:e==="cart"?"/images/Modal_compartilhar_sacola/ico_sacola_big.png":"/images/Modal_compartilhar_editavel/ico_form_big.png",alt:"close"}),n.jsxs("span",{className:"text",children:[" ",e==="cart"?"Compartilhar a Sacola":"Compartilhar link para pagamento"]})]}),n.jsxs("div",{className:Gt.body,children:[n.jsx("p",{children:e==="cart"?`Envie a sacola para um ou mais clientes usando o link abaixo ou
|
|
19
|
-
compartilhe direto por whatsapp`:"Envie a sacola para um cliente usando o link abaixo ou compartilhe direto por whatsapp"}),
|
|
16
|
+
See more info here: https://nextjs.org/docs/messages/no-stylesheets-in-head-component`);return i.default.cloneElement(P,{key:N})})}function v(j){let{children:b}=j;const w=(0,i.useContext)(l.AmpStateContext),P=(0,i.useContext)(u.HeadManagerContext);return(0,a.jsx)(c.default,{reduceComponentsToState:x,headManager:P,inAmpMode:(0,p.isInAmpMode)(w),children:b})}const C=v;(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)}(Rn,Rn.exports)),Rn.exports}var Fr={},_a;function M_(){return _a||(_a=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"ImageConfigContext",{enumerable:!0,get:function(){return s}});const n=Oe._(g),o=lr,s=n.default.createContext(o.imageConfigDefault);process.env.NODE_ENV!=="production"&&(s.displayName="ImageConfigContext")}(Fr)),Fr}var Br={},Ur={},qr={exports:{}},ga;function nd(){return ga||(ga=1,(()=>{var e={170:(s,a,i)=>{const c=i(510),l=()=>{if(typeof navigator<"u"&&navigator.platform){const p=navigator.platform.toLowerCase();return p==="win32"||p==="windows"}return typeof process<"u"&&process.platform?process.platform==="win32":!1};function u(p,m,f=!1){return m&&(m.windows===null||m.windows===void 0)&&(m={...m,windows:l()}),c(p,m,f)}Object.assign(u,c),s.exports=u},154:s=>{const a="\\\\/",i=`[^${a}]`,c="\\.",l="\\+",u="\\?",p="\\/",m="(?=.)",f="[^/]",h=`(?:${p}|$)`,_=`(?:^|${p})`,y=`${c}{1,2}${h}`,x=`(?!${c})`,v=`(?!${_}${y})`,C=`(?!${c}{0,1}${h})`,j=`(?!${y})`,b=`[^.${p}]`,w=`${f}*?`,S={DOT_LITERAL:c,PLUS_LITERAL:l,QMARK_LITERAL:u,SLASH_LITERAL:p,ONE_CHAR:m,QMARK:f,END_ANCHOR:h,DOTS_SLASH:y,NO_DOT:x,NO_DOTS:v,NO_DOT_SLASH:C,NO_DOTS_SLASH:j,QMARK_NO_DOT:b,STAR:w,START_ANCHOR:_,SEP:"/"},N={...S,SLASH_LITERAL:`[${a}]`,QMARK:i,STAR:`${i}*?`,DOTS_SLASH:`${c}{1,2}(?:[${a}]|$)`,NO_DOT:`(?!${c})`,NO_DOTS:`(?!(?:^|[${a}])${c}{1,2}(?:[${a}]|$))`,NO_DOT_SLASH:`(?!${c}{0,1}(?:[${a}]|$))`,NO_DOTS_SLASH:`(?!${c}{1,2}(?:[${a}]|$))`,QMARK_NO_DOT:`[^.${a}]`,START_ANCHOR:`(?:^|[${a}])`,END_ANCHOR:`(?:[${a}]|$)`,SEP:"\\"},R={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};s.exports={MAX_LENGTH:65536,POSIX_REGEX_SOURCE:R,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars(A){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${A.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(A){return A===!0?N:S}}},697:(s,a,i)=>{const c=i(154),l=i(96),{MAX_LENGTH:u,POSIX_REGEX_SOURCE:p,REGEX_NON_SPECIAL_CHARS:m,REGEX_SPECIAL_CHARS_BACKREF:f,REPLACEMENTS:h}=c,_=(v,C)=>{if(typeof C.expandRange=="function")return C.expandRange(...v,C);v.sort();const j=`[${v.join("-")}]`;try{new RegExp(j)}catch{return v.map(w=>l.escapeRegex(w)).join("..")}return j},y=(v,C)=>`Missing ${v}: "${C}" - use "\\\\${C}" to match literal characters`,x=(v,C)=>{if(typeof v!="string")throw new TypeError("Expected a string");v=h[v]||v;const j={...C},b=typeof j.maxLength=="number"?Math.min(u,j.maxLength):u;let w=v.length;if(w>b)throw new SyntaxError(`Input length: ${w}, exceeds maximum allowed length: ${b}`);const P={type:"bos",value:"",output:j.prepend||""},S=[P],N=j.capture?"":"?:",R=c.globChars(j.windows),A=c.extglobChars(R),{DOT_LITERAL:L,PLUS_LITERAL:O,SLASH_LITERAL:G,ONE_CHAR:M,DOTS_SLASH:U,NO_DOT:Y,NO_DOT_SLASH:X,NO_DOTS_SLASH:W,QMARK:z,QMARK_NO_DOT:J,STAR:oe,START_ANCHOR:le}=R,se=q=>`(${N}(?:(?!${le}${q.dot?U:L}).)*?)`,ue=j.dot?"":Y,$=j.dot?z:J;let ee=j.bash===!0?se(j):oe;j.capture&&(ee=`(${ee})`),typeof j.noext=="boolean"&&(j.noextglob=j.noext);const E={input:v,index:-1,start:0,dot:j.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:S};v=l.removePrefix(v,E),w=v.length;const V=[],ie=[],_e=[];let I=P,T;const Te=()=>E.index===w-1,H=E.peek=(q=1)=>v[E.index+q],Q=E.advance=()=>v[++E.index]||"",be=()=>v.slice(E.index+1),Ie=(q="",K=0)=>{E.consumed+=q,E.index+=K},je=q=>{E.output+=q.output!=null?q.output:q.value,Ie(q.value)},ge=()=>{let q=1;for(;H()==="!"&&(H(2)!=="("||H(3)==="?");)Q(),E.start++,q++;return q%2===0?!1:(E.negated=!0,E.start++,!0)},Ae=q=>{E[q]++,_e.push(q)},Ce=q=>{E[q]--,_e.pop()},F=q=>{if(I.type==="globstar"){const K=E.braces>0&&(q.type==="comma"||q.type==="brace"),k=q.extglob===!0||V.length&&(q.type==="pipe"||q.type==="paren");q.type!=="slash"&&q.type!=="paren"&&!K&&!k&&(E.output=E.output.slice(0,-I.output.length),I.type="star",I.value="*",I.output=ee,E.output+=I.output)}if(V.length&&q.type!=="paren"&&(V[V.length-1].inner+=q.value),(q.value||q.output)&&je(q),I&&I.type==="text"&&q.type==="text"){I.output=(I.output||I.value)+q.value,I.value+=q.value;return}q.prev=I,S.push(q),I=q},pe=(q,K)=>{const k={...A[K],conditions:1,inner:""};k.prev=I,k.parens=E.parens,k.output=E.output;const B=(j.capture?"(":"")+k.open;Ae("parens"),F({type:q,value:K,output:E.output?"":M}),F({type:"paren",extglob:!0,value:Q(),output:B}),V.push(k)},ye=q=>{let K=q.close+(j.capture?")":""),k;if(q.type==="negate"){let B=ee;if(q.inner&&q.inner.length>1&&q.inner.includes("/")&&(B=se(j)),(B!==ee||Te()||/^\)+$/.test(be()))&&(K=q.close=`)$))${B}`),q.inner.includes("*")&&(k=be())&&/^\.[^\\/.]+$/.test(k)){const te=x(k,{...C,fastpaths:!1}).output;K=q.close=`)${te})${B})`}q.prev.type==="bos"&&(E.negatedExtglob=!0)}F({type:"paren",extglob:!0,value:T,output:K}),Ce("parens")};if(j.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(v)){let q=!1,K=v.replace(f,(k,B,te,he,Ee,pr)=>he==="\\"?(q=!0,k):he==="?"?B?B+he+(Ee?z.repeat(Ee.length):""):pr===0?$+(Ee?z.repeat(Ee.length):""):z.repeat(te.length):he==="."?L.repeat(te.length):he==="*"?B?B+he+(Ee?ee:""):ee:B?k:`\\${k}`);return q===!0&&(j.unescape===!0?K=K.replace(/\\/g,""):K=K.replace(/\\+/g,k=>k.length%2===0?"\\\\":k?"\\":"")),K===v&&j.contains===!0?(E.output=v,E):(E.output=l.wrapOutput(K,E,C),E)}for(;!Te();){if(T=Q(),T==="\0")continue;if(T==="\\"){const k=H();if(k==="/"&&j.bash!==!0||k==="."||k===";")continue;if(!k){T+="\\",F({type:"text",value:T});continue}const B=/^\\+/.exec(be());let te=0;if(B&&B[0].length>2&&(te=B[0].length,E.index+=te,te%2!==0&&(T+="\\")),j.unescape===!0?T=Q():T+=Q(),E.brackets===0){F({type:"text",value:T});continue}}if(E.brackets>0&&(T!=="]"||I.value==="["||I.value==="[^")){if(j.posix!==!1&&T===":"){const k=I.value.slice(1);if(k.includes("[")&&(I.posix=!0,k.includes(":"))){const B=I.value.lastIndexOf("["),te=I.value.slice(0,B),he=I.value.slice(B+2),Ee=p[he];if(Ee){I.value=te+Ee,E.backtrack=!0,Q(),!P.output&&S.indexOf(I)===1&&(P.output=M);continue}}}(T==="["&&H()!==":"||T==="-"&&H()==="]")&&(T=`\\${T}`),T==="]"&&(I.value==="["||I.value==="[^")&&(T=`\\${T}`),j.posix===!0&&T==="!"&&I.value==="["&&(T="^"),I.value+=T,je({value:T});continue}if(E.quotes===1&&T!=='"'){T=l.escapeRegex(T),I.value+=T,je({value:T});continue}if(T==='"'){E.quotes=E.quotes===1?0:1,j.keepQuotes===!0&&F({type:"text",value:T});continue}if(T==="("){Ae("parens"),F({type:"paren",value:T});continue}if(T===")"){if(E.parens===0&&j.strictBrackets===!0)throw new SyntaxError(y("opening","("));const k=V[V.length-1];if(k&&E.parens===k.parens+1){ye(V.pop());continue}F({type:"paren",value:T,output:E.parens?")":"\\)"}),Ce("parens");continue}if(T==="["){if(j.nobracket===!0||!be().includes("]")){if(j.nobracket!==!0&&j.strictBrackets===!0)throw new SyntaxError(y("closing","]"));T=`\\${T}`}else Ae("brackets");F({type:"bracket",value:T});continue}if(T==="]"){if(j.nobracket===!0||I&&I.type==="bracket"&&I.value.length===1){F({type:"text",value:T,output:`\\${T}`});continue}if(E.brackets===0){if(j.strictBrackets===!0)throw new SyntaxError(y("opening","["));F({type:"text",value:T,output:`\\${T}`});continue}Ce("brackets");const k=I.value.slice(1);if(I.posix!==!0&&k[0]==="^"&&!k.includes("/")&&(T=`/${T}`),I.value+=T,je({value:T}),j.literalBrackets===!1||l.hasRegexChars(k))continue;const B=l.escapeRegex(I.value);if(E.output=E.output.slice(0,-I.value.length),j.literalBrackets===!0){E.output+=B,I.value=B;continue}I.value=`(${N}${B}|${I.value})`,E.output+=I.value;continue}if(T==="{"&&j.nobrace!==!0){Ae("braces");const k={type:"brace",value:T,output:"(",outputIndex:E.output.length,tokensIndex:E.tokens.length};ie.push(k),F(k);continue}if(T==="}"){const k=ie[ie.length-1];if(j.nobrace===!0||!k){F({type:"text",value:T,output:T});continue}let B=")";if(k.dots===!0){const te=S.slice(),he=[];for(let Ee=te.length-1;Ee>=0&&(S.pop(),te[Ee].type!=="brace");Ee--)te[Ee].type!=="dots"&&he.unshift(te[Ee].value);B=_(he,j),E.backtrack=!0}if(k.comma!==!0&&k.dots!==!0){const te=E.output.slice(0,k.outputIndex),he=E.tokens.slice(k.tokensIndex);k.value=k.output="\\{",T=B="\\}",E.output=te;for(const Ee of he)E.output+=Ee.output||Ee.value}F({type:"brace",value:T,output:B}),Ce("braces"),ie.pop();continue}if(T==="|"){V.length>0&&V[V.length-1].conditions++,F({type:"text",value:T});continue}if(T===","){let k=T;const B=ie[ie.length-1];B&&_e[_e.length-1]==="braces"&&(B.comma=!0,k="|"),F({type:"comma",value:T,output:k});continue}if(T==="/"){if(I.type==="dot"&&E.index===E.start+1){E.start=E.index+1,E.consumed="",E.output="",S.pop(),I=P;continue}F({type:"slash",value:T,output:G});continue}if(T==="."){if(E.braces>0&&I.type==="dot"){I.value==="."&&(I.output=L);const k=ie[ie.length-1];I.type="dots",I.output+=T,I.value+=T,k.dots=!0;continue}if(E.braces+E.parens===0&&I.type!=="bos"&&I.type!=="slash"){F({type:"text",value:T,output:L});continue}F({type:"dot",value:T,output:L});continue}if(T==="?"){if(!(I&&I.value==="(")&&j.noextglob!==!0&&H()==="("&&H(2)!=="?"){pe("qmark",T);continue}if(I&&I.type==="paren"){const B=H();let te=T;(I.value==="("&&!/[!=<:]/.test(B)||B==="<"&&!/<([!=]|\w+>)/.test(be()))&&(te=`\\${T}`),F({type:"text",value:T,output:te});continue}if(j.dot!==!0&&(I.type==="slash"||I.type==="bos")){F({type:"qmark",value:T,output:J});continue}F({type:"qmark",value:T,output:z});continue}if(T==="!"){if(j.noextglob!==!0&&H()==="("&&(H(2)!=="?"||!/[!=<:]/.test(H(3)))){pe("negate",T);continue}if(j.nonegate!==!0&&E.index===0){ge();continue}}if(T==="+"){if(j.noextglob!==!0&&H()==="("&&H(2)!=="?"){pe("plus",T);continue}if(I&&I.value==="("||j.regex===!1){F({type:"plus",value:T,output:O});continue}if(I&&(I.type==="bracket"||I.type==="paren"||I.type==="brace")||E.parens>0){F({type:"plus",value:T});continue}F({type:"plus",value:O});continue}if(T==="@"){if(j.noextglob!==!0&&H()==="("&&H(2)!=="?"){F({type:"at",extglob:!0,value:T,output:""});continue}F({type:"text",value:T});continue}if(T!=="*"){(T==="$"||T==="^")&&(T=`\\${T}`);const k=m.exec(be());k&&(T+=k[0],E.index+=k[0].length),F({type:"text",value:T});continue}if(I&&(I.type==="globstar"||I.star===!0)){I.type="star",I.star=!0,I.value+=T,I.output=ee,E.backtrack=!0,E.globstar=!0,Ie(T);continue}let q=be();if(j.noextglob!==!0&&/^\([^?]/.test(q)){pe("star",T);continue}if(I.type==="star"){if(j.noglobstar===!0){Ie(T);continue}const k=I.prev,B=k.prev,te=k.type==="slash"||k.type==="bos",he=B&&(B.type==="star"||B.type==="globstar");if(j.bash===!0&&(!te||q[0]&&q[0]!=="/")){F({type:"star",value:T,output:""});continue}const Ee=E.braces>0&&(k.type==="comma"||k.type==="brace"),pr=V.length&&(k.type==="pipe"||k.type==="paren");if(!te&&k.type!=="paren"&&!Ee&&!pr){F({type:"star",value:T,output:""});continue}for(;q.slice(0,3)==="/**";){const _n=v[E.index+4];if(_n&&_n!=="/")break;q=q.slice(3),Ie("/**",3)}if(k.type==="bos"&&Te()){I.type="globstar",I.value+=T,I.output=se(j),E.output=I.output,E.globstar=!0,Ie(T);continue}if(k.type==="slash"&&k.prev.type!=="bos"&&!he&&Te()){E.output=E.output.slice(0,-(k.output+I.output).length),k.output=`(?:${k.output}`,I.type="globstar",I.output=se(j)+(j.strictSlashes?")":"|$)"),I.value+=T,E.globstar=!0,E.output+=k.output+I.output,Ie(T);continue}if(k.type==="slash"&&k.prev.type!=="bos"&&q[0]==="/"){const _n=q[1]!==void 0?"|$":"";E.output=E.output.slice(0,-(k.output+I.output).length),k.output=`(?:${k.output}`,I.type="globstar",I.output=`${se(j)}${G}|${G}${_n})`,I.value+=T,E.output+=k.output+I.output,E.globstar=!0,Ie(T+Q()),F({type:"slash",value:"/",output:""});continue}if(k.type==="bos"&&q[0]==="/"){I.type="globstar",I.value+=T,I.output=`(?:^|${G}|${se(j)}${G})`,E.output=I.output,E.globstar=!0,Ie(T+Q()),F({type:"slash",value:"/",output:""});continue}E.output=E.output.slice(0,-I.output.length),I.type="globstar",I.output=se(j),I.value+=T,E.output+=I.output,E.globstar=!0,Ie(T);continue}const K={type:"star",value:T,output:ee};if(j.bash===!0){K.output=".*?",(I.type==="bos"||I.type==="slash")&&(K.output=ue+K.output),F(K);continue}if(I&&(I.type==="bracket"||I.type==="paren")&&j.regex===!0){K.output=T,F(K);continue}(E.index===E.start||I.type==="slash"||I.type==="dot")&&(I.type==="dot"?(E.output+=X,I.output+=X):j.dot===!0?(E.output+=W,I.output+=W):(E.output+=ue,I.output+=ue),H()!=="*"&&(E.output+=M,I.output+=M)),F(K)}for(;E.brackets>0;){if(j.strictBrackets===!0)throw new SyntaxError(y("closing","]"));E.output=l.escapeLast(E.output,"["),Ce("brackets")}for(;E.parens>0;){if(j.strictBrackets===!0)throw new SyntaxError(y("closing",")"));E.output=l.escapeLast(E.output,"("),Ce("parens")}for(;E.braces>0;){if(j.strictBrackets===!0)throw new SyntaxError(y("closing","}"));E.output=l.escapeLast(E.output,"{"),Ce("braces")}if(j.strictSlashes!==!0&&(I.type==="star"||I.type==="bracket")&&F({type:"maybe_slash",value:"",output:`${G}?`}),E.backtrack===!0){E.output="";for(const q of E.tokens)E.output+=q.output!=null?q.output:q.value,q.suffix&&(E.output+=q.suffix)}return E};x.fastpaths=(v,C)=>{const j={...C},b=typeof j.maxLength=="number"?Math.min(u,j.maxLength):u,w=v.length;if(w>b)throw new SyntaxError(`Input length: ${w}, exceeds maximum allowed length: ${b}`);v=h[v]||v;const{DOT_LITERAL:P,SLASH_LITERAL:S,ONE_CHAR:N,DOTS_SLASH:R,NO_DOT:A,NO_DOTS:L,NO_DOTS_SLASH:O,STAR:G,START_ANCHOR:M}=c.globChars(j.windows),U=j.dot?L:A,Y=j.dot?O:A,X=j.capture?"":"?:",W={negated:!1,prefix:""};let z=j.bash===!0?".*?":G;j.capture&&(z=`(${z})`);const J=ue=>ue.noglobstar===!0?z:`(${X}(?:(?!${M}${ue.dot?R:P}).)*?)`,oe=ue=>{switch(ue){case"*":return`${U}${N}${z}`;case".*":return`${P}${N}${z}`;case"*.*":return`${U}${z}${P}${N}${z}`;case"*/*":return`${U}${z}${S}${N}${Y}${z}`;case"**":return U+J(j);case"**/*":return`(?:${U}${J(j)}${S})?${Y}${N}${z}`;case"**/*.*":return`(?:${U}${J(j)}${S})?${Y}${z}${P}${N}${z}`;case"**/.*":return`(?:${U}${J(j)}${S})?${P}${N}${z}`;default:{const $=/^(.*?)\.(\w+)$/.exec(ue);if(!$)return;const ee=oe($[1]);return ee?ee+P+$[2]:void 0}}},le=l.removePrefix(v,W);let se=oe(le);return se&&j.strictSlashes!==!0&&(se+=`${S}?`),se},s.exports=x},510:(s,a,i)=>{const c=i(716),l=i(697),u=i(96),p=i(154),m=h=>h&&typeof h=="object"&&!Array.isArray(h),f=(h,_,y=!1)=>{if(Array.isArray(h)){const S=h.map(R=>f(R,_,y));return R=>{for(const A of S){const L=A(R);if(L)return L}return!1}}const x=m(h)&&h.tokens&&h.input;if(h===""||typeof h!="string"&&!x)throw new TypeError("Expected pattern to be a non-empty string");const v=_||{},C=v.windows,j=x?f.compileRe(h,_):f.makeRe(h,_,!1,!0),b=j.state;delete j.state;let w=()=>!1;if(v.ignore){const S={..._,ignore:null,onMatch:null,onResult:null};w=f(v.ignore,S,y)}const P=(S,N=!1)=>{const{isMatch:R,match:A,output:L}=f.test(S,j,_,{glob:h,posix:C}),O={glob:h,state:b,regex:j,posix:C,input:S,output:L,match:A,isMatch:R};return typeof v.onResult=="function"&&v.onResult(O),R===!1?(O.isMatch=!1,N?O:!1):w(S)?(typeof v.onIgnore=="function"&&v.onIgnore(O),O.isMatch=!1,N?O:!1):(typeof v.onMatch=="function"&&v.onMatch(O),N?O:!0)};return y&&(P.state=b),P};f.test=(h,_,y,{glob:x,posix:v}={})=>{if(typeof h!="string")throw new TypeError("Expected input to be a string");if(h==="")return{isMatch:!1,output:""};const C=y||{},j=C.format||(v?u.toPosixSlashes:null);let b=h===x,w=b&&j?j(h):h;return b===!1&&(w=j?j(h):h,b=w===x),(b===!1||C.capture===!0)&&(C.matchBase===!0||C.basename===!0?b=f.matchBase(h,_,y,v):b=_.exec(w)),{isMatch:!!b,match:b,output:w}},f.matchBase=(h,_,y)=>(_ instanceof RegExp?_:f.makeRe(_,y)).test(u.basename(h)),f.isMatch=(h,_,y)=>f(_,y)(h),f.parse=(h,_)=>Array.isArray(h)?h.map(y=>f.parse(y,_)):l(h,{..._,fastpaths:!1}),f.scan=(h,_)=>c(h,_),f.compileRe=(h,_,y=!1,x=!1)=>{if(y===!0)return h.output;const v=_||{},C=v.contains?"":"^",j=v.contains?"":"$";let b=`${C}(?:${h.output})${j}`;h&&h.negated===!0&&(b=`^(?!${b}).*$`);const w=f.toRegex(b,_);return x===!0&&(w.state=h),w},f.makeRe=(h,_={},y=!1,x=!1)=>{if(!h||typeof h!="string")throw new TypeError("Expected a non-empty string");let v={negated:!1,fastpaths:!0};return _.fastpaths!==!1&&(h[0]==="."||h[0]==="*")&&(v.output=l.fastpaths(h,_)),v.output||(v=l(h,_)),f.compileRe(v,_,y,x)},f.toRegex=(h,_)=>{try{const y=_||{};return new RegExp(h,y.flags||(y.nocase?"i":""))}catch(y){if(_&&_.debug===!0)throw y;return/$^/}},f.constants=p,s.exports=f},716:(s,a,i)=>{const c=i(96),{CHAR_ASTERISK:l,CHAR_AT:u,CHAR_BACKWARD_SLASH:p,CHAR_COMMA:m,CHAR_DOT:f,CHAR_EXCLAMATION_MARK:h,CHAR_FORWARD_SLASH:_,CHAR_LEFT_CURLY_BRACE:y,CHAR_LEFT_PARENTHESES:x,CHAR_LEFT_SQUARE_BRACKET:v,CHAR_PLUS:C,CHAR_QUESTION_MARK:j,CHAR_RIGHT_CURLY_BRACE:b,CHAR_RIGHT_PARENTHESES:w,CHAR_RIGHT_SQUARE_BRACKET:P}=i(154),S=A=>A===_||A===p,N=A=>{A.isPrefix!==!0&&(A.depth=A.isGlobstar?1/0:1)},R=(A,L)=>{const O=L||{},G=A.length-1,M=O.parts===!0||O.scanToEnd===!0,U=[],Y=[],X=[];let W=A,z=-1,J=0,oe=0,le=!1,se=!1,ue=!1,$=!1,ee=!1,E=!1,V=!1,ie=!1,_e=!1,I=!1,T=0,Te,H,Q={value:"",depth:0,isGlob:!1};const be=()=>z>=G,Ie=()=>W.charCodeAt(z+1),je=()=>(Te=H,W.charCodeAt(++z));for(;z<G;){H=je();let pe;if(H===p){V=Q.backslashes=!0,H=je(),H===y&&(E=!0);continue}if(E===!0||H===y){for(T++;be()!==!0&&(H=je());){if(H===p){V=Q.backslashes=!0,je();continue}if(H===y){T++;continue}if(E!==!0&&H===f&&(H=je())===f){if(le=Q.isBrace=!0,ue=Q.isGlob=!0,I=!0,M===!0)continue;break}if(E!==!0&&H===m){if(le=Q.isBrace=!0,ue=Q.isGlob=!0,I=!0,M===!0)continue;break}if(H===b&&(T--,T===0)){E=!1,le=Q.isBrace=!0,I=!0;break}}if(M===!0)continue;break}if(H===_){if(U.push(z),Y.push(Q),Q={value:"",depth:0,isGlob:!1},I===!0)continue;if(Te===f&&z===J+1){J+=2;continue}oe=z+1;continue}if(O.noext!==!0&&(H===C||H===u||H===l||H===j||H===h)===!0&&Ie()===x){if(ue=Q.isGlob=!0,$=Q.isExtglob=!0,I=!0,H===h&&z===J&&(_e=!0),M===!0){for(;be()!==!0&&(H=je());){if(H===p){V=Q.backslashes=!0,H=je();continue}if(H===w){ue=Q.isGlob=!0,I=!0;break}}continue}break}if(H===l){if(Te===l&&(ee=Q.isGlobstar=!0),ue=Q.isGlob=!0,I=!0,M===!0)continue;break}if(H===j){if(ue=Q.isGlob=!0,I=!0,M===!0)continue;break}if(H===v){for(;be()!==!0&&(pe=je());){if(pe===p){V=Q.backslashes=!0,je();continue}if(pe===P){se=Q.isBracket=!0,ue=Q.isGlob=!0,I=!0;break}}if(M===!0)continue;break}if(O.nonegate!==!0&&H===h&&z===J){ie=Q.negated=!0,J++;continue}if(O.noparen!==!0&&H===x){if(ue=Q.isGlob=!0,M===!0){for(;be()!==!0&&(H=je());){if(H===x){V=Q.backslashes=!0,H=je();continue}if(H===w){I=!0;break}}continue}break}if(ue===!0){if(I=!0,M===!0)continue;break}}O.noext===!0&&($=!1,ue=!1);let ge=W,Ae="",Ce="";J>0&&(Ae=W.slice(0,J),W=W.slice(J),oe-=J),ge&&ue===!0&&oe>0?(ge=W.slice(0,oe),Ce=W.slice(oe)):ue===!0?(ge="",Ce=W):ge=W,ge&&ge!==""&&ge!=="/"&&ge!==W&&S(ge.charCodeAt(ge.length-1))&&(ge=ge.slice(0,-1)),O.unescape===!0&&(Ce&&(Ce=c.removeBackslashes(Ce)),ge&&V===!0&&(ge=c.removeBackslashes(ge)));const F={prefix:Ae,input:A,start:J,base:ge,glob:Ce,isBrace:le,isBracket:se,isGlob:ue,isExtglob:$,isGlobstar:ee,negated:ie,negatedExtglob:_e};if(O.tokens===!0&&(F.maxDepth=0,S(H)||Y.push(Q),F.tokens=Y),O.parts===!0||O.tokens===!0){let pe;for(let ye=0;ye<U.length;ye++){const q=pe?pe+1:J,K=U[ye],k=A.slice(q,K);O.tokens&&(ye===0&&J!==0?(Y[ye].isPrefix=!0,Y[ye].value=Ae):Y[ye].value=k,N(Y[ye]),F.maxDepth+=Y[ye].depth),(ye!==0||k!=="")&&X.push(k),pe=K}if(pe&&pe+1<A.length){const ye=A.slice(pe+1);X.push(ye),O.tokens&&(Y[Y.length-1].value=ye,N(Y[Y.length-1]),F.maxDepth+=Y[Y.length-1].depth)}F.slashes=U,F.parts=X}return F};s.exports=R},96:(s,a,i)=>{const{REGEX_BACKSLASH:c,REGEX_REMOVE_BACKSLASH:l,REGEX_SPECIAL_CHARS:u,REGEX_SPECIAL_CHARS_GLOBAL:p}=i(154);a.isObject=m=>m!==null&&typeof m=="object"&&!Array.isArray(m),a.hasRegexChars=m=>u.test(m),a.isRegexChar=m=>m.length===1&&a.hasRegexChars(m),a.escapeRegex=m=>m.replace(p,"\\$1"),a.toPosixSlashes=m=>m.replace(c,"/"),a.removeBackslashes=m=>m.replace(l,f=>f==="\\"?"":f),a.escapeLast=(m,f,h)=>{const _=m.lastIndexOf(f,h);return _===-1?m:m[_-1]==="\\"?a.escapeLast(m,f,_-1):`${m.slice(0,_)}\\${m.slice(_)}`},a.removePrefix=(m,f={})=>{let h=m;return h.startsWith("./")&&(h=h.slice(2),f.prefix="./"),h},a.wrapOutput=(m,f={},h={})=>{const _=h.contains?"":"^",y=h.contains?"":"$";let x=`${_}(?:${m})${y}`;return f.negated===!0&&(x=`(?:^(?!${x}).*$)`),x},a.basename=(m,{windows:f}={})=>{const h=m.split(f?/[\\/]/:"/"),_=h[h.length-1];return _===""?h[h.length-2]:_}}},t={};function n(s){var a=t[s];if(a!==void 0)return a.exports;var i=t[s]={exports:{}},c=!0;try{e[s](i,i.exports,n),c=!1}finally{c&&delete t[s]}return i.exports}typeof n<"u"&&(n.ab=__dirname+"/");var o=n(170);qr.exports=o})()),qr.exports}var ya;function D_(){return ya||(ya=1,function(e){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,{hasLocalMatch:function(){return s},matchLocalPattern:function(){return o}});const n=nd();function o(a,i){if(a.search!==void 0&&a.search!==i.search)return!1;var c;return!!(0,n.makeRe)((c=a.pathname)!=null?c:"**",{dot:!0}).test(i.pathname)}function s(a,i){if(!a)return!0;const c=new URL(i,"http://n");return a.some(l=>o(l,c))}}(Ur)),Ur}var Hr={},xa;function $_(){return xa||(xa=1,function(e){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,{hasRemoteMatch:function(){return s},matchRemotePattern:function(){return o}});const n=nd();function o(a,i){if(a.protocol!==void 0){const l=i.protocol.slice(0,-1);if(a.protocol!==l)return!1}if(a.port!==void 0&&a.port!==i.port)return!1;if(a.hostname===void 0)throw new Error(`Pattern should define hostname but found
|
|
17
|
+
`+JSON.stringify(a));if(!(0,n.makeRe)(a.hostname).test(i.hostname)||a.search!==void 0&&a.search!==i.search)return!1;var c;return!!(0,n.makeRe)((c=a.pathname)!=null?c:"**",{dot:!0}).test(i.pathname)}function s(a,i,c){return a.some(l=>c.hostname===l)||i.some(l=>o(l,c))}}(Hr)),Hr}var va;function rd(){return va||(va=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return o}});const t=75;function n(s){let{config:a,src:i,width:c,quality:l}=s;var u;if(process.env.NODE_ENV!=="production"){const m=[];if(i||m.push("src"),c||m.push("width"),m.length>0)throw new Error("Next Image Optimization requires "+m.join(", ")+" to be provided. Make sure you pass them as props to the `next/image` component. Received: "+JSON.stringify({src:i,width:c,quality:l}));if(i.startsWith("//"))throw new Error('Failed to parse src "'+i+'" on `next/image`, protocol-relative URL (//) must be changed to an absolute URL (http:// or https://)');if(i.startsWith("/")&&a.localPatterns&&process.env.NODE_ENV!=="test"&&process.env.NEXT_RUNTIME!=="edge"){const{hasLocalMatch:f}=D_();if(!f(a.localPatterns,i))throw new Error("Invalid src prop ("+i+") on `next/image` does not match `images.localPatterns` configured in your `next.config.js`\nSee more info: https://nextjs.org/docs/messages/next-image-unconfigured-localpatterns")}if(!i.startsWith("/")&&(a.domains||a.remotePatterns)){let f;try{f=new URL(i)}catch(h){throw console.error(h),new Error('Failed to parse src "'+i+'" on `next/image`, if using relative image it must start with a leading slash "/" or be an absolute URL (http:// or https://)')}if(process.env.NODE_ENV!=="test"&&process.env.NEXT_RUNTIME!=="edge"){const{hasRemoteMatch:h}=$_();if(!h(a.domains,a.remotePatterns,f))throw new Error("Invalid src prop ("+i+') on `next/image`, hostname "'+f.hostname+'" is not configured under images in your `next.config.js`\nSee more info: https://nextjs.org/docs/messages/next-image-unconfigured-host')}}if(l&&a.qualities&&!a.qualities.includes(l))throw new Error("Invalid quality prop ("+l+") on `next/image` does not match `images.qualities` configured in your `next.config.js`\nSee more info: https://nextjs.org/docs/messages/next-image-unconfigured-qualities")}const p=l||((u=a.qualities)==null?void 0:u.reduce((m,f)=>Math.abs(f-t)<Math.abs(m-t)?f:m))||t;return a.path+"?url="+encodeURIComponent(i)+"&w="+c+"&q="+p+(process.env.NEXT_DEPLOYMENT_ID?"&dpl="+process.env.NEXT_DEPLOYMENT_ID:"")}n.__next_img_default=!0;const o=n}(Br)),Br}(function(e,t){"use client";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Image",{enumerable:!0,get:function(){return j}});const n=Oe,o=un(),s=r,a=o._(g),i=n._(ko),c=n._(L_()),l=ms,u=lr,p=M_(),m=cr,f=Zc(),h=n._(rd()),_=process.env.__NEXT_IMAGE_OPTS;typeof window>"u"&&(globalThis.__NEXT_IMAGE_IMPORTED=!0);function y(b,w,P,S,N,R,A){const L=b==null?void 0:b.src;if(!b||b["data-loaded-src"]===L)return;b["data-loaded-src"]=L,("decode"in b?b.decode():Promise.resolve()).catch(()=>{}).then(()=>{if(!(!b.parentElement||!b.isConnected)){if(w!=="empty"&&N(!0),P!=null&&P.current){const G=new Event("load");Object.defineProperty(G,"target",{writable:!1,value:b});let M=!1,U=!1;P.current({...G,nativeEvent:G,currentTarget:b,target:b,isDefaultPrevented:()=>M,isPropagationStopped:()=>U,persist:()=>{},preventDefault:()=>{M=!0,G.preventDefault()},stopPropagation:()=>{U=!0,G.stopPropagation()}})}if(S!=null&&S.current&&S.current(b),process.env.NODE_ENV!=="production"){const G=new URL(L,"http://n").searchParams.get("url")||L;if(b.getAttribute("data-nimg")==="fill"){if(!R&&(!A||A==="100vw")&&b.getBoundingClientRect().width/window.innerWidth<.6&&(A==="100vw"?(0,m.warnOnce)('Image with src "'+G+'" has "fill" prop and "sizes" prop of "100vw", but image is not rendered at full viewport width. Please adjust "sizes" to improve page performance. Read more: https://nextjs.org/docs/api-reference/next/image#sizes'):(0,m.warnOnce)('Image with src "'+G+'" has "fill" but is missing "sizes" prop. Please add it to improve page performance. Read more: https://nextjs.org/docs/api-reference/next/image#sizes')),b.parentElement){const{position:Y}=window.getComputedStyle(b.parentElement),X=["absolute","fixed","relative"];X.includes(Y)||(0,m.warnOnce)('Image with src "'+G+'" has "fill" and parent element with invalid "position". Provided "'+Y+'" should be one of '+X.map(String).join(",")+".")}b.height===0&&(0,m.warnOnce)('Image with src "'+G+'" has "fill" and a height value of 0. This is likely because the parent element of the image has not been styled to have a set height.')}const M=b.height.toString()!==b.getAttribute("height"),U=b.width.toString()!==b.getAttribute("width");(M&&!U||!M&&U)&&(0,m.warnOnce)('Image with src "'+G+`" has either width or height modified, but not the other. If you use CSS to change the size of your image, also include the styles 'width: "auto"' or 'height: "auto"' to maintain the aspect ratio.`)}}})}function x(b){return a.use?{fetchPriority:b}:{fetchpriority:b}}const v=(0,a.forwardRef)((b,w)=>{let{src:P,srcSet:S,sizes:N,height:R,width:A,decoding:L,className:O,style:G,fetchPriority:M,placeholder:U,loading:Y,unoptimized:X,fill:W,onLoadRef:z,onLoadingCompleteRef:J,setBlurComplete:oe,setShowAltText:le,sizesInput:se,onLoad:ue,onError:$,...ee}=b;return(0,s.jsx)("img",{...ee,...x(M),loading:Y,width:A,height:R,decoding:L,"data-nimg":W?"fill":"1",className:O,style:G,sizes:N,srcSet:S,src:P,ref:(0,a.useCallback)(E=>{w&&(typeof w=="function"?w(E):typeof w=="object"&&(w.current=E)),E&&($&&(E.src=E.src),process.env.NODE_ENV!=="production"&&(P||console.error('Image is missing required "src" property:',E),E.getAttribute("alt")===null&&console.error('Image is missing required "alt" property. Please add Alternative Text to describe the image for screen readers and search engines.')),E.complete&&y(E,U,z,J,oe,X,se))},[P,U,z,J,oe,$,X,se,w]),onLoad:E=>{const V=E.currentTarget;y(V,U,z,J,oe,X,se)},onError:E=>{le(!0),U!=="empty"&&oe(!0),$&&$(E)}})});function C(b){let{isAppRouter:w,imgAttributes:P}=b;const S={as:"image",imageSrcSet:P.srcSet,imageSizes:P.sizes,crossOrigin:P.crossOrigin,referrerPolicy:P.referrerPolicy,...x(P.fetchPriority)};return w&&i.default.preload?(i.default.preload(P.src,S),null):(0,s.jsx)(c.default,{children:(0,s.jsx)("link",{rel:"preload",href:P.srcSet?void 0:P.src,...S},"__nimg-"+P.src+P.srcSet+P.sizes)})}const j=(0,a.forwardRef)((b,w)=>{const S=!(0,a.useContext)(f.RouterContext),N=(0,a.useContext)(p.ImageConfigContext),R=(0,a.useMemo)(()=>{var J;const oe=_||N||u.imageConfigDefault,le=[...oe.deviceSizes,...oe.imageSizes].sort(($,ee)=>$-ee),se=oe.deviceSizes.sort(($,ee)=>$-ee),ue=(J=oe.qualities)==null?void 0:J.sort(($,ee)=>$-ee);return{...oe,allSizes:le,deviceSizes:se,qualities:ue}},[N]),{onLoad:A,onLoadingComplete:L}=b,O=(0,a.useRef)(A);(0,a.useEffect)(()=>{O.current=A},[A]);const G=(0,a.useRef)(L);(0,a.useEffect)(()=>{G.current=L},[L]);const[M,U]=(0,a.useState)(!1),[Y,X]=(0,a.useState)(!1),{props:W,meta:z}=(0,l.getImgProps)(b,{defaultLoader:h.default,imgConf:R,blurComplete:M,showAltText:Y});return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(v,{...W,unoptimized:z.unoptimized,placeholder:z.placeholder,fill:z.fill,onLoadRef:O,onLoadingCompleteRef:G,setBlurComplete:U,setShowAltText:X,sizesInput:b.sizes,ref:w}),z.priority?(0,s.jsx)(C,{isAppRouter:S,imgAttributes:W}):null]})});(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)})(po,po.exports);var z_=po.exports;(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(l,u){for(var p in u)Object.defineProperty(l,p,{enumerable:!0,get:u[p]})}t(e,{default:function(){return c},getImageProps:function(){return i}});const n=Oe,o=ms,s=z_,a=n._(rd());function i(l){const{props:u}=(0,o.getImgProps)(l,{defaultLoader:a.default,imgConf:process.env.__NEXT_IMAGE_OPTS});for(const[p,m]of Object.entries(u))m===void 0&&delete u[p];return{props:u}}const c=s.Image})(Ju);var F_=Ju;const rn=D.getDefaultExportFromCjs(F_),B_=({item:e,CONSTANTS:t})=>{const n=e.icon?t.PAYMENT_FLAGS.includes(e.icon)?"payment":"social":null,o=n==="payment"?t.PAYMENT_FLAGS_DICTIONARY[e.icon]:e.icon;return e.link?r.jsxs(ze,{href:e.link,target:"_blank",rel:"noopener noreferrer",className:me["support-item"],children:[e.image&&r.jsx("img",{src:e.image,alt:"",loading:"lazy"}),n==="payment"?r.jsx(rn,{alt:o,src:`/assets/${o}.svg`,width:20,height:20}):r.jsx(d.Icon,{size:"small",name:o})]}):r.jsxs("div",{className:me["support-item"],children:[e.image&&r.jsx("img",{src:e.image,alt:"",loading:"lazy"}),n==="payment"?r.jsx(rn,{alt:o,src:`/assets/${o}.svg`,width:20,height:20}):r.jsx(d.Icon,{size:"small",name:o})]})},U_=({content:e,CONSTANTS:t})=>r.jsx("div",{className:me["support-container"],children:e==null?void 0:e.map((n,o)=>r.jsxs("div",{"data-device":n.device,className:me["support-section"],children:[r.jsxs("div",{className:me["support-text"],children:[n.title&&r.jsx("h3",{children:n.title}),n.description&&r.jsx("p",{children:n.description})]}),Array.isArray(n.items)&&n.items.length&&r.jsx("div",{className:me["support-items"],"data-gap":n.gap,children:n.items.map((s,a)=>r.jsx(B_,{item:s,CONSTANTS:t},`footer-support-item-${a}`))})]},`footer-support-${o}`))}),q_=({name:e,nameIcon:t,maxWidth:n,rowAlignContent:o,columnAlignContent:s,columnAlignItems:a,textAlignContent:i,textAlignItems:c,children:l})=>r.jsx(d.TextStructure.Root,{layoutProps:{textRow:{alignContent:o,alignItems:o},columnWrapper:{alignContent:s,alignItems:a}},children:r.jsxs(d.TextStructure.DivWrapper,{alignContent:i,alignItems:c,className:me.footer__column,children:[r.jsxs("div",{className:t?me.footer__columnTitleIcon:me.footer__columnTitle,children:[r.jsx(d.Icon,{name:`${t}`,size:"small"}),e&&r.jsx("div",{children:e})]}),r.jsx("div",{className:me.footer__columnContent,style:{maxWidth:`${n}px`},children:l})]})}),H_=({name:e,nameIcon:t,maxWidth:n,children:o,ICONS:s,...a})=>r.jsxs(d.Accordion.Wrapper,{className:me.accordionWrapper,title:"accordion-wrapper",...a,children:[r.jsx(d.Accordion.Header,{id:(a==null?void 0:a.id)??"",className:me.accordionHeader,closeIndicator:r.jsx(d.Icon,{name:s.arrow_up,size:"medium"}),openIndicator:r.jsx(d.Icon,{name:s.arrow_down,size:"medium"}),title:"accordion-header",children:r.jsx(d.TextStructure.Root,{children:r.jsxs(d.TextStructure.DivWrapper,{className:t?me.accordionTextWrapper:"",children:[r.jsx(d.Icon,{name:`${t}`,size:"medium"}),r.jsx("h2",{className:"typography-style-body-md",children:e})]})})}),r.jsx(d.Accordion.Body,{title:"accordion-body",children:r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{className:me.footer__columnContent,style:{maxWidth:`${n}px`},children:o})})})]}),Vr=e=>{const{isMobile:t}=ne();return t?r.jsx(H_,{...e}):r.jsx(q_,{...e})},Tn=({type:e,children:t,className:n,collumnName:o,collumnNameIcon:s,icons:a,iconLink:i,iconSize:c,link:l,paymentDisclaimer:u,paymentTitle:p,rowAlignContent:m,columnAlignContent:f,columnAlignItems:h,textAlignContent:_,textAlignItems:y,...x})=>{let v;const{handleSelectContent:C}=ae(),{nextimage:j}=ce();switch(e){case"menu":v=r.jsx(ze,{className:me.footer__itemLink,href:l??"#",prefetch:!1,children:r.jsx("span",{onClick:()=>{C({content:`footer:${o}:${t}`})},children:t})});break;case"payment":v=r.jsxs("div",{className:d.helpers.classNameConcat(me.payment,me.footer__itemSmallText),...x,children:[u,r.jsxs("div",{className:d.helpers.classNameConcat(me.footer__iconContainer,me.footer__iconListSubHeader),children:[p,r.jsx("div",{className:me.footer__iconList,children:a==null?void 0:a.map((b,w)=>r.jsx(j,{alt:b,src:`/assets/${b}.svg`,width:c??20,height:c??20},w))})]})]});break;case"social-media":v=r.jsx("div",{className:me.footer__iconContainer,...x,children:r.jsx("div",{className:me.footer__iconList,children:i==null?void 0:i.map((b,w)=>r.jsx(ze,{prefetch:!1,href:b.link??"#",target:"_blank",children:r.jsx(d.Icon,{size:"medium",name:b.icon,onClick:()=>C({content:`footer:redes-sociais:${b.icon}`})})},w))})});break;default:v=r.jsx("div",{className:n,...x,children:t})}return r.jsx(d.TextStructure.Root,{layoutProps:{textRow:{alignContent:m,alignItems:m},columnWrapper:{alignContent:f,alignItems:h}},...x,children:r.jsx(d.TextStructure.DivWrapper,{alignContent:_,alignItems:y,className:d.helpers.classNameConcat(me.footer__item,n),children:v})})},V_=({className:e,text:t,...n})=>r.jsx("div",{...n,className:d.helpers.classNameConcat(me.footer__legalInformation,e),children:r.jsx("span",{children:t})}),od=()=>{const{nextimage:e}=ce();return r.jsx("div",{className:me["footer--stamps"],children:r.jsx(e,{alt:"Empresa B",className:me["footer--stamps--company"],src:"/images/Footer/new_certfB.png",width:56,height:64})})};od.displayName="Footer.Stamps";const sd=({children:e,legalTextSlot:t,adornment:n,className:o,...s})=>{const{isMobile:a}=ne(),i=g.Children.toArray(e).filter(Boolean),c=i.length;return r.jsxs("div",{className:me.footer__main,children:[(n==null?void 0:n.top)&&r.jsx("div",{className:me.footer__top,children:n==null?void 0:n.top}),c>0&&r.jsx("div",{...s,className:d.helpers.classNameConcat(me.footer__wrapper,o),children:i.map((l,u)=>r.jsx("div",{style:{flexGrow:1,maxWidth:`calc(100% / ${a?1:"fit-content"})`},children:l},u))}),(n==null?void 0:n.bottom)&&r.jsx("div",{className:me.footer__bottom,children:n.bottom}),t&&r.jsx("div",{className:me.footer__legalText,children:t})]})};sd.displayName="Footer.Wrapper";const ad=({data:{links:{links:e}},payments:t,socialInfo:n,socialMedias:o,adornment:s,LEGAL_INFORMATION_TEXT:a,ICONS:i,className:c,hasFooterStamps:l})=>{var u;return r.jsxs(sd,{className:c,adornment:s,legalTextSlot:r.jsx(V_,{text:a}),children:[Array.isArray(e.column)&&e.column.map((p,m)=>r.jsx(Vr,{id:`${m}column-menu`,name:p.name,nameIcon:p.nameIcon,ICONS:i,children:p.items.map((f,h)=>r.jsx(Tn,{type:"menu",link:f.link,collumnName:p.name,collumnNameIcon:p.nameIcon,children:f.text},h))},m)),t&&((u=t.acceptedFlags)==null?void 0:u.length)>0&&r.jsx(Vr,{id:"payment-column",name:t==null?void 0:t.title,nameIcon:t==null?void 0:t.titleIcon,maxWidth:150,ICONS:i,children:r.jsx(Tn,{type:"payment",paymentDisclaimer:t==null?void 0:t.text,paymentTitle:t==null?void 0:t.flagsTitle,iconSize:16,icons:t==null?void 0:t.acceptedFlags})}),r.jsxs(Vr,{id:"social-media-column",name:n==null?void 0:n.title,ICONS:i,children:[n!=null&&n.subTitle?r.jsx(Tn,{children:n==null?void 0:n.subTitle}):null,r.jsx(Tn,{type:"social-media",iconSize:24,iconLink:o}),l&&r.jsx(od,{})]})]})};ad.displayName="Footer";const W_=Object.freeze(Object.defineProperty({__proto__:null,Footer:ad,FooterSupport:U_},Symbol.toStringTag,{value:"Module"})),G_="_header_9xxjk_57",K_="_actions_9xxjk_131",X_="_breadcrumb_9xxjk_142",Y_="_credits_9xxjk_157",Q_="_pdplinks_9xxjk_185",Z_="_similars_9xxjk_212",J_="_sizes_9xxjk_251",eg="_measurementTable_9xxjk_267",tg="_measurementHead_9xxjk_280",ng="_measurementRows_9xxjk_285",rg="_measurementRowsTitle_9xxjk_302",og="_measurementRowsText_9xxjk_314",sg="_measurementImage_9xxjk_325",ag="_measurementImageContainer_9xxjk_328",ig="_measurementContent_9xxjk_337",cg="_measurementTitle_9xxjk_341",lg="_measurementClose_9xxjk_352",ug="_productref_9xxjk_417",dg="_slideOut_9xxjk_1",mg="_slideIn_9xxjk_1",pg="_content_9xxjk_397",fg="_pdp_9xxjk_185",hg="_divider_9xxjk_575",Z={"bottom-navigation":"_bottom-navigation_9xxjk_1","bottom-navigation__credits-modifier":"_bottom-navigation__credits-modifier_9xxjk_18","bottom-navigation__header":"_bottom-navigation__header_9xxjk_21","bottom-navigation__header-content":"_bottom-navigation__header-content_9xxjk_26","golden-tag-content":"_golden-tag-content_9xxjk_45","bottom-navigation__price-and-promo":"_bottom-navigation__price-and-promo_9xxjk_48",header:G_,"golden-tag":"_golden-tag_9xxjk_45","golden-tag-video":"_golden-tag-video_9xxjk_86","golden-tag-content-text":"_golden-tag-content-text_9xxjk_105",actions:K_,"add-to-cart":"_add-to-cart_9xxjk_138",breadcrumb:X_,"breadcrumb--active":"_breadcrumb--active_9xxjk_147",credits:Y_,"gallery-carousel-modifier":"_gallery-carousel-modifier_9xxjk_162",pdplinks:Q_,"links-wrapper":"_links-wrapper_9xxjk_195",similars:Z_,"similars-info":"_similars-info_9xxjk_224","toggle-style-modifier":"_toggle-style-modifier_9xxjk_233","accessibility-info":"_accessibility-info_9xxjk_237",sizes:J_,"price-wrapper":"_price-wrapper_9xxjk_263",measurementTable:eg,measurementHead:tg,measurementRows:ng,measurementRowsTitle:rg,measurementRowsText:og,measurementImage:sg,measurementImageContainer:ag,measurementContent:ig,measurementTitle:cg,measurementClose:lg,"tabs-root-modifier":"_tabs-root-modifier_9xxjk_358","tabs-list-modifier":"_tabs-list-modifier_9xxjk_376","tabs-item-modifier":"_tabs-item-modifier_9xxjk_393","content-wrapper":"_content-wrapper_9xxjk_397",productref:ug,"tabs-panel":"_tabs-panel_9xxjk_428","tabs-panel-exit":"_tabs-panel-exit_9xxjk_434",slideOut:dg,"tabs-panel-enter":"_tabs-panel-enter_9xxjk_438",slideIn:mg,content:pg,pdp:fg,"pdp-main":"_pdp-main_9xxjk_496","pdp-main__gallery-wrapper":"_pdp-main__gallery-wrapper_9xxjk_501","pdp-main__info":"_pdp-main__info_9xxjk_518","pdp-main__info-main-content":"_pdp-main__info-main-content_9xxjk_533","pdp-main__info-subsection":"_pdp-main__info-subsection_9xxjk_533","subsection-product-info":"_subsection-product-info_9xxjk_544","subsection-similars":"_subsection-similars_9xxjk_547","subsection-sizes":"_subsection-sizes_9xxjk_550","subsection-actions":"_subsection-actions_9xxjk_553","pdp-main__info-secondary-content":"_pdp-main__info-secondary-content_9xxjk_557","sections-title":"_sections-title_9xxjk_563",divider:hg,"breadcrumbs-desktop":"_breadcrumbs-desktop_9xxjk_580","breadcrumbs-mobile":"_breadcrumbs-mobile_9xxjk_589"},_g=({children:e,link:t,TOGGLE_STYLE_MODIFIER:n})=>{const{isMobile:o}=ne(),{router:s}=ce(),a=()=>{t&&s.push(t)},i=g.useRef(null);return r.jsx(d.ToggleStyle.Wrapper,{size:o?"medium":"small",style:{...n,border:`${i.current===t?"2":"1"}`,overflow:"hidden",padding:"0"},onClick:a,active:i.current===t,children:e})},id=({productId:e,similars:t,TOGGLE_STYLE_MODIFIER:n})=>{const{thumbImage:o}=Me(),s=[{productId:e,slug:"",textureImage:(o==null?void 0:o.imageUrl)??"",textureAlt:(o==null?void 0:o.imageText)??""},...t];return r.jsx("div",{children:s.map((a,i)=>a.textureImage?r.jsxs(_g,{link:a.slug?a.slug:null,TOGGLE_STYLE_MODIFIER:n,children:[r.jsx(d.ToggleStyle.DisabledAdornment,{}),r.jsx(d.ToggleStyle.Texture,{children:r.jsx(Pe.Image,{alt:a.textureAlt,src:a.textureImage,height:34,width:34,style:{borderRadius:0,height:"100%"}})})]},`similars-item-${i}`):null)})},gg=({children:e,storeId:t,productId:n,PDP_INFO:o,TEXTURE_IMAGE:s,TOGGLE_STYLE_MODIFIER:a})=>{const{items:i,loadSimilars:c}=as(n,{filterTexture:s,storeId:t});return g.useEffect(()=>{c()},[c]),r.jsxs("div",{className:Z.similars,children:[r.jsxs("div",{className:Z["similars-info"],children:[r.jsx("span",{className:Z["sections-title"],children:o.product.color_title}),e]}),r.jsx(id,{productId:n,similars:i,TOGGLE_STYLE_MODIFIER:a})]})},yg=()=>{const{colorName:e}=Me();return r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{className:e.length===0?"":Z["accessibility-info"],children:r.jsx("p",{children:e})})})},ur=({className:e,titleId:t})=>{var s,a,i;const{productName:n,tag:o}=Me();return r.jsxs("div",{className:d.helpers.classNameConcat(Z.header,e),children:[o!=null&&o.commercial?r.jsx(d.Tag,{size:"small",title:(s=o.commercial)==null?void 0:s.value,variant:"quaternary",adornment:{start:(a=o.commercial)!=null&&a.icon?r.jsx(d.Icon,{name:o.commercial.icon}):null},children:(i=o.commercial)==null?void 0:i.value}):null,r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{children:r.jsx("h1",{id:t,children:n})})})]})};ur.displayName="PDP.PDPHeader";const ps=({layout:e="horizontal"})=>{const{price:t,listPrice:n,installments:o}=Me(),{count:s,value:a}=o,i=D.formatPriceToCurrency(n??0,!0),c=D.formatPriceToCurrency(t??0,!0),l=D.formatPriceToCurrency(a??0);return r.jsx(d.ProductInfo.Root,{size:"small",layout:e,children:r.jsxs(d.ProductInfo.Wrapper,{layout:e,size:"small",className:Z["price-wrapper"],children:[r.jsx(d.ProductInfo.ValuesWrapper,{children:t!==n?r.jsxs(r.Fragment,{children:[r.jsx(d.ProductInfo.Price,{label:"originalPrice",value:i.toString(),size:"small"}),r.jsx(d.ProductInfo.Price,{label:"discountPrice",value:c.toString(),size:"small"})]}):r.jsx(d.ProductInfo.Price,{label:"defaultPrice",value:c.toString(),size:"small"})}),s&&s>1&&a?r.jsx(d.ProductInfo.Price,{label:"installment",value:`ou ${s}x ${l}`,size:"small"}):null]})})},fo=({onAddCallBack:e,onDisabledClickCallBack:t,addToCartBtnSize:n,BUY_BUTTON_LABELS:o})=>{const s=cn(),{productId:a,productData:i,price:c,listPrice:l,thumbImage:u,isKit:p}=Me(),{isMobile:m}=ne(),{addToCart:f}=ve(),{sendDataLayerEvent:h}=ae(),_=!p&&(!s.sku||!s.available),y=()=>{if(_&&typeof t=="function"){t();return}typeof e=="function"&&e({id:s.sku,quantity:s.quantity,seller:s.sellerId,sku:a}),f({id:s.sku,quantity:s.quantity,seller:s.sellerId},{id:a,texture:u==null?void 0:u.imageUrl}),h({functionKey:"skuEvents",data:{event:"add_to_cart",commonData:{products:[{...i,price:c,listPrice:l}]},supportData:{selectedSkus:[s]},customData:{quantity:s.quantity}}})};return r.jsx(d.Button,{className:Z["add-to-cart"],size:m?(n==null?void 0:n.mobile)??"large":(n==null?void 0:n.desktop)??"x-large",onClick:y,children:s.sku&&s.available?`${o.add_to_cart}`:`${o.select_size}`})},xg=({addToCartBtnSize:e,BUY_BUTTON_LABELS:t})=>{const{isMobile:n}=ne(),o=cn(),{sizesContainerRef:s}=Ha(),{structureRef:a}=Ne();return o.sku&&o.available?r.jsx(fo,{addToCartBtnSize:e,BUY_BUTTON_LABELS:t}):r.jsx(d.Button,{className:Z["add-to-cart"],size:n?(e==null?void 0:e.mobile)??"large":(e==null?void 0:e.desktop)??"x-large",onClick:()=>{s.current&&a.current&&window.document.body.scrollTo({top:s.current.offsetTop-a.current.offsetHeight,behavior:"smooth"})},children:o.sku&&o.available?t.add_to_cart:t.select_size})},An=({value:e,label:t,suppressHydrationWarning:n=!1},o)=>{const s={value:e,...n&&{suppressHydrationWarning:!0}},a=o==="compact"?s:{...s,label:t};return r.jsx(d.Timer.Digit,{...a})},Vn=({dateEnd:e,dateInit:t,type:n="default",TIME_ZONE:o,...s})=>{const[a,i]=g.useState(Pc(new eo.TZDate(Date.now(),o),new eo.TZDate(e,o))),[c,l]=g.useState(!1);if(g.useEffect(()=>{l(!0);const h=setInterval(()=>{i(_=>_<=0?(clearInterval(h),0):_-1e3)},1e3);return()=>clearInterval(h)},[]),!c||a<=0)return r.jsx(r.Fragment,{});const u=Xt(a,"days"),p=Xt(a,"hours"),m=Xt(a,"minutes"),f=Xt(a);return r.jsxs(d.Timer.Root,{...s,children:[u?r.jsxs(r.Fragment,{children:[An({value:u,label:"dias"},n),r.jsx(d.Timer.Separator,{})]}):null,An({value:p,label:"horas"},n),r.jsx(d.Timer.Separator,{}),An({value:m,label:"min"},n),r.jsx(d.Timer.Separator,{}),An({value:f,label:"segs",suppressHydrationWarning:!0},n)]})},fs=({TIME_ZONE:e})=>{const{tag:t}=Me(),n=t==null?void 0:t.flagGoldenPdp,o=g.useMemo(()=>{var s;if((s=n==null?void 0:n.tagImage)!=null&&s.includes("player.vimeo")){const a=n.tagImage.split("?")[1],i=a==null?void 0:a.split("&"),c=i==null?void 0:i.filter(u=>u.includes("loc")||u.includes("signature")||u.includes("user_id")),l=c==null?void 0:c.join("&");return`${n.tagImage.split("?")[0]}?${l}`}return n==null?void 0:n.tagImage},[n==null?void 0:n.tagImage]);return n!=null&&n.enableTag?r.jsxs("div",{className:Z["golden-tag"],style:(n==null?void 0:n.backgroundSelect)==="color"?{backgroundColor:n==null?void 0:n.backgroundColor}:(n==null?void 0:n.backgroundSelect)==="image"?{backgroundImage:`url(${n==null?void 0:n.tagImage})`}:void 0,children:[(n==null?void 0:n.backgroundSelect)==="video"&&r.jsx("div",{className:Z["golden-tag-video"],children:r.jsx(Pe.Video,{src:o,autoPlay:!0,muted:!0,loop:!0,playsInline:!0})}),r.jsxs("div",{className:Z["golden-tag-content"],children:[r.jsx("span",{className:Z["golden-tag-content-text"],style:{color:n==null?void 0:n.textColor},children:n==null?void 0:n.value}),(n==null?void 0:n.countDownEndDate)&&r.jsx(Vn,{mode:n==null?void 0:n.timerMode,size:"x-small",type:"compact",dateEnd:new Date((n==null?void 0:n.countDownEndDate)??""),TIME_ZONE:e})]})]}):null};fs.displayName="PDP.GoldenTag";const vg=({addToCartBtnSize:e,BUY_BUTTON_LABELS:t,TIME_ZONE:n,Z_INDEX_WAR:o})=>{const{isMobile:s}=ne();return s?r.jsxs(d.Card,{className:Z["bottom-navigation"],shadow:!0,style:{zIndex:o.pdp_bottom_navigation},children:[r.jsxs("div",{className:Z["bottom-navigation__header"],children:[r.jsx(fs,{TIME_ZONE:n}),r.jsxs("div",{className:Z["bottom-navigation__header-content"],children:[r.jsx(ur,{}),r.jsx(ps,{layout:"name-vertical"})]})]}),r.jsx(xg,{addToCartBtnSize:e,BUY_BUTTON_LABELS:t})]}):null},bg=({children:e,setShowBottomNavigation:t})=>{const n=g.useRef(null),o=Lo(n),s=g.useRef(o);return g.useEffect(()=>{var i;const{top:a}=((i=n.current)==null?void 0:i.getBoundingClientRect())??{top:0};s.current!==o&&a>0&&(t(!o),s.current=o)},[o]),r.jsx("div",{ref:n,style:{width:"100%"},children:e})},jg=({ICONS:e})=>{const{isMobile:t}=ne(),{price:n,listPrice:o,productData:s,productId:a}=Me(),{sendDataLayerEvent:i}=ae(),c=Ut(),{toggleProduct:l}=Tt();return r.jsx(d.Button,{adornment:{start:r.jsx(d.Icon,{name:e[c.includes(a)?"favorite_true":"favorite_false"],size:"medium"})},className:Z["add-to-wishlist"],size:t?"medium":"x-large",variant:"tertiary",onClick:()=>{l(a),i({functionKey:"productEvents",data:{event:c.includes(a)?"remove_from_wishlist":"add_to_wishlist",outsideEcommerceData:{region:"PDP"},commonData:{...s,price:n,listPrice:o}}})}})},cd=({showWishlist:e=!0,callBack:t,addToCartBtnSize:n,BUY_BUTTON_LABELS:o,ICONS:s,TIME_ZONE:a,Z_INDEX_WAR:i})=>{const{isMobile:c}=ne(),[l,u]=g.useState(!0);return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:Z.actions,children:[c?r.jsx(bg,{setShowBottomNavigation:u,children:r.jsx(fo,{onAddCallBack:t,addToCartBtnSize:n,BUY_BUTTON_LABELS:o})}):r.jsx(fo,{onAddCallBack:t,addToCartBtnSize:n,BUY_BUTTON_LABELS:o}),e&&r.jsx(jg,{ICONS:s})]}),c&&l&&r.jsx(vg,{addToCartBtnSize:n,BUY_BUTTON_LABELS:o,Z_INDEX_WAR:i,TIME_ZONE:a})]})},ld=({className:e,device:t,ICONS:n})=>{const{breadcrumbList:o,productName:s}=Me(),a=i=>i.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"");return r.jsx(d.BreadCrumb.DivWrapper,{className:d.helpers.classNameConcat(Z.breadcrumb,[t==="mobile"?Z["breadcrumbs-mobile"]:Z["breadcrumbs-desktop"],e]),children:r.jsxs(d.BreadCrumb.List,{children:[Array.isArray(o)&&o.map((i,c)=>{const l=a(o.slice(0,c+1).map(u=>u.replace(/\s/g,"-").toLowerCase()).join("/"));return r.jsx(d.BreadCrumb.Item,{adornment:{end:r.jsx(d.Icon,{name:n.arrow_right})},role:"listitem",children:r.jsx(ze,{href:`/${l}`,children:i})},`pdp-breadcrumb-${l}-${c}`)}),r.jsx(d.BreadCrumb.Item,{role:"listitem",className:d.helpers.classNameConcat(Z["breadcrumb--active"],e),children:s},"pdp-breadcrumb-productName")]})})};ld.displayName="PDP.BreadCrumb";const ud=({className:e})=>{var o;const{tag:t}=Me(),n=t==null?void 0:t.flagPdp;return n&&((o=n==null?void 0:n.value)!=null&&o.length)?r.jsx(d.Tag,{className:d.helpers.classNameConcat(Z.credits,e),variant:"tertiary",title:n==null?void 0:n.value,size:"small",adornment:{start:n!=null&&n.enableIcon&&(n!=null&&n.icon)?r.jsx(d.Icon,{name:n==null?void 0:n.icon,style:{color:n==null?void 0:n.iconColor}}):null},style:{background:n==null?void 0:n.tagColor,color:n==null?void 0:n.textColor},children:n==null?void 0:n.value}):r.jsx(r.Fragment,{})};ud.displayName="PDPCredits";const Cg=()=>{const{descriptionContent:e,productReference:t}=Me(),[n,o]=g.useState("description");return r.jsxs(d.Tabs.Root,{className:Z["tabs-root-modifier"],children:[r.jsx(d.Tabs.TabList,{className:Z["tabs-list-modifier"],children:e==null?void 0:e.map(({label:s,value:a})=>r.jsx(d.Tabs.Item,{label:s,value:a,activeTab:n,onTabChange:o,size:"large",className:`${Z["tabs-item-modifier"]} ${n===a?Z["tabs-item-active"]:""}`},a))}),r.jsxs("div",{className:Z["content-wrapper"],children:[n==="description"?r.jsx("div",{children:r.jsxs("span",{className:Z.productref,children:["Ref:",t]})}):"",e==null?void 0:e.map(({value:s,content:a})=>n===s?r.jsx(d.Tabs.Panel,{className:`${Z["tabs-panel"]} ${n===s?Z["tabs-panel-enter"]:Z["tabs-panel-exit"]}`,children:r.jsx("div",{className:Z.content,dangerouslySetInnerHTML:{__html:a}})},s):null)]})]})},Sg=({CURRENCY:e,DELIVERY_INFO_BOXES_ALLOWED:t,FREIGHT_CALCULATION:n,Z_INDEX_WAR:o})=>{const s=cn(),{isMobile:a}=ne();return r.jsxs(r.Fragment,{children:[a?r.jsx(d.Utils.Divider,{direction:"horizontal",size:"small"}):null,r.jsx(Eu,{skuId:s.available?s.sku:"",size:a?n.inputSize.mobile:n.inputSize.desktop,quantity:s.quantity,sellerId:s.sellerId,seller:s.sellerName,local:"PDP",CONSTANTS_PROPS:{freightConfig:n,deliveryInfoBoxesAllowed:t,toolTipZIndex:o.modal,currency:e}}),a?r.jsx(d.Utils.Divider,{direction:"horizontal",size:"small"}):null]})},ba=({image:e,index:t,handleZoom:n,PRODUCT_IMAGE_DIMENSIONS:o})=>{const s=D.resizingImg(e.imageUrl,o.pdp),{nextimage:a}=ce();return r.jsx(a,{src:s,alt:e.imageLabel,objectFit:"contain",...o.pdp,...t<=1&&{priority:!0,loading:"eager"},onClick:()=>{n(t)}},t)},wg=({video:e,productName:t,poster:n})=>{const{sendDataLayerEvent:o}=ae(),s=g.useRef(!1);return r.jsx(Pe.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:n})},dd=({images:e,video:t,handleZoom:n,productName:o,PRODUCT_IMAGE_DIMENSIONS:s})=>{var u,p;const{initialize:a,pagination:i,controller:c,itemsStyles:l}=d.Carousel.useCarousel({gap:0,itemsPerPage:1,loop:!1,direction:"row"});return r.jsxs(d.Carousel.Root,{innerRef:m=>{a(m)},className:Z["gallery-carousel-modifier"],children:[r.jsx(d.Carousel.Controller,{position:"absolute",top:"24px",bottom:"unset",left:"16px",children:r.jsx(d.Carousel.Bullets,{page:i.currentPage,total:e.length,onBulletClick:m=>c==null?void 0:c.navigateTo(m)})}),r.jsxs(d.Carousel.Body,{children:[r.jsx(d.Carousel.Item,{style:l,children:r.jsx(ba,{image:e[0],index:0,handleZoom:n,PRODUCT_IMAGE_DIMENSIONS:s})},"PDP_gallery_0"),t&&r.jsx(d.Carousel.Item,{style:l,children:r.jsx(wg,{video:t,productName:o,...((u=e[1])==null?void 0:u.imageUrl)&&{poster:(p=e[1])==null?void 0:p.imageUrl}})},"PDP_gallery_video"),e.map((m,f)=>f===0?null:r.jsx(d.Carousel.Item,{style:l,children:r.jsx(ba,{image:m,index:f,handleZoom:n,PRODUCT_IMAGE_DIMENSIONS:s})},`PDP_gallery_${f}`))]})]})};dd.displayName="PDP.Carousel";const Pg="_thumbs_1fbzz_65",Ng="_selected_1fbzz_93",Eg="_carousel_1fbzz_162",Ig="_bullets_1fbzz_199",we={"image-zoom-wrapper-desktop":"_image-zoom-wrapper-desktop_1fbzz_1","button-close-container":"_button-close-container_1fbzz_10","button-close":"_button-close_1fbzz_10","main-image-container":"_main-image-container_1fbzz_22","image-desktop":"_image-desktop_1fbzz_52",thumbs:Pg,selected:Ng,"image-zoom-wrapper-mobile":"_image-zoom-wrapper-mobile_1fbzz_115","image-mobile":"_image-mobile_1fbzz_145","image-zoom--image":"_image-zoom--image_1fbzz_159",carousel:Eg,"carousel-controller":"_carousel-controller_1fbzz_167","arrow-left":"_arrow-left_1fbzz_177","arrow-right":"_arrow-right_1fbzz_178",bullets:Ig,"zoom-popup":"_zoom-popup_1fbzz_210","image-zoom--mobile":"_image-zoom--mobile_1fbzz_250","image-zoom--image--img":"_image-zoom--image--img_1fbzz_280"},ja=({onClose:e,ICONS:t})=>r.jsx("div",{className:`${we["button-close-container"]}`,children:r.jsx(d.Button,{iconNameStart:t.close,iconSize:"medium",className:`${we["button-close"]}`,variant:"tertiary",state:"default",size:"medium",onClick:e,style:{textDecoration:"none"}})}),Rg=({children:e,Z_INDEX_WAR:t,...n})=>r.jsx("div",{...n,className:we["image-zoom-wrapper-desktop"],style:{zIndex:t.pdp_image_zoom},children:e}),md=({images:e,setCurrent:t,setFirstImgLoaded:n,ICONS:o,PRODUCT_IMAGE_DIMENSIONS:s})=>{const{nextimage:a}=ce();let i=null;const c=g.useRef(null),{initialize:l,controller:u,pagination:p,itemsStyles:m}=d.Carousel.useCarousel({itemsPerPage:1,gap:10,loop:!1,direction:"row"}),f=_=>{u==null||u.navigateTo(_)},h=()=>{n(!0)};return g.useEffect(()=>{t(p.currentPage)},[p.currentPage,t]),r.jsxs(d.Carousel.Root,{innerRef:_=>{_&&!i&&(i=_,l(i))},className:we.carousel,children:[r.jsxs(d.Carousel.Controller,{className:we["carousel-controller"],children:[r.jsx(d.Button,{variant:"tertiary",onClick:()=>u==null?void 0:u.prevPage(),className:we["arrow-left"],adornment:{start:r.jsx(d.Icon,{name:o.arrow_left})}}),r.jsx(d.Button,{variant:"tertiary",onClick:()=>u==null?void 0:u.nextPage(),className:we["arrow-right"],adornment:{start:r.jsx(d.Icon,{name:o.arrow_right})}})]}),r.jsx(d.Carousel.Body,{children:Array.isArray(e)&&e.map((_,y)=>r.jsx(d.Carousel.Item,{style:m,children:r.jsx(a,{...s.image_zoom.mobile,...y===0&&{priority:!0,loading:"eager"},ref:c,className:we.imageMobile,src:_.imageUrl,alt:_.imageText,quality:100,...y===0&&{onLoad:h}})},y))}),r.jsx(d.Carousel.Bullets,{className:we.bullets,page:p.currentPage,total:p.totalPages,onBulletClick:f})]})};md.displayName="ImageZoom.Mobile.Carousel";const pd=({imgRef:e,image:t,PRODUCT_IMAGE_DIMENSIONS:n})=>{Za();const{nextimage:o}=ce();return r.jsx("div",{className:we["image-zoom--image"],ref:e,children:r.jsx(o,{...n.image_zoom.mobile,alt:t.imageText,className:we["image-zoom--image--img"],quality:100,src:t.imageUrl})})};pd.displayName="ImageZoom.ImageZoom";const fd=({loaded:e=!1})=>r.jsx("div",{className:we["zoom-popup"],"data-loaded":e,children:r.jsxs("svg",{width:"38",height:"39",viewBox:"0 0 38 39",xmlns:"http://www.w3.org/2000/svg",children:[r.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.93 5.382a3.711 3.711 0 0 1 2.55-1.007c.949 0 1.864.36 2.549 1.007a3.534 3.534 0 0 1 1.113 2.472v11.357l10.118 3.332c.587.193 1.1.56 1.465 1.053.366.494.565 1.089.566 1.7v.004c0 .22-.025.44-.075.653v.005l-2.98 12.52a.625.625 0 0 1-1.215-.29l2.977-12.515v-.002c.029-.122.043-.247.044-.372a1.619 1.619 0 0 0-.321-.958 1.729 1.729 0 0 0-.851-.61L24.32 20.257a.625.625 0 0 1-.43-.594V7.88a2.285 2.285 0 0 0-.72-1.59 2.462 2.462 0 0 0-1.691-.665c-.635 0-1.241.24-1.69.666a2.285 2.285 0 0 0-.722 1.59v19.04a.625.625 0 0 1-1.115.388l-.056-.071-.161-.202a178.922 178.922 0 0 0-2.333-2.858l-.002-.002a2.581 2.581 0 0 0-.897-.69 2.677 2.677 0 0 0-1.122-.25H12.37c-.307 0-.61.078-.874.225a1.712 1.712 0 0 0-.635.61 1.625 1.625 0 0 0-.016 1.653l7.128 12.296a.625.625 0 0 1-1.082.627L9.762 26.35a2.876 2.876 0 0 1 .027-2.924 2.962 2.962 0 0 1 1.098-1.057 3.05 3.05 0 0 1 1.482-.384h1.016c.57.002 1.133.127 1.648.368.515.24.97.59 1.33 1.024.514.614 1.026 1.239 1.455 1.768V7.855a3.535 3.535 0 0 1 1.113-2.473ZM6.446 10.22a.625.625 0 0 1 0 .884l-5.324 5.324a.625.625 0 0 1-.884-.884l5.324-5.324a.625.625 0 0 1 .884 0Z"}),r.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M.68 12.033c.345 0 .625.28.625.625v2.703h2.702a.625.625 0 1 1 0 1.25H.68a.625.625 0 0 1-.625-.625v-3.328c0-.345.28-.625.625-.625ZM16.429.237a.625.625 0 0 1 0 .884l-5.325 5.324a.625.625 0 0 1-.884-.883L15.545.237a.625.625 0 0 1 .884 0Z"}),r.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.034.68c0-.346.28-.626.625-.626h3.328c.345 0 .625.28.625.625v3.328a.625.625 0 1 1-1.25 0V1.304h-2.703a.625.625 0 0 1-.625-.625Z"})]})});fd.displayName="ImageZoom.ZoomPopup";const hd=({images:e,ICONS:t,PRODUCT_IMAGE_DIMENSIONS:n,...o})=>{const[s,a]=g.useState(!1),[i,c]=g.useState(0),{containerRef:l,imgRef:u,scale:p}=Ja({defaultScale:1,maxScale:3});return r.jsxs("div",{...o,className:we["image-mobile"],"data-disable-carrousel-pan":p>1,children:[r.jsx(fd,{loaded:s}),r.jsx(md,{images:e,setCurrent:c,setFirstImgLoaded:a,ICONS:t,PRODUCT_IMAGE_DIMENSIONS:n}),r.jsx("div",{className:we["image-zoom--mobile"],ref:l,children:r.jsx(pd,{imgRef:u,image:e[i],PRODUCT_IMAGE_DIMENSIONS:n})})]})};hd.displayName="ImageZoom.ImageMobile";const Tg=({children:e,Z_INDEX_WAR:t,...n})=>r.jsx("div",{...n,className:we["image-zoom-wrapper-mobile"],style:{zIndex:t.pdp_image_zoom},children:e}),Ag="_modal_1u87b_1",ot={modal:Ag,"quick-shop__modal":"_quick-shop__modal_1u87b_4","shop-bag":"_shop-bag_1u87b_9","modal-product-body":"_modal-product-body_1u87b_25","pdp-main__info-modifier":"_pdp-main__info-modifier_1u87b_32","modal-header":"_modal-header_1u87b_38","modal-header__title":"_modal-header__title_1u87b_41"};function kg({headerTitle:e,isMobile:t,ICONS:n}){return r.jsx(d.Modal.Header,{navigation:"top",className:ot["modal-header"],children:r.jsxs(d.Modal.Controls,{navigation:"top",isMobile:t,children:[r.jsx("div",{className:ot["modal-header__title"],children:r.jsx(d.Modal.Title,{navigation:"top",className:ot["quick-shop__title"],title:e})}),r.jsx(d.Button,{className:ot["modal-header__close-button"],"data-close":!0,iconNameStart:n.close,size:"small",variant:"tertiary"})]})})}const _d=({PDP_INFO:e,PLP_SIZE_ORDER:t,ICONS:n,NEWSLETTER_CONFIGS:o,NOTIFY_INFO:s,PRODUCT_CARD_TEXTS:a,Z_INDEX_WAR:i})=>{const{sizes:c,productId:l,handleViewItemEvent:u}=Me(),p=g.useMemo(()=>c!=null&&c.length?hl({items:c,getLabel:b=>b.value,PLP_SIZE_ORDER:t}):[],[c]),{sizesContainerRef:m}=Ha(),{isMobile:f}=ne(),h=cn(),_=Li(),{setValue:y}=Ai(),{setValue:x}=Bo(),v=g.useRef({}),[C,j]=g.useState(null);return r.jsxs("div",{ref:m,className:d.helpers.classNameConcat(Z.sizes,"PDP_sizes"),children:[r.jsx("span",{className:Z["sections-title"],children:e.product.size_title}),r.jsx("div",{children:p.map(b=>(!b.available&&!v.current[b.value]&&(v.current[b.value]={disable:!b.available,size:b.value,skuID:b.sku}),r.jsxs(d.ToggleSize.Wrapper,{size:f?"medium":"large",title:b.value,outOfStock:!b.available,onClick:()=>{b.available||(j({skuID:b.sku,size:b.value,disable:!0}),x(!0)),h.sku!==b.sku&&(y({...h,productId:l,name:b.name,size:b.value,sku:b.sku,sellerId:b.sellerId,sellerName:b.sellerName,available:b.available}),u({sku:b.sku,size:b.value}))},active:h.sku===b.sku,children:[r.jsx(d.ToggleSize.DisabledAdornment,{title:"disabled-adornment-texture"}),r.jsx(d.ToggleSize.Text,{children:b==null?void 0:b.value})]},`sizes-${b.sku}-${b.value}`)))}),r.jsx(Jo,{open:_,setVisible:x,sku:C,setSku:j,skus:Object.values(v.current),ICONS:n,NEWSLETTER_CONFIGS:o,NOTIFY_INFO:s,PRODUCT_CARD_TEXTS:a,Z_INDEX_WAR:i})]})},Yt=({children:e,className:t,type:n})=>r.jsx("div",{className:d.helpers.classNameConcat(Z["pdp-main__info-subsection"],[Z[`subsection-${n}`],t]),children:e}),gd=({children:e,className:t})=>{const{structureRef:n,tipbarRef:o}=Ne(),s=g.useMemo(()=>{var c,l;const a=((c=n.current)==null?void 0:c.clientHeight)||0,i=((l=o.current)==null?void 0:l.clientHeight)||0;return a+i},[n,o]);return r.jsx("div",{className:d.helpers.classNameConcat(Z["pdp-main__info"],t),id:"pdpmaininfo",style:{top:s},children:e})},yd=({storeId:e,TEXTURE_IMAGE:t,TOGGLE_STYLE_MODIFIER:n})=>{const{productId:o}=Me(),{items:s,loadSimilars:a}=as(o,{filterTexture:t,storeId:e});return g.useEffect(()=>{a()},[a]),r.jsxs("div",{className:Z.similars,children:[r.jsx("span",{className:Z["sections-title"],children:"Cor"}),r.jsx(id,{productId:o,similars:s,TOGGLE_STYLE_MODIFIER:n})]})};yd.displayName="PDP.Info.Similars";const Og=({callBackProductAdded:e,BUY_BUTTON_LABELS:t,ICONS:n,NEWSLETTER_CONFIGS:o,NOTIFY_INFO:s,PDP_INFO:a,PLP_SIZE_ORDER:i,PRODUCT_CARD_TEXTS:c,TEXTURE_IMAGE:l,TIME_ZONE:u,TOGGLE_STYLE_MODIFIER:p,Z_INDEX_WAR:m,storeId:f})=>r.jsx(d.Modal.Body,{className:ot["modal-product-body"],children:r.jsxs(gd,{className:ot["pdp-main__info-modifier"],children:[r.jsxs(Yt,{type:"product-info",children:[r.jsx(ur,{}),r.jsx(ps,{})]}),r.jsx(Yt,{type:"similars",children:r.jsx(yd,{storeId:f,TEXTURE_IMAGE:l,TOGGLE_STYLE_MODIFIER:p})}),r.jsx(Yt,{type:"sizes",children:r.jsx(_d,{ICONS:n,NEWSLETTER_CONFIGS:o,NOTIFY_INFO:s,PDP_INFO:a,PLP_SIZE_ORDER:i,PRODUCT_CARD_TEXTS:c,Z_INDEX_WAR:m})}),r.jsx(Yt,{type:"actions",children:r.jsx(cd,{showWishlist:!1,callBack:e,addToCartBtnSize:{mobile:"medium",desktop:"large"},BUY_BUTTON_LABELS:t,ICONS:n,TIME_ZONE:u,Z_INDEX_WAR:m})})]})});function Lg({callBackProductAdded:e,QUICKSHOP:t,ICONS:n,...o}){const[s,a]=g.useState(!1),i=()=>a(c=>!c);return r.jsxs("div",{className:ot["quick-shop"],children:[r.jsx(d.Button,{onClick:i,size:"x-large",className:ot["shop-bag"],iconNameStart:n.bag,iconSize:"medium"}),r.jsxs(d.Modal.Root,{isOpen:s,setIsOpen:a,className:`${ot.modal} ${ot["quick-shop__modal"]}`,style:{position:"fixed",height:"100svh",width:"100%",top:0,zIndex:1e3,bottom:"unset",overflowY:"hidden"},variant:"sideRight",children:[r.jsx(kg,{headerTitle:t.title,ICONS:n}),r.jsx(Og,{callBackProductAdded:e,ICONS:n,...o})]})]})}const Mg=({image:e})=>r.jsx(rn,{src:D.resizingImg(e.imageUrl,{width:50,height:75})||"",alt:e.imageText,className:we.mainImage,layout:"fill",objectFit:"cover",priority:!0,quality:10,style:{position:"absolute",inset:0,filter:"blur(10px)"}}),Dg=({images:e,selectedImageIndex:t,PRODUCT_IMAGE_DIMENSIONS:n,...o})=>{const[s,a]=g.useState(!1),{nextimage:i}=ce();return r.jsx("div",{...o,className:we["main-image-container"],children:r.jsxs("div",{className:we["image-desktop"],children:[!s&&r.jsx(Mg,{image:e==null?void 0:e[t]}),r.jsx(i,{src:D.resizingImg(e==null?void 0:e[t].imageUrl,{...n.image_zoom.desktop})||"",alt:e==null?void 0:e[t].imageText,className:we.mainImage,layout:"fill",objectFit:"cover",priority:!0,quality:100,onLoad:()=>{a(!0)}})]})})},$g=({images:e,onThumbnailClick:t,selectedImageIndex:n})=>{const{nextimage:o}=ce();return r.jsx("div",{className:we.thumbs,children:e.map((s,a)=>r.jsx("div",{role:"button",tabIndex:0,onClick:()=>t(a),onKeyDown:i=>{(i.key==="Enter"||i.key===" ")&&t(a)},className:a===n?we.selected:"",children:r.jsx(o,{src:s.imageUrl,alt:s.imageText,layout:"responsive",width:100,height:100,objectFit:"cover",priority:!1})},a))})},xd=({images:e,initialSelectedImageIndex:t=0,setShowImageZoom:n,ICONS:o,PRODUCT_IMAGE_DIMENSIONS:s,Z_INDEX_WAR:a,...i})=>{const{isMobile:c}=ne(),[l,u]=g.useState(t),p=m=>{u(m)};return c?r.jsxs(Tg,{Z_INDEX_WAR:a,children:[r.jsx(ja,{onClose:()=>n({show:!1,initialIndex:0}),ICONS:o}),r.jsx(hd,{images:e,ICONS:o,PRODUCT_IMAGE_DIMENSIONS:s})]}):r.jsxs(Rg,{Z_INDEX_WAR:a,children:[r.jsx(ja,{onClose:()=>n({show:!1,initialIndex:0}),ICONS:o}),r.jsx(Dg,{images:e,selectedImageIndex:l,onThumbnailClick:p,PRODUCT_IMAGE_DIMENSIONS:s},e[l].imageId??`${e[l].imageText}-${l}`),r.jsx($g,{images:e,selectedImageIndex:l,onThumbnailClick:p}),r.jsx(Lg,{callBackProductAdded:()=>{n({initialIndex:0,show:!1})},ICONS:o,Z_INDEX_WAR:a,...i})]})};xd.displayName="ImageZoom";const zg=({productImgs:e,PRODUCT_IMAGE_DIMENSIONS:t,...n})=>{const{video:o,productName:s}=Me(),[a,i]=g.useState({show:!1,initialIndex:0});g.useEffect(()=>(a.show?document.body.classList.add("no-scroll"):document.body.classList.remove("no-scroll"),()=>{document.body.classList.remove("no-scroll")}),[a]);const c=l=>{i({show:!0,initialIndex:l})};return r.jsxs(r.Fragment,{children:[r.jsx(dd,{images:e,video:o,handleZoom:c,productName:s,PRODUCT_IMAGE_DIMENSIONS:t}),a.show&&r.jsx(xd,{images:e,initialSelectedImageIndex:a.initialIndex,setShowImageZoom:i,PRODUCT_IMAGE_DIMENSIONS:t,...n})]})},vd=({TEXTURE_IMAGE:e,PRODUCT_IMAGE_DIMENSIONS:t,...n})=>{const{images:o}=Me(),s=g.useMemo(()=>{const a=o.filter(i=>!e.includes(i.imageLabel));return a.length>0?a:o},[]);return r.jsx(zg,{productImgs:s,TEXTURE_IMAGE:e,PRODUCT_IMAGE_DIMENSIONS:t,...n})};vd.displayName="PDP.Gallery";const Fg=({className:e,hasIcons:t=!0,ICONS:n,PDP_INFO:o})=>{const{allSizesAvailable:s,productId:a}=Me(),{setValue:i}=Bo(),{sendDataLayerEvent:c}=ae();return r.jsx("div",{className:d.helpers.classNameConcat(Z.links,e),id:"pdp-container","data-product-id":a,children:r.jsxs("div",{className:Z["links-wrapper"],children:[!s&&r.jsx(d.Button,{adornment:t?{start:r.jsx(d.Icon,{name:n.product})}:{},size:"x-small",variant:"tertiary",onClick:()=>i(!0),underline:!0,children:o.links_and_stepper.size_out_of_stock}),r.jsx(d.Button,{adornment:t?{start:r.jsx(d.Icon,{name:n.ruler})}:{},size:"x-small",variant:"tertiary",underline:!0,onClick:()=>{var l,u;(u=window.SizebayParams)==null||u.openChart((l=window.SizebayParams)==null?void 0:l.id),c({functionKey:"readyEvents",data:{event:"select_content",readyData:{content_type:"pdp:guia-de-medidas"}}})},children:o.links_and_stepper.size_table_title}),r.jsx(d.Button,{size:"x-small",variant:"tertiary",className:"sizebay",underline:!0,onClick:()=>{var l,u;return(u=window.SizebayParams)==null?void 0:u.openVFR((l=window.SizebayParams)==null?void 0:l.id)},children:o.links_and_stepper.sizebay})]})})},Bg=({children:e})=>r.jsx("div",{className:Z["pdp-main__info-main-content"],children:e}),Ug=({head:e,className:t})=>r.jsx("thead",{className:t,children:r.jsx("tr",{children:e.map((n,o)=>r.jsx("th",{children:n},`head-title-${o}`))})}),qg=({rows:e,className:t})=>r.jsx("tbody",{className:t,children:e.map((n,o)=>r.jsx("tr",{children:n.map(s=>typeof s=="string"&&s.includes("blocks")?JSON.parse(s).blocks.map(a=>`${a.text}
|
|
18
|
+
`):s).map((s,a)=>r.jsx("td",{children:s},`cell-content-${a}`))},`row-content-${o}`))}),Hg="_tableContainer_1yxy2_1",Vg={tableContainer:Hg},Wg=({children:e,className:t=""})=>r.jsx("table",{className:`${Vg.tableContainer} ${t}`,children:e}),zn={Head:Ug,Rows:qg,Root:Wg},Gg=({title:e,text:t})=>r.jsxs("p",{className:Z.measurementRowsText,children:[r.jsx("h1",{className:Z.measurementRowsTitle,children:e}),t]}),Kg=({ICONS:e,SIZES:t,Z_INDEX_WAR:n})=>{const o=$i(),{setValue:s}=zi();return r.jsx(d.Modal.Root,{isMobile:!0,style:{zIndex:n.modal},setIsOpen:s,isOpen:o,className:Z.measurementModal,children:r.jsx(d.Modal.Body,{children:r.jsxs("div",{className:Z.measurementContainer,children:[r.jsx("h1",{className:Z.measurementTitle,children:t.title}),r.jsxs("div",{className:Z.measurementContent,children:[r.jsx("div",{className:Z.measurementImageContainer,children:r.jsx(rn,{width:264,height:402,alt:"",className:Z.measurementImage,src:t.bannerImage})}),r.jsxs(zn.Root,{className:Z.measurementTable,children:[r.jsx(zn.Head,{className:Z.measurementHead,head:t.head}),r.jsx(zn.Rows,{className:Z.measurementRows,rows:t.rows.map((a,i)=>[r.jsx(Gg,{title:t.descriptions[i].title,text:t.descriptions[i].text},i),...a])})]})]}),r.jsx(d.Button,{onClick:()=>s(!1),className:Z.measurementClose,variant:"tertiary",children:r.jsx(d.Icon,{name:e.close})})]})})},"minicart")},Xg=({children:e,className:t,...n})=>r.jsx("div",{className:d.helpers.classNameConcat(Z["pdp-main__gallery-wrapper"],t),...n,children:e}),Yg=({children:e,className:t,...n})=>r.jsx("div",{className:d.helpers.classNameConcat(Z.pdp,t),...n,children:e}),Qg=({children:e,className:t,...n})=>r.jsx("div",{className:d.helpers.classNameConcat(Z["pdp-main"],t),...n,children:e}),Zg=({children:e,className:t,...n})=>r.jsx("div",{className:d.helpers.classNameConcat(Z["pdp-main__info-secondary-content"],t),...n,children:e}),Jg={gallery:Xg,pdp:Yg,main:Qg,secondary:Zg},ey=({className:e,...t})=>r.jsx(d.Utils.Divider,{...t,className:d.helpers.classNameConcat(Z.divider,e)}),ty=Object.freeze(Object.defineProperty({__proto__:null,AccessibilityInfo:yg,Actions:cd,BreadCrumb:ld,Credits:ud,DescriptionsTabs:Cg,Divider:ey,Freight:Sg,Gallery:vd,GoldenTag:fs,Header:ur,Links:Fg,MainContent:Bg,MainInfo:gd,PDPSimilars:gg,Price:ps,ProductMeasurements:Kg,Sizes:_d,SubSectionWrapper:Yt,containers:Jg},Symbol.toStringTag,{value:"Module"})),ny=(e,t)=>{const[n,o]=$u({items:e}),[s,a]=t.split(":").map(Number);return isNaN(s)||isNaN(a)?[n,o]:[n<s?n:s,o>a?o:a]},ry=()=>{var P;const{ICONS:e,PLP_FILTERS:t,PLP_FILTERS_COLORS:n,PLP_FILTERS_EMPTY:o,PLP_FILTERS_TITLE:s,PLP_SIZE_ORDER:a}=$e(),[i,c]=g.useState("10000:0"),{isMobile:l}=ne(),{sendDataLayerEvent:u}=ae(),{openFilters:p,setOpenFilters:m}=Xo(),{state:f}=Fe(),{breadcrumb:h,deleteAllFacets:_,isLoading:y=!1,facets:x,onToggleFacet:v,selectedFacets:C}=tn.contexts.searchFacets.hook(),j=g.useRef(""),b={isLast:!0,href:(P=f.term)!=null&&P.length?`/${f.term}`:"",name:f.term},w=D.filterNonRootFacets(C,f==null?void 0:f.base);return g.useEffect(()=>{const S=x.find(({key:N})=>N==="price");if(S){const[N,R]=ny(S.values,i??"10000:0");c(`${N}:${R}`)}},[x,i,c]),g.useEffect(()=>{if(!w.length)return;const S=JSON.stringify(w);j.current!==S&&(j.current=S,u({functionKey:"filterEvent",data:{commonData:{selectedFacets:w}}}))},[w]),r.jsxs(Bn.teamComponents.Filter.Root,{CONSTANTS:{ICONS:e,PLP_FILTERS_TITLE:s,PLP_FILTERS:t},breadcrumb:h.length?h:[b],deleteAllFacets:_,filters:{facets:D.filterNonCategorySelected(x,f==null?void 0:f.base),selected:w},isMobile:l??!1,isLoading:y,isOpen:p,price:i,onToggleFacet:v,setIsOpen:m,target:document.body,children:[r.jsx(Bn.teamComponents.Filter.Selected,{ICONS:e,PLP_FILTERS:t,PLP_FILTERS_COLORS:n}),r.jsx(Bn.teamComponents.Filter.Content,{columns:2,CONSTANTS:{ICONS:e,PLP_FILTERS:t,PLP_FILTERS_COLORS:n,PLP_FILTERS_EMPTY:o,PLP_SIZE_ORDER:a}})]})},bd=()=>typeof document>"u"?null:r.jsx(ry,{});bd.displayName="Filters";const hs=({total:e=0})=>{const{SEARCH_TOTAL_PORTAL_ID:t}=$e();if(typeof window>"u")return null;const n=document.getElementById(t);return n?ko.createPortal(r.jsxs("span",{children:["[",e,"] produto",e>1?"s":""]}),n):null};hs.displayName="PDC.Grid.NavigationTotal";const oy=({productCount:e,PLP_GRID_SCROLL_BACK:t})=>{g.useEffect(()=>{var a;const o=new URLSearchParams(window.location.search).get("page");if(e){const[i,c]=((a=sessionStorage.getItem(t.key))==null?void 0:a.split("-"))??["0",null],l=sessionStorage.getItem(t.refer);i&&l==="true"&&(c===(o||"null")&&window.document.body.scrollTo({top:parseInt(i,10),behavior:"smooth"}),sessionStorage.setItem(t.refer,"false"))}const s=()=>{e>0&&window.document.body.scrollTop&&sessionStorage.setItem(t.key,`${window.document.body.scrollTop.toString()}-${o}`)};return window.document.body.addEventListener("scroll",s,{passive:!0}),()=>{window.document.body.removeEventListener("scroll",s)}},[e])},sy=()=>{const{isMobile:e}=ne(),{isLoading:t,products:n,total:o}=ln(),s=$e();return oy({productCount:n.length,PLP_GRID_SCROLL_BACK:s.PLP_GRID_SCROLL_BACK}),r.jsxs(r.Fragment,{children:[r.jsx(rt.Products,{isMobile:e??!1,items:n,...s}),!n.length&&!t&&r.jsx(rt.Empty,{ICONS:s.ICONS,PLP_NOT_RESULT:s.PLP_NOT_RESULT}),r.jsx(hs,{total:o})]})},jd=({infinite:e=!1})=>r.jsx("div",{className:Xe["pdc--grid"],children:r.jsx("div",{className:Xe["pdc--grid--content"],children:e?r.jsx(rt.InfiniteScroller,{}):r.jsx(sy,{})})});jd.displayName="Grid";const At=e=>({centro:"center",esquerda:"start",direita:"end"})[e],Cd=({children:e,contentState:t,entityKey:n})=>{const{url:o}=t.getEntity(n).getData();return o?r.jsx(ze,{href:o,children:e}):e},ay=(e,t,n)=>{e.findEntityRanges(o=>{const s=o.getEntity();return s===null?!1:n.getEntity(s).getType()==="LINK"},t)},Wn=e=>{const t=new tt.CompositeDecorator([{strategy:ay,component:Cd}]),n=tt.convertFromRaw(e);return tt.EditorState.createWithContent(n,t)},iy=e=>tt.convertFromRaw(e),Gn=tt.DefaultDraftBlockRenderMap.set("unstyled",{element:"div",aliasedElements:["div"]}),Ca="superior-direita",kn="dentro-inferior-centro",cy="inferior-direita",Wr="dentro-inferior-esquerda",Sd=e=>({position:e===kn||e===Wr?"absolute":"default",shouldRender:[Ca,kn,Wr].includes(e)?"top":"bottom",alignItems:[kn].includes(e)?"center":[Ca,cy].includes(e)?"flex-end":"flex-start",left:e===Wr?"16px":e===kn?"45%":"unset"}),ly=Object.freeze(Object.defineProperty({__proto__:null,CREATE_CONTENT:Wn,EXTENDED_BLOCK_RENDER_MAP:Gn,GET_CONTENT_STATE:iy,controllersPositionsAdapter:Sd},Symbol.toStringTag,{value:"Module"})),uy=({expanded:e,content:t})=>r.jsxs("details",{open:e,children:[t.textStructureReduced?r.jsx("summary",{onClick:n=>n.preventDefault(),children:r.jsx(tt.Editor,{editorKey:"draft-editor-1",blockRenderMap:Gn,editorState:t!=null&&t.textStructureReduced?Wn(JSON.parse(t.textStructureReduced)):tt.EditorState.createEmpty(),onChange:()=>null,readOnly:!0})}):r.jsx(r.Fragment,{}),t.showTextStructureExpander&&t.textStructure?r.jsx(r.Fragment,{children:r.jsx(tt.Editor,{editorKey:"draft-editor-1",blockRenderMap:Gn,editorState:t.textStructure?Wn(JSON.parse(t.textStructure)):tt.EditorState.createEmpty(),onChange:()=>null,readOnly:!0})}):r.jsx(r.Fragment,{})]}),dy="_textContentWrapper_1bigo_5",my="_textContentSection_1bigo_13",ho={"link-modifier":"_link-modifier_1bigo_1",textContentWrapper:dy,textContentSection:my},wd=({data:e,ICONS:t,TEXTCONTENT_EXPANDED:n})=>{var a;const[o,s]=g.useState(!1);return r.jsx(d.TextStructure.Root,{layoutProps:{textRow:{alignContent:At(e.textStructureAlignment),alignItems:At(e.textStructureAlignment)},columnWrapper:{alignContent:At(e.textStructureAlignment),alignItems:At(e.textStructureAlignment)}},adornment:{bottom:e.showTextStructureExpander&&e.textStructure?r.jsx(d.Button,{variant:"tertiary",adornment:{end:r.jsx(d.Icon,{name:o?`${t.arrow_up}`:`${t.arrow_down}`})},onClick:()=>s(i=>!i),size:"small",children:o?(n==null?void 0:n.less)??"Ver Menos":(n==null?void 0:n.more)??"Ver Mais"}):r.jsx(r.Fragment,{})},children:r.jsxs(d.Utils.Column,{className:ho.textContentWrapper,style:{alignItems:At(e.textStructureAlignment)},children:[r.jsx(d.TextStructure.DivWrapper,{style:{textAlign:At(e.textStructureAlignment)},mode:e.textStructureMode??"default",children:e.textStructureReduced?r.jsx(uy,{content:e,expanded:o}):r.jsx(r.Fragment,{})}),e.textStructureButtonLabel?r.jsx(Le,{mode:e.textStructureMode??"default",href:e.textStructureButtonHref??"#",size:e.textStructureButtonSize,className:ho["link-modifier"],adornments:(a=e.textStructureButtonIcon)!=null&&a.length&&e.enableIcon?{end:r.jsx(d.Icon,{name:e.textStructureButtonIcon})}:void 0,children:e.textStructureButtonLabel}):r.jsx(r.Fragment,{})]})})},py=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],Sa=e=>({centro:"center",esquerda:"start",direita:"end"})[e],wa={"content-modifier":"_content-modifier_16y4u_5","banner-image-wrapper-modifier":"_banner-image-wrapper-modifier_16y4u_13"},Pa=({data:e,videoUrl:t,priority:n,videoRef:o,ICONS:s,TEXTCONTENT_EXPANDED:a,TIME_ZONE:i,className:c,...l})=>{const{video:u,image:p,imageHref:m,imageOpacity:f,altImage:h,backgroundColor:_,position:y,contentAlignment:x,showTimer:v,contentOrder:C,timerMode:j,timerEnd:b,timerInit:w,textStructure:P,textStructureReduced:S}=e.banner,N=(m==null?void 0:m.trim())||(p==null?void 0:p.trim())||null,{nextimage:R}=ce();return r.jsxs(d.Banner.Container,{...l,children:[r.jsxs(d.Banner.ImageWrapper,{className:wa["banner-image-wrapper-modifier"],style:f?{background:_}:void 0,children:[u&&r.jsx(Pe.Video,{videoRef:o,src:t,autoPlay:n,loop:!0,playsInline:!0,muted:!0}),N&&!(u!=null&&u.length)&&r.jsx(R,{src:N,width:"1920",height:"1080",alt:h??p??"",...n?{priority:n}:{},style:f?{opacity:"0"}:void 0}),!p&&!(u!=null&&u.length)&&r.jsx("div",{style:{background:_}})]}),v||S||P?r.jsx(d.Banner.Slot,{...py(y??"centro"),className:d.helpers.classNameConcat(wa["content-modifier"],c),style:{textAlign:Sa(x)},children:r.jsxs(d.Utils.Column,{gap:"16px",alignItems:Sa(x),children:[v&&C==="timer-first"&&r.jsx(Vn,{mode:j??"default",size:"small",dateEnd:b?new Date(b):new Date,dateInit:w?new Date(w):new Date,TIME_ZONE:i}),r.jsx(wd,{data:e.banner,ICONS:s,TEXTCONTENT_EXPANDED:a}),v&&C!=="timer-first"&&r.jsx(Vn,{mode:j??"default",size:"small",dateEnd:b?new Date(b):new Date,dateInit:w?new Date(w):new Date,TIME_ZONE:i})]})}):r.jsx(r.Fragment,{})]})};class Qe extends g.Component{constructor(){super(...arguments);vt(this,"state",{hasError:!1,error:null})}static getDerivedStateFromError(){return{hasError:!0,error:null}}componentDidCatch(n,o){if(process.env.NODE_ENV!=="production"){if(this.props.debugger)debugger;console.groupCollapsed("Error Boundary CMS",this.props.name),console.log("Error:",(n==null?void 0:n.message)??n),console.log("Error Info:",o),console.groupEnd()}}render(){const{hasError:n}=this.state,{children:o,fallback:s}=this.props;return n&&process.env.NODE_ENV==="production"?null:n&&s!==void 0?s:o}}const mn=({data:e,className:t,priority:n,creative:o,name:s,...a})=>{const{handleSelectPromotionEvent:i,currentLocalRef:c}=ae(),{banner:{promotion_name:l},index:u,componentIndex:p}=e,m=typeof u=="number"?`:${u+1}`:"",f={creative_name:o,creative_slot:`${o}-${c.current}:${p+1}${m}`,promotion_id:e.banner.href,promotion_name:l},h=g.useRef(null),_=g.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("&"),j=C==null?void 0:C.filter(w=>w.includes("loc")||w.includes("signature")||w.includes("user_id")),b=j==null?void 0:j.join("&");return`${e.banner.video.split("?")[0]}?${b}`}return e.banner.video},[e]),y=()=>{var x;(x=h.current)!=null&&x.paused&&h.current.play()};return r.jsx(Qe,{name:s,children:r.jsx(or,{eventData:{functionKey:"readyEvents",data:{event:"view_promotion",readyData:{ecommerce:{...f,index:u}}}},observerOptions:{delay:100,..._&&{threshold:.1}},..._&&{callBackWhenVisible:y},children:e.banner.href?r.jsx(ze,{href:e.banner.href,onClick:()=>{i({updatePromotionRef:!0,promotion:f,index:u})},children:r.jsx(Pa,{data:e,videoUrl:_,priority:n,videoRef:h,className:t,...a})}):r.jsx(Pa,{data:e,videoUrl:_,priority:n,videoRef:h,className:t,...a})})})},_s=e=>r.jsx(Qe,{name:e.name,children:r.jsx(mn,{...e})}),Pd=({columns:e,count:t,gap:n,className:o})=>{var x;const{banners:s,pages:a,products:i}=dt(),{isMobile:c}=ne(),{banners:l}=Jn(),{ICONS:u,PRODUCT_CARD_IMAGE_ASPECT_RATIO:p,TEXTCONTENT_EXPANDED:m,TIME_ZONE:f}=$e(),h=((x=a[a.length-1])==null?void 0:x.products.length)??t,_=i[(a.length-1)*t+h-1],y=l.filter((v,C)=>s[C]<_);return Array.isArray(y)?y.map((v,C)=>r.jsx(at.Banner,{columns:v.columns,gap:n,isMobile:c??!1,position_grid:s[C]+1,totalColumns:e,PRODUCT_CARD_IMAGE_ASPECT_RATIO:p,children:r.jsx(mn,{name:"Banner Carousel",data:{banner:v,componentIndex:C},creative:"banner_grid",ICONS:u,TEXTCONTENT_EXPANDED:m,TIME_ZONE:f,className:o})},`${v.position_grid}-${C}`)):null};Pd.displayName="PDC.InfiniteScroller.Banners";const Nd=e=>{var o;const{pages:t}=dt(),n=t[t.length-1];return(n==null?void 0:n.page)!==((o=n==null?void 0:n.pagination)==null?void 0:o.total)&&!(n!=null&&n.loading)?r.jsx(rr,{...e}):null};Nd.displayName="PDC.InfiniteScroller.Loading";const Ed=({page:e,...t})=>{const{updateParamPage:n}=dt(),{element:o}=Xn({callback:()=>n(e),options:{threshold:0}});return r.jsx("div",{...t,id:`pdc-scroll-infinite-${e.page}`,className:Xe["pdc--infinite--loader"],"data-page":e.page,ref:o})};Ed.displayName="PDC.Page.Anchor";const Id=({first:e,gap:t,isMobile:n=!1,item:o,index:s,last:a=!1,order:i,page:c,showVideo:l=!1})=>{const{load:u,handleNotify:p}=dt(),{getAvailableProductTag:m}=yt(),{BUY_BUTTON_LABELS:f,MAIN_IMAGE:h,PLP_GRID_SCROLL_BACK:_,PLP_INFINITE_SCROLL:y,PLP_PRODUCT_SIMILAR_DELAY:x,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:v,PLP_SIZE_ORDER:C,PRODUCT_CARD_IMAGE_ASPECT_RATIO:j,PRODUCT_CARD_TEXTS:b,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:w,PRODUCT_IMAGE_DIMENSIONS:P,SECOND_IMAGE:S,StoreConfig_MainSellerId:N,TEXTURE_IMAGE:R,Z_INDEX_WAR:A,ICONS:L,storeId:O}=$e(),G=m(o==null?void 0:o.cluster.highlights);return r.jsx(at.Card,{className:o.id==="skeleton"?Xe["pdc--infinite--card--disabled"]:"",gap:t,isMobile:n??!1,item:o,order:i,tag:G,index:s,setSkuSelected:p,showVideo:l,CONSTANTS:{BUY_BUTTON_LABELS:f,MAIN_IMAGE:h,PLP_GRID_SCROLL_BACK:_,PLP_INFINITE_SCROLL:y,PLP_PRODUCT_SIMILAR_DELAY:x,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:v,PLP_SIZE_ORDER:C,PRODUCT_CARD_IMAGE_ASPECT_RATIO:j,PRODUCT_CARD_TEXTS:b,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:w,PRODUCT_IMAGE_DIMENSIONS:P,SECOND_IMAGE:S,StoreConfig_MainSellerId:N,TEXTURE_IMAGE:R,Z_INDEX_WAR:A,ICONS:L,storeId:O},children:c&&u&&r.jsxs(r.Fragment,{children:[e&&r.jsx(Fn.Anchor,{page:c}),!c.loading&&r.jsx(Fn.Loader,{page:c}),a&&c.loading&&r.jsx(Fn.NextPage,{page:c})]})})};Id.displayName="PDC.Page.Card";const Rd=({type:e="default",page:t,...n})=>{const{load:o,updatePage:s}=dt(),{element:a}=Xn({callback:()=>s(t),onEnterViewportOnce:!0,options:{threshold:1}});return o===!0&&r.jsx("div",{...n,className:Xe[`pdc--infinite--loader${e==="page"?"--page":""}`],ref:a})};Rd.displayName="PDC.Page.Loader";const Td=({page:e,...t})=>{var s;const{addNewPage:n}=dt(),{element:o}=Xn({callback:()=>{n(e)},onEnterViewportOnce:!0,options:{threshold:[.5,1]}});return((s=e==null?void 0:e.pagination)==null?void 0:s.nextPage)===!0&&e.loading===!0?r.jsx("div",{...t,className:Xe["pdc--infinite--next-page--card"],"data-next-page":!0,ref:o}):null};Td.displayName="PDC.Page.NextPage";const Fn={Anchor:Ed,Card:Id,Loader:Rd,NextPage:Td},Ad=({count:e,gap:t,page:n})=>{const{isMobile:o}=ne(),{columns:s,products:a}=dt(),i=(n.page-1)*e,c=sc(n.products,s);return Array.isArray(n.products)?n.products.map((l,u)=>r.jsx(Fn.Card,{first:u===0,last:u===n.products.length-1,gap:t,index:u,item:l.node,isMobile:o??!1,order:a[i+u]+1,page:u===0||u===n.products.length-1?n:void 0,showVideo:!!c.indexOf(u)},a[i+u]+1)):null};Ad.displayName="PDC.Page";const fy=({pages:e,load:t,PLP_GRID_SCROLL_BACK:n})=>{const o=g.useRef(!1);g.useEffect(()=>{const s=e[e.length-1];if(t&&s&&!o.current){const a=sessionStorage.getItem(n.refer),i=sessionStorage.getItem(n.order),c=document.querySelector(a==="true"?`[data-order="${i}"]`:`#pdc-scroll-infinite-${s.page}`);c&&(o.current=!0,sessionStorage.setItem(n.refer,"false"),s.page>1&&c.scrollIntoView({behavior:"instant",block:"start"}))}if(!t&&o.current){o.current=!1;const a=document.querySelector("body > main");a&&a.scrollIntoView({behavior:"instant",block:"start"})}},[t,e])},hy=()=>{var l,u;const{count:e}=Fe(),{columns:t,gap:n,load:o,pages:s,total:a}=dt(),i=$e(),{PLP_GRID_SCROLL_BACK:c}=$e();return fy({pages:s,load:o,PLP_GRID_SCROLL_BACK:c}),r.jsxs(r.Fragment,{children:[o===!0&&((u=(l=s[0])==null?void 0:l.pagination)==null?void 0:u.count)===0&&r.jsx(rt.Empty,{ICONS:i.ICONS,PLP_NOT_RESULT:i.PLP_NOT_RESULT}),r.jsxs(at.Root,{children:[Array.isArray(s)&&s.map((p,m)=>r.jsx(Ad,{count:e,gap:n,page:p},m)),r.jsx(Pd,{columns:t,count:e,gap:n})]}),r.jsx(hs,{total:a}),r.jsx(Nd,{})]})},kd=()=>{const{banners:e}=Jn();return r.jsx(vc,{banners:e,children:r.jsx(hy,{})})};kd.displayName="PDC.InfiniteScroller";const Od=()=>{const{setOpenFilters:e}=Xo(),{selectedFacets:t,onToggleFacet:n,onSort:o}=Qi(),{state:s}=Fe(),{Z_INDEX_WAR:a}=$e(),i=D.filterNonRootFacets(t,s==null?void 0:s.base);return r.jsx(gt.Root,{onSort:o,setOpenFilters:e,style:{zIndex:a.plp_navigation},children:r.jsx(gt.Selected,{callback:n,selected:i})})};Od.displayName="Navigation";const _o=({currentPage:e,callback:t,type:n,...o})=>r.jsx(d.Button,{...o,iconNameStart:`arrow-${n}`,onClick:()=>{typeof t=="function"&&t(n==="left"?"prev":"")},size:"large",variant:"tertiary"});_o.displayName="Arrow";const go=({active:e,prev:t,ellipses:n,page:o,selectedPage:s})=>r.jsxs(r.Fragment,{children:[n&&t&&r.jsx(d.Button,{size:"large",variant:"tertiary",children:"..."}),e&&r.jsx(d.Pagination.Item,{isActive:!1,index:o,variant:"tertiary",onClick:()=>{typeof s=="function"&&s(o)},children:o}),n&&!t&&r.jsx(d.Button,{size:"large",variant:"tertiary",children:"..."})]});go.displayName="PageEllipses";const Ld=({children:e,endPage:t,page:n,total:o,selectedPage:s,ITEMS_PER_SECTION:a})=>r.jsxs(r.Fragment,{children:[r.jsx(go,{active:n>=a&&o>a,selectedPage:s,currentPage:n,prev:!1,ellipses:n>a&&o>a,page:1}),e,r.jsx(go,{active:o-n>1&&o!==t,selectedPage:s,currentPage:n,prev:!0,ellipses:t<o-1,page:o})]});Ld.displayName="Pagination.Layout";const _y=(e,t,n)=>{const o=new URLSearchParams(n);return o.set(e,t),o.toString()},gy=(e,t)=>{const n=[];for(let o=e;o<=t;o++)n.push(o);return n},yy=({currentPage:e,total:t,maxVisiblePages:n,SEARCH_PAGE_ITEM_THRESHOLD:o})=>{const s=t>=o?o:t,a=Math.max(1,e===s?s-n+1:e-Math.floor(n/2)),i=Math.min(s,a+n-1);return{startPage:a,endPage:i,totalPages:s}},Md=({currentPage:e,pages:t,searchParams:n,VARIANT_PAGINATION:o})=>{const{router:s,pathname:a}=ce();return Array.isArray(t)?t.map(i=>r.jsx(d.Pagination.Item,{isActive:e===i,index:i,variant:e===i?o.active:o.default,onClick:()=>s.push(`${a}?${_y("page",i.toString(),n)}`),children:i},i)):null};Md.displayName="Pages";const gs=({query:e,type:t="default",searchParams:n,ITEMS_DEFAULT_SORT:o,ITEMS_PER_SECTION:s,ITEMS_PER_PAGE:a,SEARCH_PAGE_ITEM_THRESHOLD:i,VARIANT_PAGINATION:c,...l})=>{const{router:u,pathname:p}=ce(),{state:{page:m=1}}=Fe(),{pagination:{total:f}}=ln(),{endPage:h,totalPages:_,startPage:y}=yy({currentPage:m,total:f,maxVisiblePages:s,SEARCH_PAGE_ITEM_THRESHOLD:i}),x=C=>{const j=C.toString(),b=new URLSearchParams(n.toString());t==="default"&&b.set("page",j),t==="search"&&(b.set("query",e??""),b.set("count",a.toString()),b.set("page",j),o&&b.set("sort",o.replace("_",":")));const P=`${t==="search"?"/search":p}?${b.toString()}`;u.push(P)},v=C=>{x(C==="prev"?m-1:m+1)};return f?r.jsx("div",{...l,className:Xe["pdc--pagination"],children:r.jsx(d.Pagination.Wrapper,{adornment:{start:r.jsx(_o,{callback:v,currentPage:m,disabled:m<2,type:"left"}),end:r.jsx(_o,{callback:v,currentPage:m,disabled:m>=_,type:"right"})},children:r.jsx(Ld,{endPage:h,page:m,selectedPage:x,total:f,ITEMS_PER_SECTION:s,children:r.jsx(Md,{currentPage:m,pages:gy(y,h),searchParams:n,VARIANT_PAGINATION:c})})})}):r.jsx(r.Fragment,{})};gs.displayName="Pagination";const Dd=({gap:e,isMobile:t,className:n})=>{const{count:o,state:s}=Fe(),{banners:a}=Jn(),{ICONS:i,PRODUCT_CARD_IMAGE_ASPECT_RATIO:c,TEXTCONTENT_EXPANDED:l,TIME_ZONE:u}=$e(),p=a.filter(m=>ic(m.position_grid,s.page,o));return Array.isArray(p)?p.map((m,f)=>r.jsx(at.Banner,{columns:m.columns,gap:e,isMobile:t,position_grid:m.position_grid,totalColumns:t?2:4,PRODUCT_CARD_IMAGE_ASPECT_RATIO:c,children:r.jsx(mn,{name:"Banner Carousel",data:{banner:m,componentIndex:f},creative:"banner_grid",ICONS:i,TEXTCONTENT_EXPANDED:l,TIME_ZONE:u,className:n})},m.position_grid)):null};Dd.displayName="PDC.Grid.Banners";const ys=({isMobile:e=!1,items:t,BUY_BUTTON_LABELS:n,ICONS:o,MAIN_IMAGE:s,NEWSLETTER_CONFIGS:a,NOTIFY_INFO:i,PLP_GRID_SCROLL_BACK:c,PLP_INFINITE_SCROLL:l,PLP_PRODUCT_SIMILAR_DELAY:u,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:p,PLP_SIZE_ORDER:m,PRODUCT_CARD_IMAGE_ASPECT_RATIO:f,PRODUCT_CARD_TEXTS:h,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:_,PRODUCT_IMAGE_DIMENSIONS:y,SECOND_IMAGE:x,StoreConfig_MainSellerId:v,TEXTURE_IMAGE:C,Z_INDEX_WAR:j,storeId:b})=>{const{getAvailableProductTag:w}=yt(),{count:P,state:S}=Fe(),[N,R]=g.useState(!1),[A,L]=g.useState(null),[O,G]=g.useState([]),M=g.useCallback((W,z)=>{const J=z?Qn([z]):null;G(W),L(J!=null&&J.length?J[0]:null),R(!0)},[]),U=e?8:16,Y=(S.page-1)*P,X=at.helpers.createGridPosAndVideo(t,[],e?2:4,S.page);return r.jsxs(r.Fragment,{children:[r.jsxs(at.Root,{children:[Array.isArray(t)&&t.map((W,z)=>{var oe,le;const J=w(W.node.cluster.highlights);return r.jsx(at.Card,{gap:U,isMobile:e??!1,item:W.node,order:Y+(((oe=X[z])==null?void 0:oe.position)??0),tag:J,index:z,setSkuSelected:M,showVideo:(le=X[z])==null?void 0:le.canPlayVideo,CONSTANTS:{BUY_BUTTON_LABELS:n,MAIN_IMAGE:s,PLP_GRID_SCROLL_BACK:c,PLP_INFINITE_SCROLL:l,PLP_PRODUCT_SIMILAR_DELAY:u,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:p,PLP_SIZE_ORDER:m,PRODUCT_CARD_IMAGE_ASPECT_RATIO:f,PRODUCT_CARD_TEXTS:h,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:_,PRODUCT_IMAGE_DIMENSIONS:y,SECOND_IMAGE:x,StoreConfig_MainSellerId:v,TEXTURE_IMAGE:C,Z_INDEX_WAR:j,ICONS:o,storeId:b}},W.node.sku)}),t.length>0&&r.jsx(Dd,{gap:U,isMobile:e??!1})]}),r.jsx(Zn,{open:N,sku:A,skus:O,setSku:L,setVisible:R,ICONS:o,NEWSLETTER_CONFIGS:a,NOTIFY_INFO:i,PRODUCT_CARD_TEXTS:h,Z_INDEX_WAR:j})]})};ys.displayName="PDC.Products";const rt={Empty:is,Filters:bd,Grid:jd,InfiniteScroller:kd,Spinner:rr,Navigation:Od,Notification:Zn,Pagination:gs,Products:ys},$d=({className:e,...t})=>{const{searchParams:n,storeId:o,ITEMS_DEFAULT_SORT:s,ITEMS_PER_SECTION:a,ITEMS_PER_PAGE:i,PLP_INFINITE_SCROLL:c,SEARCH_PAGE_ITEM_THRESHOLD:l,VARIANT_PAGINATION:u}=t;return r.jsx(Sp,{...t,children:r.jsxs("div",{className:d.helpers.classNameConcat(Xe.pdc,e),children:[r.jsxs(Yi,{forceUpdate:!0,storeId:o,children:[r.jsx(rt.Navigation,{}),r.jsx(rt.Filters,{})]}),c===!0?r.jsx(rt.Grid,{infinite:!0}):r.jsxs(Ko,{forceUpdate:!0,query:n.get("query")??void 0,storeId:o,children:[r.jsx(rt.Grid,{}),r.jsx(rt.Pagination,{searchParams:n,ITEMS_DEFAULT_SORT:s,ITEMS_PER_SECTION:a,ITEMS_PER_PAGE:i,SEARCH_PAGE_ITEM_THRESHOLD:l,VARIANT_PAGINATION:u})]})]})})};$d.displayName="Templates.PDC";const zd=g.createContext({}),xy=({children:e,...t})=>r.jsx(zd.Provider,{value:t,children:e}),pn=()=>{const e=g.useContext(zd);if(e===void 0)throw new Error("useSearchConstants must be used within a SearchConstantsProvider");return e},vy="_grid_e75z7_21",by="_navigation_e75z7_44",jy="_spinner_e75z7_70",Cy="_sort_e75z7_76",_t={"rearch-result--empty":"_rearch-result--empty_e75z7_1",grid:vy,"grid-header":"_grid-header_e75z7_37",navigation:by,"result-disclaimer":"_result-disclaimer_e75z7_51",spinner:jy,sort:Cy,"search-result":"_search-result_e75z7_91"},Fd=({term:e})=>{const{router:t}=ce(),{SEARCH_RESULT:n,ICONS:o}=pn(),s=()=>{t.push(n.EMPTY.ALL_TERMS)};return r.jsxs("div",{className:_t["rearch-result--empty"],children:[r.jsxs(d.TextStructure.DivWrapper,{children:[r.jsx("div",{className:D.responsive["responsive-desktop-flex"],children:r.jsx("h2",{className:"typography-style-heading-sm",children:n.EMPTY.NOT_FOUND})}),r.jsx("div",{className:D.responsive["responsive-mobile-flex"],children:r.jsx("h2",{className:"typography-style-body-md",children:n.EMPTY.NOT_FOUND})}),r.jsxs("p",{children:[n.EMPTY.NOT_FOUND_P," ",`"${e}"`]})]}),r.jsx(d.Button,{onClick:()=>s(),variant:"tertiary",size:"medium",adornment:{end:r.jsx(d.Icon,{name:o.arrow_right,size:"medium"})},children:n.EMPTY.ALL_TERMS_LABEL})]})};Fd.displayName="RearchResult.Empty";const Sy=e=>r.jsxs(r.Fragment,{children:[r.jsx("div",{className:D.responsive["responsive-desktop-flex"],children:r.jsx("h2",{className:"typography-style-heading-sm",children:e.SEARCH.SEARCHING})}),r.jsx("div",{className:D.responsive["responsive-mobile-flex"],children:r.jsx("h2",{className:"typography-style-body-md",children:e.SEARCH.SEARCHING})}),r.jsx(d.Spinner,{className:_t.spinner})]}),wy=(e,t,n)=>r.jsxs(r.Fragment,{children:[r.jsx("div",{className:D.responsive["responsive-desktop-flex"],children:r.jsx("h2",{className:"typography-style-heading-sm",children:t.SEARCH.SEARCHED})}),r.jsx("div",{className:D.responsive["responsive-mobile-flex"],children:r.jsx("h2",{className:"typography-style-body-md",children:t.SEARCH.SEARCHED})}),r.jsxs("p",{children:[t.SEARCH.SEARCHED_P_START," ",e," ",t.SEARCH.SEARCHED_P_END," ",`"${n}"`]})]}),Bd=({isLoading:e,quantity:t,term:n})=>{const{SEARCH_RESULT:o}=pn();return r.jsx(d.TextStructure.DivWrapper,{children:e?Sy(o):wy(t,o,n)})};Bd.displayName="Search.Loading";const Py=({term:e})=>{const[t,n]=g.useState(!1),{router:o}=ce(),{searchParams:s}=Fe(),{ITEMS_DEFAULT_SORT:a,ITEMS_PER_PAGE:i,ICONS:c}=pn(),l=u=>{D.navigateToSearchPage(o,e,i,1,u??a)};return r.jsx("div",{className:_t.sort,children:r.jsx(ir,{handleSelectValue:u=>l(u??"release_desc"),sortListOpen:t,setSortListOpen:n,searchParams:s,ICONS:c})})},Ny=({query:e})=>{const{isLoading:t,products:n,pagination:o}=ln();return r.jsxs("div",{className:_t["grid-header"],children:[r.jsxs("div",{className:_t.navigation,children:[!t&&(n!=null&&n.length)?r.jsx(Py,{term:e}):null,r.jsx(d.Utils.Divider,{})]}),!t&&(n!=null&&n.length)?r.jsx("div",{className:_t["result-disclaimer"],children:r.jsx(Bd,{term:e,isLoading:t,quantity:o.count})}):null]})},Ud=({isMobile:e=!1,query:t})=>{const{isLoading:n,products:o,pagination:s}=ln(),{searchParams:a}=Fe(),i=pn(),{sendDataLayerEvent:c}=ae(),l=g.useRef({query:t,sended:!1}),u=g.useMemo(()=>!n&&o.length>0&&s.count>0,[n,o.length,s.count]);return g.useEffect(()=>{if(!n){if(l.current.query!==t){l.current.sended=!1,l.current.query=t;return}l.current.sended||(c({functionKey:"readyEvents",data:{event:"view_search_results",readyData:{search_term:t,search_found:(o==null?void 0:o.length)>0}}}),l.current.sended=!0)}},[t,o,n,c]),r.jsxs("div",{className:_t.grid,children:[u?r.jsx(Ny,{query:t}):r.jsx(r.Fragment,{}),!n&&(o!=null&&o.length)?r.jsx(ys,{isMobile:e??!1,items:o,...i}):r.jsx(r.Fragment,{}),(o==null?void 0:o.length)===0&&!n?r.jsx(Fd,{term:t}):null,u&&r.jsx(gs,{searchParams:a,...i})]})};Ud.displayName="SearchResultContent";const Ey=({className:e})=>{const{state:t}=Fe(),{isMobile:n}=ne(),{storeId:o}=pn();return r.jsx(Ko,{forceUpdate:!1,query:t.term??"",storeId:o,children:r.jsx("div",{className:d.helpers.classNameConcat(_t["search-result"],e),children:r.jsx(Ud,{currentPage:t.page,isMobile:n??!1,query:t.term??""})})})},qd=({className:e,searchParams:t,CONSTANTS:n})=>{const o=new URLSearchParams(t??""),s=String((o==null?void 0:o.get("query"))??""),a=Number((o==null?void 0:o.get("count"))??0),i=Number((o==null?void 0:o.get("page"))??0),c=String((o==null?void 0:o.get("sort"))??"");return r.jsx(xy,{...n,children:r.jsx(Go,{sort:c,state:{sort:c,base:"",facets:[],term:s,page:i,count:a},count:a,searchParams:o,ITEMS_PER_PAGE:n.ITEMS_PER_PAGE,children:r.jsx(Ey,{className:e})})})};qd.displayName="Search";const Iy=({page:e,data:t})=>{const{pathname:n}=ce(),o=g.useRef(null),{sendDataLayerEvent:s,currentLocalRef:a,itemListRef:i,promotionEventRef:c}=ae();return g.useEffect(()=>{const l=lc("login_event")||"{}",u=JSON.parse(l);if(u.name||u.method){const p=new Date(0);s({functionKey:"readyEvents",data:{event:u.name,readyData:{method:u.method}}}),Qo("login_event","",{expires:p})}},[]),g.useEffect(()=>{if(o.current===n)return;o.current=n;let l={};switch(e){case"PDP":{const p=t,m={};if(!p){l={page_category:"pdp"};break}p.items.forEach(({itemId:f,sellers:h})=>m[f]=h[0].commertialOffer.AvailableQuantity),l={page_category:"pdp",seller_ids:p.items.map(({sellers:f})=>f[0].sellerId).join(),skuStocks:m,product_reference_id:p.productReference};break}case"PDC":{const{page_category:p,page_departament:m,id:f,name:h}=Xa(),_=h,y=f;l={page_category:"lista_produtos",...m&&{page_departament:m}},i.current={item_list_name:n==="/search"?"busca":_??void 0,item_list_id:n==="/search"?void 0:y??void 0},m&&s({functionKey:"readyEvents",data:{event:"view_category",readyData:{page_category:p,page_departament:m}}});break}default:l={page_category:e},c.current={},i.current={};break}const u={region:e,...l};a.current=e,s({functionKey:"readyEvents",data:{readyData:{vtex_version:"fast",...u}},timeout:0})},[n]),null};var yo={exports:{}},On={exports:{}},Na;function Ry(){return Na||(Na=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function n(l,u){for(var p in u)Object.defineProperty(l,p,{enumerable:!0,get:u[p]})}n(t,{DOMAttributeNames:function(){return o},default:function(){return c},isEqualNode:function(){return a}});const o={acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv",noModule:"noModule"};function s(l){let{type:u,props:p}=l;const m=document.createElement(u);for(const _ in p){if(!p.hasOwnProperty(_)||_==="children"||_==="dangerouslySetInnerHTML"||p[_]===void 0)continue;const y=o[_]||_.toLowerCase();u==="script"&&(y==="async"||y==="defer"||y==="noModule")?m[y]=!!p[_]:m.setAttribute(y,p[_])}const{children:f,dangerouslySetInnerHTML:h}=p;return h?m.innerHTML=h.__html||"":f&&(m.textContent=typeof f=="string"?f:Array.isArray(f)?f.join(""):""),m}function a(l,u){if(l instanceof HTMLElement&&u instanceof HTMLElement){const p=u.getAttribute("nonce");if(p&&!l.getAttribute("nonce")){const m=u.cloneNode(!0);return m.setAttribute("nonce",""),m.nonce=p,p===l.nonce&&l.isEqualNode(m)}}return l.isEqualNode(u)}let i;process.env.__NEXT_STRICT_NEXT_HEAD?i=(l,u)=>{const p=document.querySelector("head");if(!p)return;const m=p.querySelectorAll('meta[name="next-head"]')||[],f=[];if(l==="meta"){const y=p.querySelector("meta[charset]");y&&f.push(y)}for(let y=0;y<m.length;y++){var h;const v=m[y].nextSibling;(v==null||(h=v.tagName)==null?void 0:h.toLowerCase())===l&&f.push(v)}const _=u.map(s).filter(y=>{for(let x=0,v=f.length;x<v;x++){const C=f[x];if(a(C,y))return f.splice(x,1),!1}return!0});f.forEach(y=>{var x;const v=y.previousSibling;if(v&&v.getAttribute("name")==="next-head"){var C;(C=y.parentNode)==null||C.removeChild(v)}(x=y.parentNode)==null||x.removeChild(y)}),_.forEach(y=>{var x;const v=document.createElement("meta");v.name="next-head",v.content="1",((x=y.tagName)==null?void 0:x.toLowerCase())==="meta"&&y.getAttribute("charset")||p.appendChild(v),p.appendChild(y)})}:i=(l,u)=>{const p=document.getElementsByTagName("head")[0],m=p.querySelector("meta[name=next-head-count]");if(process.env.NODE_ENV!=="production"&&!m){console.error("Warning: next-head-count is missing. https://nextjs.org/docs/messages/next-head-count-missing");return}const f=Number(m.content),h=[];for(let x=0,v=m.previousElementSibling;x<f;x++,v=(v==null?void 0:v.previousElementSibling)||null){var _;(v==null||(_=v.tagName)==null?void 0:_.toLowerCase())===l&&h.push(v)}const y=u.map(s).filter(x=>{for(let v=0,C=h.length;v<C;v++){const j=h[v];if(a(j,x))return h.splice(v,1),!1}return!0});h.forEach(x=>{var v;return(v=x.parentNode)==null?void 0:v.removeChild(x)}),y.forEach(x=>p.insertBefore(x,m)),m.content=(f-h.length+y.length).toString()};function c(){return{mountedInstances:new Set,updateHead:l=>{const u={};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 h=u[f.type]||[];h.push(f),u[f.type]=h});const p=u.title?u.title[0]:null;let m="";if(p){const{children:f}=p.props;m=typeof f=="string"?f:Array.isArray(f)?f.join(""):""}m!==document.title&&(document.title=m),["meta","base","link","style","script"].forEach(f=>{i(f,u[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)}(On,On.exports)),On.exports}(function(e,t){"use client";Object.defineProperty(t,"__esModule",{value:!0});function n(P,S){for(var N in S)Object.defineProperty(P,N,{enumerable:!0,get:S[N]})}n(t,{default:function(){return w},handleClientScriptLoad:function(){return x},initScriptLoader:function(){return j}});const o=Oe,s=un(),a=r,i=o._(ko),c=s._(g),l=td(),u=Ry(),p=el(),m=new Map,f=new Set,h=["onLoad","onReady","dangerouslySetInnerHTML","children","onError","strategy","stylesheets"],_=P=>{if(i.default.preinit){P.forEach(S=>{i.default.preinit(S,{as:"style"})});return}if(typeof window<"u"){let S=document.head;P.forEach(N=>{let R=document.createElement("link");R.type="text/css",R.rel="stylesheet",R.href=N,S.appendChild(R)})}},y=P=>{const{src:S,id:N,onLoad:R=()=>{},onReady:A=null,dangerouslySetInnerHTML:L,children:O="",strategy:G="afterInteractive",onError:M,stylesheets:U}=P,Y=N||S;if(Y&&f.has(Y))return;if(m.has(S)){f.add(Y),m.get(S).then(R,M);return}const X=()=>{A&&A(),f.add(Y)},W=document.createElement("script"),z=new Promise((J,oe)=>{W.addEventListener("load",function(le){J(),R&&R.call(this,le),X()}),W.addEventListener("error",function(le){oe(le)})}).catch(function(J){M&&M(J)});L?(W.innerHTML=L.__html||"",X()):O?(W.textContent=typeof O=="string"?O:Array.isArray(O)?O.join(""):"",X()):S&&(W.src=S,m.set(S,z));for(const[J,oe]of Object.entries(P)){if(oe===void 0||h.includes(J))continue;const le=u.DOMAttributeNames[J]||J.toLowerCase();W.setAttribute(le,oe)}G==="worker"&&W.setAttribute("type","text/partytown"),W.setAttribute("data-nscript",G),U&&_(U),document.body.appendChild(W)};function x(P){const{strategy:S="afterInteractive"}=P;S==="lazyOnload"?window.addEventListener("load",()=>{(0,p.requestIdleCallback)(()=>y(P))}):y(P)}function v(P){document.readyState==="complete"?(0,p.requestIdleCallback)(()=>y(P)):window.addEventListener("load",()=>{(0,p.requestIdleCallback)(()=>y(P))})}function C(){[...document.querySelectorAll('[data-nscript="beforeInteractive"]'),...document.querySelectorAll('[data-nscript="beforePageRender"]')].forEach(S=>{const N=S.id||S.getAttribute("src");f.add(N)})}function j(P){P.forEach(x),C()}function b(P){const{id:S,src:N="",onLoad:R=()=>{},onReady:A=null,strategy:L="afterInteractive",onError:O,stylesheets:G,...M}=P,{updateScripts:U,scripts:Y,getIsSsr:X,appDir:W,nonce:z}=(0,c.useContext)(l.HeadManagerContext),J=(0,c.useRef)(!1);(0,c.useEffect)(()=>{const le=S||N;J.current||(A&&le&&f.has(le)&&A(),J.current=!0)},[A,S,N]);const oe=(0,c.useRef)(!1);if((0,c.useEffect)(()=>{oe.current||(L==="afterInteractive"?y(P):L==="lazyOnload"&&v(P),oe.current=!0)},[P,L]),(L==="beforeInteractive"||L==="worker")&&(U?(Y[L]=(Y[L]||[]).concat([{id:S,src:N,onLoad:R,onReady:A,onError:O,...M}]),U(Y)):X&&X()?f.add(S||N):X&&!X()&&y(P)),W){if(G&&G.forEach(le=>{i.default.preinit(le,{as:"style"})}),L==="beforeInteractive")return N?(i.default.preload(N,M.integrity?{as:"script",integrity:M.integrity,nonce:z,crossOrigin:M.crossOrigin}:{as:"script",nonce:z,crossOrigin:M.crossOrigin}),(0,a.jsx)("script",{nonce:z,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([N,{...M,id:S}])+")"}})):(M.dangerouslySetInnerHTML&&(M.children=M.dangerouslySetInnerHTML.__html,delete M.dangerouslySetInnerHTML),(0,a.jsx)("script",{nonce:z,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([0,{...M,id:S}])+")"}}));L==="afterInteractive"&&N&&i.default.preload(N,M.integrity?{as:"script",integrity:M.integrity,nonce:z,crossOrigin:M.crossOrigin}:{as:"script",nonce:z,crossOrigin:M.crossOrigin})}return null}Object.defineProperty(b,"__nextScript",{value:!0});const w=b;(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)})(yo,yo.exports);var Ty=yo.exports,Ay=Ty;const xs=D.getDefaultExportFromCjs(Ay),ky=({children:e,ONE_TRUST:t})=>r.jsxs(r.Fragment,{children:[r.jsx(xs,{src:"https://cdn.cookielaw.org/scripttemplates/otSDKStub.js",defer:!0,strategy:"afterInteractive","data-domain-script":t.siteId,type:"text/javascript"}),e]}),Oy=Ql(()=>Promise.resolve(ky),{ssr:!1}),Ly="_lgpd_8ojiy_82",My="_success_8ojiy_248",Dy="_error_8ojiy_312",xe={"newsletter-root":"_newsletter-root_8ojiy_1","has-border-top":"_has-border-top_8ojiy_9","has-border-bottom":"_has-border-bottom_8ojiy_12","newsletter-container":"_newsletter-container_8ojiy_20","content-text":"_content-text_8ojiy_35","form-wrapper":"_form-wrapper_8ojiy_39","newsletter-container-banner":"_newsletter-container-banner_8ojiy_64",lgpd:Ly,"textfield-structure-modifier":"_textfield-structure-modifier_8ojiy_190","input-wrapper-modifier":"_input-wrapper-modifier_8ojiy_196","submit-btn":"_submit-btn_8ojiy_200","loading-spinner":"_loading-spinner_8ojiy_211","terms-and-conditions-checkbox":"_terms-and-conditions-checkbox_8ojiy_217","terms-and-conditions-unchecked":"_terms-and-conditions-unchecked_8ojiy_230","terms-and-conditions-checked":"_terms-and-conditions-checked_8ojiy_244",success:My,"text-structure-modifier":"_text-structure-modifier_8ojiy_257","success-title":"_success-title_8ojiy_297","close-button":"_close-button_8ojiy_302",error:Dy,"newsletter-wrapper":"_newsletter-wrapper_8ojiy_332","banner-container":"_banner-container_8ojiy_345","newsletter-provider-wrapper":"_newsletter-provider-wrapper_8ojiy_358","newsletter-root-banner":"_newsletter-root-banner_8ojiy_371","banner-background":"_banner-background_8ojiy_392","newsletter-provider-wrapper-background":"_newsletter-provider-wrapper-background_8ojiy_401"},Hd=({invalid_message:e,master_data_field:t,placeholder:n,required:o=!1,CONSTANTS:s})=>{const{isMobile:a}=ne(),{inputsStatus:i,setInputsStatus:c,setFormStatus:l,variant:u}=es();return r.jsx(d.TextField.Structure,{className:`${xe["textfield-structure-modifier"]} ${u}`,input:r.jsx(d.TextField.Input,{mode:"simple",label:n,sizeVariant:a?s.NEWSLETTER_CONFIGS.interactionSizeMob:s.NEWSLETTER_CONFIGS.interactionSizeDesk,name:t,className:`${xe["input-wrapper-modifier"]} ${u}`,feedback:i[t]==="required"?"error":i[t],onChange:()=>{i[t]!=="none"&&(c(p=>({...p,[t]:"none"})),l("idle"))},required:o}),supportText:i[t]==="error"||i[t]==="required"?r.jsx("div",{className:u==="horizontal"?xe["support-text-modifier"]:"",children:r.jsx(d.TextField.SupportText,{text:i[t]==="error"?e??s.NEWSLETTER_CONFIGS.messages.invalid_generic:s.NEWSLETTER_CONFIGS.messages.required_field,feedback:"error"})}):null})};Hd.displayName="Newsletter.Input";const Vd=({formStatus:e,fields:t,CONSTANTS:n})=>r.jsxs(r.Fragment,{children:[Array.isArray(t)&&t.map((o,s)=>r.jsx(Hd,{invalid_message:o.invalid_message,master_data_field:o.master_data_field,placeholder:o.placeholder,required:o.required,type:o.type,CONSTANTS:n},`nt-field-${o.master_data_field}-${s}`)),e==="error"&&r.jsx("div",{className:xe.error,children:r.jsx("p",{children:n.NEWSLETTER_CONFIGS.form.status.error})})]});Vd.displayName="Newsletter.FormFields";const Wd=({formStatus:e,CONSTANTS:t,...n})=>{const{isMobile:o}=ne();return r.jsxs(d.Button,{...n,className:xe["submit-btn"],disabled:e==="success",size:o?"medium":"large",children:[r.jsx("span",{"data-loading":e==="loading","data-label":!0,children:t.NEWSLETTER_CONFIGS.submitLabel}),t.NEWSLETTER_CONFIGS.hasLoadingState&&e==="loading"&&r.jsx(d.Spinner,{className:xe["loading-spinner"],size:"small"})]})};Wd.displayName="Newsletter.SubmitButton";const Gd=({checkboxRef:e,formStatus:t,setFormStatus:n,CONSTANTS:o})=>{const s=a=>{a.target.checked?(e.current=!0,t==="unchecked"&&n("idle")):e.current=!1};return r.jsxs(r.Fragment,{children:[r.jsx(d.Checkbox,{adornment:r.jsx(d.Icon,{name:o.ICONS.check,size:"x-small"}),defaultChecked:e.current,disabled:t==="success",name:"terms-and-conditions",label:o.NEWSLETTER_CONFIGS.messages.accept_terms_and_conditions,onChange:s,sizeVariant:"small",className:xe["terms-and-conditions-checkbox"]}),t==="unchecked"&&r.jsx("div",{className:xe["terms-and-conditions-unchecked"],children:r.jsx(d.TextStructure.Root,{adornment:{start:r.jsx(d.Icon,{name:o.ICONS.alert_circle,size:"small"})},children:r.jsx(d.TextStructure.DivWrapper,{children:r.jsx("p",{children:o.NEWSLETTER_CONFIGS.messages.terms_and_conditions_not_accepted})})})})]})};Gd.displayName="Newsletter.Terms";const Kd=({title:e,description:t,CONSTANTS:n})=>r.jsx("div",{className:xe.success,children:r.jsx(d.TextStructure.Root,{children:r.jsxs(d.TextStructure.DivWrapper,{className:xe["text-structure-modifier"],children:[r.jsxs("div",{className:xe["success-title"],children:[r.jsx(d.Icon,{name:n.ICONS.check_circle,size:"medium"}),r.jsx("h3",{children:e})]}),r.jsx("p",{children:t})]})})});Kd.displayName="Newsletter.Success";const Xd=({formPayloadOptionals:e,masterDataEntity:t,banner:n,termsDescription:o,lgpdLinkLable:s,lgpdLink:a,variant:i,CONSTANTS:c})=>{const{checkboxRef:l,fields:u,formStatus:p,hasTermsAndConditions:m,handleClickToSubmit:f,handleSubmit:h,setFormStatus:_}=es();return r.jsx(r.Fragment,{children:p==="success"?r.jsx(Kd,{description:c.NEWSLETTER_CONFIGS.messages.success_description,title:c.NEWSLETTER_CONFIGS.messages.success_title,CONSTANTS:c}):r.jsxs(r.Fragment,{children:[r.jsxs("form",{className:xe["form-wrapper"],onSubmit:y=>h(y,e,t),children:[r.jsx(Vd,{formStatus:p,fields:u,CONSTANTS:c}),m&&r.jsx(Gd,{checkboxRef:l,formStatus:p,setFormStatus:_,CONSTANTS:c}),r.jsx(Wd,{formStatus:p,type:"submit",variant:"primary",onClick:f,CONSTANTS:c})]}),(n||i==="vertical")&&r.jsxs("div",{className:xe.lgpd,children:[o&&r.jsx("p",{children:o}),s&&r.jsx(Le,{href:a,children:s})]})]})})};Xd.displayName="Newsletter.Form";const $y=["horizontal","vertical"],vs=({className:e,description:t,formPayloadOptionals:n,fields:o,masterDataEntity:s,masterDataEmailField:a,masterDataNameField:i,banner:c,altBanner:l,bannerBackground:u,termsDescription:p,lgpdLinkLable:m,lgpdLink:f,title:h,variant:_,borderTop:y,borderBottom:x,CONSTANTS:v,...C})=>{if(!a||!i)return null;const j=d.helpers.ValidateProp({fieldTypes:$y,property:_,fallback:"horizontal"});return r.jsxs("div",{className:c?u?xe["banner-background"]:xe["newsletter-wrapper"]:"",children:[c&&r.jsx(d.Banner.Container,{className:xe["banner-container"],children:r.jsx(d.Banner.ImageWrapper,{children:r.jsx(Pe.Image,{src:c,alt:l,width:"1920",height:"500"})})}),r.jsx("div",{className:c?xe["newsletter-provider-wrapper"+(u?"-background":"")]:"",children:r.jsx(Ic,{fields:o,masterDataEmailField:a,masterDataNameField:i,variant:j,CONSTANTS:v,children:r.jsx("div",{...C,className:d.helpers.classNameConcat(xe["newsletter-root"+(c||j==="vertical"?"-banner":"")],[y&&xe["has-border-top"],x&&xe["has-border-bottom"],e].filter(Boolean)),"data-variant":j,children:r.jsxs("div",{className:c||j==="vertical"?xe["newsletter-container-banner"]:xe["newsletter-container"],children:[r.jsxs("div",{className:xe["content-text"],children:[r.jsx("h2",{children:h}),r.jsx("p",{children:t}),!c&&j==="horizontal"&&r.jsxs("div",{className:xe.lgpd,children:[r.jsx("p",{children:p}),m&&r.jsx(Le,{target:"_blank",href:f,children:m})]})]}),r.jsx(Xd,{formPayloadOptionals:n,masterDataEntity:s,CONSTANTS:v,banner:c,lgpdLink:f,lgpdLinkLable:m,termsDescription:p,variant:j})]})})})})]})};vs.displayName="Newsletter";const Yd=({children:e,...t})=>r.jsx("div",{...t,children:e});Yd.displayName="CallToAction";const zy="_wrapper_aejhu_1",Fy="_body_aejhu_8",Kn={wrapper:zy,body:Fy,"wrapper-body":"_wrapper-body_aejhu_16","accordion-modifier":"_accordion-modifier_aejhu_32"},By=({children:e,className:t,...n})=>r.jsx("div",{...n,className:d.helpers.classNameConcat(Kn.wrapper,t),children:e}),Uy=({data:e,ICONS:t})=>{const[n,o]=g.useState(null),s=i=>{o(c=>c===i?null:i)},{router:a}=ce();return r.jsx("div",{className:d.helpers.classNameConcat(Kn.body),children:Array.isArray(e)&&(e==null?void 0:e.map((i,c)=>{var m;const l=n===i.id,u=i.buttonHref&&i.buttonHref!=="#",p=i.buttonHref&&i.type==="button"&&u?{onClick:()=>{var f;if((f=i.buttonHref)!=null&&f.startsWith("/")){a.push(i.buttonHref);return}window.open(i.buttonHref,"_blank")}}:{};return r.jsx("div",{children:i.type==="button"?r.jsxs(r.Fragment,{children:[r.jsx(d.Button,{variant:"tertiary",mode:i.buttonMode??"default",size:i.buttonSize??"medium",iconNameStart:t[i.buttonIcon]??i.buttonIcon,...p,style:{marginTop:16},children:i.buttonLabel}),r.jsx(d.Utils.Divider,{direction:"horizontal",size:"small",style:{height:16}})]}):r.jsxs(d.Accordion.Wrapper,{className:d.helpers.classNameConcat(Kn["accordion-modifier"]),children:[r.jsx(d.Accordion.Header,{id:`${c}-${i.title}`,closeIndicator:l?r.jsx(d.Icon,{name:t.arrow_up,size:"medium"}):void 0,openIndicator:l?void 0:r.jsx(d.Icon,{name:t.arrow_down,size:"medium"}),title:"accordion-header",onClick:()=>s(i.id),children:r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{children:r.jsx("h2",{className:"typography-style-body-sm",children:i.title})})})}),r.jsx(d.Accordion.Body,{title:"accordion-body",children:r.jsx(d.TextStructure.Root,{children:l&&r.jsxs(d.TextStructure.DivWrapper,{children:[i.subtitle?r.jsx("h3",{className:"typography-style-body-md",children:i.subtitle}):r.jsx(r.Fragment,{}),r.jsx("p",{className:"typography-style-caption",children:i.description}),i.buttonLabel&&i.buttonHref?r.jsx(Le,{href:i.buttonHref??"#",mode:i.buttonMode??"default",size:i.buttonSize??"medium",adornments:(m=i.buttonIcon)!=null&&m.length?{end:r.jsx(d.Icon,{name:t[i.buttonIcon]??i.buttonIcon})}:void 0,children:i.buttonLabel}):r.jsx(r.Fragment,{})]})})})]})},i.id)}))})},qy=({className:e,data:t,ICONS:n,...o})=>{const[s,a]=g.useState(!1),[i,c]=g.useState(null);g.useEffect(()=>{!s&&!i&&t&&c(t)},[s,i]);const l=g.useCallback(()=>{a(u=>!u)},[]);return i?r.jsxs(By,{...o,className:e,children:[r.jsx("div",{className:Kn["wrapper-body"],hidden:!s,children:s&&r.jsx(Uy,{data:i.content,ICONS:n})}),r.jsx(Yd,{children:r.jsx("div",{onClick:l,children:s?r.jsx(d.Button,{iconNameEnd:n.close,size:(i==null?void 0:i.helpButtonSize)??"x-large"}):r.jsx(d.Button,{iconNameStart:(i==null?void 0:i.iconLabel)??n.help,size:(i==null?void 0:i.helpButtonSize)??"x-large",children:i==null?void 0:i.label})})})]}):r.jsx(r.Fragment,{})},Hy="_formContainer_zwlly_1",Vy="_formFieldGroup_zwlly_6",Wy="_formFieldGroupName_zwlly_10",Gy="_formFieldWrapper_zwlly_20",Ky="_formFieldInput_zwlly_30",Xy="_success_zwlly_73",Yy="_button_zwlly_110",Qy="_error_zwlly_114",it={formContainer:Hy,formFieldGroup:Vy,formFieldGroupName:Wy,formFieldWrapper:Gy,formFieldInput:Ky,success:Xy,"text-structure-modifier":"_text-structure-modifier_zwlly_85",button:Yy,error:Qy},Zy=({group:e,children:t,className:n})=>r.jsx(r.Fragment,{children:r.jsxs("div",{className:d.helpers.classNameConcat(it.formFieldGroup,n),children:[r.jsx("h1",{className:it.formFieldGroupName,children:e.groupLabel}),t]},e.groupLabel)});async function Jy(e){const t=new TextEncoder().encode(e),n=await crypto.subtle.digest("SHA-1",t);return Array.from(new Uint8Array(n)).map(a=>a.toString(16).padStart(2,"0")).join("")}const ex=async e=>await fetch("/api/dito-ingest",{method:"POST",body:JSON.stringify(e)}).then(n=>n.json()),Qd=g.createContext({});function Zd({children:e,groups:t,masterDataEntity:n,postFn:o,actionName:s="",originName:a="",POPUP_SUBMITTED_STORAGE:i}){const[c,l]=g.useState(!1),[u,p]=g.useState({}),[m,f]=g.useState([]),[h,_]=g.useState("idle"),[y,x]=g.useState(""),v=({target:{name:j,value:b}})=>{p({...u,[j]:b})},C=j=>{j.preventDefault(),o({body:{masterDataEntity:n,payload:u}}).then(async({Message:b})=>{if(b){const P=b.match(/'(.*?[^\\])'/g)||[];var w="-";for(const S of P){const N=S.substring(1,S.length-1),A=t.flatMap(L=>L.fields).find(({name:L})=>L===N);x(N),A&&(w=A.name)}return _("error"),f([w])}if(u.email){const P=await Jy(u.email||""),S=new Date().toISOString();ex([{user_id:P,timestamp:S,type:"IDENTIFY",traits:{id:P,created_at:S,name:u.name,email:u.email,phone:u==null?void 0:u.phone}},{action:s,timestamp:S,type:"TRACK",user_id:P,context:{user_agent:navigator.userAgent},properties:{custom_data:{email:u.email,nome:u.name,origem:a,...u}}}])}return window.localStorage.setItem(i,"true"),p({}),l(!0),_("success"),f([])})};return r.jsx(Qd.Provider,{value:{formErrors:m,handleInputChange:v,submitForm:C,formData:u,status:h,fieldMessage:y,success:c,setSuccess:l},children:e})}function dr(){return g.useContext(Qd)}const tx=({fields:e,className:t})=>{const{formData:n,handleInputChange:o,formErrors:s}=dr();return r.jsx("div",{className:d.helpers.classNameConcat(it.formFieldWrapper,t),children:e.map(({label:a,name:i,required:c,width:l="medium"})=>r.jsx(d.TextField.Input,{label:`${a}${c?"*":""}`,title:i,value:n[i]||"",name:i,sizeVariant:"large",onChange:o,required:c,feedback:s.includes(i)?"error":"none",className:it.formFieldInput,"data-inputsize":l},i))})},nx=({FORM_CONFIGS:e,ICONS:t})=>{const{router:n}=ce();return r.jsxs("div",{className:it.success,children:[r.jsx(d.TextStructure.Root,{adornment:{start:r.jsx(d.Icon,{name:t.check_circle,size:"medium"})},children:r.jsx(d.TextStructure.DivWrapper,{className:it["text-structure-modifier"],children:r.jsx("p",{children:e.successMessage})})}),r.jsx(d.Button,{size:"large",onClick:()=>n.push("/"),className:it.button,children:e.returnButton})]})},rx=({FORM_CONFIGS:e,ICONS:t})=>{const{fieldMessage:n}=dr();return r.jsx("div",{className:it.error,children:r.jsx(d.TextStructure.Root,{adornment:{start:r.jsx(d.Icon,{name:t.delete_circle,size:"small"})},children:r.jsx(d.TextStructure.DivWrapper,{className:it["text-structure-modifier"],children:r.jsxs("p",{children:[e.errorMessage,n]})})})})},ox=({children:e,className:t,ICONS:n,FORM_CONFIGS:o})=>{const{submitForm:s,status:a}=dr();return r.jsx("form",{onSubmit:s,className:d.helpers.classNameConcat(it.formContainer,t),children:a==="success"?r.jsx(nx,{ICONS:n,FORM_CONFIGS:o}):r.jsxs(r.Fragment,{children:[e,a==="error"&&r.jsx(rx,{ICONS:n,FORM_CONFIGS:o})]})})},sx=e=>{const{children:t,className:n}=e;return r.jsx(Zd,{...e,children:r.jsx(ox,{ICONS:e.ICONS,FORM_CONFIGS:e.FORM_CONFIGS,className:n,children:t})})},zt={Root:sx,FieldGroup:Zy,FieldWrapper:tx},ax="_button_1e35m_39",bt={"banner-container":"_banner-container_1e35m_1","banner-background":"_banner-background_1e35m_6","form-root":"_form-root_1e35m_15",button:ax,"form-fied-wrapper":"_form-fied-wrapper_1e35m_52"};function ix({content:e,sections:t,FORM_CONFIGS:n,ICONS:o,postFn:s,POPUP_SUBMITTED_STORAGE:a}){var l;const{isMobile:i}=ne(),c=((l=t.find(({name:u})=>u==="Form"))==null?void 0:l.data)||{};return r.jsx("div",{children:r.jsxs(d.Banner.Container,{className:bt["banner-container"],children:[r.jsx(d.Banner.ImageWrapper,{children:r.jsx(Pe.Image,{className:bt["banner-background"],src:i?e.bannerMobile:e.bannerDesk,alt:e.altBanner,width:"1920",height:"500"})}),r.jsxs(zt.Root,{postFn:s,ICONS:o,FORM_CONFIGS:n,groups:c.groups||[],masterDataEntity:c.masterDataEntity||"",className:bt["form-root"],POPUP_SUBMITTED_STORAGE:a,children:[c.groups.map(u=>r.jsx(zt.FieldGroup,{group:u,children:r.jsx(zt.FieldWrapper,{fields:u.fields,className:bt["form-fied-wrapper"]})},u.groupLabel)),r.jsxs("div",{children:[r.jsx(d.TextStructure.DivWrapper,{children:r.jsx("p",{className:"typography-style-body-xs",children:e.requiredMessage})}),r.jsx("div",{className:bt["button-wrapper"],children:r.jsx("div",{className:bt["button-frame"],children:r.jsx(d.Button,{size:"large",type:"submit",className:bt.button,children:e.buttonLabel})})})]})]})]})})}const cx="_content_1jj9i_36",lx="_trends_1jj9i_47",ux="_modal_1jj9i_1",qe={"modal-header":"_modal-header_1jj9i_1","modal-header__close-button":"_modal-header__close-button_1jj9i_7","search-modal__title":"_search-modal__title_1jj9i_10",content:cx,trends:lx,"trends-content":"_trends-content_1jj9i_57","trends-item":"_trends-item_1jj9i_62","modal-auto-complete":"_modal-auto-complete_1jj9i_76","modal-search-empty":"_modal-search-empty_1jj9i_88",modal:ux,"search-modal__modal":"_search-modal__modal_1jj9i_100"},Jd=g.createContext({}),dx=({children:e,term:t,storeId:n})=>{const[o,s]=g.useState([]),[a,i]=g.useState(!1);return g.useEffect(()=>{if(!t){s([]);return}(async()=>{i(!0);try{const l=await fetch(`https://${n}.myvtex.com/_v/proxy/search/suggestedTerms`,{method:"POST",body:JSON.stringify({query:t,locale:"pt-BR"})}),{data:u}=await l.json();s((u==null?void 0:u.searches)||[])}catch(l){console.error("Erro ao buscar sugestões:",l)}})()},[t,n]),r.jsx(Jd.Provider,{value:g.useMemo(()=>({suggestedTerms:o,loading:a,setLoading:i}),[o,a]),children:e})},mx=({children:e,...t})=>r.jsx(dx,{...t,children:e}),px=()=>{const e=g.useContext(Jd);if(!e)throw new Error("useSuggestedTermsContext must be used within a SuggestedTermsProvider");return e},Gr=(e,t,n=24,o=1,s="release:desc")=>{const a=`/search?query=${t??""}&count=${n}&page=${o}${s?`&sort=${s.replace("_",":")}`:""}`;e.push(a)},em=({placeholder:e,noResultsTitle:t,noResultsLabel:n,noResultsTermText:o,handleClose:s,setTerm:a,ICONS:i,ITEMS_DEFAULT_SORT:c,ITEMS_PER_PAGE:l,SEARCH_MODAL:u})=>{const[p,m]=g.useState(""),{suggestedTerms:f,loading:h,setLoading:_}=px(),{router:y}=ce(),x=g.useRef(null),v=b=>{m(b.target.value),clearTimeout(x.current),b.target.value.length>2&&(a(b.target.value),x.current=setTimeout(()=>{a(b.target.value),_(!1)},2e3))},C=b=>{b.key==="Enter"&&(p==null?void 0:p.length)>2&&(s(),Gr(y,p,l,1,c))},j=b=>{s(),Gr(y,b,l,1,c)};return g.useEffect(()=>{if(clearTimeout(x.current),p.length<=2||f.length>0){_(!1);return}return _(!0),x.current=setTimeout(()=>{Gr(y,p,l,1,c),_(!1),s()},2e3),()=>{clearTimeout(x.current)}},[p,f]),r.jsx(d.DropDown.AutoComplete,{className:qe["modal-auto-complete"],onKeyDown:C,onInputChange:v,placeholder:e,stopClickPropagation:!1,adornment:{end:h?r.jsx(d.Spinner,{size:"small"}):r.jsx(d.Button,{variant:"tertiary",size:"small",iconNameStart:i.search,onClick:()=>{j(p)},disabled:!(p.length>2)})},children:(f==null?void 0:f.length)>0&&r.jsx(r.Fragment,{children:(f==null?void 0:f.length)>0&&(p==null?void 0:p.length)>2?r.jsx(d.DropDown.AutoCompleteList,{className:qe["modal-auto-complete__dropdown"],seeAll:r.jsx("span",{onClick:()=>j(p),children:o+p}),children:f.map((b,w)=>r.jsx(d.DropDown.ListItemWithLink,{children:r.jsx(Le,{href:`/search?query=${b.term}&count=${l}&page=1`,size:"x-small",title:b.term,disableUnderline:!0,disablePadding:!1,onClick:P=>{P.preventDefault(),s()},children:b.term})},`key-${b.term}-${w}`))}):!h&&(p==null?void 0:p.length)>3&&(f==null?void 0:f.length)===0&&r.jsxs(d.DropDown.AutoCompleteList,{className:qe["modal-search-empty"],children:[r.jsx(d.DropDown.NotResults,{description:n,title:t}),r.jsx(d.Button,{className:"all-terms",onClick:()=>{s(),y.push(u.EMPTY.ALL_TERMS)},variant:"tertiary",size:"medium",title:u.EMPTY.ALL_TERMS_LABEL,adornment:{end:r.jsx(d.Icon,{name:i.arrow_right,size:"medium"})},children:u.EMPTY.ALL_TERMS_LABEL})]})})})};em.displayName="SearchModal.AutoComplete";function fx({title:e,ICONS:t}){const{isMobile:n}=ne();return r.jsx(d.Modal.Header,{navigation:"top",className:qe["modal-header"],children:r.jsxs(d.Modal.Controls,{navigation:"top",isMobile:!!n,children:[r.jsx(d.Button,{"data-close":!0,iconNameStart:t.arrow_left,size:"small",variant:"tertiary"}),r.jsx(d.Modal.Title,{navigation:"top",className:qe["search-modal__title"],title:e}),r.jsx(d.Button,{className:qe["modal-header__close-button"],"data-close":!0,iconNameStart:t.close,size:"small",variant:"tertiary"})]})})}const tm=g.createContext({searches:[],isLoading:!1,error:null});let Kr=null;const hx=({children:e,storeId:t})=>{const[n,o]=g.useState([]),[s,a]=g.useState(!0),[i,c]=g.useState(null);return g.useEffect(()=>{(async()=>{try{if(a(!0),Kr){o(Kr),a(!1);return}const u=await fetch(`https://${t}.myvtex.com/_v/proxy/search/topSearch`);if(!u.ok)throw new Error(`Erro ao buscar os dados: ${u.status}`);const m=(await u.json()).data.searches||[];Kr=m,o(m)}catch(u){c(u instanceof Error?u.message:"Erro desconhecido")}finally{a(!1)}})()},[t]),r.jsx(tm.Provider,{value:g.useMemo(()=>({searches:n,isLoading:s,error:i}),[n,s,i]),children:e})},_x=()=>{const e=g.useContext(tm);if(!e)throw new Error("useTopSearches must be used within a TopSearchesProvider");return e},gx=({title:e,allTermsLabel:t,allTermsUrl:n,qtyTrends:o,handleClose:s,ICONS:a,ITEMS_PER_PAGE:i})=>{const{searches:c,isLoading:l}=_x(),{router:u}=ce(),p=Array.isArray(c)?c:[];return r.jsx(r.Fragment,{children:!l&&p.length>0?r.jsx(d.ComponentList.Structure,{className:qe.trends,title:e,children:r.jsxs("div",{className:qe["trends-content"],children:[r.jsx(d.ComponentList.List,{columns:1,children:p.slice(0,o).map((m,f)=>r.jsx(d.ComponentList.ListItem,{className:qe["trends-item"],children:r.jsx(Le,{href:`/search?query=${m.term}&count=${i}&page=1`,size:"x-small",adornments:{end:r.jsx(d.Icon,{name:a.arrow_right,size:"x-small"})},disableUnderline:!0,title:m.term,onClick:()=>s(),children:m.term})},`list-item-${f}`))}),r.jsx(d.Button,{className:"all-terms",variant:"tertiary",size:"x-small",underline:!1,onClick:()=>{s(),u.push(n)},adornment:{end:r.jsx(d.Icon,{name:a.arrow_right,size:"x-small"})},children:t})]})}):null})};function yx({SectionZone:e}){var o;const[t,n]=g.useState(null);return g.useEffect(()=>{(async()=>{try{const a=await fetch("/api/cms/content-type-client",{method:"POST",body:JSON.stringify({contentType:"search"})});if(!a.ok)return;const i=await a.json();n(i)}catch(a){console.error("[CMS FETCH ERROR]",a)}})()},[]),r.jsx("div",{className:qe.content,children:t!==null&&r.jsx(e,{data:((o=t[0])==null?void 0:o.sections)??[],componentConfigs:{"Product Carousel":{searchModal:!0}}})})}const nm=({className:e,trends:t,CONSTANTS:n,SectionZone:o})=>{const[s,a]=g.useState(""),{isMobile:i}=ne(),c=Ii(),{setValue:l}=Yn(),{SEARCH_MODAL:u,ICONS:p,ITEMS_PER_PAGE:m,ITEMS_DEFAULT_SORT:f,storeId:h}=n;return r.jsxs(d.Modal.Root,{isMobile:i??!1,variant:i?"sideBottom":"sideRight",isOpen:c,setIsOpen:l,className:`${qe.modal} ${qe["search-modal__modal"]} ${e??""}`,children:[r.jsx(fx,{title:u.HEADER.TITLE,ICONS:p}),r.jsxs(d.Modal.Body,{className:qe["modal-content-body"],children:[r.jsx(mx,{term:s,storeId:h,children:r.jsx(em,{placeholder:u.AUTOCOMPLETE.PLACEHOLDER,noResultsTitle:u.EMPTY.NOT_FOUND,noResultsLabel:u.EMPTY.NOT_FOUND_P,noResultsTermUrl:u.AUTOCOMPLETE.NO_RESULTS.NO_RESULTS_TERM_URL,noResultsTermText:u.AUTOCOMPLETE.NO_RESULTS.NO_RESULTS_TERM_TEXT,handleClose:()=>l(!1),setTerm:a,ICONS:p,ITEMS_DEFAULT_SORT:f,ITEMS_PER_PAGE:m,SEARCH_MODAL:u})}),t?r.jsx(hx,{storeId:h,children:r.jsx(gx,{title:u.TRENDS.TITLE,allTermsUrl:u.TRENDS.ALL_TERMS_URL,allTermsLabel:u.TRENDS.ALL_TERMS_LABEL,qtyTrends:u.TRENDS.QTY_TERMS,handleClose:()=>l(!1),ICONS:p,ITEMS_PER_PAGE:m})}):null,r.jsx(yx,{SectionZone:o})]})]})};nm.displayName="SearchModal";const Ke={"store--page-title":"_store--page-title_1rs1a_1","store--page-title--title":"_store--page-title--title_1rs1a_4","store--return-button":"_store--return-button_1rs1a_14","store--section":"_store--section_1rs1a_36","store--section--img":"_store--section--img_1rs1a_41","store--details":"_store--details_1rs1a_51","store--details--title":"_store--details--title_1rs1a_59","store--details--subtitle":"_store--details--subtitle_1rs1a_68","store--details--text":"_store--details--text_1rs1a_77","store--details--vendor":"_store--details--vendor_1rs1a_87","store--select":"_store--select_1rs1a_91","store--wrapper":"_store--wrapper_1rs1a_115"},rm=({LPLOJAS_TEMPLATE_RETURN_BUTTON:e,ICONS:t,showVendor:n})=>{const{selectedCity:o,selectedStore:s}=er();return r.jsx(d.Card,{padding:"small",shadow:!0,className:Ke["store--wrapper"],children:s?r.jsxs(r.Fragment,{children:[r.jsx(st.ReturnButton,{ICONS:t,children:e}),r.jsx(st.Details,{ICONS:t,showVendor:n,store:o==null?void 0:o.find(a=>a.nome===s)})]}):r.jsx(st.Select,{ICONS:t})})};rm.displayName="LPStores.Content";const Qt=({title:e,text:t,type:n,...o})=>r.jsx(d.TextStructure.DivWrapper,{...o,children:n==="title"?r.jsx("h4",{className:Ke["store--details--title"],children:e}):r.jsxs(r.Fragment,{children:[r.jsx("h5",{className:Ke["store--details--subtitle"],children:e}),r.jsx("p",{className:Ke["store--details--text"],children:t})]})});Qt.displayName="LPStores.Details";const om=({vendor:e,ICONS:t})=>{const n=e?e.split(","):[];return r.jsxs(d.Accordion.Wrapper,{style:{width:"100%"},children:[r.jsx(d.Accordion.Header,{id:"accordion-header-vendor",closeIndicator:r.jsx(d.Icon,{name:t.arrow_up,size:"small"}),openIndicator:r.jsx(d.Icon,{name:t.arrow_down,size:"small"}),title:"Código de vendedor (A)",children:r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{gap:0,children:r.jsx("h3",{className:"typography-style-body-md",children:"Código de vendedor (A)"})})})}),r.jsx(d.Accordion.Body,{children:r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{className:Ke["store--details--vendor"],children:n.map((o,s)=>r.jsx("p",{className:"typography-style-body-sm",children:o.trim()},s))})})})]})};om.displayName="LPStores.Details";const sm=({store:e,showVendor:t,ICONS:n})=>r.jsxs("div",{className:Ke["store--details"],children:[r.jsx(Qt,{alignItems:"left",title:String(e==null?void 0:e.nome),type:"title"}),r.jsx(Qt,{title:"Endereço",text:String(e.endereco)}),e.telefone&&r.jsx(Qt,{title:"Telefone",text:String(e.telefone)}),e.horario&&r.jsx(Qt,{title:"Horário de funcionamento",text:String(e.horario)}),t&&r.jsx(om,{ICONS:n,vendor:String(e.vendedoras)})]});sm.displayName="LPStores.Details";const am=({ICONS:e,arrowDownIcon:t=r.jsx(d.Icon,{name:e.arrow_down,size:"small"}),arrowUpIcon:n=r.jsx(d.Icon,{name:e.arrow_up,size:"small"}),list:o,selectText:s,...a})=>r.jsx(d.DropDown.DefaultDropDown,{...a,"aria-placeholder":s,adornmentListClosed:{end:t},adornmentListOpened:{end:n},mode:"simple",placeholder:s,sizeVariant:"large",children:r.jsx(d.DropDown.DefaultDropDownList,{placeholder:s,supportText:s,maxHeight:400,children:Array.isArray(o)&&(o==null?void 0:o.map(i=>r.jsx(d.DropDown.ListItem,{value:i,children:i},i.replace(/\s/g,""))))})});am.displayName="LPStores.DropDown";const im=({children:e,ICONS:t})=>{const{clearSelectedStore:n}=er(),o=()=>{typeof n=="function"&&n()};return r.jsxs("button",{"aria-label":String(e),className:Ke["store--return-button"],onClick:o,onKeyDown:o,children:[r.jsx(d.Icon,{name:t.arrow_left,size:"small"}),e]})};im.displayName="LPStores.ReturnButton";const cm=({children:e,data:t})=>r.jsx(Tc,{data:t,children:e});cm.displayName="LPStores.Root";const lm=({children:e,imgAlt:t,imgSrcDesk:n,imgSrcMob:o})=>{const{isMobile:s}=ne();return r.jsxs("section",{className:Ke["store--section"],children:[r.jsx(rn,{src:s?o:n,alt:t,fill:!0,className:Ke["store--section--img"]}),e]})};lm.displayName="LPStores.Section";const um=({ICONS:e})=>{const{data:t,handleSelectCity:n,selectedCity:o,handleSelectStore:s}=er(),a=new Set(t.map(c=>c.cidade)),i=Array.from(a).filter(c=>typeof c=="string");return r.jsxs("div",{className:Ke["store--select"],children:[r.jsx(st.DropDown,{selectText:"Selecione a cidade",handleSelectedValue:n,list:i,defaultValue:o==null?void 0:o[0].cidade,ICONS:e}),r.jsx(st.DropDown,{"data-selected-city":!!o,selectText:"Selecione a loja",handleSelectedValue:s,list:o?o==null?void 0:o.map(c=>String(c.nome)):[],ICONS:e},o==null?void 0:o[0].cidade)]})};um.displayName="LPStores.Select";const dm=({children:e})=>r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{className:Ke["store--page-title"],children:r.jsx("h2",{className:Ke["store--page-title--title"],children:e})})});dm.displayName="LPStores.Title";const st={Content:rm,Details:sm,DropDown:am,ReturnButton:im,Root:cm,Section:lm,Select:um,Title:dm};var mm={CUSTOM_VIEW_CART:{name:"custom_view_cart",destinations:["DataLayer"],requiredParams:["brand","region","line_items","currency","value","total_discount","subtotal","items"]},ADD_TO_WISHLIST:{name:"add_to_wishlist",destinations:["DataLayer"],requiredParams:["brand","region","line_items","currency","value","items"]},ADD_TO_CART:{name:"add_to_cart",destinations:["DataLayer"],requiredParams:["brand","region","line_items","currency","value","items"]},REMOVE_FROM_CART:{name:"remove_from_cart",destinations:["DataLayer"],requiredParams:["brand","region","line_items","currency","value","items"]},ADD_COUPON:{name:"add_coupon",destinations:["DataLayer"],requiredParams:["brand","region","coupon","coupon_message","seller_cod_name"]},SEARCH:{name:"search",destinations:["DataLayer"],requiredParams:["brand","search_term","search_found","search_quantity"]},SEARCH_ZIPCODE:{name:"search_zipcode",destinations:["DataLayer"],requiredParams:["brand","region","shippings","zipcode","flag_pickup"]},VIEW_PROMOTION:{name:"view_promotion",destinations:["DataLayer"],requiredParams:["brand","region","currency","promotion_name","creative_slot","creative_name","items"]},SELECT_PROMOTION:{name:"select_promotion",destinations:["DataLayer"],requiredParams:["brand","region","currency","promotion_name","creative_slot","creative_name","items"]},SELECT_CONTENT:{name:"select_content",destinations:["DataLayer"],requiredParams:["brand","content_type"]},SELECT_ITEM:{name:"select_item",destinations:["DataLayer"],requiredParams:["brand","region","items","line_items"]},VIEW_ITEM:{name:"view_item",destinations:["DataLayer"],requiredParams:["brand","line_items","currency","value","available_grid","items"]},VIEW_ITEM_LIST:{name:"view_item_list",destinations:["DataLayer"],requiredParams:["region","brand","line_items","items"]},BEGIN_CHECKOUT:{name:"begin_checkout",destinations:["DataLayer"],requiredParams:["brand","line_items","currency","value","total_discount","subtotal","items"]},CUSTOM_BEGIN_CHECKOUT:{name:"custom_begin_checkout",destinations:["DataLayer"],requiredParams:["brand","line_items","currency","value","total_discount","subtotal","items"]},AUTH_ACTION:{name:"auth_action",requiredParams:["region"]},ADD_PERSONAL_INFO:{name:"add_personal_info",destinations:["DataLayer"],requiredParams:["brand","pre_filled","line_items","currency","value","total_discount","subtotal"]},CUSTOM_ADD_SHIPPING_INFO:{name:"add_shipping_info",destinations:["DataLayer"],requiredParams:["brand","pre_filled","shipping","shipping_tier","line_items","currency","value","total_discount","subtotal","items"]},CUSTOM_ADD_PAYMENT_INFO:{name:"add_payment_info",destinations:["DataLayer"],requiredParams:["brand","pre_filled","line_items","currency","value","total_discount","payment_type","subtotal","items"]},ORDER_REVIEWED:{name:"order_reviewed",destinations:["DataLayer"],requiredParams:["brand","line_items","currency","value","total_discount","subtotal","payment_type"]},PURCHASE:{name:"purchase",destinations:["DataLayer"],requiredParams:["brand","shipping_tier","line_items","currency","value","shipping","transaction_id","total_discount","payment_type","seller_cod_name","subtotal","coupon","items"]},CUSTOM_PURCHASE:{name:"custom_purchase",destinations:["DataLayer"],requiredParams:["brand","shipping_tier","line_items","currency","value","shipping","transaction_id","total_discount","payment_type","seller_cod_name","subtotal","coupon","items"]},CUSTOM_USER_INFO:{name:"custom_user_info",destinations:["DataLayer"],requiredParams:["user_info"]},NOTIFY_ME:{name:"notify_me",destinations:["DataLayer"],requiredParams:["brand","line_items","size","item_ref"]}};function xx(e,t,n){const o=t.window,s=Object.assign({},t);if(delete s.window,o){o.dataLayer=o.dataLayer||[],o.dataLayer.push({event:e,ecommerce:s});return}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:e,ecommerce:s})}function vx(e,t,n){console.log(`%c[DT - ${n}] EVENTO DISPARADO:%c `,`background: ${t}; color: white; font-weight: bold; padding: 2px 4px; border-radius: 3px;`,"color: #fff;",e||"")}var pm=[["vale","vale crédito"],["pagaleve","pix"],["pix parcel","pix parcelado"],["pix","pix"],["apple","apple pay"],["google","google pay"],["boleto","boleto"],["paypal","paypal"],["cred","cartão"],["visa","cartão"],["master","cartão"],["amex","cartão"],["elo","cartão"],["hiper","cartão"],["diner","cartão"],["deb","cartão"]];function bx(e,t,n){vx({id:e,custom_data:t},"#00c851",n)}var jx={DataLayer:xx,Dito:bx};async function Cx(e,t){const n=mm[e];n&&await Promise.allSettled(n.destinations.map(async o=>{try{await jx[o](e.toLowerCase(),t,o)}catch(s){console.error(`[DT] Failed to send ${e} to ${o}:`,s)}}))}async function Sx(e){try{return await(await fetch(`/api/catalog_system/pub/products/search?fq=productId:${e}`)).json()}catch(t){console.log("[DT] Erro ao buscar dados do produto",t)}}function wx(e){try{const{pathname:t}=new URL(e,window.location.origin);return/\/p\/?$/.test(t)}catch{return!1}}function fm(e){if(!e)return null;const t=(()=>{try{return new URL(e,location.origin).pathname}catch{return e.split("?")[0]}})(),n=decodeURIComponent(t).match(/(\d+-\d+)(?=\/p|$)/);return n?n[1].replace("-","_"):null}async function Px(e){const t=fm(e);if(!t)return console.error("Não foi possível extrair o RefId da URL"),null;try{const n=await fetch(`/api/catalog_system/pub/products/search?fq=alternateIds_RefId:${t}`);if(!n.ok)throw new Error(`Erro na API: ${n.status}`);const o=await n.json();return(o==null?void 0:o[0])||null}catch(n){return console.error("Erro ao buscar dados do produto:",n),null}}function hm(e,t){var n,o,s,a;const i=(o=(n=e==null?void 0:e.shippingData)==null?void 0:n.logisticsInfo)==null?void 0:o.find(l=>l.itemId===t.id),c=(s=i==null?void 0:i.slas)==null?void 0:s.find(l=>l.id===i.selectedSla);return(a=c==null?void 0:c.pickupStoreInfo)!=null&&a.friendlyName?`retirada em loja: ${c.pickupStoreInfo.friendlyName}`:c!=null&&c.name?`Receba em casa: ${c.name}`:null}async function _m(e){var t,n;const o=await Sx(e.productId||e.productID||e.item_group_id);return o.length&&(n=(t=o[0].items.find(s=>s.name===e.skuName))==null?void 0:t.itemId)!=null?n:null}function mr(e){return e.discount||e.discount===0?e.discount:parseFloat(Math.max(e.listPrice-e.sellingPrice,0).toFixed(2))/100||0}function Et(e){const t=[()=>{var n;return((n=e==null?void 0:e.productCategories)==null?void 0:n[39])==="BAZAR"?"Sale":"Coleção"},()=>e.item_category||e.category,()=>e.categories[0]];for(const n of t){const o=n();if(o!=null)return o}return null}function fn(e){const t=[()=>Object.values((e==null?void 0:e.productCategories)||{}).pop(),()=>Object.values((e==null?void 0:e.categories)||{}).pop(),()=>{var n,o,s,a,i;return(i=(a=(s=(o=(n=e==null?void 0:e.category)==null?void 0:n.split)==null?void 0:o.call(n,">"))==null?void 0:s[1])==null?void 0:a.trim)==null?void 0:i.call(a)},()=>e.item_category2];for(const n of t){const o=n();if(o!=null)return o}return null}function gm(e){var t;const n=((t=e==null?void 0:e.additionalInfo)==null?void 0:t.tags)||(e==null?void 0:e.tags);return Array.isArray(n)&&n.length?n.join(","):null}var Nx={farm:"farmrio","farm etc":"farmetc","farm rio":"farmrio"};function Ea(e){if(!e)return null;const t=e.toLowerCase().trim();return Nx[t]||null}function ct(e){var t;let n=[];if(Array.isArray(e)&&e.every(a=>typeof a=="string"))n=e;else if(Array.isArray(e))n=e.map(a=>{var i;return((i=a.additionalInfo)==null?void 0:i.brandName)||a.brand});else if(typeof e=="object"&&e!==null&&"brand"in e)n=[((t=e.additionalInfo)==null?void 0:t.brandName)||e.brand];else return typeof e=="string"?Ea(e):null;const o=n.map(Ea).filter(a=>a!==null),s=[...new Set(o)].sort();return s.length>0?s.join("_"):null}function Ex(e){var t;if(!e.orderForm&&!((t=e.orderForm.items)!=null&&t.length))return null;const n=e.orderForm.items;return ct(n)}function Ix(e){var t;const{item:n}=e;return ct(((t=n==null?void 0:n.additionalInfo)==null?void 0:t.brandName)||n.brand||n.item_brand)}function Rx(e,t){if(e!=null&&e.brand)return ct(e.brand)||e.brand||null;switch(t){case"CUSTOM_VIEW_CART":case"ADD_COUPON":case"ADD_PERSONAL_INFO":case"CUSTOM_ADD_SHIPPING_INFO":case"CUSTOM_ADD_PAYMENT_INFO":case"BEGIN_CHECKOUT":case"CUSTOM_BEGIN_CHECKOUT":case"SEARCH_ZIPCODE":case"ORDER_REVIEWED":case"PURCHASE":case"CUSTOM_PURCHASE":return Ex(e);case"ADD_TO_CART":case"REMOVE_FROM_CART":return Ix(e);default:return null}}async function Tx(e){var t;const n=((t=e.orderForm)==null?void 0:t.items)||[];return n.length?await Promise.all(n.map(async o=>{var s,a,i;return{item_id:o.productId,item_category2:fn(o),item_category4:gm(o),item_shipping_tier:hm(e.orderForm,o),price:parseFloat((o.price/100).toFixed(2))||0,quantity:o.quantity||1,item_ref:o.refId||null,item_brand:ct((s=o.additionalInfo)==null?void 0:s.brandName)||((a=o.additionalInfo)==null?void 0:a.brandName)||null,item_sku:await _m(o)||o.id||null,item_name:o.name||o.id||null,item_category:Et(o)||null,item_variant:o.skuName.split(/[-/]/)[0].trim(),item_variant2:((i=o.skuName.split(/[-/]/).pop())==null?void 0:i.trim())||"",discount:mr(o)}})):[]}async function Ax(e,t){var n,o,s;const{item:a,orderForm:i}=e;return[{index:0,quantity:1,item_id:a.productId||a.item_group_id||a.sku||null,item_category2:fn(a),item_category4:gm(a),item_shipping_tier:t==="REMOVE_FROM_CART"?hm(i,a):null,price:a.listPrice||parseFloat((a.price/100).toFixed(2))||0,item_ref:a.refId||a.item_ref||(a==null?void 0:a.additionalProperty.find(c=>c.name==="RefId").value)||null,item_brand:((n=a.additionalInfo)==null?void 0:n.brandName)||a.item_brand||a.brand.name||null,item_sku:a.sku||a.id||a.item_id||await _m(a)||null,item_name:a.name||a.item_name||null,item_category:Et(a)||null,item_variant:(a.skuName||a.item_variant||a.name).split(/[-/]/)[0].trim()||null,item_variant2:a.size||((o=a==null?void 0:a.itemAttributes)==null?void 0:o.size)||((s=(a.skuName||a.name).split(/[-/]/).pop())==null?void 0:s.trim())||null,discount:mr(a),item_list_name:Et(a)||null,item_url:a.item_url||null}]}async function kx(e){return((e==null?void 0:e.list)||[]).map(t=>{var n,o,s,a,i;return{price:((n=t==null?void 0:t.price)==null?void 0:n.list)||(t==null?void 0:t.price)||((o=t==null?void 0:t.offers)==null?void 0:o.lowPrice)||0,quantity:1,item_ref:(t==null?void 0:t.ref)||(t==null?void 0:t.item_ref)||(t==null?void 0:t.referenceId[0].Value)||(t==null?void 0:t.additionalProperty.find(c=>c.name==="RefId").value)||null,index:typeof(e==null?void 0:e.index)=="number"?e.index:null,item_brand:ct((s=t==null?void 0:t.brand)==null?void 0:s.name)||ct(e.brand)||ct(t==null?void 0:t.item_brand)||null,item_name:(t==null?void 0:t.productName)||(t==null?void 0:t.alternateName)||(t==null?void 0:t.item_name)||((a=t==null?void 0:t.seo)==null?void 0:a.title)||null,item_category:Et(t)||null,item_variant:((i=t==null?void 0:t.name)==null?void 0:i.split("-")[0].trim())||(t==null?void 0:t.item_variant)||null,item_category2:fn(t)||null,item_id:(t==null?void 0:t.productID)||(t==null?void 0:t.productId)||(t==null?void 0:t.item_id)||(t==null?void 0:t.id)||null,discount:mr(t)||null,item_list_name:(e==null?void 0:e.itemListName)||Et(t)||null}})}async function Ox(e){var t,n,o;const{item:s}=e;return[{price:e.value||0,quantity:1,item_ref:s.ref||s.additionalProperty.find(a=>a.name==="RefId").value||null,item_brand:ct(s.brand.name)||ct(e.brand)||null,item_name:s.productName||s.alternateName||null,item_category:Et(s)||null,item_variant:((t=s==null?void 0:s.name)==null?void 0:t.split("-")[0].trim())||null,item_category2:fn(s)||((o=(n=s==null?void 0:s.category)==null?void 0:n.split(">")[1])==null?void 0:o.trim())||null,item_id:(s==null?void 0:s.productID)||(s==null?void 0:s.productId)||s.item_group_id||null,discount:mr(s)||null,item_sku:(s==null?void 0:s.sku)||(s==null?void 0:s.productId)||null,item_url:s.url||s.item_url||null,seller_id:s.seller||null}]}async function Lx(e){var t;if(!wx(e==null?void 0:e.bannerUrl))return[];const o=await Px(e==null?void 0:e.bannerUrl),s=o==null?void 0:o.items[0];return{price:(s==null?void 0:s.sellers[0].commertialOffer.Price)||0,quantity:1,item_ref:fm(e==null?void 0:e.bannerUrl),item_brand:ct(o.brand)||null,item_name:(o==null?void 0:o.productName)||(o==null?void 0:o.alternateName)||(o==null?void 0:o.item_name)||null,item_category:Et(o)||null,item_variant:((t=s==null?void 0:s.name)==null?void 0:t.split("-").pop().trim())||null,item_category2:fn(o)||null,item_id:(o==null?void 0:o.productId)||null,discount:(s==null?void 0:s.sellers[0].commertialOffer.ListPrice)-(s==null?void 0:s.sellers[0].commertialOffer.Price)||null}}function Mx(e,t){if(e!=null&&e.items)return e.items;switch(t){case"CUSTOM_VIEW_CART":case"BEGIN_CHECKOUT":case"CUSTOM_BEGIN_CHECKOUT":case"CUSTOM_ADD_SHIPPING_INFO":case"CUSTOM_ADD_PAYMENT_INFO":case"PURCHASE":case"CUSTOM_PURCHASE":return Tx(e);case"ADD_TO_CART":case"ADD_TO_WISHLIST":case"REMOVE_FROM_CART":return Ax(e,t);case"SELECT_ITEM":case"VIEW_ITEM_LIST":return kx(e);case"VIEW_ITEM":return Ox(e);case"VIEW_PROMOTION":case"SELECT_PROMOTION":return Lx(e);default:return null}}function Dx(e){var t,n,o;if(!e.orderForm)return null;const s=((t=e.orderForm.paymentData)==null?void 0:t.payments)||[],a=((n=e.orderForm.paymentData)==null?void 0:n.paymentSystems)||[];if(!s.length||!a.length)return null;const i=s.find(m=>m==null?void 0:m.paymentSystem)||s[0],c=String((i==null?void 0:i.paymentSystem)||"").trim();if(!c)return null;const l=a.find(m=>String(m.id)===c),u=((o=l==null?void 0:l.name)==null?void 0:o.toLowerCase())||"",p=pm.find(([m])=>u.includes(m));return p?p[1]:null}function $x(e){var t,n,o,s;if(!e.orderForm)return null;const a=((t=e.orderForm.paymentData)==null?void 0:t.transactions)||[];if(!a.length)return null;const i=((n=a[0])==null?void 0:n.payments)||[];if(!i.length)return null;const c=((s=(o=i[0])==null?void 0:o.paymentSystemName)==null?void 0:s.toLowerCase())||"",l=pm.find(([u])=>c.includes(u));return l?l[1]:null}function zx(e,t){if(e!=null&&e.paymentType)return e.paymentType;switch(t){case"ORDER_REVIEWED":case"CUSTOM_ADD_PAYMENT_INFO":return Dx(e);case"PURCHASE":case"CUSTOM_PURCHASE":return $x(e);default:return null}}var Fx={brand:Rx,items:Mx,payment_type:zx,user_info:async(e,t)=>{var n;const s=(n={animale:{store:"https://www.animale.com.br",checkout:"https://secure.animale.com.br"},farm:{store:"https://lojafarm.myvtex.com"},mariafilo:{store:"https://mariafilo.myvtex.com",checkout:"https://secure.mariafilo.com.br"},lojacrisbarros:{store:"https://lojacrisbarros.myvtex.com",checkout:"https://secure.crisbarros.com.br"},lojaoffpremium:{store:"https://lojaoffpremium.myvtex.com",checkout:"https://secure.lojaoffpremium.com.br"}}[e.account||"https://www.animale.com.br"])==null?void 0:n[e.platform||"store"];if(!s)return{customer:{email:e.userEmail,id:e==null?void 0:e.userId},address:null};try{const a=`${s}/_v/user-info`,i=await fetch(a,{method:"POST",body:JSON.stringify({email:e.userEmail})});return i.status!==200?{customer:{email:e.userEmail,id:e==null?void 0:e.userId},address:null}:await i.json()}catch{return{customer:{email:e.userEmail,id:e==null?void 0:e.userId},address:null}}},content_type:(e,t)=>"regiao".concat(":"+e.category).concat(e.subcategory?":"+e.subcategory:"").concat(":"+e.componentName)||null,region:(e,t)=>e.region||null,line_items:(e,t)=>e!=null&&e.lineItems?e.lineItems:e!=null&&e.item?[e.item.productId||e.item.productID||e.item.item_id]:e!=null&&e.list?e.list.map(n=>n.productID||(n==null?void 0:n.id)):(e.orderForm.items||[]).map(n=>n.productId).join(","),currency:(e,t)=>{var n,o,s,a;return e!=null&&e.currency?e.currency:e!=null&&e.bannerUrl?"BRL":e!=null&&e.item?((o=(n=e.item)==null?void 0:n.offers)==null?void 0:o.priceCurrency)||"BRL":((a=(s=e.orderForm)==null?void 0:s.storePreferencesData)==null?void 0:a.currencyCode)||null},value:(e,t)=>{var n;return e!=null&&e.value?e.value:e.item?e.item.price:((n=e.orderForm)==null?void 0:n.value)!=null?e.orderForm.value/100:null},total_discount:(e,t)=>{var n,o;const a=(((n=e.orderForm)==null?void 0:n.totalizers)||((o=e.orderForm)==null?void 0:o.totals)||[]).find(i=>i.id==="Discounts");return a?Math.abs(a.value)/100:0},subtotal:(e,t)=>{var n,o;return(((n=e.orderForm)==null?void 0:n.totalizers)||((o=e.orderForm)==null?void 0:o.totals)||[]).filter(i=>i.id==="Items").reduce((i,c)=>i+(c.value||0),0)/100||0},coupon_message:(e,t)=>{var n;if(e.couponMessage)return e.couponMessage;const o=((n=e.orderForm)==null?void 0:n.messages)||[];if(o.length===0)return null;const s=o.filter(a=>a.text.toLowerCase().includes("cupom"));return s.length===0?null:s.map(a=>a.text).join(" | ")},seller_cod_name:(e,t)=>e.appliedSellerCodName||(e==null?void 0:e.orderForm.marketingData.utmiCampaign)||null,coupon:(e,t)=>{var n,o;return e.appliedCoupon||((o=(n=e==null?void 0:e.orderForm)==null?void 0:n.marketingData)==null?void 0:o.coupon)||null},pre_filled:(e,t)=>!!e.preFilled,search_term:(e,t)=>e.searchTerm||null,search_found:(e,t)=>!!e.searchFound,search_quantity:(e,t)=>e.searchQuantity||0,promotion_name:(e,t)=>e.promotionName||null,creative_name:(e,t)=>e.creativeName||null,creative_slot:(e,t)=>e.creativeSlot||null,zipcode:(e,t)=>e.zipCode||null,size:(e,t)=>e.size||null,item_ref:(e,t)=>e.itemRef||null,flag_pickup:(e,t)=>{var n;const o=e.orderForm;return o?(((n=o.shippingData)==null?void 0:n.logisticsInfo)||[]).some(i=>{var c;return(c=i.slas)==null?void 0:c.some(l=>l.deliveryChannel==="pickup-in-point")}):null},shippings:(e,t)=>{const n=e.orderForm;if(!n)return null;const o={};for(const a of n.shippingData.logisticsInfo){const i=n.items[a.itemIndex];if(i)for(const c of a.slas){const l=c.name;o[l]||(o[l]={shipping_tier:c.name,delivery_time:parseInt(c.shippingEstimate),shipping:parseFloat((c.price/100).toFixed(1)),line_items:[]}),o[l].line_items.push(i.id)}}return Object.values(o).map(a=>({shipping:a.shipping,shipping_tier:a.shipping_tier,delivery_time:a.delivery_time,line_items:a.line_items.join(",")}))||null},shipping:(e,t)=>{var n,o,s;return((s=(o=(n=e==null?void 0:e.orderForm)==null?void 0:n.shippingData)==null?void 0:o.logisticsInfo)!=null?s:[]).reduce((i,c)=>{var l,u;const p=(l=c.slas)==null?void 0:l.find(m=>m.id===c.selectedSla);return i+((u=p==null?void 0:p.price)!=null?u:0)},0)},shipping_tier:(e,t)=>{var n,o,s,a;const c=((s=(o=(n=e==null?void 0:e.orderForm)==null?void 0:n.shippingData)==null?void 0:o.logisticsInfo)!=null?s:[]).find(f=>f.selectedSla);if(!c)return null;const l=(a=c.slas)==null?void 0:a.find(f=>f.id===c.selectedSla);if(!l)return null;const{deliveryChannel:u,name:p,pickupStoreInfo:m}=l;return u==="pickup-in-point"?`retirada em loja${m!=null&&m.friendlyName?`: ${m.friendlyName}`:""}`:u==="delivery"?`receba em casa${p?`: ${p}`:""}`:null},transaction_id:(e,t)=>{var n,o;return((o=(n=e.orderForm)==null?void 0:n.orderGroup)==null?void 0:o.toString())||null},available_grid:(e,t)=>e.availableGrid||null};async function Bx(e={},t){const n=mm[t];return n?Object.fromEntries(await Promise.all(n.requiredParams.map(async s=>{const a=Fx[s];return typeof a!="function"?(console.error(`[DT] Missing paramGetter for param: ${s}`),[s,null]):[s,await a(e,t)]}))):void 0}async function Ux(e,t={}){try{const n=await Bx(t,e);return await Cx(e,Object.assign({},n,{window:t.window}))}catch(n){return console.error(`[DT] Error tracking event ${e}:`,n)}}var xo={exports:{}},ym={};(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,{PathParamsContext:function(){return a},PathnameContext:function(){return s},SearchParamsContext:function(){return o}});const n=g,o=(0,n.createContext)(null),s=(0,n.createContext)(null),a=(0,n.createContext)(null);process.env.NODE_ENV!=="production"&&(o.displayName="SearchParamsContext",s.displayName="PathnameContext",a.displayName="PathParamsContext")})(ym);var vo={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getSegmentValue",{enumerable:!0,get:function(){return n}});function n(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)})(vo,vo.exports);var qx=vo.exports,bo={exports:{}},jo={exports:{}},Co={exports:{}},So={exports:{}},wo={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createAsyncLocalStorage",{enumerable:!0,get:function(){return a}});const n=new Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available");class o{disable(){throw n}getStore(){}run(){throw n}exit(){throw n}enterWith(){throw n}}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)})(wo,wo.exports);var bs=wo.exports;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"requestAsyncStorage",{enumerable:!0,get:function(){return o}});const o=(0,bs.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)})(So,So.exports);var Hx=So.exports;(function(e,t){"TURBOPACK { transition: next-shared }";Object.defineProperty(t,"__esModule",{value:!0});function n(a,i){for(var c in i)Object.defineProperty(a,c,{enumerable:!0,get:i[c]})}n(t,{getExpectedRequestStore:function(){return s},requestAsyncStorage:function(){return o.requestAsyncStorage}});const o=Hx;function s(a){const i=o.requestAsyncStorage.getStore();if(i)return i;throw new Error("`"+a+"` was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context")}(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)})(Co,Co.exports);var Vx=Co.exports,Po={exports:{}},No={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"actionAsyncStorage",{enumerable:!0,get:function(){return o}});const o=(0,bs.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)})(No,No.exports);var Wx=No.exports;(function(e,t){"TURBOPACK { transition: next-shared }";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"actionAsyncStorage",{enumerable:!0,get:function(){return n.actionAsyncStorage}});const n=Wx;(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)})(Po,Po.exports);var Gx=Po.exports,Eo={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"RedirectStatusCode",{enumerable:!0,get:function(){return n}});var n;(function(o){o[o.SeeOther=303]="SeeOther",o[o.TemporaryRedirect=307]="TemporaryRedirect",o[o.PermanentRedirect=308]="PermanentRedirect"})(n||(n={})),(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)})(Eo,Eo.exports);var Kx=Eo.exports;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function n(y,x){for(var v in x)Object.defineProperty(y,v,{enumerable:!0,get:x[v]})}n(t,{RedirectType:function(){return c},getRedirectError:function(){return l},getRedirectStatusCodeFromError:function(){return _},getRedirectTypeFromError:function(){return h},getURLFromRedirectError:function(){return f},isRedirectError:function(){return m},permanentRedirect:function(){return p},redirect:function(){return u}});const o=Vx,s=Gx,a=Kx,i="NEXT_REDIRECT";var c;(function(y){y.push="push",y.replace="replace"})(c||(c={}));function l(y,x,v){v===void 0&&(v=a.RedirectStatusCode.TemporaryRedirect);const C=new Error(i);C.digest=i+";"+x+";"+y+";"+v+";";const j=o.requestAsyncStorage.getStore();return j&&(C.mutableCookies=j.mutableCookies),C}function u(y,x){x===void 0&&(x="replace");const v=s.actionAsyncStorage.getStore();throw l(y,x,v!=null&&v.isAction?a.RedirectStatusCode.SeeOther:a.RedirectStatusCode.TemporaryRedirect)}function p(y,x){x===void 0&&(x="replace");const v=s.actionAsyncStorage.getStore();throw l(y,x,v!=null&&v.isAction?a.RedirectStatusCode.SeeOther:a.RedirectStatusCode.PermanentRedirect)}function m(y){if(typeof y!="object"||y===null||!("digest"in y)||typeof y.digest!="string")return!1;const[x,v,C,j]=y.digest.split(";",4),b=Number(j);return x===i&&(v==="replace"||v==="push")&&typeof C=="string"&&!isNaN(b)&&b in a.RedirectStatusCode}function f(y){return m(y)?y.digest.split(";",3)[2]:null}function h(y){if(!m(y))throw new Error("Not a redirect error");return y.digest.split(";",2)[1]}function _(y){if(!m(y))throw new Error("Not a redirect error");return Number(y.digest.split(";",4)[3])}(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)})(jo,jo.exports);var Xx=jo.exports,Io={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function n(i,c){for(var l in c)Object.defineProperty(i,l,{enumerable:!0,get:c[l]})}n(t,{isNotFoundError:function(){return a},notFound:function(){return s}});const o="NEXT_NOT_FOUND";function s(){const i=new Error(o);throw i.digest=o,i}function a(i){return typeof i!="object"||i===null||!("digest"in i)?!1: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)})(Io,Io.exports);var Yx=Io.exports;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function n(c,l){for(var u in l)Object.defineProperty(c,u,{enumerable:!0,get:l[u]})}n(t,{ReadonlyURLSearchParams:function(){return i},RedirectType:function(){return o.RedirectType},notFound:function(){return s.notFound},permanentRedirect:function(){return o.permanentRedirect},redirect:function(){return o.redirect}});const o=Xx,s=Yx;class a extends Error{constructor(){super("Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams")}}class i extends URLSearchParams{append(){throw new a}delete(){throw new a}set(){throw new a}sort(){throw new a}}(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)})(bo,bo.exports);var Qx=bo.exports,xm={};(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=un()._(g),s=o.default.createContext(null);function a(i){const c=(0,o.useContext)(s);c&&c(i)}})(xm);var Ln={exports:{}},Xr={},Ia;function Zx(){return Ia||(Ia=1,function(e){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,{BailoutToCSRError:function(){return o},isBailoutToCSRError:function(){return s}});const n="BAILOUT_TO_CLIENT_SIDE_RENDERING";class o extends Error{constructor(i){super("Bail out to client-side rendering: "+i),this.reason=i,this.digest=n}}function s(a){return typeof a!="object"||a===null||!("digest"in a)?!1:a.digest===n}}(Xr)),Xr}var Mn={exports:{}},Dn={exports:{}},Ra;function Jx(){return Ra||(Ra=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"staticGenerationAsyncStorage",{enumerable:!0,get:function(){return o}});const o=(0,bs.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)}(Dn,Dn.exports)),Dn.exports}var Ta;function ev(){return Ta||(Ta=1,function(e,t){"TURBOPACK { transition: next-shared }";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"staticGenerationAsyncStorage",{enumerable:!0,get:function(){return n.staticGenerationAsyncStorage}});const n=Jx();(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)}(Mn,Mn.exports)),Mn.exports}var Aa;function tv(){return Aa||(Aa=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"bailoutToClientRendering",{enumerable:!0,get:function(){return s}});const n=Zx(),o=ev();function s(a){const i=o.staticGenerationAsyncStorage.getStore();if(!(i!=null&&i.forceStatic)&&i!=null&&i.isStaticGeneration)throw new n.BailoutToCSRError(a)}(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)}(Ln,Ln.exports)),Ln.exports}(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function n(v,C){for(var j in C)Object.defineProperty(v,j,{enumerable:!0,get:C[j]})}n(t,{ReadonlyURLSearchParams:function(){return l.ReadonlyURLSearchParams},RedirectType:function(){return l.RedirectType},ServerInsertedHTMLContext:function(){return u.ServerInsertedHTMLContext},notFound:function(){return l.notFound},permanentRedirect:function(){return l.permanentRedirect},redirect:function(){return l.redirect},useParams:function(){return h},usePathname:function(){return m},useRouter:function(){return f},useSearchParams:function(){return p},useSelectedLayoutSegment:function(){return x},useSelectedLayoutSegments:function(){return y},useServerInsertedHTML:function(){return u.useServerInsertedHTML}});const o=g,s=Jc(),a=ym,i=qx,c=rs,l=Qx,u=xm;function p(){const v=(0,o.useContext)(a.SearchParamsContext),C=(0,o.useMemo)(()=>v?new l.ReadonlyURLSearchParams(v):null,[v]);if(typeof window>"u"){const{bailoutToClientRendering:j}=tv();j("useSearchParams()")}return C}function m(){return(0,o.useContext)(a.PathnameContext)}function f(){const v=(0,o.useContext)(s.AppRouterContext);if(v===null)throw new Error("invariant expected app router to be mounted");return v}function h(){return(0,o.useContext)(a.PathParamsContext)}function _(v,C,j,b){j===void 0&&(j=!0),b===void 0&&(b=[]);let w;if(j)w=v[1][C];else{const R=v[1];var P;w=(P=R.children)!=null?P:Object.values(R)[0]}if(!w)return b;const S=w[0],N=(0,i.getSegmentValue)(S);return!N||N.startsWith(c.PAGE_SEGMENT_KEY)?b:(b.push(N),_(w,C,!1,b))}function y(v){v===void 0&&(v="children");const C=(0,o.useContext)(s.LayoutRouterContext);return C?_(C.tree,v):null}function x(v){v===void 0&&(v="children");const C=y(v);if(!C||C.length===0)return null;const j=v==="children"?C[0]:C[C.length-1];return j===c.DEFAULT_SEGMENT_KEY?null:j}(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)})(xo,xo.exports);var nv=xo.exports,ka=nv;function rv({accountName:e}){const{user:t}=qt(),n=ka.usePathname(),o=ka.useSearchParams(),s=(t==null?void 0:t.sub)||(t==null?void 0:t.email),a=t==null?void 0:t.userId;return g.useEffect(()=>{s&&a?Ux("CUSTOM_USER_INFO",{userId:a,userEmail:s,platform:"store",account:e}):console.warn("[DT] Usuário deslogado ou sessão carregando...")},[n,o,s,a]),null}const ov="_active_6vo4c_380",sv="_banner_6vo4c_655",av="_container_6vo4c_689",iv="_slugs_6vo4c_703",cv="_root_6vo4c_785",lv="_otContainer_6vo4c_797",Ct={active:ov,banner:sv,container:av,slugs:iv,"content-page-modifier":"_content-page-modifier_6vo4c_741",root:cv,otContainer:lv};function uv({title:e,srcImages:t,children:n,className:o,...s}){const{isMobile:a}=ne(),i=a?t.mobile:t.desktop;return r.jsxs("div",{...s,className:d.helpers.classNameConcat(Ct.banner,o),children:[r.jsx(Pe.Image,{src:i,alt:e,fill:!0}),n||r.jsx("h1",{children:e})]})}const Ro=({children:e,className:t})=>r.jsx("div",{className:d.helpers.classNameConcat(Ct.container,t),children:e});Ro.displayName="Politicas.Container";const dv=({oneTrust:e})=>{const t=()=>{window.OneTrust&&window.OneTrust.NoticeApi&&window.OneTrust.NoticeApi.Initialized&&window.OneTrust.NoticeApi.Initialized.then(function(){window.OneTrust.NoticeApi.LoadNotices([e.policyScript])})};return g.useEffect(()=>{window.OneTrust&&t()},[]),r.jsxs(r.Fragment,{children:[r.jsx(xs,{onLoad:t,id:"otprivacy-notice-script",src:"https://privacyportal-cdn.onetrust.com/privacy-notice-scripts/otnotice-1.0.min.js"}),r.jsx("div",{className:Ct.otContainer,children:r.jsx("div",{id:"otnotice-container",children:r.jsx("div",{id:`otnotice-${e.policyId}`,className:"otnotice"})})})]})},Oa={"card-image-wrapper":"_card-image-wrapper_10mul_1","card-image-container":"_card-image-container_10mul_9"},vm=e=>{const{nextimage:t}=ce();return r.jsx(Qe,{name:e.name,children:e.data.banners.map((n,o)=>r.jsx("div",{className:Oa["card-image-wrapper"],children:r.jsx("div",{className:Oa["card-image-container"],children:r.jsx(t,{src:n.image,alt:n.altImage?n.altImage:"Banner Coleção",width:500,height:600})})},o))})},mv="_embedLiveContainer_1ss0l_2",pv="_embedLivePlayer_1ss0l_7",La={embedLiveContainer:mv,embedLivePlayer:pv},bm=({data:e,name:t})=>r.jsx(Qe,{name:t,children:r.jsx("div",{className:La.embedLiveContainer,children:r.jsx("div",{className:La.embedLivePlayer,children:e.banner.videosrc?r.jsx(Pe.Video,{src:e.banner.videosrc??"",playsInline:!0,autoPlay:!0,loop:!0,muted:!0,title:"Live",controls:!0}):r.jsxs("div",{children:[r.jsx("iframe",{src:e.banner.embed_source??"",allow:"autoplay; fullscreen; picture-in-picture; loop;",title:"Live"}),r.jsx(xs,{src:"https://player.vimeo.com/api/player.js",defer:!0,strategy:"lazyOnload"})]})})})}),To={"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 fv(e,t){const{mediatorRef:n}=ne();g.useEffect(()=>n.current.subscribe(e,t),[e,t])}const Ma=({prevOnClick:e,nextOnClick:t,onBulletClick:n,currentPage:o,totalPages:s,position:a,hideControllers:i,left:c,isFirst:l,ICONS:u})=>{const[p,m]=g.useState("default");return fv("herobanner:change_controllers_variant",f=>{l&&m(f.includes("white")?"inverse":"default")}),r.jsxs(d.Carousel.Controller,{className:To["carousel-controllers-modifier"],position:a??"absolute","data-hide-controllers":i,bottom:"16px",top:"unset",left:c,children:[r.jsxs(d.Carousel.Arrows,{className:To["carrousel-arrows-display-controller"],children:[r.jsx(d.Button,{variant:"tertiary",onClick:e,adornment:{start:r.jsx(d.Icon,{name:u.arrow_left})},mode:p}),r.jsx(d.Button,{variant:"tertiary",onClick:t,adornment:{start:r.jsx(d.Icon,{name:u.arrow_right})},mode:p})]}),r.jsx(d.Carousel.Bullets,{page:o,total:s,onBulletClick:n,mode:p})]})},hv=({children:e,data:t,banner:n,...o})=>{const{mediatorRef:s}=ne();return t.data.first?r.jsx(or,{observerOptions:{threshold:.51},stopOnIntersection:!1,callBackWhenVisible:()=>{s.current.publish("header:change_variant",n.headerVariant)},...o,children:e}):r.jsx(r.Fragment,{children:e})},jm=e=>{const{initialize:t,pagination:n,controller:o,itemsStyles:s}=d.Carousel.useCarousel({gap:e.data.config.gap,itemsPerPage:e.data.config.slidesPerView,direction:"row"}),a=g.useRef(void 0),i=g.useMemo(()=>Sd(e.data.config.controllerPosition??"dentro-inferior-centro"),[e]),c=g.useCallback(()=>{e.data.config.slideDuration&&n.totalPages>1&&(a.current=setInterval(()=>{o==null||o.nextPage()},e.data.config.slideDuration*1e3))},[o,e.data.config.slideDuration,n.totalPages]),l=g.useCallback(p=>{clearInterval(a.current),c(),p()},[c]),u=g.useMemo(()=>{var p;return{nextOnClick:()=>l(()=>o==null?void 0:o.nextPage()),prevOnClick:()=>l(()=>o==null?void 0:o.prevPage()),onBulletClick:m=>l(()=>o==null?void 0:o.navigateTo(m)),currentPage:n.currentPage,totalPages:n.totalPages,position:i.position,hideControllers:((p=e.data.config)==null?void 0:p.hideControllers)??!1,left:i.left}},[n.currentPage,n.totalPages,i.position,e.data.config.hideControllers,l,o]);return g.useEffect(()=>(c(),()=>clearInterval(a.current)),[c]),r.jsx(Qe,{name:e.name,children:r.jsxs(d.Carousel.Root,{innerRef:p=>{t(p)},className:d.helpers.classNameConcat(To["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"&&n.totalPages>1?r.jsx(Ma,{ICONS:e.ICONS,...u,isFirst:e.data.first}):r.jsx(r.Fragment,{}),r.jsx(d.Carousel.Body,{children:e==null?void 0:e.data.banners.map((p,m)=>r.jsx(d.Carousel.Item,{style:s,children:r.jsx(hv,{data:e,banner:p,children:r.jsx(mn,{name:"Banner Carousel",ICONS:e.ICONS,TEXTCONTENT_EXPANDED:e.TEXTCONTENT_EXPANDED,TIME_ZONE:e.TIME_ZONE,suppressContentEditableWarning:!0,suppressHydrationWarning:!0,className:e.className,data:{banner:p,index:m,componentIndex:e.data.componentIndex},creative:"banner-carousel",...e.data.first&&m===0&&{priority:!0}})})},`hero-banner-item-${m}`))}),i.shouldRender==="bottom"&&n.totalPages>1?r.jsx(Ma,{ICONS:e.ICONS,...u}):r.jsx(r.Fragment,{})]})})},kt={"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"},Cm=({data:e,name:t,CONSTANTS:n})=>{var p;const{isMobile:o}=ne(),s=e.config.size??"medium",a=e.config.disableCarouselMobile??!1,{initialize:i,pagination:c,controller:l,itemsStyles:u}=d.Carousel.useCarousel({itemsPerPage:o?e==null?void 0:e.config.slidesPerViewMobile:(p=e==null?void 0:e.config)==null?void 0:p.slidesPerView,gap:o?e.config.gapMobile:e.config.gap,direction:o&&a?"column":"row"});return r.jsx(Qe,{name:t,children:r.jsx(d.Utils.Column,{style:{width:s==="small"?"70%":"100%"},alignContent:"center",justifyContent:"center",alignItems:"center",children:r.jsxs(d.Carousel.Root,{innerRef:m=>{i(m)},className:d.helpers.classNameConcat(kt["carousel-modifier"],"common-section"),children:[s==="medium"?r.jsxs(d.TextStructure.Root,{children:[n.ACTIVE_BENNEFITS_BAR_TITLE&&r.jsx(d.TextStructure.DivWrapper,{className:kt["carousel-title-modifier"],children:r.jsx("h2",{className:"typography-style-body-lg",children:n.BENNEFITS_BAR_TITLE})}),o&&c.totalPages>1&&r.jsx(d.Carousel.Controller,{className:d.helpers.classNameConcat(kt["row-controller-modifier"],n.ACTIVE_BENNEFITS_BAR_TITLE?kt["title-on"]:void 0),children:r.jsxs(d.Carousel.Arrows,{children:[r.jsx(d.Button,{variant:"tertiary",onClick:()=>l==null?void 0:l.prevPage(),adornment:{start:r.jsx(d.Icon,{name:n.ICONS.arrow_left})}}),r.jsx(d.Button,{variant:"tertiary",onClick:()=>l==null?void 0:l.nextPage(),adornment:{start:r.jsx(d.Icon,{name:n.ICONS.arrow_right})}})]})})]}):r.jsx(r.Fragment,{}),r.jsx(d.Carousel.Body,{children:e.bennefit.map((m,f)=>r.jsx(d.Carousel.Item,{className:kt["card-modifier"],style:u,children:r.jsx(d.Card,{stroke:!0,padding:"small",children:r.jsx(d.TextStructure.Root,{layoutProps:{columnWrapper:{alignContent:"start",alignItems:"start",justifyContent:"start"},textRow:{alignContent:"center",alignItems:"center",justifyContent:"center"}},adornment:{[s==="medium"?"top":"start"]:r.jsx(d.Icon,{name:m.icon,size:s==="medium"?"medium":"small"})},children:r.jsxs(d.TextStructure.DivWrapper,{alignItems:"start",children:[r.jsx("h3",{className:"typography-style-body-md",children:m.title}),m.subtitle&&m.subtitle.length?r.jsx("p",{className:"typography-style-body-xs",children:m.subtitle}):r.jsx(r.Fragment,{})]})})})},`bennefit=${f}`))}),!o&&c.totalPages>1?r.jsxs(d.Carousel.Controller,{className:kt["row-controller-modifier"],children:[r.jsxs(d.Carousel.Arrows,{children:[r.jsx(d.Button,{variant:"tertiary",onClick:()=>l==null?void 0:l.prevPage(),adornment:{start:r.jsx(d.Icon,{name:n.ICONS.arrow_left})}}),r.jsx(d.Button,{variant:"tertiary",onClick:()=>l==null?void 0:l.nextPage(),adornment:{start:r.jsx(d.Icon,{name:n.ICONS.arrow_right})}})]}),r.jsx(d.Carousel.Bullets,{page:c.currentPage,total:c.totalPages,onBulletClick:m=>l==null?void 0:l.navigateTo(m)})]}):r.jsx(r.Fragment,{})]})})})},Sm=({data:{componentIndex:e,...t},name:n,CONSTANTS:o})=>r.jsx(Qe,{name:n,children:r.jsx(vs,{...t,CONSTANTS:o})}),wm=({data:e,ICONS:t,TEXTCONTENT_EXPANDED:n,className:o,name:s})=>r.jsx(Qe,{name:s,children:r.jsx("div",{className:d.helpers.classNameConcat(ho.textContentSection,o??""),style:e.borderTop?{borderTop:"none"}:void 0,children:r.jsx(wd,{data:e,ICONS:t,TEXTCONTENT_EXPANDED:n})})}),Da={"accordion-modifier":"_accordion-modifier_1we16_1","accordion-body-modifier":"_accordion-body-modifier_1we16_7"},Pm=({data:e,id:t,ICONS:n,className:o,name:s})=>{var c;const[a,i]=g.useState([]);return r.jsx(Qe,{name:s,children:r.jsxs(d.Utils.Column,{gap:"var(--gap-vertical-sm)",className:o??"",children:[e.titleAccordion?r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{children:r.jsx("h2",{className:d.helpers.classNameConcat("typography-style-heading-sm","common-section"),style:{fontWeight:500},children:e.titleAccordion})})}):r.jsx(r.Fragment,{}),(c=e.accordions)==null?void 0:c.map((l,u)=>r.jsxs(d.Accordion.Wrapper,{className:Da["accordion-modifier"],children:[r.jsx(d.Accordion.Header,{id:`${t}-text-accordion-${u}`,openIndicator:r.jsx(d.Icon,{name:n.arrow_down}),closeIndicator:r.jsx(d.Icon,{name:n.arrow_up}),startOpen:a.includes(u),onClick:()=>i(p=>p.includes(u)?p.filter(m=>m!==u):[...p,u]),children:r.jsx(d.TextStructure.Root,{children:r.jsxs(d.TextStructure.DivWrapper,{children:[r.jsx("h3",{className:"typography-style-body-md-strong",children:l.title}),l.subtitle&&l.subtitle.length?r.jsx("h2",{children:l.subtitle}):r.jsx(r.Fragment,{})]})})}),r.jsx(d.Accordion.Body,{children:r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{className:Da["accordion-body-modifier"],children:r.jsx(tt.Editor,{editorKey:`${t}-editor-${u}`,blockRenderMap:Gn,editorState:l.text?Wn(JSON.parse(l.text)):tt.EditorState.createEmpty(),onChange:()=>null})})})})]},`${t}-accordion-${u}-${a.includes(u)}`))]})})},Nm=async e=>{const{type:t,storeId:n}=e,o=t==="collectionSearch"?`https://${n}.myvtex.com/_v/proxy/search/product`:`https://${n}.myvtex.com/_v/proxy/search/crosselling`,s=JSON.stringify(t==="collectionSearch"?{...e.params,facets:e.facets,term:e.term,forceUpdate:!1}:e.facets);return(await fetch(o,{method:"POST",headers:{"Content-Type":"application/json"},body:s}).then(i=>i.json()).then(i=>t==="collectionSearch"?i.data.products:i.products)).filter(i=>!!i.node.availability.status)},_v="_shelf__container_bi04n_10",Em={shelf__container:_v},gv=({collectionSearch:e,title:t,CONSTANTS:n,searchModal:o})=>{const[s,a]=g.useState([]),{isMobile:i}=ne(),{ref:c,inView:l}=Ba.useInView({threshold:.7,delay:100,triggerOnce:!0}),{sendDataLayerEvent:u}=ae();return g.useEffect(()=>{if(!e)return;function p(){var m,f;Nm({type:"collectionSearch",term:e==null?void 0:e.term,facets:e==null?void 0:e.facets,params:{count:((m=e==null?void 0:e.params)==null?void 0:m.count)??12,sort:((f=e==null?void 0:e.params)==null?void 0:f.sort)??n.ITEMS_DEFAULT_SORT},storeId:n.storeId}).then(h=>{a(h)})}p()},[e]),g.useEffect(()=>{!l||s.length===0||u({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:s},customData:{item_list_name:t??"Você também pode gostar"}}})},[l,s]),s.length===0?null:r.jsx("div",{ref:c,className:Em.shelf__container,children:r.jsx(nn.Shelf,{title:t??"Você também pode gostar",itemsPerPage:o?{desktop:2,mobile:1.4}:{desktop:4.4,mobile:2.2},ICONS:n.ICONS,children:Array.isArray(s)&&s.map(({node:p},m)=>{const{availability:{status:f}}=p;return f?r.jsx(nn.Card,{item:p,isMobile:i,size:"medium",index:m,shelfTitle:t??"Você também pode gostar",CONSTANTS:n},p.id):null})})})},yv=({recommendationSearch:e,title:t,CONSTANTS:n})=>{const[o,s]=g.useState([]),{isMobile:a}=ne(),{ref:i,inView:c}=Ba.useInView({threshold:.7,delay:100,triggerOnce:!0}),{sendDataLayerEvent:l}=ae(),u=g.useMemo(()=>e?[{key:e.type,value:e.productId}]:[],[e]);return g.useEffect(()=>{if(!e)return;function p(){var m;Nm({type:"recommendationSearch",facets:u,params:{count:((m=e==null?void 0:e.params)==null?void 0:m.count)??12,sort:n.ITEMS_DEFAULT_SORT},storeId:n.storeId}).then(f=>s(f))}p()},[u,e]),g.useEffect(()=>{if(!c||o.length===0||(e==null?void 0:e.type)==="suggestions")return;const p=t??"Você também pode gostar";l({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:o},customData:{item_list_name:p},outsideEcommerceData:{item_list_name:p}}})},[c,o]),(o==null?void 0:o.length)===0?null:(e==null?void 0:e.type)==="suggestions"?r.jsx(Cl,{products:o,innerRef:i,inView:c,CONSTANTS:n}):r.jsx("div",{ref:i,className:Em.shelf__container,children:r.jsx(nn.Shelf,{title:t??"Você também pode gostar",itemsPerPage:{desktop:4.4,mobile:2.2},ICONS:n.ICONS,children:Array.isArray(o)&&o.map(({node:p},m)=>{const{availability:{status:f}}=p;return f?r.jsx(nn.Card,{item:p,isMobile:a,size:"medium",index:m,shelfTitle:t??"Você também pode gostar",CONSTANTS:n},p.id):null})})})},Im=({data:e,name:t,CONSTANTS:n})=>{const{productId:o}=wc();return!(e!=null&&e.productLists)||e.productLists.length===0?null:e.productLists.map((s,a)=>r.jsx(Qe,{name:t,children:r.jsx(yv,{title:s.title,recommendationSearch:{type:s.product_group_option,productId:o,params:{count:s.number_of_items,sort:"score:desc"}},CONSTANTS:n},`shelf=${a}`)}))},Rm=({data:e,CONSTANTS:t,searchModal:n,name:o})=>{var a;const s=(a=e==null?void 0:e.productLists)==null?void 0:a.filter(i=>!!i.collectionId||!!i.search_base_name);return!s||s.length===0?null:s.map((i,c)=>{const l=i.collectionId?{term:"",facets:[{key:"productclusterids",value:`${i.collectionId}`}]}:{term:i.search_base_name,facets:[]};return r.jsx(Qe,{name:o,children:r.jsx(gv,{title:i.title,collectionSearch:{params:{count:i.number_of_items,sort:i.sort},...l},searchModal:n,CONSTANTS:t},`shelf=${c}`)})})},xv="_popup_5taxs_9",vv="_popup__overlay_5taxs_19",bv="_popup__modal_5taxs_27",Ue={popup:xv,popup__overlay:vv,popup__modal:bv,"popup__modal--form":"_popup__modal--form_5taxs_49","popup__modal--header":"_popup__modal--header_5taxs_66","popup__modal--status":"_popup__modal--status_5taxs_69","popup__modal--checkbox":"_popup__modal--checkbox_5taxs_78","popup__modal--success":"_popup__modal--success_5taxs_90","popup__modal--close":"_popup__modal--close_5taxs_101"},jv=e=>r.jsx("div",{className:Ue["popup__modal--success"],children:r.jsx(d.TextStructure.Root,{adornment:{start:r.jsx(d.Icon,{name:e.ICONS.check_circle,size:"large"})},children:r.jsxs(d.TextStructure.DivWrapper,{className:Ue["text-structure-modifier"],children:[r.jsx("h3",{className:"typography-style-body-sm-strong",children:e.successTitle}),r.jsx("p",{className:"typography-style-body-caption",children:e.successDescription})]})})}),Cv=e=>{const{title:t,description:n,groups:o,ICONS:s}=e,{formErrors:a,submitForm:i,success:c}=dr(),[l,u]=g.useState(!1);return r.jsx("form",{onSubmit:i,className:Ue.formContainer,children:r.jsxs("div",{className:Ue["popup__modal--form"],children:[r.jsxs(d.TextStructure.DivWrapper,{className:Ue["popup__modal--header"],children:[r.jsx("strong",{className:"typography-style-body-md-strong",children:t}),r.jsx("p",{className:"typography-style-body-xs",children:n})]}),c?r.jsx(jv,{...e}):r.jsxs(r.Fragment,{children:[o.map(p=>r.jsx(zt.FieldGroup,{group:p,children:r.jsx(zt.FieldWrapper,{fields:p.fields})},p.groupLabel)),r.jsx(d.Checkbox,{className:Ue["popup__modal--checkbox"],adornment:r.jsx(d.Icon,{name:s.check,size:"small"}),name:"terms-and-conditions",label:"Li e aceito os termos de política de privacidade abaixo.",sizeVariant:"small",checked:l,onChange:()=>u(!l)}),r.jsxs("div",{children:[!l&&r.jsx(d.TextStructure.DivWrapper,{className:Ue["popup__modal--status"],children:r.jsxs("p",{className:"typography-style-body-caption",children:[r.jsx(d.Icon,{size:"small",name:s.alert_circle}),Ap]})}),r.jsx(d.Button,{disabled:!l,size:"medium",type:"submit",children:Op}),a.length?r.jsx(d.TextStructure.DivWrapper,{className:Ue["popup__modal--status"],children:r.jsx("p",{className:d.helpers.classNameConcat(Ue.formSubmitWarning,"typography-style-body-xs"),children:kp})}):null]})]})]})})},Tm=({data:e,name:t,CONSTANTS:n})=>{const[o,s]=g.useState(!1),a=typeof window<"u"?window.sessionStorage.getItem(n.POPUP_TRACK_STORAGE)||window.localStorage.getItem(n.POPUP_SUBMITTED_STORAGE):null,i=()=>{s(!1),window.sessionStorage.setItem(n.POPUP_TRACK_STORAGE,"true")};return g.useEffect(()=>{setTimeout(()=>!a&&s(!0),2e3)},[]),e.active&&o?r.jsx(Qe,{name:t,children:r.jsxs("div",{className:Ue.popup,children:[r.jsx("div",{onClick:i,className:Ue.popup__overlay}),r.jsxs("div",{className:Ue.popup__modal,children:[r.jsx(d.Button,{onClick:i,variant:"tertiary",className:Ue["popup__modal--close"],children:r.jsx(d.Icon,{style:{color:e.closeColor||"#000"},name:n.ICONS.close,size:"medium"})}),r.jsx("div",{children:r.jsx(Pe.Image,{src:e.imageUrl,width:"459",height:"418",alt:e.title})}),r.jsx(Zd,{...e,children:r.jsx(Cv,{...e,ICONS:n.ICONS})})]})]})}):null},Sv={"Image Grid":vm,"Embed Live":bm,"Banner Carousel":jm,Banner:_s,"Bennefits Bar":Cm,newsletter:Sm,TextContent:wm,TextAccordion:Pm,"Product Carousel":Rm,"PDP Product Carousel":Im,"Popup Modal":Tm},Am=({data:e,identifyWhoIsFirst:t=!1,componentConfigs:n})=>e==null?void 0:e.map((o,s)=>{const a=Sv[o.name],i={...(n==null?void 0:n[o.name])??{}};return t&&s===0&&(o.data.first=!0),o.data.componentIndex=s,o.name==="TextAccordion"&&(i.id=`text-accordion-${s}`),a?r.jsx(a,{name:o.name,data:o.data,...i},`section-zone-component-${s}`):null});async function wv({slug:e,pageData:t,tabsData:n,oneTrust:o}){var c,l,u,p;const a=(n?[...n].sort((m,f)=>m.config.tabConfig.order-f.config.tabConfig.order):[]).map(m=>({slug:m.config.seo.slug||ao(m.config.tabConfig.title),title:m.config.tabConfig.title})),i=n==null?void 0:n.find(m=>m.config.seo.slug===`/${decodeURIComponent(e)}`);return i&&(i.id=ao(i.config.seo.slug||"")),r.jsxs("div",{className:Ct.root,children:[r.jsx(Ro,{children:r.jsx(uv,{title:(c=t==null?void 0:t.config.banners)==null?void 0:c.altImageBackgroud,srcImages:{desktop:(l=t==null?void 0:t.config.banners)==null?void 0:l.imageBackgroudDesk,mobile:(p=(u=t==null?void 0:t.config)==null?void 0:u.banners)==null?void 0:p.imageBackgroudMobile}})}),r.jsxs(Ro,{children:[r.jsx("div",{className:Ct.slugs,children:a.map(m=>r.jsx(Le,{href:m.slug?`/politicas/${m.slug.replace(/^\/+/,"")}`:"#",className:m.slug===(i==null?void 0:i.id)?Ct.active:"",title:m.title,scroll:!1,children:m.title},m.slug.replace(/^\/+/,"")))}),r.jsx("div",{className:Ct["content-page-modifier"],children:e==="privacidade-e-seguranca"?r.jsx(dv,{oneTrust:o}):r.jsx(Am,{data:(i==null?void 0:i.sections)??[]})})]})]})}const lt={"banner-wrapper":"_banner-wrapper_jrphb_5","banner-image":"_banner-image_jrphb_15","banner-desktop":"_banner-desktop_jrphb_21","banner-mobile":"_banner-mobile_jrphb_24","text-wrapper":"_text-wrapper_jrphb_37","custom-row":"_custom-row_jrphb_53","text-area":"_text-area_jrphb_58","text-wrapper-modifier":"_text-wrapper-modifier_jrphb_68","text-area-modifier":"_text-area-modifier_jrphb_77"},km=({data:e,ERROR_TEMPLATE_RETURN_BUTTON:t})=>{const{router:n}=ce();return r.jsx("div",{children:r.jsxs(d.Banner.Container,{className:lt["banner-wrapper"],children:[r.jsxs(d.Banner.ImageWrapper,{className:lt["banner-image"],children:[r.jsx(Pe.Image,{className:lt["banner-desktop"],alt:e.altImageBackgroud??e.imageBackgroudDesk,src:e.imageBackgroudDesk,width:1366,height:695,priority:!0}),r.jsx(Pe.Image,{className:lt["banner-mobile"],alt:e.altImageBackgroud??e.imageBackgroudMobile,src:e.imageBackgroudMobile,width:375,height:755,priority:!0})]}),r.jsx(d.Banner.Slot,{className:d.helpers.classNameConcat(lt["text-wrapper"],lt["text-wrapper-modifier"]),margin:107,children:r.jsxs(d.TextStructure.Root,{layoutProps:{textRow:{className:lt["custom-row"]}},children:[r.jsxs(d.TextStructure.DivWrapper,{className:d.helpers.classNameConcat(lt["text-area"],lt["text-area-modifier"]),children:[r.jsx("h1",{className:"typography-style-display-strong",children:e.title}),r.jsx("h2",{className:"typography-style-body-lg",children:e.subTitle}),r.jsx("p",{className:"typography-style-body-sm",children:e.description})]}),r.jsx(d.Button,{onClick:()=>n.push("/"),children:t})]})})]})})};km.displayName="ErrorTemplate";const Pv={codVenderoda:"",orderformId:"",cupom:"",setCodVendedora:()=>null,setCupom:()=>null,setOrderformId:()=>null,setConfiguration:()=>null,update:()=>!1,isValidSharedCart:()=>!1},Nv=g.createContext(Pv);function Ev(){return g.useContext(Nv)}function Yr(e,t=""){if(!e)return;if(!t)if(typeof window<"u")t=window.location.href;else return;e=e.replace(/[[\]]/g,"\\$&");const o=new RegExp(`[?&]${e}(=([^&#]*)|&|#|$)`).exec(t);return o?o[2]?decodeURIComponent(o[2].replace(/\+/g," ")):"":null}function Qr(){if(window){localStorage.getItem("cleverapp")&&(localStorage.removeItem("vendedora"),localStorage.removeItem("atendimento")),localStorage.getItem("atendimento")&&(localStorage.removeItem("vendedora"),localStorage.removeItem("televendas"));const{hostname:e,origin:t}=window.location;document.cookie=`checkout.vtex.com=;Domain=.${e};path=/;expires=Thu, 01-Jan-1970 00:00:01 GMT`,document.cookie=`checkout.vtex.com=;Domain=${e.replace("www","")};path=/;expires=Thu, 01-Jan-1970 00:00:01 GMT`,window.location.replace(`${t}`)}}const Iv="_container_df1ql_11",Zr={"action-button":"_action-button_df1ql_1",container:Iv,"container-icon":"_container-icon_df1ql_31"};function Rv({icon:e,text:t,onClick:n,isActive:o=!1}){const s=a=>{a.preventDefault(),o&&n()};return r.jsxs("div",{className:d.helpers.classNameConcat(Zr["action-button"],o?"":"disable"),onClick:a=>s(a),children:[r.jsx("div",{className:d.helpers.classNameConcat(Zr["container-icon"],o?"":"disable"),children:r.jsx("img",{src:e,alt:"icon"})}),r.jsxs("div",{className:d.helpers.classNameConcat(Zr.container,o?"":"disable"),children:[r.jsx("span",{children:t}),r.jsx("img",{src:"/images/Widget_open/navigate_next-black-18dp.png",alt:"next"})]})]})}const Tv="_container_k11me_1",Av="_header_k11me_18",kv="_body_k11me_45",Wt={container:Tv,header:Av,body:kv,"copy-cart-button":"_copy-cart-button_k11me_78","reset-orderform-button":"_reset-orderform-button_k11me_110"};function Ov(e,t=!1,n){const{base:o,orderformId:s}=e,a=n==null?void 0:n.split("codigo: ")[1],i=localStorage.getItem("maiscarrinho"),c={medium:t?"&utm_medium=carrinho_compartilhado":"&utm_medium=linkvendedor",campaign:`&utm_campaign=${encodeURIComponent(n??"")}`,cp:a?`&utmi_cp=${a}`:"",source:`&utm_source=${i}`};return t?`${o}/checkout/?orderFormId=${s}${c.source}${c.campaign}${c.cp}${c.medium}#/cart`:`${o}/checkout/?orderFormId=${s}${c.source}${c.campaign}${c.cp}${c.medium}#/payment`}function Lv(e){const t=`https://mais-carrinho-dkwr66gouq-uc.a.run.app/url-shortner/${encodeURIComponent(e)}`;return fetch(t).then(n=>n.json()).then(n=>n.url.shortLink).catch(()=>e)}function $a({mode:e,config:t,newCart:n}){const[o,s]=g.useState(!1),[a,i]=g.useState(""),c=Ov(t,e==="cart",t.sellerCode),{useClipboard:l}=tn.hooks,[,u]=l();function p(){s(!0);const m=document.createElement("textArea");m.readOnly=!0,m.contentEditable="true",m.value=a,document.body.appendChild(m),m.select(),u(m.value),document.body.removeChild(m),setTimeout(()=>{s(!1)},3e3)}return g.useEffect(()=>{i(""),i("Gerando link..."),Lv(c).then(m=>i(m)).catch(()=>i("Algo deu errado, tente novamente mais tarde"))},[c]),r.jsxs("div",{className:Wt.container,children:[r.jsxs("div",{className:Wt.header,children:[r.jsx("img",{src:e==="cart"?"/images/Modal_compartilhar_sacola/ico_sacola_big.png":"/images/Modal_compartilhar_editavel/ico_form_big.png",alt:"close"}),r.jsxs("span",{className:"text",children:[" ",e==="cart"?"Compartilhar a Sacola":"Compartilhar link para pagamento"]})]}),r.jsxs("div",{className:Wt.body,children:[r.jsx("p",{children:e==="cart"?`Envie a sacola para um ou mais clientes usando o link abaixo ou
|
|
19
|
+
compartilhe direto por whatsapp`:"Envie a sacola para um cliente usando o link abaixo ou compartilhe direto por whatsapp"}),r.jsxs("form",{children:[r.jsx("input",{type:"text",disabled:!0,value:a}),r.jsxs("div",{className:d.helpers.classNameConcat(Wt["copy-cart-button"],a?"active":""),children:[r.jsx("img",{src:"/images/Feedback_copiado/ico_share.png",alt:"share",className:"share",onClick:()=>a&&p()}),o&&r.jsx("div",{className:"share-input-copy-feedback",children:"Link Copiado"})]})]}),r.jsx("button",{className:Wt["reset-orderform-button"],onClick:()=>{Je.set(Un,{}),n()},children:"Novo Atendimento"})]})]})}const Mv="_container_jla2u_1",Dv="_header_jla2u_24",$v="_body_jla2u_56",Gt={container:Mv,header:Dv,"header-open":"_header-open_jla2u_29","close-btn":"_close-btn_jla2u_48",body:$v};var Ze=(e=>(e.base="base",e.shareCart="shareCart",e.sharePayment="sharePayment",e))(Ze||{});const za=({text:e,isActive:t,onClick:n,icon:o,iconDisabled:s})=>r.jsx(Rv,{icon:t?o:s,text:t?e:"Preencha a sacola para compartilhar",onClick:n,isActive:t}),zv=({config:e,isshowing:t})=>{var P,S,N;const[n,o]=g.useState(!1),[s,a]=g.useState(""),{addCouponSeller:i,cartStore:c}=ve(),[l,u]=g.useState(t??!1),{setOrderformId:p,update:m,isValidSharedCart:f,setConfiguration:h,setCodVendedora:_}=Ev(),[y,x]=g.useState(Ze.base),v=g.useMemo(()=>c,[c]),{marketingData:C}=tn.stores.cart.useGetCartStoreState();g.useEffect(()=>{Yr("cleverapp")==="true"&&(localStorage.setItem("maiscarrinho","cleverapp"),window.location.replace("/")),Yr("televendas")==="true"&&(localStorage.setItem("maiscarrinho","televendas"),window.location.replace("/")),Yr("vendedora")==="true"&&(localStorage.setItem("maiscarrinho","vendedora"),Qr())},[]),g.useEffect(()=>{var R,A,L,O,G;(R=v==null?void 0:v.openTextField)!=null&&R.value&&a(((A=v==null?void 0:v.openTextField)==null?void 0:A.value)??""),(L=v.openTextField)!=null&&L.value&&(_(String((O=v.openTextField)==null?void 0:O.value).split("codigo")[1]),i(String((G=v.openTextField)==null?void 0:G.value),"seller")),p(v.id),localStorage.getItem("maiscarrinho")&&u(!0)},[v.id,(P=v.openTextField)==null?void 0:P.value,_,p,i]);const j=()=>{h(e),x(Ze.base),o(!n),p(v.id),setTimeout(()=>{f()&&m(v.id)},300)},{id:b}=tn.stores.cart.useGetCartStoreState(),w=R=>{D.postMediaData({apiUrl:"/api/marketingData",body:{orderFormId:b,coupon:C==null?void 0:C.coupon,utmiCampaign:"codigodavendedora",utmSource:"widget",utmMedium:R===Ze.sharePayment?"linkvendedor":"carrinho_compartilhado"}}),x(R)};return r.jsx(r.Fragment,{children:l&&r.jsxs("div",{className:d.helpers.classNameConcat(Gt.container,n?"open":""),children:[r.jsx("div",{className:d.helpers.classNameConcat(Gt.header,n?"open":""),onClick:j,children:n?r.jsxs("div",{className:Gt["header-open"],children:[r.jsx("div",{className:Gt["close-btn"],children:r.jsx("img",{src:"/images/Widget_open/close_grey_24x24.png",alt:"close",width:30,height:30})}),r.jsx("img",{src:"/images/Widget_compacto/ico_vendedora_big.png",alt:"close",width:30,height:30}),r.jsx("span",{className:"text",children:"Vendedor"})]}):r.jsx("img",{src:"/images/Widget_compacto/ico_vendedora_big.png",alt:"logo",width:30,height:30})}),n&&r.jsx("div",{className:Gt.body,children:r.jsxs(r.Fragment,{children:[y===Ze.base&&r.jsxs(r.Fragment,{children:[r.jsx(za,{icon:"/images/Modal_compartilhar_sacola/ico_sacola_big.png",iconDisabled:"/images/Widget_open/ico_sacola_disabled.png",text:"Compartilhar a Sacola",onClick:()=>w(Ze.shareCart),isActive:v.items.length>0&&!!((S=v==null?void 0:v.openTextField)!=null&&S.value)}),r.jsx(za,{icon:"/images/Modal_compartilhar_editavel/ico_form_big.png",iconDisabled:"/images/Widget_open_disabled/ico_form_disabled.png",text:"Compartilhar link para pagamento",onClick:()=>w(Ze.sharePayment),isActive:v.items.length>0&&!!((N=v.openTextField)!=null&&N.value)})]}),y===Ze.shareCart&&r.jsx($a,{mode:"cart",config:{...e,sellerCode:s,orderformId:v.id},newCart:()=>{Qr(),x(Ze.base)}}),y===Ze.sharePayment&&r.jsx($a,{mode:"payment",config:{...e,sellerCode:s,orderformId:v.id},newCart:()=>{Qr(),x(Ze.base)}})]})})]})})},Bn={teamComponents:{AddToCart:ns,BackToTop:df,HelpButton:qy,BuyPackage:Cl,Filter:{...ut,helpers:zu},...W_,FreightCalculation:Eu,Header:Nu,Link:Le,Media:Pe,PLPNavigation:gt,ProductCard:fe,ProductList:at,ProductVariationList:nt,Sort:ir,UserMenu:sr,Newsletter:vs,Form:zt,Table:zn},template:{minicart:De,pdc:$d,pdc_composites:rt,pdp:ty,searchResult:qd,wishList:cl,LPCadastro:ix,SearchModal:nm,LPStores:st,tracker:rv,Politicas:wv,ErrorTemplate:km,WidgetVendedora:zv},utils:{EventCollector:Iy,ExternalScripts:Oy,LinkOrNotLink:dn,ObserverWrapper:or,SnackBarComponent:$t,DraftJsLinkWrapper:Cd}},Fv=(e,t)=>{const n=e.map(s=>`'${s.source}'`).join(`,
|
|
20
20
|
`);return`
|
|
21
21
|
import type { NextRequest } from 'next/server'
|
|
22
22
|
import { NextResponse } from 'next/server'
|
|
@@ -53,7 +53,7 @@ See more info here: https://nextjs.org/docs/messages/no-stylesheets-in-head-comp
|
|
|
53
53
|
|
|
54
54
|
export const config = {
|
|
55
55
|
matcher: [
|
|
56
|
-
${
|
|
56
|
+
${n}
|
|
57
57
|
]
|
|
58
58
|
}
|
|
59
|
-
`},zv=Object.freeze(Object.defineProperty({__proto__:null,generateMiddleware:$v},Symbol.toStringTag,{value:"Module"})),Fv={helpers:zv},Bv={Banner:ho},Tm=g.createContext({}),Uv=({data:e,children:t,...r})=>{var _,y,x,v,C,j,b,w,P,S,N,R,A;const[s,o]=g.useState(!0),{initialize:a,controller:i,itemsStyles:c}=d.Carousel.useCarousel({gap:0,itemsPerPage:1}),l={slideTranstionTimer:(y=(_=e==null?void 0:e.staticConfig)==null?void 0:_.staticConfig)==null?void 0:y.slideTranstionTimer,showCarouselArrows:(v=(x=e==null?void 0:e.staticConfig)==null?void 0:x.staticConfig)==null?void 0:v.showCarouselArrows,hasCloseBtn:(j=(C=e==null?void 0:e.staticConfig)==null?void 0:C.staticConfig)==null?void 0:j.hasCloseBtn,backgroundColor:(w=(b=e==null?void 0:e.staticConfig)==null?void 0:b.staticConfig)==null?void 0:w.backgroundColor,textColorVariant:(S=(P=e==null?void 0:e.staticConfig)==null?void 0:P.staticConfig)==null?void 0:S.textColorVariant,content:((R=(N=e==null?void 0:e.content)==null?void 0:N.content)==null?void 0:R.items)??[]},u=(A=l.content)==null?void 0:A.filter(L=>!L.countDownEndDate||new Date(L.countDownEndDate)>new Date),p=u.length>1,m={...l.backgroundColor?{backgroundColor:l.backgroundColor}:{}},f=()=>{o(!1)},h=d.helpers.ValidateProp({fieldTypes:$t.Mode,property:l.textColorVariant,fallback:"default"});return n.jsx(Tm.Provider,{value:{isOpen:s,setIsOpen:o,hasCarousel:p,backgroundStyle:m,handleCloseTipbar:f,mode:h,slideTranstionTimer:l.slideTranstionTimer,showCarouselArrows:l.showCarouselArrows,hasCloseBtn:l.hasCloseBtn,slices:u,carouselProps:{initialize:a,controller:i,itemsStyles:c},...r},children:t})},mt=()=>g.useContext(Tm),qv=({dateEnd:e,...t})=>{const{CONSTANTS:{TIME_ZONE:r}}=mt();return n.jsx(Hn,{dateEnd:new Date(e),TIME_ZONE:r,...t})},Hv="_tipbar_bt3p0_1",Vv="_tipbar__carousel_bt3p0_15",hn={tipbar:Hv,tipbar__carousel:Vv,"tipbar__close-btn":"_tipbar__close-btn_bt3p0_29","tipbar-item":"_tipbar-item_bt3p0_37","tipbar-item__coupon":"_tipbar-item__coupon_bt3p0_45"},Wv=({coupon:e,feedbackTitle:t,feedbackDescription:r,...s})=>{const{CONSTANTS:o}=mt(),{addCouponSeller:a,cartStore:i}=ve(),[c,l]=g.useState({status:!1,showSnackBar:!1}),[u,p]=g.useState(!1),[m,f]=g.useState(!1),h=async()=>{if(!i.items.length){f(!0);return}(await a(e,"coupon")).code===200?l({status:!0,showSnackBar:!0}):p(!0)};return g.useEffect(()=>{c.showSnackBar&&setTimeout(()=>{l(_=>({..._,showSnackBar:!1}))},o.TIPBAR_CONFIGS.snackbar_timeout)},[c.showSnackBar]),g.useEffect(()=>{u&&setTimeout(()=>{p(!1)},o.TIPBAR_CONFIGS.snackbar_timeout)},[u]),g.useEffect(()=>{m&&setTimeout(()=>{f(!1)},o.TIPBAR_CONFIGS.snackbar_timeout)},[m]),n.jsxs(n.Fragment,{children:[n.jsx(d.Button,{...s,onClick:h,disabled:c.status,className:hn["tipbar-item__coupon"],children:c.status?`${o.TIPBAR_CONFIGS.coupon_applied_message}`:`${o.TIPBAR_CONFIGS.coupon_default_message}`}),c.showSnackBar&&(t||r)&&n.jsx(zt,{title:t,subtitle:r,Z_INDEX_WAR:o.Z_INDEX_WAR},`feedback-coupon-${e}`),u&&n.jsx(zt,{title:o.TIPBAR_CONFIGS.coupon_error_title,subtitle:o.TIPBAR_CONFIGS.coupon_error_message,Z_INDEX_WAR:o.Z_INDEX_WAR},`error-coupon-${e}`),m&&n.jsx(zt,{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}`)]})},Gv=({title:e,description:t,style:r,mode:s,className:o})=>n.jsx(d.TextStructure.Root,{children:n.jsxs(d.TextStructure.DivWrapper,{mode:s,className:o,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})]})}),Kv=({coupon:e,...t})=>{const{CONSTANTS:r}=mt();return n.jsx(d.Copy,{...t,iconCopy:r.ICONS.copy,iconSuccess:r.ICONS.check,children:e})},Xv=({staticZone:e,type:t,className:r,description:s,title:o})=>{const{mode:a}=mt();if(t==="countdown")return n.jsx(qv,{dateEnd:e.countDownEndDate,size:"x-small",mode:a});if(t==="coupon"){const i=d.helpers.ValidateProp({fieldTypes:$t.Mode,property:e.couponButtonMode,fallback:"default"}),c=d.helpers.ValidateProp({fieldTypes:$t.VariantsExtended,property:e.couponButtonVariant,fallback:"primary"});return e.coupon?n.jsx(Wv,{coupon:e.coupon,mode:i,variant:c,feedbackTitle:e.couponFeedbackTitle,feedbackDescription:e.couponFeedbackDescription}):null}if(t==="copy"){const i=d.helpers.ValidateProp({fieldTypes:$t.Mode,property:e.couponButtonMode,fallback:"default"});return e.coupon?n.jsx(Kv,{coupon:e.coupon,mode:i}):null}return n.jsx(Gv,{title:o,description:s,mode:a,className:r})},Da=({handleCloseTipbar:e,mode:t})=>{const{CONSTANTS:r}=mt();return n.jsx(d.Button,{title:"fechar tipbar",className:hn["tipbar__close-btn"],onClick:e,variant:"tertiary",mode:t,adornment:{start:n.jsx(d.Icon,{name:r.ICONS.close})}})},Yv=({children:e,mode:t="default",showCarouselArrows:r=!0,slideTranstionTimer:s})=>{const{carouselProps:o,CONSTANTS:a}=mt(),i=g.useRef(null),c=(u,p)=>{var m,f;u.stopPropagation(),u.preventDefault(),p==="prev"?(m=o.controller)==null||m.prevPage():(f=o.controller)==null||f.nextPage(),i.current&&(clearInterval(i.current),l())},l=g.useCallback(()=>{if(s&&o.controller){const u=setInterval(()=>{var p;(p=o.controller)==null||p.nextPage()},s);i.current=u}},[s,o]);return g.useEffect(()=>(l(),()=>{i.current&&clearInterval(i.current)}),[s,l]),n.jsxs(d.Carousel.Root,{innerRef:u=>{o.initialize(u)},className:hn.tipbar__carousel,style:{flexDirection:"row",alignItems:"center"},children:[r&&n.jsx(d.Button,{variant:"tertiary",mode:t,onClick:u=>c(u,"prev"),adornment:{start:n.jsx(d.Icon,{name:a.ICONS.arrow_left})}}),n.jsx(d.Carousel.Body,{children:e}),r&&n.jsx(d.Button,{variant:"tertiary",mode:t,onClick:u=>c(u,"next"),adornment:{start:n.jsx(d.Icon,{name:a.ICONS.arrow_right})}})]})},Qv=({children:e,className:t})=>{const{hasCarousel:r,mode:s,hasCloseBtn:o,backgroundStyle:a,showCarouselArrows:i,slideTranstionTimer:c,handleCloseTipbar:l}=mt(),u=r&&i;return n.jsx("div",{style:a,"data-hasclosebtn":o,className:d.helpers.classNameConcat(hn.tipbar,t),children:r?n.jsxs(n.Fragment,{children:[n.jsx(Yv,{mode:s,showCarouselArrows:u,slideTranstionTimer:c,children:e}),o&&n.jsx(Da,{handleCloseTipbar:l,showCarouselArrows:u,mode:s})]}):n.jsxs(n.Fragment,{children:[e,o&&n.jsx(Da,{handleCloseTipbar:l,mode:s})]})})},Zv=({children:e,highlightFirstSection:t,...r})=>{const{hasCarousel:s,carouselProps:o}=mt(),a=n.jsx("div",{...r,className:hn["tipbar-item"],children:e});return s?n.jsx(d.Carousel.Item,{style:o.itemsStyles,children:a}):a},Am=({className:e})=>{const{isOpen:t,slices:r}=mt();return r.length&&t?n.jsx(Qv,{children:r.map((s,o)=>{var a;return n.jsx(n.Fragment,{children:n.jsx(dn,{href:s.link,children:n.jsx(Zv,{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((i,c)=>n.jsx(Xv,{staticZone:s,type:i.type,title:i.title,description:i.description,className:e},`tipbar-slice-field-${c}`)):null})})},`tipbar-slice-${o}`)})}):null};Am.displayName="TipBar.Root";const Is=({className:e,...t})=>n.jsx(Uv,{...t,children:n.jsx(Am,{className:e})});Is.displayName="TipBar";const Jv=({CONSTANTS:e,data:t})=>{const{pathname:r}=ce(),{tipbarRef:s}=Ne(),o=c=>{const l=t==null?void 0:t.find(u=>{var p,m,f,h,_;return((m=(p=u.staticConfig)==null?void 0:p.staticConfig)==null?void 0:m.deviceType)===c&&((_=(h=(f=u.staticConfig)==null?void 0:f.staticConfig)==null?void 0:h.paths)==null?void 0:_.includes(r))});return l||(t==null?void 0:t.find(u=>{var p,m,f,h,_,y;return((m=(p=u.staticConfig)==null?void 0:p.staticConfig)==null?void 0:m.deviceType)===c&&(!((h=(f=u.staticConfig)==null?void 0:f.staticConfig)!=null&&h.paths)||((y=(_=u.staticConfig)==null?void 0:_.staticConfig)==null?void 0:y.paths.length)===0)}))},a=o("desktop"),i=o("mobile");return n.jsxs("div",{ref:s,className:D.responsive["responsive-flex"],children:[i&&n.jsx("div",{className:D.responsive["responsive-mobile-flex"],children:n.jsx(Is,{data:i,CONSTANTS:e})}),a&&n.jsx("div",{className:D.responsive["responsive-desktop-flex"],children:n.jsx(Is,{data:a,CONSTANTS:e})})]})},eb=({SectionZone:e,name:t,storeId:r,previewId:s})=>{const[o,a]=g.useState();return g.useEffect(()=>{o||D.fetchContentType("search",{name:t,storeId:r,previewId:s}).then(i=>{i!=null&&i.data&&Array.isArray(i.data)&&a(i.data[0])})},[]),n.jsx(e,{data:o??[]})},tb=e=>{const t=sb(rb(e));return nb(t)},nb=e=>{const t=[];for(const r in e)t.push(...e[r]);return t},rb=e=>!e||!Array.isArray(e)?{}:e==null?void 0:e.reduce((t,r)=>{if(r!=null&&r.cidade){let s=t[r==null?void 0:r.cidade];s===void 0&&(s=t[r==null?void 0:r.cidade]=[]),s.push(r)}return t},{}),sb=e=>{if(!e||!Object.keys(e).length)return{};const t=Object.keys(e).sort((s,o)=>s.localeCompare(o)),r={};for(const s of t)r[s]=e[s];return r},ob=({content:e,data:t,showVendor:r,ICONS:s,entity:o,LPLOJAS_TEMPLATE_RETURN_BUTTON:a})=>{const[i,c]=g.useState([]);return g.useEffect(()=>{(async()=>{try{const u=await fetch("/api/master-data/search",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({masterDataEntity:o,searchFields:{_fields:"_all"},headers:{"REST-Range":"resources=0-1000"}})});if(!u.ok)throw new Error(`[LPStoresClientWrapper] MasterData error ${u.status}`);const p=await u.json();c(tb(p))}catch(u){console.error(u)}})()},[o]),!Array.isArray(t)||!t.length?null:n.jsxs(ot.Root,{data:i,children:[n.jsx(ot.Title,{children:e.titlePage}),n.jsx(ot.Section,{imgSrcDesk:e.imageBackgroundDesk,imgSrcMob:e.imageBackgroundMob,imgAlt:e.altImageBackgroud,children:n.jsx(ot.Content,{showVendor:r,ICONS:s,LPLOJAS_TEMPLATE_RETURN_BUTTON:a})})]})},ab=({data:e,children:t,SectionZone:r,responsive:s,COMMON_PAGE_COLUMN_GAP:o})=>{var m,f;const a=((m=e==null?void 0:e.filter(h=>h.config.responsive.deviceType==="mobile")[0])==null?void 0:m.sections)||[],i=((f=e==null?void 0:e.filter(h=>h.config.responsive.deviceType==="desktop")[0])==null?void 0:f.sections)||[],c=a.slice(0,1),l=a.slice(1,a.length),u=i.slice(0,1),p=i.slice(1,i.length);return n.jsxs(n.Fragment,{children:[n.jsxs(d.Utils.Column,{className:d.helpers.classNameConcat(s["responsive-mobile-flex"],"utils-column-modifier"),children:[n.jsx(r,{data:c??[]}),n.jsxs(d.Utils.Column,{gap:o,children:[t,n.jsx(r,{data:l??[]})]})]}),n.jsxs(d.Utils.Column,{className:d.helpers.classNameConcat(s["responsive-desktop-flex"],"utils-column-modifier"),children:[n.jsx(r,{data:u??[]}),n.jsxs(d.Utils.Column,{gap:o,children:[t,n.jsx(r,{data:p??[]})]})]})]})},ib={Banner:Bv,BannerSection:mn,BennefitsBarSection:vm,SingleBannerSection:ho,TextContentSection:jm,BannerCarousel:xm,TextAccordionSection:Cm,TipbarScreening:Jv,ImageGrid:gm,SearchPageScreening:D.SearchPageScreening,SearchContent:eb,NewsletterSection:bm,PDPProductCarousel:Pm,ProductCarousel:Nm,EmbedLive:ym,PopupModalSection:Em,SectionZone:Im,LPStoresClientWrapper:ob,WishlistScreening:ab},cb={Components:ib,helpers:iy};exports.cms=cb;exports.contexts=nn;exports.data=Zs;exports.layout=Fn;exports.scripts=Fv;
|
|
59
|
+
`},Bv=Object.freeze(Object.defineProperty({__proto__:null,generateMiddleware:Fv},Symbol.toStringTag,{value:"Module"})),Uv={helpers:Bv},qv={Banner:_s},Om=g.createContext({}),Hv=({data:e,children:t,...n})=>{var _,y,x,v,C,j,b,w,P,S,N,R,A;const[o,s]=g.useState(!0),{initialize:a,controller:i,itemsStyles:c}=d.Carousel.useCarousel({gap:0,itemsPerPage:1}),l={slideTranstionTimer:(y=(_=e==null?void 0:e.staticConfig)==null?void 0:_.staticConfig)==null?void 0:y.slideTranstionTimer,showCarouselArrows:(v=(x=e==null?void 0:e.staticConfig)==null?void 0:x.staticConfig)==null?void 0:v.showCarouselArrows,hasCloseBtn:(j=(C=e==null?void 0:e.staticConfig)==null?void 0:C.staticConfig)==null?void 0:j.hasCloseBtn,backgroundColor:(w=(b=e==null?void 0:e.staticConfig)==null?void 0:b.staticConfig)==null?void 0:w.backgroundColor,textColorVariant:(S=(P=e==null?void 0:e.staticConfig)==null?void 0:P.staticConfig)==null?void 0:S.textColorVariant,content:((R=(N=e==null?void 0:e.content)==null?void 0:N.content)==null?void 0:R.items)??[]},u=(A=l.content)==null?void 0:A.filter(L=>!L.countDownEndDate||new Date(L.countDownEndDate)>new Date),p=u.length>1,m={...l.backgroundColor?{backgroundColor:l.backgroundColor}:{}},f=()=>{s(!1)},h=d.helpers.ValidateProp({fieldTypes:Dt.Mode,property:l.textColorVariant,fallback:"default"});return r.jsx(Om.Provider,{value:{isOpen:o,setIsOpen:s,hasCarousel:p,backgroundStyle:m,handleCloseTipbar:f,mode:h,slideTranstionTimer:l.slideTranstionTimer,showCarouselArrows:l.showCarouselArrows,hasCloseBtn:l.hasCloseBtn,slices:u,carouselProps:{initialize:a,controller:i,itemsStyles:c},...n},children:t})},mt=()=>g.useContext(Om),Vv=({dateEnd:e,...t})=>{const{CONSTANTS:{TIME_ZONE:n}}=mt();return r.jsx(Vn,{dateEnd:new Date(e),TIME_ZONE:n,...t})},Wv="_tipbar_bt3p0_1",Gv="_tipbar__carousel_bt3p0_15",hn={tipbar:Wv,tipbar__carousel:Gv,"tipbar__close-btn":"_tipbar__close-btn_bt3p0_29","tipbar-item":"_tipbar-item_bt3p0_37","tipbar-item__coupon":"_tipbar-item__coupon_bt3p0_45"},Kv=({coupon:e,feedbackTitle:t,feedbackDescription:n,...o})=>{const{CONSTANTS:s}=mt(),{addCouponSeller:a,cartStore:i}=ve(),[c,l]=g.useState({status:!1,showSnackBar:!1}),[u,p]=g.useState(!1),[m,f]=g.useState(!1),h=async()=>{if(!i.items.length){f(!0);return}(await a(e,"coupon")).code===200?l({status:!0,showSnackBar:!0}):p(!0)};return g.useEffect(()=>{c.showSnackBar&&setTimeout(()=>{l(_=>({..._,showSnackBar:!1}))},s.TIPBAR_CONFIGS.snackbar_timeout)},[c.showSnackBar]),g.useEffect(()=>{u&&setTimeout(()=>{p(!1)},s.TIPBAR_CONFIGS.snackbar_timeout)},[u]),g.useEffect(()=>{m&&setTimeout(()=>{f(!1)},s.TIPBAR_CONFIGS.snackbar_timeout)},[m]),r.jsxs(r.Fragment,{children:[r.jsx(d.Button,{...o,onClick:h,disabled:c.status,className:hn["tipbar-item__coupon"],children:c.status?`${s.TIPBAR_CONFIGS.coupon_applied_message}`:`${s.TIPBAR_CONFIGS.coupon_default_message}`}),c.showSnackBar&&(t||n)&&r.jsx($t,{title:t,subtitle:n,Z_INDEX_WAR:s.Z_INDEX_WAR},`feedback-coupon-${e}`),u&&r.jsx($t,{title:s.TIPBAR_CONFIGS.coupon_error_title,subtitle:s.TIPBAR_CONFIGS.coupon_error_message,Z_INDEX_WAR:s.Z_INDEX_WAR},`error-coupon-${e}`),m&&r.jsx($t,{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}`)]})},Xv=({title:e,description:t,style:n,mode:o,className:s})=>r.jsx(d.TextStructure.Root,{children:r.jsxs(d.TextStructure.DivWrapper,{mode:o,className:s,children:[e&&r.jsx("h3",{className:"typography-style-body-sm",style:n,children:e}),t&&r.jsx("p",{className:"typography-style-caption",style:n,children:t})]})}),Yv=({coupon:e,...t})=>{const{CONSTANTS:n}=mt();return r.jsx(d.Copy,{...t,iconCopy:n.ICONS.copy,iconSuccess:n.ICONS.check,children:e})},Qv=({staticZone:e,type:t,className:n,description:o,title:s})=>{const{mode:a}=mt();if(t==="countdown")return r.jsx(Vv,{dateEnd:e.countDownEndDate,size:"x-small",mode:a});if(t==="coupon"){const i=d.helpers.ValidateProp({fieldTypes:Dt.Mode,property:e.couponButtonMode,fallback:"default"}),c=d.helpers.ValidateProp({fieldTypes:Dt.VariantsExtended,property:e.couponButtonVariant,fallback:"primary"});return e.coupon?r.jsx(Kv,{coupon:e.coupon,mode:i,variant:c,feedbackTitle:e.couponFeedbackTitle,feedbackDescription:e.couponFeedbackDescription}):null}if(t==="copy"){const i=d.helpers.ValidateProp({fieldTypes:Dt.Mode,property:e.couponButtonMode,fallback:"default"});return e.coupon?r.jsx(Yv,{coupon:e.coupon,mode:i}):null}return r.jsx(Xv,{title:s,description:o,mode:a,className:n})},Fa=({handleCloseTipbar:e,mode:t})=>{const{CONSTANTS:n}=mt();return r.jsx(d.Button,{title:"fechar tipbar",className:hn["tipbar__close-btn"],onClick:e,variant:"tertiary",mode:t,adornment:{start:r.jsx(d.Icon,{name:n.ICONS.close})}})},Zv=({children:e,mode:t="default",showCarouselArrows:n=!0,slideTranstionTimer:o})=>{const{carouselProps:s,CONSTANTS:a}=mt(),i=g.useRef(null),c=(u,p)=>{var m,f;u.stopPropagation(),u.preventDefault(),p==="prev"?(m=s.controller)==null||m.prevPage():(f=s.controller)==null||f.nextPage(),i.current&&(clearInterval(i.current),l())},l=g.useCallback(()=>{if(o&&s.controller){const u=setInterval(()=>{var p;(p=s.controller)==null||p.nextPage()},o);i.current=u}},[o,s]);return g.useEffect(()=>(l(),()=>{i.current&&clearInterval(i.current)}),[o,l]),r.jsxs(d.Carousel.Root,{innerRef:u=>{s.initialize(u)},className:hn.tipbar__carousel,style:{flexDirection:"row",alignItems:"center"},children:[n&&r.jsx(d.Button,{variant:"tertiary",mode:t,onClick:u=>c(u,"prev"),adornment:{start:r.jsx(d.Icon,{name:a.ICONS.arrow_left})}}),r.jsx(d.Carousel.Body,{children:e}),n&&r.jsx(d.Button,{variant:"tertiary",mode:t,onClick:u=>c(u,"next"),adornment:{start:r.jsx(d.Icon,{name:a.ICONS.arrow_right})}})]})},Jv=({children:e,className:t})=>{const{hasCarousel:n,mode:o,hasCloseBtn:s,backgroundStyle:a,showCarouselArrows:i,slideTranstionTimer:c,handleCloseTipbar:l}=mt(),u=n&&i;return r.jsx("div",{style:a,"data-hasclosebtn":s,className:d.helpers.classNameConcat(hn.tipbar,t),children:n?r.jsxs(r.Fragment,{children:[r.jsx(Zv,{mode:o,showCarouselArrows:u,slideTranstionTimer:c,children:e}),s&&r.jsx(Fa,{handleCloseTipbar:l,showCarouselArrows:u,mode:o})]}):r.jsxs(r.Fragment,{children:[e,s&&r.jsx(Fa,{handleCloseTipbar:l,mode:o})]})})},eb=({children:e,highlightFirstSection:t,...n})=>{const{hasCarousel:o,carouselProps:s}=mt(),a=r.jsx("div",{...n,className:hn["tipbar-item"],children:e});return o?r.jsx(d.Carousel.Item,{style:s.itemsStyles,children:a}):a},Lm=({className:e})=>{const{isOpen:t,slices:n}=mt();return n.length&&t?r.jsx(Jv,{children:n.map((o,s)=>{var a;return r.jsx(r.Fragment,{children:r.jsx(dn,{href:o.link,children:r.jsx(eb,{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)=>r.jsx(Qv,{staticZone:o,type:i.type,title:i.title,description:i.description,className:e},`tipbar-slice-field-${c}`)):null})})},`tipbar-slice-${s}`)})}):null};Lm.displayName="TipBar.Root";const Ao=({className:e,...t})=>r.jsx(Hv,{...t,children:r.jsx(Lm,{className:e})});Ao.displayName="TipBar";const tb=({CONSTANTS:e,data:t})=>{const{pathname:n}=ce(),{tipbarRef:o}=Ne(),s=c=>{const l=t==null?void 0:t.find(u=>{var p,m,f,h,_;return((m=(p=u.staticConfig)==null?void 0:p.staticConfig)==null?void 0:m.deviceType)===c&&((_=(h=(f=u.staticConfig)==null?void 0:f.staticConfig)==null?void 0:h.paths)==null?void 0:_.includes(n))});return l||(t==null?void 0:t.find(u=>{var p,m,f,h,_,y;return((m=(p=u.staticConfig)==null?void 0:p.staticConfig)==null?void 0:m.deviceType)===c&&(!((h=(f=u.staticConfig)==null?void 0:f.staticConfig)!=null&&h.paths)||((y=(_=u.staticConfig)==null?void 0:_.staticConfig)==null?void 0:y.paths.length)===0)}))},a=s("desktop"),i=s("mobile");return r.jsxs("div",{ref:o,className:D.responsive["responsive-flex"],children:[i&&r.jsx("div",{className:D.responsive["responsive-mobile-flex"],children:r.jsx(Ao,{data:i,CONSTANTS:e})}),a&&r.jsx("div",{className:D.responsive["responsive-desktop-flex"],children:r.jsx(Ao,{data:a,CONSTANTS:e})})]})},nb=({SectionZone:e,name:t,storeId:n,previewId:o})=>{const[s,a]=g.useState();return g.useEffect(()=>{s||D.fetchContentType("search",{name:t,storeId:n,previewId:o}).then(i=>{i!=null&&i.data&&Array.isArray(i.data)&&a(i.data[0])})},[]),r.jsx(e,{data:s??[]})},rb=e=>{const t=ab(sb(e));return ob(t)},ob=e=>{const t=[];for(const n in e)t.push(...e[n]);return t},sb=e=>!e||!Array.isArray(e)?{}:e==null?void 0:e.reduce((t,n)=>{if(n!=null&&n.cidade){let o=t[n==null?void 0:n.cidade];o===void 0&&(o=t[n==null?void 0:n.cidade]=[]),o.push(n)}return t},{}),ab=e=>{if(!e||!Object.keys(e).length)return{};const t=Object.keys(e).sort((o,s)=>o.localeCompare(s)),n={};for(const o of t)n[o]=e[o];return n},ib=({content:e,data:t,showVendor:n,ICONS:o,entity:s,LPLOJAS_TEMPLATE_RETURN_BUTTON:a})=>{const[i,c]=g.useState([]);return g.useEffect(()=>{(async()=>{try{const u=await fetch("/api/master-data/search",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({masterDataEntity:s,searchFields:{_fields:"_all"},headers:{"REST-Range":"resources=0-1000"}})});if(!u.ok)throw new Error(`[LPStoresClientWrapper] MasterData error ${u.status}`);const p=await u.json();c(rb(p))}catch(u){console.error(u)}})()},[s]),!Array.isArray(t)||!t.length?null:r.jsxs(st.Root,{data:i,children:[r.jsx(st.Title,{children:e.titlePage}),r.jsx(st.Section,{imgSrcDesk:e.imageBackgroundDesk,imgSrcMob:e.imageBackgroundMob,imgAlt:e.altImageBackgroud,children:r.jsx(st.Content,{showVendor:n,ICONS:o,LPLOJAS_TEMPLATE_RETURN_BUTTON:a})})]})},cb=({data:e,children:t,SectionZone:n,responsive:o,COMMON_PAGE_COLUMN_GAP:s})=>{var m,f;const a=((m=e==null?void 0:e.filter(h=>h.config.responsive.deviceType==="mobile")[0])==null?void 0:m.sections)||[],i=((f=e==null?void 0:e.filter(h=>h.config.responsive.deviceType==="desktop")[0])==null?void 0:f.sections)||[],c=a.slice(0,1),l=a.slice(1,a.length),u=i.slice(0,1),p=i.slice(1,i.length);return r.jsxs(r.Fragment,{children:[r.jsxs(d.Utils.Column,{className:d.helpers.classNameConcat(o["responsive-mobile-flex"],"utils-column-modifier"),children:[r.jsx(n,{data:c??[]}),r.jsxs(d.Utils.Column,{gap:s,children:[t,r.jsx(n,{data:l??[]})]})]}),r.jsxs(d.Utils.Column,{className:d.helpers.classNameConcat(o["responsive-desktop-flex"],"utils-column-modifier"),children:[r.jsx(n,{data:u??[]}),r.jsxs(d.Utils.Column,{gap:s,children:[t,r.jsx(n,{data:p??[]})]})]})]})},lb={Banner:qv,BannerSection:mn,BennefitsBarSection:Cm,SingleBannerSection:_s,TextContentSection:wm,BannerCarousel:jm,TextAccordionSection:Pm,TipbarScreening:tb,ImageGrid:vm,SearchPageScreening:D.SearchPageScreening,SearchContent:nb,NewsletterSection:Sm,PDPProductCarousel:Im,ProductCarousel:Rm,EmbedLive:bm,PopupModalSection:Tm,SectionZone:Am,LPStoresClientWrapper:ib,WishlistScreening:cb},ub={Components:lb,helpers:ly};exports.cms=ub;exports.contexts=tn;exports.data=ts;exports.layout=Bn;exports.scripts=Uv;
|