!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="aa56991e-2b08-4de9-b63b-03ec144b70d2",e._sentryDebugIdIdentifier="sentry-dbid-aa56991e-2b08-4de9-b63b-03ec144b70d2")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8469],{2593:(e,t,r)=>{"use strict";r.d(t,{B:()=>i});var a=r(6029),n=r(4967),s=r(90248);let i=e=>{let{dobTimestamp:t}=e;return void 0===t?(0,a.jsx)(a.Fragment,{children:"-"}):(0,a.jsxs)(a.Fragment,{children:[(0,n.KW)(t)," ",(0,a.jsx)(s.A,{id:"years_short"})]})}},3518:(e,t,r)=>{"use strict";r.d(t,{Z:()=>d,i:()=>l.i});var a=r(6029),n=r(90510),s=r(494),i=r(5339),l=r(5921),o=r(52905);function d(e){let{value:t,fromUnit:r}=e,d=(0,s.d4)(o.Y);if(!t)return null;if((0,i.C)(t,r).to("m")>=1e3)return(0,a.jsx)(u,{value:t,fromUnit:r});if(d===l.i.Imperial){let e=function(e,t){let r=(0,i.C)(e,t).to("feet"),a=Math.floor(r),n=Math.round((0,i.C)(r-Math.floor(r),"ft").to("in"));return 12===n&&(a+=1,n=0),{ft:a,in:n}}(t,r);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.Gr,{value:e.ft,style:"unit",unit:"foot",unitDisplay:"narrow"}),"\xa0",(0,a.jsx)(n.Gr,{value:e.in,style:"unit",unit:"inch",unitDisplay:"narrow"})]})}return(0,a.jsx)(n.Gr,{value:(0,i.C)(t,r).to("cm"),style:"unit",unit:"centimeter",unitDisplay:"short"})}function u(e){let{value:t,fromUnit:r}=e,d=(0,s.d4)(o.Y);return t?d===l.i.Imperial?(0,a.jsx)(n.Gr,{value:(0,i.C)(t,r).to("mile"),style:"unit",unit:"mile",maximumFractionDigits:1,unitDisplay:"short"}):(0,a.jsx)(n.Gr,{value:(0,i.C)(t,r).to("km"),style:"unit",unit:"kilometer",maximumFractionDigits:1,unitDisplay:"short"}):null}},4396:(e,t,r)=>{"use strict";r.d(t,{K:()=>y});var a=r(21377),n=r(81278),s=r(69559),i=r(26331),l=r(70591),o=r(68199),d=r(48640),u=r(78753),c=r(15751),m=r(84236),p=r(27863),f=r(50100);let y=e=>{let t=(0,s.o)(),r=(0,i.A)(),c=(0,n.useRouter)(),y=(0,u.Gv)(e),v=(0,o.$)("left"===e?"right":"left"),x=(0,u.xG)("left"===e?"right":"left");return{handlePlayerChange:async n=>{let s=(0,p.w)(c.query);try{let i=await a.uuS.fetchPlayerUniqueTournamentSeasons(n),{tournamentId:o,seasonId:u}=(0,f.r)(i.uniqueTournamentSeasons,v.tournamentId,v.seasonId),c=h({sport:t,side:e,playerId:n,tournamentId:o,seasonId:u,playerSeasons:i,oppositePlayer:{...v,seasonType:x}}),p=(0,m.D)({side:e,playerId:n,seasonId:u,tournamentId:o});(0,l.zw)(r,"player.compare",{sport:t},(0,d.H)({...s,...p,...c}))}catch(i){let a=(0,m.D)({side:e,playerId:n});(0,l.zw)(r,"player.compare",{sport:t},(0,d.H)({...s,...a,leftPlayerSeasonType:void 0,rightPlayerSeasonType:void 0}))}},handleSeasonChange:(a,n,s)=>{let i=(0,p.w)(c.query),o=(0,m.D)({side:e,playerId:a,seasonId:s,tournamentId:n}),u=h({sport:t,side:e,playerId:a,tournamentId:n,seasonId:s,playerSeasons:y,oppositePlayer:{...v,seasonType:x}});(0,l.zw)(r,"player.compare",{sport:t},(0,d.H)({...i,...o,...u}))}}},h=e=>{let t,{sport:r,side:n,playerId:s,tournamentId:i,seasonId:l,playerSeasons:o,oppositePlayer:d}=e,u=s===d.playerId&&i===d.tournamentId&&l===d.seasonId;if(r===a.QCR.Basketball&&u){var m,p;let e=d.seasonType===c.j.RegularSeason?c.j.Playoffs:d.seasonType===c.j.Playoffs?c.j.RegularSeason:void 0;t=o?null==(p=o.typesMap[i])||null==(m=p[l])?void 0:m.find(t=>t===e):void 0}let f={};return"left"===n?f.leftPlayerSeasonType=t:f.rightPlayerSeasonType=t,f}},4526:(e,t,r)=>{"use strict";r.d(t,{q:()=>n});var a=r(55729);let n=()=>{let[e,t]=(0,a.useState)(!1);return[e,()=>t(!0),()=>t(!1)]}},4696:(e,t,r)=>{"use strict";r.d(t,{M:()=>a});var a=function(e){return e.All="all",e.Total="total",e.PerGame="perGame",e}({})},10292:(e,t,r)=>{"use strict";r.d(t,{t:()=>a.t});var a=r(91407)},10383:(e,t,r)=>{"use strict";r.d(t,{R:()=>i,h:()=>o});var a=r(4696),n=r(98516);let s=(e,t)=>{let r=e[t.key],a="";if(t.totalKey){let s=e[t.totalKey];a=s?" (".concat((0,n.M)(100*r/s),"%)"):" (0%)"}else if(t.percentageKey){let r=e[t.percentageKey];a=" (".concat(r?(0,n.M)(r):0,"%)")}else if(t.reverseKey){let s=e[t.reverseKey];a=" (".concat((0,n.M)(100*r/(r+s)),"%)")}return a},i=(e,t,r)=>{var i,l,o;let d="number"==typeof t.decimals?t.decimals:1,u=e[t.key];if(void 0!==u){if(r===a.M.Total&&t.displayType&&t.displayType.length>0)return(null==(o=t.displayType)?void 0:o.includes(a.M.Total))?u:void 0;if(r!==a.M.PerGame||(null==(i=t.displayType)?void 0:i.includes(a.M.PerGame))){if(t.perGame||(null==(l=t.displayType)?void 0:l.includes(a.M.PerGame))){if(void 0===e.appearances)return;let r=s(e,t);return"".concat((0,n.M)(u/e.appearances,d)).concat(r)}if(t.percentageKey){let r=e[t.percentageKey]?(0,n.M)(e[t.percentageKey],d):0,a="number"==typeof t.decimals?(0,n.M)(u,d):u;return t.showValue?"".concat(a," (").concat(r,"%)"):"".concat(r,"%")}if(t.totalKey){let r=e[t.totalKey],a=t.showPercentage?s(e,t):"";return r?"".concat(u,"/").concat(r," ").concat(a):"".concat(u," ").concat(a)}if("firstServePercentage"===t.key){if(isNaN(e.firstServeTotal)||isNaN(e.firstServePointsTotal))return 0;if(0===e.firstServeTotal)return"0%";let t=e.firstServePointsTotal/e.firstServeTotal*100;return"".concat(Math.round(10*t)/10,"%")}if("winRatio"===t.key)return isNaN(e.wins)||isNaN(e.matches)?0:"".concat(e.wins,"/").concat(e.matches," (").concat(Math.round(10*u)/10,"%)");if("firstServePointsWonPercentage"===t.key){if(isNaN(e.firstServePointsScored)||isNaN(e.firstServePointsTotal))return 0;if(0===e.firstServePointsTotal)return"0%";let t=e.firstServePointsScored/e.firstServePointsTotal*100;return"".concat(Math.round(10*t)/10,"%")}if("secondServePercentage"===t.key){if(isNaN(e.secondServeTotal)||isNaN(e.secondServePointsTotal))return 0;if(0===e.secondServeTotal)return"0%";let t=e.secondServePointsTotal/e.secondServeTotal*100;return"".concat(Math.round(10*t)/10,"%")}if("secondServePointsWonPercentage"===t.key){if(isNaN(e.secondServePointsScored)||isNaN(e.secondServePointsTotal))return 0;if(0===e.secondServePointsTotal)return"0%";let t=e.secondServePointsScored/e.secondServeTotal*100;return"".concat(Math.round(10*t)/10,"%")}if("avgAces"===t.key){if(isNaN(e.aces)||isNaN(e.matches))return 0;if(0===e.matches)return"0%";let t=e.aces/e.matches;return"".concat(Math.round(10*t)/10)}if("avgDoubleFaults"===t.key){if(isNaN(e.doubleFaults)||isNaN(e.matches))return 0;if(0===e.matches)return"0%";let t=e.doubleFaults/e.matches;return"".concat(Math.round(10*t)/10)}if("breakPointsSavedPercentage"===t.key){if(isNaN(e.opponentBreakPointsTotal)||isNaN(e.opponentBreakPointsScored))return 0;let t=e.opponentBreakPointsTotal-e.opponentBreakPointsScored,r=Math.round(10*e.breakPointsSavedPercentage)/10;return"".concat(t,"/").concat(e.opponentBreakPointsTotal," (").concat(r,"%)")}if("breakPointsSavedConvertedPercentage"===t.key){if(isNaN(e.breakPointsTotal)||isNaN(e.breakPointsScored))return 0;let t=Math.round(10*e.breakPointsSavedConvertedPercentage)/10;return"".concat(e.breakPointsScored,"/").concat(e.breakPointsTotal," (").concat(t,"%)")}if("tiebreakWinPercentage"===t.key){if(isNaN(e.tiebreaksWon)||isNaN(e.tiebreakLosses)||isNaN(e.tiebreakWinPercentage))return 0;let t=e.tiebreaksWon+e.tiebreakLosses;return t>0?"".concat(e.tiebreaksWon,"/").concat(t," (").concat(Math.round(10*e.tiebreakWinPercentage)/10,"%)"):"".concat(e.tiebreaksWon,"/").concat(t)}if("number"==typeof t.decimals)return["savePercentage","powerPlaySavePercentage","shortHandedSavePercentage","evenSavePercentage"].includes(t.key)?1===u?"1.00":".".concat((0,n.M)(u,d).slice(2)):"".concat((0,n.M)(u,d)).concat(t.sufix||"");return"".concat(u," ").concat(t.sufix||"")}}};function l(e){let t=Math.round(e),r=Math.floor(t/60),a=Math.floor(t%60).toString().padStart(2,"0");return"".concat(r,":").concat(a)}let o=e=>{let t={...e};return e.secondsPlayed&&(t.minutesPlayed=e.secondsPlayed/60),e.timeOnIce&&(t.timeOnIce=l(e.timeOnIce/e.appearances)),e.powerPlayTimeOnIce&&(t.powerPlayTimeOnIce=l(e.powerPlayTimeOnIce/e.appearances)),e.evenTimeOnIce&&(t.evenTimeOnIce=l(e.evenTimeOnIce/e.appearances)),e.shortHandedTimeOnIce&&(t.shortHandedTimeOnIce=l(e.shortHandedTimeOnIce/e.appearances)),t}},12047:(e,t,r)=>{"use strict";r.d(t,{Ay:()=>i});var a=r(95083),n=r(21501),s=r(55729);function i(){let{isInMobileTabs:e=!0,isSportMenuVisible:t=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},[r,i]=(0,s.useState)(0),l=(0,n.YU)(),{isMobile:o}=(0,a.$c)(),d=50*!!e,u=48+d+48*!!t;return(0,s.useEffect)(()=>{if(!o)return void i(0);i(l===n.Dh.Up?u:d)},[l,o]),r}},14165:e=>{e.exports=function(e){return function(t){return null==e?void 0:e[t]}}},14855:(e,t,r)=>{"use strict";r.d(t,{N:()=>d,n:()=>u});var a=r(6029),n=r(10292),s=r(41249),i=r(54409),l=r(57612),o=r(4396);let d=()=>(0,a.jsxs)(s.so,{gap:"sm",children:[(0,a.jsxs)(s.so,{gap:"md",align:"center",px:"md",py:"xs",bg:"surface.s2",w:"100%",br:"sm",children:[(0,a.jsx)(i.gWL,{w:24,h:24,fill:"onSurface.nLv3"}),(0,a.jsx)(s.EY,{font:"body.medium",color:"onSurface.nLv3",children:"-"})]}),(0,a.jsx)(s.so,{align:"center",px:"md",py:"xs",bg:"surface.s2",w:100,br:"sm",children:(0,a.jsx)(s.EY,{font:"body.medium",color:"onSurface.nLv3",children:"-"})})]}),u=e=>{let{side:t,isStuck:r}=e,{handlePlayerChange:i}=(0,o.K)(t);return(0,a.jsxs)(s.so,{direction:"column",gap:r?"xs":"lg",children:[(0,a.jsxs)(s.so,{gap:"lg",children:[(0,a.jsx)(n.t,{id:void 0,size:48}),(0,a.jsx)(l.K,{onPlayerSelect:i})]}),(0,a.jsx)(d,{})]})}},15751:(e,t,r)=>{"use strict";r.d(t,{j:()=>a});var a=function(e){return e.Overall="overall",e.RegularSeason="regularSeason",e.Playoffs="playoffs",e}({})},19855:(e,t,r)=>{"use strict";function a(e){return"string"==typeof e?parseInt(e,10):void 0}r.d(t,{K:()=>a})},27863:(e,t,r)=>{"use strict";r.d(t,{w:()=>s});var a=r(19855),n=r(48640);function s(e){let t={leftPlayerId:(0,a.K)(e.leftPlayerId),leftPlayerSeasonId:(0,a.K)(e.leftPlayerSeasonId),leftPlayerTournamentId:(0,a.K)(e.leftPlayerTournamentId),leftPlayerSeasonType:e.leftPlayerSeasonType,rightPlayerId:(0,a.K)(e.rightPlayerId),rightPlayerSeasonId:(0,a.K)(e.rightPlayerSeasonId),rightPlayerTournamentId:(0,a.K)(e.rightPlayerTournamentId),rightPlayerSeasonType:e.rightPlayerSeasonType};return(0,n.H)(t)}},27869:(e,t,r)=>{e.exports=r(14165)({"&":"&","<":"<",">":">",""":'"',"'":"'"})},33144:(e,t,r)=>{"use strict";r.d(t,{p:()=>a.p});var a=r(91603)},33752:(e,t,r)=>{"use strict";r.d(t,{B:()=>p});var a=r(6029),n=r(95083),s=r(62042),i=r(76356);let l=(0,s.Fj)({base:{display:"inline-block",verticalAlign:"bottom",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",color:"neutrals.nLv3",textStyle:"display.micro","& > a":{color:"primary.default",_hover:{textDecoration:"underline"}},"& + li":{_before:{content:'""',display:"inline-block",width:"[0px]",height:"[0px]",borderStyle:"solid",margin:"[1px 5px]",borderWidth:"[3px 0 3px 5px]",borderTopColor:"[transparent]",borderRightColor:"[transparent]",borderBottomColor:"[transparent]",borderLeftColor:"neutrals.nLv3",_rtl:{borderWidth:"[3px 5px 3px 0]",borderTopColor:"[transparent]",borderLeftColor:"[transparent]",borderBottomColor:"[transparent]",borderRightColor:"neutrals.nLv3"}}},"&:first-child:nth-last-child(3)":{maxWidth:"[50%]"},"&:first-child:nth-last-child(3) ~ &":{maxWidth:"[50%]"},"&:first-child:nth-last-child(4)":{maxWidth:"[33.33%]"},"&:first-child:nth-last-child(4) ~ &":{maxWidth:"[33.33%]"},"&:last-child":{display:"inline",whiteSpace:"initial"}}}),o=(0,i.I4)("li",l),d=(0,s.Fj)({base:{display:"flow-root",lineClamp:1,lineHeight:"[16px]",boxOrient:"vertical",overflow:"hidden",listStyle:"none",margin:"0",padding:"0",color:"neutrals.nLv3","&:has(.breadcrumb-title)":{lineClamp:2},"& > li":{lineHeight:"[16px]"}}}),u=(0,i.I4)("ul",d),c=(0,s.Fj)({base:{"&:has(.breadcrumb-title)":{paddingTop:"md",paddingBottom:"md",paddingLeft:"lg",paddingRight:"lg",md:{paddingLeft:"0",paddingRight:"0"},"@supports not selector(:has(a, b))":{paddingTop:"md",paddingBottom:"md",paddingLeft:"lg",paddingRight:"lg",md:{paddingLeft:"0",paddingRight:"0"}}}},variants:{isHomePage:{true:{md:{padding:"0"}}}}}),m=(0,i.I4)("div",c),p=e=>{let{children:t,isHomePage:r}=e;return(0,a.jsx)(m,{isHomePage:r,children:(0,a.jsx)(u,{children:t})})};p.Item=e=>{let{children:t}=e;return(0,a.jsx)(o,{"data-testid":"breadcrumb",children:t})},p.Title=e=>{let{children:t}=e;return(0,a.jsx)(n.Li,{display:"inline",className:"breadcrumb-title","data-testid":"breadcrumb_title",children:(0,a.jsx)(n.H1,{display:"inline",textStyle:"display.micro",color:"neutrals.nLv3",children:t})})}},36326:(e,t,r)=>{"use strict";r.d(t,{FV:()=>n,L3:()=>a,R3:()=>d,TH:()=>s,b6:()=>l,ie:()=>i,pu:()=>o});let a=void 0,n=-1,s="all";var i=function(e){return e[e.AllClubCompetitions=0]="AllClubCompetitions",e[e.DomesticLeagues=1]="DomesticLeagues",e[e.DomesticCups=2]="DomesticCups",e[e.InternationalCompetitions=3]="InternationalCompetitions",e[e.NationalTeamCompetitions=4]="NationalTeamCompetitions",e}({});let l=[{id:0,name:"football_all_club_competitions"},{id:1,name:"football_domestic_leagues"},{id:2,name:"football_domestic_cups"},{id:3,name:"football_international_competitions"},{id:4,name:"football_national_competitions"}],o=[{id:"overall",name:"total"},{id:"home",name:"standings.home"},{id:"away",name:"away"}],d={id:-1,name:"all_teams"}},37845:(e,t,r)=>{"use strict";r.d(t,{D:()=>s});var a=r(6029),n=r(3518);let s=e=>{let{height:t,fromUnit:r="cm"}=e;return void 0===t?(0,a.jsx)(a.Fragment,{children:"-"}):(0,a.jsx)(n.Z,{value:t,fromUnit:r})}},40745:(e,t,r)=>{"use strict";r.d(t,{A:()=>M});var a=r(6029),n=r(59721),s=r(21377),i=r(95083),l=r(76356),o=r(41249),d=r(12364),u=r.n(d),c=r(55729),m=r(90248),p=r(947),f=r(36326),y=r(76410),h=r(52695),v=r(62859),x=r(4696);let g=[x.M.PerGame,x.M.Total],b=e=>{let{maxW:t,children:r}=e;return(0,a.jsx)(i.Ym,{textStyle:"body.medium",color:"neutrals.nLv1",lineHeight:1,truncate:!!t,style:{maxWidth:t},children:r})},P=e=>{switch(e){case 2e3:return"tennisTournaments.p2000";case 1e3:return"tennisTournaments.p1000";case 500:return"tennisTournaments.p500";case 250:return"tennisTournaments.p250";default:return}},j=(e,t,r,s)=>{if(!e)return null;let o=r>=40||!t,d=o&&t?r:void 0;return(0,a.jsxs)(l.so,{justify:"space-between",align:"center",w:"100%",gap:"lg",children:[(0,a.jsxs)(l.so,{align:"center",gap:"lg",children:[(0,a.jsx)(n.e,{id:e.id,size:24},e.id),o&&(0,a.jsx)(b,{maxW:d,children:(0,a.jsx)(h.O,{uniqueTournament:e})})]}),s&&e.ranking&&!t&&(0,a.jsx)(l.az,{w:"4xl",br:"md",style:{backgroundColor:P(e.ranking)},children:(0,a.jsx)(i.EY,{textStyle:"assistive.default",color:"onColor.primary",lineHeight:1,textAlign:"center",display:"block",truncate:!0,children:e.ranking})})]})},S=e=>(0,a.jsx)(b,{children:null==e?void 0:e.year}),T=(e,t)=>{let r={[x.M.PerGame]:t?"per_game_stats_short":"stats.perGame",[x.M.Total]:t?"total_stats_short":"total",[x.M.All]:"basic.all"};return(0,a.jsx)(b,{children:(0,a.jsx)(m.A,{id:e?r[e]:" "})})};function M(e){let t=(0,c.useRef)(null),[r,n]=(0,c.useState)(0),{mediaBreakpoint:d}=(0,i.$c)(),m=(0,c.useContext)(v.Ws)===s.QCR.Tennis,h=(0,p.A)(),b=[...new Set(e.tournaments.map(e=>e.year))].map(e=>({id:Number(e),year:e})),P=e.hasSeasonalStats&&m?[{id:f.FV,name:h.formatMessage({id:"tennis_all_tournaments"})},...e.tournaments]:e.tournaments,M=P[0],N=e.selectedTournamentId==f.FV,w=N?b:e.seasons,C=N?b[0]:e.seasons[0],k=w.find(t=>t.id==e.selectedSeasonId),I=r-4-140-88-118*!!e.showSeasonDisplay,D=e.hasDefaultDisplay?x.M.All:x.M.PerGame,F=e.hasDefaultDisplay?[x.M.All,...g]:g,_=u()(()=>{var e,a;let s=null==t||null==(a=t.current)||null==(e=a.getBoundingClientRect())?void 0:e.width;s&&s!==r&&n(s)},100);(0,c.useEffect)(()=>(addEventListener("resize",_),()=>{removeEventListener("resize",_)}),[]),(0,c.useEffect)(()=>{_()},[!!(null==t?void 0:t.current)]);let G=t=>{if(!(t===x.M.All?"all":t===x.M.Total?"total":t===x.M.PerGame?"per_game":void 0)||!e.displayEventParam)return};return(0,a.jsxs)(l.so,{ref:t,gap:"xs","data-testid":"tournament_season_selector",children:[(0,a.jsx)(o.ms,{items:P,renderItem:(t,r)=>j(t,!!r,I,e.showTournamentRanking),initialSelectedItem:M,selectedItem:P.find(t=>t.id===e.selectedTournamentId),onSelectedItemChange:t=>{var r;e.onTournamentSelect(Number(null==(r=t.selectedItem)?void 0:r.id)),m&&(0,y.ke)({action:"click",location:"team_statistics",type:"tournament_filter"})},forceMenuBelow:e.forceMenusBelow}),(0,a.jsx)(o.ms,{items:w,renderItem:S,initialSelectedItem:C,selectedItem:k,onSelectedItemChange:t=>{var r;e.onSeasonSelect(Number(null==(r=t.selectedItem)?void 0:r.id)),m&&(0,y.ke)({action:"click",location:"team_statistics",type:"year_filter"})},forceMenuBelow:e.forceMenusBelow,alignRight:"xxs"===d&&I>=40}),e.showSeasonDisplay&&(0,a.jsx)(o.ms,{items:F,renderItem:(e,t)=>T(e,t),initialSelectedItem:D,selectedItem:e.selectedDisplay,onSelectedItemChange:t=>{var r;G(t.selectedItem),null==(r=e.onDisplaySelect)||r.call(e,t.selectedItem||D)},forceMenuBelow:e.forceMenusBelow,alignRight:!0})]})}},48640:(e,t,r)=>{"use strict";function a(e){return Object.keys(e).reduce((t,r)=>void 0===e[r]?t:{...t,[r]:e[r]},{})}r.d(t,{H:()=>a})},50100:(e,t,r)=>{"use strict";r.d(t,{r:()=>s});var a=r(21377),n=r(36326);function s(e,t,r,s){if(s===a.QCR.Tennis&&(t==n.FV||void 0===t)){let t=[...new Set(null==e?void 0:e.map(e=>e.seasons[0].year))].map(e=>({id:Number(e),year:e}));if(t.length>0){var i;let e=t.find(e=>e.id==r);return{seasonId:null!=(i=null==e?void 0:e.id)?i:t[0].id,tournamentId:n.FV}}}let l=e.find(e=>e.uniqueTournament.id===t),o=null==l?void 0:l.seasons.find(e=>e.id===r);if((null==l?void 0:l.uniqueTournament.id)&&(null==o?void 0:o.id))return{tournamentId:l.uniqueTournament.id,seasonId:null==o?void 0:o.id};let d=e[0],u=d.seasons[0].id;return{tournamentId:d.uniqueTournament.id,seasonId:u}}},52951:(e,t,r)=>{"use strict";r.d(t,{xV:()=>u,an:()=>c,Ay:()=>m});var a=r(6029),n=r(55575),s=r.n(n),i=r(95669),l=r.n(i),o=r(55729),d=r(947);let u=(0,o.createContext)({}),c=u.Provider;u.Consumer;let m=e=>{let{titleKey:t,descriptionKey:r,keywordsKey:n,metaKey:i,values:c={},titleFallback:m}=e,{meta:p,seoContent:f}=(0,o.useContext)(u),y=(0,d.A)(),h=t||i?y.formatMessage({id:"title.".concat(t||i)},c):m||"Sofascore",v=y.formatMessage({id:"description.".concat(r||i)},c),x=y.formatMessage({id:"keywords.".concat(n||i)},c);return(0,a.jsxs)(l(),{children:[(0,a.jsx)("title",{children:s()((null==f?void 0:f.title)||(null==p?void 0:p.title)||h)}),(null==f?void 0:f.description)||(null==p?void 0:p.description)?(0,a.jsx)("meta",{name:"description",content:(null==f?void 0:f.description)||(null==p?void 0:p.description)},"description"):y.messages["description.".concat(r||i)]&&(0,a.jsx)("meta",{name:"description",content:v},"description"),(null==p?void 0:p.keywords)?(0,a.jsx)("meta",{name:"keywords",content:p.keywords}):y.messages["keywords.".concat(n||i)]&&(0,a.jsx)("meta",{name:"keywords",content:x})]})}},55575:(e,t,r)=>{var a=r(60567),n=r(27869),s=/&(?:amp|lt|gt|quot|#39);/g,i=RegExp(s.source);e.exports=function(e){return(e=a(e))&&i.test(e)?e.replace(s,n):e}},57612:(e,t,r)=>{"use strict";r.d(t,{K:()=>u});var a=r(6029),n=r(41249),s=r(55729),i=r(90248),l=r(68432),o=r(61167),d=r(67837);let u=e=>{let{defaultQuery:t,autoFocus:r,onPlayerSelect:u,onClear:c}=e,{query:m,options:p,onQueryChange:f}=(0,o.t)(),{recentlySelected:y,addToRecentlySelected:h,removeFromRecentlySelected:v}=(0,d.H)();(0,s.useEffect)(()=>{t&&f(t)},[]);let x=e=>{h(e),u(e.id)};return(0,a.jsx)(n.jT,{label:(0,a.jsx)(i.A,{id:"select_player"}),query:m||"",options:p,onChange:e=>e&&u(e.id),onBlur:c,onQueryChange:f,filterOptions:e=>!!e,inputProps:{autoFocus:r,endAdornment:null},w:"232px",zIndex:n.Py.Sticky,itemWrapper:()=>(0,a.jsx)(l.Y,{query:m||"",searchOptions:p,recentOptions:y,onPlayerClick:x,onPlayerRemove:v})})}},59721:(e,t,r)=>{"use strict";r.d(t,{e:()=>a.e});var a=r(33480)},61167:(e,t,r)=>{"use strict";r.d(t,{t:()=>o});var a=r(21377),n=r(12364),s=r.n(n),i=r(55729),l=r(69559);let o=()=>{let e=(0,l.o)(),[t,r]=(0,i.useState)(""),[a,n]=(0,i.useState)([]),o=(0,i.useMemo)(()=>s()(async t=>{n(await d(e,t))},100),[d]);return{query:t,options:a,onQueryChange:e=>{r(e),o(e)}}};async function d(e,t){try{var r,n;if(t.length<=2)return[];let s=await (0,a.TtD)(a.d9M.results(a.G$9.PlayerTeamPersons,t,0));return r=e,(n=s.results)?n.filter(e=>"player"===e.type&&e.entity.team.sport.slug===r).map(e=>e.entity):[]}catch(e){return[]}}},62400:(e,t,r)=>{"use strict";function a(e){return e?e.map(e=>({...e.uniqueTournament,year:e.seasons[0].year})):[]}function n(e,t){var r,a;return e&&(null==(a=e.find(e=>e.uniqueTournament.id===t))||null==(r=a.seasons)?void 0:r.map(e=>({id:e.id,year:e.year,name:e.name})))||[]}function s(e,t){var r,a;return null==e||null==(a=e.find(e=>e.uniqueTournament.id===t))||null==(r=a.seasons[0])?void 0:r.id}r.d(t,{Nn:()=>s,Z4:()=>n,ng:()=>a})},65097:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>f});var a=r(6029),n=r(14092),s=r(41249),i=r(95669),l=r.n(i),o=r(947),d=r(90248),u=r(54409),c=r(76868),m=r(29129),p=r(70591);function f(e){let{statusCode:t}=e;n.O({statusCode:t});let r=(0,o.A)().formatMessage({id:404===t?"error.pageNotFound":"error.anErrorOccurred"});return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(l(),{children:[(0,a.jsx)("title",{children:"".concat(t," | ").concat(r||"")}),(0,a.jsx)("meta",{name:"robots",content:"noindex"})]}),(0,a.jsx)("div",{id:"errorPage",children:(0,a.jsx)(m.Ay,{children:(0,a.jsx)(m.xA,{children:(0,a.jsx)(m.fv,{textAlign:"center",my:"xxl",noDividers:!0,children:(0,a.jsxs)(c.p,{graphic:"no-connection",children:[(0,a.jsx)(s.EY,{font:"display.extraLarge",color:"onSurface.nLv3",align:"center",as:"h1",mt:"28px",mb:"xxs",children:t}),(0,a.jsx)(s.EY,{font:"display.medium",color:"onSurface.nLv3",align:"center",as:"h3",children:(0,a.jsx)(d.A,{id:"error.anErrorOccurred"})}),(0,a.jsx)(s.EY,{align:"center",mb:"xxl",as:"div",children:404===t?(0,a.jsx)(d.A,{id:"error.pageCannotBeFound"}):(0,a.jsx)(d.A,{id:"error.somethingWrongWithPage"})}),(0,a.jsx)(p.N_,{routeKey:"home",children:(0,a.jsxs)(s.$n,{children:[(0,a.jsx)(u.pa2,{mt:"-3px"})," ",(0,a.jsx)(d.A,{id:"error.backToSofascore"})]})})]})})})})})]})}f.getInitialProps=async e=>{await n.O(e);let{res:t,err:r}=e;return{statusCode:t?t.statusCode:r?r.statusCode:null}}},67837:(e,t,r)=>{"use strict";r.d(t,{H:()=>i});var a=r(55729),n=r(80593),s=r(94449);let i=()=>{let e=(0,a.useContext)(s.p);if(void 0===e)throw Error("useRecentSearch must be used within a RecentSearchesProvider");return{recentlySelected:e.recentlySelected,addToRecentlySelected:t=>{if(-1===e.recentlySelected.findIndex(e=>e.id===t.id)){let r=[...e.recentlySelected,t];if(r.length>n.o6){let t=r.filter((e,t)=>0!==t);e.setRecentlySelected(t);return}e.setRecentlySelected(r)}else{let r=[...e.recentlySelected.filter(e=>e.id!==t.id),t];e.setRecentlySelected(r)}},removeFromRecentlySelected:t=>{let r=e.recentlySelected.filter(e=>e.id!==t.id);e.setRecentlySelected(r)}}}},68199:(e,t,r)=>{"use strict";r.d(t,{$:()=>s});var a=r(81278),n=r(19855);let s=e=>{let t=(0,a.useRouter)();return"left"===e?{playerId:(0,n.K)(t.query.leftPlayerId),seasonId:(0,n.K)(t.query.leftPlayerSeasonId),tournamentId:(0,n.K)(t.query.leftPlayerTournamentId)}:{playerId:(0,n.K)(t.query.rightPlayerId),seasonId:(0,n.K)(t.query.rightPlayerSeasonId),tournamentId:(0,n.K)(t.query.rightPlayerTournamentId)}}},68432:(e,t,r)=>{"use strict";r.d(t,{Y:()=>m});var a=r(6029),n=r(41249),s=r(90248),i=r(76868),l=r(69181),o=r(80593),d=r(83441);let u=e=>{let{recentOptions:t,onPlayerClick:r,onPlayerRemove:i}=e,{suggestedOptions:u}=(0,d.F)("player"),c=t.map(e=>e.id);return(0,a.jsxs)(n.so,{direction:"column",gap:"md",p:"md",children:[t.length>0&&(0,a.jsxs)("div",{children:[(0,a.jsx)(n.EY,{font:"assistive.default",children:(0,a.jsx)(s.A,{id:"recent"})}),t.slice(0).reverse().map(e=>(0,a.jsx)(l.b,{player:e,onPlayerClick:r,onRemoveClick:i},e.id))]}),t.length!c.includes(e.id)).map(e=>(0,a.jsx)(l.b,{player:e,onPlayerClick:r},e.id))]})]})},c=e=>{let{searchOptions:t,onPlayerClick:r}=e;return 0===t.length?(0,a.jsx)(i.p,{graphic:"no-data",titleMessageId:"empty_search_title",descriptionMessageId:"empty_adjust_search_text"}):(0,a.jsx)(n.az,{p:"md",children:t.map(e=>(0,a.jsx)(l.b,{player:e,onPlayerClick:r},e.id))})},m=e=>{let{query:t,searchOptions:r,recentOptions:n,onPlayerClick:s,onPlayerRemove:i}=e;return(0,a.jsx)(a.Fragment,{children:t.length>o.bO?(0,a.jsx)(c,{searchOptions:r,onPlayerClick:s}):(0,a.jsx)(u,{recentOptions:n,onPlayerClick:s,onPlayerRemove:i})})}},68964:(e,t,r)=>{"use strict";r.d(t,{J:()=>s});var a=r(21377),n=r(98516);function s(e,t){var r,s;if(t)switch(e){case a.QCR.Football:return{...r=t,minutesPerGame:r.minutesPlayed&&Number((0,n.M)(r.minutesPlayed/r.appearances)),goalsPerGame:r.goals&&Number((0,n.M)(r.goals/r.appearances,1)),assistsPerGame:r.assists&&Number((0,n.M)(r.assists/r.appearances,1)),accurateLongBallsPerGame:r.accurateLongBalls&&Number((0,n.M)(r.accurateLongBalls/r.appearances,1)),accurateCrossesPerGame:r.accurateCrosses&&Number((0,n.M)(r.accurateCrosses/r.appearances,1)),accurateLongPasses:r.accurateLongBalls&&r.accurateLongBallsPercentage&&Number((0,n.M)(r.accurateLongBalls/r.appearances+r.accurateLongBallsPercentage,1)),interceptionsPerGame:r.interceptions&&Number((0,n.M)(r.interceptions/r.appearances,1)),tacklesPerGame:r.tackles&&Number((0,n.M)(r.tackles/r.appearances,1)),dribbledPastPerGame:r.dribbledPast&&Number((0,n.M)(r.dribbledPast/r.appearances,1)),clearancesPerGame:r.clearances&&Number((0,n.M)(r.clearances/r.appearances,1)),blockedShotsPerGame:r.blockedShots&&Number((0,n.M)(r.blockedShots/r.appearances,1)),successfulDribblesPerGame:r.successfulDribbles&&Number((0,n.M)(r.successfulDribbles/r.appearances,1)),groundDuelsWonPerGame:r.groundDuelsWon&&Number((0,n.M)(r.groundDuelsWon/r.appearances,1)),aerialDuelsWonPerGame:r.aerialDuelsWon&&Number((0,n.M)(r.aerialDuelsWon/r.appearances,1)),possessionLostPerGame:r.possessionLost&&Number((0,n.M)(r.possessionLost/r.appearances,1)),foulsPerGame:r.fouls&&Number((0,n.M)(r.fouls/r.appearances,1)),wasFouledPerGame:r.wasFouled&&Number((0,n.M)(r.wasFouled/r.appearances,1))};case a.QCR.Basketball:return{...s=t,minutesPerGame:s.secondsPlayed&&Number((0,n.M)(s.secondsPlayed/60/s.appearances)),pointsPerGame:s.points&&Number((0,n.M)(s.points/s.appearances,1)),freeThrowsPerGame:s.freeThrowsMade&&Number((0,n.M)(s.freeThrowsMade/s.appearances,1)),twoPointersPerGame:s.twoPointsMade&&Number((0,n.M)(s.twoPointsMade/s.appearances,1)),threePointersPerGame:s.threePointsMade&&Number((0,n.M)(s.threePointsMade/s.appearances,1)),fieldGoalsPerGame:s.fieldGoalsMade&&Number((0,n.M)(s.fieldGoalsMade/s.appearances,1)),reboundsTotalPerGame:s.rebounds&&Number((0,n.M)(s.rebounds/s.appearances,1)),reboundsDefensivePerGame:s.defensiveRebounds&&Number((0,n.M)(s.defensiveRebounds/s.appearances,1)),reboundsOffensivePerGame:s.offensiveRebounds&&Number((0,n.M)(s.offensiveRebounds/s.appearances,1)),assistsPerGame:s.assists&&Number((0,n.M)(s.assists/s.appearances,1)),turnoversPerGame:s.turnovers&&Number((0,n.M)(s.turnovers/s.appearances,1)),stealsPerGame:s.steals&&Number((0,n.M)(s.steals/s.appearances,1)),blocksPerGame:s.blocks&&Number((0,n.M)(s.blocks/s.appearances,1)),personalFoulsPerGame:s.personalFouls&&Number((0,n.M)(s.personalFouls/s.appearances,1)),pirPerGame:s.pir&&Number((0,n.M)(s.pir/s.appearances,1)),plusMinusPerGame:s.plusMinus&&Number((0,n.M)(s.plusMinus/s.appearances,1))};default:return{}}}},69181:(e,t,r)=>{"use strict";r.d(t,{b:()=>o});var a=r(6029),n=r(94446),s=r(41249),i=r(54409),l=r(24159);let o=e=>{let{player:t,onPlayerClick:r,onRemoveClick:o}=e;return(0,a.jsxs)(s.so,{onClick:()=>r(t),h:"56px",align:"center",cursor:"pointer",children:[(0,a.jsx)(n.t,{id:t.id,name:t.name,size:40,grayscale:t.deceased}),(0,a.jsxs)(s.so,{direction:"column",justify:"center",h:"100%",gap:"xs",grow:1,pl:"sm",children:[(0,a.jsx)(s.EY,{font:"body.medium",color:"onSurface.nLv1",ellipsis:!0,maxW:["250px","130px"],children:(0,a.jsx)(l.c,{entity:t})}),(0,a.jsxs)(s.so,{align:"center",gap:"sm",children:[(0,a.jsx)(n.p,{id:t.team.id,size:16}),(0,a.jsx)(s.EY,{font:"assistive.default",color:"onSurface.nLv3",lineHeight:1,ellipsis:!0,maxW:["300px","120px"],children:(0,a.jsx)(l.c,{entity:t.team})})]})]}),void 0!==o&&(0,a.jsx)(s.$n,{onClick:e=>{e.stopPropagation(),e.preventDefault(),null==o||o(t)},variant:"unshielded",size:"xs",p:"xs",style:{borderRadius:"50%"},children:(0,a.jsx)(i.zQC,{icon:"close",width:16,height:16,fill:"neutral.default"})})]})}},76049:(e,t,r)=>{"use strict";r.d(t,{b:()=>f,z:()=>y});var a=r(6029),n=r(81278),s=r(55729),i=r(45860),l=r(69559),o=r(27863),d=r(68964);function u(e,t,r){if(t)return{...t,statistics:(0,d.J)(e,r)}}var c=r(21377);function m(e,t,r,a,n){return t&&r&&a?e===c.QCR.Football?[e,"PLAYER_COMPARE_KEY",t,r,a,void 0]:e===c.QCR.Basketball&&void 0!==n?[e,"PLAYER_COMPARE_KEY",t,r,a,n]:null:null}async function p(e){let[t,r,a,n,s,i]=e;try{if(t===c.QCR.Basketball&&void 0!==i)return(await c.uuS.fetchPlayerSeasonStatistics(a,n,s,i)).statistics||{};let e=await c.uuS.fetchPlayerSeasonStatistics(a,n,s,"overall");return(null==e?void 0:e.statistics)||{}}catch(e){return{}}}let f=(0,s.createContext)(void 0),y=e=>{var t,r;let{children:s,leftPlayerData:d,rightPlayerData:c}=e,y=(0,l.o)(),h=(0,n.useRouter)(),{leftPlayerId:v,leftPlayerTournamentId:x,leftPlayerSeasonId:g,rightPlayerId:b,rightPlayerTournamentId:P,rightPlayerSeasonId:j}=(0,o.w)(h.query),{data:S}=(0,i.Ay)(m(y,v,x,g,null==d?void 0:d.seasonType),e=>p(e),{fallbackData:null==d||null==(t=d.seasonStatistics)?void 0:t.statistics,revalidateOnMount:!0}),{data:T}=(0,i.Ay)(m(y,b,P,j,null==c?void 0:c.seasonType),e=>p(e),{fallbackData:null==c||null==(r=c.seasonStatistics)?void 0:r.statistics,revalidateOnMount:!0});return(0,a.jsx)(f.Provider,{value:{leftPlayerData:u(y,d,S),rightPlayerData:u(y,c,T)},children:s})}},78753:(e,t,r)=>{"use strict";r.d(t,{Gv:()=>i,XL:()=>s,xG:()=>l});var a=r(55729),n=r(76049);let s=()=>{var e,t;let r=(0,a.useContext)(n.b);if(void 0===r)throw Error("usePlayerSeasons must be used within a PlayerDataProvider");return{leftPlayerSeasons:null==(e=r.leftPlayerData)?void 0:e.uniqueTournaments.uniqueTournamentSeasons,rightPlayerSeasons:null==(t=r.rightPlayerData)?void 0:t.uniqueTournaments.uniqueTournamentSeasons}},i=e=>{var t,r;let s=(0,a.useContext)(n.b);if(void 0===s)throw Error("usePlayerFullSeasons must be used within a PlayerDataProvider");return"left"===e?null==(r=s.leftPlayerData)?void 0:r.uniqueTournaments:null==(t=s.rightPlayerData)?void 0:t.uniqueTournaments},l=e=>{var t,r;let s=(0,a.useContext)(n.b);if(void 0===s)throw Error("usePlayerSeasonsType must be used within a PlayerDataProvider");return"left"===e?null==(r=s.leftPlayerData)?void 0:r.seasonType:null==(t=s.rightPlayerData)?void 0:t.seasonType}},80593:(e,t,r)=>{"use strict";r.d(t,{FO:()=>i,bO:()=>a,kG:()=>n,o6:()=>s});let a=2,n="compare_player_recent",s=20,i=10},83104:(e,t,r)=>{"use strict";r.d(t,{u:()=>s});var a=r(6029),n=r(41249);let s=e=>{let{name:t,leftStat:r,rightStat:s,separated:i}=e;return(0,a.jsx)(n.az,{px:"sm",children:(0,a.jsxs)(n.so,{py:"xs",minH:"36px",justify:"space-between",align:"center",borderBottom:i?"onSurface.nLv4":void 0,children:[(0,a.jsx)(n.az,{as:"bdi",textAlign:"left",w:"80px",children:(0,a.jsx)(n.EY,{font:"table.medium",px:"md",as:"div",children:r})}),(0,a.jsx)(n.az,{grow:1,as:"bdi",textAlign:"center",children:(0,a.jsx)(n.EY,{font:"table.medium",px:"md",children:t})}),(0,a.jsx)(n.az,{as:"bdi",w:"80px",children:(0,a.jsx)(n.EY,{font:"table.medium",px:"md",as:"div",align:"right",children:s})})]})})}},83441:(e,t,r)=>{"use strict";r.d(t,{F:()=>i});var a=r(21377),n=r(45860),s=r(69559);let i=e=>{let t=(0,s.o)(),{data:r}=(0,n.Ay)(function(e,t){return"player"===e?"".concat(a.d9M.suggestions("player-team-persons",t)):"".concat(a.d9M.suggestions("teams",t))}(e,t));return{suggestedOptions:function(e){return e?e.map(e=>e.entity):[]}(null==r?void 0:r.results)}}},84236:(e,t,r)=>{"use strict";function a(e){let{side:t,playerId:r,seasonId:a,tournamentId:n}=e;return"left"===t?{leftPlayerId:r,leftPlayerSeasonId:a,leftPlayerTournamentId:n}:{rightPlayerId:r,rightPlayerSeasonId:a,rightPlayerTournamentId:n}}r.d(t,{D:()=>a})},86131:(e,t,r)=>{"use strict";r.d(t,{N:()=>d,n:()=>u});var a=r(6029),n=r(41249),s=r(90248),i=r(54409),l=r(98477),o=r(4396);let d=()=>(0,a.jsx)(n.az,{px:"md",py:"xs",bg:"onSurface.nLv5",w:"100%",borderRadius:"md",children:(0,a.jsxs)(n.so,{gap:"md",align:"center",children:[(0,a.jsx)(i.gWL,{w:24,h:24,fill:"onSurface.nLv3"}),(0,a.jsx)(n.EY,{font:"body.medium",color:"onSurface.nLv3",children:"-"})]})}),u=e=>{let{side:t,isStuck:r}=e,{handlePlayerChange:u}=(0,o.K)(t);return(0,a.jsxs)(n.so,{direction:"column",gap:"sm",align:"center",p:"sm",bg:"surface.s2",borderRadius:"sm",children:[(0,a.jsx)(n.az,{bg:"surface.s1",w:r?32:48,h:r?32:48,borderRadius:"50%",elevation:2,children:(0,a.jsx)(l.x,{onPlayerSelect:u,children:(0,a.jsx)(n.so,{align:"center",justify:"center",w:"100%",h:"100%",children:(0,a.jsx)(i.xZp,{w:24,h:24,fill:"primary.default"})})})}),!r&&(0,a.jsx)(n.EY,{font:"display.small",color:"primary.default",children:(0,a.jsx)(s.A,{id:"select_player"})}),(0,a.jsx)(d,{})]})}},90510:(e,t,r)=>{"use strict";r.d(t,{XU:()=>c,Gr:()=>p,ib:()=>m});var a,n,s=r(13829),i=r(55729),l=r(947);!function(e){e.formatDate="FormattedDate",e.formatTime="FormattedTime",e.formatNumber="FormattedNumber",e.formatList="FormattedList",e.formatDisplayName="FormattedDisplayName"}(a||(a={})),function(e){e.formatDate="FormattedDateParts",e.formatTime="FormattedTimeParts",e.formatNumber="FormattedNumberParts",e.formatList="FormattedListParts"}(n||(n={}));var o=function(e){var t=(0,l.A)(),r=e.value,a=e.children,n=(0,s.Tt)(e,["value","children"]);return a(t.formatNumberToParts(r,n))};function d(e){var t=function(t){var r=(0,l.A)(),a=t.value,n=t.children,i=(0,s.Tt)(t,["value","children"]),o="string"==typeof a?new Date(a||0):a;return n("formatDate"===e?r.formatDateToParts(o,i):r.formatTimeToParts(o,i))};return t.displayName=n[e],t}function u(e){var t=function(t){var r=(0,l.A)(),a=t.value,n=t.children,o=(0,s.Tt)(t,["value","children"]),d=r[e](a,o);if("function"==typeof n)return n(d);var u=r.textComponent||i.Fragment;return i.createElement(u,null,d)};return t.displayName=a[e],t}o.displayName="FormattedNumberParts",o.displayName="FormattedNumberParts";var c=u("formatDate"),m=u("formatTime"),p=u("formatNumber");u("formatList"),u("formatDisplayName"),d("formatDate"),d("formatTime")},91407:(e,t,r)=>{"use strict";r.d(t,{t:()=>l});var a=r(64082),n=r(6029),s=r(21377),i=r(41249);let l=e=>{var{id:t,name:r,size:l=56,style:o,className:d,grayscale:u,isFantasy:c,placeholder:m="/static/images/placeholders/player.svg"}=e,p=(0,a.T)(e,["id","name","size","style","className","grayscale","isFantasy","placeholder"]);let f=p.w||p.width||l,y=p.h||p.height||l;return(0,n.jsx)(i._V,Object.assign({fallback:(0,n.jsx)(i._V,{style:Object.assign({borderRadius:"50%"},o),w:f,h:y,src:m,alt:r}),src:t?s.qvj.image(t,c):"",alt:r,w:f,h:y,br:"50%",border:"onSurface.nLv4",style:o,className:d,isGrayscale:u},p))}},93218:(e,t,r)=>{"use strict";r.d(t,{T:()=>n});let a=["bestResult"];function n(e,t,r){let n=null==t?void 0:t[e.key],s=null==r?void 0:r[e.key];return a.includes(e.key)?-1:void 0===n&&void 0!==s?2:void 0===s&&void 0!==n?1:n===s?0:e.reversed?(n||0)<(s||0)?1:2:(n||0)>(s||0)?1:2}},94446:(e,t,r)=>{"use strict";r.d(t,{p:()=>n.p,t:()=>a.t});var a=r(91407),n=r(91603)},94449:(e,t,r)=>{"use strict";r.d(t,{V:()=>l,p:()=>i});var a=r(6029),n=r(55729),s=r(19168);let i=(0,n.createContext)(void 0),l=e=>{let{children:t,persistKey:r}=e,[n,l]=(0,s.yR)(r,[]);return(0,a.jsx)(i.Provider,{value:{recentlySelected:n,setRecentlySelected:l},children:t})}},94604:(e,t,r)=>{"use strict";r.d(t,{Rm:()=>c,lC:()=>u,ub:()=>m});var a=r(6029),n=r(21377),s=r(947),i=r(26331);let l=/(.*)(\s(U.\d+|Olympic Team|Universiade Team|[A-C]|7[Ss])$)/,o=e=>e.normalize("NFD").replace(/[\u0300-\u036f\']/g,"").toLowerCase().replace(/\s/g,"-").replace(/&/g,"and"),d=e=>{let{translation:t,suffixedTeam:r,showFemaleSuffix:n}=e,s=n?" (F)":"";return r?(0,a.jsx)(a.Fragment,{children:"".concat(t).concat(r[2]).concat(s)}):(0,a.jsx)(a.Fragment,{children:"".concat(t).concat(s)})},u=e=>{let{original:t,showFemaleSuffix:r}=e,n=l.exec(t),i=(0,s.A)(),u=o(n?n[1]:t),c=i.formatMessage({id:u});return c===u?(0,a.jsx)(d,{translation:t,showFemaleSuffix:r}):(0,a.jsx)(d,{translation:c,suffixedTeam:n,showFemaleSuffix:r})},c=e=>{var t,r,n,l;let o=(0,i.A)(),c=(0,s.A)();if("short"in e&&e.short&&(null==(r=e.team.fieldTranslations)||null==(t=r.shortNameTranslation)?void 0:t[o]))return(0,a.jsx)(d,{translation:e.team.fieldTranslations.shortNameTranslation[o],showFemaleSuffix:e.showFemaleSuffix});if(null==(l=e.team.fieldTranslations)||null==(n=l.nameTranslation)?void 0:n[o])return(0,a.jsx)(d,{translation:e.team.fieldTranslations.nameTranslation[o],showFemaleSuffix:e.showFemaleSuffix});let m=e.team.name;return("full"in e&&e.full&&e.team.fullName&&(m=e.team.fullName),"short"in e&&e.short&&e.team.shortName&&(m=e.team.shortName),"No team"===m&&(m=c.formatMessage({id:"player.noTeam"})),e.team.national)?(0,a.jsx)(u,{original:m,showFemaleSuffix:e.showFemaleSuffix}):(0,a.jsx)(d,{translation:m,showFemaleSuffix:e.showFemaleSuffix})},m=e=>"F"===e.gender&&e.type===n.YVh.Regular},98449:(e,t,r)=>{"use strict";r.d(t,{m:()=>i,x:()=>l});var a=r(6029),n=r(90248);let s=e=>e.indexOf("-amateur");function i(e){let{slug:t,name:r,uniqueTournament:i}=e,l=s(t);if(-1!==l){let e=t.substr(0,l);return(0,a.jsx)(n.A,{id:"amateurCategory",defaultMessage:r,values:{countryName:(0,a.jsx)(n.A,{id:e})}})}if(null==i?void 0:i.tennisPoints){let e=r.split("").some(e=>!isNaN(Number(e))&&" "!==e);return 2e3===i.tennisPoints?(0,a.jsx)(n.A,{id:"tennis.grandSlam"}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.A,{id:t,defaultMessage:r})," ",e?null:(0,a.jsx)(a.Fragment,{children:i.tennisPoints})]})}return(0,a.jsx)(n.A,{id:t,defaultMessage:r})}function l(e){let{slug:t,name:r,intl:a}=e,n=s(t);if(-1!==n){let e=t.substr(0,n);return a.formatMessage({id:"amateurCategory",defaultMessage:r},{countryName:a.formatMessage({id:e})})}return a.formatMessage({id:t,defaultMessage:r})}},98477:(e,t,r)=>{"use strict";r.d(t,{x:()=>m});var a=r(6029),n=r(41249),s=r(947),i=r(54409),l=r(68432),o=r(61167),d=r(67837);let u=e=>{let{opened:t,onClose:r,onPlayerSelect:u}=e,c=(0,s.A)(),{query:m,onQueryChange:p,options:f}=(0,o.t)(),{recentlySelected:y,addToRecentlySelected:h,removeFromRecentlySelected:v}=(0,d.H)();return(0,a.jsxs)(n.Xn,{isOpen:t,onClose:r,children:[(0,a.jsx)(n.Xn.Header,{children:(0,a.jsx)(n.pd,{placeholder:c.formatMessage({id:"search_player"}),startAdornment:(0,a.jsx)(i.zQC,{icon:"search",fill:"onSurface.nLv3"}),value:m,onChange:p,clearable:!0,onClear:()=>p("")})}),(0,a.jsxs)(n.Xn.Content,{minH:"100vh",children:[(0,a.jsx)(l.Y,{query:m,searchOptions:f,recentOptions:y,onPlayerClick:e=>{u(e.id),r(),h(e)},onPlayerRemove:v}),(0,a.jsx)(n.az,{h:200})]})]})};var c=r(4526);let m=e=>{let{children:t,onPlayerSelect:r}=e,[n,s,i]=(0,c.q)();return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{onClick:s,children:t}),(0,a.jsx)(u,{opened:n,onClose:i,onPlayerSelect:r})]})}},99087:(e,t,r)=>{"use strict";r.d(t,{s:()=>g});var a=r(6029),n=r(59721),s=r(21377),i=r(95083),l=r(76356),o=r(41249),d=r(55729),u=r(947),c=r(90248),m=r(62859),p=r(54409),f=r(36326);let y=(e,t,r)=>{let a=e.find(e=>{var r;return(null==(r=e.uniqueTournament)?void 0:r.id)===t}),n=null==a?void 0:a.seasons.find(e=>e.id==r);return{tournament:null==a?void 0:a.uniqueTournament,season:n}},h=e=>{let{opened:t,tournament:r,seasons:s,onSeasonClick:d}=e;return(0,a.jsxs)(o.nD.Item,{defaultOpened:t,children:[(0,a.jsx)(o.nD.Trigger,{children:(0,a.jsxs)(l.so,{align:"center",gap:"md",children:[(0,a.jsx)(n.e,{id:r.id,size:24}),(0,a.jsx)(i.EY,{children:r.name})]})}),(0,a.jsx)(o.cG,{}),(0,a.jsx)(o.nD.Content,{children:s.map(e=>(0,a.jsx)(l.az,{onClick:()=>d(r.id,e.id),px:"lg",py:"md",children:(0,a.jsx)(i.EY,{children:e.year})},e.id))})]})},v=e=>{let{activeTournamentId:t,uniqueTournamentSeasons:r,years:n,onSeasonClick:i}=e,[c,p]=(0,d.useState)(t),f=(0,u.A)(),y=(0,d.useContext)(m.Ws)===s.QCR.Tennis&&n?[{uniqueTournament:{id:-1,name:f.formatMessage({id:"tennis_all_tournaments"})},seasons:n},...r]:r,v=e=>{p(e===c?void 0:e)},x=(e,t)=>{v(e),i(e,t)};return(0,a.jsx)(l.az,{minH:"[100vh]",children:(0,a.jsx)(o.nD,{type:"single",children:y.map(e=>(0,a.jsx)(h,{opened:c===e.uniqueTournament.id,tournament:e.uniqueTournament,seasons:e.seasons,onSeasonClick:x},e.uniqueTournament.id))})})};var x=r(4526);let g=e=>{let{uniqueTournamentSeasons:t,seasonId:r,tournamentId:h,years:g,onSeasonChange:b}=e,P=(0,d.useContext)(m.Ws),[j,S,T]=(0,x.q)(),M=(0,u.A)(),{tournament:N,season:w}=y(P===s.QCR.Tennis&&g?[{uniqueTournament:{id:f.FV,name:M.formatMessage({id:"tennis_all_tournaments"})},seasons:g},...t]:t,h,r);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(l.az,{w:"100%",h:"2xl",pl:"md",pr:"sm",br:"sm",elevation:"2",bg:"surface.s1",onClick:()=>S(),children:(0,a.jsxs)(l.so,{justify:"space-between",align:"center",w:"100%",h:"100%",children:[(0,a.jsxs)(l.so,{align:"center",gap:"sm",children:[(0,a.jsx)(n.e,{id:null==N?void 0:N.id,size:24}),(0,a.jsx)(i.EY,{textStyle:"body.medium",children:null==w?void 0:w.year})]}),(0,a.jsx)(p.QFN,{fill:"onColor.primary"})]})}),(0,a.jsxs)(o.Xn,{isOpen:j,onClose:T,children:[(0,a.jsx)(o.Xn.Header,{children:(0,a.jsx)(i.EY,{textStyle:"body.large",fontWeight:"bold",children:(0,a.jsx)(c.A,{id:"select_button"})})}),(0,a.jsx)(o.Xn.Content,{children:(0,a.jsx)(v,{uniqueTournamentSeasons:t,activeTournamentId:h,years:g,onSeasonClick:(e,t)=>{T(),b(e,t)}})})]})]})}}}]);