1import{j as r}from"./index-BQ7LvQDD.js";import{c as et,u as yt}from"./i18nRoutes-BzWEUsFb.js";const wt=a=>a.crest??(a.flagCode?`/flags/${a.flagCode}.svg`:null),st=a=>a?.stage==="PLAYOFFS"&&a.home!=null&&a.away==null,_t=new Set(["IN_PLAY","PAUSED","LIVE","EXTRA_TIME","PENALTY_SHOOTOUT"]),mt=new Set(["SCHEDULED","TIMED"]),kt=7200*1e3,It=a=>a!=null&&_t.has(a.status),tt=a=>{if(It(a))return!0;if(!a||!mt.has(a.status)||!a.utcDate)return!1;const t=Date.now()-Date.parse(a.utcDate);return t>=0&&t<kt},vt=1440*60*1e3,bt=a=>{const t=(a?.rounds??[]).flatMap(f=>f.matches);if(t.some(f=>tt(f)))return null;const n=t.filter(f=>{if(!mt.has(f.status)||f.utcDate==null)return!1;const i=Date.parse(f.utcDate)-Date.now();return i>0&&i<=vt}).map(f=>f.utcDate);return n.length>0?n.reduce((f,i)=>f<i?f:i):null},Lt="_svg_1hzii_4",Mt="_trophyImage_1hzii_17",Ct="_link_1hzii_22",Nt="_linkWon_1hzii_29",St="_dot_1hzii_40",jt="_flag_1hzii_41",At="_linkNext_1hzii_52",Dt="_linkLive_1hzii_60",$t="_linkSelected_1hzii_68",Et="_hitArea_1hzii_76",Rt="_dotGroup_1hzii_109",Pt="_dotHit_1hzii_113",Tt="_flagImage_1hzii_158",Wt="_flagRing_1hzii_163",Ot="_thirdPlaceLabel_1hzii_204",Bt="_crestBacking_1hzii_218",zt="_flagPlaceholder_1hzii_222",Ft="_flagInitials_1hzii_228",Ht="_elbowLinks_1hzii_251",Kt="_diagonalLinks_1hzii_252",M={svg:Lt,trophyImage:Mt,link:Ct,linkWon:Nt,dot:St,flag:jt,linkNext:At,linkLive:Dt,linkSelected:$t,hitArea:Et,dotGroup:Rt,dotHit:Pt,flagImage:Tt,flagRing:Wt,thirdPlaceLabel:Ot,crestBacking:Bt,flagPlaceholder:zt,flagInitials:Ft,elbowLinks:Ht,diagonalLinks:Kt},Ut=["PLAYOFFS","LAST_32","LAST_16","QUARTER_FINALS","SEMI_FINALS","FINAL"],ct=Math.PI*2,Yt=Math.PI/2,Gt=a=>({skeleton:a.filter(t=>!t.won&&!t.next&&!t.live),won:a.filter(t=>t.won&&!t.next&&!t.live),next:a.filter(t=>t.next&&!t.live),live:a.filter(t=>t.live)}),Jt=(a,t,n)=>Math.min(n,Math.max(t,a)),Vt=(a,t)=>Math.atan2(Math.sin(a)+Math.sin(t),Math.cos(a)+Math.cos(t)),Q=a=>a?a.toLowerCase():null,it=(a,t,n,f)=>`M ${a} ${t} L ${n} ${f}`,Xt=(a,t)=>t!=null&&(Q(a.home?.name)===t||Q(a.away?.name)===t),dt=a=>a?.nation?{name:a.nation,flagCode:a.flagCode,crest:a.crest,score:null}:null,ht=(a,t=1e3,n="elbow",f=!1)=>{const i=t/2,d=t*.11,y=Ut.map(e=>a.rounds.find(o=>o.stage===e)).filter(e=>!!e?.matches.length),m=[],s=[],w=[];if(y.length===0)return{size:t,center:i,trophyRadius:d,flags:m,links:s,dots:w,thirdPlaceLabel:null};const p=y.length,x=f?y[0].matches:[...y[0].matches].sort((e,o)=>e.id-o.id),I=x.length,A=t*.47,h=t*.37,W=t*.15,D=e=>e===0?A:p===1?h:h-(h-W)*(e-1)/(p-1),v=ct/I*.26,E=t*.007,R=bt(a),P=e=>R!=null&&e?.utcDate===R,F=(e,o)=>{const g=ct*D(e)/Math.max(o,1);return Jt(g*.4,t*.014,t*.027)},$=e=>Math.round(e*100)/100,Y=(e,o)=>({x:$(i+e*Math.cos(o)),y:$(i+e*Math.sin(o))}),O=(e,o)=>Y(D(e),o),U=(e,o)=>Math.atan2(Math.sin(o-e),Math.cos(o-e)),T=(e,o,g,c,l=0)=>{if(n==="diagonal"){const k=O(e,o),K=O(g,c),V=l/Math.hypot(K.x-k.x,K.y-k.y);return it(k.x+(K.x-k.x)*V,k.y+(K.y-k.y)*V,K.x,K.y)}const L=Y(D(e)-l,o),u=O(g,o),S=U(o,c),N=O(g,o+S),j=D(g),G=S>0?1:0;return`M ${L.x} ${L.y} L ${u.x} ${u.y} A ${j} ${j} 0 0 ${G} ${N.x} ${N.y}`},B=e=>(e+.5)/I*ct-Yt,C=[];C[1]=Array.from({length:I},(e,o)=>B(o));for(let e=2;e<=p;e++){const o=C[e-1],g=Math.floor(o.length/2);C[e]=Array.from({length:g},(c,l)=>Vt(o[2*l],o[2*l+1]))}const z=F(0,I*2);x.forEach((e,o)=>{const g=st(e);[["home",B(o)-v],["away",B(o)+v]].forEach(([l,L],u)=>{const S=e[l],{x:N,y:j}=O(0,L);S?.name,S?.flagCode,S?.crest,e.status,e.id,S&&!g&&m.push({key:`leaf-${2*o+u}`,matchId:e.id,match:e,nation:S.name,flagCode:S.flagCode,crest:S.crest??null,x:N,y:j,radius:z,isWinner:e.winner===l,isDecided:e.status==="FINISHED"})})});const _=[],b=[];_[1]=[],b[1]=[];for(let e=0;e<C[1].length;e++){const o=x[e],{x:g,y:c}=O(1,C[1][e]),l=o.winner?o[o.winner]:null;_[1][e]={nation:l?.name??null,flagCode:l?.flagCode??null,crest:l?.crest??null,decided:o.status==="FINISHED",matchId:o.id,x:g,y:c},b[1][e]=o}const J=(e,o)=>{if(e===1){const c=x[o];if(c.winner){const l=c[c.winner];return l?[l]:[]}return[c.home,c.away].filter(l=>!!l)}const g=_[e]?.[o];return g?.nation?[{name:g.nation,flagCode:g.flagCode,crest:g.crest,score:null}]:[...J(e-1,2*o),...J(e-1,2*o+1)]};for(let e=2;e<=p;e++){const o=y[e-1],g=C[e].length,c=[...o.matches],l=new Array(g);for(let u=0;u<g;u++){const S=_[e-1][2*u]?.nation??_[e-1][2*u+1]?.nation,N=Q(S??null);if(!N)continue;const j=c.findIndex(G=>Xt(G,N));j>=0&&(l[u]=c.splice(j,1)[0])}let L=0;for(let u=0;u<g;u++)l[u]||(l[u]=c[L++]);_[e]=[],b[e]=[];for(let u=0;u<g;u++){const S=_[e-1][2*u],N=_[e-1][2*u+1],{x:j,y:G}
1=O(e,C[e][u]),k=l[u]??null,K=!!(k?.home&&k?.away),V=K&&k?.winner?k[k.winner]:null;_[e][u]={nation:V?.name??null,flagCode:V?.flagCode??null,crest:V?.crest??null,decided:K&&k?.status==="FINISHED",matchId:k?.id??null,x:j,y:G},b[e][u]=k&&!K?{id:k.id,stage:k.stage,status:k.status,utcDate:k.utcDate,home:dt(S),away:dt(N),winner:null,penalties:null,homeCandidates:S?.nation?void 0:J(e-1,2*u),awayCandidates:N?.nation?void 0:J(e-1,2*u+1)}:k}}const q=(e,o)=>e?.nation?o?.winner?Q(o[o.winner]?.name)===Q(e.nation):!0:!1;for(let e=1;e<=p;e++){const o=C[e].length,g=F(e,o);for(let c=0;c<o;c++){const l=_[e][c],L=b[e][c],u=e===1?void 0:_[e-1][2*c],S=e===1?void 0:_[e-1][2*c+1],N=q(u,L),j=q(S,L),G=N||j,k=Math.floor(c/2),K=e<p?_[e+1]?.[k]:void 0,V=!!(l.nation&&K?.decided&&K.nation!==l.nation),xt=st(L);w.push({key:`dot-${e}-${c}`,x:l.x,y:l.y,radius:E,won:xt?Q(K?.nation)===Q(L?.home?.name):!V&&(!!l.nation||e>1&&G),next:P(L),matchId:L?.id??-1,match:L});const at=L?.id??-1,ot=tt(L),Z=C[e][c];if(e===1){const X=x[c],rt=st(X);rt||s.push({key:`l1-${c}-h`,path:T(0,Z-v,1,Z,z),won:X.winner==="home",live:ot,next:P(X),matchId:at}),rt||s.push({key:`l1-${c}-a`,path:T(0,Z+v,1,Z,z),won:X.winner==="away",live:ot,next:P(X),matchId:at})}else u&&s.push({key:`l${e}-${c}-a`,path:T(e-1,C[e-1][2*c],e,Z),won:N,live:ot,next:P(L),matchId:at}),S&&s.push({key:`l${e}-${c}-b`,path:T(e-1,C[e-1][2*c+1],e,Z),won:j,live:ot,next:P(L),matchId:at});if(l.nation){const X=e<p?b[e+1][k]:L;m.push({key:`node-${e}-${c}`,matchId:X?.id??-1,match:X,nation:l.nation,flagCode:l.flagCode,crest:l.crest,x:l.x,y:l.y,radius:g,isWinner:!V,isDecided:l.decided})}}}const nt=_[p]?.[0];nt&&s.push({key:"l-final",path:it(nt.x,nt.y,i,i),won:nt.decided,live:!1,next:!1,matchId:-1});const H=a.rounds.find(e=>e.stage==="THIRD_PLACE")?.matches[0]??null;let lt=null;if(H?.home&&H.away){const e=F(0,I*2),o=$(t*.92),g=t*.926,c={x:o,y:$(t*.984)},l=H.status==="FINISHED",L=tt(H),u=P(H);lt={x:o,y:$(t*.874)},[["home",t*.886],["away",t*.954]].forEach(([N,j])=>{const G=H[N],k=e/Math.hypot(c.x-j,c.y-g);s.push({key:`l3p-${N}`,path:it($(j+(c.x-j)*k),$(g+(c.y-g)*k),c.x,c.y),won:H.winner===N,live:L,next:u,matchId:H.id,bronze:!0}),m.push({key:`3p-${N}`,matchId:H.id,match:H,nation:G?.name??null,flagCode:G?.flagCode??null,crest:G?.crest??null,x:$(j),y:$(g),radius:e,isWinner:H.winner===N,isDecided:l,bronze:!0})}),w.push({key:"dot-3p",x:c.x,y:c.y,radius:E,won:H.winner!=null,next:u,matchId:H.id,match:H,bronze:!0})}return{size:t,center:i,trophyRadius:d,flags:m,links:s,dots:w,thirdPlaceLabel:lt}},Qt=a=>(a??"?").slice(0,3).toUpperCase(),ut={image:"/world-cup-trophy.png",aspect:258/640},qt=a=>{const t=et.c(6),{cx:n,cy:f,radius:i,href:d,aspect:y}=a,m=i*(y>.8?2:2.6),s=m*y,w=n-s/2,p=f-m/2;let x;return t[0]!==m||t[1]!==d||t[2]!==w||t[3]!==p||t[4]!==s?(x=r.jsx("image",{className:M.trophyImage,href:d,x:w,y:p,width:s,height:m,preserveAspectRatio:"xMidYMid meet"}),t[0]=m,t[1]=d,t[2]=w,t[3]=p,t[4]=s,t[5]=x):x=t[5],x},Zt=a=>{const t=et.c(42),{node:n,interactive:f,isSelected:i,onSelect:d}=a,{nation:y,crest:m,radius:s,x:w,y:p}=n,x=s*2;let I;t[0]!==n?(I=wt(n),t[0]=n,t[1]=I):I=t[1];const A=I,h=f&&n.match!==null;let W;t[2]!==n.match?(W=tt(n.match),t[2]=n.match,t[3]=W):W=t[3];const D=W;let v;t[4]!==h||t[5]!==n.match||t[6]!==d?(v=()=>{h&&n.match&&d?.(n.match)},t[4]=h,t[5]=n.match,t[6]=d,t[7]=v):v=t[7];const E=v,R=`translate(${w} ${p})`,P=n.bronze?"":void 0,F=n.isDecided&&!n.isWinner,$=h?"":void 0,Y=h?"button":void 0,O=h?0:void 0,U=h?y??void 0:void 0;let T;t[8]!==h||t[9]!==E?(T=q=>{h&&(q.key==="Enter"||q.key===" ")&&(q.preventDefault(),E())},t[8]=h,t[9]=E,t[10]=T):T=t[10];let B;t[11]!==s?(B=r.jsx("circle",{className:M.hitArea,r:s}),t[11]=s,t[12]=B):B=t[12];const C=s+2;let z;t[13]!==C?(z=r.jsx("circle",{className:M.flagRing,r:C}),t[13]=C,t[14]=z):z=t[14];let _;t[15]!==m||t[16]!==s?(_=m&&r.jsx("circle",{className:M.crestBacking,r:s}),t[15]=m,t[16]=s,t[17]=_):_=t[17];let b;t[18]!==m||t[19]!==x||t[20]!==A||t[21]!==y||t[22]!==s?(b=A?r.jsx("image",{className:M.flagImage,href:A,x:-s,y:-s,width:x,height:x,preserveAspectRatio:m?"xMidYMid meet":"xMidYMid slice"}):r.jsxs(r.Fragment,{children:[r.jsx("circle",{className:M.flagPlaceholder,r:s}),r.jsx("text",{className:M.flagInitials,y:s*.35,fontSize:s*.8,children:Qt(y)})]}),t[18]=m,t[19]=x,t[20]=A,t[21]=y,t[22]=s,t[23]=b):b=t[23];let J;return t[24]!==h||t[25]!==E||t[26]!==i||t[27]!==D||t[28]!==n.isWinner||t[29]!==U||t[30]!==T||t[31]!==B||t[32]!==z||t[33]!==_||t[34]!==b||t[35]!==R||t[36]!==P||t[37]!==F||t[38]!==$||t[39]!==Y||t[40]!==O?(J=r.jsxs("g",{className:M.flag,transform:R,"data-winner":n.isWinner,"data-bronze":P,"data-eliminated":F,"data-live":D,"data-selected":i,"data-interactive":h,"data-bracket-hit":$,role:Y,tabIndex:O,"aria-label":U,onClick:E,onKeyDown:T,children:[B,z,_,b]}),t[24]=h,t[25]=E,t[26]=i,t[27]=D,t[28]=n.isWinner,t[29]=U,t[30]=T,t[31]=B,t[32]=z,t[33]=_,t[34]=b,t[35]=R,t[36]=P,t[37]=F,t[38]=$,t[39]=Y,t[40]=O,t[41]=J):J=t[41],J},ft=a=>{const t=et.c(13),{links:n,selectedMatchId:f}=a;let i,d,y,m,s;if(t[0]!==n||t[1]!==f){const p=Gt(n),x=f!=null?n.filter(I=>I.matchId===f):[];i=p.skeleton.map(ee),d=p.won.map(ne),y=p.next.map(ae),m=p.live.map(oe),s=x.map(se),t[0]=n,t[1]=f,t[2]=i,t[3]=d,t[4]=y,t[5]=m,t[6]=s}else i=t[2],d=t[3],y=t[4],m=t[5],s=t[6];let w;return t[7]!==i||t[8]!==d||t[9]!==y||t[10]!==m||t[11]!==s?(w=r.jsxs(r.Fragment,{children:[i,d,y,m,s]}),t[7]=i,t[8]=d,t[9]=y,t[10]=m,t[11]=s,t[12]=w):w=t[12],w},te=a=>{const t=et.c(34),{dot:n,interactive:f,isSelected:i,label:d,onSelect:y}=a,m=f&&n.match!==null;let s;t[0]!==n.match?(s=tt(n.match),t[0]=n.match,t[1]=s):s=t[1];const w=s;
1if(!m){const R=n.next&&!w,P=n.bronze?"":void 0;let F;return t[2]!==n.radius||t[3]!==n.won||t[4]!==n.x||t[5]!==n.y||t[6]!==w||t[7]!==R||t[8]!==P?(F=r.jsx("circle",{className:M.dot,"data-won":n.won,"data-next":R,"data-live":w,"data-bronze":P,cx:n.x,cy:n.y,r:n.radius}),t[2]=n.radius,t[3]=n.won,t[4]=n.x,t[5]=n.y,t[6]=w,t[7]=R,t[8]=P,t[9]=F):F=t[9],F}let p;t[10]!==n.match||t[11]!==y?(p=()=>{n.match&&y?.(n.match)},t[10]=n.match,t[11]=y,t[12]=p):p=t[12];const x=p;let I;t[13]!==x?(I=R=>{(R.key==="Enter"||R.key===" ")&&(R.preventDefault(),x())},t[13]=x,t[14]=I):I=t[14];const A=n.radius+12;let h;t[15]!==n.x||t[16]!==n.y||t[17]!==A?(h=r.jsx("circle",{className:M.dotHit,cx:n.x,cy:n.y,r:A}),t[15]=n.x,t[16]=n.y,t[17]=A,t[18]=h):h=t[18];const W=n.next&&!w,D=n.bronze?"":void 0;let v;t[19]!==n.radius||t[20]!==n.won||t[21]!==n.x||t[22]!==n.y||t[23]!==i||t[24]!==w||t[25]!==W||t[26]!==D?(v=r.jsx("circle",{className:M.dot,"data-won":n.won,"data-next":W,"data-live":w,"data-selected":i,"data-bronze":D,cx:n.x,cy:n.y,r:n.radius}),t[19]=n.radius,t[20]=n.won,t[21]=n.x,t[22]=n.y,t[23]=i,t[24]=w,t[25]=W,t[26]=D,t[27]=v):v=t[27];let E;return t[28]!==x||t[29]!==d||t[30]!==I||t[31]!==h||t[32]!==v?(E=r.jsxs("g",{className:M.dotGroup,"data-bracket-hit":"",role:"button",tabIndex:0,"aria-label":d,onClick:x,onKeyDown:I,children:[h,v]}),t[28]=x,t[29]=d,t[30]=I,t[31]=h,t[32]=v,t[33]=E):E=t[33],E},re=a=>{const t=et.c(29),{bracket:n,variant:f,onSelectMatch:i,selectedMatchId:d,trophyImage:y,trophyAspect:m,ariaLabel:s,preOrdered:w}=a,p=f===void 0?"full":f,x=y===void 0?ut.image:y,I=m===void 0?ut.aspect:m,A=w===void 0?!1:w,{t:h}=yt();let W;if(t[0]!==s||t[1]!==n||t[2]!==i||t[3]!==A||t[4]!==d||t[5]!==h||t[6]!==I||t[7]!==x||t[8]!==p){const{size:D,center:v,trophyRadius:E,flags:R,links:P,dots:F,thirdPlaceLabel:$}=ht(n,1e3,"elbow",A);let Y;t[10]!==n||t[11]!==A?(Y=ht(n,1e3,"diagonal",A),t[10]=n,t[11]=A,t[12]=Y):Y=t[12];const O=Y.links,U=p==="full"&&!!i;let T;t[13]!==s||t[14]!==h?(T=s??h("worldCup.bracketLabel","World Cup 2026 knockout bracket"),t[13]=s,t[14]=h,t[15]=T):T=t[15];let B;t[16]===Symbol.for("react.memo_cache_sentinel")?(B=r.jsx("defs",{children:r.jsxs("radialGradient",{id:"wcCenterGlow",cx:"50%",cy:"50%",r:"50%",children:[r.jsx("stop",{offset:"0%",stopColor:"#ffd633",stopOpacity:"0.6"}),r.jsx("stop",{offset:"45%",stopColor:"#f0a500",stopOpacity:"0.24"}),r.jsx("stop",{offset:"100%",stopColor:"#b8860b",stopOpacity:"0"})]})}),t[16]=B):B=t[16];let C;t[17]!==O||t[18]!==d?(C=r.jsx("g",{className:M.diagonalLinks,children:r.jsx(ft,{links:O,selectedMatchId:d})}),t[17]=O,t[18]=d,t[19]=C):C=t[19];let z;t[20]!==U||t[21]!==i||t[22]!==d||t[23]!==h?(z=b=>r.jsx(te,{dot:b,interactive:U,isSelected:d===b.matchId,label:h("worldCup.viewMatch","View match"),onSelect:i},b.key),t[20]=U,t[21]=i,t[22]=d,t[23]=h,t[24]=z):z=t[24];let _;t[25]!==U||t[26]!==i||t[27]!==d?(_=b=>r.jsx(Zt,{node:b,interactive:U,isSelected:d===b.matchId,onSelect:i},b.key),t[25]=U,t[26]=i,t[27]=d,t[28]=_):_=t[28],W=r.jsxs("svg",{className:M.svg,"data-variant":p,viewB
1ox:`0 0 ${D} ${D}`,role:"img","aria-label":T,children:[B,r.jsx("circle",{cx:v,cy:v,r:D*.23,fill:"url(#wcCenterGlow)"}),r.jsx("g",{className:M.elbowLinks,children:r.jsx(ft,{links:P,selectedMatchId:d})}),C,r.jsx("g",{children:F.map(z)}),r.jsx(qt,{cx:v,cy:v,radius:E,href:x,aspect:I}),$&&r.jsx("text",{className:M.thirdPlaceLabel,x:$.x,y:$.y,fontSize:D*.017,children:h("worldCup.thirdPlaceShort","3rd place")}),R.map(_)]}),t[0]=s,t[1]=n,t[2]=i,t[3]=A,t[4]=d,t[5]=h,t[6]=I,t[7]=x,t[8]=p,t[9]=W}else W=t[9];return W};function ee(a){return r.jsx("path",{className:M.link,d:a.path},a.key)}function ne(a){return r.jsx("path",{className:M.linkWon,"data-bronze":a.bronze?"":void 0,d:a.path},a.key)}function ae(a){return r.jsx("path",{className:M.linkNext,d:a.path},a.key)}function oe(a){return r.jsx("path",{className:M.linkLive,d:a.path},a.key)}function se(a){return r.jsx("path",{className:M.linkSelected,d:a.path},`sel-${a.key}`)}const ce={worldCup:{to:"/world-cup",image:"/world-cup-trophy.png",labelKey:"worldCup.crossName",label:"World Cup"},euro:{to:"/euro",image:"/euro-trophy.png",labelKey:"euro.crossName",label:"Euro"},copaAmerica:{to:"/copa-america",image:"/copa-america-trophy.png",labelKey:"copaAmerica.crossName",label:"Copa América"},championsLeague:{to:"/champions-league",image:"/champions-league-trophy.png",labelKey:"championsLeague.title",label:"Champions League"}},pt=["championsLeague","worldCup","euro","copaAmerica"],gt=(a,t)=>{const n=ce[a];return{to:n.to,label:t(n.labelKey,n.label),image:n.image}},de=a=>pt.map(t=>gt(t,a)),he=(a,t)=>pt.filter(n=>n!==a).map(n=>gt(n,t));export{re as R,It as a,st as b,de as c,tt as i,bt as n,he as s,wt as t};
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.