PageSourceSearch

https://keralaathletics.org/assets/MeetResults-B_XxWnje.js

js keralaathletics.org collected 2026-10-02 14:29:03 UTC 5,792 bytes, 1 lines download raw bytes

1import{r as o,h as C,j as e,L as E}from"./index-D3Vf-90J.js";import{N as S,b as k}from"./Footer-ByKrdv9y.js";import{E as M,f as R,c as h,d as v,e as T,g as A,h as L,j as D}from"./meet-results-feed-DZyUfI0F.js";import{T as F,m as I,C as U}from"./meet-covers-DGo60WcJ.js";import{D as _,i as P}from"./meet-results-Bw2eb5lZ.js";import{T as g}from"./trophy-DnaU0_1M.js";import{C as $}from"./circle-alert-BpTieaoP.js";import{C as B}from"./circle-check-BVR9LRcs.js";import"./image-utils-Dh8CG_2V.js";const O=({meet:t,index:n,cover:l,basePath:r})=>{const p=n%2===0?"-rotate-[1.5deg]":"rotate-[1.5deg]",c=v(t),[u,m]=o.useState(!1),f=l&&!u?l:I(t.title,n);return e.jsx(E,{to:D(t.eventId,null,r),className:`group block rounded-3xl transition-transform duration-300 ease-out ${p} hover:rotate-0 hover:-translate-y-2 focus-visible:rotate-0 focus-visible:-translate-y-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-4 motion-reduce:transform-none`,children:e.jsxs("article",{className:"relative aspect-[4/3] rounded-3xl overflow-hidden border border-border shadow-medium transition-shadow duration-300 group-hover:shadow-strong",children:[e.jsx("img",{src:f,alt:"",loading:"lazy",onError:()=>m(!0),className:"absolute inset-0 w-full h-full object-cover transition-transform duration-500 group-hover:scale-105 motion-reduce:transform-none"}),e.jsx("div",{className:"absolute inset-0 sport-img-overlay"}),c==="live"?e.jsxs("span",{className:"absolute top-4 left-4 inline-flex items-center gap-2 px-3 py-1.5 rounded-full bg-accent text-accent-foreground font-poppins text-[11px] font-bold uppercase tracking-wider shadow-soft",children:[e.jsxs("span",{className:"relative flex h-2 w-2",children:[e.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-white opacity-75 motion-reduce:hidden"}),e.jsx("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-white"})]}),"Live now"]}):c==="completed"?e.jsxs("span",{className:"absolute top-4 left-4 inline-flex items-center gap-2 px-3 py-1.5 rounded-full bg-black/45 backdrop-blur-sm font-poppins text-[11px] font-bold uppercase tracking-wider text-white shadow-soft",children:[e.jsx(B,{className:"w-3.5 h-3.5"})," Completed"]}):e.jsxs("span",{className:"absolute top-4 left-4 inline-flex items-center gap-2 px-3 py-1.5 rounded-full bg-black/45 backdrop-blur-sm font-poppins text-[11px] font-bold uppercase tracking-wider text-white shadow-soft",children:[e.jsx(U,{className:"w-3.5 h-3.5"})," Upcoming"]}),e.jsx("h2",{className:"absolute inset-x-0 bottom-0 p-5 sm:p-6 font-poppins text-lg sm:text-xl md:text-2xl font-bold text-white leading-snug img-caption",children:t.title||"Untitled meet"})]})})},b=()=>e.jsx("div",{className:"aspect-[4/3] rounded-3xl shimmer"}),z=t=>t<=1?"max-w-md":t===2?"sm:grid-cols-2 max-w-4xl":"sm:grid-cols-2 lg:grid-cols-3 max-w-6xl",X=({basePath:t=A,loadFeed:n=L,notice:l}={})=>{const[r,p]=o.useState(M),[c,u]=o.useState(!0),[m,f]=o.useState(null),[j,N]=o.useState({}),[w]=C(),i=w.get(_);o.useEffect(()=>{let s=!1;return n().then(a=>!s&&p(a)).catch(a=>!s&&f(a instanceof Error?a.message:"Failed to load results")).finally(()=>!s&&u(!1)),R().then(a=>!s&&N(a)).catch(()=>{}),()=>{s=!0}},[n]);const d=(i?r.events.filter(s=>P(h(s),i)):r.events).slice().reverse(),x=i?d.map(h).find(Boolean)||i.charAt(0).toUpperCase()+i.slice(1):null,y=d.some(s=>v(s)==="live");return e.jsxs("div",{className:"min-h-screen font-inter",children:[e.jsx(S,{}),l&&e.jsx("div",{className:"bg-secondary text-secondary-foreground text-center font-inter text-sm font-semibold px-4 py-2",children:l}),e.jsxs("main",{children:[e.jsx("section",{className:"bg-gradient-hero hero-mesh py-16",children:e.jsx("div",{className:"container mx-auto px-4",children:e.jsxs("div",{className:"max-w-3xl mx-auto text-center animate-fade-in",children:[e.jsxs("p",{className:"label-tag-light mb-3",children:[e.jsx(g,{className:"w-3.5 h-3.5"})," ",y?"Live results":"Results"]}),e.jsx("h1",{className:"font-poppins text-3xl md:text-5xl font-bold text-primary-foreground mb-4",children:x?`${x} Meet Results`:"Meet Results"}),e.jsx("p",{className:"font-inter text-base md:text-lg text-primary-foreground
1/85",children:"Choose a meet to follow its placings, heats and standings."}),r.generatedAt&&e.jsxs("span",{className:"inline-flex items-center gap-2 mt-6 px-3 py-1.5 rounded-full bg-white/10 border border-white/15 font-inter text-xs text-primary-foreground/85",children:[e.jsx(F,{className:"w-3.5 h-3.5"})," Updated ",T(r.generatedAt)]})]})})}),e.jsx("section",{className:"py-14",children:e.jsxs("div",{className:"container mx-auto px-4",children:[m&&e.jsxs("div",{className:"max-w-4xl mx-auto flex items-start gap-3 p-4 rounded-xl border border-destructive/40 bg-destructive/10 mb-8",children:[e.jsx($,{className:"w-5 h-5 text-destructive flex-shrink-0 mt-0.5"}),e.jsxs("p",{className:"font-inter text-sm text-muted-foreground",children:["Could not load the results feed. ",m]})]}),c?e.jsxs("div",{className:"grid gap-8 sm:grid-cols-2 max-w-4xl mx-auto",children:[e.jsx(b,{}),e.jsx(b,{})]}):d.length===0?e.jsxs("div",{className:"max-w-md mx-auto text-center py-16 border border-dashed border-border rounded-2xl bg-card/70",children:[e.jsx(g,{className:"w-12 h-12 mx-auto mb-4 text-muted-foreground/40"}),e.jsx("p",{className:"font-poppins font-semibold text-foreground",children:x?`No ${x} meet published yet`:"No meet published yet"}),e.jsx("p",{className:"font-inter text-sm text-muted-foreground mt-1",children:"Championships appear here as soon as results start coming in."})]}):e.jsx("div",{className:`grid gap-8 md:gap-10 mx-auto ${z(d.length)}`,children:d.map((s,a)=>e.jsx(O,{meet:s,index:a,cover:j[s.eventId],basePath:t},s.eventId))})]})})]}),e.jsx(k,{})]})};export{X 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.