1import{j as e}from"./motion-CQbgxZqm.js";import{P as Ha}from"./PageHero-BVWIYAjL.js";import{W as nt,S as Ot}from"./WindowFrame-Cs7JXqy6.js";import{F as bt}from"./FeatureRow-CKc_cLN_.js";import{R as We}from"./Magnetic-C25Sn251.js";import{a as p,f as Oa}from"./react-XV7MRLd-.js";import{S as ua,P as Be,a as we,F as Ta}from"./FilmBand-C5e-PGDz.js";import{C as qa}from"./CTABand-BdqRSrMM.js";import{A as Tt}from"./AmbientVideo-CREUYk0U.js";import{T as Ga,P as Oe,b as ga,c as Mt,d as fa,L as Ka,e as Ua,U as Va,f as Qa,B as Ya,m as ma,M as Xa}from"./TableHubMock-wmG0cpdy.js";import{c as U,X as Te,C as ba,d as Ja}from"./index-CZ_2bxGr.js";import{C as Ce}from"./check-BNQmpxCJ.js";import{C as Za}from"./clock-BaB5ZKa6.js";import{M as en}from"./map-pin-BLVOkj9M.js";import{R as tn}from"./receipt-1kNh2T7u.js";import{P as qt}from"./printer-CRxErm-d.js";import{K as an}from"./key-round-DK11vMuf.js";import"./Parallax-C61STkvj.js";import"./utensils-crossed-DJ86Y4Fy.js";import"./chevron-right-Do6dfimY.js";/** 2 * @license lucide-react v0.475.0 - ISC 3 * 4 * This source code is licensed under the ISC license. 5 * See the LICENSE file in the root directory of this source tree. 6 */const nn=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],rn=U("ArrowDown",nn);/** 7 * @license lucide-react v0.475.0 - ISC 8 * 9 * This source code is licensed under the ISC license. 10 * See the LICENSE file in the root directory of this source tree. 11 */const on=[["path",{d:"m16 3 4 4-4 4",key:"1x1c3m"}],["path",{d:"M20 7H4",key:"zbl0bi"}],["path",{d:"m8 21-4-4 4-4",key:"h9nckh"}],["path",{d:"M4 17h16",key:"g4d7ey"}]],sn=U("ArrowRightLeft",on);/** 12 * @license lucide-react v0.475.0 - ISC 13 * 14 * This source code is licensed under the ISC license. 15 * See the LICENSE file in the root directory of this source tree. 16 */const ln=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],dn=U("ArrowUp",ln);/** 17 * @license lucide-react v0.475.0 - ISC 18 * 19 * This source code is licensed under the ISC license. 20 * See the LICENSE file in the root directory of this source tree. 21 */const cn=[["path",{d:"M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z",key:"3c2336"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"M9 9h.01",key:"1q5me6"}],["path",{d:"M15 15h.01",key:"lqbp3k"}]],pn=U("BadgePercent",cn);/** 22 * @license lucide-react v0.475.0 - ISC 23 * 24 * This source code is licensed under the ISC license. 25 * See the LICENSE file in the root directory of this source tree. 26 */const un=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.9 4.9 14.2 14.2",key:"1m5liu"}]],ha=U("Ban",un);/** 27 * @license lucide-react v0.475.0 - ISC 28 * 29 * This source code is licensed under the ISC license. 30 * See the LICENSE file in the root directory of this source tree. 31 */const gn=[["path",{d:"M19 17h2c.6 0 1-.4 1-1v-3c0-.9-.7-1.7-1.5-1.9C18.7 10.6 16 10 16 10s-1.3-1.4-2.2-2.3c-.5-.4-1.1-.7-1.8-.7H5c-.6 0-1.1.4-1.4.9l-1.4 2.9A3.7 3.7 0 0 0 2 12v4c0 .6.4 1 1 1h2",key:"5owen"}],["circle",{cx:"7",cy:"17",r:"2",key:"u2ysq9"}],["path",{d:"M9 17h6",key:"r8uit2"}],["circle",{cx:"17",cy:"17",r:"2",key:"axvx0g"}]],fn=U("Car",gn);/** 32 * @license lucide-react v0.475.0 - ISC 33 * 34 * This source code is licensed under the ISC license. 35 * See the LICENSE file in the root directory of this source tree. 36 */const mn=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],bn=U("CircleCheck",mn);/** 37 * @license lucide-react v0.475.0 - ISC 38 * 39 * This source code is licensed under the ISC license. 40 * See the LICENSE file in the root directory of this source tree. 41 */const hn=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],Gt=U("CircleX",hn);/** 42 * @license lucide-react v0.475.0 - ISC 43 * 44 * This source code is licensed under the ISC license. 45 * See the LICENSE file in the root directory of this source tree. 46 */const xn=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],yn=U("Circle",xn);/** 47 * @license lucide-react v0.475.0 - ISC 48 * 49 * This source code is licensed under the ISC license. 50 * See the LICENSE file in the root directory of this source tree. 51 */const _n=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]],xa=U("EllipsisVertical",_n);/** 52 * @license lucide-react v0.475.0 - ISC 53 * 54 * This source code is licensed under the ISC license. 55 * See the LICENSE file in the root directory of this source tree. 56 */const Sn=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],Nt=U("Ellipsis",Sn);/** 57 * @license lucide-react v0.475.0 - ISC 58 * 59 * This source code is licensed under the ISC license. 60 * See the LICENSE file in the root directory of this source tree. 61 */const vn=[["path",{d:"M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z",key:"i9b6wo"}],["line",{x1:"4",x2:"4",y1:"22",y2:"15",key:"1cm3nv"}]],Kt=U("Flag",vn);/** 62 * @license lucide-react v0.475.0 - ISC 63 * 64 * This source code is licensed under the ISC license. 65 * See the LICENSE file in the root directory of this source tree. 66 */const kn=[["path",{d:"M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 0 0 2.5 2.5z",key:"96xj49"}]],jn=U("Flame",kn);/** 67 * @license lucide-react v0.475.0 - ISC 68 * 69 * This source code is licensed under the ISC license. 70 * See the LICENSE file in the root directory of this source tree. 71 */const wn=[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}],["path",{d:"M12 5 9.04 7.96a2.17 2.17 0 0 0 0 3.08c.82.82 2.13.85 3 .07l2.07-1.9a2.82 2.82 0 0 1 3.79 0l2.96 2.66",key:"4oyue0"}],["path",{d:"m18 15-2-2",key:"60u0ii"}],["path",{d:"m15 18-2-2",key:"6p76be"}]],Cn=U("HeartHandshake",wn);/** 72 * @license lucide-react v0.475.0 - ISC 73 * 74 * This source code is licensed under the ISC license. 75 * See the LICENSE file in the root directory of this source tree. 76 */const Rn=[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3
76kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]],ya=U("Rocket",Rn);/** 77 * @license lucide-react v0.475.0 - ISC 78 * 79 * This source code is licensed under the ISC license. 80 * See the LICENSE file in the root directory of this source tree. 81 */const zn=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],In=U("RotateCcw",zn);/** 82 * @license lucide-react v0.475.0 - ISC 83 * 84 * This source code is licensed under the ISC license. 85 * See the LICENSE file in the root directory of this source tree. 86 */const Mn=[["path",{d:"M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4Z",key:"hou9p0"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M16 10a4 4 0 0 1-8 0",key:"1ltviw"}]],Nn=U("ShoppingBag",Mn);/** 87 * @license lucide-react v0.475.0 - ISC 88 * 89 * This source code is licensed under the ISC license. 90 * See the LICENSE file in the root directory of this source tree. 91 */const Wn=[["path",{d:"M16 3h5v5",key:"1806ms"}],["path",{d:"M8 3H3v5",key:"15dfkv"}],["path",{d:"M12 22v-8.3a4 4 0 0 0-1.172-2.872L3 3",key:"1qrqzj"}],["path",{d:"m15 9 6-6",key:"ko1vev"}]],$n=U("Split",Wn);/** 92 * @license lucide-react v0.475.0 - ISC 93 * 94 * This source code is licensed under the ISC license. 95 * See the LICENSE file in the root directory of this source tree. 96 */const Bn=[["path",{d:"M14 18V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v11a1 1 0 0 0 1 1h2",key:"wrbu53"}],["path",{d:"M15 18H9",key:"1lyqi6"}],["path",{d:"M19 18h2a1 1 0 0 0 1-1v-3.65a1 1 0 0 0-.22-.624l-3.48-4.35A1 1 0 0 0 17.52 8H14",key:"lysw3i"}],["circle",{cx:"17",cy:"18",r:"2",key:"332jqn"}],["circle",{cx:"7",cy:"18",r:"2",key:"19iecd"}]],An=U("Truck",Bn);/** 97 * @license lucide-react v0.475.0 - ISC 98 * 99 * This source code is licensed under the ISC license. 100 * See the LICENSE file in the root directory of this source tree. 101 */const Dn=[["circle",{cx:"18",cy:"15",r:"3",key:"gjjjvw"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M10 15H6a4 4 0 0 0-4 4v2",key:"1nfge6"}],["path",{d:"m21.7 16.4-.9-.3",key:"12j9ji"}],["path",{d:"m15.2 13.9-.9-.3",key:"1fdjdi"}],["path",{d:"m16.6 18.7.3-.9",key:"heedtr"}],["path",{d:"m19.1 12.2.3-.9",key:"1af3ki"}],["path",{d:"m19.6 18.7-.4-1",key:"1x9vze"}],["path",{d:"m16.8 12.3-.4-1",key:"vqeiwj"}],["path",{d:"m14.3 16.6 1-.4",key:"1qlj63"}],["path",{d:"m20.7 13.8 1-.4",key:"1v5t8k"}]],Fn=U("UserCog",Dn);/** 102 * @license lucide-react v0.475.0 - ISC 103 * 104 * This source code is licensed under the ISC license. 105 * See the LICENSE file in the root directory of this source tree. 106 */const En=[["path",{d:"M3 2v7c0 1.1.9 2 2 2h4a2 2 0 0 0 2-2V2",key:"cjf0a3"}],["path",{d:"M7 2v20",key:"1473qp"}],["path",{d:"M21 15V2a5 5 0 0 0-5 5v6c0 1.1.9 2 2 2h3Zm0 0v7",key:"j28e5"}]],_a=U("Utensils",En),rt=[{n:1,anchor:"book",title:"One book, five states",text:"Checked-in, dining, completed, no-show, cancelled. The rail holds every guest state; the floor only seats the dining ones."},{n:2,anchor:"zones",title:"Sections wear their server",text:"Tap Layers and the section map draws over the floor, tinted per server, so ownership reads at a glance."},{n:3,anchor:"tile",title:"The room answers the book",text:"Every table reads at a glance: seated, ordered, reserved, open, or flagged for buss when its check closes."},{n:4,anchor:"spend",title:"Open checks only",text:"Live Spend follows the checks the POS is running. Closed tables and no-shows drop off as the night moves."}],ht="217,169,46";function Le({c:t,right:a,active:r,revealed:o,i,toward:f,onHover:l,onLeave:h,onToggle:c,pinned:S}){return e.jsxs("button",{type:"button",onClick:c,onMouseEnter:l,onMouseLeave:h,"aria-pressed":S,className:`group block w-full max-w-[340px] bg-transparent p-0 transition-all duration-700 ${a?"ml-auto text-right":"text-left"} ${o?"translate-y-0 opacity-100":"translate-y-2 opacity-0"}`,style:{transitionDelay:`${i*160}ms`,cursor:c?"pointer":"default"},children:[e.jsxs("span",{className:`inline-flex items-center gap-2 ${a?"flex-row-reverse":""}`,children:[e.jsx("span",{className:"grid h-5 w-5 shrink-0 place-items-center rounded-full border font-mono text-[10px] font-bold transition-colors duration-300",style:{borderColor:r?"rgba(217,169,46,0.85)":"var(--accent-border)",background:r?"rgba(217,169,46,0.18)":"var(--accent-soft)",color:"hsl(var(--primary-ink))"},children:t.n}),e.jsx("span",{className:`text-[13.5px] font-bold transition-colors duration-300 ${r?"text-foreground":"text-foreground
106/80"}`,children:t.title}),f==="down"&&e.jsx(rn,{size:13,strokeWidth:2.4,"aria-hidden":!0,className:"text-primary/50"}),f==="up"&&e.jsx(dn,{size:13,strokeWidth:2.4,"aria-hidden":!0,className:"text-primary/50"})]}),e.jsx("p",{className:"mt-1.5 text-[12.5px] leading-relaxed text-muted-foreground",children:t.text})]})}function Ln(){const t=p.useRef(null),a=p.useRef(null),[r,o]=p.useState([]),[i,f]=p.useState(!1),[l,h]=p.useState(!1),[c,S]=p.useState(null),[k,_]=p.useState(null),[M,v]=p.useState(0),m=p.useCallback(()=>{const d=t.current,R=a.current;if(!d||!R)return;const w=d.getBoundingClientRect(),s=[];rt.forEach(y=>{const z=R.querySelector(`[data-anno="${y.anchor}"]`);if(!z)return;const j=z.getBoundingClientRect(),H=j.height>240;s.push({n:y.n,x:j.left-w.left+j.width/2,y:j.top-w.top+(H?Math.min(j.height*.28,110):j.height/2),ax:j.left-w.left,aw:j.width,sy:j.top-w.top,sh:Math.min(j.height,340)})}),o(s)},[]);p.useEffect(()=>{const d=()=>requestAnimationFrame(m);d();const R=setTimeout(m,300),w=setTimeout(m,1e3),s=new ResizeObserver(d);return t.current&&s.observe(t.current),a.current&&s.observe(a.current),window.addEventListener("resize",d),document.fonts?.ready&&document.fonts.ready.then(d).catch(()=>{}),()=>{s.disconnect(),window.removeEventListener("resize",d),clearTimeout(R),clearTimeout(w)}},[m]),p.useEffect(()=>{const d=t.current;if(!d)return;const R=new IntersectionObserver(([w])=>{h(w.isIntersecting),w.isIntersecting&&f(!0)},{threshold:.15});return R.observe(d),()=>R.disconnect()},[]),p.useEffect(()=>{if(!i||!l||c!=null||k!=null)return;const d=setInterval(()=>v(R=>(R+1)%rt.length),3200);return()=>clearInterval(d)},[i,l,c,k]);const g=k??c??(i?M:-1),x=d=>({c:rt[d],i:d,revealed:i,active:g===d,pinned:k===d,onHover:()=>S(d),onLeave:()=>S(null),onToggle:()=>_(R=>R===d?null:d)});return e.jsxs("div",{ref:t,className:"relative",children:[e.jsxs("div",{className:"mb-5 hidden grid-cols-2 items-end gap-6 lg:grid",children:[e.jsx("div",{children:e.jsx(Le,{...x(0),toward:"down"})}),e.jsx("div",{children:e.jsx(Le,{...x(1),right:!0,toward:"down"})})]}),e.jsx("div",{ref:a,className:"relative",children:e.jsx(Ga,{})}),e.jsxs("div",{className:"mt-5 hidden grid-cols-2 items-start gap-6 lg:grid",children:[e.jsx("div",{children:e.jsx(Le,{...x(2),toward:"up"})}),e.jsx("div",{children:e.jsx(Le,{...x(3),right:!0,toward:"up"})})]}),e.jsx("div",{className:"mt-5 grid gap-5 sm:grid-cols-2 lg:hidden",children:rt.map((d,R)=>e.jsx(Le,{c:d,i:R,revealed:!0,active:!1},d.n))}),e.jsx("svg",{className:"pointer-events-none absolute inset-0 z-10 hidden h-full w-full lg:block","aria-hidden":"true",children:r.map((d,R)=>{const w=g===R;return e.jsxs("g",{style:{transition:"opacity 500ms ease",transitionDelay:`${R*160}ms`,opacity:i?1:0},children:[e.jsx("rect",{x:d.ax-6,y:d.sy-6,width:d.aw+12,height:d.sh+12,rx:13,fill:"rgba(217,169,46,0.06)",stroke:"rgba(217,169,46,0.55)",strokeWidth:1.4,style:{transition:"opacity 350ms ease",opacity:w?1:0}}),e.jsx("line",{x1:d.x,y1:d.y+(R<2?-1:1)*14,x2:d.x,y2:d.y+(R<2?-1:1)*26,stroke:`rgba(${ht},${w?.9:.5})`,strokeWidth:1.4,strokeLinecap:"round",style:{transition:"stroke 350ms ease"}}),w&&e.jsxs("circle",{cx:d.x,cy:d.y,r:11,fill:"none",stroke:`rgba(${ht},0.65)`,strokeWidth:1.2,children:[e.jsx("animate",{attributeName:"r",values:"11;21;11",dur:"2.2s",repeatCount:"indefinite"}),e.jsx("animate",{attributeName:"opacity",values:"0.7;0;0.7",dur:"2.2s",repeatCount:"indefinite"})]}),e.jsx("circle",{cx:d.x,cy:d.y,r:10.5,fill:w?"rgba(217,169,46,0.95)":"rgba(20,22,25,0.82)",stroke:w?"rgba(255,226,120,0.95)":`rgba(${ht},0.6)`,strokeWidth:1.1,style:{transition:"fill 350ms ease, stroke 350ms ease"}}),e.jsx("text",{x:d.x,y:d.y+3.8,textAnchor:"middle",fill:w?"#221c05":"#e9c65a",style:{fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace",fontSize:10.5,fontWeight:700,transition:"fill 350ms ease"},children:d.n})]},d.n)})})]})}const ne={dark:{bgPrimary:"#0a0a0c",bgRaised:"rgba(255,255,255,0.05)",bgTertiary:"rgba(255,255,255,0.08)",text:"#f4f4f5",textMuted:"rgba(244,244,245,0.65)",textDim:"rgba(244,244,245,0.45)",border:"rgba(255,255,255,0.10)",borderStrong:"rgba(255,255,255,0.18)",sent:"#22c55e",held:"#f59e0b",alert:"#ef4444",paid:"#3b82f6",sentSoft:"rgba(34,197,94,0.12)",heldSoft:"rgba(245,158,11,0.12)",alertS
106oft:"rgba(239,68,68,0.10)",paidSoft:"rgba(59,130,246,0.12)",shadowSm:"0 2px 8px rgba(0,0,0,0.3)",shadowMd:"0 4px 16px rgba(0,0,0,0.4)",shadowLg:"0 8px 32px rgba(0,0,0,0.5)"},light:{bgPrimary:"#f5f4f2",bgRaised:"rgba(0,0,0,0.03)",bgTertiary:"rgba(0,0,0,0.05)",text:"#18181b",textMuted:"rgba(24,24,27,0.68)",textDim:"rgba(24,24,27,0.62)",border:"rgba(24,24,27,0.12)",borderStrong:"rgba(24,24,27,0.20)",sent:"#16a34a",held:"#d97706",alert:"#dc2626",paid:"#2563eb",sentSoft:"rgba(22,163,74,0.10)",heldSoft:"rgba(217,119,6,0.10)",alertSoft:"rgba(220,38,38,0.08)",paidSoft:"rgba(37,99,235,0.10)",shadowSm:"0 1px 3px rgba(16,24,40,0.06)",shadowMd:"0 4px 16px rgba(16,24,40,0.08)",shadowLg:"0 8px 32px rgba(16,24,40,0.12)"},radius:{xs:6,sm:10,md:14,lg:22,full:999},type:{xs:10,sm:12,base:14,lg:18,xl:24,"2xl":32},weight:{normal:400,medium:500,semibold:600,bold:700,extrabold:800},space:{xs:4,sm:8,md:12,lg:16,xl:24,"2xl":32},easing:"cubic-bezier(0.16, 1, 0.3, 1)",duration:{fast:150,base:200,slow:300},accents:{foh:"#CC9900",workforce:"#7c5cf0",admin:"#0ea5e9",analytics:"#14b8a6",guest:"#CC9900"},accentInk:{foh:"#1a1300",workforce:"#ffffff",admin:"#04202b",analytics:"#04201c",guest:"#1a1300"}},Ut=(t,a=.12)=>{const r=String(t).replace("#",""),o=parseInt(r.length===3?r.split("").map(i=>i+i).join(""):r,16);return`rgba(${o>>16&255},${o>>8&255},${o&255},${a})`};function Pn(t,a="foh",r){const o=ne.light,i=ne.accents[a]||ne.accents.foh;return{...o,isDark:t,module:a,accent:i,accentInk:ne.accentInk[a]||"#1a1300",accentSoft:Ut(i,.1),accentBorder:Ut(i,.24),radius:ne.radius,type:ne.type,weight:ne.weight,space:ne.space,easing:ne.easing,duration:ne.duration}}function Wt(){const[t,a]=p.useState(()=>document.documentElement.classList.contains("dark"));return p.useEffect(()=>{const r=new MutationObserver(()=>a(document.documentElement.classList.contains("dark")));return r.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),()=>r.disconnect()},[]),t}const Hn="#FFD700",On="#D4A017",Vt="#1a1a4e";function Tn(t){return null}function qn(t,a){const r=Tn()||(t?Hn:On),o=ne[t?"dark":"light"],i={radius:ne.radius,type:ne.type,weight:ne.weight,easing:ne.easing};return t?{isDark:!0,accent:r,accentInk:Vt,accentGradient:"linear-gradient(135deg,#FFD700,#CC9900)",accentSoft:"rgba(255,215,0,0.12)",accentBorder:"rgba(255,215,0,0.28)",bgPrimary:"#16181b",bgSecondary:"#1e2124",bgTertiary:"#26292d",bgRaised:"#2e3135",text:"#e8e9ea",textMuted:"#9a9ea3",textDim:"#7d8187",border:"rgba(255,255,255,0.09)",borderStrong:"rgba(255,255,255,0.16)",draft:"#e0b84d",draftSoft:"rgba(224,184,77,0.14)",sent:o.sent,sentSoft:o.sentSoft,held:o.held,heldSoft:o.heldSoft,alert:o.alert,alertSoft:o.alertSoft,paid:o.paid,paidSoft:o.paidSoft,offline:o.held,goldText:"#FFD700",spring:"cubic-bezier(.32,1.3,.4,1)",tileSurface:"linear-gradient(160deg,#2a2419 0%,#1f1a10 100%)",tileSurfaceSoft:"rgba(217,169,46,0.07)",tileBorder:"rgba(217,169,46,0.18)",canvasWarm:"#16181b",tileWarm:"#1e2124",tileSoft:"0 8px 30px rgba(0,0,0,0.35), 0 1px 3px rgba(0,0,0,0.4)",cardWarm:"linear-gradient(150deg, #26292d, #1e2124)",widgetGlass:"linear-gradient(160deg, rgba(38,41,45,0.92), rgba(30,33,36,0.86))",widgetSolid:"#1e2124",widgetInner:"rgba(255,255,255,0.07)",widgetHighlight:"rgba(255,255,255,0.10)",widgetCell:"rgba(255,255,255,0.045)",widgetRadius:"22px",heroTint:"linear-gradient(150deg, rgba(255,215,0,0.20), rgba(255,215,0,0.07))",liveGlass:"linear-gradient(160deg, rgba(22,24,27,0.94), rgba(30,33,36,0.88))",shadow:"0 8px 32px rgba(0,0,0,0.55), 0 2px 8px rgba(0,0,0,0.4)",glow:`0 0 0 1px ${r}55, 0 0 24px ${r}33`,...i}:{isDark:!1,accent:r,accentInk:Vt,accentGradient:"linear-gradient(135deg,#FFD700,#CC9900)",accentSoft:"rgba(212,160,23,0.12)",accentBorder:"rgba(212,160,23,0.28)",bgPrimary:"#f4f5f7",bgSecondary:"#ffffff",bgTertiary:"#ffffff",bgRaised:"#eef0f3",text:"#15171c",textMuted:"#5f656f",textDim:"#9aa0aa",border:"rgba(0,0,0,0.08)",borderStrong:"rgba(0,0,0,0.14)",draft:"#b8860b",draftSoft:"rgba(184,134,11,0.10)",sent:o.sent,sentSoft:o.sentSoft,held:o.held,heldSoft:o.heldSoft,alert:o.alert,alertSoft:o.alertSoft,paid:o.paid,paidSoft:o.paidSoft,offline:o.held,goldText:"#8a6516",spring:"cubic-bezier(.32,1.3,.4,1)",tileSurface:"linear-gradient(160deg,#fdfaf1 0%,#f6f0e0 100%)",tileSurfaceSoft:"rgba(184,137,30,0.07)",t
106ileBorder:"rgba(184,137,30,0.24)",canvasWarm:"#f6f0e2",tileWarm:"#fffdf5",tileSoft:"0 1px 3px rgba(23,20,14,0.05), 0 6px 18px rgba(23,20,14,0.07)",cardWarm:"linear-gradient(145deg, #fffdf5, #f7efdc)",widgetGlass:"linear-gradient(160deg, rgba(255,253,245,0.85), rgba(247,239,220,0.72))",widgetSolid:"#fffdf5",widgetInner:"rgba(0,0,0,0.06)",widgetHighlight:"rgba(255,255,255,0.7)",widgetCell:"rgba(255,255,255,0.65)",widgetRadius:"22px",heroTint:"linear-gradient(150deg, rgba(212,160,23,0.16), rgba(212,160,23,0.05))",liveGlass:"linear-gradient(160deg, rgba(255,255,255,0.92), rgba(233,235,240,0.82))",shadow:"0 8px 32px rgba(0,0,0,0.10), 0 2px 8px rgba(0,0,0,0.05)",glow:`0 0 0 1px ${r}66, 0 0 18px ${r}33`,...i}}function Gn(t){const a=Wt();return p.useMemo(()=>qn(a),[a,t])}const Qt={success(){},error(){}},Kn={entities:{MenuItem:{update:async()=>({})}}},Yt=["#34d399","#60a5fa","#f472b6","#fbbf24","#a78bfa","#fb923c","#22d3ee","#f87171","#4ade80","#c084fc"];function jt(t=""){let a=0;for(let r=0;r<t.length;r++)a=a*31+t.charCodeAt(r)>>>0;return Yt[a%Yt.length]}function Un(t){return t?.button_color||t?._catColor||jt(t?.category||"")}function Vn({item:t,T:a,onTap:r,onLongPress:o}){const i=t.is_available===!1,f=Un(t),l=p.useRef(null),h=p.useRef(!1),[c,S]=p.useState(!1),k=()=>{o&&(h.current=!1,l.current=setTimeout(()=>{h.current=!0,o(t)},500))},_=()=>{l.current&&clearTimeout(l.current)},M=()=>{h.current||i||r?.(t)};return e.jsxs("button",{onClick:M,onPointerDown:k,onPointerUp:_,onPointerLeave:_,onContextMenu:v=>v.preventDefault(),className:"pos-menu-card",style:{position:"relative",textAlign:"left",borderRadius:14,overflow:"hidden",cursor:i?"context-menu":"pointer",background:a.bgRaised,border:`1px solid ${a.border}`,borderTop:`3px solid ${f}`,opacity:i?.5:1,fontFamily:"var(--font-inter)",WebkitTapHighlightColor:"transparent",display:"flex",flexDirection:"column",minHeight:92,transition:"transform 160ms var(--ease-out-quint)"},children:[i&&e.jsx("div",{style:{position:"absolute",inset:0,zIndex:2,background:`repeating-linear-gradient(45deg, ${a.alertSoft} 0 6px, transparent 6px 12px)`}}),t.is_popular&&!i&&e.jsx("div",{style:{position:"absolute",top:6,right:6,zIndex:3,fontSize:9,fontWeight:800,color:a.draft},children:"â
"}),i&&e.jsx("div",{style:{position:"absolute",top:6,right:6,zIndex:3,fontSize:9,fontWeight:900,color:a.alert,background:a.alertSoft,padding:"1px 6px",borderRadius:6},children:"86"}),t.image_url&&!c?e.jsx("img",{src:t.image_url,alt:"",loading:"lazy",decoding:"async",onError:()=>S(!0),style:{width:"100%",height:52,objectFit:"cover"}}):t.image_url?e.jsx("div",{style:{width:"100%",height:52,display:"flex",alignItems:"center",justifyContent:"center",background:`${f}1f`},children:e.jsx("span",{style:{fontSize:22,fontWeight:900,color:`${f}99`,letterSpacing:"-0.02em"},children:(t.name||"?").trim().charAt(0)})}):e.jsx("div",{style:{height:8}}),e.jsxs("div",{style:{padding:"8px 10px",display:"flex",flexDirection:"column",gap:4,flex:1,justifyContent:"flex-end"},children:[e.jsx("span",{style:{fontSize:12.5,fontWeight:700,color:a.text,lineHeight:1.2},children:t.name}),e.jsxs("span",{style:{fontSize:13,fontWeight:800,color:a.accent,fontFamily:"JetBrains Mono, monospace"},children:["$",(t.price||0).toFixed(2)]})]})]})}const Qn=["Nut","Soy","Gluten","Dairy","Seed","Egg","Shellfish","Fish","Sesame"];function Yn({T:t,item:a,onCancel:r,onConfirm:o}){const i=(a.modifierGroups||[]).filter(n=>(n.modifiers||[]).length>0),f=p.useMemo(()=>[...i].sort((n,u)=>(u.required?1:0)-(n.required?1:0)),[i]),[l,h]=p.useState(f[0]?.id||null),[c,S]=p.useState({}),[k,_]=p.useState(f.length?"groups":"special"),[M,v]=p.useState(""),[m,g]=p.useState(1),[x,d]=p.useState([]),[R,w]=p.useState(""),[s,y]=p.useState(""),[z,j]=p.useState([]),H=n=>{j(u=>u.find(N=>N.allergen===n)?u.filter(N=>N.allergen!==n):[...u,{id:`alg_${n}`,name:`â ${n} Allergy`,allergen:n,price_delta:0,is_allergy:!0}])},B=()=>{const n=R.trim();n&&(d(u=>[...u,{id:`sr_${Date.now()}`,name:n,price_delta:parseFloat(s)||0}]),w(""),y(""))},O=n=>d(u=>u.filter(I=>I.id!==n)),D=f.find(n=>n.id===l),X=n=>n&&n.type==="single"&&(c[n.id]||[]).length>=1,$=(n,u)=>{S(I=>{const N=I[n.id]||[];return n.type==="single"?{...I,[n.id]:[{id:u.id,name:u.name,price_delta:u.priceAdjustment||0}]}:N.find(ee=>ee.id===u.id)?{...I,[n.id]:N.filter(ee=>ee.id!==u.id)}:{...I,[n.id]:[...N,{id:u.id,name:u.name,price_delta:u.priceAdjustment||0}]}})},F=p.useMemo(()=>[...Object.values(c).flat(),...z,...x],[c,z,x]),J=F.reduce((n,u)=>n+(u.price_delta||0),0),E=f.some(n=>n.required&&(c[n.id]||[]).length<Math.max(1,n.min_selections||1)),T=((a.price||0)+J)*m,te=Object.values(c).reduce((n,u)=>n+u.length,0),q=()=>{E||o({mods:F.map(n=>({id:n.id,name:n.name,price_delta:n.price_delta||0})),note:M.trim(),qty:m})};return e.jsx("div",{onClick:r,style:Xn,children:e.jsxs("div",{onClick:n=>n.stopPropagation(),className:"animate-slide-up-spring",style:Jn(t),children:[e.jsxs("div",{style:{flexShrink:0,display:"flex",alignItems:"center",gap:12,padding:"16px 18px 12px"},children:[e.jsx("button",{onClick:r,style:Zn(t),children:e.jsx(Te,{size:18})}),e.jsxs("div",{style:{minWidth:0,flex:1},children:[e.jsx("div",{style:{fontSize:19,fontWeight:800,color:t.text,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.name}),E?e.jsx("div",{style:{marginTop:2,fontSize:12.5,fontWeight:700,color:t.alert},children:(()=>{const n=f.find(u=>u.required&&(c[u.id]||[]).length<Math.max(1,u.min_selections||1));return n?`Select at least ${Math.max(1,n.min_selections||1)} from ${n.name}`:"Select required options"})()}):i.length?e.jsxs("div",{style:{marginTop:2,fontSize:12,color:t.textMuted,fontWeight:600},children:[te," option",te!==1?"s":""," selected"]}):null]}),e.jsxs("span",{style:{flexShrink:0,fontSize:14,fontWeight:800,color:t.text,fontFamily:"JetBrains Mono, monospace"},children:["$",a.price||0]})]}),f.length>0&&e.jsxs("div",{style:{flexShrink:0,display:"flex",gap:4,padding:"0 14px",borderBottom:`1px solid ${t.border}`,overflowX:"auto",scrollbarWidth:"none"},className:"no-scrollbar",children:[f.map(n=>{const u=k==="groups"&&l===n.id,I=c[n.id]||[],N=X(n);return e.jsxs("button",{onClick:()=>{_("groups"),h(n.id)},style:{flex:"0 0 auto",display:"flex",alignItems:"center",gap:6,height:40,padding:"0 14px",borderRadius:10,cursor:"pointer",background:u?t.accentSoft:"transparent",border:`1px solid ${u?t.accentBorder:t.border}`,fontSize:13,fontWeight:800,color:u?t.text:t.textMuted,fontFamily:"var(--font-inter)"},children:[n.name,n.required&&!N&&e.jsx("span",{style:{width:6,height:6,borderRadius:99,background:t.alert,flexShrink:0}}),I.length>0&&e.jsx("span",{style:{minWidth:17,height:17,padding:"0 5px",borderRadius:99,background:t.accent,color:"#1a1300",fontSize:10.5,fontWeight:800,display:"inline-flex",alignItems:"center",justifyContent:"center"},children:I.length})]},n.id)}),e.jsxs("button",{onClick:()=>_("special"),style:{flex:"0 0 auto",display:"flex",alignItems:"center",gap:6,height:40,padding:"0 14px",borderRadius:10,cursor:"pointer",background:k==="special"?t.accentSoft:"transparent",border:`1px solid ${k==="special"?t.accentBorder:t.border}`,fontSize:13,fontWeight:800,color:k==="special"?t.text:t.textMuted,fontFamily:"var(--font-inter)"},children:["Special Request",x.length+z.length>0&&e.jsx("span",{style:{minWidth:17,height:17,padding:"0 5px",borderRadius:99,background:t.accent,color:"#1a1300",fontSize:10.5,fontWeight:800,display:"inline-flex",alignItems:"center",justifyContent:"center"},children:x.length+z.length})]})]}),e.jsxs("div",{style:{flex:1,minHeight:0,overflowY:"auto",padding:16},className:"no-scrollbar",children:[(!f.length||k==="groups")&&D&&e.jsxs(e.Fragment,{children:[D.type==="single"?e.jsx("div",{style:{fontSize:12,color:t.textMuted,fontWeight:600,margin:"0 2px 10px"},children:"Choose 1"}):(D.max_selections||D.min_selections)&&e.jsx("div",{style:{fontSize:12,color:t.textMuted,fontWeight:600,margin:"0 2px 10px"},children:D.max_selections>1?`Choose up to ${D.max_selections}`:D.min_selections>1?`Choose at least ${D.min_selections}`:"Choose any"}),e.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(150px, 1fr))",gap:10},children:(D.modifiers||[]).map(n=>{const u=(c[D.id]||[]).some(N=>N.id===n.id),I=D.type==="single"&&X(D)&&!u;return e.jsxs("button",{disabled:I,onClick:()=>$(D,n),style:{minHeight:56,padding:"10px 13px",borderRadius:12,textAlign:"left",cursor:
106I?"not-allowed":"pointer",background:u?t.accentSoft:t.bgRaised,border:`1.5px solid ${u?t.accent:t.border}`,opacity:I?.45:1,fontFamily:"var(--font-inter)",display:"flex",alignItems:"center",justifyContent:"space-between",gap:10,transition:"background 120ms, border-color 120ms, opacity 120ms"},children:[e.jsx("span",{style:{fontSize:13.5,fontWeight:700,color:t.text},children:n.name}),e.jsx("span",{style:{flexShrink:0},children:u?e.jsx(Ce,{size:16,style:{color:t.accent}}):n.priceAdjustment?e.jsxs("span",{style:{fontSize:12,fontWeight:700,color:t.textMuted,fontFamily:"JetBrains Mono, monospace"},children:["+$",n.priceAdjustment.toFixed(2)]}):null})]},n.id)})})]}),k==="special"&&e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:14},children:[x.length>0&&e.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:7},children:x.map(n=>e.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:5,padding:"5px 10px",borderRadius:999,fontSize:12.5,fontWeight:700,background:t.accentSoft,color:t.text},children:[n.name,n.price_delta?` ($${n.price_delta.toFixed(2)})`:"",e.jsx(Te,{size:12,style:{cursor:"pointer"},onClick:()=>O(n.id)})]},n.id))}),e.jsxs("div",{style:{display:"flex",gap:6},children:[e.jsx("input",{value:R,onChange:n=>w(n.target.value),onKeyDown:n=>{n.key==="Enter"&&B()},placeholder:"e.g. Dash of caramel",style:{flex:1,minWidth:0,height:44,background:t.bgSecondary,border:`1px solid ${t.border}`,borderRadius:10,padding:"0 12px",color:t.text,fontSize:13.5,outline:"none",fontFamily:"var(--font-inter)"}}),e.jsx("input",{value:s,onChange:n=>y(n.target.value),onKeyDown:n=>{n.key==="Enter"&&B()},placeholder:"$",inputMode:"decimal",style:{width:60,height:44,background:t.bgSecondary,border:`1px solid ${t.border}`,borderRadius:10,padding:"0 8px",color:t.text,fontSize:13.5,outline:"none",textAlign:"center",fontFamily:"JetBrains Mono, monospace"}}),e.jsx("button",{onClick:B,style:{width:44,height:44,borderRadius:10,border:"none",background:t.accent,color:"#1a1300",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:e.jsx(Oe,{size:18,strokeWidth:2.6})})]}),e.jsxs("div",{style:{padding:12,borderRadius:13,background:"rgba(239,68,68,0.05)",border:"1px solid rgba(239,68,68,0.18)"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:9},children:[e.jsx(ga,{size:13,style:{color:"#dc2626"}}),e.jsx("span",{style:{fontSize:11.5,fontWeight:800,color:"#dc2626",textTransform:"uppercase",letterSpacing:"0.06em"},children:"Allergy tags"})]}),e.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:7},children:Qn.map(n=>{const u=z.some(I=>I.allergen===n);return e.jsx("button",{onClick:()=>H(n),style:{minHeight:34,padding:"0 11px",borderRadius:10,cursor:"pointer",fontSize:12.5,fontWeight:800,background:u?"#dc2626":"rgba(239,68,68,0.08)",color:u?"#fff":"#c22a2a",border:`1.5px solid ${u?"#dc2626":"rgba(239,68,68,0.25)"}`,fontFamily:"var(--font-inter)"},children:n},n)})})]})]}),e.jsx("textarea",{value:M,onChange:n=>v(n.target.value),placeholder:"Add an item noteâ¦",rows:2,style:{width:"100%",marginTop:14,background:t.bgRaised,border:`1px solid ${t.border}`,borderRadius:13,padding:12,color:t.text,fontSize:13.5,outline:"none",resize:"none",fontFamily:"var(--font-inter)"}})]}),e.jsxs("div",{style:{flexShrink:0,padding:"12px 16px 16px",borderTop:`1px solid ${t.border}`,display:"flex",alignItems:"center",gap:12},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[e.jsx("button",{onClick:()=>g(n=>Math.max(1,n-1)),style:Xt(t),children:e.jsx(Mt,{size:15})}),e.jsx("span",{style:{minWidth:22,textAlign:"center",fontSize:16,fontWeight:800,color:t.text,fontFamily:"JetBrains Mono, monospace"},children:m}),e.jsx("button",{onClick:()=>g(n=>n+1),style:Xt(t),children:e.jsx(Oe,{size:15})})]}),e.jsxs("button",{onClick:q,disabled:E,style:{flex:1,height:50,borderRadius:13,border:"none",cursor:E?"not-allowed":"pointer",background:E?t.bgRaised:t.accent,color:E?t.textDim:"#1a1300",fontSize:15,fontWeight:800,fontFamily:"var(--font-inter)",display:"flex",alignItems:"center",justifyContent:"center",gap:8,opacity:E?.9:1},children:[e.jsx(Ce,{size:18})," ",E?"Select required options":`Done · $${T.toFixed(2)}`]})]})]})})}const Xn={position:"absolute",inset:0,zIndex:50,background:"rgba(0,0,0,0.5)",display:"flex",alignItems:"center",justifyContent:"center",fontFamily:"var(--font-inter)"},Jn=t=>({width:"min(560px, 94%)",maxHeight:"min(640px, 88%)",display:"flex",flexDirection:"column",background:t.bgTertiary,borderRadius:20,overflow:"hidden",boxShadow:t.shadow,border:`1px solid ${t.border}`}),Zn=t=>({width:36,height:36,borderRadius:10,border:`1px solid ${t.border}`,background:t.bgRaised,color:t.textMuted,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0}),Xt=t=>({width:38,height:38,borderRadius:10,border:`1px solid ${t.border}`,background:t.bgRaised,color:t.text,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center"});function er({T:t,item:a,onCancel:r,onConfirm:o}){const i=a.is_available===!1,f=i?t.sent:t.alert,l=i?In:ha;return e.jsx("div",{style:{position:"absolute",inset:0,zIndex:25,background:"rgba(0,0,0,0.5)",display:"flex",alignItems:"center",justifyContent:"center"},onClick:r,children:e.jsxs("div",{onClick:h=>h.stopPropagation(),className:"animate-spring-in",style:{width:320,background:t.bgTertiary,borderRadius:18,padding:20,boxSh
106adow:t.shadow,border:`1px solid ${t.border}`,fontFamily:"var(--font-inter)"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:9,marginBottom:6,color:f,fontSize:16,fontWeight:800},children:[e.jsx(l,{size:18})," ",i?"Restore item":"86 this item"]}),e.jsxs("div",{style:{fontSize:13,color:t.textMuted,marginBottom:16},children:[a.name,i?" will become available again.":" will be marked unavailable across all terminals."]}),e.jsxs("div",{style:{display:"flex",gap:8},children:[e.jsx("button",{onClick:r,style:{flex:1,height:46,borderRadius:12,border:`1px solid ${t.borderStrong}`,background:t.bgRaised,color:t.text,fontWeight:700,cursor:"pointer",fontFamily:"var(--font-inter)"},children:"Cancel"}),e.jsx("button",{onClick:o,style:{flex:1,height:46,borderRadius:12,border:"none",background:f,color:"#fff",fontWeight:800,cursor:"pointer",fontFamily:"var(--font-inter)"},children:i?"Restore":"86 it"})]})]})})}function tr({T:t,open:a,items:r=[],categories:o=[],menus:i=[],groups:f=[],menuStyle:l="modern",inline:h=!1,fullWidth:c=!1,onClose:S,onAdd:k}){const[_,M]=p.useState("All"),[v,m]=p.useState(null),[g,x]=p.useState(""),[d,R]=p.useState(null),[w,s]=p.useState(null),[y,z]=p.useState(!1),[j,H]=p.useState(""),[B,O]=p.useState("");p.useEffect(()=>{a&&i.length&&!v&&m(i[0]?.id??null)},[a,i,v]);const D=()=>{const n=j.trim(),u=Number(B)||0;z(!1),H(""),O(""),n&&k({id:null,name:n,price:u,open_item:!0},[],{note:""})},X=async()=>{const n=w,u=n.is_available!==!1;s(null);try{await Kn.entities.MenuItem.update(n.id,{is_available:u})}catch(I){console.warn("[MenuDrawer] 86-toggle failed:",I?.message||I),Qt.error(`${n.name} not updated â try again`);return}Qt.success(u?`${n.name} restored`:`${n.name} 86'd, hidden across terminals`)},$=p.useMemo(()=>f.filter(n=>n.menu_id===v&&!n.parent_id).sort((n,u)=>(n.sort_order||0)-(u.sort_order||0)),[f,v]),F=i.length>0&&v!=null,J=p.useMemo(()=>{let n=r;if(F){const u=new Set($.map(N=>N.id)),I=new Set($.map(N=>String(N.name).toLowerCase()));if(n=n.filter(N=>u.has(N.menu_group_id)||N.menu_group_id==null&&I.has(String(N.category||"").toLowerCase())),_!=="All"){const N=$.find(L=>String(L.name)===String(_));n=n.filter(L=>L.menu_group_id===N?.id||L.menu_group_id==null&&String(L.category)===String(N?.name))}}else _!=="All"&&(n=n.filter(u=>u.category===_));return g.trim()&&(n=n.filter(u=>u.name?.toLowerCase().includes(g.toLowerCase()))),n},[r,_,g,F,$]),E=n=>R(n);if(!a)return null;const T=h?{position:"absolute",inset:0,zIndex:5,display:"flex"}:{position:"absolute",inset:0,zIndex:15,display:"flex"},te=h||c?{position:"relative",width:"100%",height:"100%",background:t.bgSecondary,display:"flex",flexDirection:"column"}:{position:"relative",width:"min(640px, 88%)",height:"100%",background:t.bgSecondary,borderRight:`1px solid ${t.border}`,boxShadow:t.shadow,display:"flex",flexDirection:"column",animation:"pos-drawer-in 300ms var(--ease-out-quint)"},q=!(h||c);return e.jsxs("div",{style:T,children:[!h&&!c&&e.jsx("div",{onClick:S,style:{position:"absolute",inset:0,background:"rgba(0,0,0,0.4)",animation:"pos-scrim-in 200ms var(--ease-out-quint)"}}),e.jsxs("div",{style:te,children:[e.jsx("style",{children:"@keyframes pos-drawer-in{0%{transform:translateX(-100%)}70%{transform:translateX(1.5%)}100%{transform:translateX(0)}}@keyframes pos-scrim-in{from{opacity:0}to{opacity:1}}@keyframes pos-fade-up{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}"}),e.jsxs("div",{style:{flexShrink:0,display:"flex",alignItems:"center",gap:10,padding:"12px 14px",borderBottom:`1px solid ${t.border}`,...q?{animation:"pos-fade-up 240ms var(--ease-out-quint) both",animationDelay:"30ms"}:{}},children:[e.jsxs("div",{style:{flex:1,display:"flex",alignItems:"center",gap:8,background:t.bgRaised,borderRadius:10,padding:"8px 12px"},children:[e.jsx(fa,{size:16,color:t.textDim}),e.jsx("input",{value:g,onChange:n=>x(n.target.value),placeholder:"Search menuâ¦",style:{flex:1,background:"transparent",border:"none",outline:"none",color:t.text,fontSize:14,fontFamily:"var(--font-inter)"}})]}),e.jsx("button",{onClick:()=>z(!0),style:{height:38,borderRadius:999,border:`1.5px solid ${t.accentBorder}`,background:"transparent",color:t.accent,cursor:"pointer",padding:"0 14px",fontSize:13,fontWeight:800,display:"flex",alignItems:"center",gap:6,fontFamily:"var(--font-inter)"},children:"ï¼ Open Item"}),e.jsx("button",{onClick:S,style:{width:38,height:38,borderRadius:10,border:`1px solid ${t.border}`,background:t.bgRaised,color:t.textMuted,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center"},children:e.jsx(Te,{size:18})})]}),e.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",minHeight:0,...q?{animation:"pos-fade-up 240ms var(--ease-out-quint) both",animationDelay:"60ms"}:{}},children:[e.jsx("div",{style:{flexShrink:0,display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(150px, 1fr))",gap:8,padding:"10px 12px 2px"},children:F?i.map(n=>{const u=v===n.id,I=n.color||jt(n.name);return e.jsx("button",{onClick:()=>{m(n.id),M("All")},style:{height:58,padding:"0 16px",borderRadius:12,cursor:"pointer",border:`2px solid ${I}`,fontWeight:800,fontSize:13.5,letterSpacing:".05em",fontFamily:"var(--font-inter)",textTransform:"uppercase",textAlign:"center",background:u?I:`${I}14`,color:u?"#fff":I,transition:"background 140ms, box-shadow 140ms",boxShadow:u?`0 4px 14px ${I}40`:"none",WebkitTapHighlightColor:"transparent"},children:n.name},n.id)}):e.jsx("button",{onClick:()=>
106M("All"),style:{height:58,borderRadius:12,border:"2px solid #b3261e",background:"#b3261e",color:"#fff",fontWeight:800,fontSize:13.5,letterSpacing:".05em",cursor:"pointer",fontFamily:"var(--font-inter)",textTransform:"uppercase"},children:"FOOD"})}),e.jsx("div",{style:{flexShrink:0,display:"flex",flexWrap:"wrap",gap:6,padding:"8px 12px 6px"},children:["All",...F?$.map(n=>n.name):o].map(n=>{const u=_===n,I=F?$.find(L=>String(L.name)===String(n)):null,N=n==="All"?t.textDim:I?.color||jt(n);return e.jsxs("button",{onClick:()=>M(n),style:{height:42,padding:"0 15px",borderRadius:999,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",gap:7,fontSize:12.5,fontWeight:800,fontFamily:"var(--font-inter)",background:u?t.accentSoft:t.bgRaised,border:`1.5px solid ${u?t.accentBorder:t.border}`,color:u?t.text:t.textMuted,transition:"background 140ms, border-color 140ms",WebkitTapHighlightColor:"transparent"},children:[e.jsx("span",{style:{width:8,height:8,borderRadius:999,background:N,flexShrink:0,boxShadow:n!=="All"?`0 0 0 2px ${N}33`:"none"}}),n]},n)})}),e.jsxs("div",{style:{flex:1,overflowY:"auto",padding:"10px 12px 140px"},className:"no-scrollbar",children:[l==="toast"||l==="traditional"||l==="minimalist"?e.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(118px, 1fr))",gap:8},children:J.map(n=>e.jsxs("button",{onClick:()=>E(n),onContextMenu:u=>{u.preventDefault(),s(n)},style:{minHeight:74,padding:"9px 11px",borderRadius:10,border:`1px solid ${t.border}`,background:t.bgRaised,cursor:"pointer",display:"flex",flexDirection:"column",justifyContent:"space-between",textAlign:"left",fontFamily:"var(--font-inter)"},children:[e.jsx("span",{style:{fontSize:12.5,fontWeight:700,color:t.text,lineHeight:1.25,overflow:"hidden",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical"},children:n.name}),e.jsxs("span",{style:{fontSize:12,fontWeight:800,color:t.accent,fontFamily:"JetBrains Mono, monospace"},children:["$",Number(n.price||0).toFixed(2)]})]},n.id))}):e.jsx("div",{style:{display:"grid",gridTemplateColumns:l==="compact"?"repeat(auto-fill, minmax(104px, 1fr))":"repeat(auto-fill, minmax(130px, 1fr))",gap:l==="compact"?8:10},children:J.map(n=>e.jsx(Vn,{item:n,T:t,onTap:E,onLongPress:()=>s(n)},n.id))}),!J.length&&e.jsx("div",{style:{textAlign:"center",color:t.textDim,fontSize:13,paddingTop:40},children:"No items match"})]})]}),d&&e.jsx(Yn,{T:t,item:d,onCancel:()=>R(null),onConfirm:({mods:n,note:u,qty:I})=>{k(d,n,{note:u,qty:I}),R(null)}}),y&&e.jsx("div",{style:{position:"absolute",inset:0,zIndex:30,background:"rgba(0,0,0,0.5)",display:"flex",alignItems:"center",justifyContent:"center"},onClick:()=>z(!1),children:e.jsxs("div",{onClick:n=>n.stopPropagation(),style:{width:340,background:t.bgTertiary,borderRadius:18,padding:20,boxShadow:t.shadow,border:`1px solid ${t.border}`,fontFamily:"var(--font-inter)",display:"flex",flexDirection:"column",gap:12},children:[e.jsx("div",{style:{fontSize:16,fontWeight:800,color:t.text},children:"Open Item"}),e.jsx("input",{value:j,onChange:n=>H(n.target.value),placeholder:"Item name",autoFocus:!0,style:{height:42,borderRadius:10,border:`1px solid ${t.borderStrong}`,background:t.bgRaised,color:t.text,padding:"0 12px",fontSize:14,outline:"none"}}),e.jsx("input",{value:B,onChange:n=>O(n.target.value),placeholder:"Price",inputMode:"decimal",style:{height:42,borderRadius:10,border:`1px solid ${t.borderStrong}`,background:t.bgRaised,color:t.text,padding:"0 12px",fontSize:14,fontFamily:"JetBrains Mono, monospace",outline:"none"}}),e.jsx("button",{onClick:D,disabled:!j.trim(),style:{height:46,borderRadius:12,border:"none",background:t.accent,color:"#fff",fontWeight:800,cursor:j.trim()?"pointer":"not-allowed",opacity:j.trim()?1:.5,fontFamily:"var(--font-inter)"},children:"Add to bill"})]})}),w&&e.jsx(er,{T:t,item:w,onCancel:()=>s(null),onConfirm:X})]})]})}function ar({itemState:t,onToggle:a,T:r,disabled:o=!1}){const i=t==="held";return e.jsxs("button",{onClick:f=>{f.stopPropagation(),a()},disabled:o,title:i?"Tap to send":"Tap to hold",style:{display:"flex",alignItems:"center",gap:3,padding:"2px 8px",borderRadius:20,fontSize:8.5,fontWeight:700,letterSpacing:"0.04em",border:i?`1px solid ${r.held}44`:`1px solid ${r.sent}33`,background:i?r.heldSoft:"transparent",color:i?r.held:r.sent,cursor:o?"not-allowed":"pointer",flexShrink:0,WebkitTapHighlightColor:"transparent",transition:"background-color 0.12s, color 0.12s, transform 0.12s, border-color 0.12s, opacity 0.12s",opacity:o?.4:.85},children:[i?e.jsx(Za,{size:9}):e.jsx(jn,{size:9}),i?"HOLD":"SEND"]})}function nr(t={}){const a=t?.name||"";return t?.split_label?`${a} (${t.split_label})`:a}const Jt=t=>({draft:{color:t.draft,label:"Draft"},held:{color:t.held,label:"Held"},queued:{color:t.held,label:"Queued"},sent:{color:t.sent,label:"Sent"}}
106);function xt(t){const a=Number(t);if(!Number.isFinite(a)||a<=0)return"1";const r=Math.floor(a),o=a-r;if(Math.abs(o)<.001)return String(r);const i={.125:"1/8",.25:"1/4",.3333333333:"1/3",.375:"3/8",.5:"1/2",.625:"5/8",.6666666667:"2/3",.75:"3/4",.875:"7/8"},f=i[Object.keys(i).find(l=>Math.abs(a-(r+Number(l)))<.01)];return f?`${r||""} ${f}`.trim():String(Math.round(a*100)/100)}function rr({it:t,T:a,trad:r}){const o=(t.modifiers||[]).map(l=>({...l,delta:Number(l.price_delta||0)})).filter(l=>l.name),i=t.special_instructions;if(!o.length&&!i)return null;const f=Number(t.quantity||1);return e.jsxs("div",{style:{marginTop:3,display:"flex",flexDirection:"column",gap:2},children:[o.map((l,h)=>{const c=l.delta*f,S=/^no\b/i.test(l.name)||l.is_negative_extension,k=r&&(S||l.allergy_tone)?a.textRed||a.neg||a.alert:a.textDim;return e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[e.jsx("span",{style:{fontSize:11,color:k,fontWeight:r&&S?700:500,flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:l.name}),(c!==0||l.delta!==0)&&e.jsxs("span",{style:{fontSize:11,color:a.textDim,fontFamily:"JetBrains Mono, monospace",whiteSpace:"nowrap"},children:["$",Math.abs(l.delta).toFixed(2)]}),(c!==0||l.delta!==0)&&e.jsxs("span",{style:{fontSize:11.5,fontWeight:700,color:a.textMuted,fontFamily:"JetBrains Mono, monospace",minWidth:52,textAlign:"right",whiteSpace:"nowrap"},children:["$",c.toFixed(2)]})]},h)}),i&&e.jsxs("div",{style:{fontSize:11,color:a.textDim,fontStyle:"italic"},children:["â",i,"â"]})]})}function ir({it:t,T:a,trad:r,selected:o,prepStatus:i,onToggle:f,onQty:l,onVoid:h,onActions:c,onHoldSend:S}){const k=t.item_state==="voided",_=Jt(a)[t.item_state]||Jt(a).draft,M=t.item_state==="held",v=t.item_state==="draft"||t.item_state==="held",m=i==="ready"?a.sent:i==="preparing"?a.draft:i==="delayed"?a.alert:a.textDim,g=["#34d399","#60a5fa","#f472b6","#fbbf24","#a78bfa","#fb923c"],x=t.seat_number?g[(t.seat_number-1)%g.length]:null,d=Number(t.quantity||1),R=Number(t.unit_price||0),w=(R+(t.modifiers||[]).reduce((s,y)=>s+(Number(y.price_delta)||0),0))*d;if(k){const s=a.textRed||a.neg||a.alert;return e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,padding:"8px 12px",borderRadius:6,border:`1px dashed ${a.borderStrong}`,marginBottom:6,opacity:.7,background:a.bgSecondary},children:[e.jsx("span",{style:{flex:1,minWidth:0,fontSize:12.5,fontWeight:700,color:a.textDim,textDecoration:"line-through",textDecorationColor:s,textDecorationThickness:1.5,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:nr(t)}),e.jsx("span",{style:{flexShrink:0,fontSize:9,fontWeight:800,color:s,textTransform:"uppercase",letterSpacing:"0.05em"},children:"Voided"}),e.jsxs("span",{style:{flexShrink:0,fontSize:12,fontWeight:700,color:a.textDim,fontFamily:"JetBrains Mono, monospace"},children:["Ã",xt(d)]})]})}return e.jsxs("div",{onClick:()=>f(t.line_id),style:{display:"flex",alignItems:"center",gap:10,padding:"10px 12px",borderRadius:12,cursor:"pointer",background:M?a.heldSoft:o?a.accentSoft:a.bgRaised,borderLeft:`3px solid ${_.color}`,border:`1px solid ${M?`${a.held}55`:o?a.accentBorder:"transparent"}`,marginBottom:6,opacity:M?.75:1,transition:"opacity 0.15s"},children:[t.item_state==="draft"||t.item_state==="held"?e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:3},onClick:s=>s.stopPropagation(),children:[e.jsx("button",{onClick:()=>l(t.line_id,Math.max(1,d-1)),style:yt(a),children:e.jsx(Mt,{size:13})}),e.jsx("span",{style:{width:30,textAlign:"center",fontSize:12.5,fontWeight:800,color:a.text,fontFamily:"JetBrains Mono, monospace"},children:xt(d)}),e.jsx("button",{onClick:()=>l(t.line_id,d+1),style:yt(a),children:e.jsx(Oe,{size:13})})]}):e.jsx("span",{style:{minWidth:26,height:22,padding:"0 5px",borderRadius:6,textAlign:"center",display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:12,fontWeight:800,color:a.text,fontFamily:"JetBrains Mono, monospace",background:a.bgTertiary,border:`1px solid ${a.borderStrong}`},children:xt(d)}),e.jsxs("div",{style:{flex:1,minWidth:0},onDoubleClick:s=>
106{s.stopPropagation(),c?.(t)},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:7},children:[x&&e.jsxs("span",{title:`Seat ${t.seat_number}`,style:{flexShrink:0,display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:20,height:18,padding:"0 5px",borderRadius:6,fontSize:10,fontWeight:800,background:`${x}22`,color:x,border:`1px solid ${x}55`},children:["S",t.seat_number]}),e.jsx("span",{style:{fontSize:13.5,fontWeight:700,color:M?a.held:a.text,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:t.split_label?`${t.name} (${t.split_label})`:t.name}),(t.item_state==="sent"||t.item_state==="queued")&&e.jsx("span",{style:{fontSize:9,fontWeight:800,color:_.color,textTransform:"uppercase",letterSpacing:"0.04em"},children:_.label}),t.via_qr&&e.jsxs("span",{title:"Ordered via QR",style:{flexShrink:0,display:"inline-flex",alignItems:"center",gap:2,height:16,padding:"0 5px",borderRadius:5,fontSize:8.5,fontWeight:800,background:`${a.paid}1f`,color:a.paid,border:`1px solid ${a.paid}44`,textTransform:"uppercase"},children:[e.jsx(ua,{size:9})," QR"]}),t.item_dining_option&&t.item_dining_option!=="inherit"&&e.jsx("span",{style:{fontSize:8.5,fontWeight:800,color:a.paid,background:a.paidSoft,padding:"2px 6px",borderRadius:999,textTransform:"uppercase"},children:t.item_dining_option==="takeout"?"To-Go":"Dine In"}),t.item_state==="sent"&&i&&e.jsx("span",{style:{width:7,height:7,borderRadius:"50%",background:m},title:i})]}),e.jsx(rr,{it:t,T:a,trad:r})]}),v&&e.jsx(ar,{itemState:t.item_state,onToggle:()=>S?.(t.line_id),T:a}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,justifyContent:"flex-end"},children:[Math.abs(w-R)>.004&&e.jsxs("span",{style:{fontSize:12,color:a.textDim,fontFamily:"JetBrains Mono, monospace",minWidth:50,textAlign:"right"},children:["$",R.toFixed(2)]}),e.jsxs("span",{style:{fontSize:13.5,fontWeight:800,color:a.text,fontFamily:"JetBrains Mono, monospace",minWidth:56,textAlign:"right"},children:["$",w.toFixed(2)]})]}),e.jsx("button",{onClick:s=>{s.stopPropagation(),c?.(t)},title:"Item actions",style:{...yt(a)},children:e.jsx(xa,{size:14})})]})}const yt=t=>({width:26,height:26,borderRadius:8,border:`1px solid ${t.border}`,background:t.bgTertiary,color:t.textMuted,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0});function or({T:t,items:a=[],selectedIds:r=new Set,prepByLine:o={},onToggle:i,onQty:f,onVoid:l,onActions:h,onHoldSend:c}){const S=t?.skin==="traditional";if(!a.length)return e.jsx("div",{style:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:30,textAlign:"center",color:t.textDim},children:e.jsx("div",{style:{fontSize:13,fontWeight:600,color:t.textMuted,maxWidth:220},children:"Tap menu items or use search to build this check"})});const k=v=>v.menu_group_name||v.category||v.course||null,_=[],M=new Map;return a.forEach(v=>{const m=k(v)||"Other";let g=M.get(m);g==null&&(g=_.length,M.set(m,g),_.push({header:m,list:[]})),_[g].list.push(v)}),e.jsx("div",{style:{flex:1,overflowY:"auto",padding:"10px 12px"},className:"no-scrollbar",children:_.map(({header:v,list:m})=>e.jsxs("div",{style:{marginBottom:8},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,margin:"8px 2px 7px"},children:[e.jsx("span",{style:{fontSize:11,fontWeight:800,letterSpacing:"0.09em",textTransform:"uppercase",color:t.textDim,whiteSpace:"nowrap"},children:v}),e.jsx("span",{style:{flex:1,height:1,background:t.border}})]}),m.map(g=>e.jsx(ir,{it:g,T:t,trad:S,selected:r.has(g.line_id),prepStatus:o[g.line_id],onToggle:i,onQty:f,onVoid:l,onActions:h,onHoldSend:c},g.line_id))]},v))})}const wt=[{key:"dine_in",label:"Dine In",icon:_a,tone:"#34d399"},{key:"takeout",label:"Takeout",icon:Nn,tone:"#60a5fa"},{key:"curbside",label:"Curbside",icon:en,tone:"#fbbf24"},{key:"drive_thru",label:"Drive-Thru",icon:fn,tone:"#f472b6"},{key:"delivery",label:"Delivery",icon:An,tone:"#a78bfa"}],sr=t=>wt.find(a=>a.key===t)||wt[0];function lr({T:t,txn:a,onClose:r,onTransfer:o,onReprint:i,onPrint:f,onRecovery:l,onVoid:h,onChangeCustomer:c,onPromo:S,onTaxExempt:k,onSchedule:_,onSplit:M,onAssignTable:v}){const m=(a.items||[]).some(y=>y.item_state==="sent"),g=(a.items||[]).some(y=>y.item_state!=="voided"),x=a.state==="PAID"||a.payment_status==="paid",d=!!a.tax_exempt,s=[(a.order_type||a.dining_option)==="dine_in"&&a.table_id==null&&!!v&&!x&&{key:"assign",label:"Assign table",icon:Ka,on:()=>v?.()},{key:"split",label:"Split check",icon:$n,disabled:!g||x,on:()=>M?.()},{key:"transfer",label:"Transfer to table",icon:sn,on:()=>o?.()},{key:"customer",label:"Change customer",icon:Fn,on:()=>c?.()},{key:"schedule",label:"Schedule",icon:Ua,on:()=>_?.()},{key:"tax",label:d?"Remove tax exemption":"Tax exempt",icon:tn,on:()=>k?.(!d)},...f?[{key:"print",label:"Print check",icon:qt,disabled:!g,on:()=>f?.()}]:[],{key:"reprint",label:"Reprint kitchen ticket",icon:qt,disabled:!m,on:()=>i?.()},...l?[{key:"recovery",label:"Service recovery",icon:Cn,on:()=>l?.()}]:[],{key:"promo",label:"Promo code",icon:pn,on:()=>S?.()},{key:"void",label:"Void order",icon:ha,danger:!0,disabled:x,on:()=>h?.()}
106].filter(Boolean);return e.jsx("div",{onClick:r,style:dr,children:e.jsxs("div",{onClick:y=>y.stopPropagation(),className:"animate-spring-in",style:cr(t),children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"14px 16px",borderBottom:`1px solid ${t.border}`},children:[e.jsxs("span",{style:{fontSize:15,fontWeight:800,color:t.text},children:["Order ",a.order_number?`#${a.order_number}`:""]}),e.jsx("button",{onClick:r,style:pr(t),children:e.jsx(Te,{size:16})})]}),e.jsx("div",{style:{padding:8,maxHeight:"70vh",overflowY:"auto"},children:s.map(y=>{const z=y.icon,j=y.danger?t.alert:t.text;return e.jsxs("button",{disabled:y.disabled,onClick:()=>{y.on(),r()},style:{width:"100%",display:"flex",alignItems:"center",gap:12,height:48,padding:"0 12px",borderRadius:11,background:"transparent",border:"none",cursor:y.disabled?"not-allowed":"pointer",opacity:y.disabled?.4:1,color:j,fontSize:14.5,fontWeight:700,fontFamily:"var(--font-inter)",textAlign:"left"},children:[e.jsx(z,{size:18,style:{color:y.danger?t.alert:t.textMuted,flexShrink:0}})," ",y.label]},y.key)})})]})})}const dr={position:"fixed",inset:0,zIndex:60,background:"rgba(0,0,0,0.5)",display:"flex",alignItems:"center",justifyContent:"center",fontFamily:"var(--font-inter)"},cr=t=>({width:"min(360px, 92%)",background:t.bgTertiary,borderRadius:18,overflow:"hidden",boxShadow:t.shadow,border:`1px solid ${t.border}`}),pr=t=>({width:32,height:32,borderRadius:9,border:`1px solid ${t.border}`,background:t.bgRaised,color:t.textMuted,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center"});function ur({T:t,txn:a,engine:r,onClose:o,onTransfer:i,onReprint:f,onPrint:l,onRecovery:h,onVoid:c,onChangeCustomer:S,onPromo:k,onTaxExempt:_,onSchedule:M,onSplit:v,onAssignTable:m}){const[g,x]=p.useState(!1),[d,R]=p.useState(!1),w=a.order_type||a.dining_option||"dine_in",s=sr(w),y=s.icon,z=w==="dine_in",j=z&&a.table_number!=null,H=a.customer_name||(j?`Table ${a.table_number}`:s.label),B=$=>r.setField("guest_count",Math.max(1,$)),O=r?.isFieldLocked?.("order_type")??!!a.context_locked,D=z?j?` · Table ${a.table_number}`:" · No Table":w==="curbside"&&a.curbside_spot?` · Spot ${a.curbside_spot}`:"",X=w==="curbside"?[a.vehicle_info,a.ready_time&&`Ready ${a.ready_time}`].filter(Boolean).join(" · "):w==="takeout"?a.ready_time?`Ready ${a.ready_time}`:"":w==="delivery"?[a.delivery_address,a.delivery_time&&`ETA ${a.delivery_time}`].filter(Boolean).join(" · "):w==="drive_thru"&&a.drive_thru_lane?`Lane ${a.drive_thru_lane}`:"";return e.jsxs("div",{style:{flexShrink:0,padding:"10px 12px",borderBottom:`1px solid ${t.border}`,position:"relative"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[o&&e.jsx("button",{onClick:o,title:"Close check (Esc)",style:Zt(t),children:e.jsx(Te,{size:16})}),a.order_number&&e.jsxs("span",{style:{fontSize:14,fontWeight:800,color:t.text},children:["#",a.order_number]}),e.jsx("span",{style:{fontSize:14.5,fontWeight:700,color:a.customer_name?t.text:t.textDim,flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:H}),e.jsx("button",{onClick:()=>x(!0),title:"More options",style:Zt(t),children:e.jsx(xa,{size:17})})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginTop:10,flexWrap:"wrap"},children:[e.jsxs("button",{onClick:()=>{O||R($=>!$)},title:O?"Order type is locked for this check":"Change order type",style:{display:"inline-flex",alignItems:"center",gap:6,height:32,padding:"0 11px",borderRadius:999,cursor:O?"default":"pointer",background:`${s.tone}1f`,border:`1px solid ${s.tone}55`,color:s.tone,fontSize:12.5,fontWeight:800,fontFamily:"var(--font-inter)"},children:[e.jsx(y,{size:14})," ",s.label,D,!O&&e.jsx(ba,{size:13,style:{opacity:.7}})]}),z&&e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:5},children:[e.jsx("button",{onClick:()=>B((a.guest_count||1)-1),style:ea(t),children:e.jsx(Mt,{size:12})}),e.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:4,fontSize:12.5,fontWeight:700,color:t.textMuted},children:[e.jsx(Va,{size:13})," ",a.guest_count||1]}),e.jsx("button",{onClick:()=>B((a.guest_count||1)+1),style:ea(t),children:e.jsx(Oe,{size:12})})]}),a.server_name&&e.jsx("span",{style:{marginLeft:"auto",fontSize:11.5,color:t.textDim,fontWeight:600},children:a.server_name})]}),X&&e.jsx("div",{style:{marginTop:6,fontSize:11.5,color:t.textMuted,fontWeight:600},children:X}),!O&&d&&e.jsxs(e.Fragment,{children:[e.jsx("div",{onClick:()=>R(!1),style:{position:"fixed",inset:0,zIndex:49}}),e.jsx("div",{style:{position:"absolute",top:78,left:12,zIndex:50,width:200,padding:6,borderRadius:13,background:t.bgTertiary,border:`1px solid ${t.borderStrong}`,boxShadow:t.shadow},children:wt.map($=>{const F=$.icon,J=$.key===w;return e.jsxs("button",{onClick:()=>{r.setField("dining_option",$.key),R(!1)},style:{width:"100%",display:"flex",alignItems:"center",gap:10,height:40,padding:"0 10px",borderRadius:9,cursor:"pointer",background:J?`${$.tone}
1061f`:"transparent",border:"none",color:J?$.tone:t.text,fontSize:13.5,fontWeight:700,fontFamily:"var(--font-inter)"},children:[e.jsx(F,{size:16,style:{color:$.tone}})," ",$.label]},$.key)})})]}),g&&e.jsx(lr,{T:t,txn:a,onClose:()=>x(!1),onTransfer:i,onReprint:f,onPrint:l,onRecovery:h,onVoid:c,onChangeCustomer:S,onPromo:k,onTaxExempt:_,onSchedule:M,onSplit:v,onAssignTable:m})]})}const Zt=t=>({width:32,height:32,borderRadius:9,border:`1px solid ${t.borderStrong}`,background:t.bgRaised,color:t.textMuted,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0}),ea=t=>({width:26,height:26,borderRadius:8,border:`1px solid ${t.border}`,background:t.bgRaised,color:t.textMuted,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center"}),gr=[{id:"70a1a2ab-413b-46f4-b58f-5f285245aeba",name:"FOOD",color:"#b3261e",sort_order:0},{id:"5897381e-909d-4ffd-963d-180a209c15b6",name:"DRINKS",color:"#1565c0",sort_order:1},{id:"71d5622d-e738-4684-af80-cd17075e7638",name:"BREAKFAST",color:"#c98a1a",sort_order:2},{id:"81e82e95-8a16-4449-9cec-abb402eae0fd",name:"HAPPY HOUR",color:"#8a5a2b",sort_order:3},{id:"bab0026d-1574-450c-845a-e8f409989eb6",name:"LATE NIGHT",color:"#3b3a4a",sort_order:4}],fr=[{id:"0fb7b176-45f3-4370-a44f-3fa4467cffdb",menu_id:"81e82e95-8a16-4449-9cec-abb402eae0fd",name:"Happy Hour Specials",color:null,sort_order:0},{id:"96b8c70a-4425-4ac8-9075-b1d2beafc034",menu_id:"70a1a2ab-413b-46f4-b58f-5f285245aeba",name:"Bowls",color:null,sort_order:1},{id:"af9f5f6c-1b46-4563-a033-6757918e3627",menu_id:"5897381e-909d-4ffd-963d-180a209c15b6",name:"Beer",color:null,sort_order:1},{id:"584de34c-bf25-4ffc-921e-174b76835301",menu_id:"70a1a2ab-413b-46f4-b58f-5f285245aeba",name:"Burgers",color:null,sort_order:2},{id:"3f7e6a70-023c-454b-8838-b100c23bf567",menu_id:"5897381e-909d-4ffd-963d-180a209c15b6",name:"Cocktails",color:null,sort_order:2},{id:"66af3190-be82-4917-9005-d6866377fcf6",menu_id:"70a1a2ab-413b-46f4-b58f-5f285245aeba",name:"Desserts",color:null,sort_order:3},{id:"df04dcaf-05d1-45d3-8d70-5f53bc9b0df9",menu_id:"5897381e-909d-4ffd-963d-180a209c15b6",name:"Non-Alcoholic",color:null,sort_order:3},{id:"2556f527-0ba0-49df-9d86-d86821c79da6",menu_id:"70a1a2ab-413b-46f4-b58f-5f285245aeba",name:"Greens",color:null,sort_order:4},{id:"be91fa04-cdc4-4341-a39e-7e0bf9d5dfc2",menu_id:"5897381e-909d-4ffd-963d-180a209c15b6",name:"Wine",color:null,sort_order:4},{id:"97c8ef25-dd9f-4856-92a3-fcb2394b55d4",menu_id:"70a1a2ab-413b-46f4-b58f-5f285245aeba",name:"Mains",color:null,sort_order:5},{id:"d3c8c8c8-c89f-4017-b137-152d80ac9f19",menu_id:"70a1a2ab-413b-46f4-b58f-5f285245aeba",name:"Pasta",color:null,sort_order:6},{id:"251ead9e-07a0-467e-80c9-f413f5b308f8",menu_id:"70a1a2ab-413b-46f4-b58f-5f285245aeba",name:"Sides",color:null,sort_order:7},{id:"494aa305-08b8-4cb3-b238-604bbf0e6644",menu_id:"70a1a2ab-413b-46f4-b58f-5f285245aeba",name:"Start + Share",color:null,sort_order:8},{id:"3fe24d3a-329a-460a-9797-da57df639528",menu_id:"70a1a2ab-413b-46f4-b58f-5f285245aeba",name:"Steaks",color:null,sort_order:9},{id:"6721acb5-bcfc-4238-ad1a-44d747415a0b",menu_id:"70a1a2ab-413b-46f4-b58f-5f285245aeba",name:"Sushi",color:null,sort_order:10}],ta=[{id:"b1c8d35b-ac2a-4a11-bf7f-85282b644a07",name:"Chocolate PB Crunch Bar",price:12,category:"Desserts",menu_group_id:"66af3190-be82-4917-9005-d6866377fcf6",menu_group_name:"Desserts",is_available:!0,image_url:"/images/app/menu/chocolate-pb-crunch-bar.webp"},{id:"0a85dabb-e7d1-4498-b401-313d9dfa56e6",name:"Chargrilled Steak â 12oz",price:48.25,category:"Steaks",menu_group_id:"3fe24d3a-329a-460a-9797-da57df639528",menu_group_name:"Steaks",is_available:!0,image_url:"/images/app/menu/chargrilled-steak-12oz.webp"},{id:"4e7b0320-8156-406e-96f9-439c37019bdd",name:"Avocado Kale Salad",price:18.25,category:"Greens",menu_group_id:"2556f527-0ba0-49df-9d86-d86821c79da6",menu_group_name:"Greens",is_available:!0,image_url:"/images/app/menu/avocado-kale-salad.webp"},{id:"7714871f-789c-40ee-987c-eb766c305096",name:"Coca-Cola",price:3,category:"Non-Alcoholic",menu_group_id:"df04dcaf-05d1-45d3-8d70-5f53bc9b0df9",menu_group_name:"Non-Alcoholic",is_available:!0,image_url:"/images/app/menu/coca-cola.webp"},{id:"a9e29486-c365-4982-86e7-0bf8ef0cbc47",name:"Butternut Squash Ravioli + Prawns",price:31.75,category:"Pasta",menu_group_id:"d3c8c8c8-c89f-401
1067-b137-152d80ac9f19",menu_group_name:"Pasta",is_available:!0,image_url:"/images/app/menu/butternut-squash-ravioli-prawns.webp"},{id:"6d0740fb-41c3-4505-9e8f-a6577fe63d8e",name:"Aperol Spritz",price:16,category:"Cocktails",menu_group_id:"3f7e6a70-023c-454b-8838-b100c23bf567",menu_group_name:"Cocktails",is_available:!0,image_url:"/images/app/menu/aperol-spritz.webp"},{id:"ce11fb03-a7c0-4ee4-a923-c31e4e764ffd",name:"Crispy Tofu Bowl",price:24,category:"Bowls",menu_group_id:"96b8c70a-4425-4ac8-9075-b1d2beafc034",menu_group_name:"Bowls",is_available:!0,image_url:"/images/app/menu/crispy-tofu-bowl.webp"},{id:"83f1f705-5244-489c-8b93-32b432997446",name:"Happy Hour Chicken Wings",price:12,category:"Happy Hour",menu_group_id:"0fb7b176-45f3-4370-a44f-3fa4467cffdb",menu_group_name:"Happy Hour Specials",is_available:!0,image_url:"/images/app/menu/happy-hour-chicken-wings.webp"},{id:"33f614e3-2654-4d2f-8c26-2264707e9844",name:"Blackened Creole Chicken",price:29.75,category:"Mains",menu_group_id:"97c8ef25-dd9f-4856-92a3-fcb2394b55d4",menu_group_name:"Mains",is_available:!0,image_url:"/images/app/menu/blackened-creole-chicken.webp"},{id:"16dfe542-31c9-4fa9-a284-76ef0f2ecaa6",name:"Coors Light (tap)",price:8.5,category:"Beer",menu_group_id:"af9f5f6c-1b46-4563-a033-6757918e3627",menu_group_name:"Beer",is_available:!0,image_url:"/images/app/menu/coors-light-tap.webp"},{id:"59fc8cdd-e753-4eb9-8a54-6558f7cb66a6",name:"Champagne / Prosecco",price:14,category:"Wine",menu_group_id:"be91fa04-cdc4-4341-a39e-7e0bf9d5dfc2",menu_group_name:"Wine",is_available:!0,image_url:"/images/app/menu/champagne-prosecco.webp"},{id:"fee2716a-fbe9-427f-a064-20ccbd508c35",name:"Avocado Dip",price:14.25,category:"Start + Share",menu_group_id:"494aa305-08b8-4cb3-b238-604bbf0e6644",menu_group_name:"Start + Share",is_available:!0,image_url:"/images/app/menu/avocado-dip.webp"},{id:"7d1e4930-9641-4947-a8bf-1b3e24ca59e6",name:"Baja Fish Tacos",price:19.75,category:"Burgers",menu_group_id:"584de34c-bf25-4ffc-921e-174b76835301",menu_group_name:"Burgers",is_available:!0,image_url:"/images/app/menu/baja-fish-tacos.webp"},{id:"320a1569-7e30-4721-824d-a86307c32ae3",name:"Hamachi Sashimi",price:22,category:"Sushi",menu_group_id:"6721acb5-bcfc-4238-ad1a-44d747415a0b",menu_group_name:"Sushi",is_available:!0,image_url:"/images/app/menu/hamachi-sashimi.webp"},{id:"76866b8b-9420-4dab-a021-f313c189ad4a",name:"Rigatoni Bolognese",price:24.75,category:"Pasta",menu_group_id:"d3c8c8c8-c89f-4017-b137-152d80ac9f19",menu_group_name:"Pasta",is_available:!0,image_url:"/images/app/menu/rigatoni-bolognese.webp"},{id:"6fb24b1e-bd3c-4ebf-af17-a52107079170",name:"BBQ Chicken Club",price:21.5,category:"Burgers",menu_group_id:"584de34c-bf25-4ffc-921e-174b76835301",menu_group_name:"Burgers",is_available:!0,image_url:"/images/app/menu/bbq-chicken-club.webp"},{id:"15e7aa65-1ac2-4ec3-a6c5-6ed14b7f2d2c",name:"Fresh Greens",price:5.75,category:"Sides",menu_group_id:"251ead9e-07a0-467e-80c9-f413f5b308f8",menu_group_name:"Sides",is_available:!0,image_url:"/images/app/menu/fresh-greens.webp"},{id:"4a04c152-67c8-4ff4-a099-713f94d2583e",name:"Chargrilled Steak â 8oz",price:35.25,category:"Steaks",menu_group_id:"3fe24d3a-329a-460a-9797-da57df639528",menu_group_name:"Steaks",is_available:!0,image_url:"/images/app/menu/chargrilled-steak-8oz.webp"},{id:"55878a90-636f-40c6-b2ef-ee50f5158ace",name:"Corona",price:9,category:"Beer",menu_group_id:"af9f5f6c-1b46-4563-a033-6757918e3627",menu_group_name:"Beer",is_available:!0,image_url:"/images/app/menu/corona.webp"},{id:"60579680-80a1-464f-9c98-e167862ffad1",name:"Crab Cake Frites",price:36.25,category:"Mains",menu_group_id:"97c8ef25-dd9f-4856-92a3-fcb2394b55d4",menu_group_name:"Mains",is_available:!0,image_url:"/images/app/menu/crab-cake-frites.webp"},{id:"dbbc3d0b-0d8a-414b-a098-e2f0c5c1e6db",name:"House Cabernet Sauvignon",price:15,category:"Wine",menu_group_id:"be91fa04-cdc4-4341-a39e-7e0bf9d5dfc2",menu_group_name:"Wine",is_available:!0,image_url:"/images/app/menu/house-cabernet-sauvignon.webp"},{id:"56a2caa6-6b33-459a-9e27-cca8ea4421ac",name:"Burrata",price:28.25,
106category:"Start + Share",menu_group_id:"494aa305-08b8-4cb3-b238-604bbf0e6644",menu_group_name:"Start + Share",is_available:!0,image_url:"/images/app/menu/burrata.webp"},{id:"aeee6c65-cff4-4dd1-ae20-6e176fccea74",name:"Dasani Water",price:3,category:"Non-Alcoholic",menu_group_id:"df04dcaf-05d1-45d3-8d70-5f53bc9b0df9",menu_group_name:"Non-Alcoholic",is_available:!0,image_url:"/images/app/menu/dasani-water.webp"},{id:"87c2bc99-c5dc-4e8a-b4dd-c8ef030b4134",name:"Happy Hour House Wine",price:5,category:"Happy Hour",menu_group_id:"0fb7b176-45f3-4370-a44f-3fa4467cffdb",menu_group_name:"Happy Hour Specials",is_available:!0,image_url:"/images/app/menu/happy-hour-house-wine.webp"},{id:"27bd3379-5a4f-4272-a7c0-658f1260e156",name:"Lemongrass Noodle Salad",price:23.75,category:"Greens",menu_group_id:"2556f527-0ba0-49df-9d86-d86821c79da6",menu_group_name:"Greens",is_available:!0,image_url:"/images/app/menu/lemongrass-noodle-salad.webp"},{id:"3dd09bcd-251e-4d70-a3a2-d61cb1b6b9d6",name:"Classic Margarita",price:17,category:"Cocktails",menu_group_id:"3f7e6a70-023c-454b-8838-b100c23bf567",menu_group_name:"Cocktails",is_available:!0,image_url:"/images/app/menu/classic-margarita.webp"},{id:"60300789-5267-4190-82f3-e1a0fb4bab25",name:"Med Bowl",price:20,category:"Bowls",menu_group_id:"96b8c70a-4425-4ac8-9075-b1d2beafc034",menu_group_name:"Bowls",is_available:!0,image_url:"/images/app/menu/med-bowl.webp"},{id:"b0097d34-fd41-4766-8258-4c44fa366c82",name:"Calamari",price:18.75,category:"Start + Share",menu_group_id:"494aa305-08b8-4cb3-b238-604bbf0e6644",menu_group_name:"Start + Share",is_available:!0,image_url:"/images/app/menu/calamari.webp"},{id:"43d02036-4181-4026-b7a4-40a035d78a75",name:"Happy Hour Local Beer",price:6,category:"Happy Hour",menu_group_id:"0fb7b176-45f3-4370-a44f-3fa4467cffdb",menu_group_name:"Happy Hour Specials",is_available:!0,image_url:"/images/app/menu/happy-hour-local-beer.webp"},{id:"7ccf6314-8bfa-40e0-9916-f9da1cb40d31",name:"New York Cheesecake",price:12,category:"Desserts",menu_group_id:"66af3190-be82-4917-9005-d6866377fcf6",menu_group_name:"Desserts",is_available:!0,image_url:"/images/app/menu/new-york-cheesecake.webp"},{id:"0adeee1a-2401-4532-96fe-949d15dc09ec",name:"Spaghetti Portofino",price:26.75,category:"Pasta",menu_group_id:"d3c8c8c8-c89f-4017-b137-152d80ac9f19",menu_group_name:"Pasta",is_available:!0,image_url:"/images/app/menu/spaghetti-portofino.webp"},{id:"b8d3ef20-ff5a-406f-b52f-65fa6ccea062",name:"Diet Coca-Cola",price:3,category:"Non-Alcoholic",menu_group_id:"df04dcaf-05d1-45d3-8d70-5f53bc9b0df9",menu_group_name:"Non-Alcoholic",is_available:!0,image_url:"/images/app/menu/diet-coca-cola.webp"},{id:"7117175b-0a5d-45bd-a0f8-2b9a88bc9885",name:"Fajitas",price:24.75,category:"Mains",menu_group_id:"97c8ef25-dd9f-4856-92a3-fcb2394b55d4",menu_group_name:"Mains",is_available:!0,image_url:"/images/app/menu/fajitas.webp"},{id:"fc15d0d0-5a51-43ca-a350-5f1dbd5e9a72",name:"Salmon Aburi Roll",price:20.75,category:"Sushi",menu_group_id:"6721acb5-bcfc-4238-ad1a-44d747415a0b",menu_group_name:"Sushi",is_available:!0,image_url:"/images/app/menu/salmon-aburi-roll.webp"},{id:"935acecf-ad29-46c5-98aa-00567bfd6486",name:"Cajun Chicken Sandwich",price:22,category:"Burgers",menu_group_id:"584de34c-bf25-4ffc-921e-174b76835301",menu_group_name:"Burgers",is_available:!0,image_url:"/images/app/menu/cajun-chicken-sandwich.webp"},{id:"f69924a8-5f3f-4857-a691-4a7818259297",name:"Creole Steak + Prawns â 8oz",price:44.75,category:"Steaks",menu_group_id:"3fe24d3a-329a-460a-9797-da57df639528",menu_group_name:"Steaks",is_available:!0,image_url:"/images/app/menu/creole-steak-prawns-8oz.webp"},{id:"6a0522bd-a150-4a46-a99c-fd3c011ea136",name:"Teriyaki Chicken Rice Bowl",price:23,category:"Bowls",menu_group_id:"96b8c70a-4425-4ac8-9075-b1d2beafc034",menu_group_name:"Bowls",is_available:!0,image_url:"/images/app/menu/teriyaki-chicken-rice-bowl.webp"},{id:"f24285e7-61ee-4384-85bd-504e41a2fa36",name:"Craft IPA (tap)",price:10,category:"Beer",menu_group_id:"af9f5f6c-1b46-4563-a033-6757918e3627",menu_group_name:"Beer",is_available:!0,image_url:"/images/app/menu/craft-ipa-tap.webp"},{id:"48ebb8c9-ece6-4fbe-b68a-d1d5cc9ccb9f",name:"House Pinot Grigio",price:13,category:"Wine",menu_group_id:"be91fa04-cdc4-4341-a39e-7e0bf9d5dfc2",menu_group_name:"Wine",is_available:!0,image_url:"/images/app/menu/house-pinot-grigio.webp"},{id:"ab327d75-4aa2-4a63-8cfc-fa92cb37aef1",name:"Raincoast Greens",price:22.5,category:"Greens",menu_group_id:"2556f527-0ba0-49df-9d86-d86821c79da6",menu_group_name:"Greens",is_available:!0,image_url:"/images/app/menu/raincoast-greens.webp"},{id:"9671f502-d407-4d60-b34b-7ff7cb014317",name:"Kale Salad (side)",price:5.75,category:"Sides",menu_group_id:"251ead9e-07a0-467e-80c9-f413f5b308f8",menu_group_name:"Sides",is_available:!0,image_url:"/images/app/menu/kale-salad-side.webp"},{id:"e081e564-77b2-4517-ac49-bb2a1df3a6fb",name:"Classic Mojito",price:15,category:"Cocktails",menu_group_id:"3f7e6a70-023c-454b-8838-b100c23bf567",menu_group_name:"Cocktails",is_available:!0,image_url:"/images/app/menu/classic-mojito.webp"},{id:"2827f50f-55dd-4ef9-8e62-8b1f3b9d649f",name:"Six Layer Chocolate Slice",price:18,category:"Desserts",menu_group_id:"66af3190-be82-4917-9005-d6866377fcf6",menu_group_name:"Desserts",is_available:!0,image_url:"/images/app/menu/six-layer-chocolate-slice.webp"},{id:"57bd2836-185a-49df-86c4-7502bd0c7bab",name:"Heineken",price:9,category:"Beer",menu_group_id:"af9f5f6c-1b46-4563-a033-6757918e3627",menu_group_name:"Beer",is_available:!0,image_url:"/images/app/menu/heineken.webp"},{id:"29071ca6-abcf-4a12-9128-25246c910183",name:"Happy Hour Select Cocktails",price:7,category:"Happy Hour",menu_group_id:"0fb7b176-45f3-4370-a44f-3fa4467cffdb",menu_group_name:"Happy Hour Specials",is_available:!0,image_url:"/images/app/menu/happy-hour-select-cocktails.webp"}
106,{id:"b81a3802-c6fa-4942-9808-007bfddf5f39",name:"Sea Salted Fries",price:5,category:"Sides",menu_group_id:"251ead9e-07a0-467e-80c9-f413f5b308f8",menu_group_name:"Sides",is_available:!0,image_url:"/images/app/menu/sea-salted-fries.webp"},{id:"c5fccec6-40c3-4b61-a352-e54023b7fa07",name:"Grilled Dijon Salmon",price:31.75,category:"Mains",menu_group_id:"97c8ef25-dd9f-4856-92a3-fcb2394b55d4",menu_group_name:"Mains",is_available:!0,image_url:"/images/app/menu/grilled-dijon-salmon.webp"},{id:"a3dd6286-0e27-42b0-9151-370b4d013c97",name:"Chicken Wings",price:19.5,category:"Start + Share",menu_group_id:"494aa305-08b8-4cb3-b238-604bbf0e6644",menu_group_name:"Start + Share",is_available:!0,image_url:"/images/app/menu/chicken-wings.webp"},{id:"b0bcff73-7459-4e4f-a720-003b857bf71d",name:"Cheddar Bacon Burger",price:23.75,category:"Burgers",menu_group_id:"584de34c-bf25-4ffc-921e-174b76835301",menu_group_name:"Burgers",is_available:!0,image_url:"/images/app/menu/cheddar-bacon-burger.webp"},{id:"ac7c3a3e-4e3c-48eb-b4e5-b8ae694e578e",name:"House Pinot Noir",price:14,category:"Wine",menu_group_id:"be91fa04-cdc4-4341-a39e-7e0bf9d5dfc2",menu_group_name:"Wine",is_available:!0,image_url:"/images/app/menu/house-pinot-noir.webp"},{id:"2acb0296-8f69-4fb4-811d-d9be6fcd0395",name:"Tuna Poke Bowl",price:25.75,category:"Bowls",menu_group_id:"96b8c70a-4425-4ac8-9075-b1d2beafc034",menu_group_name:"Bowls",is_available:!0,image_url:"/images/app/menu/tuna-poke-bowl.webp"},{id:"6f54a51b-41bc-4f7e-ac78-f64b2d704873",name:"Cosmopolitan",price:16,category:"Cocktails",menu_group_id:"3f7e6a70-023c-454b-8838-b100c23bf567",menu_group_name:"Cocktails",is_available:!0,image_url:"/images/app/menu/cosmopolitan.webp"},{id:"1422b52c-8ab2-4a10-bf69-4a05b0f8557c",name:"Heineken 0.0",price:6.75,category:"Non-Alcoholic",menu_group_id:"df04dcaf-05d1-45d3-8d70-5f53bc9b0df9",menu_group_name:"Non-Alcoholic",is_available:!0,image_url:"/images/app/menu/heineken-0-0.webp"},{id:"4c267134-fb3e-4fa8-a946-38a7504f9ef4",name:"Truffle Fries (side)",price:5.75,category:"Sides",menu_group_id:"251ead9e-07a0-467e-80c9-f413f5b308f8",menu_group_name:"Sides",is_available:!0,image_url:"/images/app/menu/truffle-fries-side.webp"},{id:"0c5410e2-2ee7-43ec-9e4c-c934bb008cdd",name:"Espresso Martini",price:19,category:"Cocktails",menu_group_id:"3f7e6a70-023c-454b-8838-b100c23bf567",menu_group_name:"Cocktails",is_available:!0,image_url:"/images/app/menu/espresso-martini.webp"},{id:"d7728066-7fc0-4d53-a4f1-cc8daf16e9fc",name:"Peppercorn Steak â 12oz",price:52.25,category:"Steaks",menu_group_id:"3fe24d3a-329a-460a-9797-da57df639528",menu_group_name:"Steaks",is_available:!0,image_url:"/images/app/menu/peppercorn-steak-12oz.webp"},{id:"c41fde00-5099-4b4a-91f4-0444041cb541",name:"Chicken Tenders",price:19.5,category:"Burgers",menu_group_id:"584de34c-bf25-4ffc-921e-174b76835301",menu_group_name:"Burgers",is_available:!0,image_url:"/images/app/menu/chicken-tenders.webp"},{id:"a4e91c71-7c9e-455d-aed9-1381ada0c119",name:"Happy Hour Truffle Fries",price:9,category:"Happy Hour",menu_group_id:"0fb7b176-45f3-4370-a44f-3fa4467cffdb",menu_group_name:"Happy Hour Specials",is_available:!0,image_url:"/images/app/menu/happy-hour-truffle-fries.webp"},{id:"b1015adb-3ad3-43b3-8788-d82dd59f7b93",name:"Grilled Salmon",price:31.75,category:"Mains",menu_group_id:"97c8ef25-dd9f-4856-92a3-fcb2394b55d4",menu_group_name:"Mains",is_available:!0,image_url:"/images/app/menu/grilled-salmon.webp"},{id:"3b2f0e9f-3ec4-4625-9caa-9294ffd4f89a",name:"Vegetarian Teriyaki Bowl",price:19,category:"Bowls",menu_group_id:"96b8c70a-4425-4ac8-9075-b1d2beafc034",menu_group_name:"Bowls",is_available:!0,image_url:"/images/app/menu/vegetarian-teriyaki-bowl.webp"},{id:"72974588-9c00-4ce4-8d55-9f6b9f83960c",name:"Crab Cake",price:21,category:"Start + Share",menu_group_id:"494aa305-08b8-4cb3-b238-604bbf0e6644",menu_group_name:"Start + Share",is_available:!0,image_url:"/images/app/menu/crab-cake.webp"},{id:"a840040f-8f58-46d5-b61a-f9d1ac7ae555",name:"House Red Wine",price:11,category:"Wine",menu_group_id:"be91fa04-cdc4-4341-a39e-7e0bf9d5dfc2",menu_group_name:"Wine",is_available:!0,image_url:"/images/app/menu/house-red-wine.webp"},{id:"9e54bc44-5515-4a3e-8bf1-efd3e5a2486f",name:"Local Lager (tap)",price:9,category:"Beer",menu_group_id:"af9f5f6c-1b46-4563-a033-6757918e3627",menu_group_name:"Beer",is_available:!0,image_url:"/images/app/menu/local-lager-tap.webp"},{id:"52bba449-75be-4e90-92a6-9746550e0617",name:"San Benedetto Sparkling Water",price:7,category:"Non-Alcoholic",menu_group_id:"df04dcaf-05d1-45d3-8d70-5f53bc9b0df9",menu_group_name:"Non-Alcoholic",is_available:!0,image_url:"/images/app/menu/san-benedetto-sparkling-water.webp"},{id:"83dd68ae-5ff5-4979-a41d-743a166d52ff",name:"Old Fashioned",price:18,category:"Cocktails",menu_group_id:"3f7e6a70-023c-454b-8838-b100c23bf567",menu_group_name:"Cocktails",is_available:!0,image_url:"/images/app/menu/old-fashioned.webp"},{id:"fe9dd15e-4c19-42d6-884d-3e4b4af57308",name:"Thai Green Chicken Curry",price:24.75,category:"Mains",menu_group_id:"97c8ef25-dd9f-4856-92a3-fcb2394b55d4",menu_group_name:"Mains",is_available:!0,image_url:"/images/app/menu/thai-green-chicken-curry.webp"},{id:"9f50c223-5294-46dd-8a90-303aded2c23e",name:"House White Wine",price:11,category:"Wine",menu_group_id:"be91fa04-cdc4-4341-a39e-7e0bf9d5dfc2",menu_group_name:"Wine",is_available:!0,image_url:"/images/app/menu/house-white-wine.webp"},{id:"d7e27e6a-5525-421f-8a8d-3ff99925f30e",name:"Peppercorn Steak â 8oz",price:39.25,
106category:"Steaks",menu_group_id:"3fe24d3a-329a-460a-9797-da57df639528",menu_group_name:"Steaks",is_available:!0,image_url:"/images/app/menu/peppercorn-steak-8oz.webp"},{id:"191ec73e-9579-4788-a864-8ee0c3c57790",name:"Crispy Yam Fries",price:12.25,category:"Start + Share",menu_group_id:"494aa305-08b8-4cb3-b238-604bbf0e6644",menu_group_name:"Start + Share",is_available:!0,image_url:"/images/app/menu/crispy-yam-fries.webp"},{id:"889094fb-7bc6-45d1-b31b-28d657e460cb",name:"Gardenburger",price:22.25,category:"Burgers",menu_group_id:"584de34c-bf25-4ffc-921e-174b76835301",menu_group_name:"Burgers",is_available:!0,image_url:"/images/app/menu/gardenburger.webp"},{id:"41371a6f-beb1-44ed-83aa-bd4365b83e81",name:"San Benedetto Still Water",price:7,category:"Non-Alcoholic",menu_group_id:"df04dcaf-05d1-45d3-8d70-5f53bc9b0df9",menu_group_name:"Non-Alcoholic",is_available:!0,image_url:"/images/app/menu/san-benedetto-still-water.webp"},{id:"56709154-6248-428d-9e24-d6ddcc911b74",name:"Sangria",price:13.25,category:"Cocktails",menu_group_id:"3f7e6a70-023c-454b-8838-b100c23bf567",menu_group_name:"Cocktails",is_available:!0,image_url:"/images/app/menu/sangria.webp"},{id:"db318719-ebf0-4057-96a7-bd6952c0d5b3",name:"Steak + Lobster â 12oz",price:75.5,category:"Steaks",menu_group_id:"3fe24d3a-329a-460a-9797-da57df639528",menu_group_name:"Steaks",is_available:!0,image_url:"/images/app/menu/steak-lobster-12oz.webp"},{id:"c7ee08ad-23b3-4995-a472-d2af59c862b1",name:"Impossible Burger",price:23.5,category:"Burgers",menu_group_id:"584de34c-bf25-4ffc-921e-174b76835301",menu_group_name:"Burgers",is_available:!0,image_url:"/images/app/menu/impossible-burger.webp"},{id:"23893422-aea4-4a35-b20d-411f9fb05a35",name:"Thai Green Prawn Curry",price:26.75,category:"Mains",menu_group_id:"97c8ef25-dd9f-4856-92a3-fcb2394b55d4",menu_group_name:"Mains",is_available:!0,image_url:"/images/app/menu/thai-green-prawn-curry.webp"},{id:"afa6e0d7-2f2e-49cd-b633-9870174c3545",name:"Edamame",price:12.5,category:"Start + Share",menu_group_id:"494aa305-08b8-4cb3-b238-604bbf0e6644",menu_group_name:"Start + Share",is_available:!0,image_url:"/images/app/menu/edamame.webp"},{id:"f13a4ad8-d116-4876-855b-fd14e0054643",name:"Spicy Chicken",price:18.75,category:"Start + Share",menu_group_id:"494aa305-08b8-4cb3-b238-604bbf0e6644",menu_group_name:"Start + Share",is_available:!0,image_url:"/images/app/menu/spicy-chicken.webp"},{id:"125b7c04-9223-44fc-98f8-e7b34c38c692",name:"Sprite",price:3,category:"Non-Alcoholic",menu_group_id:"df04dcaf-05d1-45d3-8d70-5f53bc9b0df9",menu_group_name:"Non-Alcoholic",is_available:!0,image_url:"/images/app/menu/sprite.webp"},{id:"f115e25d-491b-41d3-9803-0aa2d9f6c266",name:"Steak + Mushrooms â 12oz",price:53.25,category:"Steaks",menu_group_id:"3fe24d3a-329a-460a-9797-da57df639528",menu_group_name:"Steaks",is_available:!0,image_url:"/images/app/menu/steak-mushrooms-12oz.webp"},{id:"9a64b3d4-f9b5-43bf-ba23-c767646c81b2",name:"Jack Daniel's BBQ Burger",price:21,category:"Burgers",menu_group_id:"584de34c-bf25-4ffc-921e-174b76835301",menu_group_name:"Burgers",is_available:!0,image_url:"/images/app/menu/jack-daniel-s-bbq-burger.webp"},{id:"123b553e-84ce-4b2e-9544-4ee72ec21f12",name:"Truffle Parmesan Chicken",price:31,category:"Mains",menu_group_id:"97c8ef25-dd9f-4856-92a3-fcb2394b55d4",menu_group_name:"Mains",is_available:!0,image_url:"/images/app/menu/truffle-parmesan-chicken.webp"},{id:"1bd271a3-c472-4d6d-b11d-8cdd2994e42b",name:"Steak + Mushrooms â 8oz",price:40.25,category:"Steaks",menu_group_id:"3fe24d3a-329a-460a-9797-da57df639528",menu_group_name:"Steaks",is_available:!0,image_url:"/images/app/menu/steak-mushrooms-8oz.webp"},{id:"95ca3565-4ec3-4cbe-80fc-951d04abfcc0",name:"Szechuan Lettuce Wraps",price:19,category:"Start + Share",menu_group_id:"494aa305-08b8-4cb3-b238-604bbf0e6644",menu_group_name:"Start + Share",is_available:!0,image_url:"/images/app/menu/szechuan-lettuce-wraps.webp"},{id:"fe826ba9-25fb-4d7d-84a1-f1862ecb6efe",name:"Pesto Chicken Quesadilla",price:18.25,category:"Burgers",menu_group_id:"584de34c-bf25-4ffc-921e-174b76835301",menu_group_name:"Burgers",is_available:!0,image_url:"/images/app/menu/pesto-chicken-quesadilla.webp"},{id:"c7a262a0-dd15-4a3f-a5d0-c9cad3d3e9cc",name:"Rob's Crispy Chicken Sandwich",price:23,category:"Burgers",menu_group_id:"584de34c-bf25-4ffc-921e-174b76835301",menu_group_name:"Burgers",is_available:!0,image_url:"/images/app/menu/rob-s-crispy-chicken-sandwich.webp"},{id:"b7e5279f-e001-4a3f-80fc-f96a83737bd0",name:"Steak Frites â 12oz Striploin",price:47,category:"Steaks",menu_group_id:"3fe24d3a-329a-460a-9797-da57df639528",menu_group_name:"Steaks",is_available:!0,image_url:"/images/app/menu/steak-frites-12oz-striploin.webp"},{id:"e4ae3a10-5700-4b31-bd38-08ab2d90a410",name:"Szechuan Tofu Lettuce Wraps",price:23.25,category:"Start + Share",menu_group_id:"494aa305-08b8-4cb3-b238-604bbf0e6644",menu_group_name:"Start + Share",is_available:!0,image_url:"/images/app/menu/szechuan-tofu-lettuce-wraps.webp"},{id:"b49f52c8-22f9-4a87-83eb-34a4ef05ee11",name:"Truffle Fries",price:12.75,category:"Start + Share",menu_group_id:"494aa305-08b8-4cb3-b238-604bbf0e6644",menu_group_name:"Start + Share",is_available:!0,image_url:"/images/app/menu/truffle-fries.webp"},{id:"85c9d692-1763-4e49-9ffe-b6a9599798a4",name:"Steak Frites â 8oz Sirloin",price:34,category:"Steaks",menu_group_id:"3fe24d3a-329a-460a-9797-da57df639528",menu_group_name:"Steaks",is_available:!0,image_url:"/images/app/menu/steak-frites-8oz-sirloin.webp"},{id:"b971baca-ea61-462b-9117-6f807806e731",name:"The Feenie Burger",price:25,category:"Burgers",menu_group_id:"584de34c-bf25-4ffc-921e-174b76835301",menu_group_name:"Burgers",is_available:!0,image_url:"/images/app/menu/the-feenie-burger.webp"},{id:"246f3f99-c7a4-4724-833e-83a0a02faf93",name:"Tuna Stack",price:21,category:"Start + Share",menu_group_id:"494aa305-08b8-4cb3-b238-604bbf0e6644",menu_group_name:"Start + Share",is_available:!0,image_url:"/images/app/menu/tuna-stack.webp"}];ma("POS terminal");const mr=[{key:"modern",label:"QRAVE",hint:"Our signature look"},{key:"traditional",label:"Traditional",hint:"Classic parity"},{key:"compact",label:"Minimalist",hint:"Compact · OLED"}];let aa=100;const br=()=>[{line_id:"l1",name:"Aperol Spritz",quantity:2,unit_price:16,item_state:"sent",seat_number:1,menu_group_name:"Cocktails"},{line_id:"l2",name:"Avocado Kale Salad",quantity:1,unit_price:18.25,item_state:"sent",seat_number:2,menu_group_name:"Greens"},{line_id:"l3",name:"Chargrilled Steak â 12oz",quantity:1,unit_price:48.25,item_state:"draft",seat_number:2,menu_group_name:"Steaks",modifiers:[{name:"Medium rare",price_delta:0}]},{line_id:"l4",name:"Happy Hour Chicken Wings",quantity:1,unit_price:12,item_state:"draft",seat_number:1,menu_group_name:"Happy Hour Specials"}],_t=t=>`$${t.toFixed(2)}`,hr=new Date(2026,8,29,18,42);function xr(){const t=Gn(),[a,r]=p.useState("modern"),[o,i]=p.useState(br),[f,l]=p.useState(new Set),h=(m,g=[],x={})=>{const d=Math.max(1,Number(x.qty)||1);i(R=>{const w=R.find(s=>s.name===m.name&&s.item_state==="draft"&&!(g||[]).length&&!s.modifiers?.length);return w?R.map(s=>s===w?{...s,quantity:s.quantity+d}:s):(aa+=1,[...R,{line_id:`n${aa}`,name:m.name,quantity:d,unit_price:Number(m.price)||0,item_state:"draft",menu_group_name:m.menu_group_name,modifiers:g.length?g:void 0,special_instructions:x.note||void 0}])})},c=o.reduce((m,g)=>m+(g.unit_price+(g.modifiers||[]).reduce((x,d)=>x+(Number(d.price_delta)||0),0))*g.quantity,0),S=c*.13,k=c+S,_=o.filter(m=>m.item_state==="draft").length,M=p.useMemo(()=>[...new Set(ta.map(m=>m.category))],[]),v={order_type:"dine_in",dining_option:"dine_in",table_number:"12",guest_count:2,customer_name:null,server_name:"Priya K.",order_number:"1058",context_locked:!1};return e.jsx(Qa,{logicalWidth:1440,children:e.jsxs("div",{style:{width:1440,background:t.bgPrimary,color:t.text,fontFamily:"var(--font-inter), Inter, sans-serif",borderRadius:16,overflow:"hidden",border:`1px solid ${t.border}`},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:14,padding:"10px 16px",borderBottom:`1px solid ${t.border}`,background:t.bgSecondary},children:[e.jsxs("span",{style:{fontFamily:"JetBrains Mono, monospace",fontSize:13,fontWeight:900,letterSpacing:"0.06em"},children:["QRAVE ",e.jsx("span",{style:{color:t.accent},children:"OS"}),e.jsx("span",{style:{marginLeft:10,padding:"2px 7px",borderRadius:6,fontSize:10,fontWeight:800,background:t.accentSoft,color:t.accent,border:`1px solid ${t.accentBorder}`,letterSpacing:"0.1em"},children:"POS · TABLET"})]}),e.jsxs("span",{style:{fontSize:12,color:t.textMuted,display:"flex",alignItems:"center",gap:6},children:[e.jsx(_a,{size:12})," Demo Kitchen · Dinner shift"]}),e.jsxs("span",{style:{marginLeft:"auto",display:"flex",alignItems:"center",gap:10},children:[e.jsxs("span",{style:{fontSize:12,color:t.textMuted,fontFamily:"JetBrains Mono, monospace"},children:[hr.toLocaleDateString("en-CA",{weekday:"short",month:"short",day:"numeric"})," · 6:42 PM"]}),e.jsxs("span",{style:{fontSize:12,color:t.textMuted},children:["Server ",e.jsx("b",{style:{color:t.text},children:"Priya K."})]}),mr.map(m=>{const g=a===m.key;return e.jsx("button",{type:"button",title:m.hint,"aria-pressed":g,onClick:()=>r(m.key),style:{height:30,padding:"0 12px",borderRadius:999,cursor:"pointer",fontSize:11.5,fontWeight:800,background:g?t.accent:t.bgRaised,color:g?"#1a1300":t.textMuted,border:`1.5px solid ${g?t.accent:t.border}`,fontFamily:"inherit"},children:m.label},m.key)}),e.jsx("span",{style:{width:30,height:30,borderRadius:8,display:"grid",placeItems:"center",background:t.bgRaised,border:`1px solid ${t.border}`,color:t.textMuted},children:e.jsx(Ya,{size:14})}),e.jsx("span",{style:{width:30,height:30,borderRadius:8,display:"grid",placeItems:"center",background:t.bgRaised,border:`1px solid ${t.border}`,color:t.textMuted},children:e.jsx(Ja,{size:14})})]})]}),e.jsxs("div",{style:{display:"grid",gridTemplateColumns:"minmax(0, 1fr) 430px",height:620},children:[e.jsx("div",{style:{position:"relative",minWidth:0}
106,children:e.jsx(tr,{T:t,open:!0,inline:!0,items:ta,categories:M,menus:gr,groups:fr,menuStyle:a,onAdd:h,onClose:()=>{}})}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",minHeight:0,background:t.bgSecondary,borderLeft:`1px solid ${t.border}`},children:[e.jsx(ur,{T:t,txn:v,engine:{setField(){}},onClose:()=>{},onTransfer:()=>{},onReprint:()=>{},onPrint:()=>{},onRecovery:()=>{},onVoid:()=>{},onChangeCustomer:()=>{},onPromo:()=>{},onTaxExempt:()=>{},onSchedule:()=>{},onSplit:()=>{},onAssignTable:()=>{}}),e.jsx(or,{T:t,items:o,selectedIds:f,onToggle:m=>l(g=>{const x=new Set(g);return x.has(m)?x.delete(m):x.add(m),x}),onQty:(m,g)=>i(x=>x.map(d=>d.line_id===m?{...d,quantity:Math.max(1,g)}:d)),onVoid:m=>i(g=>g.filter(x=>x.line_id!==m)),onActions:()=>{},onHoldSend:m=>i(g=>g.map(x=>x.line_id===m?{...x,item_state:x.item_state==="held"?"draft":"held"}:x))}),e.jsxs("div",{style:{flexShrink:0,borderTop:`1px solid ${t.border}`,padding:"10px 14px"},children:[[["Subtotal",c],["HST 13%",S]].map(([m,g])=>e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",fontSize:12,color:t.textMuted,padding:"2px 0"},children:[e.jsx("span",{children:m}),e.jsx("span",{style:{fontFamily:"JetBrains Mono, monospace"},children:_t(g)})]},m)),e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"baseline",padding:"5px 0 8px"},children:[e.jsx("span",{style:{fontSize:13,fontWeight:800},children:"Total"}),e.jsx("span",{style:{fontFamily:"JetBrains Mono, monospace",fontSize:19,fontWeight:800,color:t.accent},children:_t(k)})]}),e.jsxs("div",{style:{display:"flex",gap:8},children:[e.jsxs("button",{type:"button",onClick:()=>i(m=>m.map(g=>g.item_state==="held"?g:{...g,item_state:"sent"})),style:{flex:1,height:46,borderRadius:12,border:`1.5px solid ${t.accentBorder}`,background:"transparent",color:t.accent,fontWeight:800,fontSize:13.5,cursor:"pointer",fontFamily:"inherit",display:"flex",alignItems:"center",justifyContent:"center",gap:7},children:[e.jsx(Oe,{size:15})," SEND ",_?`· ${_} DRAFT`:""]}),e.jsxs("button",{type:"button",style:{flex:1,height:46,borderRadius:12,border:"none",background:t.accent,color:"#1a1300",fontWeight:900,fontSize:14,cursor:"pointer",fontFamily:"inherit"},children:["PAY ",_t(k)]})]})]})]})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:14,padding:"7px 16px",borderTop:`1px solid ${t.border}`,background:t.bgSecondary,fontFamily:"JetBrains Mono, monospace",fontSize:10,color:t.textDim},children:[e.jsxs("span",{style:{display:"flex",alignItems:"center",gap:5},children:[e.jsx("span",{style:{width:7,height:7,borderRadius:999,background:"#34d399"}}),"POS SYNCED"]}),e.jsx("span",{children:"OFFLINE-READY · OUTBOX 0"}),e.jsx("span",{children:"KDS: TICKETS ROUTE ON SEND"}),e.jsxs("span",{style:{marginLeft:"auto",display:"flex",alignItems:"center",gap:5},children:[e.jsx(fa,{size:11})," F1 MENU · F2 SEND · F3 HOLD · F4 PAY"]}),e.jsxs("span",{style:{display:"flex",alignItems:"center",gap:5},children:[e.jsx(ba,{size:11})," Terminal 2"]})]})]})})}function Ct({open:t,onClose:a,order:r,isExpediter:o,isHeld:i,allDone:f,hasHeldItem:l,canFulfillItems:h,mode:c,stationFilter:S,anchor:k,onHold:_,onStart:M,onMarkDone:v,onRelease:m,onRush:g,onUnrush:x,onReportIssue:d}){const R=Wt();p.useEffect(()=>{if(!t)return;const L=ee=>{ee.key==="Escape"&&a?.()};return window.addEventListener("keydown",L),()=>window.removeEventListener("keydown",L)},[t,a]);const w=300,s=10,y=p.useRef({}),z=p.useRef({});if(p.useEffect(()=>{t&&(y.current={},z.current={})},[t]),!t)return null;const j=220,H=typeof window<"u"?window.innerWidth:1024,B=typeof window<"u"?window.innerHeight:768,O=k?.x??H/2,D=k?.y??B/2,X=Math.min(Math.max(8,O-j/2),H-j-8),$=D>B*.6,F=R?{sheet:"#161616",border:"rgba(255,255,255,0.1)",ink:"#fff",sub:"#888"}:{sheet:"#fff",border:"rgba(0,0,0,0.1)",ink:"#1A1A1A",sub:"#6B6B6B"},J=()=>a?.(),E=L=>()=>{L?.(),J()},T=r.items||[],q=(c==="prep"&&S&&S!=="All"?T.filter(L=>(L.station||r.station)===S):T).some(L=>L.status!=="pending"),n=({icon:L,label:ee,onClick:xe,tone:Re,disabled:W})=>{const ze={green:"#16a34a",blue:"#2563eb",red:"#dc2626",amber:"#d97706",gold:"#b8860b"}[Re]||F.ink,re=A=>{z.current[ee]={x:A.clientX,y:A.clientY}},C=A=>{if(W){xe?.(A);return}const pe=z.current[ee];if(pe&&Math.hypot(A.clientX-pe.x,A.clientY-pe.y)>s)return;
106const ue=Date.now(),Ie=y.current[ee]||0;ue-Ie<w||(y.current[ee]=ue,xe?.(A))};return e.jsxs("button",{onPointerDown:re,onClick:C,role:"menuitem","aria-disabled":W||void 0,style:{opacity:W?.75:1,display:"flex",alignItems:"center",gap:10,width:"100%",padding:"11px 14px",cursor:"pointer",border:"none",textAlign:"left",background:"transparent",color:ze,fontSize:14,fontWeight:800,borderBottom:`1px solid ${F.border}`},children:[e.jsx(L,{size:17,strokeWidth:2.4}),ee]})},u=h&&(r.status==="in-progress"||r.status==="pending"&&q),I=o&&(r.status==="ready-for-expo"||r.status==="ready"||f),N=$?{bottom:Math.max(8,B-D+6)}:{top:Math.min(D+6,B-8)};return Oa.createPortal(e.jsxs(e.Fragment,{children:[e.jsx("div",{onClick:J,style:{position:"fixed",inset:0,zIndex:"var(--z-toast)",background:"transparent"}}),e.jsxs("div",{role:"menu","aria-label":`Actions for ticket ${r.ticket_number||r.order_number||r._orderNumber||r.id}`,style:{position:"fixed",left:X,...N,zIndex:"calc(var(--z-toast) + 1)",width:j,background:F.sheet,border:`1px solid ${F.border}`,borderRadius:14,overflow:"hidden",boxShadow:"0 12px 40px rgba(0,0,0,0.4)",animation:"kds-pop-in-sm 0.16s cubic-bezier(0.22,1,0.36,1) forwards",transformOrigin:$?"bottom center"
106:"top center"},children:[e.jsx("style",{children:"@keyframes kds-pop-in-sm { from { opacity: 0; transform: scale(0.94); } to { opacity: 1; transform: scale(1); } }"}),e.jsx("div",{style:{padding:"10px 14px 6px",borderBottom:`1px solid ${F.border}`},children:e.jsx("p",{style:{fontSize:12,fontWeight:900,color:F.ink,margin:0},children:"Ticket actions"})}),I&&e.jsx(n,{icon:ya,label:"Bump / Release",tone:"green",onClick:E(()=>m?.(r.id))}),r.status==="pending"&&!q&&e.jsx(n,{icon:Be,label:"Start",tone:"gold",onClick:E(()=>M(r.id))}),u&&!I&&(l?e.jsx(n,{icon:we,label:"Resume the held item to finish",tone:"blue",disabled:!0,onClick:J}):e.jsx(n,{icon:Ce,label:"Mark Done",tone:"green",onClick:E(()=>v?.(r.id,c==="prep"?S:"All"))})),i?e.jsx(n,{icon:Be,label:"Resume",tone:"blue",onClick:E(()=>M(r.id))}):r.status!=="pending"&&e.jsx(n,{icon:we,label:"Hold",tone:"blue",onClick:E(()=>_(r.id))}),r._rushed?e.jsx(n,{icon:Kt,label:"Remove Rush",tone:"red",onClick:E(()=>x?.(r.id))}):e.jsx(n,{icon:Kt,label:"Mark as Rush",tone:"red",onClick:E(()=>g?.(r.id))}),d&&e.jsx(n,{icon:ga,label:"Report issue",tone:"amber",onClick:E(()=>d?.(r))}),e.jsx("button",{onClick:J,role:"menuitem",style:{width:"100%",padding:"11px",border:"none",cursor:"pointer",background:"transparent",color:F.sub,fontSize:14,fontWeight:800},children:"Close"})]})]}),document.body)}const yr=/^(no|without|hold|sub out|86|minus|-)\b/i,_r=/^(add|extra|with|\+|double|sub in)\b/i,Sr=/^(sub|substitute|swap|instead)\b/i;function Rt(t=""){const a=String(t).trim();return yr.test(a)?"remove":_r.test(a)?"add":Sr.test(a)?"sub":"note"}const na=/^(remove|without|hold|sub out|86|minus|no)\b\s*/i;function zt(t=""){const a=String(t).trim();return/^-\s*/.test(a)?`No ${a.replace(/^-\s*/,"")}`:na.test(a)?`No ${a.replace(na,"")}`:a}function Sa(t,a){const r={remove:a?{bg:"rgba(248,113,113,0.16)",color:"#fca5a5",border:"rgba(248,113,113,0.4)"}:{bg:"rgba(220,38,38,0.10)",color:"#dc2626",border:"rgba(220,38,38,0.28)"},add:a?{bg:"rgba(74,222,128,0.15)",color:"#86efac",border:"rgba(74,222,128,0.4)"}:{bg:"rgba(22,163,74,0.10)",color:"#15803d",border:"rgba(22,163,74,0.28)"},sub:a?{bg:"rgba(251,191,36,0.15)",color:"#fcd34d",border:"rgba(251,191,36,0.4)"}:{bg:"rgba(180,83,9,0.10)",color:"#b45309",border:"rgba(180,83,9,0.28)"},note:a?{bg:"rgba(96,165,250,0.14)",color:"#93c5fd",border:"rgba(96,165,250,0.35)"}:{bg:"rgba(37,99,235,0.08)",color:"#1d4ed8",border:"rgba(37,99,235,0.25)"}};return r[t]||r.note}function vr({order:t,T:a,ustyle:r,isDark:o,settings:i,displayNumber:f,primaryLabel:l,secondaryLabel:h,orderTypeBadge:c,providerBadge:S,elapsed:k,formatTime:_,isHeld:M,displayRows:v,isMyItem:m,modStyle:g,canFulfillItems:x,onItemToggle:d,entering:R,exiting:w,isDragging:s,staggerIdx:y=-1,isExpediter:z,allDone:j,hasHeldItem:H,mode:B,stationFilter:O,stationName:D,stationCfg:X,stationColors:$={},hasStations:F=!0,headerColorMode:J="time_age",headerLogicColor:E,onHold:T,onStart:te,onMarkDone:q,onRelease:n,onRush:u,onUnrush:I,onReportIssue:N}){const[L,ee]=p.useState(!1),[xe,Re]=p.useState(null),W=J==="none"?o?"#2a2a2a":"#6b7280":M?"#2563eb":E||r.headerBand||"#6cc24a",V=r.headerText||"#fff",ze=t.payment_status==="paid"||t._paid===!0,re=t.orderTime||`FIRE ${_(k)}`,C=M?o?"#93c5fd":"#2563eb":o?"#f87171":"#c0392b";return e.jsxs("div",{style:{background:a.cardBg,border:`1px solid ${o?"rgba(255,255,255,0.1)":"rgba(0,0,0,0.12)"}`,borderRadius:a.radius,overflow:"hidden",position:"relative",display:"flex",flexDirection:"column",boxShadow:a.cardShadow,animation:w?"kds-float-out 0.2s ease-out forwards":R?"kds-pop-in 0.28s var(--ease-out-quint) both":r.anim!=="none"?"kds-red-pulse 2s ease-in-out 3":"none",animationDelay:R&&y>0?`${Math.min(y,12)*30}ms`:"0ms",transform:s?"scale(1.03) rotate(1deg)":"none",transition:s?"none":"transform 0.15s ease, box-shadow 0.15s ease",cursor:s?"grabbing":"default"},children:[t._cancelled&&e.jsx("div",{style:{position:"absolute",inset:0,zIndex:20,background:"rgba(10,0,0,0.88)",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:6},children:e.jsx("p",{style:{fontSize:16,fontWeight:900,color:"#f87171",letterSpacing:"0.08em"},children:"CANCELLED"})}),e.jsxs("div",{style:{background:W,padding:"8px 12px 9px"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:8},children:[e.jsxs("span",{style:{fontSize:15,fontWeight:800,color:V,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[l||h||"Order"," ",e.jsxs("span",{style:{opacity:.85,fontWeight:700},children:["· ",f]})]}),e.jsx("span",{style:{fontSize:15,fontWeight:800,color:V,fontVariantNumeric:"tabular-nums",flexShrink:0},children:i.showElapsedTimer!==!1?t.orderTime||_(k):""})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:8,marginTop:3},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,minWidth:0},children:[e.jsx("span",{style:{fontSize:15,fontWeight:800,color:V},children:c}),S,D&&e.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:4,padding:"2px 8px",borderRadius:999,fontSize:10,fontWeight:900,letterSpacing:"0.08em",textTransform:"uppercase",background:"rgba(255,255,255,0.92)",color:X?.color||"#888"},children:[e.jsx("span",{style:{width:6,height:6,borderRadius:"50%",background:X?.color||"#888"}}),D]})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:[e.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:4,padding:"2px 9px",borderRadius:999,fontSize:11,fontWeight:800,background:"rgba(255,255,255,0.92)",color:ze?"#16a34a":"#dc2626"},children:[e.jsx("span",{style:{width:6,height:6,borderRadius:"50%",background:ze?"#16a34a":"#dc2626"}}),ze?"PAID":"NOT PAID"]}),e.jsx("button",{onClick:A=>{A.stopPropagation(),Re({x:A.clientX,y:A.clientY}),ee(!0)},"aria-label":"Ticket actions",style:{width:28,height:28,borderRadius:8,flexShrink:0,cursor:"pointer",background:"rgba(255,255,255,0.25)",border:"none",color:V,display:"flex",alignItems:"center",justifyContent:"center"},children:e.jsx(Nt,{size:18,strokeWidth:2.6})})]})]})]}),e.jsx("div",{style:{textAlign:"center",padding:"9px 0 6px"},children:e.jsx("span",{style:{fontSize:14,fontWeight:900,color:C,letterSpacing:"0.02em"},children:re})}),e.jsx("div",{style:{padding:"0 0 8px"},children:v.map(A=>{const pe=m(A),ue=A.status==="done",Ie=A.status==="held",Ae=F?A.station||t.station:null,Q=Ae?$[Ae]||$.default:null,qe=ue?o?"rgba(74,222,128,0.10)":"rgba(108,194,74,0.18)":"transparent";return e.jsx("div",{onClick:()=>{pe&&!Ie&&x&&d(t.id,A.id)},style:{padding:"7px 12px",background:qe,cursor:pe&&x?"pointer":"default",opacity:pe?1:.4,borderTop:`1px solid ${o?"rgba(255,255,255,0.05)":"rgba(0,0,0,0.05)"}`},children:e.jsxs("div",{style:{display:"flex",alignItems:"flex-start",ga
106p:9},children:[ue?e.jsx(bn,{size:18,strokeWidth:2.4,style:{color:o?"#4ade80":"#16a34a",flexShrink:0,marginTop:1}}):e.jsx(yn,{size:18,strokeWidth:2,style:{color:o?"#555":"#c4c4c4",flexShrink:0,marginTop:1}}),e.jsx("span",{style:{fontSize:15,fontWeight:800,color:a.text,minWidth:14,flexShrink:0},children:A.qty}),e.jsxs("div",{style:{flex:1,minWidth:0},children:[e.jsx("span",{style:{fontSize:15,fontWeight:800,color:ue?a.textMuted:a.text,textTransform:i.capitalizeItems?"uppercase":"none"},children:A.name}),Q&&z&&e.jsx("span",{style:{marginLeft:7,fontSize:9,fontWeight:900,color:Q.color,letterSpacing:"0.1em",textTransform:"uppercase",whiteSpace:"nowrap"},children:Ae}),g&&(A.modifiers?.length??0)>0&&e.jsx("div",{style:{marginTop:2,display:"flex",flexDirection:"column"},children:A.modifiers.map((Ge,De)=>{const Y=Rt(Ge),Ke=Sa(Y,o),fe=Y==="remove";return e.jsx("span",{style:{fontSize:14,fontWeight:700,lineHeight:1.5,color:ue?a.textMuted:Ke.color,textDecoration:fe?"line-through":"none"},children:zt(Ge)},De)})})]})]})},A._splitKey||A.id)})}),e.jsx(Ct,{open:L,onClose:()=>ee(!1),order:t,anchor:xe,isExpediter:z,isHeld:M,allDone:j,hasHeldItem:H,canFulfillItems:x,mode:B,stationFilter:O,onHold:T,onStart:te,onMarkDone:q,onRelease:n,onRush:u,onUnrush:I,onReportIssue:N})]})}function St(){return null}function kr(t){if(t?.order_number)return`#${String(t.order_number).replace(/^#/,"")}`;if(t?._orderNumber)return`#${String(t._orderNumber).replace(/^#/,"")}`;if(t?.id){let a=0;const r=String(t.id);for(let i=0;i<r.length;i++)a=(a<<5)-a+r.charCodeAt(i)|0;const o=1+Math.abs(a)%99999;return`#${String(o).padStart(5,"0")}`}return"#,"}function jr(t){const a=t,r=(a.order_type||a.orderType||a.order_source||a.service_type||"dine-in").toLowerCase(),i={"dine-in":"dine-in",dine_in:"dine-in",qr:"dine-in",handheld:"dine-in",takeout:"takeout",pickup:"takeout",counter:"takeout",delivery:"delivery",uber:"delivery",curbside:"curbside",drive_thru:"drive-thru","drive-thru":"drive-thru",drivethru:"drive-thru",bar:"bar"}[r]||"dine-in",l={"dine-in":"Dine-in",takeout:"Takeout",delivery:"Delivery",curbside:"Curbside","drive-thru":"Drive-Thru",bar:"Bar Tab"}[i],h=a.table||a.table_number||null,c=a._guestName||a.customer_name||a.tab_name||a.pickup_name||null,S=a.delivery_provider||a._deliveryProvider||null;return i==="dine-in"?h&&c?{primaryLabel:`Table ${h}`,secondaryLabel:c,orderTypeBadge:l,orderTypeKey:i}:h?{primaryLabel:`Table ${h}`,secondaryLabel:null,orderTypeBadge:l,orderTypeKey:i}:c?{primaryLabel:c,secondaryLabel:null,orderTypeBadge:l,orderTypeKey:i}:{primaryLabel:null,secondaryLabel:null,orderTypeBadge:l,orderTypeKey:i}:i==="takeout"?c?{primaryLabel:c,secondaryLabel:"Pickup",orderTypeBadge:l,orderTypeKey:i}:{primaryLabel:"Pickup",secondaryLabel:null,orderTypeBadge:l,orderTypeKey:i}:i==="delivery"?S&&c?{primaryLabel:S,secondaryLabel:c,orderTypeBadge:l,orderTypeKey:i}:S?{primaryLabel:S,secondaryLabel:null,orderTypeBadge:l,orderTypeKey:i}:c?{primaryLabel:c,secondaryLabel:"Delivery",orderTypeBadge:l,orderTypeKey:i}:{primaryLabel:"Delivery",secondaryLabel:null,orderTypeBadge:l,orderTypeKey:i}:i==="curbside"?c?{primaryLabel:c,secondaryLabel:"Curbside",orderTypeBadge:l,orderTypeKey:i}:{primaryLabel:"Curbside",secondaryLabel:null,orderTypeBadge:l,orderTypeKey:i}:i==="drive-thru"?c?{primaryLabel:c,secondaryLabel:"Drive-Thru",orderTypeBadge:l,orderTypeKey:i}:{primaryLabel:"Drive-Thru",secondaryLabel:null,orderTypeBadge:l,orderTypeKey:i}:i==="bar"?c?{primaryLabel:c,secondaryLabel:"Bar Tab",orderTypeBadge:l,orderTypeKey:i}:{primaryLabel:"Bar Tab",secondaryLabel:null,orderTypeBadge:l,orderTypeKey:i}:{primaryLabel:null,secondaryLabel:null,orderTypeBadge:l,orderTypeKey:i}}const je={"dine-in":{bg:"rgba(255,215,0,0.15)",border:"rgba(255,215,0,0.4)",color:"#D4A017"},takeout:{bg:"rgba(59,130,246,0.15)",border:"rgba(59,130,246,0.4)",color:"#60a5fa"},delivery:{bg:"rgba(147,51,234,0.15)",border:"rgba(147,51,234,0.4)",color:"#c084fc"},curbside:{bg:"rgba(16,185,129,0.15)",border:"rgba(16,185,129,0.4)",color:"#34d399"},"drive-thru":{bg:"rgba(236,72,153,0.15)",border:"rgba(236,72,153,0.4)",color:"#f472b6"},bar:{bg:"rgba(251,191,36,0.15)",border:"rgba(251,191,36,0.4)",color:"#fbbf24"}},wr={"dine-in":{...je["dine-in"],color:"#a87d0a"},takeout:{...je.takeout,color:"#2563eb"},delivery:{...je.delivery,color:"#9333ea"},curbside:{...je.curbside,color:"#059669"},"drive-thru":{...je["drive-thru"],color:"#db2777"},bar:{...je.bar,color:"#a16207"}},ra=t=>t?je:wr;function va(t){if(t)return{pageBg:"#0a0a0c",headerBg:"rgba(10,10,12,0.92)",headerBorder:"rgba(255,215,0,0.14)",tabBg:"#101014",tabBorder:"rgba(255,215,0,0.14)",cardBg:"#16161a",cardBgHeld:"#16233c",itemBg:"rgba(255,255,255,0.05)",itemBgDone:"rgba(34,197,94,0.10)",itemBorder:"rgba(255,255,255,0.10)",itemBorderDone:"rgba(34,197,94,0.22)",text:"#f4f4f5",textSecondary:"#d4d4d8",textMuted:"#a1a1aa",textFaint:"rgba(255,255,255,0.30)",textDim:"#71717a",divider:"rgba(255,255,255,0.10)",chipBg:"rgba(255,255,255,0.07)"};const a=Pn(!1,"foh");return{pageBg:a.bgPrimary,headerBg:"rgba(255,255,255,0.97)",headerBorder:a.border,tabBg:"rgba(255,255,255,0.98)",tabBorder:a.border,cardBg:"#ffffff",cardBgHeld:"#eef4ff",itemBg:a.bgRaised,itemBgDone:a.sentSoft,itemBorder:a.border,itemBorderDone:"rgba(22,163,74,0.30)",text:a.text,textSecondary:a.textMuted,textMuted:"#6B6B6B",textFaint:"#9a9a9a",textDim:a.textDim,divider:a.border,chipBg:a.bgRaised}}function Cr(t,a,r,o){const i=va(t),f=t?"#4ade80":"#16a34a",l=t?"#fbbf24":"#b8860b",h=t?"#f87171":"#dc2626",c=t?"#ff4444":"#dc2626",S=t?"#60a5fa":"#2563eb";if(o)return{border:`2.5px solid ${t?"rgba(96,165,250,0.85)":"rgba(37,99,235,0.55)"}`,bg:i.cardBgHeld,timerColor:S,anim:"none",headerBand:a==="traditional"?t?"rgba(37,99,235,0.30)":"rgba(37,99,235,0.18)":null,headerText:S};const k=[{color:f,soft:t?"rgba(34,197,94,0.6)":"rgba(22,163,74,0.75)",anim:"none"},{color:l,soft:t?"rgba(251,191,36,0.7)":"rgba(184,134,11,0.85)",anim:"none"},{color:h,soft:t?"rgba(239,68,68,0.8)":"rgba(220,38,38,0.85)",anim:"none"},{color:c,soft:t?"rgba(239,68,68,0.9)":"rgba(220,38,38,1)",anim:"kds-red-pulse 2s ease-in-out 3"}],_=k[r]||k[0];if(a==="status")return{border:`1px solid ${_.soft}`,bg:i.cardBg,timerColor:t?"#fff":"#1A1A1A",anim:_.anim,headerBand:r===0?t?"rgba(34,197,94,0.85)":"rgba(22,163,74,0.92)":r===1?t?"rgba(251,191,36,0.92)":"rgba(217,119,6,0.95)":`rgba(220,38,38,${t?.9:.95})`,headerText:"#fff"};if(a==="minimalist")return{border:`1px solid ${t?"rgba(255,255,255,0.10)":"rgba(0,0,0,0.10)"}`,bg:i.cardBg,timerColor:"#fff",anim:_.anim,headerBand:r===0?t?"rgba(34,197,94,0.92)":"#6cc24a":r===1?t?"rgba(251,191,36,0.95)":"#f0ad2e":`rgba(220,38,38,${t?.95:1})`,headerText:"#fff"};if(a==="fresh")return{border:`1px solid ${t?"rgba(255,255,255,0.10)":"rgba(0,0,0,0.10)"}`,bg:i.cardBg,timerColor:_.color,anim:"none",headerBand:null,headerText:_.color,topAccent:_.color};if(a==="traditional"){const M=t?.92:.85;return{border:`1px solid ${_.soft}`,bg:i.cardBg,timerColor:_.color,anim:_.anim,headerBand:r===0?t?"rgba(34,197,94,0.32)":"rgba(22,163,74,0.28)":r===1?t?"rgba(251,191,36,0.9)":"rgba(245,200,80,0.98)":`rgba(${r>=2?"220,38,38":"34,197,94"}, ${M})`,headerText:r>=1?r===1?t?"#1a1a1a":"#5c4a00":"#fff":t?"#fff":"#0f5132"}}return{border:`${a==="rail"?"1.5px":"2.5px"} solid ${_.soft}`,bg:i.cardBg,timerColor:_.color,anim:_.anim,headerBand:null,headerText:_.color}}function Rr(t,a="qrave",r="#FFD700"){return{...va(t),accent:r,cardStyle:a,radius:a==="qrave"?18:a==="minimalist"||a==="fresh"?14:a==="rail"?8:a==="status"?10:6,cardShadow:a==="qrave"||a==="fresh"||a==="minimalist"?t?"0 8px 28px rgba(0,0,0,0.5)":"0 6px 20px rgba(0,0,0,0.08)":"none"}}const zr=Object.freeze({cardStyle:"qrave",cardGlow:"full",headerColorMode:"time_age",showElapsedTimer:!0,splitModifiedItems:!0,showModifiers:!0,modifierStyle:"pills",individualFulfillmentEnabled:!0,capitalizeItems:!1});let It={};function ia(t){It={...It,...t}}function ka(){return{...zr,...It}}function Ir(){return"#FFD700"}const Mr=3;function ja(t){const a=t||ka(),r=Math.max(1,Number(a.amberThreshold)||5),o=Math.max(r+1,Number(a.redThreshold)||8),i=o+Mr;return{amber:r,red:o,critical:i}}function wa(t,a){const{amber:r,red:o,critical:i}=a;return t>=i?3:t>=o?2:t>=r?1:0}function Nr(t,{held:a=!1,settings:r}={}){const o=ja(r);if(a)return{level:-1,mins:0,thresholds:o};const i=Math.floor((t||0)/60);return{level:wa(i,o),mins:i,thresholds:o}}function Wr(t,a,r={}){const{settings:o}=r,i=ja(o);if(t.held||t.status==="held")return{level:-1,thresholds:i};const f=Math.floor((a||0)/60),l=(t.items||[]).filter(c=>c.status!=="held"&&c.status!=="done");let h=wa(f,i);return t._rushed&&(h=Math.min(3,h+1)),l.length===0&&(t.items||[]).length>0&&(t.items||[]).every(S=>S.status==="done")?{level:0,thresholds:i}:{level:h,thresholds:i}}const oa={"dine-in":{color:"#60a5fa",label:"Dine-In"},takeout:{color:"#fb923c",label:"Takeout"},delivery:{color:"#a78bfa",label:"Delivery"},curbside:{color:"#34d399",label:"Curbside"},"drive-thru":{color:"#f472b6",label:"Drive-Thru"},drive_thru:{color:"#f472b6",label:"Drive-Thru"},default:{color:"#888888",label:"Order"}};function $r(t){const a=t?.orderType||t?.dining_option||"dine-in";return oa[a]||oa.default}function sa(){return null}function la({modifiers:t=[],mode:a="pills",isDark:r,textDim:o,fontSize:i=12,paddingLeft:f=26}){return!t||t.length===0?null:a==="list"?e.jsx("div",{style:{paddingLeft:f,marginTop:3,dis
106play:"flex",flexDirection:"column",gap:2},children:t.map((l,h)=>{const c=Rt(l),S=zt(l),k=c==="remove";return e.jsx("span",{style:{fontSize:i-1,color:o,fontWeight:600,lineHeight:1.35,textDecoration:k?"line-through":"none"},children:k?S:`+ ${S}`},h)})}):e.jsx("div",{style:{paddingLeft:f,marginTop:4,display:"flex",flexWrap:"wrap",gap:5},children:t.map((l,h)=>{const c=Rt(l),S=Sa(c,r);return e.jsx("span",{style:{fontSize:i-1.5,fontWeight:800,padding:"2px 9px",borderRadius:999,background:S.bg,color:S.color,border:`1px solid ${S.border}`,lineHeight:1.4,whiteSpace:"nowrap",textDecoration:c==="remove"?"line-through":"none"},children:zt(l)},h)})})}const vt="'JetBrains Mono', ui-monospace, 'Courier New', monospace";function Br(t){const a=Math.floor(t/60),r=Math.max(0,t%60);return`${a}:${String(r).padStart(2,"0")}`}function Ar({isDark:t,T:a,displayNumber:r,orderTypeBadge:o,typeCfg:i,providerBadge:f,primaryLabel:l,secondaryLabel:h,timerColor:c,timerText:S,showTimer:k,notYetFired:_,stationName:M,stationCfg:v,onMenu:m,urgencyColor:g,urgencyLevel:x=0,isHeld:d=!1,headerColorMode:R="time_age",headerLogicColor:w=null,paymentStatus:s,itemCount:y,elapsedSecs:z=0,estimateSecs:j=null,aiConfidence:H}){const B=a.text,O=R||"time_age",X=d?t?"#60a5fa":"#2563eb":O==="none"?t?"#2a2a2a":"#6b7280":w||g||i?.color||a.accent,$=!d&&O==="time_age"&&x>=3,F=_?"#60a5fa":O==="none"?a.textMuted:O==="order_type"&&(w||i?.color)||c,E=s==="paid"?{bg:"rgba(34,197,94,0.12)",border:"rgba(34,197,94,0.25)",color:t?"#4ade80":"#15803d",label:"Paid"}:{bg:"rgba(239,68,68,0.12)",border:"rgba(239,68,68,0.25)",color:t?"#f87171":"#dc2626",label:"Unpaid"},T=j!=null&&j>0&&!_&&!d,te=T?z/j:0,q=Math.min(100,Math.round(te*100)),n=te>1,u=d?"#60a5fa":n?"#ef4444":te>=.85?"#f59e0b":"#22c55e",I=T?Math.round(j-z):null;return e.jsxs("div",{style:{borderBottom:`1px solid ${t?"rgba(255,255,255,0.07)":"rgba(0,0,0,0.07)"}`,borderTopLeftRadius:(a.radius||12)-1,borderTopRightRadius:(a.radius||12)-1,position:"relative",display:"flex",flexDirection:"column"},children:[e.jsx("div",{style:{position:"absolute",top:0,left:0,right:0,height:3,borderTopLeftRadius:(a.radius||12)-1,borderTopRightRadius:(a.radius||12)-1,background:X,boxShadow:`0 0 12px ${X}88`,animation:$?"kds-red-pulse 1.2s ease-in-out 3":"none",pointerEvents:"none",zIndex:2}}),e.jsxs("div",{style:{padding:"13px 14px 11px",display:"flex",flexDirection:"column",gap:7},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:10},children:[e.jsxs("div",{style:{display:"flex",alignItems:"baseline",gap:9,minWidth:0},children:[e.jsx("span",{style:{fontFamily:vt,fontSize:22,fontWeight:700,color:B,lineHeight:1,letterSpacing:"-0.02em",flexShrink:0},children:r}),(l||h)&&e.jsxs("span",{style:{display:"flex",alignItems:"baseline",gap:5,minWidth:0,overflow:"hidden"},children:[l&&e.jsx("span",{style:{fontSize:14,fontWeight:700,color:a.textSecondary,letterSpacing:"-0.01em",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:l}),l&&h&&e.jsx("span",{style:{fontSize:12,color:a.textFaint,flexShrink:0},children:"·"}),h&&e.jsx("span",{style:{fontSize:13,fontWeight:500,color:a.textMuted,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:h})]})]}),m&&e.jsx("button",{onClick:N=>{N.stopPropagation(),m({x:N.clientX,y:N.clientY})},"aria-label":"Ticket actions",style:{width:30,height:30,borderRadius:6,flexShrink:0,cursor:"pointer",background:"transparent",border:`1px solid ${t?"rgba(255,255,255,0.07)":"rgba(0,0,0,0.07)"}`,color:a.textFaint,display:"flex",alignItems:"center",justifyContent:"center",touchAction:"manipulation"},children:e.jsx(Nt,{size:16,strokeWidth:2.6})})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,flexWrap:"wrap"},children:[e.jsx("span",{style:{display:"inline-flex",alignItems:"center",padding:"2px 7px",borderRadius:999,fontSize:10,fontWeight:600,whiteSpace:"nowrap",textTransform:"uppercase",letterSpacing:"0.1em",background:`${i?.color}1f`,border:`1px solid ${i?.color}40`,color:i?.color},children:o}),f,s&&e.jsx("span",{style:{display:"inline-flex",alignItems:"center",padding:"2px 7px",borderRadius:999,fontSize:10,fontWeight:600,whiteSpace:"nowrap",textTransform:"uppercase",letterSpacing:"0.1em",background:E.bg,border:`1px solid ${E.border}`,color:E.color},children:E.label}),M&&v&&e.jsx("span",{style:{display:"inline-flex",alignItems:"center",gap:4,whiteSpace:"nowrap",padding:"2px 7px",borderRadius:999,fontSize:9,fontWeight:600,background:v.bg,border:`1px solid ${v.border}`,color:v.color,letterSpacing:"0.12em",textTransform:"uppercase"},children:M}),k&&e.jsx("span",{style:{marginLeft:"auto",fontFamily:vt,fontSize:13,fontWeight:600,fontVariantNumeric:"tabular-nums",letterSpacing:"0.04em",color:F,animation:"none"},children:_?"QUEUED":S})]})]}),e.jsxs("div",{style:{background:t?"rgba(255,255,255,0.025)":"rgba(0,0,0,0.025)",borderTop:`1px solid ${t?"rgba(255,255,255,0.04)":"rgba(0,0,0,0.04)"}`,padding:"8px 14px 9px"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:8,marginBottom:6},children:[e.jsx("span",{style:{fontSize:9.5,fontWeight:600,letterSpacing:"0.14em",textTransform:"uppercase",color:a.textFaint},children:d?"On Hold":n?"Overtime":"Prep Progress"}),e.jsxs("span",{style:{fontSize:10,fontWeight:600,color:a.textMuted,fontFamily:vt,letterSpacing:"0.04em"},children:[y!=null?`${y} ${y===1?"item":"items"}`:"",T&&e.jsxs("span",{style:{color:n?"#f87171":a.textFaint},children:[" · ",n?`+${Br(Math.abs(I))}`:`~${Math.max(1,Math.ceil(I/60))}m`]})]})]}),e.jsxs("div",{style:{height:6,borderRadius:999,overflow:"hidden",background:t?"rgba(255,255,255,0.07)":"rgba(0,0,0,0.07)",position:"relative"},children:[e.jsx("div",{style:{height:"100%",width:`${T?q:0}%`,minWidth:q>0?6:0,borderRadius:999,background:u,boxShadow:`0 0 8px ${u}66`,transition:"width 0.6s cubic-bezier(0.16,1,0.3,1), background 0.4s ease",animation:n?"kds-red-pulse 1.4s ease-in-out 3":"none"}}),!T&&!d&&!_&&e.jsx("div",{style:{position:"absolute",inset:0,borderRadius:999,background:`linear-gradient(90deg, transparent, ${a.accent}55, transparent)`,backgroundSize:"200% 100%",animation:"shimmer 1.8s linear infinite"}})]})]})]})}function Dr(t){const a=Number(t?.qty)||1,r=t?.modifiers||[],o=Math.min(a,Math.max(1,Number(t?.modifiedQty)||1));if(a<=1||r.length===0)return[{...t,_splitKey:t.id}];const i=a-o,f=[];return i>0&&f.push({...t,qty:i,modifiers:[],_splitKey:`${t.id}-plain`,_isSplitChild:!0}
106),f.push({...t,qty:o,_splitKey:`${t.id}-mod`,_isSplitChild:!0}),f}function Fr(t=[]){return t.flatMap(Dr)}const Er=()=>null,Lr=()=>null,Pr=()=>!1;function Hr(){return null}function Or(){return null}function Tr(){return null}function qr(){return null}const be={Grill:{color:"#fb923c",bg:"rgba(251,146,60,0.12)",border:"rgba(251,146,60,0.35)"},Fryer:{color:"#fbbf24",bg:"rgba(251,191,36,0.12)",border:"rgba(251,191,36,0.35)"},Salad:{color:"#4ade80",bg:"rgba(74,222,128,0.10)",border:"rgba(74,222,128,0.30)"},Bar:{color:"#a78bfa",bg:"rgba(167,139,250,0.12)",border:"rgba(167,139,250,0.35)"},Expo:{color:"#60a5fa",bg:"rgba(96,165,250,0.12)",border:"rgba(96,165,250,0.35)"},Barista:{color:"#f472b6",bg:"rgba(244,114,182,0.12)",border:"rgba(244,114,182,0.35)"},Pastry:{color:"#f9a8d4",bg:"rgba(249,168,212,0.12)",border:"rgba(249,168,212,0.35)"},default:{color:"#888",bg:"rgba(255,255,255,0.06)",border:"rgba(255,255,255,0.15)"}},Gr={Grill:{...be.Grill,color:"#ea580c"},Fryer:{...be.Fryer,color:"#d97706"},Salad:{...be.Salad,color:"#16a34a"},Bar:{...be.Bar,color:"#7c3aed"},Expo:{...be.Expo,color:"#2563eb"},Barista:{...be.Barista,color:"#db2777"},Pastry:{...be.Pastry,color:"#be185d"},default:{...be.default,color:"#525252"}},Kr={pending:{dot:"#555",label:"Pending"},"in-progress":{dot:"#D4A017",label:"In Prog"},done:{dot:"#4ade80",label:"Done"},held:{dot:"#60a5fa",label:"Held"},voided:{dot:"#ef4444",label:"VOID"}},Ur={pending:{dot:"#525252",label:"Pending"},"in-progress":{dot:"#d97706",label:"In Prog"},done:{dot:"#16a34a",label:"Done"},held:{dot:"#2563eb",label:"Held"},voided:{dot:"#dc2626",label:"VOID"}};function Vr(t){const[a,r]=p.useState(Math.floor((Date.now()-t)/1e3));return p.useEffect(()=>{const o=setInterval(()=>r(Math.floor((Date.now()-t)/1e3)),1e3);return()=>clearInterval(o)},[t]),a}function Pe(t){if(!Number.isFinite(t))return"0:00";const a=Math.floor(t/60),r=t%60;return`${a}:${r.toString().padStart(2,"0")}`}const da=300,kt=10;function Qr({order:t,onHold:a,onStart:r,onItemToggle:o,onItemHold:i,onMarkDone:f,isNew:l,isDragging:h,onUndoRequest:c,onRush:S,onUnrush:k,onReportIssue:_,onRefireItem:M,onRelease:v,userRole:m="manager",mode:g="prep",stationFilter:x="All",hasStations:d=!0,aiEngineState:R=null,holdGesture:w="drag",staggerIdx:s=-1,restaurant:y=null}){const z=w==="actions",j=p.useRef({}),H=p.useRef({}),B=g==="expediter",O=t.items||[],D=g==="prep"&&x&&x!=="All",X=O,$=b=>!D||(b.station||t.station)===x,F=D?X.filter($):X,J=Vr(t.startedAt),T=t.status==="pending"&&!t.firedAt&&!t._staggerFiresAt||!!t._staggerFiresAt&&t._staggerFiresAt>Date.now(),te=t.held&&t.heldAt?Math.floor((new Date(t.heldAt).getTime()-(t.startedAt||Date.now()))/1e3):null,q=T?0:te!=null&&te>=0?te:J,[n,u]=p.useState(!1),[I,N]=p.useState(!!l),[L,ee]=p.useState(!1),xe=p.useRef(t.status);p.useEffect(()=>{if(xe.current===t.status)return;xe.current=t.status,ee(!0);const b=setTimeout(()=>ee(!1),320);return()=>clearTimeout(b)},[t.status]);const Re="kds-status-pop 0.3s cubic-bezier(0.16, 1, 0.3, 1)",W=Wt(),[V,ze]=p.useState(ka);p.useEffect(()=>{},[]);const re=V.cardStyle||"qrave",C=Rr(W,re,Ir()),A=W?be:Gr,pe=W?Kr:Ur,ue=V.cardGlow||"full",Ie=ue!=="off",Ae=ue==="dim"?.45:1,Q=t.held||t.status==="held",{level:qe}=Nr(q,{held:Q,settings:V}),{level:Ge}=B?Wr(t,q,{settings:V}):{level:qe},De=B?Ge:qe,Y=Cr(W,re,Q?0:De,Q),Ke=Ie&&Y.anim!=="none"?"kds-red-pulse 2s ease-in-out 3":"none",fe=$r(t),it=re==="traditional",Ca=re==="fresh",Ra=re==="status",za=re==="minimalist",G=re==="qrave",[$t,Ue]=p.useState(!1),[ot,Bt]=p.useState(null),[st,Ve]=p.useState(!1),[lt,Ia]=p.useState(null),dt=(b,le)=>{Ia(le?{x:le.clientX,y:le.clientY}:ot),Ve(!0)},[Qe,At]=p.useState(null),Ye=p.useRef(null),Ma=Er(),ge=(it||Ra)&&Y.headerBand&&!B,Me=V.headerColorMode||"time_age",Na=Q?W?"#60a5fa":"#2563eb":Y.headerBand||Y.timerColor,Xe=Me==="none"?null:Me==="order_type"?fe.color:Na,ct=B&&re!=="qrave"?Xe:null,Ne=kr(t),{primaryLabel:Wa,secondaryLabel:ye,orderTypeBadge:Je,orderTypeKey:$a}=jr(t);Or(t.delivery_provider||t._deliveryProvider);const _e=Wa,Ba=ra(W)[$a]||ra(W)["dine-in"],Ze=e.jsx(Tr,{provider:t.delivery_provider||t._deliveryProvider,isDark:W}),Aa=qr(),ie=!B&&d?D?x:t.station||null:null,se=ie?A[ie]||A.default:null;p.useEffect(()=>{if(l){const b=setTimeout(()=>N(!1),900);return()=>clearTimeout(b)}},[l]);const[Dt,Ft]=p.useState(null),Et=p.useRef(0);p.useEffect(()=>{if(t._flashAt&&t._flashAt>Et.current){Et.current=t._flashAt,Ft(t._flash||"changed");const b=setTimeout(()=>Ft(null),1800);return()=>clearTimeout(b)}},[t._flashAt,t._flash]);const he=F.every(b=>b.status==="done"||b.status==="voided"),Z=F.some(b=>b.status==="held"),pt=F.some(b=>b.status!=="pending"),me=B||V.individualFulfillmentEnabled!==!1,Da=!1,et=V.splitModifiedItems!==!1?Fr(F):F,Lt=et.slice(0,5),Pt=et.length-Lt.length,Fe=V.showModifiers===!1?null:V.modifierStyle||"pills";if(za){const b=Me==="none"?W?"#2a2a2a":"#6b7280":Q?W?"#3b82f6":"#2563eb":Xe||Y.headerBand,le=C.cardBg;return e.jsxs("div",{className:"kds-ticket-card",style:{background:le,border:`1px solid ${W?"rgba(255,255,255,0.1)":"rgba(0,0,0,0.1)"}`,borderRadius:C.radius,display:"flex",flexDirection:"column",overflow:"hidden",position:"relative",boxShadow:C.cardShadow,animation:n?"kds-float-out 0.2s ease-out forwards":I?"kds-pop-in 0.28s var(--ease-out-quint) both":L?Re:Ke,animationDelay:I&&s>0?`${Math.min(s,12)*30}ms`:"0ms",transform:h?"scale(1.03) rotate(1deg)":void 0,transition:h?"none":"transform 0.15s ease, box-shadow 0.15s ease",cursor:h?"grabbing":"default"},children:[t._cancelled&&e.jsxs("div",{style:{position:"absolute",inset:0,zIndex:20,background:"rgba(10,0,0,0.88)",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:6},children:[e.jsx(Gt,{style:{width:40,height:40,color:"#dc2626"}}),e.jsx("p",{style:{fontSize:16,fontWeight:900,color:"#f87171",letterSpacing:"0.08em"},children:"CANCELLED"})]}),e.jsxs("div",{style:{background:b,padding:"12px 14px 11px"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:8},children:[e.jsx("span",{style:{fontSize:20,fontWeight:900,color:"#fff",lineHeight:1.1,letterSpacing:"-0.01em",minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:_e||Ne}),e.jsx("button",{onClick:P=>{P.stopPropagation(),Bt({x:P.clientX,y:P.clientY}),Ue(!0)}
106,"aria-label":"Ticket actions",style:{width:34,height:34,borderRadius:9,flexShrink:0,cursor:"pointer",background:"rgba(255,255,255,0.22)",border:"none",color:"#fff",display:"flex",alignItems:"center",justifyContent:"center"},children:e.jsx(Nt,{size:20,strokeWidth:2.6})})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:8,marginTop:4},children:[e.jsx("span",{style:{fontSize:12,fontWeight:700,color:"rgba(255,255,255,0.92)"},children:ye||t.orderTime||`#${Ne}`}),V.showElapsedTimer!==!1&&e.jsx("span",{style:{fontSize:14,fontWeight:900,color:"#fff",fontVariantNumeric:"tabular-nums"},children:Pe(q)})]})]}),e.jsxs("div",{style:{padding:"10px 14px 4px",display:"flex",gap:8,alignItems:"center",flexWrap:"wrap"},children:[e.jsx("span",{style:{padding:"5px 14px",borderRadius:999,fontSize:12,fontWeight:900,letterSpacing:"0.04em",background:`${fe.color}1f`,border:`1px solid ${fe.color}55`,color:fe.color,textTransform:"uppercase"},children:Je}),Ze,ie&&e.jsx("span",{style:{fontSize:10,fontWeight:800,color:C.textMuted,letterSpacing:"0.1em",textTransform:"uppercase"},children:ie}),t._rushed&&e.jsx("span",{style:{padding:"4px 10px",borderRadius:999,fontSize:11,fontWeight:900,background:"rgba(239,68,68,0.12)",border:"1px solid rgba(239,68,68,0.45)",color:"#ef4444",boxShadow:"0 0 10px 1px rgba(239,68,68,0.30)",animation:"kds-red-pulse 1.8s ease-in-out 3"}
106,children:"ð¨ RUSH"})]}),e.jsx("div",{style:{padding:"6px 14px 16px",display:"flex",flexDirection:"column",gap:11},children:et.map(P=>{const Se=$(P),tt=P.status==="done",ve=P.status==="voided",de=tt||ve,ae=P.status==="held",ut=ke=>{H.current[P.id]={x:ke.clientX,y:ke.clientY}},gt=ke=>{if(!Se||ae||ve||!me)return;const Ee=H.current[P.id];if(Ee&&Math.hypot(ke.clientX-Ee.x,ke.clientY-Ee.y)>kt)return;const at=Date.now(),ft=j.current[P.id]||0;at-ft<da||(j.current[P.id]=at,o(t.id,P.id))};return e.jsxs("div",{onPointerDown:ut,onClick:gt,style:{cursor:Se&&!ve&&me?"pointer":"default",opacity:Se?1:.4},children:[e.jsxs("div",{style:{display:"flex",alignItems:"baseline",gap:9},children:[e.jsx("span",{style:{fontSize:16,fontWeight:900,minWidth:22,height:22,borderRadius:"50%",display:"inline-flex",alignItems:"center",justifyContent:"center",background:de?"transparent":W?"rgba(255,255,255,0.1)":"rgba(0,0,0,0.08)",color:de?C.textMuted:C.text,flexShrink:0},children:P.qty}),e.jsx("span",{style:{fontSize:16,fontWeight:800,color:de?C.textMuted:C.text,textDecoration:de?"line-through":"none",textTransform:V.capitalizeItems?"uppercase":"none"},children:P.name})]}),Fe&&(P.modifiers?.length??0)>0&&e.jsx("div",{style:{opacity:de?.5:1},children:e.jsx(la,{modifiers:P.modifiers,mode:Fe,isDark:W,textDim:C.textDim,fontSize:15,paddingLeft:31})})]},P._splitKey||P.id)})}),e.jsx(Ct,{open:$t,onClose:()=>Ue(!1),order:t,anchor:ot,isExpediter:B,isHeld:Q,allDone:he,hasHeldItem:Z,canFulfillItems:me,mode:g,stationFilter:x,onHold:a,onStart:r,onMarkDone:f,onRelease:v,onRush:S,onUnrush:k,onReportIssue:dt}),e.jsx(St,{open:st,onClose:()=>Ve(!1),order:t,anchor:lt,onReport:_})]})}return it?e.jsxs(e.Fragment,{children:[e.jsx(vr,{order:t,T:C,ustyle:Y,isDark:W,settings:V,displayNumber:Ne,primaryLabel:_e,secondaryLabel:ye,orderTypeBadge:Je,providerBadge:Ze,elapsed:q,formatTime:Pe,isHeld:Q,displayRows:et,isMyItem:$,modStyle:Fe,canFulfillItems:me,onItemToggle:o,entering:I,exiting:n,isDragging:h,staggerIdx:s,isExpediter:B,allDone:he,hasHeldItem:Z,mode:g,stationFilter:x,stationName:ie,stationCfg:se,stationColors:A,hasStations:d,headerColorMode:Me,headerLogicColor:Xe,onHold:a,onStart:r,onMarkDone:f,onRelease:v,onRush:S,onUnrush:k,onReportIssue:dt}),e.jsx(St,{open:st,onClose:()=>Ve(!1),order:t,anchor:lt,onReport:_})]}):e.jsxs("div",{className:"kds-ticket-card",style:{background:Y.bg,border:Y.border,borderRadius:C.radius,overflow:"hidden",padding:ge||G?"0 0 12px":se&&ie?`${C.radius+14}px 16px 12px`:"16px 16px 12px",display:"flex",flexDirection:"column",gap:it||G?8:12,animation:n?"kds-float-out 0.2s ease-out forwards":I?"kds-pop-in 0.28s var(--ease-out-quint) both":L?Re:Ke,animationDelay:I&&s>0?`${Math.min(s,12)*30}ms`:"0ms",position:"relative",boxShadow:h?W?"0 24px 48px rgba(0,0,0,0.7)":"0 24px 48px rgba(0,0,0,0.25)":C.cardShadow,transform:h?"scale(1.03) rotate(1deg)":void 0,transition:h?"none":"transform 0.15s ease, box-shadow 0.15s ease",cursor:h?"grabbing":"default",zIndex:h?10:"auto"},children:[ge&&(()=>{const b=se||A.default,le=W?`${b.color}26`:`${b.color}1f`,P=W?"#fff":"#1A1A1A";return e.jsx("div",{style:{borderBottom:`3px solid ${Y.timerColor}`},children:e.jsxs("div",{style:{background:le,padding:"8px 14px 7px",display:"flex",alignItems:"center",justifyContent:"space-between",gap:8},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,minWidth:0},children:[e.jsx("span",{style:{width:8,height:8,borderRadius:"50%",background:b.color,flexShrink:0}}),e.jsx("span",{style:{fontSize:22,fontWeight:900,color:P,lineHeight:1,letterSpacing:"-0.02em"},children:Ne}),ie&&e.jsx("span",{style:{fontSize:9,fontWeight:800,color:b.color,letterSpacing:"0.14em",textTransform:"uppercase"},children:ie})]}),e.jsx("span",{style:{fontSize:20,fontWeight:900,fontVariantNumeric:"tabular-nums",color:Y.timerColor,lineHeight:1},children:Pe(q)})]})})})(),Ca&&!B&&e.jsx("div",{style:{position:"absolute",top:0,left:0,right:0,height:4,borderRadius:`${C.radius}px ${C.radius}px 0 0`,background:Y.topAccent||Y.timerColor,pointerEvents:"none",zIndex:5}}),ct&&e.jsx("div",{style:{position:"absolute",top:0,left:0,right:0,height:6,borderRadius:`${C.radius}px ${C.radius}px 0 0`,background:ct,animation:Me==="time_age"&&De===3?"kds-red-pulse 2s ease-in-out 3":"none",pointerEvents:"none",zIndex:5}}),I&&Ie&&e.jsx("div",{style:{position:"absolute",inset:0,borderRadius:C.radius,background:`${C.accent}12`,opacity:Ae,animation:"kds-glow-fade 0.9s ease forwards",pointerEvents:"none"}}),Dt&&e.jsx("div",{style:{position:"absolute",inset:0,borderRadius:C.radius,zIndex:8,animation:`${Dt==="voided"?"kds-flash-voided":"kds-flash-changed"} 0.9s ease 2`,pointerEvents:"none"}}),t._cancelled&&e.jsxs("div",{style:{position:"absolute",inset:0,borderRadius:18,zIndex:20,background:"rgba(10,0,0,0.88)",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:8,backdropFilter:"blur(2px)"},children:[e.jsx(Gt,{style:{width:44,height:44,color:"#dc2626"}}),e.jsx("p",{style:{fontSize:18,fontWeight:900,color:"#f87171",letterSpacing:"0.08em",textTransform:"uppercase"},children:"CANCELLED"}),e.jsx("p",{style:{fontSize:12,fontWeight:700,color:"#666"},children:"Stop prep"}),t._cancelReason&&e.jsx("p",{style:{fontSize:11,color:"#555",marginTop:2},children:t._cancelReason})]}),se&&ie&&!ge&&!G&&e.jsxs("div",{style:{position:"absolute",top:0,left:0,right:0,height:28,borderRadius:`${C.radius}px ${C.radius}px 0 0`,background:`linear-gradient(90deg, ${se.color}40 0%, ${se.color}1a 100%)`,borderBottom:`1px solid ${se.color}40`,display:"flex",alignItems:"center",paddingLeft:14,gap:6,pointerEvents:"none"},children:[e.jsx("div",{style:{width:6,height:6,borderRadius:"50%",background:se.color,opacity:.8,flexShrink:0}}),e.jsx("span",{style:{fontSize:9,fontWeight:700,color:se.color,opacity:.7,letterSpacing:"0.18em",textTransform:"uppercase",fontVariantNumeric:"tabular-nums"},children:ie})]}),G&&e.jsx(Ar,{isDark:W,T:C,displayNumber:Ne,orderTypeBadge:Je,typeCfg:Ba,providerBadge:Ze,primaryLabel:_e,secondaryLabel:ye,timerColor:Y.timerColor,timerText:Pe(q),showTimer:V.showElapsedTimer!==!1,notYetFired:T,stationName:ie,stationCfg:se,urgencyColor:Q?W?"#60a5fa":"#2563eb":Y.headerBand||Y.timerColor,urgencyLevel:De,isHeld:Q,headerColorMode:Me,headerLogicColor:Xe,paymentStatus:t.payment_status==="paid"||t.paid?"paid":t.payment_status?"unpaid":null,itemCount:F.length,elapsedSecs:T?0:q,estimateSecs:t.aiEstimateMins!=null?t.aiEstimateMins*60:null,aiConfidence:t.aiConfidence,onMenu:b=>{Bt(b),Ue(!0)}}),Aa,G&&e.jsx(Ct,{open:$t,onClose:()=>Ue(!1),order:t,anchor:ot,isExpediter:B,isHeld:Q,allDone:he,hasHeldItem:Z,canFulfillItems:me,mode:g,stationFilter:x,onHold:a,onStart:r,onMarkDone:f,onRelease:v,onRush:S,onUnrush:k,onReportIssue:dt}),Ma,(!G||t._promoTag||t._rushed||t._recalled||Q||T)&&e.jsxs("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:8,marginTop:se&&ie&&!ge?16:ct?6:0,padding:ge||G?"0 14px":0},children:[e.jsxs("div",{style:{flex:1,minWidth:0},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,flexWrap:"wrap"},children:[!ge&&!G&&e.jsx("span",{style:{fontSize:34,fontWeight:900,color:C.text,lineHeight:1,letterSpacing:"-0.02em"},children:Ne}),!G&&e.jsx("span",{style:{padding:"3px 9px",borderRadius:999,fontSize:11,fontWeight:800,background:`${fe.color}22`,border:`1px solid ${fe.color}66`,color:fe.color,letterSpacing:"0.02em"},children:Je}),!G&&Ze,t._promoTag&&e.jsxs("span",{style:{padding:"3px 9px",borderRadius:999,fontSize:10,fontWeight:900,background:"rgba(255,215,0,0.15)",border:"1px solid rgba(255,215,0,0.4)",color:"#FFD700",letterSpacing:"0.06em"},children:["ð ",t._promoTag]}),t._rushed&&e.jsx("span",{style:{padding:"3px 10px",borderRadius:999,fontSize:11,fontWeight:900,background:"linear-gradient(135deg,rgba(239,68,68,0.25),rgba(239,68,68,0.12))",border:"1.5px solid rgba(239,68,68,0.7)",color:"#ff4444",letterSpacing:"0.08em",boxShadow:"0 0 10px 1px rgba(239,68,68,0.30
106)",animation:"kds-red-pulse 1.8s ease-in-out 3"},children:"ð¨ RUSH"}),t._recalled&&e.jsx("span",{style:{padding:"3px 8px",borderRadius:999,fontSize:10,fontWeight:900,background:"rgba(251,146,60,0.12)",border:"1px solid rgba(251,146,60,0.4)",color:"#fb923c",letterSpacing:"0.06em"},children:"RECALLED"})]}),(_e||ye)&&!G&&e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,marginTop:3,flexWrap:"wrap"},children:[_e&&e.jsx("span",{style:{fontSize:17,fontWeight:800,color:C.textSecondary,letterSpacing:"-0.01em"},children:_e}),_e&&ye&&e.jsx("span",{style:{fontSize:13,color:C.textFaint},children:"·"}),ye&&e.jsx("span",{style:{fontSize:14,fontWeight:600,color:C.textMuted},children:ye})]}),Q&&(t.holdType==="manual"?e.jsxs("div",{style:{display:"inline-flex",alignItems:"center",gap:6,marginTop:6,padding:"6px 12px",borderRadius:10,fontSize:13,fontWeight:900,background:"rgba(251,146,60,0.15)",border:"1.5px solid rgba(251,146,60,0.65)",color:"#fb923c",boxShadow:"0 0 10px rgba(251,146,60,0.15)",letterSpacing:"0.04em"},children:[e.jsx("span",{style:{fontSize:15},children:"â"}),e.jsx("span",{children:"MANUAL HOLD"}),e.jsx("span",{style:{fontSize:10,color:"rgba(251,146,60,0.6)",fontWeight:600},children:"until resumed"})]}):e.jsxs("div",{style:{display:"inline-flex",alignItems:"center",gap:6,marginTop:6,padding:"6px 12px",borderRadius:10,fontSize:13,fontWeight:900,background:"rgba(96,165,250,0.18)",border:"1.5px solid rgba(96,165,250,0.6)",color:"#93c5fd",boxShadow:"0 0 12px rgba(96,165,250,0.2)",letterSpacing:"0.04em"},children:[e.jsx("span",{style:{fontSize:15},children:"â¸"}),e.jsx("span",{children:t._holdReason==="pacing"?"AUTO HOLD, PACING":"AUTO HOLD, AI"})]})),Q&&t.holdType!=="manual"&&t.heldAt&&t.heldFiresIn>0&&e.jsx("div",{style:{marginTop:6},children:e.jsx(sa,{fireAt:t.heldAt+t.heldFiresIn*1e3,compact:!0})}),T&&e.jsx("div",{style:{marginTop:6},children:e.jsx(sa,{fireAt:t._staggerFiresAt,label:"Fires in",compact:!0})}),!G&&t.aiEstimateMins!=null&&e.jsxs("div",{style:{marginTop:5,fontSize:12,color:C.textMuted,display:"flex",alignItems:"center",gap:4},children:[e.jsx("span",{children:"ð¤"}),e.jsxs("span",{children:["~",t.aiEstimateMins," min"]}),e.jsx("span",{style:{color:C.textFaint},children:"·"}),e.jsxs("span",{style:{color:t.aiConfidence>=90?"#4ade80":t.aiConfidence>=75?"#fbbf24":"#f87171",fontWeight:700},children:[t.aiConfidence,"%"]})]})]}),!ge&&!G&&e.jsx("div",{style:{textAlign:"right",flexShrink:0},children:T?e.jsxs(e.Fragment,{children:[e.jsx("div",{style:{fontSize:24,fontWeight:900,color:"#60a5fa",lineHeight:1,letterSpacing:"-0.01em"},children:"â³"}),e.jsx("div",{style:{fontSize:10,color:"#60a5fa",marginTop:3,textTransform:"uppercase",letterSpacing:"0.1em",fontWeight:800},children:"queued"})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{style:{fontSize:36,fontWeight:900,fontVariantNumeric:"tabular-nums",color:Y.timerColor,lineHeight:1,letterSpacing:"-0.02em"},children:Pe(q)}),e.jsx("div",{style:{fontSize:10,color:C.textFaint,marginTop:3,textTransform:"uppercase",letterSpacing:"0.1em"},children:"elapsed"})]})})]}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:5,padding:ge||G?"0 14px":0,marginTop:G?6:0},children:[Lt.map(b=>{const le=pe[b.status]||pe.pending,P=$(b),Se=d?b.station||t.station:null,tt=Se?A[Se]||A.default:null,ve=!P,de=b.status==="held",ae=b.status==="voided",ut=Da,gt=()=>{const K=Date.now(),ce=j.current[b.id]||0;return K-ce<da?!1:(j.current[b.id]=K,!0)},ke=K=>{H.current[b.id]={x:K.clientX,y:K.clientY}},Ee=K=>{const ce=H.current[b.id];if(!ce)return!0;const La=K.clientX-ce.x,Pa=K.clientY-ce.y;return Math.hypot(La,Pa)<=kt},at=K=>{!P||de||ae||!me||Ee(K)&>()&&o(t.id,b.id)},ft=K=>{if(!M||!z||ae)return;clearTimeout(Ye.current);const ce={x:K.clientX,y:K.clientY};Ye.current=setTimeout(()=>At(b),550),H.current[b.id]=ce},Fa=K=>{const ce=H.current[b.id];ce&&Math.hypot(K.clientX-ce.x,K.clientY-ce.y)>kt&&clearTimeout(Ye.current)},Ht=()=>clearTimeout(Ye.current),Ea=Lr(),mt=Pr();return e.jsxs("div",{style:{position:"relative",display:"flex",gap:0,borderRadius:re==="qrave"?10:6,overflow:"hidden",borderLeft:void 0,border:G?`1px solid ${de?"rgba(96,165,250,0.5)":W?"rgba(255,255,255,0.06)":"rgba(0,0,0,0.06)"}`:`1px solid ${de?"rgba(96,165,250,0.5)":b.status==="done"?C.itemBorderDone:C.itemBorder}`},children:[e.jsx("button",{onPointerDown:K=>{ke(K),ft(K)},onPointerMove:Fa,onPointerUp:Ht,onPointerLeave:Ht,onClick:K=>{at(K)},disabled:ve||!me||mt||ae,style:{flex:1,minWidth:0,background:de?"rgba(96,165,250,0.12)":b.status==="done"||ae?C.itemBgDone:C.itemBg,border:"none",padding:"9px 11px",textAlign:"left",cursor:ve||!me||mt||ae?"default":"pointer",transition:"background-color 0.18s ease, color 0.18s ease, transform 0.18s ease, border-color 0.18s ease, opacity 0.18s ease",touchAction:"manipulation",opacity:ve?.4:b.status==="done"||ae?.6:1},children:e.jsxs("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:8},children:[G?e.jsx("span",{style:{width:19,height:19,borderRadius:"50%",flexShrink:0,marginTop:1,display:"inline-flex",alignItems:"center",justifyContent:"center",background:b.status==="done"?"#22c55e":"transparent",border:`1.5px solid ${b.status==="done"?"#22c55e":W?"rgba(255,255,255,0.22)":"rgba(0,0,0,0.22)"}`,transition:"background-color 0.15s ease, color 0.15s ease, transform 0.15s ease, border-color 0.15s ease, opacity 0.15s ease"},children:b.status==="done"&&e.jsx(Ce,{style:{width:12,height:12,color:W?"#0e0e0f":"#fff"},strokeWidth:3.5})}):e.jsx("span",{style:{width:8,height:8,borderRadius:"50%",background:le.dot,flexShrink:0,marginTop:6}}),e.jsxs("div",{style:{flex:1,minWidth:0},children:[G?e.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:7,flexWrap:"wrap"},children:[e.jsxs("span",{style:{fontFamily:"'JetBrains Mono', ui-monospace, monospace",fontSize:13,fontWeight:800,padding:"2px 8px",borderRadius:5,letterSpacing:"0.02em",lineHeight:1.1,background:b.status==="done"||ae?W?"rgba(255,255,255,0.08)":"rgba(0,0,0,0.06)":W?`${C.accent}33`:`${C.accent}28`,border:`1px solid ${b.status==="done"||ae?"transparent":W?`${C.accent}55`:`${C.accent}80`}`,color:b.status==="done"||ae?C.textMuted:W?"#fff":"#7a5c08"},children:["Ã",b.qty]}),e.jsx("span",{style:{fontSize:15,fontWeight:600,color:b.status==="done"||ae?C.textFaint:C.text,fontStyle:"normal",textDecoration:b.status==="done"||ae?"line-through":"none",textTransform:V.capitalizeItems?"uppercase":"none"},children:b.name})]}):e.jsxs("span",{style:{fontSize:15,fontWeight:700,color:b.status==="done"||ae?C.textFaint:C.text,fontStyle:"normal",textDecoration:b.status==="done"||ae?"line-through":"none"},children:[b.qty,"à ",b.name]}),mt,Fe&&(b.modifiers?.length??0)>0&&e.jsx("div",{style:{opacity:b.status==="done"?.5:1},children:e.jsx(la,{modifiers:b.modifiers,mode:Fe,isDark:W,textDim:C.textDim,fontSize:13,paddingLeft:0})}),b._remake&&e.jsx("div",{style:{display:"inline-flex",alignItems:"center",gap:4,marginTop:4,marginRight:4,padding:"2px 8px",borderRadius:999,fontSize:10,fontWeight:900,background:"rgba(217,119,6,0.16)",border:"1px solid rgba(217,119,6,0.6)",color:"#d97706",letterSpacing:"0.04em"},children:"ð REMAKE"}),b._refire&&e.jsx("div",{style:{display:"inline-flex",alignItems:"center",gap:4,marginTop:4,marginRight:4,padding:"2px 8px",borderRadius:999,fontSize:10,fontWeight:900,background:"rgba(59,130,246,0.16)",border:"1px solid rgba(59,130,246,0.6)",color:"#3b82f6",letterSpacing:"0.04em"},children:"ðµ RE-FIRE"}),b._eightySixed&&e.jsx("div",{style:{display:"inline-flex",alignItems:"center",gap:4,marginTop:4,marginRight:4,padding:"2px 8px",borderRadius:999,fontSize:10,fontWeight:900,background:"rgba(107,114,128,0.18)",border:"1px solid rgba(107,114,128,0.6)",color:"#9ca3af",letterSpacing:"0.04em"},children:"â 86'D"}),Ea,de&&b._holdReason&&e.jsxs("div",{style:{display:"inline-flex",alignItems:"center",gap:4,marginTop:4,padding:"2px 8px",borderRadius:999,fontSize:10,fontWeight:800,background:"rgba(96,165,250,0.16)",border:"1px solid rgba(96,165,250,0.5)",color:"#60a5fa",letterSpacing:"0.02em"},children:[e.jsx(we,{style:{width:10,height:10}})," ",b._holdReason]})]}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-end",gap:2,flexShrink:0},children:[tt&&B&&e.jsx("span",{style:{fontSize:9,fontWeight:800,color:tt.color,letterSpacing:"0.1em",textTransform:"uppercase",whiteSpace:"nowrap"},children:Se}
106),e.jsx("span",{style:{fontSize:10,color:le.dot,fontWeight:700,whiteSpace:"nowrap"},children:le.label})]})]})}),ut]},b._splitKey||b.id)}),Pt>0&&e.jsxs("div",{style:{fontSize:11,color:C.textMuted,padding:"2px 4px"},children:["+",Pt," more items"]})]}),B?e.jsxs("div",{style:{display:"flex",gap:7,flexWrap:"wrap",padding:ge||G?"0 14px":0},children:[t.status==="ready-for-expo"||t.status==="ready"||he?e.jsxs("button",{className:"press",onClick:()=>v?.(t.id),style:{flex:1,height:56,borderRadius:12,fontWeight:900,fontSize:16,cursor:"pointer",background:"linear-gradient(135deg,#22c55e,#15803d)",color:"#fff",border:"none",display:"flex",alignItems:"center",justifyContent:"center",gap:8,letterSpacing:"0.08em"},children:[e.jsx(ya,{style:{width:16,height:16}})," RELEASE"]}):t.status==="pending"&&!pt?e.jsxs("button",{className:"press",onClick:()=>r(t.id),style:{flex:1,height:56,borderRadius:12,fontWeight:900,fontSize:15,cursor:"pointer",background:"linear-gradient(135deg,#D4A017,#b8860b)",color:"#000",border:"none",display:"flex",alignItems:"center",justifyContent:"center",gap:6,letterSpacing:"0.05em"},children:[e.jsx(Be,{style:{width:15,height:15}})," START"]}):e.jsx("button",{className:"press",onClick:()=>{Z||f?.(t.id,"All")},disabled:Z,style:{flex:1,height:56,borderRadius:12,fontWeight:900,fontSize:15,cursor:Z?"not-allowed":"pointer",background:Z?"rgba(96,165,250,0.10)":"rgba(34,197,94,0.12)",color:Z?"#60a5fa":W?"#4ade80":"#15803d",border:Z?"1.5px solid rgba(96,165,250,0.35)":"1.5px solid rgba(34,197,94,0.3)",display:"flex",alignItems:"center",justifyContent:"center",gap:6,letterSpacing:"0.05em"},children:Z?e.jsxs(e.Fragment,{children:[e.jsx(we,{style:{width:15,height:15}})," ITEM HELD"]}):e.jsxs(e.Fragment,{children:[e.jsx(Ce,{style:{width:15,height:15}})," DONE"]})}),Q?e.jsxs("button",{className:"press",onClick:()=>r(t.id),title:"Resume",style:{height:56,padding:"0 16px",borderRadius:12,fontWeight:800,fontSize:13,cursor:"pointer",background:"rgba(96,165,250,0.12)",color:"#60a5fa",border:"1.5px solid rgba(96,165,250,0.35)",display:"flex",alignItems:"center",justifyContent:"center",gap:5,whiteSpace:"nowrap"},children:[e.jsx(Be,{style:{width:15,height:15}})," RESUME"]}):t.status!=="pending"&&e.jsxs("button",{className:"press",onClick:()=>a(t.id),title:"Hold",style:{height:56,padding:"0 16px",borderRadius:12,fontWeight:800,fontSize:13,cursor:"pointer",background:"rgba(96,165,250,0.12)",color:"#60a5fa",border:"1.5px solid rgba(96,165,250,0.35)",display:"flex",alignItems:"center",justifyContent:"center",gap:5,whiteSpace:"nowrap"},children:[e.jsx(we,{style:{width:15,height:15}})," HOLD"]}),t._rushed?e.jsx("button",{className:"press",onClick:()=>k?.(t.id),title:"Unrush",style:{height:56,padding:"0 12px",borderRadius:12,fontWeight:800,fontSize:11,cursor:"pointer",background:"rgba(239,68,68,0.18)",color:"#f87171",border:"1.5px solid rgba(239,68,68,0.45)",display:"flex",alignItems:"center",justifyContent:"center",gap:4,letterSpacing:"0.05em",whiteSpace:"nowrap",boxShadow:"0 0 10px 1px rgba(239,68,68,0.30)",animation:"kds-red-pulse 1.8s ease-in-out 3"},children:"ð© RUSH"}):e.jsx("button",{className:"press",onClick:()=>S?.(t.id),title:"Mark as Rush",style:{height:56,padding:"0 12px",borderRadius:12,fontWeight:700,fontSize:11,cursor:"pointer",background:"transparent",color:"rgba(239,68,68,0.4)",border:"1.5px solid rgba(239,68,68,0.18)",display:"flex",alignItems:"center",justifyContent:"center"},children:"ð©"})]}):e.jsxs("div",{style:{display:"flex",gap:7,flexWrap:"wrap",padding:ge||G?"0 14px":0,marginTop:G?4:0},children:[t.status==="pending"&&!pt&&e.jsxs("button",{className:"press",onClick:()=>r(t.id),style:{flex:1,height:56,borderRadius:12,fontWeight:900,fontSize:15,cursor:"pointer",background:"linear-gradient(135deg,#D4A017,#b8860b)",color:"#000",border:"none",display:"flex",alignItems:"center",justifyContent:"center",gap:6,letterSpacing:"0.05em"},children:[e.jsx(Be,{style:{width:15,height:15}})," START"]}),t.status==="in-progress"&&!Q&&e.jsxs("button",{className:"press",onClick:()=>a(t.id),style:{flex:1,height:56,borderRadius:12,fontWeight:900,fontSize:15,cursor:"pointer",background:"rgba(96,165,250,0.12)",color:"#60a5fa",border:"1.5px solid rgba(96,165,250,0.35)",display:"flex",alignItems:"center",justifyContent:"center",gap:6,letterSpacing:"0.05em"},children:[e.jsx(we,{style:{width:15,height:15}})," HOLD"]}),Q&&e.jsxs("button",{className:"press",onClick:()=>r(t.id),style:{flex:1,height:56,borderRadius:12,fontWeight:900,fontSize:15,cursor:"pointer",background:"rgba(96,165,250,0.12)",color:"#60a5fa",border:"1.5px solid rgba(96,165,250,0.35)",display:"flex",alignItems:"center",justifyContent:"center",gap:6,letterSpacing:"0.05em"},children:[e.jsx(Be,{style:{width:15,height:15}})," RESUME"]}),(t.status==="in-progress"||t.status==="pending"&&pt)&&me&&!(B&&he)&&e.jsx("button",{className:"press",onClick:()=>
106{Z||f?.(t.id,g==="prep"?x:"All")},disabled:Z,title:Z?"Resume held items before marking done":void 0,style:{flex:1,height:56,borderRadius:12,fontWeight:900,fontSize:15,cursor:Z?"not-allowed":"pointer",background:Z?"rgba(96,165,250,0.10)":he?"linear-gradient(135deg,#22c55e,#15803d)":"rgba(34,197,94,0.12)",color:Z?"#60a5fa":he?"#fff":W?"#4ade80":"#15803d",border:Z?"1.5px solid rgba(96,165,250,0.35)":he?"1.5px solid rgba(34,197,94,0.6)":"1.5px solid rgba(34,197,94,0.3)",display:"flex",alignItems:"center",justifyContent:"center",gap:6,letterSpacing:"0.05em",transition:"background-color 0.2s ease, color 0.2s ease, transform 0.2s ease, border-color 0.2s ease, opacity 0.2s ease"},children:Z?e.jsxs(e.Fragment,{children:[e.jsx(we,{style:{width:15,height:15}})," ITEM HELD"]}):e.jsxs(e.Fragment,{children:[e.jsx(Ce,{style:{width:15,height:15}})," DONE"]})}),t._rushed?e.jsx("button",{className:"press",onClick:()=>k?.(t.id),title:"Unrush",style:{height:56,padding:"0 12px",borderRadius:12,fontWeight:800,fontSize:11,cursor:"pointer",background:"rgba(239,68,68,0.18)",color:"#f87171",border:"1.5px solid rgba(239,68,68,0.45)",display:"flex",alignItems:"center",justifyContent:"center",gap:4,letterSpacing:"0.05em",whiteSpace:"nowrap",boxShadow:"0 0 10px 1px rgba(239,68,68,0.30)",animation:"kds-red-pulse 1.8s ease-in-out 3"},children:"ð© RUSH"}):e.jsx("button",{className:"press",onClick:()=>S?.(t.id),title:"Mark as Rush",style:{height:56,padding:"0 12px",borderRadius:12,fontWeight:700,fontSize:11,cursor:"pointer",background:"transparent",color:"rgba(239,68,68,0.4)",border:"1.5px solid rgba(239,68,68,0.18)",display:"flex",alignItems:"center",justifyContent:"center"},children:"ð©"})]}),e.jsx(Hr,{open:!!Qe,item:Qe,onConfirm:()=>{Qe&&M?.(t.id,Qe.id)},onClose:()=>At(null)}),e.jsx(St,{open:st,onClose:()=>Ve(!1),order:t,anchor:lt,onReport:_})]})}ma("Smart KDS");const Yr=[{k:"qrave",l:"QRAVE"},{k:"traditional",l:"Traditional"},{k:"minimalist",l:"Minimalist"}],Xr=[{k:"time_age",l:"Time age"},{k:"order_type",l:"Order type"},{k:"none",l:"Off"}];let He=0;const oe=(t,a,r,o="pending",i=[])=>({id:`i${++He}`,name:t,qty:a,status:o,station:r,modifiers:i.length?i:void 0}),ca=()=>{const t=Date.now();return[{id:"kds-t4",_orderNumber:"1052",order_type:"dine-in",table:"4",_guestName:"Walk-in",station:"Grill",payment_status:"paid",status:"pending",firedAt:t-13e4,startedAt:t-13e4,items:[oe("Short rib",1,"Grill","pending",["No horseradish"]),oe("Caesar salad",1,"Salad"),oe("Fries",1,"Fryer")]},{id:"kds-b2",_orderNumber:"1053",order_type:"bar",_guestName:"Sam",station:"Bar",status:"in-progress",firedAt:t-338e3,startedAt:t-32e4,items:[oe("Negroni",2,"Bar","in-progress"),oe("Truffle fries",1,"Fryer")]},{id:"kds-t11",_orderNumber:"1054",order_type:"dine-in",table:"11",_guestName:"Chen party · 4",station:"Sauté",status:"pending",firedAt:t-425e3,startedAt:t-425e3,items:[oe("Salmon",1,"Sauté"),oe("Risotto",1,"Sauté","pending",["Extra parmesan"]),oe("Burrata",2,"Salad")]}]},$e=()=>{const t=Date.now();return{id:`kds-n${++He}`,_orderNumber:String(1055+He),order_type:"takeout",_guestName:"Alex",station:He%2?"Fryer":"Grill",status:"pending",firedAt:t,startedAt:t,items:He%2?[oe("Smash burger",2,"Grill"),oe("Onion rings",1,"Fryer","pending",["Extra crispy"])]:[oe("Steak frites",1,"Grill"),oe("Kids pasta",1,"Sauté")]}};function Jr(){const[t,a]=p.useState(()=>ca().slice(0,2)),[r,o]=p.useState(0),[i,f]=p.useState(new Set),[l,h]=p.useState("qrave"),[c,S]=p.useState("time_age"),k=s=>{ia({cardStyle:s}),h(s)},_=s=>{ia({headerColorMode:s}),S(s)},M=p.useRef(null);if(M.current===null){const s=$e();s.firedAt=Date.now()-43e4,s.startedAt=s.firedAt,M.current=[s,$e(),$e()]}const v=(s,y)=>a(z=>z.map(j=>j.id===s?y(j):j)),m=s=>v(s,y=>({...y,status:"in-progress",held:!1,heldAt:void 0,startedAt:y.firedAt||Date.now()})),g=s=>v(s,y=>({...y,held:!0,heldAt:new Date().toISOString()})),x=s=>v(s,y=>({...y,_rushed:!0})),d=s=>v(s,y=>({...y,_rushed:!1})),R=(s,y)=>v(s,z=>({...z,items:z.items.map(j=>j.id===y?{...j,status:j.status==="done"?"pending":"done"}:j)})),w=s=>{v(s,y=>({...y,items:y.items.map(z=>({...z,status:"done"}))})),setTimeout(()=>a(y=>y.filter(z=>z.id!==s)),1e3)};return p.useEffect(()=>{if(t.length>0&&t.length<2&&r<M.current.length){const s=setTimeout(()=>{const y=M.current[r];a(z=>[...z,y]),f(z=>new Set(z).add(y.id)),o(z=>z+1),setTimeout(()=>f(z=>{const j=new Set(z);return j.delete(y.id),j}),1300)},900);return()=>clearTimeout(s)}},[t,r]),t.length===0?e.jsxs("div",{className:"p-10 text-center",children:[e.jsx(Ce,{size:26,strokeWidth:2.4,className:"mx-auto text-primary"}),e.jsx("p",{className:"mt-3 text-sm font-bold",children:"All clear"}),e.jsx("p",{className:"mt-1 text-[13px] text-muted-foreground",children:"Every ticket bumped. The kitchen is caught up."}),e.jsx("button",{type:"button",className:"btn btn-sm mt-5",style:{border:"1px solid var(--accent-border)",background:"var(--accent-soft)",color:"hsl(var(--primary-ink))"},onClick:()=>{a(ca().slice(0,2)),M.current=[$e(),$e(),$e()],o(0)},children:"Deal a new rush"})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2 border-b px-4 py-3",style:{borderColor:"hsl(var(--border))"},children:[e.jsx("span",{className:"font-mono text-[9px] uppercase tracking-[0.14em] text-muted-foreground",children:"Card style"}),Yr.map(s=>e.jsx("button",{type:"button","aria-pressed":l===s.k,onClick:()=>k(s.k),className:"rounded-full px-3 py-1 font-mono text-[10px] font-bold uppercase tracking-[0.1em] transition-colors",style:{background:l===s.k?"var(--accent-soft)":"transparent",border:`1px solid ${l===s.k?"var(--accent-border)":"hsl(var(--border))"}`,color:l===s.k?"hsl(var(--primary-ink))":"hsl(var(--muted-foreground))"},children:s.l},s.k)),e.jsx("span",{className:"ml-auto font-mono text-[9px] uppercase tracking-[0.14em] text-muted-foreground",children:"Header"}),Xr.map(s=>e.jsx("button",{type:"button","aria-pressed":c===s.k,onClick:()=>_(s.k),className:"rounded-full px-3 py-1 font-mono text-[10px] font-bold uppercase tracking-[0.1em] transition-colors",style:{background:c===s.k?"var(--accent-soft)":"transparent",border:`1px solid ${c===s.k?"var(--accent-border)":"hsl(var(--border))"}`,color:c===s.k?"hsl(var(--primary-ink))":"hsl(var(--muted-foreground))"},children:s.l},s.k))]}),e.jsx("div",{className:"grid gap-4 p-4 sm:grid-cols-2 md:p-5",children:t.map(s=>e.jsx(Qr,{order:s,isNew:i.has(s.id),isDragging:!1,mode:"prep",stationFilter:"All",hasStations:!0,holdGesture:"drag",userRole:"manager",restaurant:null,onStart:m,onItemToggle:R,onItemHold:()=>{},onMarkDone:w,onHold:g,onRush:x,onUnrush:d,onUndoRequest:()=>{},onReportIssue:()=>{},onRefireItem:()=>{},onRelease:()=>{}},s.id))},`${l}-${c}`)]})}const Zr=[{l:"Revenue tonight",v:"$4,280"},{l:"Covers",v:"102"},{l:"Avg check",v:"$42"},{l:"Labour",v:"22.4%"},{l:"Open tickets",v:"8"}],pa=[{h:"5pm",v:420},{h:"6pm",v:660},{h:"7pm",v:590},{h:"8pm",v:780},{h:"9pm",v:890,now:!0},{h:"10pm",v:640},{h:"11pm",v:300}],ei=[{tag:"86 risk",ink:"hsl(var(--destructive))",title:"Burrata down to 2 portions",d:"Trending out before the 9pm push â three tables have it in their cart."},{tag:"labour",ink:"hsl(var(--muted-foreground))",title:"22.4% against your 25% target",d:"Within range, no overtime. Friday forecast adds ~15% covers; two more servers suggested."}
106,{tag:"top server",ink:"hsl(var(--primary-ink))",title:"Maria â $820 on 4.2 hours",d:"19% of tonightâs revenue. Second Friday running at the top of the board."}];function ti(){const t=Math.max(...pa.map(a=>a.v));return e.jsxs("div",{className:"p-4 md:p-6",children:[e.jsx("p",{className:"mb-3 font-mono text-[10px] uppercase tracking-[0.14em] text-muted-foreground",children:"Demo Kitchen · a sample evening â live in the product"}),e.jsx("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-5",children:Zr.map(a=>e.jsxs("div",{className:"flex h-full flex-col justify-between gap-2 rounded-2xl px-4 py-3",style:{background:"hsl(var(--background))",border:"1px solid hsl(var(--border))"},children:[e.jsx("p",{className:"font-mono text-[9px] uppercase tracking-[0.14em] text-muted-foreground",children:a.l}),e.jsx("p",{className:"font-mono text-xl font-bold tabular-nums",children:a.v})]},a.l))}),e.jsxs("div",{className:"mt-5 rounded-2xl p-5",style:{background:"hsl(var(--background))",border:"1px solid hsl(var(--border))"},children:[e.jsxs("div",{className:"flex items-baseline justify-between",children:[e.jsx("p",{className:"font-mono text-[10px] uppercase tracking-[0.14em] text-muted-foreground",children:"Revenue by hour · tonight"}),e.jsxs("p",{className:"font-mono text-[10px] text-muted-foreground",children:["vs last Friday ",e.jsx("span",{className:"font-bold",style:{color:"hsl(var(--primary-ink))"},children:"+12.4%"})]})]}),e.jsx("div",{className:"mt-4 flex items-end gap-2",children:pa.map(a=>e.jsxs("div",{className:"flex flex-1 flex-col items-center gap-2",children:[e.jsx("div",{className:"flex h-[140px] w-full items-end",children:e.jsx("div",{className:"w-full rounded-t-md",style:{height:`${Math.max(4,a.v/t*100)}%`,background:a.now?"hsl(var(--primary))":"hsl(var(--secondary))",border:a.now?"1px solid var(--accent-border)":"1px solid hsl(var(--border))"}})}),e.jsxs("span",{className:"font-mono text-[9px] text-muted-foreground",children:["$",(a.v/1e3).toFixed(1),"k"]}),e.jsx("span",{className:"font-mono text-[9px] uppercase text-muted-foreground",children:a.h})]},a.h))})]}),e.jsxs("div",{className:"mt-5",children:[e.jsx("p",{className:"font-mono text-[10px] uppercase tracking-[0.14em] text-muted-foreground",children:"Quinn AI noticed · three things"}),e.jsx("ul",{className:"mt-3",children:ei.map(a=>e.jsxs("li",{className:"flex flex-col gap-1 border-t py-3.5 sm:flex-row sm:items-baseline sm:gap-5",style:{borderColor:"hsl(var(--border))"},children:[e.jsx("span",{className:"w-[88px] shrink-0 font-mono text-[10px] font-bold uppercase tracking-[0.14em]",style:{color:a.ink},children:a.tag}),e.jsx("span",{className:"text-[13px] font-semibold",children:a.title}),e.jsx("span",{className:"text-[13px] leading-relaxed text-muted-foreground sm:flex-1",children:a.d})]},a.tag))})]})]})}const ai=[{icon:Xa,t:"A browser",d:"QRAVE OS runs on a laptop, a counter terminal or a phone. Nothing to install and nothing to sign up for first."}
106,{icon:an,t:"The demo login",d:"We walk you through the demo venue on a call, using your own menu. Ask for a session whenever you are ready."},{icon:ua,t:"The guest side is open",d:"Book a table at the Demo Kitchen from your phone. No login at all."}];function wi(){return e.jsxs(e.Fragment,{children:[e.jsx(Ha,{eyebrow:"Live demo · the Demo Kitchen",title:e.jsxs(e.Fragment,{children:["See it running ",e.jsx("span",{className:"text-primary",children:"before you talk to anyone."})]}),lede:"QRAVE OS is live with the Demo Kitchen loaded: a full menu, a floor, a kitchen, staff on the clock and stock in the walk-in. Sign in, seat a table, fire a ticket, close a check. Every screen here is the build, not a video of it.",kicker:"Nothing to install. It runs in a browser, on a laptop or a phone.",ctas:[{to:"/products/os",label:"See the platform"},{to:"https://book.qrave.ai",label:"Book a table",variant:"outline",external:!0}],media:e.jsx(nt,{bezel:"display",src:"/images/app/book-desktop-2026.webp",alt:"Qrave command center with the Demo Kitchen loaded",caption:"Demo Kitchen · one login, every surface"})}),e.jsx("section",{className:"section border-b border-border",children:e.jsx("div",{className:"container-page",children:e.jsx("div",{className:"grid gap-4 md:grid-cols-3",children:ai.map(({icon:t,t:a,d:r},o)=>e.jsx(We,{delay:o*.06,className:"h-full",children:e.jsxs("div",{className:"flex h-full items-start gap-3.5 rounded-2xl p-5",style:{border:"1px solid hsl(var(--border))"},children:[e.jsx("span",{className:"inline-flex h-9 w-9 shrink-0 items-center justify-center rounded-xl",style:{background:"var(--accent-soft)",border:"1px solid var(--accent-border)",color:"hsl(var(--primary-ink))"},children:e.jsx(t,{size:16,strokeWidth:2})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-sm font-bold",children:a}),e.jsx("p",{className:"mt-1 text-[13px] leading-relaxed text-muted-foreground",children:r})]})]})},a))})})}),e.jsx("section",{className:"section",children:e.jsxs("div",{className:"container-page",children:[e.jsx(Ot,{eyebrow:"The tour",title:e.jsxs(e.Fragment,{children:["Five stops, ",e.jsx("span",{className:"text-primary",children:"one service."})]}),sub:"Everything you click is the real build running the Demo Kitchen: a full menu, staff on the clock, stock in the walk-in and guests with a history. Nothing you press can break it."}),e.jsxs("div",{className:"mt-16",children:[e.jsxs(We,{className:"mx-auto max-w-3xl text-center",children:[e.jsx("p",{className:"eyebrow mb-3",children:"Stop 01 · the floor"}),e.jsx("h3",{className:"font-display text-2xl font-semibold tracking-tight md:text-3xl",children:"Click a table and the whole room answers"}),e.jsx("p",{className:"mt-4 text-muted-foreground",children:"Start here. TableHub shows the room the way service feels, and every click lands on the one record the kitchen, the check and the money all read from. The notes walk you through what each part of the screen means; hover one to hold it."}),e.jsx("ul",{className:"mt-5 flex flex-wrap items-center justify-center gap-x-6 gap-y-2 text-[13px] text-muted-foreground",children:["Seat a walk-in and watch the table state change","Open a check and split it by seat","Start a turn timer and see the pace read under the table"].map(t=>e.jsxs("li",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"h-1.5 w-1.5 rounded-full",style:{background:"var(--accent-border)"}}),t]},t))})]}),e.jsxs(We,{delay:.1,className:"mt-12",children:[e.jsx(Ln,{}),e.jsx("p",{className:"mt-5 text-center font-mono text-[11px] text-muted-foreground",children:"TableHub · the Demo Kitchen floor, live build · follow the numbers"})]})]}),e.jsxs("div",{className:"mt-24",children:[e.jsxs(We,{className:"mx-auto max-w-3xl text-center",children:[e.jsx("p",{className:"eyebrow mb-3",children:"Stop 02 · the till"}),e.jsx("h3",{className:"font-display text-2xl font-semibold tracking-tight md:text-3xl",children:"Ring it in the way your servers actually work"}),e.jsx("p",{className:"mt-4 text-muted-foreground",children:"The same terminal in all three layout styles: QRAVE, Traditional and Minimalist. Tap a dish to open the modifier gate, Done adds it to the check, and the qty steppers, hold and send all answer. Nothing here is a screenshot."})]}),e.jsxs(We,{delay:.1,className:"mt-12",children:[e.jsx(xr,{}),e.jsx("p",{className:"mt-5 text-center font-mono text-[11px] text-muted-foreground",children:"POS V2 · the Demo Kitchen menu, live build · tap a dish, then Done"})]})]}),e.jsxs("div",{className:"mt-24 space-y-24",children:[e.jsx(bt,{flip:!0,eyebrow:"Stop 03 · the kitchen",t
106itle:"Fire a ticket and watch the pass sort itself",body:"Open the kitchen next. Every ticket routes to the station that has to cook it and carries its own clock, so the question is never what came in, it is what has been sitting too long.",points:["Bump a ticket and watch the expo view clear","86 an item and see it land on every screen","Read the timer colours before anything dies in the window"],media:e.jsx(nt,{bezel:"display",caption:"Smart KDS · switch the card style, press Start, then bump it",children:e.jsx(Jr,{})})}),e.jsx(bt,{eyebrow:"Stop 04 · the money",title:"Read the night while it is still happening",body:"Insights runs on the same records the floor does, so revenue, covers, average check and labour percent are live during service instead of being reconstructed from receipts on Thursday.",points:["Read revenue, covers and average check for the night","Check labour against the target you set","Ask Quinn AI what changed since last week"],media:e.jsx(nt,{bezel:"display",caption:"Insights · tonight, live",children:e.jsx(ti,{})})}),e.jsx(bt,{flip:!0,eyebrow:"Stop 05 · the guest side",title:"Take the other side of the table",body:"Book a table at the Demo Kitchen from a phone and you are in the guest app: the same map, the same menu, the same booking your own guests will use. This is the half of QRAVE your customers actually touch.",points:["Book a table for tonight with no login","Add a pre-order that fires when you check in","Scan the QR code and watch the floor update itself"],media:e.jsx(nt,{bezel:"display",caption:"Qrave App · find a table, book it",children:e.jsx("div",{className:"relative aspect-[16/10] w-full",children:e.jsx(Tt,{src:"/videos/wt-booking.mp4",poster:"/videos/wt-booking-poster.jpg"})})})})]})]})}),e.jsx("section",{className:"section",children:e.jsxs("div",{className:"container-page",children:[e.jsx(Ot,{eyebrow:"The films",title:e.jsxs(e.Fragment,{children:["The product, ",e.jsx("span",{className:"text-primary",children:"in motion."})]}),sub:"The short cut we run for social, and the loops behind it."}),e.jsxs("div",{className:"mx-auto mt-6 grid max-w-[1100px] gap-6 sm:grid-cols-2",children:[e.jsx(Ta,{src:"/videos/commercial-qrave.mp4",poster:"/videos/commercial-qrave-poster.jpg",title:"The thirty-second cut",caption:"The short cut · room, product, done"}),e.jsx("div",{className:"grid grid-cols-3 gap-3",children:[{src:"/videos/vert-pass.mp4",poster:"/videos/vert-pass-poster.jpg",cap:"The pass"},{src:"/videos/vert-pour.mp4",poster:"/videos/vert-pour-poster.jpg",cap:"The ritual"}].map(t=>e.jsxs("figure",{children:[e.jsxs("video",{poster:t.poster,muted:!0,loop:!0,playsInline:!0,autoPlay:!0,preload:"metadata",className:"aspect-[9/16] w-full rounded-xl object-cover",style:{border:"1px solid hsl(var(--border))"},children:[e.jsx("source",{src:t.src.replace(".mp4",".webm"),type:"video/webm"}),e.jsx("source",{src:t.src,type:"video/mp4"})]}),e.jsx("figcaption",{className:"mt-2 text-center font-mono text-[10px] text-muted-foreground",children:t.cap})]},t.cap))})]})]})}),e.jsx("section",{className:"relative overflow-hidden",children:e.jsx("div",{className:"container-page",children:e.jsx(We,{children:e.jsxs("div",{className:"relative aspect-[21/9] w-full overflow-hidden rounded-3xl",style:{border:"1px solid hsl(var(--border))"},children:[e.jsx(Tt,{src:"/videos/web-open.mp4",poster:"/videos/web-open-poster.jpg"}),e.jsxs("div",{className:"pointer-events-none absolute inset-x-0 bottom-0 p-5 md:p-7",style:{background:"linear-gradient(180deg, transparent, rgba(10,10,12,0.72))"},children:[e.jsx("p",{className:"font-mono text-[11px] uppercase tracking-[0.16em] text-white/70",children:"Before service · the room coming up"}),e.jsx("p",{className:"mt-1 max-w-lg font-display text-lg font-semibold text-white md:text-xl",children:"Ten minutes in the product and you will know whether it fits your floor."})]})]})})})}),e.jsx(qa,{title:e.jsxs(e.Fragment,{children:["Want someone to drive it ",e.jsx("span",{className:"text-primary",children:"while you watch?"})]}),sub:"Thirty minutes on the real product, with a sample of your own menu loaded and no slides. You press the buttons, we answer the question behind them.",primary:{to:"/inquiry",label:"Book a guided session"},secondary:{to:"/contact",label:"Ask a question"},image:"/images/brand/demo-set-table.webp",alt:"A host working from a tablet at the door"})]})}
106export{wi as default};
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.