PageSourceSearch

https://www.kazidomi.com/_next/static/js/4462.3274b2f7.js

js kazidomi.com collected 2026-10-03 19:18:27 UTC 80,574 bytes, 10 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1330,4462],{10431:(e,s,t)=>{t.d(s,{A:()=>o});var a=t(95155);t(12115);var l=t(61665),i=t(48178),n=t(85870),r=t(48407),c=t(67479),d=t(87979);let o=({country:e,className:s,active:t})=>{let o=(0,l.useLocale)(),m=(0,c.useCartStore)(e=>e.cart),u=(0,i.qQ)(o,e),h=`flex items-center py-2 pl-4 pr-8 
2                     gap-4 text-cta-regular after:right-4 w-full 
3                     ${s} ${t?"bg-tint-24":""}`,{setCountry:x,loading:p}=(0,r.SH)(),g=()=>{x(e)};return(0,a.jsxs)(n.A,{wrappers:[m?.shippingAddress?e=>(0,a.jsx)("div",{className:h,children:e}):e=>(0,a.jsx)("button",{type:"button",className:h,onClick:g,children:e})],children:[p?(0,a.jsx)(d.Q0,{}):(0,a.jsx)("img",{className:"rounded",src:`/flags/${e.toUpperCase()}.svg`,alt:u,width:24,height:19}),u]})}},28810:(e,s,t)=>{t.r(s),t.d(s,{default:()=>P});var a=t(95155),l=t(12115),i=t(97810),n=t.n(i),r=t(61665),c=t(63989),d=t(48407),o=t(89517);let m=[{test:/épicerie sal|epicerie sal|salty grocery|savoury grocery|zoute kruidenierswaren/i,icon:"Soup",tile:"bg-alimentation4"},{test:/épicerie sucr|epicerie sucr|sweet grocery|zoetwaren/i,icon:"Cookie",tile:"bg-tint-24"},{test:/santé|sante|bien-être|bien-etre|wellness|health|welzijn|gezondheid/i,icon:"HeartPulse",tile:"bg-sant4"},{test:/boisson|beverage|drank/i,icon:"CupSoda",tile:"bg-boissons4"},{test:/hygiène|hygiene|hygiëne|beauté|beaute|beauty|schoonheid/i,icon:"Sparkles",tile:"bg-maisons3"},{test:/sport/i,icon:"Dumbbell",tile:"bg-bB4"},{test:/bébé|bebe|enfant|baby|child|kind/i,icon:"Baby",tile:"bg-boissons5"},{test:/maison|home|huis/i,icon:"House",tile:"bg-beaut4"},{test:/régime|regime|diet|dieet|diëten|dieten/i,icon:"Leaf",tile:"bg-sant5"},{test:/offre|promo|deal/i,icon:"BadgePercent",tile:"bg-alimentation1"},{test:/nouveau|nieuw|what's new/i,icon:"Sparkle",tile:"bg-grey6"},{test:/bestseller/i,icon:"Trophy",tile:"bg-grey6"},{test:/stock/i,icon:"PackageCheck",tile:"bg-grey6"},{test:/fréquent|frequent|already ordered|veelgekocht|reeds besteld/i,icon:"Repeat",tile:"bg-grey6"},{test:/marque|brand|merk/i,icon:"Store",tile:"bg-grey6"},{test:/vrac|bulk/i,icon:"PackageOpen",tile:"bg-grey6"},{test:/recette|recipe|recept/i,icon:"ChefHat",tile:"bg-grey6"},{test:/lifestyle|blog/i,icon:"Compass",tile:"bg-grey6"},{test:/langue|pays|language|country|taal|land/i,icon:"Globe",tile:"bg-grey6"}],u={icon:"Tag",tile:"bg-grey6"},h=e=>{let s=m.find(({test:s})=>s.test(e??""));return s?{icon:s.icon,tile:s.tile}:u};var x=t(56255);let p=({label:e,children:s})=>(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-[10px] font-medium tracking-[.07em] uppercase text-grey4 px-5 pt-5 pb-3",children:e}),(0,a.jsx)("ul",{children:s})]});var g=t(50003),b=t(78512);let f=({icon:e,label:s,onClick:t,url:l,isPromo:i})=>{let n=(0,r.useTranslations)(),c=(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:`w-10 h-10 rounded-xl flex items-center justify-center shrink-0 ${i?"bg-alimentation1":"bg-grey6"}`,children:(0,a.jsx)(b.A,{name:e,width:19,height:19,"aria-hidden":!0,color:i?"#FFF":"#000"})}),(0,a.jsx)("span",{className:"flex-1 text-body-15 text-left",children:s}),i?(0,a.jsx)("span",{className:"text-xs font-medium text-white bg-alimentation1 px-2 py-1 rounded-full",children:n("mobile-nav.selections.offer-badge")}):t?(0,a.jsx)(b.A,{name:"ChevronRight",width:18,height:18,"aria-hidden":!0}):null]});return t?(0,a.jsx)("button",{type:"button",onClick:t,className:"flex items-center gap-3 py-2 px-5 w-full text-left hover:bg-grey-taupe active:bg-dark-taupe transition duration-300",children:c}):(0,a.jsx)(g.default,{href:l,title:s,className:`flex items-center gap-4 py-2 px-5 w-full transition duration-300 ${i?"bg-alimentation5 hover:bg-alimentation4 text-alimentation1":"hover:bg-grey-taupe active:bg-dark-taupe"}`,children:c})};var j=t(90488);let y=({target:e})=>{let s=(0,r.useTranslations)();return(0,a.jsx)("div",{className:"absolute inset-0 bg-white flex flex-col transition-transform duration-300 ease-in-out",style:{transform:e?"translateX(0)":"translateX(101%)"},"aria-hidden":!e,children:(0,a.jsx)("div",{className:"flex-1 overflow-y-auto",children:e?(0,a.jsxs)(a.Fragment,{children:[e.viewAllHref?(0,a.jsx)("div",{className:"p-4 pb-2 bg-white",children:(0,a.jsxs)(g.default,{href:e.viewAllHref,className:"rounded-2xl bg-tint-24 hover:bg-generic2 active:bg-tint-72 transition duration-300 text-body-15 items-center font-medium flex justify-between p-4",title:`${s("mega-menu.view-all")} ${e.title}`,children:[s("mega-menu.view-all"),(0,a.jsx)(b.A,{name:"ChevronRight",width:18,height:18,"aria-hidden":!0})]})}):null,(0,a.jsx)("ul",{children:e.items.map(e=>(0,a.jsx)("li",{children:(0,a.jsx)(g.default,{href:e.url,title:e.label,className:"text-body-15 inline-flex items-center py-4 pr-5 pl-4 w-full bg-white hover:bg-grey-taupe active:bg-dark-taupe transition duration-300 leading-none",children:e.label})},e.key))}),n()(e.banners)?null:(0,a.jsxs)("div",{className:"border-t border-grey6 py-5 px-4",children:[(0,a.jsx)("div",{className:"text-[10px] font-medium tracking-[.07em] uppercase text-grey4 pb-3",children:s("mega-menu.featured")}),(0,a.jsx)("div",{className:"grid gap-4 min-sm:gap-8",children:e.banners.map(e=>(0,a.jsx)(j.A,{image:e.image,text:e.text,url:e.url,classes:"!pb-[40%]"},e.text))})]})]}):null})})};
3var v=t(74903),N=t(42371),w=t(51346);let k=null,_=null,A=()=>{let e=(0,r.useTranslations)(),{user:s}=(0,d.Jd)(),[t,i]=(0,l.useState)(k??""),[n,c]=(0,l.useState)(null===k),[,o]=(0,v.Cj)();return(0,l.useEffect)(()=>{if(null!==k)return;let e=!0;return(null!==k?Promise.resolve(k):(!_&&(_=(0,N.Aj)().then(e=>e?.data?.data?.code_to_share??"").catch(()=>"").then(e=>(k=e,e))),_)).then(s=>{e&&(i(s),c(!1))}),()=>{e=!1}},[]),(0,a.jsx)("div",{className:"mx-4 mt-3 mb-1",children:n?(0,a.jsx)("div",{className:"rounded-2xl skeleton-box w-full h-[186.5px]"}):t?(0,a.jsxs)("div",{className:"rounded-2xl bg-charcoal p-4 text-white",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("span",{className:"text-body-14 font-medium",children:e("mobile-nav.kplus-banner.greeting",{name:s?.firstName??""})}),(0,a.jsxs)("span",{className:"inline-flex items-center gap-1 bg-sant5 text-sant1 text-[10px] font-medium px-2 py-1 rounded-full",children:[(0,a.jsx)("img",{src:"/logo/k-plus-logo-green.svg",alt:"",className:"h-2.5"}),e("mobile-nav.kplus-banner.member-pill")]})]}),(0,a.jsx)("div",{className:"text-body-21 font-faro tracking-[.4px] mt-3 mb-2",children:e("mobile-nav.kplus-banner.title")}),(0,a.jsx)("div",{className:"text-body-12 font-light opacity-80 mb-3",children:e("mobile-nav.kplus-banner.subtitle")}),(0,a.jsxs)("button",{type:"button",onClick:()=>{t&&o(t).then(()=>(0,w.P)(e("account.referral.code-copyed"),null,"success"))},className:"bg-white hover:bg-generic2 active:bg-tint-72 transition duration-300 text-charcoal text-body-13 font-medium px-4 h-10 rounded-full inline-flex items-center gap-2",children:[(0,a.jsx)(b.A,{name:"UserPlus",width:16,height:16,"aria-hidden":!0,strokeWidth:2.5}),e("mobile-nav.kplus-banner.cta"),(0,a.jsx)("span",{className:"text-xs font-medium bg-tint-24 text-charcoal px-2 py-0.5 rounded-md",children:t})]})]}):null})};var C=t(72733),$=t(65739);let S=()=>{let e=(0,r.useTranslations)(),s=(0,r.useLocale)();return(0,a.jsxs)("div",{className:"flex-none bg-membership1 p-5 pb-6 flex items-center gap-2",children:[(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("div",{className:"text-white font-faro text-body-17 tracking-[.4px]",children:e("mobile-nav.visitor-banner.title")}),(0,a.jsx)("div",{className:"text-white text-xs mt-2",children:e("mobile-nav.visitor-banner.subtitle")})]}),(0,a.jsx)($.Ay,{size:"md",link:C.Ay.take_membership(s),children:e("mobile-nav.visitor-banner.cta")})]})};var z=t(49687),F=t(97377);let I=e=>"string"==typeof e?.label?e.label:e?.label?.data?.attributes?.title,M=e=>{if(!e)return null;try{return new URL(e,"https://placeholder.local").pathname.replace(/\/$/,"")}catch{return e}},P=({megamenu:e,categories:s,banners:t,links:i})=>{let m=(0,r.useTranslations)(),{user:u,isMember:g}=(0,d.Jd)(),b=(0,c.we)(e=>e.activeCategory),j=(0,c.we)(e=>e.openMobileCategory),v=(0,l.useMemo)(()=>s.map(e=>{let{icon:s,tile:t}=h(e.title),a=!n()(e.categories),l=`${e.title} ${e.bio?m("product.bio"):""}`;return{key:`category-${e.id}`,icon:s,tile:t,label:l,onClick:a?()=>j("categories",e.id,e.title):void 0,url:a?void 0:e.path}}),[s,m,j]),N=(0,l.useMemo)(()=>{let s=(e?.["menu-header-left"]??[]).map((e,s)=>{if(Object.keys(e).length<=1||e.cluster&&!(0,o.J)(u??null,e.cluster))return null;let t=I(e),{icon:a,tile:l}=h(t);return"section"===e.type?{key:`selection-${s}`,icon:a,tile:l,label:t,onClick:()=>j("selections",s,t)}:{key:`selection-${s}`,icon:a,label:t,isPromo:e.highlight,url:e.url}}).filter(Boolean),t=new Set(s.map(e=>M(e.url)).filter(Boolean));return[...s,...(i??[]).filter(e=>!t.has(M(e.link))).map((e,s)=>{let{icon:t,tile:a}=h(e.title);return{key:`custom-link-${s}`,icon:t,tile:a,label:e.title,url:e.link}})]},[e,i,u,m,j]),w=(0,l.useMemo)(()=>(e?.["menu-header-right"]??[]).map((e,s)=>{if(Object.keys(e).length<=1||e.cluster&&!(0,o.J)(u??null,e.cluster))return null;let t=I(e),{icon:a,tile:l}=h(t);return"section"===e.type?{key:`inspiration-${s}`,icon:a,tile:l,label:t,onClick:()=>j("inspirations",s,t)}:{key:`inspiration-${s}`,icon:a,tile:l,label:t,url:e.url}}).filter(Boolean),[e,u,j]),k=(0,l.useMemo)(()=>({key:"settings-language",icon:"Globe",tile:"bg-grey6",label:m("nav.language_and_country"),onClick:()=>j("settings","language",m("nav.language_and_country"))}),[m,j]),_=(0,l.useMemo)(()=>
3{if(!b||"settings"===b.group)return null;if("categories"===b.group){let e=s.find(e=>e.id===b.id);if(!e)return null;let a=t.find(s=>Number(s.category?.idSymfony)===e.id);return{title:e.title,viewAllHref:e.path,items:(e.categories??[]).map(e=>({key:e.id,label:`${e.title} ${e.bio?m("product.bio"):""}`,url:e.path})),banners:(a?.banners??[]).map(e=>({text:e.text,image:e.image,url:e.link}))}}let a="selections"===b.group?"menu-header-left":"menu-header-right",l=(e?.[a]??[])[b.id];return l?{title:I(l),items:(l.links??[]).filter(e=>!e.cluster||(0,o.J)(u??null,e.cluster)).map((e,s)=>({key:`${b.group}-link-${s}`,label:I(e),url:e.url})),banners:(l.banners?.banners??[]).map(e=>({text:e.text,image:e.image,url:e.link.url}))}:null},[b,s,t,e,u,m]),{key:C,...$}=k;return(0,a.jsxs)("aside",{className:"bg-white min-md:rounded-r-xl h-full overflow-hidden transition flex flex-col",children:[(0,a.jsx)(x.A,{}),(0,a.jsxs)("div",{className:"relative flex-1 overflow-hidden",children:[(0,a.jsxs)("div",{className:"h-full overflow-y-auto overscroll-contain",children:[g()?(0,a.jsx)(A,{}):null,(0,a.jsx)(p,{label:m("mobile-nav.groups.categories"),children:v.map(({key:e,...s})=>(0,a.jsx)("li",{children:(0,a.jsx)(f,{...s})},e))}),(0,a.jsx)(p,{label:m("mobile-nav.groups.selections"),children:N.map(({key:e,...s})=>(0,a.jsx)("li",{children:(0,a.jsx)(f,{...s})},e))}),(0,a.jsx)(p,{label:m("mobile-nav.groups.inspirations"),children:w.map(({key:e,...s})=>(0,a.jsx)("li",{children:(0,a.jsx)(f,{...s})},e))}),(0,a.jsx)(p,{label:m("mobile-nav.groups.settings"),children:(0,a.jsx)("li",{children:(0,a.jsx)(f,{...$})},C)}),(0,a.jsx)("div",{className:"h-4"})]}),(0,a.jsx)("div",{className:"absolute inset-0 bg-white flex flex-col transition-transform duration-300 ease-in-out shadow-[-14px_0_30px_-20px_rgba(0,0,0,.4)]",style:{transform:b?.group==="settings"?"translateX(0)":"translateX(101%)"},"aria-hidden":b?.group!=="settings",children:(0,a.jsxs)("div",{className:"flex-1 overflow-y-auto",children:[(0,a.jsx)(z.A,{className:"justify-center border-b border-grey6 py-4"}),(0,a.jsx)(F.default,{parentClasses:"overflow-y-auto",countryClasses:"text-body-15 py-spacing-2"})]})}),(0,a.jsx)(y,{target:_})]}),g()?null:(0,a.jsx)(S,{})]})}},35757:(e,s,t)=>{t.r(s),t.d(s,{default:()=>d});var a=t(95155),l=t(12115),i=t(14606),n=t(69687),r=t(65739),c=t(73321);let d=({children:e,title:s,isOpen:t,setIsOpen:d,onClose:o,footer:m})=>{let u=(0,c.usePathname)(),h=()=>{o&&o(),d(!1)};return(0,l.useEffect)(()=>{d(!1)},[u]),(0,a.jsx)(i.e,{appear:!0,show:t,as:l.Fragment,children:(0,a.jsxs)(n.Dialog,{onClose:h,children:[(0,a.jsx)(i.e.Child,{as:l.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:(0,a.jsx)("div",{className:"fixed inset-0 bg-black bg-opacity-25 z-40"})}),(0,a.jsx)(i.e.Child,{as:l.Fragment,enter:"transition duration-300 ease-out",enterFrom:"transform translate-y-[20px] opacity-0",enterTo:"transform translate-y-[0] opacity-100",leave:"transition duration-300 ease-out",leaveFrom:"transform translate-y-[0] opacity-100",leaveTo:"transform translate-y-[20px] opacity-0",children:(0,a.jsxs)(n.Dialog.Panel,{className:"fixed bottom-0 top-0 w-full left-0 right-0 bg-white overflow-hidden h-[100dvh] z-50 flex-col flex",children:[(0,a.jsxs)("div",{className:"flex justify-center relative border-b border-grey-light h-[54px] items-center p-4",children:[(0,a.jsx)("span",{className:"text-body-15 font-medium",children:s}),(0,a.jsx)("div",{className:"absolute right-4",children:(0,a.jsx)(r.Jn,{onClick:h})})]}),(0,a.jsxs)("div",{className:"flex flex-col max-h-[calc(100dvh-54px)] h-full",children:[(0,a.jsx)("div",{className:"overflow-y-auto flex-1 min-h-0 flex flex-col",children:e}),m&&(0,a.jsx)("div",{className:"shrink-0 p-4 border-t-[.5px]",children:m})]})]})})]})})}},39236:(e,s,t)=>{t.d(s,{A:()=>c});var a=t(95155);t(12115);
3var l=t(61665),i=t(72733),n=t(73321),r=t(48407);let c=({classes:e,icon:s})=>{let t=(0,l.useTranslations)(),c=(0,l.useLocale)(),{replace:d}=(0,n.useRouter)(),{logout:o}=(0,r.As)({onAuthSuccess:()=>{d(i.Ay.home(c))}}),m=async e=>{e.preventDefault(),await o()};return(0,a.jsx)("button",{className:e,type:"button","data-testid":"logout-btn",onClick:m,children:(0,a.jsxs)("div",{className:"flex gap-3 items-center",children:[s&&s,t("account-nav.logout")]})})}},42586:(e,s,t)=>{t.d(s,{default:()=>L});var a=t(95155),l=t(12115),i=t(29822),n=t.n(i),r=t(73321),c=t(61665),d=t(74903),o=t(18895),m=t(48407),u=t(14599),h=t(16099),x=t(72733),p=t(45404),g=t.n(p),b=t(97810),f=t.n(b),j=t(98500),y=t.n(j),v=t(35976),N=t(59600),w=t(97366),k=t(48178),_=t(65739),A=t(64603);let C=({name:e,url:s,handleClick:t,isActive:l,item:i})=>{let{shippingCountry:n,isMember:r}=(0,m.Jd)(),d=(0,c.useLocale)(),u=(0,c.useTranslations)(),h=i.country_prices.BE;void 0!==i.country_prices[n()]&&(h=i.country_prices[n()]);let p=r()?`${h.memberPrice.toFixed(2)}€`:`${h.standardPrice.toFixed(2)}€`,{getQuantityWithUnit:g,isProductInCart:b,isB2bBlocked:f}=(0,m.Bj)(i),j=`${i.brand.name?`${i.brand.name} -`:""} ${e} ${g()}`,C=(0,o.d)(991),$=i.available_stock??("number"==typeof i.stock?i.stock:void 0)??(!1!==i.active&&"not-available"!==i.badge?i.quantity_adding_step??1:0),{currentQuantity:S,isEditing:z,setIsEditing:F,availableStock:I}=(0,m.DT)({legacyId:i.legacyId,isFresh:i.is_fresh,qtyAddStep:i.quantity_adding_step,initialStock:$,initialAvailableForOrder:!1!==i.active&&"not-available"!==i.badge&&$>0}),M=I>0&&"not-available"!==i.badge||b,P=i?.image1_thumbnail?(0,k.yY)(i.image1_thumbnail,"mxw_100"):(0,k.yY)(i.image1,"mxw_100");return C?(0,a.jsx)(w.Ay,{data:i}):(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)("div",{className:`relative flex items-center gap-4 hover:bg-grey7 hover:border-grey6 p-2 rounded-2xl border border-transparent ${l?"bg-grey7 !border-grey6":""}`,children:[(0,a.jsx)("div",{className:"rounded-xl bg-packshot p-2 flex-center shrink-0",children:(0,a.jsx)("img",{src:P,className:"object-contain w-[64px] h-[64px]",alt:j,width:128,height:128})}),(0,a.jsxs)("div",{className:"flex flex-col gap-spacing-05 w-[calc(100%-108px)]",children:[(0,a.jsx)(y(),{href:s,title:e,onMouseDown:t,className:"text-body-15 font-light after:absolute after:top-0 after:bottom-0 after:right-0 after:left-0 after:z-0 after:content-['']",children:j}),(0,a.jsxs)("div",{className:"flex items-center gap-4",children:[f?null:(0,a.jsx)("span",{className:"text-body-15 font-medium",children:p}),null!==i.yuka_score&&void 0!==i.yuka_score?(0,a.jsx)(A.$W,{score:i?.yuka_score,variant:"small"}):null]})]}),(0,a.jsx)("div",{className:"relative z-[10] w-[100px] shrink-0 flex justify-end",children:f?null:i.is_gift_card?(0,a.jsx)(_.Ay,{size:"md",icon:{src:(0,k.yY)("/icons/basket-white.svg","mxw_64"),width:24,height:24,alt:u("giftcard.add-to-basket")},link:x.Ay.giftcard(d,i.legacyId),title:u("giftcard.add-to-basket"),className:"label-hidden !p-0 w-9 h-9"}):M?(0,a.jsx)(v.A,{isEditing:z,setIsEditing:F,legacyId:i.legacyId,quantity:S,plusDisabled:I<=0,qtyAddStep:i.quantity_adding_step,classes:"label-hidden !p-0 !w-10 !h-10",iconLabel:!0}):(0,a.jsx)(N.A,{iconLabel:!0,productId:i.legacyId,buttonClasses:"!w-10 !h-10 !p-0 ml-auto"})})]})})},$=({url:e,handleClick:s,isActive:t,handleSpanClick:l,name:i})=>(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(y(),{href:e,title:i,onMouseDown:s,className:`recent-search__link md:h-8.5 text-[14px] flex items-center md:!px-5 md:!rounded-full transition duration-300 md:bg-grey6 flex hover:bg-generic2 ${t?"bg-[#FFD78C]":""}`,children:(0,a.jsx)("span",{onMouseDown:l,children:i})})}),S=({item:e,type:s,url:t,name:i,brand:n,index:r,activeIndex:c})=>{let d=(0,l.useRef)(null),o=c>-1&&c===r,m=e=>{let s=e.target?.href;s&&(window.location.href=s)},u=e=>{let s=e.target.parentNode?.href;s&&(window.location.href=s)};return(0,a.jsx)("li",{className:"recent-search focus:outline-none shrink-0",onMouseDown:e=>{let s=e.target.firstChild?.href;s&&(window.location.href=s)},tabIndex:r,ref:d,children:"product"===s?(0,a.jsx)(C,{item:e,isActive:o,handleClick:m,handleSpanClick:u,name:i,url:t}):(0,a.jsx)($,{name:i,isActive:o,handleClick:m,handleSpanClick:u,url:t})})};var z=t(50003),F=t(25940);let I="https://www.kazidomi.com",M=["category.popup.the","category.popup.nuts","category.popup.cajou","category.popup.vrac","category.popup.aromatherapie","category.popup.Kazidomi"],P=({suggestions:e})=>{let s=(0,c.useTranslations)(),t=(0,c.useLocale)(),i=(0,l.useMemo)(()=>f()(e)?[]:e.filter(e=>e.label&&e.url),[e]);return(0,l.useMemo)(()=>M.map(e=>({label:s(e),url:`${I}/${t}/product/search?query=${s(e)}`})),[]),(0,a.jsxs)("div",{className:"pt-4",children:[(0,a.jsx)("span",{className:"text-[10px] font-medium tracking-[.07em] uppercase text-grey4 pb-3 block",children:"Suggestions"}),(0,a.jsxs)("ul",{className:"flex flex-wrap gap-2",children:[!f()(e)&&i.map(e=>(0,a.jsx)("li",{children:(0,a.jsx)(_.Ay,{size:"sm",className:"!border-0 !bg-grey6 hover:!bg-generic2",variant:"secondary",title:e.label,link:e.url,children:e.label})},`${e.label}-mostSearched`)),f()(e)&&M.map(e=>(0,a.jsx)("li",{className:"popular-search",children:(0,a.jsx)(z.default,{className:"popular-search__link",href:`${I}/${t}/product/search?query=${s(e)}`,children:s(e)})},`${e}-mostSearched`))]})]})},T=({data:e={},searchHistory:s,isOpen:t,value:i,onActiveIndexChange:n,onClose:o})=>{let m=(0,F.useGlobalStore)(e=>e.searchBarMenu),u=(0,c.useTranslations)(),h=(0,c.useLocale)(),p=(0,r.useRouter)(),b=(0,l.useRef)(null),f=(0,l.useRef)(null),[j,y]=(0,l.useState)(-1),[v,N]=(0,l.useState)(-1),{products:w={hits:[]},brands:k={hits:[]},categories:_={hits:[]},query:A=""}=e;(0,l.useEffect)(()=>{N(-1)},[i,t]),(0,l.useEffect)(()=>
3{if(n&&n(v),v<0)return;let e=b?.current,s=f?.current.children[v];if(s){let t=e.offsetTop,a=t+e.clientHeight,l=s.offsetTop,i=l+s.clientHeight;(l<t||i>a-20)&&s.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})}},[v]);let C=()=>g()(w.hits)+g()(k.hits)+g()(_.hits),$=()=>A&&C()>0;return(0,d.ML)("keydown",e=>{if(13===e.keyCode){if(f&&f.current){let e=f?.current.children[v],s=e?.firstChild?.href;if(o(),s)p.push(s);else{let e=`${x.Ay.search(h)}?query=${A}`;p.push(e)}}}else 9===e.keyCode||(40===e.keyCode?$()&&(e.preventDefault(),N(v===C()?0:v+1)):38===e.keyCode&&$()&&(e.preventDefault(),N(0===v?C():v-1)))}),(0,a.jsx)("div",{ref:b,className:`${t?"block":"hidden"} min-lg:border min-lg:rounded-b-lg min-lg:rounded-tr-lg min-lg:-mt-[1px] search-dropdown overflow-y-auto pb-5 px-5 border-t border-grey-light absolute lg:left-0 bg-white lg:right-0 lg:top-[118px] lg:h-[calc(100dvh-66px)] lg:w-full min-lg:w-[700px] min-header:w-[900px]`,children:(0,a.jsxs)("div",{role:"toolbar","aria-orientation":"vertical",className:`search-suggested search-result ${t?"show":""}`,children:[$()?(0,a.jsxs)("div",{ref:f,className:"flex min-md:border-b flex-col-reverse flex min-lg:flex-row",children:[w.hits.length?(0,a.jsx)("div",{className:"w-full min-lg:w-[65%] min-header:w-[573px] min-md:py-spacing-1 min-md:pr-spacing-1 min-lg:border-r",children:(0,a.jsxs)("div",{className:"py-4",children:[(0,a.jsx)("span",{className:"text-[10px] font-medium tracking-[.07em] uppercase text-grey4 pb-3 block",children:u("checkout.header.search.products")}),(0,a.jsx)("ul",{className:"grid min-sm:grid-cols-3 gap-1 grid-cols-2 min-lg:block",children:w?.hits.map((e,s)=>(0,a.jsx)(S,{item:e,type:"product",url:e.URL,name:e.name,brand:e.brand.name,index:s,activeIndex:v},`product-${e?.name}-${e?._id}`))})]})}):null,(0,a.jsxs)("div",{className:"py-2 min-md:pl-2 w-full min-lg:w-[35%] min-header:w-[calc(100%-550px)]",children:[_.hits.length?(0,a.jsxs)("div",{className:"py-4 mb-2 min-md:border-b",children:[(0,a.jsx)("span",{className:"text-[10px] font-medium tracking-[.07em] uppercase text-grey4 pb-3 block",children:u("checkout.header.search.categories")}),(0,a.jsx)("ul",{className:"md:flex md:gap-1 md:-mx-4 md:px-4 md:overflow-x-auto",children:_?.hits.map((e,s)=>(0,a.jsx)(S,{type:"category",url:e.URL,name:e.name,index:g()(w.hits)+s,activeIndex:v},`category-${e?.name}-${e?._id}`))})]}):null,k.hits.length?(0,a.jsxs)("div",{className:"py-spacing-1 md:mb-spacing-1",children:[(0,a.jsx)("span",{className:"block text-body-13 font-medium mb-spacing-1",children:u("checkout.header.search.brands")}),(0,a.jsx)("ul",{className:"md:flex md:gap-spacing-05 md:-mx-spacing-2 md:px-spacing-2 md:overflow-x-auto",children:k?.hits.map((e,s)=>(0,a.jsx)(S,{type:"brand",url:e.URL,name:e.name,index:g()(w.hits)+g()(_.hits)+s,activeIndex:v},`brand-${e?.name}-${e?._id}`))})]}):null]})]}):(0,a.jsx)(a.Fragment,{children:s.length>0&&(0,a.jsxs)("div",{className:"pt-4 min-header:w-[573px]",children:[(0,a.jsx)("span",{className:"text-[10px] font-medium tracking-[.07em] uppercase text-grey4 pb-3 block",children:u("checkout.header.search.recent-search")}),(0,a.jsx)("ul",{className:"md:flex md:gap-2 md:-mx-4 md:px-4 md:overflow-x-auto",children:s.map(e=>(0,a.jsx)(S,{type:"recentSearchesPlugin",url:`${I}/${h}/product/search?query=${e}`,name:e},`${e}-history`))})]})}),(0,a.jsx)(P,{suggestions:m})]})})};var R=t(90661),O=t(63989);let D=({close:e,isDefaultOpen:s,open:t})=>{let i=(0,c.useLocale)(),p=(0,r.useRouter)(),g=(0,r.usePathname)(),b=(0,l.useRef)(null),f=(0,l.useRef)(null),j=(0,o.d)(992),y=(0,O.on)(e=>e.isSearchOpen),[v,N]=(0,l.useState)(!1),[w,k]=(0,l.useState)(""),[_,A]=(0,l.useState)([]),[C,$]=(0,l.useState)(!1),[S,z]=(0,l.useState)({}),[F,I]=(0,l.useState)(-1),{queryFilters:M}=(0,m.UR)();(0,l.useEffect)(()=>{if(g.includes(x.Ay.search())){let{query:e}=M;!e||w||v||k(e)}},[g,M,w,v]);let P=(0,l.useCallback)(n()(e=>{$(!0);let s={query:e,currentPage:1,indexes:[`KAZIDOMI2_PRODUCT_CATEGORY_${i}`,`KAZIDOMI2_BRAND_${i}`,`KAZIDOMI2_ai_products_${i}`],maxResults:10,seeLastOrders:!1};(0,h.zh)(i,s).then(e=>{e.data&&z(e.data),$(!1)}).catch(e=>{$(!1)})},500),[]);return(0,l.useEffect)(()=>{A((0,R.j)(localStorage.getItem("searchHistory"),[],"search-bar:searchHistory"))},[]),(0,d.Wr)(f,()=>{j||N(!1)}),(0,l.useEffect)(()=>{k(""),N(!1)},[g]),(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)("div",{ref:f,id:"search-bar",className:` ${v?"expand":""} 
4          search-wrapper search-wrapper--big h-11
5          min-lg:relative lg:w-full lg:order-last lg:mt-3 min-lg:max-w-[700px] grow lg:flex`,children:[(0,a.jsx)("form",{className:"w-full grow flex items-center",onSubmit:e=>{if(e.preventDefault(),!(F>=0)){let e,s;N(!1),e=_.filter(e=>e!==w),A(s=[w,...e.slice(0,2)]),localStorage.setItem("searchHistory",JSON.stringify(s)),p.replace(`/${i}/product/search?query=${w}`)}},children:(0,a.jsx)(u.DO,{primary:!0,ref:b,loading:C,onChange:e=>{let s=e.target.value;v||N(!0),k(s),P(s)},onClear:e=>{e.preventDefault(),k(""),P(""),b.current&&b.current.focus()},onClose:y?()=>{N(!1),k(""),z({}),e&&e()}:null,onClick:()=>{N(!0),j&&t()},value:w})}),(0,a.jsx)(T,{value:w,data:S,isOpen:v||s,searchHistory:_,onKeyDown:()=>{b.current&&b.current.focus()},onActiveIndexChange:e=>I(e),onClose:()=>N(!1)})]})})},L=({suggestions:e})=>{let s=(0,O.on)(e=>e.setIsSearchOpen),t=(0,r.usePathname)(),i=(0,r.useSearchParams)();return(0,l.useEffect)(()=>{document.body.classList.remove("overflow-hidden"),s(!1)},[t,i]),(0,a.jsx)(D,{open:()=>{document.body.classList.add("overflow-hidden"),s(!0)},close:()=>{document.body.classList.remove("overflow-hidden"),s(!1)},suggestions:e})}},49687:(e,s,t)=>{t.d(s,{A:()=>c});var a=t(95155);t(12115);
5var l=t(61665),i=t(63830),n=t(48407);let r=({lang:e,selected:s,classes:t})=>(0,a.jsx)("a",{href:e.href.startsWith("https://nextdevbeta.kazidomi.net")?e.href.replace("https://nextdevbeta.kazidomi.net","http://nextdevbeta.kazidomi.net:3000"):e.href.startsWith("https://pre-prod.kazidomi.net")?e.href.replace("https://pre-prod.kazidomi.net","https://pre-prod.kazidomi.com"):e.href,"data-testid":`lang-${e.hreflang}`,className:`${s?"font-medium":"font-light"}
6                           ${t}
7                           px-5 py-2.5 rounded-full active:bg-tint-48 transition duration-300 ${s?"bg-tint-24":"bg-grey-taupe hover:bg-tint-24"}`,title:`${e.hreflang} site`,children:e.hreflang.toUpperCase()}),c=({isMenu:e,className:s})=>{let t=(0,l.useLocale)(),{languages:c}=(0,n.SH)(),d=`${s} p-4 gap-2 flex items-center`;return e?(0,a.jsx)("ul",{className:d,children:c.map((e,s)=>(0,a.jsx)("li",{children:(0,a.jsx)(i.t,{children:({active:s})=>(0,a.jsx)(r,{lang:e,selected:e.hreflang===t,classes:s?"!bg-tint-24":""})})},e.hreflang))}):(0,a.jsx)("ul",{className:d,children:c.map((e,s)=>(0,a.jsx)("li",{children:(0,a.jsx)(r,{lang:e,selected:e.hreflang===t})},e.hreflang))})}},56255:(e,s,t)=>{t.d(s,{A:()=>r});var a=t(95155);t(12115);
7var l=t(63989),i=t(78512),n=t(48178);let r=()=>{let e=(0,l.we)(e=>e.activeCategory),s=(0,l.we)(e=>e.closeMobileCategory),t=(0,l.we)(e=>e.closePanel);return(0,a.jsxs)("div",{className:"flex h-[55px] items-center p-4 bg-grey8 border-b border-grey6",children:[e?(0,a.jsxs)("button",{onClick:s,className:"flex items-center gap-1 transition duration-300 hover:underline underline-offset-4",type:"button",children:[(0,a.jsx)(i.A,{name:"ChevronLeft",width:18,"aria-hidden":!0}),(0,a.jsx)("span",{className:"text-body-15 max-w-[210px] overflow-hidden whitespace-nowrap text-ellipsis",children:e.title})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-body-17 font-medium mx-auto hidden",children:"Menu"}),(0,a.jsx)("img",{src:(0,n.yY)("/icons/logo.svg","mxw_167"),alt:"Kazidomi",width:167,height:25,className:"w-[88px] mx-auto"})]}),(0,a.jsx)("button",{className:"flex-center w-[30px] h-[30px] absolute right-4",type:"button",onClick:t,children:(0,a.jsx)(i.A,{name:"X",size:24,"aria-label":"Close"})})]})}},58592:(e,s,t)=>{t.d(s,{A:()=>a});let a=t(61330).default},61330:(e,s,t)=>{t.r(s),t.d(s,{default:()=>u});var a=t(95155),l=t(12115),i=t(14599),n=t(65739),r=t(99003),c=t(61665),d=t(87979),o=t(48407);let m=(0,t(37206).default)(()=>t.e(7376).then(t.bind(t,84995)),{loadableGenerated:{webpack:()=>[84995]},ssr:!1}),u=({isOpen:e,setIsOpen:s,productId:t})=>{let{register:u,handleSubmit:h,setFocus:x}=(0,r.mN)(),p=(0,c.useTranslations)(),{createWishlist:g,loading:b}=(0,o.iq)(),f=async e=>{await g(e,t||null),s(!1)};return(0,l.useEffect)(()=>{let s;return e&&(s=setTimeout(()=>{x("name")},50)),()=>clearTimeout(s)},[e]),(0,a.jsx)(a.Fragment,{children:e?(0,a.jsxs)(m,{classes:"!max-w-[400px] p-spacing-5",isOpen:e,setIsOpen:s,children:[(0,a.jsx)("h3",{className:"text-heading-30 font-faro mb-spacing-3",children:p("wishlist.create-wishlist-modal.title")}),(0,a.jsxs)("form",{onSubmit:h(f),children:[(0,a.jsx)("div",{className:"mb-spacing-3",children:(0,a.jsx)(i.jT,{label:p("wishlist.create-wishlist-modal.form.label"),inputProps:{...u("name",{required:p("wishlist.create-wishlist-modal.form.required.name")}),"data-testid":"wishlist-name-input"}})}),(0,a.jsxs)(n.Ay,{className:"w-full flex-center gap-spacing-1",disabled:b,"data-testid":"wishlist-create-submit",type:"submit",children:[p("wishlist.create-wishlist-modal.create"),b&&(0,a.jsx)(d.Q0,{theme:"dark"})]})]})]}):null})}},63830:(e,s,t)=>{t.d(s,{A:()=>u,t:()=>o});var a=t(95155),l=t(12115),i=t(98500),n=t.n(i),r=t(13416),c=t(14606),d=t(90106);let o=r.W1.Item,m=e=>e?(0,l.isValidElement)(e)?e:(0,a.jsx)("img",{...e}):null,u=({className:e,href:s,icon:t,children:i,posY:o,posX:u,onClick:h,renderButton:x,menuId:p,testId:g,dropDownClasse
7s:b,onClose:f})=>{let j=(0,l.useId)(),y=p??`dropdown-menu-${j}`,v="flex items-center justify-center w-10 h-10 shrink-0 rounded-full transition duration-300 hover:bg-grey6",N=(0,d.tv)({base:"absolute z-[1000000] rounded-xl bg-white rounded-xl w-full min-w-[260px] shadow-[0_8px_12px_rgba(29,29,27,.18)]",variants:{posX:{left:"right-0",right:"left-0",center:"left-1/2 -translate-x-1/2 before:-top-spacing-1 before:left-1/2 before:-translate-x-1/2 before:w-spacing-4 before:-z-[1] before:h-spacing-4 before:absolute before:bg-white before:flex before:rounded-md before:shadow-[0_8px_12px_rgba(29,29,27,.18)] before:-rotate-45"},posY:{top:"bottom-[calc(100%+8px)]",bottom:"top-[calc(100%+8px)]"}}})({posX:u,posY:o});return s?(0,a.jsx)(n(),{href:s,className:`${v} ${e}`,children:m(t)}):(0,a.jsx)("div",{className:"relative",children:(0,a.jsx)(r.W1,{as:"span",children:({open:s})=>{let n=(0,l.useRef)(s);return(0,l.useEffect)(()=>{f&&(n.current&&!s&&f?.(),n.current=s)},[s,f]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(r.W1.Button,{id:`${y}-button`,"data-testid":g,className:`${e} ${t&&v} outline-none`,onClick:h,children:[x&&x(),m(t)]}),(0,a.jsx)(c.e,{as:l.Fragment,enter:"transition duration-200 ease-out",enterFrom:"transform translate-y-[10px] opacity-0",enterTo:"transform translate-y-[0px] opacity-100",leave:"transition duration-200 ease-out",leaveFrom:"transform translate-y-[0px] opacity-100",leaveTo:"transform translate-y-[10px] opacity-0",children:(0,a.jsx)(r.W1.Items,{modal:!1,id:`${y}-items`,className:`${N} ${b} outline-none`,children:(0,a.jsx)("div",{className:"bg-white overflow-hidden rounded-xl",children:i})})})]})}})})};u.displayName="DropdownToggle"},65436:(e,s,t)=>{t.d(s,{Ay:()=>a.default,VS:()=>l.default,vj:()=>i.default});var a=t(72893),l=t(97377),i=t(42586)},65821:(e,s,t)=>{t.d(s,{mM:()=>u,zh:()=>m,Mk:()=>h});var a=t(95155),l=t(12115),i=t(61665),n=t(48407),r=t(78512),c=t(65739),d=t(52082);let o="__deselected__",m=()=>{let[e,s]=(0,l.useState)(!1),[t,m]=(0,l.useState)(null),x=(0,i.useLocale)(),p=(0,i.useTranslations)("popup-cart.gifts"),g=(0,n._$)(e=>e.cart),b=(0,n._$)(e=>e.fetchCart),{isMember:f,isAllowedToAccessWholesalePrice:j}=(0,n.Jd)(),{handleUpdateMembership:y}=(0,n.Ez)(),v=g?.giftTiers,N=e=>e.product?e.product.name:e.freeShipping?p("free-shipping"):e.reductionAmount?p("reduction",{amount:e.reductionAmount}):"",w=!f()&&!j(),k=async()=>{await y(!0),await b(x)},_=async e=>{let s=v?.selectedCartRuleId===e,t=v?.selectedCartRuleId??null;m(s?o:e);try{s?await (0,d.tg)(x,e):await (0,d.S$)(x,e),await b(x)}catch(e){m(t),console.error("[GiftsSelector] selectGiftTierOption failed:",e)}finally{m(null)}};if(w){let e=new Set,s=(v?.tiers??[]).flatMap(e=>e.options).filter(s=>{let t=N(s);return!e.has(t)&&(e.add(t),!0)});return(0,a.jsxs)("div",{className:"min-xs:rounded-xl bg-sant4 rounded-xl pb-4",children:[(0,a.jsxs)("div",{className:"flex p-4 gap-2 items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,a.jsx)("span",{style:{fontSize:"24px"},children:"\uD83C\uDF81"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"block text-body-13 min-xs:text-body-15 font-medium mb-0.5",children:p("title")}),(0,a.jsx)("span",{className:"block text-body-10 min-xs:text-body-13 leading-none",children:p("member-only")})]})]}),(0,a.jsx)(c.Ay,{className:"shrink-0 !px-3",size:"xsm",onClick:k,variant:"membership",children:p("join-cta")})]}),s.length>0&&(0,a.jsx)("ul",{className:"flex gap-2 overflow-x-auto px-4",children:s.map(e=>(0,a.jsx)("li",{className:"shrink-0",children:(0,a.jsxs)("div",{className:"rounded-lg border-2 border-grey-light p-3 bg-white opacity-70 flex items-center gap-2",children:[(0,a.jsx)("picture",{className:"flex-center bg-grey-taupe rounded-lg w-9 h-9 p-1 shrink-0",children:e.product?(0,a.jsx)("img",{src:e.product.image,alt:e.product.name,className:"object-contain w-full h-full",loading:"lazy"}):e.freeShipping?(0,a.jsx)(r.A,{name:"Package",size:20,"aria-hidden":!0}):(0,a.jsx)(r.A,{name:"Tag",size:20,"aria-hidden":!0})}),(0,a.jsx)("span",{className:"text-body-12 font-medium leading-tight",children:N(e)})]})},e.cartRuleId))})]})}if(!v?.tiers?.length)return null;let{cartAmount:A,nextTierRemaining:C,tiers:$,selectedCartRuleId:S}=v,z=t===o?null:t??S,F=$.map(e=>({value:e.threshold})),I=$.findIndex(e=>e.options.some(e=>e.cartRuleId===z)),M=I>=0?I:$.length-1;return(0,a.jsxs)("div",{className:"min-xs:rounded-xl bg-white p-4",children:[(0,a.jsxs)("div",{className:"flex justify-between items-end gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"bg-tint-48 rounded-full flex gap-1 items-center px-3 py-1.5 mb-2 w-fit",children:[(0,a.jsx)(r.A,{name:"Gift","aria-hidden":!0,size:16,strokeWidth:"1"}),(0,a.jsx)("span",{className:"uppercase text-body-10 leading-none",children:p("tiers-to-unlock")})]}),(0,a.jsx)("span",{className:"text-body-13 min-xs:text-body-15 block",children:C?p.rich("next-tier",{amount:parseFloat(C.toFixed(2)),strong:e=>(0,a.jsx)("strong",{children:e})}):p("all-unlocked")})]}),(0,a.jsxs)("div",{className:"flex flex-col items-end shrink-0",children:[(0,a.jsx)("span",{className:"block uppercase text-body-10 text-right",children:p("total-products")}),(0,a.jsx)("span",{className:"block font-medium",children:`${A} €`})]})]}),(0,a.jsx)("div",{className:"my-4",children:(0,a.jsx)(u,{cartValue:A,items:F})}),(0,a.jsxs)("button",{onClick:()=>s(e=>!e),type:"button",className:"rounded-xl bg-charcoal text-white w-full py-3 flex justify-between px-4",children:[(0,a.jsxs)("div",{className:"flex gap-2 items-center text-body-15",children:[(0,a.jsx)(r.A,{name:"Gift","aria-hidden":!0,size:16,color:"#ffc85f"}),(0,a.jsxs)("span",{children:[p("choose-gift")," ",(0,a.jsx)("span",{className:"font-light text-gray-300",children:p("tiers-label",{count:$.length})})]})]}),(0,a.jsx)(r.A,{className:`transition duration-300 ease-in-out ${e?"rotate-180":""}`,name:"ChevronDown","aria-hidden":!0,size:24,color:"white"})]}),(0,a.jsx)("div",{className:"pt-4",children:e?(0,a.jsx)(a.Fragment,{children:$.map((e,s)=>(0,a.jsx)("div",{className:`${0!==s?"mt-3":""}`,children:(0,a.jsx)(h,{tier:e,cartAmount:A,stepId:s+1,selectedCartRuleId:z,onSelectOption:_})},`${e.threshold}-${e.position}-gift-step`))}):z?(0,a.jsx)(h,{tier:$[M],cartAmount:A,stepId:M+1,selectedCartRuleId:z,onSelectOption:_,onlySelected:!0}):null})]})},u=({items:e,cartValue:s})=>{let t=e?e[e.length-1].value:0,l=e=>Math.min(Math.round(e/t*100),100);return(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("ul",{className:"absolute top-0 w-[calc(100%-20px)] flex items-center h-2 left-2",children:e&&e.map(e=>{let t=l(e.value);return(0,a.jsx)("li",{style:{left:`${t}%`},className:`w-3 h-3 rounded-full block border border-2 absolute z-10 bg-c
7harcoal border-charcoal 
8                            ${e.value>s?"bg-white":"bg-tint-48"}`},`${e.value}-gift`)})}),(0,a.jsx)("div",{style:{width:`${l(s)}%`},className:"bg-generic2 rounded-full absolute block h-2 transition-[width] ease-in duration-300"}),(0,a.jsx)("div",{className:"w-full bg-grey-taupe rounded-full block h-2"})]})},h=({tier:e,cartAmount:s,stepId:t,selectedCartRuleId:l,onSelectOption:n,onlySelected:c=!1})=>{let d=(0,i.useTranslations)("popup-cart.gifts"),{threshold:o,unlocked:m,selectable:u,options:h,remaining:x}=e,p=parseFloat((x??o-s).toFixed(2)),g=e=>e.product?e.product.name:e.freeShipping?d("free-shipping"):e.reductionAmount?d("reduction",{amount:e.reductionAmount}):"",b=c?h.filter(e=>e.cartRuleId===l):h;return(0,a.jsxs)("div",{className:`border rounded-xl py-4 ${m?"border-generic2 bg-tint-12":"border-dark-taupe bg-grey-taupe"}`,children:[(0,a.jsxs)("div",{className:"flex gap-3 px-4 mb-4 items-center",children:[(0,a.jsx)("div",{className:`rounded-lg px-3 py-2 flex-center border shrink-0 ${m?"bg-charcoal border-charcoal text-white":"bg-white border-grey-light"}`,children:(0,a.jsx)("span",{className:"font-medium text-body-12 leading-none",children:`${o} €`})}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex gap-2 mb-1 items-center",children:[(0,a.jsx)("span",{className:"font-medium text-body-13 block",children:d("tier-label",{number:t})}),m&&(0,a.jsxs)("div",{className:"flex gap-1 rounded-full bg-generic2 px-2 py-1 items-center shrink-0",children:[(0,a.jsx)(r.A,{name:"Check",size:14,"aria-hidden":!0}),(0,a.jsx)("span",{className:"text-body-10 uppercase leading-none",children:d("unlocked-badge")})]})]}),m?null:(0,a.jsx)("span",{className:"text-body-12 font-light block",children:u?d.rich("missing-amount-selectable",{amount:p,count:h.length,strong:e=>(0,a.jsx)("strong",{children:e})}):d.rich("missing-amount-auto",{amount:p,strong:e=>(0,a.jsx)("strong",{children:e})})})]})]}),0===b.length?null:(0,a.jsx)("ul",{className:"overflow-x-auto flex gap-2 px-4",children:b.map(e=>{let t=e.cartRuleId===l,i=s>=o;return(0,a.jsx)("li",{className:"shrink-0",children:(0,a.jsxs)("button",{title:d("choose-option",{name:g(e)}),onClick:i?()=>n(e.cartRuleId):void 0,disabled:!i,type:"button",className:`rounded-lg flex items-center text-left gap-3 border-2 p-3 bg-white transition duration-300 max-w-[280px] items-center
9                                    ${t?"border-charcoal":"border-grey-light"}
10                                    ${i?"hover:border-charcoal cursor-pointer":"cursor-default opacity-50"}`,children:[(0,a.jsx)("picture",{className:"flex-center bg-grey-taupe rounded-lg w-10 h-10 p-1 shrink-0",children:m?(0,a.jsxs)(a.Fragment,{children:[e.freeShipping&&(0,a.jsx)(r.A,{name:"Package",size:24,"aria-label":d("free-shipping")}),!e.freeShipping&&e.product&&(0,a.jsx)("img",{src:e.product.image,alt:e.product.name,className:"object-contain w-full h-full",loading:"lazy"}),!e.freeShipping&&!e.product&&(0,a.jsx)(r.A,{name:"Tag",size:24,"aria-hidden":!0})]}):(0,a.jsx)(r.A,{name:"Lock",size:20,"aria-label":d("locked")})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-body-13 font-medium leading-none line-clamp-1",children:g(e)}),e.reductionAmount&&!e.freeShipping&&(0,a.jsx)("span",{className:"text-body-12 font-light leading-none mt-2 line-clamp-1",children:d("reduction-value",{amount:e.reductionAmount})})]}),i&&(0,a.jsx)("div",{className:"ml-4",children:(0,a.jsx)("div",{className:`w-4 h-4 rounded-full border-2 flex-center transition duration-150 ${t?"border-charcoal bg-charcoal":"border-dark-taupe"}`,children:t&&(0,a.jsx)(r.A,{name:"Check",color:"white",size:11,"aria-hidden":!0})})})]})},`${e.cartRuleId}-option`)})})]})}},72893:(e,s,t)=>{t.d(s,{default:()=>ew});var a=t(95155),l=t(12115),i=t(50003),n=t(65739),r=t(61665),c=t(48407),d=t(72733),o=t(97810),m=t.n(o),u=t(4760),h=t(14606),x=t(74903),p=t(18895),g=t(7974),b=t(23805),f=t(73321),j=t(18064),y=t(67479);let v=({hideCartPopup:e})=>{let{user:s}=(0,c.Jd)(),t=(0,y.useCartStore)(e=>e.cart),i=(0,l.useMemo)(()=>t.productSales.sort((e,s)=>e.product.is_membership_product===s.product.is_membership_product?0:e.product.is_membership_product?-1:1).filter(e=>!e.product.is_membership_product||t.isIncludeMembership&&!s?.isMember),[t]);return(0,a.jsx)("ul",{className:"cart-popup__hits",children:i.length?i.map((s,l)=>(0,a.jsx)("li",{children:(0,a.jsx)(M,{hideCartPopup:e,product:s.product,quantity:s.quantity,cart:t})},`${s.product.title}-${l}`)):null})};var N=t(16804),w=t(65722);let k=({panel:e})=>{let s=(0,r.useLocale)(),t=(0,r.useTranslations)(),{isGuest:i,user:d}=(0,c.Jd)(),o=(0,N.A)(e=>e.lastOrder),u=(0,N.A)(e=>e.fetchLastOrder),h=(0,w.A)(e=>e.bestsellers),x=(0,w.A)(e=>e.fetchBestsellers),{handleReorder:p,canReorder:g,loading:b}=(0,c.SC)(o),f=m()(o)?{title:t("popup-cart.product-suggestion.bestsellers"),products:h}:{title:t("popup-cart.product-suggestion.previous-order"),products:o.productSales},j=e?`previous-order-panel ${f.products.length?"!w-[1040px]":null}`:`previous-order-cart ${f.products.length?"!opacity-100":null}`;return(0,l.useEffect)(()=>{(async()=>{m()(o)&&!i()&&await u(s),m()(o)&&m()(h)&&await x(s)})()},[d]),(0,a.jsxs)("div",{className:j,children:[(0,a.jsx)("div",{className:"previous-order__title",children:(0,a.jsx)("span",{className:"font-faro text-body-21 block text-center leading-none",children:f.title})}),(0,a.jsx)("div",{className:`previous-order__products-wrapper ${m()(o)?"previous-order__products-wrapper--small":null}`,children:(0,a.jsx)("ul",{className:"previous-order__products",children:m()(f.products)?null:f.products.map(e=>{let s={...e.product,images:e.product.images||[{thumbnail:e.product.image1}],title:e.product.title||e.product.name,quantityAddingStep:e.product.quantity_adding_step||e.product.quantityAddingStep,isFresh:e.is_fresh,legacyId:e.product.legacyId,link:e.product.link||e.product.URL,unitMemberPriceInclude:e.product.unitMemberPriceInclude||e.product.country_prices.BE.memberPrice,unitStandardPriceInclude:e.product.unitStandardPriceInclude||e.product.country_prices.BE.standardPrice,prices:e.product.prices};return(0,a.jsx)("li",{className:"[&:not(:last-child)]:mb-spacing-2",children:(0,a.jsx)(M,{product:s})},`previous-order-${s.id}`)})})}),m()(o)?null:(0,a.jsx)("div",{className:"flex-center w-[420px] pt-spacing-2 previous-order__cta",children:(0,a.jsx)(n.Ay,{onClick:()=>{p(o.id)},className:"w-full",loading:"REORDER"===b,children:t("popup-cart.product-suggestion.add-to-cart")})})]})};var _=t(48178);let A=()=>{let e=(0,y.useCartStore)(e=>e.cart),s=(0,r.useTranslations)(),{isMember:t,isAllowedToAccessWholesalePrice:l}=(0,c.Jd)();return(0,a.jsxs)("div",{className:"cart-resume-details-root !mb-0",children:[m()(e.discountSales)?null:(0,a.jsxs)("div",{className:"flex justify-between pt-spacing-2 border-t border-generic2 border-dashed",children:[(0,a.jsx)("span",{className:"leading-none text-body-15 font-light",children:s("popup-cart.promocode")}),(0,a.jsxs)("span",{className:"leading-none text-body-15 font-light",children:[e.total_include_discount_membership,"€"]})]}),(0,a.jsxs)("div",{className:"cart-resume-details__row !border-0 !py-spacing-2",children:[(0,a.jsx)("span",{className:"font-medium text-[20px] sm:text-body-17 sm:absolute sm:top-[12px]",children:s("popup-cart.total")}),(0,a.jsx)("div",{className:"cart-resume-details__row-right",children:l()?(0,a.jsxs)("span",{className:"flex flex-col items-end",children:[(0,a.jsxs)("span",{className:"font-medium text-body-21",children:[e.total_price_include.toFixed(2)," €"]}),(0,a.jsx)("span",{className:"wholesale-price-tag",children:"Prix fournisseur"})]}):t()?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{children:(0,a.jsxs)("span",{className:"saving-tag saving-tag--member sm:!text-body-17",children:[e.total_price_include.toFixed(2)," €",(0,a.jsx)("img",{src:(0,_.yY)("/logo/k-plus-logo.svg","mxw_20"),alt:"Kazidomi membership",width:20,height:13,loading:"lazy"})]})}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("span",{className:"text-xs",children:[s("popup-cart.your-saving")," ",e.savingMemberPrice,"€"]}),(0,a.jsxs)("span",{className:"cart-resume-details__total cart-resume-details__total--crossed",children:[e.totalStandardPriceInclude.toFixed(2)," €"]})]})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{children:(0,a.jsxs)("span",{className:"cart-resume-details__total",children:[e.totalStandardPriceInclude.toFixed(2)," €"]})}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("span",{className:"cta-regular",children:[s("popup-cart.save-more")," ",e.savingMemberPrice.toFixed(2)," €"]}),(0,a.jsxs)("span",{className:"saving-tag",children:[e?.totalMemberPromoPriceInclude?.toFixed(2)," €",(0,a.jsx)("img",{src:(0,_.yY)("/logo/k-plus-logo.svg","mxw_20"),alt:"Kazidomi membership",width:20,height:13,loading:"lazy"})]})]})]})})]})]})};
10var C=t(35799),$=t.n(C),S=t(35976),z=t(3427),F=t(25940),I=t(64603);let M=({product:e,hideCartPopup:s})=>{var t,l,n;let{isMember:o}=(0,c.Jd)(),u=e.isGiftCard||e.id===z.HV.id,h=(0,r.useLocale)();(0,f.useRouter)();let{getQuantityWithUnit:x}=(0,c.Bj)(e),p=(0,c._$)(e=>e.updateMembership),g=(0,c._$)(e=>e.removeProductSale),{currentQuantity:b,incrementQuantity:j,removeCartItem:y,isEditing:v,setIsEditing:N}=(0,c.DT)({legacyId:e.legacyId,isFresh:e.is_fresh,qtyAddStep:e.quantityAddingStep}),w=(0,F.useGlobalStore)(s=>$()(s,["stock",e.legacyId,"available_stock"],0)),k=m()(e.images)?"/image/lazy-product.svg":e.images[0].thumbnail,A=e.is_membership_product?d.Ay.take_membership(h):e.link,C=o()?e.prices.prices.promo_or_membership:e.prices.prices.promo_or_standard,M=(t=o(),l=e.prices.prices.promo_or_standard.reduction_amount,n=e.prices.prices.promo_or_standard.reduction_amount,!!t&&!!n||!!(!t&&l)||o());return(0,a.jsxs)("article",{className:"cart-hit-root",children:[(0,a.jsx)("picture",{className:"cart-hit__img",children:(0,a.jsx)("img",{src:(0,_.yY)(k),alt:e.title,width:70,height:70})}),(0,a.jsxs)("div",{className:"cart-hit__content",children:[e.title&&e.link&&(0,a.jsxs)(i.default,{className:"cart-hit__title",href:A,title:e.title,onClick:s,children:[e.title," ",x()]}),null!==e.yuka_score&&void 0!==e.yuka_score?(0,a.jsx)("div",{className:"mt-2",children:(0,a.jsx)(I.$W,{score:e.yuka_score,variant:"small"})}):null,!e.isGift&&(0,a.jsxs)("div",{className:"cart-hit__bottom mt-spacing-1",children:[(0,a.jsx)("div",{className:"cart-hit__actions relative z-[1] h-[34px]",children:e.id!==z.HV.id?(0,a.jsx)(S.A,{plusDisabled:w<=0,isEditing:v,setIsEditing:N,quantity:b,legacyId:e.legacyId,lessDisabled:e.isGiftCard,qtyAddStep:e.quantityAddingStep}):null}),b>0||e.id===z.HV.id?(0,a.jsx)("button",{onClick:()=>(s=>{if(e.is_membership_product){g(s),p(h,!1);return}y(s)})(e.legacyId),className:"close-button-root flex-center",children:(0,a.jsx)("img",{src:(0,_.yY)("/icons/cross.svg","mxw_11"),alt:"delete product",width:11,height:11,loading:"lazy"})}):null,(0,a.jsx)("div",{className:`cart-hit__prices ${M&&!u?"cart-hit__prices--member":""}`,children:e.prices&&"wholesaler"===e.prices.appliedPrice?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"wholesale-price-tag",children:"Prix fournisseur"}),(0,a.jsxs)("span",{className:"cart-hit__standard-price",children:[e.prices.prices.current_applied_price.priceInclude.toFixed(2)," €"]})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("span",{className:"cart-hit__standard-price",children:[e?.prices?.prices?.standard.priceInclude.toFixed(2)," €"]}),!u&&M?(0,a.jsxs)("span",{className:"cart-hit__member-price flex items-center",children:[`${C.priceInclude.toFixed(2)} €`,o()?(0,a.jsx)("img",{src:"/logo/k-plus-logo.svg",className:"w-4 h-3 inline-block ml-1",width:16,height:12,alt:"kazidomi membership logo"}):null]}):null]})})]})]})]})};var P=t(14990),T=t(97366);let R=({cartSuggestions:e})=>{let s=(0,r.useLocale)();if(!m()(e))return(0,a.jsx)("div",{className:"px-spacing-4 overflow-visible pt-spacing-2 pb-spacing-1 mt-spacing-2 mb-spacing-1 bg-white",children:(0,a.jsx)(P.FN,{expand:!0,controlPosition:"top",titleElement:"span",titleClasses:"!text-body-17 leading-none",title:e[`title_${s}`],children:e.products.map(e=>(0,a.jsx)("li",{className:"w-[190px] shrink-0 snap-start",children:(0,a.jsx)(T.Ay,{data:e,layou:"carousel"})},`cartSuggestions-${e.name}`))})})};var O=t(36651),D=t(65821);let L=({cart:e,loading:s,hideCartPopup:t,cartSuggestions:l})=>{let i=(0,r.useTranslations)(),c=(0,r.useLocale)();return(0,a.jsxs)("div",{className:"flex",children:[e.productCounter>0?(0,a.jsx)(O.default,{name:"PreviousOrder",fallback:null,children:(0,a.jsx)(k,{panel:!0})}):null,(0,a.jsx)("div",{className:"cart-popup__cart z-10",children:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"cart-popup__header",children:[(0,a.jsx)("span",{className:"font-faro mr-spacing-1 text-[24px]",children:i("popup-cart.my-cart")}),(0,a.jsxs)("span",{className:"text-body-15",children:["(",e.productCounter||0," ",i("popup-cart.items"),")"]}),(0,a.jsx)(n.Jn,{variant:"dark",classProps:"ml-auto w-[40px] h-[40p
10x]",onClick:t})]}),e.productCounter>0?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"h-full overflow-y-auto",children:[(0,a.jsx)(O.default,{name:"FreeShippingProgressBar",fallback:null,children:(0,a.jsx)("div",{className:"text-center px-8 mt-8",children:(0,a.jsx)(D.zh,{})})}),(0,a.jsx)(O.default,{name:"ProductSales",fallback:null,children:(0,a.jsx)(v,{hideCartPopup:t})}),m()(l)?null:(0,a.jsx)(O.default,{name:"CartSuggestions",fallback:null,children:(0,a.jsx)(R,{cartSuggestions:l})})]}),(0,a.jsxs)("div",{className:"cart-popup__footer",children:[(0,a.jsx)(O.default,{name:"CartResumeDetails",fallback:null,children:(0,a.jsx)(A,{})}),(0,a.jsxs)("div",{className:"cart-resume-action-root flex gap-spacing-4",children:[(0,a.jsx)(n.Ay,{variant:"secondary",size:"xl",className:"w-1/2 hover:!border-charcoal",link:d.Ay.checkout(c),onClick:t,title:i("popup-cart.checkout"),children:i("popup-cart.checkout")}),(0,a.jsx)(n.Ay,{variant:"primary",size:"xl",className:"w-1/2",link:d.Ay.commande(c),onClick:t,title:i("popup-cart.my-cart"),children:i("popup-cart.my-cart")})]}),(0,a.jsx)("div",{className:"flex-center px-spacing-2 pb-spacing-2",children:(0,a.jsx)(j.LX,{})})]})]}):(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"cart-empty-root bg-tint-24",children:(0,a.jsx)("span",{className:"cart-empty__title",children:i("nav.cart-popup.empty")})}),(0,a.jsx)(O.default,{name:"PreviousOrder",fallback:null,children:(0,a.jsx)(k,{})})]})})]})})]})};var E=t(19278);let B=(0,l.forwardRef)(({className:e,href:s,icon:t,onClick:n},o)=>{let j,y=(0,r.useTranslations)(),[v,N]=(0,l.useState)(!1),[w,k]=(0,l.useState)([]),A=(0,l.useRef)(null),C=/Android|webOS|iPhone|iPad|iPod|Opera Mini/i.test(navigator.userAgent),$=(0,p.d)(b.zm.HEADER_BREAKPOINT)||C,S=(0,f.usePathname)(),{loading:z,cart:F}=(0,c._$)((0,g.k)(e=>({loading:e.loading,cart:e.cart}))),I=(0,l.useMemo)(()=>m()(F)||m()(F.productSales)?"0.00":F.total_price_include.toFixed(2),[F.productSales]),M=(0,r.useLocale)(),P=()=>{document.body.classList.remove("overflow-hidden"),N(!1)};return(0,l.useEffect)(()=>{N(!1)},[S]),(0,x.Wr)(A,P),(0,l.useImperativeHandle)(o,()=>({toggleCart:()=>{document.body.classList.remove("overflow-hidden"),N(!1)}})),(0,l.useEffect)(()=>{v&&m()(w)&&(async()=>{let e=await (0,E.J)(M,"top-cart-suggestions");200===e.status&&k(e?.data?.data[0])})()},[v]),(0,a.jsxs)(u.AM,{children:[(0,a.jsxs)(i.default,{"aria-label":"cart","data-testid":"go-to-cart",href:d.Ay.commande(M),title:y("links.my-cart"),className:"flex h-10 items-center hover:bg-grey6 rounded-full transition duration-300",...!$?{onMouseOver:()=>{j=setTimeout(()=>{document.body.classList.add("overflow-hidden"),N(!0)},300)},onMouseOut:()=>clearTimeout(j),onClick:()=>clearTimeout(j)}:null,children:[(0,a.jsxs)("div",{className:"h-10 w-10 relative flex justify-center items-center",children:[(0,a.jsx)("img",{src:(0,_.yY)("/icons/cart.svg","mxw_24"),width:28,height:28,alt:"Cart",loading:"lazy"}),(0,a.jsx)("span",{className:"absolute h-[15px] py-[2px] px-[4px] min-w-[15px] left-[50%] top-[3px] flex rounded-full bg-charcoal justify-center leading-none items-center",children:(0,a.jsx)("span",{className:"text-white text-[10px] leading-none",children:m()(F)?"0":F.productC
10ounter})})]}),(0,a.jsxs)("span",{"data-testid":"cart-count",className:"hidden min-sm:block text-body-15 pr-spacing-1 text-center min-w-[60px]",children:[I," €"]})]}),(0,a.jsx)(h.e,{show:v,children:(0,a.jsx)("div",{className:"w-full h-full bg-[#000000] fixed top-0 left-0 z-[1] transition-opacity duration-300 ease-in data-[closed]:opacity-0 opacity-[.65]",onClick:P})}),(0,a.jsx)(h.e,{show:v,children:(0,a.jsx)("div",{className:" h-screen top-0 cart-popup-root transition duration-200 ease-out data-[closed]:opacity-0 data-[closed]:translate-x-[10px]",ref:A,children:(0,a.jsx)(L,{cartSuggestions:w,cart:F,loading:z,hideCartPopup:P})})})]})});B.displayName="BasketToggle",t(28810),t(56255);var q=t(63989),H=t(37206);let G=(0,H.default)(()=>Promise.resolve().then(t.bind(t,28810)),{loadableGenerated:{webpack:()=>[28810]},ssr:!1}),J=()=>{let e=(0,q.we)(e=>e.isPanelOpen),s=(0,q.we)(e=>e.openPanel),t=(0,q.we)(e=>e.closePanel),i="bg-charcoal rounded-full block h-[2px] w-spacing-2",n=(0,f.usePathname)(),r=(0,F.useGlobalStore)(e=>e.categories),c=(0,F.useGlobalStore)(e=>e.megamenu),d=(0,F.useGlobalStore)(e=>e.banners),o=(0,F.useGlobalStore)(e=>e.customMegaMenuLinks);return(0,l.useEffect)(()=>{t()},[n]),(0,a.jsx)(u.AM,{children:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(u.AM.Button,{title:"Open mobile navigation",className:"flex flex-col h-spacing-2 w-spacing-2 justify-between",onClick:s,children:[(0,a.jsx)("span",{className:i}),(0,a.jsx)("span",{className:i}),(0,a.jsx)("span",{className:i})]}),(0,a.jsx)(h.e,{as:l.Fragment,enter:"transition duration-300 ease-in",enterFrom:"opacity-0",enterTo:"opacity-[.65]",leave:"transition duration-300 ease-out",leaveFrom:"opacity-[.65]",leaveTo:"opacity-0",show:e,children:(0,a.jsx)(u.AM.Overlay,{className:"w-full h-full bg-overlay fixed top-0 left-0 z-[11]",onMouseDown:t})}),(0,a.jsx)(h.e,{as:l.Fragment,enter:"transition duration-300 ease-out",enterFrom:"transform translate-x-[-100%] opacity-0",enterTo:"transform translate-x-[0] opacity-100",leave:"transition duration-300 ease-out",leaveFrom:"transform translate-x-[0]",leaveTo:"transform translate-x-[-100%]",show:e,children:(0,a.jsx)(u.AM.Panel,{className:"fixed top-0 h-full left-0 z-20 w-full min-md:w-[480px] rounded-r-spacing-1 overflow-hidden",children:(0,a.jsx)(G,{megamenu:c,categories:r,banners:d,links:o})})})]})})};var Y=t(65436),W=t(78512);let U={account:[{key:"my_account",label:"account-nav.my_account",icon:"User"},{key:"addresses",label:"account-nav.my_addresses",icon:"MapPin"},{key:"orders",label:"account-nav.my_orders",icon:"ShoppingBag"},{key:"my_products",label:"account-nav.my_products",icon:"Heart"},{key:"my_reviews",label:"account-nav.my_reviews",icon:"Star"}],advantages:[{key:"my_membership",label:"account-nav.my_membership",icon:"CircleCheck"},{key:"my_offer",label:"account-nav.my_offer",icon:"Wallet"},{key:"my_referral",label:"account-nav.my_referral",icon:"UserPlus"},{key:"my_discount",label:"account-nav.my_discount",icon:"Tag"}]},K=({onClick:e,icon:s})=>{let{inProgress:t}=(0,c.SC)(),[i,n]=(0,l.useState)([]),r=(0,c._$)(e=>e.cart_rules),d=(0,l.useMemo)(()=>!r.length>0?0:r.filter(e=>"amount"===e.reduction_type).reduce((e,s)=>e+s.reduction_amount,0),[r]);return(0,l.useEffect)(()=>{n(localStorage.getItem(z.nF.ORDER_NEED_REVIEW))},[]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"hidden min-sm:block",children:(0,a.jsx)(ei,{discount:d,icon:s,data:U,orderNeedReview:i,inProgress:t,onClick:e})}),(0,a.jsx)("div",{className:"min-sm:hidden",children:(0,a.jsx)(ee,{discount:d,data:U,icon:s,inProgress:t})})]})},X=({onClick:e})=>{let s=(0,r.useLocale)(),t=(0,f.useRouter)(),{isGuest:l}=(0,c.Jd)(),i=l(),n=(0,a.jsx)(W.A,{name:"User",size:28,"aria-label":`${i?"Me connecter":"Mon compte"}`,role:"img",strokeWidth:1.5});return i?(0,a.jsx)("button",{className:"flex items-center justify-center w-10 h-10 shrink-0 rounded-full transition duration-300 hover:bg-grey6",onClick:()=>t.push(d.Ay.login(s)),children:n}):(0,a.jsx)(K,{onClick:e,icon:n})};var V=t(35757),Q=t(39236);let Z="w-full py-2 px-4 flex items-center justify-between hover:bg-grey-taupe active:bg-dark-taupe transition duration-300",ee=({data:e,icon:s,inProgress:t,discount:i})=>{let n=(0,r.useTranslations)(),o=(0,r.useLocale)(),[m,u]=(0,l.useState)(!1),{user:h,canTakeMembership:x,isMember:p}=(0,c.Jd)(),g=(0,f.useRouter)();return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("button",{onClick:()=>u(!0),className:"flex items-center justify-center w-10 h-10 shrink-0 rounded-full transition duration-300 hover:bg-grey6",children:s&&s}),(0,a.jsxs)(V.default,{isOpen:m,setIsOpen:u,title:"Mon compte",children:[(0,a.jsx)("div",{className:"px-4 py-6 bg-grey-taupe",children:(0,a.jsx)(en,{user:h})}),h?.isMember&&(0,a.jsx)("div",{className:"px-4 pt-4",children:(0,a.jsx)(eo,{user:h})}),!h?.isMember&&x()&&(0,a.jsx)("div",{className:"px-4 pt-4",children:(0,a.jsx)(er,{})}),(0,a.jsxs)("div",{className:"flex gap-2 items-center px-4 pt-4",children:[t.length>0&&(0,a.jsxs)("button",{onClick:()=>g.push(d.Ay.orders(o)),type:"button",className:"rounded-lg bg-tint-24 flex-1 flex gap-2 items-center p-3 h-[64px] text-start",children:[(0,a.jsx)("div",{className:"rounded-full bg-generic2 flex-center shrink-0 w-8 h-8",children:(0,a.jsx)(W.A,{name:"ShoppingBag",size:18,"aria-hidden":"true"})}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("span",{className:"block text-body-13 font-medium leading-none mb-1",children:[t.length," commandes"]}),(0,a.jsx)("span",{className:"block text-body-10",children:"En cours"})]})]}),i>0&&(0,a.jsxs)("button",{onClick:()=>g.push(d.Ay.my_discount(o)),type:"button",className:"rounded-lg bg-tint-24 flex-1 flex gap-2 items-center p-3 h-[64px] text-start",children:[(0,a.jsx)("div",{className:"rounded-full bg-generic2 flex-center shrink-0 w-8 h-8",children:(0,a.jsx)(W.A,{name:"Tag",size:18,"aria-hidden":"true"})}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("span",{className:"block text-body-13 font-medium leading-none mb-1",children:[i,"€ \xe0 utiliser"]}
10),(0,a.jsx)("span",{className:"block text-body-10",children:"Bons d'achat dispo"})]})]}),(0===i||0===t.length)&&(0,a.jsxs)("button",{onClick:()=>g.push(d.Ay.my_referral(o)),type:"button",className:"rounded-lg bg-tint-24 flex-1 flex gap-2 items-center p-3 h-[64px] text-start",children:[(0,a.jsx)("div",{className:"rounded-full bg-generic2 flex-center shrink-0 w-8 h-8",children:(0,a.jsx)(W.A,{name:"UserPlus",size:18,"aria-hidden":"true"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"block text-body-13 font-medium leading-none mb-1",children:"Parrainer un ami"}),(0,a.jsx)("span",{className:"block text-body-10",children:"10€ offerts \xe0 chacun"})]})]})]}),(0,a.jsxs)("div",{className:"pt-4 pb-2",children:[(0,a.jsx)("span",{className:"text-[10px] font-medium tracking-[.07em] uppercase text-grey4 pb-3 px-5",children:n("nav-belt.account-menu.section.my-space")}),(0,a.jsx)("ul",{children:e.account.map(e=>(0,a.jsx)("li",{className:"flex items-center gap-2",children:(0,a.jsx)("button",{type:"button",className:Z,onClick:()=>g.push((0,_.kl)(e.key,o)),children:(0,a.jsxs)("div",{className:"flex items-center gap-3 text-body-15",children:[(0,a.jsx)("div",{className:"bg-grey6 w-10 h-10 rounded-xl flex items-center justify-center shrink-0",children:(0,a.jsx)(W.A,{name:e.icon,size:19,"aria-hidden":!0})}),n(e.label)]})})},`${e.label}-mobile`))})]}),(p()||h.isAdmin)&&(0,a.jsxs)("div",{className:"pt-4 pb-2",children:[(0,a.jsx)("span",{className:"text-[10px] font-medium tracking-[.07em] uppercase text-grey4 pb-3 px-5",children:n("nav-belt.account-menu.section.advantages")}),(0,a.jsx)("ul",{children:e.advantages.map(e=>(0,a.jsx)("li",{className:"flex items-center gap-2",children:(0,a.jsx)("button",{type:"button",className:Z,onClick:()=>g.push((0,_.kl)(e.key,o)),children:(0,a.jsxs)("div",{className:"flex items-center gap-3 text-body-15",children:[(0,a.jsx)("div",{className:"bg-grey6 w-10 h-10 rounded-xl flex items-center justify-center shrink-0",children:(0,a.jsx)(W.A,{name:e.icon,size:19,"aria-hidden":!0})}),n(e.label)]})})},`${e.label}-mobile`))})]}),(0,a.jsx)("div",{className:"pt-2 pb-4",children:(0,a.jsx)(Q.A,{icon:(0,a.jsx)("div",{className:"bg-alimentation1 w-10 h-10 rounded-xl flex items-center justify-center shrink-0",children:(0,a.jsx)(W.A,{name:"LogOut",size:19,color:"white","aria-hidden":!0})}),classes:"transition duration-300 hover:bg-alimentation4 text-alimentation1 block w-full py-2 px-4"})})]})]})};var es=t(63830),et=t(98500),ea=t.n(et);let el="px-4 w-full flex text-body-15 hover:bg-grey-taupe active:bg-dark-taupe transition duration-300 justify-between h-9 items-center",ei=({data:e,onClick:s,orderNeedReview:t,icon:l,inProgress:i})=>{let n=(0,r.useTranslations)(),d=(0,r.useLocale)(),{user:o,canTakeMembership:u}=(0,c.Jd)();return(0,a.jsx)(es.A,{className:`${!m()(t)?"marker-root":""}
10`,dropDownClasses:"min-w-[350px]",posX:"center",posY:"bottom",icon:l,onClick:s,children:(0,a.jsxs)("div",{className:`flex flex-col ${o?.isAdmin?"max-h-[calc(100vh-172px)]":"max-h-[calc(100vh-98px)]"}`,children:[(0,a.jsx)("div",{className:"p-4 border-b shrink-0",children:(0,a.jsx)(en,{user:o})}),(0,a.jsxs)("div",{className:"overflow-y-auto flex-1 min-h-0",children:[o?.isMember&&(0,a.jsx)("div",{className:"px-4 pt-4",children:(0,a.jsx)(eo,{user:o})}),!o?.isMember&&u()&&(0,a.jsx)("div",{className:"px-4 pt-4",children:(0,a.jsx)(er,{})}),(0,a.jsxs)("div",{className:"pt-4 pb-2 border-b",children:[(0,a.jsx)("span",{className:"text-[10px] font-medium tracking-[.07em] uppercase text-grey4 pb-3 px-4",children:n("nav-belt.account-menu.section.my-space")}),(0,a.jsx)("ul",{children:e.account.map(e=>(0,a.jsx)("li",{className:"flex items-center gap-2",children:(0,a.jsxs)(ea(),{className:el,href:(0,_.kl)(e.key,d),children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)(W.A,{name:e.icon,size:16,"aria-hidden":!0}),n(e.label)]}),"orders"===e.key&&i?.length>0&&(0,a.jsx)("div",{className:"flex-center rounded-full bg-tint-48 px-2 py-1",children:(0,a.jsx)("span",{className:"font-medium text-body-10",children:`${i.length} ${n("nav-belt.account-menu.orders-in-progress")}`})})]})},`${e.label}-mobile`))})]}),(o?.isMember||o?.isAdmin)&&(0,a.jsxs)("div",{className:"pt-4 pb-2 border-b",children:[(0,a.jsx)("span",{className:"text-[10px] font-medium tracking-[.07em] uppercase text-grey4 pb-3 px-4",children:n("nav-belt.account-menu.section.advantages")}),(0,a.jsx)("ul",{children:e.advantages.map(e=>(0,a.jsx)("li",{className:"flex items-center gap-2",children:(0,a.jsx)(ea(),{className:el,href:(0,_.kl)(e.key,d),children:(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)(W.A,{name:e.icon,size:16,"aria-hidden":!0}),n(e.label)]})})},`${e.label}-mobile`))})]}),(0,a.jsx)("div",{className:"py-2",children:(0,a.jsx)(Q.A,{icon:(0,a.jsx)(W.A,{name:"LogOut",size:16,"aria-hidden":!0}),classes:`${el} text-alimentation1 hover:!bg-alimentation5`})})]})]})})},en=({user:e})=>{let{firstName:s=null,lastName:t=null,email:l=null}=e??{},i=`${s?.[0]??""}${t?.[0]??""}`;return(0,a.jsxs)("div",{className:"flex gap-3 items-center",children:[(0,a.jsx)("div",{className:"w-10 h-10 rounded-full bg-generic2 flex-center shrink-0",children:(0,a.jsx)("span",{className:"uppercase font-faro",children:i.length?i:l[0]})}),(0,a.jsxs)("div",{className:"flex flex-col",children:[(s||t)&&(0,a.jsx)("span",{className:"block text-body-15 font-medium mb-1.5 line-clamp-1 break-all",children:[s,t].filter(Boolean).join(" ")}),l&&(0,a.jsx)("span",{className:"text-body-13 text-gray-500 line-clamp-1 break-all",children:l})]})]})},er=()=>{let e=(0,r.useTranslations)("nav-belt.account-menu.membership-upsell"),{handleUpdateMembership:s}=(0,c.Ez)(),t=(0,c._$)(e=>e.isIncludeMembership);return(0,a.jsxs)("div",{className:"rounded-xl bg-sant5 p-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-4",children:[(0,a.jsx)("img",{src:"/logo/k-plus-logo-green.svg",className:"w-[30px] shrink-0",width:30,height:20,alt:"kazidomi membership logo"}),(0,a.jsx)("span",{className:"text-body-13 font-medium",children:e("subtitle")})]}),(0,a.jsx)("span",{className:"block text-body-15 font-medium leading-none mb-4",children:e("title")}),(0,a.jsxs)("ul",{className:"text-body-13 mb-4",children:[(0,a.jsxs)("li",{className:"mb-1 flex gap-2 items-center",children:[(0,a.jsx)(W.A,{name:"Check",size:18,"aria-hidden":"true",color:"#33a571"}),e("advantage1")]}),(0,a.jsxs)("li",{className:"mb-1 flex gap-2 items-center",children:[(0,a.jsx)(W.A,{name:"Check",size:18,"aria-hidden":"true",color:"#33a571"}),e("advantage2")]}),(0,a.jsxs)("li",{className:"flex gap-2 items-center",children:[(0,a.jsx)(W.A,{name:"Check",size:18,"aria-hidden":"true",color:"#33a571"}),e("advantage3")]})]}),t?(0,a.jsx)(n.Ay,{onClick:()=>s(!1),size:"md",className:"w-full !border-black hover:!border-gray-300",variant:"outline",children:e("remove-cta")}):(0,a.jsx)(n.Ay,{onClick:()=>s(!0),size:"md",className:"w-full font-medium",variant:"membership",children:e("add-cta")}),(0,a.jsx)("span",{className:"block text-center text-body-13 mt-2",children:e("footer")})]})};var ec=t(27866),ed=t.n(ec);let eo=({user:e})=>{let s=(0,r.useTranslations)("nav-belt.account-menu.membership-active"),t=(0,r.useLocale)();return(0,a.jsxs)("div",{className:"rounded-xl bg-sant5 p-4 flex gap-3 items-center",children:[(0,a.jsx)("img",{src:"/logo/k-plus-logo-green.svg",className:"w-[30px] shrink-0",width:30,height:20,alt:"k
10azidomi membership logo"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-body-15 block font-medium",children:s("title")}),(0,a.jsxs)("span",{className:"text-body-13 block",children:[s("renew-date")," ",(0,a.jsx)("strong",{children:ed()(e.membershipDateStop).locale(t).format("DD/MM/YYYY")})]})]})]})},em=({onClick:e})=>{let[s,t]=(0,l.useState)(!1),{wishlists:i,loading:n}=(0,c.iq)(),r=(0,a.jsx)(W.A,{name:"Heart",size:28,"aria-label":"Mes listes d'envie",role:"img",strokeWidth:1.5});return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"hidden min-sm:block",children:(0,a.jsx)(eh,{icon:r,isModalOpen:s,setIsModalOpen:t,onClick:e})}),(0,a.jsx)("div",{className:"min-sm:hidden",children:(0,a.jsx)(eg,{wishlists:i,loading:n,isModalOpen:s,setIsModalOpen:t,icon:r})})]})};var eu=t(87979);let eh=({onClick:e,setIsModalOpen:s,isModalOpen:t,icon:l})=>{let i=(0,r.useTranslations)(),o=(0,f.useRouter)(),u=(0,r.useLocale)(),{wishlists:h,loading:x}=(0,c.iq)();return(0,a.jsx)(es.A,{dropDownClasses:"min-w-[350px]",icon:l,posX:"center",posY:"bottom",children:(0,a.jsx)(a.Fragment,{children:m()(h)&&x?(0,a.jsx)("div",{className:"py-spacing-4 px-spacing-2 flex-center",children:(0,a.jsx)(eu.Q0,{})}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("ul",{className:"bg-white py-spacing-1 overflow-y-scroll max-h-[310px]",children:[m()(h)?(0,a.jsx)("div",{className:"flex-center py-2",children:(0,a.jsx)("span",{className:"text-body-15",children:i("wishlist.no_wishlists")})}):(0,a.jsx)("li",{children:(0,a.jsx)(es.t,{children:({active:e})=>(0,a.jsx)("button",{className:`transition duration-300 block w-full py-2 px-4 text-start border-b ${e?"bg-grey-taupe":""}`,title:i("links.all-my-wishlists"),onClick:()=>o.push(d.Ay.my_wishlists(u)),children:i("links.all-my-wishlists")})})}),h?.map((e,s)=>(0,a.jsx)("li",{children:(0,a.jsx)(es.t,{children:({active:s})=>(0,a.jsxs)("button",{className:`text-start transition duration-300 flex justify-between w-full py-2 px-4 line-clamp-1 h-9 ${s?"bg-grey-taupe":""}`,title:e.name,onClick:()=>o.push(d.Ay.my_wishlist(u,e.id)),children:[(0,a.jsx)("span",{className:"line-clamp-1",children:e.name}),(0,a.jsx)("div",{className:"flex-center rounded-full bg-tint-48 px-2 py-1 shrink-0 ml-2",children:(0,a.jsx)("span",{className:"font-medium text-body-10",children:`${e?.products_ids?.length} produits`})})]})})},`${e.name}-${s}`))]}),(0,a.jsx)("div",{className:"p-spacing-2 border-t border-grey6 flex-center",children:(0,a.jsx)(es.t,{children:({active:e})=>(0,a.jsx)(n.Ay,{variant:"outline",className:`bg-grey7 w-full max-w-[320px] ${e?"!bg-tint-24":""}`,onClick:()=>s(!0),children:i("wishlist.popup.new")})})})]})})})};var ex=t(58592);let ep=()=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex gap-2 items-center px-4 py-2",children:[(0,a.jsx)("div",{className:"rounded-lg skeleton-box flex-1 h-[64px]"}),(0,a.jsx)("div",{className:"rounded-lg skeleton-box flex-1 h-[64px]"})]}),(0,a.jsx)("div",{className:"flex flex-col gap-2 px-4 py-2",children:[1,2,3,4,5].map(e=>(0,a.jsx)("div",{className:"w-full h-[42px] skeleton-box rounded-lg block"},`wishlist-drawer-item-${e}`))})]}),eg=({icon:e,isModalOpen:s,setIsModalOpen:t,wishlists:i,loading:c})=>{let o=(0,r.useTranslations)(),u=(0,r.useLocale)(),h=(0,f.useRouter)(),[x,p]=(0,l.useState)(!1);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("button",{onClick:()=>p(!0),className:"flex items-center justify-center w-10 h-10 shrink-0 rounded-full transition duration-300 hover:bg-grey6",children:e&&e}),(0,a.jsxs)(V.default,{isOpen:x,setIsOpen:p,title:"Mes listes d'envie",footer:(0,a.jsx)(n.Ay,{className:"w-full",variant:"outline",onClick:()=>t(!0),children:o("wishlist.popup.new")}),children:[m()(i)&&c&&(0,a.jsx)(ep,{}),m()(i)&&!c&&(0,a.jsx)("div",{className:"h-full w-full flex-center p-4",children:(0,a.jsx)("div",{className:"text-body-17",children:o("wishlist.no_wishlists")})}),!m()(i)&&!c&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex gap-2 items-center px-4 py-2",children:[(0,a.jsxs)("button",{onClick:()=>h.push(d.Ay.my_products(u)),className:"rounded-lg bg-tint-24 flex-1 flex gap-2 items-center p-3 h-[64px] text-start",children:[(0,a.jsx)("div",{className:"rounded-full bg-generic2 flex-center shrink-0 w-8 h-8",children:(0,a.jsx)(W.A,{name:"ShoppingBag",size:18,"aria-hidden":"true"})}),(0,a.jsx)("div",{children:(0,a.jsx)("span",{className:"block text-body-13 font-medium leading-none mb-1",children:"Mes produits pr\xe9f\xe9r\xe9s"})})]}),(0,a.jsxs)("button",{onClick:()=>h.push(d.Ay.last_shop(u)),className:"rounded-lg bg-tint-24 flex-1 flex gap-2 items-center p-3 h-[64px] text-start",children:[(0,a.jsx)("div",{className:"rounded-full bg-generic2 flex-center shrink-0 w-8 h-8",children:(0,a.jsx)(W.A,{name:"ShoppingBag",size:18,"aria-hidden":"true"})}),(0,a.jsx)("div",{children:(0,a.jsx)("span",{className:"block text-body-13 font-medium leading-none mb-1",children:"Mes derniers achats"})})]})]}),(0,a.jsx)("ul",{children:i.map((e,s)=>(0,a.jsx)("li",{children:(0,a.jsxs)("button",{onClick:()=>()=>h.push(d.Ay.my_wishlist(u,e.id)),className:"w-full border-b-[.5px] px-4 h-[50px] flex items-center justify-between",type:"button",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 ",children:[(0,a.jsx)("div",{className:"flex-center rounded-full bg-grey-taupe px-2 py-1 shrink-0",children:(0,a.jsx)("span",{className:"font-medium text-body-10",children:`${e?.products_ids?.length} produits`})}),(0,a.jsx)("span",{className:"text-body-17 line-clamp-1",children:e.name})]}),(0,a.jsx)(W.A,{name:"ChevronRight",size:20,"aria-hidden":!0})]})},`wishlist-menu-drawer-${e.name}-${s}`))})]})]}),s&&(0,a.jsx)(ex.A,{wishlists:i,setIsOpen:t,isOpen:s})]})},eb=({onClick:e})=>{let{readNotifications:s,unreadNotifications:t,markAsRead:i}=(0,c.E$)(),[n,r]=(0,l.useState)(!1),d=(0,l.useCallback)(async()=>{t.length&&await i()},[t.length,i]),o=(0,l.useCallback)(async()=>{await d(),r(!1)},[d]),m=(0,a.jsx)(W.A,{name:"Bell",size:28,"aria-label":"Mes notifications",role:"img",strokeWidth:1.5}),u=(0,l.useCallback)(()=>(0,a.jsxs)(a.Fragment,{children:[m,t.length>0&&(0,a.jsx)("span",{className:"absolute h-4 py-[2px] px-1 min-w-[16px] left-1/2 top-[3px] flex rounded-full bg-charcoal justify-center leading-none items-center",children:(0,a.jsx)("span",{className:"text-white text-[10px] leading-none",children:t.length})})]}),[t.length]);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"hidden min-sm:block",children:(0,a.jsx)(ev,{setIsReadNotificationsDisplayed:r,isReadNotificationsDisplayed:n,readNotifications:s,unreadNotifications:t,onClose:o,onClick:e,renderButton:u})}),(0,a.jsx)("div",{className:"min-sm:hidden",children:(0,a.jsx)(eN,{setIsReadNotificationsDisplayed:r,isReadNotificationsDisplayed:n,readNotifications:s,unreadNotifications:t,onClose:o,renderButton:u})})]})};var ef=t(2378);let ej=(0,H.default)(()=>Promise.resolve().then(t.bind(t,38398)),{loadableGenerated:{webpack:()=>[38398]},ssr:!1}),ey=({data:e})=>{let{title:s,image:t,content:l,date_start:i}=e,n=(0,r.useLocale)();return(0,a.jsx)("li",{children:(0,a.jsxs)("div",{className:"border-b-[.5px] p-4 flex gap-4",children:[t?(0,a.jsx)("div",{className:"overflow-hidden w-10 h-10 rounded-full flex-center shrink-0",children:(0,a.jsx)("img",{src:t,width:40,height:40,alt:s,className:"shrink-0"})}):(0,a.jsx)("div",{className:"w-10 h-10 rounded-full bg-generic2 flex-center shrink-0",children:(0,a.jsx)("img",{src:"/logo/k-logo.svg",alt:"Kazidomi",loading:"lazy",height:20,width:20,className:"w-5"})}),(0,a.jsxs)("div",{className:"w-full",children:[(0,a.jsxs)("div",{className:"flex justify-between gap-4 mb-2 items-start",children:[(0,a.jsx)("span",{className:"text-cta-regular font-medium flex-wrap leading-none",children:s}),(0,a.jsx)("span",{className:"text-body-10 font-light shrink-0",children:(0,ef.A)(i).locale(n).fromNow()})]}),(0,a.jsx)(ej,{classes:"text-cta-regular leading-[1.3] shrink-0 font-light",children:l})]})]})})},ev=({renderButton:e,onClick:s,onClose:t,readNotifications:i,unreadNotifications:c,isReadNotificationsDisplayed:d,setIsReadNotificationsDisplayed:o})=>{let m=(0,r.useTranslations)(),u=d?i:c,h=i.length>0,x=(0,l.useMemo)(()=>u.map((e,s)=>(0,a.jsx)(ey,{data:e},`notif-${e?.date_start}-${e?.title}-${s}`)),[u]);return(0,a.jsx)(es.A,{onClick:s,onClose:t,className:"flex-center w-10 h-10 hover:bg-grey6 rounded-full relative transition duration-300",dropDownClasse
10s:"min-w-[350px]",renderButton:e,posX:"left",posY:"bottom",children:(0,a.jsxs)("div",{className:"bg-white",children:[(0,a.jsxs)("div",{className:"p-4 border-b-[.5px] flex justify-between items-center",children:[(0,a.jsx)("span",{className:"font-medium text-body-15",children:m("notification.dropdown.title")}),h&&(0,a.jsxs)("div",{className:"flex gap-1",children:[(0,a.jsx)(n.Ay,{disabled:!d,onClick:()=>o(!1),size:"xsm",variant:"ghost",className:`!px-3 text-body-12 disabled:!opacity-100 hover:!bg-grey6 ${!d&&"!bg-grey6"}`,children:m("notification.dropdown.unread")}),(0,a.jsx)(n.Ay,{disabled:d,onClick:()=>o(!0),size:"xsm",variant:"ghost",className:`!px-3 text-body-12 disabled:!opacity-100 hover:!bg-grey6 ${d&&"!bg-grey6"}`,children:m("notification.dropdown.read")})]})]}),0===u.length?(0,a.jsx)("div",{className:"py-8",children:(0,a.jsx)("div",{className:"flex-center py-2",children:(0,a.jsx)("span",{className:"text-body-15",children:m("notification.dropdown.empty")})})}):(0,a.jsx)("ul",{className:"max-h-[300px] overflow-y-auto",children:x})]})})},eN=({renderButton:e,onClose:s,readNotifications:t,unreadNotifications:i,isReadNotificationsDisplayed:c,setIsReadNotificationsDisplayed:d})=>{let o=(0,r.useTranslations)(),[m,u]=(0,l.useState)(!1),h=c?t:i,x=t.length>0,p=(0,l.useMemo)(()=>h.map((e,s)=>(0,a.jsx)(ey,{data:e},`notif-${e?.date_start}-${e?.title}-${s}`)),[h]);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("button",{onClick:()=>u(!0),className:"flex items-center justify-center w-10 h-10 shrink-0 rounded-full transition duration-300 hover:bg-grey6 relative",children:e&&e()}),(0,a.jsxs)(V.default,{onClose:s,isOpen:m,setIsOpen:u,title:"Mes notifications",children:[h.length>0?(0,a.jsx)("ul",{className:"py-spacing-1 overflow-y-scroll h-[calc(100%-117px)]",children:p}):(0,a.jsx)("div",{className:"flex-center h-full",children:(0,a.jsx)("div",{className:"py-8",children:(0,a.jsx)("div",{className:"flex-center py-2",children:(0,a.jsx)("span",{className:"text-body-15",children:o("notification.dropdown.empty")})})})}),x&&(0,a.jsx)("div",{className:"flex-center border-t border-grey6 py-4 gap-2",children:(0,a.jsxs)("div",{className:"flex gap-1",children:[(0,a.jsx)(n.Ay,{disabled:!c,onClick:()=>d(!1),size:"xsm",variant:"ghost",className:`!px-3 text-body-12 disabled:!opacity-100 hover:!bg-grey6 ${!c&&"!bg-grey6"}`,children:o("notification.dropdown.unread")}),(0,a.jsx)(n.Ay,{disabled:c,onClick:()=>d(!0),size:"xsm",variant:"ghost",className:`!px-3 text-body-12 disabled:!opacity-100 hover:!bg-grey6 ${c&&"!bg-grey6"}`,children:o("notification.dropdown.read")})]})})]})]})},ew=()=>{let e=(0,r.useTranslations)(),s=(0,l.useRef)(null),{isConnected:t,user:o,isMember:m}=(0,c.Jd)(),u=(0,r.useLocale)(),h=(0,F.useGlobalStore)(e=>e.searchBarMenu),x=()=>{s?.current?.toggleCart()};return(0,a.jsxs)("div",{className:"flex lg:flex-wrap min-lg:justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-4 w-auto min-lg:mr-8",children:[(0,a.jsx)("div",{className:"min-header:hidden",children:(0,a.jsx)(O.default,{name:"MobileBrowseContent",fallback:null,children:(0,a.jsx)(J,{})})}),(0,a.jsx)("div",{className:"flex items-center flex-shrink-0 min-header:w-[167px]",children:(0,a.jsx)(i.default,{href:d.Ay.home(u),title:e("nav.homepage"),children:(0,a.jsx)("img",{src:(0,_.yY)("/icons/logo.svg","mxw_167"),alt:"Kazidomi",width:167,height:25,className:"w-[88px] min-header:w-[167px]"})})})]}),(0,a.jsx)(O.default,{name:"Search",fallback:null,children:(0,a.jsx)(Y.vj,{suggestions:h})}),(0,a.jsxs)("div",{className:"justify-end flex items-center ml-2 gap-2 shrink-0 w-auto lg:flex-1",children:[(0,z.nV)(o)?(0,a.jsx)("div",{className:"min-sm:flex hidden",children:(0,a.jsx)(n.Ay,{rightIcon:{src:"/icons/search-ai-icon.svg",width:20,height:20,alt:e("nav.my-shop-by-ai")},size:"md",className:"bg-dark-taupe !border-none !text-black text-center hover:!bg-grey-taupe",link:d.Ay.kazidomi_insights(u),children:e("nav.my-shop-by-ai")})}):null,(0,a.jsxs)("div",{className:"justify-end flex items-center ml-2 gap-1 w-auto",children:[(0,a.jsx)("div",{className:"min-md:flex hidden",children:o.isMember?(0,a.jsxs)(i.default,{title:e("nav.user.parrainage"),href:d.Ay.my_referral(u),className:"rounded-full bg-membership1 hover:bg-membership2 transition duration-300 text-white flex-center py-3 px-4 gap-2 h-10",children:[(0,a.jsx)(W.A,{name:"Gift",size:17,strokeWidth:2,"aria-hidden":!0,
10color:"#FFFFFF"}),(0,a.jsx)("span",{className:"text-body-13 font-light",children:"Parrainez & gagnez 20€"})]}):(0,a.jsxs)(i.default,{title:e("nav.user.my-membership"),href:d.Ay.kazidomi_membership(u),className:"rounded-full bg-membership1 hover:bg-membership2 transition duration-300 text-white h flex-center py-3 px-4 gap-2 h-10",children:[(0,a.jsx)("img",{fetchPriority:"high",loading:"eager",src:"/logo/k-plus-logo-white.svg",width:24,height:16,alt:"kazidomi membership logo"}),(0,a.jsx)("span",{className:"text-body-13 font-light",children:e(m()?"nav.user.my-membership":"nav.become-member-now")})]})}),(0,a.jsx)(O.default,{name:"AccountDropdown",fallback:null,children:(0,a.jsx)(X,{onClick:x})}),t()?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(O.default,{name:"WishlistDropdown",fallback:null,children:(0,a.jsx)(em,{onClick:x})}),(0,a.jsx)(O.default,{name:"NotificationDropdown",fallback:null,children:(0,a.jsx)(eb,{onClick:x})})]}):null,(0,a.jsx)(O.default,{name:"BasketToggle",fallback:null,children:(0,a.jsx)(B,{ref:s})})]})]})]})}},90488:(e,s,t)=>{t.d(s,{A:()=>n});var a=t(95155);t(12115);
10var l=t(50003),i=t(48178);let n=({image:e,text:s,url:t,classes:n,showImage:r=!0})=>(0,a.jsx)("article",{className:"banner-root group/banner",children:(0,a.jsxs)(l.default,{className:"w-full",href:t,prefetch:!1,title:s,children:[e&&r?(0,a.jsx)("picture",{className:`block relative pb-[56.5%] overflow-hidden rounded-2xl ${n}`,children:(0,a.jsx)("img",{src:(0,i.yY)(e,"mxw_600"),className:"block h-[100%] w-[100%] absolute object-cover",alt:s||"banner",loading:"lazy",width:600,height:391})}):null,s?(0,a.jsx)("div",{className:"my-2",children:(0,a.jsx)("p",{className:"text-body-15 text-ellipsis line-clamp-3 group-hover/banner:underline underline-offset-4 leading-tight text-left",children:s})}):null]})})},97377:(e,s,t)=>{t.d(s,{default:()=>o});var a=t(95155),l=t(97810),i=t.n(l),n=t(12115),r=t(48407),c=t(87979),d=t(10431);let o=({parentClasses:e,countryClasses:s})=>{let{countries:t,loading:l,fetchCountries:o}=(0,r.SH)(),{user:m}=(0,r.Jd)();return((0,n.useEffect)(()=>{i()(t)&&o()},[m]),l)?(0,a.jsx)("div",{className:"flex-center",children:(0,a.jsx)(c.Q0,{})}):(0,a.jsx)(a.Fragment,{children:i()(t)?null:(0,a.jsx)("ul",{className:e,children:t.map(e=>(0,a.jsx)("li",{children:(0,a.jsx)(d.A,{className:`${s} hover:bg-grey-taupe active:bg-dark-taupe ${m?.country===e?"bg-grey-taupe":""}`,country:e.code})},`${e.name}-${e.code}`))})})}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.