PageSourceSearch

https://localpass.ca/_next/static/chunks/01ptr3ng~30jn.js

js localpass.ca collected 2026-10-02 00:45:35 UTC 46,264 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,79334,e=>{"use strict";let t=(0,e.i(75254).default)("newspaper",[["path",{d:"M15 18h-5",key:"95g1m2"}],["path",{d:"M18 14h-8",key:"sponae"}],["path",{d:"M4 22h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16a2 2 0 0 1-4 0v-9a2 2 0 0 1 2-2h2",key:"39pd36"}],["rect",{width:"8",height:"4",x:"10",y:"6",rx:"1",key:"aywv1n"}]]);e.s(["Newspaper",0,t],79334)},92270,e=>{"use strict";let t=(0,e.i(75254).default)("log-out",[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]]);e.s(["LogOut",0,t],92270)},10980,e=>{"use strict";let t=(0,e.i(75254).default)("book-open",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);e.s(["BookOpen",0,t],10980)},40160,e=>{"use strict";let t=(0,e.i(75254).default)("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]);e.s(["Download",0,t],40160)},31091,60289,2157,e=>{"use strict";var t=e.i(75254);let s=(0,t.default)("megaphone",[["path",{d:"M11 6a13 13 0 0 0 8.4-2.8A1 1 0 0 1 21 4v12a1 1 0 0 1-1.6.8A13 13 0 0 0 11 14H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2z",key:"q8bfy3"}],["path",{d:"M6 14a12 12 0 0 0 2.4 7.2 2 2 0 0 0 3.2-2.4A8 8 0 0 1 10 14",key:"1853fq"}],["path",{d:"M8 6v8",key:"15ugcq"}]]);e.s(["Megaphone",0,s],31091);let a=(0,t.default)("layout-dashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);e.s(["LayoutDashboard",0,a],60289);let r=(0,t.default)("life-buoy",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.93 4.93 4.24 4.24",key:"1ymg45"}],["path",{d:"m14.83 9.17 4.24-4.24",key:"1cb5xl"}],["path",{d:"m14.83 14.83 4.24 4.24",key:"q42g0n"}],["path",{d:"m9.17 14.83-4.24 4.24",key:"bqpfvv"}],["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}]]);e.s(["LifeBuoy",0,r],2157)},52571,e=>{"use strict";let t=(0,e.i(75254).default)("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);e.s(["Info",0,t],52571)},65396,e=>{"use strict";e.s(["LANDING_CLUSTER",0,[{path:"/platform/business/restaurants",name:"Restaurants & cafes"},{path:"/platform/business/grocers",name:"Grocers & food shops"},{path:"/platform/business/bakeries",name:"Bakeries"},{path:"/platform/business/butchers",name:"Butchers & delis"},{path:"/platform/business/farms",name:"Farms & producers"},{path:"/platform/business/catering",name:"Catering"}]])},97070,e=>{"use strict";var t=e.i(38579);e.s(["signOut",()=>t.D])},13293,e=>{"use strict";var t=e.i(43476),s=e.i(71645),a=e.i(18566),r=e.i(46897),l=e.i(63059),i=e.i(50965),n=e.i(31674),o=e.i(70756),c=e.i(37727),d=e.i(92161),x=e.i(64659),m=e.i(84614),h=e.i(92270),u=e.i(39616),p=e.i(50627),g=e.i(1928),f=e.i(27612),b=e.i(7233),y=e.i(99023),j=e.i(51975),N=e.i(63209),v=e.i(72520),k=e.i(23945),w=e.i(10980),C=e.i(30699),A=e.i(40160),z=e.i(5125),S=e.i(31091),$=e.i(60289),M=e.i(2157),E=e.i(52571),D=e.i(79334),F=e.i(63488),_=e.i(33998),B=e.i(65396),L=e.i(29043),O=e.i(44313);e.i(36180);var T=e.i(91696),P=e.i(63802);e.i(51718);var I=e.i(57366),R=e.i(57555),q=e.i(97070),G=e.i(22016),V=e.i(75144),U=e.i(29569),Y=e.i(95068),H=e.i(43531),W=e.i(32996),X=e.i(91710);function K(){var e;let{cart:a,eligiblePromo:r,setEligiblePromo:l,applyPromoReward:i}=(0,V.useCart)(),[n,o]=(0,s.useState)(null),[c,d]=(0,s.useState)(null),[x,m]=(0,s.useState)(!1),h=a?.vendor?.id?.id,u=r&&h?(0,X.resolvePromoRule)(r.id,r):null;if((0,s.useEffect)(()=>{if(o(null),d(null),!u||!h)return;let e=!1,t=!!a?.isMarketplace;return(async()=>{let s=u.getItems.filter(e=>"product"===e.type).map(e=>({id:e.id,name:e.name,price:e.price??0,image:e.img})),a=u.getItems.filter(e=>"category"===e.type),r=[];for(let e of a)try{let s=(0,T.doc)(O.db,"vendors",h,t?"product_categories":"menu_categories",e.id);(await (0,P.getDocs)((0,P.query)((0,W.collection)(O.db,"vendors",h,"products"),(0,P.where)(t?"categoryRef":"menuCategory","==",s),(0,P.where)("status","==","Published")))).forEac
1h(e=>{let t=e.data();r.push({id:e.id,name:t.name||"Item",price:t.price?.regular??0,image:t.media?.main||void 0})})}catch(e){console.error("[PromoModal] category lookup:",e)}if(e)return;let l=[...s,...r].filter((e,t,s)=>s.findIndex(t=>t.id===e.id)===t);o(l),1===l.length&&d(l[0].id)})(),()=>{e=!0}},[r?.id,h]),!r||!a||!u)return null;let p=a.productsInCart?.some(e=>!0===e.isPromo),{discountType:g,discountValue:f,minimumRequirement:b}=u,y="";y=b?.type==="quantity"?`You are buying ${b.value} or more items, `:b?.type==="purchase"?`Your order is over $${b.value.toFixed(2)}, `:"Congrats! We've got a special deal for you, ";let N=e=>"amount"===g&&f>0?Math.max(0,e-f):"percentage"===g&&f>0?Math.max(0,e-e*f):0,v=n?.find(e=>e.id===c)??null,k=async()=>{if(v&&h){m(!0);try{let e=N(v.price),t={id:v.id,name:v.name,price:v.price,discount:Number(e.toFixed(2)),image:v.image||"",prepTime:0,menuCategory:null},s=await (0,P.getDoc)((0,T.doc)(O.db,"vendors",h,"products",v.id));if(s.exists()){let e=s.data();t={...t,name:e.name||v.name,price:e.price?.regular??v.price,image:e.media?.main||"",prepTime:e.prepTime||0,menuCategory:e.menuCategory||null}}await i(t)}catch(e){console.error("[PromoModal] claim failed:",e)}finally{m(!1)}}},w=(n?.length??0)>1;return(0,t.jsxs)("div",{className:"fixed inset-0 z-[70] flex items-center justify-center p-4 sm:p-0",children:[(0,t.jsx)("div",{className:"absolute inset-0 bg-[#1D2429]/40 backdrop-blur-[2px] transition-opacity animate-in fade-in duration-200",onClick:()=>l(null)}),(0,t.jsx)("div",{className:"bg-white w-full sm:w-[40vw] max-w-md rounded-2xl shadow-[0_-3px_5px_rgba(29,36,41,0.23)] z-10 relative overflow-hidden animate-in slide-in-from-bottom-4 sm:slide-in-from-bottom-8 duration-300",children:p?(0,t.jsxs)("div",{className:"p-8 flex flex-col items-center justify-center text-center min-h-[300px]",children:[(0,t.jsx)("h3",{className:"text-2xl font-bold text-gray-900 mb-8 leading-tight",children:"You have already added promotional item!"}),(0,t.jsx)("button",{onClick:()=>l(null),className:"w-1/2 py-3.5 text-red-500 font-medium text-lg hover:bg-red-50 rounded-full transition-colors",children:"Sounds Great!"})]}):null===n?(0,t.jsx)("div",{className:"p-8 flex flex-col items-center justify-center text-center min-h-[300px]",children:(0,t.jsx)("p",{className:"text-gray-500",children:"Loading your reward…"})}):0===n.length?(0,t.jsxs)("div",{className:"p-8 flex flex-col items-center justify-center text-center min-h-[300px]",children:[(0,t.jsx)("h3",{className:"text-xl font-bold text-gray-900 mb-4",children:"No eligible items right now"}),(0,t.jsx)("p",{className:"text-gray-600 mb-8",children:"This promotion has no available items to redeem at the moment."}),(0,t.jsx)("button",{onClick:()=>l(null),className:"w-1/2 py-3.5 text-red-500 font-medium text-lg hover:bg-red-50 rounded-full transition-colors",children:"Close"})]}):(0,t.jsxs)("div",{className:"p-6 sm:p-8 flex flex-col justify-center min-h-[400px]",children:[(0,t.jsx)("h3",{className:"text-2xl font-bold text-gray-900 mb-3",children:"You've qualified for promotion!"}),(0,t.jsxs)("p",{className:"text-gray-600 text-base mb-6",children:[y,!w&&v&&(0,t.jsxs)("span",{className:"font-bold text-[#04A24C]",children:[" ",(e=v.name,"amount"===g&&f>0?`enjoy $${f.toFixed(2)} off the ${e}.`:"percentage"===g&&f>0?`enjoy ${Math.round(100*f)}% off the ${e}.`:`enjoy ${e} free of charge.`)]}),w&&(0,t.jsx)("span",{className:"font-bold text-[#04A24C]",children:" pick an item below to redeem it."})]}),w?(0,t.jsx)("div",{className:"flex flex-col gap-2 mb-6 max-h-[280px] overflow-y-auto pr-1",children:n.map(e=>{let s=e.id===c,a=N(e.price);return(0,t.jsxs)("button",{onClick:()=>d(e.id),className:`flex items-center justify-between gap-3 rounded-xl p-3 border text-left transition-colors ${s?"border-[#04A24C] bg-[#04A24C]/10":"border-gray-200 hover:bg-gray-50"}`,children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 min-w-0",children:[e.image&&(0,t.jsx)("img",{src:e.image,alt:"",className:"w-10 h-10 rounded-lg object-cover shrink-0"}),(0,t.jsx)("span",{className:"font-medium text-gray-900 truncate",children:e.name})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:[(0,t.jsxs)("span",{className:"text-sm text-gray-500 line-through",children:["$",e.price.toFixed(2)]}),(0,t.jsx)("span",{className:"text-sm font-bold text-[#04A24C]",children:0===a?"Free":`$${a.toFixed(2)}`}),s&&(0,t.jsx)(H.Check,{size:16,className:"text-[#04A24C]"})]})]},e.id)})}):v?(0,t.jsx)("div",{className:"bg-[#04A24C]/10 rounded-xl p-4 mb-6",children:(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("p",{className:"text-lg font-bold text-gray-900",children:v.name}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsxs)("span",{className:"text-base text-gray-500 line-through",children:["$",v.price.toFixed(2)]}),(0,t.jsxs)("div",{className:"flex items-center gap-1 text-[#04A24C]",children:[(0,t.jsx)(j.Tag,{size:16}),(0,t.jsx)("span",{className:"text-base font-bold",children:0===N(v.price)?"Free":`$${N(v.price).toFixed(2)}`})]})]})]})}):null,(0,t.jsx)("p",{className:"text-gray-600 text-base mb-6",children:"Click below to add the item to your cart."}),(0,t.jsxs)("div",{className:"flex flex-col items-center gap-3 w-full",children:[(0,t.jsx)("button",{onClick:k,disabled:!v||x,className:"w-1/2 min-w-[200px] bg-[#04A24C] hover:bg-[#038A40] disabled:opacity-50 disabled:cursor-not-allowed text-white font-bold text-lg py-3.5 rounded-full transition-colors shadow-sm",children:x?"Adding…":"Add item"}),(0,t.jsx)("button",{onClick:()=>l(null),className:"w-1/2 min-w-[200px] py-3.5 text-red-500 font-medium text-lg hover:bg-red-50 rounded-full transition-colors",children:"No thanks"})]})]})})]})}var J=e.i(38382),Q=e.i(15788);function Z({currentOrderValue:e,minOrderAmount:a=0,freeDelivery:r=0,mysteryBoxEnabled:l=!1,mysteryBoxAmount:n=0,mysteryBoxName:o="Mystery Gift",ownDelivery:d=!1,isMarketplace:x=!1}
1){let[m,h]=(0,s.useState)(0),[u,g]=(0,s.useState)(!1),f=(0,s.useRef)(0),b=!x&&!d&&a>0,y=r>0,j=l&&n>0,N=Math.max(a,y?r:0,j?n:0,.01);(0,s.useEffect)(()=>{let t=Math.min(e/N,1),s=setTimeout(()=>h(t),50);return f.current=e,()=>clearTimeout(s)},[e,N]);let v=e=>e<=0?"$0":e%1==0?`$${e}`:`$${e.toFixed(2)}`,k=[];a>0&&k.push({fraction:Math.min(a/N,1),icon:b?(0,t.jsx)(p.Receipt,{size:16}):(0,t.jsx)(i.ShoppingBag,{size:16}),label:b?"Fee":"Min",reached:e>=a,color:"#388E3C"}),y&&k.push({fraction:Math.min(r/N,1),icon:(0,t.jsx)(Q.Truck,{size:16}),label:"Free",reached:e>=r,color:"#388E3C"}),j&&k.push({fraction:Math.min(n/N,1),icon:(0,t.jsx)(C.Gift,{size:16}),label:"Gift",reached:e>=n,color:"#8E24AA"});let w=k.length>0&&k.every(e=>e.reached);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("button",{onClick:()=>g(!0),className:"w-full text-left bg-white rounded-2xl border border-gray-100 shadow-sm px-4 py-3.5 hover:border-emerald-200 transition-colors",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-3 gap-2",children:[(0,t.jsx)("span",{className:`text-[13px] font-semibold truncate ${w?"text-emerald-700":"text-gray-700"}`,children:(()=>{let t=[];if(a>0&&t.push({label:b?"to avoid small order fee":"to minimum order",threshold:a}),y&&t.push({label:"for free delivery",threshold:r}),j&&t.push({label:`for ${o.toLowerCase()}`,threshold:n}),0===t.length)return"Review your cart";for(let s of(t.sort((e,t)=>e.threshold-t.threshold),t))if(e<s.threshold)return`${v(s.threshold-e)} ${s.label}`;return!b||y||j?"All rewards unlocked! 🎉":"Small order fee waived ✓"})()}),(0,t.jsxs)("div",{className:"flex items-center gap-1.5 shrink-0",children:[(0,t.jsx)("span",{className:"text-[15px] font-black text-gray-900",children:v(e)}),(0,t.jsx)(E.Info,{size:13,className:"text-gray-400"})]})]}),(0,t.jsxs)("div",{className:"relative mt-1",style:{height:"60px"},children:[(0,t.jsx)("div",{className:"absolute left-0 right-0 rounded-full bg-gray-200",style:{to
1p:"13px",height:"10px"},children:(0,t.jsx)("div",{className:"absolute left-0 top-0 h-full rounded-full transition-all duration-500 ease-out",style:{width:`${100*m}%`,backgroundColor:"#388E3C"}})}),k.map((e,s)=>{let a=Math.min(Math.max(100*e.fraction,2),98);return(0,t.jsxs)("div",{className:"absolute flex flex-col items-center",style:{left:`${a}%`,top:0,transform:"translateX(-50%)"},children:[(0,t.jsx)("div",{className:"w-9 h-9 rounded-full flex items-center justify-center border-2 transition-all duration-300",style:{backgroundColor:e.reached?e.color:"white",borderColor:e.reached?e.color:"#d1d5db",color:e.reached?"white":"#9ca3af",boxShadow:e.reached?`0 2px 8px ${e.color}55`:"0 1px 3px rgba(0,0,0,0.08)"},children:e.icon}),(0,t.jsx)("span",{className:"text-[10px] font-bold mt-1 leading-none whitespace-nowrap",style:{color:e.reached?e.color:"#9ca3af"},children:e.label})]},s)})]})]}),u&&(0,t.jsxs)("div",{className:"fixed inset-0 z-[70] flex items-end sm:items-center justify-center p-4",children:[(0,t.jsx)("div",{className:"absolute inset-0 bg-black/40",onClick:()=>g(!1)}),(0,t.jsxs)("div",{className:"relative w-full max-w-sm bg-white rounded-[24px] p-6 shadow-2xl animate-in slide-in-from-bottom-4 duration-200",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-5",children:[(0,t.jsx)("h3",{className:"text-lg font-black text-gray-900",children:"Order Goals"}),(0,t.jsx)("button",{onClick:()=>g(!1),className:"p-1.5 bg-gray-100 rounded-full text-gray-500 hover:bg-gray-200",children:(0,t.jsx)(c.X,{size:16})})]}),(0,t.jsxs)("div",{className:"space-y-4",children:[a>0&&(0,t.jsx)(ee,{icon:b?(0,t.jsx)(p.Receipt,{size:18}):(0,t.jsx)(i.ShoppingBag,{size:18}),color:"#374151",title:b?"Small Order Charge":"Minimum Order",description:b?`Orders below ${v(a)} include a small order fee. Add more items to waive it.`:`A minimum order of ${v(a)} is required to proceed to checkout.`}),y&&(0,t.jsx)(ee,{icon:(0,t.jsx)(Q.Truck,{size:18}),color:"#388E3C",title:"Free Delivery",description:`Reach ${v(r)} to get your order delivered for free!`}),j&&(0,t.jsx)(ee,{icon:(0,t.jsx)(C.Gift,{size:18}),color:"#8E24AA",title:o,description:`Reach ${v(n)} to unlock a special ${o.toLowerCase()} from this vendor!`})]}),(0,t.jsx)("button",{onClick:()=>g(!1),className:"w-full mt-6 py-3 bg-gray-900 text-white font-bold text-sm rounded-[14px] hover:bg-black transition-colors",children:"Got it"})]})]})]})}function ee({icon:e,color:s,title:a,description:r}){return(0,t.jsxs)("div",{className:"flex gap-3",children:[(0,t.jsx)("div",{className:"w-9 h-9 rounded-full flex items-center justify-center shrink-0",style:{backgroundColor:`${s}1A`,color:s},children:e}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-sm font-bold text-gray-900",children:a}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-0.5 leading-relaxed",children:r})]})]})}var et=e.i(75679);function es({label:e,children:a,width:r="w-60",center:l=!1}){let[i,n]=(0,s.useState)(!1),o=(0,s.useRef)(null),c=()=>{o.current&&(clearTimeout(o.current),o.current=null)},d=()=>{c(),n(!1)};return(0,s.useEffect)(()=>c,[]),(0,t.jsxs)("div",{className:"relative",onMouseEnter:()=>{c(),n(!0)},onMouseLeave:()=>{c(),o.current=setTimeout(()=>n(!1),180)},children:[(0,t.jsxs)("button",{type:"button","aria-expanded":i,"aria-haspopup":"menu",onClick:()=>n(e=>!e),onKeyDown:e=>{"Escape"===e.key&&d()},className:"flex items-center gap-1 px-3 py-2 text-sm font-bold text-gray-600 hover:text-[#04A24C] rounded-xl hover:bg-gray-50 transition-colors",children:[e,(0,t.jsx)(x.ChevronDown,{size:14,className:`transition-transform duration-200 ${i?"rotate-180":""}`})]}),(0,t.jsx)("div",{className:`absolute top-full pt-2 z-50 ${l?"left-1/2 -translate-x-1/2":"left-0"} ${i?"":"hidden"}`,onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||d()},children:(0,t.jsx)("div",{className:`bg-white shadow-[0_8px_30px_-4px_rgba(0,0,0,0.12)] rounded-2xl border border-gray-100 p-2 ${r}`,children:a(d)})})]})}function ea(){return(0,t.jsx)("span",{className:"shrink-0 rounded-full bg-gray-100 px-2 py-0.5 text-[10px] font-black uppercase tracking-wide text-gray-500",children:"Coming soon"})}function er({href:e,icon:s,tint:a,title:r,blurb:l,onNavigate:i,comingSoon:n,external:o}){if(n)return(0,t.jsxs)("div",{"aria-disabled":"true",className:"flex items-center gap-3 px-3 py-2.5 text-[13.5px] font-bold text-gray-400 rounded-xl cursor-default select-none",children:[(0,t.jsx)("div",{className:`w-9 h-9 rounded-full ${a} flex items-center justify-center shrink-0`,children:s}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("p",{className:"leading-none flex items-center gap-2",children:[r," ",(0,t.jsx)(ea,{})]}),(0,t.jsx)("p",{className:"text-[11.5px] font-normal text-gray-400 mt-1",children:l})]})]});let c="flex items-center gap-3 px-3 py-2.5 text-[13.5px] font-bold text-gray-700 hover:bg-[#
1E7F5ED] hover:text-[#04A24C] rounded-xl transition-colors",d=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:`w-9 h-9 rounded-full ${a} flex items-center justify-center shrink-0`,children:s}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"leading-none",children:r}),(0,t.jsx)("p",{className:"text-[11.5px] font-normal text-gray-400 mt-1",children:l})]})]});return o?(0,t.jsx)("a",{href:e,target:"_blank",rel:"noopener noreferrer",onClick:i,className:c,children:d}):(0,t.jsx)(G.default,{href:e,onClick:i,className:c,children:d})}function el({href:e,children:s,onNavigate:a}){return(0,t.jsx)(G.default,{href:e,onClick:a,className:"block px-3 py-1.5 text-[13px] font-semibold text-gray-600 hover:bg-[#E7F5ED] hover:text-[#04A24C] rounded-lg transition-colors",children:s})}function ei({title:e,children:s}){return(0,t.jsxs)("section",{"aria-label":e,children:[(0,t.jsx)("p",{className:"px-3 pb-1.5 text-[10.5px] font-black uppercase tracking-[0.14em] text-gray-400",children:e}),(0,t.jsx)("div",{className:"space-y-1",children:s})]})}function en({href:e,icon:s,title:a,onNavigate:r,external:l}){let i="flex items-center gap-3 px-3 py-2.5 rounded-xl text-sm font-semibold text-gray-600 hover:bg-gray-50 hover:text-gray-900 transition-colors";return l?(0,t.jsxs)("a",{href:e,target:"_blank",rel:"noopener noreferrer",onClick:r,className:i,children:[(0,t.jsx)("span",{className:"shrink-0",children:s}),a,(0,t.jsx)(_.ExternalLink,{size:11,className:"text-gray-400"})]}):(0,t.jsxs)(G.default,{href:e,onClick:r,className:i,children:[(0,t.jsx)("span",{className:"shrink-0",children:s}),a]})}let eo={green:{card:"bg-[#E7F5ED] border-[#04A24C]/25 hover:border-[#04A24C]",badge:"bg-[#04A24C]",chevron:"text-[#04A24C]"},deep:{card:"bg-[#0B4D36]/[0.07] border-[#0B4D36]/20 hover:border-[#0B4D36]",badge:"bg-[#0B4D36]",chevron:"text-[#0B4D36]"}};function ec({href:e,icon:s,title:a,blurb:r,tone:i,onNavigate:n}){let o=eo[i];return(0,t.jsxs)(G.default,{href:e,onClick:n,className:`relative flex flex-col gap-3 rounded-xl border px-3.5 pt-3.5 pb-3 shadow-sm transition-colors active:scale-[0.98] ${o.card}`,children:[(0,t.jsx)("span",{className:`grid h-9 w-9 place-items-center rounded-lg text-white ${o.badge}`,children:s}),(0,t.jsx)(l.ChevronRight,{size:17,className:`absolute right-3 top-3.5 ${o.chevron}`,"aria-hidden":"true"}),(0,t.jsxs)("span",{children:[(0,t.jsx)("span",{className:"block text-[15px] font-black leading-tight text-gray-900",children:a}),(0,t.jsx)("span",{className:"mt-0.5 block text-[12px] font-semibold leading-snug text-gray-600",children:r})]})]})}function ed({href:e,icon:s,tint:a,label:r,onNavigate:l}){return(0,t.jsxs)(G.default,{href:e,onClick:l,className:"flex items-center gap-2.5 rounded-xl border border-gray-200 bg-white px-3 py-2.5 shadow-sm hover:border-[#04A24C] active:scale-[0.98] transition-colors",children:[(0,t.jsx)("span",{className:`grid h-8 w-8 shrink-0 place-items-center rounded-full ${a}`,children:s}),(0,t.jsx)("span",{className:"text-[13.5px] font-bold text-gray-800 leading-tight",children:r})]})}e.s(["default",0,function(){let e,l=(0,a.useRouter)(),{cart:H,isCartOpen:W,setIsCartOpen:X,clearCart:Q,eligiblePromo:ee,vendorMeta:eo,orderNotes:ex,setOrderNotes:em,incrementItem:eh,decrementItem:eu,removeItem:ep}=(0,V.useCart)(),[eg,ef]=(0,s.useState)(null),[eb,ey]=(0,s.useState)(null),[ej,eN]=(0,s.useState)(!0),[ev,ek]=(0,s.useState)(null),[ew,eC]=(0,s.useState)("Victoria, BC"),[eA,ez]=(0,s.useState)(!1),[eS,e$]=(0,s.useState)(Y.FALLBACK_LOCATIONS),[eM,eE]=(0,s.useState)(!1),eD=()=>eE(!1),[eF,e_]=(0,s.useState)(!1),[eB,eL]=(0,s.useState)(null),[eO,eT]=(0,s.useState)(!1),eP=(0,s.useRef)(null),eI=!!eb?.activeTransaction?.orderId;(0,s.useEffect)(()=>{let e=()=>{let e=localStorage.getItem("lp_guest_location_id"),t=localStorage.getItem("lp_guest_location_name");e&&ek(e),t&&eC(t)};return e(),window.addEventListener(U.LOCATION_SYNCED_EVENT,e),()=>window.removeEventListener(U.LOCATION_SYNCED_EVENT,e)},[]),(0,s.useEffect)(()=>{let e=(0,I.getAuth)(O.app),t=(0,R.onAuthStateChanged)(e,e=>{ef(e),eN(!1)});return()=>t()},[]),(0,s.useEffect)(()=>{let e=!1;return(0,Y.fetchLocationOptions)().then(t=>{e||e$(t)}),()=>{e=!0}},[]),(0,s.useEffect)(()=>
1{if(!eg)return void ey(null);let e=(0,P.onSnapshot)((0,T.doc)(O.db,"user",eg.uid),e=>{e.exists()&&ey(e.data())});return()=>e()},[eg]),(0,s.useEffect)(()=>{eL(null)},[H?.subtotal]),(0,s.useEffect)(()=>()=>{eP.current&&clearTimeout(eP.current)},[]);let eR=async()=>{let e=(0,I.getAuth)(O.app);try{await (0,q.signOut)(e),e_(!1),l.push("/login")}catch(e){console.error(e)}},eq=(()=>{if(!H)return"/";let e=(0,U.vendorSlugOf)(H.vendor.name),t=H.vendor.id.id;return H.isMarketplace?`/store/${e}/${t}/products`:`/restaurant/${e}/${t}/menu`})(),eG=!!eg,eV=ew.split(",")[0],eU=(e=eo?.promotion)?e.dollarAmount>0?`$${e.dollarAmount.toFixed(2)} off your order has been applied!`:e.percentageAmount>0?`${Math.round(100*e.percentageAmount)}% off your order has been applied!`:e.description||null:null;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("nav",{className:"sticky top-0 z-40 bg-white/95 backdrop-blur-md border-b border-gray-100 shadow-sm",children:[(0,t.jsxs)("div",{className:"max-w-6xl mx-auto px-4 sm:px-6 lg:px-8 h-16 flex items-center justify-between gap-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-8 min-w-0",children:[(0,t.jsx)(G.default,{href:"/",className:"min-w-0 shrink",children:(0,t.jsx)("img",{src:"https://firebasestorage.googleapis.com/v0/b/local-eats-2b3ea.appspot.com/o/system%2Fsystem%2Flong_local_green_canada_wht%20copy.png?alt=media&token=b9386661-46c4-4bf3-b3e1-a566b37350c4",alt:"Local Pass",className:"h-7 md:h-8 w-auto max-w-full object-contain object-left",onError:e=>{e.target.style.display="none"}})}),(0,t.jsxs)("div",{className:"hidden md:flex items-center gap-1",children:[(0,t.jsx)(es,{label:"Services",children:e=>(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(er,{href:"/takeout",onNavigate:e,icon:(0,t.jsx)(i.ShoppingBag,{size:15,className:"text-[#04A24C]"}),tint:"bg-[#E7F5ED]",title:"Takeout Delivery",blurb:"Order from local restaurants"}),(0,t.jsx)(er,{href:"/marketplace",onNavigate:e,icon:(0,t.jsx)(n.Leaf,{size:15,className:"text-[#0B4D36]"}),tint:"bg-[#0B4D36]/[0.07]",title:"Island Food Market",blurb:"Shop local food businesses"}),(0,t.jsx)(er,{comingSoon:!0,icon:(0,t.jsx)(z.Car,{size:15,className:"text-gray-400"}),tint:"bg-gray-100",title:"Rides",blurb:"Fiar local rides"}),(0,t.jsx)("div",{className:"h-px bg-gray-100 my-1.5 mx-3",role:"separator"}),(0,t.jsx)(er,{href:"/deals",onNavigate:e,icon:(0,t.jsx)(j.Tag,{size:15,className:"text-[#b45309]"}),tint:"bg-[#FDF8E7]",title:"Deals & Promo Codes",blurb:"Current codes and local offers"}),(0,t.jsx)(er,{href:"/gift-cards",onNavigate:e,icon:(0,t.jsx)(C.Gift,{size:15,className:"text-[#04A24C]"}),tint:"bg-emerald-50",title:"Gift Cards",blurb:"Send Local Coins by email"})]})}),(0,t.jsx)(es,{label:"For Businesses",width:"w-[34rem]",center:!0,children:e=>(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-1",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(er,{href:"/platform/business",onNavigate:e,icon:(0,t.jsx)(k.Store,{size:15,className:"text-[#04A24C]"}),tint:"bg-emerald-50",title:"Sell on Local Pass",blurb:"How it works for businesses"}),(0,t.jsx)("p",{className:"px-3 pt-2 pb-1 text-[10.5px] font-black uppercase tracking-[0.12em] text-gray-400",children:"By business"}),B.LANDING_CLUSTER.map(s=>(0,t.jsx)(el,{href:s.path,onNavigate:e,children:s.name},s.path))]}),(0,t.jsxs)("div",{className:"border-l border-gray-100 pl-1",children:[(0,t.jsx)(er,{href:"/food-business-bc",onNavigate:e,icon:(0,t.jsx)(w.BookOpen,{size:15,className:"text-[#b45309]"}),tint:"bg-[#FDF8E7]",title:"Start a food business",blurb:"Permits, rules, what you can sell"}),(0,t.jsx)(er,{href:"/platform/business/resources",onNavigate:e,icon:(0,t.jsx)(S.Megaphone,{size:15,className:"text-gray-500"}),tint:"bg-gray-100",title:"Business resources",blurb:"Growth advice, case studies, news"}),(0,t.jsx)("div",{className:"h-px bg-gray-100 my-1.5 mx-3",role:"separator"}),(0,t.jsx)(er,{href:"https://business.localpass.ca/",external:!0,onNavigate:e,icon:(0,t.jsx)($.LayoutDashboard,{size:15,className:"text-gray-500"}),tint:"bg-gray-100",title:"Vendor Portal",blurb:"Sign in to manage your store"}),(0,t.jsx)(er,{href:L.DOCS.businesses.href,external:!0,onNavigate:e,icon:(0,t.jsx)(M.LifeBuoy,{size:15,className:"text-gray-500"}),tint:"bg-gray-100",title:L.DOCS.businesses.label,blurb:"How to use the dashboard"})]})]})}),(0,t.jsx)(G.default,{href:"/platform",className:"px-3 py-2 text-sm font-bold text-gray-600 hover:text-[#04A24C] rounded-xl hover:bg-gray-50 transition-colors",children:"About"}),(0,t.jsx)(G.default,{href:"/blog",className:"px-3 py-2 text-sm font-bold text-gray-600 hover:text-[#04A24C] rounded-xl hover:bg-gray-50 transition-colors",children:"Blog"})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 sm:gap-3 shrink-0",children:[(0,t.jsxs)("button",{onClick:()=>ez(!0),className:"hidden sm:flex items-center gap-1.5 bg-gray-50 hover:bg-gray-100 rounded-xl px-3 py-2 border border-gray-200 transition-colors",children:[(0,t.jsx)(r.MapPin,{size:13,className:"text-[#04A24C]"}),(0,t.jsx)("span",{className:"text-xs font-bold text-gray-700 max-w-[80px] truncate",children:eV})]}),eG&&(0,t.jsx)("div",{className:"relative",children:eI?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("button",{onClick:()=>{eT(!0),eP.current&&clearTimeout(eP.current),eP.current=setTimeout(()=>eT(!1),3500)},className:"relative p-2 bg-gray-100 rounded-full transition-colors cursor-not-allowed opacity-60","aria-label":"Cart unavailable — active order in progress",children:[(0,t.jsx)(g.ShoppingCart,{size:20,className:"text-gray-400"}),(0,t.jsx)("span",{className:"absolute -top-1 -right-1 bg-amber-500 border-2 border-white w-5 h-5 flex items-center justify-center rounded-full shadow-sm",children:(0,t.jsx)(o.Lock,{size:9,className:"text-white",strokeWidth:3})})]}),eO&&(0,t.jsxs)("div",{className:"absolute right-0 top-full mt-2.5 w-64 z-50 animate-in fade-in slide-in-from-top-1 duration-150",children:[(0,t.jsx)("div",{className:"absolute -top-1.5 right-3 w-3 h-3 bg-gray-900 rotate-45 rounded-sm"}),(0,t.jsx)("div",{className:"bg-gray-900 text-white rounded-2xl px-4 py-3.5 shadow-xl",children:(0,t.jsxs)("div",{className:"flex items-start gap-3",children:[(0,t.jsx)("div",{className:"w-8 h-8 bg-amber-500/20 rounded-full flex items-center justify-center shrink-0 mt-0.5",children:(0,t.jsx)(i.ShoppingBag,{size:14,className:"text-amber-400"})}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)("p",{className:"font-black text-[13px] text-white leading-tight mb-1",children:"Order in progress"}),(0,t.jsx)("p",{className:"text-[12px] text-gray-400 leading-snug",children:"Complete your current order before starting a new one."}),(0,t.jsxs)(G.default,{href:"/orders/tracking",onClick:()=>eT(!1),className:"inline-flex items-center gap-1 mt-2.5 text-[12px] font-bold text-[#04A24C] hover:text-emerald-400 transition-colors",children:["Track order ",(0,t.jsx)(v.ArrowRight,{size:11})]})]}),(0,t.jsx)("button",{onClick:()=>eT(!1),className:"text-gray-500 hover:text-gray-300 transition-colors shrink-0 mt-0.5",children:(0,t.jsx)(c.X,{size:14})})]})})]})]}):(0,t.jsxs)("button",{onClick:()=>X(!0),className:"relative p-2 bg-gray-50 hover:bg-gray-100 rounded-full transition-colors",children:[(0,t.jsx)(g.ShoppingCart,{size:20,className:"text-gray-700"}),H&&H.quantity>0&&(0,t.jsx)("span",{className:"absolute -top-1 -right-1 bg-red-500 text-white text-[10px] font-black w-5 h-5 flex items-center justify-center rounded-full shadow-sm border-2 border-white",children:H.quantity})]})}),ej?(0,t.jsx)("div",{className:"w-8 h-8 rounded-full bg-gray-100 animate-pulse"}):eG?(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("button",{onClick:()=>e_(!eF),className:"focus:outline-none transition-transform hover:scale-105 active:scale-95",children:eb?.photo_url?(0,t.jsx)("img",{src:eb.ph
1oto_url,alt:"Profile",className:"w-8 h-8 rounded-full object-cover border-2 border-emerald-100 shadow-sm"}):(0,t.jsx)("div",{className:"w-8 h-8 rounded-full bg-[#04A24C] flex items-center justify-center text-white font-black text-xs shadow-sm",children:(eb?.first_name||eg.email||"U").charAt(0).toUpperCase()})}),eF&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"fixed inset-0 z-40",onClick:()=>e_(!1)}),(0,t.jsxs)("div",{className:"absolute right-0 top-full mt-3 w-56 bg-white rounded-2xl shadow-xl border border-gray-100 py-2 z-50",children:[(0,t.jsxs)("div",{className:"px-4 py-2 border-b border-gray-100 mb-1",children:[(0,t.jsx)("p",{className:"text-sm font-black text-gray-900 truncate",children:eb?.first_name?`${eb.first_name} ${eb.last_name||""}`:"Local Pass Member"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 truncate",children:eg.email})]}),(0,t.jsxs)(G.default,{href:"/settings/account",onClick:()=>e_(!1),className:"flex items-center gap-3 px-4 py-2.5 text-sm font-semibold text-gray-700 hover:bg-gray-50 hover:text-[#04A24C] transition-colors",children:[(0,t.jsx)(m.User,{size:16,className:"text-gray-400"})," Account Details"]}),(0,t.jsxs)(G.default,{href:"/orders",onClick:()=>e_(!1),className:"flex items-center gap-3 px-4 py-2.5 text-sm font-semibold text-gray-700 hover:bg-gray-50 hover:text-[#04A24C] transition-colors",children:[(0,t.jsx)(p.Receipt,{size:16,className:"text-gray-400"})," My Orders"]}),(0,t.jsxs)(G.default,{href:"/gift-cards",onClick:()=>e_(!1),className:"flex items-center gap-3 px-4 py-2.5 text-sm font-semibold text-gray-700 hover:bg-gray-50 hover:text-[#04A24C] transition-colors",children:[(0,t.jsx)(C.Gift,{size:16,className:"text-gray-400"})," Gift Cards"]}),(0,t.jsxs)(G.default,{href:"/settings",onClick:()=>e_(!1),className:"flex items-center gap-3 px-4 py-2.5 text-sm font-semibold text-gray-700 hover:bg-gray-50 hover:text-[#04A24C] transition-colors",children:[(0,t.jsx)(u.Settings,{size:16,className:"text-gray-400"})," Settings"]}),(0,t.jsx)("div",{className:"h-px bg-gray-100 my-1"}),(0,t.jsxs)("button",{onClick:eR,className:"w-full flex items-center gap-3 px-4 py-2.5 text-sm font-semibold text-red-600 hover:bg-red-50 transition-colors",children:[(0,t.jsx)(h.LogOut,{size:16})," Log Out"]})]})]})]}):(0,t.jsxs)(G.default,{href:"/login",className:"hidden sm:flex items-center gap-1.5 bg-white hover:bg-gray-50 text-gray-900 text-xs font-black px-4 py-2 rounded-xl border border-gray-300 shadow-sm transition-colors",children:[(0,t.jsx)(m.User,{size:13,className:"text-[#04A24C]"})," Sign In"]}),(0,t.jsxs)(G.default,{href:"/app",className:`flex items-center justify-center shrink-0 bg-gray-900 hover:bg-black text-white font-black rounded-xl shadow-sm transition-colors ${eG?"w-9 h-9 sm:w-auto sm:h-auto sm:gap-1.5 sm:px-4 sm:py-2 sm:text-xs":"h-9 px-3.5 text-xs sm:h-auto sm:gap-1.5 sm:px-4 sm:py-2"}`,"aria-label":eG?"Download the Local Pass app":void 0,children:[(0,t.jsx)(A.Download,{className:eG?"w-[17px] h-[17px] sm:w-[13px] sm:h-[13px]":"hidden sm:block w-[13px] h-[13px]",strokeWidth:2.75,"aria-hidden":"true"}),(0,t.jsx)("span",{className:`${eG?"hidden sm:inline":""} whitespace-nowrap`,children:"Download app"})]}),(0,t.jsx)("button",{onClick:()=>eE(e=>!e),className:"md:hidden w-9 h-9 flex items-center justify-center rounded-xl hover:bg-gray-100 transition-colors",children:eM?(0,t.jsx)(c.X,{size:20,className:"text-gray-700"}):(0,t.jsx)(d.Menu,{size:20,className:"text-gray-700"})})]})]}),eM&&(0,t.jsx)("div",{className:"md:hidden border-t border-gray-100 bg-white shadow-md max-h-[calc(100dvh-4rem)] overflow-y-auto overscroll-contain",children:(0,t.jsxs)("div",{className:"px-4 pt-3 pb-5 space-y-4",children:[eI&&(0,t.jsxs)(G.default,{href:"/orders/tracking",onClick:eD,className:"flex items-center gap-3 px-3 py-3 rounded-xl bg-amber-50 border border-amber-100",children:[(0,t.jsx)("div",{className:"w-8 h-8 rounded-full bg-amber-100 flex items-center justify-center shrink-0",children:(0,t.jsx)(i.ShoppingBag,{size:15,className:"text-amber-600"})}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)("p",{className:"text-sm font-black text-amber-800",children:"Active order in progress"}),(0,t.jsx)("p",{className:"text-[11px] text-amber-600 font-semibold",children:"Tap to track y
1our order"})]}),(0,t.jsx)(v.ArrowRight,{size:14,className:"text-amber-400 shrink-0"})]}),(0,t.jsxs)("button",{onClick:()=>{ez(!0),eE(!1)},className:"w-full flex items-center gap-3 px-3 py-2.5 rounded-xl bg-gray-50 border border-gray-100",children:[(0,t.jsx)(r.MapPin,{size:16,className:"text-[#04A24C] shrink-0"}),(0,t.jsx)("span",{className:"text-sm font-bold text-gray-700",children:ew}),(0,t.jsx)("span",{className:"ml-auto text-[12px] font-semibold text-gray-400",children:"Change"})]}),(0,t.jsxs)(ei,{title:"Services",children:[(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-2.5",children:[(0,t.jsx)(ec,{href:"/takeout",onNavigate:eD,tone:"green",icon:(0,t.jsx)(i.ShoppingBag,{size:18,"aria-hidden":"true"}),title:"Restaurants",blurb:"Takeout & delivery"}),(0,t.jsx)(ec,{href:"/marketplace",onNavigate:eD,tone:"deep",icon:(0,t.jsx)(n.Leaf,{size:18,"aria-hidden":"true"}),title:"Food Market",blurb:"Island food shops"}),(0,t.jsx)(ed,{href:"/deals",onNavigate:eD,icon:(0,t.jsx)(j.Tag,{size:15,className:"text-[#b45309]","aria-hidden":"true"}),tint:"bg-[#FDF8E7]",label:"Deals & codes"}),(0,t.jsx)(ed,{href:"/gift-cards",onNavigate:eD,icon:(0,t.jsx)(C.Gift,{size:15,className:"text-[#04A24C]","aria-hidden":"true"}),tint:"bg-emerald-50",label:"Gift cards"})]}),(0,t.jsxs)("p",{className:"flex items-center gap-2 px-3 pt-1.5 text-[12.5px] font-semibold text-gray-400 select-none",children:[(0,t.jsx)(z.Car,{size:14,className:"text-gray-300 shrink-0","aria-hidden":"true"})," Rides ",(0,t.jsx)(ea,{})]})]}),(0,t.jsxs)(ei,{title:"For businesses",children:[(0,t.jsx)(en,{href:"/platform/business",onNavigate:eD,icon:(0,t.jsx)(k.Store,{size:16,className:"text-gray-400"}),title:"Sell on Local Pass"}),(0,t.jsx)(en,{href:"/food-business-bc",onNavigate:eD,icon:(0,t.jsx)(w.BookOpen,{size:16,className:"text-gray-400"}),title:"Start a food business"}),(0,t.jsxs)("details",{className:"group rounded-xl",children:[(0,t.jsxs)("summary",{className:"flex items-center gap-3 px-3 py-2.5 rounded-xl text-sm font-semibold text-gray-600 cursor-pointer list-none hover:bg-gray-50 [&::-webkit-details-marker]:hidden",children:[(0,t.jsx)(S.Megaphone,{size:16,className:"text-gray-400 shrink-0"}),"More for businesses",(0,t.jsx)(x.ChevronDown,{size:14,className:"ml-auto text-gray-400 transition-transform group-open:rotate-180"})]}),(0,t.jsxs)("div",{className:"mt-1 ml-9 space-y-0.5",children:[B.LANDING_CLUSTER.map(e=>(0,t.jsx)(G.default,{href:e.path,onClick:eD,className:"block px-3 py-2 rounded-lg text-[13.5px] font-semibold text-gray-600 hover:bg-gray-50",children:e.name},e.path)),(0,t.jsx)(G.default,{href:"/platform/business/resources",onClick:eD,className:"block px-3 py-2 rounded-lg text-[13.5px] font-semibold text-gray-600 hover:bg-gray-50",children:"Business resources"}),(0,t.jsxs)("a",{href:"https://business.localpass.ca/",target:"_blank",rel:"noopener noreferrer",onClick:eD,className:"flex items-center gap-1.5 px-3 py-2 rounded-lg text-[13.5px] font-semibold text-gray-600 hover:bg-gray-50",children:["Vendor Portal ",(0,t.jsx)(_.ExternalLink,{size:11,className:"text-gray-400"})]}),(0,t.jsxs)("a",{href:L.DOCS.businesses.href,target:"_blank",rel:"noopener noreferrer",onClick:eD,className:"flex items-center gap-1.5 px-3 py-2 rounded-lg text-[13.5px] font-semibold text-gray-600 hover:bg-gray-50",children:[L.DOCS.businesses.label," ",(0,t.jsx)(_.ExternalLink,{size:11,className:"text-gray-400"})]})]})]})]}),(0,t.jsx)(ei,{title:"Local Pass",children:(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-x-2",children:[(0,t.jsx)(en,{href:"/platform",onNavigate:eD,icon:(0,t.jsx)(E.Info,{size:16,className:"text-gray-500"}),title:"About"}),(0,t.jsx)(en,{href:"/blog",onNavigate:eD,icon:(0,t.jsx)(D.Newspaper,{size:16,className:"text-gray-500"}),title:"Blog"}),(0,t.jsx)(en,{href:L.DOCS.customers.href,external:!0,onNavigate:eD,icon:(0,t.jsx)(M.LifeBuoy,{size:16,className:"text-gray-500"}),title:L.DOCS.customers.label}),(0,t.jsx)(en,{href:"/contact",onNavigate:eD,icon:(0,t.jsx)(F.Mail,{size:16,className:"text-gray-500"}),title:"Contact"})]})}),!eG&&(0,t.jsxs)(G.default,{href:"/login",onClick:eD,className:"flex items-center justify-center gap-2 px-3 py-3 rounded-xl bg-[#04A24C] text-white",children:[(0,t.jsx)(m.User,{size:16,className:"fill-white shrink-0"}),(0,t.jsx)("span",{className:"text-sm font-black",children:"Sign In / Create Account"})]})]})})]}),W&&(0,t.jsxs)("div",{className:"fixed inset-0 z-50 flex justify-end",children:[(0,t.jsx)("div",{className:"absolute inset-0 bg-black/40 backdrop-blur-sm",onClick:()=>X(!1)}),(0,t.jsxs)("div",{className:"relative w-full max-w-md bg-gray-50 h-full shadow-2xl flex flex-col animate-in slide-in-from-right duration-300",children:[(0,t.jsxs)("div",{className:"bg-white px-6 py-4 border-b border-gray-100 flex items-center justify-between shrink-0",children:[(0,t.jsxs)("h2",{className:"text-xl font-black text-gray-900 flex items-center gap-2",children:[(0,t.jsx)(i.ShoppingBag,{className:"text-[#04A24C]"})," Your Cart"]}),(0,t.jsx)("button",{onClick:()=>X(!1),className:"p-2 bg-gray-100 rounded-full hover:bg-gray-200 transition-colors",children:(0,t.jsx)(c.X,{size:18,className:"text-gray-600"})})]}),(0,t.jsx)("div",{className:"flex-1 overflow-y-auto",children:H&&0!==H.productsInCart.length?(0,t.jsxs)("div",{className:"p-4 space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between bg-emerald-50 px-4 py-3 rounded-xl border border-emerald-100",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-[11px] font-bold text-emerald-600 uppercase tracking-wide",children:"Ordering from"}),(0,t.jsx)("p",{className:"text-sm font-black text-[#04A24C]",children:H.vendor.name})]}),(0,t.jsxs)(G.default,{href:eq,onClick:()=>X(!1),className:"flex items-center gap-1 text-[12px] font-bold text-[#04A24C] bg-white px-3 py-1.5 rounded-full border border-emerald-200 hover:bg-emerald-50 transition-colors",children:[(0,t.jsx)(b.Plus,{size:12})," Add more"]})]}),eU&&(0,t.jsxs)("div",{className:"flex items-center gap-3 bg-[#E8F5E9] border border-[#A5D6A7] px-4 py-3 rounded-xl",children:[(0,t.jsx)(j.Tag,{size:16,className:"text-[#2E7D32] shrink-0"}),(0,t.jsx)("p",{className:"text-[13px] font-semibold text-[#1B5E20] leading-snug",children:eU})]}),(0,t.jsx)("div",{className:"space-y-3",children:H.productsInCart.map((e,s)=>{let a=e.quantity>0?e.total/e.quantity:0;return(0,t.jsxs)("div",{className:"bg-white p-4 rounded-2xl shadow-sm border border-gray-100",children:[(0,t.jsxs)("div",{className:"flex gap-3",children:[(0,t.jsx)("img",{src:e.image||"https://via.placeholder.com/80",className:"w-14 h-14 object-cover rounded-xl shrink-0 bg-gray-100",alt:e.name}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsxs)("div",{className:"flex justify-between gap-2 mb-0.5",children:[(0,t.jsx)("p",{className:"font-bold text-gray-900 text-[14px] leading-tight",children:e.name}),(0,t.jsxs)("p",{className:"font-black text-gray-900 text-[14px] shrink-0",children:["$",e.total.toFixed(2)]})]}),e.quantity>1&&(0,t.jsxs)("p",{className:"text-[11px] text-gray-400 font-medium",children:["$",a.toFixed(2)," each"]}),e.isPromo&&(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 text-[10px] font-bold text-emerald-600 bg-emerald-50 px-2 py-0.5 rounded-full mt-1",children:[(0,t.jsx)(j.Tag,{size:9})," promo"]}),e.selectedOption?.length>0&&(0,t.jsx)("ul",{className:"text-[11px] text-gray-400 font-medium space-y-0.5 mt-1.5 border-t border-gray-50 pt-1.5",children:e.selectedOption.map((e,s)=>(0,t.jsxs)("li",{className:"flex justify-between",children:[(0,t.jsxs)("span",{children:["+ ",e.name]}),e.price>0&&(0,t.jsxs)("span",{children:["$",e.price.toFixed(2)]})]},s))})]})]}),(0,t.jsx)("div",{className:"flex justify-end mt-3",children:(0,t.jsxs)("div",{className:"flex items-center bg-gray-100 rounded-full p-0.5 border border-gray-200",children:[(0,t.jsx)("button",{onClick:()=>e.quantity<=1?ep(s):eu(s),className:"w-8 h-8 rounded-full flex items-center justify-center text-gray-600 hover:bg-white hover:shadow-sm transition-all",children:e.quantity<=1?(0,t.jsx)(f.Trash2,{size:13,className:"text-red-400"}):(0,t.jsx)(y.Minus,{size:13,strokeWidth:3})}),(0,t.jsx)("span",{className:"w-8 text-center font-black text-[15px] text-gray-900",children:e.quantity}),(0,t.jsx)("button",{onClick:()=>!e.isPromo&&eh(s),disabled:!!e.isPromo,className:`w-8 h-8 rounded-full flex items-center justify-center transition-all ${e.
1isPromo?"text-gray-300 cursor-not-allowed":"text-gray-600 hover:bg-white hover:shadow-sm"}`,children:(0,t.jsx)(b.Plus,{size:13,strokeWidth:3})})]})})]},s)})}),eo&&(0,t.jsx)(Z,{currentOrderValue:H.subtotal,minOrderAmount:eo.minOrderAmount,freeDelivery:eo.freeDelivery,mysteryBoxEnabled:eo.mysteryBoxEnabled,mysteryBoxAmount:eo.mysteryBoxAmount,mysteryBoxName:eo.mysteryBoxName,ownDelivery:eo.ownDelivery,isMarketplace:eo.isMarketplace}),(0,t.jsxs)("div",{className:"bg-white rounded-2xl border border-gray-100 shadow-sm p-4",children:[(0,t.jsx)("label",{className:"text-sm font-bold text-gray-800 mb-2 block",children:"Order Instructions"}),(0,t.jsx)("textarea",{value:ex,onChange:e=>em(e.target.value.slice(0,250)),placeholder:"Provide any instructions or requests for your order...",rows:3,className:"w-full text-sm text-gray-700 placeholder-gray-400 border border-gray-200 rounded-xl px-3 py-2.5 resize-none focus:outline-none focus:border-[#04A24C] transition-colors font-medium leading-relaxed"}),(0,t.jsxs)("p",{className:"text-[11px] text-gray-400 text-right mt-1",children:[ex.length,"/250"]})]}),(0,t.jsxs)("button",{onClick:Q,className:"w-full flex items-center justify-center gap-2 py-3 text-red-500 font-bold text-sm hover:bg-red-50 rounded-xl transition-colors",children:[(0,t.jsx)(f.Trash2,{size:15})," Clear Cart"]})]}):(0,t.jsxs)("div",{className:"h-full flex flex-col items-center justify-center text-center opacity-60 p-6",children:[(0,t.jsx)(g.ShoppingCart,{size:48,className:"text-gray-400 mb-4"}),(0,t.jsx)("p",{className:"text-lg font-bold text-gray-600 mb-1",children:"Your cart is empty"}),(0,t.jsx)("p",{className:"text-sm font-medium text-gray-400",children:"Add items from a local vendor to get started."})]})}),H&&H.productsInCart.length>0&&(0,t.jsxs)("div",{className:"bg-white border-t border-gray-200 p-5 shrink-0",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,t.jsx)("span",{className:"text-gray-500 font-bold text-sm",children:"Subtotal"}),(0,t.jsxs)("span",{className:"text-2xl font-black text-gray-900",children:["$",H.subtotal.toFixed(2)]})]}),eB&&(0,t.jsxs)("div",{className:"flex items-start gap-2 mb-3 bg-amber-50 border border-amber-200 px-3 py-2.5 rounded-xl",children:[(0,t.jsx)(N.AlertCircle,{size:15,className:"text-amber-500 shrink-0 mt-0.5"}),(0,t.jsx)("p",{className:"text-[12px] font-semibold text-amber-800 leading-snug",children:eB})]}),(0,t.jsxs)("button",{onClick:()=>{if(!H)return;let e=eo?.minOrderAmount??0,t=!eo?.isMarketplace&&!eo?.ownDelivery;e>0&&H.subtotal<e&&!t?eL(`Minimum order is $${e.toFixed(2)}. Add $${(e-H.subtotal).toFixed(2)} more to continue.`):(X(!1),l.push(H.isMarketplace?"/checkout/marketplace":"/checkout"))},className:"w-full bg-[#04A24C] hover:bg-[#038A40] text-white font-black py-4 rounded-[16px] flex items-center justify-center gap-2 shadow-lg shadow-emerald-900/10 transition-colors active:scale-[0.98]",children:["Proceed to Checkout ",(0,t.jsx)(v.ArrowRight,{size:18})]})]})]})]}),eA&&(0,t.jsxs)("div",{className:"fixed inset-0 z-[60] flex items-center justify-center p-4",children:[(0,t.jsx)("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:()=>ev&&ez(!1)}),(0,t.jsxs)("div",{className:"bg-white w-full max-w-md rounded-[32px] p-6 z-10 shadow-2xl relative",children:[ev&&(0,t.jsx)("button",{onClick:()=>ez(!1),className:"absolute top-4 right-4 p-2 bg-gray-100 rounded-full text-gray-500 hover:bg-gray-200",children:(0,t.jsx)(c.X,{size:18})}),(0,t.jsxs)("div",{className:"text-center mb-8 mt-2",children:[(0,t.jsx)("div",{className:"w-16 h-16 bg-[#E7F5ED] rounded-full flex items-center justify-center mx-auto mb-4",children:(0,t.jsx)(r.MapPin,{size:32,className:"text-[#04A24C]"})}),(0,t.jsx)("h2",{className:"text-2xl font-black text-gray-900 tracking-tight",children:"Where are you?"}),(0,t.jsx)("p",{className:"text-gray-500 text-[15px] font-medium mt-1.5 px-4",children:"Pick your town to see local businesses and deals near you."})]}),(0,t.jsx)(J.default,{options:eS,selected:ev?ew:null,onSelect:e=>{localStorage.setItem("lp_guest_location_id",e.id),localStorage.setItem("lp_guest_location_name",e.name),ek(e.id),eC(e.name),ez(!1),(0,et.trackSetLocation)(e.name,"picker")}})]})]}),ee&&(0,t.jsx)(K,{})]})}],13293)}]);

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.