1import{r as d,o,j as e,Q as g,b as p}from"./index-CtR2Cm7C.js";const y=["LATAM_NORTE","LATAM_SUR","BRASIL","NA","EU","ASIA","GLOBAL"],k=["Division1","Division2","Division3","Academy"];function S(){const[m,f]=d.useState(""),[s,j]=d.useState("LATAM_NORTE"),[a,N]=d.useState("Division1"),{data:r=[]}=o({queryKey:["league-seasons-cl"],queryFn:()=>p.entities.LeagueSeason.list("-created_date",10),staleTime:300*1e3}),x=r.find(t=>t.status==="active"||t.status==="playoffs")||r[0],l=m||x?.id,{data:c=[],isLoading:w}=o({queryKey:["league-standings",l,s,a],queryFn:()=>p.entities.LeagueStanding.filter({season_id:l,region:s,division:a},"position",50),enabled:!!l,staleTime:60*1e3}),{data:h=[]}=o({queryKey:["league-schedule-recent",l,s,a],queryFn:()=>p.entities.LeagueSchedule.filter({season_id:l,region:s,division:a},"-scheduled_at",5),enabled:!!l,staleTime:60*1e3}),b=h.filter(t=>t.status==="completed").slice(0,3),u=h.filter(t=>t.status==="scheduled").slice(0,3);return e.jsxs("div",{className:"min-h-screen bg-black",style:{fontFamily:'-apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif'},children:[e.jsxs("section",{className:"relative px-4 pt-8 pb-5",style:{background:"linear-gradient(180deg, #0a0d00 0%, #0a0a0a 100%)"},children:[e.jsx("div",{className:"absolute inset-0 pointer-events-none overflow-hidden",children:e.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-[240px] h-[120px] rounded-full opacity-20",style:{background:"radial-gradient(ellipse, #22c55e 0%, transparent 70%)",filter:"blur(40px)"}})}),e.jsxs("div",{className:"relative max-w-lg mx-auto",children:[e.jsxs("div",{className:"inline-flex items-center gap-2 mb-3 px-3 py-1.5 rounded-full",style:{background:"rgba(34,197,94,0.12)",border:"1px solid rgba(34,197,94,0.28)"},children:[e.jsx(g,{className:"w-3.5 h-3.5 text-green-400"}),e.jsx("span",{className:"text-[10px] font-black text-green-300 uppercase tracking-[0.2em]",children:"FLF · Clasificación"})]}),e.jsx("h1",{className:"text-[clamp(1.8rem,7vw,2.8rem)] font-black text-white leading-tight mb-1",children:"Clasificación"}),e.jsx("p",{className:"text-[12px] text-white/35",children:"Por Liga · Temporada · División · Región"})]})]}),e.jsxs("div",{className:"px-4 py-3 border-b border-white/[0.05] space-y-2",children:[e.jsxs("div",{className:"max-w-lg mx-auto grid grid-cols-2 gap-2",children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-[9px] text-white/30 uppercase tracking-wider mb-1 block",children:"Temporada"}),e.jsxs("select",{value:m,onChange:t=>f(t.target.value),className:"w-full bg-white/[0.05] border border-white/[0.08] rounded-xl px-3 py-2 text-[12px] text-white outline-none",children:[x&&e.jsxs("option",{value:"",className:"bg-black",children:["Actual: ",x.name]}),r.map(t=>e.jsx("option",{value:t.id,className:"bg-black",children:t.name},t.id))]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-[9px] text-white/30 uppercase tracking-wider mb-1 block",children:"División"}),e.jsx("select",{value:a,onChange:t=>N(t.target.value),className:"w-full bg-white/[0.05] border border-white/[0.08] rounded-xl px-3 py-2 text-[12px] text-white outline-none",children:k.map(t=>e.jsx("option",{value:t,className:"bg-black",children:t},t))})]})]}),e.jsx("div",{className:"max-w-lg mx-auto flex gap-1.5 overflow-x-auto scrollbar-hide pb-1",children:y.map(t=>e.jsx("button",{onClick:()=>j(t),className:`flex-shrink-0 px-3 py-1 rounded-full text-[10px] font-bold transition-all ${s===t?"bg-green-500 text-black":"bg-white/[0.05] text-white/40 hover:text-white/70"}`,children:t},t))})]}),e.jsxs("div",{className:"max-w-lg mx-auto px-4 py-4 pb-28 space-y-5",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsxs("p",{className:"text-[9px] font-black uppercase tracking-[0.22em] text-white/25",children:["Tabla â ",a," · ",s]}),c.some(t=>t.qualified)&&e.jsx("span",{className:"text-[9px] px-2 py-0.5 rounded-full text-green-400",style:{background:"rgba(52,211,153,0.1)"},children:"ð¢ = clasificado"})]}),w?e.jsx("div",{className:"flex justify-center py-10",children:e.jsx("div",{className:"w-5 h-5 border-2 border-white/20 border-t-green-400 rounded-full animate-spin"})}):c.length===0?e.jsxs("div",{className:"py-12 text-center rounded-2xl",style:{background:"rgba(255,255,255,0.02)",border:"1px solid rgba(255,255,255,0.05)"},children:[e.jsx(g,{className:"w-10 h-10 text-white/10 mx-auto mb-3"}),e.jsxs("p",{className:"text-white/30 text-sm",children:["Sin clasificación para ",a," / ",s]}),e.jsx("p",{className:"text-white/20 text-xs mt-1",children:"Los datos se actualizan conforme se juegan partidos"})]}):e.jsxs("div",{className:"rounded-2xl overflow-hidden",style:{border:"1px solid rgba(255,255,255,0.07)"},children:[e.jsxs("div",{className:"flex items-center px-3 py-2 text-[9px] font-black uppercase tracking-wider text-white/25",style:{background:"rgba(255,255,255,0.04)",borderBottom:"1px solid rgba(255,255,255,0.05)"},children:[e.jsx("span",{className:"w-7",children:"#"}),e.jsx("span",{className:"flex-1",children:"Equipo"}),e.jsx("span",{className:"w-6 text-center",children:"PJ"}),e.jsx("span",{className:"w-6 text-center",children:"V"}),e.jsx("span",{className:"w-6 text-center",children:"D"}),e.jsx("span",{className:"w-8 text-center",children:"Dif"}),e.jsx("span",{className:"w-8 text-right font-black",children:"Pts"})]}),c.map((t,i)=>e.jsxs("div",{className:"flex items-center px-3 py-2.5",style:{background:t.qualified?"rgba(52,211,153,0.04)":t.eliminated?"rgba(248,113,113,0.03)":i%2===0?"rgba(255,255,255,0.02)":"transparent",borderBottom:i<c.length-1?"1px solid rgba(255,255,255,0.04)":"none"},children:[e.jsx("span",{className:`w-7 text-[12px] font-black ${i===0?"text-amber-400":i===1?"text-slate-300":i===2?"text-orange-400":"text-white/30"}`,children:t.qualified?"ð¢":t.eliminated?"ð´":`${t.position||i+1}`}),e.jsxs("div",{className:"flex-1 min-w-0 flex items-center gap-2",children:[t.team_logo?e.jsx("img",{src:t.team_logo,className:"w-5 h-5 rounded object-cover flex-shrink-0",alt:""}):e.jsx("div",{className:"w-5 h-5 rounded bg-white/10 flex-shrink-0"}),e.jsx("span",{className:"text-[12px] font-bold text-white truncate",children:t.team_name})]}),e.jsx("span",{className:"w-6 text-center text-[11px] text-white/40",children:t.played||
10}),e.jsx("span",{className:"w-6 text-center text-[11px] text-green-400",children:t.wins||0}),e.jsx("span",{className:"w-6 text-center text-[11px] text-red-400",children:t.losses||0}),e.jsxs("span",{className:`w-8 text-center text-[11px] font-bold ${(t.score_diff||0)>=0?"text-green-400":"text-red-400"}`,children:[(t.score_diff||0)>=0?"+":"",t.score_diff||0]}),e.jsx("span",{className:"w-8 text-right text-[13px] font-black text-white",children:t.points||0}),t.form?.length>0&&e.jsx("div",{className:"hidden sm:flex gap-0.5 ml-2",children:t.form.slice(-5).map((n,v)=>e.jsx("span",{className:"w-3.5 h-3.5 rounded text-[7px] font-black flex items-center justify-center",style:{background:n==="W"?"rgba(52,211,153,0.25)":n==="L"?"rgba(248,113,113,0.25)":"rgba(251,191,36,0.25)",color:n==="W"?"#34d399":n==="L"?"#f87171":"#fbbf24"},children:n},v))})]},t.id))]})]}),b.length>0&&e.jsxs("div",{children:[e.jsx("p",{className:"text-[9px] font-black uppercase tracking-[0.22em] text-white/25 mb-2",children:"Ãltimos Resultados"}),e.jsx("div",{className:"space-y-2",children:b.map(t=>e.jsxs("div",{className:"flex items-center gap-3 px-3 py-2.5 rounded-xl",style:{background:"rgba(255,255,255,0.04)",border:"1px solid rgba(255,255,255,0.07)"},children:[e.jsx("p",{className:"text-[11px] font-bold text-white flex-1 truncate",children:t.team_a_name}),e.jsxs("span",{className:"text-[13px] font-black text-amber-400 flex-shrink-0 px-2",children:[t.score_a??"-"," â ",t.score_b??"-"]}),e.jsx("p",{className:"text-[11px] font-bold text-white flex-1 text-right truncate",children:t.team_b_name})]},t.id))})]}),u.length>0&&e.jsxs("div",{children:[e.jsx("p",{className:"text-[9px] font-black uppercase tracking-[0.22em] text-white/25 mb-2",children:"Próximos Partidos"}),e.jsx("div",{className:"space-y-2",children:u.map(t=>e.jsxs("div",{className:"flex items-center gap-3 px-3 py-2.5 rounded-xl",style:{background:"rgba(255,255,255,0.03)",border:"1px solid rgba(255,255,255,0.06)"},children:[e.jsx("p",{className:"text-[11px] text-white flex-1 truncate",children:t.team_a_name}),e.jsxs("div",{className:"flex-shrink-0 text-center",children:[e.jsx("p",{className:"text-[9px] text-white/30",children:"vs"}),t.scheduled_at&&e.jsx("p",{className:"text-[9px] text-white/40",children:new Date(t.scheduled_at).toLocaleDateString("es",{month:"short",day:"numeric"})})]}),e.jsx("p",{className:"text-[11px] text-white flex-1 text-right truncate",children:t.team_b_name})]},t.id))})]})]})]})}export{S 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.