@soma-vertical-web/multi-lib 1.0.20 → 1.0.22

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.
Files changed (41) hide show
  1. package/cms/ContentTypes/LPLojas/LPLojaClientWrapper.d.ts +1 -1
  2. package/cms/ContentTypes/LPLojas/LPLojasContent.d.ts +1 -1
  3. package/cms/ContentTypes/LPLojas/helpers.d.ts +1 -7
  4. package/cms/ContentTypes/PolicyPage/PolicyPageContent.d.ts +3 -0
  5. package/cms/index.d.ts +1 -1
  6. package/cms/server.d.ts +2 -1
  7. package/contexts/contexts/Session.d.ts +1 -1
  8. package/contexts/contexts/lplojas/Context.d.ts +1 -1
  9. package/contexts/index.d.ts +3 -3
  10. package/data/api/checkout/order-form/shipping/update/index.d.ts +2 -2
  11. package/data/api/user/index.d.ts +3 -0
  12. package/index-BhiCzrut.mjs +2255 -0
  13. package/index-D61YFVi9.mjs +2261 -0
  14. package/index-DZ1MbO8M.js +4 -0
  15. package/index-DyKuIyRP.js +4 -0
  16. package/index.js +16 -16
  17. package/index.mjs +8267 -8056
  18. package/index2.js +8 -1
  19. package/index2.mjs +2266 -1114
  20. package/layout/index.d.ts +7 -3
  21. package/layout/template/LPLojas/Composite/Details/Details.d.ts +1 -1
  22. package/layout/template/LPLojas/Composite/Details/Item.d.ts +1 -1
  23. package/layout/template/LPLojas/Composite/Details/Vendor.d.ts +1 -1
  24. package/layout/template/LPLojas/Composite/DropDown/DropDown.d.ts +1 -1
  25. package/layout/template/LPLojas/Composite/Root.d.ts +1 -1
  26. package/layout/template/LPLojas/index.d.ts +3 -3
  27. package/layout/template/Politicas/Composite/Banner.d.ts +4 -0
  28. package/layout/template/Politicas/Composite/Container.d.ts +7 -0
  29. package/layout/template/Politicas/Composite/OneTrustPolicy.d.ts +14 -0
  30. package/layout/template/Politicas/Politicas.d.ts +10 -0
  31. package/layout/template/TrackingRouteWatcher/index.d.ts +5 -0
  32. package/package.json +1 -1
  33. package/server.d.ts +2 -0
  34. package/style.css +1 -1
  35. package/types/cms/ContentTypes/LPLojas/index.d.ts +22 -1
  36. package/types/cms/ContentTypes/PolicyPage/index.d.ts +17 -0
  37. package/types/contexts/contexts/session.d.ts +1 -0
  38. package/types/layout/templates/LPLojas/Details/index.d.ts +18 -0
  39. package/types/layout/templates/LPLojas/DropDown/index.d.ts +10 -0
  40. package/types/layout/templates/LPLojas/index.d.ts +18 -0
  41. package/types/layout/templates/Politicas/index.d.ts +27 -0
package/index.js CHANGED
@@ -1,21 +1,21 @@
1
- "use strict";var ym=Object.defineProperty;var xm=(e,t,n)=>t in e?ym(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var gt=(e,t,n)=>xm(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),g=require("react"),H=require("./index-xWhZ_YcF.js"),tt=require("idb-keyval"),Et=require("zustand"),Gr=require("js-cookie"),d=require("@soma-vertical-web/core-components"),vt=require("axios"),Kr=require("@date-fns/tz"),vm=require("jose"),Lt=require("@soma-vertical-web/foundations"),fs=require("react-dom"),Je=require("draft-js"),ba=require("react-intersection-observer"),hs=g.createContext({}),bm=({data:e,children:t})=>r.jsx(hs.Provider,{value:{tags:e==null?void 0:e.config},children:t}),_t=()=>{const{tags:e}=g.useContext(hs),t=g.useCallback(n=>{var c,l,u,m;const s=(l=(c=e==null?void 0:e.commercial)==null?void 0:c.items)==null?void 0:l.find(f=>{var p;return(p=n??[])==null?void 0:p.find(h=>h.id===f.key)}),o=(m=(u=e==null?void 0:e.institucional)==null?void 0:u.items)==null?void 0:m.find(f=>{var p;return(p=n??[])==null?void 0:p.find(h=>h.id===f.key)}),a=e==null?void 0:e.flagPdp,i=(n==null?void 0:n.find(f=>{var p;return f.id===((p=e==null?void 0:e.flagGoldenPdp)==null?void 0:p.key)}))&&(e==null?void 0:e.flagGoldenPdp);return{commercial:s,institucional:o,flagPdp:a,flagGoldenPdp:i}},[e]);return{tags:e,getAvailableProductTag:t}},ja=({gridScrollBack:e})=>{g.useEffect(()=>{typeof window<"u"&&(e!=null&&e.refer)&&sessionStorage.setItem(e==null?void 0:e.refer,"true")},[])},Ca=g.createContext({}),jm=({children:e,gridScrollBack:t})=>{const n=g.useRef(null);return ja({gridScrollBack:t}),r.jsx(Ca.Provider,{value:{sizesContainerRef:n},children:e})},Sa=()=>{const e=g.useContext(Ca);if(e===void 0)throw new Error("useContext(PDPContext) must be used within a PDPProvider");return e},dt=({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:s,customData:o,promotionInfo:a,itemList:i,outsideEcommerceData:c}=e,{availableSizes:l,sizes:u,price:m}=s,f={...n==="view_item"?{currency:Se.configs.currency,value:m,grade_disponivel:l??(u?Ea(u):"")}:{},...n==="add_to_wishlist"||n==="remove_from_wishlist"?{value:m,currency:Se.configs.currency}:{}},p=un({data:s,customData:{...o,...i,...a},configs:Se.configs});dt({event:n,data:{...c,ecommerce:{...i,...f,items:[p]}}}),typeof t=="function"&&t(p,f)},productListEvent:e=>{const{commonData:{products:t},promotionInfo:n,itemList:s,outsideEcommerceData:o,customData:a}=e;if(t.length===0)return;const i=t.map(({node:c},l)=>un({data:{...c},customData:{...n,index:l,...a!=null&&a.item_list_name?{item_list_name:a==null?void 0:a.item_list_name}:s},configs:Se.configs}));dt({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:n},customData:s,supportData:{selectedSkus:o,price:a},promotionInfo:i,itemList:c,outsideEcommerceData:l}=e;let u=0;const m=n.map(f=>{var y,x,b,C,j,v,P,E,S;const p=o==null?void 0:o.find(I=>(f.productId??f.id)===I.productId);let h={...i,...c};if(p){const I=Na(),T=Ia(I,p);T&&(h={...h,...T}),t==="add_to_cart"&&(i||c)&&Xr({persistedData:I,type:"add",sku:(p==null?void 0:p.id)??(p==null?void 0:p.sku),newData:{promotionInfo:i,itemList:c}}),t==="remove_from_cart"&&Xr({persistedData:I,type:"remove",sku:(p==null?void 0:p.id)??(p==null?void 0:p.sku)})}u+=f.price??((b=(x=(y=p==null?void 0:p.offers)==null?void 0:y.offers)==null?void 0:x[0])==null?void 0:b.price)??0;const _=(p==null?void 0:p.size)??H.getColorAndSizeFromSkuName((p==null?void 0:p.skuName)??(p==null?void 0:p.name)??((C=f.itemOffered)==null?void 0:C.skuName),Se.configs.NAME_SPLIT_SYMBOL).size;return un({data:f,customData:{...s,...h??{...i,...c},item_sku:(p==null?void 0:p.id)??(p==null?void 0:p.sku)??((j=f.itemOffered)==null?void 0:j.sku),quantity:(s==null?void 0:s.quantity)??f.quantity??1,item_variant2:_,seller_id:(p==null?void 0:p.sellerId)??(p==null?void 0:p.seller)??((S=(E=(P=(v=p==null?void 0:p.offers)==null?void 0:v.offers)==null?void 0:P[0])==null?void 0:E.seller)==null?void 0:S.identifier)??f.seller},configs:Se.configs})});dt({event:t,data:{...l,ecommerce:{value:a??u,currency:Se.configs.currency,items:m}}})},filterEvent:e=>{var i;const{commonData:t,customData:n,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 f;const u=((f=Se.configs.PLP_FILTERS.find(p=>p.key===c))==null?void 0:f.eventLabel)??c,m=(o==null?void 0:o[u])||[];u==="price_range"&&l.replace(":","-"),o[u]=[...m,l]}),Object.keys(o).forEach(c=>a[c]=o[c].join(", "))),dt({event:"filter",data:{...s,...a,...n}})},viewCartEvent:e=>{var m,f,p,h,_,y,x,b,C,j;const{commonData:t,outsideEcommerceData:n}=e,{cartStore:s}=t;if(!s)return;const o=window.localStorage.getItem("persistedCartEventsData"),a=o?JSON.parse(o):{},i=s.items.map(v=>{const{promotionInfo:P,itemList:E}=a[v.id]??{};return un({data:{...v,price:v.price/100,listPrice:v.listPrice/100},customData:{...P,...E,item_sku:v.id??v.itemOffered.sku,quantity:v.quantity??1},configs:Se.configs})}),c=(((m=s.totalizers.find(v=>v.name==="Total dos Itens"))==null?void 0:m.value)??0)/100,l=(((f=s.totalizers.find(v=>v.name==="Total dos Descontos"))==null?void 0:f.value)??0)/100,u=((p=s.marketingData)==null?void 0:p.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];dt({event:"view_cart",data:{...n,ecommerce:{currency:Se.configs.currency,value:c+l,total_discount:Math.abs(l),cep_preenchido:!!((b=(x=s.shippingData)==null?void 0:x.address)!=null&&b.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:n}=e;dt({event:t,data:{...n}})}},Ea=e=>e.reduce((t,n)=>(n.available&&t.push(n.value),t),[]).toString(),Cm=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]}:{}}:{}}},un=({data:e,customData:t,configs:n})=>({...Sm(e,n==null?void 0:n.MAIN_IMAGE),...Em(e),...Pm(e),...Nm(e),...t}),Pa=()=>{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("_"))??[]:[]},Na=()=>{const e=window.localStorage.getItem("persistedCartEventsData");return e?JSON.parse(e):null},Ia=(e,t)=>e==null?void 0:e[t],Xr=({persistedData:e,type:t,sku:n,newData:s})=>{if(!e&&t==="add"){window.localStorage.setItem("persistedCartEventsData",JSON.stringify({[n]:s}));return}if(e&&t==="add"){window.localStorage.setItem("persistedCartEventsData",JSON.stringify({...e,[n]:s}));return}e&&t==="remove"&&(delete e[n],window.localStorage.setItem("persistedCartEventsData",JSON.stringify(e)))},Sm=(e,t="1")=>{var a,i,c,l,u,m,f,p,h,_,y;const n=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)??((f=(m=e.itemOffered)==null?void 0:m.isVariationOf)==null?void 0:f.productGroupID),item_ref:/_\d$/.test(n)?n.slice(0,-2):n,item_name:e.productTitle??e.productName??e.name??H.splitNameAndSizeFromFullName((p=e.itemOffered)==null?void 0:p.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)}},eo=e=>Array.isArray(e)?e.reduce((t,n)=>(n.length>t.length&&(t=n),t),""):e,Em=e=>{var u,m;const{categories:t,categoriesIds:n}=e,s=t??((u=e.itemOffered)==null?void 0:u.categories),o=n??((m=e.itemOffered)==null?void 0:m.categoriesIds),a=eo(s),i=eo(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]}}},Pm=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:n,size:s}=H.getColorAndSizeFromSkuName(t,Se.configs.NAME_SPLIT_SYMBOL);return{item_variant:n,...e.itemOffered&&{item_variant2:s}}},Nm=e=>{var l,u;const{price:t,listPrice:n,installments:s}=e,o=t??((l=e.offers)==null?void 0:l.lowPrice)??0,a=n??((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]=Pa(),[n,s]=e.split("-"),o=n.includes("shop")||n.includes("sale")?n:"";return{page_category:o&&s?s:"",page_departament:o,id:t,name:e}},Im=Object.freeze(Object.defineProperty({__proto__:null,eventsFunctions:Se,findDataInPersistedData:Ia,getAvailablesSizes:Ea,getCategories:Cm,getPageCategoryAndDepartmentFromSlug:wa,getPersistedData:Na,getProductListInfoFromHead:Pa,pushDatalayer:dt,updatePersistedData:Xr},Symbol.toStringTag,{value:"Module"})),Ra=g.createContext({}),wm=({children:e,evtFunctionsConfigs:t})=>{const n=g.useRef({}),s=g.useRef(null),o=g.useRef(null),a=g.useRef({}),i=g.useRef({trigger:!1,index:0}),c=({functionKey:m,data:f,callBack:p,timeout:h=100})=>{window.dataLayer||(window.dataLayer=[]),Se.configs=t;try{typeof Se[m]=="function"&&setTimeout(()=>{var _;f.promotionInfo=n.current,(_=o.current)!=null&&_.item_list_name&&(f.itemList=o.current),Se[m](f,p)},h)}catch(_){dt({event:"error_event",data:{error_message:(_==null?void 0:_.message)??_}})}},l=({content:m})=>{c({functionKey:"readyEvents",data:{event:"select_content",readyData:{content_type:m.replace("::",":")}}})},u=({updatePromotionRef:m,promotion:f,index:p})=>{m&&(n.current={...f}),c({functionKey:"readyEvents",data:{event:"select_promotion",readyData:{ecommerce:{...f,...p!==void 0&&{index:p}}}}})};return r.jsx(Ra.Provider,{value:{sendDataLayerEvent:c,triggerSelectItemEventRef:i,promotionEventRef:n,currentLocalRef:s,itemListRef:o,cartProductsFullDataRef:a,handleSelectContent:l,handleSelectPromotionEvent:u},children:e})},ae=()=>g.useContext(Ra),Ta=g.createContext({}),Rm=({children:e,productData:t,isKit:n,PDP_INFO:s,NAME_SPLIT_SYMBOL:o,TEXTURE_IMAGE:a})=>{var D,U;const{sendDataLayerEvent:i,triggerSelectItemEventRef:c}=ae(),{productId:l,productName:u,items:m,items:[{images:f,Videos:p}],description:h,["Composição"]:_="",productReference:y,categories:[x]}=t,{getAvailableProductTag:b}=_t(),C=b(Object.entries(t.clusterHighlights).map(B=>({id:B[0],name:B[1]}))),j=x.slice(1,-1).split("/"),{installments:v,price:P,listPrice:E,sizes:S,allSizesAvailable:I}=H.getSkuInfos({items:m,NAME_SPLIT_SYMBOL:o}),T=H.getThumbImage({images:f,TEXTURE_IMAGE:a}),A=[{label:`${s.product.description}`,value:"description",content:h},{label:`${s.product.materiais}`,value:"composition",content:_}],k=((U=H.getColorAndSizeFromSkuName((D=t.items)==null?void 0:D[0].name,o))==null?void 0:U.color)??t["Cores Filtráveis"][0]??"",O=()=>({commonData:{...t,sizes:S,price:P,listPrice:E,installments:v},customData:{installments:v==null?void 0:v.count,installment_value:Number(v==null?void 0:v.value).toFixed(2)}}),Y=({sku:B,size:Q})=>{const{commonData:G,customData:$}=O();i({functionKey:"productEvents",data:{event:"view_item",commonData:G,customData:{...$,...B&&{item_sku:B},...Q&&{item_variant2:Q}}}})};return g.useEffect(()=>{if(c.current.trigger){const{commonData:B,customData:Q}=O();i({functionKey:"productEvents",data:{event:"select_item",commonData:B,customData:{...Q,index:c.current.index}}}),c.current.trigger=!1}Y({})},[]),r.jsx(Ta.Provider,{value:{productData:t,productId:l,productName:u,productReference:y,tag:C,items:m,sizes:S,allSizesAvailable:I,installments:v,price:P,listPrice:E,thumbImage:T,images:f,video:p[0],descriptionContent:A,breadcrumbList:j,isKit:n,colorName:k,handleViewItemEvent:Y},children:e})},Oe=()=>{const e=g.useContext(Ta);if(e===void 0)throw new Error("useContext(PDPDataContext) must be used within a PDPDataProvider");return e},Tm=()=>{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}}]},Aa=()=>{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)}},[])},Am=typeof window>"u",km=(e,t)=>{const[n,s]=g.useState(()=>{if(Am)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]),[n,a=>{s(i=>{const c=typeof a=="function"?a(i):a;return localStorage.setItem(e,JSON.stringify(c)),c})}]};function _s(e,t,n){const[s,o]=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(()=>{o(l.isIntersecting),t&&l.isIntersecting&&c.unobserve(e.current)},n.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 Dn=({callback:e,onEnterViewportOnce:t,options:n})=>{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()))},n);return a.observe(o),()=>{t&&a.unobserve(o),a.disconnect()}},[e,t,n]),{element:s}},ka=({defaultScale:e=1,maxScale:t=3})=>{const n=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||!n.current)return{minX:0,maxX:0,minY:0,maxY:0};const h=n.current.getBoundingClientRect(),_=s.current.children[0].getBoundingClientRect(),y=_.width,x=_.height,b=Math.min(0,(h.width-y)/2),C=Math.max(0,(y-h.width)/2),j=Math.min(0,(h.height-x)/2),v=Math.max(0,(x-h.height)/2);return{minX:b,maxX:C,minY:j,maxY:v}},m=(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})`})}},f=g.useCallback(h=>{const{minX:_,maxX:y,minY:x,maxY:b}=u(),{x:C,y:j}=l.current,v=Math.max(_,Math.min(y,C)),P=Math.max(x,Math.min(b,j));if(h.touches.length>1){const E=h.touches[0],S=h.touches[1],I=E.pageX-S.pageX,T=E.pageY-S.pageY;i.current=Math.sqrt(I*I+T*T),c.current={x:(E.pageX+S.pageX)/2,y:(E.pageY+S.pageY)/2}}else h.touches.length===1&&(c.current={x:h.touches[0].pageX-v,y:h.touches[0].pageY-P})},[o,l]),p=g.useCallback(h=>{if(!s.current||!n.current)return;const{minX:_,maxX:y,minY:x,maxY:b}=u();if(h.touches.length>1){h.preventDefault();const C=h.touches[0],j=h.touches[1],v=C.pageX-j.pageX,P=C.pageY-j.pageY,E=Math.sqrt(v*v+P*P);if(!i.current){i.current=E;return}const S=E/i.current,I=Math.max(1,Math.min(t,o*S));if(o===I)return;a(I);const T=(C.pageX+j.pageX)/2,A=(C.pageY+j.pageY)/2;let k=T-c.current.x,O=A-c.current.y;k=Math.max(_,Math.min(y,k)),O=Math.max(x,Math.min(b,O)),l.current={x:k,y:O},i.current=E,m(k,O,I)}else if(h.touches.length===1){const C=h.touches[0].pageX,j=h.touches[0].pageY;let v=C-c.current.x,P=j-c.current.y;v=Math.max(_,Math.min(y,v)),P=Math.max(x,Math.min(b,P)),l.current={x:v,y:P},m(v,P,o)}},[t,o]);return g.useEffect(()=>(document.addEventListener("touchstart",f),document.addEventListener("touchmove",p,{passive:!1}),()=>{document.removeEventListener("touchstart",f),document.removeEventListener("touchmove",p)}),[p,f]),{containerRef:n,imgRef:s,scale:o}},Lm={attachment:"ATTACHMENT",specification:"SPECIFICATION",attribute:"ATTRIBUTE"},Ve=Promise.resolve(!1),Yr={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:()=>({})},gs=e=>e===0,La=(e,t)=>{if(!e||e.length===0)return[];let n="";const s=[],o=e.match(/\d+/g)??[];for(const a of o){const i=t[Number(a)];i&&(n+=(n?"/":"")+i,s.push(n))}return s},Oa=(e,t)=>{const{availability:n,additionalInfo:{brandName:s},bundleItems:o,id:a,uniqueId:i,detailUrl:c,ean:l,imageUrl:u,name:m,listPrice:f,quantity:p,price:h,priceDefinition:_,productCategories:y,productCategoryIds:x,productId:b,refId:C,seller:j,referenceId:v,offerings:P,productRefId:E,skuName:S,sellingPrice:I}=e;return{availability:n,bundleItems:o,referenceId:v,productRefId:E,id:a,ean:l,uniqueId:i,itemOffered:{additionalProperty:[],brand:{name:s},categories:La(x,y),categoriesIds:x,gtin:C,image:[{alternateName:(t==null?void 0:t.MAIN_IMAGE)??"1",url:u}],name:m,isVariationOf:{name:m,productGroupID:b},sku:a,slug:c,skuName:S},listPrice:f,quantity:p,offerings:P,price:h,priceDefinition:_,sellingPrice:I,seller:j}},Da=(e,t)=>{const n=e.map(s=>({id:s.uniqueId,quantity:s.quantity,seller:s.seller}));return Array.isArray(t)?[...n,...t]:[...n,t]},Ma=(e,t)=>{const n=e.find(s=>s.id===t);if(n){const s=e.map((o,a)=>{var i,c;return{id:((i=o.itemOffered)==null?void 0:i.sku)??"",index:a,quantity:(n==null?void 0:n.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:[]}},Fa=(e,t,n)=>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:n,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)??""}}),Qr=(e,t)=>e.filter(n=>n.availability!=="withoutStock").findIndex(({id:n})=>n===t),Om=(e,t)=>{var n;return Array.isArray(e)?(((n=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:n.value)??0)/100:0},Dm=e=>{const t=e.reduce((o,a)=>{const i=gs(a.price)?0:a.quantity;return o+i},0),n=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:n,subTotal:s}},Mm=e=>Array.isArray(e)?e.filter(t=>t.availability!=="withoutStock").reduce((t,n)=>t+(gs(n==null?void 0:n.price)?0:n.quantity),0):0,za=(e,t)=>{const{items:n,orderFormId:s,...o}=e;return{...o,id:s,items:Array.isArray(n)?n.map(a=>Oa(a,t)):[]}},Ba=(e,t)=>{const n=e.find(s=>s.id===t);return n?n.availability==="unavailableItemFulfillment":!1},Fm=(e,t)=>{const n=e.sku,s=e.isVariantOf.hasVariant.find(o=>o.sku===n);return s?s.name.split(t)[1]:"--"},Tt=(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},zm=(e,t)=>{const n=new Set;return[e,...t].filter(s=>!n.has(s)&&n.add(s),n)},Ua=(e,t)=>t&&Array.isArray(t)&&t.find(s=>s.id===e)?Promise.resolve(e):Promise.resolve(!1),$a=(e,t)=>t?Promise.resolve(e[t]):Promise.resolve(!1),Ha=async e=>{try{const t=await e();if(typeof t!="boolean")return t}catch(t){console.error(`[Error orderForm]: ${t}`)}return!1},qa=(e,t)=>{if(t!==-1){const n=Number(e);return n?n+1:1}return e??1},Va=(e,t)=>Array.isArray(e)?e.filter(n=>t==null?void 0:t.some(s=>s.id===n.id)):[],Wa=async(e,t)=>e.then(n=>[...n??[],...t??[]]),ke=async(e,t,n,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 n?c:za(c,s)})},Ga=(e,t,n)=>({notifications:[...e.notifications,{id:Date.now(),message:t,callback:n}]}),Ka=e=>[...Array.isArray(e)?e:[e],"faststore"],Xa=e=>{const t=e.get("utm_source")||xt("utm_source"),n=e.get("utm_campaign")||xt("utm_campaign"),s=e.get("utm_medium")||xt("utm_medium"),o=e.get("utmi_cp")||xt("utmi_cp"),a=e.get("utmi_pc")||xt("utmi_pc"),i=e.get("utmi_p")||xt("utmi_p");return{...t&&{utmSource:t},...s&&{utmMedium:s},...n&&{utmCampaign:n},...o&&{utmiCampaign:o},...a&&{utmiPart:a},...i&&{utmipage:i}}},xt=e=>{if(!e||typeof window>"u")return;const t=window.location.href;e=e.replace(/[[\]]/g,"\\$&");const n=new RegExp("[?&]"+e+"(=([^&#]*)|&|#|$)"),s=n.exec(t);return s?s[2]?decodeURIComponent(s[2].replace(/\+/g," ")):"":null},Ya=(e,t,n="BR")=>{const s=t,o={country:n,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]},Bm=Object.freeze(Object.defineProperty({__proto__:null,VALUE_REFERENCES:Lm,addItemOrder:Da,addNotification:Ga,createItemOrder:Oa,createNewAddress:Ya,fetchCartAPI:ke,findItemIndex:Qr,findOptions:Va,findTotalizerValue:Om,getCategories:La,getCode:Tt,getQuantity:qa,getRemoveId:Ua,getSize:Fm,getTotalItems:Mm,getTotalizer:Dm,getUrlParameter:xt,getValue:$a,initialState:Yr,isGift:gs,marketingTagsBuilder:Ka,mergeOptionsPromise:Wa,mountMarketingData:Xa,orderFormValues:za,promiseDefault:Ve,removeQuantity:Ma,updateItemSellerExternal:Ba,updateOrderFormPromise:Ha,updateQuantity:Fa,wishlistArray:zm},Symbol.toStringTag,{value:"Module"})),Um=()=>{const e=async(h,_)=>ke("/api/checkout/order-form/coupon",{body:{orderFormId:h,coupon:_}}),t=async(h,_,y={},x)=>{if(x)if(_){const b=_.includes(" - ")?_.split(" - ")[0]:_,C=await ke("/api/checkout/order-form/seller-code",{body:{orderFormId:h,sellerCode:b}},!0);return C instanceof Object&&y.name in C&&C[y.status]===!0?ke("/api/checkout/order-form/attachments",{body:{orderFormId:h,sellerCode:b,sellerName:C[y.name]}}).then(v=>({...v,openTextField:{...(v==null?void 0:v.openTextField)??{},statusOk:!0}})):Promise.resolve({paymentData:null,openTextField:{statusOk:!1,value:b}})}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:_}}),s=async(h,_,y)=>ke("/api/checkout/order-form/items",{body:{orderFormId:h,orderItems:Da(_,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=Ma(_,y);return ke("/api/checkout/order-form/items/update",{body:{orderItems:x.updateItems,orderFormId:h}})},u=async(h,_,y,x,b,C,j)=>{var E,S;const v=j?{startDateUtc:(E=C==null?void 0:C.deliveryWindow)==null?void 0:E.startDate,endDateUtc:(S=C==null?void 0:C.deliveryWindow)==null?void 0:S.endDate}:null,P={logisticsInfo:Array.from({length:x},(I,T)=>({itemIndex:T,selectedDeliveryChannel:(C==null?void 0:C.deliveryChannel)||null,selectedSla:(C==null?void 0:C.deliveryMethod)||null,deliveryWindow:v})),selectedAddresses:b,clearAddressIfPostalCodeNotFound:!0};return ke("/api/checkout/order-form/shipping",{body:{...P,orderFormId:h,country:y,postalCode:_}})},m=async(h,_,y)=>ke("/api/checkout/order-form/shipping/update",{body:{orderFormId:h,options:_,selectedAddresses:y}}),f=async(h,_,y,x)=>{const b=Fa(_,y,x);return ke("/api/checkout/order-form/items/update",{body:{orderFormId:h,orderItems:b}})};return{addCoupon:e,addItem:s,addSellerCode:t,addMarketingData:n,giftItem:o,emptyCart:a,getOrderForm:i,insertProfileEmail:c,removeItem:l,shipping:u,shippingUpdate:m,updateItemQuantity:async(h,_,y,x,b)=>f(h,_,y,x).then(C=>C&&Array.isArray(C.items)?Ba(C.items,y)?f(h,_,y,b):C:!1)}},Zr="soma::cart",qt="soma::options",jt=Et.create((e,t)=>{const n=Um(),s=async(o,a,i)=>{e({loading:!0});const c=await Ha(o);if(typeof c!="boolean"){e({...c});const l=await Wa(tt.get(qt),i);return tt.set(qt,l),$a(c,a).finally(()=>e({loading:!1,options:l}))}return Ve};if(typeof window<"u"){const o=async a=>{if(a){const i=await tt.get(qt).then(u=>Va(u,a.items));tt.set(Zr,a),tt.set(qt,i),e({...a,options:i});const c=new URLSearchParams(window.location.search),l=c.get("utm_campaign")||c.get("utmi_campaign")||"";l&&s(()=>n.addSellerCode(t().id,l.toUpperCase()),"openTextField")}};return tt.get(Zr).then(a=>n.getOrderForm(a?a.id:"").then(o)),{...Yr,addCoupon:async a=>s(()=>n.addCoupon(t().id,a),"marketingData"),addItem:(a,i)=>{s(()=>n.addItem(t().id,t().items,a),"items",i)},addSellerCode:async(a,i)=>s(()=>n.addSellerCode(t().id,a,i,t().isOpen),"openTextField"),addMarketingData:async a=>s(()=>n.addMarketingData(t().id,a),"marketingData"),emptyCart:()=>{s(()=>n.emptyCart(t().id))},removeItem:async a=>{const i=await s(()=>n.removeItem(t().id,t().items,a),"items");return Ua(a,i)},shipping:async(a,i="BR")=>s(()=>n.shipping(t().id,a??"",i,t().items.length,Ya(a??"",null,i)),"shippingData"),shippingUpdate:async a=>s(()=>{var i;return n.shippingUpdate(t().id,a,(i=t().shippingData)==null?void 0:i.selectedAddresses)},"shippingData"),toggleServiceToProduct:async(a,i,c)=>s(()=>n.giftItem(t().id,a,i,c),"items"),updateItemQuantity:async(a,i,c)=>{const{id:l,items:u}=t();return s(()=>{var m;return n.updateItemQuantity(l,u,a,i,((m=u.find(f=>f.id===a))==null?void 0:m.quantity)??1)},"items",c?[c]:void 0)},insertProfileEmail:async a=>s(()=>n.insertProfileEmail(t().id,a),"clientProfileData"),setIsOpen:a=>e({isOpen:a})}}return Yr}),$m=()=>jt(e=>e),Qa=Et.create(e=>({notifications:[],actions:{addNotification:(t,n)=>e(s=>Ga(s,t,n)),removeNotification:t=>e(n=>({notifications:n.notifications.filter(s=>s.id!==t)}))}})),ys=()=>Qa(e=>e.notifications),xs=()=>Qa(e=>e.actions),Hm=Object.freeze(Object.defineProperty({__proto__:null,KEY_INDEXED_OPTIONS:qt,KEY_INDEXED_STORE:Zr,useCartStore:jt,useGetCartStoreState:$m,useGetNotificationActions:xs,useGetNotificationsStore:ys},Symbol.toStringTag,{value:"Module"})),qm=6e3,Za=g.createContext({}),Ja=({children:e,...t})=>{const{items:n}=jt(),[s,o]=g.useState([]),a=g.useRef(null),i=g.useMemo(()=>Array.isArray(s)&&s.length>0?s.map(c=>n.find(l=>l.id===c.id)).filter(c=>c!==void 0):[],[n,s]);return g.useEffect(()=>{s.length&&(clearTimeout(a.current??0),a.current=setTimeout(()=>{o([])},qm))},[s]),r.jsx(Za.Provider,{value:g.useMemo(()=>({...t,setRecentlyAdded:o,recentlyAddedProducts:i}),[t,o,i]),children:e})},Jt=()=>{const e=g.useContext(Za);if(e===void 0)throw new Error("useUIContext must be used within a UIProvider");return e};class ei{constructor(){gt(this,"events",{});gt(this,"prevData",{})}subscribe(t,n){return this.events[t]||(this.events[t]=[]),this.events[t].push(n),()=>{this.events[t]=this.events[t].filter(s=>s!==n)}}publish(t,n){this.events[t]&&this.events[t].forEach(s=>{this.prevData[t]=n,s(n)})}}const ti=g.createContext({}),Vm=({children:e,headerConfigs:t,pathname:n,...s})=>{const[o,a]=g.useState(!0),[i,c]=g.useState(!1),l=n==="/",u=g.useRef(new ei),m=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},f=m(l),p=g.useRef(f);return g.useEffect(()=>{var y;const h=((y=new URLSearchParams(window.location.search))==null?void 0:y.toString())??"";(h.includes("utm_")||h.includes("gclid"))&&(Gr.get("lastMedias")||Gr.set("lastMedias",`${h}`,{expires:1/24}));const _=()=>{const x=typeof(window==null?void 0:window.navigator)>"u"?"":navigator==null?void 0:navigator.userAgent,b=window.innerWidth<1024||!!x.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile|WPDesktop/i);i||c(!0),o!==b&&(a(b),c(!0))};return i||_(),window.addEventListener("resize",_,{passive:!0}),()=>window.removeEventListener("resize",_)},[o,i]),g.useEffect(()=>{const h=m(l);u.current.publish("header:change_variant",h.headerVariant),u.current.publish("header:change_position",h.position),p.current=h},[l]),r.jsx(ti.Provider,{value:{isMobile:o,mediatorRef:u,currentHeaderConfigsRef:p,deviceValidated:i,...s},children:r.jsx(Ja,{children:e})})},re=()=>g.useContext(ti),ni=g.createContext({}),Wm=({children:e,...t})=>r.jsx(ni.Provider,{value:{...t},children:e}),ue=()=>g.useContext(ni),Pt=(e,t)=>Et.create(n=>{const s=()=>n({value:e});return t&&t instanceof Set&&t.add(s),{value:e,actions:{setValue:o=>n({value:o}),reset:s}}}),Yt={category:null,menuMobileIsOpen:!1,searchModalIsOpen:!1,userMenuIsOpen:!1},en=new Set,Gm=()=>{en.forEach(e=>{e()})},ri=Et.create((e,t)=>{const n=()=>e({value:Yt.category});return en.add(n),{value:Yt.category,actions:{reset:n,setValue:s=>e(()=>({value:s})),updateValue:s=>{t().value!==s&&e({value:s})}}}}),si=()=>ri(e=>e.value),tn=()=>ri(e=>e.actions),oi=Pt(Yt.menuMobileIsOpen,en),ai=()=>oi(e=>e.value),ii=()=>oi(e=>e.actions),ci=Pt(Yt.searchModalIsOpen,en),li=()=>ci(e=>e.value),Mn=()=>ci(e=>e.actions),ui=Pt(Yt.userMenuIsOpen,en),vs=()=>ui(e=>e.value),bs=()=>ui(e=>e.actions),Km=Object.freeze(Object.defineProperty({__proto__:null,resetAllHeaderStores:Gm,useActionsHeaderCategory:tn,useActionsMenuMobileIsOpen:ii,useActionsSearchModalIsOpen:Mn,useActionsUserMenuIsOpen:bs,useGetHeaderCategoryStore:si,useGetMenuMobileIsOpen:ai,useGetSearchModalIsOpen:li,useGetUserMenuIsOpen:vs},Symbol.toStringTag,{value:"Module"})),Mt={selectedSkuInfo:{productId:"",name:"",size:"",sku:"",sellerId:"",sellerName:"",available:!1,quantity:1},openLetMeKnow:!1,openMeasurements:!1,showBottomNavigation:!1,showNotify:!1},zt=new Set,Xm=()=>{zt.forEach(e=>{e()})},di=Et.create(e=>{const t=()=>e({value:Mt.selectedSkuInfo});return zt.add(t),{value:Mt.selectedSkuInfo,actions:{setValue:n=>e(s=>({value:{...s,...n}})),reset:t}}}),nn=()=>di(e=>e.value),mi=()=>di(e=>e.actions),pi=Pt(Mt.openLetMeKnow,zt),Ym=()=>pi(e=>e.value),Qm=()=>pi(e=>e.actions),fi=Pt(Mt.showNotify,zt),hi=()=>fi(e=>e.value),js=()=>fi(e=>e.actions),_i=Pt(Mt.showBottomNavigation,zt),Zm=()=>_i(e=>e.value),Jm=()=>_i(e=>e.actions),gi=Pt(Mt.openMeasurements,zt),yi=()=>gi(e=>e.value),xi=()=>gi(e=>e.actions),ep=Object.freeze(Object.defineProperty({__proto__:null,resetAllPDPStores:Xm,useActionsPDPOpenLetMeKnow:Qm,useActionsPDPOpenMeasurements:xi,useActionsPDPSelectedSkuInfo:mi,useActionsPDPShowBottomNavigation:Jm,useActionsPDPShowNotify:js,useGetPDPOpenLetMeKnow:Ym,useGetPDPOpenMeasurements:yi,useGetPDPSelectedSkuInfo:nn,useGetPDPShowBottomNavigation:Zm,useGetPDPShowNotify:hi},Symbol.toStringTag,{value:"Module"})),to={feedback:{active:!1,action:"add"},list:[]},Cs=Et.create((e,t)=>({value:to,actions:{reset:()=>e({value:to}),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:""}}}))}})),Bt=()=>Cs(e=>e.value.list),Ss=()=>Cs(e=>e.value.feedback),Nt=()=>Cs(e=>e.actions),tp=Object.freeze(Object.defineProperty({__proto__:null,useActionsWishlistStore:Nt,useGetWishlistFeedbackStore:Ss,useGetWishlistStore:Bt},Symbol.toStringTag,{value:"Module"})),vi=g.createContext({}),np=({children:e,headerData:t,...n})=>{var m,f;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}=re();return(m=l.current)==null||m.subscribe("header:change_variant",p=>{var b,C,j;if(p&&u.current&&(u.current.bannerVariant=p),!s.current)return;const _=document.body.scrollTop>0,y=s.current.getAttribute("data-interactiveVariant"),x=_?y:p??((b=u.current)==null?void 0:b.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))}),(f=l.current)==null||f.subscribe("header:change_position",p=>{s.current&&(s.current.style.position=p)}),g.useEffect(()=>{const p=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:p.signal});const _=y=>{var b;(b=y.target.closest("a"))==null||b.blur()};return s.current&&(s.current.addEventListener("click",_,{signal:p.signal}),s.current.addEventListener("touchend",_,{signal:p.signal})),()=>{p.abort()}},[]),r.jsx(vi.Provider,{value:{headerData:t,structureRef:o,rootRef:s,tipbarRef:a,userMenuMobileRef:i,userMenuDesktopRef:c,...n},children:e})},Pe=()=>g.useContext(vi),bi=g.createContext({}),ji=({children:e,...t})=>r.jsx(bi.Provider,{value:g.useMemo(()=>t,[t]),children:e}),Es=()=>{const e=g.useContext(bi);if(e===void 0)throw new Error("useMenuMobileContext must be used within a MenuMobileProvider");return e},rp=e=>{if(!e||typeof window>"u")return 0;const t=window.getComputedStyle(e);return parseInt(t.padding,10)},sp=(e,t,n)=>{if(!(e instanceof HTMLElement)||!(t instanceof HTMLElement))return{left:0,top:0};const s=t.getBoundingClientRect(),o=e.getBoundingClientRect(),a=e!=null&&e.parentElement?rp(e==null?void 0:e.parentElement):0;return{left:s.left+s.width/2-(o.width+a),top:s.top+s.height+n}},Ci=g.createContext({}),Si=({children:e,delay:t=600,gap:n=20,...s})=>{const[o,a]=g.useState(!1),i=g.useRef(null),[c,l]=g.useState(!1),[u,m]=g.useState({left:0,top:0}),f=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 p=window.document.querySelector("#cart-button"),h=window.document.querySelector("#add-to-cart--tooltip");if(p&&h){const{left:_,top:y}=sp(h,p,n??0);m({left:_,top:y}),l(!1)}},[n,o]),r.jsx(Ci.Provider,{value:g.useMemo(()=>({...s,...u,handleClose:f,isLeaving:c,isOpen:o,setIsOpen:a,setIsLeaving:l}),[s,u,f,c,o,a,l]),children:e})},It=()=>{const e=g.useContext(Ci);if(e===void 0)throw new Error("useAddToCartContext must be used within a AddToCartProvider");return e},Ei=g.createContext({}),op=({children:e,SELLER_CODE_VALIDATION_KEYS:t,CARTPROVIDER_MESSAGE_PRODUCT_REMOVE:n,data:s,...o})=>{var se,ce,oe,le;const a=jt(),{setRecentlyAdded:i}=Jt(),c=g.useRef(""),l=ys(),{addNotification:u,removeNotification:m}=xs(),[f,p]=g.useState(null),{addCoupon:h,addItem:_,addSellerCode:y,addMarketingData:x,emptyCart:b,isOpen:C,removeItem:j,shipping:v,shippingUpdate:P,toggleServiceToProduct:E,updateItemQuantity:S}=a;g.useEffect(()=>{(async()=>{var w,W;if(!a.id||!((W=(w=s==null?void 0:s.promotion)==null?void 0:w.promotionCart)!=null&&W.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());p(ee)})()},[a.id,a.items.length,s==null?void 0:s.versionId,(ce=(se=s==null?void 0:s.promotion)==null?void 0:se.promotionCart)==null?void 0:ce.idPromotion,(le=(oe=s==null?void 0:s.promotion)==null?void 0:oe.promotionCart)==null?void 0:le.versionAPI]),g.useEffect(()=>{const M=Gr.get("lastMedias");if(a.id&&M&&c.current!==M){c.current=M;const ee=new URLSearchParams(M),w=Xa(ee);x(w)}},[a,x]);const I=g.useCallback(async(M,ee)=>(ee==="coupon"?h(M):y(M,t??{})).then(W=>{if(typeof W!="boolean"&&W instanceof Object){if(ee==="seller"&&"value"in W){const{statusOk:ie,value:_e}=W,N=String(_e??"").split(" - ");return Tt((N==null?void 0:N[0])??"",M,!!ie)}return Tt(String(W.coupon),M,!0)}return Tt("","")}).catch(()=>Promise.resolve({code:400})),[h,y]),T=g.useCallback((M,ee,w)=>{const{id:W}=M;S(W,ee,w)},[S]),A=g.useCallback((M,ee,w=!1)=>{if(!M)return;const{id:W}=M,ie=Qr(a.items,W);if(ie!==-1&&!w){const _e=Number(a.items[ie].quantity),N=a.items[ie]?_e+1:1;T(M,N,ee)}else _({id:W,quantity:(M==null?void 0:M.quantity)??1,seller:M.seller});C||i(_e=>[..._e,M])},[_,T,a.items,C,i]),k=g.useCallback((M,ee)=>{if(!M||!Array.isArray(M))return;i(W=>[...W,...M]);const w=M.map(W=>{const{id:ie,quantity:_e,seller:N}=W,R=Qr(a.items,ie),Ie=qa(_e??1,R);return{id:ie,quantity:Ie,seller:N}});_(w,ee)},[_,a.items,i]),O=g.useCallback(async(M,ee,w)=>M?j(M).then(()=>(u(ee??`${n}`,w),Tt(M,M))):Promise.resolve(Tt("","Product id required")),[u,j]),Y=g.useCallback(()=>{a.items.length>0&&b()},[b,a.items]),D=g.useCallback((M,ee="BRA")=>v(M,ee),[v]),U=g.useCallback(M=>{M&&P(M)},[P]),B=g.useCallback(async(M,ee,w=!1)=>{const W=a.items.findIndex(_e=>_e.uniqueId===M);return a.items[W]&&W>=0?E(ee,W,w):!1},[a.items,E]),Q=g.useCallback(async(M,ee)=>S(M,ee).then(w=>{if(Array.isArray(w)){const W=w.find(ie=>ie.id===M);if(W&&(W==null?void 0:W.quantity)<ee)return String(W.quantity)}return!1}),[S]),G=g.useCallback(async()=>{await x({...a.marketingData,coupon:""})},[x,a.marketingData]),$=g.useCallback(async()=>{await x({...a.marketingData,utmiCampaign:"",utmCampaign:"",utmSource:"",utmMedium:""})},[x,a.marketingData]),J=g.useCallback(async()=>{await v("","BRA")},[v]);return r.jsx(Ei.Provider,{value:g.useMemo(()=>({...o,data:s,addCouponSeller:I,addToCart:A,addItemsToCart:k,cartStore:a,notifications:l,clearCart:Y,addNotification:u,isOpen:a.isOpen,removeNotification:m,removeToCart:O,setIsOpen:a.setIsOpen,shipping:D,shippingUpdateOption:U,toggleGiftItemCart:B,updateItemQuantity:Q,removeCoupon:G,removeSellerCode:$,removeCEP:J,promotionRules:f,setPromotionRules:p}),[o,s,I,A,k,l,Y,u,a,m,O,D,U,B,Q,G,$,J,f,p]),children:e})},be=()=>{const e=g.useContext(Ei);if(e===void 0)throw new Error("useCartContext must be used within a CartProvider");return e},Pi=g.createContext({}),Ps=({children:e,fetch:t})=>{const n=g.useRef(!0),[s,o]=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();o(u.data),n.current=!1}catch{n.current=!0,i(!0)}})()},[t]),r.jsx(Pi.Provider,{value:g.useMemo(()=>({data:s,isLoading:n.current??!1,isError:a}),[s,a,n]),children:e})},Ns=()=>{const e=g.useContext(Pi);if(e===void 0)throw new Error("useProductsContext must be used within a useRootContext");return e},Ni=g.createContext({}),Is=({children:e,sort:t,state:n,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=n.base)!=null&&u.length?n.base.slice(1).split("/").map((m,f)=>({key:`category-${f+1}`,value:m})):[]},[n.base,o]);return r.jsx(Ni.Provider,{value:g.useMemo(()=>({state:{...n,facets:[...l,...n.facets??[]]},sort:t,count:s??c,searchParams:i}),[l,s,t,n,i]),children:e})},Be=()=>{const e=g.useContext(Ni);if(e===void 0)throw new Error("useSearchContext must be used within a SearchProvider");return e},Ii=g.createContext({}),ap=({children:e,...t})=>r.jsx(Ii.Provider,{value:t,children:e}),Me=()=>{const e=g.useContext(Ii);if(e===void 0)throw new Error("usePLPConstants must be used within a PLPConstantsProvider");return e},wi=g.createContext({}),ip=({children:e,selectedFacets:t})=>{const{data:n,...s}=Ns(),{router:o}=ue(),{searchParams:a,PLP_SORT_DEFAULT:i}=Me(),c=g.useCallback((p,h)=>{if(h){if(p.key.toLocaleLowerCase()==="price"){const _=h.getAll("facets");h.delete("facets"),_.forEach(y=>{const[x]=y.split("/");x!==p.key&&h.append("facets",y)})}h.set("page","1"),h.append("facets",`${p.key}/${p.value}`),o.push(`?${h.toString()}`)}},[o]),l=g.useCallback(()=>{const p=new URLSearchParams;p.set("sort",i),p.set("page","1"),o.push(`?${p.toString()}`)},[o]),u=g.useCallback((p,h)=>{if(!h||!h.has&&!h.has("facets"))return;const _=h.getAll("facets");h.delete("facets"),h.set("page","1"),_.forEach(y=>{const[x,b]=y.split("/");(x!==p.key||b!==p.value)&&h.append("facets",y)}),o.push(`?${h.toString()}`)},[o]),m=g.useCallback(p=>{const h=a?new URLSearchParams(a):new URLSearchParams;for(const[,_]of h.entries()){const[y,x]=_.split("/");if(y===p.key&&x===p.value)return u(p,h)}return c(p,h)},[c,u,a]),f=g.useCallback(p=>{const h=a?new URLSearchParams(a):new URLSearchParams;h.set("sort",p.replace("_",":")),o.push(`?${h.toString()}`)},[o,a]);return r.jsx(wi.Provider,{value:g.useMemo(()=>({...s,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:m,onSort:f,searchParams:a}),[n,l,f,m,s,t,a]),children:e})},Ri=({children:e,forceUpdate:t})=>{const{state:n}=Be();return r.jsx(Ps,{fetch:()=>fetch("/api/search/facets",{method:"POST",body:JSON.stringify({...n,forceUpdate:t}),priority:"low"}),children:r.jsx(ip,{selectedFacets:(n==null?void 0:n.facets)??[],children:e})})},Ti=()=>{const e=g.useContext(wi);if(e===void 0)throw new Error("useFacetsContext must be used within a FacetsProvider");return e},Ht={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},lp="Imagem do produto",no=1,up="Sair",dp=e=>e.exit,ro=({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"}],mp=(e,t)=>{const n=(t??"").split("@")[0];return e?`Olá${n.length?", ":" "}${n}!`:"Olá!"},pp=e=>"Seja bem vindo!",fp="Marque a caixa para aceitar os termos de política de privacidade.",hp="Algumas informações estão incorretas ou não foram preenchidas",_p="Enviar",Ai=g.createContext({}),gp=({children:e})=>{const{data:t,...n}=Ns(),[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]),r.jsx(Ai.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:cp,total:s}),[t,n,s]),children:e})},ws=({children:e,query:t,forceUpdate:n})=>{const{count:s,state:o}=Be(),a={...o,count:s};return r.jsx(Ps,{fetch:()=>fetch("/api/search/product",{method:"POST",body:JSON.stringify({...a,query:t,forceUpdate:n,facets:o.facets??[]})}),children:r.jsx(gp,{children:e})})},rn=()=>{const e=g.useContext(Ai);if(e===void 0)throw new Error("useProductsContext must be used within a ProductsProvider");return e},ki=g.createContext({}),yp=({children:e,slug:t,searchParams:n,collectionId:s,brand:o,itemsPerPage:a=24,PLP_SORT_DEFAULT:i})=>{const{pathname:c}=ue(),l=g.useRef(""),[u,m]=g.useState(!1),f=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"))??(s?"":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)},[s,c,n,t]),p=g.useMemo(()=>{if(Array.isArray(n==null?void 0:n.getAll("facets")))return H.parseSearchState(f,n.getAll("facets")??[""]);const h=(n==null?void 0:n.getAll("facets"))??[];return H.parseSearchState(f,h)},[f,n]);return g.useEffect(()=>{l.current!==c&&(l.current=c,window.document.body.scrollTo(0,0))},[c]),r.jsx(ki.Provider,{value:g.useMemo(()=>({openFilters:u,setOpenFilters:m}),[u,m]),children:r.jsx(Is,{ITEMS_PER_PAGE:a,searchParams:n??new URLSearchParams,state:g.useMemo(()=>({...p}),[p]),collectionId:s,brand:o,children:e})})},Rs=()=>{const e=g.useContext(ki);if(e===void 0)throw new Error("usePLPContext must be used within a PLPProvider");return e},Rn=(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)=>Rn(o,t[a]));if(Array.isArray(t))return!1;const n=Object.keys(e),s=Object.keys(t);return n.length!==s.length?!1:n.every(o=>Object.prototype.hasOwnProperty.call(t,o)&&Rn(e[o],t[o]))},Li=(e,t,n="page")=>Object.keys(t).some(s=>s===n?!1:!Rn(t[s],e[s])),Jr=async e=>{const t=await fetch("/api/search/product",{method:"POST",body:JSON.stringify(e),priority:"high"});if(!t.ok)throw new Error("[FAILED TO FETCH DATA]");const n=await t.json();return n==null?void 0:n.data},Oi=()=>({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}}}),Di=(e,t,n,s=24)=>{const o=new Set,a=[];if(!Array.isArray(e)||e.length===0)return{taken:o,placedBanners:a};const i=t*s*n;for(const c of e){let l=Number(c.position_grid),u=!1;for(;l<i;){const m=l%n;if(m+c.columns>n){l+=n-m;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}},es=(e,t,n,s=24)=>{const{placedBanners:o,taken:a}=Di(e??[],t,n),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}},Nn=(e,t,n=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:Ts(),products:t!=null&&t.products.length&&e===a?t==null?void 0:t.products:Array.from({length:n},()=>Oi())}}),Mi=(e,t)=>[...e,{loading:!1,page:t,pagination:Ts(),products:[]}],Ts=()=>({nextPage:!1,previousPage:!1,startCursor:"0",endCursor:"1",count:1,total:1}),xp=(e,t,n,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=n[c];return t.filter((u,m)=>{const f=s[m];return f<=l||o>i&&f>l})},Fi=(e,t)=>{const n=new Map;for(const o of e){const a=Math.floor(o/t);n.has(a)||n.set(a,[]),n.get(a).push(o)}const s=[];for(const[,o]of n){const a=o[Math.floor(Math.random()*o.length)];s.push(a)}return s},zi=(e,t)=>{if(!e)return[];const n=e.map((s,o)=>s.video&&s.video!==""?o:null).filter(s=>s);return Fi(n,t)},Bi=e=>Array.isArray(e)?e.map((t,n)=>({href:`/${e.slice(0,n+1).join("/")}`,name:t})):[],vp=Object.freeze(Object.defineProperty({__proto__:null,createBreadcrumb:Bi,createPage:Mi,createPages:Nn,createPagination:Ts,createProduct:Oi,deepEqual:Rn,fetchPage:Jr,getBanners:Di,getPositions:es,getProductsWithVideo:zi,getRandomVideoPerRow:Fi,getVisibleBanners:xp,hasStateChangedExceptPage:Li},Symbol.toStringTag,{value:"Module"})),bp=50,jp=Et.create((e,t)=>{const n=i=>Math.min(i,bp),s=async(i,c)=>{const l=n(i.page);try{const u=await Jr({...i,page:l});o(l,m=>c?c(m,u):{...m,...u})}catch(u){console.error(`[PDC - SCROLL INFINITE FAILED TO FETCH PAGE ${l}]: ${u}`),o(l,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)=>{await s(i,(l,u)=>(typeof c=="function"&&c(u),{...l,...u,loading:!0}))};return{banners:[],load:!1,pages:[],total:0,positions:[],products:[],createPages:async(i,c,l,u)=>{var f,p,h;const m=n(Number(i==null?void 0:i.page));e({...c,pages:Nn(m,void 0,u)});try{const _=await Jr({...i,page:m});if(_){if(!_.products.length&&((f=_==null?void 0:_.pagination)==null?void 0:f.total)<m){a({...i,page:(p=_==null?void 0:_.pagination)==null?void 0:p.total},l),e({pages:Nn((h=_==null?void 0:_.pagination)==null?void 0:h.total)});return}typeof l=="function"&&l(_),e({load:!0,pages:Nn(m,_),total:Number(_.pagination.count)})}}catch(_){console.error(`[PDC - SCROLL INFINITE TO CREATE PAGES]: page ${m} ${_}`)}},addPage:(i,c,l)=>{const{pages:u}=t(),m=n(i==null?void 0:i.page);u.some(f=>f.page===m)||(e({...c,pages:Mi(u,m)}),a(i,l))},updateProducts:(i,c)=>{const l=t().pages.find(u=>u.page===n(i==null?void 0:i.page));l!=null&&l.loading||a(i,c)}}}),Cp=(e,t,n,s=0)=>{if(!e.length)return[];let o=0;const a=[];for(let i=0;i<e.length;i+=n){const c=e.slice(i,i+n),l=c.findIndex(u=>{var m;return(m=u.node)==null?void 0:m.video});for(let u=0;u<c.length;u++){const m=i+u,f=s+m,p=t.find(_=>_.position_grid===f+1),h=f+o+1;p&&(o+=p.columns),a.push({position:h,canPlayVideo:u===l})}}return a},Ui=(e,t,n)=>{const s=(t-1)*n,o=t*n;return e>=s&&e<=o},Fn=e=>{var t;return(t=e==null?void 0:e.map(n=>({disable:H.disableSKU(n),size:H.getSKUName(n),skuID:"sku"in n&&n.sku})))==null?void 0:t.filter(n=>n.disable)},Sp=Object.freeze(Object.defineProperty({__proto__:null,createGridPosAndVideo:Cp,getSkusNotify:Fn,isPositionInCurrentPage:Ui},Symbol.toStringTag,{value:"Module"})),$i=({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})]});$i.displayName="Notify.Controls";const Ze={"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 Hi(e){const n=decodeURIComponent(window.document.cookie).split(";");for(const s of n){const[o,a]=s.trim().split("=");if(o===e)return a}}function As(e,t,n={}){const o={...{path:"/",expires:new Date(Date.now()+36e5)},...n};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}var qi={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 Ep(e,t,n){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 Pp(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 Vi=[["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 Np(e,t,n){Pp({id:e,custom_data:t},"#00c851",n)}var Ip={DataLayer:Ep,Dito:Np};async function wp(e,t){const n=qi[e];n&&await Promise.allSettled(n.destinations.map(async s=>{try{await Ip[s](e.toLowerCase(),t,s)}catch(o){console.error(`[DT] Failed to send ${e} to ${s}:`,o)}}))}async function Rp(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 Tp(e){try{const{pathname:t}=new URL(e,window.location.origin);return/\/p\/?$/.test(t)}catch{return!1}}function Wi(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 Ap(e){const t=Wi(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 s=await n.json();return(s==null?void 0:s[0])||null}catch(n){return console.error("Erro ao buscar dados do produto:",n),null}}function Gi(e,t){var n,s,o,a;const i=(s=(n=e==null?void 0:e.shippingData)==null?void 0:n.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 Ki(e){var t,n;const s=await Rp(e.productId||e.productID||e.item_group_id);return s.length&&(n=(t=s[0].items.find(o=>o.name===e.skuName))==null?void 0:t.itemId)!=null?n:null}function zn(e){return e.discount||e.discount===0?e.discount:parseFloat(Math.max(e.listPrice-e.sellingPrice,0).toFixed(2))/100||0}function Ct(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 s=n();if(s!=null)return s}return null}function sn(e){const t=[()=>Object.values((e==null?void 0:e.productCategories)||{}).pop(),()=>Object.values((e==null?void 0:e.categories)||{}).pop(),()=>{var n,s,o,a,i;return(i=(a=(o=(s=(n=e==null?void 0:e.category)==null?void 0:n.split)==null?void 0:s.call(n,">"))==null?void 0:o[1])==null?void 0:a.trim)==null?void 0:i.call(a)},()=>e.item_category2];for(const n of t){const s=n();if(s!=null)return s}return null}function Xi(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 kp={farm:"farmrio","farm etc":"farmetc","farm rio":"farmrio"};function so(e){if(!e)return null;const t=e.toLowerCase().trim();return kp[t]||null}function ot(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"?so(e):null;const s=n.map(so).filter(a=>a!==null),o=[...new Set(s)].sort();return o.length>0?o.join("_"):null}function Lp(e){var t;if(!e.orderForm&&!((t=e.orderForm.items)!=null&&t.length))return null;const n=e.orderForm.items;return ot(n)}function Op(e){var t;const{item:n}=e;return ot(((t=n==null?void 0:n.additionalInfo)==null?void 0:t.brandName)||n.brand||n.item_brand)}function Dp(e,t){if(e!=null&&e.brand)return ot(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 Lp(e);case"ADD_TO_CART":case"REMOVE_FROM_CART":return Op(e);default:return null}}async function Mp(e){var t;const n=((t=e.orderForm)==null?void 0:t.items)||[];return n.length?await Promise.all(n.map(async s=>{var o,a,i;return{item_id:s.productId,item_category2:sn(s),item_category4:Xi(s),item_shipping_tier:Gi(e.orderForm,s),price:parseFloat((s.price/100).toFixed(2))||0,quantity:s.quantity||1,item_ref:s.refId||null,item_brand:ot((o=s.additionalInfo)==null?void 0:o.brandName)||((a=s.additionalInfo)==null?void 0:a.brandName)||null,item_sku:await Ki(s)||s.id||null,item_name:s.name||s.id||null,item_category:Ct(s)||null,item_variant:s.skuName.split(/[-/]/)[0].trim(),item_variant2:((i=s.skuName.split(/[-/]/).pop())==null?void 0:i.trim())||"",discount:zn(s)}})):[]}async function Fp(e,t){var n,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:sn(a),item_category4:Xi(a),item_shipping_tier:t==="REMOVE_FROM_CART"?Gi(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 Ki(a)||null,item_name:a.name||a.item_name||null,item_category:Ct(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:zn(a),item_list_name:Ct(a)||null,item_url:a.item_url||null}]}async function zp(e){return((e==null?void 0:e.list)||[]).map(t=>{var n,s,o,a,i;return{price:((n=t==null?void 0:t.price)==null?void 0:n.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:ot((o=t==null?void 0:t.brand)==null?void 0:o.name)||ot(e.brand)||ot(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:Ct(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:sn(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:zn(t)||null,item_list_name:(e==null?void 0:e.itemListName)||Ct(t)||null}})}async function Bp(e){var t,n,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:ot(o.brand.name)||ot(e.brand)||null,item_name:o.productName||o.alternateName||null,item_category:Ct(o)||null,item_variant:((t=o==null?void 0:o.name)==null?void 0:t.split("-")[0].trim())||null,item_category2:sn(o)||((s=(n=o==null?void 0:o.category)==null?void 0:n.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:zn(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 Up(e){var t;if(!Tp(e==null?void 0:e.bannerUrl))return[];const s=await Ap(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:Wi(e==null?void 0:e.bannerUrl),item_brand:ot(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:Ct(s)||null,item_variant:((t=o==null?void 0:o.name)==null?void 0:t.split("-").pop().trim())||null,item_category2:sn(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 $p(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 Mp(e);case"ADD_TO_CART":case"ADD_TO_WISHLIST":case"REMOVE_FROM_CART":return Fp(e,t);case"SELECT_ITEM":case"VIEW_ITEM_LIST":return zp(e);case"VIEW_ITEM":return Bp(e);case"VIEW_PROMOTION":case"SELECT_PROMOTION":return Up(e);default:return null}}function Hp(e){var t,n,s;if(!e.orderForm)return null;const o=((t=e.orderForm.paymentData)==null?void 0:t.payments)||[],a=((n=e.orderForm.paymentData)==null?void 0:n.paymentSystems)||[];if(!o.length||!a.length)return null;const i=o.find(f=>f==null?void 0:f.paymentSystem)||o[0],c=String((i==null?void 0:i.paymentSystem)||"").trim();if(!c)return null;const l=a.find(f=>String(f.id)===c),u=((s=l==null?void 0:l.name)==null?void 0:s.toLowerCase())||"",m=Vi.find(([f])=>u.includes(f));return m?m[1]:null}function qp(e){var t,n,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=((n=a[0])==null?void 0:n.payments)||[];if(!i.length)return null;const c=((o=(s=i[0])==null?void 0:s.paymentSystemName)==null?void 0:o.toLowerCase())||"",l=Vi.find(([u])=>c.includes(u));return l?l[1]:null}function Vp(e,t){if(e!=null&&e.paymentType)return e.paymentType;switch(t){case"ORDER_REVIEWED":case"CUSTOM_ADD_PAYMENT_INFO":return Hp(e);case"PURCHASE":case"CUSTOM_PURCHASE":return qp(e);default:return null}}var Wp={brand:Dp,items:$p,payment_type:Vp,user_info:async(e,t)=>{var n;const o=(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(!o)return{customer:{email:e.userEmail},address:null};try{const a=`${o}/_v/user-info`;return await(await fetch(a,{method:"POST",body:JSON.stringify({email:e.userEmail})})).json()}catch{return{customer:{email:e.userEmail},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,s,o,a;return e!=null&&e.currency?e.currency:e!=null&&e.bannerUrl?"BRL":e!=null&&e.item?((s=(n=e.item)==null?void 0:n.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 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,s;const a=(((n=e.orderForm)==null?void 0:n.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 n,s;return(((n=e.orderForm)==null?void 0:n.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 n;if(e.couponMessage)return e.couponMessage;const s=((n=e.orderForm)==null?void 0:n.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 n,s;return e.appliedCoupon||((s=(n=e==null?void 0:e.orderForm)==null?void 0:n.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 n;const s=e.orderForm;return s?(((n=s.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 s={};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;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 n,s,o;return((o=(s=(n=e==null?void 0:e.orderForm)==null?void 0:n.shippingData)==null?void 0:s.logisticsInfo)!=null?o:[]).reduce((i,c)=>{var l,u;const m=(l=c.slas)==null?void 0:l.find(f=>f.id===c.selectedSla);return i+((u=m==null?void 0:m.price)!=null?u:0)},0)},shipping_tier:(e,t)=>{var n,s,o,a;const c=((o=(s=(n=e==null?void 0:e.orderForm)==null?void 0:n.shippingData)==null?void 0:s.logisticsInfo)!=null?o:[]).find(p=>p.selectedSla);if(!c)return null;const l=(a=c.slas)==null?void 0:a.find(p=>p.id===c.selectedSla);if(!l)return null;const{deliveryChannel:u,name:m,pickupStoreInfo:f}=l;return u==="pickup-in-point"?`retirada em loja${f!=null&&f.friendlyName?`: ${f.friendlyName}`:""}`:u==="delivery"?`receba em casa${m?`: ${m}`:""}`:null},transaction_id:(e,t)=>{var n,s;return((s=(n=e.orderForm)==null?void 0:n.orderGroup)==null?void 0:s.toString())||null},available_grid:(e,t)=>e.availableGrid||null};async function Gp(e={},t){const n=qi[t];return n?Object.fromEntries(await Promise.all(n.requiredParams.map(async o=>{const a=Wp[o];return typeof a!="function"?(console.error(`[DT] Missing paramGetter for param: ${o}`),[o,null]):[o,await a(e,t)]}))):void 0}async function Kp(e,t={}){try{const n=await Gp(t,e);return await wp(e,Object.assign({},n,{window:t.window}))}catch(n){return console.error(`[DT] Error tracking event ${e}:`,n)}}const Xp=({accountName:e=""})=>{const{sendDataLayerEvent:t}=ae(),{user:n}=Ut(),{cartStore:s}=be();return g.useEffect(()=>{if(!n)return;(async()=>{const{userId:a,email:i,firstName:c,lastName:l,phone:u,homePhone:m,postalCode:f,street:p,number:h,city:_,gender:y}=n,x=new TextEncoder().encode(a),b=await crypto.subtle.digest("SHA-256",x),j=Array.from(new Uint8Array(b)).map(v=>v.toString(16).padStart(2,"0")).join("");i&&Kp("CUSTOM_USER_INFO",{userEmail:i,platform:"store",account:e}),t({functionKey:"readyEvents",data:{readyData:{user_id:j,email:i,first_name:c,last_name:l,phone:u||m,zip:f,street:p,street_number:h,city:_,gender:y,orderform_id:s==null?void 0:s.id}}})})()},[n,s.id]),null},Yi=g.createContext({amount:null,boxes:null,toExpire:null,loading:!0,logout:()=>null,getCurrentCredits:()=>({credits:0,cashback:0})}),Yp=({children:e,AUTH_TOKEN_COOKIE:t,accountName:n})=>{var f;const{shipping:s,cartStore:o}=be(),[a,i]=g.useState({amount:null,boxes:null,toExpire:null,loading:!0}),c=g.useCallback(async()=>{try{await fetch("/api/user",{priority:"low"}).then(p=>p.json()).then(p=>{const{userCredits:h,..._}=p,{wishlist:y,...x}=_;i({amount:h==null?void 0:h.amount,boxes:h==null?void 0:h.boxes,toExpire:h==null?void 0:h.toExpire,user:x,loading:!1,wishlist:(typeof y=="string"?y.split(","):y)??[]})})}catch(p){console.error("my credits request",p),i({...a,loading:!1})}},[i]),l=g.useCallback(()=>{As(t),c()},[c]),u=g.useCallback(()=>a.boxes?a.boxes.reduce((p,h)=>h.gift_card_box.refid==="C1643"?(p.cashback+=h.amount,p):(p.credits+=h.amount,p),{cashback:0,credits:0}):{cashback:0,credits:0},[a]),m=g.useCallback(async()=>{var p,h,_;if((p=a.user)!=null&&p.postalCode&&(o!=null&&o.id)&&!(o!=null&&o.loading)&&!((_=(h=o==null?void 0:o.shippingData)==null?void 0:h.address)!=null&&_.postalCode))try{await s(a.user.postalCode)}catch(y){console.error("Error auto-filling CEP:",y)}},[(f=a.user)==null?void 0:f.postalCode]);return g.useEffect(()=>{c()},[c]),g.useEffect(()=>{m()},[m]),r.jsxs(Yi.Provider,{value:g.useMemo(()=>({...a,getCurrentCredits:u,logout:l}),[a,u,l]),children:[r.jsx(Xp,{accountName:n}),e]})},Ut=()=>{const e=g.useContext(Yi);if(e===void 0)throw new Error("useContext(SessionContext) must be used within a SessionProvider");return e},Qi=({color:e,delay:t=3e3,sku:n,setStatus:s,setIsLoading:o,NEWSLETTER_CONFIGS:a,NOTIFY_INFO:i})=>{const c=g.useRef(null),[l,u]=g.useState(null),{sendDataLayerEvent:m}=ae(),{user:f}=Ut(),p=f!=null&&f.firstName?`${f==null?void 0:f.firstName} ${f==null?void 0:f.lastName}`:"";return r.jsx("div",{className:Ze["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:p,email:y,sku:n==null?void 0:n.skuID})}).then(b=>s(b.ok)).finally(()=>{o(!1),_.reset(),m({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 b;(b=document.body)==null||b.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0})),u(!0),s(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})]})})};Qi.displayName="Notify.Form";const Zi=({isLoading:e=!1})=>r.jsx("div",{className:Ze["notify--loading"],"data-loading":e,children:r.jsx(d.Spinner,{})});Zi.displayName="Notify.Loading";const ks={"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"},Ji=({children:e,...t})=>r.jsx("div",{...t,className:ks["product-variation-list--list"],children:e});Ji.displayName="ProductVariationList.List";const ec=({fill:e="#1352C7",src:t="",type:n="size",text:s,...o})=>{const{nextimage:a}=ue();return n==="size"?r.jsxs(d.ToggleSize.Wrapper,{...o,size:"large",variation:"ghost",children:[r.jsx(d.ToggleSize.DisabledAdornment,{title:"disabled-adornment-size"}),r.jsx(d.ToggleSize.Text,{children:s})]}):r.jsxs(d.ToggleStyle.Wrapper,{...o,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:s??"image",height:40,src:t,width:40})})]})};ec.displayName="ProductVariationList.Option";const tc=({children:e,...t})=>r.jsx("div",{className:ks["product-variation-list"],...t,children:e});tc.displayName="ProductVariationList.Root";const nc=({children:e,title:t,...n})=>r.jsxs("div",{...n,className:ks["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]});nc.displayName="ProductVariationList.Title";const et={List:Ji,Option:ec,Title:nc,Root:tc},Qp=(e,t)=>{if(!e||!t)return!1;const n=Object.keys(e);return n.length!==Object.keys(t).length?!1:n.every(s=>e[s]===t[s])},rc=({children:e,label:t="",skus:n,sku:s,setSku:o})=>r.jsxs(r.Fragment,{children:[r.jsx("div",{className:Ze["notify--selector--header"],children:e}),r.jsxs(et.Root,{className:Ze["notify--selector"],children:[r.jsx(et.Title,{title:t}),r.jsx(et.List,{children:Array.isArray(n)&&n.map((a,i)=>{const c=Qp(s,a);return r.jsx(et.Option,{active:c,onClick:()=>o(c?null:a),text:String(a.size),type:"size"},i)})})]})]});rc.displayName="Notify.Selector";const oo=({type:e,icon:t,title:n,subtitle:s})=>r.jsx("div",{className:Ze[`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:s})]})})}),sc=({status:e,ICONS:t,PRODUCT_CARD_TEXTS:n})=>r.jsxs("div",{className:Ze["notify--status"],"data-status":e,children:[r.jsx(oo,{...n.success,icon:t.check_circle,type:"success"}),r.jsx(oo,{...n.error,icon:t.alert_circle,type:"error"})]});sc.displayName="Notify.Status";const Ls=({color:e,open:t,setVisible:n,skus:s,sku:o,setSku:a,ICONS:i,NEWSLETTER_CONFIGS:c,NOTIFY_INFO:l,PRODUCT_CARD_TEXTS:u,Z_INDEX_WAR:m})=>{const[f,p]=g.useState(!1),[h,_]=g.useState(null),{isMobile:y}=re();return r.jsxs(d.Modal.Root,{isMobile:y??!1,isOpen:t,setIsOpen:n,variant:y?"sideBottom":"sideLeft",style:{zIndex:m.modal},className:Ze["modal-modifier"],children:[r.jsx(d.Modal.Header,{navigation:"top",className:Ze["notify--header-modifier"],children:r.jsx($i,{isMobile:y??!1,ICONS:i,NOTIFY_INFO:l})}),r.jsxs(d.Modal.Body,{className:Ze["notify--modal--body"],children:[r.jsxs("div",{className:Ze["notify--container"],children:[r.jsxs(rc,{label:l.selector_label,sku:o,skus:s,setSku:a,children:[r.jsx("p",{children:l.subtitle}),r.jsx("span",{children:l.description})]}),r.jsx(Qi,{delay:4e3,sku:o,setStatus:_,setIsLoading:p,color:e,NEWSLETTER_CONFIGS:c,NOTIFY_INFO:l}),r.jsx(Zi,{isLoading:f}),r.jsx("div",{className:Ze["notify--selector--header"],children:r.jsx("span",{children:l.legal})})]}),r.jsx(sc,{status:h,ICONS:i,PRODUCT_CARD_TEXTS:u})]})]})};Ls.displayName="Notify";const Bn=({skus:e,ICONS:t,NEWSLETTER_CONFIGS:n,NOTIFY_INFO:s,PRODUCT_CARD_TEXTS:o,Z_INDEX_WAR:a,...i})=>{const c=Fn(e??[]);return r.jsx(Ls,{skus:c,ICONS:t,NEWSLETTER_CONFIGS:n,NOTIFY_INFO:s,PRODUCT_CARD_TEXTS:o,Z_INDEX_WAR:a,...i})};Bn.displayName="PDC.Notification";const oc=g.createContext({}),ac=({banners:e,children:t})=>{const{searchParams:n,ITEMS_PER_PAGE:s,ICONS:o,NEWSLETTER_CONFIGS:a,NOTIFY_INFO:i,PRODUCT_CARD_TEXTS:c,Z_INDEX_WAR:l}=Me(),{router:u}=ue(),{sendDataLayerEvent:m}=ae(),{isMobile:f}=re(),{state:p}=Be(),{addPage:h,createPages:_,updateProducts:y,...x}=jp(),b=f?8:16,C=f?2:4,j=g.useRef(!1),v=g.useRef(p),[P,E]=g.useState(!1),[S,I]=g.useState(null),[T,A]=g.useState([]),k=g.useCallback(B=>{B&&"pagination"in B&&m({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:B.products}}})},[m]),O=g.useCallback(B=>{if(B.pagination.nextPage===!0){const Q=B.page+1,G=es(e,Q,C,s);h({...p,page:Q},G,k)}},[h,e,k,C,s,p]),Y=g.useCallback(B=>{B.loading===!1&&y({...p,page:B.page},k)},[k,y,p]),D=g.useCallback(B=>{const Q=new URLSearchParams(n);B.page!==Number(Q.get("page")??1)&&(Q.set("page",String(B.page)),u.replace(`?${Q.toString()}`,{scroll:!1}))},[u,n]),U=g.useCallback((B,Q)=>{const G=Q?Fn([Q]):null;A(B),I(G!=null&&G.length?G[0]:null),E(!0)},[]);return g.useEffect(()=>{const B=!j.current,Q=Li(v.current,p),G=es(e,p.page,C);B?_(p,G,k,s):Q&&(_(p,G,k,s),v.current=p),j.current=!0},[e,_,k,C,s,p]),r.jsxs(oc.Provider,{value:g.useMemo(()=>({...x,addPage:h,addNewPage:O,createPages:_,gap:b,columns:C,handleNotify:U,updatePage:Y,updateProducts:y,updateParamPage:D}),[h,O,_,U,b,C,x,Y,y,D]),children:[t,r.jsx(Bn,{open:P,sku:S,skus:T,setSku:I,setVisible:E,ICONS:o,NEWSLETTER_CONFIGS:a,NOTIFY_INFO:i,PRODUCT_CARD_TEXTS:c,Z_INDEX_WAR:l})]})},lt=()=>{const e=g.useContext(oc);if(e===void 0)throw new Error("PLPInfiniteScrollContext must be used within a ScrollInfiniteProvider");return e},ic=g.createContext({gridBanners:void 0,banners:[]}),Zp=({children:e,data:t,device:n,SectionZone:s,COMMON_PAGE_COLUMN_GAP_PDC:o})=>{const{isMobile:a}=re(),i=(t==null?void 0:t.sections.filter(f=>f.name!=="List Product Banners"))??[],c=i.slice(0,no),l=i.slice(no,i.length),u=t==null?void 0:t.sections.find(f=>f.name==="List Product Banners"),m=g.useMemo(()=>{var f,p;return((p=(f=u==null?void 0:u.data)==null?void 0:f.banners)==null?void 0:p.map(h=>({...h.banner,columns:h.bannerWidth,position_grid:h.bannerPosition})))??[]},[u]);return a&&n==="mobile"||!a&&n==="desktop"?r.jsxs(ic.Provider,{value:{gridBanners:u,banners:m},children:[r.jsx(s,{data:c??[]}),r.jsxs(d.Utils.Column,{gap:o,className:d.helpers.classNameConcat("utils-column-modifier"),children:[e,r.jsx(s,{data:l??[]})]})]}):r.jsx(r.Fragment,{})},Un=()=>{const e=g.useContext(ic);return e===void 0&&console.error("Needs PLPContentContext on parent component"),e},cc=g.createContext({}),lc=({children:e,filters:t,PLP_FILTERS:n,...s})=>{var a;const o=(a=t.facets)==null?void 0:a.filter(i=>n.find(c=>c.key===i.key));return r.jsx(cc.Provider,{value:g.useMemo(()=>({...s,filters:{...t,facets:o}}),[t,o,s]),children:e})},$t=()=>{const e=g.useContext(cc);if(e===void 0)throw new Error("useFilterContext must be used within a FilterProvider");return e},uc=g.createContext({product:void 0}),Jp=({children:e,data:t,productId:n,COMMON_PAGE_COLUMN_GAP:s,SectionZone:o})=>r.jsxs(uc.Provider,{value:{productId:n},children:[e,r.jsx(d.Utils.Column,{gap:s,className:d.helpers.classNameConcat("utils-column-modifier"),children:r.jsx(o,{data:(t==null?void 0:t.sections)??[]})})]}),dc=()=>{const e=g.useContext(uc);return e||console.error("use this hook only inside PDPContentProvider hierarchy"),e},ef=e=>e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/\s+/g,"-").toLowerCase().trim();function tf(e,t=1e3){let n=!1;return(...s)=>{n||(e(...s),n=!0,setTimeout(()=>{n=!1},t))}}function nf(e,t=1e3){let n;return(...s)=>{clearTimeout(n),n=setTimeout(()=>{e(...s)},t)}}const mc=(e,t)=>t.getTime()>e.getTime()?Math.abs(t.getTime()-e.getTime()):0,Vt=(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),rf=e=>{const t=vm.decodeJwt(e??"");return{email:t.sub,userId:t.userId}},sf=["name","email","phone","date","cpf","cep"],ao={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}$/},pc=({type:e,input:t,required:n=!1})=>{if(typeof t!="string"||!n&&t===""||!ao[e])return!0;const s=t.trim();return ao[e].test(s)},of=e=>{const t=/\/(\d+)-\d+-\d+\/(.+?)\./,n=typeof e=="string"?e.match(t):null;return n?n[2].replace(/-/g," "):lp},af=Object.freeze(Object.defineProperty({__proto__:null,FieldTypes:sf,debounce:nf,getAltTextFromUrl:of,getAuthenticatedUser:rf,getCookie:Hi,getDaysHoursMinutesSeconds:Vt,getMilliSeconds:mc,removeAccentsAndReplaceSpaces:ef,setCookie:As,throttle:tf,validateInput:pc},Symbol.toStringTag,{value:"Module"})),cf=({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}},lf=({formData:e,mountedFields:t,inputsStatus:n,hasTermsAndConditions:s,checkboxRef:o,setFormStatus:a})=>{let i=!1,c=!1;const l={...n};return s&&!o.current&&(a("unchecked"),i=!0),e.forEach((u,m)=>{var h;if(m==="terms-and-conditions")return;const f=(h=t[m])==null?void 0:h.required;if(f&&!u){l[m]="required",i=!0;return}pc({type:t[m].type,input:u,required:f})||(l[m]="error",c=!0),typeof u=="string"&&e.set(m,u.toString().trim())}),{hasEmptyFields:i,hasErrors:c,inputStatusToUpdate:l}},fc=g.createContext({}),hc=({children:e,masterDataEmailField:t,fields:n,variant:s,CONSTANTS:{MASTER_DATA_ENTITY:o,NEWSLETTER_CONFIGS:a}})=>{const{sendDataLayerEvent:i}=ae(),c=a.hasTermsAndConditions,{mountedFields:l,mountedInputsStatus:u}=g.useMemo(()=>cf({fields:n}),[n]),m=g.useRef(!1),[f,p]=g.useState("idle"),[h,_]=g.useState(u),y=async({searchFields:E,entity:S})=>{const I=await vt.post("/api/master-data/search",{body:{masterDataEntity:S,searchFields:E,headers:{"REST-Range":"resources=0-49"}}});return console.info(I),I.data},x=async({documentId:E,fieldsToBeUpdated:S,entity:I})=>(await vt.post("/api/master-data/update",{dataEntityName:I,documentId:E,fieldsToBeUpdated:S})).status,b=g.useCallback(async({payload:E,response:S},I,T)=>{var D;const{email:A,...k}=E,[O]=await y({searchFields:{[I]:A},entity:T??o.newsletter}),Y=Array.isArray(O)?(D=O[0])==null?void 0:D.id:void 0;return O&&await x({documentId:Y,fieldsToBeUpdated:k,entity:T??o.newsletter})!==204?{...S,status:"error"}:{...S,status:"success"}},[]),C=g.useCallback(async({formData:E},S,I)=>{const T={status:"idle",inputsStatus:{}},A={};E.forEach((k,O)=>{A[O]=k});try{const O=(await vt.post("/api/master-data",{body:{payload:A,masterDataEntity:S??o.newsletter}})).data;return(O==null?void 0:O.Message)==="duplicated entry"?b({payload:A,response:T},I,S):O!=null&&O.Id?{...T,status:"success"}:{...T,status:"error"}}catch(k){return console.error("error",k),{...T,status:"error"}}},[b]),j=g.useCallback(async(E,S,I)=>{E.preventDefault();const T=new FormData(E.target);if(T.append("acceptedTerms",m.current?"true":"false"),m.current){const k=new Kr.TZDate(new Date,"America/Sao_Paulo").toISOString();T.append("termsAcceptedAt",k)}S&&Object.keys(S).forEach(k=>{T.append(k,S[k])});const A=await C({formData:T},I??"",t);A&&(p(A==null?void 0:A.status),_(A.inputsStatus),A.status==="success"&&i({functionKey:"readyEvents",data:{event:"generate_lead"}}))},[t,C,p,_,i]),v=g.useCallback(E=>{const S=new FormData(E.currentTarget.parentElement),{hasEmptyFields:I,hasErrors:T,inputStatusToUpdate:A}=lf({formData:S,mountedFields:l,inputsStatus:h,hasTermsAndConditions:c,checkboxRef:m,setFormStatus:p});if(_(A),I||T){E.preventDefault();return}p("loading")},[l,h,c,m]),P=g.useCallback(()=>{p("idle"),_(u)},[u]);return r.jsx(fc.Provider,{value:g.useMemo(()=>({formStatus:f,handleSubmit:j,setFormStatus:p,inputsStatus:h,setInputsStatus:_,hasTermsAndConditions:c,handleClickToSubmit:v,checkboxRef:m,masterDataEmailField:t,fields:n,variant:s,resetNewsletter:P}),[f,j,p,h,_,v,c,m,t,n,s,P]),children:e})},Os=()=>{const e=g.useContext(fc);if(e===void 0)throw new Error("useNewsletterContext must be used within a NewsletterProvider");return e},_c=g.createContext({}),gc=({children:e,data:t})=>{const[n,s]=g.useState(),[o,a]=g.useState(),i=g.useCallback(u=>{const m=t.filter(f=>f.cidade===u);s(m)},[t]),c=g.useCallback(u=>{a(u)},[]),l=g.useCallback(()=>{a("")},[]);return r.jsx(_c.Provider,{value:g.useMemo(()=>({clearSelectedStore:l,data:t,handleSelectCity:i,handleSelectStore:c,selectedCity:n,selectedStore:o}),[l,t,i,c,n,o]),children:e})},$n=()=>{const e=g.useContext(_c);if(e===void 0)throw new Error("useLPStoreContext must be used within a LPStoreProvider");return e},yc={contexts:{addToCart:{hook:It,provider:Si},cart:{hook:be,provider:op},cms:{FlagsAndTags:{context:hs,hook:_t,provider:bm}},newsletter:{hook:Os,provider:hc},events:{hook:ae,provider:wm},global:{hook:re,provider:Vm,mediator:ei},header:{hook:Pe,provider:np},menuMobile:{hook:Es,provider:ji},next:{hook:ue,provider:Wm},pdp:{provider:jm},PDPContent:{provider:Jp,hook:dc},plp:{provider:yp,hook:Rs},plpFilter:{hook:$t,provider:lc},PLPContent:{provider:Zp,hook:Un},plpInfinite:{provider:ac,hook:lt},pdpdata:{provider:Rm},searchFacets:{hook:Ti,provider:Ri},searchProducts:{hook:rn,provider:ws},searchRoot:{hook:Ns,provider:Ps},searchSearch:{hook:Be,provider:Is},session:{hook:Ut,provider:Yp},ui:{hook:Jt,provider:Ja},lpStore:{hook:$n,provider:gc}},hooks:{useBackPDC:ja,useClipboard:Tm,useDisableZoom:Aa,useLocalStorage:km,useOnScreen:_s,useSentinel:Dn,useTouchZoomPan:ka},stores:{cart:Hm,header:Km,pdp:ep,wishlist:tp}},uf={cart:Bm,events:Im,plp:vp,product:H.productHelpers,utils:af},Ds={helpers:uf},qe={"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"},xc=({brand:e,className:t,name:n,...s})=>r.jsxs("div",{...s,className:d.helpers.classNameConcat(qe["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})})})]});xc.displayName="AddToCart.Card.Name";const vc=({className:e,listPrice:t,price:n,quantity:s,productId:o,...a})=>{const i=H.formatPriceToCurrency(n/100),c=H.formatPriceToCurrency(t/100);return r.jsx("div",{...a,className:d.helpers.classNameConcat(qe["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")})})})})};vc.displayName="AddToCart.Card.PriceQuantity";const df="_skeleton_12b79_1",mf={skeleton:df},bc=({style:e})=>r.jsx("div",{style:e,className:mf.skeleton}),pf="_image_1y08u_1",ff={image:pf},hf=({alt:e,className:t,objectFit:n,...s})=>{const{nextimage:o}=ue();return r.jsx(o,{quality:90,...s,alt:e??"",className:d.helpers.classNameConcat(ff.image,t),"data-object-fit":n??"cover"})},_f=({videoRef:e,...t})=>r.jsx("video",{...t,ref:e,children:r.jsx("track",{kind:"captions"})}),we={Image:hf,Video:_f},jc=({className:e,productGroupID:t,size:n,texture:s,...o})=>{const{CONSTANTS:{TEXTURE_IMAGE:a,TOGGLE_STYLE_MODIFIER:i}}=It(),[c,l]=g.useState(s??"");return g.useEffect(()=>{c||fetch("/api/catalog/product/info",{method:"POST",priority:"low",body:JSON.stringify({ids:[t]})}).then(u=>u.json()).then(u=>{const m=u.data[0].items[0];if(m){const f=m.images.find(p=>a.includes(p.imageLabel));f!=null&&f.imageUrl?l(f.imageUrl):l(m.images[0].imageUrl)}}).catch(u=>{console.error(u)})},[c,t]),r.jsxs("div",{...o,className:d.helpers.classNameConcat(qe["add-to-cart--card--style-size"],e),children:[r.jsx(d.ToggleStyle.Wrapper,{size:"x-small",style:i,children:r.jsx(d.ToggleStyle.Texture,{children:c?r.jsx(we.Image,{alt:"",src:c??"",width:164,height:164,style:i}):r.jsx(bc,{})})}),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})]})]})};jc.displayName="AddToCart.Card.StyleSize";const{helpers:gf}=Ds,Cc=({className:e,item:t,texture:n,...s})=>{const{itemOffered:{name:o,brand:a,skuName:i,isVariationOf:{productGroupID:c}},quantity:l,price:u,sellingPrice:m}=t,{CONSTANTS:{NAME_SPLIT_SYMBOL:f}}=It(),{size:p}=gf.product.getColorAndSizeFromSkuName(i??o,f);return r.jsxs("div",{...s,className:d.helpers.classNameConcat(qe["add-to-cart--card--content"],e),children:[r.jsx(xc,{brand:a.name,name:o}),r.jsx(vc,{price:u,listPrice:m,quantity:l,productId:t.id}),r.jsx(jc,{size:p,texture:n,productGroupID:c})]})};Cc.displayName="AddToCart.Card.Content";const Sc=({image:e,thumbnail:t=!1})=>r.jsx(we.Image,{alt:e.alternateName??"image","data-thumbnail":t,height:t?152:120,src:e.url,width:t?152:94});Sc.displayName="AddToCart.Card";const Ec=({className:e,item:t,texture:n,thumbnail:s,...o})=>{const{itemOffered:{image:[a]}}=t,i=H.updatedResizedImg(a.url,{width:200,height:300});return r.jsxs("div",{...o,className:d.helpers.classNameConcat(qe["add-to-cart--card"],e),children:[r.jsx(Sc,{image:{alternateName:a.alternateName||"Produto",url:i||""},thumbnail:s}),!s&&r.jsx(Cc,{item:t,texture:n})]})};Ec.displayName="AddToCart.Card";const Pc=({className:e,children:t,title:n,...s})=>r.jsxs("div",{...s,className:d.helpers.classNameConcat(qe["add-to-cart--content"],e),children:[r.jsx("div",{className:qe["add-to-cart--content--title"],children:n&&r.jsx("h2",{children:n})}),t,r.jsx(bt.Footer,{})]});Pc.displayName="AddToCart.Layout.Content";const Nc=({className:e,...t})=>{var h,_;const{isMobile:n,handleClose:s,CONSTANTS:{ADD_TO_CART:o}}=It(),{cartStore:{totalizers:a},setIsOpen:i}=be(),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"),f=(l-Math.abs(c??0)+((u==null?void 0:u.value)??0))/100,p=H.formatPriceToCurrency(f??0);return r.jsxs("div",{...t,className:d.helpers.classNameConcat(qe["add-to-cart--footer"],e),children:[r.jsxs("div",{className:qe["add-to-cart--footer--total"],children:[r.jsx("span",{children:"Subtotal:"}),r.jsx("span",{children:p})]}),r.jsx(d.Button,{size:"medium",variant:"primary","data-close":!0,onClick:()=>i(!0),children:o.footer.bag}),n?r.jsx(d.Button,{"data-close":!0,size:"medium",variant:"tertiary",children:o.footer.keep_buying}):r.jsx(d.Button,{onClick:()=>s(),size:"medium",variant:"tertiary",children:o.footer.keep_buying})]})};Nc.displayName="AddToCart.Layout.Footer";const Ic=({children:e,className:t,thumbnail:n=!1,...s})=>{const{cartStore:{options:o}}=be(),{recentlyAddedProducts:a}=Jt(),i=a.length>3?4:a.length;return r.jsxs("div",{...s,className:qe["add-to-cart--items"],"data-thumbnail":n,children:[Array.isArray(a)&&a.filter((c,l)=>l<i).map(c=>{var u;const l=(u=o==null?void 0:o.find(m=>m.id===c.itemOffered.isVariationOf.productGroupID))==null?void 0:u.texture;return r.jsx(bt.Card,{item:c,thumbnail:n,texture:l},c.itemOffered.sku)}),e]})};Ic.displayName="AddToCart.Layout.Items";const wc=({children:e,Z_INDEX_WAR:t})=>{const{isOpen:n,setIsOpen:s}=It(),{isMobile:o}=re();return r.jsxs(d.Modal.Root,{"data-modal":"add-to-cart--modal",className:qe["add-to-cart__modal"],isMobile:o??!1,isOpen:n,setIsOpen:s,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})]})};wc.displayName="AddToCart.Modal";const yf=({children:e})=>{const{count:t,handleClose:n,setIsOpen:s}=It(),o=g.useRef(t);return g.useEffect(()=>{t>o.current&&s(!0),t<o.current&&o.current>=1&&n(),o.current=t},[t,n,s]),r.jsx(r.Fragment,{children:e})},Rc=({children:e,component:t,CONSTANTS:n,...s})=>{const{recentlyAddedProducts:o}=Jt(),{isMobile:a}=re(),i=o.length>3?4:o.length;return r.jsx(Si,{...s,count:i,isMobile:a,CONSTANTS:n,children:r.jsx(yf,{children:a?r.jsxs(r.Fragment,{children:[r.jsx(bt.Modal,{Z_INDEX_WAR:n.Z_INDEX_WAR,children:t}),e]}):r.jsx(bt.Tooltip,{component:t,style:{width:350},Z_INDEX_WAR:n.Z_INDEX_WAR,children:e})})})};Rc.displayName="AddToCart.Root";const Tc=({children:e,component:t,Z_INDEX_WAR:n,...s})=>{const{contentRef:o,left:a,isLeaving:i,target:c,isOpen:l,top:u}=It();return r.jsx(d.Tooltip.Root,{arrow:"top-right",component:r.jsx("div",{...s,ref:o,children:t}),id:"add-to-cart--tooltip",className:qe["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:qe["add-to-cart--tooltip"],ref:c,children:e})})};Tc.displayName="AddToCart.Tooltip";const bt={Card:Ec,Content:Pc,Footer:Nc,Items:Ic,Modal:wc,Root:Rc,Tooltip:Tc},Ms=({title:e,...t})=>{const{recentlyAddedProducts:n}=Jt(),{isMobile:s}=re(),o=n.length>3?4:n.length,a=n.length>(o??1),i=n.length>1;return r.jsx(bt.Root,{isMobile:s,count:n.length,component:r.jsx(bt.Content,{title:e,children:r.jsx(bt.Items,{thumbnail:i,children:a&&r.jsx(d.Badge.Count,{count:n.length-o,size:"medium",variant:"secondary"})})}),...t})};Ms.displayName="AddToCart";const io={"backtotop-btn":"_backtotop-btn_vcjsm_1","card-modifier":"_card-modifier_vcjsm_29"},xf=({children:e,className:t,classNameButton:n,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"},m=o&&s?{flexDirection:{top:"column",bottom:"column-reverse",left:"row",right:"row-reverse"}[o]}:{},f=()=>{window&&window.document.body.scrollTo({...l})};return r.jsx(d.Card,{...c,shadow:!0,padding:"small",className:d.helpers.classNameConcat(io["card-modifier"],t),style:{...i,padding:0},children:r.jsxs("button",{className:d.helpers.classNameConcat(io["backtotop-btn"],n),onClick:f,style:{...m},"data-orientation":o,children:[s,e]})})},vf="_container_1sy8s_16",pt={"carousel-container":"_carousel-container_1sy8s_1","add-cart-container":"_add-cart-container_1sy8s_8",container:vf,"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"},bf=({selectedProducts:e,handleAddAllToCart:t,CONSTANTS:n})=>{const s=Object.values(e.products).length;return r.jsxs("div",{className:pt["add-itens-to-cart-container"],children:[r.jsxs("div",{className:pt["add-itens-to-cart-container-values"],children:[r.jsx("div",{className:pt["add-itens-to-cart-qty-products"],children:r.jsx("span",{children:s===0?n.BUY_PACKAGE.group_cart.select_all_product:`${s} ${s===1?n.BUY_PACKAGE.group_cart.select_product:n.BUY_PACKAGE.group_cart.select_product+"s"}`})}),r.jsx("div",{className:pt["add-itens-to-cart-total"],children:r.jsx("span",{children:H.freightParsePrice({valueInCents:e.totalPrice*100,hasFree:!1,freeTaxMessage:n.FREIGHT_CALCULATION.messages.free_tax})})})]}),r.jsx(d.Button,{onClick:t,className:pt["add-button"],size:"large",disabled:s===0,variant:"primary",children:n.BUY_BUTTON_LABELS.add_to_cart})]})},jf=e=>e.reduce((t,n)=>{var o;const s=t.find(a=>a.node.id===n.node.id);if(!s)return[...t,n];if((o=s==null?void 0:s.node.isVariantOf)!=null&&o.hasVariant){const a=s.node.isVariantOf.hasVariant,i=n.node.isVariantOf.hasVariant;a&&i&&(s.node.isVariantOf.hasVariant=[...a,...i])}return t},[]),Cf=({selectedProduct:e,productId:t,prevState:n,mainSellerId:s})=>{const{products:o,totalPrice:a}=n;try{if(!e){const{[t]:u,...m}=o;return{...n,totalPrice:a-u.price,products:m}}const i=H.getValidOffer(e.offers.offers,s);if(!i)return n;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),n}},Ac=g.createContext({}),Sf=({children:e,item:t,index:n,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:m}=ae(),f=y=>{u({functionKey:"productEvents",data:{commonData:{...t,availableSizes:l.current.availableSkus,...l.current.priceInfo},customData:{index:n+1},event:y}})},p=()=>{f("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}}})},_=()=>{s&&(m.current={item_list_name:s}),f("select_item")};return r.jsx(Ac.Provider,{value:g.useMemo(()=>({...o,index:n,item:t,element:c,selectedSku:a,setSelectedSku:i,eventDataRef:l,sendAddToWishlistEvent:p,sendSelectItemEvent:_,sendAddToCartEvent:h}),[o,t,c,a]),children:e})},Ye=()=>{const e=g.useContext(Ac);if(e===void 0)throw new Error("useProductCardContext must be used within a ProductCardProvider");return e},Te={"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"},kc=({callback:e,children:t,className:n,data:s,isKit:o,...a})=>{const{item:{availability:{status:i},image:c}}=Ye();return i?r.jsxs("div",{...a,className:d.helpers.classNameConcat(Te["product-card--actions"],n),children:[r.jsxs(fe.Wrapper,{type:"actions--group",children:[r.jsx(fe.Price,{}),r.jsx("div",{className:Te["product-card--actions--selectors"],children:!o&&r.jsx(fe.StyleSelector,{data:s,images:c,callback:e})})]}),t]}):null};kc.displayName="ProductCard.Actions";const Lc=({className:e,isKit:t,...n})=>{const{addToCart:s}=be(),{isMobile:o=!1,selectedSku:a,outStock:i,item:c,sendAddToCartEvent:l,CONSTANTS:u}=Ye(),m=()=>{var h;if(!a)return;const p=H.getValidOffer(a.offers.offers,u.StoreConfig_MainSellerId);p&&s({id:a==null?void 0:a.sku,quantity:1,seller:p.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()},f=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:o?"medium":"large",variant:i?"secondary":"primary",onClick:i?n.onClick:m,children:i?"Avise-me quando chegar":f})};Lc.displayName="ProductCard.Actions.BuyButton";const Ef={"snackbar-modifier":"_snackbar-modifier_1va2l_1"},Ot=({size:e,adornment:t,title:n,subtitle:s,supportChildren:o,className:a,Z_INDEX_WAR:i,...c})=>r.jsxs(d.SnackBar.Structure,{...c,size:e,className:d.helpers.classNameConcat(Ef["snackbar-modifier"],a),width:360,style:{zIndex:i.snackbar},children:[r.jsx(d.SnackBar.Content,{adornment:t,title:n,subtitle:s}),o&&r.jsx(d.SnackBar.Support,{children:o})]});Ot.displayName="SnackBar";const Kt={"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 ts={exports:{}},Le={};Le._=Le._interop_require_default=Pf;function Pf(e){return e&&e.__esModule?e:{default:e}}var dn={exports:{}},nr={},co;function Oc(){return co||(co=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 o}});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 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,m]=l;Array.isArray(m)?m.forEach(f=>c.append(u,s(f))):c.set(u,s(m))}),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(m=>{Array.from(m.keys()).forEach(f=>i.delete(f)),m.forEach((f,p)=>i.append(p,f))}),i}}(nr)),nr}var rr={},Ft={};function Dc(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(Dc=function(s){return s?n:t})(e)}Ft._=Ft._interop_require_wildcard=Nf;function Nf(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var n=Dc(t);if(n&&n.has(e))return n.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,n&&n.set(e,s),s}var lo;function Mc(){return lo||(lo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(l,u){for(var m in u)Object.defineProperty(l,m,{enumerable:!0,get:u[m]})}t(e,{formatUrl:function(){return a},formatWithValidation:function(){return c},urlObjectKeys:function(){return i}});const s=Ft._(Oc()),o=/https?|ftp|gopher|file/;function a(l){let{auth:u,hostname:m}=l,f=l.protocol||"",p=l.pathname||"",h=l.hash||"",_=l.query||"",y=!1;u=u?encodeURIComponent(u).replace(/%3A/i,":")+"@":"",l.host?y=u+l.host:m&&(y=u+(~m.indexOf(":")?"["+m+"]":m),l.port&&(y+=":"+l.port)),_&&typeof _=="object"&&(_=String(s.urlQueryToSearchParams(_)));let x=l.search||_&&"?"+_||"";return f&&!f.endsWith(":")&&(f+=":"),l.slashes||(!f||o.test(f))&&y!==!1?(y="//"+(y||""),p&&p[0]!=="/"&&(p="/"+p)):y||(y=""),h&&h[0]!=="#"&&(h="#"+h),x&&x[0]!=="?"&&(x="?"+x),p=p.replace(/[?#]/g,encodeURIComponent),x=x.replace("#","%23"),""+f+y+p+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)}}(rr)),rr}var sr={},uo;function If(){return uo||(uo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"omit",{enumerable:!0,get:function(){return t}});function t(n,s){const o={};return Object.keys(n).forEach(a=>{s.includes(a)||(o[a]=n[a])}),o}}(sr)),sr}var or={},mo;function Hn(){return mo||(mo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(v,P){for(var E in P)Object.defineProperty(v,E,{enumerable:!0,get:P[E]})}t(e,{DecodeError:function(){return _},MiddlewareNotFoundError:function(){return C},MissingStaticPage:function(){return b},NormalizeError:function(){return y},PageNotFoundError:function(){return x},SP:function(){return p},ST:function(){return h},WEB_VITALS:function(){return n},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 f},normalizeRepeatedSlashes:function(){return m},stringifyError:function(){return j}});const n=["CLS","FCP","FID","INP","LCP","TTFB"];function s(v){let P=!1,E;return function(){for(var S=arguments.length,I=new Array(S),T=0;T<S;T++)I[T]=arguments[T];return P||(P=!0,E=v(...I)),E}}const o=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,a=v=>o.test(v);function i(){const{protocol:v,hostname:P,port:E}=window.location;return v+"//"+P+(E?":"+E:"")}function c(){const{href:v}=window.location,P=i();return v.substring(P.length)}function l(v){return typeof v=="string"?v:v.displayName||v.name||"Unknown"}function u(v){return v.finished||v.headersSent}function m(v){const P=v.split("?");return P[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(P[1]?"?"+P.slice(1).join("?"):"")}async function f(v,P){if(process.env.NODE_ENV!=="production"){var E;if((E=v.prototype)!=null&&E.getInitialProps){const T='"'+l(v)+'.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(T)}}const S=P.res||P.ctx&&P.ctx.res;if(!v.getInitialProps)return P.ctx&&P.Component?{pageProps:await f(P.Component,P.ctx)}:{};const I=await v.getInitialProps(P);if(S&&u(S))return I;if(!I){const T='"'+l(v)+'.getInitialProps()" should resolve to an object. But found "'+I+'" instead.';throw new Error(T)}return process.env.NODE_ENV!=="production"&&Object.keys(I).length===0&&!P.ctx&&console.warn(""+l(v)+" returned an empty object from `getInitialProps`. This de-optimizes and prevents automatic static optimization. https://nextjs.org/docs/messages/empty-object-getInitialProps"),I}const p=typeof performance<"u",h=p&&["mark","measure","getEntriesByName"].every(v=>typeof performance[v]=="function");class _ extends Error{}class y extends Error{}class x extends Error{constructor(P){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message="Cannot find module for page: "+P}}class b extends Error{constructor(P,E){super(),this.message="Failed to load static file for page: "+P+" "+E}}class C extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function j(v){return JSON.stringify({message:v.message,stack:v.stack})}}(or)),or}var mn={exports:{}},ar={},po;function Fc(){return po||(po=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"removeTrailingSlash",{enumerable:!0,get:function(){return t}});function t(n){return n.replace(/\/$/,"")||"/"}}(ar)),ar}var ir={},fo;function Fs(){return fo||(fo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"parsePath",{enumerable:!0,get:function(){return t}});function t(n){const s=n.indexOf("#"),o=n.indexOf("?"),a=o>-1&&(s<0||o<s);return a||s>-1?{pathname:n.substring(0,a?o:s),query:a?n.substring(o,s>-1?s:void 0):"",hash:s>-1?n.slice(s):""}:{pathname:n,query:"",hash:""}}}(ir)),ir}var ho;function qn(){return ho||(ho=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizePathTrailingSlash",{enumerable:!0,get:function(){return o}});const n=Fc(),s=Fs(),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,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)}(mn,mn.exports)),mn.exports}var cr={},pn={exports:{}},lr={},_o;function zc(){return _o||(_o=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"pathHasPrefix",{enumerable:!0,get:function(){return n}});const t=Fs();function n(s,o){if(typeof s!="string")return!1;const{pathname:a}=(0,t.parsePath)(s);return a===o||a.startsWith(o+"/")}}(lr)),lr}var go;function wf(){return go||(go=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"hasBasePath",{enumerable:!0,get:function(){return o}});const n=zc(),s=process.env.__NEXT_ROUTER_BASEPATH||"";function o(a){return(0,n.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)}(pn,pn.exports)),pn.exports}var yo;function Bc(){return yo||(yo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"isLocalURL",{enumerable:!0,get:function(){return s}});const t=Hn(),n=wf();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,n.hasBasePath)(i.pathname)}catch{return!1}}}(cr)),cr}var ur={},dr={},xo;function Rf(){return xo||(xo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getSortedRoutes",{enumerable:!0,get:function(){return n}});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 m=function(f,p){if(f!==null&&f!==p)throw new Error("You cannot use different slug names for the same dynamic path ('"+f+"' !== '"+p+"').");a.forEach(h=>{if(h===p)throw new Error('You cannot have the same slug name "'+p+'" 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 "'+p+'" differ only by non-word symbols within a single dynamic path')}),a.push(p)},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]+'" ).');m(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]+'").');m(this.restSlugName,l),this.restSlugName=l,c="[...]"}else{if(u)throw new Error('Optional route parameters are not yet supported ("'+o[0]+'").');m(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 n(s){const o=new t;return s.forEach(a=>o.insert(a)),o.smoosh()}}(dr)),dr}var mr={},pr={},fr={},hr={},vo;function Tf(){return vo||(vo=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}}(hr)),hr}var _r={},bo;function Af(){return bo||(bo=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,{DEFAULT_SEGMENT_KEY:function(){return o},PAGE_SEGMENT_KEY:function(){return s},isGroupSegment:function(){return n}});function n(a){return a[0]==="("&&a.endsWith(")")}const s="__PAGE__",o="__DEFAULT__"}(_r)),_r}var jo;function kf(){return jo||(jo=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 n=Tf(),s=Af();function o(i){return(0,n.ensureLeadingSlash)(i.split("/").reduce((c,l,u,m)=>!l||(0,s.isGroupSegment)(l)||l[0]==="@"||(l==="page"||l==="route")&&u===m.length-1?c:c+"/"+l,""))}function a(i){return i.replace(/\.rsc($|\?)/,"$1")}}(fr)),fr}var Co;function Uc(){return Co||(Co=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 n=kf(),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 m of i.split("/"))if(l=s.find(f=>m.startsWith(f)),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 m=c.split("/");if(m.length<=2)throw new Error(`Invalid interception route: ${i}. Cannot use (..)(..) marker at the root level or one level up.`);u=m.slice(0,-2).concat(u).join("/");break;default:throw new Error("Invariant: unexpected marker")}return{interceptingRoute:c,interceptedRoute:u}}}(pr)),pr}var So;function Lf(){return So||(So=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"isDynamicRoute",{enumerable:!0,get:function(){return s}});const t=Uc(),n=/\/\[[^/]+?\](?=\/|$)/;function s(o){return(0,t.isInterceptionRouteAppPath)(o)&&(o=(0,t.extractInterceptionRouteInformation)(o).interceptedRoute),n.test(o)}}(mr)),mr}var Eo;function Of(){return Eo||(Eo=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 n.getSortedRoutes},isDynamicRoute:function(){return s.isDynamicRoute}});const n=Rf(),s=Lf()}(ur)),ur}var gr={},yr={},Po;function Df(){return Po||(Po=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getRouteMatcher",{enumerable:!0,get:function(){return n}});const t=Hn();function n(s){let{re:o,groups:a}=s;return i=>{const c=o.exec(i);if(!c)return!1;const l=m=>{try{return decodeURIComponent(m)}catch{throw new t.DecodeError("failed to decode param")}},u={};return Object.keys(a).forEach(m=>{const f=a[m],p=c[f.pos];p!==void 0&&(u[m]=~p.indexOf("/")?p.split("/").map(h=>l(h)):f.repeat?[l(p)]:l(p))}),u}}}(yr)),yr}var xr={},vr={},No;function Mf(){return No||(No=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(q,K){for(var ge in K)Object.defineProperty(q,ge,{enumerable:!0,get:K[ge]})}t(e,{ACTION_SUFFIX:function(){return l},APP_DIR_ALIAS:function(){return k},CACHE_ONE_YEAR:function(){return v},DOT_NEXT_ALIAS:function(){return T},ESLINT_DEFAULT_DIRS:function(){return ie},GSP_NO_RETURNED_VALUE:function(){return oe},GSSP_COMPONENT_MEMBER_ERROR:function(){return ee},GSSP_NO_RETURNED_VALUE:function(){return le},INSTRUMENTATION_HOOK_FILENAME:function(){return S},MIDDLEWARE_FILENAME:function(){return P},MIDDLEWARE_LOCATION_REGEXP:function(){return E},NEXT_BODY_SUFFIX:function(){return f},NEXT_CACHE_IMPLICIT_TAG_ID:function(){return j},NEXT_CACHE_REVALIDATED_TAGS_HEADER:function(){return _},NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER:function(){return y},NEXT_CACHE_SOFT_TAGS_HEADER:function(){return h},NEXT_CACHE_SOFT_TAG_MAX_LENGTH:function(){return C},NEXT_CACHE_TAGS_HEADER:function(){return p},NEXT_CACHE_TAG_MAX_ITEMS:function(){return x},NEXT_CACHE_TAG_MAX_LENGTH:function(){return b},NEXT_DATA_SUFFIX:function(){return u},NEXT_INTERCEPTION_MARKER_PREFIX:function(){return s},NEXT_META_SUFFIX:function(){return m},NEXT_QUERY_PARAM_PREFIX:function(){return n},NON_STANDARD_NODE_ENV:function(){return w},PAGES_DIR_ALIAS:function(){return I},PRERENDER_REVALIDATE_HEADER:function(){return o},PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER:function(){return a},PUBLIC_DIR_MIDDLEWARE_CONFLICT:function(){return Q},ROOT_DIR_ALIAS:function(){return A},RSC_ACTION_CLIENT_WRAPPER_ALIAS:function(){return B},RSC_ACTION_ENCRYPTION_ALIAS:function(){return U},RSC_ACTION_PROXY_ALIAS:function(){return D},RSC_ACTION_VALIDATE_ALIAS:function(){return Y},RSC_MOD_REF_PROXY_ALIAS:function(){return O},RSC_PREFETCH_SUFFIX:function(){return i},RSC_SUFFIX:function(){return c},SERVER_PROPS_EXPORT_ERROR:function(){return ce},SERVER_PROPS_GET_INIT_PROPS_CONFLICT:function(){return $},SERVER_PROPS_SSG_CONFLICT:function(){return J},SERVER_RUNTIME:function(){return _e},SSG_FALLBACK_EXPORT_ERROR:function(){return W},SSG_GET_INITIAL_PROPS_CONFLICT:function(){return G},STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR:function(){return se},UNSTABLE_REVALIDATE_RENAME_ERROR:function(){return M},WEBPACK_LAYERS:function(){return R},WEBPACK_RESOURCE_QUERIES:function(){return Ie}});const n="nxtP",s="nxtI",o="x-prerender-revalidate",a="x-prerender-revalidate-if-generated",i=".prefetch.rsc",c=".rsc",l=".action",u=".json",m=".meta",f=".body",p="x-next-cache-tags",h="x-next-cache-soft-tags",_="x-next-revalidated-tags",y="x-next-revalidate-tag-token",x=128,b=256,C=1024,j="_N_T_",v=31536e3,P="middleware",E=`(?:src/)?${P}`,S="instrumentation",I="private-next-pages",T="private-dot-next",A="private-next-root-dir",k="private-next-app-dir",O="private-next-rsc-mod-ref-proxy",Y="private-next-rsc-action-validate",D="private-next-rsc-server-reference",U="private-next-rsc-action-encryption",B="private-next-rsc-action-client-wrapper",Q="You can not have a '_next' folder inside of your public folder. This conflicts with the internal '/_next' route. https://nextjs.org/docs/messages/public-next-folder-conflict",G="You can not use getInitialProps with getStaticProps. To use SSG, please remove your getInitialProps",$="You can not use getInitialProps with getServerSideProps. Please remove getInitialProps.",J="You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps",se="can not have getInitialProps/getServerSideProps, https://nextjs.org/docs/messages/404-get-initial-props",ce="pages with `getServerSideProps` can not be exported. See more info here: https://nextjs.org/docs/messages/gssp-export",oe="Your `getStaticProps` function did not return an object. Did you forget to add a `return`?",le="Your `getServerSideProps` function did not return an object. Did you forget to add a `return`?",M="The `unstable_revalidate` property is available for general use.\nPlease use `revalidate` instead.",ee="can not be attached to a page's component and must be exported from the page. See more info here: https://nextjs.org/docs/messages/gssp-component-member",w='You are using a non-standard "NODE_ENV" value in your environment. This creates inconsistencies in the project and is strongly advised against. Read more: https://nextjs.org/docs/messages/non-standard-node-env',W="Pages with `fallback` enabled in `getStaticPaths` can not be exported. See more info here: https://nextjs.org/docs/messages/ssg-fallback-true-export",ie=["app","pages","components","lib","src"],_e={edge:"edge",experimentalEdge:"experimental-edge",nodejs:"nodejs"},N={shared:"shared",reactServerComponents:"rsc",serverSideRendering:"ssr",actionBrowser:"action-browser",api:"api",middleware:"middleware",instrument:"instrument",edgeAsset:"edge-asset",appPagesBrowser:"app-pages-browser",appMetadataRoute:"app-metadata-route",appRouteHandler:"app-route-handler"},R={...N,GROUP:{serverOnly:[N.reactServerComponents,N.actionBrowser,N.appMetadataRoute,N.appRouteHandler,N.instrument],clientOnly:[N.serverSideRendering,N.appPagesBrowser],nonClientServerTarget:[N.middleware,N.api],app:[N.reactServerComponents,N.actionBrowser,N.appMetadataRoute,N.appRouteHandler,N.serverSideRendering,N.appPagesBrowser,N.shared,N.instrument]}},Ie={edgeSSREntry:"__next_edge_ssr_entry__",metadata:"__next_metadata__",metadataRoute:"__next_metadata_route__",metadataImageMeta:"__next_metadata_image_meta__"}}(vr)),vr}var br={},Io;function Ff(){return Io||(Io=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"escapeStringRegexp",{enumerable:!0,get:function(){return s}});const t=/[|\\{}()[\]^$+*?.-]/,n=/[|\\{}()[\]^$+*?.-]/g;function s(o){return t.test(o)?o.replace(n,"\\$&"):o}}(br)),br}var wo;function zf(){return wo||(wo=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 p},getRouteRegex:function(){return l},parseParameter:function(){return i}});const n=Mf(),s=Uc(),o=Ff(),a=Fc();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 b=1;return{parameterizedRoute:y.map(C=>{const j=s.INTERCEPTION_ROUTE_MARKERS.find(P=>C.startsWith(P)),v=C.match(/\[((?:\[.*\])|.+)\]/);if(j&&v){const{key:P,optional:E,repeat:S}=i(v[1]);return x[P]={pos:b++,repeat:S,optional:E},"/"+(0,o.escapeStringRegexp)(j)+"([^/]+?)"}else if(v){const{key:P,repeat:E,optional:S}=i(v[1]);return x[P]={pos:b++,repeat:E,optional:S},E?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 m(_){let{interceptionMarker:y,getSafeRouteKey:x,segment:b,routeKeys:C,keyPrefix:j}=_;const{key:v,optional:P,repeat:E}=i(b);let S=v.replace(/\W/g,"");j&&(S=""+j+S);let I=!1;(S.length===0||S.length>30)&&(I=!0),isNaN(parseInt(S.slice(0,1)))||(I=!0),I&&(S=x()),j?C[S]=""+j+v:C[S]=v;const T=y?(0,o.escapeStringRegexp)(y):"";return E?P?"(?:/"+T+"(?<"+S+">.+?))?":"/"+T+"(?<"+S+">.+?)":"/"+T+"(?<"+S+">[^/]+?)"}function f(_,y){const x=(0,a.removeTrailingSlash)(_).slice(1).split("/"),b=u(),C={};return{namedParameterizedRoute:x.map(j=>{const v=s.INTERCEPTION_ROUTE_MARKERS.some(E=>j.startsWith(E)),P=j.match(/\[((?:\[.*\])|.+)\]/);if(v&&P){const[E]=j.split(P[0]);return m({getSafeRouteKey:b,interceptionMarker:E,segment:P[1],routeKeys:C,keyPrefix:y?n.NEXT_INTERCEPTION_MARKER_PREFIX:void 0})}else return P?m({getSafeRouteKey:b,segment:P[1],routeKeys:C,keyPrefix:y?n.NEXT_QUERY_PARAM_PREFIX:void 0}):"/"+(0,o.escapeStringRegexp)(j)}).join(""),routeKeys:C}}function p(_,y){const x=f(_,y);return{...l(_),namedRegex:"^"+x.namedParameterizedRoute+"(?:/)?$",routeKeys:x.routeKeys}}function h(_,y){const{parameterizedRoute:x}=c(_),{catchAll:b=!0}=y;if(x==="/")return{namedRegex:"^/"+(b?".*":"")+"$"};const{namedParameterizedRoute:C}=f(_,!1);let j=b?"(?:(/.*)?)":"";return{namedRegex:"^"+C+j+"$"}}}(xr)),xr}var Ro;function Bf(){return Ro||(Ro=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"interpolateAs",{enumerable:!0,get:function(){return s}});const t=Df(),n=zf();function s(o,a,i){let c="";const l=(0,n.getRouteRegex)(o),u=l.groups,m=(a!==o?(0,t.getRouteMatcher)(l)(a):"")||i;c=o;const f=Object.keys(u);return f.every(p=>{let h=m[p]||"";const{repeat:_,optional:y}=u[p];let x="["+(_?"...":"")+p+"]";return y&&(x=(h?"":"/")+"["+x+"]"),_&&!Array.isArray(h)&&(h=[h]),(y||p in m)&&(c=c.replace(x,_?h.map(b=>encodeURIComponent(b)).join("/"):encodeURIComponent(h))||"/")})||(c=""),{params:f,result:c}}}(gr)),gr}var To;function Uf(){return To||(To=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"resolveHref",{enumerable:!0,get:function(){return m}});const n=Oc(),s=Mc(),o=If(),a=Hn(),i=qn(),c=Bc(),l=Of(),u=Bf();function m(f,p,h){let _,y=typeof p=="string"?p:(0,s.formatWithValidation)(p);const x=y.match(/^[a-zA-Z]{1,}:\/\//),b=x?y.slice(x[0].length):y;if((b.split("?",1)[0]||"").match(/(\/\/|\\)/)){console.error("Invalid href '"+y+"' passed to next/router in page: '"+f.pathname+"'. Repeated forward-slashes (//) or backslashes \\ are not valid in the href.");const j=(0,a.normalizeRepeatedSlashes)(b);y=(x?x[0]:"")+j}if(!(0,c.isLocalURL)(y))return h?[y]:y;try{_=new URL(y.startsWith("#")?f.asPath:f.pathname,"http://n")}catch{_=new URL("/","http://n")}try{const j=new URL(y,_);j.pathname=(0,i.normalizePathTrailingSlash)(j.pathname);let v="";if((0,l.isDynamicRoute)(j.pathname)&&j.searchParams&&h){const E=(0,n.searchParamsToUrlQuery)(j.searchParams),{result:S,params:I}=(0,u.interpolateAs)(j.pathname,j.pathname,E);S&&(v=(0,s.formatWithValidation)({pathname:S,hash:j.hash,query:(0,o.omit)(E,I)}))}const P=j.origin===_.origin?j.href.slice(j.origin.length):j.href;return h?[P,v||P]:P}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)}(dn,dn.exports)),dn.exports}var fn={exports:{}},jr={},Cr={},Ao;function $c(){return Ao||(Ao=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"addPathPrefix",{enumerable:!0,get:function(){return n}});const t=Fs();function n(s,o){if(!s.startsWith("/")||!o)return s;const{pathname:a,query:i,hash:c}=(0,t.parsePath)(s);return""+o+a+i+c}}(Cr)),Cr}var ko;function $f(){return ko||(ko=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"addLocale",{enumerable:!0,get:function(){return s}});const t=$c(),n=zc();function s(o,a,i,c){if(!a||a===i)return o;const l=o.toLowerCase();return!c&&((0,n.pathHasPrefix)(l,"/api")||(0,n.pathHasPrefix)(l,"/"+a.toLowerCase()))?o:(0,t.addPathPrefix)(o,"/"+a)}}(jr)),jr}var Lo;function Hf(){return Lo||(Lo=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addLocale",{enumerable:!0,get:function(){return s}});const n=qn(),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,n.normalizePathTrailingSlash)($f().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)}(fn,fn.exports)),fn.exports}var Sr={},Oo;function Hc(){return Oo||(Oo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"RouterContext",{enumerable:!0,get:function(){return s}});const s=Le._(g).default.createContext(null);process.env.NODE_ENV!=="production"&&(s.displayName="RouterContext")}(Sr)),Sr}var Er={},Do;function qf(){return Do||(Do=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0});function t(u,m){for(var f in m)Object.defineProperty(u,f,{enumerable:!0,get:m[f]})}t(e,{AppRouterContext:function(){return o},GlobalLayoutRouterContext:function(){return i},LayoutRouterContext:function(){return a},MissingSlotContext:function(){return l},TemplateContext:function(){return c}});const s=Le._(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)}(Er)),Er}var hn={exports:{}},_n={exports:{}},Mo;function qc(){return Mo||(Mo=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 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)}(_n,_n.exports)),_n.exports}var Fo;function Vf(){return Fo||(Fo=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useIntersection",{enumerable:!0,get:function(){return u}});const n=g,s=qc(),o=typeof IntersectionObserver=="function",a=new Map,i=[];function c(m){const f={root:m.root||null,margin:m.rootMargin||""},p=i.find(x=>x.root===f.root&&x.margin===f.margin);let h;if(p&&(h=a.get(p),h))return h;const _=new Map,y=new IntersectionObserver(x=>{x.forEach(b=>{const C=_.get(b.target),j=b.isIntersecting||b.intersectionRatio>0;C&&j&&C(j)})},m);return h={id:f,observer:y,elements:_},i.push(f),a.set(f,h),h}function l(m,f,p){const{id:h,observer:_,elements:y}=c(p);return y.set(m,f),_.observe(m),function(){if(y.delete(m),_.unobserve(m),y.size===0){_.disconnect(),a.delete(h);const b=i.findIndex(C=>C.root===h.root&&C.margin===h.margin);b>-1&&i.splice(b,1)}}}function u(m){let{rootRef:f,rootMargin:p,disabled:h}=m;const _=h||!o,[y,x]=(0,n.useState)(!1),b=(0,n.useRef)(null),C=(0,n.useCallback)(v=>{b.current=v},[]);(0,n.useEffect)(()=>{if(o){if(_||y)return;const v=b.current;if(v&&v.tagName)return l(v,E=>E&&x(E),{root:f==null?void 0:f.current,rootMargin:p})}else if(!y){const v=(0,s.requestIdleCallback)(()=>x(!0));return()=>(0,s.cancelIdleCallback)(v)}},[_,p,f,y,b.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)}(hn,hn.exports)),hn.exports}var gn={exports:{}},yn={exports:{}},Pr={},zo;function Wf(){return zo||(zo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"normalizeLocalePath",{enumerable:!0,get:function(){return t}});function t(n,s){let o;const a=n.split("/");return(s||[]).some(i=>a[1]&&a[1].toLowerCase()===i.toLowerCase()?(o=i,a.splice(1,1),n=a.join("/")||"/",!0):!1),{pathname:n,detectedLocale:o}}}(Pr)),Pr}var Bo;function Gf(){return Bo||(Bo=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizeLocalePath",{enumerable:!0,get:function(){return n}});const n=(s,o)=>process.env.__NEXT_I18N_SUPPORT?Wf().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)}(yn,yn.exports)),yn.exports}var xn={exports:{}},Nr={},Uo;function Kf(){return Uo||(Uo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"detectDomainLocale",{enumerable:!0,get:function(){return t}});function t(n,s,o){if(n){o&&(o=o.toLowerCase());for(const c of n){var a,i;const l=(a=c.domain)==null?void 0:a.split(":",1)[0].toLowerCase();if(s===l||o===c.defaultLocale.toLowerCase()||(i=c.locales)!=null&&i.some(u=>u.toLowerCase()===o))return c}}}}(Nr)),Nr}var $o;function Xf(){return $o||($o=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 s=arguments.length,o=new Array(s),a=0;a<s;a++)o[a]=arguments[a];if(process.env.__NEXT_I18N_SUPPORT)return Kf().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)}(xn,xn.exports)),xn.exports}var Ho;function Yf(){return Ho||(Ho=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getDomainLocale",{enumerable:!0,get:function(){return o}});const n=qn(),s=process.env.__NEXT_ROUTER_BASEPATH||"";function o(a,i,c,l){if(process.env.__NEXT_I18N_SUPPORT){const u=Gf().normalizeLocalePath,m=Xf().detectDomainLocale,f=i||u(a,c).detectedLocale,p=m(l,void 0,f);if(p){const h="http"+(p.http?"":"s")+"://",_=f===p.defaultLocale?"":"/"+f;return""+h+p.domain+(0,n.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)}(gn,gn.exports)),gn.exports}var vn={exports:{}},qo;function Qf(){return qo||(qo=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addBasePath",{enumerable:!0,get:function(){return a}});const n=$c(),s=qn(),o=process.env.__NEXT_ROUTER_BASEPATH||"";function a(i,c){return(0,s.normalizePathTrailingSlash)(process.env.__NEXT_MANUAL_CLIENT_BASE_PATH&&!c?i:(0,n.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)}(vn,vn.exports)),vn.exports}var bn={exports:{}},Vo;function Zf(){return Vo||(Vo=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 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 f},PrefetchKind:function(){return m},isThenable:function(){return p}});const s="refresh",o="navigate",a="restore",i="server-patch",c="prefetch",l="fast-refresh",u="server-action";var m;(function(h){h.AUTO="auto",h.FULL="full",h.TEMPORARY="temporary"})(m||(m={}));var f;(function(h){h.fresh="fresh",h.reusable="reusable",h.expired="expired",h.stale="stale"})(f||(f={}));function p(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)}(bn,bn.exports)),bn.exports}(function(e,t){"use client";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return E}});const n=Le,s=r,o=n._(g),a=Uf(),i=Bc(),c=Mc(),l=Hn(),u=Hf(),m=Hc(),f=qf(),p=Vf(),h=Yf(),_=Qf(),y=Zf(),x=new Set;function b(S,I,T,A,k,O){if(typeof window>"u"||!O&&!(0,i.isLocalURL)(I))return;if(!A.bypassPrefetchedCheck){const D=typeof A.locale<"u"?A.locale:"locale"in S?S.locale:void 0,U=I+"%"+T+"%"+D;if(x.has(U))return;x.add(U)}(async()=>O?S.prefetch(I,k):S.prefetch(I,T,A))().catch(D=>{if(process.env.NODE_ENV!=="production")throw D})}function C(S){const T=S.currentTarget.getAttribute("target");return T&&T!=="_self"||S.metaKey||S.ctrlKey||S.shiftKey||S.altKey||S.nativeEvent&&S.nativeEvent.which===2}function j(S,I,T,A,k,O,Y,D,U){const{nodeName:B}=S.currentTarget;if(B.toUpperCase()==="A"&&(C(S)||!U&&!(0,i.isLocalURL)(T)))return;S.preventDefault();const G=()=>{const $=Y??!0;"beforePopState"in I?I[k?"replace":"push"](T,A,{shallow:O,locale:D,scroll:$}):I[k?"replace":"push"](A||T,{scroll:$})};U?o.default.startTransition(G):G()}function v(S){return typeof S=="string"?S:(0,c.formatUrl)(S)}const E=o.default.forwardRef(function(I,T){let A;const{href:k,as:O,children:Y,prefetch:D=null,passHref:U,replace:B,shallow:Q,scroll:G,locale:$,onClick:J,onMouseEnter:se,onTouchStart:ce,legacyBehavior:oe=!1,...le}=I;A=Y,oe&&(typeof A=="string"||typeof A=="number")&&(A=(0,s.jsx)("a",{children:A}));const M=o.default.useContext(m.RouterContext),ee=o.default.useContext(f.AppRouterContext),w=M??ee,W=!M,ie=D!==!1,_e=D===null?y.PrefetchKind.AUTO:y.PrefetchKind.FULL;if(process.env.NODE_ENV!=="production"){let F=function(z){return new Error("Failed prop type: The prop `"+z.key+"` expects a "+z.expected+" in `<Link>`, but got `"+z.actual+"` instead."+(typeof window<"u"?`
2
- Open your browser's console to view the Component stack trace.`:""))};Object.keys({href:!0}).forEach(z=>{if(z==="href"&&(I[z]==null||typeof I[z]!="string"&&typeof I[z]!="object"))throw F({key:z,expected:"`string` or `object`",actual:I[z]===null?"null":typeof I[z]})}),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(z=>{const te=typeof I[z];if(z==="as"){if(I[z]&&te!=="string"&&te!=="object")throw F({key:z,expected:"`string` or `object`",actual:te})}else if(z==="locale"){if(I[z]&&te!=="string")throw F({key:z,expected:"`string`",actual:te})}else if(z==="onClick"||z==="onMouseEnter"||z==="onTouchStart"){if(I[z]&&te!=="function")throw F({key:z,expected:"`function`",actual:te})}else if((z==="replace"||z==="scroll"||z==="shallow"||z==="passHref"||z==="prefetch"||z==="legacyBehavior")&&I[z]!=null&&te!=="boolean")throw F({key:z,expected:"`boolean`",actual:te})});const L=o.default.useRef(!1);I.prefetch&&!L.current&&!W&&(L.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"&&W&&!O){let F;if(typeof k=="string"?F=k:typeof k=="object"&&typeof k.pathname=="string"&&(F=k.pathname),F&&F.split("/").some(xe=>xe.startsWith("[")&&xe.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:N,as:R}=o.default.useMemo(()=>{if(!M){const xe=v(k);return{href:xe,as:O?v(O):xe}}const[F,pe]=(0,a.resolveHref)(M,k,!0);return{href:F,as:O?(0,a.resolveHref)(M,O):pe||F}},[M,k,O]),Ie=o.default.useRef(N),q=o.default.useRef(R);let K;if(oe)if(process.env.NODE_ENV==="development"){J&&console.warn('"onClick" was passed to <Link> with `href` of `'+k+'` but "legacyBehavior" was set. The legacy behavior requires onClick be set on the child of next/link'),se&&console.warn('"onMouseEnter" was passed to <Link> with `href` of `'+k+'` but "legacyBehavior" was set. The legacy behavior requires onMouseEnter be set on the child of next/link');try{K=o.default.Children.only(A)}catch{throw A?new Error("Multiple children were passed to <Link> with `href` of `"+k+"` 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 `"+k+"` but one child is required https://nextjs.org/docs/messages/link-no-children")}}else K=o.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 ge=oe?K&&typeof K=="object"&&K.ref:T,[Re,je,ye]=(0,p.useIntersection)({rootMargin:"200px"}),Ae=o.default.useCallback(F=>{(q.current!==R||Ie.current!==N)&&(ye(),q.current=R,Ie.current=N),Re(F),ge&&(typeof ge=="function"?ge(F):typeof ge=="object"&&(ge.current=F))},[R,ge,N,ye,Re]);o.default.useEffect(()=>{process.env.NODE_ENV==="production"&&w&&(!je||!ie||b(w,N,R,{locale:$},{kind:_e},W))},[R,N,je,$,ie,M==null?void 0:M.locale,w,W,_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&&K.props&&typeof K.props.onClick=="function"&&K.props.onClick(F),w&&(F.defaultPrevented||j(F,w,N,R,B,Q,G,$,W))},onMouseEnter(F){!oe&&typeof se=="function"&&se(F),oe&&K.props&&typeof K.props.onMouseEnter=="function"&&K.props.onMouseEnter(F),w&&((!ie||process.env.NODE_ENV==="development")&&W||b(w,N,R,{locale:$,priority:!0,bypassPrefetchedCheck:!0},{kind:_e},W))},onTouchStart:process.env.__NEXT_LINK_NO_TOUCH_START?void 0:function(pe){!oe&&typeof ce=="function"&&ce(pe),oe&&K.props&&typeof K.props.onTouchStart=="function"&&K.props.onTouchStart(pe),w&&(!ie&&W||b(w,N,R,{locale:$,priority:!0,bypassPrefetchedCheck:!0},{kind:_e},W))}};if((0,l.isAbsoluteUrl)(R))Ce.href=R;else if(!oe||U||K.type==="a"&&!("href"in K.props)){const F=typeof $<"u"?$:M==null?void 0:M.locale,pe=(M==null?void 0:M.isLocaleDomain)&&(0,h.getDomainLocale)(R,F,M==null?void 0:M.locales,M==null?void 0:M.domainLocales);Ce.href=pe||(0,_.addBasePath)((0,u.addLocale)(R,F,M==null?void 0:M.defaultLocale))}return oe?o.default.cloneElement(K,Ce):(0,s.jsx)("a",{...le,...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)})(ts,ts.exports);var Jf=ts.exports,eh=Jf;const Fe=H.getDefaultExportFromCjs(eh),th="_link_w24h0_1",nh="_wrapper_w24h0_98",rh="_text_w24h0_106",Ir={link:th,wrapper:nh,text:rh},ze=({children:e,adornments:t,className:n,disableUnderline:s,href:o,mode:a,size:i,title:c,onClick:l,disablePadding:u,...m})=>{const f=d.helpers.ValidateProp({fieldTypes:Lt.SizesSmallExtended,property:i,fallback:"medium"}),p=d.helpers.ValidateProp({fieldTypes:Lt.Mode,property:a,fallback:"default"});return r.jsx(Fe,{...m,className:d.helpers.classNameConcat(Ir.link,n),href:o&&o.length>0?o:"#","data-size":f,"data-variant":p,title:c||"NextLink","data-disable-underline":s??!1,"data-disable-padding":u??!0,children:r.jsxs("div",{className:Ir.wrapper,onClick:l,children:[t==null?void 0:t.start,r.jsx("p",{className:Ir.text,"data-size":f,children:e}),t==null?void 0:t.end]})})},sh=({ICONS:e})=>{const{resetFeedback:t}=Nt();return r.jsxs("div",{className:Kt["wishlist--snack--actions"],children:[r.jsx(ze,{href:"/favoritos",children:"Ver Favoritos"}),r.jsx(d.Button,{variant:"tertiary",size:"small",onClick:t,adornment:{start:r.jsx(d.Icon,{name:e.close})}})]})},zs=({WISHLIST_INFO:e,ICONS:t,Z_INDEX_WAR:n})=>{const s=Ss(),{resetFeedback:o}=Nt(),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)&&r.jsx(Ot,{Z_INDEX_WAR:n,className:Kt["wishlist--snack"],"data-action":s.action,title:s.action==="add"?e.messages.add:e.messages.remove,supportChildren:r.jsx(sh,{ICONS:t}),size:"medium"})};zs.displayName="WishList.Feedback";const Bs={"product-list--banner":"_product-list--banner_sfibj_1","product-list--card":"_product-list--card_sfibj_30","product-list":"_product-list_sfibj_1"},Vc=({className:e,children:t,columns:n=1,isMobile:s=!1,gap:o=8,position_grid:a,totalColumns:i=4,PRODUCT_CARD_IMAGE_ASPECT_RATIO:c,...l})=>{const u=g.useMemo(()=>n%i===0?"initial":s||n<2?c:c.split("/").reverse().join("/"),[n,i,s]);return r.jsx("div",{...l,className:d.helpers.classNameConcat(Bs["product-list--banner"],e),style:{aspectRatio:u,maxWidth:`${n/i*100}%`,order:a,padding:o/2},children:t})};Vc.displayName="ProductList.Banner";class oh{constructor(){gt(this,"cache",new Map);gt(this,"pendingRequests",new Map);gt(this,"rafId",null)}request(t,n,s){const o=this.getCacheKey(t,s==null?void 0:s.filterTexture);if(this.cache.has(o)){n(this.cache.get(o));return}const a=this.pendingRequests.get(o);a?a.callbacks.push(n):this.pendingRequests.set(o,{productId:t,callbacks:[n],filterTexture:s.filterTexture,storeId:s.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=[],s=[];if(t.forEach((a,i)=>{this.cache.has(i)?s.push([i,a]):n.push(a)}),s.forEach(([a,i])=>{const c=this.cache.get(a);c&&i.callbacks.forEach(l=>l(c)),t.delete(a)}),n.length===0)return;const o=new Map;n.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 n=t.map(i=>i.productId),s=t[0].filterTexture,a=`https://${t[0].storeId}.myvtex.com/_v/get-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]||[],m=s&&u.length?H.formattedSimilars(u,s):u,f=this.getCacheKey(l.productId,s);this.cache.set(f,m),l.callbacks.forEach(p=>p(m)),this.pendingRequests.delete(f)})}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 Wo=new oh;function Wc(e,t){const[n,s]=g.useState([]),o=g.useRef(!1);g.useEffect(()=>{o.current=!1},[e]);const a=g.useCallback(()=>{!e||o.current||(o.current=!0,Wo.request(e,s,t))},[e,t]),i=g.useCallback(()=>Wo.clearCache(),[]);return{items:n,loadSimilars:a,clearCache:i}}const Gc=({isKit:e,parent:t,productId:n,setNotify:s,CONSTANTS:o})=>{const{router:a}=ue(),{items:i,loadSimilars:c}=Wc(n,{filterTexture:o.TEXTURE_IMAGE,storeId:o.storeId}),l=g.useRef(!1),u=g.useRef(null),m=h=>a.push(h??""),f=g.useCallback(h=>{!n||!h||c()},[n,c]),p=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(()=>{f(!0)},o.PLP_PRODUCT_SIMILAR_DELAY);return}f(!0)}},[f]);return g.useEffect(()=>{if(e||!t.current)return;const h={root:null,threshold:.1},_=new IntersectionObserver(([y])=>{p(y,h)},h);return _.observe(t.current),()=>{u.current&&clearTimeout(u.current),_.disconnect()}},[p,t,e]),r.jsx(fe.Actions,{data:i,callback:m,isKit:e,children:!e&&r.jsx(fe.SizeSelector,{setNotify:s,PLP_SIZE_ORDER:o.PLP_SIZE_ORDER})})};Gc.displayName="ProductList.Card.Actions";const Kc=({className:e,children:t,gap:n=32,item:s,isMobile:o,order:a,tag:i,hasMaxWidth:c=!0,index:l,setSkuSelected:u,showVideo:m,CONSTANTS:f,...p})=>{const h=g.useRef(null),{availability:{status:_}}=s,y=g.useCallback((b,C)=>{var j;typeof u=="function"&&u((j=b.isVariantOf)==null?void 0:j.hasVariant,C)},[u]),x=s.name.substring(0,4).toLowerCase()==="kit ";return r.jsxs("div",{...p,className:d.helpers.classNameConcat(Bs["product-list--card"],e),"data-mobile":o,"data-order":a,ref:h,style:{...c&&{maxWidth:o?"50%":"25%"},order:a,padding:n/2},children:[r.jsxs(fe.Root,{item:s,isMobile:o,index:l,size:o?"small":"medium",order:a,outStock:!_,CONSTANTS:f,children:[r.jsx(fe.Header,{product:s,tag:i==null?void 0:i.commercial}),r.jsx(fe.Media,{showVideo:m,hasPriority:!0}),r.jsxs(fe.Wrapper,{type:"body",children:[r.jsx(fe.Title,{tag:i==null?void 0:i.institucional}),r.jsx(Gc,{productId:s.isVariantOf.productGroupID,parent:h,setNotify:y,isKit:x,CONSTANTS:f}),!x&&r.jsx(fe.OutStock,{callback:y})]}),r.jsx(fe.Wrapper,{type:"footer",children:_&&r.jsx(fe.BuyButton,{isKit:x})})]}),t]})};Kc.displayName="ProductList.Card";const Xc=({children:e,className:t,...n})=>r.jsx("div",{...n,className:d.helpers.classNameConcat(Bs["product-list"],t),children:e});Xc.displayName="ProductList.Grid";const at={Banner:Vc,Card:Kc,Root:Xc,helpers:Sp},ah="_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:ah},Us=({className:e,ICONS:t,PLP_NOT_RESULT:n})=>{const{router:s}=ue(),{isMobile:o}=re(),a=()=>{s.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:o?"typography-style-body-md":"typography-style-heading-sm",children:n.title}),r.jsx("p",{className:o?"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})})]})};Us.displayName="PDC.Empty";const Vn=e=>r.jsx("div",{...e,className:Xe["pdc--infinite--next-page"],children:r.jsx(d.Spinner,{className:Xe["pdc--infinite--next-page--spinner"]})});Vn.displayName="PDC.Spinner";function Yc({CONSTANTS:e}){const{sendDataLayerEvent:t}=ae(),{isMobile:n}=re(),{getAvailableProductTag:s}=_t(),[o,a]=g.useState([]),[i,c]=g.useState(!0),l=Bt(),u=l.join(","),m=n?16:32;return g.useEffect(()=>{const f=async()=>{l.length?await fetch("/api/wishlist/products",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({productIds:l})}).then(p=>p.json()).then(p=>{a(p),t({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:p}}})}).catch(p=>console.error(p)):a([]),c(!1)};if(l.length){f();return}if(l.length===0&&o.length===0){c(!1);return}a([]),c(!1)},[u]),r.jsx("section",{className:Kt["wishlist-grid"],children:r.jsxs("div",{className:Kt["wishlist-grid--container"],children:[i&&r.jsx(Vn,{}),!l.length&&!(o!=null&&o.length)&&!i&&r.jsx(Us,{className:Kt["pdc-empty-modifier"],ICONS:e.ICONS,PLP_NOT_RESULT:e.WISHLIST_NOT_RESULT}),r.jsx(at.Root,{children:Array.isArray(o)&&o.map((f,p)=>{const h=f.node.cluster.highlights||[],_=s(h);return r.jsx(at.Card,{gap:m,isMobile:n??!1,item:f.node,tag:_,index:p,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}},f.node.sku)})})]})})}Yc.displayName="Wishlist.Grid";const ih=e=>e.map(t=>{var n;return(n=t.isVariantOf)==null?void 0:n.productGroupID})??[],Qc=({WISHLIST_INFO:e,ICONS:t,Z_INDEX_WAR:n})=>{const s=Ut(),o=Bt(),a=Ss(),{updateList:i}=Nt();return g.useEffect(()=>{var l,u;a.active&&tt.set("fs::wishlist",o);const c=async()=>{var m;await fetch("/api/wishlist/documents",{method:"PATCH",body:JSON.stringify({productIds:o,docId:(m=s==null?void 0:s.user)==null?void 0:m.id})}).catch(f=>{console.error("Error updating wishlist:",f)})};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 m=await tt.get("fs::wishlist");m&&(m==null?void 0:m.length)!==o.length&&i(m)},l=async()=>{var h;const m=await tt.get("fs::wishlist")??[],f=s.wishlist?typeof s.wishlist[0]=="object"?ih(s.wishlist):s.wishlist:[],p=[...new Set([...m,...f])];i(p),tt.set("fs::wishlist",o),f.length!==p.length&&await fetch("/api/wishlist/documents",{method:"PATCH",body:JSON.stringify({productIds:p,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]),r.jsx(zs,{ICONS:t,Z_INDEX_WAR:n,WISHLIST_INFO:e})};Qc.displayName="Wishlist.Init";const Zc=({product:e,priceInfo:t,size:n="medium",style:s,ICONS:o})=>{const{sendDataLayerEvent:a,currentLocalRef:i}=ae(),c=Bt(),{toggleProduct:l}=Nt(),{isVariantOf:{productGroupID:u}}=e;return r.jsx(d.Button,{adornment:{start:r.jsx(d.Icon,{size:n,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"})};Zc.displayName="WishList.Toggle";const Jc={Feedback:zs,Toggle:Zc,Grid:Yc,Init:Qc},el=({product:e,tag:t,size:n="small"})=>{const{CONSTANTS:s}=Ye(),{tags:o}=_t(),a=e.offers.offers[0],i=H.getDiscountPercent(a.listPrice,a.price),c=o==null?void 0:o.flagDiscount;return r.jsxs(fe.Wrapper,{type:"header",style:{zIndex:s.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,s.PRODUCT_CARD_TOP_WISHLIST_TOGGLE&&r.jsx(Jc.Toggle,{product:e,priceInfo:{price:a.price,listPrice:a.listPrice},variant:"card",ICONS:s.ICONS})]})};el.displayName="ProductCard.Actions.Header";const tl=({className:e,children:t,hasPriority:n=!1,showVideo:s=!1,...o})=>{const{element:a,index:i,item:{image:c,slug:l,video:u},sendSelectItemEvent:m,order:f,CONSTANTS:p}=Ye(),h=H.getFirstImages({images:c,label:{first:p.MAIN_IMAGE,second:p.SECOND_IMAGE}});return r.jsxs("div",{...o,className:d.helpers.classNameConcat(Te["product-card--image"],e),ref:a,style:{aspectRatio:p.PRODUCT_CARD_IMAGE_ASPECT_RATIO},children:[r.jsx(Fe,{href:`/${l}/p`,onClick:m,onMouseUp:_=>{_.button===1&&m(),p.PLP_INFINITE_SCROLL&&sessionStorage.setItem(p.PLP_GRID_SCROLL_BACK.order,String(f))},children:r.jsx("div",{className:Te["product-card--image--container"],children:Array.isArray(h)&&h.map(({url:_,alternateName:y},x)=>g.createElement(we.Image,{...p.PRODUCT_IMAGE_DIMENSIONS.product_card,style:p.PRODUCT_IMAGE_DIMENSIONS.product_card,alt:y??"product image",key:x,...n&&{priority:x===0&&i<4},objectFit:"cover",src:_}))})}),p.PLP_SHOW_VIDEO_ON_PRODUCT_CARD&&s&&u&&r.jsx(fe.Video,{url:u,poster:h[0].url}),t]})};tl.displayName="ProductCard.Media.Media";const nl=({className:e,callback:t,children:n,...s})=>{const{isMobile:o,item:a,CONSTANTS:{PRODUCT_CARD_TEXTS:i}}=Ye(),{availability:{status:c}}=a;return c?null:r.jsxs("div",{...s,className:d.helpers.classNameConcat(Te["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:o?"medium":"large",variant:"quaternary",onClick:()=>{typeof t=="function"&&t(a)},children:i.notify})]})};nl.displayName="ProductCard.OutStock";const rl=({children:e,className:t="",index:n,isMobile:s=!1,item:o,size:a,order:i,outStock:c,shelfTitle:l,CONSTANTS:u,...m})=>r.jsx(Sf,{item:o,isMobile:s,outStock:c,order:i,size:a,index:n,shelfTitle:l,CONSTANTS:u,children:r.jsx("div",{...m,className:d.helpers.classNameConcat(Te["product-card--wrapper"],t),"data-size":a,children:e})});rl.displayName="ProductCard.Root";const sl=({disabled:e,label:t,size:n,value:s,onClick:o,...a})=>r.jsxs(d.ToggleSize.Wrapper,{...a,disabled:!1,outOfStock:e,size:n,onClick:o,children:[r.jsx(d.ToggleSize.DisabledAdornment,{}),r.jsx(d.ToggleSize.Text,{children:t})]});sl.displayName="ProductCard.SizeSelector.Item";const ol=({active:e=!1,callback:t,selectedSku:n=null,item:s,setNotify:o})=>{const{item:a,isMobile:i,setSelectedSku:c,eventDataRef:l}=Ye();s.productId=a.id;const u=H.disableSKU(s),m=H.getSKUName(s,"tamanho");!u&&!l.current.availableSkus.includes(m)&&l.current.availableSkus.push(m);const f=g.useCallback(h=>{const _=n===h?null:h;typeof c=="function"&&c(_),typeof t=="function"&&t(_)},[t,c,n]),p=g.useCallback(()=>{if(u&&typeof o=="function"){o(a,s);return}f(s)},[s,o,f,u,a]);return r.jsx(sl,{active:e,disabled:u,label:m,onClick:()=>p(),size:i?"x-small":"small",value:s})};ol.displayName="ProductCard.SizeSelector.SkuItem";const al=({items:e,getLabel:t,PLP_SIZE_ORDER:n})=>Array.isArray(e)?[...e].sort((s,o)=>{const a=t(s).toUpperCase(),i=t(o).toUpperCase(),c=n.indexOf(a)-n.indexOf(i);return c!==0?c:a.localeCompare(i,"pt-BR")}):[],il=({callback:e,className:t="",children:n,setNotify:s,PLP_SIZE_ORDER:o,...a})=>{const{isMobile:i,item:{isVariantOf:{hasVariant:c}},selectedSku:l}=Ye(),u=g.useMemo(()=>Array.isArray(c)?al({items:c,getLabel:m=>H.getSKUName(m,"tamanho"),PLP_SIZE_ORDER:o}):[],[c]);return r.jsxs("div",{...a,className:d.helpers.classNameConcat(Te["product-card--selectors--size"],t),"data-mobile":i,children:[r.jsx("div",{className:Te["product-card--selectors--size--skus"],children:u.map((m,f)=>r.jsx(ol,{active:l===m,callback:e,item:m,selectedSku:l,setNotify:s},`size--${f}--${m.sku}`))}),r.jsx("div",{className:Te["product-card--selectors--size--button"],children:n})]})};il.displayName="ProductCard.SizeSelector";const ns=({alt:e="",callback:t,more:n,total:s=4,src:o,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:[o&&r.jsx(we.Image,{alt:e??o,src:o,height:34,width:34}),n&&r.jsx(d.TextStructure.DivWrapper,{className:Te["product-card--selectors--style--more"],children:r.jsxs("p",{children:["+ ",s]})})]})]}),ch=({children:e,callback:t,data:n,total:s=4,size:o,...a})=>{const{index:i}=Ye(),{triggerSelectItemEventRef:c}=ae();return r.jsxs("div",{...a,children:[e,Array.isArray(n)&&n.slice(0,s).map((l,u)=>r.jsx(ns,{callback:m=>{c.current.trigger=!0,c.current.index=i,typeof t=="function"&&t(m)},src:(l==null?void 0:l.textureImage)??"",alt:l==null?void 0:l.textureAlt,url:l==null?void 0:l.slug,size:o},u)),Array.isArray(n)&&(n==null?void 0:n.length)>s&&r.jsx(ns,{size:o,total:n.length-s,more:!0})]})},cl=({callback:e,className:t,data:n,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 r.jsx(ch,{...a,callback:e,className:d.helpers.classNameConcat(Te["product-card--selectors--style"],t),data:n,size:"x-small",children:l&&r.jsx(ns,{active:!0,size:"x-small",src:l.url})})};cl.displayName="ProductCard.StyleSelector";const ll=({className:e,hasDecimal:t,...n})=>{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=H.formatPriceToCurrency(a,t),m=H.formatPriceToCurrency(o,t),f=H.formatPriceToCurrency(c??0),p=s?"horizontal":"stacked";return r.jsx("div",{...n,className:d.helpers.classNameConcat(Te["product-card--price"],e),"data-mobile":s,children:r.jsx(d.ProductInfo.Root,{size:"small",layout:p,children:r.jsxs(d.ProductInfo.Wrapper,{size:"small",layout:p,children:[r.jsx(d.ProductInfo.ValuesWrapper,{children:m!==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:m,size:"small"})]}):r.jsx(d.ProductInfo.Price,{label:"defaultPrice",value:m,size:"small"})}),i&&i>1&&c?r.jsx(d.ProductInfo.Price,{label:"installment",value:`${i}x ${f}`,size:"small"}):null]})})})};ll.displayName="ProductCard.Price";const ul=({tag:e,className:t})=>{const{item:{name:n}}=Ye();return r.jsxs("div",{className:d.helpers.classNameConcat(Te["product-card--title"],t),children:[r.jsx("div",{className:Te["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:Te["product-card--title--content"],children:n&&r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{children:r.jsx("h3",{children:n})})})})]})};ul.displayName="ProductCard.Title";const dl=({className:e,url:t,poster:n,...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(m=>{m.forEach(f=>{H.setVideoPlay(f.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]),r.jsx("div",{...s,className:d.helpers.classNameConcat(Te["product-card--video"],e),children:t&&r.jsx(we.Video,{autoPlay:!1,muted:!0,loop:!0,preload:"none",playsInline:!0,poster:n})})};dl.displayName="ProductCard.Media.Video";const ml=({children:e,className:t,type:n,...s})=>r.jsx("div",{...s,className:d.helpers.classNameConcat(Te[`product-card--${n}`],t),children:e});ml.displayName="ProductCard.Wrapper";const fe={Actions:kc,BuyButton:Lc,Header:el,Media:tl,Root:rl,OutStock:nl,Price:ll,SizeSelector:il,StyleSelector:cl,Title:ul,Video:dl,Wrapper:ml},lh="_carousel_1egdv_1",uh="_shelf__container_1egdv_14",dh="_shelf_without_carousel_1egdv_34",mh="_card_container_1egdv_57",kt={carousel:lh,"custom-controllers":"_custom-controllers_1egdv_5",shelf__container:uh,"controllers-arrows-bullets":"_controllers-arrows-bullets_1egdv_23",shelf_without_carousel:dh,card_container:mh},Go=({title:e})=>r.jsx("div",{className:kt.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",H.responsive["responsive-mobile-flex"]),children:e}),r.jsx("h2",{className:d.helpers.classNameConcat("typography-style-heading-md",H.responsive["responsive-desktop-flex"]),children:e})]})})}),ph=({children:e,ICONS:t,itemsPerPage:n,title:s})=>{const{isMobile:o}=re(),a=n[o?"mobile":"desktop"],{initialize:i,controller:c,itemsStyles:l,pagination:u}=d.Carousel.useCarousel({itemsPerPage:a,gap:10,loop:!0,direction:"row"}),m=g.Children.toArray(e).length;return o||m>=4?r.jsxs(d.Carousel.Root,{innerRef:p=>{i(p)},className:kt.carousel,children:[r.jsxs("div",{className:kt["custom-controllers"],children:[s&&r.jsx(Go,{title:s}),a<m&&r.jsxs(d.Carousel.Controller,{className:kt["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})}})]}),!o&&a>2&&r.jsx(d.Carousel.Bullets,{page:u.currentPage,total:u.totalPages,onBulletClick:p=>c==null?void 0:c.navigateTo(p)})]})]}),r.jsx(d.Carousel.Body,{children:g.Children.map(e,(p,h)=>r.jsx(d.Carousel.Item,{style:{...l,overflow:"hidden"},children:p},`${s}_${h}`))})]}):r.jsxs(r.Fragment,{children:[s&&r.jsx(Go,{title:s}),r.jsx("div",{className:kt.shelf_without_carousel,children:e})]})},pl=({className:e,item:t,isMobile:n,size:s,shelfTitle:o,...a})=>{const i=g.useRef(null),{getAvailableProductTag:c}=_t(),{availability:{status:l}}=t,u=f=>{const p=f.filter(h=>!a.CONSTANTS.TEXTURE_IMAGE.includes(h.keywords));return n?p.splice(0,2):p},m=c(t.cluster.highlights);return r.jsx("div",{ref:i,className:kt.card_container,children:r.jsxs(fe.Root,{...a,item:{...t,image:u(t.image)},isMobile:n,size:n?"small":"medium",outStock:!l,shelfTitle:o,children:[r.jsx(fe.Header,{product:t,tag:m==null?void 0:m.commercial}),r.jsx(fe.Media,{}),r.jsxs(fe.Wrapper,{type:"body",children:[r.jsx(fe.Title,{tag:m==null?void 0:m.institucional}),r.jsx(fe.Actions,{})]}),r.jsx(fe.Wrapper,{type:"footer"})]})})};pl.displayName="ProductList.Card";const Qt={Shelf:ph,Card:pl},fl=({CONSTANTS:e,inView:t,products:n,innerRef:s})=>{const o=g.useMemo(()=>jf(n),[n]),{isMobile:a}=re(),{addItemsToCart:i}=be(),{sendDataLayerEvent:c}=ae(),{getAvailableProductTag:l}=_t(),[u,m]=g.useState({totalPrice:0,products:{}}),f=()=>{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}}})},p=({selectedProduct:h,productId:_})=>{const y=Cf({selectedProduct:h,productId:_,prevState:u,mainSellerId:e.StoreConfig_MainSellerId});m(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]),r.jsxs("div",{className:pt.container,ref:s,children:[r.jsx("div",{className:pt["carousel-container"],style:{width:o.length<=3?"max-content":"75%"},children:r.jsx(Qt.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 b,C,j;const y=l(h.cluster.highlights),{availability:{status:x}}=h;return x?r.jsxs(fe.Root,{item:{...h,image:Ds.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:(b=y.institucional)==null?void 0:b.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:v=>p({selectedProduct:v,productId:h.id}),PLP_SIZE_ORDER:e.PLP_SIZE_ORDER})})]})]},h.id):null})})}),r.jsx("div",{className:pt["add-cart-container"],children:r.jsx(bf,{handleAddAllToCart:f,selectedProducts:u,CONSTANTS:{BUY_BUTTON_LABELS:e.BUY_BUTTON_LABELS,BUY_PACKAGE:e.BUY_PACKAGE,FREIGHT_CALCULATION:e.FREIGHT_CALCULATION}})})]})},$s={"btn-login":"_btn-login_yas63_12","btn-header":"_btn-header_yas63_22","header-animation":"_header-animation_yas63_35"},Hs=({id:e})=>{const{setIsOpen:t,cartStore:{items:n}}=be(),{handleSelectContent:s}=ae(),{CONSTANTS:o}=Pe(),a=n.reduce((i,c)=>i+(c.quantity??0),0);return r.jsx(d.Header.SupportItem,{onClick:()=>{t(!0),s({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:o.header.ICONS.bag,size:"medium"})]})})};Hs.displayName="Header.Bag";const on=({children:e,href:t,...n})=>t&&t!=="#"?r.jsx(Fe,{href:t.startsWith("/")?t:`/${t}`,...n,children:e}):e,hl=()=>{const{headerData:e}=Pe(),{handleSelectContent:t}=ae(),{reset:n,updateValue:s}=tn(),o=a=>{a?s(a):n()};return r.jsx(d.Header.Categories,{children:Array.isArray(e.categories)&&e.categories.map((a,i)=>r.jsx(on,{href:a.link,onMouseEnter:()=>o(a.submenuId),onFocus:()=>o(a.submenuId),children:r.jsx(d.Header.CategoryItem,{className:$s["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}`))})};hl.displayName="Header.Categories";function fh(){const{handleSelectContent:e}=ae(),{CONSTANTS:t}=Pe(),{setValue:n}=Mn();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 hh={"menu-subcategories-container":"_menu-subcategories-container_a93cr_1"},_h={"observer-wrapper":"_observer-wrapper_r43gk_1"},Wn=({children:e,eventData:t,observerOptions:n,callBackWhenVisible:s,stopOnIntersection:o=!0,className:a,...i})=>{const c=g.useRef(null),l=_s(c,o,n),{sendDataLayerEvent:u}=ae();return g.useEffect(()=>{l&&(typeof s=="function"&&s(),t&&u({...t}))},[l]),r.jsx("div",{...i,ref:c,className:d.helpers.classNameConcat(_h["observer-wrapper"],a),children:e})},_l=({thumbnails:e,category:t,isMobile:n=!0,callBack:s})=>{const{handleSelectPromotionEvent:o}=ae(),a=50/e.length;return r.jsx("div",{className:hh["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(Wn,{eventData:{functionKey:"readyEvents",data:{event:"view_promotion",readyData:{ecommerce:{...u}}}},observerOptions:{delay:1e3},children:r.jsxs(Fe,{href:i.link??"#",onClick:()=>{typeof s=="function"&&s(),o({updatePromotionRef:!0,promotion:u})},children:[r.jsx(we.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}`)})})};_l.displayName="Menu.Thumbnail";const rs={"menu-desktop":"_menu-desktop_1b799_1","menu-categories":"_menu-categories_1b799_12"},gl=({children:e,dividerOnRight:t=!0,subMenu:n,...s})=>{var l;const{router:o}=ue(),{reset:a}=tn(),{handleSelectContent:i}=ae(),{CONSTANTS:c}=Pe();return r.jsxs("div",{...s,className:rs["menu-categories"],children:[(l=n==null?void 0:n.subCategories)==null?void 0:l.map((u,m)=>{var h,_,y,x;const f=u.listCollapseDesk&&!((h=u.see_all)!=null&&h.link)?{expandAfterRowsQty:u.rowsToShowDesk}:{},p=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(on,{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,...f,className:rs["submenu-categories"],children:(y=u.items)==null?void 0:y.map((b,C)=>r.jsx(d.ComponentList.ListItem,{id:`list-item-${b.label}-${C}`,children:r.jsx(ze,{href:b.link??"#",size:"x-small",title:b.label??"",disableUnderline:!0,disablePadding:!0,onClick:()=>{a(),i({content:`menu:${u.label??""}:${b.label??""}:${n.label??""}`})},children:b.label})},`list-item-${b.label}-${C}`))}),((x=u.see_all)==null?void 0:x.link)&&r.jsx(d.ComponentList.Support,{...p,size:"small",onClick:()=>{var b;(b=u.see_all)!=null&&b.link&&(a(),i({content:`menu:${u.label??""}:${n.label}`}),o.push(u.see_all.link))},children:u.see_all.link&&u.see_all.label})]},`list-${u.label}-${m}`)}),t&&r.jsx(d.Utils.Divider,{size:"small",direction:"vertical"})]})};gl.displayName="Menu.Categories";const yl=({children:e,dividerOnBottom:t=!0,...n})=>{const{CONSTANTS:s}=Pe();return r.jsxs(r.Fragment,{children:[r.jsx("div",{...n,className:rs["menu-desktop"],style:{...n.style,justifyContent:s.header.ALIGNMENT_MENU},children:e}),t&&r.jsx(d.Utils.Divider,{size:"small"})]})};yl.displayName="Menu.MenuRoot";const wr={Root:yl,Categories:gl,Thumbnail:_l},xl=()=>{const{headerData:e,CONSTANTS:t}=Pe(),n=si(),{reset:s}=tn();return r.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===n,m=i==null?void 0:i.some(f=>!!f.srcDesk);return r.jsxs(wr.Root,{id:l,style:u?{display:"flex",zIndex:t.header.Z_INDEX_WAR.menu_desktop}:{display:"none"},dividerOnBottom:u,children:[r.jsx(wr.Categories,{dividerOnRight:!!m,subMenu:o}),Array.isArray(i)&&r.jsx(wr.Thumbnail,{thumbnails:i,isMobile:!1,category:c,callBack:s})]},`submenu-${l}-${a}`)})})};xl.displayName="Header.SubMenu";const vl=()=>{const{handleSelectContent:e}=ae(),{CONSTANTS:t}=Pe();return r.jsx(Fe,{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"})})})};vl.displayName="Header.WishList";const gh="_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:gh},bl=({className:e,children:t,...n})=>r.jsx("div",{...n,className:d.helpers.classNameConcat(We["user-menu--content"],e),children:t});bl.displayName="UserMenu.Content";var jl=(e=>(e.Account="account",e))(jl||{});const Cl=({className:e,cashBack:t,credits:n,link:s,total:o,...a})=>{const i=t?H.formatPriceToCurrency(t):void 0,c=n?H.formatPriceToCurrency(n):void 0,l=o?H.formatPriceToCurrency(o):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:s,totalValue:l,type:jl.Account})};Cl.displayName="UserMenu.Credits";const Sl=({className:e,children:t,description:n,text:s,...o})=>{const{isMobile:a}=re();return r.jsx("div",{...o,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:s}),r.jsx("p",{children:n})]})}),t]})})};Sl.displayName="UserMenu.Login";const El=({className:e,isLogged:t,onLogoutClick:n,ICONS:s,storeConfig:o,isMobile:a})=>{const i=a?ro:ro({ICONS:s,storeConfig:o}).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(ze,{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(ze,{href:`${o.secureSubdomain}/api/vtexid/pub/logout?scope=mariafilo&returnUrl=${encodeURIComponent(`${o.storeUrl}`)}`,size:"small",disableUnderline:!0,onClick:n,adornments:{start:r.jsx(d.Icon,{name:dp(s)})},children:up})}):r.jsx(r.Fragment,{})]})};El.displayName="UserMenu.Menu";const Pl=e=>{const t=g.useRef(null),n=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",n),document.addEventListener("keydown",o),document.addEventListener("touchstart",s),()=>{document.removeEventListener("mousedown",n),document.removeEventListener("keydown",o),document.removeEventListener("touchstart",s)}),[n,o,s]),{ref:t}},yh=e=>{if(!e||typeof window>"u")return 0;const t=window.getComputedStyle(e);return parseInt(t.padding,10)},xh=(e,t,n)=>{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?yh(e==null?void 0:e.parentElement):0;return{left:o+i/2-(c.width+l*2),top:a+s+n}},Nl=g.createContext({}),vh=({children:e,delay:t=600,gap:n=20,isOpen:s,setIsOpen:o,target:a,...i})=>{const c=g.useRef(null),[l,u]=g.useState(!1),[m,f]=g.useState({left:0,top:0}),{ref:p}=Pl(()=>{u(!0),typeof window<"u"&&(c.current=window.setTimeout(()=>{o(!1),u(!1)},t))});return g.useEffect(()=>{if(a&&(p!=null&&p.current)){const{left:h,top:_}=xh(p.current,a,n??0);f({left:h,top:_}),u(!1)}},[n,s,a,p]),r.jsx(Nl.Provider,{value:g.useMemo(()=>({...i,...m,contentRef:p,isLeaving:l,isOpen:s,setIsOpen:o,setIsLeaving:u,target:a}),[i,m,p,l,s,o,u,a]),children:e})},Il=()=>{const e=g.useContext(Nl);if(e===void 0)throw new Error("useUserMenuContext must be used within a UserMenuProvider");return e},wl=({children:e,isMobile:t=!1,Z_INDEX_WAR:n})=>{const{isOpen:s,setIsOpen:o}=Il();return r.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: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})]})};wl.displayName="UserMenu.Modal";const Rl=({children:e,component:t,Z_INDEX_WAR:n,isMobile:s,...o})=>r.jsx(vh,{...o,className:We.root,children:s?r.jsxs(r.Fragment,{children:[r.jsx(mt.Modal,{Z_INDEX_WAR:n,children:t}),e]}):r.jsx(mt.Tooltip,{component:t,style:{width:304,zIndex:n.user_menu},Z_INDEX_WAR:n,children:e})});Rl.displayName="UserMenu.Root";const Tl=({children:e,component:t,Z_INDEX_WAR:n,...s})=>{const{contentRef:o,left:a,isLeaving:i,isOpen:c,top:l}=Il();return r.jsx(d.Tooltip.Root,{arrow:"top-right",component:r.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:n.user_menu},children:r.jsx("div",{className:We["user-menu--tooltip"],children:e})})};Tl.displayName="UserMenu.Tooltip";const mt={Credits:Cl,Content:bl,Login:Sl,Menu:El,Modal:wl,Root:Rl,Tooltip:Tl},Gn=({children:e,isOpen:t,setIsOpen:n,desktopUserMenuTarget:s,mobileUserMenuTarget:o,storeConfig:a})=>{var h,_,y;const{isMobile:i}=re(),{CONSTANTS:c}=Pe(),l=Ut(),u=()=>{window.location.href=`${a.secureSubdomain}/api/io/login?returnUrl=${encodeURIComponent(`${window.location.href}`)}`},m=!!((h=l.user)!=null&&h.userId),{cashback:f,credits:p}=g.useMemo(()=>{var x,b;return{credits:((x=l==null?void 0:l.getCurrentCredits())==null?void 0:x.credits)??0,cashback:((b=l==null?void 0:l.getCurrentCredits())==null?void 0:b.cashback)??0}},[l]);return r.jsx(mt.Root,{component:r.jsxs(mt.Content,{children:[r.jsx(mt.Login,{description:pp(m),text:mp(m,((_=l==null?void 0:l.user)==null?void 0:_.firstName)??((y=l==null?void 0:l.user)==null?void 0:y.email)),children:!m&&r.jsx(d.Button,{id:"conta",size:"medium",variant:"quaternary",onClick:()=>u(),children:c.header.MENU_INFO.login.button_text})}),p+f&&m?r.jsx(mt.Credits,{credits:p,cashBack:f,link:`${a.secureSubdomain}/account#/meus-creditos`,total:p+f}):r.jsx(r.Fragment,{}),r.jsx(d.Utils.Divider,{}),r.jsx(mt.Menu,{ICONS:c.header.ICONS,storeConfig:a,isLogged:m,className:H.responsive["responsive-desktop-flex"],onLogoutClick:()=>l.logout()}),r.jsx(mt.Menu,{ICONS:c.header.ICONS,storeConfig:a,isMobile:!0,isLogged:m,className:H.responsive["responsive-mobile-flex"],onLogoutClick:()=>l.logout()})]}),isOpen:t,isMobile:i,setIsOpen:n,target:i?o:s,Z_INDEX_WAR:c.header.Z_INDEX_WAR,children:e})};Gn.displayName="UserMenu";const Al=({storeConfig:e})=>{const{CONSTANTS:t}=Pe(),{handleSelectContent:n}=ae(),{reset:s}=tn(),{setValue:o}=bs(),a=vs(),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(Fe,{href:"/",onMouseEnter:s,children:r.jsx(d.Icon,{name:t.header.ICONS.logo,onClick:()=>{n({content:"header:logo"})}})})}),r.jsx(hl,{}),r.jsxs(d.Header.Support,{onMouseEnter:s,style:{justifyContent:"flex-end"},children:[r.jsx(fh,{}),r.jsx(Gn,{isOpen:a,setIsOpen:o,desktopUserMenuTarget:i.current,storeConfig:e,children:r.jsx(d.Header.SupportItem,{onClick:()=>{o(!0),n({content:"header:user_menu"})},className:$s["btn-login"],innerRef:i,children:r.jsx(d.Icon,{name:t.header.ICONS.person,size:"medium"})})}),r.jsx(vl,{}),r.jsx(Hs,{id:"cart-button"})]})]}),r.jsx(xl,{})]})};Al.displayName="Header.HeaderDesktopWrapper";const Ue={"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"},kl=({children:e,mobileBannerAlt:t,mobileBannerSrc:n,textColor:s,submenuId:o,label:a,...i})=>r.jsx("button",{...i,className:Ue["menu--banners--item"],children:n?r.jsxs(d.Banner.Container,{children:[r.jsx(d.Banner.ImageWrapper,{children:r.jsx(we.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:Ue["menu--banners--item--text"],children:r.jsx("h2",{className:"typography-style-body-xs",style:s?{color:s}:{},children:e})})})})]}):r.jsx("h2",{...i,children:e})});kl.displayName="Menu.Mobile.Category";const Ll=({label:e,...t})=>{const{CONSTANTS:n}=Pe();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})};Ll.displayName="Menu.Mobile.Body.Category";const Ol=({subCategory:e,submenuLabel:t,onHandleOut:n,...s})=>r.jsx("div",{...s,className:Ue["menu--sub-category--list"],children:Array.isArray(e==null?void 0:e.items)&&(e==null?void 0:e.items.map((o,a)=>r.jsx(ze,{disableUnderline:!0,disablePadding:!1,href:o.link??"#",onClick:()=>n(o.label,t),size:"medium",title:o.label??"",children:o.label},a)))});Ol.displayName="Menu.Mobile.List";const Dl=({current:e,onHandleOut:t})=>{var n;return e?r.jsx("div",{className:Ue["menu--sub-category"],children:Array.isArray(e==null?void 0:e.subCategories)&&((n=e==null?void 0:e.subCategories)==null?void 0:n.map((s,o)=>r.jsxs("div",{className:Ue["menu--sub-category--item"],children:[r.jsx(Xt.Title,{onHandleOut:t,subCategory:s,submenuLabel:e==null?void 0:e.id}),r.jsx(Xt.List,{onHandleOut:t,subCategory:s,submenuLabel:e==null?void 0:e.id})]},o)))}):r.jsx(r.Fragment,{})};Dl.displayName="Menu.Mobile.Body.SubCategory";const Ml=({subCategory:e,submenuLabel:t,onHandleOut:n,...s})=>{var c;const{router:o}=ue(),{handleSelectContent:a}=ae(),{CONSTANTS:i}=Pe();return r.jsxs("div",{...s,className:Ue["menu--categories--title"],children:[r.jsx(on,{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&&o.push(e.see_all.link)},children:e.see_all.label})]})};Ml.displayName="Menu.Mobile";const Xt={Banner:kl,Category:Ll,List:Ol,SubCategory:Dl,Title:Ml},Fl=g.createContext({}),bh=({children:e})=>{const[t,n]=g.useState(null),s=g.useCallback(()=>{n(null)},[]),o=a=>{a!==t&&n(a)};return r.jsx(Fl.Provider,{value:{currentCategory:t,setCurrentCategory:n,handleCloseMenu:s,handleChangeSubMenuOpened:o},children:e})},zl=()=>g.useContext(Fl),Bl=e=>{const{router:t}=ue(),{headerData:n}=Pe(),{handleSelectContent:s}=ae(),{currentCategory:o,setCurrentCategory:a}=zl(),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()},m=Array.isArray(n==null?void 0:n.categories)?n==null?void 0:n.categories:[],f=Array.isArray(n==null?void 0:n.subMenus)?n==null?void 0:n.subMenus:[],p=h=>{h.submenuId?a(h.submenuId):l(h.label,h.link)};return r.jsxs("div",{...e,className:Ue["menu--body"],style:{transform:`translate3d(calc(-100% * ${o?1:0}), 0px, 0px)`},children:[r.jsx("button",{className:Ue["menu--dummy-close"],ref:i,"data-close":!0}),r.jsxs("div",{className:Ue["menu--step"],"data-active":"true",children:[r.jsx("div",{className:Ue["menu--banners"],children:r.jsx("div",{className:Ue["menu--banners--list"],children:m.map((h,_)=>g.createElement(Xt.Banner,{...h,key:_,onClick:()=>l(h.label,h.link)},h.mobileBannerAlt))})}),r.jsx("div",{className:Ue["menu--categories"],children:m.map((h,_)=>r.jsx(Xt.Category,{label:h.label,onClick:()=>p(h)},_))})]}),r.jsx("div",{className:Ue["menu--step"],"data-active":!!o,children:r.jsx(Xt.SubCategory,{current:f.find(h=>h.id===o),onHandleOut:u})})]})};Bl.displayName="Menu.Mobile.Body";const jh={"menu--header":"_menu--header_1ozdf_1"},Ul=()=>{var o;const{headerData:e}=Pe(),{currentCategory:t,setCurrentCategory:n}=zl(),s=(o=e==null?void 0:e.categories)==null?void 0:o.find(a=>a.submenuId===t);return r.jsxs("div",{className:jh["menu--header"],children:[r.jsx(d.Button,{"data-out":!s,iconNameStart:"arrow-left",mode:"inverse",onClick:()=>n(null)}),s&&r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{alignContent:"center",children:r.jsx("h2",{className:"typography-style-body-lg",children:s==null?void 0:s.label})})}),r.jsx(d.Button,{iconNameStart:"close","data-close":!0,"data-only":!s,mode:"inverse",onClick:()=>n(null)})]})};Ul.displayName="Menu.Mobile.Header";var ss={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 Rr={},Tr={},Ko;function Sh(){return Ko||(Ko=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"LoadableContext",{enumerable:!0,get:function(){return s}});const s=Le._(g).default.createContext(null);process.env.NODE_ENV!=="production"&&(s.displayName="LoadableContext")}(Tr)),Tr}var Xo;function Eh(){return Xo||(Xo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return h}});const n=Le._(g),s=Sh();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(b=>(x.loading=!1,x.loaded=b,b)).catch(b=>{throw x.loading=!1,x.error=b,b}),x}function u(_,y){let x=Object.assign({loader:null,loading:null,delay:200,timeout:null,webpack:null,modules:null},y),b=null;function C(){if(!b){const P=new m(_,x);b={getCurrentValue:P.getCurrentValue.bind(P),subscribe:P.subscribe.bind(P),retry:P.retry.bind(P),promise:P.promise.bind(P)}}return b.promise()}if(typeof window>"u"&&a.push(C),!c&&typeof window<"u"){const P=x.webpack&&typeof Ch.resolveWeak=="function"?x.webpack():x.modules;P&&i.push(E=>{for(const S of P)if(E.includes(S))return C()})}function j(){C();const P=n.default.useContext(s.LoadableContext);P&&Array.isArray(x.modules)&&x.modules.forEach(E=>{P(E)})}function v(P,E){j();const S=n.default.useSyncExternalStore(b.subscribe,b.getCurrentValue,b.getCurrentValue);return n.default.useImperativeHandle(E,()=>({retry:b.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:b.retry}):S.loaded?n.default.createElement(o(S.loaded),P):null,[P,S])}return v.preload=()=>C(),v.displayName="LoadableComponent",n.default.forwardRef(v)}class m{promise(){return this._res.promise}retry(){this._clearTimeouts(),this._res=this._loadFn(this._opts.loader),this._state={pastDelay:!1,timedOut:!1};const{_res: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(b=>{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 f(_){return u(l,_)}function p(_,y){let x=[];for(;_.length;){let b=_.pop();x.push(b(y))}return Promise.all(x).then(()=>{if(_.length)return p(_,y)})}f.preloadAll=()=>new Promise((_,y)=>{p(a).then(_,y)}),f.preloadReady=_=>(_===void 0&&(_=[]),new Promise(y=>{const x=()=>(c=!0,y());p(i,_).then(x,x)})),typeof window<"u"&&(window.__NEXT_PRELOADREADY=f.preloadReady);const h=f}(Rr)),Rr}(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function n(m,f){for(var p in f)Object.defineProperty(m,p,{enumerable:!0,get:f[p]})}n(t,{default:function(){return u},noSSR:function(){return l}});const s=Le,o=r,a=s._(Eh()),i=typeof window>"u";function c(m){return{default:(m==null?void 0:m.default)||m}}function l(m,f){if(delete f.webpack,delete f.modules,!i)return m(f);const p=f.loading;return()=>(0,o.jsx)(p,{error:null,isLoading:!0,pastDelay:!1,timedOut:!1})}function u(m,f){let p=a.default,h={loading:x=>{let{error:b,isLoading:C,pastDelay:j}=x;if(!j)return null;if(process.env.NODE_ENV!=="production"){if(C)return null;if(b)return(0,o.jsxs)("p",{children:[b.message,(0,o.jsx)("br",{}),b.stack]})}return null}};m instanceof Promise?h.loader=()=>m:typeof m=="function"?h.loader=m:typeof m=="object"&&(h={...h,...m}),h={...h,...f};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(p,h)):p({...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)})(ss,ss.exports);var Ph=ss.exports,Nh=Ph;const $l=H.getDefaultExportFromCjs(Nh),Tn={"modal-modifier":"_modal-modifier_10zw4_1","menu--navigation-bar":"_menu--navigation-bar_10zw4_15","menu--root":"_menu--root_10zw4_26"},Hl=({children:e})=>{const{menuIsOpen:t,setMenuIsOpen:n}=Es(),{CONSTANTS:s}=Pe();return r.jsxs(d.Modal.RootWithoutPortal,{className:d.helpers.classNameConcat(Tn["modal-modifier"],"menu-mobile-root"),isOpen:t,setIsOpen:n,variant:"sideRight",style:{bottom:"unset",overflowY:"hidden",position:"fixed",top:0,zIndex:s.header.Z_INDEX_WAR.menu_mobile},children:[r.jsx(Ul,{}),r.jsx(d.Modal.Body,{className:Tn["menu--root"],children:e})]})};Hl.displayName="Menu.MenuRoot";const Ih=$l(()=>Promise.resolve(Hl),{ssr:!1}),ql=({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:Tn.divider})]});ql.displayName="Menu.NavigationBarItem";const Vl=()=>{const{setUserMenuIsOpen:e}=Es(),{handleSelectContent:t}=ae(),{CONSTANTS:n}=Pe(),{router:s}=ue(),o=[{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"}),s.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"}),s.push("/institucional/lojas")},text:n.header.MENU_INFO.store.button_text}];return r.jsx(d.Card,{id:"menu-navigationbar",shadow:!0,className:Tn["menu--navigation-bar"],style:{zIndex:n.header.Z_INDEX_WAR.menu_mobile_navigation_bar},children:Array.isArray(o)&&o.map((a,i)=>g.createElement(ql,{...a,key:i},a.text))})};Vl.displayName="Menu.NavigationBar";const Ar={Body:Bl,NavigationBar:Vl,Root:Ih},Wl=({storeConfig:e})=>{const t=g.useRef(null),{CONSTANTS:n}=Pe(),{MENU_NAVIGATION_BAR_ALLOWED:s,ICONS:o}=n.header,{handleSelectContent:a}=ae(),{setValue:i}=Mn(),{setValue:c}=ii(),{setValue:l}=bs(),u=vs(),m=ai(),{isMobile:f}=re();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(Fe,{href:"/",children:r.jsx(d.Icon,{name:o.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:o.search,size:"medium"})}),r.jsx(Hs,{}),r.jsxs(d.Header.SupportItem,{onClick:()=>c(!0),children:[r.jsx("span",{ref:t}),r.jsx(d.Icon,{name:o.menu,size:"medium"})]})]})]}),f&&r.jsx(ji,{menuIsOpen:m,setMenuIsOpen:c,userMenuIsOpen:m,setUserMenuIsOpen:l,children:r.jsx(Gn,{storeConfig:e,isOpen:u,setIsOpen:l,mobileUserMenuTarget:t==null?void 0:t.current,children:r.jsxs(Ar.Root,{children:[r.jsx(Ar.Body,{}),s?r.jsx(Ar.NavigationBar,{}):r.jsx(r.Fragment,{})]})})})]})};Wl.displayName="Header.HeaderMobileWrapper";const wh=g.createContext({}),Rh=({children:e})=>{const{sendDataLayerEvent:t}=ae(),{cartStore:n,isOpen:s}=be();g.useEffect(()=>{s&&t({functionKey:"viewCartEvent",data:{commonData:{cartStore:n}}})},[s]),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;vt.post("/api/checkout/order-form/attachments/marketing-data",{orderFormId:l,marketingData:{...n==null?void 0:n.marketingData,marketingTags:Ka(((c=n.marketingData)==null?void 0:c.marketingTags)??[])}}).catch(u=>{console.error(u)})}},[n]);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 r.jsx(wh.Provider,{value:{handleUpdateItemQuantityEvent:o},children:e})},Th="var(--color-background-brand-primary-lighter)",Ah="_fadeInOut_1l5ow_1",kh="_fadeOut_1l5ow_1",ne={brandPrimaryLighter:Th,"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:Ah,fadeOut:kh,"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"},Gl=({item:{id:e,message:t,callback:n},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 r.jsx("div",{className:ne["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:o.close,iconSize:"small",onClick:()=>i(),variant:"tertiary"})]})]})},e)};Gl.displayName="MiniCart.Notify.Item";const Kl=({ICONS:e})=>{const t=ys(),{removeNotification:n}=xs(),s=t.length?[...t].sort((o,a)=>a.id-o.id):[];return s.length?r.jsx("div",{className:ne["mc--notify"],children:r.jsx("div",{className:ne["mc--notify--content"],children:Array.isArray(s)&&s.map(o=>r.jsx(Gl,{item:o,removeNotification:n,ICONS:e},o.id))})}):null};Kl.displayName="MiniCart.Notifications";const Lh=({handleSendEvent:e,onHandleRemove:t,product:n,MINICART_CONFIG:s,...o})=>{const a=Bt(),{toggleProduct:i}=Nt(),{itemOffered:{isVariationOf:{productGroupID:c}},quantity:l}=n;return r.jsx(d.Button,{...o,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:`${s.messages.add_wishlist}`},l,()=>i(c)),e(a.includes(c)?"remove_from_wishlist":"add_to_wishlist","productEvents")},children:s.messages.add_wishlist_button})},Xl=({handleSendEvent:e,product:t,ICONS:n,MINICART_CONFIG:s,...o})=>{const{addToCart:a,removeToCart:i}=be(),{bundleItems:c=[],id:l,uniqueId:u,seller:m,offerings:f,quantity:p}=t,h=(_,y,x)=>{i(l,_.title,()=>{typeof x=="function"&&x(),a({id:l,quantity:y,seller:m},{id:l,texture:_.texture},!0)})};return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:ne["mc--card--actions--add-remove"],children:[s.has_wishlist_button&&r.jsx(Lh,{...o,product:t,handleSendEvent:e,onHandleRemove:h,ICONS:n,MINICART_CONFIG:s}),r.jsx(d.Button,{...o,adornment:{end:r.jsx(d.Icon,{name:n.delete,size:"small"})},underline:!0,variant:"secondary",state:"danger",onClick:()=>{h({texture:"mini-cart",title:`${s.messages.remove}`},p),e("remove_from_cart","skuEvents")},children:s.messages.remove_button})]}),s.has_gift_option&&r.jsx(At.Gift,{uniqueId:u,bundleItems:c,offerings:f,ICONS:n,MINICART_CONFIG:s})]})};Xl.displayName="MiniCart.Card.Actions";const Yl=({bundleItems:e,offerings:t,uniqueId:n,ICONS:s,MINICART_CONFIG:o})=>{const[a,i]=g.useState(!1),{toggleGiftItemCart:c}=be(),l=()=>{if(t instanceof Object&&Array.isArray(t)){const[f]=t;if(f){i(!0);const p=e.some(h=>h.id===f.id);c(n,String(f.id),p).then(()=>i(!1))}}},u=t[0],m=e.find(f=>f.id===u.id);return u&&"id"in u?r.jsx("div",{className:ne["mc--card--actions--gift"],children:r.jsx(d.Checkbox,{adornment:r.jsx(d.Icon,{name:s.check}),checked:!!m,disabled:a,label:o.messages.giftPackage,onChange:l})}):null};Yl.displayName="MiniCart.Card.Gift";const Ql=({itemOffered:e})=>{const t=H.updatedResizedImg(e==null?void 0:e.image[0].url,{width:200,height:300});return r.jsx(Fe,{href:`${e==null?void 0:e.slug}`,className:ne["mc--card--product-link"],children:r.jsx(we.Image,{alt:(e==null?void 0:e.image[0].alternateName)||"Produto",src:t||"",width:108,height:164,objectFit:"unset"})})};Ql.displayName="MiniCart.Card.Media";const Zl=({name:e,skuName:t,tagName:n,className:s})=>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(ne["mc--card--name"],s),children:H.getProductNameWithoutSku(e??"",t??"")})]});Zl.displayName="MiniCart.Card.Name";const Jl=({total:e,totalList:t})=>r.jsx(d.ProductInfo.Root,{children:r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{className:ne["mc--card--price"],children:r.jsx(d.ProductInfo.Wrapper,{className:ne["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:H.formatPriceToCurrency(t),size:"small"}),r.jsx(d.ProductInfo.Price,{label:"discountPrice",value:H.formatPriceToCurrency(e),size:"small"})]}):r.jsx(d.ProductInfo.Price,{label:"defaultPrice",value:H.formatPriceToCurrency(e),size:"small"})})})})});Jl.displayName="MiniCart.ProductPrice";const eu=({product:e,TEXTURE_IMAGE:t,TOGGLE_STYLE_MODIFIER:n})=>{var u;const[s,o]=g.useState(""),a=g.useRef(null),{cartStore:{options:i}}=be(),c=e.itemOffered.isVariationOf.productGroupID,l=g.useCallback(()=>{var f;const m=(f=i==null?void 0:i.find(p=>p.id===c))==null?void 0:f.texture;if(m){o(m);return}fetch("/api/catalog/product/info",{method:"POST",priority:"low",body:JSON.stringify({ids:[c]})}).then(p=>p.json()).then(p=>{const h=p.data[0].items.find(_=>_.itemId===e.id);if(h){const _=h.images.find(y=>t.includes(y.imageLabel));if(_!=null&&_.imageUrl){o(_.imageUrl);return}o(h.images[0].imageUrl)}}).catch(p=>{console.error(p)})},[i,c,e.id]);return g.useEffect(()=>{if(!a.current)return;const m=new IntersectionObserver(f=>{f[0].isIntersecting&&l()});return m.observe(a.current),()=>{m.disconnect()}},[l]),r.jsx("div",{ref:a,children:r.jsx(d.ToggleStyle.Wrapper,{size:"small",style:n,children:r.jsx(d.ToggleStyle.Texture,{children:s?r.jsx(we.Image,{alt:((u=e.itemOffered)==null?void 0:u.image[0].alternateName)??"Produto",src:s,width:164,height:164,style:n}):r.jsx(bc,{})})})})};eu.displayName="MiniCart.Card.Style";const tu=({product:e,MINICART_CONFIG:t,NAME_SPLIT_SYMBOL:n,TEXTURE_IMAGE:s,TOGGLE_STYLE_MODIFIER:o})=>{const{size:a}=H.getColorAndSizeFromSkuName(e.itemOffered.skuName??"",n);return r.jsxs(d.Utils.Row,{alignItems:"center",children:[r.jsx(eu,{product:e,TEXTURE_IMAGE:s,TOGGLE_STYLE_MODIFIER:o}),r.jsx(d.Utils.Divider,{direction:"vertical",size:"small",style:{height:24}}),a&&r.jsx(d.ToggleSize.Wrapper,{size:t.product_card.sku.size??"small",variation:t.product_card.sku.variation??"fill",className:ne["mc-container-actions--toggle-size-modifier"],style:{backgroundColor:`${ne.brandPrimaryLighter}`},children:r.jsx(d.ToggleSize.Text,{children:a})})]})};tu.displayName="MiniCart.Card.Sku";const At={Actions:Xl,Gift:Yl,Media:Ql,Name:Zl,Price:Jl,Sku:tu},Oh=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}},nu=({available:e=!0,index:t,product:n,ICONS:s,MINICART_CONFIG:o,NAME_SPLIT_SYMBOL:a,TEXTURE_IMAGE:i,TOGGLE_STYLE_MODIFIER:c})=>{var f,p;const{sendDataLayerEvent:l}=ae(),u=Oh(n),m=(h,_)=>{const y={commonData:{...n,...u},customData:{index:t},event:h};if(_==="skuEvents"){const x={...n,...u};y.supportData={selectedSkus:[x]},y.commonData.products=[x]}l({functionKey:_,data:y})};return r.jsxs("div",{className:d.helpers.classNameConcat(ne["mc--card"],e?"":ne["mc--card--unavailable"]),children:[r.jsx(At.Media,{itemOffered:n.itemOffered}),r.jsxs("div",{className:ne["mc--card--content-info"],children:[r.jsx(At.Name,{name:((f=n.itemOffered)==null?void 0:f.name)??"",skuName:(p=n.itemOffered)==null?void 0:p.skuName}),r.jsxs("div",{className:ne["mc--card--details"],children:[r.jsx("div",{className:ne["mc--card--actions"],children:e?r.jsx(At.Price,{total:u.price,totalList:u.listPrice}):r.jsx(d.Tag,{variant:"secondary",size:"small",children:"Indisponível"})}),r.jsxs("div",{className:ne["mc--card--actions--secondary"],children:[e&&r.jsx(At.Sku,{product:n,MINICART_CONFIG:o,NAME_SPLIT_SYMBOL:a,TEXTURE_IMAGE:i,TOGGLE_STYLE_MODIFIER:c}),r.jsx(At.Actions,{handleSendEvent:m,product:n,size:"small",variant:"tertiary",ICONS:s,MINICART_CONFIG:o})]})]})]})]})};nu.displayName="MiniCart.Card";const ru=({type:e="positive",ICONS:t,MESSAGE_CASHBACK:n})=>{var a;const{toExpire:s}=Ut(),o=((a=s==null?void 0:s.cashback)==null?void 0:a.reduce((i,c)=>i+c.remaining_value,0))??0;return o>0?r.jsxs("div",{className:d.helpers.classNameConcat(ne["mc--cashback"],ne[`mc--cashback--${e}`]),children:[r.jsx(d.Icon,{name:t.alert_circle,size:"medium"}),r.jsxs("p",{children:[r.jsx("span",{children:H.formatPriceToCurrency(o)})," ",n.title]})]}):null};ru.displayName="MiniCart.Cashback";const su=({type:e,ICONS:t,MINICART_CONFIG:n})=>{const{addCouponSeller:s,removeCoupon:o,removeSellerCode:a,cartStore:{marketingData:i,openTextField:c}}=be(),[l,u]=g.useState(!1),[m,f]=g.useState(!1),p=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(!!p()),y=async x=>{f(!0),!!p()&&(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(()=>f(!1))};return r.jsx(De.Field,{hasError:l,hasSuccess:h,isLoading:m,onHandler:y,type:e,title:e==="coupon"?`${n.messages.descount_cupom_placeholder}`:`${n.messages.sellers_code_placeholder}`,value:p(),MINICART_CONFIG:n,ICONS:t})};su.displayName="MiniCart.CouponSeller";const ou=({ICONS:e,MINICART_CONFIG:t,PLP_NOT_RESULT:n})=>{const{router:s}=ue(),o=()=>{s.push(n.link)};return r.jsxs(d.Utils.Column,{alignContent:"center",alignItems:"center",gap:"24px",className:ne["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 ${ne["mc--body--empty--text"]}`,children:[t.messages.empty_card," "]})})}),r.jsx(d.Button,{variant:"tertiary",size:"large",onClick:()=>o(),"data-close":!0,adornment:{end:r.jsx(d.Icon,{name:e.arrow_right,size:"medium"})},children:t.messages.empty_bag})]})};ou.displayName="MiniCart.Feedback";const Dh=e=>{const t=e.replace(/\D/g,"");return t.length>5?`${t.slice(0,5)}-${t.slice(5,8)}`:t},au=({feedback:e,hasError:t,onHandler:n,hasSuccess:s,type:o,title:a,value:i,ICONS:c})=>{const[l,u]=g.useState(i);g.useEffect(()=>{t||u(i)},[i,t]);const m=()=>t?r.jsx(d.Icon,{name:c.delete_circle}):String(i).length&&s?r.jsx(d.Icon,{name:c.check_circle}):null,f=()=>{if(o==="seller"){const y=String(i).includes(" - ")?String(i).split(" - ")[0]:l;u(y)}},p=()=>{if(o==="seller"){const y=String(i).includes(" - ")?i:l;u(y)}},h=y=>{const x=y.currentTarget.value;if(x===""&&typeof n=="function"||s&&String(i).length>0&&x!==String(i)||t&&x!==String(i)){u(""),n("");return}if(o==="cep"){const C=Dh(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:m()},mode:"over-label",label:a,feedback:e,value:l,type:"text",onFocus:f,onBlur:p,onChange:h,onKeyDown:_})};au.displayName="MiniCart.Field.Input";const iu=({title:e,ICONS:t,MINICART_CONFIG:n,...s})=>{const o=g.useRef(null),{hasSuccess:a,hasError:i,isLoading:c,onHandler:l,type:u,value:m}=s,f=()=>i?"error":String(m).length&&a?"success":"none",p=g.useCallback(()=>{if(o.current){const y=o.current.querySelector("input");y&&typeof l=="function"&&(m!==""||i?(l(""),y.value=""):l((y==null?void 0:y.value)??""))}},[l,m,i]),h=f();return r.jsx("div",{ref:o,children:r.jsx(d.TextField.Structure,{className:ne["mc--field"],input:r.jsx(au,{...s,feedback:h,title:e,ICONS:t}),right:r.jsx(d.Button,{"data-has-success":!a,size:"medium",title:String(m).length&&a||i?"Remover":"Aplicar",onClick:()=>p(),disabled:c,children:String(m).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})})};iu.displayName="MiniCart.Field";const Yo=e=>{const t=e*100;return Math.round(t)},Mh=e=>(e/100).toFixed(2).replace(".",","),Fh=(e,t)=>{const{valueType:n,remainingValueToActivate:s}=e;if(n==="quantity")return`Adicione mais ${s} ${s===1?"item":"itens"} ${t}`;if(n==="price"){const o=s===100?"Falta":"Faltam",a=Mh(s);return`${o} R$ ${a} ${t}`}return t},cu=({ICONS:e})=>{var b;const{promotionRules:t,data:n,cartStore:s,cartStore:{items:o,marketingData:a},addCouponSeller:i,setIsOpen:c}=be(),{sendDataLayerEvent:l}=ae(),u=(b=n==null?void 0:n.promotion)==null?void 0:b.promotionCart,m=g.useRef(!1),{router:f}=ue();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)&&!m.current&&(a==null?void 0:a.coupon)!==u.cupom&&(m.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&&(m.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 p=u.title,h=u.subtitle,_=u.titleSuccess,y=u.subtitleSuccess,x=u.linkLabel;return r.jsxs("div",{className:ne["mc--body--promotion"],children:[t.remainingValueToActivate>0&&r.jsx(d.Closeness,{className:ne["mc--body--promotion--closeness"],title:Fh(t,p),subtitle:h,percentage:Yo(t.completeness),iconLink:e.arrow_right,linkLabel:x,onClick:()=>{l({functionKey:"viewCartEvent",data:{event:"closeness_view_more",commonData:{cartStore:s}}}),f.push(`${u.link}`),c(!1)}}),t.remainingValueToActivate<=0&&r.jsx(d.Closeness,{className:`${ne["mc--body--promotion--closeness"]} ${ne["mc--body--promotion--closeness--success"]}`,title:_,subtitle:y,percentage:Yo(t.completeness)})]})};cu.displayName="MiniCart.Modal.Body.Promotion";const lu=({TIPBAR_CONFIGS:e})=>{const{data:t,cartStore:n,cartStore:{items:s,marketingData:o},addCouponSeller:a}=be(),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),[m,f]=g.useState(!1);if(g.useEffect(()=>{l&&setTimeout(()=>{u(!1)},e.snackbar_timeout)},[l]),g.useEffect(()=>{m&&setTimeout(()=>{f(!1)},e.snackbar_timeout)},[m]),!i||i.active==="Desativar"||i.valueCupom===""||s.length===0)return null;const p=async()=>{if(!n.items.length){f(!0);return}(await a(i==null?void 0:i.valueCupom,"coupon")).code!==200&&u(!0)};return r.jsxs("div",{className:ne["mc--body--coupon-tag"],style:{backgroundColor:`${i.tagColor}`,color:`${i.textColor}`},children:[r.jsx("div",{className:ne["mc--body--coupon-tag--text"],dangerouslySetInnerHTML:{__html:i.value}}),r.jsx("div",{className:ne["mc--body--coupon-tag--button"],children:r.jsx(d.Button,{variant:"quaternary",mode:"inverse",onClick:p,disabled:c,children:c?"Cupom Aplicado":"Aplicar Cupom"})})]})};lu.displayName="MiniCart.Modal.Body.CouponTag";const uu=({children:e,ICONS:t,MINICART_CONFIG:n,NAME_SPLIT_SYMBOL:s,PLP_NOT_RESULT:o,TEXTURE_IMAGE:a,TIPBAR_CONFIGS:i,TOGGLE_STYLE_MODIFIER:c})=>{const{cartStore:{items:l,messages:u}}=be();return r.jsxs(d.Modal.Body,{className:ne["mc--body"],children:[e,r.jsx(cu,{ICONS:t}),r.jsx(lu,{TIPBAR_CONFIGS:i}),r.jsx("div",{className:ne["mc--body--products"],children:Array.isArray(l)&&l.length?l.map((m,f)=>{const p=u.find(h=>{var _;return h.code==="withoutStock"&&((_=h.fields)==null?void 0:_.ean)===m.ean})!==void 0;return r.jsx(De.Card,{available:!m.availability.includes("outStock")||!p,index:f,product:m,ICONS:t,MINICART_CONFIG:n,NAME_SPLIT_SYMBOL:s,TEXTURE_IMAGE:a,TOGGLE_STYLE_MODIFIER:c},`${m.id}-${m.itemOffered.sku}-${f}`)}):r.jsx(De.Feedback,{ICONS:t,MINICART_CONFIG:n,PLP_NOT_RESULT:o})})]})};uu.displayName="MiniCart.Body";const du=({children:e,storeConfig:t,MINICART_CONFIG:n})=>{const{cartStore:s}=be();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 r.jsxs(d.Modal.Footer,{className:ne["mc--footer"],children:[e,r.jsx("div",{className:ne["mc--footer--actions"],children:r.jsx(d.Button,{variant:"primary",size:"large","data-close":!0,className:ne["mc--footer--actions-button"],onClick:o,children:n.messages.checkout_button})})]})};du.displayName="MiniCart.Modal.Footer";const mu=({children:e,ICONS:t,MINICART_CONFIG:n,Z_INDEX_WAR:s})=>{const[o,a]=g.useState(!1),i=g.useRef(null),c=()=>a(l=>!l);return r.jsxs(r.Fragment,{children:[o&&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:ne["inputs--tooltip"],style:{zIndex:s.modal},isOpen:!0,size:"medium",parent:i.current}),r.jsxs(d.Accordion.Wrapper,{className:ne["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(ne["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:ne["mc--discount--body"],children:e})]})]})};mu.displayName="MiniCart.Discount";const pu=({discount:e,shipping:t,total:n})=>{var l,u;const{data:s}=be(),o=(u=(l=s==null?void 0:s.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":H.formatPriceToCurrency((t??0)/100),c=[{title:"Frete",value:t===void 0?"A calcular":i},{title:"Desconto",value:H.formatPriceToCurrency((e??0)/100)},{message:(o==null?void 0:o.value)??"",title:"Total",value:`1x de ${H.formatPriceToCurrency(a/100)}`}];return r.jsx("div",{className:ne["mc--footer--total"],children:Array.isArray(c)&&c.map((m,f)=>r.jsxs("div",{className:ne["mc--footer--total--info"],"data-discount":m.title==="Desconto",children:[r.jsx("p",{children:m.title}),r.jsxs("div",{className:ne["mc--footer--total--info--content"],children:[m.message&&(o==null?void 0:o.active)==="Ativar"&&r.jsx(d.Tag,{variant:"primary",title:m.message,style:{backgroundColor:o==null?void 0:o.tagColor,color:o==null?void 0:o.textColor},children:m.message}),r.jsx(d.ProductInfo.Price,{className:ne["mc--footer--total--info"],label:m.title,value:m.value})]})]},f))})};pu.displayName="MiniCart.Modal.Footer.Resume.Items";const fu=()=>{var o,a,i;const{totalizers:e}=jt(),t=((o=e.find(c=>c.id==="Items"))==null?void 0:o.value)??0,n=(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 r.jsx(pu,{discount:n??0,total:t,shipping:s})};fu.displayName="MiniCart.Modal.Footer.Totals";const hu=({ICONS:e,MINICART_CONFIG:t})=>{const{isMobile:n}=re(),{cartStore:{items:s}}=be(),o=s.reduce((a,i)=>a+(i.quantity??0),0);return r.jsx(d.Modal.Header,{navigation:"top",className:ne["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:ne["mc--header--subtitle"],children:o!==1?`[${o}] Produtos`:`[${o}] Produto`}),r.jsx(d.Button,{"data-close":!0,iconNameStart:e.close,size:"small",variant:"tertiary"})]})})};hu.displayName="MiniCart.Modal.Header";const _u=({ICONS:e,MINICART_CONFIG:t})=>{const{cartStore:{shippingData:n},shipping:s,removeCEP:o}=be(),{sendDataLayerEvent:a}=ae(),[i,c]=g.useState(!1),[l,u]=g.useState(!1),m=g.useCallback(()=>{var C;const b=((C=n==null?void 0:n.address)==null?void 0:C.postalCode)??"";return b.length===8&&!b.includes("-")?`${b.slice(0,5)}-${b.slice(5)}`:b},[n]),[f,p]=g.useState(!!m()),h=()=>{p(!1),c(!1)},_=b=>{var C;if(typeof b=="object"&&(b!=null&&b.logisticsInfo))return(C=b.logisticsInfo)==null?void 0:C.reduce((j,v)=>{var T;const P=(T=v==null?void 0:v.slas)==null?void 0:T.find(A=>(A==null?void 0:A.id)===(v==null?void 0:v.selectedSla));if(!P)return j;const E=parseInt(String((P==null?void 0:P.shippingEstimate)??"").replace("bd","")),S=Number((((P==null?void 0:P.price)??0)/100).toFixed(2));if(j.shipping_tier===void 0)return j.shipping_tier=v==null?void 0:v.selectedSla,j.delivery_time=E.toString(),j.shipping=S,j.flag_retirada=(v==null?void 0:v.selectedDeliveryChannel)==="delivery"?"false":"true",j;const I=parseInt(j.delivery_time??"0");return E>I&&(j.delivery_time=E.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 b=>{const C=b.replace(/\D/g,"");if(C.length!==8)return!1;try{return!(await vt.get(`https://viacep.com.br/ws/${C}/json/`)).data.erro}catch{return!1}},x=async b=>{if(u(!0),!!m()||!(b!=null&&b.trim())){await o(),h(),u(!1);return}if(!await y(b)){c(!0),p(!1),u(!1);return}try{const P=await s(b);if(c(!1),P){p(!0);const E=_(P);E&&a({functionKey:"readyEvents",data:{event:"search_zipcode",readyData:E}})}}catch{c(!0)}finally{u(!1)}};return r.jsx(De.Field,{hasSuccess:f,hasError:i,isLoading:l,onHandler:x,title:`${t.messages.shipping_calculation_placeholder}`,type:"cep",value:m(),ICONS:e,MINICART_CONFIG:t})};_u.displayName="MiniCart.Shipping";const gu=()=>{var n,s;const{data:e}=be(),t=(s=(n=e==null?void 0:e.flags)==null?void 0:n.flagCart)==null?void 0:s.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};gu.displayName="MiniCart.TagMessage";const De={Body:uu,Card:nu,Cashback:ru,CouponSeller:su,Discount:mu,Field:iu,Feedback:ou,Shipping:_u,Footer:du,Header:hu,TagMessage:gu,Totals:fu},zh=({ICONS:e,MINICART_CONFIG:t,NAME_SPLIT_SYMBOL:n,PLP_NOT_RESULT:s,TEXTURE_IMAGE:o,TIPBAR_CONFIGS:a,TOGGLE_STYLE_MODIFIER:i,Z_INDEX_WAR:c,storeConfig:l,minicartStyleModifiers:u})=>{const{isOpen:m,setIsOpen:f}=be(),{isMobile:p}=re();return r.jsxs(d.Modal.Root,{className:d.helpers.classNameConcat(ne["minicart--modal-modifier"],u),isMobile:!0,isOpen:m,setIsOpen:f,style:{zIndex:c.modal},variant:p?"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:s,TEXTURE_IMAGE:o,TOGGLE_STYLE_MODIFIER:i,TIPBAR_CONFIGS:a,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(Kl,{ICONS:e})]})},yu=({tipBar:e,minicartStyleModifiers:t,menuV2:n,storeConfig:s,className:o})=>{const{structureRef:a,rootRef:i,CONSTANTS:c}=Pe(),{header:{HEADER_CONFIGS:l,Z_INDEX_WAR:u},minicart:m}=c;return r.jsx(d.Header.Structure,{innerRef:a,adornment:{start:e},style:{position:"sticky",top:0,zIndex:u.header},className:d.helpers.classNameConcat($s["header-animation"],o),children:r.jsxs(d.Header.Root,{innerRef:i,style:{zIndex:u.header},variant:l.default_variant,interactiveVariant:l.interactive_variant,children:[n??r.jsxs(bh,{children:[r.jsx("div",{className:H.responsive["responsive-mobile-block"],style:{height:"100%",width:"100%",zIndex:u.header_mobile},children:r.jsx(Wl,{storeConfig:s})}),r.jsx("div",{className:H.responsive["responsive-desktop-block"],style:{height:"100%",width:"100%",zIndex:u.header_desktop},children:r.jsx(Al,{storeConfig:s})})]}),r.jsx(Rh,{children:r.jsx(zh,{...m,minicartStyleModifiers:t})}),r.jsx(Ms,{title:"Produto adicionado à sua sacola!",CONSTANTS:c.addToCart})]})})};yu.displayName="Header";const Bh="_shippingFreight_6z8rf_6",Uh="_shippingFreight__postalCodeGrid_6z8rf_10",$h="_shippingFreight__grid_6z8rf_14",Hh="_shippingFreight__grid__title_6z8rf_18",qh="_shippingFreight__grid__remember_6z8rf_29",Vh="_postalCodeContainer_6z8rf_44",Wh="_deliveryStatusBar__tag_6z8rf_49",Gh="_deliveryStatusBarError__tag_6z8rf_66",Kh="_deliveryInfo_6z8rf_74",Xh="_deliveryInfo__content_6z8rf_78",Yh="_deliveryInfo__text_6z8rf_84",Qh="_deliveryInfo__title_6z8rf_89",Zh="_deliveryInfo__subtitle_6z8rf_99",Jh="_deliveryInfo__tooltipIcon_6z8rf_109",e_="_deliveryInfo__tooltip_6z8rf_109",t_="_freightGrid_6z8rf_148",n_="_freightContainer_6z8rf_155",r_="_freightOption__content_6z8rf_160",s_="_freightOption__value_6z8rf_166",o_="_freightOption__title_6z8rf_177",a_="_freightOption__title_item_6z8rf_181",i_="_freightOption__paragraph_6z8rf_192",de={shippingFreight:Bh,shippingFreight__postalCodeGrid:Uh,shippingFreight__grid:$h,shippingFreight__grid__title:Hh,shippingFreight__grid__remember:qh,postalCodeContainer:Vh,deliveryStatusBar__tag:Wh,deliveryStatusBarError__tag:Gh,deliveryInfo:Kh,deliveryInfo__content:Xh,deliveryInfo__text:Yh,deliveryInfo__title:Qh,deliveryInfo__subtitle:Zh,deliveryInfo__tooltipIcon:Jh,deliveryInfo__tooltip:e_,freightGrid:t_,freightContainer:n_,freightOption__content:r_,freightOption__value:s_,freightOption__title:o_,freightOption__title_item:a_,freightOption__paragraph:i_,"input-modifier":"_input-modifier_6z8rf_207","freight--tooltip":"_freight--tooltip_6z8rf_227"},c_=({icon:e,title:t,subtitle:n,packageCount:s,packageUnit:o="",labelDescription:a,freightConfig:i,toolTipZIndex:c})=>{const[l,u]=g.useState(!1),m=g.useRef(null),f=()=>u(p=>!p);return r.jsxs("div",{className:de.deliveryInfo,ref:m,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:m.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," ",s," ",o]}),n&&r.jsx("span",{className:de.deliveryInfo__subtitle,children:n})]}),a&&r.jsxs("div",{className:de.deliveryInfo__tooltipIcon,onMouseEnter:f,onMouseLeave:f,"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})]})]})]})},l_=({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})]})})})]})}),u_=({children:e})=>r.jsx("div",{className:de.freightContainer,children:e}),d_=({children:e})=>r.jsx("div",{className:de.freightGrid,children:e}),m_=({children:e})=>r.jsx("div",{className:de.postalCodeContainer,children:e}),Qo=({message:e,seller:t="",size:n="small",setError:s})=>r.jsx("div",{className:s?de.deliveryStatusBarError:de.deliveryStatusBar,children:r.jsxs(d.Tag,{title:e,className:s?de.deliveryStatusBarError__tag:de.deliveryStatusBar__tag,size:n,children:[e," ",!s&&t]})}),p_=e=>{const t=parseInt(e,10);return t===1?`${t} dia`:`${t} dias`},f_=e=>{var n,s,o;const t=[];return(o=(s=(n=e==null?void 0:e.logisticsInfo)==null?void 0:n[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},h_=({component:e,parent:t,top:n,left:s,target:o,contentRef:a,freightConfig:i,toolTipZIndex:c=999,...l})=>{const{isMobile:u}=re();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})})},__=({onUpdateFreightItems:e,sellerId:t,size:n,skuId:s,quantity:o,setError:a,setIsButtonClicked:i,component:c,freightConfig:l,toolTipZIndex:u})=>{var k,O,Y,D;const m=jt(),f=jt(U=>U.shipping),[p,h]=g.useState(),[_,y]=g.useState(!1),[x,b]=g.useState(!1),[C,j]=g.useState(!1),v=(O=(k=m.shippingData)==null?void 0:k.address)==null?void 0:O.postalCode,P=!(p!=null&&p.length)&&v?v:p,E=g.useRef(null),S=async U=>{const Q=U.target.value.replace(/\D/g,"").slice(0,8);Q.length>5?h(Q.replace(/^(\d{5})(\d{1,3})/,"$1-$2")):h(Q)},I=async U=>{const B=U.target.value.replace(/\D/g,"");try{if((await vt.get(`https://viacep.com.br/ws/${B}/json/`)).data.erro){a&&a(l.messages.cep_not_found),i(!1),b(!0);return}a&&a(""),b(!1)}catch{console.log("Erro ao validar o CEP. Tente novamente mais tarde.")}},T=async()=>{y(!0);try{const U=await vt.post("/api/checkout/simulation",{items:[{id:s,quantity:o,seller:t}],country:"BRA",postalCode:P});e(f_(U.data))}catch(U){console.error("Erro ao atualizar o documento:",U)}finally{y(!1),f(P,"BRA")}},A=async()=>{if(!s){j(!0),setTimeout(()=>j(!1),1500);return}await I({target:{value:P}}),_||(T(),i(!0))};return r.jsxs("div",{ref:E,style:{position:"relative"},children:[!s&&C?r.jsx(h_,{component:c,isOpen:C,parent:E.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:(D=(Y=m.shippingData)==null?void 0:Y.address)==null?void 0:D.postalCode,label:l.messages.text_input_label,title:"textfield",value:p,sizeVariant:n,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:r.jsx(d.Button,{onClick:A,size:n,title:"button",children:_?r.jsx(d.Spinner,{size:"small",indicatorColor:"#ffffff"}):l.messages.text_input_btn})})})]})},g_=({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(ze,{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})]}),y_=({children:e})=>r.jsx("div",{className:de.freightContainer,children:e}),xu=({className:e,sellerId:t,skuId:n,quantity:s,size:o,seller:a,local:i,CONSTANTS_PROPS:c})=>{const{sendDataLayerEvent:l}=ae(),[u,m]=g.useState(""),[f,p]=g.useState([]),[h,_]=g.useState(""),[y,x]=g.useState(!1),b=j=>m(j),C=j=>{p(j),l({functionKey:"readyEvents",data:{event:"search_zipcode",readyData:{shippings:j.map(v=>({shipping_tier:v.id,delivery_time:v.shippingEstimate.replace("bd",""),flag_pickup:v.name.toLowerCase().includes("retirada")?"true":"false",shipping:v.price,currency:c.currency||"BRL"}))}}})};return r.jsxs(y_,{className:e,children:[r.jsxs(g_,{freightConfig:c.freightConfig,children:[r.jsx(m_,{children:r.jsx(__,{onUpdateFreightItems:C,skuId:n,quantity:s,size:o,sellerId:t,local:i,setError:_,setIsButtonClicked:x,freightConfig:c.freightConfig,toolTipZIndex:c.toolTipZIndex})}),h?r.jsx(Qo,{size:o,message:h,setError:_}):f.length>0&&r.jsx(Qo,{size:o,message:c.freightConfig.messages.delivered_by,seller:a})]}),y&&!h?f.length>0&&r.jsxs(u_,{children:[r.jsx(d_,{children:f.filter(({id:j})=>!j.includes("Retirada")).map(j=>r.jsx(l_,{id:j.id,value:H.freightParsePrice({valueInCents:j.price,hasFree:!1,freeTaxMessage:c.freightConfig.messages.free_tax}),title:j.name,paragraph:`${c.freightConfig.messages.prefix_days}${p_(j.shippingEstimate)}`,radioValue:u,changeValue:b},j.id))}),c.deliveryInfoBoxesAllowed?r.jsx(c_,{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]})},St={"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"},x_=({children:e,href:t,isLast:n,title:s,ICONS:o})=>r.jsx(d.BreadCrumb.Item,{adornment:{end:n&&r.jsx(d.Icon,{name:o.arrow_right})},children:n?r.jsx(ze,{href:t??"/",size:"medium",title:s,disableUnderline:!0,children:e}):e}),vu=()=>{var a;const{state:e}=Be(),{ICONS:t}=Me(),n=e!=null&&e.term&&e.term.length>0?`/${e.term}`:"",s=decodeURIComponent((a=e==null?void 0:e.base)!=null&&a.length?e.base:n??n).slice(1).split("/"),o=Bi(s);return r.jsx("div",{className:St["pcd-navigation--breadcrumb"],children:r.jsx(d.BreadCrumb.DivWrapper,{children:r.jsx(d.BreadCrumb.List,{children:Array.isArray(o)&&o.map((i,c)=>{var l,u;return g.createElement(x_,{...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," "))})})})})};vu.displayName="PLPNavigation.BreadCrumb";const bu=({children:e,...t})=>r.jsxs("div",{...t,className:St["pdc-navigation--content"],children:[r.jsx(ht.Filters,{}),e]});bu.displayName="PLPNavigation.Content";const v_="_sort_35wro_1",Kn={sort:v_,"sort-list-wrapper":"_sort-list-wrapper_35wro_8","sort-list":"_sort-list_35wro_8","sort-button":"_sort-button_35wro_25"},b_=({children:e,sortListOpen:t,btnAdornment:n,style:s,...o})=>r.jsx(d.Button,{...o,adornment:{end:t?n==null?void 0:n.listOpen:n==null?void 0:n.listClosed},size:"small",variant:"tertiary",style:{...s,textDecoration:"none"},className:Kn["sort-button"],children:e}),j_=e=>r.jsx(d.RadioButton.Radio,{...e}),C_=({children:e,className:t,name:n,...s})=>r.jsx(d.RadioButton.Group,{...s,name:n||"sort-group",className:d.helpers.classNameConcat(Kn["sort-list"],t),children:e}),S_=({children:e,className:t,shadow:n=!0,padding:s="small",height:o="fit-content",...a})=>r.jsx(d.Card,{...a,shadow:n,className:d.helpers.classNameConcat(Kn["sort-list-wrapper"],t),padding:s,height:o,children:e}),ju=g.forwardRef(({children:e,className:t,...n},s)=>r.jsx("div",{...n,ref:s,className:d.helpers.classNameConcat(Kn.sort,t),children:e}));ju.displayName="SortRoot";const Xn=({handleSelectValue:e,sortListOpen:t,setSortListOpen:n,searchParams:s,ICONS:o,...a})=>{var p;const i=(p=s==null?void 0:s.get("sort"))==null?void 0:p.replace(":","_"),[c,l]=g.useState(i),{sendDataLayerEvent:u}=ae();g.useEffect(()=>{l(i||void 0)},[i]);const{ref:m}=Pl(()=>n(!1)),f=h=>{const _=h.target.value;l(_),typeof e=="function"&&e(_),u({functionKey:"filterEvent",data:{customData:{ordering:Ht.options[_]}}}),n(!1)};return r.jsxs(ju,{...a,ref:m,children:[r.jsx(b_,{btnAdornment:{listOpen:r.jsx(d.Icon,{name:o.arrow_up,size:"small"}),listClosed:r.jsx(d.Icon,{name:o.arrow_down,size:"small"})},sortListOpen:t,onClick:()=>n(!t),children:c?Ht.options[c]:Ht.placeholder},"sort-button"),t&&r.jsx(S_,{children:r.jsx(C_,{name:"sort-group",value:c??"",onChange:f,children:Object.keys(Ht.options).map(h=>r.jsx(j_,{label:Ht.options[h],value:h},h))})})]})};Xn.displayName="Sort";const Cu=g.createContext({}),E_=({children:e,...t})=>{const[n,s]=g.useState(!1);return r.jsx(Cu.Provider,{value:g.useMemo(()=>({...t,openOrderBy:n,setOpenOrderBy:s}),[t,n,s]),children:e})},P_=()=>{const e=g.useContext(Cu);if(e===void 0)throw new Error("usePLPNavigationContext must be used within a PDCNavigationProvider");return e},Su=()=>{const{openOrderBy:e,onSort:t,setOpenFilters:n,setOpenOrderBy:s}=P_(),{ICONS:o,PDC_NAVIGATION:a,searchParams:i}=Me();return r.jsxs("div",{className:St["pdc-navigation--filters"],children:[r.jsx(ht.BreadCrumb,{}),r.jsxs("div",{className:St["pdc-navigation--filters--content"],children:[r.jsx(Xn,{handleSelectValue:c=>t(c??"release_desc"),sortListOpen:e,setSortListOpen:s,ICONS:o,searchParams:i}),r.jsx(d.Button,{adornment:{end:r.jsx(d.Icon,{name:o.arrow_down})},onClick:()=>n(!0),size:"small",variant:"tertiary",children:a.filter_button}),r.jsx(ht.Total,{})]})]})};Su.displayName="PLPNavigation.Filters";const Eu=({children:e,onSort:t,setOpenFilters:n,style:s,...o})=>{const a=g.useRef(null);return r.jsx(E_,{onSort:t,setOpenFilters:n,children:r.jsx("div",{...o,className:St["pdc-navigation"],ref:a,style:{...s},children:r.jsx(ht.Content,{children:e})})})};Eu.displayName="Root";const Pu=({callback:e,selected:t,...n})=>r.jsx("div",{...n,className:St["pdc-navigation--selected"],children:r.jsx("div",{className:St["pdc-navigation--selected--container"],children:Array.isArray(t)?t.map(s=>s.key==="productclusterids"?null:r.jsx(ht.SelectedItem,{callback:e,facet:s},s.value)):null})});Pu.displayName="PLPNavigation.Selected";const qs=({key:e,PLP_FILTERS:t})=>t.some(n=>n.key===e)?e==="cores-filtraveis":!1,Vs=({value:e,PLP_FILTERS_COLORS:t})=>{var n;return((n=t.find(s=>s.value===e))==null?void 0:n.color)??"#F2F2F2"},Nu=({key:e,PLP_FILTERS:t})=>{var n;return(n=t.find(s=>s.key===e))==null?void 0:n.label},Iu=({key:e,PLP_FILTERS:t})=>{var n;return((n=t.find(s=>s.key===e))==null?void 0:n.order)??0},os=({value:e})=>{const[t,n]=e.split(":").length===2?e.split(":"):[0,0],s=H.formatPriceToCurrency(Number(n));return`${H.formatPriceToCurrency(Number(t))} até ${s}`},wu=({items:e})=>{const t=e.flatMap(o=>[o.range.from,o.range.to]),n=Math.min(...t.map(Math.abs)),s=Math.max(...t.map(Math.abs));return[n,s]},Ru=Object.freeze(Object.defineProperty({__proto__:null,checkedColor:qs,createTagPrice:os,getAbsoluteMinMax:wu,getColor:Vs,getName:Nu,getOrder:Iu},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"},Tu=({columns:e=2,CONSTANTS:t,...n})=>{var a;const{filters:s,onToggleFacet:o}=$t();return r.jsxs("div",{...n,className:Ge["filter--modal--body--content"],children:[Array.isArray(s.facets)&&s.facets.map(i=>r.jsx(ct.Item,{columns:e,facet:i,onToggleFacet:o,CONSTANTS:t},i.key)),!((a=s.facets)!=null&&a.length)&&r.jsx(ct.Empty,{PLP_FILTERS_EMPTY:t.PLP_FILTERS_EMPTY})]})};Tu.displayName="Filter.Item.Content";const Au=({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})]})};Au.displayName="Filter.Empty";const ku=({columns:e,facet:t,onToggleFacet:n,CONSTANTS:s,...o})=>{const a=Iu({key:t.key,PLP_FILTERS:s.PLP_FILTERS}),i=()=>{if(t.__typename==="FacetBoolean"){if(t.key==="cores-filtraveis")return r.jsx(ct.Colors,{onToggleFacet:n,values:t.values,PLP_FILTERS:s.PLP_FILTERS,PLP_FILTERS_COLORS:s.PLP_FILTERS_COLORS});if(t.key==="tamanho")return r.jsx(ct.Sizes,{onToggleFacet:n,values:t.values,PLP_SIZE_ORDER:s.PLP_SIZE_ORDER});if(t.key==="category-2")return r.jsx(ct.Toggle,{columns:e,facetKey:t.key,onToggleFacet:n,values:t.values,ICONS:s.ICONS})}return t.__typename==="FacetRange"?r.jsx(ct.Price,{facet:t}):r.jsx("p",{children:"Filter not support!!!"})};return r.jsx("div",{...o,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:s.ICONS.arrow_up}),openIndicator:r.jsx(d.Icon,{name:s.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:Nu({key:t.key,PLP_FILTERS:s.PLP_FILTERS})})})})}),r.jsx(d.Accordion.Body,{children:i()})]})})};ku.displayName="Filter.Item";const Lu=({onToggleFacet:e,values:t,PLP_FILTERS:n,PLP_FILTERS_COLORS:s,...o})=>r.jsx(et.Root,{...o,children:r.jsx(et.List,{children:Array.isArray(t)&&t.map(({key:a,selected:i,value:c})=>r.jsx(et.Option,{active:i,"data-color":qs({key:a,PLP_FILTERS:n}),fill:Vs({value:c,PLP_FILTERS_COLORS:s}),onClick:()=>e({key:a,value:c}),type:"color"},`${a}-${c}`))})});Lu.displayName="Filter.Item.Color";const Ou=({facet:e,...t})=>{var u,m;const{filters:{selected:n},price:s,onToggleFacet:o}=$t(),[a,i]=(s==null?void 0:s.split(":").map(Number))??[0,100],[c,l]=((m=(u=n==null?void 0:n.find(({key:f})=>f==="price"))==null?void 0:u.value)==null?void 0:m.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:f=>{var p,h;f&&o({key:"price",value:`${(p=f.range)==null?void 0:p.min}:${(h=f.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})})})]})})};Ou.displayName="Filter.Item.Price";const Du=({onToggleFacet:e,values:t,PLP_SIZE_ORDER:n,...s})=>{const o=[...t].sort((a,i)=>{const c=n.indexOf(a.name),l=n.indexOf(i.name);return c-l});return r.jsx(et.Root,{...s,children:r.jsx(et.List,{children:Array.isArray(o)&&o.map(({key:a,selected:i,value:c})=>r.jsx(et.Option,{active:i,text:c,type:"size",onClick:()=>e({key:a,value:c})},c))})})};Du.displayName="Filter.Item.Sizes";const Mu=({columns:e,facetKey:t,onToggleFacet:n,values:s,ICONS:o,...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(s)&&s.map(i=>r.jsx(d.Checkbox,{label:(i==null?void 0:i.name)??"",adornment:r.jsx(d.Icon,{name:o.check}),checked:i.selected,onChange:()=>n(i)},i.value))})});Mu.displayName="Filter.Item.Toggle";const Fu=({...e})=>{const{isLoading:t}=$t();return r.jsx("div",{className:Ge["filter--loading"],"data-active":t,...e,children:r.jsx(d.Spinner,{indicatorColor:"#000",background:"#222"})})};Fu.displayName="Filter.Loading";const zu=({children:e,className:t,isMobile:n=!1,CONSTANTS:{PLP_FILTERS_TITLE:s,ICONS:o}})=>{var m;const{deleteAllFacets:a,filters:i,isOpen:c,target:l,setIsOpen:u}=$t();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:o.close,size:"small",variant:"tertiary",style:{marginLeft:"auto"}})}),r.jsx(d.Modal.Title,{navigation:"top",title:s})]}),r.jsxs(d.Modal.Body,{style:{width:500},children:[r.jsx("div",{className:Ge["filter--modal--body"],children:e}),r.jsx(ct.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:(m=i.facets)!=null&&m.length?"ver resultados":"fechar"}),r.jsx(d.Button,{"data-close":!0,onClick:()=>a(),variant:"tertiary",children:"limpar filtros"})]})})]})};zu.displayName="Filter.Modal";const Bu=({children:e,className:t,isMobile:n,CONSTANTS:s,...o})=>r.jsx(lc,{...o,PLP_FILTERS:s.PLP_FILTERS,children:r.jsx(ct.Modal,{className:t,isMobile:n,CONSTANTS:s,children:e})});Bu.displayName="Filter.Root";const Uu=({ICONS:e,PLP_FILTERS_COLORS:t,PLP_FILTERS:n})=>{const{filters:s,onToggleFacet:o}=$t();return r.jsx("div",{className:Ge["filter--selected"],children:r.jsx("div",{className:Ge["filter--selected--content"],children:Array.isArray(s.selected)&&s.selected.map(({key:a,value:i})=>a==="productclusterids"?null:r.jsx(d.Tag,{title:a==="price"?os({value:i}):i,adornment:{end:r.jsx(d.Icon,{name:e.close,size:"x-small"})},colorSquare:Vs({value:i,PLP_FILTERS_COLORS:t}),onClick:()=>o({key:a,value:i}),squareShow:qs({key:a,PLP_FILTERS:n}),size:"medium",variant:"primary",children:a==="price"?os({value:i}):i},i))})})};Uu.displayName="Filter.Selected";const ct={Colors:Lu,Content:Tu,Empty:Au,Modal:zu,Item:ku,Root:Bu,Loading:Fu,Selected:Uu,Price:Ou,Sizes:Du,Toggle:Mu},{checkedColor:N_,createTagPrice:Zo,getColor:I_}=Ru,$u=({callback:e,facet:t})=>{const{ICONS:n,PLP_FILTERS_COLORS:s,PLP_FILTERS:o}=Me();return r.jsx(d.Tag,{title:(t==null?void 0:t.key)==="price"?Zo({value:t.value}):t.value.toUpperCase(),adornment:{end:r.jsx(d.Icon,{name:n.close,size:"x-small"})},colorSquare:I_({value:t.value,PLP_FILTERS_COLORS:s}),onClick:()=>{typeof e=="function"&&e(t,!0)},squareShow:N_({key:t.key,PLP_FILTERS:o}),size:"medium",variant:"primary",children:(t==null?void 0:t.key)==="price"?Zo({value:t.value}):t.value.toUpperCase()})};$u.displayName="PLPNavigation.Selected.Item";const Hu=()=>r.jsx(d.TextStructure.Root,{children:r.jsx("p",{id:"pdc-navigation--total"})});Hu.displayName="PLPNavigation.Total";const ht={BreadCrumb:vu,Content:bu,Filters:Su,Root:Eu,Selected:Pu,SelectedItem:$u,Total:Hu},w_="_footer__bottom_198g6_2",R_="_footer__wrapper_198g6_10",T_="_footer__main_198g6_39",A_="_footer__legalInformation_198g6_55",k_="_footer__column_198g6_77",L_="_footer__columnContent_198g6_87",O_="_footer__item_198g6_91",D_="_footer__itemLink_198g6_107",M_="_footer__columnTitle_198g6_122",F_="_footer__columnTitleIcon_198g6_134",z_="_footer__iconList_198g6_147",B_="_footer__itemSmallText_198g6_157",U_="_payment_198g6_168",$_="_footer__iconContainer_198g6_173",H_="_footer__iconListSubHeader_198g6_178",q_="_accordionWrapper_198g6_200",V_="_accordionHeader_198g6_204",W_="_accordionTextWrapper_198g6_208",me={footer__bottom:w_,footer__wrapper:R_,footer__main:T_,footer__legalInformation:A_,footer__column:k_,footer__columnContent:L_,footer__item:O_,footer__itemLink:D_,footer__columnTitle:M_,footer__columnTitleIcon:F_,footer__iconList:z_,footer__itemSmallText:B_,payment:U_,footer__iconContainer:$_,footer__iconListSubHeader:H_,accordionWrapper:q_,accordionHeader:V_,accordionTextWrapper:W_,"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 qu={},Ws={},Yn={};(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=s=>{n.has(s)||console.warn(s),n.add(s)}}})(Yn);var Vu={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getImageBlurSvg",{enumerable:!0,get:function(){return t}});function t(n){let{widthInt:s,heightInt:o,blurWidth:a,blurHeight:i,blurDataURL:c,objectFit:l}=n;const u=20,m=a?a*40:s,f=i?i*40:o,p=m&&f?"viewBox='0 0 "+m+" "+f+"'":"",h=p?"none":l==="contain"?"xMidYMid":l==="cover"?"xMidYMid slice":"none";return"%3Csvg xmlns='http://www.w3.org/2000/svg' "+p+"%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"}})(Vu);var Qn={};(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 n},imageConfigDefault:function(){return s}});const n=["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}})(Qn);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getImgProps",{enumerable:!0,get:function(){return h}});const t=Yn,n=Vu,s=Qn,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 m(_){return typeof _>"u"?_:typeof _=="number"?Number.isFinite(_)?_:NaN:typeof _=="string"&&/^[0-9]+$/.test(_)?parseInt(_,10):NaN}function f(_,y,x){let{deviceSizes:b,allSizes:C}=_;if(x){const v=/(^|\s)(1?\d?\d)vw/g,P=[];for(let E;E=v.exec(x);E)P.push(parseInt(E[2]));if(P.length){const E=Math.min(...P)*.01;return{widths:C.filter(S=>S>=b[0]*E),kind:"w"}}return{widths:C,kind:"w"}}return typeof y!="number"?{widths:b,kind:"w"}:{widths:[...new Set([y,y*2].map(v=>C.find(P=>P>=v)||C[C.length-1]))],kind:"x"}}function p(_){let{config:y,src:x,unoptimized:b,width:C,quality:j,sizes:v,loader:P}=_;if(b)return{src:x,srcSet:void 0,sizes:void 0};const{widths:E,kind:S}=f(y,C,v),I=E.length-1;return{sizes:!v&&S==="w"?"100vw":v,srcSet:E.map((T,A)=>P({config:y,src:x,quality:j,width:T})+" "+(S==="w"?T:A+1)+S).join(", "),src:P({config:y,src:x,quality:j,width:E[I]})}}function h(_,y){let{src:x,sizes:b,unoptimized:C=!1,priority:j=!1,loading:v,className:P,quality:E,width:S,height:I,fill:T=!1,style:A,overrideSrc:k,onLoad:O,onLoadingComplete:Y,placeholder:D="empty",blurDataURL:U,fetchPriority:B,decoding:Q="async",layout:G,objectFit:$,objectPosition:J,lazyBoundary:se,lazyRoot:ce,...oe}=_;const{imgConf:le,showAltText:M,blurComplete:ee,defaultLoader:w}=y;let W,ie=le||s.imageConfigDefault;if("allSizes"in ie)W=ie;else{var _e;const X=[...ie.deviceSizes,...ie.imageSizes].sort((te,he)=>te-he),L=ie.deviceSizes.sort((te,he)=>te-he),z=(_e=ie.qualities)==null?void 0:_e.sort((te,he)=>te-he);W={...ie,allSizes:X,deviceSizes:L,qualities:z}}if(typeof w>"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 N=oe.loader||w;delete oe.loader,delete oe.srcSet;const R="__next_img_default"in N;if(R){if(W.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 X=N;N=L=>{const{config:z,...te}=L;return X(te)}}if(G){G==="fill"&&(T=!0);const X={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}},L={responsive:"100vw",fill:"100vw"},z=X[G];z&&(A={...A,...z});const te=L[G];te&&!b&&(b=te)}let Ie="",q=m(S),K=m(I),ge,Re;if(c(x)){const X=a(x)?x.default:x;if(!X.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(X));if(!X.height||!X.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(X));if(ge=X.blurWidth,Re=X.blurHeight,U=U||X.blurDataURL,Ie=X.src,!T){if(!q&&!K)q=X.width,K=X.height;else if(q&&!K){const L=q/X.width;K=Math.round(X.height*L)}else if(!q&&K){const L=K/X.height;q=Math.round(X.width*L)}}}x=typeof x=="string"?x:Ie;let je=!j&&(v==="lazy"||typeof v>"u");(!x||x.startsWith("data:")||x.startsWith("blob:"))&&(C=!0,je=!1),W.unoptimized&&(C=!0),R&&x.endsWith(".svg")&&!W.dangerouslyAllowSVG&&(C=!0),j&&(B="high");const ye=m(E);if(process.env.NODE_ENV!=="production"){if(W.output==="export"&&R&&!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(T){if(S)throw new Error('Image with src "'+x+'" has both "width" and "fill" properties. Only one should be used.');if(I)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 q>"u")throw new Error('Image with src "'+x+'" is missing required "width" property.');if(isNaN(q))throw new Error('Image with src "'+x+'" has invalid "width" property. Expected a numeric value in pixels but received "'+S+'".');if(typeof K>"u")throw new Error('Image with src "'+x+'" is missing required "height" property.');if(isNaN(K))throw new Error('Image with src "'+x+'" has invalid "height" property. Expected a numeric value in pixels but received "'+I+'".')}if(!o.includes(v))throw new Error('Image with src "'+x+'" has invalid "loading" property. Provided "'+v+'" should be one of '+o.map(String).join(",")+".");if(j&&v==="lazy")throw new Error('Image with src "'+x+`" has both "priority" and "loading='lazy'" properties. Only one should be used.`);if(D!=="empty"&&D!=="blur"&&!D.startsWith("data:image/"))throw new Error('Image with src "'+x+'" has invalid "placeholder" property "'+D+'".');if(D!=="empty"&&q&&K&&q*K<1600&&(0,t.warnOnce)('Image with src "'+x+'" is smaller than 40x40. Consider removing the "placeholder" property to improve performance.'),D==="blur"&&!U){const X=["jpeg","png","webp","avif"];throw new Error('Image with src "'+x+`" has "placeholder='blur'" property but is missing the "blurDataURL" property.
1
+ "use strict";var Cm=Object.defineProperty;var Sm=(e,t,n)=>t in e?Cm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var gt=(e,t,n)=>Sm(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),g=require("react"),F=require("./index-DyKuIyRP.js"),tt=require("idb-keyval"),Et=require("zustand"),qr=require("js-cookie"),d=require("@soma-vertical-web/core-components"),bt=require("axios"),Hr=require("@date-fns/tz"),wm=require("jose"),Mt=require("@soma-vertical-web/foundations"),js=require("react-dom"),Je=require("draft-js"),Ea=require("react-intersection-observer"),Cs=g.createContext({}),Pm=({data:e,children:t})=>r.jsx(Cs.Provider,{value:{tags:e==null?void 0:e.config},children:t}),_t=()=>{const{tags:e}=g.useContext(Cs),t=g.useCallback(n=>{var c,l,u,m;const s=(l=(c=e==null?void 0:e.commercial)==null?void 0:c.items)==null?void 0:l.find(f=>{var p;return(p=n??[])==null?void 0:p.find(h=>h.id===f.key)}),o=(m=(u=e==null?void 0:e.institucional)==null?void 0:u.items)==null?void 0:m.find(f=>{var p;return(p=n??[])==null?void 0:p.find(h=>h.id===f.key)}),a=e==null?void 0:e.flagPdp,i=(n==null?void 0:n.find(f=>{var p;return f.id===((p=e==null?void 0:e.flagGoldenPdp)==null?void 0:p.key)}))&&(e==null?void 0:e.flagGoldenPdp);return{commercial:s,institucional:o,flagPdp:a,flagGoldenPdp:i}},[e]);return{tags:e,getAvailableProductTag:t}},Na=({gridScrollBack:e})=>{g.useEffect(()=>{typeof window<"u"&&(e!=null&&e.refer)&&sessionStorage.setItem(e==null?void 0:e.refer,"true")},[])},Ia=g.createContext({}),Em=({children:e,gridScrollBack:t})=>{const n=g.useRef(null);return Na({gridScrollBack:t}),r.jsx(Ia.Provider,{value:{sizesContainerRef:n},children:e})},Ra=()=>{const e=g.useContext(Ia);if(e===void 0)throw new Error("useContext(PDPContext) must be used within a PDPProvider");return e},dt=({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:s,customData:o,promotionInfo:a,itemList:i,outsideEcommerceData:c}=e,{availableSizes:l,sizes:u,price:m}=s,f={...n==="view_item"?{currency:Se.configs.currency,value:m,grade_disponivel:l??(u?Ta(u):"")}:{},...n==="add_to_wishlist"||n==="remove_from_wishlist"?{value:m,currency:Se.configs.currency}:{}},p=dn({data:s,customData:{...o,...i,...a},configs:Se.configs});dt({event:n,data:{...c,ecommerce:{...i,...f,items:[p]}}}),typeof t=="function"&&t(p,f)},productListEvent:e=>{const{commonData:{products:t},promotionInfo:n,itemList:s,outsideEcommerceData:o,customData:a}=e;if(t.length===0)return;const i=t.map(({node:c},l)=>dn({data:{...c},customData:{...n,index:l,...a!=null&&a.item_list_name?{item_list_name:a==null?void 0:a.item_list_name}:s},configs:Se.configs}));dt({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:n},customData:s,supportData:{selectedSkus:o,price:a},promotionInfo:i,itemList:c,outsideEcommerceData:l}=e;let u=0;const m=n.map(f=>{var y,x,v,C,j,b,P,w,S;const p=o==null?void 0:o.find(E=>(f.productId??f.id)===E.productId);let h={...i,...c};if(p){const E=ka(),R=Oa(E,p);R&&(h={...h,...R}),t==="add_to_cart"&&(i||c)&&$r({persistedData:E,type:"add",sku:(p==null?void 0:p.id)??(p==null?void 0:p.sku),newData:{promotionInfo:i,itemList:c}}),t==="remove_from_cart"&&$r({persistedData:E,type:"remove",sku:(p==null?void 0:p.id)??(p==null?void 0:p.sku)})}u+=f.price??((v=(x=(y=p==null?void 0:p.offers)==null?void 0:y.offers)==null?void 0:x[0])==null?void 0:v.price)??0;const _=(p==null?void 0:p.size)??F.getColorAndSizeFromSkuName((p==null?void 0:p.skuName)??(p==null?void 0:p.name)??((C=f.itemOffered)==null?void 0:C.skuName),Se.configs.NAME_SPLIT_SYMBOL).size;return dn({data:f,customData:{...s,...h??{...i,...c},item_sku:(p==null?void 0:p.id)??(p==null?void 0:p.sku)??((j=f.itemOffered)==null?void 0:j.sku),quantity:(s==null?void 0:s.quantity)??f.quantity??1,item_variant2:_,seller_id:(p==null?void 0:p.sellerId)??(p==null?void 0:p.seller)??((S=(w=(P=(b=p==null?void 0:p.offers)==null?void 0:b.offers)==null?void 0:P[0])==null?void 0:w.seller)==null?void 0:S.identifier)??f.seller},configs:Se.configs})});dt({event:t,data:{...l,ecommerce:{value:a??u,currency:Se.configs.currency,items:m}}})},filterEvent:e=>{var i;const{commonData:t,customData:n,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 f;const u=((f=Se.configs.PLP_FILTERS.find(p=>p.key===c))==null?void 0:f.eventLabel)??c,m=(o==null?void 0:o[u])||[];u==="price_range"&&l.replace(":","-"),o[u]=[...m,l]}),Object.keys(o).forEach(c=>a[c]=o[c].join(", "))),dt({event:"filter",data:{...s,...a,...n}})},viewCartEvent:e=>{var m,f,p,h,_,y,x,v,C,j;const{commonData:t,outsideEcommerceData:n}=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:P,itemList:w}=a[b.id]??{};return dn({data:{...b,price:b.price/100,listPrice:b.listPrice/100},customData:{...P,...w,item_sku:b.id??b.itemOffered.sku,quantity:b.quantity??1},configs:Se.configs})}),c=(((m=s.totalizers.find(b=>b.name==="Total dos Itens"))==null?void 0:m.value)??0)/100,l=(((f=s.totalizers.find(b=>b.name==="Total dos Descontos"))==null?void 0:f.value)??0)/100,u=((p=s.marketingData)==null?void 0:p.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];dt({event:"view_cart",data:{...n,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:n}=e;dt({event:t,data:{...n}})}},Ta=e=>e.reduce((t,n)=>(n.available&&t.push(n.value),t),[]).toString(),Nm=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]}:{}}:{}}},dn=({data:e,customData:t,configs:n})=>({...Im(e,n==null?void 0:n.MAIN_IMAGE),...Rm(e),...Tm(e),...Am(e),...t}),Aa=()=>{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("_"))??[]:[]},ka=()=>{const e=window.localStorage.getItem("persistedCartEventsData");return e?JSON.parse(e):null},Oa=(e,t)=>e==null?void 0:e[t],$r=({persistedData:e,type:t,sku:n,newData:s})=>{if(!e&&t==="add"){window.localStorage.setItem("persistedCartEventsData",JSON.stringify({[n]:s}));return}if(e&&t==="add"){window.localStorage.setItem("persistedCartEventsData",JSON.stringify({...e,[n]:s}));return}e&&t==="remove"&&(delete e[n],window.localStorage.setItem("persistedCartEventsData",JSON.stringify(e)))},Im=(e,t="1")=>{var a,i,c,l,u,m,f,p,h,_,y;const n=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)??((f=(m=e.itemOffered)==null?void 0:m.isVariationOf)==null?void 0:f.productGroupID),item_ref:/_\d$/.test(n)?n.slice(0,-2):n,item_name:e.productTitle??e.productName??e.name??F.splitNameAndSizeFromFullName((p=e.itemOffered)==null?void 0:p.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)}},mo=e=>Array.isArray(e)?e.reduce((t,n)=>(n.length>t.length&&(t=n),t),""):e,Rm=e=>{var u,m;const{categories:t,categoriesIds:n}=e,s=t??((u=e.itemOffered)==null?void 0:u.categories),o=n??((m=e.itemOffered)==null?void 0:m.categoriesIds),a=mo(s),i=mo(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]}}},Tm=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:n,size:s}=F.getColorAndSizeFromSkuName(t,Se.configs.NAME_SPLIT_SYMBOL);return{item_variant:n,...e.itemOffered&&{item_variant2:s}}},Am=e=>{var l,u;const{price:t,listPrice:n,installments:s}=e,o=t??((l=e.offers)==null?void 0:l.lowPrice)??0,a=n??((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}},La=()=>{const[e,t]=Aa(),[n,s]=e.split("-"),o=n.includes("shop")||n.includes("sale")?n:"";return{page_category:o&&s?s:"",page_departament:o,id:t,name:e}},km=Object.freeze(Object.defineProperty({__proto__:null,eventsFunctions:Se,findDataInPersistedData:Oa,getAvailablesSizes:Ta,getCategories:Nm,getPageCategoryAndDepartmentFromSlug:La,getPersistedData:ka,getProductListInfoFromHead:Aa,pushDatalayer:dt,updatePersistedData:$r},Symbol.toStringTag,{value:"Module"})),Ma=g.createContext({}),Om=({children:e,evtFunctionsConfigs:t})=>{const n=g.useRef({}),s=g.useRef(null),o=g.useRef(null),a=g.useRef({}),i=g.useRef({trigger:!1,index:0}),c=({functionKey:m,data:f,callBack:p,timeout:h=100})=>{window.dataLayer||(window.dataLayer=[]),Se.configs=t;try{typeof Se[m]=="function"&&setTimeout(()=>{var _;f.promotionInfo=n.current,(_=o.current)!=null&&_.item_list_name&&(f.itemList=o.current),Se[m](f,p)},h)}catch(_){dt({event:"error_event",data:{error_message:(_==null?void 0:_.message)??_}})}},l=({content:m})=>{c({functionKey:"readyEvents",data:{event:"select_content",readyData:{content_type:m.replace("::",":")}}})},u=({updatePromotionRef:m,promotion:f,index:p})=>{m&&(n.current={...f}),c({functionKey:"readyEvents",data:{event:"select_promotion",readyData:{ecommerce:{...f,...p!==void 0&&{index:p}}}}})};return r.jsx(Ma.Provider,{value:{sendDataLayerEvent:c,triggerSelectItemEventRef:i,promotionEventRef:n,currentLocalRef:s,itemListRef:o,cartProductsFullDataRef:a,handleSelectContent:l,handleSelectPromotionEvent:u},children:e})},ae=()=>g.useContext(Ma),Da=g.createContext({}),Lm=({children:e,productData:t,isKit:n,PDP_INFO:s,NAME_SPLIT_SYMBOL:o,TEXTURE_IMAGE:a})=>{var M,q;const{sendDataLayerEvent:i,triggerSelectItemEventRef:c}=ae(),{productId:l,productName:u,items:m,items:[{images:f,Videos:p}],description:h,["Composição"]:_="",productReference:y,categories:[x]}=t,{getAvailableProductTag:v}=_t(),C=v(Object.entries(t.clusterHighlights).map(U=>({id:U[0],name:U[1]}))),j=x.slice(1,-1).split("/"),{installments:b,price:P,listPrice:w,sizes:S,allSizesAvailable:E}=F.getSkuInfos({items:m,NAME_SPLIT_SYMBOL:o}),R=F.getThumbImage({images:f,TEXTURE_IMAGE:a}),A=[{label:`${s.product.description}`,value:"description",content:h},{label:`${s.product.materiais}`,value:"composition",content:_}],O=((q=F.getColorAndSizeFromSkuName((M=t.items)==null?void 0:M[0].name,o))==null?void 0:q.color)??t["Cores Filtráveis"][0]??"",L=()=>({commonData:{...t,sizes:S,price:P,listPrice:w,installments:b},customData:{installments:b==null?void 0:b.count,installment_value:Number(b==null?void 0:b.value).toFixed(2)}}),X=({sku:U,size:Z})=>{const{commonData:K,customData:H}=L();i({functionKey:"productEvents",data:{event:"view_item",commonData:K,customData:{...H,...U&&{item_sku:U},...Z&&{item_variant2:Z}}}})};return g.useEffect(()=>{if(c.current.trigger){const{commonData:U,customData:Z}=L();i({functionKey:"productEvents",data:{event:"select_item",commonData:U,customData:{...Z,index:c.current.index}}}),c.current.trigger=!1}X({})},[]),r.jsx(Da.Provider,{value:{productData:t,productId:l,productName:u,productReference:y,tag:C,items:m,sizes:S,allSizesAvailable:E,installments:b,price:P,listPrice:w,thumbImage:R,images:f,video:p[0],descriptionContent:A,breadcrumbList:j,isKit:n,colorName:O,handleViewItemEvent:X},children:e})},Me=()=>{const e=g.useContext(Da);if(e===void 0)throw new Error("useContext(PDPDataContext) must be used within a PDPDataProvider");return e},Mm=()=>{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}}]},Fa=()=>{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)}},[])},Dm=typeof window>"u",Fm=(e,t)=>{const[n,s]=g.useState(()=>{if(Dm)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]),[n,a=>{s(i=>{const c=typeof a=="function"?a(i):a;return localStorage.setItem(e,JSON.stringify(c)),c})}]};function Ss(e,t,n){const[s,o]=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(()=>{o(l.isIntersecting),t&&l.isIntersecting&&c.unobserve(e.current)},n.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 Bn=({callback:e,onEnterViewportOnce:t,options:n})=>{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()))},n);return a.observe(o),()=>{t&&a.unobserve(o),a.disconnect()}},[e,t,n]),{element:s}},za=({defaultScale:e=1,maxScale:t=3})=>{const n=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||!n.current)return{minX:0,maxX:0,minY:0,maxY:0};const h=n.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}},m=(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})`})}},f=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)),P=Math.max(x,Math.min(v,j));if(h.touches.length>1){const w=h.touches[0],S=h.touches[1],E=w.pageX-S.pageX,R=w.pageY-S.pageY;i.current=Math.sqrt(E*E+R*R),c.current={x:(w.pageX+S.pageX)/2,y:(w.pageY+S.pageY)/2}}else h.touches.length===1&&(c.current={x:h.touches[0].pageX-b,y:h.touches[0].pageY-P})},[o,l]),p=g.useCallback(h=>{if(!s.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,P=C.pageY-j.pageY,w=Math.sqrt(b*b+P*P);if(!i.current){i.current=w;return}const S=w/i.current,E=Math.max(1,Math.min(t,o*S));if(o===E)return;a(E);const R=(C.pageX+j.pageX)/2,A=(C.pageY+j.pageY)/2;let O=R-c.current.x,L=A-c.current.y;O=Math.max(_,Math.min(y,O)),L=Math.max(x,Math.min(v,L)),l.current={x:O,y:L},i.current=w,m(O,L,E)}else if(h.touches.length===1){const C=h.touches[0].pageX,j=h.touches[0].pageY;let b=C-c.current.x,P=j-c.current.y;b=Math.max(_,Math.min(y,b)),P=Math.max(x,Math.min(v,P)),l.current={x:b,y:P},m(b,P,o)}},[t,o]);return g.useEffect(()=>(document.addEventListener("touchstart",f),document.addEventListener("touchmove",p,{passive:!1}),()=>{document.removeEventListener("touchstart",f),document.removeEventListener("touchmove",p)}),[p,f]),{containerRef:n,imgRef:s,scale:o}},zm={attachment:"ATTACHMENT",specification:"SPECIFICATION",attribute:"ATTRIBUTE"},Ve=Promise.resolve(!1),Vr={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:()=>({})},ws=e=>e===0,Ba=(e,t)=>{if(!e||e.length===0)return[];let n="";const s=[],o=e.match(/\d+/g)??[];for(const a of o){const i=t[Number(a)];i&&(n+=(n?"/":"")+i,s.push(n))}return s},Ua=(e,t)=>{const{availability:n,additionalInfo:{brandName:s},bundleItems:o,id:a,uniqueId:i,detailUrl:c,ean:l,imageUrl:u,name:m,listPrice:f,quantity:p,price:h,priceDefinition:_,productCategories:y,productCategoryIds:x,productId:v,refId:C,seller:j,referenceId:b,offerings:P,productRefId:w,skuName:S,sellingPrice:E}=e;return{availability:n,bundleItems:o,referenceId:b,productRefId:w,id:a,ean:l,uniqueId:i,itemOffered:{additionalProperty:[],brand:{name:s},categories:Ba(x,y),categoriesIds:x,gtin:C,image:[{alternateName:(t==null?void 0:t.MAIN_IMAGE)??"1",url:u}],name:m,isVariationOf:{name:m,productGroupID:v},sku:a,slug:c,skuName:S},listPrice:f,quantity:p,offerings:P,price:h,priceDefinition:_,sellingPrice:E,seller:j}},qa=(e,t)=>{const n=e.map(s=>({id:s.uniqueId,quantity:s.quantity,seller:s.seller}));return Array.isArray(t)?[...n,...t]:[...n,t]},Ha=(e,t)=>{const n=e.find(s=>s.id===t);if(n){const s=e.map((o,a)=>{var i,c;return{id:((i=o.itemOffered)==null?void 0:i.sku)??"",index:a,quantity:(n==null?void 0:n.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:[]}},$a=(e,t,n)=>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:n,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)??""}}),Wr=(e,t)=>e.filter(n=>n.availability!=="withoutStock").findIndex(({id:n})=>n===t),Bm=(e,t)=>{var n;return Array.isArray(e)?(((n=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:n.value)??0)/100:0},Um=e=>{const t=e.reduce((o,a)=>{const i=ws(a.price)?0:a.quantity;return o+i},0),n=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:n,subTotal:s}},qm=e=>Array.isArray(e)?e.filter(t=>t.availability!=="withoutStock").reduce((t,n)=>t+(ws(n==null?void 0:n.price)?0:n.quantity),0):0,Va=(e,t)=>{const{items:n,orderFormId:s,...o}=e;return{...o,id:s,items:Array.isArray(n)?n.map(a=>Ua(a,t)):[]}},Wa=(e,t)=>{const n=e.find(s=>s.id===t);return n?n.availability==="unavailableItemFulfillment":!1},Hm=(e,t)=>{const n=e.sku,s=e.isVariantOf.hasVariant.find(o=>o.sku===n);return s?s.name.split(t)[1]:"--"},kt=(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},$m=(e,t)=>{const n=new Set;return[e,...t].filter(s=>!n.has(s)&&n.add(s),n)},Ga=(e,t)=>t&&Array.isArray(t)&&t.find(s=>s.id===e)?Promise.resolve(e):Promise.resolve(!1),Ka=(e,t)=>t?Promise.resolve(e[t]):Promise.resolve(!1),Xa=async e=>{try{const t=await e();if(typeof t!="boolean")return t}catch(t){console.error(`[Error orderForm]: ${t}`)}return!1},Ya=(e,t)=>{if(t!==-1){const n=Number(e);return n?n+1:1}return e??1},Qa=(e,t)=>Array.isArray(e)?e.filter(n=>t==null?void 0:t.some(s=>s.id===n.id)):[],Za=async(e,t)=>e.then(n=>[...n??[],...t??[]]),ke=async(e,t,n,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 n?c:Va(c,s)})},Ja=(e,t,n)=>({notifications:[...e.notifications,{id:Date.now(),message:t,callback:n}]}),ei=e=>[...Array.isArray(e)?e:[e],"faststore"],ti=e=>{const t=e.get("utm_source")||xt("utm_source"),n=e.get("utm_campaign")||xt("utm_campaign"),s=e.get("utm_medium")||xt("utm_medium"),o=e.get("utmi_cp")||xt("utmi_cp"),a=e.get("utmi_pc")||xt("utmi_pc"),i=e.get("utmi_p")||xt("utmi_p");return{...t&&{utmSource:t},...s&&{utmMedium:s},...n&&{utmCampaign:n},...o&&{utmiCampaign:o},...a&&{utmiPart:a},...i&&{utmipage:i}}},xt=e=>{if(!e||typeof window>"u")return;const t=window.location.href;e=e.replace(/[[\]]/g,"\\$&");const n=new RegExp("[?&]"+e+"(=([^&#]*)|&|#|$)"),s=n.exec(t);return s?s[2]?decodeURIComponent(s[2].replace(/\+/g," ")):"":null},ni=(e,t,n="BR")=>{const s=t,o={country:n,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]},Vm=Object.freeze(Object.defineProperty({__proto__:null,VALUE_REFERENCES:zm,addItemOrder:qa,addNotification:Ja,createItemOrder:Ua,createNewAddress:ni,fetchCartAPI:ke,findItemIndex:Wr,findOptions:Qa,findTotalizerValue:Bm,getCategories:Ba,getCode:kt,getQuantity:Ya,getRemoveId:Ga,getSize:Hm,getTotalItems:qm,getTotalizer:Um,getUrlParameter:xt,getValue:Ka,initialState:Vr,isGift:ws,marketingTagsBuilder:ei,mergeOptionsPromise:Za,mountMarketingData:ti,orderFormValues:Va,promiseDefault:Ve,removeQuantity:Ha,updateItemSellerExternal:Wa,updateOrderFormPromise:Xa,updateQuantity:$a,wishlistArray:$m},Symbol.toStringTag,{value:"Module"})),Wm=()=>{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:_}}),s=async(h,_,y)=>ke("/api/checkout/order-form/items",{body:{orderFormId:h,orderItems:qa(_,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=Ha(_,y);return ke("/api/checkout/order-form/items/update",{body:{orderItems:x.updateItems,orderFormId:h}})},u=async(h,_,y,x,v,C,j)=>{var w,S;const b=j?{startDateUtc:(w=C==null?void 0:C.deliveryWindow)==null?void 0:w.startDate,endDateUtc:(S=C==null?void 0:C.deliveryWindow)==null?void 0:S.endDate}:null,P={logisticsInfo:Array.from({length:x},(E,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:{...P,orderFormId:h,country:y,postalCode:_}})},m=async(h,_,y)=>ke("/api/checkout/order-form/shipping/update",{body:{orderFormId:h,options:_,selectedAddresses:y}}),f=async(h,_,y,x)=>{const v=$a(_,y,x);return ke("/api/checkout/order-form/items/update",{body:{orderFormId:h,orderItems:v}})};return{addCoupon:e,addItem:s,addSellerCode:t,addMarketingData:n,giftItem:o,emptyCart:a,getOrderForm:i,insertProfileEmail:c,removeItem:l,shipping:u,shippingUpdate:m,updateItemQuantity:async(h,_,y,x,v)=>f(h,_,y,x).then(C=>C&&Array.isArray(C.items)?Wa(C.items,y)?f(h,_,y,v):C:!1)}},Gr="soma::cart",Vt="soma::options",Ct=Et.create((e,t)=>{const n=Wm(),s=async(o,a,i)=>{e({loading:!0});const c=await Xa(o);if(typeof c!="boolean"){e({...c});const l=await Za(tt.get(Vt),i);return tt.set(Vt,l),Ka(c,a).finally(()=>e({loading:!1,options:l}))}return Ve};if(typeof window<"u"){const o=async a=>{if(a){const i=await tt.get(Vt).then(u=>Qa(u,a.items));tt.set(Gr,a),tt.set(Vt,i),e({...a,options:i});const c=new URLSearchParams(window.location.search),l=c.get("utm_campaign")||c.get("utmi_campaign")||"";l&&s(()=>n.addSellerCode(t().id,l.toUpperCase()),"openTextField")}};return tt.get(Gr).then(a=>n.getOrderForm(a?a.id:"").then(o)),{...Vr,addCoupon:async a=>s(()=>n.addCoupon(t().id,a),"marketingData"),addItem:(a,i)=>{s(()=>n.addItem(t().id,t().items,a),"items",i)},addSellerCode:async(a,i)=>s(()=>n.addSellerCode(t().id,a,i,t().isOpen),"openTextField"),addMarketingData:async a=>s(()=>n.addMarketingData(t().id,a),"marketingData"),emptyCart:()=>{s(()=>n.emptyCart(t().id))},removeItem:async a=>{const i=await s(()=>n.removeItem(t().id,t().items,a),"items");return Ga(a,i)},shipping:async(a,i="BR")=>s(()=>n.shipping(t().id,a??"",i,t().items.length,ni(a??"",null,i)),"shippingData"),shippingUpdate:async a=>s(()=>{var i;return n.shippingUpdate(t().id,a,(i=t().shippingData)==null?void 0:i.selectedAddresses)},"shippingData"),toggleServiceToProduct:async(a,i,c)=>s(()=>n.giftItem(t().id,a,i,c),"items"),updateItemQuantity:async(a,i,c)=>{const{id:l,items:u}=t();return s(()=>{var m;return n.updateItemQuantity(l,u,a,i,((m=u.find(f=>f.id===a))==null?void 0:m.quantity)??1)},"items",c?[c]:void 0)},insertProfileEmail:async a=>s(()=>n.insertProfileEmail(t().id,a),"clientProfileData"),setIsOpen:a=>e({isOpen:a})}}return Vr}),Gm=()=>Ct(e=>e),ri=Et.create(e=>({notifications:[],actions:{addNotification:(t,n)=>e(s=>Ja(s,t,n)),removeNotification:t=>e(n=>({notifications:n.notifications.filter(s=>s.id!==t)}))}})),Ps=()=>ri(e=>e.notifications),Es=()=>ri(e=>e.actions),Km=Object.freeze(Object.defineProperty({__proto__:null,KEY_INDEXED_OPTIONS:Vt,KEY_INDEXED_STORE:Gr,useCartStore:Ct,useGetCartStoreState:Gm,useGetNotificationActions:Es,useGetNotificationsStore:Ps},Symbol.toStringTag,{value:"Module"})),Xm=6e3,si=g.createContext({}),oi=({children:e,...t})=>{const{items:n}=Ct(),[s,o]=g.useState([]),a=g.useRef(null),i=g.useMemo(()=>Array.isArray(s)&&s.length>0?s.map(c=>n.find(l=>l.id===c.id)).filter(c=>c!==void 0):[],[n,s]);return g.useEffect(()=>{s.length&&(clearTimeout(a.current??0),a.current=setTimeout(()=>{o([])},Xm))},[s]),r.jsx(si.Provider,{value:g.useMemo(()=>({...t,setRecentlyAdded:o,recentlyAddedProducts:i}),[t,o,i]),children:e})},en=()=>{const e=g.useContext(si);if(e===void 0)throw new Error("useUIContext must be used within a UIProvider");return e};class ai{constructor(){gt(this,"events",{});gt(this,"prevData",{})}subscribe(t,n){return this.events[t]||(this.events[t]=[]),this.events[t].push(n),()=>{this.events[t]=this.events[t].filter(s=>s!==n)}}publish(t,n){this.events[t]&&this.events[t].forEach(s=>{this.prevData[t]=n,s(n)})}}const ii=g.createContext({}),Ym=({children:e,headerConfigs:t,pathname:n,...s})=>{const[o,a]=g.useState(!0),[i,c]=g.useState(!1),l=n==="/",u=g.useRef(new ai),m=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},f=m(l),p=g.useRef(f);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=m(l);u.current.publish("header:change_variant",h.headerVariant),u.current.publish("header:change_position",h.position),p.current=h},[l]),r.jsx(ii.Provider,{value:{isMobile:o,mediatorRef:u,currentHeaderConfigsRef:p,deviceValidated:i,...s},children:r.jsx(oi,{children:e})})},ne=()=>g.useContext(ii),ci=g.createContext({}),Qm=({children:e,...t})=>r.jsx(ci.Provider,{value:{...t},children:e}),le=()=>g.useContext(ci),Nt=(e,t)=>Et.create(n=>{const s=()=>n({value:e});return t&&t instanceof Set&&t.add(s),{value:e,actions:{setValue:o=>n({value:o}),reset:s}}}),Qt={category:null,menuMobileIsOpen:!1,searchModalIsOpen:!1,userMenuIsOpen:!1},tn=new Set,Zm=()=>{tn.forEach(e=>{e()})},li=Et.create((e,t)=>{const n=()=>e({value:Qt.category});return tn.add(n),{value:Qt.category,actions:{reset:n,setValue:s=>e(()=>({value:s})),updateValue:s=>{t().value!==s&&e({value:s})}}}}),ui=()=>li(e=>e.value),nn=()=>li(e=>e.actions),di=Nt(Qt.menuMobileIsOpen,tn),mi=()=>di(e=>e.value),fi=()=>di(e=>e.actions),pi=Nt(Qt.searchModalIsOpen,tn),hi=()=>pi(e=>e.value),Un=()=>pi(e=>e.actions),_i=Nt(Qt.userMenuIsOpen,tn),Ns=()=>_i(e=>e.value),Is=()=>_i(e=>e.actions),Jm=Object.freeze(Object.defineProperty({__proto__:null,resetAllHeaderStores:Zm,useActionsHeaderCategory:nn,useActionsMenuMobileIsOpen:fi,useActionsSearchModalIsOpen:Un,useActionsUserMenuIsOpen:Is,useGetHeaderCategoryStore:ui,useGetMenuMobileIsOpen:mi,useGetSearchModalIsOpen:hi,useGetUserMenuIsOpen:Ns},Symbol.toStringTag,{value:"Module"})),zt={selectedSkuInfo:{productId:"",name:"",size:"",sku:"",sellerId:"",sellerName:"",available:!1,quantity:1},openLetMeKnow:!1,openMeasurements:!1,showBottomNavigation:!1,showNotify:!1},Bt=new Set,ef=()=>{Bt.forEach(e=>{e()})},gi=Et.create(e=>{const t=()=>e({value:zt.selectedSkuInfo});return Bt.add(t),{value:zt.selectedSkuInfo,actions:{setValue:n=>e(s=>({value:{...s,...n}})),reset:t}}}),rn=()=>gi(e=>e.value),yi=()=>gi(e=>e.actions),xi=Nt(zt.openLetMeKnow,Bt),tf=()=>xi(e=>e.value),nf=()=>xi(e=>e.actions),vi=Nt(zt.showNotify,Bt),bi=()=>vi(e=>e.value),Rs=()=>vi(e=>e.actions),ji=Nt(zt.showBottomNavigation,Bt),rf=()=>ji(e=>e.value),sf=()=>ji(e=>e.actions),Ci=Nt(zt.openMeasurements,Bt),Si=()=>Ci(e=>e.value),wi=()=>Ci(e=>e.actions),of=Object.freeze(Object.defineProperty({__proto__:null,resetAllPDPStores:ef,useActionsPDPOpenLetMeKnow:nf,useActionsPDPOpenMeasurements:wi,useActionsPDPSelectedSkuInfo:yi,useActionsPDPShowBottomNavigation:sf,useActionsPDPShowNotify:Rs,useGetPDPOpenLetMeKnow:tf,useGetPDPOpenMeasurements:Si,useGetPDPSelectedSkuInfo:rn,useGetPDPShowBottomNavigation:rf,useGetPDPShowNotify:bi},Symbol.toStringTag,{value:"Module"})),fo={feedback:{active:!1,action:"add"},list:[]},Ts=Et.create((e,t)=>({value:fo,actions:{reset:()=>e({value:fo}),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:""}}}))}})),Ut=()=>Ts(e=>e.value.list),As=()=>Ts(e=>e.value.feedback),It=()=>Ts(e=>e.actions),af=Object.freeze(Object.defineProperty({__proto__:null,useActionsWishlistStore:It,useGetWishlistFeedbackStore:As,useGetWishlistStore:Ut},Symbol.toStringTag,{value:"Module"})),Pi=g.createContext({}),cf=({children:e,headerData:t,...n})=>{var m,f;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(m=l.current)==null||m.subscribe("header:change_variant",p=>{var v,C,j;if(p&&u.current&&(u.current.bannerVariant=p),!s.current)return;const _=document.body.scrollTop>0,y=s.current.getAttribute("data-interactiveVariant"),x=_?y:p??((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))}),(f=l.current)==null||f.subscribe("header:change_position",p=>{s.current&&(s.current.style.position=p)}),g.useEffect(()=>{const p=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:p.signal});const _=y=>{var v;(v=y.target.closest("a"))==null||v.blur()};return s.current&&(s.current.addEventListener("click",_,{signal:p.signal}),s.current.addEventListener("touchend",_,{signal:p.signal})),()=>{p.abort()}},[]),r.jsx(Pi.Provider,{value:{headerData:t,structureRef:o,rootRef:s,tipbarRef:a,userMenuMobileRef:i,userMenuDesktopRef:c,...n},children:e})},Pe=()=>g.useContext(Pi),Ei=g.createContext({}),Ni=({children:e,...t})=>r.jsx(Ei.Provider,{value:g.useMemo(()=>t,[t]),children:e}),ks=()=>{const e=g.useContext(Ei);if(e===void 0)throw new Error("useMenuMobileContext must be used within a MenuMobileProvider");return e},lf=e=>{if(!e||typeof window>"u")return 0;const t=window.getComputedStyle(e);return parseInt(t.padding,10)},uf=(e,t,n)=>{if(!(e instanceof HTMLElement)||!(t instanceof HTMLElement))return{left:0,top:0};const s=t.getBoundingClientRect(),o=e.getBoundingClientRect(),a=e!=null&&e.parentElement?lf(e==null?void 0:e.parentElement):0;return{left:s.left+s.width/2-(o.width+a),top:s.top+s.height+n}},Ii=g.createContext({}),Ri=({children:e,delay:t=600,gap:n=20,...s})=>{const[o,a]=g.useState(!1),i=g.useRef(null),[c,l]=g.useState(!1),[u,m]=g.useState({left:0,top:0}),f=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 p=window.document.querySelector("#cart-button"),h=window.document.querySelector("#add-to-cart--tooltip");if(p&&h){const{left:_,top:y}=uf(h,p,n??0);m({left:_,top:y}),l(!1)}},[n,o]),r.jsx(Ii.Provider,{value:g.useMemo(()=>({...s,...u,handleClose:f,isLeaving:c,isOpen:o,setIsOpen:a,setIsLeaving:l}),[s,u,f,c,o,a,l]),children:e})},Rt=()=>{const e=g.useContext(Ii);if(e===void 0)throw new Error("useAddToCartContext must be used within a AddToCartProvider");return e},Ti=g.createContext({}),df=({children:e,SELLER_CODE_VALIDATION_KEYS:t,CARTPROVIDER_MESSAGE_PRODUCT_REMOVE:n,data:s,...o})=>{var se,ce,oe,ue;const a=Ct(),{setRecentlyAdded:i}=en(),c=g.useRef(""),l=Ps(),{addNotification:u,removeNotification:m}=Es(),[f,p]=g.useState(null),{addCoupon:h,addItem:_,addSellerCode:y,addMarketingData:x,emptyCart:v,isOpen:C,removeItem:j,shipping:b,shippingUpdate:P,toggleServiceToProduct:w,updateItemQuantity:S}=a;g.useEffect(()=>{(async()=>{var N,W;if(!a.id||!((W=(N=s==null?void 0:s.promotion)==null?void 0:N.promotionCart)!=null&&W.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());p(ee)})()},[a.id,a.items.length,s==null?void 0:s.versionId,(ce=(se=s==null?void 0:s.promotion)==null?void 0:se.promotionCart)==null?void 0:ce.idPromotion,(ue=(oe=s==null?void 0:s.promotion)==null?void 0:oe.promotionCart)==null?void 0:ue.versionAPI]),g.useEffect(()=>{const D=qr.get("lastMedias");if(a.id&&D&&c.current!==D){c.current=D;const ee=new URLSearchParams(D),N=ti(ee);x(N)}},[a,x]);const E=g.useCallback(async(D,ee)=>(ee==="coupon"?h(D):y(D,t??{})).then(W=>{if(typeof W!="boolean"&&W instanceof Object){if(ee==="seller"&&"value"in W){const{statusOk:ie,value:_e}=W,I=String(_e??"").split(" - ");return kt((I==null?void 0:I[0])??"",D,!!ie)}return kt(String(W.coupon),D,!0)}return kt("","")}).catch(()=>Promise.resolve({code:400})),[h,y]),R=g.useCallback((D,ee,N)=>{const{id:W}=D;S(W,ee,N)},[S]),A=g.useCallback((D,ee,N=!1)=>{if(!D)return;const{id:W}=D,ie=Wr(a.items,W);if(ie!==-1&&!N){const _e=Number(a.items[ie].quantity),I=a.items[ie]?_e+1:1;R(D,I,ee)}else _({id:W,quantity:(D==null?void 0:D.quantity)??1,seller:D.seller});C||i(_e=>[..._e,D])},[_,R,a.items,C,i]),O=g.useCallback((D,ee)=>{if(!D||!Array.isArray(D))return;i(W=>[...W,...D]);const N=D.map(W=>{const{id:ie,quantity:_e,seller:I}=W,T=Wr(a.items,ie),Te=Ya(_e??1,T);return{id:ie,quantity:Te,seller:I}});_(N,ee)},[_,a.items,i]),L=g.useCallback(async(D,ee,N)=>D?j(D).then(()=>(u(ee??`${n}`,N),kt(D,D))):Promise.resolve(kt("","Product id required")),[u,j]),X=g.useCallback(()=>{a.items.length>0&&v()},[v,a.items]),M=g.useCallback((D,ee="BRA")=>b(D,ee),[b]),q=g.useCallback(D=>{D&&P(D)},[P]),U=g.useCallback(async(D,ee,N=!1)=>{const W=a.items.findIndex(_e=>_e.uniqueId===D);return a.items[W]&&W>=0?w(ee,W,N):!1},[a.items,w]),Z=g.useCallback(async(D,ee)=>S(D,ee).then(N=>{if(Array.isArray(N)){const W=N.find(ie=>ie.id===D);if(W&&(W==null?void 0:W.quantity)<ee)return String(W.quantity)}return!1}),[S]),K=g.useCallback(async()=>{await x({...a.marketingData,coupon:""})},[x,a.marketingData]),H=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(Ti.Provider,{value:g.useMemo(()=>({...o,data:s,addCouponSeller:E,addToCart:A,addItemsToCart:O,cartStore:a,notifications:l,clearCart:X,addNotification:u,isOpen:a.isOpen,removeNotification:m,removeToCart:L,setIsOpen:a.setIsOpen,shipping:M,shippingUpdateOption:q,toggleGiftItemCart:U,updateItemQuantity:Z,removeCoupon:K,removeSellerCode:H,removeCEP:J,promotionRules:f,setPromotionRules:p}),[o,s,E,A,O,l,X,u,a,m,L,M,q,U,Z,K,H,J,f,p]),children:e})},ve=()=>{const e=g.useContext(Ti);if(e===void 0)throw new Error("useCartContext must be used within a CartProvider");return e},Ai=g.createContext({}),Os=({children:e,fetch:t})=>{const n=g.useRef(!0),[s,o]=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();o(u.data),n.current=!1}catch{n.current=!0,i(!0)}})()},[t]),r.jsx(Ai.Provider,{value:g.useMemo(()=>({data:s,isLoading:n.current??!1,isError:a}),[s,a,n]),children:e})},Ls=()=>{const e=g.useContext(Ai);if(e===void 0)throw new Error("useProductsContext must be used within a useRootContext");return e},ki=g.createContext({}),Ms=({children:e,sort:t,state:n,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=n.base)!=null&&u.length?n.base.slice(1).split("/").map((m,f)=>({key:`category-${f+1}`,value:m})):[]},[n.base,o]);return r.jsx(ki.Provider,{value:g.useMemo(()=>({state:{...n,facets:[...l,...n.facets??[]]},sort:t,count:s??c,searchParams:i}),[l,s,t,n,i]),children:e})},Be=()=>{const e=g.useContext(ki);if(e===void 0)throw new Error("useSearchContext must be used within a SearchProvider");return e},Oi=g.createContext({}),mf=({children:e,...t})=>r.jsx(Oi.Provider,{value:t,children:e}),Fe=()=>{const e=g.useContext(Oi);if(e===void 0)throw new Error("usePLPConstants must be used within a PLPConstantsProvider");return e},Li=g.createContext({}),ff=({children:e,selectedFacets:t})=>{const{data:n,...s}=Ls(),{router:o}=le(),{searchParams:a,PLP_SORT_DEFAULT:i}=Fe(),c=g.useCallback((p,h)=>{if(h){if(p.key.toLocaleLowerCase()==="price"){const _=h.getAll("facets");h.delete("facets"),_.forEach(y=>{const[x]=y.split("/");x!==p.key&&h.append("facets",y)})}h.set("page","1"),h.append("facets",`${p.key}/${p.value}`),o.push(`?${h.toString()}`)}},[o]),l=g.useCallback(()=>{const p=new URLSearchParams;p.set("sort",i),p.set("page","1"),o.push(`?${p.toString()}`)},[o]),u=g.useCallback((p,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!==p.key||v!==p.value)&&h.append("facets",y)}),o.push(`?${h.toString()}`)},[o]),m=g.useCallback(p=>{const h=a?new URLSearchParams(a):new URLSearchParams;for(const[,_]of h.entries()){const[y,x]=_.split("/");if(y===p.key&&x===p.value)return u(p,h)}return c(p,h)},[c,u,a]),f=g.useCallback(p=>{const h=a?new URLSearchParams(a):new URLSearchParams;h.set("sort",p.replace("_",":")),o.push(`?${h.toString()}`)},[o,a]);return r.jsx(Li.Provider,{value:g.useMemo(()=>({...s,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:m,onSort:f,searchParams:a}),[n,l,f,m,s,t,a]),children:e})},Mi=({children:e,forceUpdate:t})=>{const{state:n}=Be();return r.jsx(Os,{fetch:()=>fetch("/api/search/facets",{method:"POST",body:JSON.stringify({...n,forceUpdate:t}),priority:"low"}),children:r.jsx(ff,{selectedFacets:(n==null?void 0:n.facets)??[],children:e})})},Di=()=>{const e=g.useContext(Li);if(e===void 0)throw new Error("useFacetsContext must be used within a FacetsProvider");return e},$t={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"}},pf={nextPage:!1,previousPage:!1,startCursor:"0",endCursor:"0",count:0,total:0},hf="Imagem do produto",po=1,_f="Sair",gf=e=>e.exit,ho=({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"}],yf=(e,t)=>{const n=(t??"").split("@")[0];return e?`Olá${n.length?", ":" "}${n}!`:"Olá!"},xf=e=>"Seja bem vindo!",vf="Marque a caixa para aceitar os termos de política de privacidade.",bf="Algumas informações estão incorretas ou não foram preenchidas",jf="Enviar",Fi=g.createContext({}),Cf=({children:e})=>{const{data:t,...n}=Ls(),[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]),r.jsx(Fi.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:pf,total:s}),[t,n,s]),children:e})},Ds=({children:e,query:t,forceUpdate:n})=>{const{count:s,state:o}=Be(),a={...o,count:s};return r.jsx(Os,{fetch:()=>fetch("/api/search/product",{method:"POST",body:JSON.stringify({...a,query:t,forceUpdate:n,facets:o.facets??[]})}),children:r.jsx(Cf,{children:e})})},sn=()=>{const e=g.useContext(Fi);if(e===void 0)throw new Error("useProductsContext must be used within a ProductsProvider");return e},zi=g.createContext({}),Sf=({children:e,slug:t,searchParams:n,collectionId:s,brand:o,itemsPerPage:a=24,PLP_SORT_DEFAULT:i})=>{const{pathname:c}=le(),l=g.useRef(""),[u,m]=g.useState(!1),f=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"))??(s?"":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)},[s,c,n,t]),p=g.useMemo(()=>{if(Array.isArray(n==null?void 0:n.getAll("facets")))return F.parseSearchState(f,n.getAll("facets")??[""]);const h=(n==null?void 0:n.getAll("facets"))??[];return F.parseSearchState(f,h)},[f,n]);return g.useEffect(()=>{l.current!==c&&(l.current=c,window.document.body.scrollTo(0,0))},[c]),r.jsx(zi.Provider,{value:g.useMemo(()=>({openFilters:u,setOpenFilters:m}),[u,m]),children:r.jsx(Ms,{ITEMS_PER_PAGE:a,searchParams:n??new URLSearchParams,state:g.useMemo(()=>({...p}),[p]),collectionId:s,brand:o,children:e})})},Fs=()=>{const e=g.useContext(zi);if(e===void 0)throw new Error("usePLPContext must be used within a PLPProvider");return e},On=(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)=>On(o,t[a]));if(Array.isArray(t))return!1;const n=Object.keys(e),s=Object.keys(t);return n.length!==s.length?!1:n.every(o=>Object.prototype.hasOwnProperty.call(t,o)&&On(e[o],t[o]))},Bi=(e,t,n="page")=>Object.keys(t).some(s=>s===n?!1:!On(t[s],e[s])),Kr=async e=>{const t=await fetch("/api/search/product",{method:"POST",body:JSON.stringify(e),priority:"high"});if(!t.ok)throw new Error("[FAILED TO FETCH DATA]");const n=await t.json();return n==null?void 0:n.data},Ui=()=>({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}}}),qi=(e,t,n,s=24)=>{const o=new Set,a=[];if(!Array.isArray(e)||e.length===0)return{taken:o,placedBanners:a};const i=t*s*n;for(const c of e){let l=Number(c.position_grid),u=!1;for(;l<i;){const m=l%n;if(m+c.columns>n){l+=n-m;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}},Xr=(e,t,n,s=24)=>{const{placedBanners:o,taken:a}=qi(e??[],t,n),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}},Tn=(e,t,n=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:zs(),products:t!=null&&t.products.length&&e===a?t==null?void 0:t.products:Array.from({length:n},()=>Ui())}}),Hi=(e,t)=>[...e,{loading:!1,page:t,pagination:zs(),products:[]}],zs=()=>({nextPage:!1,previousPage:!1,startCursor:"0",endCursor:"1",count:1,total:1}),wf=(e,t,n,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=n[c];return t.filter((u,m)=>{const f=s[m];return f<=l||o>i&&f>l})},$i=(e,t)=>{const n=new Map;for(const o of e){const a=Math.floor(o/t);n.has(a)||n.set(a,[]),n.get(a).push(o)}const s=[];for(const[,o]of n){const a=o[Math.floor(Math.random()*o.length)];s.push(a)}return s},Vi=(e,t)=>{if(!e)return[];const n=e.map((s,o)=>s.video&&s.video!==""?o:null).filter(s=>s);return $i(n,t)},Wi=e=>Array.isArray(e)?e.map((t,n)=>({href:`/${e.slice(0,n+1).join("/")}`,name:t})):[],Pf=Object.freeze(Object.defineProperty({__proto__:null,createBreadcrumb:Wi,createPage:Hi,createPages:Tn,createPagination:zs,createProduct:Ui,deepEqual:On,fetchPage:Kr,getBanners:qi,getPositions:Xr,getProductsWithVideo:Vi,getRandomVideoPerRow:$i,getVisibleBanners:wf,hasStateChangedExceptPage:Bi},Symbol.toStringTag,{value:"Module"})),Ef=50,Nf=Et.create((e,t)=>{const n=i=>Math.min(i,Ef),s=async(i,c)=>{const l=n(i.page);try{const u=await Kr({...i,page:l});o(l,m=>c?c(m,u):{...m,...u})}catch(u){console.error(`[PDC - SCROLL INFINITE FAILED TO FETCH PAGE ${l}]: ${u}`),o(l,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)=>{await s(i,(l,u)=>(typeof c=="function"&&c(u),{...l,...u,loading:!0}))};return{banners:[],load:!1,pages:[],total:0,positions:[],products:[],createPages:async(i,c,l,u)=>{var f,p,h;const m=n(Number(i==null?void 0:i.page));e({...c,pages:Tn(m,void 0,u)});try{const _=await Kr({...i,page:m});if(_){if(!_.products.length&&((f=_==null?void 0:_.pagination)==null?void 0:f.total)<m){a({...i,page:(p=_==null?void 0:_.pagination)==null?void 0:p.total},l),e({pages:Tn((h=_==null?void 0:_.pagination)==null?void 0:h.total)});return}typeof l=="function"&&l(_),e({load:!0,pages:Tn(m,_),total:Number(_.pagination.count)})}}catch(_){console.error(`[PDC - SCROLL INFINITE TO CREATE PAGES]: page ${m} ${_}`)}},addPage:(i,c,l)=>{const{pages:u}=t(),m=n(i==null?void 0:i.page);u.some(f=>f.page===m)||(e({...c,pages:Hi(u,m)}),a(i,l))},updateProducts:(i,c)=>{const l=t().pages.find(u=>u.page===n(i==null?void 0:i.page));l!=null&&l.loading||a(i,c)}}}),If=(e,t,n,s=0)=>{if(!e.length)return[];let o=0;const a=[];for(let i=0;i<e.length;i+=n){const c=e.slice(i,i+n),l=c.findIndex(u=>{var m;return(m=u.node)==null?void 0:m.video});for(let u=0;u<c.length;u++){const m=i+u,f=s+m,p=t.find(_=>_.position_grid===f+1),h=f+o+1;p&&(o+=p.columns),a.push({position:h,canPlayVideo:u===l})}}return a},Gi=(e,t,n)=>{const s=(t-1)*n,o=t*n;return e>=s&&e<=o},qn=e=>{var t;return(t=e==null?void 0:e.map(n=>({disable:F.disableSKU(n),size:F.getSKUName(n),skuID:"sku"in n&&n.sku})))==null?void 0:t.filter(n=>n.disable)},Rf=Object.freeze(Object.defineProperty({__proto__:null,createGridPosAndVideo:If,getSkusNotify:qn,isPositionInCurrentPage:Gi},Symbol.toStringTag,{value:"Module"})),Ki=({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})]});Ki.displayName="Notify.Controls";const Ze={"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 Xi(e){const n=decodeURIComponent(window.document.cookie).split(";");for(const s of n){const[o,a]=s.trim().split("=");if(o===e)return a}}function Bs(e,t,n={}){const o={...{path:"/",expires:new Date(Date.now()+36e5)},...n};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 Yi=g.createContext({amount:null,boxes:null,toExpire:null,loading:!0,logout:()=>null,getCurrentCredits:()=>({credits:0,cashback:0})}),Tf=({children:e,AUTH_TOKEN_COOKIE:t})=>{var m;const{shipping:n,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(f=>f.json()).then(f=>{const{userCredits:p,userId:h,sub:_,...y}=f,{wishlist:x,...v}=y;a({amount:p==null?void 0:p.amount,boxes:p==null?void 0:p.boxes,toExpire:p==null?void 0:p.toExpire,user:{...v,userId:h,sub:_??""},loading:!1,wishlist:(typeof x=="string"?x.split(","):x)??[]})})}catch(f){console.error("user info and my credits request",f),a({...o,loading:!1})}},[a]),c=g.useCallback(()=>{Bs(t),i()},[i]),l=g.useCallback(()=>o.boxes?o.boxes.reduce((f,p)=>p.gift_card_box.refid==="C1643"?(f.cashback+=p.amount,f):(f.credits+=p.amount,f),{cashback:0,credits:0}):{cashback:0,credits:0},[o]),u=g.useCallback(async()=>{var f,p,h;if((f=o.user)!=null&&f.postalCode&&(s!=null&&s.id)&&!(s!=null&&s.loading)&&!((h=(p=s==null?void 0:s.shippingData)==null?void 0:p.address)!=null&&h.postalCode))try{await n(o.user.postalCode)}catch(_){console.error("Error auto-filling CEP:",_)}},[(m=o.user)==null?void 0:m.postalCode]);return g.useEffect(()=>{i()},[i]),g.useEffect(()=>{u()},[u]),r.jsx(Yi.Provider,{value:g.useMemo(()=>({...o,getCurrentCredits:l,logout:c}),[o,l,c]),children:e})},qt=()=>{const e=g.useContext(Yi);if(e===void 0)throw new Error("useContext(SessionContext) must be used within a SessionProvider");return e},Qi=({color:e,delay:t=3e3,sku:n,setStatus:s,setIsLoading:o,NEWSLETTER_CONFIGS:a,NOTIFY_INFO:i})=>{const c=g.useRef(null),[l,u]=g.useState(null),{sendDataLayerEvent:m}=ae(),{user:f}=qt(),p=f!=null&&f.firstName?`${f==null?void 0:f.firstName} ${f==null?void 0:f.lastName}`:"";return r.jsx("div",{className:Ze["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:p,email:y,sku:n==null?void 0:n.skuID})}).then(v=>s(v.ok)).finally(()=>{o(!1),_.reset(),m({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),s(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})]})})};Qi.displayName="Notify.Form";const Zi=({isLoading:e=!1})=>r.jsx("div",{className:Ze["notify--loading"],"data-loading":e,children:r.jsx(d.Spinner,{})});Zi.displayName="Notify.Loading";const Us={"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"},Ji=({children:e,...t})=>r.jsx("div",{...t,className:Us["product-variation-list--list"],children:e});Ji.displayName="ProductVariationList.List";const ec=({fill:e="#1352C7",src:t="",type:n="size",text:s,...o})=>{const{nextimage:a}=le();return n==="size"?r.jsxs(d.ToggleSize.Wrapper,{...o,size:"large",variation:"ghost",children:[r.jsx(d.ToggleSize.DisabledAdornment,{title:"disabled-adornment-size"}),r.jsx(d.ToggleSize.Text,{children:s})]}):r.jsxs(d.ToggleStyle.Wrapper,{...o,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:s??"image",height:40,src:t,width:40})})]})};ec.displayName="ProductVariationList.Option";const tc=({children:e,...t})=>r.jsx("div",{className:Us["product-variation-list"],...t,children:e});tc.displayName="ProductVariationList.Root";const nc=({children:e,title:t,...n})=>r.jsxs("div",{...n,className:Us["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]});nc.displayName="ProductVariationList.Title";const et={List:Ji,Option:ec,Title:nc,Root:tc},Af=(e,t)=>{if(!e||!t)return!1;const n=Object.keys(e);return n.length!==Object.keys(t).length?!1:n.every(s=>e[s]===t[s])},rc=({children:e,label:t="",skus:n,sku:s,setSku:o})=>r.jsxs(r.Fragment,{children:[r.jsx("div",{className:Ze["notify--selector--header"],children:e}),r.jsxs(et.Root,{className:Ze["notify--selector"],children:[r.jsx(et.Title,{title:t}),r.jsx(et.List,{children:Array.isArray(n)&&n.map((a,i)=>{const c=Af(s,a);return r.jsx(et.Option,{active:c,onClick:()=>o(c?null:a),text:String(a.size),type:"size"},i)})})]})]});rc.displayName="Notify.Selector";const _o=({type:e,icon:t,title:n,subtitle:s})=>r.jsx("div",{className:Ze[`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:s})]})})}),sc=({status:e,ICONS:t,PRODUCT_CARD_TEXTS:n})=>r.jsxs("div",{className:Ze["notify--status"],"data-status":e,children:[r.jsx(_o,{...n.success,icon:t.check_circle,type:"success"}),r.jsx(_o,{...n.error,icon:t.alert_circle,type:"error"})]});sc.displayName="Notify.Status";const qs=({color:e,open:t,setVisible:n,skus:s,sku:o,setSku:a,ICONS:i,NEWSLETTER_CONFIGS:c,NOTIFY_INFO:l,PRODUCT_CARD_TEXTS:u,Z_INDEX_WAR:m})=>{const[f,p]=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:m.modal},className:Ze["modal-modifier"],children:[r.jsx(d.Modal.Header,{navigation:"top",className:Ze["notify--header-modifier"],children:r.jsx(Ki,{isMobile:y??!1,ICONS:i,NOTIFY_INFO:l})}),r.jsxs(d.Modal.Body,{className:Ze["notify--modal--body"],children:[r.jsxs("div",{className:Ze["notify--container"],children:[r.jsxs(rc,{label:l.selector_label,sku:o,skus:s,setSku:a,children:[r.jsx("p",{children:l.subtitle}),r.jsx("span",{children:l.description})]}),r.jsx(Qi,{delay:4e3,sku:o,setStatus:_,setIsLoading:p,color:e,NEWSLETTER_CONFIGS:c,NOTIFY_INFO:l}),r.jsx(Zi,{isLoading:f}),r.jsx("div",{className:Ze["notify--selector--header"],children:r.jsx("span",{children:l.legal})})]}),r.jsx(sc,{status:h,ICONS:i,PRODUCT_CARD_TEXTS:u})]})]})};qs.displayName="Notify";const Hn=({skus:e,ICONS:t,NEWSLETTER_CONFIGS:n,NOTIFY_INFO:s,PRODUCT_CARD_TEXTS:o,Z_INDEX_WAR:a,...i})=>{const c=qn(e??[]);return r.jsx(qs,{skus:c,ICONS:t,NEWSLETTER_CONFIGS:n,NOTIFY_INFO:s,PRODUCT_CARD_TEXTS:o,Z_INDEX_WAR:a,...i})};Hn.displayName="PDC.Notification";const oc=g.createContext({}),ac=({banners:e,children:t})=>{const{searchParams:n,ITEMS_PER_PAGE:s,ICONS:o,NEWSLETTER_CONFIGS:a,NOTIFY_INFO:i,PRODUCT_CARD_TEXTS:c,Z_INDEX_WAR:l}=Fe(),{router:u}=le(),{sendDataLayerEvent:m}=ae(),{isMobile:f}=ne(),{state:p}=Be(),{addPage:h,createPages:_,updateProducts:y,...x}=Nf(),v=f?8:16,C=f?2:4,j=g.useRef(!1),b=g.useRef(p),[P,w]=g.useState(!1),[S,E]=g.useState(null),[R,A]=g.useState([]),O=g.useCallback(U=>{U&&"pagination"in U&&m({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:U.products}}})},[m]),L=g.useCallback(U=>{if(U.pagination.nextPage===!0){const Z=U.page+1,K=Xr(e,Z,C,s);h({...p,page:Z},K,O)}},[h,e,O,C,s,p]),X=g.useCallback(U=>{U.loading===!1&&y({...p,page:U.page},O)},[O,y,p]),M=g.useCallback(U=>{const Z=new URLSearchParams(n);U.page!==Number(Z.get("page")??1)&&(Z.set("page",String(U.page)),u.replace(`?${Z.toString()}`,{scroll:!1}))},[u,n]),q=g.useCallback((U,Z)=>{const K=Z?qn([Z]):null;A(U),E(K!=null&&K.length?K[0]:null),w(!0)},[]);return g.useEffect(()=>{const U=!j.current,Z=Bi(b.current,p),K=Xr(e,p.page,C);U?_(p,K,O,s):Z&&(_(p,K,O,s),b.current=p),j.current=!0},[e,_,O,C,s,p]),r.jsxs(oc.Provider,{value:g.useMemo(()=>({...x,addPage:h,addNewPage:L,createPages:_,gap:v,columns:C,handleNotify:q,updatePage:X,updateProducts:y,updateParamPage:M}),[h,L,_,q,v,C,x,X,y,M]),children:[t,r.jsx(Hn,{open:P,sku:S,skus:R,setSku:E,setVisible:w,ICONS:o,NEWSLETTER_CONFIGS:a,NOTIFY_INFO:i,PRODUCT_CARD_TEXTS:c,Z_INDEX_WAR:l})]})},lt=()=>{const e=g.useContext(oc);if(e===void 0)throw new Error("PLPInfiniteScrollContext must be used within a ScrollInfiniteProvider");return e},ic=g.createContext({gridBanners:void 0,banners:[]}),kf=({children:e,data:t,device:n,SectionZone:s,COMMON_PAGE_COLUMN_GAP_PDC:o})=>{const{isMobile:a}=ne(),i=(t==null?void 0:t.sections.filter(f=>f.name!=="List Product Banners"))??[],c=i.slice(0,po),l=i.slice(po,i.length),u=t==null?void 0:t.sections.find(f=>f.name==="List Product Banners"),m=g.useMemo(()=>{var f,p;return((p=(f=u==null?void 0:u.data)==null?void 0:f.banners)==null?void 0:p.map(h=>({...h.banner,columns:h.bannerWidth,position_grid:h.bannerPosition})))??[]},[u]);return a&&n==="mobile"||!a&&n==="desktop"?r.jsxs(ic.Provider,{value:{gridBanners:u,banners:m},children:[r.jsx(s,{data:c??[]}),r.jsxs(d.Utils.Column,{gap:o,className:d.helpers.classNameConcat("utils-column-modifier"),children:[e,r.jsx(s,{data:l??[]})]})]}):r.jsx(r.Fragment,{})},$n=()=>{const e=g.useContext(ic);return e===void 0&&console.error("Needs PLPContentContext on parent component"),e},cc=g.createContext({}),lc=({children:e,filters:t,PLP_FILTERS:n,...s})=>{var a;const o=(a=t.facets)==null?void 0:a.filter(i=>n.find(c=>c.key===i.key));return r.jsx(cc.Provider,{value:g.useMemo(()=>({...s,filters:{...t,facets:o}}),[t,o,s]),children:e})},Ht=()=>{const e=g.useContext(cc);if(e===void 0)throw new Error("useFilterContext must be used within a FilterProvider");return e},uc=g.createContext({product:void 0}),Of=({children:e,data:t,productId:n,COMMON_PAGE_COLUMN_GAP:s,SectionZone:o})=>r.jsxs(uc.Provider,{value:{productId:n},children:[e,r.jsx(d.Utils.Column,{gap:s,className:d.helpers.classNameConcat("utils-column-modifier"),children:r.jsx(o,{data:(t==null?void 0:t.sections)??[]})})]}),dc=()=>{const e=g.useContext(uc);return e||console.error("use this hook only inside PDPContentProvider hierarchy"),e},Yr=e=>e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/\s+/g,"-").toLowerCase().trim();function Lf(e,t=1e3){let n=!1;return(...s)=>{n||(e(...s),n=!0,setTimeout(()=>{n=!1},t))}}function Mf(e,t=1e3){let n;return(...s)=>{clearTimeout(n),n=setTimeout(()=>{e(...s)},t)}}const mc=(e,t)=>t.getTime()>e.getTime()?Math.abs(t.getTime()-e.getTime()):0,Wt=(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),Df=e=>{const t=wm.decodeJwt(e??"");return{email:t.sub,userId:t.userId}},Ff=["name","email","phone","date","cpf","cep"],go={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}$/},fc=({type:e,input:t,required:n=!1})=>{if(typeof t!="string"||!n&&t===""||!go[e])return!0;const s=t.trim();return go[e].test(s)},zf=e=>{const t=/\/(\d+)-\d+-\d+\/(.+?)\./,n=typeof e=="string"?e.match(t):null;return n?n[2].replace(/-/g," "):hf},Bf=Object.freeze(Object.defineProperty({__proto__:null,FieldTypes:Ff,debounce:Mf,getAltTextFromUrl:zf,getAuthenticatedUser:Df,getCookie:Xi,getDaysHoursMinutesSeconds:Wt,getMilliSeconds:mc,removeAccentsAndReplaceSpaces:Yr,setCookie:Bs,throttle:Lf,validateInput:fc},Symbol.toStringTag,{value:"Module"})),Uf=({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}},qf=({formData:e,mountedFields:t,inputsStatus:n,hasTermsAndConditions:s,checkboxRef:o,setFormStatus:a})=>{let i=!1,c=!1;const l={...n};return s&&!o.current&&(a("unchecked"),i=!0),e.forEach((u,m)=>{var h;if(m==="terms-and-conditions")return;const f=(h=t[m])==null?void 0:h.required;if(f&&!u){l[m]="required",i=!0;return}fc({type:t[m].type,input:u,required:f})||(l[m]="error",c=!0),typeof u=="string"&&e.set(m,u.toString().trim())}),{hasEmptyFields:i,hasErrors:c,inputStatusToUpdate:l}},pc=g.createContext({}),hc=({children:e,masterDataEmailField:t,fields:n,variant:s,CONSTANTS:{MASTER_DATA_ENTITY:o,NEWSLETTER_CONFIGS:a}})=>{const{sendDataLayerEvent:i}=ae(),c=a.hasTermsAndConditions,{mountedFields:l,mountedInputsStatus:u}=g.useMemo(()=>Uf({fields:n}),[n]),m=g.useRef(!1),[f,p]=g.useState("idle"),[h,_]=g.useState(u),y=async({searchFields:w,entity:S})=>{const E=await bt.post("/api/master-data/search",{body:{masterDataEntity:S,searchFields:w,headers:{"REST-Range":"resources=0-49"}}});return console.info(E),E.data},x=async({documentId:w,fieldsToBeUpdated:S,entity:E})=>(await bt.post("/api/master-data/update",{dataEntityName:E,documentId:w,fieldsToBeUpdated:S})).status,v=g.useCallback(async({payload:w,response:S},E,R)=>{var M;const{email:A,...O}=w,[L]=await y({searchFields:{[E]:A},entity:R??o.newsletter}),X=Array.isArray(L)?(M=L[0])==null?void 0:M.id:void 0;return L&&await x({documentId:X,fieldsToBeUpdated:O,entity:R??o.newsletter})!==204?{...S,status:"error"}:{...S,status:"success"}},[]),C=g.useCallback(async({formData:w},S,E)=>{const R={status:"idle",inputsStatus:{}},A={};w.forEach((O,L)=>{A[L]=O});try{const L=(await bt.post("/api/master-data",{body:{payload:A,masterDataEntity:S??o.newsletter}})).data;return(L==null?void 0:L.Message)==="duplicated entry"?v({payload:A,response:R},E,S):L!=null&&L.Id?{...R,status:"success"}:{...R,status:"error"}}catch(O){return console.error("error",O),{...R,status:"error"}}},[v]),j=g.useCallback(async(w,S,E)=>{w.preventDefault();const R=new FormData(w.target);if(R.append("acceptedTerms",m.current?"true":"false"),m.current){const O=new Hr.TZDate(new Date,"America/Sao_Paulo").toISOString();R.append("termsAcceptedAt",O)}S&&Object.keys(S).forEach(O=>{R.append(O,S[O])});const A=await C({formData:R},E??"",t);A&&(p(A==null?void 0:A.status),_(A.inputsStatus),A.status==="success"&&i({functionKey:"readyEvents",data:{event:"generate_lead"}}))},[t,C,p,_,i]),b=g.useCallback(w=>{const S=new FormData(w.currentTarget.parentElement),{hasEmptyFields:E,hasErrors:R,inputStatusToUpdate:A}=qf({formData:S,mountedFields:l,inputsStatus:h,hasTermsAndConditions:c,checkboxRef:m,setFormStatus:p});if(_(A),E||R){w.preventDefault();return}p("loading")},[l,h,c,m]),P=g.useCallback(()=>{p("idle"),_(u)},[u]);return r.jsx(pc.Provider,{value:g.useMemo(()=>({formStatus:f,handleSubmit:j,setFormStatus:p,inputsStatus:h,setInputsStatus:_,hasTermsAndConditions:c,handleClickToSubmit:b,checkboxRef:m,masterDataEmailField:t,fields:n,variant:s,resetNewsletter:P}),[f,j,p,h,_,b,c,m,t,n,s,P]),children:e})},Hs=()=>{const e=g.useContext(pc);if(e===void 0)throw new Error("useNewsletterContext must be used within a NewsletterProvider");return e},_c=g.createContext({}),gc=({children:e,data:t})=>{const[n,s]=g.useState(),[o,a]=g.useState(),i=g.useCallback(u=>{const m=t.filter(f=>f.cidade===u);s(m)},[t]),c=g.useCallback(u=>{a(u)},[]),l=g.useCallback(()=>{a("")},[]);return r.jsx(_c.Provider,{value:g.useMemo(()=>({clearSelectedStore:l,data:t,handleSelectCity:i,handleSelectStore:c,selectedCity:n,selectedStore:o}),[l,t,i,c,n,o]),children:e})},Vn=()=>{const e=g.useContext(_c);if(e===void 0)throw new Error("useLPStoreContext must be used within a LPStoreProvider");return e},yc={contexts:{addToCart:{hook:Rt,provider:Ri},cart:{hook:ve,provider:df},cms:{FlagsAndTags:{context:Cs,hook:_t,provider:Pm}},newsletter:{hook:Hs,provider:hc},events:{hook:ae,provider:Om},global:{hook:ne,provider:Ym,mediator:ai},header:{hook:Pe,provider:cf},menuMobile:{hook:ks,provider:Ni},next:{hook:le,provider:Qm},pdp:{provider:Em},PDPContent:{provider:Of,hook:dc},plp:{provider:Sf,hook:Fs},plpFilter:{hook:Ht,provider:lc},PLPContent:{provider:kf,hook:$n},plpInfinite:{provider:ac,hook:lt},pdpdata:{provider:Lm},searchFacets:{hook:Di,provider:Mi},searchProducts:{hook:sn,provider:Ds},searchRoot:{hook:Ls,provider:Os},searchSearch:{hook:Be,provider:Ms},session:{hook:qt,provider:Tf},ui:{hook:en,provider:oi},lpStore:{hook:Vn,provider:gc}},hooks:{useBackPDC:Na,useClipboard:Mm,useDisableZoom:Fa,useLocalStorage:Fm,useOnScreen:Ss,useSentinel:Bn,useTouchZoomPan:za},stores:{cart:Km,header:Jm,pdp:of,wishlist:af}},Hf={cart:Vm,events:km,plp:Pf,product:F.productHelpers,utils:Bf},$s={helpers:Hf},$e={"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"},xc=({brand:e,className:t,name:n,...s})=>r.jsxs("div",{...s,className:d.helpers.classNameConcat($e["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})})})]});xc.displayName="AddToCart.Card.Name";const vc=({className:e,listPrice:t,price:n,quantity:s,productId:o,...a})=>{const i=F.formatPriceToCurrency(n/100),c=F.formatPriceToCurrency(t/100);return r.jsx("div",{...a,className:d.helpers.classNameConcat($e["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")})})})})};vc.displayName="AddToCart.Card.PriceQuantity";const $f="_skeleton_12b79_1",Vf={skeleton:$f},bc=({style:e})=>r.jsx("div",{style:e,className:Vf.skeleton}),Wf="_image_1y08u_1",Gf={image:Wf},Kf=({alt:e,className:t,objectFit:n,...s})=>{const{nextimage:o}=le();return r.jsx(o,{quality:90,...s,alt:e??"",className:d.helpers.classNameConcat(Gf.image,t),"data-object-fit":n??"cover"})},Xf=({videoRef:e,...t})=>r.jsx("video",{...t,ref:e,children:r.jsx("track",{kind:"captions"})}),Ne={Image:Kf,Video:Xf},jc=({className:e,productGroupID:t,size:n,texture:s,...o})=>{const{CONSTANTS:{TEXTURE_IMAGE:a,TOGGLE_STYLE_MODIFIER:i}}=Rt(),[c,l]=g.useState(s??"");return g.useEffect(()=>{c||fetch("/api/catalog/product/info",{method:"POST",priority:"low",body:JSON.stringify({ids:[t]})}).then(u=>u.json()).then(u=>{const m=u.data[0].items[0];if(m){const f=m.images.find(p=>a.includes(p.imageLabel));f!=null&&f.imageUrl?l(f.imageUrl):l(m.images[0].imageUrl)}}).catch(u=>{console.error(u)})},[c,t]),r.jsxs("div",{...o,className:d.helpers.classNameConcat($e["add-to-cart--card--style-size"],e),children:[r.jsx(d.ToggleStyle.Wrapper,{size:"x-small",style:i,children:r.jsx(d.ToggleStyle.Texture,{children:c?r.jsx(Ne.Image,{alt:"",src:c??"",width:164,height:164,style:i}):r.jsx(bc,{})})}),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})]})]})};jc.displayName="AddToCart.Card.StyleSize";const{helpers:Yf}=$s,Cc=({className:e,item:t,texture:n,...s})=>{const{itemOffered:{name:o,brand:a,skuName:i,isVariationOf:{productGroupID:c}},quantity:l,price:u,sellingPrice:m}=t,{CONSTANTS:{NAME_SPLIT_SYMBOL:f}}=Rt(),{size:p}=Yf.product.getColorAndSizeFromSkuName(i??o,f);return r.jsxs("div",{...s,className:d.helpers.classNameConcat($e["add-to-cart--card--content"],e),children:[r.jsx(xc,{brand:a.name,name:o}),r.jsx(vc,{price:u,listPrice:m,quantity:l,productId:t.id}),r.jsx(jc,{size:p,texture:n,productGroupID:c})]})};Cc.displayName="AddToCart.Card.Content";const Sc=({image:e,thumbnail:t=!1})=>r.jsx(Ne.Image,{alt:e.alternateName??"image","data-thumbnail":t,height:t?152:120,src:e.url,width:t?152:94});Sc.displayName="AddToCart.Card";const wc=({className:e,item:t,texture:n,thumbnail:s,...o})=>{const{itemOffered:{image:[a]}}=t,i=F.updatedResizedImg(a.url,{width:200,height:300});return r.jsxs("div",{...o,className:d.helpers.classNameConcat($e["add-to-cart--card"],e),children:[r.jsx(Sc,{image:{alternateName:a.alternateName||"Produto",url:i||""},thumbnail:s}),!s&&r.jsx(Cc,{item:t,texture:n})]})};wc.displayName="AddToCart.Card";const Pc=({className:e,children:t,title:n,...s})=>r.jsxs("div",{...s,className:d.helpers.classNameConcat($e["add-to-cart--content"],e),children:[r.jsx("div",{className:$e["add-to-cart--content--title"],children:n&&r.jsx("h2",{children:n})}),t,r.jsx(jt.Footer,{})]});Pc.displayName="AddToCart.Layout.Content";const Ec=({className:e,...t})=>{var h,_;const{isMobile:n,handleClose:s,CONSTANTS:{ADD_TO_CART:o}}=Rt(),{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"),f=(l-Math.abs(c??0)+((u==null?void 0:u.value)??0))/100,p=F.formatPriceToCurrency(f??0);return r.jsxs("div",{...t,className:d.helpers.classNameConcat($e["add-to-cart--footer"],e),children:[r.jsxs("div",{className:$e["add-to-cart--footer--total"],children:[r.jsx("span",{children:"Subtotal:"}),r.jsx("span",{children:p})]}),r.jsx(d.Button,{size:"medium",variant:"primary","data-close":!0,onClick:()=>i(!0),children:o.footer.bag}),n?r.jsx(d.Button,{"data-close":!0,size:"medium",variant:"tertiary",children:o.footer.keep_buying}):r.jsx(d.Button,{onClick:()=>s(),size:"medium",variant:"tertiary",children:o.footer.keep_buying})]})};Ec.displayName="AddToCart.Layout.Footer";const Nc=({children:e,className:t,thumbnail:n=!1,...s})=>{const{cartStore:{options:o}}=ve(),{recentlyAddedProducts:a}=en(),i=a.length>3?4:a.length;return r.jsxs("div",{...s,className:$e["add-to-cart--items"],"data-thumbnail":n,children:[Array.isArray(a)&&a.filter((c,l)=>l<i).map(c=>{var u;const l=(u=o==null?void 0:o.find(m=>m.id===c.itemOffered.isVariationOf.productGroupID))==null?void 0:u.texture;return r.jsx(jt.Card,{item:c,thumbnail:n,texture:l},c.itemOffered.sku)}),e]})};Nc.displayName="AddToCart.Layout.Items";const Ic=({children:e,Z_INDEX_WAR:t})=>{const{isOpen:n,setIsOpen:s}=Rt(),{isMobile:o}=ne();return r.jsxs(d.Modal.Root,{"data-modal":"add-to-cart--modal",className:$e["add-to-cart__modal"],isMobile:o??!1,isOpen:n,setIsOpen:s,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})]})};Ic.displayName="AddToCart.Modal";const Qf=({children:e})=>{const{count:t,handleClose:n,setIsOpen:s}=Rt(),o=g.useRef(t);return g.useEffect(()=>{t>o.current&&s(!0),t<o.current&&o.current>=1&&n(),o.current=t},[t,n,s]),r.jsx(r.Fragment,{children:e})},Rc=({children:e,component:t,CONSTANTS:n,...s})=>{const{recentlyAddedProducts:o}=en(),{isMobile:a}=ne(),i=o.length>3?4:o.length;return r.jsx(Ri,{...s,count:i,isMobile:a,CONSTANTS:n,children:r.jsx(Qf,{children:a?r.jsxs(r.Fragment,{children:[r.jsx(jt.Modal,{Z_INDEX_WAR:n.Z_INDEX_WAR,children:t}),e]}):r.jsx(jt.Tooltip,{component:t,style:{width:350},Z_INDEX_WAR:n.Z_INDEX_WAR,children:e})})})};Rc.displayName="AddToCart.Root";const Tc=({children:e,component:t,Z_INDEX_WAR:n,...s})=>{const{contentRef:o,left:a,isLeaving:i,target:c,isOpen:l,top:u}=Rt();return r.jsx(d.Tooltip.Root,{arrow:"top-right",component:r.jsx("div",{...s,ref:o,children:t}),id:"add-to-cart--tooltip",className:$e["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:$e["add-to-cart--tooltip"],ref:c,children:e})})};Tc.displayName="AddToCart.Tooltip";const jt={Card:wc,Content:Pc,Footer:Ec,Items:Nc,Modal:Ic,Root:Rc,Tooltip:Tc},Vs=({title:e,...t})=>{const{recentlyAddedProducts:n}=en(),{isMobile:s}=ne(),o=n.length>3?4:n.length,a=n.length>(o??1),i=n.length>1;return r.jsx(jt.Root,{isMobile:s,count:n.length,component:r.jsx(jt.Content,{title:e,children:r.jsx(jt.Items,{thumbnail:i,children:a&&r.jsx(d.Badge.Count,{count:n.length-o,size:"medium",variant:"secondary"})})}),...t})};Vs.displayName="AddToCart";const yo={"backtotop-btn":"_backtotop-btn_vcjsm_1","card-modifier":"_card-modifier_vcjsm_29"},Zf=({children:e,className:t,classNameButton:n,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"},m=o&&s?{flexDirection:{top:"column",bottom:"column-reverse",left:"row",right:"row-reverse"}[o]}:{},f=()=>{window&&window.document.body.scrollTo({...l})};return r.jsx(d.Card,{...c,shadow:!0,padding:"small",className:d.helpers.classNameConcat(yo["card-modifier"],t),style:{...i,padding:0},children:r.jsxs("button",{className:d.helpers.classNameConcat(yo["backtotop-btn"],n),onClick:f,style:{...m},"data-orientation":o,children:[s,e]})})},Jf="_container_1sy8s_16",ft={"carousel-container":"_carousel-container_1sy8s_1","add-cart-container":"_add-cart-container_1sy8s_8",container:Jf,"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"},ep=({selectedProducts:e,handleAddAllToCart:t,CONSTANTS:n})=>{const s=Object.values(e.products).length;return r.jsxs("div",{className:ft["add-itens-to-cart-container"],children:[r.jsxs("div",{className:ft["add-itens-to-cart-container-values"],children:[r.jsx("div",{className:ft["add-itens-to-cart-qty-products"],children:r.jsx("span",{children:s===0?n.BUY_PACKAGE.group_cart.select_all_product:`${s} ${s===1?n.BUY_PACKAGE.group_cart.select_product:n.BUY_PACKAGE.group_cart.select_product+"s"}`})}),r.jsx("div",{className:ft["add-itens-to-cart-total"],children:r.jsx("span",{children:F.freightParsePrice({valueInCents:e.totalPrice*100,hasFree:!1,freeTaxMessage:n.FREIGHT_CALCULATION.messages.free_tax})})})]}),r.jsx(d.Button,{onClick:t,className:ft["add-button"],size:"large",disabled:s===0,variant:"primary",children:n.BUY_BUTTON_LABELS.add_to_cart})]})},tp=e=>e.reduce((t,n)=>{var o;const s=t.find(a=>a.node.id===n.node.id);if(!s)return[...t,n];if((o=s==null?void 0:s.node.isVariantOf)!=null&&o.hasVariant){const a=s.node.isVariantOf.hasVariant,i=n.node.isVariantOf.hasVariant;a&&i&&(s.node.isVariantOf.hasVariant=[...a,...i])}return t},[]),np=({selectedProduct:e,productId:t,prevState:n,mainSellerId:s})=>{const{products:o,totalPrice:a}=n;try{if(!e){const{[t]:u,...m}=o;return{...n,totalPrice:a-u.price,products:m}}const i=F.getValidOffer(e.offers.offers,s);if(!i)return n;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),n}},Ac=g.createContext({}),rp=({children:e,item:t,index:n,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:m}=ae(),f=y=>{u({functionKey:"productEvents",data:{commonData:{...t,availableSizes:l.current.availableSkus,...l.current.priceInfo},customData:{index:n+1},event:y}})},p=()=>{f("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}}})},_=()=>{s&&(m.current={item_list_name:s}),f("select_item")};return r.jsx(Ac.Provider,{value:g.useMemo(()=>({...o,index:n,item:t,element:c,selectedSku:a,setSelectedSku:i,eventDataRef:l,sendAddToWishlistEvent:p,sendSelectItemEvent:_,sendAddToCartEvent:h}),[o,t,c,a]),children:e})},Ye=()=>{const e=g.useContext(Ac);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"},kc=({callback:e,children:t,className:n,data:s,isKit:o,...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(pe.Wrapper,{type:"actions--group",children:[r.jsx(pe.Price,{}),r.jsx("div",{className:Re["product-card--actions--selectors"],children:!o&&r.jsx(pe.StyleSelector,{data:s,images:c,callback:e})})]}),t]}):null};kc.displayName="ProductCard.Actions";const Oc=({className:e,isKit:t,...n})=>{const{addToCart:s}=ve(),{isMobile:o=!1,selectedSku:a,outStock:i,item:c,sendAddToCartEvent:l,CONSTANTS:u}=Ye(),m=()=>{var h;if(!a)return;const p=F.getValidOffer(a.offers.offers,u.StoreConfig_MainSellerId);p&&s({id:a==null?void 0:a.sku,quantity:1,seller:p.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()},f=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:o?"medium":"large",variant:i?"secondary":"primary",onClick:i?n.onClick:m,children:i?"Avise-me quando chegar":f})};Oc.displayName="ProductCard.Actions.BuyButton";const sp={"snackbar-modifier":"_snackbar-modifier_1va2l_1"},Dt=({size:e,adornment:t,title:n,subtitle:s,supportChildren:o,className:a,Z_INDEX_WAR:i,...c})=>r.jsxs(d.SnackBar.Structure,{...c,size:e,className:d.helpers.classNameConcat(sp["snackbar-modifier"],a),width:360,style:{zIndex:i.snackbar},children:[r.jsx(d.SnackBar.Content,{adornment:t,title:n,subtitle:s}),o&&r.jsx(d.SnackBar.Support,{children:o})]});Dt.displayName="SnackBar";const Xt={"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 Qr={exports:{}},Oe={};Oe._=Oe._interop_require_default=op;function op(e){return e&&e.__esModule?e:{default:e}}var mn={exports:{}},ar={},xo;function Lc(){return xo||(xo=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 o}});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 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,m]=l;Array.isArray(m)?m.forEach(f=>c.append(u,s(f))):c.set(u,s(m))}),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(m=>{Array.from(m.keys()).forEach(f=>i.delete(f)),m.forEach((f,p)=>i.append(p,f))}),i}}(ar)),ar}var ir={},St={};function Mc(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(Mc=function(s){return s?n:t})(e)}St._=St._interop_require_wildcard=ap;function ap(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var n=Mc(t);if(n&&n.has(e))return n.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,n&&n.set(e,s),s}var vo;function Dc(){return vo||(vo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(l,u){for(var m in u)Object.defineProperty(l,m,{enumerable:!0,get:u[m]})}t(e,{formatUrl:function(){return a},formatWithValidation:function(){return c},urlObjectKeys:function(){return i}});const s=St._(Lc()),o=/https?|ftp|gopher|file/;function a(l){let{auth:u,hostname:m}=l,f=l.protocol||"",p=l.pathname||"",h=l.hash||"",_=l.query||"",y=!1;u=u?encodeURIComponent(u).replace(/%3A/i,":")+"@":"",l.host?y=u+l.host:m&&(y=u+(~m.indexOf(":")?"["+m+"]":m),l.port&&(y+=":"+l.port)),_&&typeof _=="object"&&(_=String(s.urlQueryToSearchParams(_)));let x=l.search||_&&"?"+_||"";return f&&!f.endsWith(":")&&(f+=":"),l.slashes||(!f||o.test(f))&&y!==!1?(y="//"+(y||""),p&&p[0]!=="/"&&(p="/"+p)):y||(y=""),h&&h[0]!=="#"&&(h="#"+h),x&&x[0]!=="?"&&(x="?"+x),p=p.replace(/[?#]/g,encodeURIComponent),x=x.replace("#","%23"),""+f+y+p+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)}}(ir)),ir}var cr={},bo;function ip(){return bo||(bo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"omit",{enumerable:!0,get:function(){return t}});function t(n,s){const o={};return Object.keys(n).forEach(a=>{s.includes(a)||(o[a]=n[a])}),o}}(cr)),cr}var lr={},jo;function Wn(){return jo||(jo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(b,P){for(var w in P)Object.defineProperty(b,w,{enumerable:!0,get:P[w]})}t(e,{DecodeError:function(){return _},MiddlewareNotFoundError:function(){return C},MissingStaticPage:function(){return v},NormalizeError:function(){return y},PageNotFoundError:function(){return x},SP:function(){return p},ST:function(){return h},WEB_VITALS:function(){return n},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 f},normalizeRepeatedSlashes:function(){return m},stringifyError:function(){return j}});const n=["CLS","FCP","FID","INP","LCP","TTFB"];function s(b){let P=!1,w;return function(){for(var S=arguments.length,E=new Array(S),R=0;R<S;R++)E[R]=arguments[R];return P||(P=!0,w=b(...E)),w}}const o=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,a=b=>o.test(b);function i(){const{protocol:b,hostname:P,port:w}=window.location;return b+"//"+P+(w?":"+w:"")}function c(){const{href:b}=window.location,P=i();return b.substring(P.length)}function l(b){return typeof b=="string"?b:b.displayName||b.name||"Unknown"}function u(b){return b.finished||b.headersSent}function m(b){const P=b.split("?");return P[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(P[1]?"?"+P.slice(1).join("?"):"")}async function f(b,P){if(process.env.NODE_ENV!=="production"){var w;if((w=b.prototype)!=null&&w.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=P.res||P.ctx&&P.ctx.res;if(!b.getInitialProps)return P.ctx&&P.Component?{pageProps:await f(P.Component,P.ctx)}:{};const E=await b.getInitialProps(P);if(S&&u(S))return E;if(!E){const R='"'+l(b)+'.getInitialProps()" should resolve to an object. But found "'+E+'" instead.';throw new Error(R)}return process.env.NODE_ENV!=="production"&&Object.keys(E).length===0&&!P.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"),E}const p=typeof performance<"u",h=p&&["mark","measure","getEntriesByName"].every(b=>typeof performance[b]=="function");class _ extends Error{}class y extends Error{}class x extends Error{constructor(P){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message="Cannot find module for page: "+P}}class v extends Error{constructor(P,w){super(),this.message="Failed to load static file for page: "+P+" "+w}}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})}}(lr)),lr}var fn={exports:{}},Co;function Gn(){return Co||(Co=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizePathTrailingSlash",{enumerable:!0,get:function(){return o}});const n=F.removeTrailingSlash,s=F.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,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)}(fn,fn.exports)),fn.exports}var ur={},pn={exports:{}},So;function cp(){return So||(So=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"hasBasePath",{enumerable:!0,get:function(){return o}});const n=F.pathHasPrefix,s=process.env.__NEXT_ROUTER_BASEPATH||"";function o(a){return(0,n.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)}(pn,pn.exports)),pn.exports}var wo;function Fc(){return wo||(wo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"isLocalURL",{enumerable:!0,get:function(){return s}});const t=Wn(),n=cp();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,n.hasBasePath)(i.pathname)}catch{return!1}}}(ur)),ur}var dr={},mr={},Po;function lp(){return Po||(Po=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getSortedRoutes",{enumerable:!0,get:function(){return n}});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 m=function(f,p){if(f!==null&&f!==p)throw new Error("You cannot use different slug names for the same dynamic path ('"+f+"' !== '"+p+"').");a.forEach(h=>{if(h===p)throw new Error('You cannot have the same slug name "'+p+'" 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 "'+p+'" differ only by non-word symbols within a single dynamic path')}),a.push(p)},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]+'" ).');m(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]+'").');m(this.restSlugName,l),this.restSlugName=l,c="[...]"}else{if(u)throw new Error('Optional route parameters are not yet supported ("'+o[0]+'").');m(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 n(s){const o=new t;return s.forEach(a=>o.insert(a)),o.smoosh()}}(mr)),mr}var fr={},pr={},hr={},_r={},Eo;function up(){return Eo||(Eo=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}}(_r)),_r}var Ws={};(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 n}});function n(a){return a[0]==="("&&a.endsWith(")")}const s="__PAGE__",o="__DEFAULT__"})(Ws);var No;function dp(){return No||(No=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 n=up(),s=Ws;function o(i){return(0,n.ensureLeadingSlash)(i.split("/").reduce((c,l,u,m)=>!l||(0,s.isGroupSegment)(l)||l[0]==="@"||(l==="page"||l==="route")&&u===m.length-1?c:c+"/"+l,""))}function a(i){return i.replace(/\.rsc($|\?)/,"$1")}}(hr)),hr}var Io;function zc(){return Io||(Io=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 n=dp(),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 m of i.split("/"))if(l=s.find(f=>m.startsWith(f)),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 m=c.split("/");if(m.length<=2)throw new Error(`Invalid interception route: ${i}. Cannot use (..)(..) marker at the root level or one level up.`);u=m.slice(0,-2).concat(u).join("/");break;default:throw new Error("Invariant: unexpected marker")}return{interceptingRoute:c,interceptedRoute:u}}}(pr)),pr}var Ro;function mp(){return Ro||(Ro=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"isDynamicRoute",{enumerable:!0,get:function(){return s}});const t=zc(),n=/\/\[[^/]+?\](?=\/|$)/;function s(o){return(0,t.isInterceptionRouteAppPath)(o)&&(o=(0,t.extractInterceptionRouteInformation)(o).interceptedRoute),n.test(o)}}(fr)),fr}var To;function fp(){return To||(To=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 n.getSortedRoutes},isDynamicRoute:function(){return s.isDynamicRoute}});const n=lp(),s=mp()}(dr)),dr}var gr={},yr={},Ao;function pp(){return Ao||(Ao=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getRouteMatcher",{enumerable:!0,get:function(){return n}});const t=Wn();function n(s){let{re:o,groups:a}=s;return i=>{const c=o.exec(i);if(!c)return!1;const l=m=>{try{return decodeURIComponent(m)}catch{throw new t.DecodeError("failed to decode param")}},u={};return Object.keys(a).forEach(m=>{const f=a[m],p=c[f.pos];p!==void 0&&(u[m]=~p.indexOf("/")?p.split("/").map(h=>l(h)):f.repeat?[l(p)]:l(p))}),u}}}(yr)),yr}var xr={},vr={},ko;function hp(){return ko||(ko=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"escapeStringRegexp",{enumerable:!0,get:function(){return s}});const t=/[|\\{}()[\]^$+*?.-]/,n=/[|\\{}()[\]^$+*?.-]/g;function s(o){return t.test(o)?o.replace(n,"\\$&"):o}}(vr)),vr}var Oo;function _p(){return Oo||(Oo=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 p},getRouteRegex:function(){return l},parseParameter:function(){return i}});const n=F.constants,s=zc(),o=hp(),a=F.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(P=>C.startsWith(P)),b=C.match(/\[((?:\[.*\])|.+)\]/);if(j&&b){const{key:P,optional:w,repeat:S}=i(b[1]);return x[P]={pos:v++,repeat:S,optional:w},"/"+(0,o.escapeStringRegexp)(j)+"([^/]+?)"}else if(b){const{key:P,repeat:w,optional:S}=i(b[1]);return x[P]={pos:v++,repeat:w,optional:S},w?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 m(_){let{interceptionMarker:y,getSafeRouteKey:x,segment:v,routeKeys:C,keyPrefix:j}=_;const{key:b,optional:P,repeat:w}=i(v);let S=b.replace(/\W/g,"");j&&(S=""+j+S);let E=!1;(S.length===0||S.length>30)&&(E=!0),isNaN(parseInt(S.slice(0,1)))||(E=!0),E&&(S=x()),j?C[S]=""+j+b:C[S]=b;const R=y?(0,o.escapeStringRegexp)(y):"";return w?P?"(?:/"+R+"(?<"+S+">.+?))?":"/"+R+"(?<"+S+">.+?)":"/"+R+"(?<"+S+">[^/]+?)"}function f(_,y){const x=(0,a.removeTrailingSlash)(_).slice(1).split("/"),v=u(),C={};return{namedParameterizedRoute:x.map(j=>{const b=s.INTERCEPTION_ROUTE_MARKERS.some(w=>j.startsWith(w)),P=j.match(/\[((?:\[.*\])|.+)\]/);if(b&&P){const[w]=j.split(P[0]);return m({getSafeRouteKey:v,interceptionMarker:w,segment:P[1],routeKeys:C,keyPrefix:y?n.NEXT_INTERCEPTION_MARKER_PREFIX:void 0})}else return P?m({getSafeRouteKey:v,segment:P[1],routeKeys:C,keyPrefix:y?n.NEXT_QUERY_PARAM_PREFIX:void 0}):"/"+(0,o.escapeStringRegexp)(j)}).join(""),routeKeys:C}}function p(_,y){const x=f(_,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}=f(_,!1);let j=v?"(?:(/.*)?)":"";return{namedRegex:"^"+C+j+"$"}}}(xr)),xr}var Lo;function gp(){return Lo||(Lo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"interpolateAs",{enumerable:!0,get:function(){return s}});const t=pp(),n=_p();function s(o,a,i){let c="";const l=(0,n.getRouteRegex)(o),u=l.groups,m=(a!==o?(0,t.getRouteMatcher)(l)(a):"")||i;c=o;const f=Object.keys(u);return f.every(p=>{let h=m[p]||"";const{repeat:_,optional:y}=u[p];let x="["+(_?"...":"")+p+"]";return y&&(x=(h?"":"/")+"["+x+"]"),_&&!Array.isArray(h)&&(h=[h]),(y||p in m)&&(c=c.replace(x,_?h.map(v=>encodeURIComponent(v)).join("/"):encodeURIComponent(h))||"/")})||(c=""),{params:f,result:c}}}(gr)),gr}var Mo;function yp(){return Mo||(Mo=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"resolveHref",{enumerable:!0,get:function(){return m}});const n=Lc(),s=Dc(),o=ip(),a=Wn(),i=Gn(),c=Fc(),l=fp(),u=gp();function m(f,p,h){let _,y=typeof p=="string"?p:(0,s.formatWithValidation)(p);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: '"+f.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("#")?f.asPath:f.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 w=(0,n.searchParamsToUrlQuery)(j.searchParams),{result:S,params:E}=(0,u.interpolateAs)(j.pathname,j.pathname,w);S&&(b=(0,s.formatWithValidation)({pathname:S,hash:j.hash,query:(0,o.omit)(w,E)}))}const P=j.origin===_.origin?j.href.slice(j.origin.length):j.href;return h?[P,b||P]:P}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)}(mn,mn.exports)),mn.exports}var hn={exports:{}},Do;function xp(){return Do||(Do=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addLocale",{enumerable:!0,get:function(){return s}});const n=Gn(),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,n.normalizePathTrailingSlash)(F.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)}(hn,hn.exports)),hn.exports}var br={},Fo;function Bc(){return Fo||(Fo=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")}(br)),br}var Gs={};(function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0});function t(u,m){for(var f in m)Object.defineProperty(u,f,{enumerable:!0,get:m[f]})}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)})(Gs);var _n={exports:{}},gn={exports:{}},zo;function Uc(){return zo||(zo=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 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)}(gn,gn.exports)),gn.exports}var Bo;function vp(){return Bo||(Bo=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useIntersection",{enumerable:!0,get:function(){return u}});const n=g,s=Uc(),o=typeof IntersectionObserver=="function",a=new Map,i=[];function c(m){const f={root:m.root||null,margin:m.rootMargin||""},p=i.find(x=>x.root===f.root&&x.margin===f.margin);let h;if(p&&(h=a.get(p),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)})},m);return h={id:f,observer:y,elements:_},i.push(f),a.set(f,h),h}function l(m,f,p){const{id:h,observer:_,elements:y}=c(p);return y.set(m,f),_.observe(m),function(){if(y.delete(m),_.unobserve(m),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(m){let{rootRef:f,rootMargin:p,disabled:h}=m;const _=h||!o,[y,x]=(0,n.useState)(!1),v=(0,n.useRef)(null),C=(0,n.useCallback)(b=>{v.current=b},[]);(0,n.useEffect)(()=>{if(o){if(_||y)return;const b=v.current;if(b&&b.tagName)return l(b,w=>w&&x(w),{root:f==null?void 0:f.current,rootMargin:p})}else if(!y){const b=(0,s.requestIdleCallback)(()=>x(!0));return()=>(0,s.cancelIdleCallback)(b)}},[_,p,f,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)}(_n,_n.exports)),_n.exports}var yn={exports:{}},xn={exports:{}},Uo;function bp(){return Uo||(Uo=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizeLocalePath",{enumerable:!0,get:function(){return n}});const n=(s,o)=>process.env.__NEXT_I18N_SUPPORT?F.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)}(xn,xn.exports)),xn.exports}var vn={exports:{}},qo;function jp(){return qo||(qo=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 s=arguments.length,o=new Array(s),a=0;a<s;a++)o[a]=arguments[a];if(process.env.__NEXT_I18N_SUPPORT)return F.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)}(vn,vn.exports)),vn.exports}var Ho;function Cp(){return Ho||(Ho=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getDomainLocale",{enumerable:!0,get:function(){return o}});const n=Gn(),s=process.env.__NEXT_ROUTER_BASEPATH||"";function o(a,i,c,l){if(process.env.__NEXT_I18N_SUPPORT){const u=bp().normalizeLocalePath,m=jp().detectDomainLocale,f=i||u(a,c).detectedLocale,p=m(l,void 0,f);if(p){const h="http"+(p.http?"":"s")+"://",_=f===p.defaultLocale?"":"/"+f;return""+h+p.domain+(0,n.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)}(yn,yn.exports)),yn.exports}var bn={exports:{}},$o;function Sp(){return $o||($o=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addBasePath",{enumerable:!0,get:function(){return a}});const n=F.addPathPrefix,s=Gn(),o=process.env.__NEXT_ROUTER_BASEPATH||"";function a(i,c){return(0,s.normalizePathTrailingSlash)(process.env.__NEXT_MANUAL_CLIENT_BASE_PATH&&!c?i:(0,n.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)}(bn,bn.exports)),bn.exports}var jn={exports:{}},Vo;function wp(){return Vo||(Vo=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 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 f},PrefetchKind:function(){return m},isThenable:function(){return p}});const s="refresh",o="navigate",a="restore",i="server-patch",c="prefetch",l="fast-refresh",u="server-action";var m;(function(h){h.AUTO="auto",h.FULL="full",h.TEMPORARY="temporary"})(m||(m={}));var f;(function(h){h.fresh="fresh",h.reusable="reusable",h.expired="expired",h.stale="stale"})(f||(f={}));function p(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)}(jn,jn.exports)),jn.exports}(function(e,t){"use client";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return w}});const n=Oe,s=r,o=n._(g),a=yp(),i=Fc(),c=Dc(),l=Wn(),u=xp(),m=Bc(),f=Gs,p=vp(),h=Cp(),_=Sp(),y=wp(),x=new Set;function v(S,E,R,A,O,L){if(typeof window>"u"||!L&&!(0,i.isLocalURL)(E))return;if(!A.bypassPrefetchedCheck){const M=typeof A.locale<"u"?A.locale:"locale"in S?S.locale:void 0,q=E+"%"+R+"%"+M;if(x.has(q))return;x.add(q)}(async()=>L?S.prefetch(E,O):S.prefetch(E,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,E,R,A,O,L,X,M,q){const{nodeName:U}=S.currentTarget;if(U.toUpperCase()==="A"&&(C(S)||!q&&!(0,i.isLocalURL)(R)))return;S.preventDefault();const K=()=>{const H=X??!0;"beforePopState"in E?E[O?"replace":"push"](R,A,{shallow:L,locale:M,scroll:H}):E[O?"replace":"push"](A||R,{scroll:H})};q?o.default.startTransition(K):K()}function b(S){return typeof S=="string"?S:(0,c.formatUrl)(S)}const w=o.default.forwardRef(function(E,R){let A;const{href:O,as:L,children:X,prefetch:M=null,passHref:q,replace:U,shallow:Z,scroll:K,locale:H,onClick:J,onMouseEnter:se,onTouchStart:ce,legacyBehavior:oe=!1,...ue}=E;A=X,oe&&(typeof A=="string"||typeof A=="number")&&(A=(0,s.jsx)("a",{children:A}));const D=o.default.useContext(m.RouterContext),ee=o.default.useContext(f.AppRouterContext),N=D??ee,W=!D,ie=M!==!1,_e=M===null?y.PrefetchKind.AUTO:y.PrefetchKind.FULL;if(process.env.NODE_ENV!=="production"){let z=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"&&(E[B]==null||typeof E[B]!="string"&&typeof E[B]!="object"))throw z({key:B,expected:"`string` or `object`",actual:E[B]===null?"null":typeof E[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 E[B];if(B==="as"){if(E[B]&&te!=="string"&&te!=="object")throw z({key:B,expected:"`string` or `object`",actual:te})}else if(B==="locale"){if(E[B]&&te!=="string")throw z({key:B,expected:"`string`",actual:te})}else if(B==="onClick"||B==="onMouseEnter"||B==="onTouchStart"){if(E[B]&&te!=="function")throw z({key:B,expected:"`function`",actual:te})}else if((B==="replace"||B==="scroll"||B==="shallow"||B==="passHref"||B==="prefetch"||B==="legacyBehavior")&&E[B]!=null&&te!=="boolean")throw z({key:B,expected:"`boolean`",actual:te})});const k=o.default.useRef(!1);E.prefetch&&!k.current&&!W&&(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"&&W&&!L){let z;if(typeof O=="string"?z=O:typeof O=="object"&&typeof O.pathname=="string"&&(z=O.pathname),z&&z.split("/").some(ye=>ye.startsWith("[")&&ye.endsWith("]")))throw new Error("Dynamic href `"+z+"` 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}=o.default.useMemo(()=>{if(!D){const ye=b(O);return{href:ye,as:L?b(L):ye}}const[z,fe]=(0,a.resolveHref)(D,O,!0);return{href:z,as:L?(0,a.resolveHref)(D,L):fe||z}},[D,O,L]),Te=o.default.useRef(I),V=o.default.useRef(T);let Y;if(oe)if(process.env.NODE_ENV==="development"){J&&console.warn('"onClick" was passed to <Link> with `href` of `'+O+'` but "legacyBehavior" was set. The legacy behavior requires onClick be set on the child of next/link'),se&&console.warn('"onMouseEnter" was passed to <Link> with `href` of `'+O+'` but "legacyBehavior" was set. The legacy behavior requires onMouseEnter be set on the child of next/link');try{Y=o.default.Children.only(A)}catch{throw A?new Error("Multiple children were passed to <Link> with `href` of `"+O+"` 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 `"+O+"` but one child is required https://nextjs.org/docs/messages/link-no-children")}}else Y=o.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=oe?Y&&typeof Y=="object"&&Y.ref:R,[Ie,je,ge]=(0,p.useIntersection)({rootMargin:"200px"}),Ae=o.default.useCallback(z=>{(V.current!==T||Te.current!==I)&&(ge(),V.current=T,Te.current=I),Ie(z),be&&(typeof be=="function"?be(z):typeof be=="object"&&(be.current=z))},[T,be,I,ge,Ie]);o.default.useEffect(()=>{process.env.NODE_ENV==="production"&&N&&(!je||!ie||v(N,I,T,{locale:H},{kind:_e},W))},[T,I,je,H,ie,D==null?void 0:D.locale,N,W,_e]);const Ce={ref:Ae,onClick(z){if(process.env.NODE_ENV!=="production"&&!z)throw new Error('Component rendered inside next/link has to pass click event to "onClick" prop.');!oe&&typeof J=="function"&&J(z),oe&&Y.props&&typeof Y.props.onClick=="function"&&Y.props.onClick(z),N&&(z.defaultPrevented||j(z,N,I,T,U,Z,K,H,W))},onMouseEnter(z){!oe&&typeof se=="function"&&se(z),oe&&Y.props&&typeof Y.props.onMouseEnter=="function"&&Y.props.onMouseEnter(z),N&&((!ie||process.env.NODE_ENV==="development")&&W||v(N,I,T,{locale:H,priority:!0,bypassPrefetchedCheck:!0},{kind:_e},W))},onTouchStart:process.env.__NEXT_LINK_NO_TOUCH_START?void 0:function(fe){!oe&&typeof ce=="function"&&ce(fe),oe&&Y.props&&typeof Y.props.onTouchStart=="function"&&Y.props.onTouchStart(fe),N&&(!ie&&W||v(N,I,T,{locale:H,priority:!0,bypassPrefetchedCheck:!0},{kind:_e},W))}};if((0,l.isAbsoluteUrl)(T))Ce.href=T;else if(!oe||q||Y.type==="a"&&!("href"in Y.props)){const z=typeof H<"u"?H:D==null?void 0:D.locale,fe=(D==null?void 0:D.isLocaleDomain)&&(0,h.getDomainLocale)(T,z,D==null?void 0:D.locales,D==null?void 0:D.domainLocales);Ce.href=fe||(0,_.addBasePath)((0,u.addLocale)(T,z,D==null?void 0:D.defaultLocale))}return oe?o.default.cloneElement(Y,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)})(Qr,Qr.exports);var Pp=Qr.exports,Ep=Pp;const ze=F.getDefaultExportFromCjs(Ep),Np="_link_w24h0_1",Ip="_wrapper_w24h0_98",Rp="_text_w24h0_106",jr={link:Np,wrapper:Ip,text:Rp},Le=({children:e,adornments:t,className:n,disableUnderline:s,href:o,mode:a,size:i,title:c,onClick:l,disablePadding:u,...m})=>{const f=d.helpers.ValidateProp({fieldTypes:Mt.SizesSmallExtended,property:i,fallback:"medium"}),p=d.helpers.ValidateProp({fieldTypes:Mt.Mode,property:a,fallback:"default"});return r.jsx(ze,{...m,className:d.helpers.classNameConcat(jr.link,n),href:o&&o.length>0?o:"#","data-size":f,"data-variant":p,title:c||"NextLink","data-disable-underline":s??!1,"data-disable-padding":u??!0,children:r.jsxs("div",{className:jr.wrapper,onClick:l,children:[t==null?void 0:t.start,r.jsx("p",{className:jr.text,"data-size":f,children:e}),t==null?void 0:t.end]})})},Tp=({ICONS:e})=>{const{resetFeedback:t}=It();return r.jsxs("div",{className:Xt["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})}})]})},Ks=({WISHLIST_INFO:e,ICONS:t,Z_INDEX_WAR:n})=>{const s=As(),{resetFeedback:o}=It(),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)&&r.jsx(Dt,{Z_INDEX_WAR:n,className:Xt["wishlist--snack"],"data-action":s.action,title:s.action==="add"?e.messages.add:e.messages.remove,supportChildren:r.jsx(Tp,{ICONS:t}),size:"medium"})};Ks.displayName="WishList.Feedback";const Xs={"product-list--banner":"_product-list--banner_sfibj_1","product-list--card":"_product-list--card_sfibj_30","product-list":"_product-list_sfibj_1"},qc=({className:e,children:t,columns:n=1,isMobile:s=!1,gap:o=8,position_grid:a,totalColumns:i=4,PRODUCT_CARD_IMAGE_ASPECT_RATIO:c,...l})=>{const u=g.useMemo(()=>n%i===0?"initial":s||n<2?c:c.split("/").reverse().join("/"),[n,i,s]);return r.jsx("div",{...l,className:d.helpers.classNameConcat(Xs["product-list--banner"],e),style:{aspectRatio:u,maxWidth:`${n/i*100}%`,order:a,padding:o/2},children:t})};qc.displayName="ProductList.Banner";class Ap{constructor(){gt(this,"cache",new Map);gt(this,"pendingRequests",new Map);gt(this,"rafId",null)}request(t,n,s){const o=this.getCacheKey(t,s==null?void 0:s.filterTexture);if(this.cache.has(o)){n(this.cache.get(o));return}const a=this.pendingRequests.get(o);a?a.callbacks.push(n):this.pendingRequests.set(o,{productId:t,callbacks:[n],filterTexture:s.filterTexture,storeId:s.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=[],s=[];if(t.forEach((a,i)=>{this.cache.has(i)?s.push([i,a]):n.push(a)}),s.forEach(([a,i])=>{const c=this.cache.get(a);c&&i.callbacks.forEach(l=>l(c)),t.delete(a)}),n.length===0)return;const o=new Map;n.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 n=t.map(i=>i.productId),s=t[0].filterTexture,a=`https://${t[0].storeId}.myvtex.com/_v/get-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]||[],m=s&&u.length?F.formattedSimilars(u,s):u,f=this.getCacheKey(l.productId,s);this.cache.set(f,m),l.callbacks.forEach(p=>p(m)),this.pendingRequests.delete(f)})}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 Wo=new Ap;function Hc(e,t){const[n,s]=g.useState([]),o=g.useRef(!1);g.useEffect(()=>{o.current=!1},[e]);const a=g.useCallback(()=>{!e||o.current||(o.current=!0,Wo.request(e,s,t))},[e,t]),i=g.useCallback(()=>Wo.clearCache(),[]);return{items:n,loadSimilars:a,clearCache:i}}const $c=({isKit:e,parent:t,productId:n,setNotify:s,CONSTANTS:o})=>{const{router:a}=le(),{items:i,loadSimilars:c}=Hc(n,{filterTexture:o.TEXTURE_IMAGE,storeId:o.storeId}),l=g.useRef(!1),u=g.useRef(null),m=h=>a.push(h??""),f=g.useCallback(h=>{!n||!h||c()},[n,c]),p=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(()=>{f(!0)},o.PLP_PRODUCT_SIMILAR_DELAY);return}f(!0)}},[f]);return g.useEffect(()=>{if(e||!t.current)return;const h={root:null,threshold:.1},_=new IntersectionObserver(([y])=>{p(y,h)},h);return _.observe(t.current),()=>{u.current&&clearTimeout(u.current),_.disconnect()}},[p,t,e]),r.jsx(pe.Actions,{data:i,callback:m,isKit:e,children:!e&&r.jsx(pe.SizeSelector,{setNotify:s,PLP_SIZE_ORDER:o.PLP_SIZE_ORDER})})};$c.displayName="ProductList.Card.Actions";const Vc=({className:e,children:t,gap:n=32,item:s,isMobile:o,order:a,tag:i,hasMaxWidth:c=!0,index:l,setSkuSelected:u,showVideo:m,CONSTANTS:f,...p})=>{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 r.jsxs("div",{...p,className:d.helpers.classNameConcat(Xs["product-list--card"],e),"data-mobile":o,"data-order":a,ref:h,style:{...c&&{maxWidth:o?"50%":"25%"},order:a,padding:n/2},children:[r.jsxs(pe.Root,{item:s,isMobile:o,index:l,size:o?"small":"medium",order:a,outStock:!_,CONSTANTS:f,children:[r.jsx(pe.Header,{product:s,tag:i==null?void 0:i.commercial}),r.jsx(pe.Media,{showVideo:m,hasPriority:!0}),r.jsxs(pe.Wrapper,{type:"body",children:[r.jsx(pe.Title,{tag:i==null?void 0:i.institucional}),r.jsx($c,{productId:s.isVariantOf.productGroupID,parent:h,setNotify:y,isKit:x,CONSTANTS:f}),!x&&r.jsx(pe.OutStock,{callback:y})]}),r.jsx(pe.Wrapper,{type:"footer",children:_&&r.jsx(pe.BuyButton,{isKit:x})})]}),t]})};Vc.displayName="ProductList.Card";const Wc=({children:e,className:t,...n})=>r.jsx("div",{...n,className:d.helpers.classNameConcat(Xs["product-list"],t),children:e});Wc.displayName="ProductList.Grid";const ot={Banner:qc,Card:Vc,Root:Wc,helpers:Rf},kp="_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:kp},Ys=({className:e,ICONS:t,PLP_NOT_RESULT:n})=>{const{router:s}=le(),{isMobile:o}=ne(),a=()=>{s.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:o?"typography-style-body-md":"typography-style-heading-sm",children:n.title}),r.jsx("p",{className:o?"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})})]})};Ys.displayName="PDC.Empty";const Kn=e=>r.jsx("div",{...e,className:Xe["pdc--infinite--next-page"],children:r.jsx(d.Spinner,{className:Xe["pdc--infinite--next-page--spinner"]})});Kn.displayName="PDC.Spinner";function Gc({CONSTANTS:e}){const{sendDataLayerEvent:t}=ae(),{isMobile:n}=ne(),{getAvailableProductTag:s}=_t(),[o,a]=g.useState([]),[i,c]=g.useState(!0),l=Ut(),u=l.join(","),m=n?16:32;return g.useEffect(()=>{const f=async()=>{l.length?await fetch("/api/wishlist/products",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({productIds:l})}).then(p=>p.json()).then(p=>{a(p),t({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:p}}})}).catch(p=>console.error(p)):a([]),c(!1)};if(l.length){f();return}if(l.length===0&&o.length===0){c(!1);return}a([]),c(!1)},[u]),r.jsx("section",{className:Xt["wishlist-grid"],children:r.jsxs("div",{className:Xt["wishlist-grid--container"],children:[i&&r.jsx(Kn,{}),!l.length&&!(o!=null&&o.length)&&!i&&r.jsx(Ys,{className:Xt["pdc-empty-modifier"],ICONS:e.ICONS,PLP_NOT_RESULT:e.WISHLIST_NOT_RESULT}),r.jsx(ot.Root,{children:Array.isArray(o)&&o.map((f,p)=>{const h=f.node.cluster.highlights||[],_=s(h);return r.jsx(ot.Card,{gap:m,isMobile:n??!1,item:f.node,tag:_,index:p,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}},f.node.sku)})})]})})}Gc.displayName="Wishlist.Grid";const Op=e=>e.map(t=>{var n;return(n=t.isVariantOf)==null?void 0:n.productGroupID})??[],Kc=({WISHLIST_INFO:e,ICONS:t,Z_INDEX_WAR:n})=>{const s=qt(),o=Ut(),a=As(),{updateList:i}=It();return g.useEffect(()=>{var l,u;a.active&&tt.set("fs::wishlist",o);const c=async()=>{var m;await fetch("/api/wishlist/documents",{method:"PATCH",body:JSON.stringify({productIds:o,docId:(m=s==null?void 0:s.user)==null?void 0:m.id})}).catch(f=>{console.error("Error updating wishlist:",f)})};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 m=await tt.get("fs::wishlist");m&&(m==null?void 0:m.length)!==o.length&&i(m)},l=async()=>{var h;const m=await tt.get("fs::wishlist")??[],f=s.wishlist?typeof s.wishlist[0]=="object"?Op(s.wishlist):s.wishlist:[],p=[...new Set([...m,...f])];i(p),tt.set("fs::wishlist",o),f.length!==p.length&&await fetch("/api/wishlist/documents",{method:"PATCH",body:JSON.stringify({productIds:p,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]),r.jsx(Ks,{ICONS:t,Z_INDEX_WAR:n,WISHLIST_INFO:e})};Kc.displayName="Wishlist.Init";const Xc=({product:e,priceInfo:t,size:n="medium",style:s,ICONS:o})=>{const{sendDataLayerEvent:a,currentLocalRef:i}=ae(),c=Ut(),{toggleProduct:l}=It(),{isVariantOf:{productGroupID:u}}=e;return r.jsx(d.Button,{adornment:{start:r.jsx(d.Icon,{size:n,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"})};Xc.displayName="WishList.Toggle";const Yc={Feedback:Ks,Toggle:Xc,Grid:Gc,Init:Kc},Qc=({product:e,tag:t,size:n="small"})=>{const{CONSTANTS:s}=Ye(),{tags:o}=_t(),a=e.offers.offers[0],i=F.getDiscountPercent(a.listPrice,a.price),c=o==null?void 0:o.flagDiscount;return r.jsxs(pe.Wrapper,{type:"header",style:{zIndex:s.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,s.PRODUCT_CARD_TOP_WISHLIST_TOGGLE&&r.jsx(Yc.Toggle,{product:e,priceInfo:{price:a.price,listPrice:a.listPrice},variant:"card",ICONS:s.ICONS})]})};Qc.displayName="ProductCard.Actions.Header";const Zc=({className:e,children:t,hasPriority:n=!1,showVideo:s=!1,...o})=>{const{element:a,index:i,item:{image:c,slug:l,video:u},sendSelectItemEvent:m,order:f,CONSTANTS:p}=Ye(),h=F.getFirstImages({images:c,label:{first:p.MAIN_IMAGE,second:p.SECOND_IMAGE}});return r.jsxs("div",{...o,className:d.helpers.classNameConcat(Re["product-card--image"],e),ref:a,style:{aspectRatio:p.PRODUCT_CARD_IMAGE_ASPECT_RATIO},children:[r.jsx(ze,{href:`/${l}/p`,onClick:m,onMouseUp:_=>{_.button===1&&m(),p.PLP_INFINITE_SCROLL&&sessionStorage.setItem(p.PLP_GRID_SCROLL_BACK.order,String(f))},children:r.jsx("div",{className:Re["product-card--image--container"],children:Array.isArray(h)&&h.map(({url:_,alternateName:y},x)=>g.createElement(Ne.Image,{...p.PRODUCT_IMAGE_DIMENSIONS.product_card,style:p.PRODUCT_IMAGE_DIMENSIONS.product_card,alt:y??"product image",key:x,...n&&{priority:x===0&&i<4},objectFit:"cover",src:_}))})}),p.PLP_SHOW_VIDEO_ON_PRODUCT_CARD&&s&&u&&r.jsx(pe.Video,{url:u,poster:h[0].url}),t]})};Zc.displayName="ProductCard.Media.Media";const Jc=({className:e,callback:t,children:n,...s})=>{const{isMobile:o,item:a,CONSTANTS:{PRODUCT_CARD_TEXTS:i}}=Ye(),{availability:{status:c}}=a;return c?null:r.jsxs("div",{...s,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:o?"medium":"large",variant:"quaternary",onClick:()=>{typeof t=="function"&&t(a)},children:i.notify})]})};Jc.displayName="ProductCard.OutStock";const el=({children:e,className:t="",index:n,isMobile:s=!1,item:o,size:a,order:i,outStock:c,shelfTitle:l,CONSTANTS:u,...m})=>r.jsx(rp,{item:o,isMobile:s,outStock:c,order:i,size:a,index:n,shelfTitle:l,CONSTANTS:u,children:r.jsx("div",{...m,className:d.helpers.classNameConcat(Re["product-card--wrapper"],t),"data-size":a,children:e})});el.displayName="ProductCard.Root";const tl=({disabled:e,label:t,size:n,value:s,onClick:o,...a})=>r.jsxs(d.ToggleSize.Wrapper,{...a,disabled:!1,outOfStock:e,size:n,onClick:o,children:[r.jsx(d.ToggleSize.DisabledAdornment,{}),r.jsx(d.ToggleSize.Text,{children:t})]});tl.displayName="ProductCard.SizeSelector.Item";const nl=({active:e=!1,callback:t,selectedSku:n=null,item:s,setNotify:o})=>{const{item:a,isMobile:i,setSelectedSku:c,eventDataRef:l}=Ye();s.productId=a.id;const u=F.disableSKU(s),m=F.getSKUName(s,"tamanho");!u&&!l.current.availableSkus.includes(m)&&l.current.availableSkus.push(m);const f=g.useCallback(h=>{const _=n===h?null:h;typeof c=="function"&&c(_),typeof t=="function"&&t(_)},[t,c,n]),p=g.useCallback(()=>{if(u&&typeof o=="function"){o(a,s);return}f(s)},[s,o,f,u,a]);return r.jsx(tl,{active:e,disabled:u,label:m,onClick:()=>p(),size:i?"x-small":"small",value:s})};nl.displayName="ProductCard.SizeSelector.SkuItem";const rl=({items:e,getLabel:t,PLP_SIZE_ORDER:n})=>Array.isArray(e)?[...e].sort((s,o)=>{const a=t(s).toUpperCase(),i=t(o).toUpperCase(),c=n.indexOf(a)-n.indexOf(i);return c!==0?c:a.localeCompare(i,"pt-BR")}):[],sl=({callback:e,className:t="",children:n,setNotify:s,PLP_SIZE_ORDER:o,...a})=>{const{isMobile:i,item:{isVariantOf:{hasVariant:c}},selectedSku:l}=Ye(),u=g.useMemo(()=>Array.isArray(c)?rl({items:c,getLabel:m=>F.getSKUName(m,"tamanho"),PLP_SIZE_ORDER:o}):[],[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((m,f)=>r.jsx(nl,{active:l===m,callback:e,item:m,selectedSku:l,setNotify:s},`size--${f}--${m.sku}`))}),r.jsx("div",{className:Re["product-card--selectors--size--button"],children:n})]})};sl.displayName="ProductCard.SizeSelector";const Zr=({alt:e="",callback:t,more:n,total:s=4,src:o,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:[o&&r.jsx(Ne.Image,{alt:e??o,src:o,height:34,width:34}),n&&r.jsx(d.TextStructure.DivWrapper,{className:Re["product-card--selectors--style--more"],children:r.jsxs("p",{children:["+ ",s]})})]})]}),Lp=({children:e,callback:t,data:n,total:s=4,size:o,...a})=>{const{index:i}=Ye(),{triggerSelectItemEventRef:c}=ae();return r.jsxs("div",{...a,children:[e,Array.isArray(n)&&n.slice(0,s).map((l,u)=>r.jsx(Zr,{callback:m=>{c.current.trigger=!0,c.current.index=i,typeof t=="function"&&t(m)},src:(l==null?void 0:l.textureImage)??"",alt:l==null?void 0:l.textureAlt,url:l==null?void 0:l.slug,size:o},u)),Array.isArray(n)&&(n==null?void 0:n.length)>s&&r.jsx(Zr,{size:o,total:n.length-s,more:!0})]})},ol=({callback:e,className:t,data:n,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 r.jsx(Lp,{...a,callback:e,className:d.helpers.classNameConcat(Re["product-card--selectors--style"],t),data:n,size:"x-small",children:l&&r.jsx(Zr,{active:!0,size:"x-small",src:l.url})})};ol.displayName="ProductCard.StyleSelector";const al=({className:e,hasDecimal:t,...n})=>{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=F.formatPriceToCurrency(a,t),m=F.formatPriceToCurrency(o,t),f=F.formatPriceToCurrency(c??0),p=s?"horizontal":"stacked";return r.jsx("div",{...n,className:d.helpers.classNameConcat(Re["product-card--price"],e),"data-mobile":s,children:r.jsx(d.ProductInfo.Root,{size:"small",layout:p,children:r.jsxs(d.ProductInfo.Wrapper,{size:"small",layout:p,children:[r.jsx(d.ProductInfo.ValuesWrapper,{children:m!==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:m,size:"small"})]}):r.jsx(d.ProductInfo.Price,{label:"defaultPrice",value:m,size:"small"})}),i&&i>1&&c?r.jsx(d.ProductInfo.Price,{label:"installment",value:`${i}x ${f}`,size:"small"}):null]})})})};al.displayName="ProductCard.Price";const il=({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})})})})]})};il.displayName="ProductCard.Title";const cl=({className:e,url:t,poster:n,...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(m=>{m.forEach(f=>{F.setVideoPlay(f.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]),r.jsx("div",{...s,className:d.helpers.classNameConcat(Re["product-card--video"],e),children:t&&r.jsx(Ne.Video,{autoPlay:!1,muted:!0,loop:!0,preload:"none",playsInline:!0,poster:n})})};cl.displayName="ProductCard.Media.Video";const ll=({children:e,className:t,type:n,...s})=>r.jsx("div",{...s,className:d.helpers.classNameConcat(Re[`product-card--${n}`],t),children:e});ll.displayName="ProductCard.Wrapper";const pe={Actions:kc,BuyButton:Oc,Header:Qc,Media:Zc,Root:el,OutStock:Jc,Price:al,SizeSelector:sl,StyleSelector:ol,Title:il,Video:cl,Wrapper:ll},Mp="_carousel_1egdv_1",Dp="_shelf__container_1egdv_14",Fp="_shelf_without_carousel_1egdv_34",zp="_card_container_1egdv_57",Lt={carousel:Mp,"custom-controllers":"_custom-controllers_1egdv_5",shelf__container:Dp,"controllers-arrows-bullets":"_controllers-arrows-bullets_1egdv_23",shelf_without_carousel:Fp,card_container:zp},Go=({title:e})=>r.jsx("div",{className:Lt.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",F.responsive["responsive-mobile-flex"]),children:e}),r.jsx("h2",{className:d.helpers.classNameConcat("typography-style-heading-md",F.responsive["responsive-desktop-flex"]),children:e})]})})}),Bp=({children:e,ICONS:t,itemsPerPage:n,title:s})=>{const{isMobile:o}=ne(),a=n[o?"mobile":"desktop"],{initialize:i,controller:c,itemsStyles:l,pagination:u}=d.Carousel.useCarousel({itemsPerPage:a,gap:10,loop:!0,direction:"row"}),m=g.Children.toArray(e).length;return o||m>=4?r.jsxs(d.Carousel.Root,{innerRef:p=>{i(p)},className:Lt.carousel,children:[r.jsxs("div",{className:Lt["custom-controllers"],children:[s&&r.jsx(Go,{title:s}),a<m&&r.jsxs(d.Carousel.Controller,{className:Lt["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})}})]}),!o&&a>2&&r.jsx(d.Carousel.Bullets,{page:u.currentPage,total:u.totalPages,onBulletClick:p=>c==null?void 0:c.navigateTo(p)})]})]}),r.jsx(d.Carousel.Body,{children:g.Children.map(e,(p,h)=>r.jsx(d.Carousel.Item,{style:{...l,overflow:"hidden"},children:p},`${s}_${h}`))})]}):r.jsxs(r.Fragment,{children:[s&&r.jsx(Go,{title:s}),r.jsx("div",{className:Lt.shelf_without_carousel,children:e})]})},ul=({className:e,item:t,isMobile:n,size:s,shelfTitle:o,...a})=>{const i=g.useRef(null),{getAvailableProductTag:c}=_t(),{availability:{status:l}}=t,u=f=>{const p=f.filter(h=>!a.CONSTANTS.TEXTURE_IMAGE.includes(h.keywords));return n?p.splice(0,2):p},m=c(t.cluster.highlights);return r.jsx("div",{ref:i,className:Lt.card_container,children:r.jsxs(pe.Root,{...a,item:{...t,image:u(t.image)},isMobile:n,size:n?"small":"medium",outStock:!l,shelfTitle:o,children:[r.jsx(pe.Header,{product:t,tag:m==null?void 0:m.commercial}),r.jsx(pe.Media,{}),r.jsxs(pe.Wrapper,{type:"body",children:[r.jsx(pe.Title,{tag:m==null?void 0:m.institucional}),r.jsx(pe.Actions,{})]}),r.jsx(pe.Wrapper,{type:"footer"})]})})};ul.displayName="ProductList.Card";const Zt={Shelf:Bp,Card:ul},dl=({CONSTANTS:e,inView:t,products:n,innerRef:s})=>{const o=g.useMemo(()=>tp(n),[n]),{isMobile:a}=ne(),{addItemsToCart:i}=ve(),{sendDataLayerEvent:c}=ae(),{getAvailableProductTag:l}=_t(),[u,m]=g.useState({totalPrice:0,products:{}}),f=()=>{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}}})},p=({selectedProduct:h,productId:_})=>{const y=np({selectedProduct:h,productId:_,prevState:u,mainSellerId:e.StoreConfig_MainSellerId});m(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]),r.jsxs("div",{className:ft.container,ref:s,children:[r.jsx("div",{className:ft["carousel-container"],style:{width:o.length<=3?"max-content":"75%"},children:r.jsx(Zt.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?r.jsxs(pe.Root,{item:{...h,image:$s.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(pe.Header,{product:h,tag:y.commercial}),r.jsx(pe.Media,{}),r.jsxs(pe.Wrapper,{type:"body",children:[r.jsx(pe.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(pe.Actions,{children:r.jsx(pe.SizeSelector,{callback:b=>p({selectedProduct:b,productId:h.id}),PLP_SIZE_ORDER:e.PLP_SIZE_ORDER})})]})]},h.id):null})})}),r.jsx("div",{className:ft["add-cart-container"],children:r.jsx(ep,{handleAddAllToCart:f,selectedProducts:u,CONSTANTS:{BUY_BUTTON_LABELS:e.BUY_BUTTON_LABELS,BUY_PACKAGE:e.BUY_PACKAGE,FREIGHT_CALCULATION:e.FREIGHT_CALCULATION}})})]})},Qs={"btn-login":"_btn-login_yas63_12","btn-header":"_btn-header_yas63_22","header-animation":"_header-animation_yas63_35"},Zs=({id:e})=>{const{setIsOpen:t,cartStore:{items:n}}=ve(),{handleSelectContent:s}=ae(),{CONSTANTS:o}=Pe(),a=n.reduce((i,c)=>i+(c.quantity??0),0);return r.jsx(d.Header.SupportItem,{onClick:()=>{t(!0),s({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:o.header.ICONS.bag,size:"medium"})]})})};Zs.displayName="Header.Bag";const on=({children:e,href:t,...n})=>t&&t!=="#"?r.jsx(ze,{href:t.startsWith("/")?t:`/${t}`,...n,children:e}):e,ml=()=>{const{headerData:e}=Pe(),{handleSelectContent:t}=ae(),{reset:n,updateValue:s}=nn(),o=a=>{a?s(a):n()};return r.jsx(d.Header.Categories,{children:Array.isArray(e.categories)&&e.categories.map((a,i)=>r.jsx(on,{href:a.link,onMouseEnter:()=>o(a.submenuId),onFocus:()=>o(a.submenuId),children:r.jsx(d.Header.CategoryItem,{className:Qs["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}`))})};ml.displayName="Header.Categories";function Up(){const{handleSelectContent:e}=ae(),{CONSTANTS:t}=Pe(),{setValue:n}=Un();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 qp={"menu-subcategories-container":"_menu-subcategories-container_a93cr_1"},Hp={"observer-wrapper":"_observer-wrapper_r43gk_1"},Xn=({children:e,eventData:t,observerOptions:n,callBackWhenVisible:s,stopOnIntersection:o=!0,className:a,...i})=>{const c=g.useRef(null),l=Ss(c,o,n),{sendDataLayerEvent:u}=ae();return g.useEffect(()=>{l&&(typeof s=="function"&&s(),t&&u({...t}))},[l]),r.jsx("div",{...i,ref:c,className:d.helpers.classNameConcat(Hp["observer-wrapper"],a),children:e})},fl=({thumbnails:e,category:t,isMobile:n=!0,callBack:s})=>{const{handleSelectPromotionEvent:o}=ae(),a=50/e.length;return r.jsx("div",{className:qp["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(Xn,{eventData:{functionKey:"readyEvents",data:{event:"view_promotion",readyData:{ecommerce:{...u}}}},observerOptions:{delay:1e3},children:r.jsxs(ze,{href:i.link??"#",onClick:()=>{typeof s=="function"&&s(),o({updatePromotionRef:!0,promotion:u})},children:[r.jsx(Ne.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}`)})})};fl.displayName="Menu.Thumbnail";const Jr={"menu-desktop":"_menu-desktop_1b799_1","menu-categories":"_menu-categories_1b799_12"},pl=({children:e,dividerOnRight:t=!0,subMenu:n,...s})=>{var l;const{router:o}=le(),{reset:a}=nn(),{handleSelectContent:i}=ae(),{CONSTANTS:c}=Pe();return r.jsxs("div",{...s,className:Jr["menu-categories"],children:[(l=n==null?void 0:n.subCategories)==null?void 0:l.map((u,m)=>{var h,_,y,x;const f=u.listCollapseDesk&&!((h=u.see_all)!=null&&h.link)?{expandAfterRowsQty:u.rowsToShowDesk}:{},p=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(on,{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,...f,className:Jr["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,{...p,size:"small",onClick:()=>{var v;(v=u.see_all)!=null&&v.link&&(a(),i({content:`menu:${u.label??""}:${n.label}`}),o.push(u.see_all.link))},children:u.see_all.link&&u.see_all.label})]},`list-${u.label}-${m}`)}),t&&r.jsx(d.Utils.Divider,{size:"small",direction:"vertical"})]})};pl.displayName="Menu.Categories";const hl=({children:e,dividerOnBottom:t=!0,...n})=>{const{CONSTANTS:s}=Pe();return r.jsxs(r.Fragment,{children:[r.jsx("div",{...n,className:Jr["menu-desktop"],style:{...n.style,justifyContent:s.header.ALIGNMENT_MENU},children:e}),t&&r.jsx(d.Utils.Divider,{size:"small"})]})};hl.displayName="Menu.MenuRoot";const Cr={Root:hl,Categories:pl,Thumbnail:fl},_l=()=>{const{headerData:e,CONSTANTS:t}=Pe(),n=ui(),{reset:s}=nn();return r.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===n,m=i==null?void 0:i.some(f=>!!f.srcDesk);return r.jsxs(Cr.Root,{id:l,style:u?{display:"flex",zIndex:t.header.Z_INDEX_WAR.menu_desktop}:{display:"none"},dividerOnBottom:u,children:[r.jsx(Cr.Categories,{dividerOnRight:!!m,subMenu:o}),Array.isArray(i)&&r.jsx(Cr.Thumbnail,{thumbnails:i,isMobile:!1,category:c,callBack:s})]},`submenu-${l}-${a}`)})})};_l.displayName="Header.SubMenu";const gl=()=>{const{handleSelectContent:e}=ae(),{CONSTANTS:t}=Pe();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"})})})};gl.displayName="Header.WishList";const $p="_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:$p},yl=({className:e,children:t,...n})=>r.jsx("div",{...n,className:d.helpers.classNameConcat(We["user-menu--content"],e),children:t});yl.displayName="UserMenu.Content";var xl=(e=>(e.Account="account",e))(xl||{});const vl=({className:e,cashBack:t,credits:n,link:s,total:o,...a})=>{const i=t?F.formatPriceToCurrency(t):void 0,c=n?F.formatPriceToCurrency(n):void 0,l=o?F.formatPriceToCurrency(o):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:s,totalValue:l,type:xl.Account})};vl.displayName="UserMenu.Credits";const bl=({className:e,children:t,description:n,text:s,...o})=>{const{isMobile:a}=ne();return r.jsx("div",{...o,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:s}),r.jsx("p",{children:n})]})}),t]})})};bl.displayName="UserMenu.Login";const jl=({className:e,isLogged:t,onLogoutClick:n,ICONS:s,storeConfig:o,isMobile:a})=>{const i=a?ho:ho({ICONS:s,storeConfig:o}).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:`${o.secureSubdomain}/api/vtexid/pub/logout?scope=mariafilo&returnUrl=${encodeURIComponent(`${o.storeUrl}`)}`,size:"small",disableUnderline:!0,onClick:n,adornments:{start:r.jsx(d.Icon,{name:gf(s)})},children:_f})}):r.jsx(r.Fragment,{})]})};jl.displayName="UserMenu.Menu";const Cl=e=>{const t=g.useRef(null),n=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",n),document.addEventListener("keydown",o),document.addEventListener("touchstart",s),()=>{document.removeEventListener("mousedown",n),document.removeEventListener("keydown",o),document.removeEventListener("touchstart",s)}),[n,o,s]),{ref:t}},Vp=e=>{if(!e||typeof window>"u")return 0;const t=window.getComputedStyle(e);return parseInt(t.padding,10)},Wp=(e,t,n)=>{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?Vp(e==null?void 0:e.parentElement):0;return{left:o+i/2-(c.width+l*2),top:a+s+n}},Sl=g.createContext({}),Gp=({children:e,delay:t=600,gap:n=20,isOpen:s,setIsOpen:o,target:a,...i})=>{const c=g.useRef(null),[l,u]=g.useState(!1),[m,f]=g.useState({left:0,top:0}),{ref:p}=Cl(()=>{u(!0),typeof window<"u"&&(c.current=window.setTimeout(()=>{o(!1),u(!1)},t))});return g.useEffect(()=>{if(a&&(p!=null&&p.current)){const{left:h,top:_}=Wp(p.current,a,n??0);f({left:h,top:_}),u(!1)}},[n,s,a,p]),r.jsx(Sl.Provider,{value:g.useMemo(()=>({...i,...m,contentRef:p,isLeaving:l,isOpen:s,setIsOpen:o,setIsLeaving:u,target:a}),[i,m,p,l,s,o,u,a]),children:e})},wl=()=>{const e=g.useContext(Sl);if(e===void 0)throw new Error("useUserMenuContext must be used within a UserMenuProvider");return e},Pl=({children:e,isMobile:t=!1,Z_INDEX_WAR:n})=>{const{isOpen:s,setIsOpen:o}=wl();return r.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: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})]})};Pl.displayName="UserMenu.Modal";const El=({children:e,component:t,Z_INDEX_WAR:n,isMobile:s,...o})=>r.jsx(Gp,{...o,className:We.root,children:s?r.jsxs(r.Fragment,{children:[r.jsx(mt.Modal,{Z_INDEX_WAR:n,children:t}),e]}):r.jsx(mt.Tooltip,{component:t,style:{width:304,zIndex:n.user_menu},Z_INDEX_WAR:n,children:e})});El.displayName="UserMenu.Root";const Nl=({children:e,component:t,Z_INDEX_WAR:n,...s})=>{const{contentRef:o,left:a,isLeaving:i,isOpen:c,top:l}=wl();return r.jsx(d.Tooltip.Root,{arrow:"top-right",component:r.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:n.user_menu},children:r.jsx("div",{className:We["user-menu--tooltip"],children:e})})};Nl.displayName="UserMenu.Tooltip";const mt={Credits:vl,Content:yl,Login:bl,Menu:jl,Modal:Pl,Root:El,Tooltip:Nl},Yn=({children:e,isOpen:t,setIsOpen:n,desktopUserMenuTarget:s,mobileUserMenuTarget:o,storeConfig:a})=>{var h,_,y;const{isMobile:i}=ne(),{CONSTANTS:c}=Pe(),l=qt(),u=()=>{window.location.href=`${a.secureSubdomain}/api/io/login?returnUrl=${encodeURIComponent(`${window.location.href}`)}`},m=!!((h=l.user)!=null&&h.userId),{cashback:f,credits:p}=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(mt.Root,{component:r.jsxs(mt.Content,{children:[r.jsx(mt.Login,{description:xf(m),text:yf(m,((_=l==null?void 0:l.user)==null?void 0:_.firstName)??((y=l==null?void 0:l.user)==null?void 0:y.email)),children:!m&&r.jsx(d.Button,{id:"conta",size:"medium",variant:"quaternary",onClick:()=>u(),children:c.header.MENU_INFO.login.button_text})}),p+f&&m?r.jsx(mt.Credits,{credits:p,cashBack:f,link:`${a.secureSubdomain}/account#/meus-creditos`,total:p+f}):r.jsx(r.Fragment,{}),r.jsx(d.Utils.Divider,{}),r.jsx(mt.Menu,{ICONS:c.header.ICONS,storeConfig:a,isLogged:m,className:F.responsive["responsive-desktop-flex"],onLogoutClick:()=>l.logout()}),r.jsx(mt.Menu,{ICONS:c.header.ICONS,storeConfig:a,isMobile:!0,isLogged:m,className:F.responsive["responsive-mobile-flex"],onLogoutClick:()=>l.logout()})]}),isOpen:t,isMobile:i,setIsOpen:n,target:i?o:s,Z_INDEX_WAR:c.header.Z_INDEX_WAR,children:e})};Yn.displayName="UserMenu";const Il=({storeConfig:e})=>{const{CONSTANTS:t}=Pe(),{handleSelectContent:n}=ae(),{reset:s}=nn(),{setValue:o}=Is(),a=Ns(),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:s,children:r.jsx(d.Icon,{name:t.header.ICONS.logo,onClick:()=>{n({content:"header:logo"})}})})}),r.jsx(ml,{}),r.jsxs(d.Header.Support,{onMouseEnter:s,style:{justifyContent:"flex-end"},children:[r.jsx(Up,{}),r.jsx(Yn,{isOpen:a,setIsOpen:o,desktopUserMenuTarget:i.current,storeConfig:e,children:r.jsx(d.Header.SupportItem,{onClick:()=>{o(!0),n({content:"header:user_menu"})},className:Qs["btn-login"],innerRef:i,children:r.jsx(d.Icon,{name:t.header.ICONS.person,size:"medium"})})}),r.jsx(gl,{}),r.jsx(Zs,{id:"cart-button"})]})]}),r.jsx(_l,{})]})};Il.displayName="Header.HeaderDesktopWrapper";const Ue={"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"},Rl=({children:e,mobileBannerAlt:t,mobileBannerSrc:n,textColor:s,submenuId:o,label:a,...i})=>r.jsx("button",{...i,className:Ue["menu--banners--item"],children:n?r.jsxs(d.Banner.Container,{children:[r.jsx(d.Banner.ImageWrapper,{children:r.jsx(Ne.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:Ue["menu--banners--item--text"],children:r.jsx("h2",{className:"typography-style-body-xs",style:s?{color:s}:{},children:e})})})})]}):r.jsx("h2",{...i,children:e})});Rl.displayName="Menu.Mobile.Category";const Tl=({label:e,...t})=>{const{CONSTANTS:n}=Pe();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})};Tl.displayName="Menu.Mobile.Body.Category";const Al=({subCategory:e,submenuLabel:t,onHandleOut:n,...s})=>r.jsx("div",{...s,className:Ue["menu--sub-category--list"],children:Array.isArray(e==null?void 0:e.items)&&(e==null?void 0:e.items.map((o,a)=>r.jsx(Le,{disableUnderline:!0,disablePadding:!1,href:o.link??"#",onClick:()=>n(o.label,t),size:"medium",title:o.label??"",children:o.label},a)))});Al.displayName="Menu.Mobile.List";const kl=({current:e,onHandleOut:t})=>{var n;return e?r.jsx("div",{className:Ue["menu--sub-category"],children:Array.isArray(e==null?void 0:e.subCategories)&&((n=e==null?void 0:e.subCategories)==null?void 0:n.map((s,o)=>r.jsxs("div",{className:Ue["menu--sub-category--item"],children:[r.jsx(Yt.Title,{onHandleOut:t,subCategory:s,submenuLabel:e==null?void 0:e.id}),r.jsx(Yt.List,{onHandleOut:t,subCategory:s,submenuLabel:e==null?void 0:e.id})]},o)))}):r.jsx(r.Fragment,{})};kl.displayName="Menu.Mobile.Body.SubCategory";const Ol=({subCategory:e,submenuLabel:t,onHandleOut:n,...s})=>{var c;const{router:o}=le(),{handleSelectContent:a}=ae(),{CONSTANTS:i}=Pe();return r.jsxs("div",{...s,className:Ue["menu--categories--title"],children:[r.jsx(on,{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&&o.push(e.see_all.link)},children:e.see_all.label})]})};Ol.displayName="Menu.Mobile";const Yt={Banner:Rl,Category:Tl,List:Al,SubCategory:kl,Title:Ol},Ll=g.createContext({}),Kp=({children:e})=>{const[t,n]=g.useState(null),s=g.useCallback(()=>{n(null)},[]),o=a=>{a!==t&&n(a)};return r.jsx(Ll.Provider,{value:{currentCategory:t,setCurrentCategory:n,handleCloseMenu:s,handleChangeSubMenuOpened:o},children:e})},Ml=()=>g.useContext(Ll),Dl=e=>{const{router:t}=le(),{headerData:n}=Pe(),{handleSelectContent:s}=ae(),{currentCategory:o,setCurrentCategory:a}=Ml(),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()},m=Array.isArray(n==null?void 0:n.categories)?n==null?void 0:n.categories:[],f=Array.isArray(n==null?void 0:n.subMenus)?n==null?void 0:n.subMenus:[],p=h=>{h.submenuId?a(h.submenuId):l(h.label,h.link)};return r.jsxs("div",{...e,className:Ue["menu--body"],style:{transform:`translate3d(calc(-100% * ${o?1:0}), 0px, 0px)`},children:[r.jsx("button",{className:Ue["menu--dummy-close"],ref:i,"data-close":!0}),r.jsxs("div",{className:Ue["menu--step"],"data-active":"true",children:[r.jsx("div",{className:Ue["menu--banners"],children:r.jsx("div",{className:Ue["menu--banners--list"],children:m.map((h,_)=>g.createElement(Yt.Banner,{...h,key:_,onClick:()=>l(h.label,h.link)},h.mobileBannerAlt))})}),r.jsx("div",{className:Ue["menu--categories"],children:m.map((h,_)=>r.jsx(Yt.Category,{label:h.label,onClick:()=>p(h)},_))})]}),r.jsx("div",{className:Ue["menu--step"],"data-active":!!o,children:r.jsx(Yt.SubCategory,{current:f.find(h=>h.id===o),onHandleOut:u})})]})};Dl.displayName="Menu.Mobile.Body";const Xp={"menu--header":"_menu--header_1ozdf_1"},Fl=()=>{var o;const{headerData:e}=Pe(),{currentCategory:t,setCurrentCategory:n}=Ml(),s=(o=e==null?void 0:e.categories)==null?void 0:o.find(a=>a.submenuId===t);return r.jsxs("div",{className:Xp["menu--header"],children:[r.jsx(d.Button,{"data-out":!s,iconNameStart:"arrow-left",mode:"inverse",onClick:()=>n(null)}),s&&r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{alignContent:"center",children:r.jsx("h2",{className:"typography-style-body-lg",children:s==null?void 0:s.label})})}),r.jsx(d.Button,{iconNameStart:"close","data-close":!0,"data-only":!s,mode:"inverse",onClick:()=>n(null)})]})};Fl.displayName="Menu.Mobile.Header";var es={exports:{}};function Yp(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 Sr={},wr={},Ko;function Qp(){return Ko||(Ko=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")}(wr)),wr}var Xo;function Zp(){return Xo||(Xo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return h}});const n=Oe._(g),s=Qp();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 P=new m(_,x);v={getCurrentValue:P.getCurrentValue.bind(P),subscribe:P.subscribe.bind(P),retry:P.retry.bind(P),promise:P.promise.bind(P)}}return v.promise()}if(typeof window>"u"&&a.push(C),!c&&typeof window<"u"){const P=x.webpack&&typeof Yp.resolveWeak=="function"?x.webpack():x.modules;P&&i.push(w=>{for(const S of P)if(w.includes(S))return C()})}function j(){C();const P=n.default.useContext(s.LoadableContext);P&&Array.isArray(x.modules)&&x.modules.forEach(w=>{P(w)})}function b(P,w){j();const S=n.default.useSyncExternalStore(v.subscribe,v.getCurrentValue,v.getCurrentValue);return n.default.useImperativeHandle(w,()=>({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(o(S.loaded),P):null,[P,S])}return b.preload=()=>C(),b.displayName="LoadableComponent",n.default.forwardRef(b)}class m{promise(){return this._res.promise}retry(){this._clearTimeouts(),this._res=this._loadFn(this._opts.loader),this._state={pastDelay:!1,timedOut:!1};const{_res: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 f(_){return u(l,_)}function p(_,y){let x=[];for(;_.length;){let v=_.pop();x.push(v(y))}return Promise.all(x).then(()=>{if(_.length)return p(_,y)})}f.preloadAll=()=>new Promise((_,y)=>{p(a).then(_,y)}),f.preloadReady=_=>(_===void 0&&(_=[]),new Promise(y=>{const x=()=>(c=!0,y());p(i,_).then(x,x)})),typeof window<"u"&&(window.__NEXT_PRELOADREADY=f.preloadReady);const h=f}(Sr)),Sr}(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function n(m,f){for(var p in f)Object.defineProperty(m,p,{enumerable:!0,get:f[p]})}n(t,{default:function(){return u},noSSR:function(){return l}});const s=Oe,o=r,a=s._(Zp()),i=typeof window>"u";function c(m){return{default:(m==null?void 0:m.default)||m}}function l(m,f){if(delete f.webpack,delete f.modules,!i)return m(f);const p=f.loading;return()=>(0,o.jsx)(p,{error:null,isLoading:!0,pastDelay:!1,timedOut:!1})}function u(m,f){let p=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}};m instanceof Promise?h.loader=()=>m:typeof m=="function"?h.loader=m:typeof m=="object"&&(h={...h,...m}),h={...h,...f};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(p,h)):p({...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)})(es,es.exports);var Jp=es.exports,eh=Jp;const zl=F.getDefaultExportFromCjs(eh),Ln={"modal-modifier":"_modal-modifier_10zw4_1","menu--navigation-bar":"_menu--navigation-bar_10zw4_15","menu--root":"_menu--root_10zw4_26"},Bl=({children:e})=>{const{menuIsOpen:t,setMenuIsOpen:n}=ks(),{CONSTANTS:s}=Pe();return r.jsxs(d.Modal.RootWithoutPortal,{className:d.helpers.classNameConcat(Ln["modal-modifier"],"menu-mobile-root"),isOpen:t,setIsOpen:n,variant:"sideRight",style:{bottom:"unset",overflowY:"hidden",position:"fixed",top:0,zIndex:s.header.Z_INDEX_WAR.menu_mobile},children:[r.jsx(Fl,{}),r.jsx(d.Modal.Body,{className:Ln["menu--root"],children:e})]})};Bl.displayName="Menu.MenuRoot";const th=zl(()=>Promise.resolve(Bl),{ssr:!1}),Ul=({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:Ln.divider})]});Ul.displayName="Menu.NavigationBarItem";const ql=()=>{const{setUserMenuIsOpen:e}=ks(),{handleSelectContent:t}=ae(),{CONSTANTS:n}=Pe(),{router:s}=le(),o=[{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"}),s.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"}),s.push("/institucional/lojas")},text:n.header.MENU_INFO.store.button_text}];return r.jsx(d.Card,{id:"menu-navigationbar",shadow:!0,className:Ln["menu--navigation-bar"],style:{zIndex:n.header.Z_INDEX_WAR.menu_mobile_navigation_bar},children:Array.isArray(o)&&o.map((a,i)=>g.createElement(Ul,{...a,key:i},a.text))})};ql.displayName="Menu.NavigationBar";const Pr={Body:Dl,NavigationBar:ql,Root:th},Hl=({storeConfig:e})=>{const t=g.useRef(null),{CONSTANTS:n}=Pe(),{MENU_NAVIGATION_BAR_ALLOWED:s,ICONS:o}=n.header,{handleSelectContent:a}=ae(),{setValue:i}=Un(),{setValue:c}=fi(),{setValue:l}=Is(),u=Ns(),m=mi(),{isMobile:f}=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:o.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:o.search,size:"medium"})}),r.jsx(Zs,{}),r.jsxs(d.Header.SupportItem,{onClick:()=>c(!0),children:[r.jsx("span",{ref:t}),r.jsx(d.Icon,{name:o.menu,size:"medium"})]})]})]}),f&&r.jsx(Ni,{menuIsOpen:m,setMenuIsOpen:c,userMenuIsOpen:m,setUserMenuIsOpen:l,children:r.jsx(Yn,{storeConfig:e,isOpen:u,setIsOpen:l,mobileUserMenuTarget:t==null?void 0:t.current,children:r.jsxs(Pr.Root,{children:[r.jsx(Pr.Body,{}),s?r.jsx(Pr.NavigationBar,{}):r.jsx(r.Fragment,{})]})})})]})};Hl.displayName="Header.HeaderMobileWrapper";const nh=g.createContext({}),rh=({children:e})=>{const{sendDataLayerEvent:t}=ae(),{cartStore:n,isOpen:s}=ve();g.useEffect(()=>{s&&t({functionKey:"viewCartEvent",data:{commonData:{cartStore:n}}})},[s]),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;bt.post("/api/checkout/order-form/attachments/marketing-data",{orderFormId:l,marketingData:{...n==null?void 0:n.marketingData,marketingTags:ei(((c=n.marketingData)==null?void 0:c.marketingTags)??[])}}).catch(u=>{console.error(u)})}},[n]);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 r.jsx(nh.Provider,{value:{handleUpdateItemQuantityEvent:o},children:e})},sh="var(--color-background-brand-primary-lighter)",oh="_fadeInOut_1l5ow_1",ah="_fadeOut_1l5ow_1",re={brandPrimaryLighter:sh,"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:oh,fadeOut:ah,"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"},$l=({item:{id:e,message:t,callback:n},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 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:o.close,iconSize:"small",onClick:()=>i(),variant:"tertiary"})]})]})},e)};$l.displayName="MiniCart.Notify.Item";const Vl=({ICONS:e})=>{const t=Ps(),{removeNotification:n}=Es(),s=t.length?[...t].sort((o,a)=>a.id-o.id):[];return s.length?r.jsx("div",{className:re["mc--notify"],children:r.jsx("div",{className:re["mc--notify--content"],children:Array.isArray(s)&&s.map(o=>r.jsx($l,{item:o,removeNotification:n,ICONS:e},o.id))})}):null};Vl.displayName="MiniCart.Notifications";const ih=({handleSendEvent:e,onHandleRemove:t,product:n,MINICART_CONFIG:s,...o})=>{const a=Ut(),{toggleProduct:i}=It(),{itemOffered:{isVariationOf:{productGroupID:c}},quantity:l}=n;return r.jsx(d.Button,{...o,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:`${s.messages.add_wishlist}`},l,()=>i(c)),e(a.includes(c)?"remove_from_wishlist":"add_to_wishlist","productEvents")},children:s.messages.add_wishlist_button})},Wl=({handleSendEvent:e,product:t,ICONS:n,MINICART_CONFIG:s,...o})=>{const{addToCart:a,removeToCart:i}=ve(),{bundleItems:c=[],id:l,uniqueId:u,seller:m,offerings:f,quantity:p}=t,h=(_,y,x)=>{i(l,_.title,()=>{typeof x=="function"&&x(),a({id:l,quantity:y,seller:m},{id:l,texture:_.texture},!0)})};return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:re["mc--card--actions--add-remove"],children:[s.has_wishlist_button&&r.jsx(ih,{...o,product:t,handleSendEvent:e,onHandleRemove:h,ICONS:n,MINICART_CONFIG:s}),r.jsx(d.Button,{...o,adornment:{end:r.jsx(d.Icon,{name:n.delete,size:"small"})},underline:!0,variant:"secondary",state:"danger",onClick:()=>{h({texture:"mini-cart",title:`${s.messages.remove}`},p),e("remove_from_cart","skuEvents")},children:s.messages.remove_button})]}),s.has_gift_option&&r.jsx(Ot.Gift,{uniqueId:u,bundleItems:c,offerings:f,ICONS:n,MINICART_CONFIG:s})]})};Wl.displayName="MiniCart.Card.Actions";const Gl=({bundleItems:e,offerings:t,uniqueId:n,ICONS:s,MINICART_CONFIG:o})=>{const[a,i]=g.useState(!1),{toggleGiftItemCart:c}=ve(),l=()=>{if(t instanceof Object&&Array.isArray(t)){const[f]=t;if(f){i(!0);const p=e.some(h=>h.id===f.id);c(n,String(f.id),p).then(()=>i(!1))}}},u=t[0],m=e.find(f=>f.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:s.check}),checked:!!m,disabled:a,label:o.messages.giftPackage,onChange:l})}):null};Gl.displayName="MiniCart.Card.Gift";const Kl=({itemOffered:e})=>{const t=F.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(Ne.Image,{alt:(e==null?void 0:e.image[0].alternateName)||"Produto",src:t||"",width:108,height:164,objectFit:"unset"})})};Kl.displayName="MiniCart.Card.Media";const Xl=({name:e,skuName:t,tagName:n,className:s})=>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"],s),children:F.getProductNameWithoutSku(e??"",t??"")})]});Xl.displayName="MiniCart.Card.Name";const Yl=({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:F.formatPriceToCurrency(t),size:"small"}),r.jsx(d.ProductInfo.Price,{label:"discountPrice",value:F.formatPriceToCurrency(e),size:"small"})]}):r.jsx(d.ProductInfo.Price,{label:"defaultPrice",value:F.formatPriceToCurrency(e),size:"small"})})})})});Yl.displayName="MiniCart.ProductPrice";const Ql=({product:e,TEXTURE_IMAGE:t,TOGGLE_STYLE_MODIFIER:n})=>{var u;const[s,o]=g.useState(""),a=g.useRef(null),{cartStore:{options:i}}=ve(),c=e.itemOffered.isVariationOf.productGroupID,l=g.useCallback(()=>{var f;const m=(f=i==null?void 0:i.find(p=>p.id===c))==null?void 0:f.texture;if(m){o(m);return}fetch("/api/catalog/product/info",{method:"POST",priority:"low",body:JSON.stringify({ids:[c]})}).then(p=>p.json()).then(p=>{const h=p.data[0].items.find(_=>_.itemId===e.id);if(h){const _=h.images.find(y=>t.includes(y.imageLabel));if(_!=null&&_.imageUrl){o(_.imageUrl);return}o(h.images[0].imageUrl)}}).catch(p=>{console.error(p)})},[i,c,e.id]);return g.useEffect(()=>{if(!a.current)return;const m=new IntersectionObserver(f=>{f[0].isIntersecting&&l()});return m.observe(a.current),()=>{m.disconnect()}},[l]),r.jsx("div",{ref:a,children:r.jsx(d.ToggleStyle.Wrapper,{size:"small",style:n,children:r.jsx(d.ToggleStyle.Texture,{children:s?r.jsx(Ne.Image,{alt:((u=e.itemOffered)==null?void 0:u.image[0].alternateName)??"Produto",src:s,width:164,height:164,style:n}):r.jsx(bc,{})})})})};Ql.displayName="MiniCart.Card.Style";const Zl=({product:e,MINICART_CONFIG:t,NAME_SPLIT_SYMBOL:n,TEXTURE_IMAGE:s,TOGGLE_STYLE_MODIFIER:o})=>{const{size:a}=F.getColorAndSizeFromSkuName(e.itemOffered.skuName??"",n);return r.jsxs(d.Utils.Row,{alignItems:"center",children:[r.jsx(Ql,{product:e,TEXTURE_IMAGE:s,TOGGLE_STYLE_MODIFIER:o}),r.jsx(d.Utils.Divider,{direction:"vertical",size:"small",style:{height:24}}),a&&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:a})})]})};Zl.displayName="MiniCart.Card.Sku";const Ot={Actions:Wl,Gift:Gl,Media:Kl,Name:Xl,Price:Yl,Sku:Zl},ch=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}},Jl=({available:e=!0,index:t,product:n,ICONS:s,MINICART_CONFIG:o,NAME_SPLIT_SYMBOL:a,TEXTURE_IMAGE:i,TOGGLE_STYLE_MODIFIER:c})=>{var f,p;const{sendDataLayerEvent:l}=ae(),u=ch(n),m=(h,_)=>{const y={commonData:{...n,...u},customData:{index:t},event:h};if(_==="skuEvents"){const x={...n,...u};y.supportData={selectedSkus:[x]},y.commonData.products=[x]}l({functionKey:_,data:y})};return r.jsxs("div",{className:d.helpers.classNameConcat(re["mc--card"],e?"":re["mc--card--unavailable"]),children:[r.jsx(Ot.Media,{itemOffered:n.itemOffered}),r.jsxs("div",{className:re["mc--card--content-info"],children:[r.jsx(Ot.Name,{name:((f=n.itemOffered)==null?void 0:f.name)??"",skuName:(p=n.itemOffered)==null?void 0:p.skuName}),r.jsxs("div",{className:re["mc--card--details"],children:[r.jsx("div",{className:re["mc--card--actions"],children:e?r.jsx(Ot.Price,{total:u.price,totalList:u.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(Ot.Sku,{product:n,MINICART_CONFIG:o,NAME_SPLIT_SYMBOL:a,TEXTURE_IMAGE:i,TOGGLE_STYLE_MODIFIER:c}),r.jsx(Ot.Actions,{handleSendEvent:m,product:n,size:"small",variant:"tertiary",ICONS:s,MINICART_CONFIG:o})]})]})]})]})};Jl.displayName="MiniCart.Card";const eu=({type:e="positive",ICONS:t,MESSAGE_CASHBACK:n})=>{var a;const{toExpire:s}=qt(),o=((a=s==null?void 0:s.cashback)==null?void 0:a.reduce((i,c)=>i+c.remaining_value,0))??0;return o>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:F.formatPriceToCurrency(o)})," ",n.title]})]}):null};eu.displayName="MiniCart.Cashback";const tu=({type:e,ICONS:t,MINICART_CONFIG:n})=>{const{addCouponSeller:s,removeCoupon:o,removeSellerCode:a,cartStore:{marketingData:i,openTextField:c}}=ve(),[l,u]=g.useState(!1),[m,f]=g.useState(!1),p=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(!!p()),y=async x=>{f(!0),!!p()&&(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(()=>f(!1))};return r.jsx(De.Field,{hasError:l,hasSuccess:h,isLoading:m,onHandler:y,type:e,title:e==="coupon"?`${n.messages.descount_cupom_placeholder}`:`${n.messages.sellers_code_placeholder}`,value:p(),MINICART_CONFIG:n,ICONS:t})};tu.displayName="MiniCart.CouponSeller";const nu=({ICONS:e,MINICART_CONFIG:t,PLP_NOT_RESULT:n})=>{const{router:s}=le(),o=()=>{s.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:()=>o(),"data-close":!0,adornment:{end:r.jsx(d.Icon,{name:e.arrow_right,size:"medium"})},children:t.messages.empty_bag})]})};nu.displayName="MiniCart.Feedback";const lh=e=>{const t=e.replace(/\D/g,"");return t.length>5?`${t.slice(0,5)}-${t.slice(5,8)}`:t},ru=({feedback:e,hasError:t,onHandler:n,hasSuccess:s,type:o,title:a,value:i,ICONS:c})=>{const[l,u]=g.useState(i);g.useEffect(()=>{t||u(i)},[i,t]);const m=()=>t?r.jsx(d.Icon,{name:c.delete_circle}):String(i).length&&s?r.jsx(d.Icon,{name:c.check_circle}):null,f=()=>{if(o==="seller"){const y=String(i).includes(" - ")?String(i).split(" - ")[0]:l;u(y)}},p=()=>{if(o==="seller"){const y=String(i).includes(" - ")?i:l;u(y)}},h=y=>{const x=y.currentTarget.value;if(x===""&&typeof n=="function"||s&&String(i).length>0&&x!==String(i)||t&&x!==String(i)){u(""),n("");return}if(o==="cep"){const C=lh(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:m()},mode:"over-label",label:a,feedback:e,value:l,type:"text",onFocus:f,onBlur:p,onChange:h,onKeyDown:_})};ru.displayName="MiniCart.Field.Input";const su=({title:e,ICONS:t,MINICART_CONFIG:n,...s})=>{const o=g.useRef(null),{hasSuccess:a,hasError:i,isLoading:c,onHandler:l,type:u,value:m}=s,f=()=>i?"error":String(m).length&&a?"success":"none",p=g.useCallback(()=>{if(o.current){const y=o.current.querySelector("input");y&&typeof l=="function"&&(m!==""||i?(l(""),y.value=""):l((y==null?void 0:y.value)??""))}},[l,m,i]),h=f();return r.jsx("div",{ref:o,children:r.jsx(d.TextField.Structure,{className:re["mc--field"],input:r.jsx(ru,{...s,feedback:h,title:e,ICONS:t}),right:r.jsx(d.Button,{"data-has-success":!a,size:"medium",title:String(m).length&&a||i?"Remover":"Aplicar",onClick:()=>p(),disabled:c,children:String(m).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})})};su.displayName="MiniCart.Field";const Yo=e=>{const t=e*100;return Math.round(t)},uh=e=>(e/100).toFixed(2).replace(".",","),dh=(e,t)=>{const{valueType:n,remainingValueToActivate:s}=e;if(n==="quantity")return`Adicione mais ${s} ${s===1?"item":"itens"} ${t}`;if(n==="price"){const o=s===100?"Falta":"Faltam",a=uh(s);return`${o} R$ ${a} ${t}`}return t},ou=({ICONS:e})=>{var v;const{promotionRules:t,data:n,cartStore:s,cartStore:{items:o,marketingData:a},addCouponSeller:i,setIsOpen:c}=ve(),{sendDataLayerEvent:l}=ae(),u=(v=n==null?void 0:n.promotion)==null?void 0:v.promotionCart,m=g.useRef(!1),{router:f}=le();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)&&!m.current&&(a==null?void 0:a.coupon)!==u.cupom&&(m.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&&(m.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 p=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:dh(t,p),subtitle:h,percentage:Yo(t.completeness),iconLink:e.arrow_right,linkLabel:x,onClick:()=>{l({functionKey:"viewCartEvent",data:{event:"closeness_view_more",commonData:{cartStore:s}}}),f.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:Yo(t.completeness)})]})};ou.displayName="MiniCart.Modal.Body.Promotion";const au=({TIPBAR_CONFIGS:e})=>{const{data:t,cartStore:n,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),[m,f]=g.useState(!1);if(g.useEffect(()=>{l&&setTimeout(()=>{u(!1)},e.snackbar_timeout)},[l]),g.useEffect(()=>{m&&setTimeout(()=>{f(!1)},e.snackbar_timeout)},[m]),!i||i.active==="Desativar"||i.valueCupom===""||s.length===0)return null;const p=async()=>{if(!n.items.length){f(!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:p,disabled:c,children:c?"Cupom Aplicado":"Aplicar Cupom"})})]})};au.displayName="MiniCart.Modal.Body.CouponTag";const iu=({children:e,ICONS:t,MINICART_CONFIG:n,NAME_SPLIT_SYMBOL:s,PLP_NOT_RESULT:o,TEXTURE_IMAGE:a,TIPBAR_CONFIGS:i,TOGGLE_STYLE_MODIFIER:c})=>{const{cartStore:{items:l,messages:u}}=ve();return r.jsxs(d.Modal.Body,{className:re["mc--body"],children:[e,r.jsx(ou,{ICONS:t}),r.jsx(au,{TIPBAR_CONFIGS:i}),r.jsx("div",{className:re["mc--body--products"],children:Array.isArray(l)&&l.length?l.map((m,f)=>{const p=u.find(h=>{var _;return h.code==="withoutStock"&&((_=h.fields)==null?void 0:_.ean)===m.ean})!==void 0;return r.jsx(De.Card,{available:!m.availability.includes("outStock")||!p,index:f,product:m,ICONS:t,MINICART_CONFIG:n,NAME_SPLIT_SYMBOL:s,TEXTURE_IMAGE:a,TOGGLE_STYLE_MODIFIER:c},`${m.id}-${m.itemOffered.sku}-${f}`)}):r.jsx(De.Feedback,{ICONS:t,MINICART_CONFIG:n,PLP_NOT_RESULT:o})})]})};iu.displayName="MiniCart.Body";const cu=({children:e,storeConfig:t,MINICART_CONFIG:n})=>{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 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:o,children:n.messages.checkout_button})})]})};cu.displayName="MiniCart.Modal.Footer";const lu=({children:e,ICONS:t,MINICART_CONFIG:n,Z_INDEX_WAR:s})=>{const[o,a]=g.useState(!1),i=g.useRef(null),c=()=>a(l=>!l);return r.jsxs(r.Fragment,{children:[o&&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:s.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})]})]})};lu.displayName="MiniCart.Discount";const uu=({discount:e,shipping:t,total:n})=>{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=n-Math.abs(e??0)+(t??0),i=t===0?"Frete Grátis":F.formatPriceToCurrency((t??0)/100),c=[{title:"Frete",value:t===void 0?"A calcular":i},{title:"Desconto",value:F.formatPriceToCurrency((e??0)/100)},{message:(o==null?void 0:o.value)??"",title:"Total",value:`1x de ${F.formatPriceToCurrency(a/100)}`}];return r.jsx("div",{className:re["mc--footer--total"],children:Array.isArray(c)&&c.map((m,f)=>r.jsxs("div",{className:re["mc--footer--total--info"],"data-discount":m.title==="Desconto",children:[r.jsx("p",{children:m.title}),r.jsxs("div",{className:re["mc--footer--total--info--content"],children:[m.message&&(o==null?void 0:o.active)==="Ativar"&&r.jsx(d.Tag,{variant:"primary",title:m.message,style:{backgroundColor:o==null?void 0:o.tagColor,color:o==null?void 0:o.textColor},children:m.message}),r.jsx(d.ProductInfo.Price,{className:re["mc--footer--total--info"],label:m.title,value:m.value})]})]},f))})};uu.displayName="MiniCart.Modal.Footer.Resume.Items";const du=()=>{var o,a,i;const{totalizers:e}=Ct(),t=((o=e.find(c=>c.id==="Items"))==null?void 0:o.value)??0,n=(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 r.jsx(uu,{discount:n??0,total:t,shipping:s})};du.displayName="MiniCart.Modal.Footer.Totals";const mu=({ICONS:e,MINICART_CONFIG:t})=>{const{isMobile:n}=ne(),{cartStore:{items:s}}=ve(),o=s.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:o!==1?`[${o}] Produtos`:`[${o}] Produto`}),r.jsx(d.Button,{"data-close":!0,iconNameStart:e.close,size:"small",variant:"tertiary"})]})})};mu.displayName="MiniCart.Modal.Header";const fu=({ICONS:e,MINICART_CONFIG:t})=>{const{cartStore:{shippingData:n},shipping:s,removeCEP:o}=ve(),{sendDataLayerEvent:a}=ae(),[i,c]=g.useState(!1),[l,u]=g.useState(!1),m=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]),[f,p]=g.useState(!!m()),h=()=>{p(!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 P=(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(!P)return j;const w=parseInt(String((P==null?void 0:P.shippingEstimate)??"").replace("bd","")),S=Number((((P==null?void 0:P.price)??0)/100).toFixed(2));if(j.shipping_tier===void 0)return j.shipping_tier=b==null?void 0:b.selectedSla,j.delivery_time=w.toString(),j.shipping=S,j.flag_retirada=(b==null?void 0:b.selectedDeliveryChannel)==="delivery"?"false":"true",j;const E=parseInt(j.delivery_time??"0");return w>E&&(j.delivery_time=w.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 bt.get(`https://viacep.com.br/ws/${C}/json/`)).data.erro}catch{return!1}},x=async v=>{if(u(!0),!!m()||!(v!=null&&v.trim())){await o(),h(),u(!1);return}if(!await y(v)){c(!0),p(!1),u(!1);return}try{const P=await s(v);if(c(!1),P){p(!0);const w=_(P);w&&a({functionKey:"readyEvents",data:{event:"search_zipcode",readyData:w}})}}catch{c(!0)}finally{u(!1)}};return r.jsx(De.Field,{hasSuccess:f,hasError:i,isLoading:l,onHandler:x,title:`${t.messages.shipping_calculation_placeholder}`,type:"cep",value:m(),ICONS:e,MINICART_CONFIG:t})};fu.displayName="MiniCart.Shipping";const pu=()=>{var n,s;const{data:e}=ve(),t=(s=(n=e==null?void 0:e.flags)==null?void 0:n.flagCart)==null?void 0:s.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:iu,Card:Jl,Cashback:eu,CouponSeller:tu,Discount:lu,Field:su,Feedback:nu,Shipping:fu,Footer:cu,Header:mu,TagMessage:pu,Totals:du},mh=({ICONS:e,MINICART_CONFIG:t,NAME_SPLIT_SYMBOL:n,PLP_NOT_RESULT:s,TEXTURE_IMAGE:o,TIPBAR_CONFIGS:a,TOGGLE_STYLE_MODIFIER:i,Z_INDEX_WAR:c,storeConfig:l,minicartStyleModifiers:u})=>{const{isOpen:m,setIsOpen:f}=ve(),{isMobile:p}=ne();return r.jsxs(d.Modal.Root,{className:d.helpers.classNameConcat(re["minicart--modal-modifier"],u),isMobile:!0,isOpen:m,setIsOpen:f,style:{zIndex:c.modal},variant:p?"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:s,TEXTURE_IMAGE:o,TOGGLE_STYLE_MODIFIER:i,TIPBAR_CONFIGS:a,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(Vl,{ICONS:e})]})},hu=({tipBar:e,minicartStyleModifiers:t,menuV2:n,storeConfig:s,className:o})=>{const{structureRef:a,rootRef:i,CONSTANTS:c}=Pe(),{header:{HEADER_CONFIGS:l,Z_INDEX_WAR:u},minicart:m}=c;return r.jsx(d.Header.Structure,{innerRef:a,adornment:{start:e},style:{position:"sticky",top:0,zIndex:u.header},className:d.helpers.classNameConcat(Qs["header-animation"],o),children:r.jsxs(d.Header.Root,{innerRef:i,style:{zIndex:u.header},variant:l.default_variant,interactiveVariant:l.interactive_variant,children:[n??r.jsxs(Kp,{children:[r.jsx("div",{className:F.responsive["responsive-mobile-block"],style:{height:"100%",width:"100%",zIndex:u.header_mobile},children:r.jsx(Hl,{storeConfig:s})}),r.jsx("div",{className:F.responsive["responsive-desktop-block"],style:{height:"100%",width:"100%",zIndex:u.header_desktop},children:r.jsx(Il,{storeConfig:s})})]}),r.jsx(rh,{children:r.jsx(mh,{...m,minicartStyleModifiers:t})}),r.jsx(Vs,{title:"Produto adicionado à sua sacola!",CONSTANTS:c.addToCart})]})})};hu.displayName="Header";const fh="_shippingFreight_6z8rf_6",ph="_shippingFreight__postalCodeGrid_6z8rf_10",hh="_shippingFreight__grid_6z8rf_14",_h="_shippingFreight__grid__title_6z8rf_18",gh="_shippingFreight__grid__remember_6z8rf_29",yh="_postalCodeContainer_6z8rf_44",xh="_deliveryStatusBar__tag_6z8rf_49",vh="_deliveryStatusBarError__tag_6z8rf_66",bh="_deliveryInfo_6z8rf_74",jh="_deliveryInfo__content_6z8rf_78",Ch="_deliveryInfo__text_6z8rf_84",Sh="_deliveryInfo__title_6z8rf_89",wh="_deliveryInfo__subtitle_6z8rf_99",Ph="_deliveryInfo__tooltipIcon_6z8rf_109",Eh="_deliveryInfo__tooltip_6z8rf_109",Nh="_freightGrid_6z8rf_148",Ih="_freightContainer_6z8rf_155",Rh="_freightOption__content_6z8rf_160",Th="_freightOption__value_6z8rf_166",Ah="_freightOption__title_6z8rf_177",kh="_freightOption__title_item_6z8rf_181",Oh="_freightOption__paragraph_6z8rf_192",de={shippingFreight:fh,shippingFreight__postalCodeGrid:ph,shippingFreight__grid:hh,shippingFreight__grid__title:_h,shippingFreight__grid__remember:gh,postalCodeContainer:yh,deliveryStatusBar__tag:xh,deliveryStatusBarError__tag:vh,deliveryInfo:bh,deliveryInfo__content:jh,deliveryInfo__text:Ch,deliveryInfo__title:Sh,deliveryInfo__subtitle:wh,deliveryInfo__tooltipIcon:Ph,deliveryInfo__tooltip:Eh,freightGrid:Nh,freightContainer:Ih,freightOption__content:Rh,freightOption__value:Th,freightOption__title:Ah,freightOption__title_item:kh,freightOption__paragraph:Oh,"input-modifier":"_input-modifier_6z8rf_207","freight--tooltip":"_freight--tooltip_6z8rf_227"},Lh=({icon:e,title:t,subtitle:n,packageCount:s,packageUnit:o="",labelDescription:a,freightConfig:i,toolTipZIndex:c})=>{const[l,u]=g.useState(!1),m=g.useRef(null),f=()=>u(p=>!p);return r.jsxs("div",{className:de.deliveryInfo,ref:m,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:m.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," ",s," ",o]}),n&&r.jsx("span",{className:de.deliveryInfo__subtitle,children:n})]}),a&&r.jsxs("div",{className:de.deliveryInfo__tooltipIcon,onMouseEnter:f,onMouseLeave:f,"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})]})]})]})},Mh=({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})]})})})]})}),Dh=({children:e})=>r.jsx("div",{className:de.freightContainer,children:e}),Fh=({children:e})=>r.jsx("div",{className:de.freightGrid,children:e}),zh=({children:e})=>r.jsx("div",{className:de.postalCodeContainer,children:e}),Qo=({message:e,seller:t="",size:n="small",setError:s})=>r.jsx("div",{className:s?de.deliveryStatusBarError:de.deliveryStatusBar,children:r.jsxs(d.Tag,{title:e,className:s?de.deliveryStatusBarError__tag:de.deliveryStatusBar__tag,size:n,children:[e," ",!s&&t]})}),Bh=e=>{const t=parseInt(e,10);return t===1?`${t} dia`:`${t} dias`},Uh=e=>{var n,s,o;const t=[];return(o=(s=(n=e==null?void 0:e.logisticsInfo)==null?void 0:n[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},qh=({component:e,parent:t,top:n,left:s,target:o,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})})},Hh=({onUpdateFreightItems:e,sellerId:t,size:n,skuId:s,quantity:o,setError:a,setIsButtonClicked:i,component:c,freightConfig:l,toolTipZIndex:u})=>{var O,L,X,M;const m=Ct(),f=Ct(q=>q.shipping),[p,h]=g.useState(),[_,y]=g.useState(!1),[x,v]=g.useState(!1),[C,j]=g.useState(!1),b=(L=(O=m.shippingData)==null?void 0:O.address)==null?void 0:L.postalCode,P=!(p!=null&&p.length)&&b?b:p,w=g.useRef(null),S=async q=>{const Z=q.target.value.replace(/\D/g,"").slice(0,8);Z.length>5?h(Z.replace(/^(\d{5})(\d{1,3})/,"$1-$2")):h(Z)},E=async q=>{const U=q.target.value.replace(/\D/g,"");try{if((await bt.get(`https://viacep.com.br/ws/${U}/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 q=await bt.post("/api/checkout/simulation",{items:[{id:s,quantity:o,seller:t}],country:"BRA",postalCode:P});e(Uh(q.data))}catch(q){console.error("Erro ao atualizar o documento:",q)}finally{y(!1),f(P,"BRA")}},A=async()=>{if(!s){j(!0),setTimeout(()=>j(!1),1500);return}await E({target:{value:P}}),_||(R(),i(!0))};return r.jsxs("div",{ref:w,style:{position:"relative"},children:[!s&&C?r.jsx(qh,{component:c,isOpen:C,parent:w.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=(X=m.shippingData)==null?void 0:X.address)==null?void 0:M.postalCode,label:l.messages.text_input_label,title:"textfield",value:p,sizeVariant:n,onMouseOver:()=>s?null:j(!0),onMouseOut:()=>s?null:j(!1),mode:"simple",onChange:S,onKeyDown:q=>{q.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})})})]})},$h=({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})]}),Vh=({children:e})=>r.jsx("div",{className:de.freightContainer,children:e}),_u=({className:e,sellerId:t,skuId:n,quantity:s,size:o,seller:a,local:i,CONSTANTS_PROPS:c})=>{const{sendDataLayerEvent:l}=ae(),[u,m]=g.useState(""),[f,p]=g.useState([]),[h,_]=g.useState(""),[y,x]=g.useState(!1),v=j=>m(j),C=j=>{p(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(Vh,{className:e,children:[r.jsxs($h,{freightConfig:c.freightConfig,children:[r.jsx(zh,{children:r.jsx(Hh,{onUpdateFreightItems:C,skuId:n,quantity:s,size:o,sellerId:t,local:i,setError:_,setIsButtonClicked:x,freightConfig:c.freightConfig,toolTipZIndex:c.toolTipZIndex})}),h?r.jsx(Qo,{size:o,message:h,setError:_}):f.length>0&&r.jsx(Qo,{size:o,message:c.freightConfig.messages.delivered_by,seller:a})]}),y&&!h?f.length>0&&r.jsxs(Dh,{children:[r.jsx(Fh,{children:f.filter(({id:j})=>!j.includes("Retirada")).map(j=>r.jsx(Mh,{id:j.id,value:F.freightParsePrice({valueInCents:j.price,hasFree:!1,freeTaxMessage:c.freightConfig.messages.free_tax}),title:j.name,paragraph:`${c.freightConfig.messages.prefix_days}${Bh(j.shippingEstimate)}`,radioValue:u,changeValue:v},j.id))}),c.deliveryInfoBoxesAllowed?r.jsx(Lh,{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]})},wt={"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"},Wh=({children:e,href:t,isLast:n,title:s,ICONS:o})=>r.jsx(d.BreadCrumb.Item,{adornment:{end:n&&r.jsx(d.Icon,{name:o.arrow_right})},children:n?r.jsx(Le,{href:t??"/",size:"medium",title:s,disableUnderline:!0,children:e}):e}),gu=()=>{var a;const{state:e}=Be(),{ICONS:t}=Fe(),n=e!=null&&e.term&&e.term.length>0?`/${e.term}`:"",s=decodeURIComponent((a=e==null?void 0:e.base)!=null&&a.length?e.base:n??n).slice(1).split("/"),o=Wi(s);return r.jsx("div",{className:wt["pcd-navigation--breadcrumb"],children:r.jsx(d.BreadCrumb.DivWrapper,{children:r.jsx(d.BreadCrumb.List,{children:Array.isArray(o)&&o.map((i,c)=>{var l,u;return g.createElement(Wh,{...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," "))})})})})};gu.displayName="PLPNavigation.BreadCrumb";const yu=({children:e,...t})=>r.jsxs("div",{...t,className:wt["pdc-navigation--content"],children:[r.jsx(ht.Filters,{}),e]});yu.displayName="PLPNavigation.Content";const Gh="_sort_35wro_1",Qn={sort:Gh,"sort-list-wrapper":"_sort-list-wrapper_35wro_8","sort-list":"_sort-list_35wro_8","sort-button":"_sort-button_35wro_25"},Kh=({children:e,sortListOpen:t,btnAdornment:n,style:s,...o})=>r.jsx(d.Button,{...o,adornment:{end:t?n==null?void 0:n.listOpen:n==null?void 0:n.listClosed},size:"small",variant:"tertiary",style:{...s,textDecoration:"none"},className:Qn["sort-button"],children:e}),Xh=e=>r.jsx(d.RadioButton.Radio,{...e}),Yh=({children:e,className:t,name:n,...s})=>r.jsx(d.RadioButton.Group,{...s,name:n||"sort-group",className:d.helpers.classNameConcat(Qn["sort-list"],t),children:e}),Qh=({children:e,className:t,shadow:n=!0,padding:s="small",height:o="fit-content",...a})=>r.jsx(d.Card,{...a,shadow:n,className:d.helpers.classNameConcat(Qn["sort-list-wrapper"],t),padding:s,height:o,children:e}),xu=g.forwardRef(({children:e,className:t,...n},s)=>r.jsx("div",{...n,ref:s,className:d.helpers.classNameConcat(Qn.sort,t),children:e}));xu.displayName="SortRoot";const Zn=({handleSelectValue:e,sortListOpen:t,setSortListOpen:n,searchParams:s,ICONS:o,...a})=>{var p;const i=(p=s==null?void 0:s.get("sort"))==null?void 0:p.replace(":","_"),[c,l]=g.useState(i),{sendDataLayerEvent:u}=ae();g.useEffect(()=>{l(i||void 0)},[i]);const{ref:m}=Cl(()=>n(!1)),f=h=>{const _=h.target.value;l(_),typeof e=="function"&&e(_),u({functionKey:"filterEvent",data:{customData:{ordering:$t.options[_]}}}),n(!1)};return r.jsxs(xu,{...a,ref:m,children:[r.jsx(Kh,{btnAdornment:{listOpen:r.jsx(d.Icon,{name:o.arrow_up,size:"small"}),listClosed:r.jsx(d.Icon,{name:o.arrow_down,size:"small"})},sortListOpen:t,onClick:()=>n(!t),children:c?$t.options[c]:$t.placeholder},"sort-button"),t&&r.jsx(Qh,{children:r.jsx(Yh,{name:"sort-group",value:c??"",onChange:f,children:Object.keys($t.options).map(h=>r.jsx(Xh,{label:$t.options[h],value:h},h))})})]})};Zn.displayName="Sort";const vu=g.createContext({}),Zh=({children:e,...t})=>{const[n,s]=g.useState(!1);return r.jsx(vu.Provider,{value:g.useMemo(()=>({...t,openOrderBy:n,setOpenOrderBy:s}),[t,n,s]),children:e})},Jh=()=>{const e=g.useContext(vu);if(e===void 0)throw new Error("usePLPNavigationContext must be used within a PDCNavigationProvider");return e},bu=()=>{const{openOrderBy:e,onSort:t,setOpenFilters:n,setOpenOrderBy:s}=Jh(),{ICONS:o,PDC_NAVIGATION:a,searchParams:i}=Fe();return r.jsxs("div",{className:wt["pdc-navigation--filters"],children:[r.jsx(ht.BreadCrumb,{}),r.jsxs("div",{className:wt["pdc-navigation--filters--content"],children:[r.jsx(Zn,{handleSelectValue:c=>t(c??"release_desc"),sortListOpen:e,setSortListOpen:s,ICONS:o,searchParams:i}),r.jsx(d.Button,{adornment:{end:r.jsx(d.Icon,{name:o.arrow_down})},onClick:()=>n(!0),size:"small",variant:"tertiary",children:a.filter_button}),r.jsx(ht.Total,{})]})]})};bu.displayName="PLPNavigation.Filters";const ju=({children:e,onSort:t,setOpenFilters:n,style:s,...o})=>{const a=g.useRef(null);return r.jsx(Zh,{onSort:t,setOpenFilters:n,children:r.jsx("div",{...o,className:wt["pdc-navigation"],ref:a,style:{...s},children:r.jsx(ht.Content,{children:e})})})};ju.displayName="Root";const Cu=({callback:e,selected:t,...n})=>r.jsx("div",{...n,className:wt["pdc-navigation--selected"],children:r.jsx("div",{className:wt["pdc-navigation--selected--container"],children:Array.isArray(t)?t.map(s=>s.key==="productclusterids"?null:r.jsx(ht.SelectedItem,{callback:e,facet:s},s.value)):null})});Cu.displayName="PLPNavigation.Selected";const Js=({key:e,PLP_FILTERS:t})=>t.some(n=>n.key===e)?e==="cores-filtraveis":!1,eo=({value:e,PLP_FILTERS_COLORS:t})=>{var n;return((n=t.find(s=>s.value===e))==null?void 0:n.color)??"#F2F2F2"},Su=({key:e,PLP_FILTERS:t})=>{var n;return(n=t.find(s=>s.key===e))==null?void 0:n.label},wu=({key:e,PLP_FILTERS:t})=>{var n;return((n=t.find(s=>s.key===e))==null?void 0:n.order)??0},ts=({value:e})=>{const[t,n]=e.split(":").length===2?e.split(":"):[0,0],s=F.formatPriceToCurrency(Number(n));return`${F.formatPriceToCurrency(Number(t))} até ${s}`},Pu=({items:e})=>{const t=e.flatMap(o=>[o.range.from,o.range.to]),n=Math.min(...t.map(Math.abs)),s=Math.max(...t.map(Math.abs));return[n,s]},Eu=Object.freeze(Object.defineProperty({__proto__:null,checkedColor:Js,createTagPrice:ts,getAbsoluteMinMax:Pu,getColor:eo,getName:Su,getOrder:wu},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"},Nu=({columns:e=2,CONSTANTS:t,...n})=>{var a;const{filters:s,onToggleFacet:o}=Ht();return r.jsxs("div",{...n,className:Ge["filter--modal--body--content"],children:[Array.isArray(s.facets)&&s.facets.map(i=>r.jsx(ct.Item,{columns:e,facet:i,onToggleFacet:o,CONSTANTS:t},i.key)),!((a=s.facets)!=null&&a.length)&&r.jsx(ct.Empty,{PLP_FILTERS_EMPTY:t.PLP_FILTERS_EMPTY})]})};Nu.displayName="Filter.Item.Content";const Iu=({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})]})};Iu.displayName="Filter.Empty";const Ru=({columns:e,facet:t,onToggleFacet:n,CONSTANTS:s,...o})=>{const a=wu({key:t.key,PLP_FILTERS:s.PLP_FILTERS}),i=()=>{if(t.__typename==="FacetBoolean"){if(t.key==="cores-filtraveis")return r.jsx(ct.Colors,{onToggleFacet:n,values:t.values,PLP_FILTERS:s.PLP_FILTERS,PLP_FILTERS_COLORS:s.PLP_FILTERS_COLORS});if(t.key==="tamanho")return r.jsx(ct.Sizes,{onToggleFacet:n,values:t.values,PLP_SIZE_ORDER:s.PLP_SIZE_ORDER});if(t.key==="category-2")return r.jsx(ct.Toggle,{columns:e,facetKey:t.key,onToggleFacet:n,values:t.values,ICONS:s.ICONS})}return t.__typename==="FacetRange"?r.jsx(ct.Price,{facet:t}):r.jsx("p",{children:"Filter not support!!!"})};return r.jsx("div",{...o,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:s.ICONS.arrow_up}),openIndicator:r.jsx(d.Icon,{name:s.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:Su({key:t.key,PLP_FILTERS:s.PLP_FILTERS})})})})}),r.jsx(d.Accordion.Body,{children:i()})]})})};Ru.displayName="Filter.Item";const Tu=({onToggleFacet:e,values:t,PLP_FILTERS:n,PLP_FILTERS_COLORS:s,...o})=>r.jsx(et.Root,{...o,children:r.jsx(et.List,{children:Array.isArray(t)&&t.map(({key:a,selected:i,value:c})=>r.jsx(et.Option,{active:i,"data-color":Js({key:a,PLP_FILTERS:n}),fill:eo({value:c,PLP_FILTERS_COLORS:s}),onClick:()=>e({key:a,value:c}),type:"color"},`${a}-${c}`))})});Tu.displayName="Filter.Item.Color";const Au=({facet:e,...t})=>{var u,m;const{filters:{selected:n},price:s,onToggleFacet:o}=Ht(),[a,i]=(s==null?void 0:s.split(":").map(Number))??[0,100],[c,l]=((m=(u=n==null?void 0:n.find(({key:f})=>f==="price"))==null?void 0:u.value)==null?void 0:m.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:f=>{var p,h;f&&o({key:"price",value:`${(p=f.range)==null?void 0:p.min}:${(h=f.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})})})]})})};Au.displayName="Filter.Item.Price";const ku=({onToggleFacet:e,values:t,PLP_SIZE_ORDER:n,...s})=>{const o=[...t].sort((a,i)=>{const c=n.indexOf(a.name),l=n.indexOf(i.name);return c-l});return r.jsx(et.Root,{...s,children:r.jsx(et.List,{children:Array.isArray(o)&&o.map(({key:a,selected:i,value:c})=>r.jsx(et.Option,{active:i,text:c,type:"size",onClick:()=>e({key:a,value:c})},c))})})};ku.displayName="Filter.Item.Sizes";const Ou=({columns:e,facetKey:t,onToggleFacet:n,values:s,ICONS:o,...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(s)&&s.map(i=>r.jsx(d.Checkbox,{label:(i==null?void 0:i.name)??"",adornment:r.jsx(d.Icon,{name:o.check}),checked:i.selected,onChange:()=>n(i)},i.value))})});Ou.displayName="Filter.Item.Toggle";const Lu=({...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"})})};Lu.displayName="Filter.Loading";const Mu=({children:e,className:t,isMobile:n=!1,CONSTANTS:{PLP_FILTERS_TITLE:s,ICONS:o}})=>{var m;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:o.close,size:"small",variant:"tertiary",style:{marginLeft:"auto"}})}),r.jsx(d.Modal.Title,{navigation:"top",title:s})]}),r.jsxs(d.Modal.Body,{style:{width:500},children:[r.jsx("div",{className:Ge["filter--modal--body"],children:e}),r.jsx(ct.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:(m=i.facets)!=null&&m.length?"ver resultados":"fechar"}),r.jsx(d.Button,{"data-close":!0,onClick:()=>a(),variant:"tertiary",children:"limpar filtros"})]})})]})};Mu.displayName="Filter.Modal";const Du=({children:e,className:t,isMobile:n,CONSTANTS:s,...o})=>r.jsx(lc,{...o,PLP_FILTERS:s.PLP_FILTERS,children:r.jsx(ct.Modal,{className:t,isMobile:n,CONSTANTS:s,children:e})});Du.displayName="Filter.Root";const Fu=({ICONS:e,PLP_FILTERS_COLORS:t,PLP_FILTERS:n})=>{const{filters:s,onToggleFacet:o}=Ht();return r.jsx("div",{className:Ge["filter--selected"],children:r.jsx("div",{className:Ge["filter--selected--content"],children:Array.isArray(s.selected)&&s.selected.map(({key:a,value:i})=>a==="productclusterids"?null:r.jsx(d.Tag,{title:a==="price"?ts({value:i}):i,adornment:{end:r.jsx(d.Icon,{name:e.close,size:"x-small"})},colorSquare:eo({value:i,PLP_FILTERS_COLORS:t}),onClick:()=>o({key:a,value:i}),squareShow:Js({key:a,PLP_FILTERS:n}),size:"medium",variant:"primary",children:a==="price"?ts({value:i}):i},i))})})};Fu.displayName="Filter.Selected";const ct={Colors:Tu,Content:Nu,Empty:Iu,Modal:Mu,Item:Ru,Root:Du,Loading:Lu,Selected:Fu,Price:Au,Sizes:ku,Toggle:Ou},{checkedColor:e_,createTagPrice:Zo,getColor:t_}=Eu,zu=({callback:e,facet:t})=>{const{ICONS:n,PLP_FILTERS_COLORS:s,PLP_FILTERS:o}=Fe();return r.jsx(d.Tag,{title:(t==null?void 0:t.key)==="price"?Zo({value:t.value}):t.value.toUpperCase(),adornment:{end:r.jsx(d.Icon,{name:n.close,size:"x-small"})},colorSquare:t_({value:t.value,PLP_FILTERS_COLORS:s}),onClick:()=>{typeof e=="function"&&e(t,!0)},squareShow:e_({key:t.key,PLP_FILTERS:o}),size:"medium",variant:"primary",children:(t==null?void 0:t.key)==="price"?Zo({value:t.value}):t.value.toUpperCase()})};zu.displayName="PLPNavigation.Selected.Item";const Bu=()=>r.jsx(d.TextStructure.Root,{children:r.jsx("p",{id:"pdc-navigation--total"})});Bu.displayName="PLPNavigation.Total";const ht={BreadCrumb:gu,Content:yu,Filters:bu,Root:ju,Selected:Cu,SelectedItem:zu,Total:Bu},n_="_footer__bottom_198g6_2",r_="_footer__wrapper_198g6_10",s_="_footer__main_198g6_39",o_="_footer__legalInformation_198g6_55",a_="_footer__column_198g6_77",i_="_footer__columnContent_198g6_87",c_="_footer__item_198g6_91",l_="_footer__itemLink_198g6_107",u_="_footer__columnTitle_198g6_122",d_="_footer__columnTitleIcon_198g6_134",m_="_footer__iconList_198g6_147",f_="_footer__itemSmallText_198g6_157",p_="_payment_198g6_168",h_="_footer__iconContainer_198g6_173",__="_footer__iconListSubHeader_198g6_178",g_="_accordionWrapper_198g6_200",y_="_accordionHeader_198g6_204",x_="_accordionTextWrapper_198g6_208",me={footer__bottom:n_,footer__wrapper:r_,footer__main:s_,footer__legalInformation:o_,footer__column:a_,footer__columnContent:i_,footer__item:c_,footer__itemLink:l_,footer__columnTitle:u_,footer__columnTitleIcon:d_,footer__iconList:m_,footer__itemSmallText:f_,payment:p_,footer__iconContainer:h_,footer__iconListSubHeader:__,accordionWrapper:g_,accordionHeader:y_,accordionTextWrapper:x_,"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 Uu={},to={},Jn={};(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=s=>{n.has(s)||console.warn(s),n.add(s)}}})(Jn);var qu={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getImageBlurSvg",{enumerable:!0,get:function(){return t}});function t(n){let{widthInt:s,heightInt:o,blurWidth:a,blurHeight:i,blurDataURL:c,objectFit:l}=n;const u=20,m=a?a*40:s,f=i?i*40:o,p=m&&f?"viewBox='0 0 "+m+" "+f+"'":"",h=p?"none":l==="contain"?"xMidYMid":l==="cover"?"xMidYMid slice":"none";return"%3Csvg xmlns='http://www.w3.org/2000/svg' "+p+"%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 er={};(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 n},imageConfigDefault:function(){return s}});const n=["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}})(er);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getImgProps",{enumerable:!0,get:function(){return h}});const t=Jn,n=qu,s=er,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 m(_){return typeof _>"u"?_:typeof _=="number"?Number.isFinite(_)?_:NaN:typeof _=="string"&&/^[0-9]+$/.test(_)?parseInt(_,10):NaN}function f(_,y,x){let{deviceSizes:v,allSizes:C}=_;if(x){const b=/(^|\s)(1?\d?\d)vw/g,P=[];for(let w;w=b.exec(x);w)P.push(parseInt(w[2]));if(P.length){const w=Math.min(...P)*.01;return{widths:C.filter(S=>S>=v[0]*w),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(P=>P>=b)||C[C.length-1]))],kind:"x"}}function p(_){let{config:y,src:x,unoptimized:v,width:C,quality:j,sizes:b,loader:P}=_;if(v)return{src:x,srcSet:void 0,sizes:void 0};const{widths:w,kind:S}=f(y,C,b),E=w.length-1;return{sizes:!b&&S==="w"?"100vw":b,srcSet:w.map((R,A)=>P({config:y,src:x,quality:j,width:R})+" "+(S==="w"?R:A+1)+S).join(", "),src:P({config:y,src:x,quality:j,width:w[E]})}}function h(_,y){let{src:x,sizes:v,unoptimized:C=!1,priority:j=!1,loading:b,className:P,quality:w,width:S,height:E,fill:R=!1,style:A,overrideSrc:O,onLoad:L,onLoadingComplete:X,placeholder:M="empty",blurDataURL:q,fetchPriority:U,decoding:Z="async",layout:K,objectFit:H,objectPosition:J,lazyBoundary:se,lazyRoot:ce,...oe}=_;const{imgConf:ue,showAltText:D,blurComplete:ee,defaultLoader:N}=y;let W,ie=ue||s.imageConfigDefault;if("allSizes"in ie)W=ie;else{var _e;const G=[...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);W={...ie,allSizes:G,deviceSizes:k,qualities:B}}if(typeof N>"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=oe.loader||N;delete oe.loader,delete oe.srcSet;const T="__next_img_default"in I;if(T){if(W.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 G=I;I=k=>{const{config:B,...te}=k;return G(te)}}if(K){K==="fill"&&(R=!0);const G={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}},k={responsive:"100vw",fill:"100vw"},B=G[K];B&&(A={...A,...B});const te=k[K];te&&!v&&(v=te)}let Te="",V=m(S),Y=m(E),be,Ie;if(c(x)){const G=a(x)?x.default:x;if(!G.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(G));if(!G.height||!G.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(G));if(be=G.blurWidth,Ie=G.blurHeight,q=q||G.blurDataURL,Te=G.src,!R){if(!V&&!Y)V=G.width,Y=G.height;else if(V&&!Y){const k=V/G.width;Y=Math.round(G.height*k)}else if(!V&&Y){const k=Y/G.height;V=Math.round(G.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),W.unoptimized&&(C=!0),T&&x.endsWith(".svg")&&!W.dangerouslyAllowSVG&&(C=!0),j&&(U="high");const ge=m(w);if(process.env.NODE_ENV!=="production"){if(W.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(E)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 V>"u")throw new Error('Image with src "'+x+'" is missing required "width" property.');if(isNaN(V))throw new Error('Image with src "'+x+'" has invalid "width" property. Expected a numeric value in pixels but received "'+S+'".');if(typeof Y>"u")throw new Error('Image with src "'+x+'" is missing required "height" property.');if(isNaN(Y))throw new Error('Image with src "'+x+'" has invalid "height" property. Expected a numeric value in pixels but received "'+E+'".')}if(!o.includes(b))throw new Error('Image with src "'+x+'" has invalid "loading" property. Provided "'+b+'" should be one of '+o.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"&&V&&Y&&V*Y<1600&&(0,t.warnOnce)('Image with src "'+x+'" is smaller than 40x40. Consider removing the "placeholder" property to improve performance.'),M==="blur"&&!q){const G=["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
- - Change the "src" property to a static import with one of the supported file types: `+X.join(",")+` (animated images not supported)
9
+ - Change the "src" property to a static import with one of the supported file types: `+G.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 oe&&(0,t.warnOnce)('Image with src "'+x+'" is using unsupported "ref" property. Consider using the "onLoad" property instead.'),!C&&!R){const X=N({config:W,src:x,width:q||400,quality:ye||75});let L;try{L=new URL(X)}catch{}(X===x||L&&L.pathname===x&&!L.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`)}Y&&(0,t.warnOnce)('Image with src "'+x+'" is using deprecated "onLoadingComplete" property. Please use the "onLoad" property instead.');for(const[X,L]of Object.entries({layout:G,objectFit:$,objectPosition:J,lazyBoundary:se,lazyRoot:ce}))L&&(0,t.warnOnce)('Image with src "'+x+'" has legacy prop "'+X+`". Did you forget to run the codemod?
13
- Read more: https://nextjs.org/docs/messages/next-image-upgrade-to-13`);if(typeof window<"u"&&!u&&window.PerformanceObserver){u=new PerformanceObserver(X=>{for(const z of X.getEntries()){var L;const te=(z==null||(L=z.element)==null?void 0:L.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(X){console.error(X)}}}const Ae=Object.assign(T?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:$,objectPosition:J}:{},M?{}:{color:"transparent"},A),Ce=!ee&&D!=="empty"?D==="blur"?'url("data:image/svg+xml;charset=utf-8,'+(0,n.getImageBlurSvg)({widthInt:q,heightInt:K,blurWidth:ge,blurHeight:Re,blurDataURL:U||"",objectFit:Ae.objectFit})+'")':'url("'+D+'")':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&&D==="blur"&&U!=null&&U.startsWith("/")&&(F.backgroundImage='url("'+U+'")');const pe=p({config:W,src:x,unoptimized:C,width:q,quality:ye,sizes:b,loader:N});if(process.env.NODE_ENV!=="production"&&typeof window<"u"){let X;try{X=new URL(pe.src)}catch{X=new URL(pe.src,window.location.href)}l.set(X.href,{src:x,priority:j,placeholder:D})}return{props:{...oe,loading:je?"lazy":v,fetchPriority:B,width:q,height:K,decoding:Q,className:P,style:{...Ae,...F},sizes:pe.sizes,srcSet:pe.srcSet,src:k||pe.src},meta:{unoptimized:C,priority:j,placeholder:D,fill:T}}}})(Ws);var as={exports:{}},jn={exports:{}},kr={},Jo;function G_(){return Jo||(Jo=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",s=n?()=>{}:t.useLayoutEffect,o=n?()=>{}:t.useEffect;function a(i){const{headManager:c,reduceComponentsToState:l}=i;function u(){if(c&&c.mountedInstances){const f=t.Children.toArray(Array.from(c.mountedInstances).filter(Boolean));c.updateHead(l(f,i))}}if(n){var m;c==null||(m=c.mountedInstances)==null||m.add(i.children),u()}return s(()=>{var f;return c==null||(f=c.mountedInstances)==null||f.add(i.children),()=>{var p;c==null||(p=c.mountedInstances)==null||p.delete(i.children)}}),s(()=>(c&&(c._pendingUpdate=u),()=>{c&&(c._pendingUpdate=u)})),o(()=>(c&&c._pendingUpdate&&(c._pendingUpdate(),c._pendingUpdate=null),()=>{c&&c._pendingUpdate&&(c._pendingUpdate(),c._pendingUpdate=null)})),null}}(kr)),kr}var Lr={},ea;function K_(){return ea||(ea=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"AmpStateContext",{enumerable:!0,get:function(){return s}});const s=Le._(g).default.createContext({});process.env.NODE_ENV!=="production"&&(s.displayName="AmpStateContext")}(Lr)),Lr}var Or={},ta;function Wu(){return ta||(ta=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"HeadManagerContext",{enumerable:!0,get:function(){return s}});const s=Le._(g).default.createContext({});process.env.NODE_ENV!=="production"&&(s.displayName="HeadManagerContext")}(Or)),Or}var Dr={},na;function X_(){return na||(na=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"isInAmpMode",{enumerable:!0,get:function(){return t}});function t(n){let{ampFirst:s=!1,hybrid:o=!1,hasQuery:a=!1}=n===void 0?{}:n;return s||o&&a}}(Dr)),Dr}var ra;function Y_(){return ra||(ra=1,function(e,t){"use client";Object.defineProperty(t,"__esModule",{value:!0});function n(j,v){for(var P in v)Object.defineProperty(j,P,{enumerable:!0,get:v[P]})}n(t,{default:function(){return C},defaultHead:function(){return p}});const s=Le,o=Ft,a=r,i=o._(g),c=s._(G_()),l=K_(),u=Wu(),m=X_(),f=Yn;function p(j){j===void 0&&(j=!1);const v=[(0,a.jsx)("meta",{charSet:"utf-8"})];return j||v.push((0,a.jsx)("meta",{name:"viewport",content:"width=device-width"})),v}function h(j,v){return typeof v=="string"||typeof v=="number"?j:v.type===i.default.Fragment?j.concat(i.default.Children.toArray(v.props.children).reduce((P,E)=>typeof E=="string"||typeof E=="number"?P:P.concat(E),[])):j.concat(v)}const _=["name","httpEquiv","charSet","itemProp"];function y(){const j=new Set,v=new Set,P=new Set,E={};return S=>{let I=!0,T=!1;if(S.key&&typeof S.key!="number"&&S.key.indexOf("$")>0){T=!0;const A=S.key.slice(S.key.indexOf("$")+1);j.has(A)?I=!1:j.add(A)}switch(S.type){case"title":case"base":v.has(S.type)?I=!1:v.add(S.type);break;case"meta":for(let A=0,k=_.length;A<k;A++){const O=_[A];if(S.props.hasOwnProperty(O))if(O==="charSet")P.has(O)?I=!1:P.add(O);else{const Y=S.props[O],D=E[O]||new Set;(O!=="name"||!T)&&D.has(Y)?I=!1:(D.add(Y),E[O]=D)}}break}return I}}function x(j,v){const{inAmpMode:P}=v;return j.reduce(h,[]).reverse().concat(p(P).reverse()).filter(y()).reverse().map((E,S)=>{const I=E.key||S;if(process.env.NODE_ENV!=="development"&&process.env.__NEXT_OPTIMIZE_FONTS&&!P&&E.type==="link"&&E.props.href&&["https://fonts.googleapis.com/css","https://use.typekit.net/"].some(T=>E.props.href.startsWith(T))){const T={...E.props||{}};return T["data-href"]=T.href,T.href=void 0,T["data-optimized-fonts"]=!0,i.default.cloneElement(E,T)}if(process.env.NODE_ENV==="development")if(E.type==="script"&&E.props.type!=="application/ld+json"){const T=E.props.src?'<script> tag with src="'+E.props.src+'"':"inline <script>";(0,f.warnOnce)("Do not add <script> tags using next/head (see "+T+`). Use next/script instead.
15
- See more info here: https://nextjs.org/docs/messages/no-script-tags-in-head-component`)}else E.type==="link"&&E.props.rel==="stylesheet"&&(0,f.warnOnce)('Do not add stylesheets using next/head (see <link rel="stylesheet"> tag with href="'+E.props.href+`"). Use Document instead.
16
- See more info here: https://nextjs.org/docs/messages/no-stylesheets-in-head-component`);return i.default.cloneElement(E,{key:I})})}function b(j){let{children:v}=j;const P=(0,i.useContext)(l.AmpStateContext),E=(0,i.useContext)(u.HeadManagerContext);return(0,a.jsx)(c.default,{reduceComponentsToState:x,headManager:E,inAmpMode:(0,m.isInAmpMode)(P),children:v})}const C=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)}(jn,jn.exports)),jn.exports}var Mr={},sa;function Q_(){return sa||(sa=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"ImageConfigContext",{enumerable:!0,get:function(){return o}});const n=Le._(g),s=Qn,o=n.default.createContext(s.imageConfigDefault);process.env.NODE_ENV!=="production"&&(o.displayName="ImageConfigContext")}(Mr)),Mr}var Fr={},zr={},Br={exports:{}},oa;function Gu(){return oa||(oa=1,(()=>{var e={170:(o,a,i)=>{const c=i(510),l=()=>{if(typeof navigator<"u"&&navigator.platform){const m=navigator.platform.toLowerCase();return m==="win32"||m==="windows"}return typeof process<"u"&&process.platform?process.platform==="win32":!1};function u(m,f,p=!1){return f&&(f.windows===null||f.windows===void 0)&&(f={...f,windows:l()}),c(m,f,p)}Object.assign(u,c),o.exports=u},154:o=>{const a="\\\\/",i=`[^${a}]`,c="\\.",l="\\+",u="\\?",m="\\/",f="(?=.)",p="[^/]",h=`(?:${m}|$)`,_=`(?:^|${m})`,y=`${c}{1,2}${h}`,x=`(?!${c})`,b=`(?!${_}${y})`,C=`(?!${c}{0,1}${h})`,j=`(?!${y})`,v=`[^.${m}]`,P=`${p}*?`,S={DOT_LITERAL:c,PLUS_LITERAL:l,QMARK_LITERAL:u,SLASH_LITERAL:m,ONE_CHAR:f,QMARK:p,END_ANCHOR:h,DOTS_SLASH:y,NO_DOT:x,NO_DOTS:b,NO_DOT_SLASH:C,NO_DOTS_SLASH:j,QMARK_NO_DOT:v,STAR:P,START_ANCHOR:_,SEP:"/"},I={...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:"\\"},T={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:T,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?I:S}}},697:(o,a,i)=>{const c=i(154),l=i(96),{MAX_LENGTH:u,POSIX_REGEX_SOURCE:m,REGEX_NON_SPECIAL_CHARS:f,REGEX_SPECIAL_CHARS_BACKREF:p,REPLACEMENTS:h}=c,_=(b,C)=>{if(typeof C.expandRange=="function")return C.expandRange(...b,C);b.sort();const j=`[${b.join("-")}]`;try{new RegExp(j)}catch{return b.map(P=>l.escapeRegex(P)).join("..")}return j},y=(b,C)=>`Missing ${b}: "${C}" - use "\\\\${C}" to match literal characters`,x=(b,C)=>{if(typeof b!="string")throw new TypeError("Expected a string");b=h[b]||b;const j={...C},v=typeof j.maxLength=="number"?Math.min(u,j.maxLength):u;let P=b.length;if(P>v)throw new SyntaxError(`Input length: ${P}, exceeds maximum allowed length: ${v}`);const E={type:"bos",value:"",output:j.prepend||""},S=[E],I=j.capture?"":"?:",T=c.globChars(j.windows),A=c.extglobChars(T),{DOT_LITERAL:k,PLUS_LITERAL:O,SLASH_LITERAL:Y,ONE_CHAR:D,DOTS_SLASH:U,NO_DOT:B,NO_DOT_SLASH:Q,NO_DOTS_SLASH:G,QMARK:$,QMARK_NO_DOT:J,STAR:se,START_ANCHOR:ce}=T,oe=V=>`(${I}(?:(?!${ce}${V.dot?U:k}).)*?)`,le=j.dot?"":B,M=j.dot?$:J;let ee=j.bash===!0?oe(j):se;j.capture&&(ee=`(${ee})`),typeof j.noext=="boolean"&&(j.noextglob=j.noext);const w={input:b,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};b=l.removePrefix(b,w),P=b.length;const W=[],ie=[],_e=[];let N=E,R;const Ie=()=>w.index===P-1,q=w.peek=(V=1)=>b[w.index+V],K=w.advance=()=>b[++w.index]||"",ge=()=>b.slice(w.index+1),Re=(V="",X=0)=>{w.consumed+=V,w.index+=X},je=V=>{w.output+=V.output!=null?V.output:V.value,Re(V.value)},ye=()=>{let V=1;for(;q()==="!"&&(q(2)!=="("||q(3)==="?");)K(),w.start++,V++;return V%2===0?!1:(w.negated=!0,w.start++,!0)},Ae=V=>{w[V]++,_e.push(V)},Ce=V=>{w[V]--,_e.pop()},F=V=>{if(N.type==="globstar"){const X=w.braces>0&&(V.type==="comma"||V.type==="brace"),L=V.extglob===!0||W.length&&(V.type==="pipe"||V.type==="paren");V.type!=="slash"&&V.type!=="paren"&&!X&&!L&&(w.output=w.output.slice(0,-N.output.length),N.type="star",N.value="*",N.output=ee,w.output+=N.output)}if(W.length&&V.type!=="paren"&&(W[W.length-1].inner+=V.value),(V.value||V.output)&&je(V),N&&N.type==="text"&&V.type==="text"){N.output=(N.output||N.value)+V.value,N.value+=V.value;return}V.prev=N,S.push(V),N=V},pe=(V,X)=>{const L={...A[X],conditions:1,inner:""};L.prev=N,L.parens=w.parens,L.output=w.output;const z=(j.capture?"(":"")+L.open;Ae("parens"),F({type:V,value:X,output:w.output?"":D}),F({type:"paren",extglob:!0,value:K(),output:z}),W.push(L)},xe=V=>{let X=V.close+(j.capture?")":""),L;if(V.type==="negate"){let z=ee;if(V.inner&&V.inner.length>1&&V.inner.includes("/")&&(z=oe(j)),(z!==ee||Ie()||/^\)+$/.test(ge()))&&(X=V.close=`)$))${z}`),V.inner.includes("*")&&(L=ge())&&/^\.[^\\/.]+$/.test(L)){const te=x(L,{...C,fastpaths:!1}).output;X=V.close=`)${te})${z})`}V.prev.type==="bos"&&(w.negatedExtglob=!0)}F({type:"paren",extglob:!0,value:R,output:X}),Ce("parens")};if(j.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(b)){let V=!1,X=b.replace(p,(L,z,te,he,Ne,tr)=>he==="\\"?(V=!0,L):he==="?"?z?z+he+(Ne?$.repeat(Ne.length):""):tr===0?M+(Ne?$.repeat(Ne.length):""):$.repeat(te.length):he==="."?k.repeat(te.length):he==="*"?z?z+he+(Ne?ee:""):ee:z?L:`\\${L}`);return V===!0&&(j.unescape===!0?X=X.replace(/\\/g,""):X=X.replace(/\\+/g,L=>L.length%2===0?"\\\\":L?"\\":"")),X===b&&j.contains===!0?(w.output=b,w):(w.output=l.wrapOutput(X,w,C),w)}for(;!Ie();){if(R=K(),R==="\0")continue;if(R==="\\"){const L=q();if(L==="/"&&j.bash!==!0||L==="."||L===";")continue;if(!L){R+="\\",F({type:"text",value:R});continue}const z=/^\\+/.exec(ge());let te=0;if(z&&z[0].length>2&&(te=z[0].length,w.index+=te,te%2!==0&&(R+="\\")),j.unescape===!0?R=K():R+=K(),w.brackets===0){F({type:"text",value:R});continue}}if(w.brackets>0&&(R!=="]"||N.value==="["||N.value==="[^")){if(j.posix!==!1&&R===":"){const L=N.value.slice(1);if(L.includes("[")&&(N.posix=!0,L.includes(":"))){const z=N.value.lastIndexOf("["),te=N.value.slice(0,z),he=N.value.slice(z+2),Ne=m[he];if(Ne){N.value=te+Ne,w.backtrack=!0,K(),!E.output&&S.indexOf(N)===1&&(E.output=D);continue}}}(R==="["&&q()!==":"||R==="-"&&q()==="]")&&(R=`\\${R}`),R==="]"&&(N.value==="["||N.value==="[^")&&(R=`\\${R}`),j.posix===!0&&R==="!"&&N.value==="["&&(R="^"),N.value+=R,je({value:R});continue}if(w.quotes===1&&R!=='"'){R=l.escapeRegex(R),N.value+=R,je({value:R});continue}if(R==='"'){w.quotes=w.quotes===1?0:1,j.keepQuotes===!0&&F({type:"text",value:R});continue}if(R==="("){Ae("parens"),F({type:"paren",value:R});continue}if(R===")"){if(w.parens===0&&j.strictBrackets===!0)throw new SyntaxError(y("opening","("));const L=W[W.length-1];if(L&&w.parens===L.parens+1){xe(W.pop());continue}F({type:"paren",value:R,output:w.parens?")":"\\)"}),Ce("parens");continue}if(R==="["){if(j.nobracket===!0||!ge().includes("]")){if(j.nobracket!==!0&&j.strictBrackets===!0)throw new SyntaxError(y("closing","]"));R=`\\${R}`}else Ae("brackets");F({type:"bracket",value:R});continue}if(R==="]"){if(j.nobracket===!0||N&&N.type==="bracket"&&N.value.length===1){F({type:"text",value:R,output:`\\${R}`});continue}if(w.brackets===0){if(j.strictBrackets===!0)throw new SyntaxError(y("opening","["));F({type:"text",value:R,output:`\\${R}`});continue}Ce("brackets");const L=N.value.slice(1);if(N.posix!==!0&&L[0]==="^"&&!L.includes("/")&&(R=`/${R}`),N.value+=R,je({value:R}),j.literalBrackets===!1||l.hasRegexChars(L))continue;const z=l.escapeRegex(N.value);if(w.output=w.output.slice(0,-N.value.length),j.literalBrackets===!0){w.output+=z,N.value=z;continue}N.value=`(${I}${z}|${N.value})`,w.output+=N.value;continue}if(R==="{"&&j.nobrace!==!0){Ae("braces");const L={type:"brace",value:R,output:"(",outputIndex:w.output.length,tokensIndex:w.tokens.length};ie.push(L),F(L);continue}if(R==="}"){const L=ie[ie.length-1];if(j.nobrace===!0||!L){F({type:"text",value:R,output:R});continue}let z=")";if(L.dots===!0){const te=S.slice(),he=[];for(let Ne=te.length-1;Ne>=0&&(S.pop(),te[Ne].type!=="brace");Ne--)te[Ne].type!=="dots"&&he.unshift(te[Ne].value);z=_(he,j),w.backtrack=!0}if(L.comma!==!0&&L.dots!==!0){const te=w.output.slice(0,L.outputIndex),he=w.tokens.slice(L.tokensIndex);L.value=L.output="\\{",R=z="\\}",w.output=te;for(const Ne of he)w.output+=Ne.output||Ne.value}F({type:"brace",value:R,output:z}),Ce("braces"),ie.pop();continue}if(R==="|"){W.length>0&&W[W.length-1].conditions++,F({type:"text",value:R});continue}if(R===","){let L=R;const z=ie[ie.length-1];z&&_e[_e.length-1]==="braces"&&(z.comma=!0,L="|"),F({type:"comma",value:R,output:L});continue}if(R==="/"){if(N.type==="dot"&&w.index===w.start+1){w.start=w.index+1,w.consumed="",w.output="",S.pop(),N=E;continue}F({type:"slash",value:R,output:Y});continue}if(R==="."){if(w.braces>0&&N.type==="dot"){N.value==="."&&(N.output=k);const L=ie[ie.length-1];N.type="dots",N.output+=R,N.value+=R,L.dots=!0;continue}if(w.braces+w.parens===0&&N.type!=="bos"&&N.type!=="slash"){F({type:"text",value:R,output:k});continue}F({type:"dot",value:R,output:k});continue}if(R==="?"){if(!(N&&N.value==="(")&&j.noextglob!==!0&&q()==="("&&q(2)!=="?"){pe("qmark",R);continue}if(N&&N.type==="paren"){const z=q();let te=R;(N.value==="("&&!/[!=<:]/.test(z)||z==="<"&&!/<([!=]|\w+>)/.test(ge()))&&(te=`\\${R}`),F({type:"text",value:R,output:te});continue}if(j.dot!==!0&&(N.type==="slash"||N.type==="bos")){F({type:"qmark",value:R,output:J});continue}F({type:"qmark",value:R,output:$});continue}if(R==="!"){if(j.noextglob!==!0&&q()==="("&&(q(2)!=="?"||!/[!=<:]/.test(q(3)))){pe("negate",R);continue}if(j.nonegate!==!0&&w.index===0){ye();continue}}if(R==="+"){if(j.noextglob!==!0&&q()==="("&&q(2)!=="?"){pe("plus",R);continue}if(N&&N.value==="("||j.regex===!1){F({type:"plus",value:R,output:O});continue}if(N&&(N.type==="bracket"||N.type==="paren"||N.type==="brace")||w.parens>0){F({type:"plus",value:R});continue}F({type:"plus",value:O});continue}if(R==="@"){if(j.noextglob!==!0&&q()==="("&&q(2)!=="?"){F({type:"at",extglob:!0,value:R,output:""});continue}F({type:"text",value:R});continue}if(R!=="*"){(R==="$"||R==="^")&&(R=`\\${R}`);const L=f.exec(ge());L&&(R+=L[0],w.index+=L[0].length),F({type:"text",value:R});continue}if(N&&(N.type==="globstar"||N.star===!0)){N.type="star",N.star=!0,N.value+=R,N.output=ee,w.backtrack=!0,w.globstar=!0,Re(R);continue}let V=ge();if(j.noextglob!==!0&&/^\([^?]/.test(V)){pe("star",R);continue}if(N.type==="star"){if(j.noglobstar===!0){Re(R);continue}const L=N.prev,z=L.prev,te=L.type==="slash"||L.type==="bos",he=z&&(z.type==="star"||z.type==="globstar");if(j.bash===!0&&(!te||V[0]&&V[0]!=="/")){F({type:"star",value:R,output:""});continue}const Ne=w.braces>0&&(L.type==="comma"||L.type==="brace"),tr=W.length&&(L.type==="pipe"||L.type==="paren");if(!te&&L.type!=="paren"&&!Ne&&!tr){F({type:"star",value:R,output:""});continue}for(;V.slice(0,3)==="/**";){const ln=b[w.index+4];if(ln&&ln!=="/")break;V=V.slice(3),Re("/**",3)}if(L.type==="bos"&&Ie()){N.type="globstar",N.value+=R,N.output=oe(j),w.output=N.output,w.globstar=!0,Re(R);continue}if(L.type==="slash"&&L.prev.type!=="bos"&&!he&&Ie()){w.output=w.output.slice(0,-(L.output+N.output).length),L.output=`(?:${L.output}`,N.type="globstar",N.output=oe(j)+(j.strictSlashes?")":"|$)"),N.value+=R,w.globstar=!0,w.output+=L.output+N.output,Re(R);continue}if(L.type==="slash"&&L.prev.type!=="bos"&&V[0]==="/"){const ln=V[1]!==void 0?"|$":"";w.output=w.output.slice(0,-(L.output+N.output).length),L.output=`(?:${L.output}`,N.type="globstar",N.output=`${oe(j)}${Y}|${Y}${ln})`,N.value+=R,w.output+=L.output+N.output,w.globstar=!0,Re(R+K()),F({type:"slash",value:"/",output:""});continue}if(L.type==="bos"&&V[0]==="/"){N.type="globstar",N.value+=R,N.output=`(?:^|${Y}|${oe(j)}${Y})`,w.output=N.output,w.globstar=!0,Re(R+K()),F({type:"slash",value:"/",output:""});continue}w.output=w.output.slice(0,-N.output.length),N.type="globstar",N.output=oe(j),N.value+=R,w.output+=N.output,w.globstar=!0,Re(R);continue}const X={type:"star",value:R,output:ee};if(j.bash===!0){X.output=".*?",(N.type==="bos"||N.type==="slash")&&(X.output=le+X.output),F(X);continue}if(N&&(N.type==="bracket"||N.type==="paren")&&j.regex===!0){X.output=R,F(X);continue}(w.index===w.start||N.type==="slash"||N.type==="dot")&&(N.type==="dot"?(w.output+=Q,N.output+=Q):j.dot===!0?(w.output+=G,N.output+=G):(w.output+=le,N.output+=le),q()!=="*"&&(w.output+=D,N.output+=D)),F(X)}for(;w.brackets>0;){if(j.strictBrackets===!0)throw new SyntaxError(y("closing","]"));w.output=l.escapeLast(w.output,"["),Ce("brackets")}for(;w.parens>0;){if(j.strictBrackets===!0)throw new SyntaxError(y("closing",")"));w.output=l.escapeLast(w.output,"("),Ce("parens")}for(;w.braces>0;){if(j.strictBrackets===!0)throw new SyntaxError(y("closing","}"));w.output=l.escapeLast(w.output,"{"),Ce("braces")}if(j.strictSlashes!==!0&&(N.type==="star"||N.type==="bracket")&&F({type:"maybe_slash",value:"",output:`${Y}?`}),w.backtrack===!0){w.output="";for(const V of w.tokens)w.output+=V.output!=null?V.output:V.value,V.suffix&&(w.output+=V.suffix)}return w};x.fastpaths=(b,C)=>{const j={...C},v=typeof j.maxLength=="number"?Math.min(u,j.maxLength):u,P=b.length;if(P>v)throw new SyntaxError(`Input length: ${P}, exceeds maximum allowed length: ${v}`);b=h[b]||b;const{DOT_LITERAL:E,SLASH_LITERAL:S,ONE_CHAR:I,DOTS_SLASH:T,NO_DOT:A,NO_DOTS:k,NO_DOTS_SLASH:O,STAR:Y,START_ANCHOR:D}=c.globChars(j.windows),U=j.dot?k:A,B=j.dot?O:A,Q=j.capture?"":"?:",G={negated:!1,prefix:""};let $=j.bash===!0?".*?":Y;j.capture&&($=`(${$})`);const J=le=>le.noglobstar===!0?$:`(${Q}(?:(?!${D}${le.dot?T:E}).)*?)`,se=le=>{switch(le){case"*":return`${U}${I}${$}`;case".*":return`${E}${I}${$}`;case"*.*":return`${U}${$}${E}${I}${$}`;case"*/*":return`${U}${$}${S}${I}${B}${$}`;case"**":return U+J(j);case"**/*":return`(?:${U}${J(j)}${S})?${B}${I}${$}`;case"**/*.*":return`(?:${U}${J(j)}${S})?${B}${$}${E}${I}${$}`;case"**/.*":return`(?:${U}${J(j)}${S})?${E}${I}${$}`;default:{const M=/^(.*?)\.(\w+)$/.exec(le);if(!M)return;const ee=se(M[1]);return ee?ee+E+M[2]:void 0}}},ce=l.removePrefix(b,G);let oe=se(ce);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),m=i(154),f=h=>h&&typeof h=="object"&&!Array.isArray(h),p=(h,_,y=!1)=>{if(Array.isArray(h)){const S=h.map(T=>p(T,_,y));return T=>{for(const A of S){const k=A(T);if(k)return k}return!1}}const x=f(h)&&h.tokens&&h.input;if(h===""||typeof h!="string"&&!x)throw new TypeError("Expected pattern to be a non-empty string");const b=_||{},C=b.windows,j=x?p.compileRe(h,_):p.makeRe(h,_,!1,!0),v=j.state;delete j.state;let P=()=>!1;if(b.ignore){const S={..._,ignore:null,onMatch:null,onResult:null};P=p(b.ignore,S,y)}const E=(S,I=!1)=>{const{isMatch:T,match:A,output:k}=p.test(S,j,_,{glob:h,posix:C}),O={glob:h,state:v,regex:j,posix:C,input:S,output:k,match:A,isMatch:T};return typeof b.onResult=="function"&&b.onResult(O),T===!1?(O.isMatch=!1,I?O:!1):P(S)?(typeof b.onIgnore=="function"&&b.onIgnore(O),O.isMatch=!1,I?O:!1):(typeof b.onMatch=="function"&&b.onMatch(O),I?O:!0)};return y&&(E.state=v),E};p.test=(h,_,y,{glob:x,posix:b}={})=>{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||(b?u.toPosixSlashes:null);let v=h===x,P=v&&j?j(h):h;return v===!1&&(P=j?j(h):h,v=P===x),(v===!1||C.capture===!0)&&(C.matchBase===!0||C.basename===!0?v=p.matchBase(h,_,y,b):v=_.exec(P)),{isMatch:!!v,match:v,output:P}},p.matchBase=(h,_,y)=>(_ instanceof RegExp?_:p.makeRe(_,y)).test(u.basename(h)),p.isMatch=(h,_,y)=>p(_,y)(h),p.parse=(h,_)=>Array.isArray(h)?h.map(y=>p.parse(y,_)):l(h,{..._,fastpaths:!1}),p.scan=(h,_)=>c(h,_),p.compileRe=(h,_,y=!1,x=!1)=>{if(y===!0)return h.output;const b=_||{},C=b.contains?"":"^",j=b.contains?"":"$";let v=`${C}(?:${h.output})${j}`;h&&h.negated===!0&&(v=`^(?!${v}).*$`);const P=p.toRegex(v,_);return x===!0&&(P.state=h),P},p.makeRe=(h,_={},y=!1,x=!1)=>{if(!h||typeof h!="string")throw new TypeError("Expected a non-empty string");let b={negated:!1,fastpaths:!0};return _.fastpaths!==!1&&(h[0]==="."||h[0]==="*")&&(b.output=l.fastpaths(h,_)),b.output||(b=l(h,_)),p.compileRe(b,_,y,x)},p.toRegex=(h,_)=>{try{const y=_||{};return new RegExp(h,y.flags||(y.nocase?"i":""))}catch(y){if(_&&_.debug===!0)throw y;return/$^/}},p.constants=m,o.exports=p},716:(o,a,i)=>{const c=i(96),{CHAR_ASTERISK:l,CHAR_AT:u,CHAR_BACKWARD_SLASH:m,CHAR_COMMA:f,CHAR_DOT:p,CHAR_EXCLAMATION_MARK:h,CHAR_FORWARD_SLASH:_,CHAR_LEFT_CURLY_BRACE:y,CHAR_LEFT_PARENTHESES:x,CHAR_LEFT_SQUARE_BRACKET:b,CHAR_PLUS:C,CHAR_QUESTION_MARK:j,CHAR_RIGHT_CURLY_BRACE:v,CHAR_RIGHT_PARENTHESES:P,CHAR_RIGHT_SQUARE_BRACKET:E}=i(154),S=A=>A===_||A===m,I=A=>{A.isPrefix!==!0&&(A.depth=A.isGlobstar?1/0:1)},T=(A,k)=>{const O=k||{},Y=A.length-1,D=O.parts===!0||O.scanToEnd===!0,U=[],B=[],Q=[];let G=A,$=-1,J=0,se=0,ce=!1,oe=!1,le=!1,M=!1,ee=!1,w=!1,W=!1,ie=!1,_e=!1,N=!1,R=0,Ie,q,K={value:"",depth:0,isGlob:!1};const ge=()=>$>=Y,Re=()=>G.charCodeAt($+1),je=()=>(Ie=q,G.charCodeAt(++$));for(;$<Y;){q=je();let pe;if(q===m){W=K.backslashes=!0,q=je(),q===y&&(w=!0);continue}if(w===!0||q===y){for(R++;ge()!==!0&&(q=je());){if(q===m){W=K.backslashes=!0,je();continue}if(q===y){R++;continue}if(w!==!0&&q===p&&(q=je())===p){if(ce=K.isBrace=!0,le=K.isGlob=!0,N=!0,D===!0)continue;break}if(w!==!0&&q===f){if(ce=K.isBrace=!0,le=K.isGlob=!0,N=!0,D===!0)continue;break}if(q===v&&(R--,R===0)){w=!1,ce=K.isBrace=!0,N=!0;break}}if(D===!0)continue;break}if(q===_){if(U.push($),B.push(K),K={value:"",depth:0,isGlob:!1},N===!0)continue;if(Ie===p&&$===J+1){J+=2;continue}se=$+1;continue}if(O.noext!==!0&&(q===C||q===u||q===l||q===j||q===h)===!0&&Re()===x){if(le=K.isGlob=!0,M=K.isExtglob=!0,N=!0,q===h&&$===J&&(_e=!0),D===!0){for(;ge()!==!0&&(q=je());){if(q===m){W=K.backslashes=!0,q=je();continue}if(q===P){le=K.isGlob=!0,N=!0;break}}continue}break}if(q===l){if(Ie===l&&(ee=K.isGlobstar=!0),le=K.isGlob=!0,N=!0,D===!0)continue;break}if(q===j){if(le=K.isGlob=!0,N=!0,D===!0)continue;break}if(q===b){for(;ge()!==!0&&(pe=je());){if(pe===m){W=K.backslashes=!0,je();continue}if(pe===E){oe=K.isBracket=!0,le=K.isGlob=!0,N=!0;break}}if(D===!0)continue;break}if(O.nonegate!==!0&&q===h&&$===J){ie=K.negated=!0,J++;continue}if(O.noparen!==!0&&q===x){if(le=K.isGlob=!0,D===!0){for(;ge()!==!0&&(q=je());){if(q===x){W=K.backslashes=!0,q=je();continue}if(q===P){N=!0;break}}continue}break}if(le===!0){if(N=!0,D===!0)continue;break}}O.noext===!0&&(M=!1,le=!1);let ye=G,Ae="",Ce="";J>0&&(Ae=G.slice(0,J),G=G.slice(J),se-=J),ye&&le===!0&&se>0?(ye=G.slice(0,se),Ce=G.slice(se)):le===!0?(ye="",Ce=G):ye=G,ye&&ye!==""&&ye!=="/"&&ye!==G&&S(ye.charCodeAt(ye.length-1))&&(ye=ye.slice(0,-1)),O.unescape===!0&&(Ce&&(Ce=c.removeBackslashes(Ce)),ye&&W===!0&&(ye=c.removeBackslashes(ye)));const F={prefix:Ae,input:A,start:J,base:ye,glob:Ce,isBrace:ce,isBracket:oe,isGlob:le,isExtglob:M,isGlobstar:ee,negated:ie,negatedExtglob:_e};if(O.tokens===!0&&(F.maxDepth=0,S(q)||B.push(K),F.tokens=B),O.parts===!0||O.tokens===!0){let pe;for(let xe=0;xe<U.length;xe++){const V=pe?pe+1:J,X=U[xe],L=A.slice(V,X);O.tokens&&(xe===0&&J!==0?(B[xe].isPrefix=!0,B[xe].value=Ae):B[xe].value=L,I(B[xe]),F.maxDepth+=B[xe].depth),(xe!==0||L!=="")&&Q.push(L),pe=X}if(pe&&pe+1<A.length){const xe=A.slice(pe+1);Q.push(xe),O.tokens&&(B[B.length-1].value=xe,I(B[B.length-1]),F.maxDepth+=B[B.length-1].depth)}F.slashes=U,F.parts=Q}return F};o.exports=T},96:(o,a,i)=>{const{REGEX_BACKSLASH:c,REGEX_REMOVE_BACKSLASH:l,REGEX_SPECIAL_CHARS:u,REGEX_SPECIAL_CHARS_GLOBAL:m}=i(154);a.isObject=f=>f!==null&&typeof f=="object"&&!Array.isArray(f),a.hasRegexChars=f=>u.test(f),a.isRegexChar=f=>f.length===1&&a.hasRegexChars(f),a.escapeRegex=f=>f.replace(m,"\\$1"),a.toPosixSlashes=f=>f.replace(c,"/"),a.removeBackslashes=f=>f.replace(l,p=>p==="\\"?"":p),a.escapeLast=(f,p,h)=>{const _=f.lastIndexOf(p,h);return _===-1?f:f[_-1]==="\\"?a.escapeLast(f,p,_-1):`${f.slice(0,_)}\\${f.slice(_)}`},a.removePrefix=(f,p={})=>{let h=f;return h.startsWith("./")&&(h=h.slice(2),p.prefix="./"),h},a.wrapOutput=(f,p={},h={})=>{const _=h.contains?"":"^",y=h.contains?"":"$";let x=`${_}(?:${f})${y}`;return p.negated===!0&&(x=`(?:^(?!${x}).*$)`),x},a.basename=(f,{windows:p}={})=>{const h=f.split(p?/[\\/]/:"/"),_=h[h.length-1];return _===""?h[h.length-2]:_}}},t={};function n(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,n),c=!1}finally{c&&delete t[o]}return i.exports}typeof n<"u"&&(n.ab=__dirname+"/");var s=n(170);Br.exports=s})()),Br.exports}var aa;function Z_(){return aa||(aa=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 n=Gu();function s(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 o(a,i){if(!a)return!0;const c=new URL(i,"http://n");return a.some(l=>s(l,c))}}(zr)),zr}var Ur={},ia;function J_(){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,{hasRemoteMatch:function(){return o},matchRemotePattern:function(){return s}});const n=Gu();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,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 o(a,i,c){return a.some(l=>c.hostname===l)||i.some(l=>s(l,c))}}(Ur)),Ur}var ca;function Ku(){return ca||(ca=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return s}});const t=75;function n(o){let{config:a,src:i,width:c,quality:l}=o;var u;if(process.env.NODE_ENV!=="production"){const f=[];if(i||f.push("src"),c||f.push("width"),f.length>0)throw new Error("Next Image Optimization requires "+f.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:p}=Z_();if(!p(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 p;try{p=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}=J_();if(!h(a.domains,a.remotePatterns,p))throw new Error("Invalid src prop ("+i+') on `next/image`, hostname "'+p.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 m=l||((u=a.qualities)==null?void 0:u.reduce((f,p)=>Math.abs(p-t)<Math.abs(f-t)?p:f))||t;return a.path+"?url="+encodeURIComponent(i)+"&w="+c+"&q="+m+(process.env.NEXT_DEPLOYMENT_ID?"&dpl="+process.env.NEXT_DEPLOYMENT_ID:"")}n.__next_img_default=!0;const s=n}(Fr)),Fr}(function(e,t){"use client";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Image",{enumerable:!0,get:function(){return j}});const n=Le,s=Ft,o=r,a=s._(g),i=n._(fs),c=n._(Y_()),l=Ws,u=Qn,m=Q_(),f=Yn,p=Hc(),h=n._(Ku()),_=process.env.__NEXT_IMAGE_OPTS;typeof window>"u"&&(globalThis.__NEXT_IMAGE_IMPORTED=!0);function y(v,P,E,S,I,T,A){const k=v==null?void 0:v.src;if(!v||v["data-loaded-src"]===k)return;v["data-loaded-src"]=k,("decode"in v?v.decode():Promise.resolve()).catch(()=>{}).then(()=>{if(!(!v.parentElement||!v.isConnected)){if(P!=="empty"&&I(!0),E!=null&&E.current){const Y=new Event("load");Object.defineProperty(Y,"target",{writable:!1,value:v});let D=!1,U=!1;E.current({...Y,nativeEvent:Y,currentTarget:v,target:v,isDefaultPrevented:()=>D,isPropagationStopped:()=>U,persist:()=>{},preventDefault:()=>{D=!0,Y.preventDefault()},stopPropagation:()=>{U=!0,Y.stopPropagation()}})}if(S!=null&&S.current&&S.current(v),process.env.NODE_ENV!=="production"){const Y=new URL(k,"http://n").searchParams.get("url")||k;if(v.getAttribute("data-nimg")==="fill"){if(!T&&(!A||A==="100vw")&&v.getBoundingClientRect().width/window.innerWidth<.6&&(A==="100vw"?(0,f.warnOnce)('Image with src "'+Y+'" 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,f.warnOnce)('Image with src "'+Y+'" 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')),v.parentElement){const{position:B}=window.getComputedStyle(v.parentElement),Q=["absolute","fixed","relative"];Q.includes(B)||(0,f.warnOnce)('Image with src "'+Y+'" has "fill" and parent element with invalid "position". Provided "'+B+'" should be one of '+Q.map(String).join(",")+".")}v.height===0&&(0,f.warnOnce)('Image with src "'+Y+'" 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 D=v.height.toString()!==v.getAttribute("height"),U=v.width.toString()!==v.getAttribute("width");(D&&!U||!D&&U)&&(0,f.warnOnce)('Image with src "'+Y+`" 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(v){return a.use?{fetchPriority:v}:{fetchpriority:v}}const b=(0,a.forwardRef)((v,P)=>{let{src:E,srcSet:S,sizes:I,height:T,width:A,decoding:k,className:O,style:Y,fetchPriority:D,placeholder:U,loading:B,unoptimized:Q,fill:G,onLoadRef:$,onLoadingCompleteRef:J,setBlurComplete:se,setShowAltText:ce,sizesInput:oe,onLoad:le,onError:M,...ee}=v;return(0,o.jsx)("img",{...ee,...x(D),loading:B,width:A,height:T,decoding:k,"data-nimg":G?"fill":"1",className:O,style:Y,sizes:I,srcSet:S,src:E,ref:(0,a.useCallback)(w=>{P&&(typeof P=="function"?P(w):typeof P=="object"&&(P.current=w)),w&&(M&&(w.src=w.src),process.env.NODE_ENV!=="production"&&(E||console.error('Image is missing required "src" property:',w),w.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.')),w.complete&&y(w,U,$,J,se,Q,oe))},[E,U,$,J,se,M,Q,oe,P]),onLoad:w=>{const W=w.currentTarget;y(W,U,$,J,se,Q,oe)},onError:w=>{ce(!0),U!=="empty"&&se(!0),M&&M(w)}})});function C(v){let{isAppRouter:P,imgAttributes:E}=v;const S={as:"image",imageSrcSet:E.srcSet,imageSizes:E.sizes,crossOrigin:E.crossOrigin,referrerPolicy:E.referrerPolicy,...x(E.fetchPriority)};return P&&i.default.preload?(i.default.preload(E.src,S),null):(0,o.jsx)(c.default,{children:(0,o.jsx)("link",{rel:"preload",href:E.srcSet?void 0:E.src,...S},"__nimg-"+E.src+E.srcSet+E.sizes)})}const j=(0,a.forwardRef)((v,P)=>{const S=!(0,a.useContext)(p.RouterContext),I=(0,a.useContext)(m.ImageConfigContext),T=(0,a.useMemo)(()=>{var J;const se=_||I||u.imageConfigDefault,ce=[...se.deviceSizes,...se.imageSizes].sort((M,ee)=>M-ee),oe=se.deviceSizes.sort((M,ee)=>M-ee),le=(J=se.qualities)==null?void 0:J.sort((M,ee)=>M-ee);return{...se,allSizes:ce,deviceSizes:oe,qualities:le}},[I]),{onLoad:A,onLoadingComplete:k}=v,O=(0,a.useRef)(A);(0,a.useEffect)(()=>{O.current=A},[A]);const Y=(0,a.useRef)(k);(0,a.useEffect)(()=>{Y.current=k},[k]);const[D,U]=(0,a.useState)(!1),[B,Q]=(0,a.useState)(!1),{props:G,meta:$}=(0,l.getImgProps)(v,{defaultLoader:h.default,imgConf:T,blurComplete:D,showAltText:B});return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(b,{...G,unoptimized:$.unoptimized,placeholder:$.placeholder,fill:$.fill,onLoadRef:O,onLoadingCompleteRef:Y,setBlurComplete:U,setShowAltText:Q,sizesInput:v.sizes,ref:P}),$.priority?(0,o.jsx)(C,{isAppRouter:S,imgAttributes:G}):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)})(as,as.exports);var eg=as.exports;(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(l,u){for(var m in u)Object.defineProperty(l,m,{enumerable:!0,get:u[m]})}t(e,{default:function(){return c},getImageProps:function(){return i}});const n=Le,s=Ws,o=eg,a=n._(Ku());function i(l){const{props:u}=(0,s.getImgProps)(l,{defaultLoader:a.default,imgConf:process.env.__NEXT_IMAGE_OPTS});for(const[m,f]of Object.entries(u))f===void 0&&delete u[m];return{props:u}}const c=o.Image})(qu);var tg=qu;const Zt=H.getDefaultExportFromCjs(tg),ng=({item:e,CONSTANTS:t})=>{const n=e.icon?t.PAYMENT_FLAGS.includes(e.icon)?"payment":"social":null,s=n==="payment"?t.PAYMENT_FLAGS_DICTIONARY[e.icon]:e.icon;return e.link?r.jsxs(Fe,{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(Zt,{alt:s,src:`/assets/${s}.svg`,width:20,height:20}):r.jsx(d.Icon,{size:"small",name:s})]}):r.jsxs("div",{className:me["support-item"],children:[e.image&&r.jsx("img",{src:e.image,alt:"",loading:"lazy"}),n==="payment"?r.jsx(Zt,{alt:s,src:`/assets/${s}.svg`,width:20,height:20}):r.jsx(d.Icon,{size:"small",name:s})]})},rg=({content:e,CONSTANTS:t})=>r.jsx("div",{className:me["support-container"],children:e==null?void 0:e.map((n,s)=>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((o,a)=>r.jsx(ng,{item:o,CONSTANTS:t},`footer-support-item-${a}`))})]},`footer-support-${s}`))}),sg=({name:e,nameIcon:t,maxWidth:n,rowAlignContent:s,columnAlignContent:o,columnAlignItems:a,textAlignContent:i,textAlignItems:c,children:l})=>r.jsx(d.TextStructure.Root,{layoutProps:{textRow:{alignContent:s,alignItems:s},columnWrapper:{alignContent:o,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})]})}),og=({name:e,nameIcon:t,maxWidth:n,children:s,ICONS:o,...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:o.arrow_up,size:"medium"}),openIndicator:r.jsx(d.Icon,{name:o.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:s})})})]}),$r=e=>{const{isMobile:t}=re();return t?r.jsx(og,{...e}):r.jsx(sg,{...e})},Cn=({type:e,children:t,className:n,collumnName:s,collumnNameIcon:o,icons:a,iconLink:i,iconSize:c,link:l,paymentDisclaimer:u,paymentTitle:m,rowAlignContent:f,columnAlignContent:p,columnAlignItems:h,textAlignContent:_,textAlignItems:y,...x})=>{let b;const{handleSelectContent:C}=ae(),{nextimage:j}=ue();switch(e){case"menu":b=r.jsx(Fe,{className:me.footer__itemLink,href:l??"#",prefetch:!1,children:r.jsx("span",{onClick:()=>{C({content:`footer:${s}:${t}`})},children:t})});break;case"payment":b=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:[m,r.jsx("div",{className:me.footer__iconList,children:a==null?void 0:a.map((v,P)=>r.jsx(j,{alt:v,src:`/assets/${v}.svg`,width:c??20,height:c??20},P))})]})]});break;case"social-media":b=r.jsx("div",{className:me.footer__iconContainer,...x,children:r.jsx("div",{className:me.footer__iconList,children:i==null?void 0:i.map((v,P)=>r.jsx(Fe,{prefetch:!1,href:v.link??"#",target:"_blank",children:r.jsx(d.Icon,{size:"medium",name:v.icon,onClick:()=>C({content:`footer:redes-sociais:${v.icon}`})})},P))})});break;default:b=r.jsx("div",{className:n,...x,children:t})}return r.jsx(d.TextStructure.Root,{layoutProps:{textRow:{alignContent:f,alignItems:f},columnWrapper:{alignContent:p,alignItems:h}},...x,children:r.jsx(d.TextStructure.DivWrapper,{alignContent:_,alignItems:y,className:d.helpers.classNameConcat(me.footer__item,n),children:b})})},ag=({className:e,text:t,...n})=>r.jsx("div",{...n,className:d.helpers.classNameConcat(me.footer__legalInformation,e),children:r.jsx("span",{children:t})}),Xu=()=>{const{nextimage:e}=ue();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})})};Xu.displayName="Footer.Stamps";const Yu=({children:e,legalTextSlot:t,adornment:n,className:s,...o})=>{const{isMobile:a}=re(),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",{...o,className:d.helpers.classNameConcat(me.footer__wrapper,s),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})]})};Yu.displayName="Footer.Wrapper";const Qu=({data:{links:{links:e}},payments:t,socialInfo:n,socialMedias:s,adornment:o,LEGAL_INFORMATION_TEXT:a,ICONS:i,className:c,hasFooterStamps:l})=>{var u;return r.jsxs(Yu,{className:c,adornment:o,legalTextSlot:r.jsx(ag,{text:a}),children:[Array.isArray(e.column)&&e.column.map((m,f)=>r.jsx($r,{id:`${f}column-menu`,name:m.name,nameIcon:m.nameIcon,ICONS:i,children:m.items.map((p,h)=>r.jsx(Cn,{type:"menu",link:p.link,collumnName:m.name,collumnNameIcon:m.nameIcon,children:p.text},h))},f)),t&&((u=t.acceptedFlags)==null?void 0:u.length)>0&&r.jsx($r,{id:"payment-column",name:t==null?void 0:t.title,nameIcon:t==null?void 0:t.titleIcon,maxWidth:150,ICONS:i,children:r.jsx(Cn,{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($r,{id:"social-media-column",name:n==null?void 0:n.title,ICONS:i,children:[n!=null&&n.subTitle?r.jsx(Cn,{children:n==null?void 0:n.subTitle}):null,r.jsx(Cn,{type:"social-media",iconSize:24,iconLink:s}),l&&r.jsx(Xu,{})]})]})};Qu.displayName="Footer";const ig=Object.freeze(Object.defineProperty({__proto__:null,Footer:Qu,FooterSupport:rg},Symbol.toStringTag,{value:"Module"})),cg="_header_9xxjk_57",lg="_actions_9xxjk_131",ug="_breadcrumb_9xxjk_142",dg="_credits_9xxjk_157",mg="_pdplinks_9xxjk_185",pg="_similars_9xxjk_212",fg="_sizes_9xxjk_251",hg="_measurementTable_9xxjk_267",_g="_measurementHead_9xxjk_280",gg="_measurementRows_9xxjk_285",yg="_measurementRowsTitle_9xxjk_302",xg="_measurementRowsText_9xxjk_314",vg="_measurementImage_9xxjk_325",bg="_measurementImageContainer_9xxjk_328",jg="_measurementContent_9xxjk_337",Cg="_measurementTitle_9xxjk_341",Sg="_measurementClose_9xxjk_352",Eg="_productref_9xxjk_417",Pg="_slideOut_9xxjk_1",Ng="_slideIn_9xxjk_1",Ig="_content_9xxjk_397",wg="_pdp_9xxjk_185",Rg="_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:cg,"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:lg,"add-to-cart":"_add-to-cart_9xxjk_138",breadcrumb:ug,"breadcrumb--active":"_breadcrumb--active_9xxjk_147",credits:dg,"gallery-carousel-modifier":"_gallery-carousel-modifier_9xxjk_162",pdplinks:mg,"links-wrapper":"_links-wrapper_9xxjk_195",similars:pg,"similars-info":"_similars-info_9xxjk_224","toggle-style-modifier":"_toggle-style-modifier_9xxjk_233","accessibility-info":"_accessibility-info_9xxjk_237",sizes:fg,"price-wrapper":"_price-wrapper_9xxjk_263",measurementTable:hg,measurementHead:_g,measurementRows:gg,measurementRowsTitle:yg,measurementRowsText:xg,measurementImage:vg,measurementImageContainer:bg,measurementContent:jg,measurementTitle:Cg,measurementClose:Sg,"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:Eg,"tabs-panel":"_tabs-panel_9xxjk_428","tabs-panel-exit":"_tabs-panel-exit_9xxjk_434",slideOut:Pg,"tabs-panel-enter":"_tabs-panel-enter_9xxjk_438",slideIn:Ng,content:Ig,pdp:wg,"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:Rg,"breadcrumbs-desktop":"_breadcrumbs-desktop_9xxjk_580","breadcrumbs-mobile":"_breadcrumbs-mobile_9xxjk_589"},Tg=({children:e,link:t,TOGGLE_STYLE_MODIFIER:n})=>{const{isMobile:s}=re(),{router:o}=ue(),a=()=>{t&&o.push(t)},i=g.useRef(null);return r.jsx(d.ToggleStyle.Wrapper,{size:s?"medium":"small",style:{...n,border:`${i.current===t?"2":"1"}`,overflow:"hidden",padding:"0"},onClick:a,active:i.current===t,children:e})},Zu=({productId:e,similars:t,TOGGLE_STYLE_MODIFIER:n})=>{const{thumbImage:s}=Oe(),o=[{productId:e,slug:"",textureImage:(s==null?void 0:s.imageUrl)??"",textureAlt:(s==null?void 0:s.imageText)??""},...t];return r.jsx("div",{children:o.map((a,i)=>a.textureImage?r.jsxs(Tg,{link:a.slug?a.slug:null,TOGGLE_STYLE_MODIFIER:n,children:[r.jsx(d.ToggleStyle.DisabledAdornment,{}),r.jsx(d.ToggleStyle.Texture,{children:r.jsx(we.Image,{alt:a.textureAlt,src:a.textureImage,height:34,width:34,style:{borderRadius:0,height:"100%"}})})]},`similars-item-${i}`):null)})},Ag=({children:e,storeId:t,productId:n,PDP_INFO:s,TEXTURE_IMAGE:o,TOGGLE_STYLE_MODIFIER:a})=>{const{items:i,loadSimilars:c}=Wc(n,{filterTexture:o,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:s.product.color_title}),e]}),r.jsx(Zu,{productId:n,similars:i,TOGGLE_STYLE_MODIFIER:a})]})},kg=()=>{const{colorName:e}=Oe();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})})})},Zn=({className:e,titleId:t})=>{var o,a,i;const{productName:n,tag:s}=Oe();return r.jsxs("div",{className:d.helpers.classNameConcat(Z.header,e),children:[s!=null&&s.commercial?r.jsx(d.Tag,{size:"small",title:(o=s.commercial)==null?void 0:o.value,variant:"quaternary",adornment:{start:(a=s.commercial)!=null&&a.icon?r.jsx(d.Icon,{name:s.commercial.icon}):null},children:(i=s.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})})})]})};Zn.displayName="PDP.PDPHeader";const Gs=({layout:e="horizontal"})=>{const{price:t,listPrice:n,installments:s}=Oe(),{count:o,value:a}=s,i=H.formatPriceToCurrency(n??0,!0),c=H.formatPriceToCurrency(t??0,!0),l=H.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"})}),o&&o>1&&a?r.jsx(d.ProductInfo.Price,{label:"installment",value:`ou ${o}x ${l}`,size:"small"}):null]})})},is=({onAddCallBack:e,onDisabledClickCallBack:t,addToCartBtnSize:n,BUY_BUTTON_LABELS:s})=>{const o=nn(),{productId:a,productData:i,price:c,listPrice:l,thumbImage:u,isKit:m}=Oe(),{isMobile:f}=re(),{addToCart:p}=be(),{sendDataLayerEvent:h}=ae(),_=!m&&(!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}),p({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 r.jsx(d.Button,{className:Z["add-to-cart"],size:f?(n==null?void 0:n.mobile)??"large":(n==null?void 0:n.desktop)??"x-large",onClick:y,children:o.sku&&o.available?`${s.add_to_cart}`:`${s.select_size}`})},Lg=({addToCartBtnSize:e,BUY_BUTTON_LABELS:t})=>{const{isMobile:n}=re(),s=nn(),{sizesContainerRef:o}=Sa(),{structureRef:a}=Pe();return s.sku&&s.available?r.jsx(is,{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:()=>{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})},Sn=({value:e,label:t,suppressHydrationWarning:n=!1},s)=>{const o={value:e,...n&&{suppressHydrationWarning:!0}},a=s==="compact"?o:{...o,label:t};return r.jsx(d.Timer.Digit,{...a})},An=({dateEnd:e,dateInit:t,type:n="default",TIME_ZONE:s,...o})=>{const[a,i]=g.useState(mc(new Kr.TZDate(Date.now(),s),new Kr.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 r.jsx(r.Fragment,{});const u=Vt(a,"days"),m=Vt(a,"hours"),f=Vt(a,"minutes"),p=Vt(a);return r.jsxs(d.Timer.Root,{...o,children:[u?r.jsxs(r.Fragment,{children:[Sn({value:u,label:"dias"},n),r.jsx(d.Timer.Separator,{})]}):null,Sn({value:m,label:"horas"},n),r.jsx(d.Timer.Separator,{}),Sn({value:f,label:"min"},n),r.jsx(d.Timer.Separator,{}),Sn({value:p,label:"segs",suppressHydrationWarning:!0},n)]})},Ks=({TIME_ZONE:e})=>{const{tag:t}=Oe(),n=t==null?void 0:t.flagGoldenPdp,s=g.useMemo(()=>{var o;if((o=n==null?void 0:n.tagImage)!=null&&o.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(we.Video,{src:s,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(An,{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};Ks.displayName="PDP.GoldenTag";const Og=({addToCartBtnSize:e,BUY_BUTTON_LABELS:t,TIME_ZONE:n,Z_INDEX_WAR:s})=>{const{isMobile:o}=re();return o?r.jsxs(d.Card,{className:Z["bottom-navigation"],shadow:!0,style:{zIndex:s.pdp_bottom_navigation},children:[r.jsxs("div",{className:Z["bottom-navigation__header"],children:[r.jsx(Ks,{TIME_ZONE:n}),r.jsxs("div",{className:Z["bottom-navigation__header-content"],children:[r.jsx(Zn,{}),r.jsx(Gs,{layout:"name-vertical"})]})]}),r.jsx(Lg,{addToCartBtnSize:e,BUY_BUTTON_LABELS:t})]}):null},Dg=({children:e,setShowBottomNavigation:t})=>{const n=g.useRef(null),s=_s(n),o=g.useRef(s);return g.useEffect(()=>{var i;const{top:a}=((i=n.current)==null?void 0:i.getBoundingClientRect())??{top:0};o.current!==s&&a>0&&(t(!s),o.current=s)},[s]),r.jsx("div",{ref:n,style:{width:"100%"},children:e})},Mg=({ICONS:e})=>{const{isMobile:t}=re(),{price:n,listPrice:s,productData:o,productId:a}=Oe(),{sendDataLayerEvent:i}=ae(),c=Bt(),{toggleProduct:l}=Nt();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:{...o,price:n,listPrice:s}}})}})},Ju=({showWishlist:e=!0,callBack:t,addToCartBtnSize:n,BUY_BUTTON_LABELS:s,ICONS:o,TIME_ZONE:a,Z_INDEX_WAR:i})=>{const{isMobile:c}=re(),[l,u]=g.useState(!0);return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:Z.actions,children:[c?r.jsx(Dg,{setShowBottomNavigation:u,children:r.jsx(is,{onAddCallBack:t,addToCartBtnSize:n,BUY_BUTTON_LABELS:s})}):r.jsx(is,{onAddCallBack:t,addToCartBtnSize:n,BUY_BUTTON_LABELS:s}),e&&r.jsx(Mg,{ICONS:o})]}),c&&l&&r.jsx(Og,{addToCartBtnSize:n,BUY_BUTTON_LABELS:s,Z_INDEX_WAR:i,TIME_ZONE:a})]})},ed=({className:e,device:t,ICONS:n})=>{const{breadcrumbList:s,productName:o}=Oe(),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(s)&&s.map((i,c)=>{const l=a(s.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(Fe,{href:`/${l}`,children:i})},`pdp-breadcrumb-${l}-${c}`)}),r.jsx(d.BreadCrumb.Item,{role:"listitem",className:d.helpers.classNameConcat(Z["breadcrumb--active"],e),children:o},"pdp-breadcrumb-productName")]})})};ed.displayName="PDP.BreadCrumb";const td=({className:e})=>{var s;const{tag:t}=Oe(),n=t==null?void 0:t.flagPdp;return n&&((s=n==null?void 0:n.value)!=null&&s.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,{})};td.displayName="PDPCredits";const Fg=()=>{const{descriptionContent:e,productReference:t}=Oe(),[n,s]=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:o,value:a})=>r.jsx(d.Tabs.Item,{label:o,value:a,activeTab:n,onTabChange:s,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:o,content:a})=>n===o?r.jsx(d.Tabs.Panel,{className:`${Z["tabs-panel"]} ${n===o?Z["tabs-panel-enter"]:Z["tabs-panel-exit"]}`,children:r.jsx("div",{className:Z.content,dangerouslySetInnerHTML:{__html:a}})},o):null)]})]})},zg=({CURRENCY:e,DELIVERY_INFO_BOXES_ALLOWED:t,FREIGHT_CALCULATION:n,Z_INDEX_WAR:s})=>{const o=nn(),{isMobile:a}=re();return r.jsxs(r.Fragment,{children:[a?r.jsx(d.Utils.Divider,{direction:"horizontal",size:"small"}):null,r.jsx(xu,{skuId:o.available?o.sku:"",size:a?n.inputSize.mobile:n.inputSize.desktop,quantity:o.quantity,sellerId:o.sellerId,seller:o.sellerName,local:"PDP",CONSTANTS_PROPS:{freightConfig:n,deliveryInfoBoxesAllowed:t,toolTipZIndex:s.modal,currency:e}}),a?r.jsx(d.Utils.Divider,{direction:"horizontal",size:"small"}):null]})},la=({image:e,index:t,handleZoom:n,PRODUCT_IMAGE_DIMENSIONS:s})=>{const o=H.resizingImg(e.imageUrl,s.pdp),{nextimage:a}=ue();return r.jsx(a,{src:o,alt:e.imageLabel,objectFit:"contain",...s.pdp,...t<=1&&{priority:!0,loading:"eager"},onClick:()=>{n(t)}},t)},Bg=({video:e,productName:t,poster:n})=>{const{sendDataLayerEvent:s}=ae(),o=g.useRef(!1);return r.jsx(we.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:n})},nd=({images:e,video:t,handleZoom:n,productName:s,PRODUCT_IMAGE_DIMENSIONS:o})=>{var u,m;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:f=>{a(f)},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:f=>c==null?void 0:c.navigateTo(f)})}),r.jsxs(d.Carousel.Body,{children:[r.jsx(d.Carousel.Item,{style:l,children:r.jsx(la,{image:e[0],index:0,handleZoom:n,PRODUCT_IMAGE_DIMENSIONS:o})},"PDP_gallery_0"),t&&r.jsx(d.Carousel.Item,{style:l,children:r.jsx(Bg,{video:t,productName:s,...((u=e[1])==null?void 0:u.imageUrl)&&{poster:(m=e[1])==null?void 0:m.imageUrl}})},"PDP_gallery_video"),e.map((f,p)=>p===0?null:r.jsx(d.Carousel.Item,{style:l,children:r.jsx(la,{image:f,index:p,handleZoom:n,PRODUCT_IMAGE_DIMENSIONS:o})},`PDP_gallery_${p}`))]})]})};nd.displayName="PDP.Carousel";const Ug="_thumbs_1954e_65",$g="_selected_1954e_92",Hg="_carousel_1954e_164",qg="_bullets_1954e_201",Ee={"image-zoom-wrapper-desktop":"_image-zoom-wrapper-desktop_1954e_1","button-close-container":"_button-close-container_1954e_10","button-close":"_button-close_1954e_10","main-image-container":"_main-image-container_1954e_22","image-desktop":"_image-desktop_1954e_52",thumbs:Ug,selected:$g,"image-zoom-wrapper-mobile":"_image-zoom-wrapper-mobile_1954e_117","image-mobile":"_image-mobile_1954e_147","image-zoom--image":"_image-zoom--image_1954e_161",carousel:Hg,"carousel-controller":"_carousel-controller_1954e_169","arrow-left":"_arrow-left_1954e_179","arrow-right":"_arrow-right_1954e_180",bullets:qg,"zoom-popup":"_zoom-popup_1954e_212","image-zoom--mobile":"_image-zoom--mobile_1954e_252","image-zoom--image--img":"_image-zoom--image--img_1954e_282"},ua=({onClose:e,ICONS:t})=>r.jsx("div",{className:`${Ee["button-close-container"]}`,children:r.jsx(d.Button,{iconNameStart:t.close,iconSize:"medium",className:`${Ee["button-close"]}`,variant:"tertiary",state:"default",size:"medium",onClick:e,style:{textDecoration:"none"}})}),Vg=({children:e,Z_INDEX_WAR:t,...n})=>r.jsx("div",{...n,className:Ee["image-zoom-wrapper-desktop"],style:{zIndex:t.pdp_image_zoom},children:e}),rd=({images:e,setCurrent:t,setFirstImgLoaded:n,ICONS:s,PRODUCT_IMAGE_DIMENSIONS:o})=>{const{nextimage:a}=ue();let i=null;const c=g.useRef(null),{initialize:l,controller:u,pagination:m,itemsStyles:f}=d.Carousel.useCarousel({itemsPerPage:1,gap:10,loop:!1,direction:"row"}),p=_=>{u==null||u.navigateTo(_)},h=()=>{n(!0)};return g.useEffect(()=>{t(m.currentPage)},[m.currentPage,t]),r.jsxs(d.Carousel.Root,{innerRef:_=>{_&&!i&&(i=_,l(i))},className:Ee.carousel,children:[r.jsxs(d.Carousel.Controller,{className:Ee["carousel-controller"],children:[r.jsx(d.Button,{variant:"tertiary",onClick:()=>u==null?void 0:u.prevPage(),className:Ee["arrow-left"],adornment:{start:r.jsx(d.Icon,{name:s.arrow_left})}}),r.jsx(d.Button,{variant:"tertiary",onClick:()=>u==null?void 0:u.nextPage(),className:Ee["arrow-right"],adornment:{start:r.jsx(d.Icon,{name:s.arrow_right})}})]}),r.jsx(d.Carousel.Body,{children:Array.isArray(e)&&e.map((_,y)=>r.jsx(d.Carousel.Item,{style:f,children:r.jsx(a,{...o.image_zoom.mobile,...y===0&&{priority:!0,loading:"eager"},ref:c,className:Ee.imageMobile,src:_.imageUrl,alt:_.imageText,quality:100,...y===0&&{onLoad:h}})},y))}),r.jsx(d.Carousel.Bullets,{className:Ee.bullets,page:m.currentPage,total:m.totalPages,onBulletClick:p})]})};rd.displayName="ImageZoom.Mobile.Carousel";const sd=({imgRef:e,image:t,PRODUCT_IMAGE_DIMENSIONS:n})=>{Aa();const{nextimage:s}=ue();return r.jsx("div",{className:Ee["image-zoom--image"],ref:e,children:r.jsx(s,{...n.image_zoom.mobile,alt:t.imageText,className:Ee["image-zoom--image--img"],quality:100,src:t.imageUrl})})};sd.displayName="ImageZoom.ImageZoom";const od=({loaded:e=!1})=>r.jsx("div",{className:Ee["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"})]})});od.displayName="ImageZoom.ZoomPopup";const ad=({images:e,ICONS:t,PRODUCT_IMAGE_DIMENSIONS:n,...s})=>{const[o,a]=g.useState(!1),[i,c]=g.useState(0),{containerRef:l,imgRef:u,scale:m}=ka({defaultScale:1,maxScale:3});return r.jsxs("div",{...s,className:Ee["image-mobile"],"data-disable-carrousel-pan":m>1,children:[r.jsx(od,{loaded:o}),r.jsx(rd,{images:e,setCurrent:c,setFirstImgLoaded:a,ICONS:t,PRODUCT_IMAGE_DIMENSIONS:n}),r.jsx("div",{className:Ee["image-zoom--mobile"],ref:l,children:r.jsx(sd,{imgRef:u,image:e[i],PRODUCT_IMAGE_DIMENSIONS:n})})]})};ad.displayName="ImageZoom.ImageMobile";const Wg=({children:e,Z_INDEX_WAR:t,...n})=>r.jsx("div",{...n,className:Ee["image-zoom-wrapper-mobile"],style:{zIndex:t.pdp_image_zoom},children:e}),Gg="_modal_1u87b_1",rt={modal:Gg,"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:rt["modal-header"],children:r.jsxs(d.Modal.Controls,{navigation:"top",isMobile:t,children:[r.jsx("div",{className:rt["modal-header__title"],children:r.jsx(d.Modal.Title,{navigation:"top",className:rt["quick-shop__title"],title:e})}),r.jsx(d.Button,{className:rt["modal-header__close-button"],"data-close":!0,iconNameStart:n.close,size:"small",variant:"tertiary"})]})})}const id=({PDP_INFO:e,PLP_SIZE_ORDER:t,ICONS:n,NEWSLETTER_CONFIGS:s,NOTIFY_INFO:o,PRODUCT_CARD_TEXTS:a,Z_INDEX_WAR:i})=>{const{sizes:c,productId:l,handleViewItemEvent:u}=Oe(),m=g.useMemo(()=>c!=null&&c.length?al({items:c,getLabel:v=>v.value,PLP_SIZE_ORDER:t}):[],[c]),{sizesContainerRef:f}=Sa(),{isMobile:p}=re(),h=nn(),_=hi(),{setValue:y}=mi(),{setValue:x}=js(),b=g.useRef({}),[C,j]=g.useState(null);return r.jsxs("div",{ref:f,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:m.map(v=>(!v.available&&!b.current[v.value]&&(b.current[v.value]={disable:!v.available,size:v.value,skuID:v.sku}),r.jsxs(d.ToggleSize.Wrapper,{size:p?"medium":"large",title:v.value,outOfStock:!v.available,onClick:()=>{v.available||(j({skuID:v.sku,size:v.value,disable:!0}),x(!0)),h.sku!==v.sku&&(y({...h,productId:l,name:v.name,size:v.value,sku:v.sku,sellerId:v.sellerId,sellerName:v.sellerName,available:v.available}),u({sku:v.sku,size:v.value}))},active:h.sku===v.sku,children:[r.jsx(d.ToggleSize.DisabledAdornment,{title:"disabled-adornment-texture"}),r.jsx(d.ToggleSize.Text,{children:v==null?void 0:v.value})]},`sizes-${v.sku}-${v.value}`)))}),r.jsx(Ls,{open:_,setVisible:x,sku:C,setSku:j,skus:Object.values(b.current),ICONS:n,NEWSLETTER_CONFIGS:s,NOTIFY_INFO:o,PRODUCT_CARD_TEXTS:a,Z_INDEX_WAR:i})]})},Wt=({children:e,className:t,type:n})=>r.jsx("div",{className:d.helpers.classNameConcat(Z["pdp-main__info-subsection"],[Z[`subsection-${n}`],t]),children:e}),cd=({children:e,className:t})=>{const{structureRef:n,tipbarRef:s}=Pe(),o=g.useMemo(()=>{var c,l;const a=((c=n.current)==null?void 0:c.clientHeight)||0,i=((l=s.current)==null?void 0:l.clientHeight)||0;return a+i},[n,s]);return r.jsx("div",{className:d.helpers.classNameConcat(Z["pdp-main__info"],t),id:"pdpmaininfo",style:{top:o},children:e})},ld=({TEXTURE_IMAGE:e,TOGGLE_STYLE_MODIFIER:t})=>{const{productId:n}=Oe(),[s,o]=g.useState([]),a=new Map;return g.useEffect(()=>{if(n){if(a.has(n)){o(a.get(n));return}fetch("/api/catalog/product/similars",{method:"POST",body:JSON.stringify({productId:n,filterTexture:e})}).then(i=>i.json()).then(({data:i})=>{Array.isArray(i)&&i.length===0||(a.set(n,i),o(i))}).catch(i=>{console.error(i)})}},[n]),r.jsxs("div",{className:Z.similars,children:[r.jsx("span",{className:Z["sections-title"],children:"Cor"}),r.jsx(Zu,{productId:n,similars:s,TOGGLE_STYLE_MODIFIER:t})]})};ld.displayName="PDP.Info.Similars";const Xg=({callBackProductAdded:e,BUY_BUTTON_LABELS:t,ICONS:n,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:m,Z_INDEX_WAR:f})=>r.jsx(d.Modal.Body,{className:rt["modal-product-body"],children:r.jsxs(cd,{className:rt["pdp-main__info-modifier"],children:[r.jsxs(Wt,{type:"product-info",children:[r.jsx(Zn,{}),r.jsx(Gs,{})]}),r.jsx(Wt,{type:"similars",children:r.jsx(ld,{TEXTURE_IMAGE:l,TOGGLE_STYLE_MODIFIER:m})}),r.jsx(Wt,{type:"sizes",children:r.jsx(id,{ICONS:n,NEWSLETTER_CONFIGS:s,NOTIFY_INFO:o,PDP_INFO:a,PLP_SIZE_ORDER:i,PRODUCT_CARD_TEXTS:c,Z_INDEX_WAR:f})}),r.jsx(Wt,{type:"actions",children:r.jsx(Ju,{showWishlist:!1,callBack:e,addToCartBtnSize:{mobile:"medium",desktop:"large"},BUY_BUTTON_LABELS:t,ICONS:n,TIME_ZONE:u,Z_INDEX_WAR:f})})]})});function Yg({callBackProductAdded:e,QUICKSHOP:t,ICONS:n,...s}){const[o,a]=g.useState(!1),i=()=>a(c=>!c);return r.jsxs("div",{className:rt["quick-shop"],children:[r.jsx(d.Button,{onClick:i,size:"x-large",className:rt["shop-bag"],iconNameStart:n.bag,iconSize:"medium"}),r.jsxs(d.Modal.Root,{isOpen:o,setIsOpen:a,className:`${rt.modal} ${rt["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(Xg,{callBackProductAdded:e,ICONS:n,...s})]})]})}const Qg=({image:e})=>r.jsx(Zt,{src:H.resizingImg(e.imageUrl,{width:50,height:75})||"",alt:e.imageText,className:Ee.mainImage,layout:"fill",objectFit:"cover",priority:!0,quality:10,style:{position:"absolute",inset:0,filter:"blur(10px)"}}),Zg=({images:e,selectedImageIndex:t,PRODUCT_IMAGE_DIMENSIONS:n,...s})=>{const[o,a]=g.useState(!1),{nextimage:i}=ue();return r.jsx("div",{...s,className:Ee["main-image-container"],children:r.jsxs("div",{className:Ee["image-desktop"],children:[!o&&r.jsx(Qg,{image:e==null?void 0:e[t]}),r.jsx(i,{src:H.resizingImg(e==null?void 0:e[t].imageUrl,{...n.image_zoom.desktop})||"",alt:e==null?void 0:e[t].imageText,className:Ee.mainImage,layout:"fill",objectFit:"cover",priority:!0,quality:100,onLoad:()=>{a(!0)}})]})})},Jg=({images:e,onThumbnailClick:t,selectedImageIndex:n})=>{const{nextimage:s}=ue();return r.jsx("div",{className:Ee.thumbs,children:e.map((o,a)=>r.jsx("div",{role:"button",tabIndex:0,onClick:()=>t(a),onKeyDown:i=>{(i.key==="Enter"||i.key===" ")&&t(a)},className:a===n?Ee.selected:"",children:r.jsx(s,{src:o.imageUrl,alt:o.imageText,layout:"responsive",width:100,height:100,objectFit:"cover",priority:!1})},a))})},ud=({images:e,initialSelectedImageIndex:t=0,setShowImageZoom:n,ICONS:s,PRODUCT_IMAGE_DIMENSIONS:o,Z_INDEX_WAR:a,...i})=>{const{isMobile:c}=re(),[l,u]=g.useState(t),m=f=>{u(f)};return c?r.jsxs(Wg,{Z_INDEX_WAR:a,children:[r.jsx(ua,{onClose:()=>n({show:!1,initialIndex:0}),ICONS:s}),r.jsx(ad,{images:e,ICONS:s,PRODUCT_IMAGE_DIMENSIONS:o})]}):r.jsxs(Vg,{Z_INDEX_WAR:a,children:[r.jsx(ua,{onClose:()=>n({show:!1,initialIndex:0}),ICONS:s}),r.jsx(Zg,{images:e,selectedImageIndex:l,onThumbnailClick:m,PRODUCT_IMAGE_DIMENSIONS:o},e[l].imageId??`${e[l].imageText}-${l}`),r.jsx(Jg,{images:e,selectedImageIndex:l,onThumbnailClick:m}),r.jsx(Yg,{callBackProductAdded:()=>{n({initialIndex:0,show:!1})},ICONS:s,Z_INDEX_WAR:a,...i})]})};ud.displayName="ImageZoom";const ey=({productImgs:e,PRODUCT_IMAGE_DIMENSIONS:t,...n})=>{const{video:s,productName:o}=Oe(),[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(nd,{images:e,video:s,handleZoom:c,productName:o,PRODUCT_IMAGE_DIMENSIONS:t}),a.show&&r.jsx(ud,{images:e,initialSelectedImageIndex:a.initialIndex,setShowImageZoom:i,PRODUCT_IMAGE_DIMENSIONS:t,...n})]})},dd=({TEXTURE_IMAGE:e,PRODUCT_IMAGE_DIMENSIONS:t,...n})=>{const{images:s}=Oe(),o=g.useMemo(()=>{const a=s.filter(i=>!e.includes(i.imageLabel));return a.length>0?a:s},[]);return r.jsx(ey,{productImgs:o,TEXTURE_IMAGE:e,PRODUCT_IMAGE_DIMENSIONS:t,...n})};dd.displayName="PDP.Gallery";const ty=({className:e,hasIcons:t=!0,ICONS:n,PDP_INFO:s})=>{const{allSizesAvailable:o,productId:a}=Oe(),{setValue:i}=js(),{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:[!o&&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:s.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:s.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:s.links_and_stepper.sizebay})]})})},ny=({children:e})=>r.jsx("div",{className:Z["pdp-main__info-main-content"],children:e}),ry=({head:e,className:t})=>r.jsx("thead",{className:t,children:r.jsx("tr",{children:e.map((n,s)=>r.jsx("th",{children:n},`head-title-${s}`))})}),sy=({rows:e,className:t})=>r.jsx("tbody",{className:t,children:e.map((n,s)=>r.jsx("tr",{children:n.map(o=>typeof o=="string"&&o.includes("blocks")?JSON.parse(o).blocks.map(a=>`${a.text}
18
- `):o).map((o,a)=>r.jsx("td",{children:o},`cell-content-${a}`))},`row-content-${s}`))}),oy="_tableContainer_1yxy2_1",ay={tableContainer:oy},iy=({children:e,className:t=""})=>r.jsx("table",{className:`${ay.tableContainer} ${t}`,children:e}),Hr={Head:ry,Rows:sy,Root:iy},cy=({title:e,text:t})=>r.jsxs("p",{className:Z.measurementRowsText,children:[r.jsx("h1",{className:Z.measurementRowsTitle,children:e}),t]}),ly=({ICONS:e,SIZES:t,Z_INDEX_WAR:n})=>{const s=yi(),{setValue:o}=xi();return r.jsx(d.Modal.Root,{isMobile:!0,style:{zIndex:n.modal},setIsOpen:o,isOpen:s,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(Zt,{width:264,height:402,alt:"",className:Z.measurementImage,src:t.bannerImage})}),r.jsxs(Hr.Root,{className:Z.measurementTable,children:[r.jsx(Hr.Head,{className:Z.measurementHead,head:t.head}),r.jsx(Hr.Rows,{className:Z.measurementRows,rows:t.rows.map((a,i)=>[r.jsx(cy,{title:t.descriptions[i].title,text:t.descriptions[i].text},i),...a])})]})]}),r.jsx(d.Button,{onClick:()=>o(!1),className:Z.measurementClose,variant:"tertiary",children:r.jsx(d.Icon,{name:e.close})})]})})},"minicart")},uy=({children:e,className:t,...n})=>r.jsx("div",{className:d.helpers.classNameConcat(Z["pdp-main__gallery-wrapper"],t),...n,children:e}),dy=({children:e,className:t,...n})=>r.jsx("div",{className:d.helpers.classNameConcat(Z.pdp,t),...n,children:e}),my=({children:e,className:t,...n})=>r.jsx("div",{className:d.helpers.classNameConcat(Z["pdp-main"],t),...n,children:e}),py=({children:e,className:t,...n})=>r.jsx("div",{className:d.helpers.classNameConcat(Z["pdp-main__info-secondary-content"],t),...n,children:e}),fy={gallery:uy,pdp:dy,main:my,secondary:py},hy=({className:e,...t})=>r.jsx(d.Utils.Divider,{...t,className:d.helpers.classNameConcat(Z.divider,e)}),_y=Object.freeze(Object.defineProperty({__proto__:null,AccessibilityInfo:kg,Actions:Ju,BreadCrumb:ed,Credits:td,DescriptionsTabs:Fg,Divider:hy,Freight:zg,Gallery:dd,GoldenTag:Ks,Header:Zn,Links:ty,MainContent:ny,MainInfo:cd,PDPSimilars:Ag,Price:Gs,ProductMeasurements:ly,Sizes:id,SubSectionWrapper:Wt,containers:fy},Symbol.toStringTag,{value:"Module"})),gy=(e,t)=>{const[n,s]=wu({items:e}),[o,a]=t.split(":").map(Number);return isNaN(o)||isNaN(a)?[n,s]:[n<o?n:o,s>a?s:a]},yy=()=>{var E;const{ICONS:e,PLP_FILTERS:t,PLP_FILTERS_COLORS:n,PLP_FILTERS_EMPTY:s,PLP_FILTERS_TITLE:o,PLP_SIZE_ORDER:a}=Me(),[i,c]=g.useState("10000:0"),{isMobile:l}=re(),{sendDataLayerEvent:u}=ae(),{openFilters:m,setOpenFilters:f}=Rs(),{state:p}=Be(),{breadcrumb:h,deleteAllFacets:_,isLoading:y=!1,facets:x,onToggleFacet:b,selectedFacets:C}=yc.contexts.searchFacets.hook(),j=g.useRef(""),v={isLast:!0,href:(E=p.term)!=null&&E.length?`/${p.term}`:"",name:p.term},P=H.filterNonRootFacets(C,p==null?void 0:p.base);return g.useEffect(()=>{const S=x.find(({key:I})=>I==="price");if(S){const[I,T]=gy(S.values,i??"10000:0");c(`${I}:${T}`)}},[x,i,c]),g.useEffect(()=>{if(!P.length)return;const S=JSON.stringify(P);j.current!==S&&(j.current=S,u({functionKey:"filterEvent",data:{commonData:{selectedFacets:P}}}))},[P]),r.jsxs(wn.teamComponents.Filter.Root,{CONSTANTS:{ICONS:e,PLP_FILTERS_TITLE:o,PLP_FILTERS:t},breadcrumb:h.length?h:[v],deleteAllFacets:_,filters:{facets:H.filterNonCategorySelected(x,p==null?void 0:p.base),selected:P},isMobile:l??!1,isLoading:y,isOpen:m,price:i,onToggleFacet:b,setIsOpen:f,target:document.body,children:[r.jsx(wn.teamComponents.Filter.Selected,{ICONS:e,PLP_FILTERS:t,PLP_FILTERS_COLORS:n}),r.jsx(wn.teamComponents.Filter.Content,{columns:2,CONSTANTS:{ICONS:e,PLP_FILTERS:t,PLP_FILTERS_COLORS:n,PLP_FILTERS_EMPTY:s,PLP_SIZE_ORDER:a}})]})},md=()=>typeof document>"u"?null:r.jsx(yy,{});md.displayName="Filters";const Xs=({total:e=0})=>{const{SEARCH_TOTAL_PORTAL_ID:t}=Me();if(typeof window>"u")return null;const n=document.getElementById(t);return n?fs.createPortal(r.jsxs("span",{children:["[",e,"] produto",e>1?"s":""]}),n):null};Xs.displayName="PDC.Grid.NavigationTotal";const xy=({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])},vy=()=>{const{isMobile:e}=re(),{isLoading:t,products:n,total:s}=rn(),o=Me();return xy({productCount:n.length,PLP_GRID_SCROLL_BACK:o.PLP_GRID_SCROLL_BACK}),r.jsxs(r.Fragment,{children:[r.jsx(nt.Products,{isMobile:e??!1,items:n,...o}),!n.length&&!t&&r.jsx(nt.Empty,{ICONS:o.ICONS,PLP_NOT_RESULT:o.PLP_NOT_RESULT}),r.jsx(Xs,{total:s})]})},pd=({infinite:e=!1})=>r.jsx("div",{className:Xe["pdc--grid"],children:r.jsx("div",{className:Xe["pdc--grid--content"],children:e?r.jsx(nt.InfiniteScroller,{}):r.jsx(vy,{})})});pd.displayName="Grid";const wt=e=>({centro:"center",esquerda:"start",direita:"end"})[e],fd=({children:e,contentState:t,entityKey:n})=>{const{url:s}=t.getEntity(n).getData();return s?r.jsx(Fe,{href:s,children:e}):e},by=(e,t,n)=>{e.findEntityRanges(s=>{const o=s.getEntity();return o===null?!1:n.getEntity(o).getType()==="LINK"},t)},kn=e=>{const t=new Je.CompositeDecorator([{strategy:by,component:fd}]),n=Je.convertFromRaw(e);return Je.EditorState.createWithContent(n,t)},jy=e=>Je.convertFromRaw(e),Ln=Je.DefaultDraftBlockRenderMap.set("unstyled",{element:"div",aliasedElements:["div"]}),da="superior-direita",En="dentro-inferior-centro",Cy="inferior-direita",qr="dentro-inferior-esquerda",hd=e=>({position:e===En||e===qr?"absolute":"default",shouldRender:[da,En,qr].includes(e)?"top":"bottom",alignItems:[En].includes(e)?"center":[da,Cy].includes(e)?"flex-end":"flex-start",left:e===qr?"16px":e===En?"45%":"unset"}),Sy=Object.freeze(Object.defineProperty({__proto__:null,CREATE_CONTENT:kn,EXTENDED_BLOCK_RENDER_MAP:Ln,GET_CONTENT_STATE:jy,controllersPositionsAdapter:hd},Symbol.toStringTag,{value:"Module"})),Ey=({expanded:e,content:t})=>r.jsxs("details",{open:e,children:[t.textStructureReduced?r.jsx("summary",{onClick:n=>n.preventDefault(),children:r.jsx(Je.Editor,{editorKey:"draft-editor-1",blockRenderMap:Ln,editorState:t!=null&&t.textStructureReduced?kn(JSON.parse(t.textStructureReduced)):Je.EditorState.createEmpty(),onChange:()=>null,readOnly:!0})}):r.jsx(r.Fragment,{}),t.showTextStructureExpander&&t.textStructure?r.jsx(r.Fragment,{children:r.jsx(Je.Editor,{editorKey:"draft-editor-1",blockRenderMap:Ln,editorState:t.textStructure?kn(JSON.parse(t.textStructure)):Je.EditorState.createEmpty(),onChange:()=>null,readOnly:!0})}):r.jsx(r.Fragment,{})]}),Py="_textContentWrapper_176ht_5",Ny="_textContentSection_176ht_13",cs={"link-modifier":"_link-modifier_176ht_1",textContentWrapper:Py,textContentSection:Ny},_d=({data:e,ICONS:t,TEXTCONTENT_EXPANDED:n})=>{var a;const[s,o]=g.useState(!1);return r.jsx(d.TextStructure.Root,{layoutProps:{textRow:{alignContent:wt(e.textStructureAlignment),alignItems:wt(e.textStructureAlignment)},columnWrapper:{alignContent:wt(e.textStructureAlignment),alignItems:wt(e.textStructureAlignment)}},adornment:{bottom:e.showTextStructureExpander&&e.textStructure?r.jsx(d.Button,{variant:"tertiary",adornment:{end:r.jsx(d.Icon,{name:s?`${t.arrow_up}`:`${t.arrow_down}`})},onClick:()=>o(i=>!i),size:"small",children:s?(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:cs.textContentWrapper,style:{alignItems:wt(e.textStructureAlignment)},children:[r.jsx(d.TextStructure.DivWrapper,{style:{textAlign:wt(e.textStructureAlignment)},mode:e.textStructureMode??"default",children:e.textStructureReduced?r.jsx(Ey,{content:e,expanded:s}):r.jsx(r.Fragment,{})}),e.textStructureButtonLabel?r.jsx(ze,{mode:e.textStructureMode??"default",href:e.textStructureButtonHref??"#",size:e.textStructureButtonSize,className:cs["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,{})]})})},Iy=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],ma=e=>({centro:"center",esquerda:"start",direita:"end"})[e],pa={"content-modifier":"_content-modifier_16y4u_5","banner-image-wrapper-modifier":"_banner-image-wrapper-modifier_16y4u_13"},fa=({data:e,videoUrl:t,priority:n,videoRef:s,ICONS:o,TEXTCONTENT_EXPANDED:a,TIME_ZONE:i,className:c,...l})=>{const{video:u,image:m,imageHref:f,imageOpacity:p,altImage:h,backgroundColor:_,position:y,contentAlignment:x,showTimer:b,contentOrder:C,timerMode:j,timerEnd:v,timerInit:P,textStructure:E,textStructureReduced:S}=e.banner,I=(f==null?void 0:f.trim())||(m==null?void 0:m.trim())||null,{nextimage:T}=ue();return r.jsxs(d.Banner.Container,{...l,children:[r.jsxs(d.Banner.ImageWrapper,{className:pa["banner-image-wrapper-modifier"],style:p?{background:_}:void 0,children:[u&&r.jsx(we.Video,{videoRef:s,src:t,autoPlay:n,loop:!0,playsInline:!0,muted:!0}),I&&!(u!=null&&u.length)&&r.jsx(T,{src:I,width:"1920",height:"1080",alt:h??m??"",...n?{priority:n}:{},style:p?{opacity:"0"}:void 0}),!m&&!(u!=null&&u.length)&&r.jsx("div",{style:{background:_}})]}),b||S||E?r.jsx(d.Banner.Slot,{...Iy(y??"centro"),className:d.helpers.classNameConcat(pa["content-modifier"],c),style:{textAlign:ma(x)},children:r.jsxs(d.Utils.Column,{gap:"16px",alignItems:ma(x),children:[b&&C==="timer-first"&&r.jsx(An,{mode:j??"default",size:"small",dateEnd:v?new Date(v):new Date,dateInit:P?new Date(P):new Date,TIME_ZONE:i}),r.jsx(_d,{data:e.banner,ICONS:o,TEXTCONTENT_EXPANDED:a}),b&&C!=="timer-first"&&r.jsx(An,{mode:j??"default",size:"small",dateEnd:v?new Date(v):new Date,dateInit:P?new Date(P):new Date,TIME_ZONE:i})]})}):r.jsx(r.Fragment,{})]})};class Qe extends g.Component{constructor(){super(...arguments);gt(this,"state",{hasError:!1,error:null})}static getDerivedStateFromError(){return{hasError:!0,error:null}}componentDidCatch(n,s){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:",s),console.groupEnd()}}render(){const{hasError:n}=this.state,{children:s,fallback:o}=this.props;return n&&process.env.NODE_ENV==="production"?null:n&&o!==void 0?o:s}}const an=({data:e,className:t,priority:n,creative:s,name:o,...a})=>{const{handleSelectPromotionEvent:i,currentLocalRef:c}=ae(),{banner:{promotion_name:l},index:u,componentIndex:m}=e,f=typeof u=="number"?`:${u+1}`:"",p={creative_name:s,creative_slot:`${s}-${c.current}:${m+1}${f}`,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 b=e.banner.video.split("?")[1],C=b==null?void 0:b.split("&"),j=C==null?void 0:C.filter(P=>P.includes("loc")||P.includes("signature")||P.includes("user_id")),v=j==null?void 0:j.join("&");return`${e.banner.video.split("?")[0]}?${v}`}return e.banner.video},[e]),y=()=>{var x;(x=h.current)!=null&&x.paused&&h.current.play()};return r.jsx(Qe,{name:o,children:r.jsx(Wn,{eventData:{functionKey:"readyEvents",data:{event:"view_promotion",readyData:{ecommerce:{...p,index:u}}}},observerOptions:{delay:100,..._&&{threshold:.1}},..._&&{callBackWhenVisible:y},children:e.banner.href?r.jsx(Fe,{href:e.banner.href,onClick:()=>{i({updatePromotionRef:!0,promotion:p,index:u})},children:r.jsx(fa,{data:e,videoUrl:_,priority:n,videoRef:h,className:t,...a})}):r.jsx(fa,{data:e,videoUrl:_,priority:n,videoRef:h,className:t,...a})})})},Ys=e=>r.jsx(Qe,{name:e.name,children:r.jsx(an,{...e})}),gd=({columns:e,count:t,gap:n,className:s})=>{var x;const{banners:o,pages:a,products:i}=lt(),{isMobile:c}=re(),{banners:l}=Un(),{ICONS:u,PRODUCT_CARD_IMAGE_ASPECT_RATIO:m,TEXTCONTENT_EXPANDED:f,TIME_ZONE:p}=Me(),h=((x=a[a.length-1])==null?void 0:x.products.length)??t,_=i[(a.length-1)*t+h-1],y=l.filter((b,C)=>o[C]<_);return Array.isArray(y)?y.map((b,C)=>r.jsx(at.Banner,{columns:b.columns,gap:n,isMobile:c??!1,position_grid:o[C]+1,totalColumns:e,PRODUCT_CARD_IMAGE_ASPECT_RATIO:m,children:r.jsx(an,{name:"Banner Carousel",data:{banner:b,componentIndex:C},creative:"banner_grid",ICONS:u,TEXTCONTENT_EXPANDED:f,TIME_ZONE:p,className:s})},`${b.position_grid}-${C}`)):null};gd.displayName="PDC.InfiniteScroller.Banners";const yd=e=>{var s;const{pages:t}=lt(),n=t[t.length-1];return(n==null?void 0:n.page)!==((s=n==null?void 0:n.pagination)==null?void 0:s.total)&&!(n!=null&&n.loading)?r.jsx(Vn,{...e}):null};yd.displayName="PDC.InfiniteScroller.Loading";const xd=({page:e,...t})=>{const{updateParamPage:n}=lt(),{element:s}=Dn({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:s})};xd.displayName="PDC.Page.Anchor";const vd=({first:e,gap:t,isMobile:n=!1,item:s,index:o,last:a=!1,order:i,page:c,showVideo:l=!1})=>{const{load:u,handleNotify:m}=lt(),{getAvailableProductTag:f}=_t(),{BUY_BUTTON_LABELS:p,MAIN_IMAGE:h,PLP_GRID_SCROLL_BACK:_,PLP_INFINITE_SCROLL:y,PLP_PRODUCT_SIMILAR_DELAY:x,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:b,PLP_SIZE_ORDER:C,PRODUCT_CARD_IMAGE_ASPECT_RATIO:j,PRODUCT_CARD_TEXTS:v,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:P,PRODUCT_IMAGE_DIMENSIONS:E,SECOND_IMAGE:S,StoreConfig_MainSellerId:I,TEXTURE_IMAGE:T,Z_INDEX_WAR:A,ICONS:k,storeId:O}=Me(),Y=f(s==null?void 0:s.cluster.highlights);return r.jsx(at.Card,{className:s.id==="skeleton"?Xe["pdc--infinite--card--disabled"]:"",gap:t,isMobile:n??!1,item:s,order:i,tag:Y,index:o,setSkuSelected:m,showVideo:l,CONSTANTS:{BUY_BUTTON_LABELS:p,MAIN_IMAGE:h,PLP_GRID_SCROLL_BACK:_,PLP_INFINITE_SCROLL:y,PLP_PRODUCT_SIMILAR_DELAY:x,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:b,PLP_SIZE_ORDER:C,PRODUCT_CARD_IMAGE_ASPECT_RATIO:j,PRODUCT_CARD_TEXTS:v,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:P,PRODUCT_IMAGE_DIMENSIONS:E,SECOND_IMAGE:S,StoreConfig_MainSellerId:I,TEXTURE_IMAGE:T,Z_INDEX_WAR:A,ICONS:k,storeId:O},children:c&&u&&r.jsxs(r.Fragment,{children:[e&&r.jsx(In.Anchor,{page:c}),!c.loading&&r.jsx(In.Loader,{page:c}),a&&c.loading&&r.jsx(In.NextPage,{page:c})]})})};vd.displayName="PDC.Page.Card";const bd=({type:e="default",page:t,...n})=>{const{load:s,updatePage:o}=lt(),{element:a}=Dn({callback:()=>o(t),onEnterViewportOnce:!0,options:{threshold:1}});return s===!0&&r.jsx("div",{...n,className:Xe[`pdc--infinite--loader${e==="page"?"--page":""}`],ref:a})};bd.displayName="PDC.Page.Loader";const jd=({page:e,...t})=>{var o;const{addNewPage:n}=lt(),{element:s}=Dn({callback:()=>{n(e)},onEnterViewportOnce:!0,options:{threshold:[.5,1]}});return((o=e==null?void 0:e.pagination)==null?void 0:o.nextPage)===!0&&e.loading===!0?r.jsx("div",{...t,className:Xe["pdc--infinite--next-page--card"],"data-next-page":!0,ref:s}):null};jd.displayName="PDC.Page.NextPage";const In={Anchor:xd,Card:vd,Loader:bd,NextPage:jd},Cd=({count:e,gap:t,page:n})=>{const{isMobile:s}=re(),{columns:o,products:a}=lt(),i=(n.page-1)*e,c=zi(n.products,o);return Array.isArray(n.products)?n.products.map((l,u)=>r.jsx(In.Card,{first:u===0,last:u===n.products.length-1,gap:t,index:u,item:l.node,isMobile:s??!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};Cd.displayName="PDC.Page";const wy=({pages:e,load:t,PLP_GRID_SCROLL_BACK:n})=>{const s=g.useRef(!1);g.useEffect(()=>{const o=e[e.length-1];if(t&&o&&!s.current){const a=sessionStorage.getItem(n.refer),i=sessionStorage.getItem(n.order),c=document.querySelector(a==="true"?`[data-order="${i}"]`:`#pdc-scroll-infinite-${o.page}`);c&&(s.current=!0,sessionStorage.setItem(n.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])},Ry=()=>{var l,u;const{count:e}=Be(),{columns:t,gap:n,load:s,pages:o,total:a}=lt(),i=Me(),{PLP_GRID_SCROLL_BACK:c}=Me();return wy({pages:o,load:s,PLP_GRID_SCROLL_BACK:c}),r.jsxs(r.Fragment,{children:[s===!0&&((u=(l=o[0])==null?void 0:l.pagination)==null?void 0:u.count)===0&&r.jsx(nt.Empty,{ICONS:i.ICONS,PLP_NOT_RESULT:i.PLP_NOT_RESULT}),r.jsxs(at.Root,{children:[Array.isArray(o)&&o.map((m,f)=>r.jsx(Cd,{count:e,gap:n,page:m},f)),r.jsx(gd,{columns:t,count:e,gap:n})]}),r.jsx(Xs,{total:a}),r.jsx(yd,{})]})},Sd=()=>{const{banners:e}=Un();return r.jsx(ac,{banners:e,children:r.jsx(Ry,{})})};Sd.displayName="PDC.InfiniteScroller";const Ed=()=>{const{setOpenFilters:e}=Rs(),{selectedFacets:t,onToggleFacet:n,onSort:s}=Ti(),{state:o}=Be(),{Z_INDEX_WAR:a}=Me(),i=H.filterNonRootFacets(t,o==null?void 0:o.base);return r.jsx(ht.Root,{onSort:s,setOpenFilters:e,style:{zIndex:a.plp_navigation},children:r.jsx(ht.Selected,{callback:n,selected:i})})};Ed.displayName="Navigation";const ls=({currentPage:e,callback:t,type:n,...s})=>r.jsx(d.Button,{...s,iconNameStart:`arrow-${n}`,onClick:()=>{typeof t=="function"&&t(n==="left"?"prev":"")},size:"large",variant:"tertiary"});ls.displayName="Arrow";const us=({active:e,prev:t,ellipses:n,page:s,selectedPage:o})=>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:s,variant:"tertiary",onClick:()=>{typeof o=="function"&&o(s)},children:s}),n&&!t&&r.jsx(d.Button,{size:"large",variant:"tertiary",children:"..."})]});us.displayName="PageEllipses";const Pd=({children:e,endPage:t,page:n,total:s,selectedPage:o,ITEMS_PER_SECTION:a})=>r.jsxs(r.Fragment,{children:[r.jsx(us,{active:n>=a&&s>a,selectedPage:o,currentPage:n,prev:!1,ellipses:n>a&&s>a,page:1}),e,r.jsx(us,{active:s-n>1&&s!==t,selectedPage:o,currentPage:n,prev:!0,ellipses:t<s-1,page:s})]});Pd.displayName="Pagination.Layout";const Ty=(e,t,n)=>{const s=new URLSearchParams(n);return s.set(e,t),s.toString()},Ay=(e,t)=>{const n=[];for(let s=e;s<=t;s++)n.push(s);return n},ky=({currentPage:e,total:t,maxVisiblePages:n,SEARCH_PAGE_ITEM_THRESHOLD:s})=>{const o=t>=s?s:t,a=Math.max(1,e===o?o-n+1:e-Math.floor(n/2)),i=Math.min(o,a+n-1);return{startPage:a,endPage:i,totalPages:o}},Nd=({currentPage:e,pages:t,searchParams:n,VARIANT_PAGINATION:s})=>{const{router:o,pathname:a}=ue();return Array.isArray(t)?t.map(i=>r.jsx(d.Pagination.Item,{isActive:e===i,index:i,variant:e===i?s.active:s.default,onClick:()=>o.push(`${a}?${Ty("page",i.toString(),n)}`),children:i},i)):null};Nd.displayName="Pages";const Qs=({query:e,type:t="default",searchParams:n,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:m}=ue(),{state:{page:f=1}}=Be(),{pagination:{total:p}}=rn(),{endPage:h,totalPages:_,startPage:y}=ky({currentPage:f,total:p,maxVisiblePages:o,SEARCH_PAGE_ITEM_THRESHOLD:i}),x=C=>{const j=C.toString(),v=new URLSearchParams(n.toString());t==="default"&&v.set("page",j),t==="search"&&(v.set("query",e??""),v.set("count",a.toString()),v.set("page",j),s&&v.set("sort",s.replace("_",":")));const E=`${t==="search"?"/search":m}?${v.toString()}`;u.push(E)},b=C=>{x(C==="prev"?f-1:f+1)};return p?r.jsx("div",{...l,className:Xe["pdc--pagination"],children:r.jsx(d.Pagination.Wrapper,{adornment:{start:r.jsx(ls,{callback:b,currentPage:f,disabled:f<2,type:"left"}),end:r.jsx(ls,{callback:b,currentPage:f,disabled:f>=_,type:"right"})},children:r.jsx(Pd,{endPage:h,page:f,selectedPage:x,total:p,ITEMS_PER_SECTION:o,children:r.jsx(Nd,{currentPage:f,pages:Ay(y,h),searchParams:n,VARIANT_PAGINATION:c})})})}):r.jsx(r.Fragment,{})};Qs.displayName="Pagination";const Id=({gap:e,isMobile:t,className:n})=>{const{count:s,state:o}=Be(),{banners:a}=Un(),{ICONS:i,PRODUCT_CARD_IMAGE_ASPECT_RATIO:c,TEXTCONTENT_EXPANDED:l,TIME_ZONE:u}=Me(),m=a.filter(f=>Ui(f.position_grid,o.page,s));return Array.isArray(m)?m.map((f,p)=>r.jsx(at.Banner,{columns:f.columns,gap:e,isMobile:t,position_grid:f.position_grid,totalColumns:t?2:4,PRODUCT_CARD_IMAGE_ASPECT_RATIO:c,children:r.jsx(an,{name:"Banner Carousel",data:{banner:f,componentIndex:p},creative:"banner_grid",ICONS:i,TEXTCONTENT_EXPANDED:l,TIME_ZONE:u,className:n})},f.position_grid)):null};Id.displayName="PDC.Grid.Banners";const Zs=({isMobile:e=!1,items:t,BUY_BUTTON_LABELS:n,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:m,PLP_SIZE_ORDER:f,PRODUCT_CARD_IMAGE_ASPECT_RATIO:p,PRODUCT_CARD_TEXTS:h,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:_,PRODUCT_IMAGE_DIMENSIONS:y,SECOND_IMAGE:x,StoreConfig_MainSellerId:b,TEXTURE_IMAGE:C,Z_INDEX_WAR:j,storeId:v})=>{const{getAvailableProductTag:P}=_t(),{count:E,state:S}=Be(),[I,T]=g.useState(!1),[A,k]=g.useState(null),[O,Y]=g.useState([]),D=g.useCallback((G,$)=>{const J=$?Fn([$]):null;Y(G),k(J!=null&&J.length?J[0]:null),T(!0)},[]),U=e?8:16,B=(S.page-1)*E,Q=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((G,$)=>{var se,ce;const J=P(G.node.cluster.highlights);return r.jsx(at.Card,{gap:U,isMobile:e??!1,item:G.node,order:B+(((se=Q[$])==null?void 0:se.position)??0),tag:J,index:$,setSkuSelected:D,showVideo:(ce=Q[$])==null?void 0:ce.canPlayVideo,CONSTANTS:{BUY_BUTTON_LABELS:n,MAIN_IMAGE:o,PLP_GRID_SCROLL_BACK:c,PLP_INFINITE_SCROLL:l,PLP_PRODUCT_SIMILAR_DELAY:u,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:m,PLP_SIZE_ORDER:f,PRODUCT_CARD_IMAGE_ASPECT_RATIO:p,PRODUCT_CARD_TEXTS:h,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:_,PRODUCT_IMAGE_DIMENSIONS:y,SECOND_IMAGE:x,StoreConfig_MainSellerId:b,TEXTURE_IMAGE:C,Z_INDEX_WAR:j,ICONS:s,storeId:v}},G.node.sku)}),t.length>0&&r.jsx(Id,{gap:U,isMobile:e??!1})]}),r.jsx(Bn,{open:I,sku:A,skus:O,setSku:k,setVisible:T,ICONS:s,NEWSLETTER_CONFIGS:a,NOTIFY_INFO:i,PRODUCT_CARD_TEXTS:h,Z_INDEX_WAR:j})]})};Zs.displayName="PDC.Products";const nt={Empty:Us,Filters:md,Grid:pd,InfiniteScroller:Sd,Spinner:Vn,Navigation:Ed,Notification:Bn,Pagination:Qs,Products:Zs},wd=({className:e,...t})=>{const{searchParams:n,ITEMS_DEFAULT_SORT:s,ITEMS_PER_SECTION:o,ITEMS_PER_PAGE:a,PLP_INFINITE_SCROLL:i,SEARCH_PAGE_ITEM_THRESHOLD:c,VARIANT_PAGINATION:l}=t;return r.jsx(ap,{...t,children:r.jsxs("div",{className:d.helpers.classNameConcat(Xe.pdc,e),children:[r.jsxs(Ri,{forceUpdate:!0,children:[r.jsx(nt.Navigation,{}),r.jsx(nt.Filters,{})]}),i===!0?r.jsx(nt.Grid,{infinite:!0}):r.jsxs(ws,{forceUpdate:!0,query:n.get("query")??void 0,children:[r.jsx(nt.Grid,{}),r.jsx(nt.Pagination,{searchParams:n,ITEMS_DEFAULT_SORT:s,ITEMS_PER_SECTION:o,ITEMS_PER_PAGE:a,SEARCH_PAGE_ITEM_THRESHOLD:c,VARIANT_PAGINATION:l})]})]})})};wd.displayName="Templates.PDC";const Rd=g.createContext({}),Ly=({children:e,...t})=>r.jsx(Rd.Provider,{value:t,children:e}),Jn=()=>{const e=g.useContext(Rd);if(e===void 0)throw new Error("useSearchConstants must be used within a SearchConstantsProvider");return e},Oy="_grid_e75z7_21",Dy="_navigation_e75z7_44",My="_spinner_e75z7_70",Fy="_sort_e75z7_76",ft={"rearch-result--empty":"_rearch-result--empty_e75z7_1",grid:Oy,"grid-header":"_grid-header_e75z7_37",navigation:Dy,"result-disclaimer":"_result-disclaimer_e75z7_51",spinner:My,sort:Fy,"search-result":"_search-result_e75z7_91"},Td=({term:e})=>{const{router:t}=ue(),{SEARCH_RESULT:n,ICONS:s}=Jn(),o=()=>{t.push(n.EMPTY.ALL_TERMS)};return r.jsxs("div",{className:ft["rearch-result--empty"],children:[r.jsxs(d.TextStructure.DivWrapper,{children:[r.jsx("div",{className:H.responsive["responsive-desktop-flex"],children:r.jsx("h2",{className:"typography-style-heading-sm",children:n.EMPTY.NOT_FOUND})}),r.jsx("div",{className:H.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:()=>o(),variant:"tertiary",size:"medium",adornment:{end:r.jsx(d.Icon,{name:s.arrow_right,size:"medium"})},children:n.EMPTY.ALL_TERMS_LABEL})]})};Td.displayName="RearchResult.Empty";const zy=e=>r.jsxs(r.Fragment,{children:[r.jsx("div",{className:H.responsive["responsive-desktop-flex"],children:r.jsx("h2",{className:"typography-style-heading-sm",children:e.SEARCH.SEARCHING})}),r.jsx("div",{className:H.responsive["responsive-mobile-flex"],children:r.jsx("h2",{className:"typography-style-body-md",children:e.SEARCH.SEARCHING})}),r.jsx(d.Spinner,{className:ft.spinner})]}),By=(e,t,n)=>r.jsxs(r.Fragment,{children:[r.jsx("div",{className:H.responsive["responsive-desktop-flex"],children:r.jsx("h2",{className:"typography-style-heading-sm",children:t.SEARCH.SEARCHED})}),r.jsx("div",{className:H.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}"`]})]}),Ad=({isLoading:e,quantity:t,term:n})=>{const{SEARCH_RESULT:s}=Jn();return r.jsx(d.TextStructure.DivWrapper,{children:e?zy(s):By(t,s,n)})};Ad.displayName="Search.Loading";const Uy=({term:e})=>{const[t,n]=g.useState(!1),{router:s}=ue(),{searchParams:o}=Be(),{ITEMS_DEFAULT_SORT:a,ITEMS_PER_PAGE:i,ICONS:c}=Jn(),l=u=>{H.navigateToSearchPage(s,e,i,1,u??a)};return r.jsx("div",{className:ft.sort,children:r.jsx(Xn,{handleSelectValue:u=>l(u??"release_desc"),sortListOpen:t,setSortListOpen:n,searchParams:o,ICONS:c})})},$y=({query:e})=>{const{isLoading:t,products:n,pagination:s}=rn();return r.jsxs("div",{className:ft["grid-header"],children:[r.jsxs("div",{className:ft.navigation,children:[!t&&(n!=null&&n.length)?r.jsx(Uy,{term:e}):null,r.jsx(d.Utils.Divider,{})]}),!t&&(n!=null&&n.length)?r.jsx("div",{className:ft["result-disclaimer"],children:r.jsx(Ad,{term:e,isLoading:t,quantity:s.count})}):null]})},kd=({isMobile:e=!1,query:t})=>{const{isLoading:n,products:s,pagination:o}=rn(),{searchParams:a}=Be(),i=Jn(),{sendDataLayerEvent:c}=ae(),l=g.useRef({query:t,sended:!1}),u=g.useMemo(()=>!n&&s.length>0&&o.count>0,[n,s.length,o.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:(s==null?void 0:s.length)>0}}}),l.current.sended=!0)}},[t,s,n,c]),r.jsxs("div",{className:ft.grid,children:[u?r.jsx($y,{query:t}):r.jsx(r.Fragment,{}),!n&&(s!=null&&s.length)?r.jsx(Zs,{isMobile:e??!1,items:s,...i}):r.jsx(r.Fragment,{}),(s==null?void 0:s.length)===0&&!n?r.jsx(Td,{term:t}):null,u&&r.jsx(Qs,{searchParams:a,...i})]})};kd.displayName="SearchResultContent";const Hy=({className:e})=>{const{state:t}=Be(),{isMobile:n}=re();return r.jsx(ws,{forceUpdate:!1,query:t.term??"",children:r.jsx("div",{className:d.helpers.classNameConcat(ft["search-result"],e),children:r.jsx(kd,{currentPage:t.page,isMobile:n??!1,query:t.term??""})})})},Ld=({className:e,searchParams:t,CONSTANTS:n})=>{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 r.jsx(Ly,{...n,children:r.jsx(Is,{sort:c,state:{sort:c,base:"",facets:[],term:o,page:i,count:a},count:a,searchParams:s,ITEMS_PER_PAGE:n.ITEMS_PER_PAGE,children:r.jsx(Hy,{className:e})})})};Ld.displayName="Search";const qy=({page:e,data:t})=>{const{pathname:n}=ue(),s=g.useRef(null),{sendDataLayerEvent:o,currentLocalRef:a,itemListRef:i,promotionEventRef:c}=ae();return g.useEffect(()=>{const l=Hi("login_event")||"{}",u=JSON.parse(l);if(u.name||u.method){const m=new Date(0);o({functionKey:"readyEvents",data:{event:u.name,readyData:{method:u.method}}}),As("login_event","",{expires:m})}},[]),g.useEffect(()=>{if(s.current===n)return;s.current=n;let l={};switch(e){case"PDP":{const m=t,f={};if(!m){l={page_category:"pdp"};break}m.items.forEach(({itemId:p,sellers:h})=>f[p]=h[0].commertialOffer.AvailableQuantity),l={page_category:"pdp",seller_ids:m.items.map(({sellers:p})=>p[0].sellerId).join(),skuStocks:f,product_reference_id:m.productReference};break}case"PDC":{const{page_category:m,page_departament:f,id:p,name:h}=wa(),_=h,y=p;l={page_category:"lista_produtos",...f&&{page_departament:f}},i.current={item_list_name:n==="/search"?"busca":_??void 0,item_list_id:n==="/search"?void 0:y??void 0},f&&o({functionKey:"readyEvents",data:{event:"view_category",readyData:{page_category:m,page_departament:f}}});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})},[n]),null};var ds={exports:{}},Pn={exports:{}},ha;function Vy(){return ha||(ha=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function n(l,u){for(var m in u)Object.defineProperty(l,m,{enumerable:!0,get:u[m]})}n(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:m}=l;const f=document.createElement(u);for(const _ in m){if(!m.hasOwnProperty(_)||_==="children"||_==="dangerouslySetInnerHTML"||m[_]===void 0)continue;const y=s[_]||_.toLowerCase();u==="script"&&(y==="async"||y==="defer"||y==="noModule")?f[y]=!!m[_]:f.setAttribute(y,m[_])}const{children:p,dangerouslySetInnerHTML:h}=m;return h?f.innerHTML=h.__html||"":p&&(f.textContent=typeof p=="string"?p:Array.isArray(p)?p.join(""):""),f}function a(l,u){if(l instanceof HTMLElement&&u instanceof HTMLElement){const m=u.getAttribute("nonce");if(m&&!l.getAttribute("nonce")){const f=u.cloneNode(!0);return f.setAttribute("nonce",""),f.nonce=m,m===l.nonce&&l.isEqualNode(f)}}return l.isEqualNode(u)}let i;process.env.__NEXT_STRICT_NEXT_HEAD?i=(l,u)=>{const m=document.querySelector("head");if(!m)return;const f=m.querySelectorAll('meta[name="next-head"]')||[],p=[];if(l==="meta"){const y=m.querySelector("meta[charset]");y&&p.push(y)}for(let y=0;y<f.length;y++){var h;const b=f[y].nextSibling;(b==null||(h=b.tagName)==null?void 0:h.toLowerCase())===l&&p.push(b)}const _=u.map(o).filter(y=>{for(let x=0,b=p.length;x<b;x++){const C=p[x];if(a(C,y))return p.splice(x,1),!1}return!0});p.forEach(y=>{var x;const b=y.previousSibling;if(b&&b.getAttribute("name")==="next-head"){var C;(C=y.parentNode)==null||C.removeChild(b)}(x=y.parentNode)==null||x.removeChild(y)}),_.forEach(y=>{var x;const b=document.createElement("meta");b.name="next-head",b.content="1",((x=y.tagName)==null?void 0:x.toLowerCase())==="meta"&&y.getAttribute("charset")||m.appendChild(b),m.appendChild(y)})}:i=(l,u)=>{const m=document.getElementsByTagName("head")[0],f=m.querySelector("meta[name=next-head-count]");if(process.env.NODE_ENV!=="production"&&!f){console.error("Warning: next-head-count is missing. https://nextjs.org/docs/messages/next-head-count-missing");return}const p=Number(f.content),h=[];for(let x=0,b=f.previousElementSibling;x<p;x++,b=(b==null?void 0:b.previousElementSibling)||null){var _;(b==null||(_=b.tagName)==null?void 0:_.toLowerCase())===l&&h.push(b)}const y=u.map(o).filter(x=>{for(let b=0,C=h.length;b<C;b++){const j=h[b];if(a(j,x))return h.splice(b,1),!1}return!0});h.forEach(x=>{var b;return(b=x.parentNode)==null?void 0:b.removeChild(x)}),y.forEach(x=>m.insertBefore(x,f)),f.content=(p-h.length+y.length).toString()};function c(){return{mountedInstances:new Set,updateHead:l=>{const u={};l.forEach(p=>{if(p.type==="link"&&p.props["data-optimized-fonts"]){if(document.querySelector('style[data-href="'+p.props["data-href"]+'"]'))return;p.props.href=p.props["data-href"],p.props["data-href"]=void 0}const h=u[p.type]||[];h.push(p),u[p.type]=h});const m=u.title?u.title[0]:null;let f="";if(m){const{children:p}=m.props;f=typeof p=="string"?p:Array.isArray(p)?p.join(""):""}f!==document.title&&(document.title=f),["meta","base","link","style","script"].forEach(p=>{i(p,u[p]||[])})}}}(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}(function(e,t){"use client";Object.defineProperty(t,"__esModule",{value:!0});function n(E,S){for(var I in S)Object.defineProperty(E,I,{enumerable:!0,get:S[I]})}n(t,{default:function(){return P},handleClientScriptLoad:function(){return x},initScriptLoader:function(){return j}});const s=Le,o=Ft,a=r,i=s._(fs),c=o._(g),l=Wu(),u=Vy(),m=qc(),f=new Map,p=new Set,h=["onLoad","onReady","dangerouslySetInnerHTML","children","onError","strategy","stylesheets"],_=E=>{if(i.default.preinit){E.forEach(S=>{i.default.preinit(S,{as:"style"})});return}if(typeof window<"u"){let S=document.head;E.forEach(I=>{let T=document.createElement("link");T.type="text/css",T.rel="stylesheet",T.href=I,S.appendChild(T)})}},y=E=>{const{src:S,id:I,onLoad:T=()=>{},onReady:A=null,dangerouslySetInnerHTML:k,children:O="",strategy:Y="afterInteractive",onError:D,stylesheets:U}=E,B=I||S;if(B&&p.has(B))return;if(f.has(S)){p.add(B),f.get(S).then(T,D);return}const Q=()=>{A&&A(),p.add(B)},G=document.createElement("script"),$=new Promise((J,se)=>{G.addEventListener("load",function(ce){J(),T&&T.call(this,ce),Q()}),G.addEventListener("error",function(ce){se(ce)})}).catch(function(J){D&&D(J)});k?(G.innerHTML=k.__html||"",Q()):O?(G.textContent=typeof O=="string"?O:Array.isArray(O)?O.join(""):"",Q()):S&&(G.src=S,f.set(S,$));for(const[J,se]of Object.entries(E)){if(se===void 0||h.includes(J))continue;const ce=u.DOMAttributeNames[J]||J.toLowerCase();G.setAttribute(ce,se)}Y==="worker"&&G.setAttribute("type","text/partytown"),G.setAttribute("data-nscript",Y),U&&_(U),document.body.appendChild(G)};function x(E){const{strategy:S="afterInteractive"}=E;S==="lazyOnload"?window.addEventListener("load",()=>{(0,m.requestIdleCallback)(()=>y(E))}):y(E)}function b(E){document.readyState==="complete"?(0,m.requestIdleCallback)(()=>y(E)):window.addEventListener("load",()=>{(0,m.requestIdleCallback)(()=>y(E))})}function C(){[...document.querySelectorAll('[data-nscript="beforeInteractive"]'),...document.querySelectorAll('[data-nscript="beforePageRender"]')].forEach(S=>{const I=S.id||S.getAttribute("src");p.add(I)})}function j(E){E.forEach(x),C()}function v(E){const{id:S,src:I="",onLoad:T=()=>{},onReady:A=null,strategy:k="afterInteractive",onError:O,stylesheets:Y,...D}=E,{updateScripts:U,scripts:B,getIsSsr:Q,appDir:G,nonce:$}=(0,c.useContext)(l.HeadManagerContext),J=(0,c.useRef)(!1);(0,c.useEffect)(()=>{const ce=S||I;J.current||(A&&ce&&p.has(ce)&&A(),J.current=!0)},[A,S,I]);const se=(0,c.useRef)(!1);if((0,c.useEffect)(()=>{se.current||(k==="afterInteractive"?y(E):k==="lazyOnload"&&b(E),se.current=!0)},[E,k]),(k==="beforeInteractive"||k==="worker")&&(U?(B[k]=(B[k]||[]).concat([{id:S,src:I,onLoad:T,onReady:A,onError:O,...D}]),U(B)):Q&&Q()?p.add(S||I):Q&&!Q()&&y(E)),G){if(Y&&Y.forEach(ce=>{i.default.preinit(ce,{as:"style"})}),k==="beforeInteractive")return I?(i.default.preload(I,D.integrity?{as:"script",integrity:D.integrity,nonce:$,crossOrigin:D.crossOrigin}:{as:"script",nonce:$,crossOrigin:D.crossOrigin}),(0,a.jsx)("script",{nonce:$,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([I,{...D,id:S}])+")"}})):(D.dangerouslySetInnerHTML&&(D.children=D.dangerouslySetInnerHTML.__html,delete D.dangerouslySetInnerHTML),(0,a.jsx)("script",{nonce:$,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([0,{...D,id:S}])+")"}}));k==="afterInteractive"&&I&&i.default.preload(I,D.integrity?{as:"script",integrity:D.integrity,nonce:$,crossOrigin:D.crossOrigin}:{as:"script",nonce:$,crossOrigin:D.crossOrigin})}return null}Object.defineProperty(v,"__nextScript",{value:!0});const P=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)})(ds,ds.exports);var Wy=ds.exports,Gy=Wy;const Od=H.getDefaultExportFromCjs(Gy),Ky=({children:e,ONE_TRUST:t})=>r.jsxs(r.Fragment,{children:[r.jsx(Od,{src:"https://cdn.cookielaw.org/scripttemplates/otSDKStub.js",defer:!0,strategy:"afterInteractive","data-domain-script":t.siteId,type:"text/javascript"}),e]}),Xy=$l(()=>Promise.resolve(Ky),{ssr:!1}),Yy="_lgpd_vffd3_82",Qy="_success_vffd3_248",Zy="_error_vffd3_312",ve={"newsletter-root":"_newsletter-root_vffd3_1","has-border-top":"_has-border-top_vffd3_9","has-border-bottom":"_has-border-bottom_vffd3_12","newsletter-container":"_newsletter-container_vffd3_20","content-text":"_content-text_vffd3_35","form-wrapper":"_form-wrapper_vffd3_39","newsletter-container-banner":"_newsletter-container-banner_vffd3_64",lgpd:Yy,"textfield-structure-modifier":"_textfield-structure-modifier_vffd3_190","input-wrapper-modifier":"_input-wrapper-modifier_vffd3_196","submit-btn":"_submit-btn_vffd3_200","loading-spinner":"_loading-spinner_vffd3_211","terms-and-conditions-checkbox":"_terms-and-conditions-checkbox_vffd3_217","terms-and-conditions-unchecked":"_terms-and-conditions-unchecked_vffd3_230","terms-and-conditions-checked":"_terms-and-conditions-checked_vffd3_244",success:Qy,"text-structure-modifier":"_text-structure-modifier_vffd3_257","success-title":"_success-title_vffd3_297","close-button":"_close-button_vffd3_302",error:Zy,"newsletter-wrapper":"_newsletter-wrapper_vffd3_332","banner-container":"_banner-container_vffd3_345","newsletter-provider-wrapper":"_newsletter-provider-wrapper_vffd3_358","newsletter-root-banner":"_newsletter-root-banner_vffd3_371","banner-background":"_banner-background_vffd3_392","newsletter-provider-wrapper-background":"_newsletter-provider-wrapper-background_vffd3_401"},Dd=({invalid_message:e,master_data_field:t,placeholder:n,required:s=!1,CONSTANTS:o})=>{const{isMobile:a}=re(),{inputsStatus:i,setInputsStatus:c,setFormStatus:l,variant:u}=Os();return r.jsx(d.TextField.Structure,{className:`${ve["textfield-structure-modifier"]} ${u}`,input:r.jsx(d.TextField.Input,{mode:"simple",label:n,sizeVariant:a?o.NEWSLETTER_CONFIGS.interactionSizeMob:o.NEWSLETTER_CONFIGS.interactionSizeDesk,name:t,className:`${ve["input-wrapper-modifier"]} ${u}`,feedback:i[t]==="required"?"error":i[t],onChange:()=>{i[t]!=="none"&&(c(m=>({...m,[t]:"none"})),l("idle"))},required:s}),supportText:i[t]==="error"||i[t]==="required"?r.jsx("div",{className:u==="horizontal"?ve["support-text-modifier"]:"",children:r.jsx(d.TextField.SupportText,{text:i[t]==="error"?e??o.NEWSLETTER_CONFIGS.messages.invalid_generic:o.NEWSLETTER_CONFIGS.messages.required_field,feedback:"error"})}):null})};Dd.displayName="Newsletter.Input";const Md=({formStatus:e,fields:t,CONSTANTS:n})=>r.jsxs(r.Fragment,{children:[Array.isArray(t)&&t.map((s,o)=>r.jsx(Dd,{invalid_message:s.invalid_message,master_data_field:s.master_data_field,placeholder:s.placeholder,required:s.required,type:s.type,CONSTANTS:n},`nt-field-${s.master_data_field}-${o}`)),e==="error"&&r.jsx("div",{className:ve.error,children:r.jsx("p",{children:n.NEWSLETTER_CONFIGS.form.status.error})})]});Md.displayName="Newsletter.FormFields";const Fd=({formStatus:e,CONSTANTS:t,...n})=>{const{isMobile:s}=re();return r.jsxs(d.Button,{...n,className:ve["submit-btn"],disabled:e==="success",size:s?"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:ve["loading-spinner"],size:"small"})]})};Fd.displayName="Newsletter.SubmitButton";const zd=({checkboxRef:e,formStatus:t,setFormStatus:n,CONSTANTS:s})=>{const o=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: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:ve["terms-and-conditions-checkbox"]}),t==="unchecked"&&r.jsx("div",{className:ve["terms-and-conditions-unchecked"],children:r.jsx(d.TextStructure.Root,{adornment:{start:r.jsx(d.Icon,{name:s.ICONS.alert_circle,size:"small"})},children:r.jsx(d.TextStructure.DivWrapper,{children:r.jsx("p",{children:s.NEWSLETTER_CONFIGS.messages.terms_and_conditions_not_accepted})})})})]})};zd.displayName="Newsletter.Terms";const Bd=({title:e,description:t,CONSTANTS:n})=>r.jsx("div",{className:ve.success,children:r.jsx(d.TextStructure.Root,{children:r.jsxs(d.TextStructure.DivWrapper,{className:ve["text-structure-modifier"],children:[r.jsxs("div",{className:ve["success-title"],children:[r.jsx(d.Icon,{name:n.ICONS.check_circle,size:"medium"}),r.jsx("h3",{children:e})]}),r.jsx("p",{children:t})]})})});Bd.displayName="Newsletter.Success";const Ud=({formPayloadOptionals:e,masterDataEntity:t,banner:n,termsDescription:s,lgpdLinkLable:o,lgpdLink:a,variant:i,CONSTANTS:c})=>{const{checkboxRef:l,fields:u,formStatus:m,hasTermsAndConditions:f,handleClickToSubmit:p,handleSubmit:h,setFormStatus:_}=Os();return r.jsx(r.Fragment,{children:m==="success"?r.jsx(Bd,{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:ve["form-wrapper"],onSubmit:y=>h(y,e,t),children:[r.jsx(Md,{formStatus:m,fields:u,CONSTANTS:c}),f&&r.jsx(zd,{checkboxRef:l,formStatus:m,setFormStatus:_,CONSTANTS:c}),r.jsx(Fd,{formStatus:m,type:"submit",variant:"primary",onClick:p,CONSTANTS:c})]}),(n||i==="vertical")&&r.jsxs("div",{className:ve.lgpd,children:[s&&r.jsx("p",{children:s}),o&&r.jsx(ze,{href:a,children:o})]})]})})};Ud.displayName="Newsletter.Form";const Jy=["horizontal","vertical"],Js=({className:e,description:t,formPayloadOptionals:n,fields:s,masterDataEntity:o,masterDataEmailField:a,masterDataNameField:i,banner:c,altBanner:l,bannerBackground:u,termsDescription:m,lgpdLinkLable:f,lgpdLink:p,title:h,variant:_,borderTop:y,borderBottom:x,CONSTANTS:b,...C})=>{if(!a||!i)return null;const j=d.helpers.ValidateProp({fieldTypes:Jy,property:_,fallback:"horizontal"});return r.jsxs("div",{className:c?u?ve["banner-background"]:ve["newsletter-wrapper"]:"",children:[c&&r.jsx(d.Banner.Container,{className:ve["banner-container"],children:r.jsx(d.Banner.ImageWrapper,{children:r.jsx(we.Image,{src:c,alt:l,width:"1920",height:"500"})})}),r.jsx("div",{className:c?ve["newsletter-provider-wrapper"+(u?"-background":"")]:"",children:r.jsx(hc,{fields:s,masterDataEmailField:a,masterDataNameField:i,variant:j,CONSTANTS:b,children:r.jsx("div",{...C,className:d.helpers.classNameConcat(ve["newsletter-root"+(c||j==="vertical"?"-banner":"")],[y&&ve["has-border-top"],x&&ve["has-border-bottom"],e].filter(Boolean)),"data-variant":j,children:r.jsxs("div",{className:c||j==="vertical"?ve["newsletter-container-banner"]:ve["newsletter-container"],children:[r.jsxs("div",{className:ve["content-text"],children:[r.jsx("h2",{children:h}),r.jsx("p",{children:t}),!c&&j==="horizontal"&&r.jsxs("div",{className:ve.lgpd,children:[r.jsx("p",{children:m}),f&&r.jsx(ze,{target:"_blank",href:p,children:f})]})]}),r.jsx(Ud,{formPayloadOptionals:n,masterDataEntity:o,CONSTANTS:b,banner:c,lgpdLink:p,lgpdLinkLable:f,termsDescription:m,variant:j})]})})})})]})};Js.displayName="Newsletter";const $d=({children:e,...t})=>r.jsx("div",{...t,children:e});$d.displayName="CallToAction";const ex="_wrapper_aejhu_1",tx="_body_aejhu_8",On={wrapper:ex,body:tx,"wrapper-body":"_wrapper-body_aejhu_16","accordion-modifier":"_accordion-modifier_aejhu_32"},nx=({children:e,className:t,...n})=>r.jsx("div",{...n,className:d.helpers.classNameConcat(On.wrapper,t),children:e}),rx=({data:e,ICONS:t})=>{const[n,s]=g.useState(null),o=i=>{s(c=>c===i?null:i)},{router:a}=ue();return r.jsx("div",{className:d.helpers.classNameConcat(On.body),children:Array.isArray(e)&&(e==null?void 0:e.map((i,c)=>{var f;const l=n===i.id,u=i.buttonHref&&i.buttonHref!=="#",m=i.buttonHref&&i.type==="button"&&u?{onClick:()=>{var p;if((p=i.buttonHref)!=null&&p.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,...m,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(On["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:()=>o(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(ze,{href:i.buttonHref??"#",mode:i.buttonMode??"default",size:i.buttonSize??"medium",adornments:(f=i.buttonIcon)!=null&&f.length?{end:r.jsx(d.Icon,{name:t[i.buttonIcon]??i.buttonIcon})}:void 0,children:i.buttonLabel}):r.jsx(r.Fragment,{})]})})})]})},i.id)}))})},sx=({className:e,data:t,ICONS:n,...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?r.jsxs(nx,{...s,className:e,children:[r.jsx("div",{className:On["wrapper-body"],hidden:!o,children:o&&r.jsx(rx,{data:i.content,ICONS:n})}),r.jsx($d,{children:r.jsx("div",{onClick:l,children:o?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,{})},ox="_formContainer_zwlly_1",ax="_formFieldGroup_zwlly_6",ix="_formFieldGroupName_zwlly_10",cx="_formFieldWrapper_zwlly_20",lx="_formFieldInput_zwlly_30",ux="_success_zwlly_73",dx="_button_zwlly_110",mx="_error_zwlly_114",it={formContainer:ox,formFieldGroup:ax,formFieldGroupName:ix,formFieldWrapper:cx,formFieldInput:lx,success:ux,"text-structure-modifier":"_text-structure-modifier_zwlly_85",button:dx,error:mx},px=({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 fx(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 hx=async e=>await fetch("/api/dito-ingest",{method:"POST",body:JSON.stringify(e)}).then(n=>n.json()),Hd=g.createContext({});function qd({children:e,groups:t,masterDataEntity:n,postFn:s,actionName:o="",originName:a="",POPUP_SUBMITTED_STORAGE:i}){const[c,l]=g.useState(!1),[u,m]=g.useState({}),[f,p]=g.useState([]),[h,_]=g.useState("idle"),[y,x]=g.useState(""),b=({target:{name:j,value:v}})=>{m({...u,[j]:v})},C=j=>{j.preventDefault(),s({body:{masterDataEntity:n,payload:u}}).then(async({Message:v})=>{if(v){const E=v.match(/'(.*?[^\\])'/g)||[];var P="-";for(const S of E){const I=S.substring(1,S.length-1),A=t.flatMap(k=>k.fields).find(({name:k})=>k===I);x(I),A&&(P=A.name)}return _("error"),p([P])}if(u.email){const E=await fx(u.email||""),S=new Date().toISOString();hx([{user_id:E,timestamp:S,type:"IDENTIFY",traits:{id:E,created_at:S,name:u.name,email:u.email,phone:u==null?void 0:u.phone}},{action:o,timestamp:S,type:"TRACK",user_id:E,context:{user_agent:navigator.userAgent},properties:{custom_data:{email:u.email,nome:u.name,origem:a,...u}}}])}return window.localStorage.setItem(i,"true"),m({}),l(!0),_("success"),p([])})};return r.jsx(Hd.Provider,{value:{formErrors:f,handleInputChange:b,submitForm:C,formData:u,status:h,fieldMessage:y,success:c,setSuccess:l},children:e})}function er(){return g.useContext(Hd)}const _x=({fields:e,className:t})=>{const{formData:n,handleInputChange:s,formErrors:o}=er();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:s,required:c,feedback:o.includes(i)?"error":"none",className:it.formFieldInput,"data-inputsize":l},i))})},gx=({FORM_CONFIGS:e,ICONS:t})=>{const{router:n}=ue();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})]})},yx=({FORM_CONFIGS:e,ICONS:t})=>{const{fieldMessage:n}=er();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]})})})})},xx=({children:e,className:t,ICONS:n,FORM_CONFIGS:s})=>{const{submitForm:o,status:a}=er();return r.jsx("form",{onSubmit:o,className:d.helpers.classNameConcat(it.formContainer,t),children:a==="success"?r.jsx(gx,{ICONS:n,FORM_CONFIGS:s}):r.jsxs(r.Fragment,{children:[e,a==="error"&&r.jsx(yx,{ICONS:n,FORM_CONFIGS:s})]})})},vx=e=>{const{children:t,className:n}=e;return r.jsx(qd,{...e,children:r.jsx(xx,{ICONS:e.ICONS,FORM_CONFIGS:e.FORM_CONFIGS,className:n,children:t})})},Dt={Root:vx,FieldGroup:px,FieldWrapper:_x},bx="_button_1e35m_39",yt={"banner-container":"_banner-container_1e35m_1","banner-background":"_banner-background_1e35m_6","form-root":"_form-root_1e35m_15",button:bx,"form-fied-wrapper":"_form-fied-wrapper_1e35m_52"};function jx({content:e,sections:t,FORM_CONFIGS:n,ICONS:s,postFn:o,POPUP_SUBMITTED_STORAGE:a}){var l;const{isMobile:i}=re(),c=((l=t.find(({name:u})=>u==="Form"))==null?void 0:l.data)||{};return r.jsx("div",{children:r.jsxs(d.Banner.Container,{className:yt["banner-container"],children:[r.jsx(d.Banner.ImageWrapper,{children:r.jsx(we.Image,{className:yt["banner-background"],src:i?e.bannerMobile:e.bannerDesk,alt:e.altBanner,width:"1920",height:"500"})}),r.jsxs(Dt.Root,{postFn:o,ICONS:s,FORM_CONFIGS:n,groups:c.groups||[],masterDataEntity:c.masterDataEntity||"",className:yt["form-root"],POPUP_SUBMITTED_STORAGE:a,children:[c.groups.map(u=>r.jsx(Dt.FieldGroup,{group:u,children:r.jsx(Dt.FieldWrapper,{fields:u.fields,className:yt["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:yt["button-wrapper"],children:r.jsx("div",{className:yt["button-frame"],children:r.jsx(d.Button,{size:"large",type:"submit",className:yt.button,children:e.buttonLabel})})})]})]})]})})}const Cx="_content_1jj9i_36",Sx="_trends_1jj9i_47",Ex="_modal_1jj9i_1",He={"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:Sx,"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:Ex,"search-modal__modal":"_search-modal__modal_1jj9i_100"},Vd=g.createContext({}),Px=({children:e,term:t})=>{const[n,s]=g.useState([]),[o,a]=g.useState(!1);return g.useEffect(()=>{if(!t){s([]);return}(async()=>{a(!0);try{const c=await fetch("/api/search/suggestedTerms",{method:"POST",body:JSON.stringify({query:t,locale:"pt-BR"})}),{data:l}=await c.json();s((l==null?void 0:l.searches)||[])}catch(c){console.error("Erro ao buscar sugestões:",c)}})()},[t]),r.jsx(Vd.Provider,{value:g.useMemo(()=>({suggestedTerms:n,loading:o,setLoading:a}),[n,o]),children:e})},Nx=({children:e,...t})=>r.jsx(Px,{...t,children:e}),Ix=()=>{const e=g.useContext(Vd);if(!e)throw new Error("useSuggestedTermsContext must be used within a SuggestedTermsProvider");return e},Vr=(e,t,n=24,s=1,o="release:desc")=>{const a=`/search?query=${t??""}&count=${n}&page=${s}${o?`&sort=${o.replace("_",":")}`:""}`;e.push(a)},Wd=({placeholder:e,noResultsTitle:t,noResultsLabel:n,noResultsTermText:s,handleClose:o,setTerm:a,ICONS:i,ITEMS_DEFAULT_SORT:c,ITEMS_PER_PAGE:l,SEARCH_MODAL:u})=>{const[m,f]=g.useState(""),{suggestedTerms:p,loading:h,setLoading:_}=Ix(),{router:y}=ue(),x=g.useRef(null),b=v=>{f(v.target.value),clearTimeout(x.current),v.target.value.length>2&&(a(v.target.value),x.current=setTimeout(()=>{a(v.target.value),_(!1)},2e3))},C=v=>{v.key==="Enter"&&(m==null?void 0:m.length)>2&&(o(),Vr(y,m,l,1,c))},j=v=>{o(),Vr(y,v,l,1,c)};return g.useEffect(()=>{if(clearTimeout(x.current),m.length<=2||p.length>0){_(!1);return}return _(!0),x.current=setTimeout(()=>{Vr(y,m,l,1,c),_(!1),o()},2e3),()=>{clearTimeout(x.current)}},[m,p]),r.jsx(d.DropDown.AutoComplete,{className:He["modal-auto-complete"],onKeyDown:C,onInputChange:b,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(m)},disabled:!(m.length>2)})},children:(p==null?void 0:p.length)>0&&r.jsx(r.Fragment,{children:(p==null?void 0:p.length)>0&&(m==null?void 0:m.length)>2?r.jsx(d.DropDown.AutoCompleteList,{className:He["modal-auto-complete__dropdown"],seeAll:r.jsx("span",{onClick:()=>j(m),children:s+m}),children:p.map((v,P)=>r.jsx(d.DropDown.ListItemWithLink,{children:r.jsx(ze,{href:`/search?query=${v.term}&count=${l}&page=1`,size:"x-small",title:v.term,disableUnderline:!0,disablePadding:!1,onClick:E=>{E.preventDefault(),o()},children:v.term})},`key-${v.term}-${P}`))}):!h&&(m==null?void 0:m.length)>3&&(p==null?void 0:p.length)===0&&r.jsxs(d.DropDown.AutoCompleteList,{className:He["modal-search-empty"],children:[r.jsx(d.DropDown.NotResults,{description:n,title:t}),r.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:r.jsx(d.Icon,{name:i.arrow_right,size:"medium"})},children:u.EMPTY.ALL_TERMS_LABEL})]})})})};Wd.displayName="SearchModal.AutoComplete";function wx({title:e,ICONS:t}){const{isMobile:n}=re();return r.jsx(d.Modal.Header,{navigation:"top",className:He["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:He["search-modal__title"],title:e}),r.jsx(d.Button,{className:He["modal-header__close-button"],"data-close":!0,iconNameStart:t.close,size:"small",variant:"tertiary"})]})})}const Gd=g.createContext({searches:[],isLoading:!1,error:null});let Wr=null;const Rx=({children:e})=>{const[t,n]=g.useState([]),[s,o]=g.useState(!0),[a,i]=g.useState(null);return g.useEffect(()=>{(async()=>{try{if(o(!0),Wr){n(Wr),o(!1);return}const l=await fetch("/api/search/topSearch");if(!l.ok)throw new Error(`Erro ao buscar os dados: ${l.status}`);const m=(await l.json()).data.searches||[];Wr=m,n(m)}catch(l){i(l instanceof Error?l.message:"Erro desconhecido")}finally{o(!1)}})()},[]),r.jsx(Gd.Provider,{value:g.useMemo(()=>({searches:t,isLoading:s,error:a}),[t,s,a]),children:e})},Tx=()=>{const e=g.useContext(Gd);if(!e)throw new Error("useTopSearches must be used within a TopSearchesProvider");return e},Ax=({title:e,allTermsLabel:t,allTermsUrl:n,qtyTrends:s,handleClose:o,ICONS:a,ITEMS_PER_PAGE:i})=>{const{searches:c,isLoading:l}=Tx(),{router:u}=ue(),m=Array.isArray(c)?c:[];return r.jsx(r.Fragment,{children:!l&&m.length>0?r.jsx(d.ComponentList.Structure,{className:He.trends,title:e,children:r.jsxs("div",{className:He["trends-content"],children:[r.jsx(d.ComponentList.List,{columns:1,children:m.slice(0,s).map((f,p)=>r.jsx(d.ComponentList.ListItem,{className:He["trends-item"],children:r.jsx(ze,{href:`/search?query=${f.term}&count=${i}&page=1`,size:"x-small",adornments:{end:r.jsx(d.Icon,{name:a.arrow_right,size:"x-small"})},disableUnderline:!0,title:f.term,onClick:()=>o(),children:f.term})},`list-item-${p}`))}),r.jsx(d.Button,{className:"all-terms",variant:"tertiary",size:"x-small",underline:!1,onClick:()=>{o(),u.push(n)},adornment:{end:r.jsx(d.Icon,{name:a.arrow_right,size:"x-small"})},children:t})]})}):null})};function kx({SectionZone:e}){var s;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:He.content,children:t!==null&&r.jsx(e,{data:((s=t[0])==null?void 0:s.sections)??[],componentConfigs:{"Product Carousel":{searchModal:!0}}})})}const Kd=({className:e,trends:t,CONSTANTS:n,SectionZone:s})=>{const[o,a]=g.useState(""),{isMobile:i}=re(),c=li(),{setValue:l}=Mn(),{SEARCH_MODAL:u,ICONS:m,ITEMS_PER_PAGE:f,ITEMS_DEFAULT_SORT:p}=n;return r.jsxs(d.Modal.Root,{isMobile:i??!1,variant:i?"sideBottom":"sideRight",isOpen:c,setIsOpen:l,className:`${He.modal} ${He["search-modal__modal"]} ${e??""}`,children:[r.jsx(wx,{title:u.HEADER.TITLE,ICONS:m}),r.jsxs(d.Modal.Body,{className:He["modal-content-body"],children:[r.jsx(Nx,{term:o,children:r.jsx(Wd,{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:m,ITEMS_DEFAULT_SORT:p,ITEMS_PER_PAGE:f,SEARCH_MODAL:u})}),t?r.jsx(Rx,{children:r.jsx(Ax,{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:m,ITEMS_PER_PAGE:f})}):null,r.jsx(kx,{SectionZone:s})]})]})};Kd.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"},Xd=({LPLOJAS_TEMPLATE_RETURN_BUTTON:e,ICONS:t,showVendor:n})=>{const{selectedCity:s,selectedStore:o}=$n();return r.jsx(d.Card,{padding:"small",shadow:!0,className:Ke["store--wrapper"],children:o?r.jsxs(r.Fragment,{children:[r.jsx(st.ReturnButton,{ICONS:t,children:e}),r.jsx(st.Details,{ICONS:t,showVendor:n,store:s==null?void 0:s.find(a=>a.nome===o)})]}):r.jsx(st.Select,{ICONS:t})})};Xd.displayName="LPStores.Content";const Gt=({title:e,text:t,type:n,...s})=>r.jsx(d.TextStructure.DivWrapper,{...s,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})]})});Gt.displayName="LPStores.Details";const Yd=({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((s,o)=>r.jsx("p",{className:"typography-style-body-sm",children:s.trim()},o))})})})]})};Yd.displayName="LPStores.Details";const Qd=({store:e,showVendor:t,ICONS:n})=>r.jsxs("div",{className:Ke["store--details"],children:[r.jsx(Gt,{alignItems:"left",title:String(e==null?void 0:e.nome),type:"title"}),r.jsx(Gt,{title:"Endereço",text:String(e.endereco)}),e.telefone&&r.jsx(Gt,{title:"Telefone",text:String(e.telefone)}),e.horario&&r.jsx(Gt,{title:"Horário de funcionamento",text:String(e.horario)}),t&&r.jsx(Yd,{ICONS:n,vendor:String(e.vendedoras)})]});Qd.displayName="LPStores.Details";const Zd=({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:s,selectText:o,...a})=>r.jsx(d.DropDown.DefaultDropDown,{...a,"aria-placeholder":o,adornmentListClosed:{end:t},adornmentListOpened:{end:n},mode:"simple",placeholder:o,sizeVariant:"large",children:r.jsx(d.DropDown.DefaultDropDownList,{placeholder:o,supportText:o,maxHeight:400,children:Array.isArray(s)&&(s==null?void 0:s.map(i=>r.jsx(d.DropDown.ListItem,{value:i,children:i},i.replace(/\s/g,""))))})});Zd.displayName="LPStores.DropDown";const Jd=({children:e,ICONS:t})=>{const{clearSelectedStore:n}=$n(),s=()=>{typeof n=="function"&&n()};return r.jsxs("button",{"aria-label":String(e),className:Ke["store--return-button"],onClick:s,onKeyDown:s,children:[r.jsx(d.Icon,{name:t.arrow_left,size:"small"}),e]})};Jd.displayName="LPStores.ReturnButton";const em=({children:e,data:t})=>r.jsx(gc,{data:t,children:e});em.displayName="LPStores.Root";const tm=({children:e,imgAlt:t,imgSrcDesk:n,imgSrcMob:s})=>{const{isMobile:o}=re();return r.jsxs("section",{className:Ke["store--section"],children:[r.jsx(Zt,{src:o?s:n,alt:t,fill:!0,className:Ke["store--section--img"]}),e]})};tm.displayName="LPStores.Section";const nm=({ICONS:e})=>{const{data:t,handleSelectCity:n,selectedCity:s,handleSelectStore:o}=$n(),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:s==null?void 0:s[0].cidade,ICONS:e}),r.jsx(st.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)]})};nm.displayName="LPStores.Select";const rm=({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})})});rm.displayName="LPStores.Title";const st={Content:Xd,Details:Qd,DropDown:Zd,ReturnButton:Jd,Root:em,Section:tm,Select:nm,Title:rm},wn={teamComponents:{AddToCart:Ms,BackToTop:xf,HelpButton:sx,BuyPackage:fl,Filter:{...ct,helpers:Ru},...ig,FreightCalculation:xu,Header:yu,Link:ze,Media:we,PLPNavigation:ht,ProductCard:fe,ProductList:at,ProductVariationList:et,Sort:Xn,UserMenu:Gn,Newsletter:Js,Form:Dt},template:{minicart:De,pdc:wd,pdc_composites:nt,pdp:_y,searchResult:Ld,wishList:Jc,LPCadastro:jx,SearchModal:Kd,LPStores:st},utils:{EventCollector:qy,ExternalScripts:Xy,LinkOrNotLink:on,ObserverWrapper:Wn,SnackBarComponent:Ot,DraftJsLinkWrapper:fd}},Lx=(e,t)=>{const n=e.map(o=>`'${o.source}'`).join(`,
11
+ Read more: https://nextjs.org/docs/messages/placeholder-blur-data-url`)}if("ref"in oe&&(0,t.warnOnce)('Image with src "'+x+'" is using unsupported "ref" property. Consider using the "onLoad" property instead.'),!C&&!T){const G=I({config:W,src:x,width:V||400,quality:ge||75});let k;try{k=new URL(G)}catch{}(G===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`)}X&&(0,t.warnOnce)('Image with src "'+x+'" is using deprecated "onLoadingComplete" property. Please use the "onLoad" property instead.');for(const[G,k]of Object.entries({layout:K,objectFit:H,objectPosition:J,lazyBoundary:se,lazyRoot:ce}))k&&(0,t.warnOnce)('Image with src "'+x+'" has legacy prop "'+G+`". Did you forget to run the codemod?
13
+ Read more: https://nextjs.org/docs/messages/next-image-upgrade-to-13`);if(typeof window<"u"&&!u&&window.PerformanceObserver){u=new PerformanceObserver(G=>{for(const B of G.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(G){console.error(G)}}}const Ae=Object.assign(R?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:H,objectPosition:J}:{},D?{}:{color:"transparent"},A),Ce=!ee&&M!=="empty"?M==="blur"?'url("data:image/svg+xml;charset=utf-8,'+(0,n.getImageBlurSvg)({widthInt:V,heightInt:Y,blurWidth:be,blurHeight:Ie,blurDataURL:q||"",objectFit:Ae.objectFit})+'")':'url("'+M+'")':null;let z=Ce?{backgroundSize:Ae.objectFit||"cover",backgroundPosition:Ae.objectPosition||"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:Ce}:{};process.env.NODE_ENV==="development"&&z.backgroundImage&&M==="blur"&&q!=null&&q.startsWith("/")&&(z.backgroundImage='url("'+q+'")');const fe=p({config:W,src:x,unoptimized:C,width:V,quality:ge,sizes:v,loader:I});if(process.env.NODE_ENV!=="production"&&typeof window<"u"){let G;try{G=new URL(fe.src)}catch{G=new URL(fe.src,window.location.href)}l.set(G.href,{src:x,priority:j,placeholder:M})}return{props:{...oe,loading:je?"lazy":b,fetchPriority:U,width:V,height:Y,decoding:Z,className:P,style:{...Ae,...z},sizes:fe.sizes,srcSet:fe.srcSet,src:O||fe.src},meta:{unoptimized:C,priority:j,placeholder:M,fill:R}}}})(to);var ns={exports:{}},Cn={exports:{}},Er={},Jo;function v_(){return Jo||(Jo=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",s=n?()=>{}:t.useLayoutEffect,o=n?()=>{}:t.useEffect;function a(i){const{headManager:c,reduceComponentsToState:l}=i;function u(){if(c&&c.mountedInstances){const f=t.Children.toArray(Array.from(c.mountedInstances).filter(Boolean));c.updateHead(l(f,i))}}if(n){var m;c==null||(m=c.mountedInstances)==null||m.add(i.children),u()}return s(()=>{var f;return c==null||(f=c.mountedInstances)==null||f.add(i.children),()=>{var p;c==null||(p=c.mountedInstances)==null||p.delete(i.children)}}),s(()=>(c&&(c._pendingUpdate=u),()=>{c&&(c._pendingUpdate=u)})),o(()=>(c&&c._pendingUpdate&&(c._pendingUpdate(),c._pendingUpdate=null),()=>{c&&c._pendingUpdate&&(c._pendingUpdate(),c._pendingUpdate=null)})),null}}(Er)),Er}var Nr={},ea;function b_(){return ea||(ea=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"AmpStateContext",{enumerable:!0,get:function(){return s}});const s=Oe._(g).default.createContext({});process.env.NODE_ENV!=="production"&&(s.displayName="AmpStateContext")}(Nr)),Nr}var Ir={},ta;function Hu(){return ta||(ta=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"HeadManagerContext",{enumerable:!0,get:function(){return s}});const s=Oe._(g).default.createContext({});process.env.NODE_ENV!=="production"&&(s.displayName="HeadManagerContext")}(Ir)),Ir}var Rr={},na;function j_(){return na||(na=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"isInAmpMode",{enumerable:!0,get:function(){return t}});function t(n){let{ampFirst:s=!1,hybrid:o=!1,hasQuery:a=!1}=n===void 0?{}:n;return s||o&&a}}(Rr)),Rr}var ra;function C_(){return ra||(ra=1,function(e,t){"use client";Object.defineProperty(t,"__esModule",{value:!0});function n(j,b){for(var P in b)Object.defineProperty(j,P,{enumerable:!0,get:b[P]})}n(t,{default:function(){return C},defaultHead:function(){return p}});const s=Oe,o=St,a=r,i=o._(g),c=s._(v_()),l=b_(),u=Hu(),m=j_(),f=Jn;function p(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((P,w)=>typeof w=="string"||typeof w=="number"?P:P.concat(w),[])):j.concat(b)}const _=["name","httpEquiv","charSet","itemProp"];function y(){const j=new Set,b=new Set,P=new Set,w={};return S=>{let E=!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)?E=!1:j.add(A)}switch(S.type){case"title":case"base":b.has(S.type)?E=!1:b.add(S.type);break;case"meta":for(let A=0,O=_.length;A<O;A++){const L=_[A];if(S.props.hasOwnProperty(L))if(L==="charSet")P.has(L)?E=!1:P.add(L);else{const X=S.props[L],M=w[L]||new Set;(L!=="name"||!R)&&M.has(X)?E=!1:(M.add(X),w[L]=M)}}break}return E}}function x(j,b){const{inAmpMode:P}=b;return j.reduce(h,[]).reverse().concat(p(P).reverse()).filter(y()).reverse().map((w,S)=>{const E=w.key||S;if(process.env.NODE_ENV!=="development"&&process.env.__NEXT_OPTIMIZE_FONTS&&!P&&w.type==="link"&&w.props.href&&["https://fonts.googleapis.com/css","https://use.typekit.net/"].some(R=>w.props.href.startsWith(R))){const R={...w.props||{}};return R["data-href"]=R.href,R.href=void 0,R["data-optimized-fonts"]=!0,i.default.cloneElement(w,R)}if(process.env.NODE_ENV==="development")if(w.type==="script"&&w.props.type!=="application/ld+json"){const R=w.props.src?'<script> tag with src="'+w.props.src+'"':"inline <script>";(0,f.warnOnce)("Do not add <script> tags using next/head (see "+R+`). Use next/script instead.
15
+ See more info here: https://nextjs.org/docs/messages/no-script-tags-in-head-component`)}else w.type==="link"&&w.props.rel==="stylesheet"&&(0,f.warnOnce)('Do not add stylesheets using next/head (see <link rel="stylesheet"> tag with href="'+w.props.href+`"). Use Document instead.
16
+ See more info here: https://nextjs.org/docs/messages/no-stylesheets-in-head-component`);return i.default.cloneElement(w,{key:E})})}function v(j){let{children:b}=j;const P=(0,i.useContext)(l.AmpStateContext),w=(0,i.useContext)(u.HeadManagerContext);return(0,a.jsx)(c.default,{reduceComponentsToState:x,headManager:w,inAmpMode:(0,m.isInAmpMode)(P),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)}(Cn,Cn.exports)),Cn.exports}var Tr={},sa;function S_(){return sa||(sa=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"ImageConfigContext",{enumerable:!0,get:function(){return o}});const n=Oe._(g),s=er,o=n.default.createContext(s.imageConfigDefault);process.env.NODE_ENV!=="production"&&(o.displayName="ImageConfigContext")}(Tr)),Tr}var Ar={},kr={},Or={exports:{}},oa;function $u(){return oa||(oa=1,(()=>{var e={170:(o,a,i)=>{const c=i(510),l=()=>{if(typeof navigator<"u"&&navigator.platform){const m=navigator.platform.toLowerCase();return m==="win32"||m==="windows"}return typeof process<"u"&&process.platform?process.platform==="win32":!1};function u(m,f,p=!1){return f&&(f.windows===null||f.windows===void 0)&&(f={...f,windows:l()}),c(m,f,p)}Object.assign(u,c),o.exports=u},154:o=>{const a="\\\\/",i=`[^${a}]`,c="\\.",l="\\+",u="\\?",m="\\/",f="(?=.)",p="[^/]",h=`(?:${m}|$)`,_=`(?:^|${m})`,y=`${c}{1,2}${h}`,x=`(?!${c})`,v=`(?!${_}${y})`,C=`(?!${c}{0,1}${h})`,j=`(?!${y})`,b=`[^.${m}]`,P=`${p}*?`,S={DOT_LITERAL:c,PLUS_LITERAL:l,QMARK_LITERAL:u,SLASH_LITERAL:m,ONE_CHAR:f,QMARK:p,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:P,START_ANCHOR:_,SEP:"/"},E={...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?E:S}}},697:(o,a,i)=>{const c=i(154),l=i(96),{MAX_LENGTH:u,POSIX_REGEX_SOURCE:m,REGEX_NON_SPECIAL_CHARS:f,REGEX_SPECIAL_CHARS_BACKREF:p,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(P=>l.escapeRegex(P)).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 P=v.length;if(P>b)throw new SyntaxError(`Input length: ${P}, exceeds maximum allowed length: ${b}`);const w={type:"bos",value:"",output:j.prepend||""},S=[w],E=j.capture?"":"?:",R=c.globChars(j.windows),A=c.extglobChars(R),{DOT_LITERAL:O,PLUS_LITERAL:L,SLASH_LITERAL:X,ONE_CHAR:M,DOTS_SLASH:q,NO_DOT:U,NO_DOT_SLASH:Z,NO_DOTS_SLASH:K,QMARK:H,QMARK_NO_DOT:J,STAR:se,START_ANCHOR:ce}=R,oe=$=>`(${E}(?:(?!${ce}${$.dot?q:O}).)*?)`,ue=j.dot?"":U,D=j.dot?H:J;let ee=j.bash===!0?oe(j):se;j.capture&&(ee=`(${ee})`),typeof j.noext=="boolean"&&(j.noextglob=j.noext);const N={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,N),P=v.length;const W=[],ie=[],_e=[];let I=w,T;const Te=()=>N.index===P-1,V=N.peek=($=1)=>v[N.index+$],Y=N.advance=()=>v[++N.index]||"",be=()=>v.slice(N.index+1),Ie=($="",G=0)=>{N.consumed+=$,N.index+=G},je=$=>{N.output+=$.output!=null?$.output:$.value,Ie($.value)},ge=()=>{let $=1;for(;V()==="!"&&(V(2)!=="("||V(3)==="?");)Y(),N.start++,$++;return $%2===0?!1:(N.negated=!0,N.start++,!0)},Ae=$=>{N[$]++,_e.push($)},Ce=$=>{N[$]--,_e.pop()},z=$=>{if(I.type==="globstar"){const G=N.braces>0&&($.type==="comma"||$.type==="brace"),k=$.extglob===!0||W.length&&($.type==="pipe"||$.type==="paren");$.type!=="slash"&&$.type!=="paren"&&!G&&!k&&(N.output=N.output.slice(0,-I.output.length),I.type="star",I.value="*",I.output=ee,N.output+=I.output)}if(W.length&&$.type!=="paren"&&(W[W.length-1].inner+=$.value),($.value||$.output)&&je($),I&&I.type==="text"&&$.type==="text"){I.output=(I.output||I.value)+$.value,I.value+=$.value;return}$.prev=I,S.push($),I=$},fe=($,G)=>{const k={...A[G],conditions:1,inner:""};k.prev=I,k.parens=N.parens,k.output=N.output;const B=(j.capture?"(":"")+k.open;Ae("parens"),z({type:$,value:G,output:N.output?"":M}),z({type:"paren",extglob:!0,value:Y(),output:B}),W.push(k)},ye=$=>{let G=$.close+(j.capture?")":""),k;if($.type==="negate"){let B=ee;if($.inner&&$.inner.length>1&&$.inner.includes("/")&&(B=oe(j)),(B!==ee||Te()||/^\)+$/.test(be()))&&(G=$.close=`)$))${B}`),$.inner.includes("*")&&(k=be())&&/^\.[^\\/.]+$/.test(k)){const te=x(k,{...C,fastpaths:!1}).output;G=$.close=`)${te})${B})`}$.prev.type==="bos"&&(N.negatedExtglob=!0)}z({type:"paren",extglob:!0,value:T,output:G}),Ce("parens")};if(j.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(v)){let $=!1,G=v.replace(p,(k,B,te,he,Ee,or)=>he==="\\"?($=!0,k):he==="?"?B?B+he+(Ee?H.repeat(Ee.length):""):or===0?D+(Ee?H.repeat(Ee.length):""):H.repeat(te.length):he==="."?O.repeat(te.length):he==="*"?B?B+he+(Ee?ee:""):ee:B?k:`\\${k}`);return $===!0&&(j.unescape===!0?G=G.replace(/\\/g,""):G=G.replace(/\\+/g,k=>k.length%2===0?"\\\\":k?"\\":"")),G===v&&j.contains===!0?(N.output=v,N):(N.output=l.wrapOutput(G,N,C),N)}for(;!Te();){if(T=Y(),T==="\0")continue;if(T==="\\"){const k=V();if(k==="/"&&j.bash!==!0||k==="."||k===";")continue;if(!k){T+="\\",z({type:"text",value:T});continue}const B=/^\\+/.exec(be());let te=0;if(B&&B[0].length>2&&(te=B[0].length,N.index+=te,te%2!==0&&(T+="\\")),j.unescape===!0?T=Y():T+=Y(),N.brackets===0){z({type:"text",value:T});continue}}if(N.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=m[he];if(Ee){I.value=te+Ee,N.backtrack=!0,Y(),!w.output&&S.indexOf(I)===1&&(w.output=M);continue}}}(T==="["&&V()!==":"||T==="-"&&V()==="]")&&(T=`\\${T}`),T==="]"&&(I.value==="["||I.value==="[^")&&(T=`\\${T}`),j.posix===!0&&T==="!"&&I.value==="["&&(T="^"),I.value+=T,je({value:T});continue}if(N.quotes===1&&T!=='"'){T=l.escapeRegex(T),I.value+=T,je({value:T});continue}if(T==='"'){N.quotes=N.quotes===1?0:1,j.keepQuotes===!0&&z({type:"text",value:T});continue}if(T==="("){Ae("parens"),z({type:"paren",value:T});continue}if(T===")"){if(N.parens===0&&j.strictBrackets===!0)throw new SyntaxError(y("opening","("));const k=W[W.length-1];if(k&&N.parens===k.parens+1){ye(W.pop());continue}z({type:"paren",value:T,output:N.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");z({type:"bracket",value:T});continue}if(T==="]"){if(j.nobracket===!0||I&&I.type==="bracket"&&I.value.length===1){z({type:"text",value:T,output:`\\${T}`});continue}if(N.brackets===0){if(j.strictBrackets===!0)throw new SyntaxError(y("opening","["));z({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(N.output=N.output.slice(0,-I.value.length),j.literalBrackets===!0){N.output+=B,I.value=B;continue}I.value=`(${E}${B}|${I.value})`,N.output+=I.value;continue}if(T==="{"&&j.nobrace!==!0){Ae("braces");const k={type:"brace",value:T,output:"(",outputIndex:N.output.length,tokensIndex:N.tokens.length};ie.push(k),z(k);continue}if(T==="}"){const k=ie[ie.length-1];if(j.nobrace===!0||!k){z({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),N.backtrack=!0}if(k.comma!==!0&&k.dots!==!0){const te=N.output.slice(0,k.outputIndex),he=N.tokens.slice(k.tokensIndex);k.value=k.output="\\{",T=B="\\}",N.output=te;for(const Ee of he)N.output+=Ee.output||Ee.value}z({type:"brace",value:T,output:B}),Ce("braces"),ie.pop();continue}if(T==="|"){W.length>0&&W[W.length-1].conditions++,z({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="|"),z({type:"comma",value:T,output:k});continue}if(T==="/"){if(I.type==="dot"&&N.index===N.start+1){N.start=N.index+1,N.consumed="",N.output="",S.pop(),I=w;continue}z({type:"slash",value:T,output:X});continue}if(T==="."){if(N.braces>0&&I.type==="dot"){I.value==="."&&(I.output=O);const k=ie[ie.length-1];I.type="dots",I.output+=T,I.value+=T,k.dots=!0;continue}if(N.braces+N.parens===0&&I.type!=="bos"&&I.type!=="slash"){z({type:"text",value:T,output:O});continue}z({type:"dot",value:T,output:O});continue}if(T==="?"){if(!(I&&I.value==="(")&&j.noextglob!==!0&&V()==="("&&V(2)!=="?"){fe("qmark",T);continue}if(I&&I.type==="paren"){const B=V();let te=T;(I.value==="("&&!/[!=<:]/.test(B)||B==="<"&&!/<([!=]|\w+>)/.test(be()))&&(te=`\\${T}`),z({type:"text",value:T,output:te});continue}if(j.dot!==!0&&(I.type==="slash"||I.type==="bos")){z({type:"qmark",value:T,output:J});continue}z({type:"qmark",value:T,output:H});continue}if(T==="!"){if(j.noextglob!==!0&&V()==="("&&(V(2)!=="?"||!/[!=<:]/.test(V(3)))){fe("negate",T);continue}if(j.nonegate!==!0&&N.index===0){ge();continue}}if(T==="+"){if(j.noextglob!==!0&&V()==="("&&V(2)!=="?"){fe("plus",T);continue}if(I&&I.value==="("||j.regex===!1){z({type:"plus",value:T,output:L});continue}if(I&&(I.type==="bracket"||I.type==="paren"||I.type==="brace")||N.parens>0){z({type:"plus",value:T});continue}z({type:"plus",value:L});continue}if(T==="@"){if(j.noextglob!==!0&&V()==="("&&V(2)!=="?"){z({type:"at",extglob:!0,value:T,output:""});continue}z({type:"text",value:T});continue}if(T!=="*"){(T==="$"||T==="^")&&(T=`\\${T}`);const k=f.exec(be());k&&(T+=k[0],N.index+=k[0].length),z({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,N.backtrack=!0,N.globstar=!0,Ie(T);continue}let $=be();if(j.noextglob!==!0&&/^\([^?]/.test($)){fe("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||$[0]&&$[0]!=="/")){z({type:"star",value:T,output:""});continue}const Ee=N.braces>0&&(k.type==="comma"||k.type==="brace"),or=W.length&&(k.type==="pipe"||k.type==="paren");if(!te&&k.type!=="paren"&&!Ee&&!or){z({type:"star",value:T,output:""});continue}for(;$.slice(0,3)==="/**";){const un=v[N.index+4];if(un&&un!=="/")break;$=$.slice(3),Ie("/**",3)}if(k.type==="bos"&&Te()){I.type="globstar",I.value+=T,I.output=oe(j),N.output=I.output,N.globstar=!0,Ie(T);continue}if(k.type==="slash"&&k.prev.type!=="bos"&&!he&&Te()){N.output=N.output.slice(0,-(k.output+I.output).length),k.output=`(?:${k.output}`,I.type="globstar",I.output=oe(j)+(j.strictSlashes?")":"|$)"),I.value+=T,N.globstar=!0,N.output+=k.output+I.output,Ie(T);continue}if(k.type==="slash"&&k.prev.type!=="bos"&&$[0]==="/"){const un=$[1]!==void 0?"|$":"";N.output=N.output.slice(0,-(k.output+I.output).length),k.output=`(?:${k.output}`,I.type="globstar",I.output=`${oe(j)}${X}|${X}${un})`,I.value+=T,N.output+=k.output+I.output,N.globstar=!0,Ie(T+Y()),z({type:"slash",value:"/",output:""});continue}if(k.type==="bos"&&$[0]==="/"){I.type="globstar",I.value+=T,I.output=`(?:^|${X}|${oe(j)}${X})`,N.output=I.output,N.globstar=!0,Ie(T+Y()),z({type:"slash",value:"/",output:""});continue}N.output=N.output.slice(0,-I.output.length),I.type="globstar",I.output=oe(j),I.value+=T,N.output+=I.output,N.globstar=!0,Ie(T);continue}const G={type:"star",value:T,output:ee};if(j.bash===!0){G.output=".*?",(I.type==="bos"||I.type==="slash")&&(G.output=ue+G.output),z(G);continue}if(I&&(I.type==="bracket"||I.type==="paren")&&j.regex===!0){G.output=T,z(G);continue}(N.index===N.start||I.type==="slash"||I.type==="dot")&&(I.type==="dot"?(N.output+=Z,I.output+=Z):j.dot===!0?(N.output+=K,I.output+=K):(N.output+=ue,I.output+=ue),V()!=="*"&&(N.output+=M,I.output+=M)),z(G)}for(;N.brackets>0;){if(j.strictBrackets===!0)throw new SyntaxError(y("closing","]"));N.output=l.escapeLast(N.output,"["),Ce("brackets")}for(;N.parens>0;){if(j.strictBrackets===!0)throw new SyntaxError(y("closing",")"));N.output=l.escapeLast(N.output,"("),Ce("parens")}for(;N.braces>0;){if(j.strictBrackets===!0)throw new SyntaxError(y("closing","}"));N.output=l.escapeLast(N.output,"{"),Ce("braces")}if(j.strictSlashes!==!0&&(I.type==="star"||I.type==="bracket")&&z({type:"maybe_slash",value:"",output:`${X}?`}),N.backtrack===!0){N.output="";for(const $ of N.tokens)N.output+=$.output!=null?$.output:$.value,$.suffix&&(N.output+=$.suffix)}return N};x.fastpaths=(v,C)=>{const j={...C},b=typeof j.maxLength=="number"?Math.min(u,j.maxLength):u,P=v.length;if(P>b)throw new SyntaxError(`Input length: ${P}, exceeds maximum allowed length: ${b}`);v=h[v]||v;const{DOT_LITERAL:w,SLASH_LITERAL:S,ONE_CHAR:E,DOTS_SLASH:R,NO_DOT:A,NO_DOTS:O,NO_DOTS_SLASH:L,STAR:X,START_ANCHOR:M}=c.globChars(j.windows),q=j.dot?O:A,U=j.dot?L:A,Z=j.capture?"":"?:",K={negated:!1,prefix:""};let H=j.bash===!0?".*?":X;j.capture&&(H=`(${H})`);const J=ue=>ue.noglobstar===!0?H:`(${Z}(?:(?!${M}${ue.dot?R:w}).)*?)`,se=ue=>{switch(ue){case"*":return`${q}${E}${H}`;case".*":return`${w}${E}${H}`;case"*.*":return`${q}${H}${w}${E}${H}`;case"*/*":return`${q}${H}${S}${E}${U}${H}`;case"**":return q+J(j);case"**/*":return`(?:${q}${J(j)}${S})?${U}${E}${H}`;case"**/*.*":return`(?:${q}${J(j)}${S})?${U}${H}${w}${E}${H}`;case"**/.*":return`(?:${q}${J(j)}${S})?${w}${E}${H}`;default:{const D=/^(.*?)\.(\w+)$/.exec(ue);if(!D)return;const ee=se(D[1]);return ee?ee+w+D[2]:void 0}}},ce=l.removePrefix(v,K);let oe=se(ce);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),m=i(154),f=h=>h&&typeof h=="object"&&!Array.isArray(h),p=(h,_,y=!1)=>{if(Array.isArray(h)){const S=h.map(R=>p(R,_,y));return R=>{for(const A of S){const O=A(R);if(O)return O}return!1}}const x=f(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?p.compileRe(h,_):p.makeRe(h,_,!1,!0),b=j.state;delete j.state;let P=()=>!1;if(v.ignore){const S={..._,ignore:null,onMatch:null,onResult:null};P=p(v.ignore,S,y)}const w=(S,E=!1)=>{const{isMatch:R,match:A,output:O}=p.test(S,j,_,{glob:h,posix:C}),L={glob:h,state:b,regex:j,posix:C,input:S,output:O,match:A,isMatch:R};return typeof v.onResult=="function"&&v.onResult(L),R===!1?(L.isMatch=!1,E?L:!1):P(S)?(typeof v.onIgnore=="function"&&v.onIgnore(L),L.isMatch=!1,E?L:!1):(typeof v.onMatch=="function"&&v.onMatch(L),E?L:!0)};return y&&(w.state=b),w};p.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,P=b&&j?j(h):h;return b===!1&&(P=j?j(h):h,b=P===x),(b===!1||C.capture===!0)&&(C.matchBase===!0||C.basename===!0?b=p.matchBase(h,_,y,v):b=_.exec(P)),{isMatch:!!b,match:b,output:P}},p.matchBase=(h,_,y)=>(_ instanceof RegExp?_:p.makeRe(_,y)).test(u.basename(h)),p.isMatch=(h,_,y)=>p(_,y)(h),p.parse=(h,_)=>Array.isArray(h)?h.map(y=>p.parse(y,_)):l(h,{..._,fastpaths:!1}),p.scan=(h,_)=>c(h,_),p.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 P=p.toRegex(b,_);return x===!0&&(P.state=h),P},p.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,_)),p.compileRe(v,_,y,x)},p.toRegex=(h,_)=>{try{const y=_||{};return new RegExp(h,y.flags||(y.nocase?"i":""))}catch(y){if(_&&_.debug===!0)throw y;return/$^/}},p.constants=m,o.exports=p},716:(o,a,i)=>{const c=i(96),{CHAR_ASTERISK:l,CHAR_AT:u,CHAR_BACKWARD_SLASH:m,CHAR_COMMA:f,CHAR_DOT:p,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:P,CHAR_RIGHT_SQUARE_BRACKET:w}=i(154),S=A=>A===_||A===m,E=A=>{A.isPrefix!==!0&&(A.depth=A.isGlobstar?1/0:1)},R=(A,O)=>{const L=O||{},X=A.length-1,M=L.parts===!0||L.scanToEnd===!0,q=[],U=[],Z=[];let K=A,H=-1,J=0,se=0,ce=!1,oe=!1,ue=!1,D=!1,ee=!1,N=!1,W=!1,ie=!1,_e=!1,I=!1,T=0,Te,V,Y={value:"",depth:0,isGlob:!1};const be=()=>H>=X,Ie=()=>K.charCodeAt(H+1),je=()=>(Te=V,K.charCodeAt(++H));for(;H<X;){V=je();let fe;if(V===m){W=Y.backslashes=!0,V=je(),V===y&&(N=!0);continue}if(N===!0||V===y){for(T++;be()!==!0&&(V=je());){if(V===m){W=Y.backslashes=!0,je();continue}if(V===y){T++;continue}if(N!==!0&&V===p&&(V=je())===p){if(ce=Y.isBrace=!0,ue=Y.isGlob=!0,I=!0,M===!0)continue;break}if(N!==!0&&V===f){if(ce=Y.isBrace=!0,ue=Y.isGlob=!0,I=!0,M===!0)continue;break}if(V===b&&(T--,T===0)){N=!1,ce=Y.isBrace=!0,I=!0;break}}if(M===!0)continue;break}if(V===_){if(q.push(H),U.push(Y),Y={value:"",depth:0,isGlob:!1},I===!0)continue;if(Te===p&&H===J+1){J+=2;continue}se=H+1;continue}if(L.noext!==!0&&(V===C||V===u||V===l||V===j||V===h)===!0&&Ie()===x){if(ue=Y.isGlob=!0,D=Y.isExtglob=!0,I=!0,V===h&&H===J&&(_e=!0),M===!0){for(;be()!==!0&&(V=je());){if(V===m){W=Y.backslashes=!0,V=je();continue}if(V===P){ue=Y.isGlob=!0,I=!0;break}}continue}break}if(V===l){if(Te===l&&(ee=Y.isGlobstar=!0),ue=Y.isGlob=!0,I=!0,M===!0)continue;break}if(V===j){if(ue=Y.isGlob=!0,I=!0,M===!0)continue;break}if(V===v){for(;be()!==!0&&(fe=je());){if(fe===m){W=Y.backslashes=!0,je();continue}if(fe===w){oe=Y.isBracket=!0,ue=Y.isGlob=!0,I=!0;break}}if(M===!0)continue;break}if(L.nonegate!==!0&&V===h&&H===J){ie=Y.negated=!0,J++;continue}if(L.noparen!==!0&&V===x){if(ue=Y.isGlob=!0,M===!0){for(;be()!==!0&&(V=je());){if(V===x){W=Y.backslashes=!0,V=je();continue}if(V===P){I=!0;break}}continue}break}if(ue===!0){if(I=!0,M===!0)continue;break}}L.noext===!0&&(D=!1,ue=!1);let ge=K,Ae="",Ce="";J>0&&(Ae=K.slice(0,J),K=K.slice(J),se-=J),ge&&ue===!0&&se>0?(ge=K.slice(0,se),Ce=K.slice(se)):ue===!0?(ge="",Ce=K):ge=K,ge&&ge!==""&&ge!=="/"&&ge!==K&&S(ge.charCodeAt(ge.length-1))&&(ge=ge.slice(0,-1)),L.unescape===!0&&(Ce&&(Ce=c.removeBackslashes(Ce)),ge&&W===!0&&(ge=c.removeBackslashes(ge)));const z={prefix:Ae,input:A,start:J,base:ge,glob:Ce,isBrace:ce,isBracket:oe,isGlob:ue,isExtglob:D,isGlobstar:ee,negated:ie,negatedExtglob:_e};if(L.tokens===!0&&(z.maxDepth=0,S(V)||U.push(Y),z.tokens=U),L.parts===!0||L.tokens===!0){let fe;for(let ye=0;ye<q.length;ye++){const $=fe?fe+1:J,G=q[ye],k=A.slice($,G);L.tokens&&(ye===0&&J!==0?(U[ye].isPrefix=!0,U[ye].value=Ae):U[ye].value=k,E(U[ye]),z.maxDepth+=U[ye].depth),(ye!==0||k!=="")&&Z.push(k),fe=G}if(fe&&fe+1<A.length){const ye=A.slice(fe+1);Z.push(ye),L.tokens&&(U[U.length-1].value=ye,E(U[U.length-1]),z.maxDepth+=U[U.length-1].depth)}z.slashes=q,z.parts=Z}return z};o.exports=R},96:(o,a,i)=>{const{REGEX_BACKSLASH:c,REGEX_REMOVE_BACKSLASH:l,REGEX_SPECIAL_CHARS:u,REGEX_SPECIAL_CHARS_GLOBAL:m}=i(154);a.isObject=f=>f!==null&&typeof f=="object"&&!Array.isArray(f),a.hasRegexChars=f=>u.test(f),a.isRegexChar=f=>f.length===1&&a.hasRegexChars(f),a.escapeRegex=f=>f.replace(m,"\\$1"),a.toPosixSlashes=f=>f.replace(c,"/"),a.removeBackslashes=f=>f.replace(l,p=>p==="\\"?"":p),a.escapeLast=(f,p,h)=>{const _=f.lastIndexOf(p,h);return _===-1?f:f[_-1]==="\\"?a.escapeLast(f,p,_-1):`${f.slice(0,_)}\\${f.slice(_)}`},a.removePrefix=(f,p={})=>{let h=f;return h.startsWith("./")&&(h=h.slice(2),p.prefix="./"),h},a.wrapOutput=(f,p={},h={})=>{const _=h.contains?"":"^",y=h.contains?"":"$";let x=`${_}(?:${f})${y}`;return p.negated===!0&&(x=`(?:^(?!${x}).*$)`),x},a.basename=(f,{windows:p}={})=>{const h=f.split(p?/[\\/]/:"/"),_=h[h.length-1];return _===""?h[h.length-2]:_}}},t={};function n(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,n),c=!1}finally{c&&delete t[o]}return i.exports}typeof n<"u"&&(n.ab=__dirname+"/");var s=n(170);Or.exports=s})()),Or.exports}var aa;function w_(){return aa||(aa=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 n=$u();function s(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 o(a,i){if(!a)return!0;const c=new URL(i,"http://n");return a.some(l=>s(l,c))}}(kr)),kr}var Lr={},ia;function P_(){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,{hasRemoteMatch:function(){return o},matchRemotePattern:function(){return s}});const n=$u();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,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 o(a,i,c){return a.some(l=>c.hostname===l)||i.some(l=>s(l,c))}}(Lr)),Lr}var ca;function Vu(){return ca||(ca=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return s}});const t=75;function n(o){let{config:a,src:i,width:c,quality:l}=o;var u;if(process.env.NODE_ENV!=="production"){const f=[];if(i||f.push("src"),c||f.push("width"),f.length>0)throw new Error("Next Image Optimization requires "+f.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:p}=w_();if(!p(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 p;try{p=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}=P_();if(!h(a.domains,a.remotePatterns,p))throw new Error("Invalid src prop ("+i+') on `next/image`, hostname "'+p.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 m=l||((u=a.qualities)==null?void 0:u.reduce((f,p)=>Math.abs(p-t)<Math.abs(f-t)?p:f))||t;return a.path+"?url="+encodeURIComponent(i)+"&w="+c+"&q="+m+(process.env.NEXT_DEPLOYMENT_ID?"&dpl="+process.env.NEXT_DEPLOYMENT_ID:"")}n.__next_img_default=!0;const s=n}(Ar)),Ar}(function(e,t){"use client";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Image",{enumerable:!0,get:function(){return j}});const n=Oe,s=St,o=r,a=s._(g),i=n._(js),c=n._(C_()),l=to,u=er,m=S_(),f=Jn,p=Bc(),h=n._(Vu()),_=process.env.__NEXT_IMAGE_OPTS;typeof window>"u"&&(globalThis.__NEXT_IMAGE_IMPORTED=!0);function y(b,P,w,S,E,R,A){const O=b==null?void 0:b.src;if(!b||b["data-loaded-src"]===O)return;b["data-loaded-src"]=O,("decode"in b?b.decode():Promise.resolve()).catch(()=>{}).then(()=>{if(!(!b.parentElement||!b.isConnected)){if(P!=="empty"&&E(!0),w!=null&&w.current){const X=new Event("load");Object.defineProperty(X,"target",{writable:!1,value:b});let M=!1,q=!1;w.current({...X,nativeEvent:X,currentTarget:b,target:b,isDefaultPrevented:()=>M,isPropagationStopped:()=>q,persist:()=>{},preventDefault:()=>{M=!0,X.preventDefault()},stopPropagation:()=>{q=!0,X.stopPropagation()}})}if(S!=null&&S.current&&S.current(b),process.env.NODE_ENV!=="production"){const X=new URL(O,"http://n").searchParams.get("url")||O;if(b.getAttribute("data-nimg")==="fill"){if(!R&&(!A||A==="100vw")&&b.getBoundingClientRect().width/window.innerWidth<.6&&(A==="100vw"?(0,f.warnOnce)('Image with src "'+X+'" 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,f.warnOnce)('Image with src "'+X+'" 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:U}=window.getComputedStyle(b.parentElement),Z=["absolute","fixed","relative"];Z.includes(U)||(0,f.warnOnce)('Image with src "'+X+'" has "fill" and parent element with invalid "position". Provided "'+U+'" should be one of '+Z.map(String).join(",")+".")}b.height===0&&(0,f.warnOnce)('Image with src "'+X+'" 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"),q=b.width.toString()!==b.getAttribute("width");(M&&!q||!M&&q)&&(0,f.warnOnce)('Image with src "'+X+`" 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,P)=>{let{src:w,srcSet:S,sizes:E,height:R,width:A,decoding:O,className:L,style:X,fetchPriority:M,placeholder:q,loading:U,unoptimized:Z,fill:K,onLoadRef:H,onLoadingCompleteRef:J,setBlurComplete:se,setShowAltText:ce,sizesInput:oe,onLoad:ue,onError:D,...ee}=b;return(0,o.jsx)("img",{...ee,...x(M),loading:U,width:A,height:R,decoding:O,"data-nimg":K?"fill":"1",className:L,style:X,sizes:E,srcSet:S,src:w,ref:(0,a.useCallback)(N=>{P&&(typeof P=="function"?P(N):typeof P=="object"&&(P.current=N)),N&&(D&&(N.src=N.src),process.env.NODE_ENV!=="production"&&(w||console.error('Image is missing required "src" property:',N),N.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.')),N.complete&&y(N,q,H,J,se,Z,oe))},[w,q,H,J,se,D,Z,oe,P]),onLoad:N=>{const W=N.currentTarget;y(W,q,H,J,se,Z,oe)},onError:N=>{ce(!0),q!=="empty"&&se(!0),D&&D(N)}})});function C(b){let{isAppRouter:P,imgAttributes:w}=b;const S={as:"image",imageSrcSet:w.srcSet,imageSizes:w.sizes,crossOrigin:w.crossOrigin,referrerPolicy:w.referrerPolicy,...x(w.fetchPriority)};return P&&i.default.preload?(i.default.preload(w.src,S),null):(0,o.jsx)(c.default,{children:(0,o.jsx)("link",{rel:"preload",href:w.srcSet?void 0:w.src,...S},"__nimg-"+w.src+w.srcSet+w.sizes)})}const j=(0,a.forwardRef)((b,P)=>{const S=!(0,a.useContext)(p.RouterContext),E=(0,a.useContext)(m.ImageConfigContext),R=(0,a.useMemo)(()=>{var J;const se=_||E||u.imageConfigDefault,ce=[...se.deviceSizes,...se.imageSizes].sort((D,ee)=>D-ee),oe=se.deviceSizes.sort((D,ee)=>D-ee),ue=(J=se.qualities)==null?void 0:J.sort((D,ee)=>D-ee);return{...se,allSizes:ce,deviceSizes:oe,qualities:ue}},[E]),{onLoad:A,onLoadingComplete:O}=b,L=(0,a.useRef)(A);(0,a.useEffect)(()=>{L.current=A},[A]);const X=(0,a.useRef)(O);(0,a.useEffect)(()=>{X.current=O},[O]);const[M,q]=(0,a.useState)(!1),[U,Z]=(0,a.useState)(!1),{props:K,meta:H}=(0,l.getImgProps)(b,{defaultLoader:h.default,imgConf:R,blurComplete:M,showAltText:U});return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(v,{...K,unoptimized:H.unoptimized,placeholder:H.placeholder,fill:H.fill,onLoadRef:L,onLoadingCompleteRef:X,setBlurComplete:q,setShowAltText:Z,sizesInput:b.sizes,ref:P}),H.priority?(0,o.jsx)(C,{isAppRouter:S,imgAttributes:K}):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)})(ns,ns.exports);var E_=ns.exports;(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(l,u){for(var m in u)Object.defineProperty(l,m,{enumerable:!0,get:u[m]})}t(e,{default:function(){return c},getImageProps:function(){return i}});const n=Oe,s=to,o=E_,a=n._(Vu());function i(l){const{props:u}=(0,s.getImgProps)(l,{defaultLoader:a.default,imgConf:process.env.__NEXT_IMAGE_OPTS});for(const[m,f]of Object.entries(u))f===void 0&&delete u[m];return{props:u}}const c=o.Image})(Uu);var N_=Uu;const Jt=F.getDefaultExportFromCjs(N_),I_=({item:e,CONSTANTS:t})=>{const n=e.icon?t.PAYMENT_FLAGS.includes(e.icon)?"payment":"social":null,s=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(Jt,{alt:s,src:`/assets/${s}.svg`,width:20,height:20}):r.jsx(d.Icon,{size:"small",name:s})]}):r.jsxs("div",{className:me["support-item"],children:[e.image&&r.jsx("img",{src:e.image,alt:"",loading:"lazy"}),n==="payment"?r.jsx(Jt,{alt:s,src:`/assets/${s}.svg`,width:20,height:20}):r.jsx(d.Icon,{size:"small",name:s})]})},R_=({content:e,CONSTANTS:t})=>r.jsx("div",{className:me["support-container"],children:e==null?void 0:e.map((n,s)=>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((o,a)=>r.jsx(I_,{item:o,CONSTANTS:t},`footer-support-item-${a}`))})]},`footer-support-${s}`))}),T_=({name:e,nameIcon:t,maxWidth:n,rowAlignContent:s,columnAlignContent:o,columnAlignItems:a,textAlignContent:i,textAlignItems:c,children:l})=>r.jsx(d.TextStructure.Root,{layoutProps:{textRow:{alignContent:s,alignItems:s},columnWrapper:{alignContent:o,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})]})}),A_=({name:e,nameIcon:t,maxWidth:n,children:s,ICONS:o,...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:o.arrow_up,size:"medium"}),openIndicator:r.jsx(d.Icon,{name:o.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:s})})})]}),Mr=e=>{const{isMobile:t}=ne();return t?r.jsx(A_,{...e}):r.jsx(T_,{...e})},Sn=({type:e,children:t,className:n,collumnName:s,collumnNameIcon:o,icons:a,iconLink:i,iconSize:c,link:l,paymentDisclaimer:u,paymentTitle:m,rowAlignContent:f,columnAlignContent:p,columnAlignItems:h,textAlignContent:_,textAlignItems:y,...x})=>{let v;const{handleSelectContent:C}=ae(),{nextimage:j}=le();switch(e){case"menu":v=r.jsx(ze,{className:me.footer__itemLink,href:l??"#",prefetch:!1,children:r.jsx("span",{onClick:()=>{C({content:`footer:${s}:${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:[m,r.jsx("div",{className:me.footer__iconList,children:a==null?void 0:a.map((b,P)=>r.jsx(j,{alt:b,src:`/assets/${b}.svg`,width:c??20,height:c??20},P))})]})]});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,P)=>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}`})})},P))})});break;default:v=r.jsx("div",{className:n,...x,children:t})}return r.jsx(d.TextStructure.Root,{layoutProps:{textRow:{alignContent:f,alignItems:f},columnWrapper:{alignContent:p,alignItems:h}},...x,children:r.jsx(d.TextStructure.DivWrapper,{alignContent:_,alignItems:y,className:d.helpers.classNameConcat(me.footer__item,n),children:v})})},k_=({className:e,text:t,...n})=>r.jsx("div",{...n,className:d.helpers.classNameConcat(me.footer__legalInformation,e),children:r.jsx("span",{children:t})}),Wu=()=>{const{nextimage:e}=le();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})})};Wu.displayName="Footer.Stamps";const Gu=({children:e,legalTextSlot:t,adornment:n,className:s,...o})=>{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",{...o,className:d.helpers.classNameConcat(me.footer__wrapper,s),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})]})};Gu.displayName="Footer.Wrapper";const Ku=({data:{links:{links:e}},payments:t,socialInfo:n,socialMedias:s,adornment:o,LEGAL_INFORMATION_TEXT:a,ICONS:i,className:c,hasFooterStamps:l})=>{var u;return r.jsxs(Gu,{className:c,adornment:o,legalTextSlot:r.jsx(k_,{text:a}),children:[Array.isArray(e.column)&&e.column.map((m,f)=>r.jsx(Mr,{id:`${f}column-menu`,name:m.name,nameIcon:m.nameIcon,ICONS:i,children:m.items.map((p,h)=>r.jsx(Sn,{type:"menu",link:p.link,collumnName:m.name,collumnNameIcon:m.nameIcon,children:p.text},h))},f)),t&&((u=t.acceptedFlags)==null?void 0:u.length)>0&&r.jsx(Mr,{id:"payment-column",name:t==null?void 0:t.title,nameIcon:t==null?void 0:t.titleIcon,maxWidth:150,ICONS:i,children:r.jsx(Sn,{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(Mr,{id:"social-media-column",name:n==null?void 0:n.title,ICONS:i,children:[n!=null&&n.subTitle?r.jsx(Sn,{children:n==null?void 0:n.subTitle}):null,r.jsx(Sn,{type:"social-media",iconSize:24,iconLink:s}),l&&r.jsx(Wu,{})]})]})};Ku.displayName="Footer";const O_=Object.freeze(Object.defineProperty({__proto__:null,Footer:Ku,FooterSupport:R_},Symbol.toStringTag,{value:"Module"})),L_="_header_9xxjk_57",M_="_actions_9xxjk_131",D_="_breadcrumb_9xxjk_142",F_="_credits_9xxjk_157",z_="_pdplinks_9xxjk_185",B_="_similars_9xxjk_212",U_="_sizes_9xxjk_251",q_="_measurementTable_9xxjk_267",H_="_measurementHead_9xxjk_280",$_="_measurementRows_9xxjk_285",V_="_measurementRowsTitle_9xxjk_302",W_="_measurementRowsText_9xxjk_314",G_="_measurementImage_9xxjk_325",K_="_measurementImageContainer_9xxjk_328",X_="_measurementContent_9xxjk_337",Y_="_measurementTitle_9xxjk_341",Q_="_measurementClose_9xxjk_352",Z_="_productref_9xxjk_417",J_="_slideOut_9xxjk_1",eg="_slideIn_9xxjk_1",tg="_content_9xxjk_397",ng="_pdp_9xxjk_185",rg="_divider_9xxjk_575",Q={"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:L_,"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:M_,"add-to-cart":"_add-to-cart_9xxjk_138",breadcrumb:D_,"breadcrumb--active":"_breadcrumb--active_9xxjk_147",credits:F_,"gallery-carousel-modifier":"_gallery-carousel-modifier_9xxjk_162",pdplinks:z_,"links-wrapper":"_links-wrapper_9xxjk_195",similars:B_,"similars-info":"_similars-info_9xxjk_224","toggle-style-modifier":"_toggle-style-modifier_9xxjk_233","accessibility-info":"_accessibility-info_9xxjk_237",sizes:U_,"price-wrapper":"_price-wrapper_9xxjk_263",measurementTable:q_,measurementHead:H_,measurementRows:$_,measurementRowsTitle:V_,measurementRowsText:W_,measurementImage:G_,measurementImageContainer:K_,measurementContent:X_,measurementTitle:Y_,measurementClose:Q_,"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:Z_,"tabs-panel":"_tabs-panel_9xxjk_428","tabs-panel-exit":"_tabs-panel-exit_9xxjk_434",slideOut:J_,"tabs-panel-enter":"_tabs-panel-enter_9xxjk_438",slideIn:eg,content:tg,pdp:ng,"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:rg,"breadcrumbs-desktop":"_breadcrumbs-desktop_9xxjk_580","breadcrumbs-mobile":"_breadcrumbs-mobile_9xxjk_589"},sg=({children:e,link:t,TOGGLE_STYLE_MODIFIER:n})=>{const{isMobile:s}=ne(),{router:o}=le(),a=()=>{t&&o.push(t)},i=g.useRef(null);return r.jsx(d.ToggleStyle.Wrapper,{size:s?"medium":"small",style:{...n,border:`${i.current===t?"2":"1"}`,overflow:"hidden",padding:"0"},onClick:a,active:i.current===t,children:e})},Xu=({productId:e,similars:t,TOGGLE_STYLE_MODIFIER:n})=>{const{thumbImage:s}=Me(),o=[{productId:e,slug:"",textureImage:(s==null?void 0:s.imageUrl)??"",textureAlt:(s==null?void 0:s.imageText)??""},...t];return r.jsx("div",{children:o.map((a,i)=>a.textureImage?r.jsxs(sg,{link:a.slug?a.slug:null,TOGGLE_STYLE_MODIFIER:n,children:[r.jsx(d.ToggleStyle.DisabledAdornment,{}),r.jsx(d.ToggleStyle.Texture,{children:r.jsx(Ne.Image,{alt:a.textureAlt,src:a.textureImage,height:34,width:34,style:{borderRadius:0,height:"100%"}})})]},`similars-item-${i}`):null)})},og=({children:e,storeId:t,productId:n,PDP_INFO:s,TEXTURE_IMAGE:o,TOGGLE_STYLE_MODIFIER:a})=>{const{items:i,loadSimilars:c}=Hc(n,{filterTexture:o,storeId:t});return g.useEffect(()=>{c()},[c]),r.jsxs("div",{className:Q.similars,children:[r.jsxs("div",{className:Q["similars-info"],children:[r.jsx("span",{className:Q["sections-title"],children:s.product.color_title}),e]}),r.jsx(Xu,{productId:n,similars:i,TOGGLE_STYLE_MODIFIER:a})]})},ag=()=>{const{colorName:e}=Me();return r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{className:e.length===0?"":Q["accessibility-info"],children:r.jsx("p",{children:e})})})},tr=({className:e,titleId:t})=>{var o,a,i;const{productName:n,tag:s}=Me();return r.jsxs("div",{className:d.helpers.classNameConcat(Q.header,e),children:[s!=null&&s.commercial?r.jsx(d.Tag,{size:"small",title:(o=s.commercial)==null?void 0:o.value,variant:"quaternary",adornment:{start:(a=s.commercial)!=null&&a.icon?r.jsx(d.Icon,{name:s.commercial.icon}):null},children:(i=s.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})})})]})};tr.displayName="PDP.PDPHeader";const no=({layout:e="horizontal"})=>{const{price:t,listPrice:n,installments:s}=Me(),{count:o,value:a}=s,i=F.formatPriceToCurrency(n??0,!0),c=F.formatPriceToCurrency(t??0,!0),l=F.formatPriceToCurrency(a??0);return r.jsx(d.ProductInfo.Root,{size:"small",layout:e,children:r.jsxs(d.ProductInfo.Wrapper,{layout:e,size:"small",className:Q["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"})}),o&&o>1&&a?r.jsx(d.ProductInfo.Price,{label:"installment",value:`ou ${o}x ${l}`,size:"small"}):null]})})},rs=({onAddCallBack:e,onDisabledClickCallBack:t,addToCartBtnSize:n,BUY_BUTTON_LABELS:s})=>{const o=rn(),{productId:a,productData:i,price:c,listPrice:l,thumbImage:u,isKit:m}=Me(),{isMobile:f}=ne(),{addToCart:p}=ve(),{sendDataLayerEvent:h}=ae(),_=!m&&(!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}),p({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 r.jsx(d.Button,{className:Q["add-to-cart"],size:f?(n==null?void 0:n.mobile)??"large":(n==null?void 0:n.desktop)??"x-large",onClick:y,children:o.sku&&o.available?`${s.add_to_cart}`:`${s.select_size}`})},ig=({addToCartBtnSize:e,BUY_BUTTON_LABELS:t})=>{const{isMobile:n}=ne(),s=rn(),{sizesContainerRef:o}=Ra(),{structureRef:a}=Pe();return s.sku&&s.available?r.jsx(rs,{addToCartBtnSize:e,BUY_BUTTON_LABELS:t}):r.jsx(d.Button,{className:Q["add-to-cart"],size:n?(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})},wn=({value:e,label:t,suppressHydrationWarning:n=!1},s)=>{const o={value:e,...n&&{suppressHydrationWarning:!0}},a=s==="compact"?o:{...o,label:t};return r.jsx(d.Timer.Digit,{...a})},Mn=({dateEnd:e,dateInit:t,type:n="default",TIME_ZONE:s,...o})=>{const[a,i]=g.useState(mc(new Hr.TZDate(Date.now(),s),new Hr.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 r.jsx(r.Fragment,{});const u=Wt(a,"days"),m=Wt(a,"hours"),f=Wt(a,"minutes"),p=Wt(a);return r.jsxs(d.Timer.Root,{...o,children:[u?r.jsxs(r.Fragment,{children:[wn({value:u,label:"dias"},n),r.jsx(d.Timer.Separator,{})]}):null,wn({value:m,label:"horas"},n),r.jsx(d.Timer.Separator,{}),wn({value:f,label:"min"},n),r.jsx(d.Timer.Separator,{}),wn({value:p,label:"segs",suppressHydrationWarning:!0},n)]})},ro=({TIME_ZONE:e})=>{const{tag:t}=Me(),n=t==null?void 0:t.flagGoldenPdp,s=g.useMemo(()=>{var o;if((o=n==null?void 0:n.tagImage)!=null&&o.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:Q["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:Q["golden-tag-video"],children:r.jsx(Ne.Video,{src:s,autoPlay:!0,muted:!0,loop:!0,playsInline:!0})}),r.jsxs("div",{className:Q["golden-tag-content"],children:[r.jsx("span",{className:Q["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(Mn,{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};ro.displayName="PDP.GoldenTag";const cg=({addToCartBtnSize:e,BUY_BUTTON_LABELS:t,TIME_ZONE:n,Z_INDEX_WAR:s})=>{const{isMobile:o}=ne();return o?r.jsxs(d.Card,{className:Q["bottom-navigation"],shadow:!0,style:{zIndex:s.pdp_bottom_navigation},children:[r.jsxs("div",{className:Q["bottom-navigation__header"],children:[r.jsx(ro,{TIME_ZONE:n}),r.jsxs("div",{className:Q["bottom-navigation__header-content"],children:[r.jsx(tr,{}),r.jsx(no,{layout:"name-vertical"})]})]}),r.jsx(ig,{addToCartBtnSize:e,BUY_BUTTON_LABELS:t})]}):null},lg=({children:e,setShowBottomNavigation:t})=>{const n=g.useRef(null),s=Ss(n),o=g.useRef(s);return g.useEffect(()=>{var i;const{top:a}=((i=n.current)==null?void 0:i.getBoundingClientRect())??{top:0};o.current!==s&&a>0&&(t(!s),o.current=s)},[s]),r.jsx("div",{ref:n,style:{width:"100%"},children:e})},ug=({ICONS:e})=>{const{isMobile:t}=ne(),{price:n,listPrice:s,productData:o,productId:a}=Me(),{sendDataLayerEvent:i}=ae(),c=Ut(),{toggleProduct:l}=It();return r.jsx(d.Button,{adornment:{start:r.jsx(d.Icon,{name:e[c.includes(a)?"favorite_true":"favorite_false"],size:"medium"})},className:Q["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:n,listPrice:s}}})}})},Yu=({showWishlist:e=!0,callBack:t,addToCartBtnSize:n,BUY_BUTTON_LABELS:s,ICONS:o,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:Q.actions,children:[c?r.jsx(lg,{setShowBottomNavigation:u,children:r.jsx(rs,{onAddCallBack:t,addToCartBtnSize:n,BUY_BUTTON_LABELS:s})}):r.jsx(rs,{onAddCallBack:t,addToCartBtnSize:n,BUY_BUTTON_LABELS:s}),e&&r.jsx(ug,{ICONS:o})]}),c&&l&&r.jsx(cg,{addToCartBtnSize:n,BUY_BUTTON_LABELS:s,Z_INDEX_WAR:i,TIME_ZONE:a})]})},Qu=({className:e,device:t,ICONS:n})=>{const{breadcrumbList:s,productName:o}=Me(),a=i=>i.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"");return r.jsx(d.BreadCrumb.DivWrapper,{className:d.helpers.classNameConcat(Q.breadcrumb,[t==="mobile"?Q["breadcrumbs-mobile"]:Q["breadcrumbs-desktop"],e]),children:r.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 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(Q["breadcrumb--active"],e),children:o},"pdp-breadcrumb-productName")]})})};Qu.displayName="PDP.BreadCrumb";const Zu=({className:e})=>{var s;const{tag:t}=Me(),n=t==null?void 0:t.flagPdp;return n&&((s=n==null?void 0:n.value)!=null&&s.length)?r.jsx(d.Tag,{className:d.helpers.classNameConcat(Q.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,{})};Zu.displayName="PDPCredits";const dg=()=>{const{descriptionContent:e,productReference:t}=Me(),[n,s]=g.useState("description");return r.jsxs(d.Tabs.Root,{className:Q["tabs-root-modifier"],children:[r.jsx(d.Tabs.TabList,{className:Q["tabs-list-modifier"],children:e==null?void 0:e.map(({label:o,value:a})=>r.jsx(d.Tabs.Item,{label:o,value:a,activeTab:n,onTabChange:s,size:"large",className:`${Q["tabs-item-modifier"]} ${n===a?Q["tabs-item-active"]:""}`},a))}),r.jsxs("div",{className:Q["content-wrapper"],children:[n==="description"?r.jsx("div",{children:r.jsxs("span",{className:Q.productref,children:["Ref:",t]})}):"",e==null?void 0:e.map(({value:o,content:a})=>n===o?r.jsx(d.Tabs.Panel,{className:`${Q["tabs-panel"]} ${n===o?Q["tabs-panel-enter"]:Q["tabs-panel-exit"]}`,children:r.jsx("div",{className:Q.content,dangerouslySetInnerHTML:{__html:a}})},o):null)]})]})},mg=({CURRENCY:e,DELIVERY_INFO_BOXES_ALLOWED:t,FREIGHT_CALCULATION:n,Z_INDEX_WAR:s})=>{const o=rn(),{isMobile:a}=ne();return r.jsxs(r.Fragment,{children:[a?r.jsx(d.Utils.Divider,{direction:"horizontal",size:"small"}):null,r.jsx(_u,{skuId:o.available?o.sku:"",size:a?n.inputSize.mobile:n.inputSize.desktop,quantity:o.quantity,sellerId:o.sellerId,seller:o.sellerName,local:"PDP",CONSTANTS_PROPS:{freightConfig:n,deliveryInfoBoxesAllowed:t,toolTipZIndex:s.modal,currency:e}}),a?r.jsx(d.Utils.Divider,{direction:"horizontal",size:"small"}):null]})},la=({image:e,index:t,handleZoom:n,PRODUCT_IMAGE_DIMENSIONS:s})=>{const o=F.resizingImg(e.imageUrl,s.pdp),{nextimage:a}=le();return r.jsx(a,{src:o,alt:e.imageLabel,objectFit:"contain",...s.pdp,...t<=1&&{priority:!0,loading:"eager"},onClick:()=>{n(t)}},t)},fg=({video:e,productName:t,poster:n})=>{const{sendDataLayerEvent:s}=ae(),o=g.useRef(!1);return r.jsx(Ne.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:n})},Ju=({images:e,video:t,handleZoom:n,productName:s,PRODUCT_IMAGE_DIMENSIONS:o})=>{var u,m;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:f=>{a(f)},className:Q["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:f=>c==null?void 0:c.navigateTo(f)})}),r.jsxs(d.Carousel.Body,{children:[r.jsx(d.Carousel.Item,{style:l,children:r.jsx(la,{image:e[0],index:0,handleZoom:n,PRODUCT_IMAGE_DIMENSIONS:o})},"PDP_gallery_0"),t&&r.jsx(d.Carousel.Item,{style:l,children:r.jsx(fg,{video:t,productName:s,...((u=e[1])==null?void 0:u.imageUrl)&&{poster:(m=e[1])==null?void 0:m.imageUrl}})},"PDP_gallery_video"),e.map((f,p)=>p===0?null:r.jsx(d.Carousel.Item,{style:l,children:r.jsx(la,{image:f,index:p,handleZoom:n,PRODUCT_IMAGE_DIMENSIONS:o})},`PDP_gallery_${p}`))]})]})};Ju.displayName="PDP.Carousel";const pg="_thumbs_1954e_65",hg="_selected_1954e_92",_g="_carousel_1954e_164",gg="_bullets_1954e_201",we={"image-zoom-wrapper-desktop":"_image-zoom-wrapper-desktop_1954e_1","button-close-container":"_button-close-container_1954e_10","button-close":"_button-close_1954e_10","main-image-container":"_main-image-container_1954e_22","image-desktop":"_image-desktop_1954e_52",thumbs:pg,selected:hg,"image-zoom-wrapper-mobile":"_image-zoom-wrapper-mobile_1954e_117","image-mobile":"_image-mobile_1954e_147","image-zoom--image":"_image-zoom--image_1954e_161",carousel:_g,"carousel-controller":"_carousel-controller_1954e_169","arrow-left":"_arrow-left_1954e_179","arrow-right":"_arrow-right_1954e_180",bullets:gg,"zoom-popup":"_zoom-popup_1954e_212","image-zoom--mobile":"_image-zoom--mobile_1954e_252","image-zoom--image--img":"_image-zoom--image--img_1954e_282"},ua=({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"}})}),yg=({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}),ed=({images:e,setCurrent:t,setFirstImgLoaded:n,ICONS:s,PRODUCT_IMAGE_DIMENSIONS:o})=>{const{nextimage:a}=le();let i=null;const c=g.useRef(null),{initialize:l,controller:u,pagination:m,itemsStyles:f}=d.Carousel.useCarousel({itemsPerPage:1,gap:10,loop:!1,direction:"row"}),p=_=>{u==null||u.navigateTo(_)},h=()=>{n(!0)};return g.useEffect(()=>{t(m.currentPage)},[m.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:s.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:s.arrow_right})}})]}),r.jsx(d.Carousel.Body,{children:Array.isArray(e)&&e.map((_,y)=>r.jsx(d.Carousel.Item,{style:f,children:r.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))}),r.jsx(d.Carousel.Bullets,{className:we.bullets,page:m.currentPage,total:m.totalPages,onBulletClick:p})]})};ed.displayName="ImageZoom.Mobile.Carousel";const td=({imgRef:e,image:t,PRODUCT_IMAGE_DIMENSIONS:n})=>{Fa();const{nextimage:s}=le();return r.jsx("div",{className:we["image-zoom--image"],ref:e,children:r.jsx(s,{...n.image_zoom.mobile,alt:t.imageText,className:we["image-zoom--image--img"],quality:100,src:t.imageUrl})})};td.displayName="ImageZoom.ImageZoom";const nd=({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"})]})});nd.displayName="ImageZoom.ZoomPopup";const rd=({images:e,ICONS:t,PRODUCT_IMAGE_DIMENSIONS:n,...s})=>{const[o,a]=g.useState(!1),[i,c]=g.useState(0),{containerRef:l,imgRef:u,scale:m}=za({defaultScale:1,maxScale:3});return r.jsxs("div",{...s,className:we["image-mobile"],"data-disable-carrousel-pan":m>1,children:[r.jsx(nd,{loaded:o}),r.jsx(ed,{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(td,{imgRef:u,image:e[i],PRODUCT_IMAGE_DIMENSIONS:n})})]})};rd.displayName="ImageZoom.ImageMobile";const xg=({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}),vg="_modal_1u87b_1",rt={modal:vg,"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 bg({headerTitle:e,isMobile:t,ICONS:n}){return r.jsx(d.Modal.Header,{navigation:"top",className:rt["modal-header"],children:r.jsxs(d.Modal.Controls,{navigation:"top",isMobile:t,children:[r.jsx("div",{className:rt["modal-header__title"],children:r.jsx(d.Modal.Title,{navigation:"top",className:rt["quick-shop__title"],title:e})}),r.jsx(d.Button,{className:rt["modal-header__close-button"],"data-close":!0,iconNameStart:n.close,size:"small",variant:"tertiary"})]})})}const sd=({PDP_INFO:e,PLP_SIZE_ORDER:t,ICONS:n,NEWSLETTER_CONFIGS:s,NOTIFY_INFO:o,PRODUCT_CARD_TEXTS:a,Z_INDEX_WAR:i})=>{const{sizes:c,productId:l,handleViewItemEvent:u}=Me(),m=g.useMemo(()=>c!=null&&c.length?rl({items:c,getLabel:b=>b.value,PLP_SIZE_ORDER:t}):[],[c]),{sizesContainerRef:f}=Ra(),{isMobile:p}=ne(),h=rn(),_=bi(),{setValue:y}=yi(),{setValue:x}=Rs(),v=g.useRef({}),[C,j]=g.useState(null);return r.jsxs("div",{ref:f,className:d.helpers.classNameConcat(Q.sizes,"PDP_sizes"),children:[r.jsx("span",{className:Q["sections-title"],children:e.product.size_title}),r.jsx("div",{children:m.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:p?"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(qs,{open:_,setVisible:x,sku:C,setSku:j,skus:Object.values(v.current),ICONS:n,NEWSLETTER_CONFIGS:s,NOTIFY_INFO:o,PRODUCT_CARD_TEXTS:a,Z_INDEX_WAR:i})]})},Gt=({children:e,className:t,type:n})=>r.jsx("div",{className:d.helpers.classNameConcat(Q["pdp-main__info-subsection"],[Q[`subsection-${n}`],t]),children:e}),od=({children:e,className:t})=>{const{structureRef:n,tipbarRef:s}=Pe(),o=g.useMemo(()=>{var c,l;const a=((c=n.current)==null?void 0:c.clientHeight)||0,i=((l=s.current)==null?void 0:l.clientHeight)||0;return a+i},[n,s]);return r.jsx("div",{className:d.helpers.classNameConcat(Q["pdp-main__info"],t),id:"pdpmaininfo",style:{top:o},children:e})},ad=({TEXTURE_IMAGE:e,TOGGLE_STYLE_MODIFIER:t})=>{const{productId:n}=Me(),[s,o]=g.useState([]),a=new Map;return g.useEffect(()=>{if(n){if(a.has(n)){o(a.get(n));return}fetch("/api/catalog/product/similars",{method:"POST",body:JSON.stringify({productId:n,filterTexture:e})}).then(i=>i.json()).then(({data:i})=>{Array.isArray(i)&&i.length===0||(a.set(n,i),o(i))}).catch(i=>{console.error(i)})}},[n]),r.jsxs("div",{className:Q.similars,children:[r.jsx("span",{className:Q["sections-title"],children:"Cor"}),r.jsx(Xu,{productId:n,similars:s,TOGGLE_STYLE_MODIFIER:t})]})};ad.displayName="PDP.Info.Similars";const jg=({callBackProductAdded:e,BUY_BUTTON_LABELS:t,ICONS:n,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:m,Z_INDEX_WAR:f})=>r.jsx(d.Modal.Body,{className:rt["modal-product-body"],children:r.jsxs(od,{className:rt["pdp-main__info-modifier"],children:[r.jsxs(Gt,{type:"product-info",children:[r.jsx(tr,{}),r.jsx(no,{})]}),r.jsx(Gt,{type:"similars",children:r.jsx(ad,{TEXTURE_IMAGE:l,TOGGLE_STYLE_MODIFIER:m})}),r.jsx(Gt,{type:"sizes",children:r.jsx(sd,{ICONS:n,NEWSLETTER_CONFIGS:s,NOTIFY_INFO:o,PDP_INFO:a,PLP_SIZE_ORDER:i,PRODUCT_CARD_TEXTS:c,Z_INDEX_WAR:f})}),r.jsx(Gt,{type:"actions",children:r.jsx(Yu,{showWishlist:!1,callBack:e,addToCartBtnSize:{mobile:"medium",desktop:"large"},BUY_BUTTON_LABELS:t,ICONS:n,TIME_ZONE:u,Z_INDEX_WAR:f})})]})});function Cg({callBackProductAdded:e,QUICKSHOP:t,ICONS:n,...s}){const[o,a]=g.useState(!1),i=()=>a(c=>!c);return r.jsxs("div",{className:rt["quick-shop"],children:[r.jsx(d.Button,{onClick:i,size:"x-large",className:rt["shop-bag"],iconNameStart:n.bag,iconSize:"medium"}),r.jsxs(d.Modal.Root,{isOpen:o,setIsOpen:a,className:`${rt.modal} ${rt["quick-shop__modal"]}`,style:{position:"fixed",height:"100svh",width:"100%",top:0,zIndex:1e3,bottom:"unset",overflowY:"hidden"},variant:"sideRight",children:[r.jsx(bg,{headerTitle:t.title,ICONS:n}),r.jsx(jg,{callBackProductAdded:e,ICONS:n,...s})]})]})}const Sg=({image:e})=>r.jsx(Jt,{src:F.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)"}}),wg=({images:e,selectedImageIndex:t,PRODUCT_IMAGE_DIMENSIONS:n,...s})=>{const[o,a]=g.useState(!1),{nextimage:i}=le();return r.jsx("div",{...s,className:we["main-image-container"],children:r.jsxs("div",{className:we["image-desktop"],children:[!o&&r.jsx(Sg,{image:e==null?void 0:e[t]}),r.jsx(i,{src:F.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)}})]})})},Pg=({images:e,onThumbnailClick:t,selectedImageIndex:n})=>{const{nextimage:s}=le();return r.jsx("div",{className:we.thumbs,children:e.map((o,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(s,{src:o.imageUrl,alt:o.imageText,layout:"responsive",width:100,height:100,objectFit:"cover",priority:!1})},a))})},id=({images:e,initialSelectedImageIndex:t=0,setShowImageZoom:n,ICONS:s,PRODUCT_IMAGE_DIMENSIONS:o,Z_INDEX_WAR:a,...i})=>{const{isMobile:c}=ne(),[l,u]=g.useState(t),m=f=>{u(f)};return c?r.jsxs(xg,{Z_INDEX_WAR:a,children:[r.jsx(ua,{onClose:()=>n({show:!1,initialIndex:0}),ICONS:s}),r.jsx(rd,{images:e,ICONS:s,PRODUCT_IMAGE_DIMENSIONS:o})]}):r.jsxs(yg,{Z_INDEX_WAR:a,children:[r.jsx(ua,{onClose:()=>n({show:!1,initialIndex:0}),ICONS:s}),r.jsx(wg,{images:e,selectedImageIndex:l,onThumbnailClick:m,PRODUCT_IMAGE_DIMENSIONS:o},e[l].imageId??`${e[l].imageText}-${l}`),r.jsx(Pg,{images:e,selectedImageIndex:l,onThumbnailClick:m}),r.jsx(Cg,{callBackProductAdded:()=>{n({initialIndex:0,show:!1})},ICONS:s,Z_INDEX_WAR:a,...i})]})};id.displayName="ImageZoom";const Eg=({productImgs:e,PRODUCT_IMAGE_DIMENSIONS:t,...n})=>{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 r.jsxs(r.Fragment,{children:[r.jsx(Ju,{images:e,video:s,handleZoom:c,productName:o,PRODUCT_IMAGE_DIMENSIONS:t}),a.show&&r.jsx(id,{images:e,initialSelectedImageIndex:a.initialIndex,setShowImageZoom:i,PRODUCT_IMAGE_DIMENSIONS:t,...n})]})},cd=({TEXTURE_IMAGE:e,PRODUCT_IMAGE_DIMENSIONS:t,...n})=>{const{images:s}=Me(),o=g.useMemo(()=>{const a=s.filter(i=>!e.includes(i.imageLabel));return a.length>0?a:s},[]);return r.jsx(Eg,{productImgs:o,TEXTURE_IMAGE:e,PRODUCT_IMAGE_DIMENSIONS:t,...n})};cd.displayName="PDP.Gallery";const Ng=({className:e,hasIcons:t=!0,ICONS:n,PDP_INFO:s})=>{const{allSizesAvailable:o,productId:a}=Me(),{setValue:i}=Rs(),{sendDataLayerEvent:c}=ae();return r.jsx("div",{className:d.helpers.classNameConcat(Q.links,e),id:"pdp-container","data-product-id":a,children:r.jsxs("div",{className:Q["links-wrapper"],children:[!o&&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:s.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:s.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:s.links_and_stepper.sizebay})]})})},Ig=({children:e})=>r.jsx("div",{className:Q["pdp-main__info-main-content"],children:e}),Rg=({head:e,className:t})=>r.jsx("thead",{className:t,children:r.jsx("tr",{children:e.map((n,s)=>r.jsx("th",{children:n},`head-title-${s}`))})}),Tg=({rows:e,className:t})=>r.jsx("tbody",{className:t,children:e.map((n,s)=>r.jsx("tr",{children:n.map(o=>typeof o=="string"&&o.includes("blocks")?JSON.parse(o).blocks.map(a=>`${a.text}
18
+ `):o).map((o,a)=>r.jsx("td",{children:o},`cell-content-${a}`))},`row-content-${s}`))}),Ag="_tableContainer_1yxy2_1",kg={tableContainer:Ag},Og=({children:e,className:t=""})=>r.jsx("table",{className:`${kg.tableContainer} ${t}`,children:e}),Dr={Head:Rg,Rows:Tg,Root:Og},Lg=({title:e,text:t})=>r.jsxs("p",{className:Q.measurementRowsText,children:[r.jsx("h1",{className:Q.measurementRowsTitle,children:e}),t]}),Mg=({ICONS:e,SIZES:t,Z_INDEX_WAR:n})=>{const s=Si(),{setValue:o}=wi();return r.jsx(d.Modal.Root,{isMobile:!0,style:{zIndex:n.modal},setIsOpen:o,isOpen:s,className:Q.measurementModal,children:r.jsx(d.Modal.Body,{children:r.jsxs("div",{className:Q.measurementContainer,children:[r.jsx("h1",{className:Q.measurementTitle,children:t.title}),r.jsxs("div",{className:Q.measurementContent,children:[r.jsx("div",{className:Q.measurementImageContainer,children:r.jsx(Jt,{width:264,height:402,alt:"",className:Q.measurementImage,src:t.bannerImage})}),r.jsxs(Dr.Root,{className:Q.measurementTable,children:[r.jsx(Dr.Head,{className:Q.measurementHead,head:t.head}),r.jsx(Dr.Rows,{className:Q.measurementRows,rows:t.rows.map((a,i)=>[r.jsx(Lg,{title:t.descriptions[i].title,text:t.descriptions[i].text},i),...a])})]})]}),r.jsx(d.Button,{onClick:()=>o(!1),className:Q.measurementClose,variant:"tertiary",children:r.jsx(d.Icon,{name:e.close})})]})})},"minicart")},Dg=({children:e,className:t,...n})=>r.jsx("div",{className:d.helpers.classNameConcat(Q["pdp-main__gallery-wrapper"],t),...n,children:e}),Fg=({children:e,className:t,...n})=>r.jsx("div",{className:d.helpers.classNameConcat(Q.pdp,t),...n,children:e}),zg=({children:e,className:t,...n})=>r.jsx("div",{className:d.helpers.classNameConcat(Q["pdp-main"],t),...n,children:e}),Bg=({children:e,className:t,...n})=>r.jsx("div",{className:d.helpers.classNameConcat(Q["pdp-main__info-secondary-content"],t),...n,children:e}),Ug={gallery:Dg,pdp:Fg,main:zg,secondary:Bg},qg=({className:e,...t})=>r.jsx(d.Utils.Divider,{...t,className:d.helpers.classNameConcat(Q.divider,e)}),Hg=Object.freeze(Object.defineProperty({__proto__:null,AccessibilityInfo:ag,Actions:Yu,BreadCrumb:Qu,Credits:Zu,DescriptionsTabs:dg,Divider:qg,Freight:mg,Gallery:cd,GoldenTag:ro,Header:tr,Links:Ng,MainContent:Ig,MainInfo:od,PDPSimilars:og,Price:no,ProductMeasurements:Mg,Sizes:sd,SubSectionWrapper:Gt,containers:Ug},Symbol.toStringTag,{value:"Module"})),$g=(e,t)=>{const[n,s]=Pu({items:e}),[o,a]=t.split(":").map(Number);return isNaN(o)||isNaN(a)?[n,s]:[n<o?n:o,s>a?s:a]},Vg=()=>{var w;const{ICONS:e,PLP_FILTERS:t,PLP_FILTERS_COLORS:n,PLP_FILTERS_EMPTY:s,PLP_FILTERS_TITLE:o,PLP_SIZE_ORDER:a}=Fe(),[i,c]=g.useState("10000:0"),{isMobile:l}=ne(),{sendDataLayerEvent:u}=ae(),{openFilters:m,setOpenFilters:f}=Fs(),{state:p}=Be(),{breadcrumb:h,deleteAllFacets:_,isLoading:y=!1,facets:x,onToggleFacet:v,selectedFacets:C}=yc.contexts.searchFacets.hook(),j=g.useRef(""),b={isLast:!0,href:(w=p.term)!=null&&w.length?`/${p.term}`:"",name:p.term},P=F.filterNonRootFacets(C,p==null?void 0:p.base);return g.useEffect(()=>{const S=x.find(({key:E})=>E==="price");if(S){const[E,R]=$g(S.values,i??"10000:0");c(`${E}:${R}`)}},[x,i,c]),g.useEffect(()=>{if(!P.length)return;const S=JSON.stringify(P);j.current!==S&&(j.current=S,u({functionKey:"filterEvent",data:{commonData:{selectedFacets:P}}}))},[P]),r.jsxs(kn.teamComponents.Filter.Root,{CONSTANTS:{ICONS:e,PLP_FILTERS_TITLE:o,PLP_FILTERS:t},breadcrumb:h.length?h:[b],deleteAllFacets:_,filters:{facets:F.filterNonCategorySelected(x,p==null?void 0:p.base),selected:P},isMobile:l??!1,isLoading:y,isOpen:m,price:i,onToggleFacet:v,setIsOpen:f,target:document.body,children:[r.jsx(kn.teamComponents.Filter.Selected,{ICONS:e,PLP_FILTERS:t,PLP_FILTERS_COLORS:n}),r.jsx(kn.teamComponents.Filter.Content,{columns:2,CONSTANTS:{ICONS:e,PLP_FILTERS:t,PLP_FILTERS_COLORS:n,PLP_FILTERS_EMPTY:s,PLP_SIZE_ORDER:a}})]})},ld=()=>typeof document>"u"?null:r.jsx(Vg,{});ld.displayName="Filters";const so=({total:e=0})=>{const{SEARCH_TOTAL_PORTAL_ID:t}=Fe();if(typeof window>"u")return null;const n=document.getElementById(t);return n?js.createPortal(r.jsxs("span",{children:["[",e,"] produto",e>1?"s":""]}),n):null};so.displayName="PDC.Grid.NavigationTotal";const Wg=({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])},Gg=()=>{const{isMobile:e}=ne(),{isLoading:t,products:n,total:s}=sn(),o=Fe();return Wg({productCount:n.length,PLP_GRID_SCROLL_BACK:o.PLP_GRID_SCROLL_BACK}),r.jsxs(r.Fragment,{children:[r.jsx(nt.Products,{isMobile:e??!1,items:n,...o}),!n.length&&!t&&r.jsx(nt.Empty,{ICONS:o.ICONS,PLP_NOT_RESULT:o.PLP_NOT_RESULT}),r.jsx(so,{total:s})]})},ud=({infinite:e=!1})=>r.jsx("div",{className:Xe["pdc--grid"],children:r.jsx("div",{className:Xe["pdc--grid--content"],children:e?r.jsx(nt.InfiniteScroller,{}):r.jsx(Gg,{})})});ud.displayName="Grid";const Tt=e=>({centro:"center",esquerda:"start",direita:"end"})[e],dd=({children:e,contentState:t,entityKey:n})=>{const{url:s}=t.getEntity(n).getData();return s?r.jsx(ze,{href:s,children:e}):e},Kg=(e,t,n)=>{e.findEntityRanges(s=>{const o=s.getEntity();return o===null?!1:n.getEntity(o).getType()==="LINK"},t)},Dn=e=>{const t=new Je.CompositeDecorator([{strategy:Kg,component:dd}]),n=Je.convertFromRaw(e);return Je.EditorState.createWithContent(n,t)},Xg=e=>Je.convertFromRaw(e),Fn=Je.DefaultDraftBlockRenderMap.set("unstyled",{element:"div",aliasedElements:["div"]}),da="superior-direita",Pn="dentro-inferior-centro",Yg="inferior-direita",Fr="dentro-inferior-esquerda",md=e=>({position:e===Pn||e===Fr?"absolute":"default",shouldRender:[da,Pn,Fr].includes(e)?"top":"bottom",alignItems:[Pn].includes(e)?"center":[da,Yg].includes(e)?"flex-end":"flex-start",left:e===Fr?"16px":e===Pn?"45%":"unset"}),Qg=Object.freeze(Object.defineProperty({__proto__:null,CREATE_CONTENT:Dn,EXTENDED_BLOCK_RENDER_MAP:Fn,GET_CONTENT_STATE:Xg,controllersPositionsAdapter:md},Symbol.toStringTag,{value:"Module"})),Zg=({expanded:e,content:t})=>r.jsxs("details",{open:e,children:[t.textStructureReduced?r.jsx("summary",{onClick:n=>n.preventDefault(),children:r.jsx(Je.Editor,{editorKey:"draft-editor-1",blockRenderMap:Fn,editorState:t!=null&&t.textStructureReduced?Dn(JSON.parse(t.textStructureReduced)):Je.EditorState.createEmpty(),onChange:()=>null,readOnly:!0})}):r.jsx(r.Fragment,{}),t.showTextStructureExpander&&t.textStructure?r.jsx(r.Fragment,{children:r.jsx(Je.Editor,{editorKey:"draft-editor-1",blockRenderMap:Fn,editorState:t.textStructure?Dn(JSON.parse(t.textStructure)):Je.EditorState.createEmpty(),onChange:()=>null,readOnly:!0})}):r.jsx(r.Fragment,{})]}),Jg="_textContentWrapper_176ht_5",ey="_textContentSection_176ht_13",ss={"link-modifier":"_link-modifier_176ht_1",textContentWrapper:Jg,textContentSection:ey},fd=({data:e,ICONS:t,TEXTCONTENT_EXPANDED:n})=>{var a;const[s,o]=g.useState(!1);return r.jsx(d.TextStructure.Root,{layoutProps:{textRow:{alignContent:Tt(e.textStructureAlignment),alignItems:Tt(e.textStructureAlignment)},columnWrapper:{alignContent:Tt(e.textStructureAlignment),alignItems:Tt(e.textStructureAlignment)}},adornment:{bottom:e.showTextStructureExpander&&e.textStructure?r.jsx(d.Button,{variant:"tertiary",adornment:{end:r.jsx(d.Icon,{name:s?`${t.arrow_up}`:`${t.arrow_down}`})},onClick:()=>o(i=>!i),size:"small",children:s?(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:ss.textContentWrapper,style:{alignItems:Tt(e.textStructureAlignment)},children:[r.jsx(d.TextStructure.DivWrapper,{style:{textAlign:Tt(e.textStructureAlignment)},mode:e.textStructureMode??"default",children:e.textStructureReduced?r.jsx(Zg,{content:e,expanded:s}):r.jsx(r.Fragment,{})}),e.textStructureButtonLabel?r.jsx(Le,{mode:e.textStructureMode??"default",href:e.textStructureButtonHref??"#",size:e.textStructureButtonSize,className:ss["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,{})]})})},ty=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],ma=e=>({centro:"center",esquerda:"start",direita:"end"})[e],fa={"content-modifier":"_content-modifier_16y4u_5","banner-image-wrapper-modifier":"_banner-image-wrapper-modifier_16y4u_13"},pa=({data:e,videoUrl:t,priority:n,videoRef:s,ICONS:o,TEXTCONTENT_EXPANDED:a,TIME_ZONE:i,className:c,...l})=>{const{video:u,image:m,imageHref:f,imageOpacity:p,altImage:h,backgroundColor:_,position:y,contentAlignment:x,showTimer:v,contentOrder:C,timerMode:j,timerEnd:b,timerInit:P,textStructure:w,textStructureReduced:S}=e.banner,E=(f==null?void 0:f.trim())||(m==null?void 0:m.trim())||null,{nextimage:R}=le();return r.jsxs(d.Banner.Container,{...l,children:[r.jsxs(d.Banner.ImageWrapper,{className:fa["banner-image-wrapper-modifier"],style:p?{background:_}:void 0,children:[u&&r.jsx(Ne.Video,{videoRef:s,src:t,autoPlay:n,loop:!0,playsInline:!0,muted:!0}),E&&!(u!=null&&u.length)&&r.jsx(R,{src:E,width:"1920",height:"1080",alt:h??m??"",...n?{priority:n}:{},style:p?{opacity:"0"}:void 0}),!m&&!(u!=null&&u.length)&&r.jsx("div",{style:{background:_}})]}),v||S||w?r.jsx(d.Banner.Slot,{...ty(y??"centro"),className:d.helpers.classNameConcat(fa["content-modifier"],c),style:{textAlign:ma(x)},children:r.jsxs(d.Utils.Column,{gap:"16px",alignItems:ma(x),children:[v&&C==="timer-first"&&r.jsx(Mn,{mode:j??"default",size:"small",dateEnd:b?new Date(b):new Date,dateInit:P?new Date(P):new Date,TIME_ZONE:i}),r.jsx(fd,{data:e.banner,ICONS:o,TEXTCONTENT_EXPANDED:a}),v&&C!=="timer-first"&&r.jsx(Mn,{mode:j??"default",size:"small",dateEnd:b?new Date(b):new Date,dateInit:P?new Date(P):new Date,TIME_ZONE:i})]})}):r.jsx(r.Fragment,{})]})};class Qe extends g.Component{constructor(){super(...arguments);gt(this,"state",{hasError:!1,error:null})}static getDerivedStateFromError(){return{hasError:!0,error:null}}componentDidCatch(n,s){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:",s),console.groupEnd()}}render(){const{hasError:n}=this.state,{children:s,fallback:o}=this.props;return n&&process.env.NODE_ENV==="production"?null:n&&o!==void 0?o:s}}const an=({data:e,className:t,priority:n,creative:s,name:o,...a})=>{const{handleSelectPromotionEvent:i,currentLocalRef:c}=ae(),{banner:{promotion_name:l},index:u,componentIndex:m}=e,f=typeof u=="number"?`:${u+1}`:"",p={creative_name:s,creative_slot:`${s}-${c.current}:${m+1}${f}`,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(P=>P.includes("loc")||P.includes("signature")||P.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:o,children:r.jsx(Xn,{eventData:{functionKey:"readyEvents",data:{event:"view_promotion",readyData:{ecommerce:{...p,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:p,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})})})},oo=e=>r.jsx(Qe,{name:e.name,children:r.jsx(an,{...e})}),pd=({columns:e,count:t,gap:n,className:s})=>{var x;const{banners:o,pages:a,products:i}=lt(),{isMobile:c}=ne(),{banners:l}=$n(),{ICONS:u,PRODUCT_CARD_IMAGE_ASPECT_RATIO:m,TEXTCONTENT_EXPANDED:f,TIME_ZONE:p}=Fe(),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)=>r.jsx(ot.Banner,{columns:v.columns,gap:n,isMobile:c??!1,position_grid:o[C]+1,totalColumns:e,PRODUCT_CARD_IMAGE_ASPECT_RATIO:m,children:r.jsx(an,{name:"Banner Carousel",data:{banner:v,componentIndex:C},creative:"banner_grid",ICONS:u,TEXTCONTENT_EXPANDED:f,TIME_ZONE:p,className:s})},`${v.position_grid}-${C}`)):null};pd.displayName="PDC.InfiniteScroller.Banners";const hd=e=>{var s;const{pages:t}=lt(),n=t[t.length-1];return(n==null?void 0:n.page)!==((s=n==null?void 0:n.pagination)==null?void 0:s.total)&&!(n!=null&&n.loading)?r.jsx(Kn,{...e}):null};hd.displayName="PDC.InfiniteScroller.Loading";const _d=({page:e,...t})=>{const{updateParamPage:n}=lt(),{element:s}=Bn({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:s})};_d.displayName="PDC.Page.Anchor";const gd=({first:e,gap:t,isMobile:n=!1,item:s,index:o,last:a=!1,order:i,page:c,showVideo:l=!1})=>{const{load:u,handleNotify:m}=lt(),{getAvailableProductTag:f}=_t(),{BUY_BUTTON_LABELS:p,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:P,PRODUCT_IMAGE_DIMENSIONS:w,SECOND_IMAGE:S,StoreConfig_MainSellerId:E,TEXTURE_IMAGE:R,Z_INDEX_WAR:A,ICONS:O,storeId:L}=Fe(),X=f(s==null?void 0:s.cluster.highlights);return r.jsx(ot.Card,{className:s.id==="skeleton"?Xe["pdc--infinite--card--disabled"]:"",gap:t,isMobile:n??!1,item:s,order:i,tag:X,index:o,setSkuSelected:m,showVideo:l,CONSTANTS:{BUY_BUTTON_LABELS:p,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:P,PRODUCT_IMAGE_DIMENSIONS:w,SECOND_IMAGE:S,StoreConfig_MainSellerId:E,TEXTURE_IMAGE:R,Z_INDEX_WAR:A,ICONS:O,storeId:L},children:c&&u&&r.jsxs(r.Fragment,{children:[e&&r.jsx(An.Anchor,{page:c}),!c.loading&&r.jsx(An.Loader,{page:c}),a&&c.loading&&r.jsx(An.NextPage,{page:c})]})})};gd.displayName="PDC.Page.Card";const yd=({type:e="default",page:t,...n})=>{const{load:s,updatePage:o}=lt(),{element:a}=Bn({callback:()=>o(t),onEnterViewportOnce:!0,options:{threshold:1}});return s===!0&&r.jsx("div",{...n,className:Xe[`pdc--infinite--loader${e==="page"?"--page":""}`],ref:a})};yd.displayName="PDC.Page.Loader";const xd=({page:e,...t})=>{var o;const{addNewPage:n}=lt(),{element:s}=Bn({callback:()=>{n(e)},onEnterViewportOnce:!0,options:{threshold:[.5,1]}});return((o=e==null?void 0:e.pagination)==null?void 0:o.nextPage)===!0&&e.loading===!0?r.jsx("div",{...t,className:Xe["pdc--infinite--next-page--card"],"data-next-page":!0,ref:s}):null};xd.displayName="PDC.Page.NextPage";const An={Anchor:_d,Card:gd,Loader:yd,NextPage:xd},vd=({count:e,gap:t,page:n})=>{const{isMobile:s}=ne(),{columns:o,products:a}=lt(),i=(n.page-1)*e,c=Vi(n.products,o);return Array.isArray(n.products)?n.products.map((l,u)=>r.jsx(An.Card,{first:u===0,last:u===n.products.length-1,gap:t,index:u,item:l.node,isMobile:s??!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};vd.displayName="PDC.Page";const ny=({pages:e,load:t,PLP_GRID_SCROLL_BACK:n})=>{const s=g.useRef(!1);g.useEffect(()=>{const o=e[e.length-1];if(t&&o&&!s.current){const a=sessionStorage.getItem(n.refer),i=sessionStorage.getItem(n.order),c=document.querySelector(a==="true"?`[data-order="${i}"]`:`#pdc-scroll-infinite-${o.page}`);c&&(s.current=!0,sessionStorage.setItem(n.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])},ry=()=>{var l,u;const{count:e}=Be(),{columns:t,gap:n,load:s,pages:o,total:a}=lt(),i=Fe(),{PLP_GRID_SCROLL_BACK:c}=Fe();return ny({pages:o,load:s,PLP_GRID_SCROLL_BACK:c}),r.jsxs(r.Fragment,{children:[s===!0&&((u=(l=o[0])==null?void 0:l.pagination)==null?void 0:u.count)===0&&r.jsx(nt.Empty,{ICONS:i.ICONS,PLP_NOT_RESULT:i.PLP_NOT_RESULT}),r.jsxs(ot.Root,{children:[Array.isArray(o)&&o.map((m,f)=>r.jsx(vd,{count:e,gap:n,page:m},f)),r.jsx(pd,{columns:t,count:e,gap:n})]}),r.jsx(so,{total:a}),r.jsx(hd,{})]})},bd=()=>{const{banners:e}=$n();return r.jsx(ac,{banners:e,children:r.jsx(ry,{})})};bd.displayName="PDC.InfiniteScroller";const jd=()=>{const{setOpenFilters:e}=Fs(),{selectedFacets:t,onToggleFacet:n,onSort:s}=Di(),{state:o}=Be(),{Z_INDEX_WAR:a}=Fe(),i=F.filterNonRootFacets(t,o==null?void 0:o.base);return r.jsx(ht.Root,{onSort:s,setOpenFilters:e,style:{zIndex:a.plp_navigation},children:r.jsx(ht.Selected,{callback:n,selected:i})})};jd.displayName="Navigation";const os=({currentPage:e,callback:t,type:n,...s})=>r.jsx(d.Button,{...s,iconNameStart:`arrow-${n}`,onClick:()=>{typeof t=="function"&&t(n==="left"?"prev":"")},size:"large",variant:"tertiary"});os.displayName="Arrow";const as=({active:e,prev:t,ellipses:n,page:s,selectedPage:o})=>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:s,variant:"tertiary",onClick:()=>{typeof o=="function"&&o(s)},children:s}),n&&!t&&r.jsx(d.Button,{size:"large",variant:"tertiary",children:"..."})]});as.displayName="PageEllipses";const Cd=({children:e,endPage:t,page:n,total:s,selectedPage:o,ITEMS_PER_SECTION:a})=>r.jsxs(r.Fragment,{children:[r.jsx(as,{active:n>=a&&s>a,selectedPage:o,currentPage:n,prev:!1,ellipses:n>a&&s>a,page:1}),e,r.jsx(as,{active:s-n>1&&s!==t,selectedPage:o,currentPage:n,prev:!0,ellipses:t<s-1,page:s})]});Cd.displayName="Pagination.Layout";const sy=(e,t,n)=>{const s=new URLSearchParams(n);return s.set(e,t),s.toString()},oy=(e,t)=>{const n=[];for(let s=e;s<=t;s++)n.push(s);return n},ay=({currentPage:e,total:t,maxVisiblePages:n,SEARCH_PAGE_ITEM_THRESHOLD:s})=>{const o=t>=s?s:t,a=Math.max(1,e===o?o-n+1:e-Math.floor(n/2)),i=Math.min(o,a+n-1);return{startPage:a,endPage:i,totalPages:o}},Sd=({currentPage:e,pages:t,searchParams:n,VARIANT_PAGINATION:s})=>{const{router:o,pathname:a}=le();return Array.isArray(t)?t.map(i=>r.jsx(d.Pagination.Item,{isActive:e===i,index:i,variant:e===i?s.active:s.default,onClick:()=>o.push(`${a}?${sy("page",i.toString(),n)}`),children:i},i)):null};Sd.displayName="Pages";const ao=({query:e,type:t="default",searchParams:n,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:m}=le(),{state:{page:f=1}}=Be(),{pagination:{total:p}}=sn(),{endPage:h,totalPages:_,startPage:y}=ay({currentPage:f,total:p,maxVisiblePages:o,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),s&&b.set("sort",s.replace("_",":")));const w=`${t==="search"?"/search":m}?${b.toString()}`;u.push(w)},v=C=>{x(C==="prev"?f-1:f+1)};return p?r.jsx("div",{...l,className:Xe["pdc--pagination"],children:r.jsx(d.Pagination.Wrapper,{adornment:{start:r.jsx(os,{callback:v,currentPage:f,disabled:f<2,type:"left"}),end:r.jsx(os,{callback:v,currentPage:f,disabled:f>=_,type:"right"})},children:r.jsx(Cd,{endPage:h,page:f,selectedPage:x,total:p,ITEMS_PER_SECTION:o,children:r.jsx(Sd,{currentPage:f,pages:oy(y,h),searchParams:n,VARIANT_PAGINATION:c})})})}):r.jsx(r.Fragment,{})};ao.displayName="Pagination";const wd=({gap:e,isMobile:t,className:n})=>{const{count:s,state:o}=Be(),{banners:a}=$n(),{ICONS:i,PRODUCT_CARD_IMAGE_ASPECT_RATIO:c,TEXTCONTENT_EXPANDED:l,TIME_ZONE:u}=Fe(),m=a.filter(f=>Gi(f.position_grid,o.page,s));return Array.isArray(m)?m.map((f,p)=>r.jsx(ot.Banner,{columns:f.columns,gap:e,isMobile:t,position_grid:f.position_grid,totalColumns:t?2:4,PRODUCT_CARD_IMAGE_ASPECT_RATIO:c,children:r.jsx(an,{name:"Banner Carousel",data:{banner:f,componentIndex:p},creative:"banner_grid",ICONS:i,TEXTCONTENT_EXPANDED:l,TIME_ZONE:u,className:n})},f.position_grid)):null};wd.displayName="PDC.Grid.Banners";const io=({isMobile:e=!1,items:t,BUY_BUTTON_LABELS:n,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:m,PLP_SIZE_ORDER:f,PRODUCT_CARD_IMAGE_ASPECT_RATIO:p,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:P}=_t(),{count:w,state:S}=Be(),[E,R]=g.useState(!1),[A,O]=g.useState(null),[L,X]=g.useState([]),M=g.useCallback((K,H)=>{const J=H?qn([H]):null;X(K),O(J!=null&&J.length?J[0]:null),R(!0)},[]),q=e?8:16,U=(S.page-1)*w,Z=ot.helpers.createGridPosAndVideo(t,[],e?2:4,S.page);return r.jsxs(r.Fragment,{children:[r.jsxs(ot.Root,{children:[Array.isArray(t)&&t.map((K,H)=>{var se,ce;const J=P(K.node.cluster.highlights);return r.jsx(ot.Card,{gap:q,isMobile:e??!1,item:K.node,order:U+(((se=Z[H])==null?void 0:se.position)??0),tag:J,index:H,setSkuSelected:M,showVideo:(ce=Z[H])==null?void 0:ce.canPlayVideo,CONSTANTS:{BUY_BUTTON_LABELS:n,MAIN_IMAGE:o,PLP_GRID_SCROLL_BACK:c,PLP_INFINITE_SCROLL:l,PLP_PRODUCT_SIMILAR_DELAY:u,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:m,PLP_SIZE_ORDER:f,PRODUCT_CARD_IMAGE_ASPECT_RATIO:p,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}},K.node.sku)}),t.length>0&&r.jsx(wd,{gap:q,isMobile:e??!1})]}),r.jsx(Hn,{open:E,sku:A,skus:L,setSku:O,setVisible:R,ICONS:s,NEWSLETTER_CONFIGS:a,NOTIFY_INFO:i,PRODUCT_CARD_TEXTS:h,Z_INDEX_WAR:j})]})};io.displayName="PDC.Products";const nt={Empty:Ys,Filters:ld,Grid:ud,InfiniteScroller:bd,Spinner:Kn,Navigation:jd,Notification:Hn,Pagination:ao,Products:io},Pd=({className:e,...t})=>{const{searchParams:n,ITEMS_DEFAULT_SORT:s,ITEMS_PER_SECTION:o,ITEMS_PER_PAGE:a,PLP_INFINITE_SCROLL:i,SEARCH_PAGE_ITEM_THRESHOLD:c,VARIANT_PAGINATION:l}=t;return r.jsx(mf,{...t,children:r.jsxs("div",{className:d.helpers.classNameConcat(Xe.pdc,e),children:[r.jsxs(Mi,{forceUpdate:!0,children:[r.jsx(nt.Navigation,{}),r.jsx(nt.Filters,{})]}),i===!0?r.jsx(nt.Grid,{infinite:!0}):r.jsxs(Ds,{forceUpdate:!0,query:n.get("query")??void 0,children:[r.jsx(nt.Grid,{}),r.jsx(nt.Pagination,{searchParams:n,ITEMS_DEFAULT_SORT:s,ITEMS_PER_SECTION:o,ITEMS_PER_PAGE:a,SEARCH_PAGE_ITEM_THRESHOLD:c,VARIANT_PAGINATION:l})]})]})})};Pd.displayName="Templates.PDC";const Ed=g.createContext({}),iy=({children:e,...t})=>r.jsx(Ed.Provider,{value:t,children:e}),nr=()=>{const e=g.useContext(Ed);if(e===void 0)throw new Error("useSearchConstants must be used within a SearchConstantsProvider");return e},cy="_grid_e75z7_21",ly="_navigation_e75z7_44",uy="_spinner_e75z7_70",dy="_sort_e75z7_76",pt={"rearch-result--empty":"_rearch-result--empty_e75z7_1",grid:cy,"grid-header":"_grid-header_e75z7_37",navigation:ly,"result-disclaimer":"_result-disclaimer_e75z7_51",spinner:uy,sort:dy,"search-result":"_search-result_e75z7_91"},Nd=({term:e})=>{const{router:t}=le(),{SEARCH_RESULT:n,ICONS:s}=nr(),o=()=>{t.push(n.EMPTY.ALL_TERMS)};return r.jsxs("div",{className:pt["rearch-result--empty"],children:[r.jsxs(d.TextStructure.DivWrapper,{children:[r.jsx("div",{className:F.responsive["responsive-desktop-flex"],children:r.jsx("h2",{className:"typography-style-heading-sm",children:n.EMPTY.NOT_FOUND})}),r.jsx("div",{className:F.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:()=>o(),variant:"tertiary",size:"medium",adornment:{end:r.jsx(d.Icon,{name:s.arrow_right,size:"medium"})},children:n.EMPTY.ALL_TERMS_LABEL})]})};Nd.displayName="RearchResult.Empty";const my=e=>r.jsxs(r.Fragment,{children:[r.jsx("div",{className:F.responsive["responsive-desktop-flex"],children:r.jsx("h2",{className:"typography-style-heading-sm",children:e.SEARCH.SEARCHING})}),r.jsx("div",{className:F.responsive["responsive-mobile-flex"],children:r.jsx("h2",{className:"typography-style-body-md",children:e.SEARCH.SEARCHING})}),r.jsx(d.Spinner,{className:pt.spinner})]}),fy=(e,t,n)=>r.jsxs(r.Fragment,{children:[r.jsx("div",{className:F.responsive["responsive-desktop-flex"],children:r.jsx("h2",{className:"typography-style-heading-sm",children:t.SEARCH.SEARCHED})}),r.jsx("div",{className:F.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}"`]})]}),Id=({isLoading:e,quantity:t,term:n})=>{const{SEARCH_RESULT:s}=nr();return r.jsx(d.TextStructure.DivWrapper,{children:e?my(s):fy(t,s,n)})};Id.displayName="Search.Loading";const py=({term:e})=>{const[t,n]=g.useState(!1),{router:s}=le(),{searchParams:o}=Be(),{ITEMS_DEFAULT_SORT:a,ITEMS_PER_PAGE:i,ICONS:c}=nr(),l=u=>{F.navigateToSearchPage(s,e,i,1,u??a)};return r.jsx("div",{className:pt.sort,children:r.jsx(Zn,{handleSelectValue:u=>l(u??"release_desc"),sortListOpen:t,setSortListOpen:n,searchParams:o,ICONS:c})})},hy=({query:e})=>{const{isLoading:t,products:n,pagination:s}=sn();return r.jsxs("div",{className:pt["grid-header"],children:[r.jsxs("div",{className:pt.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:pt["result-disclaimer"],children:r.jsx(Id,{term:e,isLoading:t,quantity:s.count})}):null]})},Rd=({isMobile:e=!1,query:t})=>{const{isLoading:n,products:s,pagination:o}=sn(),{searchParams:a}=Be(),i=nr(),{sendDataLayerEvent:c}=ae(),l=g.useRef({query:t,sended:!1}),u=g.useMemo(()=>!n&&s.length>0&&o.count>0,[n,s.length,o.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:(s==null?void 0:s.length)>0}}}),l.current.sended=!0)}},[t,s,n,c]),r.jsxs("div",{className:pt.grid,children:[u?r.jsx(hy,{query:t}):r.jsx(r.Fragment,{}),!n&&(s!=null&&s.length)?r.jsx(io,{isMobile:e??!1,items:s,...i}):r.jsx(r.Fragment,{}),(s==null?void 0:s.length)===0&&!n?r.jsx(Nd,{term:t}):null,u&&r.jsx(ao,{searchParams:a,...i})]})};Rd.displayName="SearchResultContent";const _y=({className:e})=>{const{state:t}=Be(),{isMobile:n}=ne();return r.jsx(Ds,{forceUpdate:!1,query:t.term??"",children:r.jsx("div",{className:d.helpers.classNameConcat(pt["search-result"],e),children:r.jsx(Rd,{currentPage:t.page,isMobile:n??!1,query:t.term??""})})})},Td=({className:e,searchParams:t,CONSTANTS:n})=>{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 r.jsx(iy,{...n,children:r.jsx(Ms,{sort:c,state:{sort:c,base:"",facets:[],term:o,page:i,count:a},count:a,searchParams:s,ITEMS_PER_PAGE:n.ITEMS_PER_PAGE,children:r.jsx(_y,{className:e})})})};Td.displayName="Search";const gy=({page:e,data:t})=>{const{pathname:n}=le(),s=g.useRef(null),{sendDataLayerEvent:o,currentLocalRef:a,itemListRef:i,promotionEventRef:c}=ae();return g.useEffect(()=>{const l=Xi("login_event")||"{}",u=JSON.parse(l);if(u.name||u.method){const m=new Date(0);o({functionKey:"readyEvents",data:{event:u.name,readyData:{method:u.method}}}),Bs("login_event","",{expires:m})}},[]),g.useEffect(()=>{if(s.current===n)return;s.current=n;let l={};switch(e){case"PDP":{const m=t,f={};if(!m){l={page_category:"pdp"};break}m.items.forEach(({itemId:p,sellers:h})=>f[p]=h[0].commertialOffer.AvailableQuantity),l={page_category:"pdp",seller_ids:m.items.map(({sellers:p})=>p[0].sellerId).join(),skuStocks:f,product_reference_id:m.productReference};break}case"PDC":{const{page_category:m,page_departament:f,id:p,name:h}=La(),_=h,y=p;l={page_category:"lista_produtos",...f&&{page_departament:f}},i.current={item_list_name:n==="/search"?"busca":_??void 0,item_list_id:n==="/search"?void 0:y??void 0},f&&o({functionKey:"readyEvents",data:{event:"view_category",readyData:{page_category:m,page_departament:f}}});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})},[n]),null};var is={exports:{}},En={exports:{}},ha;function yy(){return ha||(ha=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function n(l,u){for(var m in u)Object.defineProperty(l,m,{enumerable:!0,get:u[m]})}n(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:m}=l;const f=document.createElement(u);for(const _ in m){if(!m.hasOwnProperty(_)||_==="children"||_==="dangerouslySetInnerHTML"||m[_]===void 0)continue;const y=s[_]||_.toLowerCase();u==="script"&&(y==="async"||y==="defer"||y==="noModule")?f[y]=!!m[_]:f.setAttribute(y,m[_])}const{children:p,dangerouslySetInnerHTML:h}=m;return h?f.innerHTML=h.__html||"":p&&(f.textContent=typeof p=="string"?p:Array.isArray(p)?p.join(""):""),f}function a(l,u){if(l instanceof HTMLElement&&u instanceof HTMLElement){const m=u.getAttribute("nonce");if(m&&!l.getAttribute("nonce")){const f=u.cloneNode(!0);return f.setAttribute("nonce",""),f.nonce=m,m===l.nonce&&l.isEqualNode(f)}}return l.isEqualNode(u)}let i;process.env.__NEXT_STRICT_NEXT_HEAD?i=(l,u)=>{const m=document.querySelector("head");if(!m)return;const f=m.querySelectorAll('meta[name="next-head"]')||[],p=[];if(l==="meta"){const y=m.querySelector("meta[charset]");y&&p.push(y)}for(let y=0;y<f.length;y++){var h;const v=f[y].nextSibling;(v==null||(h=v.tagName)==null?void 0:h.toLowerCase())===l&&p.push(v)}const _=u.map(o).filter(y=>{for(let x=0,v=p.length;x<v;x++){const C=p[x];if(a(C,y))return p.splice(x,1),!1}return!0});p.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")||m.appendChild(v),m.appendChild(y)})}:i=(l,u)=>{const m=document.getElementsByTagName("head")[0],f=m.querySelector("meta[name=next-head-count]");if(process.env.NODE_ENV!=="production"&&!f){console.error("Warning: next-head-count is missing. https://nextjs.org/docs/messages/next-head-count-missing");return}const p=Number(f.content),h=[];for(let x=0,v=f.previousElementSibling;x<p;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=>m.insertBefore(x,f)),f.content=(p-h.length+y.length).toString()};function c(){return{mountedInstances:new Set,updateHead:l=>{const u={};l.forEach(p=>{if(p.type==="link"&&p.props["data-optimized-fonts"]){if(document.querySelector('style[data-href="'+p.props["data-href"]+'"]'))return;p.props.href=p.props["data-href"],p.props["data-href"]=void 0}const h=u[p.type]||[];h.push(p),u[p.type]=h});const m=u.title?u.title[0]:null;let f="";if(m){const{children:p}=m.props;f=typeof p=="string"?p:Array.isArray(p)?p.join(""):""}f!==document.title&&(document.title=f),["meta","base","link","style","script"].forEach(p=>{i(p,u[p]||[])})}}}(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});function n(w,S){for(var E in S)Object.defineProperty(w,E,{enumerable:!0,get:S[E]})}n(t,{default:function(){return P},handleClientScriptLoad:function(){return x},initScriptLoader:function(){return j}});const s=Oe,o=St,a=r,i=s._(js),c=o._(g),l=Hu(),u=yy(),m=Uc(),f=new Map,p=new Set,h=["onLoad","onReady","dangerouslySetInnerHTML","children","onError","strategy","stylesheets"],_=w=>{if(i.default.preinit){w.forEach(S=>{i.default.preinit(S,{as:"style"})});return}if(typeof window<"u"){let S=document.head;w.forEach(E=>{let R=document.createElement("link");R.type="text/css",R.rel="stylesheet",R.href=E,S.appendChild(R)})}},y=w=>{const{src:S,id:E,onLoad:R=()=>{},onReady:A=null,dangerouslySetInnerHTML:O,children:L="",strategy:X="afterInteractive",onError:M,stylesheets:q}=w,U=E||S;if(U&&p.has(U))return;if(f.has(S)){p.add(U),f.get(S).then(R,M);return}const Z=()=>{A&&A(),p.add(U)},K=document.createElement("script"),H=new Promise((J,se)=>{K.addEventListener("load",function(ce){J(),R&&R.call(this,ce),Z()}),K.addEventListener("error",function(ce){se(ce)})}).catch(function(J){M&&M(J)});O?(K.innerHTML=O.__html||"",Z()):L?(K.textContent=typeof L=="string"?L:Array.isArray(L)?L.join(""):"",Z()):S&&(K.src=S,f.set(S,H));for(const[J,se]of Object.entries(w)){if(se===void 0||h.includes(J))continue;const ce=u.DOMAttributeNames[J]||J.toLowerCase();K.setAttribute(ce,se)}X==="worker"&&K.setAttribute("type","text/partytown"),K.setAttribute("data-nscript",X),q&&_(q),document.body.appendChild(K)};function x(w){const{strategy:S="afterInteractive"}=w;S==="lazyOnload"?window.addEventListener("load",()=>{(0,m.requestIdleCallback)(()=>y(w))}):y(w)}function v(w){document.readyState==="complete"?(0,m.requestIdleCallback)(()=>y(w)):window.addEventListener("load",()=>{(0,m.requestIdleCallback)(()=>y(w))})}function C(){[...document.querySelectorAll('[data-nscript="beforeInteractive"]'),...document.querySelectorAll('[data-nscript="beforePageRender"]')].forEach(S=>{const E=S.id||S.getAttribute("src");p.add(E)})}function j(w){w.forEach(x),C()}function b(w){const{id:S,src:E="",onLoad:R=()=>{},onReady:A=null,strategy:O="afterInteractive",onError:L,stylesheets:X,...M}=w,{updateScripts:q,scripts:U,getIsSsr:Z,appDir:K,nonce:H}=(0,c.useContext)(l.HeadManagerContext),J=(0,c.useRef)(!1);(0,c.useEffect)(()=>{const ce=S||E;J.current||(A&&ce&&p.has(ce)&&A(),J.current=!0)},[A,S,E]);const se=(0,c.useRef)(!1);if((0,c.useEffect)(()=>{se.current||(O==="afterInteractive"?y(w):O==="lazyOnload"&&v(w),se.current=!0)},[w,O]),(O==="beforeInteractive"||O==="worker")&&(q?(U[O]=(U[O]||[]).concat([{id:S,src:E,onLoad:R,onReady:A,onError:L,...M}]),q(U)):Z&&Z()?p.add(S||E):Z&&!Z()&&y(w)),K){if(X&&X.forEach(ce=>{i.default.preinit(ce,{as:"style"})}),O==="beforeInteractive")return E?(i.default.preload(E,M.integrity?{as:"script",integrity:M.integrity,nonce:H,crossOrigin:M.crossOrigin}:{as:"script",nonce:H,crossOrigin:M.crossOrigin}),(0,a.jsx)("script",{nonce:H,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([E,{...M,id:S}])+")"}})):(M.dangerouslySetInnerHTML&&(M.children=M.dangerouslySetInnerHTML.__html,delete M.dangerouslySetInnerHTML),(0,a.jsx)("script",{nonce:H,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([0,{...M,id:S}])+")"}}));O==="afterInteractive"&&E&&i.default.preload(E,M.integrity?{as:"script",integrity:M.integrity,nonce:H,crossOrigin:M.crossOrigin}:{as:"script",nonce:H,crossOrigin:M.crossOrigin})}return null}Object.defineProperty(b,"__nextScript",{value:!0});const P=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)})(is,is.exports);var xy=is.exports,vy=xy;const co=F.getDefaultExportFromCjs(vy),by=({children:e,ONE_TRUST:t})=>r.jsxs(r.Fragment,{children:[r.jsx(co,{src:"https://cdn.cookielaw.org/scripttemplates/otSDKStub.js",defer:!0,strategy:"afterInteractive","data-domain-script":t.siteId,type:"text/javascript"}),e]}),jy=zl(()=>Promise.resolve(by),{ssr:!1}),Cy="_lgpd_vffd3_82",Sy="_success_vffd3_248",wy="_error_vffd3_312",xe={"newsletter-root":"_newsletter-root_vffd3_1","has-border-top":"_has-border-top_vffd3_9","has-border-bottom":"_has-border-bottom_vffd3_12","newsletter-container":"_newsletter-container_vffd3_20","content-text":"_content-text_vffd3_35","form-wrapper":"_form-wrapper_vffd3_39","newsletter-container-banner":"_newsletter-container-banner_vffd3_64",lgpd:Cy,"textfield-structure-modifier":"_textfield-structure-modifier_vffd3_190","input-wrapper-modifier":"_input-wrapper-modifier_vffd3_196","submit-btn":"_submit-btn_vffd3_200","loading-spinner":"_loading-spinner_vffd3_211","terms-and-conditions-checkbox":"_terms-and-conditions-checkbox_vffd3_217","terms-and-conditions-unchecked":"_terms-and-conditions-unchecked_vffd3_230","terms-and-conditions-checked":"_terms-and-conditions-checked_vffd3_244",success:Sy,"text-structure-modifier":"_text-structure-modifier_vffd3_257","success-title":"_success-title_vffd3_297","close-button":"_close-button_vffd3_302",error:wy,"newsletter-wrapper":"_newsletter-wrapper_vffd3_332","banner-container":"_banner-container_vffd3_345","newsletter-provider-wrapper":"_newsletter-provider-wrapper_vffd3_358","newsletter-root-banner":"_newsletter-root-banner_vffd3_371","banner-background":"_banner-background_vffd3_392","newsletter-provider-wrapper-background":"_newsletter-provider-wrapper-background_vffd3_401"},Ad=({invalid_message:e,master_data_field:t,placeholder:n,required:s=!1,CONSTANTS:o})=>{const{isMobile:a}=ne(),{inputsStatus:i,setInputsStatus:c,setFormStatus:l,variant:u}=Hs();return r.jsx(d.TextField.Structure,{className:`${xe["textfield-structure-modifier"]} ${u}`,input:r.jsx(d.TextField.Input,{mode:"simple",label:n,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(m=>({...m,[t]:"none"})),l("idle"))},required:s}),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??o.NEWSLETTER_CONFIGS.messages.invalid_generic:o.NEWSLETTER_CONFIGS.messages.required_field,feedback:"error"})}):null})};Ad.displayName="Newsletter.Input";const kd=({formStatus:e,fields:t,CONSTANTS:n})=>r.jsxs(r.Fragment,{children:[Array.isArray(t)&&t.map((s,o)=>r.jsx(Ad,{invalid_message:s.invalid_message,master_data_field:s.master_data_field,placeholder:s.placeholder,required:s.required,type:s.type,CONSTANTS:n},`nt-field-${s.master_data_field}-${o}`)),e==="error"&&r.jsx("div",{className:xe.error,children:r.jsx("p",{children:n.NEWSLETTER_CONFIGS.form.status.error})})]});kd.displayName="Newsletter.FormFields";const Od=({formStatus:e,CONSTANTS:t,...n})=>{const{isMobile:s}=ne();return r.jsxs(d.Button,{...n,className:xe["submit-btn"],disabled:e==="success",size:s?"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"})]})};Od.displayName="Newsletter.SubmitButton";const Ld=({checkboxRef:e,formStatus:t,setFormStatus:n,CONSTANTS:s})=>{const o=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: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"&&r.jsx("div",{className:xe["terms-and-conditions-unchecked"],children:r.jsx(d.TextStructure.Root,{adornment:{start:r.jsx(d.Icon,{name:s.ICONS.alert_circle,size:"small"})},children:r.jsx(d.TextStructure.DivWrapper,{children:r.jsx("p",{children:s.NEWSLETTER_CONFIGS.messages.terms_and_conditions_not_accepted})})})})]})};Ld.displayName="Newsletter.Terms";const Md=({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})]})})});Md.displayName="Newsletter.Success";const Dd=({formPayloadOptionals:e,masterDataEntity:t,banner:n,termsDescription:s,lgpdLinkLable:o,lgpdLink:a,variant:i,CONSTANTS:c})=>{const{checkboxRef:l,fields:u,formStatus:m,hasTermsAndConditions:f,handleClickToSubmit:p,handleSubmit:h,setFormStatus:_}=Hs();return r.jsx(r.Fragment,{children:m==="success"?r.jsx(Md,{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(kd,{formStatus:m,fields:u,CONSTANTS:c}),f&&r.jsx(Ld,{checkboxRef:l,formStatus:m,setFormStatus:_,CONSTANTS:c}),r.jsx(Od,{formStatus:m,type:"submit",variant:"primary",onClick:p,CONSTANTS:c})]}),(n||i==="vertical")&&r.jsxs("div",{className:xe.lgpd,children:[s&&r.jsx("p",{children:s}),o&&r.jsx(Le,{href:a,children:o})]})]})})};Dd.displayName="Newsletter.Form";const Py=["horizontal","vertical"],lo=({className:e,description:t,formPayloadOptionals:n,fields:s,masterDataEntity:o,masterDataEmailField:a,masterDataNameField:i,banner:c,altBanner:l,bannerBackground:u,termsDescription:m,lgpdLinkLable:f,lgpdLink:p,title:h,variant:_,borderTop:y,borderBottom:x,CONSTANTS:v,...C})=>{if(!a||!i)return null;const j=d.helpers.ValidateProp({fieldTypes:Py,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(Ne.Image,{src:c,alt:l,width:"1920",height:"500"})})}),r.jsx("div",{className:c?xe["newsletter-provider-wrapper"+(u?"-background":"")]:"",children:r.jsx(hc,{fields:s,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:m}),f&&r.jsx(Le,{target:"_blank",href:p,children:f})]})]}),r.jsx(Dd,{formPayloadOptionals:n,masterDataEntity:o,CONSTANTS:v,banner:c,lgpdLink:p,lgpdLinkLable:f,termsDescription:m,variant:j})]})})})})]})};lo.displayName="Newsletter";const Fd=({children:e,...t})=>r.jsx("div",{...t,children:e});Fd.displayName="CallToAction";const Ey="_wrapper_aejhu_1",Ny="_body_aejhu_8",zn={wrapper:Ey,body:Ny,"wrapper-body":"_wrapper-body_aejhu_16","accordion-modifier":"_accordion-modifier_aejhu_32"},Iy=({children:e,className:t,...n})=>r.jsx("div",{...n,className:d.helpers.classNameConcat(zn.wrapper,t),children:e}),Ry=({data:e,ICONS:t})=>{const[n,s]=g.useState(null),o=i=>{s(c=>c===i?null:i)},{router:a}=le();return r.jsx("div",{className:d.helpers.classNameConcat(zn.body),children:Array.isArray(e)&&(e==null?void 0:e.map((i,c)=>{var f;const l=n===i.id,u=i.buttonHref&&i.buttonHref!=="#",m=i.buttonHref&&i.type==="button"&&u?{onClick:()=>{var p;if((p=i.buttonHref)!=null&&p.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,...m,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(zn["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:()=>o(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:(f=i.buttonIcon)!=null&&f.length?{end:r.jsx(d.Icon,{name:t[i.buttonIcon]??i.buttonIcon})}:void 0,children:i.buttonLabel}):r.jsx(r.Fragment,{})]})})})]})},i.id)}))})},Ty=({className:e,data:t,ICONS:n,...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?r.jsxs(Iy,{...s,className:e,children:[r.jsx("div",{className:zn["wrapper-body"],hidden:!o,children:o&&r.jsx(Ry,{data:i.content,ICONS:n})}),r.jsx(Fd,{children:r.jsx("div",{onClick:l,children:o?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,{})},Ay="_formContainer_zwlly_1",ky="_formFieldGroup_zwlly_6",Oy="_formFieldGroupName_zwlly_10",Ly="_formFieldWrapper_zwlly_20",My="_formFieldInput_zwlly_30",Dy="_success_zwlly_73",Fy="_button_zwlly_110",zy="_error_zwlly_114",at={formContainer:Ay,formFieldGroup:ky,formFieldGroupName:Oy,formFieldWrapper:Ly,formFieldInput:My,success:Dy,"text-structure-modifier":"_text-structure-modifier_zwlly_85",button:Fy,error:zy},By=({group:e,children:t,className:n})=>r.jsx(r.Fragment,{children:r.jsxs("div",{className:d.helpers.classNameConcat(at.formFieldGroup,n),children:[r.jsx("h1",{className:at.formFieldGroupName,children:e.groupLabel}),t]},e.groupLabel)});async function Uy(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 qy=async e=>await fetch("/api/dito-ingest",{method:"POST",body:JSON.stringify(e)}).then(n=>n.json()),zd=g.createContext({});function Bd({children:e,groups:t,masterDataEntity:n,postFn:s,actionName:o="",originName:a="",POPUP_SUBMITTED_STORAGE:i}){const[c,l]=g.useState(!1),[u,m]=g.useState({}),[f,p]=g.useState([]),[h,_]=g.useState("idle"),[y,x]=g.useState(""),v=({target:{name:j,value:b}})=>{m({...u,[j]:b})},C=j=>{j.preventDefault(),s({body:{masterDataEntity:n,payload:u}}).then(async({Message:b})=>{if(b){const w=b.match(/'(.*?[^\\])'/g)||[];var P="-";for(const S of w){const E=S.substring(1,S.length-1),A=t.flatMap(O=>O.fields).find(({name:O})=>O===E);x(E),A&&(P=A.name)}return _("error"),p([P])}if(u.email){const w=await Uy(u.email||""),S=new Date().toISOString();qy([{user_id:w,timestamp:S,type:"IDENTIFY",traits:{id:w,created_at:S,name:u.name,email:u.email,phone:u==null?void 0:u.phone}},{action:o,timestamp:S,type:"TRACK",user_id:w,context:{user_agent:navigator.userAgent},properties:{custom_data:{email:u.email,nome:u.name,origem:a,...u}}}])}return window.localStorage.setItem(i,"true"),m({}),l(!0),_("success"),p([])})};return r.jsx(zd.Provider,{value:{formErrors:f,handleInputChange:v,submitForm:C,formData:u,status:h,fieldMessage:y,success:c,setSuccess:l},children:e})}function rr(){return g.useContext(zd)}const Hy=({fields:e,className:t})=>{const{formData:n,handleInputChange:s,formErrors:o}=rr();return r.jsx("div",{className:d.helpers.classNameConcat(at.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:s,required:c,feedback:o.includes(i)?"error":"none",className:at.formFieldInput,"data-inputsize":l},i))})},$y=({FORM_CONFIGS:e,ICONS:t})=>{const{router:n}=le();return r.jsxs("div",{className:at.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:at["text-structure-modifier"],children:r.jsx("p",{children:e.successMessage})})}),r.jsx(d.Button,{size:"large",onClick:()=>n.push("/"),className:at.button,children:e.returnButton})]})},Vy=({FORM_CONFIGS:e,ICONS:t})=>{const{fieldMessage:n}=rr();return r.jsx("div",{className:at.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:at["text-structure-modifier"],children:r.jsxs("p",{children:[e.errorMessage,n]})})})})},Wy=({children:e,className:t,ICONS:n,FORM_CONFIGS:s})=>{const{submitForm:o,status:a}=rr();return r.jsx("form",{onSubmit:o,className:d.helpers.classNameConcat(at.formContainer,t),children:a==="success"?r.jsx($y,{ICONS:n,FORM_CONFIGS:s}):r.jsxs(r.Fragment,{children:[e,a==="error"&&r.jsx(Vy,{ICONS:n,FORM_CONFIGS:s})]})})},Gy=e=>{const{children:t,className:n}=e;return r.jsx(Bd,{...e,children:r.jsx(Wy,{ICONS:e.ICONS,FORM_CONFIGS:e.FORM_CONFIGS,className:n,children:t})})},Ft={Root:Gy,FieldGroup:By,FieldWrapper:Hy},Ky="_button_1e35m_39",yt={"banner-container":"_banner-container_1e35m_1","banner-background":"_banner-background_1e35m_6","form-root":"_form-root_1e35m_15",button:Ky,"form-fied-wrapper":"_form-fied-wrapper_1e35m_52"};function Xy({content:e,sections:t,FORM_CONFIGS:n,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 r.jsx("div",{children:r.jsxs(d.Banner.Container,{className:yt["banner-container"],children:[r.jsx(d.Banner.ImageWrapper,{children:r.jsx(Ne.Image,{className:yt["banner-background"],src:i?e.bannerMobile:e.bannerDesk,alt:e.altBanner,width:"1920",height:"500"})}),r.jsxs(Ft.Root,{postFn:o,ICONS:s,FORM_CONFIGS:n,groups:c.groups||[],masterDataEntity:c.masterDataEntity||"",className:yt["form-root"],POPUP_SUBMITTED_STORAGE:a,children:[c.groups.map(u=>r.jsx(Ft.FieldGroup,{group:u,children:r.jsx(Ft.FieldWrapper,{fields:u.fields,className:yt["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:yt["button-wrapper"],children:r.jsx("div",{className:yt["button-frame"],children:r.jsx(d.Button,{size:"large",type:"submit",className:yt.button,children:e.buttonLabel})})})]})]})]})})}const Yy="_content_1jj9i_36",Qy="_trends_1jj9i_47",Zy="_modal_1jj9i_1",He={"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:Yy,trends:Qy,"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:Zy,"search-modal__modal":"_search-modal__modal_1jj9i_100"},Ud=g.createContext({}),Jy=({children:e,term:t})=>{const[n,s]=g.useState([]),[o,a]=g.useState(!1);return g.useEffect(()=>{if(!t){s([]);return}(async()=>{a(!0);try{const c=await fetch("/api/search/suggestedTerms",{method:"POST",body:JSON.stringify({query:t,locale:"pt-BR"})}),{data:l}=await c.json();s((l==null?void 0:l.searches)||[])}catch(c){console.error("Erro ao buscar sugestões:",c)}})()},[t]),r.jsx(Ud.Provider,{value:g.useMemo(()=>({suggestedTerms:n,loading:o,setLoading:a}),[n,o]),children:e})},ex=({children:e,...t})=>r.jsx(Jy,{...t,children:e}),tx=()=>{const e=g.useContext(Ud);if(!e)throw new Error("useSuggestedTermsContext must be used within a SuggestedTermsProvider");return e},zr=(e,t,n=24,s=1,o="release:desc")=>{const a=`/search?query=${t??""}&count=${n}&page=${s}${o?`&sort=${o.replace("_",":")}`:""}`;e.push(a)},qd=({placeholder:e,noResultsTitle:t,noResultsLabel:n,noResultsTermText:s,handleClose:o,setTerm:a,ICONS:i,ITEMS_DEFAULT_SORT:c,ITEMS_PER_PAGE:l,SEARCH_MODAL:u})=>{const[m,f]=g.useState(""),{suggestedTerms:p,loading:h,setLoading:_}=tx(),{router:y}=le(),x=g.useRef(null),v=b=>{f(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"&&(m==null?void 0:m.length)>2&&(o(),zr(y,m,l,1,c))},j=b=>{o(),zr(y,b,l,1,c)};return g.useEffect(()=>{if(clearTimeout(x.current),m.length<=2||p.length>0){_(!1);return}return _(!0),x.current=setTimeout(()=>{zr(y,m,l,1,c),_(!1),o()},2e3),()=>{clearTimeout(x.current)}},[m,p]),r.jsx(d.DropDown.AutoComplete,{className:He["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(m)},disabled:!(m.length>2)})},children:(p==null?void 0:p.length)>0&&r.jsx(r.Fragment,{children:(p==null?void 0:p.length)>0&&(m==null?void 0:m.length)>2?r.jsx(d.DropDown.AutoCompleteList,{className:He["modal-auto-complete__dropdown"],seeAll:r.jsx("span",{onClick:()=>j(m),children:s+m}),children:p.map((b,P)=>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:w=>{w.preventDefault(),o()},children:b.term})},`key-${b.term}-${P}`))}):!h&&(m==null?void 0:m.length)>3&&(p==null?void 0:p.length)===0&&r.jsxs(d.DropDown.AutoCompleteList,{className:He["modal-search-empty"],children:[r.jsx(d.DropDown.NotResults,{description:n,title:t}),r.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:r.jsx(d.Icon,{name:i.arrow_right,size:"medium"})},children:u.EMPTY.ALL_TERMS_LABEL})]})})})};qd.displayName="SearchModal.AutoComplete";function nx({title:e,ICONS:t}){const{isMobile:n}=ne();return r.jsx(d.Modal.Header,{navigation:"top",className:He["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:He["search-modal__title"],title:e}),r.jsx(d.Button,{className:He["modal-header__close-button"],"data-close":!0,iconNameStart:t.close,size:"small",variant:"tertiary"})]})})}const Hd=g.createContext({searches:[],isLoading:!1,error:null});let Br=null;const rx=({children:e})=>{const[t,n]=g.useState([]),[s,o]=g.useState(!0),[a,i]=g.useState(null);return g.useEffect(()=>{(async()=>{try{if(o(!0),Br){n(Br),o(!1);return}const l=await fetch("/api/search/topSearch");if(!l.ok)throw new Error(`Erro ao buscar os dados: ${l.status}`);const m=(await l.json()).data.searches||[];Br=m,n(m)}catch(l){i(l instanceof Error?l.message:"Erro desconhecido")}finally{o(!1)}})()},[]),r.jsx(Hd.Provider,{value:g.useMemo(()=>({searches:t,isLoading:s,error:a}),[t,s,a]),children:e})},sx=()=>{const e=g.useContext(Hd);if(!e)throw new Error("useTopSearches must be used within a TopSearchesProvider");return e},ox=({title:e,allTermsLabel:t,allTermsUrl:n,qtyTrends:s,handleClose:o,ICONS:a,ITEMS_PER_PAGE:i})=>{const{searches:c,isLoading:l}=sx(),{router:u}=le(),m=Array.isArray(c)?c:[];return r.jsx(r.Fragment,{children:!l&&m.length>0?r.jsx(d.ComponentList.Structure,{className:He.trends,title:e,children:r.jsxs("div",{className:He["trends-content"],children:[r.jsx(d.ComponentList.List,{columns:1,children:m.slice(0,s).map((f,p)=>r.jsx(d.ComponentList.ListItem,{className:He["trends-item"],children:r.jsx(Le,{href:`/search?query=${f.term}&count=${i}&page=1`,size:"x-small",adornments:{end:r.jsx(d.Icon,{name:a.arrow_right,size:"x-small"})},disableUnderline:!0,title:f.term,onClick:()=>o(),children:f.term})},`list-item-${p}`))}),r.jsx(d.Button,{className:"all-terms",variant:"tertiary",size:"x-small",underline:!1,onClick:()=>{o(),u.push(n)},adornment:{end:r.jsx(d.Icon,{name:a.arrow_right,size:"x-small"})},children:t})]})}):null})};function ax({SectionZone:e}){var s;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:He.content,children:t!==null&&r.jsx(e,{data:((s=t[0])==null?void 0:s.sections)??[],componentConfigs:{"Product Carousel":{searchModal:!0}}})})}const $d=({className:e,trends:t,CONSTANTS:n,SectionZone:s})=>{const[o,a]=g.useState(""),{isMobile:i}=ne(),c=hi(),{setValue:l}=Un(),{SEARCH_MODAL:u,ICONS:m,ITEMS_PER_PAGE:f,ITEMS_DEFAULT_SORT:p}=n;return r.jsxs(d.Modal.Root,{isMobile:i??!1,variant:i?"sideBottom":"sideRight",isOpen:c,setIsOpen:l,className:`${He.modal} ${He["search-modal__modal"]} ${e??""}`,children:[r.jsx(nx,{title:u.HEADER.TITLE,ICONS:m}),r.jsxs(d.Modal.Body,{className:He["modal-content-body"],children:[r.jsx(ex,{term:o,children:r.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:m,ITEMS_DEFAULT_SORT:p,ITEMS_PER_PAGE:f,SEARCH_MODAL:u})}),t?r.jsx(rx,{children:r.jsx(ox,{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:m,ITEMS_PER_PAGE:f})}):null,r.jsx(ax,{SectionZone:s})]})]})};$d.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"},Vd=({LPLOJAS_TEMPLATE_RETURN_BUTTON:e,ICONS:t,showVendor:n})=>{const{selectedCity:s,selectedStore:o}=Vn();return r.jsx(d.Card,{padding:"small",shadow:!0,className:Ke["store--wrapper"],children:o?r.jsxs(r.Fragment,{children:[r.jsx(st.ReturnButton,{ICONS:t,children:e}),r.jsx(st.Details,{ICONS:t,showVendor:n,store:s==null?void 0:s.find(a=>a.nome===o)})]}):r.jsx(st.Select,{ICONS:t})})};Vd.displayName="LPStores.Content";const Kt=({title:e,text:t,type:n,...s})=>r.jsx(d.TextStructure.DivWrapper,{...s,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})]})});Kt.displayName="LPStores.Details";const Wd=({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((s,o)=>r.jsx("p",{className:"typography-style-body-sm",children:s.trim()},o))})})})]})};Wd.displayName="LPStores.Details";const Gd=({store:e,showVendor:t,ICONS:n})=>r.jsxs("div",{className:Ke["store--details"],children:[r.jsx(Kt,{alignItems:"left",title:String(e==null?void 0:e.nome),type:"title"}),r.jsx(Kt,{title:"Endereço",text:String(e.endereco)}),e.telefone&&r.jsx(Kt,{title:"Telefone",text:String(e.telefone)}),e.horario&&r.jsx(Kt,{title:"Horário de funcionamento",text:String(e.horario)}),t&&r.jsx(Wd,{ICONS:n,vendor:String(e.vendedoras)})]});Gd.displayName="LPStores.Details";const Kd=({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:s,selectText:o,...a})=>r.jsx(d.DropDown.DefaultDropDown,{...a,"aria-placeholder":o,adornmentListClosed:{end:t},adornmentListOpened:{end:n},mode:"simple",placeholder:o,sizeVariant:"large",children:r.jsx(d.DropDown.DefaultDropDownList,{placeholder:o,supportText:o,maxHeight:400,children:Array.isArray(s)&&(s==null?void 0:s.map(i=>r.jsx(d.DropDown.ListItem,{value:i,children:i},i.replace(/\s/g,""))))})});Kd.displayName="LPStores.DropDown";const Xd=({children:e,ICONS:t})=>{const{clearSelectedStore:n}=Vn(),s=()=>{typeof n=="function"&&n()};return r.jsxs("button",{"aria-label":String(e),className:Ke["store--return-button"],onClick:s,onKeyDown:s,children:[r.jsx(d.Icon,{name:t.arrow_left,size:"small"}),e]})};Xd.displayName="LPStores.ReturnButton";const Yd=({children:e,data:t})=>r.jsx(gc,{data:t,children:e});Yd.displayName="LPStores.Root";const Qd=({children:e,imgAlt:t,imgSrcDesk:n,imgSrcMob:s})=>{const{isMobile:o}=ne();return r.jsxs("section",{className:Ke["store--section"],children:[r.jsx(Jt,{src:o?s:n,alt:t,fill:!0,className:Ke["store--section--img"]}),e]})};Qd.displayName="LPStores.Section";const Zd=({ICONS:e})=>{const{data:t,handleSelectCity:n,selectedCity:s,handleSelectStore:o}=Vn(),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:s==null?void 0:s[0].cidade,ICONS:e}),r.jsx(st.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)]})};Zd.displayName="LPStores.Select";const Jd=({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})})});Jd.displayName="LPStores.Title";const st={Content:Vd,Details:Gd,DropDown:Kd,ReturnButton:Xd,Root:Yd,Section:Qd,Select:Zd,Title:Jd};var em={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 ix(e,t,n){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 cx(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 tm=[["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 lx(e,t,n){cx({id:e,custom_data:t},"#00c851",n)}var ux={DataLayer:ix,Dito:lx};async function dx(e,t){const n=em[e];n&&await Promise.allSettled(n.destinations.map(async s=>{try{await ux[s](e.toLowerCase(),t,s)}catch(o){console.error(`[DT] Failed to send ${e} to ${s}:`,o)}}))}async function mx(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 fx(e){try{const{pathname:t}=new URL(e,window.location.origin);return/\/p\/?$/.test(t)}catch{return!1}}function nm(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=nm(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 s=await n.json();return(s==null?void 0:s[0])||null}catch(n){return console.error("Erro ao buscar dados do produto:",n),null}}function rm(e,t){var n,s,o,a;const i=(s=(n=e==null?void 0:e.shippingData)==null?void 0:n.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 sm(e){var t,n;const s=await mx(e.productId||e.productID||e.item_group_id);return s.length&&(n=(t=s[0].items.find(o=>o.name===e.skuName))==null?void 0:t.itemId)!=null?n:null}function sr(e){return e.discount||e.discount===0?e.discount:parseFloat(Math.max(e.listPrice-e.sellingPrice,0).toFixed(2))/100||0}function Pt(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 s=n();if(s!=null)return s}return null}function cn(e){const t=[()=>Object.values((e==null?void 0:e.productCategories)||{}).pop(),()=>Object.values((e==null?void 0:e.categories)||{}).pop(),()=>{var n,s,o,a,i;return(i=(a=(o=(s=(n=e==null?void 0:e.category)==null?void 0:n.split)==null?void 0:s.call(n,">"))==null?void 0:o[1])==null?void 0:a.trim)==null?void 0:i.call(a)},()=>e.item_category2];for(const n of t){const s=n();if(s!=null)return s}return null}function om(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 hx={farm:"farmrio","farm etc":"farmetc","farm rio":"farmrio"};function _a(e){if(!e)return null;const t=e.toLowerCase().trim();return hx[t]||null}function it(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"?_a(e):null;const s=n.map(_a).filter(a=>a!==null),o=[...new Set(s)].sort();return o.length>0?o.join("_"):null}function _x(e){var t;if(!e.orderForm&&!((t=e.orderForm.items)!=null&&t.length))return null;const n=e.orderForm.items;return it(n)}function gx(e){var t;const{item:n}=e;return it(((t=n==null?void 0:n.additionalInfo)==null?void 0:t.brandName)||n.brand||n.item_brand)}function yx(e,t){if(e!=null&&e.brand)return it(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 _x(e);case"ADD_TO_CART":case"REMOVE_FROM_CART":return gx(e);default:return null}}async function xx(e){var t;const n=((t=e.orderForm)==null?void 0:t.items)||[];return n.length?await Promise.all(n.map(async s=>{var o,a,i;return{item_id:s.productId,item_category2:cn(s),item_category4:om(s),item_shipping_tier:rm(e.orderForm,s),price:parseFloat((s.price/100).toFixed(2))||0,quantity:s.quantity||1,item_ref:s.refId||null,item_brand:it((o=s.additionalInfo)==null?void 0:o.brandName)||((a=s.additionalInfo)==null?void 0:a.brandName)||null,item_sku:await sm(s)||s.id||null,item_name:s.name||s.id||null,item_category:Pt(s)||null,item_variant:s.skuName.split(/[-/]/)[0].trim(),item_variant2:((i=s.skuName.split(/[-/]/).pop())==null?void 0:i.trim())||"",discount:sr(s)}})):[]}async function vx(e,t){var n,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:cn(a),item_category4:om(a),item_shipping_tier:t==="REMOVE_FROM_CART"?rm(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 sm(a)||null,item_name:a.name||a.item_name||null,item_category:Pt(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:sr(a),item_list_name:Pt(a)||null,item_url:a.item_url||null}]}async function bx(e){return((e==null?void 0:e.list)||[]).map(t=>{var n,s,o,a,i;return{price:((n=t==null?void 0:t.price)==null?void 0:n.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:it((o=t==null?void 0:t.brand)==null?void 0:o.name)||it(e.brand)||it(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:Pt(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:cn(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:sr(t)||null,item_list_name:(e==null?void 0:e.itemListName)||Pt(t)||null}})}async function jx(e){var t,n,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:it(o.brand.name)||it(e.brand)||null,item_name:o.productName||o.alternateName||null,item_category:Pt(o)||null,item_variant:((t=o==null?void 0:o.name)==null?void 0:t.split("-")[0].trim())||null,item_category2:cn(o)||((s=(n=o==null?void 0:o.category)==null?void 0:n.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:sr(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 Cx(e){var t;if(!fx(e==null?void 0:e.bannerUrl))return[];const s=await px(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:nm(e==null?void 0:e.bannerUrl),item_brand:it(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:Pt(s)||null,item_variant:((t=o==null?void 0:o.name)==null?void 0:t.split("-").pop().trim())||null,item_category2:cn(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 Sx(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 xx(e);case"ADD_TO_CART":case"ADD_TO_WISHLIST":case"REMOVE_FROM_CART":return vx(e,t);case"SELECT_ITEM":case"VIEW_ITEM_LIST":return bx(e);case"VIEW_ITEM":return jx(e);case"VIEW_PROMOTION":case"SELECT_PROMOTION":return Cx(e);default:return null}}function wx(e){var t,n,s;if(!e.orderForm)return null;const o=((t=e.orderForm.paymentData)==null?void 0:t.payments)||[],a=((n=e.orderForm.paymentData)==null?void 0:n.paymentSystems)||[];if(!o.length||!a.length)return null;const i=o.find(f=>f==null?void 0:f.paymentSystem)||o[0],c=String((i==null?void 0:i.paymentSystem)||"").trim();if(!c)return null;const l=a.find(f=>String(f.id)===c),u=((s=l==null?void 0:l.name)==null?void 0:s.toLowerCase())||"",m=tm.find(([f])=>u.includes(f));return m?m[1]:null}function Px(e){var t,n,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=((n=a[0])==null?void 0:n.payments)||[];if(!i.length)return null;const c=((o=(s=i[0])==null?void 0:s.paymentSystemName)==null?void 0:o.toLowerCase())||"",l=tm.find(([u])=>c.includes(u));return l?l[1]:null}function Ex(e,t){if(e!=null&&e.paymentType)return e.paymentType;switch(t){case"ORDER_REVIEWED":case"CUSTOM_ADD_PAYMENT_INFO":return wx(e);case"PURCHASE":case"CUSTOM_PURCHASE":return Px(e);default:return null}}var Nx={brand:yx,items:Sx,payment_type:Ex,user_info:async(e,t)=>{var n;const o=(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(!o)return{customer:{email:e.userEmail},address:null};try{const a=`${o}/_v/user-info`;return await(await fetch(a,{method:"POST",body:JSON.stringify({email:e.userEmail})})).json()}catch{return{customer:{email:e.userEmail},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,s,o,a;return e!=null&&e.currency?e.currency:e!=null&&e.bannerUrl?"BRL":e!=null&&e.item?((s=(n=e.item)==null?void 0:n.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 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,s;const a=(((n=e.orderForm)==null?void 0:n.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 n,s;return(((n=e.orderForm)==null?void 0:n.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 n;if(e.couponMessage)return e.couponMessage;const s=((n=e.orderForm)==null?void 0:n.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 n,s;return e.appliedCoupon||((s=(n=e==null?void 0:e.orderForm)==null?void 0:n.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 n;const s=e.orderForm;return s?(((n=s.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 s={};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;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 n,s,o;return((o=(s=(n=e==null?void 0:e.orderForm)==null?void 0:n.shippingData)==null?void 0:s.logisticsInfo)!=null?o:[]).reduce((i,c)=>{var l,u;const m=(l=c.slas)==null?void 0:l.find(f=>f.id===c.selectedSla);return i+((u=m==null?void 0:m.price)!=null?u:0)},0)},shipping_tier:(e,t)=>{var n,s,o,a;const c=((o=(s=(n=e==null?void 0:e.orderForm)==null?void 0:n.shippingData)==null?void 0:s.logisticsInfo)!=null?o:[]).find(p=>p.selectedSla);if(!c)return null;const l=(a=c.slas)==null?void 0:a.find(p=>p.id===c.selectedSla);if(!l)return null;const{deliveryChannel:u,name:m,pickupStoreInfo:f}=l;return u==="pickup-in-point"?`retirada em loja${f!=null&&f.friendlyName?`: ${f.friendlyName}`:""}`:u==="delivery"?`receba em casa${m?`: ${m}`:""}`:null},transaction_id:(e,t)=>{var n,s;return((s=(n=e.orderForm)==null?void 0:n.orderGroup)==null?void 0:s.toString())||null},available_grid:(e,t)=>e.availableGrid||null};async function Ix(e={},t){const n=em[t];return n?Object.fromEntries(await Promise.all(n.requiredParams.map(async o=>{const a=Nx[o];return typeof a!="function"?(console.error(`[DT] Missing paramGetter for param: ${o}`),[o,null]):[o,await a(e,t)]}))):void 0}async function Rx(e,t={}){try{const n=await Ix(t,e);return await dx(e,Object.assign({},n,{window:t.window}))}catch(n){return console.error(`[DT] Error tracking event ${e}:`,n)}}var cs={exports:{}},am={};(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 n=g,s=(0,n.createContext)(null),o=(0,n.createContext)(null),a=(0,n.createContext)(null);process.env.NODE_ENV!=="production"&&(s.displayName="SearchParamsContext",o.displayName="PathnameContext",a.displayName="PathParamsContext")})(am);var ls={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getSegmentValue",{enumerable:!0,get:function(){return n}});function n(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)})(ls,ls.exports);var Tx=ls.exports,us={exports:{}},ds={exports:{}},ms={exports:{}},fs={exports:{}},ps={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 s{disable(){throw n}getStore(){}run(){throw n}exit(){throw n}enterWith(){throw n}}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)})(ps,ps.exports);var uo=ps.exports;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"requestAsyncStorage",{enumerable:!0,get:function(){return s}});const s=(0,uo.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)})(fs,fs.exports);var Ax=fs.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 o},requestAsyncStorage:function(){return s.requestAsyncStorage}});const s=Ax;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)})(ms,ms.exports);var kx=ms.exports,hs={exports:{}},_s={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"actionAsyncStorage",{enumerable:!0,get:function(){return s}});const s=(0,uo.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)})(_s,_s.exports);var Ox=_s.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=Ox;(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 Lx=hs.exports,gs={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"RedirectStatusCode",{enumerable:!0,get:function(){return n}});var n;(function(s){s[s.SeeOther=303]="SeeOther",s[s.TemporaryRedirect=307]="TemporaryRedirect",s[s.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)})(gs,gs.exports);var Mx=gs.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 p},isRedirectError:function(){return f},permanentRedirect:function(){return m},redirect:function(){return u}});const s=kx,o=Lx,a=Mx,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 m(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 f(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 p(y){return f(y)?y.digest.split(";",3)[2]:null}function h(y){if(!f(y))throw new Error("Not a redirect error");return y.digest.split(";",2)[1]}function _(y){if(!f(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)})(ds,ds.exports);var Dx=ds.exports,ys={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 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)})(ys,ys.exports);var Fx=ys.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 s.RedirectType},notFound:function(){return o.notFound},permanentRedirect:function(){return s.permanentRedirect},redirect:function(){return s.redirect}});const s=Dx,o=Fx;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)})(us,us.exports);var zx=us.exports,im={};(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=St._(g),o=s.default.createContext(null);function a(i){const c=(0,s.useContext)(o);c&&c(i)}})(im);var Nn={exports:{}},Ur={},ga;function Bx(){return ga||(ga=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 n="BAILOUT_TO_CLIENT_SIDE_RENDERING";class s extends Error{constructor(i){super("Bail out to client-side rendering: "+i),this.reason=i,this.digest=n}}function o(a){return typeof a!="object"||a===null||!("digest"in a)?!1:a.digest===n}}(Ur)),Ur}var In={exports:{}},Rn={exports:{}},ya;function Ux(){return ya||(ya=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"staticGenerationAsyncStorage",{enumerable:!0,get:function(){return s}});const s=(0,uo.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)}(Rn,Rn.exports)),Rn.exports}var xa;function qx(){return xa||(xa=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=Ux();(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 va;function Hx(){return va||(va=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"bailoutToClientRendering",{enumerable:!0,get:function(){return o}});const n=Bx(),s=qx();function o(a){const i=s.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)}(Nn,Nn.exports)),Nn.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 f},useRouter:function(){return p},useSearchParams:function(){return m},useSelectedLayoutSegment:function(){return x},useSelectedLayoutSegments:function(){return y},useServerInsertedHTML:function(){return u.useServerInsertedHTML}});const s=g,o=Gs,a=am,i=Tx,c=Ws,l=zx,u=im;function m(){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}=Hx();j("useSearchParams()")}return C}function f(){return(0,s.useContext)(a.PathnameContext)}function p(){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 P;if(j)P=v[1][C];else{const R=v[1];var w;P=(w=R.children)!=null?w:Object.values(R)[0]}if(!P)return b;const S=P[0],E=(0,i.getSegmentValue)(S);return!E||E.startsWith(c.PAGE_SEGMENT_KEY)?b:(b.push(E),_(P,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)})(cs,cs.exports);var $x=cs.exports,ba=$x;function Vx({accountName:e}){const{user:t}=qt(),n=ba.usePathname(),s=ba.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?Rx("CUSTOM_USER_INFO",{userId:a,userEmail:o,platform:"store",account:e}):console.warn("[DT] Usuário deslogado ou sessão carregando...")},[n,s,o,a]),null}const Wx="_active_170rw_380",Gx="_banner_170rw_655",Kx="_container_170rw_689",Xx="_slugs_170rw_703",Yx="_root_170rw_785",Qx="_otContainer_170rw_797",vt={active:Wx,banner:Gx,container:Kx,slugs:Xx,"content-page-modifier":"_content-page-modifier_170rw_741",root:Yx,otContainer:Qx};function Zx({title:e,srcImages:t,children:n,className:s,...o}){const{isMobile:a}=ne(),i=a?t.mobile:t.desktop;return r.jsxs("div",{...o,className:d.helpers.classNameConcat(vt.banner,s),children:[r.jsx(Ne.Image,{src:i,alt:e,fill:!0}),n||r.jsx("h1",{children:e})]})}const xs=({children:e,className:t})=>r.jsx("div",{className:d.helpers.classNameConcat(vt.container,t),children:e});xs.displayName="Politicas.Container";const Jx=({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(co,{onLoad:t,id:"otprivacy-notice-script",src:"https://privacyportal-cdn.onetrust.com/privacy-notice-scripts/otnotice-1.0.min.js"}),r.jsx("div",{className:vt.otContainer,children:r.jsx("div",{id:"otnotice-container",children:r.jsx("div",{id:`otnotice-${e.policyId}`,className:"otnotice"})})})]})},ja={"card-image-wrapper":"_card-image-wrapper_10mul_1","card-image-container":"_card-image-container_10mul_9"},cm=e=>{const{nextimage:t}=le();return r.jsx(Qe,{name:e.name,children:e.data.banners.map((n,s)=>r.jsx("div",{className:ja["card-image-wrapper"],children:r.jsx("div",{className:ja["card-image-container"],children:r.jsx(t,{src:n.image,alt:n.altImage?n.altImage:"Banner Coleção",width:500,height:600})})},s))})},ev="_embedLiveContainer_1ss0l_2",tv="_embedLivePlayer_1ss0l_7",Ca={embedLiveContainer:ev,embedLivePlayer:tv},lm=({data:e,name:t})=>r.jsx(Qe,{name:t,children:r.jsx("div",{className:Ca.embedLiveContainer,children:r.jsx("div",{className:Ca.embedLivePlayer,children:e.banner.videosrc?r.jsx(Ne.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(co,{src:"https://player.vimeo.com/api/player.js",defer:!0,strategy:"lazyOnload"})]})})})}),vs={"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 nv(e,t){const{mediatorRef:n}=ne();g.useEffect(()=>n.current.subscribe(e,t),[e,t])}const Sa=({prevOnClick:e,nextOnClick:t,onBulletClick:n,currentPage:s,totalPages:o,position:a,hideControllers:i,left:c,isFirst:l,ICONS:u})=>{const[m,f]=g.useState("default");return nv("herobanner:change_controllers_variant",p=>{l&&f(p.includes("white")?"inverse":"default")}),r.jsxs(d.Carousel.Controller,{className:vs["carousel-controllers-modifier"],position:a??"absolute","data-hide-controllers":i,bottom:"16px",top:"unset",left:c,children:[r.jsxs(d.Carousel.Arrows,{className:vs["carrousel-arrows-display-controller"],children:[r.jsx(d.Button,{variant:"tertiary",onClick:e,adornment:{start:r.jsx(d.Icon,{name:u.arrow_left})},mode:m}),r.jsx(d.Button,{variant:"tertiary",onClick:t,adornment:{start:r.jsx(d.Icon,{name:u.arrow_right})},mode:m})]}),r.jsx(d.Carousel.Bullets,{page:s,total:o,onBulletClick:n,mode:m})]})},rv=({children:e,data:t,banner:n,...s})=>{const{mediatorRef:o}=ne();return t.data.first?r.jsx(Xn,{observerOptions:{threshold:.51},stopOnIntersection:!1,callBackWhenVisible:()=>{o.current.publish("header:change_variant",n.headerVariant)},...s,children:e}):r.jsx(r.Fragment,{children:e})},um=e=>{const{initialize:t,pagination:n,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(()=>md(e.data.config.controllerPosition??"dentro-inferior-centro"),[e]),c=g.useCallback(()=>{e.data.config.slideDuration&&n.totalPages>1&&(a.current=setInterval(()=>{s==null||s.nextPage()},e.data.config.slideDuration*1e3))},[s,e.data.config.slideDuration,n.totalPages]),l=g.useCallback(m=>{clearInterval(a.current),c(),m()},[c]),u=g.useMemo(()=>{var m;return{nextOnClick:()=>l(()=>s==null?void 0:s.nextPage()),prevOnClick:()=>l(()=>s==null?void 0:s.prevPage()),onBulletClick:f=>l(()=>s==null?void 0:s.navigateTo(f)),currentPage:n.currentPage,totalPages:n.totalPages,position:i.position,hideControllers:((m=e.data.config)==null?void 0:m.hideControllers)??!1,left:i.left}},[n.currentPage,n.totalPages,i.position,e.data.config.hideControllers,l,s]);return g.useEffect(()=>(c(),()=>clearInterval(a.current)),[c]),r.jsx(Qe,{name:e.name,children:r.jsxs(d.Carousel.Root,{innerRef:m=>{t(m)},className:d.helpers.classNameConcat(vs["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(Sa,{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((m,f)=>r.jsx(d.Carousel.Item,{style:o,children:r.jsx(rv,{data:e,banner:m,children:r.jsx(an,{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:m,index:f,componentIndex:e.data.componentIndex},creative:"banner-carousel",...e.data.first&&f===0&&{priority:!0}})})},`hero-banner-item-${f}`))}),i.shouldRender==="bottom"&&n.totalPages>1?r.jsx(Sa,{ICONS:e.ICONS,...u}):r.jsx(r.Fragment,{})]})})},At={"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"},dm=({data:e,name:t,CONSTANTS:n})=>{var m;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:(m=e==null?void 0:e.config)==null?void 0:m.slidesPerView,gap:s?e.config.gapMobile:e.config.gap,direction:s&&a?"column":"row"});return r.jsx(Qe,{name:t,children:r.jsx(d.Utils.Column,{style:{width:o==="small"?"70%":"100%"},alignContent:"center",justifyContent:"center",alignItems:"center",children:r.jsxs(d.Carousel.Root,{innerRef:f=>{i(f)},className:d.helpers.classNameConcat(At["carousel-modifier"],"common-section"),children:[o==="medium"?r.jsxs(d.TextStructure.Root,{children:[n.ACTIVE_BENNEFITS_BAR_TITLE&&r.jsx(d.TextStructure.DivWrapper,{className:At["carousel-title-modifier"],children:r.jsx("h2",{className:"typography-style-body-lg",children:n.BENNEFITS_BAR_TITLE})}),s&&c.totalPages>1&&r.jsx(d.Carousel.Controller,{className:d.helpers.classNameConcat(At["row-controller-modifier"],n.ACTIVE_BENNEFITS_BAR_TITLE?At["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((f,p)=>r.jsx(d.Carousel.Item,{className:At["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:{[o==="medium"?"top":"start"]:r.jsx(d.Icon,{name:f.icon,size:o==="medium"?"medium":"small"})},children:r.jsxs(d.TextStructure.DivWrapper,{alignItems:"start",children:[r.jsx("h3",{className:"typography-style-body-md",children:f.title}),f.subtitle&&f.subtitle.length?r.jsx("p",{className:"typography-style-body-xs",children:f.subtitle}):r.jsx(r.Fragment,{})]})})})},`bennefit=${p}`))}),!s&&c.totalPages>1?r.jsxs(d.Carousel.Controller,{className:At["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:f=>l==null?void 0:l.navigateTo(f)})]}):r.jsx(r.Fragment,{})]})})})},mm=({data:{componentIndex:e,...t},name:n,CONSTANTS:s})=>r.jsx(Qe,{name:n,children:r.jsx(lo,{...t,CONSTANTS:s})}),fm=({data:e,ICONS:t,TEXTCONTENT_EXPANDED:n,className:s,name:o})=>r.jsx(Qe,{name:o,children:r.jsx("div",{className:d.helpers.classNameConcat(ss.textContentSection,s??""),style:e.borderTop?{borderTop:"none"}:void 0,children:r.jsx(fd,{data:e,ICONS:t,TEXTCONTENT_EXPANDED:n})})}),wa={"accordion-modifier":"_accordion-modifier_1we16_1","accordion-body-modifier":"_accordion-body-modifier_1we16_7"},pm=({data:e,id:t,ICONS:n,className:s,name:o})=>{var c;const[a,i]=g.useState([]);return r.jsx(Qe,{name:o,children:r.jsxs(d.Utils.Column,{gap:"var(--gap-vertical-sm)",className:s??"",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:wa["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(m=>m.includes(u)?m.filter(f=>f!==u):[...m,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:wa["accordion-body-modifier"],children:r.jsx(Je.Editor,{editorKey:`${t}-editor-${u}`,blockRenderMap:Fn,editorState:l.text?Dn(JSON.parse(l.text)):Je.EditorState.createEmpty(),onChange:()=>null})})})})]},`${t}-accordion-${u}-${a.includes(u)}`))]})})},hm=async e=>{const{type:t}=e,n=t==="collectionSearch"?"/api/search/product":"/api/search/crosseling",s=JSON.stringify(t==="collectionSearch"?{...e.params,facets:e.facets,term:e.term,forceUpdate:!1}:e.facets);return(await fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:s}).then(a=>a.json()).then(a=>t==="collectionSearch"?a.data.products:a.products)).filter(a=>!!a.node.availability.status)},sv="_shelf__container_bi04n_10",_m={shelf__container:sv},ov=({collectionSearch:e,title:t,CONSTANTS:n,searchModal:s})=>{const[o,a]=g.useState([]),{isMobile:i}=ne(),{ref:c,inView:l}=Ea.useInView({threshold:.7,delay:100,triggerOnce:!0}),{sendDataLayerEvent:u}=ae();return g.useEffect(()=>{if(!e)return;function m(){var f,p;hm({type:"collectionSearch",term:e==null?void 0:e.term,facets:e==null?void 0:e.facets,params:{count:((f=e==null?void 0:e.params)==null?void 0:f.count)??12,sort:((p=e==null?void 0:e.params)==null?void 0:p.sort)??n.ITEMS_DEFAULT_SORT}}).then(h=>{a(h)})}m()},[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:r.jsx("div",{ref:c,className:_m.shelf__container,children:r.jsx(Zt.Shelf,{title:t??"Você também pode gostar",itemsPerPage:s?{desktop:2,mobile:1.4}:{desktop:4.4,mobile:2.2},ICONS:n.ICONS,children:Array.isArray(o)&&o.map(({node:m},f)=>{const{availability:{status:p}}=m;return p?r.jsx(Zt.Card,{item:m,isMobile:i,size:"medium",index:f,shelfTitle:t??"Você também pode gostar",CONSTANTS:n},m.id):null})})})},av=({recommendationSearch:e,title:t,CONSTANTS:n})=>{const[s,o]=g.useState([]),{isMobile:a}=ne(),{ref:i,inView:c}=Ea.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 m(){var f;hm({type:"recommendationSearch",facets:u,params:{count:((f=e==null?void 0:e.params)==null?void 0:f.count)??12,sort:n.ITEMS_DEFAULT_SORT}}).then(p=>o(p))}m()},[u,e]),g.useEffect(()=>{if(!c||s.length===0||(e==null?void 0:e.type)==="suggestions")return;const m=t??"Você também pode gostar";l({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:s},customData:{item_list_name:m},outsideEcommerceData:{item_list_name:m}}})},[c,s]),(s==null?void 0:s.length)===0?null:(e==null?void 0:e.type)==="suggestions"?r.jsx(dl,{products:s,innerRef:i,inView:c,CONSTANTS:n}):r.jsx("div",{ref:i,className:_m.shelf__container,children:r.jsx(Zt.Shelf,{title:t??"Você também pode gostar",itemsPerPage:{desktop:4.4,mobile:2.2},ICONS:n.ICONS,children:Array.isArray(s)&&s.map(({node:m},f)=>{const{availability:{status:p}}=m;return p?r.jsx(Zt.Card,{item:m,isMobile:a,size:"medium",index:f,shelfTitle:t??"Você também pode gostar",CONSTANTS:n},m.id):null})})})},gm=({data:e,name:t,CONSTANTS:n})=>{const{productId:s}=dc();return!(e!=null&&e.productLists)||e.productLists.length===0?null:e.productLists.map((o,a)=>r.jsx(Qe,{name:t,children:r.jsx(av,{title:o.title,recommendationSearch:{type:o.product_group_option,productId:s,params:{count:o.number_of_items,sort:"score:desc"}},CONSTANTS:n},`shelf=${a}`)}))},ym=({data:e,CONSTANTS:t,searchModal:n,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 r.jsx(Qe,{name:s,children:r.jsx(ov,{title:i.title,collectionSearch:{params:{count:i.number_of_items,sort:i.sort},...l},searchModal:n,CONSTANTS:t},`shelf=${c}`)})})},iv="_popup_5taxs_9",cv="_popup__overlay_5taxs_19",lv="_popup__modal_5taxs_27",qe={popup:iv,popup__overlay:cv,popup__modal:lv,"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"},uv=e=>r.jsx("div",{className:qe["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:qe["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})]})})}),dv=e=>{const{title:t,description:n,groups:s,ICONS:o}=e,{formErrors:a,submitForm:i,success:c}=rr(),[l,u]=g.useState(!1);return r.jsx("form",{onSubmit:i,className:qe.formContainer,children:r.jsxs("div",{className:qe["popup__modal--form"],children:[r.jsxs(d.TextStructure.DivWrapper,{className:qe["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(uv,{...e}):r.jsxs(r.Fragment,{children:[s.map(m=>r.jsx(Ft.FieldGroup,{group:m,children:r.jsx(Ft.FieldWrapper,{fields:m.fields})},m.groupLabel)),r.jsx(d.Checkbox,{className:qe["popup__modal--checkbox"],adornment:r.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)}),r.jsxs("div",{children:[!l&&r.jsx(d.TextStructure.DivWrapper,{className:qe["popup__modal--status"],children:r.jsxs("p",{className:"typography-style-body-caption",children:[r.jsx(d.Icon,{size:"small",name:o.alert_circle}),vf]})}),r.jsx(d.Button,{disabled:!l,size:"medium",type:"submit",children:jf}),a.length?r.jsx(d.TextStructure.DivWrapper,{className:qe["popup__modal--status"],children:r.jsx("p",{className:d.helpers.classNameConcat(qe.formSubmitWarning,"typography-style-body-xs"),children:bf})}):null]})]})]})})},xm=({data:e,name:t,CONSTANTS:n})=>{const[s,o]=g.useState(!1),a=typeof window<"u"?window.sessionStorage.getItem(n.POPUP_TRACK_STORAGE)||window.localStorage.getItem(n.POPUP_SUBMITTED_STORAGE):null,i=()=>{o(!1),window.sessionStorage.setItem(n.POPUP_TRACK_STORAGE,"true")};return g.useEffect(()=>{setTimeout(()=>!a&&o(!0),2e3)},[]),e.active&&s?r.jsx(Qe,{name:t,children:r.jsxs("div",{className:qe.popup,children:[r.jsx("div",{onClick:i,className:qe.popup__overlay}),r.jsxs("div",{className:qe.popup__modal,children:[r.jsx(d.Button,{onClick:i,variant:"tertiary",className:qe["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(Ne.Image,{src:e.imageUrl,width:"459",height:"418",alt:e.title})}),r.jsx(Bd,{...e,children:r.jsx(dv,{...e,ICONS:n.ICONS})})]})]})}):null},mv={"Image Grid":cm,"Embed Live":lm,"Banner Carousel":um,Banner:oo,"Bennefits Bar":dm,newsletter:mm,TextContent:fm,TextAccordion:pm,"Product Carousel":ym,"PDP Product Carousel":gm,"Popup Modal":xm},vm=({data:e,identifyWhoIsFirst:t=!1,componentConfigs:n})=>e==null?void 0:e.map((s,o)=>{const a=mv[s.name],i={...(n==null?void 0:n[s.name])??{}};return t&&o===0&&(s.data.first=!0),s.data.componentIndex=o,s.name==="TextAccordion"&&(i.id=`text-accordion-${o}`),a?r.jsx(a,{name:s.name,data:s.data,...i},`section-zone-component-${o}`):null});async function fv({slug:e,pageData:t,tabsData:n,oneTrust:s}){var c,l,u,m;const a=(n?[...n].sort((f,p)=>f.config.tabConfig.order-p.config.tabConfig.order):[]).map(f=>({slug:f.config.seo.slug||Yr(f.config.tabConfig.title),title:f.config.tabConfig.title})),i=n==null?void 0:n.find(f=>f.config.seo.slug===`/${decodeURIComponent(e)}`);return i&&(i.id=Yr(i.config.seo.slug||"")),r.jsxs("div",{className:vt.root,children:[r.jsx(xs,{children:r.jsx(Zx,{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:(m=(u=t==null?void 0:t.config)==null?void 0:u.banners)==null?void 0:m.imageBackgroudMobile}})}),r.jsxs(xs,{children:[r.jsx("div",{className:vt.slugs,children:a.map(f=>r.jsx(Le,{href:f.slug?`/politicas/${f.slug.replace(/^\/+/,"")}`:"#",className:f.slug===(i==null?void 0:i.id)?vt.active:"",title:f.title,scroll:!1,children:f.title},f.slug.replace(/^\/+/,"")))}),r.jsx("div",{className:vt["content-page-modifier"],children:e==="privacidade-e-seguranca"?r.jsx(Jx,{oneTrust:s}):r.jsx(vm,{data:(i==null?void 0:i.sections)??[]})})]})]})}const kn={teamComponents:{AddToCart:Vs,BackToTop:Zf,HelpButton:Ty,BuyPackage:dl,Filter:{...ct,helpers:Eu},...O_,FreightCalculation:_u,Header:hu,Link:Le,Media:Ne,PLPNavigation:ht,ProductCard:pe,ProductList:ot,ProductVariationList:et,Sort:Zn,UserMenu:Yn,Newsletter:lo,Form:Ft},template:{minicart:De,pdc:Pd,pdc_composites:nt,pdp:Hg,searchResult:Td,wishList:Yc,LPCadastro:Xy,SearchModal:$d,LPStores:st,tracker:Vx,Politicas:fv},utils:{EventCollector:gy,ExternalScripts:jy,LinkOrNotLink:on,ObserverWrapper:Xn,SnackBarComponent:Dt,DraftJsLinkWrapper:dd}},pv=(e,t)=>{const n=e.map(o=>`'${o.source}'`).join(`,
19
19
  `);return`
20
20
  import type { NextRequest } from 'next/server'
21
21
  import { NextResponse } from 'next/server'
@@ -55,4 +55,4 @@ See more info here: https://nextjs.org/docs/messages/no-stylesheets-in-head-comp
55
55
  ${n}
56
56
  ]
57
57
  }
58
- `},Ox=Object.freeze(Object.defineProperty({__proto__:null,generateMiddleware:Lx},Symbol.toStringTag,{value:"Module"})),Dx={helpers:Ox},ms={"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 Mx(e,t){const{mediatorRef:n}=re();g.useEffect(()=>n.current.subscribe(e,t),[e,t])}const _a=({prevOnClick:e,nextOnClick:t,onBulletClick:n,currentPage:s,totalPages:o,position:a,hideControllers:i,left:c,isFirst:l,ICONS:u})=>{const[m,f]=g.useState("default");return Mx("herobanner:change_controllers_variant",p=>{l&&f(p.includes("white")?"inverse":"default")}),r.jsxs(d.Carousel.Controller,{className:ms["carousel-controllers-modifier"],position:a??"absolute","data-hide-controllers":i,bottom:"16px",top:"unset",left:c,children:[r.jsxs(d.Carousel.Arrows,{className:ms["carrousel-arrows-display-controller"],children:[r.jsx(d.Button,{variant:"tertiary",onClick:e,adornment:{start:r.jsx(d.Icon,{name:u.arrow_left})},mode:m}),r.jsx(d.Button,{variant:"tertiary",onClick:t,adornment:{start:r.jsx(d.Icon,{name:u.arrow_right})},mode:m})]}),r.jsx(d.Carousel.Bullets,{page:s,total:o,onBulletClick:n,mode:m})]})},Fx=({children:e,data:t,banner:n,...s})=>{const{mediatorRef:o}=re();return t.data.first?r.jsx(Wn,{observerOptions:{threshold:.51},stopOnIntersection:!1,callBackWhenVisible:()=>{o.current.publish("header:change_variant",n.headerVariant)},...s,children:e}):r.jsx(r.Fragment,{children:e})},sm=e=>{const{initialize:t,pagination:n,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(()=>hd(e.data.config.controllerPosition??"dentro-inferior-centro"),[e]),c=g.useCallback(()=>{e.data.config.slideDuration&&n.totalPages>1&&(a.current=setInterval(()=>{s==null||s.nextPage()},e.data.config.slideDuration*1e3))},[s,e.data.config.slideDuration,n.totalPages]),l=g.useCallback(m=>{clearInterval(a.current),c(),m()},[c]),u=g.useMemo(()=>{var m;return{nextOnClick:()=>l(()=>s==null?void 0:s.nextPage()),prevOnClick:()=>l(()=>s==null?void 0:s.prevPage()),onBulletClick:f=>l(()=>s==null?void 0:s.navigateTo(f)),currentPage:n.currentPage,totalPages:n.totalPages,position:i.position,hideControllers:((m=e.data.config)==null?void 0:m.hideControllers)??!1,left:i.left}},[n.currentPage,n.totalPages,i.position,e.data.config.hideControllers,l,s]);return g.useEffect(()=>(c(),()=>clearInterval(a.current)),[c]),r.jsx(Qe,{name:e.name,children:r.jsxs(d.Carousel.Root,{innerRef:m=>{t(m)},className:d.helpers.classNameConcat(ms["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(_a,{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((m,f)=>r.jsx(d.Carousel.Item,{style:o,children:r.jsx(Fx,{data:e,banner:m,children:r.jsx(an,{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:m,index:f,componentIndex:e.data.componentIndex},creative:"banner-carousel",...e.data.first&&f===0&&{priority:!0}})})},`hero-banner-item-${f}`))}),i.shouldRender==="bottom"&&n.totalPages>1?r.jsx(_a,{ICONS:e.ICONS,...u}):r.jsx(r.Fragment,{})]})})},zx={Banner:Ys},Rt={"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"},om=({data:e,name:t,CONSTANTS:n})=>{var m;const{isMobile:s}=re(),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:(m=e==null?void 0:e.config)==null?void 0:m.slidesPerView,gap:s?e.config.gapMobile:e.config.gap,direction:s&&a?"column":"row"});return r.jsx(Qe,{name:t,children:r.jsx(d.Utils.Column,{style:{width:o==="small"?"70%":"100%"},alignContent:"center",justifyContent:"center",alignItems:"center",children:r.jsxs(d.Carousel.Root,{innerRef:f=>{i(f)},className:d.helpers.classNameConcat(Rt["carousel-modifier"],"common-section"),children:[o==="medium"?r.jsxs(d.TextStructure.Root,{children:[n.ACTIVE_BENNEFITS_BAR_TITLE&&r.jsx(d.TextStructure.DivWrapper,{className:Rt["carousel-title-modifier"],children:r.jsx("h2",{className:"typography-style-body-lg",children:n.BENNEFITS_BAR_TITLE})}),s&&c.totalPages>1&&r.jsx(d.Carousel.Controller,{className:d.helpers.classNameConcat(Rt["row-controller-modifier"],n.ACTIVE_BENNEFITS_BAR_TITLE?Rt["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((f,p)=>r.jsx(d.Carousel.Item,{className:Rt["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:{[o==="medium"?"top":"start"]:r.jsx(d.Icon,{name:f.icon,size:o==="medium"?"medium":"small"})},children:r.jsxs(d.TextStructure.DivWrapper,{alignItems:"start",children:[r.jsx("h3",{className:"typography-style-body-md",children:f.title}),f.subtitle&&f.subtitle.length?r.jsx("p",{className:"typography-style-body-xs",children:f.subtitle}):r.jsx(r.Fragment,{})]})})})},`bennefit=${p}`))}),!s&&c.totalPages>1?r.jsxs(d.Carousel.Controller,{className:Rt["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:f=>l==null?void 0:l.navigateTo(f)})]}):r.jsx(r.Fragment,{})]})})})},am=({data:e,ICONS:t,TEXTCONTENT_EXPANDED:n,className:s,name:o})=>r.jsx(Qe,{name:o,children:r.jsx("div",{className:d.helpers.classNameConcat(cs.textContentSection,s??""),style:e.borderTop?{borderTop:"none"}:void 0,children:r.jsx(_d,{data:e,ICONS:t,TEXTCONTENT_EXPANDED:n})})}),ga={"accordion-modifier":"_accordion-modifier_1we16_1","accordion-body-modifier":"_accordion-body-modifier_1we16_7"},im=({data:e,id:t,ICONS:n,className:s,name:o})=>{var c;const[a,i]=g.useState([]);return r.jsx(Qe,{name:o,children:r.jsxs(d.Utils.Column,{gap:"var(--gap-vertical-sm)",className:s??"",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:ga["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(m=>m.includes(u)?m.filter(f=>f!==u):[...m,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:ga["accordion-body-modifier"],children:r.jsx(Je.Editor,{editorKey:`${t}-editor-${u}`,blockRenderMap:Ln,editorState:l.text?kn(JSON.parse(l.text)):Je.EditorState.createEmpty(),onChange:()=>null})})})})]},`${t}-accordion-${u}-${a.includes(u)}`))]})})},cm=g.createContext({}),Bx=({data:e,children:t,...n})=>{var _,y,x,b,C,j,v,P,E,S,I,T,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:(b=(x=e==null?void 0:e.staticConfig)==null?void 0:x.staticConfig)==null?void 0:b.showCarouselArrows,hasCloseBtn:(j=(C=e==null?void 0:e.staticConfig)==null?void 0:C.staticConfig)==null?void 0:j.hasCloseBtn,backgroundColor:(P=(v=e==null?void 0:e.staticConfig)==null?void 0:v.staticConfig)==null?void 0:P.backgroundColor,textColorVariant:(S=(E=e==null?void 0:e.staticConfig)==null?void 0:E.staticConfig)==null?void 0:S.textColorVariant,content:((T=(I=e==null?void 0:e.content)==null?void 0:I.content)==null?void 0:T.items)??[]},u=(A=l.content)==null?void 0:A.filter(k=>!k.countDownEndDate||new Date(k.countDownEndDate)>new Date),m=u.length>1,f={...l.backgroundColor?{backgroundColor:l.backgroundColor}:{}},p=()=>{o(!1)},h=d.helpers.ValidateProp({fieldTypes:Lt.Mode,property:l.textColorVariant,fallback:"default"});return r.jsx(cm.Provider,{value:{isOpen:s,setIsOpen:o,hasCarousel:m,backgroundStyle:f,handleCloseTipbar:p,mode:h,slideTranstionTimer:l.slideTranstionTimer,showCarouselArrows:l.showCarouselArrows,hasCloseBtn:l.hasCloseBtn,slices:u,carouselProps:{initialize:a,controller:i,itemsStyles:c},...n},children:t})},ut=()=>g.useContext(cm),Ux=({dateEnd:e,...t})=>{const{CONSTANTS:{TIME_ZONE:n}}=ut();return r.jsx(An,{dateEnd:new Date(e),TIME_ZONE:n,...t})},$x="_tipbar_bt3p0_1",Hx="_tipbar__carousel_bt3p0_15",cn={tipbar:$x,tipbar__carousel:Hx,"tipbar__close-btn":"_tipbar__close-btn_bt3p0_29","tipbar-item":"_tipbar-item_bt3p0_37","tipbar-item__coupon":"_tipbar-item__coupon_bt3p0_45"},qx=({coupon:e,feedbackTitle:t,feedbackDescription:n,...s})=>{const{CONSTANTS:o}=ut(),{addCouponSeller:a,cartStore:i}=be(),[c,l]=g.useState({status:!1,showSnackBar:!1}),[u,m]=g.useState(!1),[f,p]=g.useState(!1),h=async()=>{if(!i.items.length){p(!0);return}(await a(e,"coupon")).code===200?l({status:!0,showSnackBar:!0}):m(!0)};return g.useEffect(()=>{c.showSnackBar&&setTimeout(()=>{l(_=>({..._,showSnackBar:!1}))},o.TIPBAR_CONFIGS.snackbar_timeout)},[c.showSnackBar]),g.useEffect(()=>{u&&setTimeout(()=>{m(!1)},o.TIPBAR_CONFIGS.snackbar_timeout)},[u]),g.useEffect(()=>{f&&setTimeout(()=>{p(!1)},o.TIPBAR_CONFIGS.snackbar_timeout)},[f]),r.jsxs(r.Fragment,{children:[r.jsx(d.Button,{...s,onClick:h,disabled:c.status,className:cn["tipbar-item__coupon"],children:c.status?`${o.TIPBAR_CONFIGS.coupon_applied_message}`:`${o.TIPBAR_CONFIGS.coupon_default_message}`}),c.showSnackBar&&(t||n)&&r.jsx(Ot,{title:t,subtitle:n,Z_INDEX_WAR:o.Z_INDEX_WAR},`feedback-coupon-${e}`),u&&r.jsx(Ot,{title:o.TIPBAR_CONFIGS.coupon_error_title,subtitle:o.TIPBAR_CONFIGS.coupon_error_message,Z_INDEX_WAR:o.Z_INDEX_WAR},`error-coupon-${e}`),f&&r.jsx(Ot,{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}`)]})},Vx=({title:e,description:t,style:n,mode:s,className:o})=>r.jsx(d.TextStructure.Root,{children:r.jsxs(d.TextStructure.DivWrapper,{mode:s,className:o,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})]})}),Wx=({coupon:e,...t})=>{const{CONSTANTS:n}=ut();return r.jsx(d.Copy,{...t,iconCopy:n.ICONS.copy,iconSuccess:n.ICONS.check,children:e})},Gx=({staticZone:e,type:t,className:n,description:s,title:o})=>{const{mode:a}=ut();if(t==="countdown")return r.jsx(Ux,{dateEnd:e.countDownEndDate,size:"x-small",mode:a});if(t==="coupon"){const i=d.helpers.ValidateProp({fieldTypes:Lt.Mode,property:e.couponButtonMode,fallback:"default"}),c=d.helpers.ValidateProp({fieldTypes:Lt.VariantsExtended,property:e.couponButtonVariant,fallback:"primary"});return e.coupon?r.jsx(qx,{coupon:e.coupon,mode:i,variant:c,feedbackTitle:e.couponFeedbackTitle,feedbackDescription:e.couponFeedbackDescription}):null}if(t==="copy"){const i=d.helpers.ValidateProp({fieldTypes:Lt.Mode,property:e.couponButtonMode,fallback:"default"});return e.coupon?r.jsx(Wx,{coupon:e.coupon,mode:i}):null}return r.jsx(Vx,{title:o,description:s,mode:a,className:n})},ya=({handleCloseTipbar:e,mode:t})=>{const{CONSTANTS:n}=ut();return r.jsx(d.Button,{title:"fechar tipbar",className:cn["tipbar__close-btn"],onClick:e,variant:"tertiary",mode:t,adornment:{start:r.jsx(d.Icon,{name:n.ICONS.close})}})},Kx=({children:e,mode:t="default",showCarouselArrows:n=!0,slideTranstionTimer:s})=>{const{carouselProps:o,CONSTANTS:a}=ut(),i=g.useRef(null),c=(u,m)=>{var f,p;u.stopPropagation(),u.preventDefault(),m==="prev"?(f=o.controller)==null||f.prevPage():(p=o.controller)==null||p.nextPage(),i.current&&(clearInterval(i.current),l())},l=g.useCallback(()=>{if(s&&o.controller){const u=setInterval(()=>{var m;(m=o.controller)==null||m.nextPage()},s);i.current=u}},[s,o]);return g.useEffect(()=>(l(),()=>{i.current&&clearInterval(i.current)}),[s,l]),r.jsxs(d.Carousel.Root,{innerRef:u=>{o.initialize(u)},className:cn.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})}})]})},Xx=({children:e,className:t})=>{const{hasCarousel:n,mode:s,hasCloseBtn:o,backgroundStyle:a,showCarouselArrows:i,slideTranstionTimer:c,handleCloseTipbar:l}=ut(),u=n&&i;return r.jsx("div",{style:a,"data-hasclosebtn":o,className:d.helpers.classNameConcat(cn.tipbar,t),children:n?r.jsxs(r.Fragment,{children:[r.jsx(Kx,{mode:s,showCarouselArrows:u,slideTranstionTimer:c,children:e}),o&&r.jsx(ya,{handleCloseTipbar:l,showCarouselArrows:u,mode:s})]}):r.jsxs(r.Fragment,{children:[e,o&&r.jsx(ya,{handleCloseTipbar:l,mode:s})]})})},Yx=({children:e,highlightFirstSection:t,...n})=>{const{hasCarousel:s,carouselProps:o}=ut(),a=r.jsx("div",{...n,className:cn["tipbar-item"],children:e});return s?r.jsx(d.Carousel.Item,{style:o.itemsStyles,children:a}):a},lm=({className:e})=>{const{isOpen:t,slices:n}=ut();return n.length&&t?r.jsx(Xx,{children:n.map((s,o)=>{var a;return r.jsx(r.Fragment,{children:r.jsx(on,{href:s.link,children:r.jsx(Yx,{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)=>r.jsx(Gx,{staticZone:s,type:i.type,title:i.title,description:i.description,className:e},`tipbar-slice-field-${c}`)):null})})},`tipbar-slice-${o}`)})}):null};lm.displayName="TipBar.Root";const ps=({className:e,...t})=>r.jsx(Bx,{...t,children:r.jsx(lm,{className:e})});ps.displayName="TipBar";const Qx=({CONSTANTS:e,data:t})=>{const{pathname:n}=ue(),{tipbarRef:s}=Pe(),o=c=>{const l=t==null?void 0:t.find(u=>{var m,f,p,h,_;return((f=(m=u.staticConfig)==null?void 0:m.staticConfig)==null?void 0:f.deviceType)===c&&((_=(h=(p=u.staticConfig)==null?void 0:p.staticConfig)==null?void 0:h.paths)==null?void 0:_.includes(n))});return l||(t==null?void 0:t.find(u=>{var m,f,p,h,_,y;return((f=(m=u.staticConfig)==null?void 0:m.staticConfig)==null?void 0:f.deviceType)===c&&(!((h=(p=u.staticConfig)==null?void 0:p.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 r.jsxs("div",{ref:s,className:H.responsive["responsive-flex"],children:[i&&r.jsx("div",{className:H.responsive["responsive-mobile-flex"],children:r.jsx(ps,{data:i,CONSTANTS:e})}),a&&r.jsx("div",{className:H.responsive["responsive-desktop-flex"],children:r.jsx(ps,{data:a,CONSTANTS:e})})]})},xa={"card-image-wrapper":"_card-image-wrapper_10mul_1","card-image-container":"_card-image-container_10mul_9"},um=e=>{const{nextimage:t}=ue();return r.jsx(Qe,{name:e.name,children:e.data.banners.map((n,s)=>r.jsx("div",{className:xa["card-image-wrapper"],children:r.jsx("div",{className:xa["card-image-container"],children:r.jsx(t,{src:n.image,alt:n.altImage?n.altImage:"Banner Coleção",width:500,height:600})})},s))})},Zx=({SectionZone:e,name:t,storeId:n,previewId:s})=>{const[o,a]=g.useState();return g.useEffect(()=>{o||H.fetchContentType("search",{name:t,storeId:n,previewId:s}).then(i=>{i!=null&&i.data&&Array.isArray(i.data)&&a(i.data[0])})},[]),r.jsx(e,{data:o??[]})},dm=({data:{componentIndex:e,...t},name:n,CONSTANTS:s})=>r.jsx(Qe,{name:n,children:r.jsx(Js,{...t,CONSTANTS:s})}),mm=async e=>{const{type:t}=e,n=t==="collectionSearch"?"/api/search/product":"/api/search/crosseling",s=JSON.stringify(t==="collectionSearch"?{...e.params,facets:e.facets,term:e.term,forceUpdate:!1}:e.facets);return(await fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:s}).then(a=>a.json()).then(a=>t==="collectionSearch"?a.data.products:a.products)).filter(a=>!!a.node.availability.status)},Jx="_shelf__container_bi04n_10",pm={shelf__container:Jx},ev=({collectionSearch:e,title:t,CONSTANTS:n,searchModal:s})=>{const[o,a]=g.useState([]),{isMobile:i}=re(),{ref:c,inView:l}=ba.useInView({threshold:.7,delay:100,triggerOnce:!0}),{sendDataLayerEvent:u}=ae();return g.useEffect(()=>{if(!e)return;function m(){var f,p;mm({type:"collectionSearch",term:e==null?void 0:e.term,facets:e==null?void 0:e.facets,params:{count:((f=e==null?void 0:e.params)==null?void 0:f.count)??12,sort:((p=e==null?void 0:e.params)==null?void 0:p.sort)??n.ITEMS_DEFAULT_SORT}}).then(h=>{a(h)})}m()},[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:r.jsx("div",{ref:c,className:pm.shelf__container,children:r.jsx(Qt.Shelf,{title:t??"Você também pode gostar",itemsPerPage:s?{desktop:2,mobile:1.4}:{desktop:4.4,mobile:2.2},ICONS:n.ICONS,children:Array.isArray(o)&&o.map(({node:m},f)=>{const{availability:{status:p}}=m;return p?r.jsx(Qt.Card,{item:m,isMobile:i,size:"medium",index:f,shelfTitle:t??"Você também pode gostar",CONSTANTS:n},m.id):null})})})},tv=({recommendationSearch:e,title:t,CONSTANTS:n})=>{const[s,o]=g.useState([]),{isMobile:a}=re(),{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 m(){var f;mm({type:"recommendationSearch",facets:u,params:{count:((f=e==null?void 0:e.params)==null?void 0:f.count)??12,sort:n.ITEMS_DEFAULT_SORT}}).then(p=>o(p))}m()},[u,e]),g.useEffect(()=>{if(!c||s.length===0||(e==null?void 0:e.type)==="suggestions")return;const m=t??"Você também pode gostar";l({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:s},customData:{item_list_name:m},outsideEcommerceData:{item_list_name:m}}})},[c,s]),(s==null?void 0:s.length)===0?null:(e==null?void 0:e.type)==="suggestions"?r.jsx(fl,{products:s,innerRef:i,inView:c,CONSTANTS:n}):r.jsx("div",{ref:i,className:pm.shelf__container,children:r.jsx(Qt.Shelf,{title:t??"Você também pode gostar",itemsPerPage:{desktop:4.4,mobile:2.2},ICONS:n.ICONS,children:Array.isArray(s)&&s.map(({node:m},f)=>{const{availability:{status:p}}=m;return p?r.jsx(Qt.Card,{item:m,isMobile:a,size:"medium",index:f,shelfTitle:t??"Você também pode gostar",CONSTANTS:n},m.id):null})})})},fm=({data:e,name:t,CONSTANTS:n})=>{const{productId:s}=dc();return!(e!=null&&e.productLists)||e.productLists.length===0?null:e.productLists.map((o,a)=>r.jsx(Qe,{name:t,children:r.jsx(tv,{title:o.title,recommendationSearch:{type:o.product_group_option,productId:s,params:{count:o.number_of_items,sort:"score:desc"}},CONSTANTS:n},`shelf=${a}`)}))},hm=({data:e,CONSTANTS:t,searchModal:n,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 r.jsx(Qe,{name:s,children:r.jsx(ev,{title:i.title,collectionSearch:{params:{count:i.number_of_items,sort:i.sort},...l},searchModal:n,CONSTANTS:t},`shelf=${c}`)})})},nv="_embedLiveContainer_1ss0l_2",rv="_embedLivePlayer_1ss0l_7",va={embedLiveContainer:nv,embedLivePlayer:rv},_m=({data:e,name:t})=>r.jsx(Qe,{name:t,children:r.jsx("div",{className:va.embedLiveContainer,children:r.jsx("div",{className:va.embedLivePlayer,children:e.banner.videosrc?r.jsx(we.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(Od,{src:"https://player.vimeo.com/api/player.js",defer:!0,strategy:"lazyOnload"})]})})})}),sv="_popup_5taxs_9",ov="_popup__overlay_5taxs_19",av="_popup__modal_5taxs_27",$e={popup:sv,popup__overlay:ov,popup__modal:av,"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"},iv=e=>r.jsx("div",{className:$e["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:$e["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:s,ICONS:o}=e,{formErrors:a,submitForm:i,success:c}=er(),[l,u]=g.useState(!1);return r.jsx("form",{onSubmit:i,className:$e.formContainer,children:r.jsxs("div",{className:$e["popup__modal--form"],children:[r.jsxs(d.TextStructure.DivWrapper,{className:$e["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(iv,{...e}):r.jsxs(r.Fragment,{children:[s.map(m=>r.jsx(Dt.FieldGroup,{group:m,children:r.jsx(Dt.FieldWrapper,{fields:m.fields})},m.groupLabel)),r.jsx(d.Checkbox,{className:$e["popup__modal--checkbox"],adornment:r.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)}),r.jsxs("div",{children:[!l&&r.jsx(d.TextStructure.DivWrapper,{className:$e["popup__modal--status"],children:r.jsxs("p",{className:"typography-style-body-caption",children:[r.jsx(d.Icon,{size:"small",name:o.alert_circle}),fp]})}),r.jsx(d.Button,{disabled:!l,size:"medium",type:"submit",children:_p}),a.length?r.jsx(d.TextStructure.DivWrapper,{className:$e["popup__modal--status"],children:r.jsx("p",{className:d.helpers.classNameConcat($e.formSubmitWarning,"typography-style-body-xs"),children:hp})}):null]})]})]})})},gm=({data:e,name:t,CONSTANTS:n})=>{const[s,o]=g.useState(!1),a=typeof window<"u"?window.sessionStorage.getItem(n.POPUP_TRACK_STORAGE)||window.localStorage.getItem(n.POPUP_SUBMITTED_STORAGE):null,i=()=>{o(!1),window.sessionStorage.setItem(n.POPUP_TRACK_STORAGE,"true")};return g.useEffect(()=>{setTimeout(()=>!a&&o(!0),2e3)},[]),e.active&&s?r.jsx(Qe,{name:t,children:r.jsxs("div",{className:$e.popup,children:[r.jsx("div",{onClick:i,className:$e.popup__overlay}),r.jsxs("div",{className:$e.popup__modal,children:[r.jsx(d.Button,{onClick:i,variant:"tertiary",className:$e["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(we.Image,{src:e.imageUrl,width:"459",height:"418",alt:e.title})}),r.jsx(qd,{...e,children:r.jsx(cv,{...e,ICONS:n.ICONS})})]})]})}):null},lv={"Image Grid":um,"Embed Live":_m,"Banner Carousel":sm,Banner:Ys,"Bennefits Bar":om,newsletter:dm,TextContent:am,TextAccordion:im,"Product Carousel":hm,"PDP Product Carousel":fm,"Popup Modal":gm},uv=({data:e,identifyWhoIsFirst:t=!1,componentConfigs:n})=>e==null?void 0:e.map((s,o)=>{const a=lv[s.name],i={...(n==null?void 0:n[s.name])??{}};return t&&o===0&&(s.data.first=!0),s.data.componentIndex=o,s.name==="TextAccordion"&&(i.id=`text-accordion-${o}`),a?r.jsx(a,{name:s.name,data:s.data,...i},`section-zone-component-${o}`):null}),dv=e=>{const t=fv(pv(e));return mv(t)},mv=e=>{const t=[];for(const n in e)t.push(...e[n]);return t},pv=e=>!e||!Array.isArray(e)?{}:e==null?void 0:e.reduce((t,n)=>{if(n!=null&&n.cidade){let s=t[n==null?void 0:n.cidade];s===void 0&&(s=t[n==null?void 0:n.cidade]=[]),s.push(n)}return t},{}),fv=e=>{if(!e||!Object.keys(e).length)return{};const t=Object.keys(e).sort((s,o)=>s.localeCompare(o)),n={};for(const s of t)n[s]=e[s];return n},hv=({content:e,data:t,showVendor:n,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 m=await u.json();c(dv(m))}catch(u){console.error(u)}})()},[o]),!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:s,LPLOJAS_TEMPLATE_RETURN_BUTTON:a})})]})},_v={Banner:zx,BannerSection:an,BennefitsBarSection:om,SingleBannerSection:Ys,TextContentSection:am,BannerCarousel:sm,TextAccordionSection:im,TipbarScreening:Qx,ImageGrid:um,SearchPageScreening:H.SearchPageScreening,SearchContent:Zx,NewsletterSection:dm,PDPProductCarousel:fm,ProductCarousel:hm,EmbedLive:_m,PopupModalSection:gm,SectionZone:uv,LPStoresClientWrapper:hv},gv={Components:_v,helpers:Sy};exports.cms=gv;exports.contexts=yc;exports.data=Ds;exports.layout=wn;exports.scripts=Dx;
58
+ `},hv=Object.freeze(Object.defineProperty({__proto__:null,generateMiddleware:pv},Symbol.toStringTag,{value:"Module"})),_v={helpers:hv},gv={Banner:oo},bm=g.createContext({}),yv=({data:e,children:t,...n})=>{var _,y,x,v,C,j,b,P,w,S,E,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:(P=(b=e==null?void 0:e.staticConfig)==null?void 0:b.staticConfig)==null?void 0:P.backgroundColor,textColorVariant:(S=(w=e==null?void 0:e.staticConfig)==null?void 0:w.staticConfig)==null?void 0:S.textColorVariant,content:((R=(E=e==null?void 0:e.content)==null?void 0:E.content)==null?void 0:R.items)??[]},u=(A=l.content)==null?void 0:A.filter(O=>!O.countDownEndDate||new Date(O.countDownEndDate)>new Date),m=u.length>1,f={...l.backgroundColor?{backgroundColor:l.backgroundColor}:{}},p=()=>{o(!1)},h=d.helpers.ValidateProp({fieldTypes:Mt.Mode,property:l.textColorVariant,fallback:"default"});return r.jsx(bm.Provider,{value:{isOpen:s,setIsOpen:o,hasCarousel:m,backgroundStyle:f,handleCloseTipbar:p,mode:h,slideTranstionTimer:l.slideTranstionTimer,showCarouselArrows:l.showCarouselArrows,hasCloseBtn:l.hasCloseBtn,slices:u,carouselProps:{initialize:a,controller:i,itemsStyles:c},...n},children:t})},ut=()=>g.useContext(bm),xv=({dateEnd:e,...t})=>{const{CONSTANTS:{TIME_ZONE:n}}=ut();return r.jsx(Mn,{dateEnd:new Date(e),TIME_ZONE:n,...t})},vv="_tipbar_bt3p0_1",bv="_tipbar__carousel_bt3p0_15",ln={tipbar:vv,tipbar__carousel:bv,"tipbar__close-btn":"_tipbar__close-btn_bt3p0_29","tipbar-item":"_tipbar-item_bt3p0_37","tipbar-item__coupon":"_tipbar-item__coupon_bt3p0_45"},jv=({coupon:e,feedbackTitle:t,feedbackDescription:n,...s})=>{const{CONSTANTS:o}=ut(),{addCouponSeller:a,cartStore:i}=ve(),[c,l]=g.useState({status:!1,showSnackBar:!1}),[u,m]=g.useState(!1),[f,p]=g.useState(!1),h=async()=>{if(!i.items.length){p(!0);return}(await a(e,"coupon")).code===200?l({status:!0,showSnackBar:!0}):m(!0)};return g.useEffect(()=>{c.showSnackBar&&setTimeout(()=>{l(_=>({..._,showSnackBar:!1}))},o.TIPBAR_CONFIGS.snackbar_timeout)},[c.showSnackBar]),g.useEffect(()=>{u&&setTimeout(()=>{m(!1)},o.TIPBAR_CONFIGS.snackbar_timeout)},[u]),g.useEffect(()=>{f&&setTimeout(()=>{p(!1)},o.TIPBAR_CONFIGS.snackbar_timeout)},[f]),r.jsxs(r.Fragment,{children:[r.jsx(d.Button,{...s,onClick:h,disabled:c.status,className:ln["tipbar-item__coupon"],children:c.status?`${o.TIPBAR_CONFIGS.coupon_applied_message}`:`${o.TIPBAR_CONFIGS.coupon_default_message}`}),c.showSnackBar&&(t||n)&&r.jsx(Dt,{title:t,subtitle:n,Z_INDEX_WAR:o.Z_INDEX_WAR},`feedback-coupon-${e}`),u&&r.jsx(Dt,{title:o.TIPBAR_CONFIGS.coupon_error_title,subtitle:o.TIPBAR_CONFIGS.coupon_error_message,Z_INDEX_WAR:o.Z_INDEX_WAR},`error-coupon-${e}`),f&&r.jsx(Dt,{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}`)]})},Cv=({title:e,description:t,style:n,mode:s,className:o})=>r.jsx(d.TextStructure.Root,{children:r.jsxs(d.TextStructure.DivWrapper,{mode:s,className:o,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})]})}),Sv=({coupon:e,...t})=>{const{CONSTANTS:n}=ut();return r.jsx(d.Copy,{...t,iconCopy:n.ICONS.copy,iconSuccess:n.ICONS.check,children:e})},wv=({staticZone:e,type:t,className:n,description:s,title:o})=>{const{mode:a}=ut();if(t==="countdown")return r.jsx(xv,{dateEnd:e.countDownEndDate,size:"x-small",mode:a});if(t==="coupon"){const i=d.helpers.ValidateProp({fieldTypes:Mt.Mode,property:e.couponButtonMode,fallback:"default"}),c=d.helpers.ValidateProp({fieldTypes:Mt.VariantsExtended,property:e.couponButtonVariant,fallback:"primary"});return e.coupon?r.jsx(jv,{coupon:e.coupon,mode:i,variant:c,feedbackTitle:e.couponFeedbackTitle,feedbackDescription:e.couponFeedbackDescription}):null}if(t==="copy"){const i=d.helpers.ValidateProp({fieldTypes:Mt.Mode,property:e.couponButtonMode,fallback:"default"});return e.coupon?r.jsx(Sv,{coupon:e.coupon,mode:i}):null}return r.jsx(Cv,{title:o,description:s,mode:a,className:n})},Pa=({handleCloseTipbar:e,mode:t})=>{const{CONSTANTS:n}=ut();return r.jsx(d.Button,{title:"fechar tipbar",className:ln["tipbar__close-btn"],onClick:e,variant:"tertiary",mode:t,adornment:{start:r.jsx(d.Icon,{name:n.ICONS.close})}})},Pv=({children:e,mode:t="default",showCarouselArrows:n=!0,slideTranstionTimer:s})=>{const{carouselProps:o,CONSTANTS:a}=ut(),i=g.useRef(null),c=(u,m)=>{var f,p;u.stopPropagation(),u.preventDefault(),m==="prev"?(f=o.controller)==null||f.prevPage():(p=o.controller)==null||p.nextPage(),i.current&&(clearInterval(i.current),l())},l=g.useCallback(()=>{if(s&&o.controller){const u=setInterval(()=>{var m;(m=o.controller)==null||m.nextPage()},s);i.current=u}},[s,o]);return g.useEffect(()=>(l(),()=>{i.current&&clearInterval(i.current)}),[s,l]),r.jsxs(d.Carousel.Root,{innerRef:u=>{o.initialize(u)},className:ln.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})}})]})},Ev=({children:e,className:t})=>{const{hasCarousel:n,mode:s,hasCloseBtn:o,backgroundStyle:a,showCarouselArrows:i,slideTranstionTimer:c,handleCloseTipbar:l}=ut(),u=n&&i;return r.jsx("div",{style:a,"data-hasclosebtn":o,className:d.helpers.classNameConcat(ln.tipbar,t),children:n?r.jsxs(r.Fragment,{children:[r.jsx(Pv,{mode:s,showCarouselArrows:u,slideTranstionTimer:c,children:e}),o&&r.jsx(Pa,{handleCloseTipbar:l,showCarouselArrows:u,mode:s})]}):r.jsxs(r.Fragment,{children:[e,o&&r.jsx(Pa,{handleCloseTipbar:l,mode:s})]})})},Nv=({children:e,highlightFirstSection:t,...n})=>{const{hasCarousel:s,carouselProps:o}=ut(),a=r.jsx("div",{...n,className:ln["tipbar-item"],children:e});return s?r.jsx(d.Carousel.Item,{style:o.itemsStyles,children:a}):a},jm=({className:e})=>{const{isOpen:t,slices:n}=ut();return n.length&&t?r.jsx(Ev,{children:n.map((s,o)=>{var a;return r.jsx(r.Fragment,{children:r.jsx(on,{href:s.link,children:r.jsx(Nv,{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)=>r.jsx(wv,{staticZone:s,type:i.type,title:i.title,description:i.description,className:e},`tipbar-slice-field-${c}`)):null})})},`tipbar-slice-${o}`)})}):null};jm.displayName="TipBar.Root";const bs=({className:e,...t})=>r.jsx(yv,{...t,children:r.jsx(jm,{className:e})});bs.displayName="TipBar";const Iv=({CONSTANTS:e,data:t})=>{const{pathname:n}=le(),{tipbarRef:s}=Pe(),o=c=>{const l=t==null?void 0:t.find(u=>{var m,f,p,h,_;return((f=(m=u.staticConfig)==null?void 0:m.staticConfig)==null?void 0:f.deviceType)===c&&((_=(h=(p=u.staticConfig)==null?void 0:p.staticConfig)==null?void 0:h.paths)==null?void 0:_.includes(n))});return l||(t==null?void 0:t.find(u=>{var m,f,p,h,_,y;return((f=(m=u.staticConfig)==null?void 0:m.staticConfig)==null?void 0:f.deviceType)===c&&(!((h=(p=u.staticConfig)==null?void 0:p.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 r.jsxs("div",{ref:s,className:F.responsive["responsive-flex"],children:[i&&r.jsx("div",{className:F.responsive["responsive-mobile-flex"],children:r.jsx(bs,{data:i,CONSTANTS:e})}),a&&r.jsx("div",{className:F.responsive["responsive-desktop-flex"],children:r.jsx(bs,{data:a,CONSTANTS:e})})]})},Rv=({SectionZone:e,name:t,storeId:n,previewId:s})=>{const[o,a]=g.useState();return g.useEffect(()=>{o||F.fetchContentType("search",{name:t,storeId:n,previewId:s}).then(i=>{i!=null&&i.data&&Array.isArray(i.data)&&a(i.data[0])})},[]),r.jsx(e,{data:o??[]})},Tv=e=>{const t=Ov(kv(e));return Av(t)},Av=e=>{const t=[];for(const n in e)t.push(...e[n]);return t},kv=e=>!e||!Array.isArray(e)?{}:e==null?void 0:e.reduce((t,n)=>{if(n!=null&&n.cidade){let s=t[n==null?void 0:n.cidade];s===void 0&&(s=t[n==null?void 0:n.cidade]=[]),s.push(n)}return t},{}),Ov=e=>{if(!e||!Object.keys(e).length)return{};const t=Object.keys(e).sort((s,o)=>s.localeCompare(o)),n={};for(const s of t)n[s]=e[s];return n},Lv=({content:e,data:t,showVendor:n,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 m=await u.json();c(Tv(m))}catch(u){console.error(u)}})()},[o]),!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:s,LPLOJAS_TEMPLATE_RETURN_BUTTON:a})})]})},Mv={Banner:gv,BannerSection:an,BennefitsBarSection:dm,SingleBannerSection:oo,TextContentSection:fm,BannerCarousel:um,TextAccordionSection:pm,TipbarScreening:Iv,ImageGrid:cm,SearchPageScreening:F.SearchPageScreening,SearchContent:Rv,NewsletterSection:mm,PDPProductCarousel:gm,ProductCarousel:ym,EmbedLive:lm,PopupModalSection:xm,SectionZone:vm,LPStoresClientWrapper:Lv},Dv={Components:Mv,helpers:Qg};exports.cms=Dv;exports.contexts=yc;exports.data=$s;exports.layout=kn;exports.scripts=_v;