PageSourceSearch

https://sugary.me/_next/static/chunks/4419-43a42feffff31595.js

js sugary.me collected 2026-09-24 10:59:28 UTC 36,883 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4419],{9338:(e,t,r)=>{"use strict";r.d(t,{L$:()=>m,X6:()=>g,fG:()=>d,ns:()=>h,rM:()=>l,setGiftingPlace:()=>c});var i=r(2125),s=r(35844),a=r(37002),n=r(11109),o=r(85702);async function l(){try{let e=await s.u.get(i.Ge);return await e.json()}catch{return null}}function c(e,t,r){let i=a.useGlobalStore.getState(),s=i[a.X.CurrentUser];if(s){let t={...s,GiftingPlace:e};i.setField(a.X.CurrentUser,t)}return i.setField(a.X.GiftingPlace,e),n.Q.getState().setCurrentGeoPlace(t),n.Q.getState().setIsGiftingPlaceBySystem(r),u({place:e}),{success:!0}}function d(e){let t=a.useGlobalStore.getState(),r=t[a.X.CurrentUser];if(r){let i={...r,GiftingDate:e};t.setField(a.X.CurrentUser,i)}return e&&t.setField(a.X.GiftingDate,e),u({date:e}),{success:!0}}function u(e){let t=a.useGlobalStore.getState();if(!t[a.X.Token])return;let r=e.place??t[a.X.GiftingPlace],n=e.date??t[a.X.GiftingDate],o=n?`?giftingDate=${encodeURIComponent(n)}`:"";s.u.post(`${i.AM}${o}`,r).catch(e=>{console.warn("Silently caught error while syncing gifting place to backend:",e)})}async function m(e,t){try{let r=`${i.td.LOOKUP}?coordinate=${e},${t}&checkInService=true`,s=await o.O.get(r);return await s.json()}catch(e){return console.error("Error looking up sugary place:",e),null}}async function h(e,t,r,s,a){try{let n="cities"===t?i.td.CITIES:i.td.STATES,l=await o.O.get(`${n}?countryIso2=${encodeURIComponent(e)}&skip=${r}&limit=30&keyword=${encodeURIComponent(s??"")}&onlyInService=${a}`);return await l.json()}catch(e){return console.error(`Error getting ${t}:`,e),null}}let f=new Map;async function g(e=!0,t=!0){let r=`${e}:${t}`,s=f.get(r);if(s)return s;let a=(async()=>{try{let r=`${i.td.COUNTRIES}?checkInService=${e}&onlyInService=${t}`,s=await o.O.get(r);return await s.json()}catch(e){return console.error("Error getting countries:",e),f.delete(r),null}})();return f.set(r,a),a}},11109:(e,t,r)=>{"use strict";r.d(t,{Q:()=>a});var i=r(1934),s=r(31692);let a=(0,i.v)()((0,s.Zr)(e=>({currentGeoPlace:null,initialSelectedPlace:null,onSelectPlaceAction:null,isAddressUnknown:!1,isOpen:!1,hasShownLocationPopover:!1,isGiftingPlaceBySystem:void 0,setCurrentGeoPlace:t=>e({currentGeoPlace:t}),setIsAddressUnknown:t=>e({isAddressUnknown:t}),setIsGiftingPlaceBySystem:t=>e({isGiftingPlaceBySystem:t}),markLocationPopoverShown:()=>e({hasShownLocationPopover:!0}),openPicker:t=>e({isOpen:!0,initialSelectedPlace:t?.initialSelectedPlace??null,onSelectPlaceAction:t?.onSelectPlaceAction??null}),closePicker:()=>e({isOpen:!1,initialSelectedPlace:null,onSelectPlaceAction:null})}),{name:"delivery-details-storage",partialize:e=>({currentGeoPlace:e.currentGeoPlace,isAddressUnknown:e.isAddressUnknown,isGiftingPlaceBySystem:e.isGiftingPlaceBySystem})}))},25704:(e,t,r)=>{"use strict";r.d(t,{A:()=>d});var i=r(95155),s=r(81566),a=r(80526),n=r(42268),o=r(67310),l=r(2693),c=r(82464);let d=({terms:e,isLoading:t,isInitialLoading:r,handleTagClick:d,onClose:u})=>{let{language:m}=(0,l.n)(),h=c.P[m];return t?e&&e.length>0||r?(0,i.jsxs)("div",{className:"mb-8 px-6",children:[(0,i.jsxs)("div",{className:"flex items-center gap-3 mb-3",children:[(0,i.jsx)("div",{className:"h-4 w-24 bg-white/10 rounded shrink-0 animate-pulse"}),(0,i.jsx)("div",{className:"flex-1 h-[1px] bg-white/10"})]}),(0,i.jsx)("div",{className:"flex flex-wrap gap-2.5",children:(e&&e.length>0?e:[1,2,3,4,5,6]).map((e,t)=>{let r="string"==typeof e?e:"object"==typeof e&&e&&"Title"in e&&"string"==typeof e.Title?e.Title:"",s=r?Math.max(8*r.length,50):[80,96,64,112,88,72][t%6];return(0,i.jsx)("div",{className:"h-[40px] rounded-[16px] bg-white/10 animate-pulse",style:{width:`${s}px`}},`cat-skel-${t}`)})})]}):null:e&&0!==e.length?(0,i.jsxs)("div",{className:"mb-8 px-6 animate-in fade-in slide-in-from-bottom-2 duration-300",children:[(0,i.jsxs)("div",{className:"flex items-center gap-3 mb-3",children:[(0,i.jsx)("h3",{className:"text-[16px] font-normal text-white/50 font-bricolage uppercase shrink-0",children:h.searchPanel.categories}),(0,i.jsx)("div",{className:"flex-1 h-[1px] bg-white/10"})]}),(0,i.jsx)("div",{className:"flex flex-wrap gap-y-6 gap-x-2",children:e.map((e,t)=>{let r="string"==typeof e?e:e.Title||e.Text||e.Name||"",l="string"==typeof e?e:e.LocalizedTitle||r;if(!r)return null;
1let c=`category-${r}-${t}`,m=(0,o.Yv)(r),h="group inline-flex items-center gap-1.5 px-3.5 h-[40px] rounded-[16px] border border-white/10 bg-black/15 hover:bg-white/10 hover:border-white/20 active:scale-95 transition-all cursor-pointer text-left animate-reveal-product",f=(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.A,{size:20,className:"text-white/60 group-hover:text-white shrink-0 transition-colors"}),(0,i.jsx)("span",{className:"text-xl lg:text-[14px] font-medium text-white/50 group-hover:text-white transition-colors",children:l.toLowerCase()})]});return m?(0,i.jsx)(s.TrackingLink,{href:`/categories/${m}`,inRefId:a.L.searchPanel.categories,onClick:()=>u?.(),style:{animationDelay:`${40*t}ms`},className:h,children:f},c):(0,i.jsx)("button",{type:"button",onClick:()=>d?.(r),style:{animationDelay:`${40*t}ms`},className:h,children:f},c)})})]}):null}},39658:(e,t,r)=>{"use strict";r.d(t,{p:()=>a});var i=r(95155);r(12115);var s=r(91337);function a({className:e,type:t,...r}){return(0,i.jsx)("input",{type:t,"data-slot":"input",className:(0,s.cn)("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground border-input h-9 w-full min-w-0 rounded-md border bg-background px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...r})}},46294:(e,t,r)=>{"use strict";r.d(t,{F5:()=>i,q8:()=>s}),r(4858);let i=(e,t,r)=>{let i=new URLSearchParams(r||"");t&&i.set("r",t);let s=i.toString();return s?`/p/${e}?${s}`:`/p/${e}`},s=(e,t,r)=>{let i=new URLSearchParams(r||"");t&&i.set("r",t);let s=i.toString();return s?`/v/${e}?${s}`:`/v/${e}`}},54419:(e,t,r)=>{"use strict";r.d(t,{T:()=>O});var i=r(95155),s=r(12115),a=r(39658),n=r(33210),o=r(61878),l=r(51914),c=r(21628);let d=({text:e,as:t="div",typingSpeed:r=50,initialDelay:a=0,pauseDuration:n=2e3,loop:o=!0,className:l="",showCursor:c=!0,hideCursorWhileTyping:d=!1,cursorCharacter:u="|",cursorClassName:m="",cursorBlinkDuration:h=.5,textColors:f=[],variableSpeed:g,onSentenceComplete:p,startOnVisible:x=!1,reverseMode:b=!1,...v})=>{let[w,y]=(0,s.useState)(""),[j,N]=(0,s.useState)(0),[k,C]=(0,s.useState)(!1),[P,S]=(0,s.useState)(0),[D,I]=(0,s.useState)(!x),L=(0,s.useRef)(null),$=(0,s.useRef)(null),F=(0,s.useMemo)(()=>Array.isArray(e)?e:[e],[e]),A=(0,s.useCallback)(()=>{if(!g)return r;let{min:e,max:t}=g;return Math.random()*(t-e)+e},[g,r]);(0,s.useEffect)(()=>{if(!x||!$.current)return;let e=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&I(!0)})},{threshold:.1});return e.observe($.current),()=>e.disconnect()},[x]),(0,s.useEffect)(()=>{c&&L.current&&(L.current.style.animation=`blink ${2*h}s step-end infinite`)},[c,h]),(0,s.useEffect)(()=>{let e;if(!D)return;let t=F[P],i=b?t.split("").reverse().join(""):t,s=()=>{if(k){if(P!==F.length-1||o){p&&p(F[P],P),y(""),N(0),S(e=>(e+1)%F.length),C(!1);return}}else if(j<i?.length)e=setTimeout(()=>{y(e=>e+i[j]),N(e=>e+1)},g?A():r);else if(F.length>=1){if(!o&&P===F.length-1)return;e=setTimeout(()=>{(P!==F.length-1||o)&&(p&&p(F[P],P),y(""),N(0),S(e=>(e+1)%F.length))},n)}};return 0!==j||k||""!==w?s():e=setTimeout(s,a),()=>clearTimeout(e)},[j,w,k,r,n,F,P,o,a,D,b,g,p]);let T=d&&(j<F[P].length||k);return(0,s.createElement)(t,{ref:$,className:`inline-block whitespace-pre-wrap tracking-tight ${l}`,...v},(0,i.jsx)("span",{className:"inline",style:{color:(()=>{if(f?.length!==0)return f[P%f?.length]})()||"inherit"},children:w}),c&&(0,i.jsx)("span",{ref:L,className:`ml-1 inline-block opacity-100 ${T?"hidden":""} ${m} cursor-text-blink`,children:u}))};var u=r(96621),m=r(87851),h=r(74937),f=r(81566),g=r(31910),p=r(80526),x=r(41455),b=r(41641),v=r(21362),w=r(6296),y=r(52760),j=r(4858),N=r(46294),k=r(62591),C=r(11109),P=r(37002);let S=({products:e,isLoading:t,isInitialLoading:s,navigatingId:a,setNavigatingId:n,handleTag
1Click:o,onClose:l,title:c="TRENDING GIFTS"})=>{let d=(0,x.rd)(),u=(0,k.h)(),m=e=>{u.ref.current&&u.ref.current.scrollBy({left:"left"===e?-240:240,behavior:"smooth"})};if(t){if(e&&e.length>0||s){let t=e&&e.length>0?Math.min(e.length,6):4;return(0,i.jsxs)("div",{className:"mb-8",children:[(0,i.jsx)("div",{className:"flex items-center justify-between mb-3 px-6",children:(0,i.jsx)("div",{className:"h-4 w-32 bg-white/10 rounded animate-pulse"})}),(0,i.jsx)("div",{className:"flex gap-3 overflow-hidden px-6 pb-2",children:Array.from({length:t}).map((e,t)=>(0,i.jsx)("div",{className:"w-[115px] sm:w-[130px] h-[155px] sm:h-[175px] shrink-0 squircle bg-white/10 animate-pulse"},`product-skel-${t}`))})]})}return null}return e&&0!==e.length?(0,i.jsxs)("div",{className:"mb-8 animate-in fade-in slide-in-from-bottom-2 duration-300",children:[(0,i.jsxs)("div",{className:"flex items-center justify-between mb-3 px-6",children:[(0,i.jsx)("h3",{className:"text-[16px] font-normal text-white/50 font-bricolage uppercase",children:c}),(0,i.jsxs)("div",{className:"flex items-center gap-1",children:[(0,i.jsx)("button",{type:"button",onClick:()=>m("left"),className:"p-1 rounded-full text-white/60 hover:text-white hover:bg-white/10 bg-white/5 transition-colors cursor-pointer","aria-label":"Scroll products left",children:(0,i.jsx)(b.A,{size:16})}),(0,i.jsx)("button",{type:"button",onClick:()=>m("right"),className:"p-1 rounded-full text-white/60 hover:text-white hover:bg-white/10 bg-white/5 transition-colors cursor-pointer","aria-label":"Scroll products right",children:(0,i.jsx)(v.A,{size:16})})]})]}),(0,i.jsx)("div",{ref:u.ref,onMouseDown:u.onMouseDown,onDragStart:u.onDragStart,className:"flex overflow-x-auto gap-3 pb-2 px-6 no-scrollbar scrollbar-hide select-none cursor-grab active:cursor-grabbing",style:{scrollbarWidth:"none",msOverflowStyle:"none"},children:e.map((e,t)=>{let s=`product-${e.Id}-${t}`,c=e.Title||e.Name||e.DisplayText||"",u=e.CoverPhoto||e.CoverPhotoPath||"",m=(0,y.X)(u,"md"),x=a===s,b=(0,j.SV)(c,e.Id,e.WinningVariantId||null,null,e.StoreUId||null),v=(0,N.F5)(b,"search");return(0,i.jsxs)(f.TrackingLink,{href:v,inRefId:p.L.searchPanel.storeDetailsFromProduct,onClick:t=>{v?(t.preventDefault(),P.useGlobalStore.getState().giftingPlace?(n(s),setTimeout(()=>{l?.()},400),d.push((0,g.B)(v,p.L.searchPanel.storeDetailsFromProduct))):C.Q.getState().openPicker({onSelectPlaceAction:async(t,i)=>{let{setGiftingPlace:a}=await Promise.resolve().then(r.bind(r,9338)),{checkStoreInCoverage:o}=await r.e(1781).then(r.bind(r,51781));a(t,i),await o(t.CountryIso2,t.StateUId,t.CityUId,t.AdminZoneUId,t.RequestLatitude,t.RequestLongitude,null,e.StoreUId)?(n(s),setTimeout(()=>{l?.()},400),d.push((0,g.B)(v,p.L.searchPanel.storeDetailsFromProduct))):(setTimeout(()=>{l?.()},400),d.push("/home"))}})):(t.preventDefault(),o(c))},style:{animationDelay:`${40*t}ms`},className:"group relative w-[115px] sm:w-[130px] h-[155px] sm:h-[175px] shrink-0 squircle overflow-hidden border border-white/10 bg-white/5 cursor-pointer hover:scale-[1.03] active:scale-95 transition-all duration-300 shadow-md animate-reveal-product block",children:[(0,i.jsx)(h.A,{src:m,alt:c,fill:!0,className:"object-cover transition-transform duration-700 group-hover:scale-105"}),x&&(0,i.jsx)("div",{className:"absolute inset-0 bg-black/60 flex flex-col items-center justify-center gap-1 z-20 transition-all rounded-[22px]",children:(0,i.jsx)(w.A,{size:22,className:"animate-spin text-white"})})]},s)})})]}):null};var D=r(41159),I=r(2693),L=r(82464);let $=({stores:e,isLoading:t,navigatingId:r,setNavigatingId:s,handleTagClick:a,onClose:n})=>{let{language:o}=(0,I.n)(),l=L.P[o];return t?e&&e.length>0?(0,i.jsxs)("div",{className:"mb-12 lg:mb-6 px-6",children:[(0,i.jsx)("div",{className:"h-4 w-20 bg-white/10 rounded mb-3 animate-pulse"}),(0,i.jsx)("div",{className:"grid grid-cols-5 lg:grid-cols-6 gap-2",children:Array.from({length:Math.min(e.length,6)}).map((e,t)=>(0,i.jsxs)("div",{className:"flex flex-col items-center gap-2",children:[(0,i.jsx)("div",{className:"w-20 h-20 lg:w-14 lg:h-14 rounded-full bg-white/10 animate-pulse"}),(0,i.jsx)("div",{className:"h-3 w-12 bg-white/10 rounded animate-pulse"})]},`store-skel-${t}`))})]}):null:e&&0!==e.length?(0,i.jsxs)("div",{className:"mb-12 lg:mb-6 px-6 animate-in fade-in slide-in-from-bottom-2 duration-300",children:[(0,i.jsx)("h3",{className:"text-[14px] font-normal text-white/80 font-bricolage mb-3 uppercase",children:l.searchPanel.stores}),(0,i.jsx)("div",{className:"grid grid-cols-5 lg:grid-cols-6 gap-2",children:e.map((e,t)=>{let o=`store-${e.UId||e.Id}-${t}`,l=(0,y.X)(e.LogoPath,"sm"),c=r===o,d=e.UId?`/${e.UId.toLowerCase()}`:"";return(0,i.jsxs)(f.TrackingLink,{href:d,inRefId:p.L.searchPage.storeDetailsFromStore,onClick:t=>{d?(s(o),setTimeout(()=>{n?.()},400)):(t.preventDefault(),a(e.Name))},style:{animationDelay:`${40*t}ms`},className:"group flex flex-col items-center cursor-pointer text-center animate-reveal-product",children:[(0,i.jsxs)("div",{className:"relative w-20 h-20 lg:w-14 lg:h-14 roun
1ded-full overflow-hidden border-2 border-white/10 flex items-center justify-center bg-gray-800 transition-all duration-300 group-hover:scale-110 group-hover:border-white/30 shrink-0",children:[l?(0,i.jsx)(h.A,{src:l,alt:e.Name,fill:!0,className:"object-cover"}):(0,i.jsx)(D.A,{className:"w-6 h-6 text-white/60"}),c&&(0,i.jsx)("div",{className:"absolute inset-0 bg-black/60 flex items-center justify-center rounded-full",children:(0,i.jsx)(w.A,{className:"w-4 h-4 text-white animate-spin"})})]}),(0,i.jsx)("span",{className:"text-lg lg:text-sm text-white/50 group-hover:text-white mt-2 transition-colors font-medium  w-full",children:e.Name})]},o)})})]}):null},F=({voucher:e,onClick:t,className:r="",style:s={},isLoading:a})=>{let n=e.StoreName||e.BrandName||"Store",o=e.ECardIconCoverPath,l=o?(0,y.X)(o,"md"):null,c=e.ECardGradient1,d=e.ECardGradient2,u={};return u=c||d?{background:`linear-gradient(135deg, ${c||"#1c1c24"} 0%, ${d||"#121218"} 100%)`}:{background:"linear-gradient(135deg, #1c1c24 0%, #121218 100%)"},(0,i.jsxs)("div",{style:s,onClick:t,className:`flex flex-col gap-2 w-full relative group cursor-pointer active:scale-95 transition-all duration-300 ease-out ${r}`,children:[(0,i.jsx)("div",{className:"pb-1 select-none w-full",children:(0,i.jsxs)("div",{className:"relative w-full aspect-[1.6/1]",children:[(0,i.jsx)("div",{className:"absolute inset-0 border border-white/10 squircle overflow-hidden -rotate-3 scale-[1.04] group-hover:-rotate-6 group-hover:scale-105 transition-all duration-500 ease-out",style:{...u,opacity:.3,zIndex:0},children:l&&(0,i.jsx)(h.A,{draggable:!1,src:l,alt:`${n} background`,fill:!0,sizes:"(max-width: 768px) 300px, 450px",className:"object-cover",loading:"lazy"})}),(0,i.jsxs)("div",{className:"relative w-full h-full flex items-center justify-center border border-white/15 overflow-hidden transition-all duration-300 squircle group-hover:scale-[1.02] group-hover:rotate-1",style:{...u,zIndex:2},children:[l&&(0,i.jsx)(h.A,{draggable:!1,src:l,alt:`${n} background`,fill:!0,sizes:"(max-width: 768px) 300px, 450px",className:"object-cover",loading:"lazy"}),(0,i.jsx)("div",{className:"absolute top-0 left-0 right-0 h-[1px] bg-gradient-to-r from-transparent via-white/20 to-transparent pointer-events-none"}),a&&(0,i.jsx)("div",{className:"absolute inset-0 bg-black/65 backdrop-blur-xs flex items-center justify-center z-30 squircle",children:(0,i.jsx)(w.A,{size:20,className:"animate-spin text-white"})})]})]})}),(0,i.jsx)("span",{className:"text-xl sm:text-sm font-medium text-white/70 group-hover:text-white truncate w-full text-center transition-colors",children:n})]})},A=({vouchers:e,isLoading:t,navigatingId:r,setNavigatingId:s,handleTagClick:a,onClose:n,title:o="MOST GIFTED VOUCHERS"})=>{let l=(0,k.h)(),c=e=>{l.ref.current&&l.ref.current.scrollBy({left:"left"===e?-240:240,behavior:"smooth"})};return t?e&&e.length>0?(0,i.jsxs)("div",{className:"mb-8",children:[(0,i.jsx)("div",{className:"flex items-center justify-between mb-3 px-6",children:(0,i.jsx)("div",{className:"h-4 w-40 bg-white/10 rounded animate-pulse"})}),(0,i.jsx)("div",{className:"flex gap-3 overflow-hidden px-6 py-2",children:Array.from({length:Math.min(e.length,6)}).map((e,t)=>(0,i.jsxs)("div",{className:"flex flex-col items-center gap-2 shrink-0",children:[(0,i.jsx)("div",{className:"w-[130px] sm:w-[145px] md:w-[150px] aspect-[1.5/1] squircle bg-white/10 animate-pulse"}),(0,i.jsx)("div",{className:"h-3 w-16 bg-white/10 rounded animate-pulse"})]},`voucher-skel-${t}`))})]}):null:e&&0!==e.length?(0,i.jsxs)("div",{className:"animate-in fade-in slide-in-from-bottom-2 duration-300",children:[(0,i.jsxs)("div",{className:"flex items-center justify-between mb-3 px-6",children:[(0,i.jsx)("h3",{className:"text-[16px] font-normal text-white/50 font-bricolage uppercase",children:o}),(0,i.jsxs)("div",{className:"flex items-center gap-1",children:[(0,i.jsx)("button",{type:"button",onClick:()=>c("left"),className:"p-1 rounded-full text-white/60 hover:text-white hover:bg-white/10 bg-white/5 transition-colors cursor-pointer","aria-label":"Scroll gift vouchers left",children:(0,i.jsx)(b.A,{size:16})}),(0,i.jsx)("button",{type:"button",onClick:()=>c("right"),className:"p-1 rounded-full text-white/60 hover:text-white hover:bg-white/10 bg-white/5 transition-colors cursor-pointer","aria-label":"Scroll gift vouchers right",children:(0,i.jsx)(v.A,{size:16})})]})]}),(0,i.jsx)("div",{ref:l.ref,onMouseDown:l.onMouseDown,onDragStart:l.onDragStart,className:"flex overflow-x-auto gap-3 py-2 px-6 no-scrollbar scrollbar-hide select-none cursor-grab active:cursor-grabbing",style:{scrollbarWidth:"none",msOverflowStyle:"none"},children:e.map((e,t)=>{let o=`voucher-${e.Id}-${t}`,l=e.Title||"Gift Card",c=r===o,d=(0,j.SV)(l,e.Id,e.VariantId||null,e.StoreName||null,e.StoreUId||null),u=(0,N.q8)(d,"search");return(0,i.jsx)(f.TrackingLink,{href:u,inRefId:p.L.searchPanel.storeDetailsFromGiftCard,onClick:e=>{u?(s(o),setTimeout(()=>{n?.()},400)):(e.preventDefault(),a(l))},style:{animationDelay:`${40*t}ms`},className:"relative w-[130px] sm:w-[145px] md:w-[150px] shrink-0 animate-reveal-product block",children:(0,i.jsx)(F,{voucher:e,isLoading:c})},o)})})]}):null};var T=r(63439),U=r(9338);let _=()=>{let e=(0,P.useGlobalStore)(e=>e.giftingPlace),{language:t}
1=(0,I.n)(),r=L.P[t],[a,n]=(0,s.useState)([]),[o,l]=(0,s.useState)(!0);(0,s.useEffect)(()=>{let e=!0;return(async()=>{try{l(!0);let t=await (0,U.X6)(!0);if(e){let e=Array.isArray(t)?t:t?.data||[];n(e)}}catch(e){console.error("Failed to fetch countries in SearchCountries:",e)}finally{e&&l(!1)}})(),()=>{e=!1}},[]);let c=e?.CountryIso2?.toLowerCase()||"",d=e?.CountryName?.toLowerCase()||"",u=(0,s.useMemo)(()=>a.filter(e=>{let t=(e.CountryIso2||e.code||"").toLowerCase(),r=(e.CountryName||e.name||"").toLowerCase();return(!c||t!==c)&&(!d||r!==d)}).slice(0,6),[a,c,d]);return o||0!==u.length?(0,i.jsxs)("div",{className:"px-6 animate-in fade-in slide-in-from-bottom-2 duration-300",children:[(0,i.jsx)("h3",{className:"text-[16px] font-normal text-white/50 font-bricolage uppercase mb-4",children:r.searchPanel.top_gifting_country}),(0,i.jsx)("div",{className:"grid grid-cols-5 lg:grid-cols-6 gap-2",children:o?Array.from({length:6}).map((e,t)=>(0,i.jsxs)("div",{className:"flex flex-col items-center shrink-0",children:[(0,i.jsx)("div",{className:"w-11 h-11 rounded-full bg-white/5 border border-white/10 animate-pulse"}),(0,i.jsx)("div",{className:"h-3 bg-white/5 rounded w-8 mt-2 animate-pulse"})]},`country-skeleton-${t}`)):u.map((e,t)=>{let r=e.CountryIso2||"",s=e.CountryName||"";return(0,i.jsxs)("div",{onClick:()=>{let t,r,i;return t=e.CountryName||e.name||"",r=e.CountryIso2||e.code||null,i={RequestLatitude:e.CenterLat??null,RequestLongitude:e.CenterLng??null,CountryIso2:r,CountryIso3:e.CountryIso3||null,CountryName:t||null,StateUId:null,StateName:null,StateLocalName:null,CityUId:null,CityName:null,CityLocalName:null,AdminZoneUId:null,AdminZoneName:null,AdminZoneLocalName:null,CenterLat:e.CenterLat??null,CenterLng:e.CenterLng??null,Level:"COUNTRY",IsInService:e.IsInService??!0,CountryHasCity:e.CountryHasCity??void 0,CountryHasState:e.CountryHasState??void 0},void C.Q.getState().openPicker({initialSelectedPlace:i})},style:{animationDelay:`${40*t}ms`},className:"group flex flex-col items-center cursor-pointer text-center animate-reveal-product",children:[(0,i.jsx)("div",{className:"w-14 h-14 lg:w-11 lg:h-11 rounded-full overflow-hidden border border-white/5 flex items-center justify-center bg-gray-800 transition-all duration-300 group-hover:scale-110 group-hover:border-white/30 shrink-0",children:(0,i.jsx)(T.iF,{countryIso2:r,countryName:s,width:44,height:44,className:"w-full h-full object-cover scale-125"})}),(0,i.jsx)("span",{className:"text-xl lg:text-[14px]  text-white/50 group-hover:text-white mt-2 transition-colors font-medium truncate w-full",children:s})]},r||`country-${t}`)})})]}):null};var E=r(25704);r(76005);let G=({keyword:e="",onSelectTag:t,onClose:r})=>{let a=(0,P.useGlobalStore)(e=>e.giftingPlace),{language:n}=(0,I.n)(),o=L.P[n],l=e.trim(),c=l.length>=2,[d,u]=(0,s.useState)(null),[h,f]=(0,s.useState)(!1),[g,p]=(0,s.useState)(null),x=(0,s.useRef)(0);(0,s.useEffect)(()=>{f(!0);let e=++x.current,t=a?.RequestLatitude??a?.CenterLat??null,r=a?.RequestLongitude??a?.CenterLng??null,i={query:c?l:"",country:a?.CountryIso2||void 0,city:a?.CityUId||void 0,state:a?.StateUId||void 0,adminZone:a?.AdminZoneUId||void 0,latitude:t??void 0,longitude:r??void 0,locale:n};if(!c)return void(0,m.y)(i).then(t=>{e===x.current&&(u(t),f(!1))});let s=setTimeout(async()=>{let t=await (0,m.y)(i);e===x.current&&(u(t),f(!1))},300);return()=>clearTimeout(s)},[l,c,n,a?.CountryIso2,a?.CityUId,a?.StateUId,a?.AdminZoneUId,a?.RequestLatitude,a?.RequestLongitude,a?.CenterLat,a?.CenterLng]);let b=e=>{t&&t(e)},v=d?.Categories||[],w=d?.Stores||[],y=d?.Products||[],j=d?.GiftVouchers||[],N=h&&null===d,k=v.length>0||w.length>0||y.length>0||j.length>0;return(0,i.jsx)("div",{className:"w-full max-w-full md:w-[700px] h-fit max-h-[var(--radix-popover-content-available-height,calc(100dvh-100px))] flex flex-col overflow-hidden squircle bg-black/40 border border-white/10 shadow-[0_20px_50px_rgba(0,0,0,0.8)] backdrop-blur-xl",children:(0,i.jsxs)("div",{className:"w-full h-fit max-h-[var(--radix-popover-content-available-height,calc(100dvh-100px))] py-6 px-0 flex flex-col gap-4 overflow-y-auto overscroll-contain no-scrollbar scrollbar-hide",style:{scrollbarWidth:"none",msOverflowStyle:"none"},onClick:e=>e.stopPropagation(),children:[(c||h||k)&&(0,i.jsxs)("div",{children:[(0,i.jsx)($,{stores:w,isLoading:h,isInitialLoading:N,navigatingId:g,setNavigatingId:p,handleTag
1Click:b,onClose:r}),(0,i.jsx)(S,{products:y,isLoading:h,isInitialLoading:N,navigatingId:g,setNavigatingId:p,handleTagClick:b,onClose:r,title:c?o.searchPanel.products:o.searchPanel.trending_gifts}),(0,i.jsx)(E.A,{terms:v,isLoading:h,isInitialLoading:N,handleTagClick:b,onClose:r}),(0,i.jsx)(A,{vouchers:j,isLoading:h,isInitialLoading:N,navigatingId:g,setNavigatingId:p,handleTagClick:b,onClose:r,title:c?o.searchPanel.gift_vouchers:o.searchPanel.most_gifted_vouchers})]}),(0,i.jsx)(_,{})]})})};var z=r(62489),R=r(91459);let O=(0,s.forwardRef)(({initialValue:e="",handleSearch:t,placeholderText:r="Search",typewriterTexts:m=[],className:h,onActiveChange:f,showSearchPanel:g=!0,autoFocus:p=!1,storeChip:x},b)=>{let{language:v}=(0,I.n)(),w=L.P[v]??L.P.en,[y,j]=(0,s.useState)(e),N=(0,u.a)(),[k,C]=(0,s.useState)(p),[P,S]=(0,s.useState)(!1),D=(0,s.useRef)(null),$=(0,s.useRef)(null);(0,s.useEffect)(()=>{let e=()=>{S(window.innerWidth<1300)};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),(0,s.useEffect)(()=>{f&&f(k)},[k,f]),(0,s.useEffect)(()=>{p?(C(!0),!N&&window.innerWidth>=1024&&$.current?.focus()):C(!1)},[p,N]);let F=void 0!==h?h:N?"flex-1 w-full":"flex-1 md:w-[300px] lg:w-[340px] xl:w-[440px]";(0,s.useEffect)(()=>{j(e)},[e]);let A=()=>{$.current?.blur(),C(!1),t(y)},T=!!(x&&!1!==x.isActive),U=g&&!T;return(0,i.jsx)("div",{ref:e=>{D.current=e,"function"==typeof b?b(e):b&&(b.current=e)},className:`relative ${F}`,children:(0,i.jsxs)(z.AM,{open:U&&k,onOpenChange:C,modal:!1,children:[(0,i.jsx)(z.dT,{asChild:!0,children:(0,i.jsxs)("form",{className:"flex items-center rounded-full border border-white/10 glass_card_black pl-[11px] px-4 group focus-within:!border-white/30 transition-all shadow-xl h-[52px] w-full relative z-50 cursor-pointer",onClick:()=>{C(!0),$.current?.focus()},onSubmit:e=>{e.preventDefault(),A()},children:[T&&x?(0,i.jsxs)("div",{className:"shrink-0 flex items-center rounded-full bg-white/10 border border-white/15 overflow-hidden transition-all animate-fadeIn mr-2",children:[(0,i.jsxs)("div",{className:"flex items-center gap-1.5 pl-2.5 pr-2 h-[32px] cursor-default",children:[(0,i.jsx)("span",{className:"w-2 h-2 rounded-full bg-[#3B82F6] shrink-0"}),(0,i.jsx)("span",{className:"text-white text-xl md:text-sm font-medium truncate max-w-[90px] sm:max-w-[130px] md:max-w-[160px]",children:x.name})]}),(0,i.jsx)("div",{className:"w-[1px] h-3.5 bg-white/20"}),(0,i.jsxs)(R.m_,{children:[(0,i.jsx)(R.k$,{asChild:!0,children:(0,i.jsx)("button",{type:"button",onClick:e=>{e.stopPropagation(),x.onRemove()},className:"px-2 py-1 text-white/60 hover:text-white transition-colors flex items-center justify-center cursor-pointer","aria-label":w.header?.search_all_products,children:(0,i.jsx)(n.A,{size:13})})}),(0,i.jsx)(R.ZI,{side:"bottom",sideOffset:8,className:"bg-white text-sm font-normal text-black rounded-xl border border-gray-100 shadow-xl",children:w.header?.search_all_products})]})]}):(0,i.jsx)(o.A,{className:`text_gray_50 group-focus-within:text-white shrink-0 ${N?"h-8 w-8":"h-6 w-6"}`}),(0,i.jsx)("div",{className:"relative flex-1 px-3 h-full flex items-center gap-2 min-w-0",children:(0,i.jsxs)("div",{className:"relative flex-1 h-full flex items-center min-w-0",children:[(0,i.jsx)(a.p,{ref:$,value:y,onChange:e=>{let r=e.target.value;j(r),T?t(r):""===r&&t("")},autoFocus:!N&&p,onKeyDown:e=>{"Enter"===e.key&&($.current?.blur(),C(!1),t(y))},onFocus:()=>C(!0),className:"peer shadow-none h-full w-full bg-transparent border-0 focus-visible:ring-0 px-0 text-[1.5rem] md:text-[1.35rem] lg:text-[1.1rem] font-medium text-white [&::-webkit-search-cancel-button]:appearance-none",placeholder:" ","aria-label":"Search",autoComplete:"off",type:"search",enterKeyHint:"search"}),(0,i.jsxs)("span",{className:"flex items-center pointer-events-none absolute left-0 top-1/2 -translate-y-1/2 text-gray-400 peer-focus:opacity-0 peer-[&:not(:placeholder-shown)]:opacity-0 whitespace-nowrap py-1",children:[r&&(0,i.jsx)("span",{className:"leading-normal text_gray_50 text-[1.5rem] md:text-lg font-semibold truncate",children:r}),m&&m.length>0&&(0,i.jsx)(d,{text:m,className:"px-1 text_gray_70 !font-semibold leading-normal text-[1.5rem] md:text-sm",showCursor:!1})]})]})}),(0,i.jsx)(n.A,{size:N?18:16,className:`text_gray_70 cursor-pointer hover:text-white transition-opacity ${y?"o
1pacity-100":"opacity-0 pointer-events-none"}`,onClick:()=>{j(""),t("")}}),x&&!T&&(0,i.jsxs)(R.m_,{children:[(0,i.jsx)(R.k$,{asChild:!0,children:(0,i.jsxs)("button",{type:"button",onClick:e=>{e.stopPropagation(),x.onRestore?.(y),$.current?.focus()},className:"shrink-0 flex items-center gap-1 rounded-full bg-white/5 hover:bg-white/10 border border-dashed border-white/20 hover:border-white/40 px-2.5 py-0.5 h-[28px] text-white/70 hover:text-white transition-all text-xs font-medium cursor-pointer mx-1 animate-fadeIn","aria-label":(w.header?.search_in_store||"Search in {store}").replace("{store}",x.name),children:[(0,i.jsx)(l.A,{size:14,className:"shrink-0 text-blue-400"}),(0,i.jsx)("span",{className:"truncate max-w-[70px] sm:max-w-[100px] md:max-w-[130px] text-xl md:text-sm",children:x.name})]})}),(0,i.jsx)(R.ZI,{side:"bottom",sideOffset:8,className:"bg-white text-sm font-normal text-black rounded-xl border border-gray-100 shadow-xl",children:(w.header?.search_in_store).replace("{store}",x.name)})]}),(0,i.jsx)(c.A,{className:`text_gray_50 group-focus-within:text-white cursor-pointer hover:text-white transition-colors ml-2 ${N?"h-8 w-8":"h-5 w-5"}`,onClick:A})]})}),U&&(0,i.jsx)(z.hl,{align:P?"center":"start",sideOffset:12,collisionPadding:16,className:"p-0 border-0 bg-transparent shadow-none z-50 w-[calc(100vw-32px)] md:w-[610px] max-h-[var(--radix-popover-content-available-height,calc(100dvh-100px))]",onOpenAutoFocus:e=>e.preventDefault(),onCloseAutoFocus:e=>e.preventDefault(),onInteractOutside:e=>{D.current?.contains(e.target)&&e.preventDefault()},children:(0,i.jsx)(G,{keyword:y,onSelectTag:e=>{$.current?.blur(),C(!1),j(e),t(e)},onClose:()=>C(!1)})})]})})});O.displayName="HomeHeaderSearchField"},62489:(e,t,r)=>{"use strict";r.d(t,{AM:()=>n,Wv:()=>o,dT:()=>c,hl:()=>l});var i=r(95155);r(12115);var s=r(62183),a=r(91337);function n({...e}){return(0,i.jsx)(s.bL,{"data-slot":"popover",...e})}function o({...e}){return(0,i.jsx)(s.l9,{"data-slot":"popover-trigger",...e})}function l({className:e,align:t="center",sideOffset:r=4,...n}){return(0,i.jsx)(s.ZL,{children:(0,i.jsx)(s.UC,{"data-slot":"popover-content",align:t,sideOffset:r,className:(0,a.cn)("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) outline-hidden",e),...n})})}function c({...e}){return(0,i.jsx)(s.Mz,{"data-slot":"popover-anchor",...e})}},62591:(e,t,r)=>{"use strict";r.d(t,{h:()=>s});var i=r(12115);function s(){let e=(0,i.useRef)(null);return{ref:e,onMouseDown:t=>{if(0!==t.button)return;let r=e.current;if(!r)return;let i=!1,s=t.clientX,a=r.scrollLeft,n=e=>{let t=e.clientX-s;Math.abs(t)>5&&(i=!0),r.scrollLeft=a-t},o=()=>{window.removeEventListener("mousemove",n),window.removeEventListener("mouseup",o),i&&window.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault()},{capture:!0,once:!0})};window.addEventListener("mousemove",n),window.addEventListener("mouseup",o)},onDragStart:e=>{e.preventDefault()}}}},67310:(e,t,r)=>{"use strict";r.d(t,{I$:()=>a,Yv:()=>s});let i=RegExp(`[${String.fromCharCode(768)}-${String.fromCharCode(879)}]`,"g");function s(e){return e?e.normalize("NFKD").replace(i,"").toLowerCase().replace(/'/g,"").replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,""):""}function a(e){return e?e.UrlSlug||s(e.Title):""}},76005:()=>{},80526:(e,t,r)=>{"use strict";r.d(t,{L:()=>i});let i={landignPage:{flowersSlider:"landing-fs",cakesSlider:"landing-cs",trendingSlider:"landing-ts",uniqueSlider:"landing-uqs",egiftSlider:"landing-es",blog:"landing-blgs",miniFooter:"landing-mini-ftr",footer:"landing-ftr",categories:"landing-cats",storeDetails:"landing-str"},categoriesPage:{categories:"categories-cats",miniFooter:"categories-mini-ftr",footer:"categories-ftr",storeDetails:"categories-str"}
1,blogPage:{blogDetails:"blog-blgsec",footer:"blog-ftr",miniFooter:"blog-mini-ftr",similarBlog:"blog-smlr-blg",featuredBlog:"blog-featuredblg",storeDetails:"blog-str"},blogDetailsPage:{footer:"blogde-ftr",miniFooter:"blogde-mini-ftr",similarBlog:"blogde-smlr-blg",storeDetails:"blogde-str"},basketDrawer:{storeDetails:"basket-itm"},homePage:{storeDetails:"home-str",productDetails:"home-ps",storeSection:"home-ss",egiftSection:"home-es",footer:"home-ftr",miniFooter:"home-mini-ftr"},trendingPage:{footer:"trending-ftr",miniFooter:"trending-mini-ftr",storeDetails:"trending-str"},giftMarketPage:{footer:"giftmarket-ftr",miniFooter:"giftmarket-mini-ftr",storeDetails:"giftmarket-str",productDetails:"giftmarket-p"},productDetailsPage:{footer:"productde-ftr",miniFooter:"productde-mini-ftr",storeDetails:"productde-str"},voucherDetailsPage:{footer:"voucherde-ftr",miniFooter:"voucherde-mini-ftr",storeDetails:"voucherde-str"},categoryDetailsPage:{footer:"categoryde-ftr",miniFooter:"categoryde-mini-ftr",storeDetails:"categoryde-str"},subCategoryDetailsPage:{footer:"subcategoryde-ftr",miniFooter:"subcategoryde-mini-ftr",storeDetails:"subcategoryde-str"},allProductsPage:{footer:"allproducts-ftr",miniFooter:"allproducts-mini-ftr",storeDetails:"allproducts-str",productDetails:"allproducts-p"},allVendorsPage:{footer:"allvendors-ftr",miniFooter:"allvendors-mini-ftr",storeDetails:"allvendors-str"},searchPage:{footer:"search-ftr",miniFooter:"search-mini-ftr",storeDetails:"search-str",storeDetailsFromStore:"search-str",storeDetailsFromProducts:"search-ps",storeDetailsFromGifts:"search-es"},searchPanel:{categories:"searchpanel-cat",storeDetailsFromProduct:"searchpanel-str",storeDetailsFromGiftCard:"searchpanel-egft"},partnerPage:{footer:"partner-ftr",miniFooter:"partner-mini-ftr",storeDetails:"partner-str"},careerPage:{footer:"career-ftr",miniFooter:"career-mini-ftr",storeDetails:"career-str"},businessPage:{footer:"business-ftr",miniFooter:"business-mini-ftr",storeDetails:"business-str"},aboutPage:{footer:"about-ftr",miniFooter:"about-mini-ftr",storeDetails:"about-str"},contactUsPage:{footer:"contactus-ftr",miniFooter:"contactus-mini-ftr",storeDetails:"contactus-str"},supportPage:{footer:"support-ftr",miniFooter:"support-mini-ftr",storeDetails:"support-str"},termsPage:{footer:"terms-ftr",miniFooter:"terms-mini-ftr",storeDetails:"terms-str"},privacyPage:{footer:"privacy-ftr",miniFooter:"privacy-mini-ftr",storeDetails:"privacy-str"},cookiesPage:{footer:"cookies-ftr",miniFooter:"cookies-mini-ftr",storeDetails:"cookies-str"},returnPolicyPage:{footer:"returnpolicy-ftr",miniFooter:"returnpolicy-mini-ftr",storeDetails:"returnpolicy-str"},shippingPage:{footer:"shipping-ftr",miniFooter:"shipping-mini-ftr",storeDetails:"shipping-str"},trademarkPage:{footer:"trademark-ftr",miniFooter:"trademark-mini-ftr",storeDetails:"trademark-str"},antiBribingPage:{footer:"antibribing-ftr",miniFooter:"antibribing-mini-ftr",storeDetails:"antibribing-str"},codeOfConductPage:{footer:"codeofconduct-ftr",miniFooter:"codeofconduct-mini-ftr",storeDetails:"codeofconduct-str"},accountDeletionPage:{footer:"accountdel-ftr",miniFooter:"accountdel-mini-ftr",storeDetails:"accountdel-str"},myProfilePage:{footer:"myprofile-ftr",miniFooter:"myprofile-mini-ftr",storeDetails:"myprofile-str"},checkoutPage:{footer:"checkout-ftr",miniFooter:"checkout-mini-ftr",storeDetails:"checkout-items"},myOrdersPage:{footer:"myorders-ftr",miniFooter:"myorders-mini-ftr",storeDetails:"myorders-str"},countriesPage:{footer:"countries-ftr",miniFooter:"countries-mini-ftr",storeDetails:"countries-str"},countryDetailsPage:{footer:"countryde-ftr",miniFooter:"countryde-mini-ftr",storeDetails:"countryde-str"}}},87851:(e,t,r)=>{"use strict";r.d(t,{y:()=>n});var i=r(2125),s=r(76348),a=r(85702);let n=async(e={},t={})=>{try{let r=(0,s.B)(e),n=i.Dn?.SEARCH_PREVIEW,o=await a.O.get(`${n}${r}`,t),l=await o.json();return{Categories:Array.isArray(l?.Categories)?l.Categories:[],Stores:Array.isArray(l?.Stores)?l.Stores:[],Products:Array.isArray(l?.Products)?l.Products:[],GiftVouchers:Array.isArray(l?.GiftVouchers)?l.GiftVouchers:[]}}catch(e){return console.error("Error fetching search suggestions:",e),null}}},91459:(e,t,r)=>{"use strict";r.d(t,{Bc:()=>n,ZI:()=>c,k$:()=>l,m_:()=>
1o});var i=r(95155);r(12115);var s=r(48489),a=r(91337);function n({delayDuration:e=0,...t}){return(0,i.jsx)(s.Kq,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function o({...e}){return(0,i.jsx)(n,{children:(0,i.jsx)(s.bL,{"data-slot":"tooltip",...e})})}function l({...e}){return(0,i.jsx)(s.l9,{"data-slot":"tooltip-trigger",...e})}function c({className:e,sideOffset:t=0,children:r,...n}){return(0,i.jsx)(s.ZL,{children:(0,i.jsxs)(s.UC,{"data-slot":"tooltip-content",sideOffset:t,className:(0,a.cn)("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",e),...n,children:[r,(0,i.jsx)(s.i3,{className:"bg-white fill-white z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}}}]);

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.