PageSourceSearch

https://sugary.me/_next/static/chunks/7426-cedeb42158891ba7.js

js sugary.me collected 2026-10-01 14:20:43 UTC 10,392 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7426],{389:(e,t,s)=>{s.d(t,{L:()=>j});var r=s(95155),l=s(12115),n=s(17946),a=s(66088),o=s(61878),i=s(33210),c=s(94514),u=s(85118),d=s(39658),h=s(63439),x=s(96621),p=s(91337),f=s(16321),m=s(62489),w=s(14783);function b({value:e,onChange:t,options:s}){let[n,c]=(0,l.useState)(!1),[u,x]=(0,l.useState)(""),p=(0,l.useRef)(null);(0,l.useEffect)(()=>{if(n){let e=setTimeout(()=>p.current?.focus(),50);return()=>clearTimeout(e)}},[n]);let f=(0,l.useMemo)(()=>{let e=u.toLowerCase();return s.filter(t=>t.value&&t.label.toLowerCase().includes(e))},[u,s]);return(0,r.jsxs)(m.AM,{modal:!1,open:n,onOpenChange:c,children:[(0,r.jsx)(m.Wv,{asChild:!0,children:(0,r.jsxs)("button",{type:"button",className:"flex items-center gap-2 text-white font-medium hover:bg-white/5 px-2 py-1 rounded-xl transition cursor-pointer border-none bg-transparent h-auto shadow-none focus:outline-none ring-0 shrink-0",children:[e?(0,r.jsx)("div",{className:"w-5 h-5 relative shrink-0 overflow-hidden rounded-full shadow-sm bg-gray-50 border border-white/10",children:(0,r.jsx)(h.iF,{countryIso2:e,countryName:e,fill:!0,className:"object-cover"})}):(0,r.jsx)("div",{className:"w-5 h-5 rounded-full bg-white/20 shrink-0"}),(0,r.jsx)(a.A,{className:"h-3 w-3 text-white/50"})]})}),(0,r.jsxs)(m.hl,{style:{zIndex:2e6},className:"w-[280px] p-2 z-[2000000] bg-[#111114] border border-white/10 shadow-2xl rounded-2xl flex flex-col",side:"bottom",align:"start",onOpenAutoFocus:e=>e.preventDefault(),onWheel:e=>e.stopPropagation(),children:[(0,r.jsxs)("div",{className:"relative mb-2 shrink-0",children:[(0,r.jsx)(o.A,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-white/50"}),(0,r.jsx)(d.p,{ref:p,placeholder:"Search country…",value:u,onChange:e=>x(e.target.value),className:"pl-9 bg-white/5 border-none h-10 rounded-xl text-white placeholder:text-white/40 focus-visible:ring-1 focus-visible:ring-white/20 pr-9"}),u&&(0,r.jsx)("button",{onClick:()=>x(""),className:"absolute right-3 top-1/2 -translate-y-1/2 text-white/50 hover:text-white transition-colors p-1 cursor-pointer",children:(0,r.jsx)(i.A,{className:"h-4 w-4"})})]}),(0,r.jsx)("div",{className:"max-h-[250px] w-full p-1 overflow-y-auto scroll-smooth custom-scrollbar-visible",children:0===f.length?(0,r.jsx)("div",{className:"flex flex-col items-center justify-center p-6 text-center",children:(0,r.jsxs)("span",{className:"text-white/50 text-sm",children:['No results for "',u,'"']})}):f.map(e=>(0,r.jsxs)("button",{onClick:()=>{t(e.value),c(!1),x("")},className:"w-full text-left px-3 py-2 cursor-pointer hover:bg-white/10 rounded-md my-0.5 transition-colors flex items-center gap-3 text-white",children:[(0,r.jsx)("div",{className:"w-5 h-5 relative shrink-0 overflow-hidden rounded-full shadow-sm bg-gray-50 border border-white/10",children:(0,r.jsx)(h.iF,{countryIso2:e.value,countryName:e.label,fill:!0,className:"object-cover"})}),(0,r.jsx)("span",{className:"text-sm font-medium",children:e.label})]},e.value))})]})]})}function v({value:e,onChange:t,options:s}){let[n,u]=(0,l.useState)(!1),[x,p]=(0,l.useState)(""),[m,w]=(0,l.useState)(e),b=(0,l.useRef)(null);(0,l.useEffect)(()=>{n&&w(e)},[n,e]);let g=(0,l.useMemo)(()=>{let e=x.toLowerCase();return s.filter(t=>t.value&&t.label.toLowerCase().includes(e))},[x,s]);return(0,l.useEffect)(()=>{if(n&&b.current&&!x){let e=g.findIndex(e=>e.value===m);if(-1!==e){let t=setTimeout(()=>{let t=b.current?.querySelector(`[data-idx="${e}"]`);t?.scrollIntoView({block:"center",behavior:"auto"})},100);return()=>clearTimeout(t)}}},[n,m,g,x]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("button",{type:"button",onClick:()=>u(!0),className:"flex items-center gap-2 text-white font-medium hover:bg-white/5 px-2 py-1 rounded-xl transition cursor-pointer border-none bg-transparent h-auto shadow-none focus:outline-none ring-0 shrink-0",children:[e?(0,r.jsx)("div",{className:"w-7 h-7 relative shrink-0 overflow-hidden rounded-full shadow-sm bg-gray-50 border border-white/10",children:(0,r.jsx)(h.iF,{countryIso2:e,countryName:e,fill:!0,className:"object-cover"})}):(0,r.jsx)("div",{className:"w-5 h-5 rounded-full bg-white/20 shrink-0"}),(0,r.jsx)(a.A,{className:"h-3 w-3 text-white/50"})]}),(0,r.jsx)(f._s,{open:n,onOpenChange:u,children:(0,r.jsx)(f.zj,{style:{zIndex:2e6},className:"glass_card_black border-none shadow-2xl z-[2000000] rounded-t-[26px] outline-none",children:(0,r.jsxs)("div",{className:"flex flex-col w-full mx-auto overflow-hidden h-[85dvh]",children:[(0,r.jsxs)("div",{className:"relative p-5 flex items-center justify-between bg-transparent shrink-0",children:[(0,r.jsx)("h2",{className:"text-xl font-bold text-white",children:"Choose Country"}),(0,r.jsx)("button",{onClick:()=>u(!1),className:"p-2 rounded-full hover:bg-white/10 transition-colors cursor-pointer group",children:(0,r.jsx)(i.A,{className:"h-6 w-6 text-white/50 group-hover:text-white"})})]}),(0,r.jsx)("div",{className:"px-6 pb-4 shrink-0",children:(0,r.jsxs)("div",{className:"relative group",children:[(0,r.jsx)(o.A,{className:"absolute left-4 top-1/2 -translate-y-1/2 h-5 w-5 text-white/50 group-focus-within:text-white transition-colors"}),(0,r.jsx)(d.p,{type:"text",placeholder:"Search country…",value:x,onChange:e=>p(e.target.value),className:"w-full h-16 pl-12 pr-4 glass_card border-none rounded-full text-xl text-white placeholder:font-semibold placeholder:text-white/80 focus:bg-white/15 transition-all font-medium"})]})}),(0,r.jsx)("div",{onWheel:e=>e.stopPropagation(),onTouchMove:e=>e.stopPropagation(),ref:b,className:"flex-1 overflow-y-auto scroll-smooth py-2 px-3 scrollbar-hide",children:(0,r.jsxs)("div",{className:"flex flex-col gap-1.5",children:[g.map((e,t)=>{let s=m===e.value;
1return(0,r.jsxs)("div",{"data-idx":t,onClick:()=>w(e.value),className:`flex items-center gap-4 px-4 py-3 rounded-2xl cursor-pointer transition-all duration-200 group ${s?"bg-white/20 border border-white/20":"hover:bg-white/10 border border-transparent"}`,children:[(0,r.jsx)("div",{className:`w-10 h-10 relative shrink-0 overflow-hidden rounded-full shadow-sm bg-white/5 border p-0.5 transition-colors ${s?"border-blue-400/40":"border-white/10"}`,children:(0,r.jsx)("div",{className:"w-full h-full relative rounded-full overflow-hidden",children:(0,r.jsx)(h.iF,{countryIso2:e.value,countryName:e.label,fill:!0,className:"object-cover"})})}),(0,r.jsx)("div",{className:"flex-1 flex flex-col min-w-0",children:(0,r.jsx)("span",{className:`text-[15px] font-bold truncate transition-colors ${s?"text-white":"text-white/80"}`,children:e.label})}),(0,r.jsx)("div",{className:`transition-all duration-300 ${s?"opacity-100 scale-100":"opacity-0 scale-75"}`,children:(0,r.jsx)("div",{className:"bg-[#00D46A] p-1.5 rounded-full shadow-sm",children:(0,r.jsx)(c.A,{className:"h-3.5 w-3.5 text-white stroke-[3px]"})})})]},e.value)}),0===g.length&&(0,r.jsxs)("div",{className:"flex flex-col items-center justify-center py-20",children:[(0,r.jsx)("div",{className:"w-16 h-16 bg-white/5 rounded-full flex items-center justify-center mb-4",children:(0,r.jsx)(o.A,{size:28,className:"text-white/20"})}),(0,r.jsx)("p",{className:"text-sm font-bold text-white/50",children:"No countries found"}),(0,r.jsx)("p",{className:"text-xs text-white/30 mt-1 uppercase tracking-widest",children:"Try a different search"})]})]})}),(0,r.jsx)("div",{className:"p-4 shrink-0",children:(0,r.jsxs)("button",{type:"button",onClick:()=>{m&&t(m),u(!1)},className:"w-full h-14 rounded-xl text-xl font-bold bg-blue-500 hover:brightness-110 text-white shadow-lg flex items-center justify-center gap-3 transition-all active:scale-95 cursor-pointer",children:[(0,r.jsx)(c.A,{className:"h-6 w-6 stroke-[3px]"}),"CONFIRM"]})})]})})})]})}let g=(0,l.forwardRef)(function({className:e,...t},s){return(0,r.jsx)(d.p,{...t,ref:s,type:"text",inputMode:"numeric",className:(0,p.cn)("text-[14px] md:text-[16px] border-0 p-0 h-auto text-white font-medium focus-visible:ring-0 shadow-none placeholder:text-white/40 bg-transparent",e)})}),j=(0,l.forwardRef)(function({value:e,onChange:t,initialCountryCode:s,onCountryChange:a,placeholder:o="Phone number",hasError:i=!1,className:c="",inputClassName:d="",disabled:h=!1,variant:f="checkout"},m){let j=(0,x.a)(),N=(0,l.useMemo)(()=>{if(e)return e.startsWith("+")?e:`+${e}`},[e]);return(0,r.jsx)("div",{className:(0,p.cn)("plain"===f?"bg_black_25 border border-white/10 rounded-full px-6 py-4":"checkoutInput h-[61px] px-4 rounded-2xl shadow-[1px_11px_9px_-3px_rgba(0,_0,_0,_0.4)]","flex items-center",i&&"ring-1 ring-red-500",c),children:(0,r.jsxs)("div",{className:"flex items-center gap-2 w-full",children:[(0,r.jsx)(u.A,{className:"h-5 w-5 text-gray-400 shrink-0"}),(0,r.jsx)(n.Ay,{international:!0,labels:w.A,defaultCountry:s,value:N,onChange:e=>{e?t(e.startsWith("+")?e.slice(1):e):t(void 0)},onCountryChange:a,disabled:h,placeholder:o,countrySelectComponent:j?v:b,inputComponent:g,ref:m,className:"flex items-center gap-2 w-full [&>*:first-child]:shrink-0",numberInputProps:{className:(0,p.cn)("flex-1 min-w-0 outline-none",d)}}),(0,r.jsx)("div",{className:"w-px h-5 bg-white/15 shrink-0 -order-1 hidden"})]})})});j.displayName="PhoneInput"},68054:(e,t,s)=>{s.d(t,{$F:()=>c,EH:()=>n,JH:()=>i,LS:()=>d,qw:()=>l,w2:()=>u});var r=s(17050);s(46597);let l=(e,t=r.ar,s)=>{let l=t.replace(/\/+$/,""),n=(e??"").replace(/\/+$/,""),a=s&&"en"!==s?s:"";if(!a)return n?n.startsWith("/")?`${l}${n}`:`${l}/${n}`:l;let o=n.startsWith(`/${a}`)?n.slice(a.length+1):n,i=o.startsWith("/")?o:`/${o}`;return`${l}/${a}${"/"===i?"":i}`},n={me:{baseUrl:"https://sugary.me",isDefault:!0,countries:[],currency:"USD"},gift:{baseUrl:"https://sugary.gift",countries:["GB","ES","IT","DE","FR"],currency:"EUR"},ae:{baseUrl:"https://sugary.ae",countries:["AE","KW","SA","LB","TR","BH","JO","QA","IN","RU","PK","OM"],currency:"AED"},bd:{baseUrl:"https://sugary.com.bd",countries:["BD"],currency:"BDT"}},a=new Map(Object.entries(n).flatMap(([e,t])=>t.countries.map(t=>[t.toUpperCase(),e]))),o=null;function i(){if(o)return o;let e="me";try{let t=new URL(r.ar).hostname.toLowerCase();for(let[s,r]of Object.entries(n))if(new URL(r.baseUrl).hostname===t){e=s;break}}catch{e="me"}return o=e,e}function c(e){return a.get(e?.trim().toUpperCase()??"")??"me"}function u(){return n[i()].countries}function d(){let e=i();return Object.entries(n).filter(([t])=>t!==e).flatMap(([,e])=>e.countries)}}}]);

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.