PageSourceSearch

https://edgemxtiming.com/assets/EventAnalyticsPage-BD5GQW4f.js

js edgemxtiming.com collected 2026-09-24 14:42:38 UTC 3,947 bytes, 1 lines download raw bytes

1import{E as g,i as j,r as b,h as v,l as y,j as e,B as p,S as N,n as A,o as w,q as S,t as x,s as C}from"./index-BCH4IFx8.js";import{A as _}from"./AdminAnalytics-Cs4tGsAg.js";import{a as R,A as k}from"./AIFloatingButton-CaPC8bmX.js";import{O as P}from"./OrganizationBadge-C2rDZhgC.js";import{u as E}from"./useEventAnalytics-C_TU_ZH1.js";import{C as I,a as B}from"./card-DaE3Hwfn.js";import{A as q}from"./arrow-left-CX5CfIFs.js";import"./BpSpinner-Bqvfph1h.js";import"./accordion-BhWFpyA1.js";import"./index-DKPz-1vL.js";import"./orgNetRevenue-Bfw6BRxN.js";import"./estimated-progress-CETNSrc9.js";import"./progress-CL2A5cKM.js";import"./users-Cp35uMGZ.js";import"./dollar-sign-DZ3kPgTb.js";import"./trending-up-oNvFqoXH.js";import"./checkbox-D7mWENF4.js";import"./scroll-area-hNK22iDX.js";import"./settings-2-CB6x7-YK.js";import"./index-Dh4i1-J3.js";import"./tag-Mk6oilZH.js";import"./clock-DEKHqbRJ.js";import"./ellipsis-B1WFyn5h.js";import"./refresh-cw-Bp2bbqxH.js";import"./ImageLightbox-ey1BtFuB.js";import"./chevron-left-BfsUvDbz.js";import"./bot-BqG0y9ls.js";import"./trash-2-CrxPrdNf.js";import"./minus-DdEXcKKQ.js";import"./zap-Cjz0tJy0.js";import"./sparkles-Bw29Z9hN.js";import"./thumbs-up-lKUbd0LV.js";import"./thumbs-down-Bw1mgNVr.js";import"./send-CJD-Z0Nl.js";import"./crosshair-DfOELHsT.js";import"./building-2-DCnXAUm3.js";import"./resolveClassName-DvVkNNVP.js";function be(){var d;const{eventId:t}=g(),n=j(),[i,o]=b.useState(!1),[c,h]=v(),r=c.get("race"),{data:l,isLoading:u}=y({queryKey:["event",t],queryFn:async()=>{const{data:s,error:a}=await C.from("events").select("*").eq("id",t).maybeSingle();if(a)throw a;return s},enabled:!!t}),m=((d=E(t,r).data)==null?void 0:d.availableRaces)??[],f=s=>{const a=new URLSearchParams(c);s==="__all__"?a.delete("race"):a.set("race",s),h(a,{replace:!0})};return u?e.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background",children:e.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary"})}):l?e.jsxs("div",{className:"min-h-screen bg-background",children:[e.jsx("header",{className:"border-b border-border bg-card",children:e.jsx("div",{className:"container mx-auto px-4 py-4 flex items-center justify-between",children:e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx(p,{variant:"ghost",size:"icon",onClick:()=>n("/admin"),children:e.jsx(q,{className:"h-5 w-5"})}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("h1",{className:"text-xl font-bold",children:[l.name," - Analytics"]}),e.jsx(P,{})]}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Registration metrics and insights"})]})]})})}),e.jsxs("main",{className:`container mx-auto px-4 py-6 transition-all duration-300 ${i?"mr-80":""}`,children:[m.length>=2&&e.jsx(I,{className:"mb-6 bg-card border-border",children:e.jsxs(B,{className:"py-4 flex flex-col sm:flex-row sm:items-center gap-3",children:[e.jsx("div",{className:"text-sm font-medium text-foreground whitespace-nowrap",children:"Showing analytics for:"}),e.jsxs(N,{value:r??"__all__",onValueChange:f,children:[e.jsx(A,{className:"sm:max-w-md",children:e.jsx(w,{})}),e.jsxs(S,{children:[e.jsx(x,{value:"__all__",children:"All Races (Series Total)"}),m.map(s=>e.jsx(x,{value:s,children:s},s))]})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:r?"Revenue is prorated across the races each rider signed up for.":"Combined totals across the entire series."})]})}),e.jsx(_,{eventId:t,selectedRace:r})]}),!i&&e.jsx(R,{onClick:()=>o(!0)}),e.jsx(k,{pageContext:"admin-analytics",isOpen:i,onClose:()=>o(!1),className:"fixed right-0 top-0 w-80 h-screen z-50"})]}):e.jsxs("div",{className:"min-h-screen flex flex-col items-center justify-center bg-background gap-4",children:[e.jsx("h1",{className:"text-2xl font-bold",children:"Event Not Found"}),e.jsx(p,{onClick:()=>n("/admin"),children:"Back to Dashboard"})]})}export{be 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.