PageSourceSearch

https://sugary.me/_next/static/chunks/3184.22eb1b0283ba464a.js

js sugary.me collected 2026-09-24 11:00:06 UTC 87,687 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3184],{4474:(e,t,a)=>{a.d(t,{$:()=>o,r:()=>n});var r=a(95155);a(12115);var s=a(42442),i=a(18460),l=a(91337);let n=(0,i.F)("cursor-pointer inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none 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",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg_secondary text-secondary-foreground hover:bg_secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function o({className:e,variant:t,size:a,asChild:i=!1,...d}){let c=i?s.DX:"button";return(0,r.jsx)(c,{"data-slot":"button",className:(0,l.cn)(n({variant:t,size:a,className:e})),...d})}},16321:(e,t,a)=>{a.d(t,{BE:()=>h,Uz:()=>n,_s:()=>l,cp:()=>d,gk:()=>u,tb:()=>m,zj:()=>x});var r=a(95155);a(12115);var s=a(60788),i=a(91337);function l({repositionInputs:e=!1,...t}){return(0,r.jsx)(s._s.Root,{"data-slot":"drawer",repositionInputs:e,...t})}function n({...e}){return(0,r.jsx)(s._s.Trigger,{"data-slot":"drawer-trigger",...e})}function o({...e}){return(0,r.jsx)(s._s.Portal,{"data-slot":"drawer-portal",...e})}function d({...e}){return(0,r.jsx)(s._s.Close,{"data-slot":"drawer-close",...e})}function c({className:e,...t}){return(0,r.jsx)(s._s.Overlay,{"data-slot":"drawer-overlay",className:(0,i.cn)("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-[9999] bg-black/30 backdrop-blur-sm",e),...t})}function x({className:e,children:t,...a}){return(0,r.jsxs)(o,{"data-slot":"drawer-portal",children:[(0,r.jsx)(c,{}),(0,r.jsxs)(s._s.Content,{"data-slot":"drawer-content",className:(0,i.cn)("group/drawer-content  fixed z-[9999] h-auto flex flex-col rounded-none lg:rounded-[26px]","data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh]","data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh]","data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-full data-[vaul-drawer-direction=right]:h-full data-[vaul-drawer-direction=right]:sm:max-w-sm","data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-full data-[vaul-drawer-direction=left]:h-full data-[vaul-drawer-direction=left]:sm:max-w-sm",e),...a,children:[(0,r.jsx)("div",{className:"mx-auto mb-4 h-1.5 w-12 shrink-0 rounded-full bg-white/10 group-data-[vaul-drawer-direction=bottom]/drawer-content:block hidden"}),t]})]})}function h({className:e,...t}){return(0,r.jsx)("div",{"data-slot":"drawer-header",className:(0,i.cn)("flex flex-col gap-0.5 p-4 group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center group-data-[vaul-drawer-direction=top]/drawer-content:text-center md:gap-1.5 md:text-left",e),...t})}function m({className:e,...t}){return(0,r.jsx)("div",{"data-slot":"drawer-footer",className:(0,i.cn)("mt-auto flex flex-col gap-2 p-4",e),...t})}function u({className:e,...t}){return(0,r.jsx)(s._s.Title,{"data-slot":"drawer-title",className:(0,i.cn)("text-foreground font-semibold",e),...t})}},18333:(e,t,a)=>{a.d(t,{q:()=>n,t:()=>l});var r=a(2125),s=a(76348),i=a(85702);async function l(e,t,a){try{let l=(0,s.B)({isFromDirectLink:t,locale:a}),n=`${r.k8}/${encodeURIComponent(e)}${l}`,o=await i.O.get(n);return await o.json()}catch{return null}}async function n({uId:e,isFromDirectLink:t=!0,...a}){try{let l=(0,s.B)({isFromDirectLink:t,...a}),n=`${r.k8}/${encodeURIComponent(e)}/SuggestedProducts${l}`,o=await i.O.get(n);return await o.json()}catch(e){return console.error("Error fetching suggested products:",e),null}}},23511:(e,t,a)=>{a.d(t,{E:()=>i});var r=a(95155),s=a(91337);function i({className:e,...t}){return(0,r.jsx)("div",{"data-slot":"skeleton",className:(0,s.cn)("bg-white/10 animate-pulse rounded-md",e),...t})}},25602:(e,t,a)=>{a.d(t,{CK:()=>i,Gq:()=>l,Rd:()=>n,oi:()=>o});var r=a(2125),s=a(35844);async function i(e,t){try{let a=t?r.q4.GET_BESPOKE_ORDER_BY_ID:r.q4.GET_BY_ID,i=await s.u.get(`${a}?requestId=${e}`),l=await i.json();return l?.Data??l}catch(e){return console.error("Failed to fetch bespoke details:",e),null}}async function l(e){try{let t=await s.u.post(r.q4.CREATE,e);return await t.json()}catch(e){return console.error("Failed to create bespoke order:",e),{Success:!1,Message:e instanceof Error?e.message:"An error occurred while creating bespoke order."}}}async function n(e){try{let t=await s.u.get(`${r.q4.IS_EXISTING}?storeId=${e}`),a=await t.json();return!!a?.Success}catch(e){return console.error("Failed to check existing bespoke order:",e),!1}}async function o(e){try{let t=await s.u.del(`${r.q4.BESPOKE_CANCEL}?requestId=${e}`,{requestId:e});return await t.json()}catch(e){return console.error("Failed to cancel bespoke order:",e),{Success:!1,Message:e instanceof Error?e.message:"Failed to cancel order."}}}},30081:(e,t,a)=>{a.d(t,{X:()=>n});var r=a(12115),s=a(27714),i=a(37002),l=a(44369);function n(){let e=(0,i.useGlobalStore)(e=>e.currency),t=(0,l.D)(),a=e??t;return(0,r.useCallback)((e,t)=>(0,s.Hx)(e,{...t,currency:a}
1),[a])}},42383:(e,t,a)=>{a.r(t),a.d(t,{default:()=>eF});var r=a(95155),s=a(96621),i=a(16321),l=a(62795),n=a(12115),o=a(93111),d=a(37002),c=a(2693),x=a(82464);let h=JSON.parse('{"nm":"Chat Box","ddd":0,"h":2400,"w":2400,"meta":{"g":"LottieFiles AE 0.1.20"},"layers":[{"ty":4,"nm":"Chat Dot Outlines","sr":1,"st":-7,"op":210,"ip":-7,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[275.638,48.849,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6},"sk":{"a":0,"k":0},"p":{"a":0,"k":[690.026,492.69,0],"ix":2},"r":{"a":0,"k":0,"ix":10},"sa":{"a":0,"k":0},"o":{"a":0,"k":100,"ix":11}},"ef":[],"shapes":[{"ty":"gr","bm":0,"hd":false,"mn":"ADBE Vector Group","nm":"Group 1","ix":1,"cix":2,"np":4,"it":[{"ty":"sh","bm":0,"hd":false,"mn":"ADBE Vector Shape - Group","nm":"Path 1","ix":1,"d":1,"ks":{"a":0,"k":{"c":true,"i":[[0,-26.84],[26.84,0],[0,26.84],[-26.84,0]],"o":[[0,26.84],[-26.84,0],[0,-26.84],[26.84,0]],"v":[[48.598,0],[0,48.598],[-48.598,0],[0,-48.598]]},"ix":2}},{"ty":"fl","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Fill","nm":"Fill 1","c":{"a":0,"k":[0.102,0.1255,0.2627],"ix":4},"r":1,"o":{"a":0,"k":100,"ix":5}},{"ty":"tr","a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"sk":{"a":0,"k":0,"ix":4},"p":{"a":0,"k":[502.429,48.849],"ix":2},"r":{"a":0,"k":0,"ix":6},"sa":{"a":0,"k":0,"ix":5},"o":{"a":0,"k":100,"ix":7}}]},{"ty":"gr","bm":0,"hd":false,"mn":"ADBE Vector Group","nm":"Group 2","ix":2,"cix":2,"np":4,"it":[{"ty":"sh","bm":0,"hd":false,"mn":"ADBE Vector Shape - Group","nm":"Path 1","ix":1,"d":1,"ks":{"a":0,"k":{"c":true,"i":[[0,-26.84],[26.84,0],[0,26.84],[-26.84,0]],"o":[[0,26.84],[-26.84,0],[0,-26.84],[26.84,0]],"v":[[48.598,0],[0,48.598],[-48.598,0],[0,-48.598]]},"ix":2}},{"ty":"fl","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Fill","nm":"Fill 1","c":{"a":0,"k":[0.102,0.1255,0.2627],"ix":4},"r":1,"o":{"a":0,"k":100,"ix":5}},{"ty":"tr","a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"sk":{"a":0,"k":0,"ix":4},"p":{"a":0,"k":[275.638,48.849],"ix":2},"r":{"a":0,"k":0,"ix":6},"sa":{"a":0,"k":0,"ix":5},"o":{"a":0,"k":100,"ix":7}}]},{"ty":"gr","bm":0,"hd":false,"mn":"ADBE Vector Group","nm":"Group 3","ix":3,"cix":2,"np":4,"it":[{"ty":"sh","bm":0,"hd":false,"mn":"ADBE Vector Shape - Group","nm":"Path 1","ix":1,"d":1,"ks":{"a":0,"k":{"c":true,"i":[[0,-26.84],[26.84,0],[0,26.84],[-26.84,0]],"o":[[0,26.84],[-26.84,0],[0,-26.84],[26.84,0]],"v":[[48.598,0],[0,48.598],[-48.598,0],[0,-48.598]]},"ix":2}},{"ty":"fl","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Fill","nm":"Fill 1","c":{"a":0,"k":[0.102,0.1255,0.2627],"ix":4},"r":1,"o":{"a":0,"k":100,"ix":5}},{"ty":"tr","a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"sk":{"a":0,"k":0,"ix":4},"p":{"a":0,"k":[48.848,48.849],"ix":2},"r":{"a":0,"k":0,"ix":6},"sa":{"a":0,"k":0,"ix":5},"o":{"a":0,"k":100,"ix":7}}]}],"ind":1,"parent":5},{"ty":4,"nm":"Dots Outlines","sr":1,"st":-7,"op":210,"ip":-7,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[104.809,25.285,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6},"sk":{"a":0,"k":0},"p":{"a":0,"k":[247.599,218.774,0],"ix":2},"r":{"a":0,"k":0,"ix":10},"sa":{"a":0,"k":0},"o":{"a":0,"k":100,"ix":11}},"ef":[],"shapes":[{"ty":"gr","bm":0,"hd":false,"mn":"ADBE Vector Group","nm":"Group 1","ix":1,"cix":2,"np":4,"it":[{"ty":"sh","bm":0,"hd":false,"mn":"ADBE Vector Shape - Group","nm":"Path 1","ix":1,"d":1,"ks":{"a":0,"k":{"c":true,"i":[[0,-13.827],[13.826,0],[0,13.826],[-13.826,0]],"o":[[0,13.826],[-13.826,0],[0,-13.827],[13.826,0]],"v":[[25.035,0],[0,25.035],[-25.035,0],[0,-25.035]]},"ix":2}},{"ty":"fl","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Fill","nm":"Fill 1","c":{"a":0,"k":[0,0,0],"ix":4},"r":1,"o":{"a":0,"k":100,"ix":5}},{"ty":"tr","a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"sk":{"a":0,"k":0,"ix":4},"p":{"a":0,"k":[184.333,25.286],"ix":2},"r":{"a":0,"k":0,"ix":6},"sa":{"a":0,"k":0,"ix":5},"o":{"a":0,"k":100,"ix":7}}]},{"ty":"gr","bm":0,"hd":false,"mn":"ADBE Vector Group","nm":"Group 2","ix":2,"cix":2,"np":4,"it":[{"ty":"sh","bm":0,"hd":false,"mn":"ADBE Vector Shape - Group","nm":"Path 1","ix":1,"d":1,"ks":{"a":0,"k":{"c":true,"i":[[0,-13.827],[13.826,0],[0,13.826],[-13.827,0]],"o":[[0,13.826],[-13.827,0],[0,-13.827],[13.826,0]],"v":[[25.036,0],[0,25.035],[-25.036,0],[0,-25.035]]},"ix":2}},{"ty":"fl","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Fill","nm":"Fill 1","c":{"a":0,"k":[0,0,0],"ix":4},"r":1,"o":{"a":0,"k":100,"ix":5}},{"ty":"tr","a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"sk":{"a":0,"k":0,"ix":4},"p":{"a":0,"k":[104.809,25.286],"ix":2},"r":{"a":0,"k":0,"ix":6},"sa":{"a":0,"k":0,"ix":5},"o":{"a":0,"k":100,"ix":7}}]},{"ty":"gr","bm":0,"hd":false,"mn":"ADBE Vector Group","nm":"Group 3","ix":3,"cix":2,"np":4,"it":[{"ty":"sh","bm":0,"hd":false,"mn":"ADBE Vector Shape - Group","nm":"Path 1","ix":1,"d":1,"ks":{"a":0,"k":{"c":true,"i":[[0,-13.827],[13.827,0],[0,13.826],[-13.826,0]],"o":[[0,13.826],[-13.826,0],[0,-13.827],[13.827,0]],"v":[[25.035,0],[0,25.035],[-25.035,0],[0,-25.035]]},"ix":2}},{"ty":"fl","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Fill","nm":"Fill 1","c":{"a":0,"k":[0,0,0],"ix":4},"r":1,"o":{"a":0,"k":100,"ix":5}},{"ty":"tr","a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"sk":{"a":0,"k":0,"ix":4},"p":{"a":0,"k":[25.285,25.286],"ix":2},"r":{"a":0,"k":0,"ix":6},"sa":{"a":0,"k":0,"ix":5},"o":{"a":0,"k":100,"ix":7}}]}],"ind":2,"parent":4},{"ty":4,"nm":"Ribbon Outlines","sr":1,"st":-7,"op":210,"ip":210,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[240.299,111.342,0],"ix":1},"s":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.833,"y":1}
1,"s":[100,100,100],"t":3},{"o":{"x":0.167,"y":0},"i":{"x":0.833,"y":1},"s":[100,110,100],"t":13},{"o":{"x":0.167,"y":0},"i":{"x":0.833,"y":1},"s":[110,100,100],"t":33},{"o":{"x":0.167,"y":0},"i":{"x":0.833,"y":1},"s":[100,100,100],"t":43},{"o":{"x":0.167,"y":0},"i":{"x":0.833,"y":1},"s":[50,60,100],"t":82},{"o":{"x":0.167,"y":0},"i":{"x":0.833,"y":1},"s":[60,50,100],"t":91},{"o":{"x":0.167,"y":0},"i":{"x":0.833,"y":1},"s":[50,50,100],"t":101},{"o":{"x":0.167,"y":0},"i":{"x":0.833,"y":1},"s":[60,50,100],"t":142},{"o":{"x":0.167,"y":0},"i":{"x":0.833,"y":1},"s":[50,50,100],"t":152},{"o":{"x":0.167,"y":0},"i":{"x":0.667,"y":1},"s":[100,110,100],"t":162},{"s":[100,100,100],"t":181}],"ix":6},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[687.703,479.086,0],"t":13,"ti":[-36.611,2.171,0],"to":[19.975,-51.417,0]},{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[807.551,170.587,0],"t":23,"ti":[-16.636,-49.245,0],"to":[36.611,-2.171,0]},{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[907.369,466.058,0],"t":33,"ti":[0,0,0],"to":[0,0,0]},{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[907.369,466.058,0],"t":72,"ti":[-4,126.667,0],"to":[32.524,-90.139,0]},{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[1102.512,-74.774,0],"t":82,"ti":[0,0,0],"to":[4,-126.667,0]},{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[934.55,-187.712,0],"t":91,"ti":[0,0,0],"to":[0,0,0]},{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[978.346,-187.697,0],"t":101,"ti":[0,0,0],"to":[0,0,0]},{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[976.346,-155.697,0],"t":110,"ti":[0,0,0],"to":[0,0,0]},{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[972.346,-139.697,0],"t":119,"ti":[0,0,0],"to":[0,0,0]},{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[972.346,-139.697,0],"t":128,"ti":[0,0,0],"to":[0,0,0]},{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[974.55,-91.712,0],"t":142,"ti":[0,0,0],"to":[0,0,0]},{"o":{"x":0.167,"y":0},"i":{"x":0.667,"y":1},"s":[806.346,-435.697,0],"t":152,"ti":[-36.226,-808.464,0],"to":[0,0,0]},{"s":[687.703,479.086,0],"t":162}],"ix":2},"r":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[-6],"t":3},{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[11],"t":13},{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[-6],"t":23},{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[11],"t":33},{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[-6],"t":43},{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[11],"t":52},{"o":{"x":0.333,"y":0},"i":{"x":0.833,"y":1},"s":[-6],"t":62},{"o":{"x":0.167,"y":0},"i":{"x":0.833,"y":1},"s":[0],"t":72},{"o":{"x":0.167,"y":0},"i":{"x":0.833,"y":1},"s":[0],"t":101},{"o":{"x":0.167,"y":0},"i":{"x":0.833,"y":1},"s":[13],"t":110},{"o":{"x":0.167,"y":0},"i":{"x":0.833,"y":1},"s":[-6],"t":119},{"o":{"x":0.167,"y":0},"i":{"x":0.833,"y":1},"s":[0],"t":128},{"o":{"x":0.167,"y":0},"i":{"x":0.667,"y":1},"s":[0],"t":152},{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[11],"t":162},{"s":[-6],"t":181}],"ix":10},"sa":{"a":0,"k":0},"o":{"a":0,"k":100,"ix":11}},"ef":[],"shapes":[{"ty":"gr","bm":0,"hd":false,"mn":"ADBE Vector Group","nm":"Group 1","ix":1,"cix":2,"np":2,"it":[{"ty":"sh","bm":0,"hd":false,"mn":"ADBE Vector Shape - Group","nm":"Path 1","ix":1,"d":1,"ks":{"a":0,"k":{"c":false,"i":[[0,0],[1.905,-2.539]],"o":[[0,0],[0,0]],"v":[[2.704,-5.219],[-2.704,5.219]]},"ix":2}},{"ty":"st","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Stroke","nm":"Stroke 1","lc":2,"lj":2,"ml":1,"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":6,"ix":5},"c":{"a":0,"k":[0.1529,0.2392,0.8392],"ix":3}},{"ty":"tr","a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"sk":{"a":0,"k":0,"ix":4},"p":{"a":0,"k":[305.63,256.311],"ix":2},"r":{"a":0,"k":0,"ix":6},"sa":{"a":0,"k":0,"ix":5},"o":{"a":0,"k":100,"ix":7}}]},{"ty":"gr","bm":0,"hd":false,"mn":"ADBE Vector Group","nm":"Group 2","ix":2,"cix":2,"np":2,"it":[{"ty":"sh","bm":0,"hd":false,"mn":"ADBE Vector Shape - Group","nm":"Path 1","ix":1,"d":1,"ks":{"a":0,"k":{"c":false,"i":[[0,0],[20.551,-43.164]],"o":[[0,0],[0,0]],"v":[[8.101,-43.582],[-10.276,43.582]]},"ix":2}},{"ty":"st","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Stroke","nm":"Stroke 1","lc":2,"lj":2,"ml":1,"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":6,"ix":5},"c":{"a":0,"k":[0.1529,0.2392,0.8392],"ix":3}},{"ty":"tr","a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"sk":{"a":0,"k":0,"ix":4},"p":{"a":0,"k":[325.363,193.601],"ix":2},"r":{"a":0,"k":0,"ix":6},"sa":{"a":0,"k":0,"ix":5},"o":{"a":0,"k":100,"ix":7}}]},{"ty":"gr","bm":0,"hd":false,"mn":"ADBE Vector Group","nm":"Group 3","ix":3,"cix":2,"np":2,"it":[{"ty":"sh","bm":0,"hd":false,"mn":"ADBE Vector Shape - Group","nm":"Path 1","ix":1,"d":1,"ks":{"a":0,"k":{"c":true,"i":[[109.911,-38.723],[-91.951,0.439],[0,0]],"o":[[0,0],[89.694,-0.426],[0,0]],"v":[[-106.008,44.472],[3.902,-44.046],[106.008,44.472]]},"ix":2}},{"ty":"st","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Stroke","nm":"Stroke 1","lc":1,"lj":1,"ml":10,"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":18,"ix":5},"c":{"a":0,"k":[0.1529,0.2392,0.8392],"ix":3}},{"ty":"tr","a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"sk":{"a":0,"k":0,"ix":4},"p":{"a":0,"k":[241.369,89.472],"ix":2},"r":{"a":0,"k":0,"ix":6},"sa":{"a":0,"k":0,"ix":5},"o":{"a":0,"k":100,"ix":7}}]},{"ty":"gr","bm":0,"hd":false,"mn":"ADBE Vector Group","nm":"Group 4","ix":4,"cix":2,"np":4,"it":[{"ty":"sh","bm":0,"hd":false,"mn":"ADBE Vector Shape - Group","nm":"Path 1","ix":1,"d":1,"ks":{"a":0,"k":{"c":true,"i":[[109.911,-38.723],[-91.951,0.439],[0,0]],"o":[[0,0],[89.694,-0.426],[0,0]],"v":[[-106.008,44.472],[3.902,-44.046],[106.008,44.472]]},"ix":2}},{"ty":"fl","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Fill","nm":"Fill 1","c":{"a":0,"k":[1,0.8,0.9686],"ix":4},"r":1,"o":{"a":0,"k":100,"ix":5}},{"ty":"tr","a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"sk":{"a":0,"k":0,"ix":4},"p":{"a":0,"k":[241.369,89.472],"ix":2},"r":{"a":0,"k":0,"ix":6},"sa":{"a":0,"k":0,"ix":5},"o":{"a":0,"k":100,"ix":7}}]},{"ty":"gr","bm":0,"hd":false,"mn":"ADBE Vector Group","nm":"Group 5","ix":5,"cix":2,"np":2,"it":[{"ty":"sh","bm":0,"hd":false,"mn":"ADBE Vector Shape - Group","nm":"Path 1","ix":1,"d":1,"ks":{"a":0,"k":{"c":true,"i":[[0,0],[0,0],[0,0],[33.197,88.525],[-11.065,11.796],[0,0],[-94.058,-121.721]],"o":[[0,0],[0,0],[0,0],[-33.196,-88.524],[0,0],[0,0],[83.759,108.395]],"v":[[160.451,160.085],[99.59,171.15],[82.991,226.479],[-127.255,-88.89],[-127.255,-226.478],[-88.632,
1-212.449],[0,-16.964]]},"ix":2}},{"ty":"st","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Stroke","nm":"Stroke 1","lc":1,"lj":1,"ml":10,"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":18,"ix":5},"c":{"a":0,"k":[0.1529,0.2392,0.8392],"ix":3}},{"ty":"tr","a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"sk":{"a":0,"k":0,"ix":4},"p":{"a":0,"k":[277.435,327.964],"ix":2},"r":{"a":0,"k":0,"ix":6},"sa":{"a":0,"k":0,"ix":5},"o":{"a":0,"k":100,"ix":7}}]},{"ty":"gr","bm":0,"hd":false,"mn":"ADBE Vector Group","nm":"Group 6","ix":6,"cix":2,"np":4,"it":[{"ty":"sh","bm":0,"hd":false,"mn":"ADBE Vector Shape - Group","nm":"Path 1","ix":1,"d":1,"ks":{"a":0,"k":{"c":true,"i":[[0,0],[0,0],[0,0],[33.197,88.525],[-11.065,11.796],[0,0],[-94.058,-121.721]],"o":[[0,0],[0,0],[0,0],[-33.196,-88.524],[0,0],[0,0],[83.759,108.395]],"v":[[160.451,160.085],[99.59,171.15],[82.991,226.479],[-127.255,-88.89],[-127.255,-226.478],[-88.632,-212.449],[0,-16.964]]},"ix":2}},{"ty":"fl","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Fill","nm":"Fill 1","c":{"a":0,"k":[1,0.8,0.9686],"ix":4},"r":1,"o":{"a":0,"k":100,"ix":5}},{"ty":"tr","a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"sk":{"a":0,"k":0,"ix":4},"p":{"a":0,"k":[277.435,327.964],"ix":2},"r":{"a":0,"k":0,"ix":6},"sa":{"a":0,"k":0,"ix":5},"o":{"a":0,"k":100,"ix":7}}]},{"ty":"gr","bm":0,"hd":false,"mn":"ADBE Vector Group","nm":"Group 8","ix":7,"cix":2,"np":2,"it":[{"ty":"sh","bm":0,"hd":false,"mn":"ADBE Vector Shape - Group","nm":"Path 1","ix":1,"d":1,"ks":{"a":0,"k":{"c":true,"i":[[0,0],[0,0],[0,0],[-33.196,88.525],[11.066,11.796],[0,0],[94.057,-121.721]],"o":[[0,0],[0,0],[0,0],[33.197,-88.524],[0,0],[0,0],[-83.76,108.395]],"v":[[-160.45,160.085],[-99.59,171.15],[-82.992,226.479],[127.253,-88.89],[127.253,-226.478],[88.524,-210.697],[0,-16.964]]},"ix":2}},{"ty":"st","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Stroke","nm":"Stroke 1","lc":1,"lj":1,"ml":10,"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":18,"ix":5},"c":{"a":0,"k":[0.1529,0.2392,0.8392],"ix":3}},{"ty":"tr","a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"sk":{"a":0,"k":0,"ix":4},"p":{"a":0,"k":[205.451,327.964],"ix":2},"r":{"a":0,"k":0,"ix":6},"sa":{"a":0,"k":0,"ix":5},"o":{"a":0,"k":100,"ix":7}}]},{"ty":"gr","bm":0,"hd":false,"mn":"ADBE Vector Group","nm":"Group 9","ix":8,"cix":2,"np":4,"it":[{"ty":"sh","bm":0,"hd":false,"mn":"ADBE Vector Shape - Group","nm":"Path 1","ix":1,"d":1,"ks":{"a":0,"k":{"c":true,"i":[[0,0],[0,0],[0,0],[-33.196,88.525],[11.066,11.796],[0,0],[94.057,-121.721]],"o":[[0,0],[0,0],[0,0],[33.197,-88.524],[0,0],[0,0],[-83.76,108.395]],"v":[[-160.45,160.085],[-99.59,171.15],[-82.992,226.479],[127.253,-88.89],[127.253,-226.478],[88.524,-210.697],[0,-16.964]]},"ix":2}},{"ty":"fl","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Fill","nm":"Fill 1","c":{"a":0,"k":[1,0.8,0.9686],"ix":4},"r":1,"o":{"a":0,"k":100,"ix":5}},{"ty":"tr","a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"sk":{"a":0,"k":0,"ix":4},"p":{"a":0,"k":[205.451,327.964],"ix":2},"r":{"a":0,"k":0,"ix":6},"sa":{"a":0,"k":0,"ix":5},"o":{"a":0,"k":100,"ix":7}}]}],"ind":3,"parent":5},{"ty":4,"nm":"Small Chatbox Outlines","sr":1,"st":-7,"op":210,"ip":-7,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[509.321,262.694,0],"ix":1},"s":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[100,100,100],"t":82},{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[100,90,100],"t":91},{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[100,105,100],"t":101},{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[100,90,100],"t":110},{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[100,100,100],"t":119},{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[100,90,100],"t":142},{"o":{"x":0.167,"y":0},"i":{"x":0.667,"y":1},"s":[100,105,100],"t":152},{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[100,90,100],"t":162},{"s":[100,100,100],"t":171}],"ix":6},"sk":{"a":0,"k":0},"p":{"a":0,"k":[1838.682,799.694,0],"ix":2},"r":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[0],"t":82},{"o":{"x":0.333,"y":0}
1,"i":{"x":0.667,"y":1},"s":[-6],"t":91},{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[6],"t":101},{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[3],"t":110},{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[0],"t":119},{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[-6],"t":142},{"o":{"x":0.167,"y":0},"i":{"x":0.667,"y":1},"s":[6],"t":152},{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[3],"t":162},{"s":[0],"t":171}],"ix":10},"sa":{"a":0,"k":0},"o":{"a":0,"k":100,"ix":11}},"ef":[],"shapes":[{"ty":"gr","bm":0,"hd":false,"mn":"ADBE Vector Group","nm":"Group 1","ix":1,"cix":2,"np":2,"it":[{"ty":"sh","bm":0,"hd":false,"mn":"ADBE Vector Shape - Group","nm":"Path 1","ix":1,"d":1,"ks":{"a":0,"k":{"c":true,"i":[[-44.029,0],[0,0],[0,-44.03],[0,0],[0,0],[0,0],[36.468,0],[0,0],[0,44.03],[0,0]],"o":[[0,0],[44.03,0],[0,0],[0,0],[0,0],[-9.487,33.428],[0,0],[-44.029,0],[0,0],[0,-44.03]],"v":[[-152.598,-137.694],[94.366,-137.694],[174.089,-57.971],[174.089,10.835],[232.321,79.462],[171.046,79.772],[94.366,137.694],[-152.598,137.694],[-232.321,57.971],[-232.321,-57.971]]},"ix":2}},{"ty":"st","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Stroke","nm":"Stroke 1","lc":1,"lj":1,"ml":10,"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":18,"ix":5},"c":{"a":0,"k":[0.7059,0.7333,0.9176],"ix":3}},{"ty":"tr","a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"sk":{"a":0,"k":0,"ix":4},"p":{"a":0,"k":[277.321,182.694],"ix":2},"r":{"a":0,"k":0,"ix":6},"sa":{"a":0,"k":0,"ix":5},"o":{"a":0,"k":100,"ix":7}}]},{"ty":"gr","bm":0,"hd":false,"mn":"ADBE Vector Group","nm":"Group 2","ix":2,"cix":2,"np":4,"it":[{"ty":"sh","bm":0,"hd":false,"mn":"ADBE Vector Shape - Group","nm":"Path 1","ix":1,"d":1,"ks":{"a":0,"k":{"c":true,"i":[[-44.029,0],[0,0],[0,-44.03],[0,0],[0,0],[0,0],[36.468,0],[0,0],[0,44.03],[0,0]],"o":[[0,0],[44.03,0],[0,0],[0,0],[0,0],[-9.487,33.428],[0,0],[-44.029,0],[0,0],[0,-44.03]],"v":[[-152.598,-137.694],[94.366,-137.694],[174.089,-57.971],[174.089,10.835],[232.321,79.462],[171.046,79.772],[94.366,137.694],[-152.598,137.694],[-232.321,57.971],[-232.321,-57.971]]},"ix":2}},{"ty":"fl","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Fill","nm":"Fill 1","c":{"a":0,"k":[0.4745,0.4745,0.502],"ix":4},"r":1,"o":{"a":0,"k":100,"ix":5}},{"ty":"tr","a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"sk":{"a":0,"k":0,"ix":4},"p":{"a":0,"k":[277.321,182.694],"ix":2},"r":{"a":0,"k":0,"ix":6},"sa":{"a":0,"k":0,"ix":5},"o":{"a":0,"k":100,"ix":7}}]}],"ind":4},{"ty":4,"nm":"Layer 1 Outlines","sr":1,"st":-7,"op":210,"ip":-7,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[41.03,575.295,0],"ix":1},"s":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[100,100,100],"t":3},{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1}
1,"s":[100,95,100],"t":13},{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[100,110,100],"t":23},{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[100,95,100],"t":33},{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[100,100,100],"t":41},{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[100,95,100],"t":72},{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[100,110,100],"t":82},{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[100,95,100],"t":91},{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[100,100,100],"t":99},{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[100,100,100],"t":162},{"o":{"x":0.167,"y":0},"i":{"x":0.667,"y":1},"s":[100,95,100],"t":171},{"s":[100,100,100],"t":181}],"ix":6},"sk":{"a":0,"k":0},"p":{"a":0,"k":[562.743,1464.261,0],"ix":2},"r":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[4],"t":13},{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[-11],"t":23},{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[3],"t":33},{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[0],"t":41},{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[4],"t":72},{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[-11],"t":82},{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[3],"t":91},{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[0],"t":99},{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[0],"t":162},{"s":[4],"t":171}],"ix":10},"sa":{"a":0,"k":0},"o":{"a":0,"k":100,"ix":11}},"ef":[],"shapes":[{"ty":"gr","bm":0,"hd":false,"mn":"ADBE Vector Group","nm":"Group 1","ix":1,"cix":2,"np":2,"it":[{"ty":"sh","bm":0,"hd":false,"mn":"ADBE Vector Shape - Group","nm":"Path 1","ix":1,"d":1,"ks":{"a":0,"k":{"c":true,"i":[[106.896,0],[0,0],[0,-106.896],[0,0],[0,0],[0,0],[-88.536,0],[0,0],[0,106.896],[0,0]],"o":[[0,0],[-106.896,0],[0,0],[0,0],[0,0],[23.033,81.155],[0,0],[106.896,0],[0,0],[0,-106.896]],"v":[[370.478,-334.294],[-229.102,-334.294],[-422.654,-140.742],[-422.654,26.306],[-564.03,192.919],[-415.267,193.672],[-229.102,334.294],[370.478,334.294],[564.03,140.742],[564.03,-140.742]]},"ix":2}},{"ty":"st","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Stroke","nm":"Stroke 1","lc":1,"lj":1,"ml":10,"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":18,"ix":5},"c":{"a":0,"k":[0.8118,0.8196,0.8784],"ix":3}},{"ty":"tr","a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"sk":{"a":0,"k":0,"ix":4},"p":{"a":0,"k":[609.03,379.294],"ix":2},"r":{"a":0,"k":0,"ix":6},"sa":{"a":0,"k":0,"ix":5},"o":{"a":0,"k":100,"ix":7}}]},{"ty":"gr","bm":0,"hd":false,"mn":"ADBE Vector Group","nm":"Group 2","ix":2,"cix":2,"np":4,"it":[{"ty":"sh","bm":0,"hd":false,"mn":"ADBE Vector Shape - Group","nm":"Path 1","ix":1,"d":1,"ks":{"a":0,"k":{"c":true,"i":[[106.896,0],[0,0],[0,-106.896],[0,0],[0,0],[0,0],[-88.536,0],[0,0],[0,106.896],[0,0]],"o":[[0,0],[-106.896,0],[0,0],[0,0],[0,0],[23.033,81.155],[0,0],[106.896,0],[0,0],[0,-106.896]],"v":[[370.478,-334.294],[-229.102,-334.294],[-422.654,-140.742],[-422.654,26.306],[-564.03,192.919],[-415.267,193.672],[-229.102,334.294],[370.478,334.294],[564.03,140.742],[564.03,-140.742]]},"ix":2}},{"ty":"fl","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Fill","nm":"Fill 1","c":{"a":0,"k":[0.4078,0.4078,0.4471],"ix":4},"r":1,"o":{"a":0,"k":100,"ix":5}},{"ty":"tr","a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"sk":{"a":0,"k":0,"ix":4},"p":{"a":0,"k":[609.03,379.294],"ix":2},"r":{"a":0,"k":0,"ix":6},"sa":{"a":0,"k":0,"ix":5},"o":{"a":0,"k":100,"ix":7}}]}],"ind":5}],"v":"5.5.7","fr":60,"op":182,"ip":0,"assets":[]}');var m=a(41641),u=a(27413),p=a(33210),f=a(52760),b=a(74937),g=a(90466),y=a(73321),w=a(41455),v=a(82272),k=a(74350),j=a(52060),N=a(90549),S=a(6962),A=a(17243),C=a(94514),I=a(67635),E=a(15435),_=a(25602),P=a(66609),D=a(80969),G=a(6407),B=a(6296),T=a(64326),F=a(30081);let R=({isOpen:e,onOpenChange:t,orderId:a,senderId:l,userId:o})=>
1{let[c,x]=(0,n.useState)(null),[h,m]=(0,n.useState)(!1),u=(0,s.a)(),[g,y]=(0,n.useState)(null),[w,v]=(0,n.useState)(!1),[R,M]=(0,n.useState)(!1),[O,$]=(0,n.useState)(!1),{addToBasket:V,basketItems:z}=(0,D.M)(),L=(0,d.useGlobalStore)(e=>e.current_user),U=(0,F.X)(),q=async()=>{let e=c?.Id??a;if(e){M(!0);try{let a=await (0,_.oi)(e);a.Success?(P.oR.success(a.Message||"Bespoke order request cancelled successfully"),x(e=>e?{...e,Status:"CANCELLED"}:null),t(!1)):P.oR.error(a.Message||"Failed to cancel bespoke order request")}catch(e){console.error("Error cancelling bespoke order:",e),P.oR.error("Failed to cancel bespoke order request")}finally{M(!1)}}},X=(0,n.useMemo)(()=>(0,T.r)(z,c?.Id??a),[z,c?.Id,a]);(0,n.useEffect)(()=>{e&&a&&(async()=>{m(!0);try{let e=await (0,_.CK)(a,l!==o),t=e;e?.Request&&(t={...e.Request,...e,Id:e.Id??e.Request.Id,OfferedPrice:e.OfferedPrice??e.Request.OfferedPrice,Status:e.Status??e.Request.Status,StoreNote:e.StoreNote??e.Notes??e.Request.Notes}),console.log("[BespokeModal] Final merged order:",t),x(t)}catch(e){console.error("Failed to fetch bespoke order details:",e),P.oR.error("Failed to load order details")}finally{m(!1)}})()},[e,a,l,o]);let H=async()=>{if(c?.Id){v(!0);try{let e=await (0,T._)({addToBasket:V,userId:L?.Id,orderId:c.Id,storeId:c.StoreId||c.Request?.StoreId});e.Success?(P.oR.success("Added to basket"),setTimeout(()=>G.o.getState().openDrawer("physical"),200),t(!1)):P.oR.error(e.Message||"Failed to add to basket")}catch(e){console.error("Error adding to basket:",e),P.oR.error("An error occurred. Please try again.")}finally{v(!1)}}};if(!c&&!h)return null;let K=l!==o,Z=c?.Status||"",W=Z.toLowerCase(),J=c?.OfferedPrice??0,Q=c?.BudgetInStoreCurrency??0,Y=c?.BudgetInUsd??0,ee=("PRICE_OFFERED"===Z||"CANCELLED"===Z&&J>0)&&Q>0&&Y>0?J/(Q/Y):J||Y,et=Z.replace(/_/g," "),ea=(0,r.jsxs)("div",{className:"flex flex-col h-full overflow-hidden modalBg",children:[(0,r.jsxs)("div",{className:"shrink-0 flex items-center justify-between p-4 border-b border-white/5",children:[(0,r.jsx)("h2",{className:"text-[22px] md:text-xl font-bold text-white",children:"Request Details"}),(0,r.jsx)("button",{onClick:()=>t(!1),className:"p-1.5 rounded-full hover:bg-white/10 transition-all",children:(0,r.jsx)(p.A,{className:"w-5 h-5 text-white/50"})})]}),h?(0,r.jsx)("div",{className:"flex-1 flex items-center justify-center p-12",children:(0,r.jsx)("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-emerald-500"})}):c?(0,r.jsxs)("div",{className:"flex-1 flex flex-col overflow-y-auto custom-scrollbar",children:[(0,r.jsx)("div",{className:"w-full shrink-0 border-b border-white/5 p-4 lg:p-6",children:(0,r.jsx)("div",{className:"space-y-4 lg:space-y-6",children:(0,r.jsxs)("div",{className:"flex flex-row items-start gap-4",children:[(0,r.jsx)("div",{className:"relative w-24 h-24 md:w-32 md:h-32 shrink-0 rounded-2xl overflow-hidden bg-neutral-900 border border-white/5",children:c?.CoverPhotoPath?(0,r.jsx)(b.A,{src:(0,f.X)(c?.CoverPhotoPath)||"",alt:"Order",fill:!0,className:"object-cover"}):(0,r.jsx)(N.A,{className:"w-8 h-8 lg:w-10 lg:h-10 absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 opacity-20"})}),(0,r.jsxs)("div",{className:"flex-1 min-w-0 space-y-3",children:[(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex items-center justify-between gap-2 flex-wrap sm:flex-nowrap",children:[(0,r.jsx)("p",{className:"text-2xl font-bricolage font-bold text-white truncate",children:c?.TrackingId}),(0,r.jsx)("div",{className:"flex flex-wrap gap-2",children:(0,r.jsxs)("span",{className:`inline-flex items-center gap-1.5 px-2.5 py-1 lg:px-3 lg:py-1.5 rounded-full text-xl lg:text-sm font-bold uppercase
2                        ${W.includes("offer")||W.includes("price")?"bg-blue-500/20 text-blue-400":W.includes("accept")||W.includes("complet")?"bg-emerald-500/20 text-emerald-400":W.includes("cancel")||W.includes("reject")?"bg-red-500/20 text-red-400":"bg-orange-500/20 text-orange-400"}`,children:[(0,r.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-current"}),et]})})]}),(0,r.jsx)("p",{className:"text-xl lg:text-sm font-semibold text_gray_70 mt-1 truncate",children:c?.StoreName||"Bespoke Request"})]}),(0,r.jsxs)("div",{className:"pt-2 lg:pt-4 border-t border-white/5 flex flex-row justify-between items-center gap-2",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-xl lg:text-sm font-semibold text_gray_50  mb-0.5 lg:mb-1",children:K?"Offered Price":"Your Budget"}),(0,r.jsx)("p",{className:"text-xl font-black text-white",children:U(ee)})]}),c?.SentAt&&(0,r.jsxs)("div",{className:"text-right",children:[(0,r.jsx)("p",{className:"text-xl lg:text-sm font-bold text-white/30 uppercase mb-0.5 lg:mb-1",children:"Request Date"}),(0,r.jsx)("p",{className:"text-xl lg:text-sm font-bold text-white/80",children:(0,E.GP)(new Date(c.SentAt),"MMMM dd, yyyy")})]})]})]})]})})}),(0,r.jsx)("h3",{className:"text-[22px] md:text-xl font-bold text-white/80 mb-0 m-4",children:"Your Submission"}),(0,r.jsx)("div",{className:"flex-1 p-4 lg:p-6 bg-white/5 rounded-[22px] m-4",children:(0,r.jsxs)("div",{className:"max-w-2xl mx-auto 
2space-y-6 lg:space-y-10",children:[(0,r.jsx)("div",{className:"space-y-4",children:c.Answers&&c.Answers.length>0?(0,r.jsx)("div",{className:"space-y-10",children:c.Answers.map((e,t)=>(0,r.jsxs)("div",{className:"space-y-5",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between gap-4 mb-2",children:[(0,r.jsx)("div",{className:"space-y-2 border-l-4 border-emerald-500/50 pl-4",children:(0,r.jsx)("h4",{className:"text-[20px] md:text-lg font-semibold text_gray_70 leading-tight",children:e.OrderExtra?.CustomizationTitle||e.Title||`Option ${t+1}`})}),e.FilePaths?.length>1&&(0,r.jsxs)("button",{onClick:()=>{e.FilePaths.forEach((e,t)=>{let a=(0,f.X)(e,"lg");if(!a)return;let r=document.createElement("a");r.href=a,r.download=`requirement-${t}.jpg`,document.body.appendChild(r),r.click(),document.body.removeChild(r)})},className:"flex items-center gap-2 px-3 py-1.5 bg-white/5 hover:bg-white/10 rounded-lg text-xl lg:text-sm  uppercase text_gray_50 transition-all border border-white/5",children:[(0,r.jsx)(S.A,{size:22}),"Download All"]})]}),e.FilePaths?.length>0&&(0,r.jsx)("div",{className:"grid grid-cols-2 gap-4",children:e.FilePaths.map((e,t)=>(0,r.jsxs)("div",{className:"relative aspect-[4/3] rounded-2xl overflow-hidden border border-white/5 group",children:[(0,r.jsx)(b.A,{src:(0,f.X)(e)||"",alt:"Attachment",fill:!0,className:"object-cover transition-transform duration-500 "}),(0,r.jsxs)("div",{className:"absolute inset-0 bg-black/20 opacity-0 group-hover:opacity-100 transition-opacity flex items-center justify-center gap-2",children:[(0,r.jsx)("button",{onClick:()=>window.open((0,f.X)(e)||"","_blank"),className:"p-2 rounded-full bg-white/10 hover:bg-white/20 text-white transition-all border border-white/10 cursor-pointer",title:"View full image",children:(0,r.jsx)(A.A,{className:"w-4 h-4"})}),(0,r.jsx)("button",{onClick:a=>{a.stopPropagation();let r=(0,f.X)(e,"lg");if(r){let e=document.createElement("a");e.href=r,e.download=`attachment-${t}.jpg`,document.body.appendChild(e),e.click(),document.body.removeChild(e)}},className:"p-2 rounded-full bg-white/10 hover:bg-white/20 text-white transition-all border border-white/10 cursor-pointer",title:"Download image",children:(0,r.jsx)(S.A,{className:"w-4 h-4"})})]})]},t))}),e.Text&&(0,r.jsxs)("div",{className:"flex items-center gap-3 w-fit bg-white/10 border border-white/10 rounded-2xl h-[52px] px-2 shadow-inner",children:[(0,r.jsx)("p",{className:"text-[20px] md:text-base text-white/80 leading-relaxed font-medium pl-2 pr-2",children:e.Text}),(0,r.jsx)("button",{onClick:()=>{var t;return t=e.Text,void(navigator.clipboard.writeText(t),y(t),P.oR.success("Copied to clipboard"),setTimeout(()=>y(null),2e3))},className:"cursor-pointer p-2 rounded-xl bg-white/5 text_gray_70 hover:bg-white/10 hover:text-white transition-all border border-white/5",title:"Copy text",children:g===e.Text?(0,r.jsx)(C.A,{className:"w-3.5 h-3.5 text-emerald-400"}):(0,r.jsx)(I.A,{className:"w-3.5 h-3.5"})})]}),e.Choices?.length>0&&(0,r.jsx)("div",{className:"grid grid-cols-2 gap-4",children:e.Choices.map((e,t)=>(0,r.jsxs)("div",{className:`${!e?.CoverPath&&"w-fit"} flex flex-col gap-3 ${!e?.CoverPath?"px-4 py-1":"p-3"} bg-white/[0.02] border border-white/10 rounded-[24px] group transition-all`,children:[e.CoverPath&&(0,r.jsxs)("div",{className:"relative aspect-square rounded-[18px] overflow-hidden border border-white/5 cursor-pointer group/imgContainer",onClick:()=>window.open((0,f.X)(e.CoverPath,"lg")||"","_blank"),children:[(0,r.jsx)(b.A,{src:(0,f.X)(e.CoverPath,"md")||"",alt:e.Title,fill:!0,className:"object-cover group-hover:scale-105 transition-transform duration-500"}),(0,r.jsxs)("div",{className:"absolute inset-0 bg-black/40 opacity-0 group-hover:opacity-100 transition-opacity flex items-center justify-center gap-2",children:[(0,r.jsx)("div",{className:"p-2 rounded-full bg-white/10 hover:bg-white/20 text-white transition-all border border-white/10 cursor-pointer",title:"View full image",children:(0,r.jsx)(A.A,{className:"w-3.5 h-3.5"})}),(0,r.jsx)("button",{onClick:t=>{t.stopPropagation();let a=(0,f.X)(e.CoverPath,"lg");if(a){let t=document.createElement("a");t.href=a,t.download=`${e.Title||"choice"}.jpg`,document.body.appendChild(t),t.click(),document.body.removeChild(t)}},className:"p-2 rounded-full bg-white/10 hover:bg-white/20 text-white transition-all border border-white/10 cursor-pointer",title:"Download image",children:(0,r.jsx)(S.A,{className:"w-3.5 h-3.5"})})]})]}),(0,r.jsx)("span",{className:"px-2 py-1 text-xl lg:text-sm font-bold uppercase text-emerald-400 text-center",children:e.Title})]},t))})]},t))}):(0,r.jsxs)("div",{className:"py-6 mb-2 text-center space-y-4 bg-white/[0.01] rounded-2xl border border-dashed border-white/5",children:[(0,r.jsx)("div",{className:"text-xl font-black text-white/10",children:":("}),(0,r.jsx)("p",{className:"text-xl font-bold text_gray_70 ",children:"No Customizations Provided"})]})}),c?.StoreNote&&(0,r.jsxs)("div",{className:"pt-2 border-t border-white/5",children:[(0,r.jsx)("h3",{className:"text-xl md:text-lg font-semibold text_gray_70 mb-2",children:"Store Message"}),(0,r.jsx)("div",{className:"p-4 bg-white/10 rounded-xl border border-white/20",children:(0,r.jsx)("p",{className:"text-base text_gray_70 leading-relaxed font-medium",children:c?.StoreNote})})]})]})})]}):null,(0,r.jsxs)("div",{className:`shrink-0 py-4 ${u&&"pb-12"} px-6 border-t border-white/5 text-right flex items-center justify-end gap-3`,children:[!W.includes("cancel")&&(0,r.jsx)("button",{onClick:()=>$(!0),disabled:R,className:"cursor-pointer hover:bg-white/10 w-fit h-[52px] px-6 bg-white/30 text-xl lg:text-sm text_gray_70 font-bold uppercase rounded-xl transition-all disabled:opacity-50 disabled:cursor-not-allowed inline-flex items-center justify-center gap-2",children:R?(0,r.jsx)(B.A,{className:"w-4 h-4 animate-spin"}):"Cancel Request"}),K&&"cancelled"!==W&&!X&&(0,r.jsx)("button",{onClick:H,disabled:w,className:"cursor-pointer hover:bg-emerald-500/30 w-fit h-[52px] px-8 bg-emerald-600/20 border border-emerald-500/30 text-xl lg:text-sm text-emerald-400 font-bold uppercase rounded-xl transition-all disabled:opacity-50 disabled:cursor-not-allowed inline-flex items-center justify-center gap-2 whitespace-nowrap",children:w?(0,r.jsx)(B.A,{className:"w-4 h-4 animate-spin"}):"Add to Basket"})]})]}),er=O&&(0,r.jsx)(k.lG,{open:O,onOpenChange:e=>!R&&$(e),children:(0,r.jsxs)(k.ZJ,{forceMount:!0,children:[(0,r.jsx)(j.hJ,{forceMount:!0,asChild:!0,children:(0,r.jsx)("div",{className:"bg-black/60 backdrop-blur-sm fixed inset-0 z-[1000001] flex items-center justify-center p-4 animate-in fade-in duration-200",onClick:()=>!R&&$(!1)})}),(0,r.jsx)(j.UC,{forceMount:!0,asChild:!0,className:"p-0 border-none outline-none focus:outline-none z-[1000001] fixed inset-0 flex items-center justify-center",children:(0,r.jsxs)("div",{onClick:e=>e.stopPropagation(),children:[(0,r.jsx)(k.L3,{className:"sr-only",children:"Confirm Cancel Request"}),(0,r.jsxs)("div",{className:"w-[90vw] max-w-[380px] p-6 gap-4 flex flex-col border border-white/10 shadow-2xl bg-[#1A1A1C] rounded-3xl animate-in fade-in zoom-in-95 duration-200 text-left",children:[(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)("h3",{className:"text-xl font-bold text-white",children:"Cancel Request?"}),(0,r.jsx)("p",{className:"text-sm text-white/70 leading-relaxed",children:"Are you sure you want to cancel this bespoke order request? This action cannot be undone."})]}),(0,r.jsxs)("div",{className:"flex items-center justify-end gap-3 mt-2",children:[(0,r.jsx)("button",{onClick:()=>$(!1),disabled:R,className:"flex-1 px-4 h-[44px] rounded-xl bg-white/5 hover:bg-white/10 text-white/70 hover:text-white text-sm font-bold transition-all disabled:opacity-50 cursor-pointer",children:"Keep Request"}),(0,r.jsx)("button",{onClick:async()=>{await q(),$(!1)},disabled:R,className:"flex-1 px-4 h-[44px] rounded-xl bg-red-600/20 hover:bg-red-600/30 border border-red-500/30 text-red-400 text-sm font-bold transition-all disabled:opacity-50 cursor-pointer inline-flex items-center justify-center gap-2",children:R?(0,r.jsx)(B.A,{className:"w-4 h-4 animate-spin"}):"Yes, Cancel"})]})]})]})})]})});return u?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i._s,{open:e,onOpenChange:t,children:(0,r.jsx)(i.zj,{className:"bg_secondary border-white/10 h-[90vh] flex flex-col focus:outline-none",children:ea})}),er]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(k.lG,{open:e,onOpenChange:t,children:(0,r.jsxs)(k.Cf,{className:"w-[95%] md:w-[50%] lg:w-[30%]  h-[80vh] lg:h-[85vh] flex flex-col overflow-hidden squircle p-0 border-none bg_secondary text-white shadow-xl animate-in fade-in zoom-in duration-300 border border-white/10 ",children:[(0,r.jsx)(k.L3,{className:"sr-only",children:"Bespoke order details"}),ea]})}),er]})};var M=a(37206),O=a(2125),$=a(35844),V=a(49289);async function z({selectedMedia:e,selectedRoomId:t,currentUserId:a,onPendingUploadsCreated:r,onImageCached:s,onItemSettled:i,onMessageSent:l}){let n=e.map(e=>({id:Math.random().toString(36).substring(7),type:e.type,preview:e.preview}));r(n);for(let r=0;r<e.length;r++){let d=e[r],c=n[r],{file:x,type:h}=d;if(/\.(tiff?)$/i.test(x.name)){console.warn(`TIFF file ${x.name} is not allowed.`),i(c.id);continue}if(x.size>0x3200000){console.warn(`File ${x.name} too large`),i(c.id);continue}try{let e=await (0,V.Q)({file:x,path:"StoreChat/Media"}),r=e.UploadedFile?.FilePath;if(e.Success&&r){"IMAGE"===h&&s(r,d.preview);let e={Id:0,StoreChatRoomId:t,Text:"FILE"===h?x.name:"",Type:h,SenderId:a,SentAt:new Date().toISOString().split(".")[0]+"Z",ImagePath:r,ImageWidth:null,ImageHeight:null,ByteSize:x.size},i=await $.u.post(O.VR.SEND_MESSAGE,e),n=await i.json(),c=n?.Data??n;c&&c.Id&&o.L.getState().addMessage(c),l?.()}else console.error(`Failed to upload ${x.name}:`,e.Message)}catch(e){console.error(`Failed to upload file ${x.name}:`,e)}finally{i(c.id)}}}var L=a(41159),U=a(61878);function q({rooms:e,selectedRoomId:t,searchQuery:a,isLoadingMoreRooms:l,isDrawer:n=!1,onSearchChange:o,onSelectRoom:d,lastRoomRef:h}){let m=e.filter(e=>e.StoreName?.toLowerCase().includes(a.toLowerCase())),u=(0,c.n)(e=>e.language),g=x.P[u],y=(0,s.a)();return n&&!y?(0,r.jsxs)("div",{"data-vaul-no-drag":!0,className:"w-[68px] flex flex-col items-center py-3 md:gap-4 gap-6 cardBg shrink-0 overflow-y-auto custom-scrollbar-visible",children:[0===m.length?(0,r.jsx)("div",{className:"flex flex-col items-center justify-center mt-8 opacity-30",children:(0,r.jsx)(L.A,{className:"w-7 h-7 text-white"})}):m.map((e,a)=>{let s=t===e.Id;return(0,r.jsxs)("button",{ref:a===m.length-1?h:null,onClick:()=>d(e.Id),title:e.StoreName,className:`relative group w-18 h-18 md:w-12 md:h-12 rounded-full overflow-hidden border transition-all cursor-pointer shrink-0 ${s?"border-emerald-500 border-2":"border-white/10 hover:border-white/30 active:border-white/30"}`,children:[(0,r.jsx)(b.A,{src:(0,f.X)(e.StoreAvatar,"sm")||"/default-store.png",alt:e.StoreName,fill:!0,className:"object-cover"}),(e.UnreadCount??0)>0&&(0,r.jsx)("span",{className:"absolute top-0 right-0 w-4 h-4 bg-rose-500 rounded-full flex items-center justify-center text-[9px] font-black text-white border border-black",children:e.UnreadCount}),(0,r.jsx)("span",{className:"pointer-events-none absolute left-full ml-2 top-1/2 -translate-y-1/2 whitespace-nowrap rounded-lg bg-black/90 text-white text-xs font-semibold px-2 py-1 opacity-0 group-hover:opacity-100 transition-opacity z-50 shadow-xl",children:e.StoreName})]},e.Id)}),l&&(0,r.jsx)("div",{className:"py-2",children:(0,r.jsx)("div",{className:"animate-spin rounded-full h-5 w-5 border-b-2 border-emerald-500"})})]}):(0,r.jsxs)("div",{...n?{"data-vaul-no-drag":""}:{},className:`w-full ${n?"":"lg:w-[350px]"} border-r border-white/10 flex flex-col cardBg ${y&&t?"hidden":"flex"}`,children:[(0,r.jsxs)("div",{className:"p-4",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between my-4 mx-2",children:[(0,r.jsx)("h1",{className:"text-[22px] font-bold font-montas uppercase",children:g.chat.messages}),n&&(0,r.jsx)(i.cp,{asChild:!0,children:(0,r.jsx)("button",{className:"rounded-full text-white/60 hover:text-white hover:bg-white/10 active:bg-white/10 cursor-pointer transition-all",children:(0,r.jsx)(p.A,{size:20,className:"mb-3"})})})]}),(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)(U.A,{size:22,className:"absolute left-4 top-1/2 -translate-y-1/2 text_gray_50"}),(0,r.jsx)("input",{type:"text",placeholder:g.chat.search_stores,value:a,onChange:e=>o(e.target.value),className:"w-full bg-white/5 border border-white/10 rounded-full h-[52px] pl-16 pr-4 outline-none focus:border-emerald-500/50 transition-all font-medium text-2xl md:text-sm text-white placeholder:text_gray_50"})]})]}),(0,r.jsxs)("div",{className:"flex-1 overflow-y-auto custom-scrollbar p-4 space-y-1",children:[0===m.length?(0,r.jsxs)("div",{className:"flex flex-col items-center justify-center h-40 opacity-30",children:[(0,r.jsx)(L.A,{className:"w-10 h-10 mb-2 text-white"}),(0,r.jsx)("p",{className:"text-xs uppercase font-bold text-white",children:g.chat.no_chats})]}):m.map((e,a)=>(0,r.jsxs)("button",{ref:a===m.length-1?h:null,onClick:()=>d(e.Id),className:`mb-4  w-full squircle bg-white/5 hover:bg-white/[0.05] border border-white/10 hover:border-transparent active:bg-white/[0.05]  flex items-center gap-4 p-4 py-[22px] transition-all cursor-pointer ${t===e.Id?"bg-white/10 shadow-lg squircle border-transparent":""}`,children:[(0,r.jsx)("div",{className:"relative w-18 h-18 rounded-full overflow-hidden border border-white/10 bg_secondary shrink-0",children:(0,r.jsx)(b.A,{src:(0,f.X)(e.StoreAvatar,"sm")||"/default-store.png",alt:e.StoreName,fill:!0,className:"object-cover"})}),(0,r.jsxs)("div",{className:"flex-1 text-left min-w-0",children:[(0,r.jsxs)("div",{className:"flex justify-between items-start",children:[(0,r.jsx)("h3",{className:`font-bold text-[20px] truncate ${t===e.Id?"text-white":"text_gray_70"}`,children:e.StoreName}),e.LastMessageSentAt&&(0,r.jsx)("span",{className:"text-lg text_gray_50 font-semibold ml-2 shrink-0",children:(0,E.GP)(new Date(e.LastMessageSentAt.endsWith("Z")?e.LastMessageSentAt:e.LastMessageSentAt+"Z"),"h:mm a")})]}),(0,r.jsx)("p",{className:"text-lg text_gray_50 truncate font-medium mt
2-0.5",children:e.LastMessageText||"No messages yet"})]}),(e.UnreadCount??0)>0&&(0,r.jsx)("div",{className:"w-5 h-5 bg-emerald-500 rounded-full flex items-center justify-center shrink-0",children:(0,r.jsx)("span",{className:"text-[10px] font-black text-white",children:e.UnreadCount})})]},e.Id)),l&&(0,r.jsx)("div",{className:"flex justify-center py-4",children:(0,r.jsx)("div",{className:"animate-spin rounded-full h-5 w-5 border-b-2 border-emerald-500"})})]})]})}var X=a(56842),H=a(78916),K=a(48368),Z=a(47339),W=a(76943),J=a(10029),Q=a(45005),Y=a(83687);let ee=(0,a(1934).v)(e=>({entries:{},setEntry:(t,a)=>e(e=>({entries:{...e.entries,[t]:a}})),removeEntry:t=>e(e=>{if(!(t in e.entries))return e;let a={...e.entries};return delete a[t],{entries:a}}),reset:()=>e({entries:{}})}));function et(e){return!!e?.loading}function ea(e){return!!(e?.text&&!e.loading)}var er=a(9339);let es=(0,er.createServerReference)("60363b7a19de12f3f35858ebe044d2098311c9643f",er.callServer,void 0,er.findSourceMapURL,"translateTextOnServer"),ei=(0,er.createServerReference)("409fac61e7128caec49021dec85dd0fd396c7cdb11",er.callServer,void 0,er.findSourceMapURL,"detectLanguageOnServer");var el=a(89385);let en="chat_translation_cache",eo=null,ed=null;function ec(){if(eo)return eo;eo=new Map;try{let e=window.localStorage.getItem(en);e&&(eo=new Map(JSON.parse(e)))}catch{eo=new Map}return eo}let ex={zh:"zh-Hans","zh-CN":"zh-Hans","zh-TW":"zh-Hant",tl:"fil"},eh=Object.entries(ex).reduce((e,[t,a])=>(a in e||(e[a]=t),e),{}),em=new Map,eu=new Map;async function ep(e,t){try{var a;let r=t.map(e=>e.text);a=await e.run(r),t.forEach((t,r)=>{let s=Array.isArray(a)?a[r]:null,i=s?e.map(s):null;i?t.resolve(i):t.reject(Error("Unexpected Azure Translator response"))})}catch(e){t.forEach(t=>t.reject(e))}}let ef=e=>{let t=e?.language;return"string"!=typeof t?null:{language:t,score:"number"==typeof e?.score?e.score:0}};function eb(e,t,a,r,s){let i=ec().get(e)??null;if(i)return Promise.resolve(i);let l=eu.get(e);return l||(l=new Promise((e,i)=>{let l=em.get(t);l||(l={items:[],run:r,map:s},em.set(t,l),setTimeout(()=>(function(e){let t=em.get(e);if(t){em.delete(e);for(let e=0;e<t.items.length;e+=50)ep(t,t.items.slice(e,e+50))}})(t),60)),l.items.push({text:a,resolve:e,reject:i})}).then(t=>{let a=ec();for(a.set(e,t);a.size>500;){let e=a.keys().next().value;if(void 0===e)break;a.delete(e)}return ed&&clearTimeout(ed),ed=setTimeout(()=>{try{window.localStorage.setItem(en,JSON.stringify([...ec()]))}catch{ed=null}},1e3),t}).finally(()=>eu.delete(e)),eu.set(e,l)),l}function eg(e){return!!e?.Text?.trim()&&!e?.ImagePath&&e?.Type!=="FILE"}function ey(){let e=(0,c.n)(e=>e.language),t=ee(e=>e.setEntry),a=ee(e=>e.removeEntry),r=(0,n.useCallback)(async(a,r)=>{t(a.Id,{loading:!0,error:!1,text:"",from:"",locale:e});try{let r=await function(e,t){let a="string"==typeof e?e.trim():"";if(!a)return Promise.reject(Error("Nothing to translate"));let r=ex[t]??t;return eb(`${r}::${a}`,`translate:${r}`,a,e=>es(e,r),e=>{let t=e?.translations?.[0]?.text;return"string"!=typeof t?null:{text:t,from:e?.detectedLanguage?.language??"",to:r}})}(a.Text,e),s=ee.getState().entries[a.Id];if(!s?.loading)return!0;return t(a.Id,{loading:!1,error:!1,text:r.text,from:r.from,locale:e}),!0}catch(s){return console.error("Translation failed:",s),ee.getState().entries[a.Id]?.loading&&t(a.Id,{loading:!1,error:!0,text:"",from:"",locale:e}),r&&P.oR.error(x.P[e].chat.translation_failed),!1}},[e,t]),s=(0,n.useCallback)(e=>a(e.Id),[a]),i=(0,n.useCallback)(async e=>{if(!eg(e))return;let t=ee.getState().entries[e.Id];ea(t)||et(t)?s(e):await r(e,!0)},[s,r]);return{translateMessage:r,toggleTranslation:i,showOriginal:s}}async function ew(e,t){try{let{language:a,score:r}=await function(e){let t="string"==typeof e?e.trim():"";return t?eb(`detect::${t}`,"detect",t,ei,ef):Promise.reject(Error("Nothing to detect"))}(e);if(r<.8)return!1;return a.toLowerCase()===t.toLowerCase()}catch(e){return console.error("Language detection failed:",e),!1}}var ev=a(46597);let ek=(0,M.default)(()=>a.e(8751).then(a.bind(a,88751)).then(e=>e.BespokeOrderBubble),{loadableGenerated:{webpack:()=>[88751]}});function ej({imagePath:e,localCacheUrl:t}
2){let a=t||(0,f.X)(e),s=t||(0,f.X)(e,"lg"),[i,l]=(0,n.useState)(a||s||"");return(0,n.useEffect)(()=>{let a=t||(0,f.X)(e),r=t||(0,f.X)(e,"lg");if(t||!r||a===r)return void l(a||r||"");l(a);let s=!0,i=new window.Image;return i.src=r,i.onload=()=>{s&&l(r)},i.onerror=()=>{s&&l(a)},()=>{s=!1}},[e,t]),(0,r.jsx)(b.A,{src:i,alt:"message",width:320,height:240,className:"w-[240px] sm:w-[320px] h-auto object-cover rounded-2xl cursor-zoom-in"})}function eN({msg:e,isOwn:t,storeAvatar:a,userId:i,localImageCache:l,onOpenDetails:n,onPreviewImage:d,onDownloadFile:h}){let m=(0,c.n)(e=>e.language),p=x.P[m],g=(0,s.a)(),y=(0,o.L)(e=>e.autoTranslate),{toggleTranslation:w,showOriginal:v}=ey(),k=ee(t=>t.entries[e.Id]),j=ea(k),N=et(k),A=j?k.text:null,I=j?k.from?p.chat.translated_from.replace("{language}",function(e){if(!e)return"";let t=eh[e]??e,a=el.Q.find(a=>{var r;return a.code===t||(ex[r=a.code]??r).toLowerCase()===e.toLowerCase()});return a?.name??e.toUpperCase()}(k.from)):p.chat.translated:"",_=N?p.chat.translating:j?p.chat.show_original:p.chat.translate;return(0,r.jsxs)("div",{className:`flex w-full ${t?"justify-end origin-bottom-right":"justify-start origin-bottom-left"} [&:nth-last-child(2)]:animate-in [&:nth-last-child(2)]:fade-in-0 [&:nth-last-child(2)]:zoom-in-50 [&:nth-last-child(2)]:slide-in-from-bottom-2 [&:nth-last-child(2)]:duration-200 [&:nth-last-child(2)]:ease-out [&:nth-last-child(2)]:transform-gpu`,children:[!t&&(0,r.jsx)("div",{className:"relative md:w-7 md:h-7 w-11 h-11 rounded-full overflow-hidden border border-white/10 bg_secondary shrink-0 mr-2 mt-1 self-end",children:(0,r.jsx)(b.A,{src:(0,f.X)(a,"sm")||"",alt:"store avatar",fill:!0,className:"object-cover"})}),(0,r.jsx)("div",{className:`${"BESPOKE_ORDER"===e.Type||"BESPOKE_OFFER"===e.Type||"FILE"===e.Type||"IMAGE"===e.Type||e.ImagePath?"w-full max-w-[280px] sm:max-w-[340px]":"w-fit max-w-[85%] sm:max-w-[580px]"}`,children:"BESPOKE_ORDER"===e.Type||"BESPOKE_OFFER"===e.Type?(0,r.jsx)(ek,{msg:e,isOwn:t,userId:i,onOpenDetails:t=>n(t,e.SenderId)}):"FILE"===e.Type?(0,r.jsxs)("div",{className:`flex items-start gap-3 p-2.5 sm:p-3 bg-white/15 border border-white/10 rounded-[20px] w-full max-w-[240px] sm:max-w-[320px] transition-all hover:bg-white/10 group ${t?"rounded-br-[6px]":"rounded-bl-[6px]"}`,children:[(0,r.jsx)("div",{className:`w-14 h-14 md:w-10 md:h-10 flex-shrink-0 flex items-center justify-center rounded-xl ${t?"bg-emerald-500/20 text-emerald-400":"bg-white/10 text_gray_50"}`,children:(e=>{if(!e)return(0,r.jsx)(H.A,{className:"w-5 h-5"});switch(e.split(".").pop()?.toLowerCase()){case"pdf":case"doc":case"docx":case"txt":return(0,r.jsx)(K.A,{className:"w-5 h-5"});case"xls":case"xlsx":case"csv":return(0,r.jsx)(Z.A,{className:"w-5 h-5"});case"zip":case"rar":case"7z":return(0,r.jsx)(W.A,{className:"w-5 h-5"});case"mp3":case"wav":return(0,r.jsx)(J.A,{className:"w-5 h-5"});case"mp4":case"mov":case"avi":return(0,r.jsx)(Q.A,{className:"w-5 h-5"});default:return(0,r.jsx)(H.A,{className:"w-5 h-5"})}})(e.Text)}),(0,r.jsxs)("div",{className:"flex-1 min-w-0 text-right",children:[(0,r.jsx)("p",{className:"text-2xl md:text-[16px]  font-bold truncate text-white text-right",children:e.Text||p.chat.file}),(0,r.jsxs)("div",{className:`flex items-center justify-end gap-2 mt-2 ${g?"flex-col items-end":""}`,children:[(0,r.jsxs)("p",{className:"text-lg md:text-xs font-semibold text_gray_50 whitespace-nowrap text-right",children:[(e=>{if(!e)return"FILE";let t=e.split(".");return t.length>1?t.pop()?.toUpperCase():"FILE"})(e.Text),e.ByteSize?` • ${(e=>{if(0===e)return"0 Bytes";let t=Math.floor(Math.log(e)/Math.log(1024));return parseFloat((e/Math.pow(1024,t)).toFixed(2))+" "+["Bytes","KB","MB","GB"][t]})(e.ByteSize)}`:""]}),(0,r.jsx)("span",{className:"text-xl sm:text-sm font-semibold text_gray_70 whitespace-nowrap text-right",children:(0,E.GP)(new Date(e.SentAt.endsWith("Z")?e.SentAt:e.SentAt+"Z"),"h:mm a")})]})]}),(0,r.jsx)("button",{onClick:()=>h(e.ImagePath,e.Text),className:"p-2 rounded-full hover:bg-white/10 text_gray_70 hover:text-white transition-all cursor-pointer",title:p.productDetails.download_file,children:(0,r.jsx)(S.A,{className:"w-8 h-8 md:w-4 md:h-4"})})]}):e.ImagePath?(0,r.jsxs)("div",{className:`rounded-2xl overflow-hidden group relative cursor-pointer ${t?"rounded-br-none":"rounded-bl-none"}`,onClick:()=>d(l[e.ImagePath]||(0,f.X)(e.ImagePath,"lg")||""),children:[(0,r.jsx)(ej,{imagePath:e.ImagePath,localCacheUrl:l[e.ImagePath]}),(0,r.jsx)("button",{onClick:t=>{t.stopPropagation(),h(e.ImagePath,`image-${Date.now()}.jpg`)},className:"cursor-pointer absolute top-2 right-2 p-2 bg-black/50 hover:bg-black/70 text-white rounded-full opacity-0 group-hover:opacity-100 transition-all shadow-lg backdrop-blur-sm",children:(0,r.jsx)(S.A,{className:"w-4 h-4"})}),(0,r.jsx)("p",{className:`text-xl md:text-sm lg:text-xs font-bold ${t?"text-right":"text-left"}`,children:(0,E.GP)(new Date(e.SentAt.endsWith("Z")?e.SentAt:e.SentAt+"Z"),"h:mm a")})]}):(0,r.jsxs)("div",{className:"flex items-start gap-2 group",children:[(0,r.jsxs)("div",{className:`px-4 py-3 rounded-2xl shadow-md ${t?"bg_chat text-white rounded-br-[6px]":"bg_white_10 text-white/90 rounded-bl-[6px] border border-white/5"}`,children:[(0,r.jsx)("p",{dir:j?(0,ev._g)(k.locale):"auto",className:"text-2xl md:text-[16
2px] cursor-pointer font-medium whitespace-pre-wrap text-start",children:A||e.Text}),j?(0,r.jsxs)("button",{onClick:()=>v(e),className:"flex items-center gap-1 mt-1 text-lg md:text-xs opacity-70 hover:opacity-100 transition-opacity cursor-pointer",children:[(0,r.jsx)(u.A,{className:"w-3 h-3 shrink-0"}),(0,r.jsx)("span",{children:I}),(0,r.jsx)("span",{"aria-hidden":"true",children:"\xb7"}),(0,r.jsx)("span",{className:"underline",children:p.chat.show_original})]}):N?(0,r.jsx)("p",{className:"text-lg md:text-xs italic mt-1 opacity-70",children:p.chat.translating}):k?.error?(0,r.jsx)("p",{className:"text-lg md:text-xs italic mt-1 opacity-70",children:p.chat.translation_failed}):null,(0,r.jsxs)("div",{className:`flex items-center gap-1 mt-1.5 ${t?"justify-end":"justify-start"}`,children:[(0,r.jsx)("span",{className:`text-xl md:text-sm lg:text-xs font-bold  ${t?"text-amber-800":"text_gray_50"}`,children:(0,E.GP)(new Date(e.SentAt.endsWith("Z")?e.SentAt:e.SentAt+"Z"),"h:mm a")}),t&&(e.IsRead?(0,r.jsx)(Y.A,{className:"w-3 h-3 opacity-40"}):(0,r.jsx)(C.A,{className:"w-3 h-3 opacity-40"}))]})]}),!t&&eg(e)&&!y&&(0,r.jsx)("button",{onClick:()=>w(e),disabled:N,className:`p-2 rounded-full bg-white/5 hover:bg-white/10 transition-colors flex-shrink-0 cursor-pointer ${j?"text-white":"text-white/50 hover:text-white"}`,title:_,"aria-label":_,children:N?(0,r.jsx)(B.A,{className:"w-4 h-4 animate-spin"}):(0,r.jsx)(u.A,{className:"w-4 h-4"})})]})})]})}function eS({messages:e,selectedRoomId:t,selectedRoom:a,currentUser:s,isLoading:i,isLoadingOlderMessages:l,pendingUploads:o,localImageCache:d,scrollRef:h,showScrollBtn:m,onScroll:u,onScrollToBottom:p,onOpenBespokeDetails:f,onPreviewImage:b,onDownloadFile:g}){let y=(0,n.useRef)(null),w=(0,n.useRef)(null);if((0,n.useEffect)(()=>{if(!t||i||0===e.length)return;let a=w.current!==t;w.current=t;let r=()=>{y.current&&y.current.scrollIntoView({behavior:"instant",block:"end"}),h?.current&&(h.current.scrollTop=h.current.scrollHeight)};if(a){r();let e=requestAnimationFrame(r),t=setTimeout(r,50),a=setTimeout(r,150),s=setTimeout(r,350);return()=>{cancelAnimationFrame(e),clearTimeout(t),clearTimeout(a),clearTimeout(s)}}},[t,e.length,i,h]),!t)return null;let v=(0,c.n)(e=>e.language),k=x.P[v];return(0,r.jsxs)("div",{className:"relative flex-1 flex flex-col min-h-0",children:[(0,r.jsxs)("div",{ref:h,onScroll:u,className:"flex-1 overflow-y-auto overflow-x-hidden p-4 space-y-4 custom-scrollbar-visible relative",children:[l&&(0,r.jsx)("div",{className:"flex justify-center py-2",children:(0,r.jsx)("div",{className:"animate-spin rounded-full h-5 w-5 border-b-2 border-emerald-500"})}),i&&0===e.length?(0,r.jsx)("div",{className:"flex items-center justify-center h-full",children:(0,r.jsx)("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-emerald-500"})}):0===e.length?(0,r.jsxs)("div",{className:"flex flex-col items-center justify-center h-full opacity-30",children:[(0,r.jsx)("p",{className:"text-xl font-bold uppercase text-white",children:k.chat.no_messages}),(0,r.jsx)("p",{className:"text-xl mt-1 text_gray_50",children:k.chat.send_first})]}):e.filter((t,a)=>"BESPOKE_ORDER"!==t.Type&&"BESPOKE_OFFER"!==t.Type||!t.IntValueA||!e.slice(a+1).some(e=>("BESPOKE_ORDER"===e.Type||"BESPOKE_OFFER"===e.Type)&&e.IntValueA===t.IntValueA)).flatMap((e,t,i)=>{let l=e.SenderId===s?.Id,n=0===t||(0,E.GP)(new Date(i[t-1].SentAt),"yyyy-MM-dd")!==(0,E.GP)(new Date(e.SentAt),"yyyy-MM-dd"),o=[];return n&&o.push((0,r.jsx)("div",{className:"flex justify-center my-6",children:(0,r.jsx)("span",{className:"px-4 py-1.5 glass_card rounded-full text-xl md:text-xs font-semibold uppercase text_gray_90",children:(0,E.GP)(new Date(e.SentAt),"MMMM dd, yyyy")})},`date-${e.Id}`)),o.push((0,r.jsx)(eN,{msg:e,isOwn:l,storeAvatar:a?.StoreAvatar,userId:s?.Id,localImageCache:d,onOpenDetails:f,onPreviewImage:b,onDownloadFile:g},e.Id)),o}),o.map(e=>(0,r.jsx)("div",{className:"flex justify-end w-full animate-in fade-in slide-in-from-bottom-2 duration-300",children:(0,r.jsxs)("div",{className:`${"IMAGE"===e.type?"w-[240px] sm:w-[320px] aspect-video":"w-[240px] sm:w-[320px] h-16"} bg-white/5 rounded-2xl border border-white/10 flex items-center justify-center overflow-hidden relative group`,children:["IMAGE"===e.type&&e.preview?(0,r.jsx)("img",{src:e.preview,alt:"preview",className:"w-full h-full object-cover opacity-40 grayscale blur-[2px]"}):null,(0,r.jsx)("div",{className:"absolute inset-0 flex items-center justify-center bg-black/20",children:(0,r.jsx)("div",{className:"w-8 h-8 rounded-full border-2 border-emerald-500/30 border-t-emerald-500 animate-spin"})}),(0,r.jsx)("div",{className:"absolute bottom-2 right-3",children:(0,r.jsx)("span",{className:"text-[10px] font-bold uppercase text-white/40 animate-pulse",children:k.chat.sending})})]})},e.id)),(e.length>0||o.length>0)&&(0,r.jsx)("div",{ref:y,className:"h-px w-full shrink-0"})]}),m&&(0,r.jsx)("button",{onClick:()=>p("smooth"),className:"absolute bottom-12 left-1/2 -translate-x-1/2 z-10 h-10 w-10 border border-white/15 bg-black/20 backdrop-blur-xl rounded-full flex items-center justify-center shadow-lg hover:bg-white/10 transition-all cursor-pointer",children:(0,r.jsx)(X.A,{className:"w-4 h-4 text-white"})})]})}var eA=a(56204);function eC({inputText:e,isUploading:t,fileInputRef:a,onInputChange:i,onSendMessage:l,onFileUpload:n,onPaste:o}){let d=(0,c.n)(e=>e.language),h=x.P[d],m=(0,s.a)();return(0,r.jsx)("div",{className:`px-2 py-2  ${m&&"!pb-8"} border-t border-white/5`,children:(0,r.jsxs)("div",{className:"flex items-center gap-2 lg:gap-3 glass_card border border-white/10 rounded-full px-4 md:px-2 h-[65px] md:h-[52px] group focus-within:border-emerald-500/50 transition-all",children:[(0,r.jsx)("input",{type:"file",ref:a,onChange:e=>n(e,"IMAGE"),multiple:!0,accept:"image/*,.tiff,.tif,.heic,.heif,.avif",className:"hidden"}),(0,r.jsx)("input",{type:"file",id:"generic-file-input",onChange:e=>n(e,"FILE"),multiple:!0,className:"hidden"}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("button",{onClick:()=>a.current?.click(),disabled:t,title:h.productDetails.upload_image,className:"p-4 md:p-2 cursor-pointer rounded-full glass_card text_gray_70 hover:bg-emerald-600/20 hover:text-emerald-400 transition-all disabled:opacity-50 hover:scale-110 active:scale-95",children:t?(0,r.jsx)("div",{className:"animate-spin rounded-full h-6 w-6 md:h-4 md:w-4 border-b-2 border-emerald-500"}):(0,r.jsx)(A.A,{className:"w-6 h-6 md:w-4 md:h-4"})}),(0,r.jsx)("button",{onClick:()=>document.getElementById("generic-file-input")?.click(),disabled:t,title:h.chat.upload_files,className:"p-4 md:p-2 cursor-pointer rounded-full glass_card text_gray_70 hover:bg-emerald-600/20 hover:text-emerald-400 transition-all disabled:opacity-50 hover:scale-110 active:scale-95",children:(0,r.jsx)(H.A,{className:"w-6 h-6 md:w-4 md:h-4"})})]}),(0,r.jsxs)("div",{className:"relative flex-1 min-w-0 flex items-center",children:[(0,r.jsx)("input",{type:"text",value:e,onCh
2ange:e=>i(e.target.value),onKeyDown:e=>"Enter"===e.key&&l(),onPaste:o,placeholder:h.chat.type_message,maxLength:1e3,className:"flex-1 min-w-0 bg-transparent border-none outline-none py-2 text-[1.5rem] md:text-[1.35rem] lg:text-[1.1rem] font-medium text-white/70 placeholder:text_gray_70 pr-10"}),e.length>800&&(0,r.jsxs)("span",{className:"absolute right-2 text-[10px] font-bold text-emerald-500/60 pointer-events-none",children:[e.length,"/1000"]})]}),(0,r.jsx)("button",{disabled:!e.trim(),onClick:l,className:`p-4 md:p-2 rounded-full transition-all active:scale-90 cursor-pointer ${e.trim()?"bg-emerald-600 text-white shadow-lg hover:bg-emerald-500":"bg-white/20 text_gray_70"}`,children:(0,r.jsx)(eA.A,{className:"w-6 h-6 md:w-4 md:h-4"})})]})})}function eI({previewImage:e,onClose:t}){return e?(0,r.jsxs)("div",{className:"fixed inset-0 z-[100] flex items-center justify-center p-4 bg-black/80 backdrop-blur-sm animate-in fade-in duration-300",onClick:t,children:[(0,r.jsx)("button",{onClick:e=>{e.stopPropagation(),t()},className:"absolute top-4 right-4 p-2.5 rounded-full bg-white/10 text-white hover:bg-white/20 transition-all z-50 cursor-pointer",children:(0,r.jsx)(p.A,{className:"w-6 h-6"})}),(0,r.jsx)("div",{className:"relative w-full max-w-4xl h-full max-h-[90dvh] flex items-center justify-center animate-in zoom-in-95 duration-300",onClick:e=>e.stopPropagation(),children:(0,r.jsx)(b.A,{width:800,height:600,src:e,alt:"Preview",className:"max-w-full max-h-full object-contain rounded-lg shadow-2xl"})})]}):null}var eE=a(41585),e_=a(51914);function eP({show:e,selectedMedia:t,isUploading:a,fileInputRef:s,onClose:i,onRemoveMedia:l,onSendMultipleMedia:n}){let o=(0,c.n)(e=>e.language),d=x.P[o];if(!e)return null;let h=t.some(e=>/\.(tiff?)$/i.test(e.file.name));return(0,r.jsx)("div",{className:"fixed inset-0 z-[100] flex items-center justify-center p-4 bg-black/30 backdrop-blur-sm animate-in fade-in duration-300",children:(0,r.jsxs)("div",{className:"relative w-full max-w-2xl bg_secondary border border-white/10 squircle overflow-hidden shadow-2xl animate-in zoom-in-95 duration-300",children:[(0,r.jsxs)("div",{className:"p-6 border-b border-white/5 flex items-center justify-between",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h2",{className:"text-2xl md:text-lg font-bold uppercase text-white",children:d.chat.send_media}),(0,r.jsx)("p",{className:"text-lg md:text-sm text_gray_70 font-medium mt-1",children:d.chat.review_selection})]}),(0,r.jsx)("button",{onClick:i,className:"p-2.5 rounded-full bg-white/5 text_gray_70 hover:bg-white/10 hover:text-white transition-all cursor-pointer",children:(0,r.jsx)(p.A,{className:"w-5 h-5"})})]}),(0,r.jsxs)("div",{className:"p-6 max-h-[60vh] overflow-y-auto custom-scrollbar-visible",children:[h&&(0,r.jsxs)("div",{className:"mb-4 p-3.5 rounded-2xl bg-amber-500/15 border border-amber-500/40 flex items-center gap-3 text-amber-300 text-sm md:text-xs font-semibold",children:[(0,r.jsx)(eE.A,{className:"w-5 h-5 text-amber-400 shrink-0"}),(0,r.jsx)("span",{children:"TIFF image format (.tiff / .tif) is not accepted. Please remove TIFF files to send your media."})]}),(0,r.jsxs)("div",{className:"grid grid-cols-2 sm:grid-cols-3 gap-4",children:[t.map((e,t)=>{let a=/\.(tiff?)$/i.test(e.file.name);return(0,r.jsxs)("div",{className:`group relative aspect-square rounded-2xl overflow-hidden border transition-all ${a?"border-amber-500/80 bg-amber-950/20":"border-white/5 bg-white/[0.02]"}`,children:[a&&(0,r.jsxs)("div",{className:"absolute inset-0 bg-black/75 backdrop-blur-[2px] flex flex-col items-center justify-center p-3 text-center z-10 pointer-events-none",children:[(0,r.jsx)(eE.A,{className:"w-8 h-8 text-amber-400 mb-1"}),(0,r.jsx)("span",{className:"text-xs font-bold text-amber-200 uppercase",children:"TIFF Not Allowed"}),(0,r.jsx)("span",{className:"text-[10px] text-amber-300/80 font-medium mt-0.5 truncate max-w-full px-1",children:e.file.name})]}),"IMAGE"===e.type?(0,r.jsx)(b.A,{src:e.preview,alt:"preview",fill:!0,className:"object-cover transition-transform group-hover:scale-105"}):(0,r.jsxs)("div",{className:"w-full h-full flex flex-col items-center justify-center p-4",children:[(0,r.jsx)("div",{className:"w-12 h-12 rounded-xl bg-white/5 flex items-center justify-center mb-2",children:(0,r.jsx)(H.A,{className:"w-6 h-6 text_gray_70"})}),(0,r.jsx)("p",{className:"text-sm md:text-xs font-bold text-center truncate w-full px-2 opacity-50 text-white",children:e.file.name})]}),(0,r.jsx)("button",{onClick:()=>l(t),className:"absolute top-2 right-2 p-1.5 rounded-full bg-black/70 text-white z-20 transition-all hover:bg-red-500 shadow-lg backdrop-blur-sm cursor-pointer",children:(0,r.jsx)(p.A,{className:"w-3.5 h-3.5"})})]},t)}),(0,r.jsxs)("button",{onClick:()=>s.current?.click(),className:"cursor-pointer aspect-square rounded-2xl border-2 border-dashed border-white/10 hover:border-emerald-500/50 hover:bg-emerald-500/5 transition-all flex flex-col items-center justify-center gap-2 group",children:[(0,r.jsx)("div",{className:"w-10 h-10 rounded-full bg-white/5 flex items-center justify-center group-hover:scale-110 transition-transform",children:(0,r.jsx)(e_.A,{className:"w-5 h-5 text_gray_70 group-hover:text-emerald-400"})}),(0,r.jsx)("span",{className:"text-xl md:text-sm font-bold  text_gray_70 group-hover:text-emerald-400",children:d.productDetails.add_more})]})]})]}),(0,r.jsxs)("div",{className:"p-4 bg-white/[0.02] border-t border-white/5 flex items-center justify-end gap-3",children:[(0,r.jsx)("button",{onClick:i,className:"cursor-pointer px-6 py-3.5 rounded-xl font-semibold text-xl md:text-sm text_gray_70 hover:text-white transition-all",children:d.basket.cancel}),(0,r.jsx)("button",{onClick:n,disabled:a||h,className:`flex items-center gap-2 px-8 h-[52px] rounded-xl font-bold text-xl md:text-sm transition-all shadow-lg ${h||a?"bg-emerald-600/40 text-white/50 cursor-not-allowed shadow-none":"bg-emerald-600 hover:bg-emerald-500 text-white cursor-pointer shadow-emerald-900/20"}`,children:a?(0,r.jsxs)("span",{className:"contents",children:[(0,r.jsx)("div",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-white"}),(0,r.jsx)("span",{children:d.productDetails.uploading})]}):(0,r.jsxs)("span",{className:"contents",children:[(0,r.jsx)(eA.A,{className:"w-4 h-4"}),(0,r.jsxs)("span",{children:[d.chat.send," ",t.length," ",t.length>1?d.chat.items:d.chat.item]})]})})]})]})})}var eD=a(45601),eG=a(18333);let eB=(0,M.default)(()=>Promise.all([a.e(9066),a.e(8444)]).then(a.t.bind(a,28444,23)),{loadableGenerated:{webpack:()=>[28444]},ssr:!1});function eT({isDrawer:e=!1}={}){let{openAuthModal:t}=(0,eD.w)(),{rooms:a,messages:k,selectedRoomId:j,fetchRooms:N,fetchMessages:S,sendMessage:A,setSelectedRoomId:C,initializeConnection:I,disconnect:E,startChat:_,joinRoom:D,isLoading:G,isLoadingOlderMessages:B,hasOlderMessages:T,autoTranslate:F,setAutoTranslate:M}=(0,o.L)(),O=(0,d.useGlobalStore)(e=>e[d.X.CurrentUser]),$=(0,d.useGlobalStore)(e=>e.token),V=(0,d.useGlobalStore)(e=>e.isHydrated),{language:L}=(0,c.n)(),U=x.P[L];!function(e,t){let a=(0,c.n)(e=>e.language),r=(0,o.L)(e=>e.autoTranslate),s=(0,o.L)(e=>e.selectedRoomId),i=ee(e=>e.reset),{translateMessage:l}=ey(),d=(0,o.L)(e=>e.hydrateAutoTranslate),h=(0,n.useRef)(new Set),m=(0,n.useRef)(0);(0,n.useEffect)(()=>{d()},[d]);let u=(0,n.useCallback)(()=>{h.current.clear(),m.current=0,i()},[i]);(0,n.useEffect)(()=>{u()},[s,a,u]),(0,n.useEffect)(()=>{r||u()},[r,u]);let p=(0,n.useCallback)(async(e,t)=>
2{if(!await ew(e.Text,t)){if(await l(e,!1)){m.current=0;return}m.current+=1,3===m.current&&P.oR.error(x.P[a].chat.translation_failed)}},[a,l]);(0,n.useEffect)(()=>{if(!r||m.current>=3)return;let s=ex[a]??a,i=ee.getState().entries;e.forEach(e=>{if(t&&e.SenderId===t||!eg(e)||h.current.has(e.Id))return;let a=i[e.Id];ea(a)||et(a)||(h.current.add(e.Id),p(e,s))})},[e,r,a,t,p])}(k,O?.Id);let X=(0,s.a)(),H=(0,w.rd)(),K=(0,y.useSearchParams)(),[Z,W]=(0,n.useState)(""),[J,Q]=(0,n.useState)(""),[Y,er]=(0,n.useState)(!1),[es,ei]=(0,n.useState)(!1),[el,en]=(0,n.useState)(0),[eo,ed]=(0,n.useState)(!0),[ec,eh]=(0,n.useState)(!1),[em,eu]=(0,n.useState)(!0),[ep,ef]=(0,n.useState)({}),[eb,ev]=(0,n.useState)(!1),[ek]=(0,n.useState)(null),[ej,eN]=(0,n.useState)(null),[eA,eE]=(0,n.useState)(!1),[,e_]=(0,n.useState)(null),[eF,eR]=(0,n.useState)([]),[eM,eO]=(0,n.useState)(!1),[e$,eV]=(0,n.useState)(null),[ez,eL]=(0,n.useState)([]),eU=(0,n.useRef)(null),eq=(0,n.useRef)(!1),eX=(0,n.useRef)(null),eH=(0,n.useRef)(null),eK=(0,n.useRef)(null),eZ=(0,n.useCallback)((e="smooth")=>{eU.current&&("auto"===e?eU.current.scrollTop=eU.current.scrollHeight:eU.current.scrollTo({top:eU.current.scrollHeight,behavior:e}))},[]);(0,n.useEffect)(()=>{if(k.length>0&&!B){let e=k[k.length-1],t=eX.current!==e.Id;eq.current?t&&(eU.current&&eU.current.scrollHeight-eU.current.scrollTop-eU.current.clientHeight<250||e.SenderId===O?.Id)&&eZ("smooth"):(eZ("auto"),requestAnimationFrame(()=>eZ("auto")),setTimeout(()=>eZ("auto"),100),setTimeout(()=>eZ("auto"),300),eq.current=!0),eX.current=e.Id}},[k,B,eZ,O?.Id]),(0,n.useEffect)(()=>{ez.length>0&&eZ("smooth")},[ez.length,eZ]),(0,n.useEffect)(()=>{if(!V)return;if(!$||!O||O.IsGuest){e?l.c.getState().closeDrawer():t(),eu(!1);return}N(0).then(async e=>{en(e.length),e.length<20&&ed(!1);try{await I($)}catch(e){console.error("Failed to initialize chat connection:",e)}let t=l.c.getState(),a=t.targetStoreId?.toString()||K.get("id"),r=t.targetRoomId?.toString()||K.get("roomId");try{if(a){let e=await _(a);e&&(C(e),D(e))}else r?C(parseInt(r)):C(null)}catch(e){console.error("Failed to select initial chat room:",e)}}).catch(e=>{console.error("Failed to initialize chat:",e)}).finally(()=>{eu(!1)});let r=setInterval(()=>{N(0,Math.max(a.length,20),J)},1e4);return()=>{e||(E(),o.L.getState().cleanupEmptyRooms()),clearInterval(r)}},[$,V,J]),(0,n.useEffect)(()=>{if(!V||!$)return;let e=setTimeout(()=>{N(0,20,J).then(e=>{en(e.length),ed(e.length>=20)})},500);return()=>clearTimeout(e)},[J,N,$,V]);let eW=(0,n.useCallback)(()=>{!ec&&eo&&(eh(!0),N(el,20,J).then(e=>{en(t=>t+e.length),e.length<20&&ed(!1),eh(!1)}))},[ec,eo,el,N,J]),eJ=(0,n.useCallback)(e=>{!ec&&(eK.current&&eK.current.disconnect(),eK.current=new IntersectionObserver(e=>{e[0].isIntersecting&&eo&&eW()}),e&&eK.current.observe(e))},[ec,eo,eW]);(0,n.useEffect)(()=>{j&&(eq.current=!1,eX.current=null,S(j))},[j,S]);let eQ=(0,l.c)(e=>e.targetStoreId),eY=(0,l.c)(e=>e.targetRoomId);(0,n.useEffect)(()=>{e&&(eQ?(eq.current=!1,_(eQ.toString()).then(e=>{e&&(C(e),D(e))})):eY&&(eq.current=!1,C(eY),D(eY)))},[e,eQ,eY,_,C,D]),(0,n.useEffect)(()=>{if(!j)return;let e=a.find(e=>e.Id===j),t=e?.StoreUid||e?.StoreId?.toString();t?(0,eG.t)(t,!1).then(e=>{e?.Type==="store"&&e_(e.Data)}):e_(null)},[j,a]);let e0=(0,n.useCallback)(()=>{let e=eU.current;if(e&&(er(e.scrollHeight-(e.scrollTop+e.clientHeight)>150),0===e.scrollTop&&T&&!B&&k.length>0&&j)){let t=e.scrollHeight;S(j,k[0].Id).then(()=>{setTimeout(()=>{if(eU.current){let e=eU.current.scrollHeight;eU.current.scrollTop=e-t}},0)})}},[S,T,B,k,j]);if(em)return(0,r.jsxs)("div",{className:"flex flex-col items-center justify-center h-[calc(100dvh-20px)] bg_secondary space-y-4 animate-in fade-in duration-500",children:[(0,r.jsx)("div",{className:"w-12 h-12 rounded-full border-t-2 border-emerald-500 animate-spin"}),(0,r.jsx)("p",{className:"text-emerald-500/60 font-bold text-xl md:text-sm",children:U.chat.loading_chat})]});let e1=a.find(e=>e.Id===j),e2=(e,t)=>{e.length>0&&(eR(a=>[...a,...e.map(e=>({file:e,preview:URL.createObjectURL(e),type:t??(e.type&&e.type.startsWith("image/")||/\.(jpe?g|png|gif|webp|svg|bmp|tiff?|heic|heif|avif)$/i.test(e.name)?"IMAGE":"FILE")}))]),eO(!0))},e3=async()=>
2{if(0!==eF.length&&j){ei(!0),eO(!1);try{await z({selectedMedia:eF,selectedRoomId:j,currentUserId:O?.Id,onPendingUploadsCreated:e=>{eL(t=>[...t,...e]),setTimeout(()=>eZ(),100)},onImageCached:(e,t)=>{ef(a=>({...a,[e]:t}))},onItemSettled:e=>{eL(t=>t.filter(t=>t.id!==e))},onMessageSent:()=>eZ()}),eR([]),eZ()}catch(e){console.error("File upload error:",e)}finally{ei(!1),eH.current&&(eH.current.value="")}}},e4=async(e,t)=>{try{let a=(0,f.X)(e,"lg");if(!a)return;let r=await fetch(a),s=await r.blob(),i=window.URL.createObjectURL(s),l=document.createElement("a");l.href=i,l.download=t,document.body.appendChild(l),l.click(),document.body.removeChild(l),window.URL.revokeObjectURL(i)}catch(e){console.error("Failed to download file:",e)}};return O?(0,r.jsxs)("div",{className:`flex ${e?"h-full":"h-[calc(100dvh-80px)] lg:h-[calc(100dvh-20px)]"} overflow-hidden`,children:[(0,r.jsxs)("div",{className:"flex-1 flex glass_card_black overflow-hidden relative",children:[(0,r.jsx)(q,{rooms:a,selectedRoomId:j,searchQuery:J,isLoadingMoreRooms:ec,isDrawer:e,onSearchChange:Q,onSelectRoom:e=>{C(e),D(e)},lastRoomRef:eJ}),(0,r.jsx)("div",{className:`flex-1 flex flex-col min-w-0 ${X&&!j?"hidden":"flex"}`,children:j?(0,r.jsxs)("div",{className:"contents",children:[(0,r.jsxs)("div",{className:"p-4 border-b border-white/5 bg_secondary flex items-center justify-between",children:[(0,r.jsxs)("div",{className:"flex items-center gap-4 min-w-0 transition-all cursor-pointer p-1",children:[X&&(0,r.jsx)("button",{onClick:e=>{e.stopPropagation(),C(null)},className:"p-2 -ml-2 rounded-full hover:bg-white/10 active:bg-white/10 text-white cursor-pointer",children:(0,r.jsx)(m.A,{className:"w-6 h-6"})}),X&&e1?.StoreAvatar&&(0,r.jsx)("div",{className:"relative w-14 h-14 rounded-full overflow-hidden border border-white/10 bg_secondary shrink-0",children:(0,r.jsx)(b.A,{src:(0,f.X)(e1.StoreAvatar,"sm")||"/default-store.png",alt:e1.StoreName||"Store",fill:!0,className:"object-cover"})}),(0,r.jsx)("div",{className:"min-w-0",children:(0,r.jsx)("h2",{className:"font-semibold text-[20px] md:text-lg lg:text-base truncate font-bricolage",children:e1?.StoreName})})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 mr-2",children:[(0,r.jsx)(u.A,{size:18}),(0,r.jsx)("p",{className:"text-white/50",children:U.chat.auto_translate}),(0,r.jsx)(g.d,{checked:F,onCheckedChange:M})]}),e&&(0,r.jsx)(i.cp,{asChild:!0,children:(0,r.jsx)("button",{className:"p-2 -mr-2 rounded-full text-white/60 hover:text-white hover:bg-white/10 active:bg-white/10 cursor-pointer transition-all shrink-0",children:(0,r.jsx)(p.A,{size:20})})})]})]}),(0,r.jsx)(eS,{messages:k,selectedRoomId:j,selectedRoom:e1,currentUser:O,isLoading:G,isLoadingOlderMessages:B,pendingUploads:ez,localImageCache:ep,scrollRef:eU,showScrollBtn:Y,onScroll:e0,onScrollToBottom:eZ,onOpenBespokeDetails:(e,t)=>{eN({id:e,senderId:t}),eE(!0)},onPreviewImage:eV,onDownloadFile:e4}),(0,r.jsx)(eC,{inputText:Z,isUploading:es,fileInputRef:eH,onInputChange:W,onSendMessage:()=>{Z.trim()&&j&&(A(j,Z),W(""),setTimeout(()=>eZ(),50))},onFileUpload:(e,t)=>{let a=e.target.files;a&&0!==a.length&&(e2(Array.from(a),t),e.target&&(e.target.value=""))},onPaste:e=>{let t=function(e){let t=e.clipboardData.items,a=[];for(let e=0;e<t.length;e++)if("file"===t[e].kind){let r=t[e].getAsFile();r&&a.push(r)}return a}(e);t.length>0&&e2(t)}})]}):(0,r.jsxs)("div",{className:"flex-1 flex flex-col min-w-0",children:[e&&j&&(0,r.jsx)("div",{className:"p-4 border-b border-white/5 bg_secondary flex justify-end",children:(0,r.jsx)(i.cp,{asChild:!0,children:(0,r.jsx)("button",{className:"p-2 -mr-2 rounded-full text-white/60 hover:text-white hover:bg-white/10 active:bg-white/10 cursor-pointer transition-all",children:(0,r.jsx)(p.A,{size:20})})})}),(0,r.jsxs)("div",{className:"flex-1 flex flex-col items-center justify-center p-6 text-center border-none",children:[(0,r.jsx)("div",{className:"w-48 h-48",children:(0,r.jsx)(eB,{animationData:h,loop:!0})}),(0,r.jsx)("h2",{className:"text-2xl font-bold mb-2 text-white",children:U.chat.select_conversation}),(0,r.jsx)("p",{className:"text_gray_70 text-xl md:text-base font-medium max-w-xs",children:U.chat.pick_store})]})]})})]}),e1&&(0,r.jsx)(v.l,{isOpen:eb,onOpenChange:ev,store:{Id:e1.StoreId,Name:e1.StoreName,Avatar:e1.StoreAvatar,BespokeOrderTemplate:ek,CanAcceptBespokeOrder:e1.CanAcceptBespokeOrder},t:U,onOpenLogin:()=>H.push("/"),onSuccess:e=>{j&&(A(j,"Bespoke Order Request",e),setTimeout(()=>eZ(),100))},onOpenChat:()=>{e1?.StoreId&&l.c.getState().openDrawer({storeId:e1.StoreId})}}),ej&&(0,r.jsx)(R,{isOpen:eA,onOpenChange:eE,orderId:ej.id,senderId:ej.senderId,userId:O?.Id}),(0,r.jsx)(eP,{show:eM,selectedMedia:eF,isUploading:es,fileInputRef:eH,onClose:()=>
2{eF.forEach(e=>URL.revokeObjectURL(e.preview)),eR([]),eO(!1)},onRemoveMedia:e=>{eR(t=>{let a,r=(a=[...t],URL.revokeObjectURL(a[e].preview),a.splice(e,1),a);return 0===r.length&&eO(!1),r})},onSendMultipleMedia:e3}),(0,r.jsx)(eI,{previewImage:e$,onClose:()=>eV(null)})]}):(0,r.jsxs)("div",{className:"flex flex-col items-center justify-center h-[calc(100dvh-20px)] text-white p-6 text-center gap-4",children:[(0,r.jsx)("p",{className:"text-lg text-white/80 font-medium",children:"Please sign in to access chat"}),(0,r.jsx)("button",{onClick:()=>t(),className:"px-6 py-2.5 bg-gradient-to-r from-pink-500 to-violet-600 text-white rounded-full font-medium shadow-lg hover:opacity-90 transition-all cursor-pointer",children:"Sign In"})]})}function eF({children:e}){let{isOpen:t,closeDrawer:a}=(0,l.c)(),n=(0,s.a)();return(0,r.jsxs)(i._s,{direction:"left",open:t,onOpenChange:e=>{e||a()},children:[e,(0,r.jsx)(i.zj,{className:`h-[97%] lg:!h-[97%] mr-auto overflow-hidden shadow-2xl lg:m-4 m-0 border-none bg-transparent max-[800px]:!w-full max-[800px]:!max-w-full min-[800px]:max-[1000px]:!w-[580px] min-[800px]:max-[1000px]:!max-w-[580px] ${n&&"w-full"}`,style:{width:"min(1100px, 46vw)",maxWidth:"min(1100px, 46vw)"},children:(0,r.jsx)("div",{className:"h-full flex flex-col z-0 overflow-hidden rounded-none lg:rounded-[26px] relative glass_card_black",children:(0,r.jsx)("div",{className:"flex-1 overflow-hidden relative",children:(0,r.jsx)(eT,{isDrawer:!0})})})})]})}},62489:(e,t,a)=>{a.d(t,{AM:()=>l,Wv:()=>n,dT:()=>d,hl:()=>o});var r=a(95155);a(12115);var s=a(62183),i=a(91337);function l({...e}){return(0,r.jsx)(s.bL,{"data-slot":"popover",...e})}function n({...e}){return(0,r.jsx)(s.l9,{"data-slot":"popover-trigger",...e})}function o({className:e,align:t="center",sideOffset:a=4,...l}){return(0,r.jsx)(s.ZL,{children:(0,r.jsx)(s.UC,{"data-slot":"popover-content",align:t,sideOffset:a,className:(0,i.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),...l})})}function d({...e}){return(0,r.jsx)(s.Mz,{"data-slot":"popover-anchor",...e})}},64326:(e,t,a)=>{a.d(t,{_:()=>s,r:()=>i});var r=a(17050);async function s({addToBasket:e,orderId:t,storeId:a,userId:i}){return await e({UserId:i,ItemId:t,ItemVariantId:0,StoreId:a,Quantity:1,OrderTypeId:r.qc.GiftMarket,MaterialTypeId:r.vF.BespokeOrder})}function i(e,t){return!!e&&!!t&&e.some(e=>(e.MaterialTypeId===r.vF.BespokeOrder||e.Material?.TypeId===r.vF.BespokeOrder)&&(e.ItemId===t||e.Material?.Id===t))}},85702:(e,t,a)=>{a.d(t,{O:()=>l});let r="https://api.sugary.ae".replace(/\/+$/,"");class s extends Error{constructor(e,t){super(e),this.name="ApiError",this.status=t}}async function i(e,t){let a=e.startsWith("/")?`${r}${e}`:`${r}/${e}`,i=await fetch(a,{...t,headers:{"Content-Type":"application/json",...t.headers}});if(!i.ok)throw new s(`[${t.method}] ${e} → ${i.status}`,i.status);return i}let l={get:function(e,t={}){let a={method:"GET"};return t.cache&&(a.cache=t.cache),void 0!==t.revalidate&&(a.next={revalidate:t.revalidate}),i(e,a)},post:function(e,t,a={}){let r={method:"POST",body:void 0!==t?JSON.stringify(t):void 0};return a.cache&&(r.cache=a.cache),void 0!==a.revalidate&&(r.next={revalidate:a.revalidate}),i(e,r)}}},89385:(e,t,a)=>{a.d(t,{Q:()=>r});let r=[{code:"en",name:"English",label:"English (US)",countryCode:"us"},{code:"ar",name:"Arabic",label:"العَرَبِيَّة (Arabic)",countryCode:"ae"},{code:"ur",name:"Urdu",label:"اردو (Urdu)",countryCode:"pk"},{code:"hi",name:"Hindi",label:"हिन्दी (Hindi)",countryCode:"in"},{code:"zh",name:"Chinese",label:"中文 (Chinese)",countryCode:"cn"},{code:"fr",name:"French",label:"Fran\xe7ais (French)",countryCode:"fr"},{code:"es",name:"Spanish",label:"Espa\xf1ol (Spanish)",countryCode:"es"},{code:"de",name:"German",label:"Deutsch (German)",countryCode:"de"},{code:"pt",name:"Portuguese",label:"Portugu\xeas (Portuguese)",countryCode:"pt"},{code:"ru",name:"Russian",label:"Русский (Russian)",countryCode:"ru"},{code:"tr",name:"Turkish",label:"T\xfcrk\xe7e (Turkish)",countryCode:"tr"},{code:"id",name:"Indonesian",label:"Bahasa Indonesia (Indonesian)",countryCode:"id"},{code:"tl",name:"Filipino",label:"Filipino",countryCode:"ph"},{code:"ja",name:"Japanese",label:"日本語 (Japanese)",countryCode:"jp"},{code:"ko",name:"Korean",label:"한국어 (Korean)",countryCode:"kr"},{code:"it",name:"Italian",label:"Italiano (Italian)",countryCode:"it"},{code:"nl",name:"Dutch",label:"Nederlands (Dutch)",countryCode:"nl"},{code:"pl",name:"Polish",label:"Polski (Polish)",countryCode:"pl"},{code:"th",name:"Thai",label:"ไทย (Thai)",countryCode:"th"},{code:"vi",name:"Vietnamese",label:"Tiếng Việt (Vietnamese)",countryCode:"vn"},{code:"bn",name:"Bengali",label:"বাংলা (Bengali)",countryCode:"bd"},{code:"ms",name:"Malay",label:"Bahasa Melayu (Malay)",countryCode:"my"}]},90466:(e,t,a)=>{a.d(t,{d:()=>n});var r=a(95155),s=a(12115),i=a(23638),l=a(91337);let n=s.forwardRef(({className:e,...t},a)=>(0,r.jsx)(i.bL,{"data-slot":"switch",className:(0,l.cn)("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-6 w-11 shrink-0 items-center rounded-full border-2 border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,ref:
2a,children:(0,r.jsx)(i.zi,{"data-slot":"switch-thumb",className:(0,l.cn)("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-5 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));n.displayName=i.bL.displayName}}]);

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.