PageSourceSearch

https://flfproleague.com/assets/TeamDetail-tVgLgR3m.js

js flfproleague.com collected 2026-10-05 23:11:37 UTC 41,566 bytes, 6 lines download raw bytes

1import{J as De,j as e,w as Oe,x as le,X as xe,S as w,ac as Q,r as b,c as B,y as ue,U,aa as pe,h as he,M as Be,m as M,v as W,aW as je,av as fe,f as Fe,N as Ue,o as g,b as p,A as ce,O as ze,k as D}from"./index-CtR2Cm7C.js";import{R as Ke}from"./ReportDialog-P-Cecb5n.js";import{B as Je}from"./badge-BtmlmM6m.js";import{B as O}from"./button-2frSB4pm.js";import{S as Y}from"./star-C4mVafEC.js";import{b as Ve}from"./VerificationBadge-_rI8B_Sf.js";import{G as oe}from"./GameIcon-j19gTW8i.js";import{T as be}from"./TeamHeraldicVerification-CevnxECq.js";import{P as Ge}from"./phone-BYJ0XB11.js";import{C as He}from"./crosshair-Lt41x66M.js";import{C as ge}from"./CountryFlag-C1NO1QFU.js";import{g as ve}from"./countryFlags-4_EjXWWl.js";import{M as Ne}from"./map-pin-C6nJj4pR.js";import{S as Qe}from"./shield-check-D6RITCT8.js";import{G as F}from"./graduation-cap-18Ez5CR1.js";import{P as We}from"./ProfileFollowButton-LThlWIvx.js";import{E as Ye}from"./ellipsis--UnAcOD2.js";import{U as de}from"./user-plus-CfIgJoap.js";import{T as Xe}from"./target-CNMRKRHG.js";import"./dialog-Dd9Dz3HR.js";import"./index-i13djcCd.js";import"./index-BzvZTE6w.js";import"./index-OxmuvU-r.js";import"./index-DokfpFqZ.js";import"./index-C2ucMHlt.js";import"./index-CZF2G8Cx.js";import"./label-BM0K1dVk.js";import"./textarea-Fy6k9mZt.js";import"./triangle-alert-BSj5rZQS.js";import"./upload-Dy_G_Nx3.js";import"./lock-open-CyktMdjX.js";import"./gameCatalog-QgnXfsEl.js";/**
2 * @license lucide-react v0.475.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 Ze=[["circle",{cx:"18",cy:"15",r:"3",key:"gjjjvw"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M10 15H6a4 4 0 0 0-4 4v2",key:"1nfge6"}],["path",{d:"m21.7 16.4-.9-.3",key:"12j9ji"}],["path",{d:"m15.2 13.9-.9-.3",key:"1fdjdi"}],["path",{d:"m16.6 18.7.3-.9",key:"heedtr"}],["path",{d:"m19.1 12.2.3-.9",key:"1af3ki"}],["path",{d:"m19.6 18.7-.4-1",key:"1x9vze"}],["path",{d:"m16.8 12.3-.4-1",key:"vqeiwj"}],["path",{d:"m14.3 16.6 1-.4",key:"1qlj63"}],["path",{d:"m20.7 13.8 1-.4",key:"1v5t8k"}]],es=De("UserCog",Ze);function ss({member:s,onClose:r}){if(!s)return null;const n=s.role==="captain"?"Capitán":s.role==="substitute"?"Suplente":"Titular",i=s.role==="captain"?"text-yellow-400":s.role==="substitute"?"text-orange-400":"text-cyan-400",c=s.role==="captain"?"bg-yellow-500/15 border-yellow-500/30":s.role==="substitute"?"bg-orange-500/15 border-orange-500/30":"bg-cyan-500/15 border-cyan-500/30";return e.jsx(Oe,{children:e.jsx(le.div,{initial:{opacity:0}
6,animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 bg-black/60 backdrop-blur-sm z-50 flex items-end justify-center",onClick:r,children:e.jsxs(le.div,{initial:{y:"100%"},animate:{y:0},exit:{y:"100%"},transition:{type:"spring",damping:28,stiffness:300},className:"w-full max-w-lg bg-[#1c1c1e] rounded-t-3xl pb-10 overflow-hidden",onClick:u=>u.stopPropagation(),children:[e.jsx("div",{className:"flex justify-center pt-3 pb-2",children:e.jsx("div",{className:"w-10 h-1 rounded-full bg-white/20"})}),e.jsxs("div",{className:"flex items-start justify-between px-5 pt-3 pb-5",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("div",{className:"relative",children:s.user_avatar?e.jsx("img",{src:s.user_avatar,alt:s.user_name,className:"w-16 h-16 rounded-2xl object-cover"}):e.jsx("div",{className:"w-16 h-16 rounded-2xl bg-gradient-to-br from-purple-600 to-pink-600 flex items-center justify-center text-white text-2xl font-black",children:s.user_name?.charAt(0)})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-xl font-black text-white",children:s.user_name}),e.jsx("span",{className:`text-xs font-semibold px-2 py-0.5 rounded-full border ${c} ${i}`,children:n})]})]}),e.jsx("button",{"aria-label":"Cerrar",onClick:r,className:"w-8 h-8 rounded-full bg-white/10 flex items-center justify-center mt-1",children:e.jsx(xe,{className:"w-4 h-4 text-white/60"})})]}),e.jsxs("div",{className:"mx-5 bg-white/[0.05] rounded-2xl divide-y divide-white/[0.06]",children:[s.ff_id&&e.jsxs("div",{className:"flex items-center justify-between px-4 py-3",children:[e.jsx("span",{className:"text-sm text-white/50",children:"ID Free Fire"}),e.jsx("span",{className:"text-sm font-bold text-white font-mono",children:s.ff_id})]}),e.jsxs("div",{className:"flex items-center justify-between px-4 py-3",children:[e.jsx("span",{className:"text-sm text-white/50",children:"Posición"}),e.jsx("span",{className:`text-sm font-bold ${i}`,children:n})]}),e.jsxs("div",{className:"flex items-center justify-between px-4 py-3",children:[e.jsx("span",{className:"text-sm text-white/50",children:"Estado"}),e.jsx("span",{className:"text-sm font-bold text-green-400",children:s.status==="active"?"Activo":"Inactivo"})]})]}),e.jsxs("div",{className:"grid grid-cols-3 gap-3 mx-5 mt-4",children:[e.jsxs("div",{className:"bg-white/[0.05] rounded-2xl p-4 text-center",children:[e.jsx(w,{className:"w-5 h-5 text-yellow-400 mx-auto mb-1"}),e.jsx("p",{className:"text-xs text-white/40 mt-1",children:"Rol"}),e.jsx("p",{className:"text-xs font-bold text-white mt-0.5",children:n})]}),e.jsxs("div",{className:"bg-white/[0.05] rounded-2xl p-4 text-center",children:[e.jsx(Q,{className:"w-5 h-5 text-purple-400 mx-auto mb-1"}),e.jsx("p",{className:"text-xs text-white/40 mt-1",children:"Equipo"}),e.jsx("p",{className:"text-xs font-bold text-white mt-0.5",children:"Activo"})]}),e.jsxs("div",{className:"bg-white/[0.05] rounded-2xl p-4 text-center",children:[e.jsx(Y,{className:"w-5 h-5 text-cyan-400 mx-auto mb-1"}),e.jsx("p",{className:"text-xs text-white/40 mt-1",children:"Nivel"}),e.jsx("p",{className:"text-xs font-bold text-white mt-0.5",children:"Pro"})]})]})]})})})}function as({games:s=[],iconValues:r={},className:n="",appearance:i,variant:c="default"}){if(!s.length)return null;if(c==="team")return e.jsx("div",{className:`flex flex-wrap items-center justify-center gap-2 ${n}`,children:s.map(o=>e.jsxs("div",{className:"team-game-pill inline-flex h-9 max-w-full items-center gap-2 rounded-full border px-3 shadow-sm",children:[e.jsx(oe,{name:o,size:"badge",appearance:{...i,logoBorderEnabled:!1}}),e.jsx("span",{className:"truncate text-[11px] font-semibold tracking-wide text-white/80",children:o})]},o))});const u={small:"xs",medium:"sm",large:"md"}[i?.gameLogoSize]||"xs";return e.jsx("div",{className:`flex flex-wrap items-center justify-center gap-5 rounded-2xl border p-4 ${n}`,style:{backgroundColor:i?.logoBackgroundEnabled===!1?"transparent":i?.logoBackgroundColor||"#000000",borderColor:"var(--profile-card-border, #fb7185)"},children:s.map(o=>e.jsx(oe,{name:o,size:u,appearance:i},o))})}function ts(){return e.jsx("div",{className:"team-rgb-ambient","aria-hidden":"true",children:e.jsx("span",{})})}const is=[["rescission","Solicitar rescisión"],["no_debt","Solicitar constancia de no adeudo"],["other_agreement","Proponer otro acuerdo"]];function rs({teamName:s,busy:r,onClose:n,onSubmit:i}){const[c,u]=b.useState("rescission"),[o,h]=b.useState("");return e.jsx("div",{className:"fixed inset-0 z-[10002] flex items-end justify-center bg-black/65 p-3 sm:items-center",onClick:n,children:e.jsxs("div",{className:"w-full max-w-md rounded-3xl border border-white/10 bg-[#1c1c1e] p-5",onClick:x=>x.stopPropagation(),children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h2",{className:"text-lg font-bold text-white",children:"Salida contractual"}),e.jsx("button",{"aria-label":"Cerrar",onClick:n,className:"h-9 w-9 rounded-full bg-white/10",children:e.jsx(xe,{className:"mx-auto h-4 w-4"})})]}),e.jsxs("p",{className:"mt-2 text-sm text-white/55",children:["Tu vínculo con ",s," tiene un contrato activo. Envía una solicitud para revisión."]}),e.jsx("div",{className:"mt-4 space-y-2",children:is.map(([x,R])=>e.jsx("button",{onClick:()=>u(x),className:`w-full rounded-xl border p-3 text-left text-sm ${c===x?"border-blue-400 bg-blue-500/15 text-white":"border-white/10 text-white/60"}`,children:R},x))}),e.jsx("textarea",{value:o,onChange:x=>h(x.target.value),placeholder:"Detalles adicionales (opcional)",className:"mt-3 min-h-24 w-full rounded-xl border border-white/10 bg-white/[0.05] p-3 text-sm text-white outline-none"}),e.jsx("button",{onClick:()=>i({requestType:c,details:o}),disabled:r,className:"mt-4 flex min-h-11 w-full items-center justify-center rounded-xl bg-blue-600 font-semibold text-white disabled:opacity-50",children:r?e.jsx(B,{className:"h-4 w-4 animate-spin"}):"Enviar solicitud"})]})})}function ns({rank:s,points:r=0}){const n=s?s<=10?5:s<=25?4:s<=50?3:s<=100?2:1:r>=1e3?5:r>=500?4:r>=250?3:r>0?2:0;
6return e.jsxs("div",{className:"team-rank-panel rounded-xl border p-3",children:[e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-[9px] font-black uppercase tracking-[0.15em] text-slate-500",children:"Rango competitivo"}),e.jsx("p",{className:"mt-0.5 text-sm font-black",children:s?`Posición #${s}`:n?"Rango por puntos":"Sin clasificar"})]}),e.jsxs("span",{className:"text-xs font-black text-blue-700",children:[r," pts"]})]}),e.jsx("div",{className:"team-rank-stripes mt-3 flex h-7 items-end gap-1","aria-label":`Nivel competitivo ${n} de 5`,children:[1,2,3,4,5].map(i=>e.jsx("span",{className:i<=n?"is-filled":""},i))})]})}function ls({team:s,memberCount:r=0}){const n=Number(s.max_members||0),i=s.status==="active"?"Activo":s.status==="inactive"?"Inactivo":"Disuelto";return e.jsxs("div",{className:"team-professional-summary rounded-xl border p-3",children:[e.jsx("p",{className:"mb-3 text-[9px] font-black uppercase tracking-[0.15em] text-slate-500",children:"Resumen profesional"}),e.jsxs("div",{className:"grid grid-cols-3 gap-2",children:[e.jsxs("div",{children:[e.jsx(ue,{className:"h-4 w-4"}),e.jsx("strong",{children:i}),e.jsx("span",{children:"Estado"})]}),e.jsxs("div",{children:[s.verified||s.vip_verified?e.jsx(be,{team:s,variant:"summary"}):e.jsx(w,{className:"h-4 w-4"}),e.jsx("strong",{children:s.vip_verified?"Casa élite":s.verified?"Casa validada":"Comunidad"}),e.jsx("span",{children:"Linaje"})]}),e.jsxs("div",{children:[e.jsx(U,{className:"h-4 w-4"}),e.jsx("strong",{children:n?`${r}/${n}`:r}),e.jsx("span",{children:"Plantilla"})]})]})]})}function cs({team:s}){const r=(s.games||[]).join(", ")||s.game;return e.jsxs("div",{className:"team-identity-panel rounded-xl border p-3",children:[e.jsx("p",{className:"mb-2 text-[9px] font-black uppercase tracking-[0.15em] text-slate-500",children:"Identidad ampliada"}),e.jsx("p",{className:"text-xs leading-relaxed text-slate-600",children:s.description||"Perfil comunitario sin descripción pública."}),e.jsxs("div",{className:"mt-3 space-y-2",children:[s.org_name&&e.jsxs("div",{children:[e.jsx(pe,{}),e.jsx("span",{children:s.org_name})]}),r&&e.jsxs("div",{children:[e.jsx(he,{}),e.jsx("span",{children:r})]}),s.captain_discord&&e.jsxs("div",{children:[e.jsx(Be,{}),e.jsx("span",{children:s.captain_discord})]}),s.captain_whatsapp&&e.jsxs("div",{children:[e.jsx(Ge,{}),e.jsx("span",{children:s.captain_whatsapp})]})]})]})}function os({wins:s=0,losses:r=0,tournaments:n=0}){const i=s+r,c=i?Math.round(s/i*100):0;return e.jsxs("div",{className:"team-competitive-form rounded-xl border p-4",children:[e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-[9px] font-black uppercase tracking-[0.15em] text-slate-500",children:"Forma competitiva"}),e.jsx("p",{className:"mt-1 text-lg font-black",children:"Rendimiento registrado"})]}),e.jsx(Q,{className:"h-5 w-5 text-blue-700"})]}),e.jsxs("div",{className:"mt-4 grid grid-cols-3 gap-2 text-center",children:[e.jsxs("div",{children:[e.jsx("strong",{children:s}),e.jsx("span",{children:"Victorias"})]}),e.jsxs("div",{children:[e.jsx("strong",{children:r}),e.jsx("span",{children:"Derrotas"})]}),e.jsxs("div",{children:[e.jsx("strong",{children:n}),e.jsx("span",{children:"Torneos"})]})]}),e.jsxs("div",{className:"mt-4 flex h-2 overflow-hidden rounded-full bg-slate-200",children:[e.jsx("span",{className:"bg-blue-700",style:{width:`${c}%`}}),e.jsx("span",{className:"flex-1 bg-slate-400"})]}),e.jsxs("div",{className:"mt-2 flex justify-between text-[9px] font-bold uppercase text-slate-500",children:[e.jsxs("span",{children:[c,"% victorias"]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(M,{className:"h-3 w-3"}),"Datos oficiales"]})]})]})}function ds({team:s,members:r}){const n=r.length||Number(s.total_members||0),i=Number(s.max_members||0),c=r.filter(x=>x.contract_id).length,u=i?Math.max(0,i-n):0,o=Math.max(0,n-c),h=x=>i?Math.min(100,x/i*100):0;return e.jsxs("section",{className:"team-contract-balance","aria-label":"Mercado y contratos",children:[e.jsx("h3",{children:"Mercado y contratos"}),e.jsxs("div",{className:"team-contract-balance__card",children:[e.jsxs("div",{className:"team-contract-balance__available",children:[e.jsx("span",{children:"Plazas libres"}),e.jsx("strong",{children:u})]}),e.jsxs("div",{className:"team-contract-balance__comparison",children:[e.jsxs("div",{children:[e.jsx("span",{children:"Con contrato"}),e.jsxs("div",{className:"team-contract-balance__track",children:[e.jsx("i",{style:{width:`${h(c)}%`}}),e.jsx("strong",{children:c})]})]}),e.jsxs("div",{children:[e.jsx("span",{children:"Sin contrato"}),e.jsxs("div",{className:"team-contract-balance__track",children:[e.jsx("i",{style:{width:`${h(o)}%`}}),e.jsx("strong",{children:o})]})]})]})]})]})}const ms={cyan:"bg-cyan-700",orange:"bg-orange-700"};function xs({src:s,name:r,tone:n="cyan",large:i=!1}){const[c,u]=b.useState(!1);
6return e.jsx("div",{className:`${i?"h-14 w-14 rounded-md":"h-10 w-10 rounded-xl"} flex-shrink-0 overflow-hidden`,children:s&&!c?e.jsx("img",{src:s,alt:"",onError:()=>u(!0),className:"w-full h-full object-cover"}):e.jsx("div",{"aria-label":`Escudo predeterminado de ${r||"integrante"}`,className:`w-full h-full ${ms[n]} flex items-center justify-center text-white`,children:e.jsx(w,{className:"h-3/5 w-3/5"})})})}function us({member:s,fallbackName:r,roleLabel:n,tone:i,href:c,onSelect:u}){const o=s?.user_name||s?.nickname||s?.player_name||r,h=e.jsxs(e.Fragment,{children:[e.jsx(xs,{src:s?.user_avatar||s?.avatar_url,name:o,tone:i}),e.jsxs("div",{className:"team-roster-selection__identity",children:[e.jsx("strong",{children:o}),s?.ff_id&&e.jsxs("span",{children:["ID competitivo · ",s.ff_id]})]}),e.jsx("span",{className:"team-roster-selection__role",children:n}),e.jsx(W,{"aria-hidden":"true"})]});return c?e.jsx("a",{href:c,className:"team-roster-selection__row",children:h}):u?e.jsx("button",{type:"button",onClick:u,className:"team-roster-selection__row",children:h}):e.jsx("div",{className:"team-roster-selection__row",children:h})}function ps({team:s,members:r,captain:n,players:i,substitutes:c,legacyPlayers:u,legacySubstitutes:o,onSelect:h}){const x=[{label:"Capitanía",role:"Capitán",tone:"orange",rows:n||s.captain_name?[{member:n,name:s.captain_name,onSelect:n?()=>h(n):null}]:[]},{label:"Titulares",role:"Miembro",rows:[...i.map(d=>({member:d,href:`/UserProfile?user=${d.user_id}`})),...u.map((d,j)=>({member:{...d,user_name:d.nick},name:`Jugador ${j+1}`}))]},{label:"Suplentes",role:"Suplente",tone:"orange",rows:[...c.map(d=>({member:d,href:`/UserProfile?user=${d.user_id}`})),...o.map((d,j)=>({member:{...d,user_name:d.nick},name:`Suplente ${j+1}`}))]}],R=x.some(d=>d.rows.length);return e.jsxs("div",{className:"team-roster-selection",children:[e.jsxs("header",{children:[e.jsx("h2",{children:"Plantilla y mercado"}),e.jsxs("div",{children:[e.jsx("strong",{children:"Roster"}),e.jsxs("span",{children:[r.length," miembros"]})]})]}),e.jsx(ds,{team:s,members:r}),R?x.filter(d=>d.rows.length).map(d=>e.jsxs("section",{children:[e.jsx("h3",{children:d.label}),e.jsx("div",{className:"team-roster-selection__list",children:d.rows.map((j,z)=>e.jsx(us,{member:j.member,fallbackName:j.name,roleLabel:d.role,tone:d.tone,href:j.href,onSelect:j.onSelect},j.member?.id||`${d.label}-${z}`))})]},d.label)):e.jsxs("section",{children:[e.jsx("h3",{children:"Capitanía"}),e.jsx("div",{className:"team-roster-selection__list team-roster-selection__empty",children:e.jsxs("div",{className:"team-roster-selection__row",children:[e.jsx("span",{className:"team-roster-selection__empty-avatar",children:e.jsx(je,{})}),e.jsx("strong",{children:"Sin roster registrado"}),e.jsx(W,{"aria-hidden":"true"})]})})]})]})}function hs({team:s,tournamentCount:r=0,honorCount:n=0}){const i=Number(s.wins||0)+Number(s.losses||0),c=i?Math.round(Number(s.wins||0)/i*100):0,u=[{label:"Ranking",value:s.rank?`#${s.rank}`:"—",icon:fe},{label:"Puntos",value:s.points||0,icon:Y},{label:"Torneos",value:r,icon:M},{label:"Win rate",value:`${c}%`,icon:He}];return e.jsxs("article",{className:"team-public-card team-public-card--competitive",children:[e.jsxs("header",{children:[e.jsx("span",{children:"Área competitiva"}),e.jsx("h3",{children:"Rendimiento oficial"})]}),e.jsx("div",{className:"team-public-stat-grid",children:u.map(({label:o,value:h,icon:x})=>e.jsxs("div",{children:[e.jsx(x,{}),e.jsx("strong",{children:h}),e.jsx("span",{children:o})]},o))}),e.jsxs("footer",{children:[e.jsxs("span",{children:[s.wins||0," victorias"]}),e.jsxs("span",{children:[s.losses||0," derrotas"]}),e.jsxs("span",{children:[n," logros"]})]})]})}function js({team:s}){const r=s.games?.length?s.games.join(" · "):s.game||"Sin juego registrado",n=s.country?ve(s.country):"Sin país registrado";return e.jsxs("article",{className:"team-public-card team-public-card--institutional",children:[e.jsxs("header",{children:[e.jsx("span",{children:"Identidad institucional"}),e.jsx("h3",{children:"La casa competitiva"})]}),e.jsx("p",{className:"team-public-card__description",children:s.description||"Este equipo todavía no ha publicado su historia institucional."}),e.jsxs("dl",{className:"team-public-detail-list",children:[e.jsxs("div",{children:[e.jsx(pe,{}),e.jsx("dt",{children:"Organización"}),e.jsx("dd",{children:s.org_name||"Equipo independiente"})]}),e.jsxs("div",{children:[e.jsx(Ne,{}),e.jsx("dt",{children:"Territorio"}),e.jsxs("dd",{className:"team-public-country",children:[s.country&&e.jsx(ge,{code:s.country}),n,s.region?` · ${s.region.replaceAll("_"," ")}`:""]})]}),e.jsxs("div",{children:[e.jsx(he,{}),e.jsx("dt",{children:"Disciplinas"}),e.jsx("dd",{children:r})]}),e.jsxs("div",{children:[e.jsx(Qe,{}),e.jsx("dt",{children:"Estado"}),e.jsx("dd",{children:s.status==="active"?"Activo":s.status==="inactive"?"Inactivo":"Disuelto"})]})]})]})}const fs=new Set(["captain","capitan","player","jugador","titular","substitute","suplente","reserve","reserva"]);function bs({team:s,members:r=[],academy:n}){const i=r.filter(o=>fs.has(o.role)).length,c=r.length-i,u=Number(s.max_members||0);return e.jsxs("article",{className:"team-public-card team-public-card--structure",children:[e.jsxs("header",{children:[e.jsx("span",{children:"Estructura deportiva"}),e.jsx("h3",{children:"Organigrama del club"})]}),e.jsxs("div",{className:"team-public-structure-list",children:[e.jsxs("div",{children:[e.jsx(U,{}),e.jsxs("span",{children:[e.jsx("strong",{children:i}),"Jugadores activos"]}),e.jsx("small",{children:u?`${r.length}/${u} plazas usadas`:`${r.length} miembros`})]}),e.jsxs("div",{children:[e.jsx(es,{}),e.jsxs("span",{children:[e.jsx("strong",{children:c}),"Cuerpo técnico"]}),e.jsx("small",{children:"Staff y dirección deportiva"})]}),e.jsxs("div",{children:[e.jsx(F,{}),e.jsxs("span",{children:[e.jsx("strong",{children:n?"Activa":"Sin registrar"}),"Academia"]}),e.jsx("small",{children:n?.name||"Sin perfil secundario"})]}),e.jsxs("div",{children:[e.jsx(w,{}),e.jsxs("span",{children:[e.jsx("strong",{children:s.captain_name||"Por definir"}),"Capitanía"]}),e.jsx("small",{children:"Liderazgo competitivo"})]})]})]})}function gs({team:s,members:r,academy:n,registrations:i,honors:c}){return e.jsxs("div",{className:"team-public-overview",children:[e.jsxs("header",{className:"team-public-overview__header",children:[e.jsx("span",{children:"Perfil público"}),e.jsx("h2",{children:s.name}),e.jsx("p",{children:"Identidad, estructura deportiva y trayectoria competitiva del equipo."})]}),e.jsxs("div",{className:"team-public-overview__grid",children:[e.jsx(js,{team:s}),e.jsx(hs,{team:s,tournamentCount:i.length,honorCount:c.length}),e.jsx(bs,{team:s,members:r,academy:n})]})]})}const me={player:"Titular",substitute:"Suplente",reserve:"Reserva",captain:"Capitán",coach:"Coach",manager:"Manager",staff:"Staff"};function vs({academy:s,members:r=[],parentTeam:n}){return s?e.jsxs("div",{className:"team-academy-profile",children:[e.jsxs("header",{className:"team-academy-profile__hero",children:[e.jsx("div",{className:"team-academy-profile__logo",children:s.logo_url?e.jsx("img",{src:s.logo_url,alt:`Logo de ${s.name}`}):e.jsx(F,{})}),e.jsxs("div",{children:[e.jsxs("span",{children:["Academia oficial de ",n.name]}),e.jsx("h2",{children:s.name}),e.jsx("p",{children:s.description||"Programa de formación y desarrollo competitivo."})]}),e.jsxs("strong",{children:[r.length,"/",s.max_members||12]})]}),e.jsxs("section",{className:"team-academy-profile__summary",children:[e.jsxs("div",{children:[e.jsx(U,{}),e.jsx("strong",{children:r.length}),e.jsx("span",{children:"Talentos"})]}),e.jsxs("div",{children:[e.jsx(F,{}),e.jsx("strong",{children:r.filter(i=>i.status==="promoted").length}),e.jsx("span",{children:"Promovidos"})]})]}),e.jsxs("section",{className:"team-academy-profile__roster",children:[e.jsxs("header",{children:[e.jsx("span",{children:"Estructura deportiva"}),e.jsx("h3",{children:"Plantilla de academia"})]}),r.length?r.map(i=>e.jsxs("a",{href:`/UserProfile?user=${encodeURIComponent(i.user_id
6)}`,children:[e.jsx("span",{className:"team-academy-avatar",children:i.user_avatar?e.jsx("img",{src:i.user_avatar,alt:""}):e.jsx(je,{})}),e.jsxs("span",{children:[e.jsx("strong",{children:i.user_name||"Jugador de academia"}),e.jsx("small",{children:i.ff_id?`ID: ${i.ff_id}`:me[i.role]||i.role})]}),e.jsx("em",{children:me[i.role]||i.role})]},i.id)):e.jsx("p",{className:"team-academy-profile__empty-roster",children:"La academia aún no tiene jugadores publicados."})]})]}):e.jsxs("div",{className:"team-academy-empty",children:[e.jsx(F,{}),e.jsx("h2",{children:"Academia no registrada"}),e.jsxs("p",{children:[n.name," todavía no tiene un perfil público secundario de academia."]})]})}function Ns({team:s}){return e.jsx("div",{className:"team-porcelain-hero","aria-hidden":"true",children:e.jsx("div",{className:"team-porcelain-dome",children:e.jsx("div",{className:"team-porcelain-crest",children:s.logo_url?e.jsx("img",{src:s.logo_url,alt:""}):e.jsx(w,{})})})})}const ys=["Perfil","Roster","Historial","Stats","Academia"],ws=(s,r)=>{const n=new Set([r?.id,r?.email].filter(Boolean).map(i=>String(i).trim().toLowerCase()));return[s?.user_id,s?.player_id,s?.player_profile_id].filter(Boolean).some(i=>n.has(String(i).trim().toLowerCase()))};function aa(){const s=new URLSearchParams(window.location.search),r=s.get("team"),n=s.get("id")||(r&&r.length>20?r:null),i=n?null:r,[c,u]=b.useState(!1),[o,h]=b.useState(!1),[x,R]=b.useState("Perfil"),[d,j]=b.useState(null),[z,X]=b.useState(!1),[ye,K]=b.useState(!1),[J,Z]=b.useState(!1),C=Fe(),ee=Ue(),{user:f}=ee,{data:a,isLoading:we}=g({queryKey:["team-detail",n||i],queryFn:async()=>{if(n){const t=await p.entities.MasterTeam.get(n).catch(()=>null);if(t)return t;const l=await p.entities.TeamAlias.filter({source_team_id:n,redirect_active:!0});return l[0]?p.entities.MasterTeam.get(l[0].master_team_id).catch(()=>null):null}if(i){const t=i.trim().toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[’'`]/g,"").replace(/[^a-z0-9]/g,"");return(await p.entities.MasterTeam.filter({normalized_name:t}))[0]||null}return null},enabled:!!(n||i),retry:!1}),se=["my-team-join-request",a?.id,f?.email],{data:_e=[]}=g({queryKey:se,queryFn:()=>p.entities.TeamInvitation.filter({team_id:a.id,invited_by:f.email.toLowerCase(),status:"pending"},"-created_date",1),enabled:!!a?.id&&!!f?.email,staleTime:0,refetchOnMount:"always"}),{data:_=[]}=g({queryKey:["team-members",a?.id],queryFn:async()=>{const l=(await p.entities.TeamMember.filter({team_id:a.id})).filter(m=>!m.status||m.status==="active"||m.legacy_source?.temporary_test).sort((m,P)=>new Date(P.updated_date||0)-new Date(m.updated_date||0)),N=new Set,y=l.filter(m=>{const P=(m.user_name||m.nickname||m.player_name||"").trim().toLowerCase(),T=m.user_id||m.player_id||m.player_profile_id||`${P}|${m.ff_id||""}`;return N.has(T)?!1:(N.add(T),!0)}),H=await p.functions.invoke("getAllPlayers"),Ie=H.data?.players||H.data?.data||H.data||[];return y.map(m=>{if(m.user_name&&m.user_avatar)return m;const P=[m.user_id,m.player_id,m.player_profile_id].filter(Boolean),T=Ie.find(ne=>P.includes(ne.id)||P.includes(ne.email));return T?{...m,user_name:m.user_name||T.nickname||T.full_name||m.user_id,user_avatar:m.user_avatar||T.avatar_url||null}:m})},enabled:!!a?.id,refetchOnMount:"always"});b.useEffect(()=>{if(!a?.id)return;const t=p.entities.TeamMember.subscribe(l=>{l.data?.team_id&&l.data.team_id!==a.id||(C.invalidateQueries({queryKey:["team-members",a.id]}),C.invalidateQueries({queryKey:["mobile-player-team"]}))});return()=>typeof t=="function"?t():t?.unsubscribe?.()},[C,a?.id]);const{data:q=[]}=g({queryKey:["community-team-entity-ranking",a?.id],queryFn:()=>p.entities.EntityRanking.filter({entity_type:"community_team",entity_id:a.id,scope:"global",active:!0},"rank",1),enabled:!!a?.id,staleTime:300*1e3}),{data:L=[]}=g({queryKey:["team-registrations",a?.id,a?.name||i],queryFn:async()=>{const[t,l]=await Promise.all([a?.id?p.entities.TournamentRegistration.filter({team_id:a.id},"-created_date",50):Promise.resolve([]),a?.name||i?p.entities.TournamentRegistration.filter({team_name:a?.name||i},"-created_date",50):Promise.resolve([])]);return Array.from(new Map([...t,...l].map(N=>
6[N.id,N])).values())},enabled:!!(a||i)}),{data:v}=g({queryKey:["team-owner-user",a?.owner_id||a?.owner_email||a?.created_by],queryFn:async()=>{const t=a?.owner_id||a?.owner_email||a?.created_by;if(!t)return null;const l=await p.functions.invoke("getAllPlayers",{});return(l.data?.players||l.data?.data||l.data||[]).find(y=>y.id===t||y.email===t)||null},enabled:!!(a?.owner_id||a?.owner_email||a?.created_by),staleTime:300*1e3}),{data:ke=[]}=g({queryKey:["team-history-tournaments",L.map(t=>t.tournament_id).join(",")],queryFn:()=>Promise.all([...new Set(L.map(t=>t.tournament_id).filter(Boolean))].map(t=>p.entities.Tournament.get(t).catch(()=>null))).then(t=>t.filter(Boolean)),enabled:x==="Historial"&&L.length>0}),{data:A=[]}=g({queryKey:["community-team-honors",a?.id],queryFn:()=>p.entities.HallOfFame.filter({honoree_type:"team",honoree_id:a.id}),enabled:!!a?.id}),{data:Te=[]}=g({queryKey:["public-team-academy",a?.id],queryFn:()=>p.entities.Academy.filter({team_id:a.id,status:"active"},"-created_date"),enabled:!!a?.id}),$=Te[0],{data:Ce=[]}=g({queryKey:["public-academy-members",$?.id],queryFn:()=>p.entities.AcademyMember.filter({academy_id:$.id},"created_date"),enabled:!!$?.id}),Se=async()=>{if(!f){p.auth.redirectToLogin(window.location.href);return}h(!0);try{const t=await p.functions.invoke("manageTeamMembership",{action:"requestJoin",team_id:a.id,role:"player"});if(!t.data?.success)throw new Error(t.data?.error||"No se pudo enviar la solicitud");u(!0),C.setQueryData(se,[t.data.invitation]),C.invalidateQueries({queryKey:["join-requests",a.id]}),D.success("¡Solicitud enviada! El capitán debe aceptarte.")}catch(t){D.error(t.response?.data?.error||t.message||"Error al enviar solicitud")}finally{h(!1)}},ae=async t=>{Z(!0);try{const l=await p.functions.invoke("manageTeamMembership",{action:"leave",team_id:a.id,request_type:t?.requestType,details:t?.details});if(l.data?.requires_request){K(!0);return}K(!1),await C.invalidateQueries({queryKey:["team-members",a.id]}),D.success(l.data?.requires_approval?"Solicitud de salida enviada":"Saliste del equipo")}catch(l){D.error(l.response?.data?.error||l.message||"No se pudo procesar la salida")}finally{Z(!1)}};if(we)return e.jsx("div",{className:"min-h-screen bg-slate-950 flex items-center justify-center",children:e.jsx(B,{className:"w-8 h-8 text-purple-500 animate-spin"})});if(!a)return e.jsx("div",{className:"min-h-screen bg-slate-950 flex items-center justify-center",children:e.jsxs("div",{className:"text-center",children:[e.jsx(w,{className:"w-16 h-16 text-slate-600 mx-auto mb-4"}),e.jsx("h2",{className:"text-2xl font-bold text-white mb-2",children:"Equipo no encontrado"}),e.jsxs(O,{onClick:()=>window.history.back(),variant:"outline",className:"mt-4",children:[e.jsx(ce,{className:"w-4 h-4 mr-2"}),"Volver"]})]})});const V=ee.owns(a),te=_.find(t=>ws(t,f)),Pe=c||_e.length>0,k=L.filter(t=>t.status==="approved"),E=_.filter(t=>!t.legacy_source?.exclude_from_counters),Re=_.find(t=>t.role==="captain"),qe=_.filter(t=>t.role==="player"),$e=_.filter(t=>t.role==="substitute"),S=a.wins&&a.wins+(a.losses||0)>0?Math.round(a.wins/(a.wins+a.losses)*100):0,Me=a.players||[],Le=a.substitutes||[],Ae=new Set(_.flatMap(t=>[t.ff_id&&`ff:${t.ff_id}`,(t.user_name||t.nickname||t.player_name)&&`name:${(t.user_name||t.nickname||t.player_name).trim().toLowerCase()}`].filter(Boolean))),ie=t=>t.filter(l=>![l.ff_id&&`ff:${l.ff_id}`,l.nick&&`name:${l.nick.trim().toLowerCase()}`].filter(Boolean).some(y=>Ae.has(y))),G=ie(Me),re=ie(Le);_.length>0||a.captain_name||G.length>0;const I=v?.id||(a.owner_id&&!String(a.owner_id).includes("@")?a.owner_id:null),Ee=v?.nickname||v?.username||v?.player_name||a.owner_name||a.captain_name||"Dueño";return e.jsxs("div",{className:"community-esports-profile team-wiki-profile team-passport-tactical team-porcelain-profile -mb-14 min-h-screen pb-20",children:[e.jsx("div",{className:"team-wiki-topbar sticky top-0 z-40 border-b",children:e.jsxs("div",{className:"mx-auto flex h-14 max-w-[1600px] items-center gap-3 px-4 sm:px-6",children:[e.jsx("button",{onClick:()=>window.history.back(),className:"team-wiki-icon-button flex h-9 w-9 items-center justify-center rounded-lg border","aria-label":"Volver",children:e.jsx(ce,{className:"h-4 w-4"})}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("p",{className:"text-[10px] font-black uppercase tracking-[0.18em] text-emerald-500",children:"COMMUNITY TEAM · EQUIPO DE COMUNIDAD"}),e.jsx("p",{className:"truncate text-sm font-bold",children:a.name})]}),f&&!V&&e.jsx("button",{onClick:()=>X(!0),className:"team-wiki-icon-button flex h-9 w-9 items-center justify-center rounded-lg border",title:"Reportar equipo",children:e.jsx(Ye,{className:"h-5 w-5"})})]})}),e.jsxs("div",{className:"team-passport-layout mx-auto grid max-w-[1600px] gap-6 px-4 py-6 sm:px-6 lg:grid-cols-[310px_minmax(0,1fr)] lg:items-start",children:[e.jsx(Ns,{team:a}),e.jsxs("aside",{className:"team-wiki-infobox team-passport-card overflow-hidden rounded-2xl border lg:sticky lg:top-20",children:[e.jsx(ts,{}),e.jsxs("div",{className:"p-5",children:[e.jsxs("div",{className:"team-passport-logo relative mx-auto flex h-44 w-44 items-center justify-center overflow-hidden rounded-2xl border bg-white",children:[a.logo_url?e.jsx("img",{src:a.logo_url,alt:`Logo de ${a.name}`,className:"h-full w-full object-contain p-3"}):e.jsx(w,{className:"h-20 w-20 text-slate-300"}),e.jsx("div",{className:"absolute right-2 top-2",children:e.jsx(be,{team:a,size:"lg"})})]}),e.jsxs("div",{className:"team-passport-identity mt-5 text-center",children:[e.jsxs("div",{className:"mb-2 flex flex-wrap justify-center gap-2",children:[e.jsx("span",{className:"border border-emerald-500/25 bg-emerald-500/[0.08] px-2 py-1 text-[9px] font-black uppercase tracking-[0.16em] text-emerald-600",children:"COMMUNITY TEAM"}),q[0]&&e.jsxs("span",{className:"border border-slate-300 bg-slate-50 px-2 py-1 text-[9px] font-black uppercase tracking-[0.12em] text-slate-600",children:[q[0].eligible&&Number(q[0].rank)>0?`GLOBAL RANK #${q[0].rank}
6`:"RANKING PROVISIONAL"," · ",Number(q[0].score||0).toFixed(1)," POWER"]})]}),e.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-2",children:[e.jsx("h1",{className:"text-3xl font-black uppercase leading-none tracking-[-0.04em]",children:a.name}),a.tag&&e.jsx(Je,{className:"team-wiki-tag border-0 px-2 py-0.5 text-[10px] font-black",children:a.tag})]}),e.jsxs("div",{className:"mt-3 flex flex-wrap items-center justify-center gap-x-3 gap-y-1 text-xs font-semibold text-slate-600",children:[a.region&&e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(Ne,{className:"h-3.5 w-3.5"}),a.region==="LATAM_NORTE"?"LATAM Norte":a.region]}),a.country&&e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx(ge,{code:a.country}),ve(a.country)]})]})]}),e.jsx(as,{games:a.games||(a.game?[a.game]:[]),iconValues:a.game_icons||{},variant:"team",className:"team-passport-games mt-4"}),e.jsx("div",{className:"team-follow-action team-passport-follow mt-4 flex justify-center",children:e.jsx(We,{type:"community_team",targetId:a.id,targetName:a.name})}),(v||a.owner_email||a.owner_id)&&e.jsxs("div",{className:"team-wiki-section team-passport-owner mt-5 border-t pt-4",children:[e.jsx("p",{className:"mb-2 text-[10px] font-black uppercase tracking-[0.14em] text-slate-500",children:"Owner / Dueño"}),e.jsxs("a",{href:I?`/UserProfile?id=${encodeURIComponent(I)}`:void 0,"aria-disabled":!I,className:"team-wiki-owner flex items-center gap-3 rounded-xl border p-3",children:[e.jsx("div",{className:"flex h-10 w-10 flex-shrink-0 items-center justify-center overflow-hidden rounded-full border bg-amber-50",children:v?.avatar_url?e.jsx("img",{src:v.avatar_url,alt:"",className:"h-full w-full object-cover"}):e.jsx(ze,{className:"h-4 w-4 text-amber-600"})}),e.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-1.5",children:[e.jsx("span",{className:"truncate text-sm font-bold",children:Ee}),v&&e.jsx(Ve,{user:v,size:"sm"})]}),I&&e.jsx(W,{className:"h-4 w-4 text-slate-400"})]})]}),e.jsxs("div",{className:"team-passport-actions mt-5 space-y-2",children:[f&&!V&&!te&&(Pe?e.jsxs("div",{className:"flex min-h-10 items-center justify-center gap-2 rounded-xl bg-emerald-50 text-sm font-bold text-emerald-700",children:[e.jsx(ue,{className:"h-4 w-4"}),"Solicitud enviada"]}):e.jsx(O,{onClick:Se,disabled:o,className:"team-wiki-primary h-11 w-full rounded-xl",children:e.jsxs(e.Fragment,{children:[o?e.jsx(B,{className:"mr-2 h-4 w-4 animate-spin"}):e.jsx(de,{className:"mr-2 h-4 w-4"}),"Solicitar unirse"]})})),f&&te&&e.jsxs(O,{onClick:()=>ae(),disabled:J,className:"h-11 w-full rounded-xl border border-red-200 bg-red-50 text-red-700 hover:bg-red-100",children:[J&&e.jsx(B,{className:"mr-2 h-4 w-4 animate-spin"}),"Salir del equipo"]}),!f&&e.jsxs(O,{onClick:()=>p.auth.redirectToLogin(window.location.href),className:"team-wiki-primary h-11 w-full rounded-xl",children:[e.jsx(de,{className:"mr-2 h-4 w-4"}),"Iniciar sesión para unirse"]})]})]})]}),e.jsxs("section",{className:"team-wiki-archive team-passport-archive min-w-0 overflow-hidden rounded-2xl border",children:[e.jsx("div",{className:"team-wiki-tabs flex overflow-x-auto border-b p-3",role:"tablist",children:ys.map(t=>e.jsx("button",{onClick:()=>R(t),className:`min-h-10 flex-none whitespace-nowrap rounded-xl px-4 text-xs font-black uppercase tracking-tight sm:flex-1 sm:text-sm ${x===t?"team-wiki-tab-active":"text-slate-600"}`,children:t},t))}),x==="Perfil"&&e.jsx(gs,{team:a,members:E,academy:$,registrations:k,honors:A}),x==="Roster"&&e.jsx(ps,{team:a,members:E,captain:Re,players:qe,substitutes:$e,legacyPlayers:G,legacySubstitutes:re,onSelect:j}),x==="Historial"&&e.jsxs("div",{className:"p-4 sm:p-6",children:[e.jsxs("div",{className:"mb-5 border-b border-slate-200 pb-3",children:[e.jsx("p",{className:"text-[10px] font-black uppercase tracking-[0.16em] text-blue-700",children:"Competición"}),e.jsx("h2",{className:"text-2xl font-black uppercase",children:"Resultados y logros"})]}),k.length===0&&A.length===0?e.jsxs("div",{className:"flex flex-col items-center gap-2 py-16 text-sm text-slate-500",children:[e.jsx(M,{className:"h-10 w-10 text-slate-300"}),"Sin historial de torneos"]}):e.jsxs("div",{className:"space-y-7",children:[A.length>0&&e.jsxs("div",{children:[e.jsx("p",{className:"team-section-title mb-3 text-sm",children:"Logros"}),e.jsx("div",{className:"grid gap-2 sm:grid-cols-2 xl:grid-cols-3",children:A.map(t=>e.jsxs("div",{className:"team-wiki-result-card flex items-center gap-3 rounded-xl border p-3",children:[e.jsx(fe,{className:"h-6 w-6 flex-shrink-0 text-amber-500"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-black",children:t.achievement}),e.jsx("p",{className:"text-[10px] text-slate-500",children:t.season||t.award_type})]})]},t.id))})]}),k.length>0&&e.jsxs("div",{children:[e.jsx("p",{className:"team-section-title mb-3 text-sm",children:"Torneos"}),e.jsxs("div",{className:"overflow-hidden rounded-xl border border-slate-200",children:[e.jsxs("div",{className:"team-wiki-table-head grid grid-cols-[minmax(0,1fr)_100px_90px] px-4 py-2 text-[9px] font-black uppercase tracking-wider",children:[e.jsx("span",{children:"Torneo"}),e.jsx("span",{children:"Estado"}),e.jsx("span",{children:"Posición"})]}),k.map(t=>{const l=ke.find(y=>y.id===t.tournament_id);if(!l)return null;const N=l.status==="completed"?"Finalizado":l.status==="live"?"En curso":"Próximamente";return e.jsxs("div",{className:"grid grid-cols-[minmax(0,1fr)_100px_90px] items-center border-t border-slate-200 px-4 py-3 text-sm",children:[e.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[l.image_url?e.jsx("img",{src:l.image_url,alt:"",className:"h-9 w-9 rounded-lg object-cover"}):e.jsx(M,{className:"h-5 w-5 text-blue-700"}),e.jsx("span",{className:"truncate font-bold",children:l.name})]}),e.jsx("span",{className:"text-xs font-bold text-slate-600",children:N}),e.jsx("span",{className:"text-xs font-bold text-slate-600",children:t.slot_number?`Slot #${t.slot_number}`:t.group_letter?`Grupo ${t.group_letter}`:"—"})]},t.id)})]})]})]})]}),x==="Stats"&&e.jsxs("div",{className:"p-4 sm:p-6",children:[e.jsxs("div",{className:"mb-5 border-b border-slate-200 pb-3",children:[e.jsx("p",{className:"text-[10px] font-black uppercase tracking-[0.16em] text-blue-700",children:"Rendimiento"}),e.jsx("h2",{className:"text-2xl font-black uppercase",children:"Estadísticas"})]}),e.jsxs("div",{className:"team-porcelain-stats-overview space-y-3",children:[e.jsx(ls,{team:a,memberCount:E.length||a.total_members||0}),e.jsx(ns,{rank:a.rank,points:a.points||0}),e.jsx(cs,{team:a}),e.jsxs("div",{className:"team-wiki-section team-passport-stats border-t pt-4",children:[e.jsx("div",{className:"grid grid-cols-2 gap-px overflow-hidden rounded-xl border bg-slate-200",children:[{label:"Victorias",value:a.wins||0},{label:"Derrotas",value:a.losses||0},{label:"Torneos",value:k.length},{label:"Tasa de victorias",value:`${S}%`}].map(t=>e.jsxs("div",{className:"bg-white p-3 text-center",children:[e.jsx("p",{className:"text-xl font-black",children:t.value}),e.jsx("p",{className:"text-[9px] font-bold uppercase tracking-wider text-slate-500",children:t.label})]},t.label))}),e.jsxs("div",{className:"mt-4 flex items-center justify-between",children:[e.jsx("span",{className:"text-sm font-bold",children:"Tasa de victorias"}),e.jsxs("span",{className:"text-sm font-black text-blue-700",children:[S,"%"]})]}),e.jsx("div",{className:"mt-2 h-2 overflow-hidden rounded-full bg-slate-200",children:e.jsx("div",{className:"h-full rounded-full bg-blue-700",style:{width:`${S}%`}})})]})]}),e.jsx(os,{wins:a.wins||0,losses:a.losses||0,tournaments:k.length}),e.jsxs("div",{className:"mt-5 grid gap-5 xl:grid-cols-[minmax(0,1fr)_320px]",children:[e.jsx("div",{className:"overflow-hidden rounded-xl border border-slate-200",children:[{label:"Total Victorias",value:a.wins||0,icon:e.jsx(Q,{className:"h-4 w-4"})},{label:"Total Derrotas",value:a.losses||0,icon:e.jsx(w,{className:"h-4 w-4"})},{label:"Puntos Totales",value:a.points||0,icon:e.jsx(Y,{className:"h-4 w-4"})},{label:"Torneos Jugados",value:k.length,icon:e.jsx(M,{className:"h-4 w-4"})},{label:"Win Rate",value:`${S}%`,icon:e.jsx(Xe,{className:"h-4 w-4"})},{label:"Miembros",value:E.length||G.length+re.length+(a.captain_name?1:0),icon:e.jsx(U,{className:"h-4 w-4"})}].map(t=>e.jsxs("div",{className:"grid grid-cols-[36px_minmax(0,1fr)_80px] items-center border-b border-slate-200 px-4 py-3 last:border-0",children:[e.jsx("span",{className:"text-blue-700",children:t.icon}),e.jsx("span",{className:"text-sm font-bold",children:t.label}),e.jsx("span",{className:"text-right text-base font-black",children:t.value})]},t.label))}),e.jsxs("div",{className:"team-wiki-result-card rounded-xl border p-5",children:[e.jsx("p",{className:"text-[10px] font-black uppercase tracking-wider text-slate-500",children:"Tasa de victorias"}),e.jsxs("p",{className:"mt-2 text-5xl font-black text-blue-700",children:[S,"%"]}),e.jsx("div",{className:"mt-5 h-3 overflow-hidden rounded-full bg-slate-200",children:e.jsx("div",{className:"h-full rounded-full bg-blue-700",style:{width:`${S}%`}})}),e.jsx("p",{className:"mt-3 text-xs text-slate-500",children:"Basado en victorias y derrotas registradas."})]})]})]}),x==="Academia"&&e.jsx(vs,{academy:$,members:Ce,parentTeam:a})]})]}),d&&e.jsx(ss,{member:d,onClose:()=>j(null)}),f&&a&&!V&&e.jsx(Ke,{open:z,onOpenChange:X,targetType:"team",targetId:a.id,targetName:a.name,user:f}),ye&&e.jsx(rs,{teamName:a.name,busy:J,onClose:()=>K(!1),onSubmit:ae})]})}
6export{aa 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.