PageSourceSearch

https://sugary.me/_next/static/chunks/8751.3d9a553cd74c0e11.js

js sugary.me collected 2026-10-01 14:21:13 UTC 6,553 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8751],{12651:(e,t,s)=>{s.d(t,{A:()=>l});let l=(0,s(78340).A)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])},57420:(e,t,s)=>{s.d(t,{A:()=>l});let l=(0,s(78340).A)("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]])},88751:(e,t,s)=>{s.r(t),s.d(t,{BespokeOrderBubble:()=>k});var l=s(95155),a=s(12115),r=s(2693),d=s(23591),n=s(37999),o=s(6407),i=s(30081),c=s(52760),x=s(25602),u=s(15435),p=s(90549),h=s(57420),m=s(12651),f=s(74937),b=s(66609),g=s(64326),w=s(17050),y=s(8946),j=s(62756),N=s(2123);function k({msg:e,isOwn:t,userId:s,onOpenDetails:A}){let v,[I,E]=(0,a.useState)(null),[C,P]=(0,a.useState)(!1),[_,D]=(0,a.useState)(!1),{addToBasket:F,basketItems:R}=(0,n.M)(),S=(0,o.o)(e=>e.openDrawer),V=(0,i.X)(),{language:B}=(0,r.n)(),M=d.P[B],L=(0,g.r)(R,e.IntValueA);(0,a.useEffect)(()=>{if(e.IntValueA){P(!0);let t=e.SenderId!==s;(0,x.CK)(e.IntValueA,t).then(e=>{e&&E(e)}).finally(()=>P(!1))}},[e.IntValueA,e.SenderId,s]);let[O,T]=(0,a.useState)(null),q=(0,a.useMemo)(()=>I?.CoverPhotoPath||I?.ImagePath||I?.Answers?.find(e=>e.FilePaths&&e.FilePaths.length>0)?.FilePaths?.[0],[I]);if((0,a.useEffect)(()=>{q&&T((0,c.X)(q))},[q]),C&&!I)return(0,l.jsx)("div",{className:`flex w-full ${t?"justify-end":"justify-start"}`,children:(0,l.jsx)("div",{className:"w-full max-w-full h-32 bg-white/5 rounded-2xl animate-pulse flex items-center justify-center",children:(0,l.jsx)(p.A,{className:"w-8 h-8 text-white/10"})})});let U=I?.TrackingId||I?.Request?.TrackingId||I?.Code||I?.Request?.Code||`#BSP${e.IntValueA}`,G=I?.Status,Z=I?.OfferedPrice??0,$=I?.BudgetInStoreCurrency??0,J=I?.BudgetInUsd??0,W=("PRICE_OFFERED"===G||"CANCELLED"===G&&Z>0)&&$>0&&J>0?Z/($/J):Z||J,X=async t=>{if(t.stopPropagation(),e.IntValueA&&I){D(!0);try{let t=await (0,g._)({addToBasket:F,userId:s,orderId:e.IntValueA,storeId:I.StoreId||I.Request?.StoreId});if(t.Success){let t={item_id:e.IntValueA,item_name:`Bespoke order ${U}`,item_category:(0,y.FJ)(w.vF.BespokeOrder),affiliation:I.StoreName||void 0,price:W,quantity:1};y.pl.addToCart([t],W),j.UJ.addToCart([t],W),N.Tq.itemsAdded([t],W),b.oR.success("Added to basket"),S("physical")}else b.oR.error(t.Message||"Failed to add to basket")}catch(e){console.error("Error adding to basket:",e),b.oR.error("Failed to add to basket")}finally{D(!1)}}},z=e.SenderId!==s,K=G?G.replace(/_/g," "):"";return(0,l.jsxs)("div",{className:`w-full max-w-full rounded-[24px] overflow-hidden bg_secondary border border-white/5  cursor-pointer group shadow-lg ${t?"rounded-br-none":"rounded-bl-none"}`,onClick:()=>e.IntValueA&&A(e.IntValueA),children:[(0,l.jsxs)("div",{className:"p-4 py-2 pt-[10px] flex items-center justify-between gap-2 border-b border-white/5 bg-white/[0.02]",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("div",{className:"w-2 h-2 rounded-full bg-blue-500 shadow-[0_0_8px_rgba(59,130,246,0.6)]"}),(0,l.jsx)("span",{className:"text-xl lg:text-sm text-white font-bold",children:U})]}),(0,l.jsxs)("div",{className:"text-right",children:[(0,l.jsx)("p",{className:"text-xl lg:text-sm font-bold text-white",children:V(W)}),(0,l.jsx)("p",{className:"text-lg lg:text-xs font-semibold text_gray_70",children:z?M.bespoke.offered:M.bespoke.asking})]})]}),(0,l.jsxs)("div",{className:"p-4 flex items-center gap-3",children:[(0,l.jsx)("div",{className:"relative w-20 h-20 md:w-14 md:h-14 rounded-xl overflow-hidden bg-neutral-800 shrink-0 border border-white/5",children:O?(0,l.jsx)(f.A,{src:O,alt:"Bespoke",fill:!0,className:"object-cover",onError:()=>T("/sugary-web-assets/icons/connection-gift.svg")}):(0,l.jsx)(p.A,{className:"w-6 h-6 absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 opacity-20"})}),(0,l.jsx)("div",{className:"flex flex-col gap-1 min-w-0",children:(v=G?.toUpperCase().replace(/\s+/g,"_")||"",(0,l.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,l.jsx)("span",{style:{backgroundColor:{PENDING:"#BD7100",OFFERED:"#0040A2",PRICE_OFFERED:"#0040A2",ORDERED:"#3F6600",CANCELLED:"#510013"}[v]||"#444"},className:"w-fit px-2.5 py-1 text-lg md:text-[12px] text-white rounded-full whitespace-nowrap font-black uppercase shadow-sm",children:K}),(()=>{if(!I)return null;let e=G?.toUpperCase()||"",t="PENDING"===e?I.SubmittedAt:"PRICE_OFFERED"===e?I.LastResponseAt:I.LastUpdatedAt;return t?(0,l.jsxs)("div",{className:"flex items-center gap-1.5 text-lg md:text-[12px] font-semibold text-white/80 uppercase whitespace-nowrap font-bricolage",children:[(0,l.jsx)(h.A,{className:"w-3 h-3"}),(0,l.jsx)("span",{children:(0,u.GP)(new Date(t.endsWith("Z")?t:t+"Z"),"dd MMM yyyy")}),(0,l.jsx)("span",{children:(0,u.GP)(new Date(t.endsWith("Z")?t:t+"Z"),"h:mm a")})]}):null})()]}))})]}),(0,l.jsx)("div",{className:"px-3 pb-3",children:z?(0,l.jsxs)("div",{className:"flex gap-2 items-center justify-between",children:["CANCELLED"!==G&&(L?(0,l.jsxs)("button",{onClick:e=>{e.stopPropagation(),S("physical")},className:"flex-1 cursor-pointer h-[52px] px-4 bg-emerald-600/10 hover:bg-emerald-600/20 text-emerald-400 text-xl lg:text-sm font-bold rounded-xl transition-all flex items-center justify-center gap-2 border border-emerald-500/20 whitespace-nowrap",children:[(0,l.jsx)(m.A,{className:"w-4 h-4"}),(0,l.jsx)("span",{children:M.productDetails.addedToBasket})]}):(0,l.jsx)("button",{onClick:X,disabled:_,className:"flex-1 cursor-pointer h-[52px] px-4 bg-emerald-600/20 hover:bg-emerald-600/30 text-emerald-400 text-xl lg:text-sm font-bold rounded-xl transition-all disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center gap-2",children:_?(0,l.jsx)("div",{className:"w-4 h-4 border-2 border-emerald-400 border-t-transparent roun
1ded-full animate-spin"}):M.productDetails.addToBasket})),(0,l.jsx)("button",{className:"flex-1 cursor-pointer h-[52px] px-4 bg-white/10 hover:bg-white/20 text-white text-xl lg:text-sm font-bold rounded-xl transition-all flex items-center justify-center",onClick:t=>{t.stopPropagation(),e.IntValueA&&A(e.IntValueA)},children:M.productDetails.view})]}):(0,l.jsx)("button",{className:"cursor-pointer w-full h-[52px] bg-emerald-600/20 hover:bg-emerald-600/30 text-white text-xl lg:text-sm font-bold rounded-2xl transition-all flex items-center justify-center",onClick:t=>{t.stopPropagation(),e.IntValueA&&A(e.IntValueA)},children:M.productDetails.view_details})})]})}}}]);

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.