1import{a8 as g,j as e,r as d,L as b}from"./index-9wHtJ2OB.js";const f="/assets/athletes-roster-band-DM2wqSaX.jpg";function w(){const s=g.useLoaderData();return s.status!=="ok"?e.jsxs("main",{className:"mx-auto max-w-2xl px-6 py-20",children:[e.jsx("h1",{className:"text-3xl font-extrabold uppercase tracking-tighter text-navy",children:"Directory not available yet"}),e.jsxs("p",{className:"mt-4 text-muted-foreground",children:["The athlete spreadsheet isn't connected right now. Email"," ",e.jsx("a",{href:"mailto:[email protected]",className:"font-bold underline",children:"[email protected]"}),"."]})]}):e.jsx(j,{country:s.country,athletes:s.athletes})}function j({country:s,athletes:l}){const[n,x]=d.useState(""),[m,h]=d.useState(""),c=d.useMemo(()=>{const o=m.trim().toLowerCase();return l.filter(r=>{const t=!n||r.sport===n,a=!o||[r.name,r.school,r.position,r.hometown].some(u=>u.toLowerCase().includes(o));return t&&a})},[l,m,n]),p=d.useMemo(()=>{const o=new Map;for(const r of c){const t=r.sport||"Other",a=o.get(t)??[];a.push(r),o.set(t,a)}return[...o.entries()].sort((r,t)=>r[0].localeCompare(t[0]))},[c]);return e.jsxs("main",{children:[e.jsxs("section",{className:"relative isolate overflow-hidden border-b border-border",style:{backgroundColor:s.wash},children:[e.jsx("img",{src:f,alt:"","aria-hidden":"true",width:1600,height:544,className:"absolute inset-0 h-full w-full object-cover opacity-15"}),e.jsxs("div",{className:"relative mx-auto max-w-6xl px-6 py-14",children:[e.jsx(b,{to:"/NCAA",className:"font-mono text-[10px] uppercase tracking-[0.25em] text-muted-foreground hover:text-navy",children:"â All countries"}),e.jsxs("div",{className:"mt-6 flex flex-wrap items-end gap-6",children:[s.flagUrl?e.jsx("img",{src:s.flagUrl,alt:`Flag of ${s.name}`,width:160,height:107,className:"h-20 w-auto border border-border/60 shadow-sm sm:h-24"}):e.jsx("span",{className:"text-7xl leading-none sm:text-8xl","aria-hidden":"true",children:s.flag}),e.jsxs("div",{children:[e.jsx("h1",{className:"text-4xl font-extrabold uppercase leading-[0.95] tracking-tighter sm:text-6xl",style:{color:s.accent},children:s.name}),e.jsxs("p",{className:"mt-3 text-lg text-muted-foreground",children:[s.athleteCount," ",s.athleteCount===1?"athlete":"athletes"," ·"," ",s.sports.length," ",s.sports.length===1?"sport":"sports"," ·"," ",s.schools.length," ",s.schools.length===1?"school":"schools"]})]})]})]})]}),e.jsxs("div",{className:"mx-auto max-w-6xl px-6",children:[e.jsxs("div",{className:"flex flex-col gap-3 border-b border-border py-4 sm:flex-row sm:items-center",children:[e.jsx("input",{type:"search",value:m,onChange:o=>h(o.target.value),placeholder:"Search athlete, school, hometownâ¦",className:"w-full border border-border bg-background px-4 py-2.5 text-sm outline-none focus:border-navy focus:ring-2 focus:ring-navy/20 sm:max-w-xs"}),e.jsxs("select",{value:n,onChange:o=>x(o.target.value),className:"w-full border border-border bg-background px-4 py-2.5 text-sm outline-none focus:border-navy sm:max-w-xs",children:[e.jsx("option",{value:"",children:"All sports"}),s.sports.map(o=>e.jsx("option",{value:o,children:o},o))]}),e.jsxs("span",{className:"font-mono text-[10px] uppercase tracking-[0.25em] text-muted-foreground sm:ml-auto",children:[c.length," shown"]})]}),c.length===0?e.jsx("p",{className:"py-20 text-muted-foreground",children:"No athletes match that search â try clearing the filters."}):e.jsx("div",{className:"py-12",children:p.map(([o,r])=>e.jsxs("section",{className:"mb-14",children:[e.jsxs("h2",{className:"flex items-center gap-3 text-xl font-extrabold uppercase tracking-tight text-navy",children:[e.jsx("span",{"aria-hidden":"true",children:r[0].sportEmoji}),o,e.jsx("span",{className:"font-mono text-[10px] font-normal tracking-[0.25em] text-muted-foreground",children:r.length})]}),e.jsx("ul",{className:"mt-5 grid gap-5 sm:grid-cols-2 lg:grid-cols-3",children:r.map(t=>e.jsxs("li",{className:"border border-border bg-background p-5",children:[e.jsx("h3",{className:"text-lg font-bold leading-tight text-foreground",children:t.name}),t.school&&e.jsx("p",{className:"mt-1 text-sm font-bold",style:{color:s.accent},children:t.school}),e.jsxs("dl",{className:"mt-3 space-y-1 text-sm text-muted-foreground",children:[t.position&&e.jsx(i,{label:"Position",value:t.position}),t.classYear&&e.jsx(i,{label:"Class",value:t.classYear}),t.hometown&&e.jsx(i,{label:"Hometown",value:t.hometown}),t.extras.map(a=>e.jsx(i,{label:a.label,value:a.value},a.label))]}),t.notes&&e.jsx("p",{className:"mt-3 border-l-2 border-forest pl-3 text-sm leading-relaxed text-muted-foreground",children:t.notes})]},t.id))})]},o))})]})]})}function i({label:s,value:l}){return e.jsxs("div",{className:"flex gap-2",children:[e.jsx("dt",{className:"font-mono text-[10px] uppercase tracking-[0.2em] leading-5 text-muted-foreground
1/70",children:s}),e.jsx("dd",{className:"flex-1",children:l})]})}export{w as component};
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.