1import{c as $,t as U,r,T as as,s as et,a as ns,j as e,b as me,P as T,u as pe,d as _e,e as j,f as tt,g as ke,h as y,i as te,k as st,l as at,m as nt,R as os,A as rs,n as xe,o as cs,p as is,q as ds,v as ls,w as us,x as ms,F as ps,D as xs,C as fs,y as hs,z as ot,B as gs,E as bs,G as vs,X as ws,H as ys,I as js,J as Rs,O as As,K as Ns,S as rt,L as ct,M as Ss,N as Ms,Q as Cs,U as B,V as Ds,W as _s,Y as je,Z as qe,_ as ks,$ as Re,a0 as Ve,a1 as Is,a2 as Es,a3 as Ls,a4 as Ps,a5 as Ts,a6 as Os,a7 as Fs,a8 as zs}from"./index-dQdTyjMz.js";import{A as Bs}from"./arrow-left-uVZRO6Ia.js";/** 2 * @license lucide-react v0.453.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 Gs=$("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/** 7 * @license lucide-react v0.453.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 it=$("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/** 12 * @license lucide-react v0.453.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 Ks=$("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/** 17 * @license lucide-react v0.453.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 Us=$("MailCheck",[["path",{d:"M22 13V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v12c0 1.1.9 2 2 2h8",key:"12jkf8"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}],["path",{d:"m16 19 2 2 4-4",key:"1b14m6"}]]);/** 22 * @license lucide-react v0.453.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 dt=$("PanelLeft",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]);/** 27 * @license lucide-react v0.453.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 We=$("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/** 32 * @license lucide-react v0.453.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 $s=$("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** 37 * @license lucide-react v0.453.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 Hs=$("Telescope",[["path",{d:"m10.065 12.493-6.18 1.318a.934.934 0 0 1-1.108-.702l-.537-2.15a1.07 1.07 0 0 1 .691-1.265l13.504-4.44",key:"k4qptu"}],["path",{d:"m13.56 11.747 4.332-.924",key:"19l80z"}],["path",{d:"m16 21-3.105-6.21",key:"7oh9d"}],["path",{d:"M16.485 5.94a2 2 0 0 1 1.455-2.425l1.09-.272a1 1 0 0 1 1.212.727l1.515 6.06a1 1 0 0 1-.727 1.213l-1.09.272a2 2 0 0 1-2.425-1.455z",key:"m7xp4m"}],["path",{d:"m6.158 8.633 1.114 4.456",key:"74o979"}],["path",{d:"m8 21 3.105-6.21",key:"1fvxut"}],["circle",{cx:"12",cy:"13",r:"2",key:"1c1ljs"}]]);function Pe(t){const{redirectOnUnauthenticated:s=!1,redirectPath:a}={},n=U.useUtils(),o=U.auth.me.useQuery(void 0,{retry:!1,refetchOnWindowFocus:!1}),c=U.auth.logout.useMutation({onSuccess:()=>{n.auth.me.setData(void 0,null)}}),l=r.useCallback(async()=>{try{await c.mutateAsync()}catch(p){if(p instanceof as&&p.data?.code==="UNAUTHORIZED")return;throw p}finally{try{sessionStorage.removeItem("manus-cookie")}catch{}
vendor: 8,054 bytes, line 41
41n.auth.me.setData(void 0,null),await n.auth.me.invalidate()}},[c,n]),i=r.useMemo(()=>(localStorage.setItem("manus-runtime-user-info",JSON.stringify(o.data)),{user:o.data??null,loading:o.isLoading||c.isPending,error:o.error??c.error??null,isAuthenticated:!!o.data}),[o.data,o.error,o.isLoading,c.error,c.isPending]);return r.useEffect(()=>{s&&(o.isLoading||c.isPending||i.user||typeof window>"u"||a&&window.location.pathname===a||(a?window.location.href=a:et()))},[s,a,c.isPending,o.isLoading,i.user]),{...i,refresh:()=>o.refetch(),logout:l}}function qs(){return ns.useSyncExternalStore(Vs,()=>!0,()=>!1)}function Vs(){return()=>{}}var Te="Avatar",[Ws]=me(Te),[Ys,lt]=Ws(Te),ut=r.forwardRef((t,s)=>{const{__scopeAvatar:a,...n}=t,[o,c]=r.useState("idle");return e.jsx(Ys,{scope:a,imageLoadingStatus:o,onImageLoadingStatusChange:c,children:e.jsx(T.span,{...n,ref:s})})});ut.displayName=Te;var mt="AvatarImage",Xs=r.forwardRef((t,s)=>{const{__scopeAvatar:a,src:n,onLoadingStatusChange:o=()=>{},...c}=t,l=lt(mt,a),i=Qs(n,c),p=pe(x=>{o(x),l.onImageLoadingStatusChange(x)});return _e(()=>{i!=="idle"&&p(i)},[i,p]),i==="loaded"?e.jsx(T.img,{...c,ref:s,src:n}):null});Xs.displayName=mt;var pt="AvatarFallback",xt=r.forwardRef((t,s)=>{const{__scopeAvatar:a,delayMs:n,...o}=t,c=lt(pt,a),[l,i]=r.useState(n===void 0);return r.useEffect(()=>{if(n!==void 0){const p=window.setTimeout(()=>i(!0),n);return()=>window.clearTimeout(p)}},[n]),l&&c.imageLoadingStatus!=="loaded"?e.jsx(T.span,{...o,ref:s}):null});xt.displayName=pt;function Ye(t,s){return t?s?(t.src!==s&&(t.src=s),t.complete&&t.naturalWidth>0?"loaded":"loading"):"error":"idle"}function Qs(t,{referrerPolicy:s,crossOrigin:a}){const n=qs(),o=r.useRef(null),c=n?(o.current||(o.current=new window.Image),o.current):null,[l,i]=r.useState(()=>Ye(c,t));return _e(()=>{i(Ye(c,t))},[c,t]),_e(()=>{const p=u=>()=>{i(u)};if(!c)return;const x=p("loaded"),d=p("error");return c.addEventListener("load",x),c.addEventListener("error",d),s&&(c.referrerPolicy=s),typeof a=="string"&&(c.crossOrigin=a),()=>{c.removeEventListener("load",x),c.removeEventListener("error",d)}},[c,a,s]),l}var Zs=ut,Js=xt;function ea({className:t,...s}){return e.jsx(Zs,{"data-loc":"client/src/components/ui/avatar.tsx:11","data-slot":"avatar",className:j("relative flex size-8 shrink-0 overflow-hidden rounded-full",t),...s})}function ta({className:t,...s}){return e.jsx(Js,{"data-loc":"client/src/components/ui/avatar.tsx:40","data-slot":"avatar-fallback",className:j("bg-muted flex size-full items-center justify-center rounded-full",t),...s})}var Ae="rovingFocusGroup.onEntryFocus",sa={bubbles:!1,cancelable:!0},ce="RovingFocusGroup",[Ie,ft,aa]=tt(ce),[na,ht]=me(ce,[aa]),[oa,ra]=na(ce),gt=r.forwardRef((t,s)=>e.jsx(Ie.Provider,{scope:t.__scopeRovingFocusGroup,children:e.jsx(Ie.Slot,{scope:t.__scopeRovingFocusGroup,children:e.jsx(ca,{...t,ref:s})})}));gt.displayName=ce;var ca=r.forwardRef((t,s)=>{const{__scopeRovingFocusGroup:a,orientation:n,loop:o=!1,dir:c,currentTabStopId:l,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:p,onEntryFocus:x,preventScrollOnEntryFocus:d=!1,...u}=t,h=r.useRef(null),R=te(s,h),f=st(c),[N,v]=at({prop:l,defaultProp:i??null,onChange:p,caller:ce}),[w,A]=r.useState(!1),C=pe(x),S=ft(a),D=r.useRef(!1),[H,b]=r.useState(0);return r.useEffect(()=>{const M=h.current;if(M)return M.addEventListener(Ae,C),()=>M.removeEventListener(Ae,C)},[C]),e.jsx(oa,{scope:a,orientation:n,dir:f,loop:o,currentTabStopId:N,onItemFocus:r.useCallback(M=>v(M),[v]),onItemShiftTab:r.useCallback(()=>A(!0),[]),onFocusableItemAdd:r.useCallback(()=>b(M=>M+1),[]),onFocusableItemRemove:r.useCallback(()=>b(M=>M-1),[]),children:e.jsx(T.div,{tabIndex:w||H===0?-1:0,"data-orientation":n,...u,ref:R,style:{outline:"none",...t.style},onMouseDown:y(t.onMouseDown,()=>{D.current=!0}),onFocus:y(t.onFocus,M=>{const O=!D.current;if(M.target===M.currentTarget&&O&&!w){const P=new CustomEvent(Ae,sa);if(M.currentTarget.dispatchEvent(P),!P.defaultPrevented){const G=S().filter(z=>z.focusable),K=G.find(z=>z.active),m=G.find(z=>z.id===N),ve=[K,m,...G].filter(Boolean).map(z=>z.ref.current);wt(ve,d)}}D.current=!1}),onBlur:y(t.onBlur,()=>A(!1))})})}),bt="RovingFocusGroupItem",vt=r.forwardRef((t,s)=>{const{__scopeRovingFocusGroup:a,focusable:n=!0,active:o=!1,tabStopId:c,children:l,...i}=t,p=ke(),x=c||p,d=ra(bt,a),u=d.currentTabStopId===x,h=ft(a),{onFocusableItemAdd:R,onFocusableItemRemove:f,currentTabStopId:N}=d;return r.useEffect(()=>{if(n)return R(),()=>f()},[n,R,f]),e.jsx(Ie.ItemSlot,{scope:a,id:x,focusable:n,active:o,children:e.jsx(T.span,{tabIndex:u?0:-1,"data-orientation":d.orientation,...i,ref:s,onMouseDown:y(t.onMouseDown,v=>{n?d.onItemFocus(x):v.preventDefault()}),onFocus:y(t.onFocus,()=>d.onItemFocus(x)),onKeyDown:y(t.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){d.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const w=la(v,d.orientation,d.dir);if(w!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let C=h().filter(S=>S.focusable).map(S=>S.ref.current);if(w==="last")C.reverse();else if(w==="prev"||w==="next"){w==="prev"&&C.reverse();const S=C.indexOf(v.currentTarget);C=d.loop?ua(C,S+1):C.slice(S+1)}setTimeout(()=>wt(C))}}),children:typeof l=="function"?l({isCurrentTabStop:u,hasTabStop:N!=null}):l})})});vt.displayName=bt;var ia={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function da(t,s){return s!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function la(t,s,a){const n=da(t.key,a);if(!(s==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(s==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return ia[n]}function wt(t,s=!1){const a=document.activeElement;for(const n of t)if(n===a||(n.focus({preventScroll:s}),document.activeElement!==a))return}function ua(t,s){return t.map((a,n)=>t[(s+n)%t.length])}var ma=gt,pa=vt,Ee=["Enter"," "],xa=["ArrowDown","PageUp","Home"],yt=["ArrowUp","PageDown","End"],fa=[...xa,...yt],ha={ltr:[...Ee,"ArrowRight"],rtl:[...Ee,"ArrowLeft"]},ga={ltr:["ArrowLeft"],rtl:["ArrowRight"]},ie="Menu",[oe,ba,va]=tt(ie),[V,jt]=me(ie,[va,nt,ht]),fe=nt(),Rt=ht(),[wa,W]=V(ie),[ya,de]=V(ie),At=t=>{const{__scopeMenu:s,open:a=!1,children:n,dir:o,onOpenChange:c,modal:l=!0}=t,i=fe(s),[p,x]=r.useState(null),d=r.useRef(!1),u=pe(c),h=st(o);return r.useEffect(()=>{const R=()=>{d.current=!0,document.addEventListener("pointerdown",f,{capture:!0,once:!0}),document.addEventListener("pointermove",f,{capture:!0,once:!0})},f=()=>d.current=!1;return document.addEventListener("keydown",R,{capture:!0}),()=>{document.removeEventListener("keydown",R,{capture:!0}),document.removeEventListener("pointerdown",f,{capture:!0}),document.removeEventListener("pointermove",f,{capture:!0})}},[]),e.jsx(os,{...i,children:e.jsx(wa,{scope:s,open:a,onOpenChange:u,content:p,onContentChange:x,children:e.jsx(ya,{scope:s,onClose:r.useCallback(()=>u(!1),[u]),isUsingKeyboardRef:d,dir:h,modal:l,children:n})})})};At.displayName=ie;var ja="MenuAnchor",Oe=r.forwardRef((t,s)=>{const{__scopeMenu:a,...n}=t,o=fe(a);return e.jsx(rs,{...o,...n,ref:s})});Oe.displayName=ja;var Fe="MenuPortal",[Ra,Nt]=V(Fe,{forceMount:void 0}),St=t=>{const{__scopeMenu:s,forceMount:a,children:n,container:o}=t,c=W(Fe,s);return e.jsx(Ra,{scope:s,forceMount:a,children:e.jsx(xe,{present:a||c.open,children:e.jsx(cs,{asChild:!0,container:o,children:n})})})};St.displayName=Fe;var L="MenuContent",[Aa,ze]=V(L),Mt=r.forwardRef((t,s)=>{const a=Nt(L,t.__scopeMenu),{forceMount:n=a.forceMount,...o}=t,c=W(L,t.__scopeMenu),l=de(L,t.__scopeMenu);return e.jsx(oe.Provider,{scope:t.__scopeMenu,children:e.jsx(xe,{present:n||c.open,children:e.jsx(oe.Slot,{scope:t.__scopeMenu,children:l.modal?e.jsx(Na,{...o,ref:s}):e.jsx(Sa,{...o,ref:s})})})})}),Na=r.forwardRef((t,s)=>{const a=W(L,t.__scopeMenu),n=r.useRef(null),o=te(s,n);return r.useEffect(()=>{const c=n.current;if(c)return is(c)},[]),e.jsx(Be,{...t,ref:o,trapFocus:a.open,disableOutsidePointerEvents:a.open,disableOutsideScroll:!0,onFocusOutside:y(t.onF
vendor: 15,336 bytes, line 41
41ocusOutside,c=>c.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>a.onOpenChange(!1)})}),Sa=r.forwardRef((t,s)=>{const a=W(L,t.__scopeMenu);return e.jsx(Be,{...t,ref:s,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>a.onOpenChange(!1)})}),Ma=ms("MenuContent.ScrollLock"),Be=r.forwardRef((t,s)=>{const{__scopeMenu:a,loop:n=!1,trapFocus:o,onOpenAutoFocus:c,onCloseAutoFocus:l,disableOutsidePointerEvents:i,onEntryFocus:p,onEscapeKeyDown:x,onPointerDownOutside:d,onFocusOutside:u,onInteractOutside:h,onDismiss:R,disableOutsideScroll:f,...N}=t,v=W(L,a),w=de(L,a),A=fe(a),C=Rt(a),S=ba(a),[D,H]=r.useState(null),b=r.useRef(null),M=te(s,b,v.onContentChange),O=r.useRef(0),P=r.useRef(""),G=r.useRef(0),K=r.useRef(null),m=r.useRef("right"),F=r.useRef(0),ve=f?us:r.Fragment,z=f?{as:Ma,allowPinchZoom:!0}:void 0,ss=g=>{const X=P.current+g,q=S().filter(I=>!I.disabled),se=document.activeElement,we=q.find(I=>I.ref.current===se)?.textValue,ye=q.map(I=>I.textValue),$e=za(ye,X,we),ae=q.find(I=>I.textValue===$e)?.ref.current;(function I(He){P.current=He,window.clearTimeout(O.current),He!==""&&(O.current=window.setTimeout(()=>I(""),1e3))})(X),ae&&setTimeout(()=>ae.focus())};r.useEffect(()=>()=>window.clearTimeout(O.current),[]),ls();const Y=r.useCallback(g=>m.current===K.current?.side&&Ga(g,K.current?.area),[]);return e.jsx(Aa,{scope:a,searchRef:P,onItemEnter:r.useCallback(g=>{Y(g)&&g.preventDefault()},[Y]),onItemLeave:r.useCallback(g=>{Y(g)||(b.current?.focus(),H(null))},[Y]),onTriggerLeave:r.useCallback(g=>{Y(g)&&g.preventDefault()},[Y]),pointerGraceTimerRef:G,onPointerGraceIntentChange:r.useCallback(g=>{K.current=g},[]),children:e.jsx(ve,{...z,children:e.jsx(ps,{asChild:!0,trapped:o,onMountAutoFocus:y(c,g=>{g.preventDefault(),b.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:l,children:e.jsx(xs,{asChild:!0,disableOutsidePointerEvents:i,onEscapeKeyDown:x,onPointerDownOutside:d,onFocusOutside:u,onInteractOutside:h,onDismiss:R,children:e.jsx(ma,{asChild:!0,...C,dir:w.dir,orientation:"vertical",loop:n,currentTabStopId:D,onCurrentTabStopIdChange:H,onEntryFocus:y(p,g=>{w.isUsingKeyboardRef.current||g.preventDefault()}),preventScrollOnEntryFocus:!0,children:e.jsx(fs,{role:"menu","aria-orientation":"vertical","data-state":Ut(v.open),"data-radix-menu-content":"",dir:w.dir,...A,...N,ref:M,style:{outline:"none",...N.style},onKeyDown:y(N.onKeyDown,g=>{const q=g.target.closest("[data-radix-menu-content]")===g.currentTarget,se=g.ctrlKey||g.altKey||g.metaKey,we=g.key.length===1;q&&(g.key==="Tab"&&g.preventDefault(),!se&&we&&ss(g.key));const ye=b.current;if(g.target!==ye||!fa.includes(g.key))return;g.preventDefault();const ae=S().filter(I=>!I.disabled).map(I=>I.ref.current);yt.includes(g.key)&&ae.reverse(),Oa(ae)}),onBlur:y(t.onBlur,g=>{g.currentTarget.contains(g.target)||(window.clearTimeout(O.current),P.current="")}),onPointerMove:y(t.onPointerMove,re(g=>{const X=g.target,q=F.current!==g.clientX;if(g.currentTarget.contains(X)&&q){const se=g.clientX>F.current?"right":"left";m.current=se,F.current=g.clientX}}))})})})})})})});Mt.displayName=L;var Ca="MenuGroup",Ge=r.forwardRef((t,s)=>{const{__scopeMenu:a,...n}=t;return e.jsx(T.div,{role:"group",...n,ref:s})});Ge.displayName=Ca;var Da="MenuLabel",Ct=r.forwardRef((t,s)=>{const{__scopeMenu:a,...n}=t;return e.jsx(T.div,{...n,ref:s})});Ct.displayName=Da;var le="MenuItem",Xe="menu.itemSelect",he=r.forwardRef((t,s)=>{const{disabled:a=!1,onSelect:n,...o}=t,c=r.useRef(null),l=de(le,t.__scopeMenu),i=ze(le,t.__scopeMenu),p=te(s,c),x=r.useRef(!1),d=()=>{const u=c.current;if(!a&&u){const h=new CustomEvent(Xe,{bubbles:!0,cancelable:!0});u.addEventListener(Xe,R=>n?.(R),{once:!0}),ds(u,h),h.defaultPrevented?x.current=!1:l.onClose()}};return e.jsx(Dt,{...o,ref:p,disabled:a,onClick:y(t.onClick,d),onPointerDown:u=>{t.onPointerDown?.(u),x.current=!0},onPointerUp:y(t.onPointerUp,u=>{x.current||u.currentTarget?.click()}),onKeyDown:y(t.onKeyDown,u=>{const h=i.searchRef.current!=="";a||h&&u.key===" "||Ee.includes(u.key)&&(u.currentTarget.click(),u.preventDefault())})})});he.displayName=le;var Dt=r.forwardRef((t,s)=>{const{__scopeMenu:a,disabled:n=!1,textValue:o,...c}=t,l=ze(le,a),i=Rt(a),p=r.useRef(null),x=te(s,p),[d,u]=r.useState(!1),[h,R]=r.useState("");return r.useEffect(()=>{const f=p.current;f&&R((f.textContent??"").trim())},[c.children]),e.jsx(oe.ItemSlot,{scope:a,disabled:n,textValue:o??h,children:e.jsx(pa,{asChild:!0,...i,focusable:!n,children:e.jsx(T.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0,...c,ref:x,onPointerMove:y(t.onPointerMove,re(f=>{n?l.onItemLeave(f):(l.onItemEnter(f),f.defaultPrevented||f.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:y(t.onPointerLeave,re(f=>l.onItemLeave(f))),onFocus:y(t.onFocus,()=>u(!0)),onBlur:y(t.onBlur,()=>u(!1))})})})}),_a="MenuCheckboxItem",_t=r.forwardRef((t,s)=>{const{checked:a=!1,onCheckedChange:n,...o}=t;return e.jsx(Pt,{scope:t.__scopeMenu,checked:a,children:e.jsx(he,{role:"menuitemcheckbox","aria-checked":ue(a)?"mixed":a,...o,ref:s,"data-state":Ue(a),onSelect:y(o.onSelect,()=>n?.(ue(a)?!0:!a),{checkForDefaultPrevented:!1})})})});_t.displayName=_a;var kt="MenuRadioGroup",[ka,Ia]=V(kt,{value:void 0,onValueChange:()=>{}}),It=r.forwardRef((t,s)=>{const{value:a,onValueChange:n,...o}=t,c=pe(n);return e.jsx(ka,{scope:t.__scopeMenu,value:a,onValueChange:c,children:e.jsx(Ge,{...o,ref:s})})});It.displayName=kt;var Et="MenuRadioItem",Lt=r.forwardRef((t,s)=>{const{value:a,...n}=t,o=Ia(Et,t.__scopeMenu),c=a===o.value;return e.jsx(Pt,{scope:t.__scopeMenu,checked:c,children:e.jsx(he,{role:"menuitemradio","aria-checked":c,...n,ref:s,"data-state":Ue(c),onSelect:y(n.onSelect,()=>o.onValueChange?.(a),{checkForDefaultPrevented:!1})})})});Lt.displayName=Et;var Ke="MenuItemIndicator",[Pt,Ea]=V(Ke,{checked:!1}),Tt=r.forwardRef((t,s)=>{const{__scopeMenu:a,forceMount:n,...o}=t,c=Ea(Ke,a);return e.jsx(xe,{present:n||ue(c.checked)||c.checked===!0,children:e.jsx(T.span,{...o,ref:s,"data-state":Ue(c.checked)})})});Tt.displayName=Ke;var La="MenuSeparator",Ot=r.forwardRef((t,s)=>{const{__scopeMenu:a,...n}=t;return e.jsx(T.div,{role:"separator","aria-orientation":"horizontal",...n,ref:s})});Ot.displayName=La;var Pa="MenuArrow",Ft=r.forwardRef((t,s)=>{const{__scopeMenu:a,...n}=t,o=fe(a);return e.jsx(hs,{...o,...n,ref:s})});Ft.displayName=Pa;var Ta="MenuSub",[yo,zt]=V(Ta),ne="MenuSubTrigger",Bt=r.forwardRef((t,s)=>{const a=W(ne,t.__scopeMenu),n=de(ne,t.__scopeMenu),o=zt(ne,t.__scopeMenu),c=ze(ne,t.__scopeMenu),l=r.useRef(null),{pointerGraceTimerRef:i,onPointerGraceIntentChange:p}=c,x={__scopeMenu:t.__scopeMenu},d=r.useCallback(()=>{l.current&&window.clearTimeout(l.current),l.current=null},[]);return r.useEffect(()=>d,[d]),r.useEffect(()=>{const u=i.current;return()=>{window.clearTimeout(u),p(null)}},[i,p]),e.jsx(Oe,{asChild:!0,...x,children:e.jsx(Dt,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":o.contentId,"data-state":Ut(a.open),...t,ref:ot(s,o.onTriggerChange),onClick:u=>{t.onClick?.(u),!(t.disabled||u.defaultPrevented)&&(u.currentTarget.focus(),a.open||a.onOpenChange(!0))},onPointerMove:y(t.onPointerMove,re(u=>{c.onItemEnter(u),!u.defaultPrevented&&!t.disabled&&!a.open&&!l.current&&(c.onPointerGraceIntentChange(null),l.current=window.setTimeout(()=>{a.onOpenChange(!0),d()},100))})),onPointerLeave:y(t.onPointerLeave,re(u=>{d();const h=a.content?.getBoundingClientRect();if(h){const R=a.content?.dataset.side,f=R==="right",N=f?-5:5,v=h[f?"left":"right"],w=h[f?"right":"left"];c.onPointerGraceIntentChange({area:[{x:u.clientX+N,y:u.clientY},{x:v,y:h.top},{x:w,y:h.top},{x:w,y:h.bottom},{x:v,y:h.bottom}],side:R}),window.clearTimeout(i.current),i.current=window.setTimeout(()=>c.onPointerGraceIntentChange(null),300)}else{if(c.onTriggerLeave(u),u.defaultPrevented)return;c.onPointerGraceIntentChange(null)}})),onKeyDown:y(t.onKeyDown,u=>{const h=c.searchRef.current!=="";t.disabled||h&&u.key===" "||ha[n.dir].includes(u.key)&&(a.onOpenChange(!0),a.content?.focus(),u.preventDefault())})})})});Bt.displayName=ne;var Gt="MenuSubContent",Kt=r.forwardRef((t,s)=>{const a=Nt(L,t.__scopeMenu),{forceMount:n=a.forceMount,...o}=t,c=W(L,t.__scopeMenu),l=de(L,t.__scopeMenu),i=zt(Gt,t.__scopeMenu),p=r.useRef(null),x=te(s,p);return e.jsx(oe.Provider,{scope:t.__scopeMenu,children:e.jsx(xe,{present:n||c.open,children:e.jsx(oe.Slot,{scope:t.__scopeMenu,children:e.jsx(Be,{id:i.contentId,"aria-labelledby":i.triggerId,...o,ref:x,align:"start",side:l.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{l.isUsingKeyboardRef.current&&p.current?.focus(),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:y(t.onFocusOutside,d=>{d.target!==i.trigger&&c.onOpenChange(!1)}),onEscapeKeyDown:y(t.onEscapeKeyDown,d=>{l.onClose(),d.preventDefault()}),onKeyDown:y(t.onKeyDown,d=>{const u=d.currentTarget.contains(d.target),h=ga[l.dir].includes(d.key);u&&h&&(c.onOpenChange(!1),i.trigger?.focus(),d.preventDefault())})})})})})});Kt.displayName=Gt;function Ut(t){return t?"open":"closed"}function ue(t){return t==="indeterminate"}function Ue(t){return ue(t)?"indeterminate":t?"checked":"unchecked"}function Oa(t){const s=document.activeElement;for(const a of t)if(a===s||(a.focus(),document.activeElement!==s))return}function Fa(t,s){return t.map((a,n)=>t[(s+n)%t.length])}function za(t,s,a){const o=s.length>1&&Array.from(s).every(x=>x===s[0])?s[0]:s,c=a?t.indexOf(a):-1;let l=Fa(t,Math.max(c,0));o.length===1&&(l=l.filter(x=>x!==a));const p=l.find(x=>x.toLowerCase().startsWith(o.toLowerCase()));return p!==a?p:void 0}function Ba(t,s){const{x:a,y:n}=t;let o=!1;for(let c=0,l=s.length-1;c<s.length;l=c++){const i=s[c],p=s[l],x=i.x,d=i.y,u=p.x,h=p.y;d>n!=h>n&&a<(u-x)*(n-d)/(h-d)+x&&(o=!o)}return o}function Ga(t,s){if(!s)return!1;const a={x:t.clientX,y:t.clientY};return Ba(a,s)}function re(t){return s=>s.pointerType==="mouse"?t(s):void 0}var Ka=At,Ua=Oe,$a=St,Ha=Mt,qa=Ge,Va=Ct,Wa=he,Ya=_t,Xa=It,Qa=Lt,Za=Tt,Ja=Ot,en=Ft,tn=Bt,sn=Kt,ge="DropdownMenu",[an]=me(ge,[jt]),_=jt(),[nn,$t]=an(ge),Ht=t=>{const{__scopeDropdownMenu:s,children:a,dir:n,open:o,defaultOpen:c,onOpenChange:l,modal:i=!0}=t,p=_(s),x=r.useRef(null),[d,u]=at({prop:o,defaultProp:c??!1,onChange:l,caller:ge});return e.jsx(nn,{scope:s,triggerId:ke(),triggerRef:x,contentId:ke(),open:d,onOpenChange:u,onOpenToggle:r.useCallback(()=>u(h=>!h),[u]),modal:i,children:e.jsx(Ka,{...p,open:d,onOpenChange:u,dir:n,modal:i,children:a})})};Ht.displayName=ge;var qt="DropdownMenuTrigger",Vt=r.forwardRef((t,s)=>{const{__scopeDropdownMenu:a,disabled:n=!1,...o}=t,c=$t(qt,a),l=_(a);return e.jsx(Ua,{asChild:!0,...l,children:e.jsx(T.button,{type:"button",id:c.triggerId,"aria-haspopup":"menu","aria-expanded":c.open,"aria-controls":c.open?c.contentId:void 0,"data-state":c.open?"open":"closed","data-disabled":n?"":void 0,disabled:n,...o,ref:ot(s,c.triggerRef),onPointerDown:y(t.onPointerDown,i=>{!n&&i.button===0&&i.ctrlKey===!1&&(c.onOpenToggle(),c.open||i.preventDefault())}),onKeyDown:y(t.onKeyDown,i=>{n||(["Enter"," "].includes(i.key)&&c.onOpenToggle(),i.key==="ArrowDown"&&c.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(i.key)&&i.preventDefault())})})})});Vt.displayName=qt;var on="DropdownMenuPortal",Wt=t=>{const{__scopeDropdownMenu:s,...a}=t,n=_(s);return e.jsx($a,{...n,...a})};Wt.displayName=on;var Yt="DropdownMenuContent",Xt=r.forwardRef((t,s)=>{const{__scopeDropdownMenu:a,...n}=t,o=$t(Yt,a),c=_(a),l=r.useRef(!1);return e.jsx(Ha,{id:o.contentId,"aria-labelledby":o.triggerId,...c,...n,ref:s,onCloseAutoFocus:y(t.onCloseAutoFocus,i=>{l.current||o.triggerRef.current?.focus(),l.current=!1,i.preventDefault()}),onInteractOutside:y(t.onInteractOutside,i=>{const p=i.detail.originalEvent,x=p.button===0&&p.ctrlKey===!0,d=p.button===2||x;(!o.modal||d)&&(l.current=!0)}),style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Xt.displayName=Yt;var rn="DropdownMenuGroup",cn=r.forwardRef((t,s)=>{const{__scopeDropdownMenu:a,...n}=t,o=_(a);return e.jsx(qa,{...o,...n,ref:s})});cn.displayName=rn;var dn="DropdownMenuLabel",ln=r.forwardRef((t,s)=>{const{__scopeDropdownMenu:a,...n}=t,o=_(a);return e.jsx(Va,{...o,...n,ref:s})});ln.displayName=dn;var un="DropdownMenuItem",Qt=r.forwardRef((t,s)=>{const{__scopeDropdownMenu:a,...n}=t,o=_(a);return e.jsx(Wa,{...o,...n,ref:s})});Qt.displayName=un;var mn="DropdownMenuCheckboxItem",pn=r.forwardRef((t,s)=>{const{__scopeDropdownMenu:a,...n}=t,o=_(a);return e.jsx(Ya,{...o,...n,ref:s})});pn.displayName=mn;var xn="DropdownMenuRadioGroup",fn=r.forwardRef((t,s)=>{const{__scopeDropdownMenu:a,...n}=t,o=_(a);return e.jsx(Xa,{...o,...n,ref:s})});fn.displayName=xn;var hn="DropdownMenuRadioItem",gn=r.forwardRef((t,s)=>{const{__scopeDropdownMenu:a,...n}=t,o=_(a);return e.jsx(Qa,{...o,...n,ref:s})});gn.displayName=hn;var bn="DropdownMenuItemIndicator",vn=r.forwardRef((t,s)=>{const{__scopeDropdownMenu:a,...n}=t,o=_(a);return e.jsx(Za,{...o,...n,ref:s})});vn.displayName=bn;var wn="DropdownMenuSeparator",yn=r.forwardRef((t,s)=>{const{__scopeDropdownMenu:a,...n}=t,o=_(a);return e.jsx(Ja,{...o,...n,ref:s})});yn.displayName=wn;var jn="DropdownMenuArrow",Rn=r.forwardRef((t,s)=>{const{__scopeDropdownMenu:a,...n}=t,o=_(a);return e.jsx(en,{...o,...n,ref:s})});Rn.displayName=jn;var An="DropdownMenuSubTrigger",Nn=r.forwardRef((t,s)=>{const{__scopeDropdownMenu:a,...n}=t,o=_(a);return e.jsx(tn,{...o,...n,ref:s})});Nn.displayName=An;var Sn="DropdownMenuSubContent",Mn=r.forwardRef((t,s)=>{const{__scopeDropdownMenu:a,...n}=t,o=_(a);return e.jsx(sn,{...o,...n,ref:s,style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Mn.displayName=Sn;var Cn=Ht,Dn=Vt,_n=Wt,kn=Xt,In=Qt;function En({...t}){return e.jsx(Cn,{"data-loc":"client/src/components/ui/dropdown-menu.tsx:10","data-slot":"dropdown-menu",...t})}function Ln({...t}){return e.jsx(Dn,{"data-loc":"client/src/components/ui/dropdown-menu.tsx:25","data-slot":"dropdown-menu-trigger",...t})}function Pn({className:t,sideOffset:s=4,...a}){return e.jsx(_n,{"data-loc":"client/src/components/ui/dropdown-menu.tsx:38",children:e.jsx(kn,{"data-loc":"client/src/components/ui/dropdown-menu.tsx:39","data-slot":"dropdown-menu-content",sideOffset:s,className:j("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:sli
41de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",t),...a})})}function Tn({className:t,inset:s,variant:a="default",...n}){return e.jsx(In,{"data-loc":"client/src/components/ui/dropdown-menu.tsx:70","data-slot":"dropdown-menu-item","data-inset":s,"data-variant":a,className:j("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),...n})}function On({...t}){return e.jsx(gs,{"data-loc":"client/src/components/ui/sheet.tsx:10","data-slot":"sheet",...t})}function Fn({...t}){return e.jsx(Rs,{"data-loc":"client/src/components/ui/sheet.tsx:28","data-slot":"sheet-portal",...t})}function zn({className:t,...s}){return e.jsx(As,{"data-loc":"client/src/components/ui/sheet.tsx:36","data-slot":"sheet-overlay",className:j("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),...s})}function Bn({className:t,children:s,side:a="right",...n}){return e.jsxs(Fn,{"data-loc":"client/src/components/ui/sheet.tsx:56",children:[e.jsx(zn,{"data-loc":"client/src/components/ui/sheet.tsx:57"}),e.jsxs(bs,{"data-loc":"client/src/components/ui/sheet.tsx:58","data-slot":"sheet-content",className:j("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",a==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",a==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",a==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",a==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",t),...n,children:[s,e.jsxs(vs,{"data-loc":"client/src/components/ui/sheet.tsx:75",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[e.jsx(ws,{"data-loc":"client/src/components/ui/sheet.tsx:76",className:"size-4"}),e.jsx("span",{"data-loc":"client/src/components/ui/sheet.tsx:77",className:"sr-only",children:"Close"})]})]})]})}function Gn({className:t,...s}){return e.jsx("div",{"data-loc":"client/src/components/ui/sheet.tsx:86","data-slot":"sheet-header",className:j("flex flex-col gap-1.5 p-4",t),...s})}function Kn({className:t,...s}){return e.jsx(ys,{"data-loc":"client/src/components/ui/sheet.tsx:109","data-slot":"sheet-title",className:j("text-foreground font-semibold",t),...s})}function Un({className:t,...s}){return e.jsx(js,{"data-loc":"client/src/components/ui/sheet.tsx:122","data-slot":"sheet-description",className:j("text-muted-foreground text-sm",t),...s})}function E({className:t,...s}){return e.jsx("div",{"data-loc":"client/src/components/ui/skeleton.tsx:5","data-slot":"skeleton",className:j("bg-accent animate-pulse rounded-md",t),...s})}const Ne=768;function Zt(){const[t,s]=r.useState(void 0);return r.useEffect(()=>{const a=window.matchMedia(`(max-width: ${Ne-1}px)`),n=()=>{s(window.innerWidth<Ne)};return a.addEventListener("change",n),s(window.innerWidth<Ne),()=>a.removeEventListener("change",n)},[]),!!t}const $n="sidebar_state",Hn=3600*24*7,qn="16rem",Vn="18rem",Wn="3rem",Yn="b",Jt=r.createContext(null);function be(){const t=r.useContext(Jt);if(!t)throw new Error("useSidebar must be used within a SidebarProvider.");return t}function Xn({defaultOpen:t=!0,open:s,onOpenChange:a,className:n,style:o,children:c,...l}){const i=Zt(),[p,x]=r.useState(!1),[d,u]=r.useState(t),h=s??d,R=r.useCallback(w=>{const A=typeof w=="function"?w(h):w;a?a(A):u(A),document.cookie=`${$n}=${A}; path=/; max-age=${Hn}`},[a,h]),f=r.useCallback(()=>i?x(w=>!w):R(w=>!w),[i,R,x]);r.useEffect(()=>{const w=A=>
vendor: 7,346 bytes, line 41
41{A.key===Yn&&(A.metaKey||A.ctrlKey)&&(A.preventDefault(),f())};return window.addEventListener("keydown",w),()=>window.removeEventListener("keydown",w)},[f]);const N=h?"expanded":"collapsed",v=r.useMemo(()=>({state:N,open:h,setOpen:R,isMobile:i,openMobile:p,setOpenMobile:x,toggleSidebar:f}),[N,h,R,i,p,x,f]);return e.jsx(Jt.Provider,{"data-loc":"client/src/components/ui/sidebar.tsx:129",value:v,children:e.jsx(Ns,{"data-loc":"client/src/components/ui/sidebar.tsx:130",delayDuration:0,children:e.jsx("div",{"data-loc":"client/src/components/ui/sidebar.tsx:131","data-slot":"sidebar-wrapper",style:{"--sidebar-width":qn,"--sidebar-width-icon":Wn,...o},className:j("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",n),...l,children:c})})})}function Qn({side:t="left",variant:s="sidebar",collapsible:a="offcanvas",disableTransition:n=!1,className:o,children:c,...l}){const{isMobile:i,state:p,openMobile:x,setOpenMobile:d}=be();return a==="none"?e.jsx("div",{"data-loc":"client/src/components/ui/sidebar.tsx:171","data-slot":"sidebar",className:j("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",o),...l,children:c}):i?e.jsx(On,{"data-loc":"client/src/components/ui/sidebar.tsx:186",open:x,onOpenChange:d,...l,children:e.jsxs(Bn,{"data-loc":"client/src/components/ui/sidebar.tsx:187","data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:{"--sidebar-width":Vn},side:t,children:[e.jsxs(Gn,{"data-loc":"client/src/components/ui/sidebar.tsx:199",className:"sr-only",children:[e.jsx(Kn,{"data-loc":"client/src/components/ui/sidebar.tsx:200",children:"Sidebar"}),e.jsx(Un,{"data-loc":"client/src/components/ui/sidebar.tsx:201",children:"Displays the mobile sidebar."})]}),e.jsx("div",{"data-loc":"client/src/components/ui/sidebar.tsx:203",className:"flex h-full w-full flex-col",children:c})]})}):e.jsxs("div",{"data-loc":"client/src/components/ui/sidebar.tsx:210",className:"group peer text-sidebar-foreground hidden md:block","data-state":p,"data-collapsible":p==="collapsed"?a:"","data-variant":s,"data-side":t,"data-slot":"sidebar",children:[e.jsx("div",{"data-loc":"client/src/components/ui/sidebar.tsx:219","data-slot":"sidebar-gap",className:j("relative w-(--sidebar-width) bg-transparent",n?"transition-none":"transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",s==="floating"||s==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),e.jsx("div",{"data-loc":"client/src/components/ui/sidebar.tsx:233","data-slot":"sidebar-container",className:j("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) md:flex",n?"transition-none":"transition-[left,right,width] duration-200 ease-linear",t==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",s==="floating"||s==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",o),...l,children:e.jsx("div",{"data-loc":"client/src/components/ui/sidebar.tsx:251","data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",children:c})})]})}function Zn({className:t,onClick:s,...a}){const{toggleSidebar:n}=be();return e.jsxs(B,{"data-loc":"client/src/components/ui/sidebar.tsx:271","data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:j("size-7",t),onClick:o=>{s?.(o),n()},...a,children:[e.jsx(dt,{"data-loc":"client/src/components/ui/sidebar.tsx:283"}),e.jsx("span",{"data-loc":"client/src/components/ui/sidebar.tsx:284",className:"sr-only",children:"Toggle Sidebar"})]})}function Jn({className:t,...s}){return e.jsx("main",{"data-loc":"client/src/components/ui/sidebar.tsx:316","data-slot":"sidebar-inset",className:j("bg-background relative flex w-full flex-1 flex-col","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",t),...s})}function eo({className:t,...s}){return e.jsx("div",{"data-loc":"client/src/components/ui/sidebar.tsx:344","data-slot":"sidebar-header","data-sidebar":"header",className:j("flex flex-col gap-2 p-2",t),...s})}function to({className:t,...s}){return e.jsx("div",{"data-loc":"client/src/components/ui/sidebar.tsx:355","data-slot":"sidebar-footer","data-sidebar":"footer",className:j("flex flex-col gap-2 p-2",t),...s})}function so({className:t,...s}){return e.jsx("div",{"data-loc":"client/src/components/ui/sidebar.tsx:380","data-slot":"sidebar-content","data-sidebar":"content",className:j("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",t),...s})}function ao({className:t,...s}){return e.jsx("ul",{"data-loc":"client/src/components/ui/sidebar.tsx:463","data-slot":"sidebar-menu","data-sidebar":"menu",className:j("flex w-full min-w-0 flex-col gap-1",t),...s})}function no({className:t,...s}){return e.jsx("li",{"data-loc":"client/src/components/ui/sidebar.tsx:474","data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:j("group/menu-item relative",t),...s})}const oo=ct("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function ro({asChild:t=!1,isActive:s=!1,variant:a="default",size:n="default",tooltip:o,className:c,...l}){const i=t?rt:"button",{isMobile:p,state:x}=be(),d=e.jsx(i,{"data-loc":"client/src/components/ui/sidebar.tsx:522","data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":n,"data-active":s,className:j(oo({variant:a,size:n}),c),...l});
41return o?(typeof o=="string"&&(o={children:o}),e.jsxs(Ss,{"data-loc":"client/src/components/ui/sidebar.tsx:543",children:[e.jsx(Ms,{"data-loc":"client/src/components/ui/sidebar.tsx:544",asChild:!0,children:d}),e.jsx(Cs,{"data-loc":"client/src/components/ui/sidebar.tsx:545",side:"right",align:"center",hidden:x!=="collapsed"||p,...o})]})):d}function co(){return e.jsxs("div",{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:5",className:"flex min-h-screen bg-background",children:[e.jsxs("div",{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:7",className:"w-[280px] border-r border-border bg-background p-4 space-y-6",children:[e.jsxs("div",{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:9",className:"flex items-center gap-3 px-2",children:[e.jsx(E,{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:10",className:"h-8 w-8 rounded-md"}),e.jsx(E,{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:11",className:"h-4 w-24"})]}),e.jsxs("div",{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:15",className:"space-y-2 px-2",children:[e.jsx(E,{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:16",className:"h-10 w-full rounded-lg"}),e.jsx(E,{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:17",className:"h-10 w-full rounded-lg"}),e.jsx(E,{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:18",className:"h-10 w-full rounded-lg"})]}),e.jsx("div",{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:22",className:"absolute bottom-4 left-4 right-4",children:e.jsxs("div",{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:23",className:"flex items-center gap-3 px-1",children:[e.jsx(E,{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:24",className:"h-9 w-9 rounded-full"}),e.jsxs("div",{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:25",className:"flex-1 space-y-2",children:[e.jsx(E,{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:26",className:"h-3 w-20"}),e.jsx(E,{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:27",className:"h-2 w-32"})]})]})})]}),e.jsxs("div",{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:34",className:"flex-1 p-4 space-y-4",children:[e.jsx(E,{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:36",className:"h-12 w-48 rounded-lg"}),e.jsxs("div",{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:37",className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:[e.jsx(E,{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:38",className:"h-32 rounded-xl"}),e.jsx(E,{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:39",className:"h-32 rounded-xl"}),e.jsx(E,{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:40",className:"h-32 rounded-xl"})]}),e.jsx(E,{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:42",className:"h-64 rounded-xl"})]})]})}const Qe=[{icon:_s,label:"Refund requests",path:"/admin/refunds"},{icon:it,label:"View landing page",path:"/"}],Ze="sidebar-width",io=280,lo=200,uo=480;function mo({children:t}){const[s,a]=r.useState(()=>{const c=localStorage.getItem(Ze);return c?parseInt(c,10):io}),{loading:n,user:o}=Pe();return r.useEffect(()=>{localStorage.setItem(Ze,s.toString())},[s]),n?e.jsx(co,{"data-loc":"client/src/components/DashboardLayout.tsx:56"}):o?e.jsx(Xn,{"data-loc":"client/src/components/DashboardLayout.tsx:84",style:{"--sidebar-width":`${s}px`},children:e.jsx(po,{"data-loc":"client/src/components/DashboardLayout.tsx:91",setSidebarWidth:a,children:t})}):e.jsx("div",{"data-loc":"client/src/components/DashboardLayout.tsx:61",className:"flex items-center justify-center min-h-screen",children:e.jsxs("div",{"data-loc":"client/src/components/DashboardLayout.tsx:62",className:"flex flex-col items-center gap-8 p-8 max-w-md w-full",children:[e.jsxs("div",{"data-loc":"client/src/components/DashboardLayout.tsx:63",className:"flex flex-col items-center gap-6",children:[e.jsx("h1",{"data-loc":"client/src/components/DashboardLayout.tsx:64",className:"text-2xl font-semibold tracking-tight text-center",children:"Sign in to continue"}),e.jsx("p",{"data-loc":"client/src/components/DashboardLayout.t
41sx:67",className:"text-sm text-muted-foreground text-center max-w-sm",children:"Access to this dashboard requires authentication. Continue to launch the login flow."})]}),e.jsx(B,{"data-loc":"client/src/components/DashboardLayout.tsx:71",onClick:()=>et(),size:"lg",className:"w-full shadow-lg hover:shadow-xl transition-all",children:"Sign in"})]})})}function po({children:t,setSidebarWidth:s}){const{user:a,logout:n}=Pe(),[o,c]=Ds(),{state:l,toggleSidebar:i}=be(),p=l==="collapsed",[x,d]=r.useState(!1),u=r.useRef(null),h=Qe.find(f=>f.path===o),R=Zt();return r.useEffect(()=>{p&&d(!1)},[p]),r.useEffect(()=>{const f=v=>{if(!x)return;const w=u.current?.getBoundingClientRect().left??0,A=v.clientX-w;A>=lo&&A<=uo&&s(A)},N=()=>{d(!1)};return x&&(document.addEventListener("mousemove",f),document.addEventListener("mouseup",N),document.body.style.cursor="col-resize",document.body.style.userSelect="none"),()=>{document.removeEventListener("mousemove",f),document.removeEventListener("mouseup",N),document.body.style.cursor="",document.body.style.userSelect=""}},[x,s]),e.jsxs(e.Fragment,{children:[e.jsxs("div",{"data-loc":"client/src/components/DashboardLayout.tsx:154",className:"relative",ref:u,children:[e.jsxs(Qn,{"data-loc":"client/src/components/DashboardLayout.tsx:155",collapsible:"icon",className:"border-r-0",disableTransition:x,children:[e.jsx(eo,{"data-loc":"client/src/components/DashboardLayout.tsx:160",className:"h-16 justify-center",children:e.jsxs("div",{"data-loc":"client/src/components/DashboardLayout.tsx:161",className:"flex items-center gap-3 px-2 transition-all w-full",children:[e.jsx("button",{"data-loc":"client/src/components/DashboardLayout.tsx:162",onClick:i,className:"h-8 w-8 flex items-center justify-center hover:bg-accent rounded-lg transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-ring shrink-0","aria-label":"Toggle navigation",children:e.jsx(dt,{"data-loc":"client/src/components/DashboardLayout.tsx:167",className:"h-4 w-4 text-muted-foreground"})}),p?null:e.jsx("div",{"data-loc":"client/src/components/DashboardLayout.tsx:170",className:"flex items-center gap-2 min-w-0",children:e.jsx("span",{"data-loc":"client/src/components/DashboardLayout.tsx:171",className:"font-semibold tracking-tight truncate",children:"Astro Northstar"})})]})}),e.jsx(so,{"data-loc":"client/src/components/DashboardLayout.tsx:179",className:"gap-0",children:e.jsx(ao,{"data-loc":"client/src/components/DashboardLayout.tsx:180",className:"px-2 py-1",children:Qe.map(f=>{const N=o===f.path;return e.jsx(no,{"data-loc":"client/src/components/DashboardLayout.tsx:184",children:e.jsxs(ro,{"data-loc":"client/src/components/DashboardLayout.tsx:185",isActive:N,onClick:()=>c(f.path),tooltip:f.label,className:"h-10 transition-all font-normal",children:[e.jsx(f.icon,{"data-loc":"client/src/components/DashboardLayout.tsx:191",className:`h-4 w-4 ${N?"text-primary":""}`}),e.jsx("span",{"data-loc":"client/src/components/DashboardLayout.tsx:194",children:f.label})]})},f.path)})})}),e.jsx(to,{"data-loc":"client/src/components/DashboardLayout.tsx:202",className:"p-3",children:e.jsxs(En,{"data-loc":"client/src/components/DashboardLayout.tsx:203",children:[e.jsx(Ln,{"data-loc":"client/src/components/DashboardLayout.tsx:204",asChild:!0,children:e.jsxs("button",{"data-loc":"client/src/components/DashboardLayout.tsx:205",className:"flex items-center gap-3 rounded-lg px-1 py-1 hover:bg-accent/50 transition-colors w-full text-left group-data-[collapsible=icon]:justify-center focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[e.jsx(ea,{"data-loc":"client/src/components/DashboardLayout.tsx:206",className:"h-9 w-9 border shrink-0",children:e.jsx(ta,{"data-loc":"client/src/components/DashboardLayout.tsx:207",className:"text-xs font-medium",children:a?.name?.charAt(0).toUpperCase()})}),e.jsxs("div",{"data-loc":"client/src/components/DashboardLayout.tsx:211",className:"flex-1 min-w-0 group-data-[collapsible=icon]:hidden",children:[e.jsx("p",{"data-loc":"client/src/components/DashboardLayout.tsx:212",className:"text-sm font-medium truncate leading-none",children:a?.name||"-"}),e.jsx("p",{"data-loc":"client/src/components/DashboardLayout.t
41sx:215",className:"text-xs text-muted-foreground truncate mt-1.5",children:a?.email||"-"})]})]})}),e.jsx(Pn,{"data-loc":"client/src/components/DashboardLayout.tsx:221",align:"end",className:"w-48",children:e.jsxs(Tn,{"data-loc":"client/src/components/DashboardLayout.tsx:222",onClick:n,className:"cursor-pointer text-destructive focus:text-destructive",children:[e.jsx(Ks,{"data-loc":"client/src/components/DashboardLayout.tsx:226",className:"mr-2 h-4 w-4"}),e.jsx("span",{"data-loc":"client/src/components/DashboardLayout.tsx:227",children:"Sign out"})]})})]})})]}),e.jsx("div",{"data-loc":"client/src/components/DashboardLayout.tsx:233",className:`absolute top-0 right-0 w-1 h-full cursor-col-resize hover:bg-primary/20 transition-colors ${p?"hidden":""}`,onMouseDown:()=>{p||d(!0)},style:{zIndex:50}})]}),e.jsxs(Jn,{"data-loc":"client/src/components/DashboardLayout.tsx:243",children:[R&&e.jsx("div",{"data-loc":"client/src/components/DashboardLayout.tsx:245",className:"flex border-b h-14 items-center justify-between bg-background/95 px-2 backdrop-blur supports-[backdrop-filter]:backdrop-blur sticky top-0 z-40",children:e.jsxs("div",{"data-loc":"client/src/components/DashboardLayout.tsx:246",className:"flex items-center gap-2",children:[e.jsx(Zn,{"data-loc":"client/src/components/DashboardLayout.tsx:247",className:"h-9 w-9 rounded-lg bg-background"}),e.jsx("div",{"data-loc":"client/src/components/DashboardLayout.tsx:248",className:"flex items-center gap-3",children:e.jsx("div",{"data-loc":"client/src/components/DashboardLayout.tsx:249",className:"flex flex-col gap-1",children:e.jsx("span",{"data-loc":"client/src/components/DashboardLayout.tsx:250",className:"tracking-tight text-foreground",children:h?.label??"Menu"})})})]})}),e.jsx("main",{"data-loc":"client/src/components/DashboardLayout.tsx:258",className:"flex-1 p-4",children:t})]})]})}const xo=ct("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function es({className:t,variant:s,asChild:a=!1,...n}){const o=a?rt:"span";return e.jsx(o,{"data-loc":"client/src/components/ui/badge.tsx:38","data-slot":"badge",className:j(xo({variant:s}),t),...n})}function fo({className:t,...s}){return e.jsx("div",{"data-loc":"client/src/components/ui/table.tsx:7","data-slot":"table-container",className:"relative w-full overflow-x-auto",children:e.jsx("table",{"data-loc":"client/src/components/ui/table.tsx:11","data-slot":"table",className:j("w-full caption-bottom text-sm",t),...s})})}function ho({className:t,...s}){return e.jsx("thead",{"data-loc":"client/src/components/ui/table.tsx:22","data-slot":"table-header",className:j("[&_tr]:border-b",t),...s})}function go({className:t,...s}){return e.jsx("tbody",{"data-loc":"client/src/components/ui/table.tsx:32","data-slot":"table-body",className:j("[&_tr:last-child]:border-0",t),...s})}function Je({className:t,...s}){return e.jsx("tr",{"data-loc":"client/src/components/ui/table.tsx:55","data-slot":"table-row",className:j("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",t),...s})}function Q({className:t,...s}){return e.jsx("th",{"data-loc":"client/src/components/ui/table.tsx:68","data-slot":"table-head",className:j("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),...s})}function Z({className:t,...s}){return e.jsx("td",{"data-loc":"client/src/components/ui/table.tsx:81","data-slot":"table-cell",className:j("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),...s})}const Se=25,Le={submitted:"Submitted",under_review:"Under review",approved:"Approved",declined:"Declined",processed:"Processed"},ts={pending:"Pending",verified:"Verified",ambiguous:"Ambiguous",not_found:"Not found",mismatch:"Mismatch",error:"Error"};function J(t){if(!t)return"â";const s=new Date(t);
41return Number.isNaN(s.getTime())?"â":s.toLocaleString("en-PH",{dateStyle:"medium",timeStyle:"short",timeZone:"Asia/Manila"})}function Me(t,s){if(!t||!s)return"â";const a=Number(t);return Number.isFinite(a)?new Intl.NumberFormat("en-PH",{style:"currency",currency:s.toUpperCase()}).format(a):"â"}function Ce({status:t}){const s={submitted:"border-sky-400/25 bg-sky-400/10 text-sky-200",under_review:"border-amber-400/25 bg-amber-400/10 text-amber-200",approved:"border-violet-400/25 bg-violet-400/10 text-violet-200",declined:"border-rose-400/25 bg-rose-400/10 text-rose-200",processed:"border-emerald-400/25 bg-emerald-400/10 text-emerald-200"}[t];return e.jsx(es,{"data-loc":"client/src/pages/AdminRefunds.tsx:98",className:s,children:Le[t]})}function De({status:t}){const s=t==="verified",a=["ambiguous","not_found","mismatch","error"].includes(t);return e.jsxs(es,{"data-loc":"client/src/pages/AdminRefunds.tsx:111",variant:"outline",className:s?"border-emerald-400/30 bg-emerald-400/10 text-emerald-200":a?"border-rose-400/30 bg-rose-400/10 text-rose-200":"border-white/15 bg-white/[0.04] text-white/60",children:[s?e.jsx(zs,{"data-loc":"client/src/pages/AdminRefunds.tsx:121",className:"mr-1 size-3"}):null,ts[t]]})}function ee({label:t,value:s,note:a}){return e.jsxs("div",{"data-loc":"client/src/pages/AdminRefunds.tsx:137",className:"border border-white/10 bg-white/[0.025] p-5",children:[e.jsx("p",{"data-loc":"client/src/pages/AdminRefunds.tsx:138",className:"text-[0.62rem] font-extrabold uppercase tracking-[0.16em] text-white/42",children:t}),e.jsx("p",{"data-loc":"client/src/pages/AdminRefunds.tsx:141",className:"mt-3 font-display text-4xl text-white",children:s}),e.jsx("p",{"data-loc":"client/src/pages/AdminRefunds.tsx:142",className:"mt-2 text-xs leading-5 text-white/38",children:a})]})}function k({label:t,value:s}){return e.jsxs("div",{"data-loc":"client/src/pages/AdminRefunds.tsx:149",className:"grid gap-1 border-b border-white/8 py-3 sm:grid-cols-[9rem_1fr] sm:gap-4",children:[e.jsx("dt",{"data-loc":"client/src/pages/AdminRefunds.tsx:150",className:"text-[0.62rem] font-bold uppercase tracking-[0.12em] text-white/34",children:t}),e.jsx("dd",{"data-loc":"client/src/pages/AdminRefunds.tsx:153",className:"min-w-0 break-words text-sm text-white/72",children:s})]})}function jo(){return e.jsx(mo,{"data-loc":"client/src/pages/AdminRefunds.tsx:160",children:e.jsx(bo,{"data-loc":"client/src/pages/AdminRefunds.tsx:161"})})}function bo(){const{user:t}=Pe(),[s,a]=r.useState(""),[n,o]=r.useState("all"),[c,l]=r.useState("all"),[i,p]=r.useState(0),[x,d]=r.useState(null),[u,h]=r.useState("submitted"),[R,f]=r.useState(""),[N,v]=r.useState(""),[w,A]=r.useState(""),C=r.useMemo(()=>({search:s.trim()||void 0,status:n==="all"?void 0:n,reconciliationStatus:c==="all"?void 0:c,limit:Se,offset:i*Se}),[i,c,s,n]),S=U.refund.adminSummary.useQuery(void 0,{enabled:t?.role==="admin"}),D=U.refund.adminList.useQuery(C,{enabled:t?.role==="admin"}),H=U.useUtils(),b=D.data?.items.find(m=>m.id===x)||null;r.useEffect(()=>{p(0)},[s,n,c]),r.useEffect(()=>{b&&(h(b.status),f(b.adminNotes||""),v(""),A(""))},[b?.id]);const M=async()=>{await Promise.all([H.refund.adminList.invalidate(),H.refund.adminSummary.invalidate()])},O=U.refund.reconcile.useMutation({onSuccess:async m=>{await M(),A(""),v(m.result.status==="verified"?"HitPay transaction verified and linked.":m.result.note)},onError:m=>{v(""),A(`Reconciliation failed: ${m.message}`)}}),P=U.refund.updateStatus.useMutation({onSuccess:async m=>{await M(),A(""),v(m.statusChanged?m.statusEmailSent?"Status saved and the customer update email was sent.":"Status saved, but the customer email could not be sent. Retry after checking the email integration.":"Administrator notes saved. No customer email was needed.")},onError:m=>{v(""),A(`Update failed: ${m.message}`)}});if(t&&t.role!=="admin")return e.jsx("div",{"data-loc":"client/src/pages/AdminRefunds.tsx:256",className:"mx-auto flex min-h-[70vh] max-w-2xl items-center justify-center",children:e.jsxs("div",{"data-loc":"client/src/pages/AdminRefunds.tsx:257",className:"w-full border border-rose-400/25 bg-rose-400/[0.06] p-8 text-center",children:[e.jsx(je,{"data-loc":"client/src/pages/AdminRefunds.tsx:258",className:"mx-auto
41size-8 text-rose-300","aria-hidden":"true"}),e.jsx("h1",{"data-loc":"client/src/pages/AdminRefunds.tsx:259",className:"mt-4 font-display text-3xl text-white",children:"Administrator access required"}),e.jsx("p",{"data-loc":"client/src/pages/AdminRefunds.tsx:260",className:"mt-3 text-sm leading-6 text-white/48",children:"This operations page is restricted to authorized Astro Northstar administrators."}),e.jsx(B,{"data-loc":"client/src/pages/AdminRefunds.tsx:263",asChild:!0,variant:"outline",className:"mt-6 border-white/15 bg-transparent text-white",children:e.jsx(qe,{"data-loc":"client/src/pages/AdminRefunds.tsx:264",href:"/",children:"Return to the landing page"})})]})});const G=Math.max(1,Math.ceil((D.data?.total||0)/Se)),K=O.isPending||P.isPending;return e.jsxs("div",{"data-loc":"client/src/pages/AdminRefunds.tsx:275",className:"min-h-screen bg-[#08070b] text-white",children:[e.jsxs("div",{"data-loc":"client/src/pages/AdminRefunds.tsx:276",className:"mx-auto max-w-[1500px] px-1 py-4 sm:px-3 lg:px-5",children:[e.jsx("header",{"data-loc":"client/src/pages/AdminRefunds.tsx:277",className:"border-b border-white/10 pb-7",children:e.jsxs("div",{"data-loc":"client/src/pages/AdminRefunds.tsx:278",className:"flex flex-col gap-5 lg:flex-row lg:items-end lg:justify-between",children:[e.jsxs("div",{"data-loc":"client/src/pages/AdminRefunds.tsx:279",children:[e.jsxs("div",{"data-loc":"client/src/pages/AdminRefunds.tsx:280",className:"flex items-center gap-2 text-[0.65rem] font-extrabold uppercase tracking-[0.2em] text-[#bca8ff]",children:[e.jsx(Hs,{"data-loc":"client/src/pages/AdminRefunds.tsx:281",className:"size-4","aria-hidden":"true"}),"Astro Northstar Operations"]}),e.jsx("h1",{"data-loc":"client/src/pages/AdminRefunds.tsx:284",className:"mt-3 font-display text-4xl font-semibold tracking-[-0.03em] sm:text-5xl",children:"Refund requests"}),e.jsx("p",{"data-loc":"client/src/pages/AdminRefunds.tsx:287",className:"mt-3 max-w-2xl text-sm leading-6 text-white/46",children:"Verify HitPay transactions, maintain the review trail, and notify customers of operational status changes. This dashboard does not move money or issue refunds through HitPay."})]}),e.jsx(B,{"data-loc":"client/src/pages/AdminRefunds.tsx:291",asChild:!0,variant:"outline",className:"w-fit border-white/15 bg-white/[0.03] text-white hover:bg-white/[0.07]",children:e.jsxs(qe,{"data-loc":"client/src/pages/AdminRefunds.tsx:292",href:"/",children:["View landing page",e.jsx(it,{"data-loc":"client/src/pages/AdminRefunds.tsx:294",className:"ml-1 size-4","aria-hidden":"true"})]})})]})}),e.jsxs("section",{"data-loc":"client/src/pages/AdminRefunds.tsx:300",className:"grid grid-cols-2 gap-3 py-6 sm:grid-cols-3 xl:grid-cols-6","aria-label":"Refund operations summary",children:[e.jsx(ee,{"data-loc":"client/src/pages/AdminRefunds.tsx:301",label:"Total",value:S.data?.total||0,note:"All submitted records"}),e.jsx(ee,{"data-loc":"client/src/pages/AdminRefunds.tsx:302",label:"New",value:S.data?.submitted||0,note:"Awaiting first review"}),e.jsx(ee,{"data-loc":"client/src/pages/AdminRefunds.tsx:303",label:"Reviewing",value:S.data?.underReview||0,note:"Active casework"}),e.jsx(ee,{"data-loc":"client/src/pages/AdminRefunds.tsx:304",label:"Approved",value:S.data?.approved||0,note:"Ready for processing"}),e.jsx(ee,{"data-loc":"client/src/pages/AdminRefunds.tsx:305",label:"Verified",value:S.data?.verified||0,note:"Linked to HitPay"}),e.jsx(ee,{"data-loc":"client/src/pages/AdminRefunds.tsx:306",label:"Attention",value:S.data?.needsAttention||0,note:"Mismatch or lookup issue"})]}),e.jsxs("section",{"data-loc":"client/src/pages/AdminRefunds.tsx:309",className:"border border-white/10 bg-[#0d0b12]","aria-labelledby":"request-register-title",children:[e.jsx("div",{"data-loc":"client/src/pages/AdminRefunds.tsx:310",className:"border-b border-white/10 p-4 sm:p-5",children:e.jsxs("div",{"data-loc":"client/src/pages/AdminRefunds.tsx:311",className:"flex flex-col gap-4 xl:flex-row xl:items-end xl:justify-between",children:[e.jsxs("div",{"data-loc":"client/src/pages/AdminRefunds.tsx:312",children:[e.jsx("p",{"data-loc":"client/src/pages/AdminRefunds.tsx:313",className:"text-[0.6rem] font-extrabold uppercase tracking-[0.16em] text-white/34",children:"Operations register"}),e.jsx("h2",{"data-loc":"client/src/pages/AdminRefunds.tsx:314",id:"request-register-title",className:"mt-2 font-display text-2xl",children:"Submitted requests"})]}),e.jsxs("div",{"data-loc":"client/src/pages/AdminRefunds.tsx:316",className:"grid gap-3 sm:grid-cols-3",children:[e.jsxs("label",{"data-loc":"client/src/pages/AdminRefunds.tsx:317",className:"relative block",children:[e.jsx("span",{"data-loc":"client/src/pages/AdminRefunds.tsx:318",className:"sr-only",children:"Search refund requests"}),e.jsx($s,{"data-loc":"client/src/pages/AdminRefunds.tsx:319",className:"absolute left-3 top-1/2 size-4 -translate-y-1/2 text-white/30","aria-hidden":"true"}),e.jsx(ks,{"data-loc":"client/src/pages/AdminRefunds.tsx:320",value:s,onChange:m=>a(m.target.value),placeholder:"Code, name, email, receipt",className:"min-w-64 border-white/12 bg-white/[0.035] pl-9 text-white"})]}),e.jsxs("label",{"data-loc":"client/src/pages/AdminRefunds.tsx:322",children:[e.jsx("span",{"data-loc":"client/src/pages/AdminRefunds.tsx:323",className:"sr-only",children:"Filter by request status"}),e.jsxs("select",{"data-loc":"client/src/pages/AdminRefunds.tsx:324",value:n,onChange:m=>o(m.target.value),className:"h-10 w-full border border-white/12 bg-[#100d16] px-3 text-sm text-white outline-none focus-visible:ring-2 focus-visible:ring-[#8B5CF6]",children:[e.jsx("option",{"data-loc":"client/src/pages/AdminRefunds.tsx:325",value:"all",children:"All request statuses"}
41),Object.entries(Le).map(([m,F])=>e.jsx("option",{"data-loc":"client/src/pages/AdminRefunds.tsx:326",value:m,children:F},m))]})]}),e.jsxs("label",{"data-loc":"client/src/pages/AdminRefunds.tsx:329",children:[e.jsx("span",{"data-loc":"client/src/pages/AdminRefunds.tsx:330",className:"sr-only",children:"Filter by HitPay verification"}),e.jsxs("select",{"data-loc":"client/src/pages/AdminRefunds.tsx:331",value:c,onChange:m=>l(m.target.value),className:"h-10 w-full border border-white/12 bg-[#100d16] px-3 text-sm text-white outline-none focus-visible:ring-2 focus-visible:ring-[#8B5CF6]",children:[e.jsx("option",{"data-loc":"client/src/pages/AdminRefunds.tsx:332",value:"all",children:"All verification states"}),Object.entries(ts).map(([m,F])=>e.jsx("option",{"data-loc":"client/src/pages/AdminRefunds.tsx:333",value:m,children:F},m))]})]})]})]})}),D.error?e.jsxs("div",{"data-loc":"client/src/pages/AdminRefunds.tsx:341",className:"m-4 flex items-start gap-2 border border-red-400/25 bg-red-400/[0.07] p-4 text-sm text-red-200",role:"alert",children:[e.jsx(je,{"data-loc":"client/src/pages/AdminRefunds.tsx:342",className:"mt-0.5 size-4 shrink-0","aria-hidden":"true"}),"Unable to load refund requests: ",D.error.message]}):D.isLoading?e.jsxs("div",{"data-loc":"client/src/pages/AdminRefunds.tsx:346",className:"flex min-h-64 items-center justify-center text-sm text-white/45",children:[e.jsx(Re,{"data-loc":"client/src/pages/AdminRefunds.tsx:347",className:"mr-2 size-4 animate-spin","aria-hidden":"true"}),"Loading the operations register"]}):D.data?.items.length?e.jsxs(e.Fragment,{children:[e.jsx("div",{"data-loc":"client/src/pages/AdminRefunds.tsx:358",className:"hidden md:block",children:e.jsxs(fo,{"data-loc":"client/src/pages/AdminRefunds.tsx:359",children:[e.jsx(ho,{"data-loc":"client/src/pages/AdminRefunds.tsx:360",children:e.jsxs(Je,{"data-loc":"client/src/pages/AdminRefunds.tsx:361",className:"border-white/10 hover:bg-transparent",children:[e.jsx(Q,{"data-loc":"client/src/pages/AdminRefunds.tsx:362",className:"text-white/38",children:"Request"}),e.jsx(Q,{"data-loc":"client/src/pages/AdminRefunds.tsx:363",className:"text-white/38",children:"Customer"}),e.jsx(Q,{"data-loc":"client/src/pages/AdminRefunds.tsx:364",className:"text-white/38",children:"Status"}),e.jsx(Q,{"data-loc":"client/src/pages/AdminRefunds.tsx:365",className:"text-white/38",children:"HitPay"}),e.jsx(Q,{"data-loc":"client/src/pages/AdminRefunds.tsx:366",className:"text-white/38",children:"Submitted"}),e.jsx(Q,{"data-loc":"client/src/pages/AdminRefunds.tsx:367",className:"text-right text-white/38",children:"Action"})]})}),e.jsx(go,{"data-loc":"client/src/pages/AdminRefunds.tsx:370",children:D.data.items.map(m=>e.jsxs(Je,{"data-loc":"client/src/pages/AdminRefunds.tsx:372",className:"border-white/8 hover:bg-white/[0.025]",children:[e.jsxs(Z,{"data-loc":"client/src/pages/AdminRefunds.tsx:373",children:[e.jsx("p",{"data-loc":"client/src/pages/AdminRefunds.tsx:374",className:"font-mono text-xs text-[#d5c8ff]",children:m.requestCode}),e.jsx("p",{"data-loc":"client/src/pages/AdminRefunds.tsx:375",className:"mt-1 text-xs text-white/35",children:m.refundTier.replace("_"," ")})]}),e.jsxs(Z,{"data-loc":"client/src/pages/AdminRefunds.tsx:377",children:[e.jsx("p",{"data-loc":"client/src/pages/AdminRefunds.tsx:378",className:"font-medium text-white/78",children:m.purchaserName}),e.jsx("p",{"data-loc":"client/src/pages/AdminRefunds.tsx:379",className:"mt-1 max-w-56 truncate text-xs text-white/35",children:m.contactEmail})]}),e.jsx(Z,{"data-loc":"client/src/pages/AdminRefunds.tsx:381",children:e.jsx(Ce,{"data-loc":"client/src/pages/AdminRefunds.tsx:381",status:m.status})}),e.jsxs(Z,{"data-loc":"client/src/pages/AdminRefunds.tsx:382",children:[e.jsx(De,{"data-loc":"client/src/pages/AdminRefunds.tsx:383",status:m.reconciliationStatus}),m.hitpayAmount?e.jsx("p",{"data-loc":"client/src/pages/AdminRefunds.tsx:384",className:"mt-1 text-xs text-white/35",children:Me(m.hitpayAmount,m.hitpayCurrency)}):null]}),e.jsx(Z,{"data-loc":"client/src/pages/AdminRefunds.tsx:386",className:"text-xs text-white/48",children:J(m.createdAt)}),e.jsx(Z,{"data-loc":"client/src/pages/AdminRefunds.tsx:387",className:"text-right",children:e.jsx(B,{"data-loc":"client/src/pages/AdminRefunds.tsx:388",size:"sm",variant:"outline",onClick:()=>d(m.id),className:"border-white/15 bg-transparent text-white hover:bg-white/[0.07]",children:"Review"})})]},m.id))})]})}),e.jsx("div",{"data-loc":"client/src/pages/AdminRefunds.tsx:395",className:"grid gap-3 p-3 md:hidden",children:D.data.items.map(m=>e.jsxs("button",{"data-loc":"client/src/pages/AdminRefunds.tsx:397",type:"button",onClick:()=>d(m.id),className:"border border-white/10 bg-white/[0.025] p-4 text-left transition-colors hover:bg-white/[0.05] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#8B5CF6]",children:[e.jsxs("div",{"data-loc":"client/src/pages/AdminRefunds.tsx:398",className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/AdminRefunds.tsx:399",children:[e.jsx("p",{"data-loc":"client/src/pages/AdminRefunds.tsx:400",className:"font-mono text-xs text-[#d5c8ff]",children:m.requestCode}),e.jsx("p",{"data-loc":"client/src/pages/AdminRefunds.tsx:401",className:"mt-2 font-medium text-white/80",children:m.purchaserName})]}),e.jsx(Ce,{"data-loc":"client/src/pages/AdminRefunds.tsx:403",status:m.status})]}),e.jsxs("div",{"data-loc":"client/src/pages/AdminRefunds.tsx:405",className:"mt-4 flex items-center justify-between gap-3",children:[e.jsx(De,{"data-loc":"client/src/pages/AdminRefunds.tsx:406",status:m.reconciliationStatus}),e.jsx("span",{"data-loc":"client/src/pages/AdminRefunds.tsx:407",className:"text-xs text-white/34",children:J(m.createdAt)})]})]},m.id))})]}):e.jsxs("div",{"data-loc":"client/src/pages/AdminRefunds.tsx:351",className:"flex min-h-64 flex-col items-center justify-center px-6 text-center",children:[e.jsx(Ve,{"data-loc":"client/src/pages/AdminRefunds.tsx:352",className:"size-8 text-[#a78bfa]","aria-hidden":"true"}),e.jsx("h3",{"data-loc":"client/src/pages/AdminRefunds.tsx:353",className:"mt-4 font-display text-2xl",children:"No matching requests"}),e.jsx("p",{"data-loc":"client/src/pages/AdminRefunds.tsx:354",className:"mt-2 text-sm text-white/40",children:"Adjust the filters or wait for a customer submission."})]}),e.jsxs("div",{"data-loc":"client/src/pages/AdminRefunds.tsx:415",className:"flex items-center justify-between border-t border-white/10 p-4 text-xs text-white/38",children:[e.jsxs("span",{"data-loc":"client/src/pages/AdminRefunds.tsx:416",children:[D.data?.total||0," total requests"]}),e.jsxs("div",{"data-loc":"client/src/pages/AdminRefunds.tsx:417",className:"flex items-center gap-2",children:[e.jsxs(B,{"data-loc":"client/src/pages/AdminRefunds.tsx:418",size:"sm",variant:"outline",disabled:i===0,onClick:()=>p(m=>Math.max(0,m-1)),className:"border-white/15 bg-transparent text-white disabled:text-white/20",children:[e.jsx(Bs,{"data-loc":"client/src/pages/AdminRefunds.tsx:419",className:"size-4","aria-hidden":"true"}),"Previous"]}),e.jsxs("span",{"data-loc":"client/src/pages/AdminRefunds.tsx:422",className:"px-2",children:[i+1," / ",G]}),e.jsxs(B,{"data-loc":"client/src/pages/AdminRefunds.tsx:423",size:"sm",variant:"outline",disabled:i+1>=G,onClick:()=>p(m=>m+1),className:"border-white/15 bg-transparent text-white disabled:text-white/20",children:["Next",e.jsx(Gs,{"data-loc":"client/src/pages/AdminRefunds.tsx:425",className:"size-4","aria-hidden":"true"})]})]})]})]})]}),e.jsx(Is,{"data-loc":"client/src/pages/AdminRefunds.tsx:432",open:!!b,onOpenChange:m=>!m&&d(null),children:e.jsx(Es,{"data-loc":"client/src/pages/AdminRefunds.tsx:433",className:"max-h-[92dvh] max-w-4xl overflow-y-auto border-white/12 bg-[#0c0a10] p-0 text-white",children:b?e.jsxs(e.Fragment,{children:[e.jsxs(Ls,{"data-loc":"client/src/pages/AdminRefunds.tsx:436",className:"border-b border-white/10 px-6 pb-5 pt-7 text-left sm:px-8",children:[e.jsx("p",{"data-loc":"client/src/pages/AdminRefunds.tsx:437",className:"font-mono text-xs text-[#bca8ff]",children:b.requestCode}),e.jsx(Ps,{"data-loc":"client/src/pages/AdminRefunds.tsx:438",className:"font-display text-3xl",children:"Review refund request"}),e.jsx(Ts,{"data-loc":"client/src/pages/AdminRefunds.tsx:439",className:"text-white/42",children:"Verify the payment record before changing the operational status."})]}),e.jsxs("div",{"data-loc":"client/src/pages/AdminRefunds.tsx:442",className:"grid gap-7 px-6 py-6 sm:px-8 lg:grid-cols-[1.05fr_.95fr]",children:[e.jsxs("section",{"data-loc":"client/src/pages/AdminRefunds.tsx:443",children:[e.jsxs("div",{"data-loc":"client/src/pages/AdminRefunds.tsx:444",className:"flex flex-wrap items-center gap-2",children:[e.jsx(Ce,{"data-loc":"client/src/pages/AdminRefunds.tsx:445",status:b.status}),e.jsx(De,{"data-loc":"client/src/pages/AdminRefunds.tsx:446",status:b.reconciliationStatus})]}),e.jsxs("dl",{"data-loc":"client/src/pages/AdminRefunds.tsx:448",className:"mt-5",children:[e.jsx(k,{"data-loc":"client/src/pages/AdminRefunds.tsx:449",label:"Purchaser",value:b.purchaserName}),e.jsx(k,{"data-loc":"client/src/pages/AdminRefunds.tsx:450",label:"Email",value:b.contactEmail}),e.jsx(k,{"data-loc":"client/src/pages/AdminRefunds.tsx:451",label:"HitPay reference",value:e.jsx("span",{"data-loc":"client/src/pages/AdminRefunds.tsx:451",className:"font-mono text-xs",children:b.hitpayReference})}),e.jsx(k,{"data-loc":"client/src/pages/AdminRefunds.tsx:452",label:"Purchase time",value:`${J(b.purchasedAt)} · Philippine time`}),e.jsx(k,{"data-loc":"client/src/pages/AdminRefunds.tsx:453",label:"Request reason",value:b.reason.replaceAll("_"," ")}),e.jsx(k,{"data-loc":"client/src/pages/AdminRefunds.tsx:454",label:"Customer details",value:b.details||"No additional details supplied."}),e.jsx(k,{"data-loc":"client/src/pages/AdminRefunds.tsx:455",label:"Policy tier",value:b.refundTier.replace("_"," ")}),e.jsx(k,{"data-loc":"client/src/pages/AdminRefunds.tsx:456",label:"Submitted",value:J(b.createdAt)}),e.jsx(k,{"data-loc":"client/src/pages/AdminRefunds.tsx:457",label:"Receipt email",value:b.confirmationEmailSentAt?`Sent ${J(b.confirmationEmailSentAt)}`:"Not recorded as sent"})]})]}),e.jsxs("section",{"data-loc":"client/src/pages/AdminRefunds.tsx:461",className:"space-y-5",children:[e.jsxs("div",{"data-loc":"client/src/pages/AdminRefunds.tsx:462",className:"border border-white/10 bg-white/[0.025] p-5",children:[e.jsxs("div",{"data-loc":"client/src/pages/AdminRefunds.tsx:463",className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/AdminRefunds.tsx:464",children:[e.jsx("p",{"data-loc":"client/src/pages/AdminRefunds.tsx:465",className:"text-[0.6rem] font-extrabold uppercase tracking-[0.16em] text-white/34",children:"HitPay record"}),e.jsx("p",{"data-loc":"client/src/pages/AdminRefunds.tsx:466",className:"mt-2 text-sm leading-6 text-white/55",children:b.reconciliationNote||"No reconciliation attempt recorded."})]}),e.jsx(We,{"data-loc":"client/src/pages/AdminRefunds.tsx:468",className:"size-5 shrink-0 text-[#a78bfa]","aria-hidden":"true"})]}),b.hitpayPaymentId?e.jsxs("dl",{"data-loc":"client/src/pages/AdminRefunds.tsx:471",className:"mt-4 border-t border-white/8 pt-2",children:[e.jsx(k,{"data-loc":"client/src/pages/AdminRefunds.tsx:472",label:"Payment ID",value:e.jsx("span",{"data-loc":"client/src/pages/AdminRefunds.tsx:472",className:"font-mono text-xs",children:b.hitpayPaymentId})}),e.jsx(k,{"data-loc":"client/src/pages/AdminRefunds.tsx:473",label:"Payment status",value:b.hitpayPaymentStatus||"â"}),e.jsx(k,{"data-loc":"client/src/pages/AdminRefunds.tsx:474",label:"Amount",value:Me(b.hitpayAmount,b.hitpayCurrency)}),e.jsx(k,{"data-loc":"client/src/pages/AdminRefunds.tsx:475",label:"Refunded",value:Me(b.hitpayRefundedAmount,b.hitpayCurrency)}),e.jsx(k,{"data-loc":"client/src/pages/AdminRefunds.tsx:476",label:"Last checked",value:J(b.lastReconciledAt)})]}):null,e.jsxs(B,{"data-loc":"client/src/pages/AdminRefunds.tsx:479",type:"button",onClick:()=>O.mutate({id:b.id}),disabled:K,className:"mt-4 w-full bg-[#8B5CF6] text-white hover:bg-[#9f7aea]",children:[O.isPending?e.jsx(Re,{"data-loc":"client/src/pages/AdminRefunds.tsx:480",className:"mr-1 size-4 animate-spin"}):e.jsx(We,{"data-loc":"client/src/pages/AdminRefunds.tsx:480",className:"mr-1 size-4"}),"Reconcile with HitPay"]})]}),e.jsxs("div",{"data-loc":"client/src/pages/AdminRefunds.tsx:485",className:"border border-white/10 bg-white/[0.025] p-5",children:[e.jsxs("label",{"data-loc":"client/src/pages/AdminRefunds.tsx:486",className:"block",children:[e.jsx("span",{"data-loc":"client/src/pages/AdminRefunds.tsx:487",className:"text-[0.62rem] font-extrabold uppercase tracking-[0.14em] text-white/42",children:"Operational status"}),e.jsx("select",{"data-loc":"client/src/pages/AdminRefunds.tsx:488",value:u,onChange:m=>h(m.target.value),className:"mt-2 h-11 w-full border border-white/12 bg-[#100d16] px-3 text-sm text-white outline-none focus-visible:ring-2 focus-visible:ring-[#8B5CF6]",children:Object.entries(Le).map(([m,F])=>e.jsx("option",{"data-loc":"client/src/pages/AdminRefunds.tsx:489",value:m,children:F},m))})]}),e.jsxs("label",{"data-loc":"client/src/pages/AdminRefunds.tsx:492",className:"mt-4 block",children:[e.jsx("span",{"data-loc":"client/src/pages/AdminRefunds.tsx:493",className:"text-[0.62rem] font-extrabold uppercase tracking-[0.14em] text-white/42",children:"Administrator notes"}),e.jsx(Os,{"data-loc":"client/src/pages/AdminRefunds.tsx:494",value:R,onChange:m=>f(m.target.value),rows:5,maxLength:4e3,placeholder:"Record review decisions, follow-up, or processing references. These notes are not emailed to the customer.",className:"mt-2 border-white/12 bg-[#100d16] text-white"})]}),e.jsxs("p",{"data-loc":"client/src/pages/AdminRefunds.tsx:496",className:"mt-3 flex items-start gap-2 text-xs leading-5 text-white/38",children:[e.jsx(Us,{"data-loc":"client/src/pages/AdminRefunds.tsx:497",className:"mt-0.5 size-4 shrink-0 text-[#a78bfa]","aria-hidden":"true"}),"Changing the status sends the customer a confirmation email. Approved and processed states require verified HitPay payment details."]}),e.jsxs(B,{"data-loc":"client/src/pages/AdminRefunds.tsx:500",type:"button",onClick:()=>P.mutate({id:b.id,status:u,adminNotes:R.trim()||null}),disabled:K,variant:"outline",className:"mt-4 w-full border-[#8B5CF6]/35 bg-[#8B5CF6]/10 text-white hover:bg-[#8B5CF6]/20",children:[P.isPending?e.jsx(Re,{"data-loc":"client/src/pages/AdminRefunds.tsx:501",className:"mr-1 size-4 animate-spin"}):e.jsx(Fs,{"data-loc":"client/src/pages/AdminRefunds.tsx:501",className:"mr-1 size-4"}),"Save status and notes"]})]}),w?e.jsxs("div",{"data-loc":"client/src/pages/AdminRefunds.tsx:507",className:"flex items-start gap-2 border border-red-400/25 bg-red-400/[0.07] p-3 text-xs leading-5 text-red-200",role:"alert",children:[e.jsx(je,{"data-loc":"client/src/pages/AdminRefunds.tsx:508",className:"mt-0.5 size-4 shrink-0","aria-hidden":"true"}),w]}):null,N?e.jsxs("div",{"data-loc":"client/src/pages/AdminRefunds.tsx:513",className:"flex items-start gap-2 border border-emerald-400/25 bg-emerald-400/[0.07] p-3 text-xs leading-5 text-emerald-100",role:"status",children:[e.jsx(Ve,{"data-loc":"client/src/pages/AdminRefunds.tsx:514",className:"mt-0.5 size-4 shrink-0","aria-hidden":"true"}),N]}):null]})]})]}):null})})]})}export{jo 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.