!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},s=(new e.Error).stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="4280ee39-64a1-4940-b76e-4bc4cd90d0de",e._sentryDebugIdIdentifier="sentry-dbid-4280ee39-64a1-4940-b76e-4bc4cd90d0de")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[90717],{90717:(e,s,r)=>{r.r(s),r.d(s,{default:()=>D});var n=r(6029),a=r(46222),l=r(49611),t=r(56022),i=r(46787),d=r(22375),c=r(10174),o=r(76356),u=r(90248),x=r(90510),p=r(52466),h=r(31830),j=r(64006),f=r(80055);let m=e=>{let{id:s,value:r,children:a}=e;return void 0!==r||a?(0,n.jsxs)(o.so,{justify:"space-between",align:"center",px:"lg",py:"sm",children:[(0,n.jsx)(c.EY,{children:"string"==typeof s?(0,n.jsx)(u.A,{id:s}):s}),(0,n.jsx)(c.EY,{display:"block",children:null!=r?r:a})]}):null};function y(e){let{manager:s,foundationDateTimestamp:r,established:l,championshipTitles:t,championshipsWon:y,country:g,isNational:v,ranking:b}=e,_=(0,h.A)(),w=(null==b?void 0:b.ranking)&&i.j8G[b.type],E=b&&i.j8G[b.type];return(0,n.jsxs)(a.Zp,{children:[(0,n.jsx)(a.Zp.Header,{titleId:"info"}),(0,n.jsxs)(o.az,{pb:"sm",children:[(0,n.jsx)(m,{id:"team_coach",children:s?(0,n.jsx)(j.yI,{manager:s,children:(0,n.jsxs)(o.so,{align:"center",gap:"xs",children:[(0,n.jsx)(c.EY,{color:"primary.default",children:(0,f.s)(s,_)}),(0,n.jsx)(p.CCT,{width:16,height:16,fill:"primary.default"})]})}):(0,n.jsx)(c.EY,{children:(0,n.jsx)(u.A,{id:"player.transfer.unknown"})})}),!!r&&(0,n.jsx)(m,{id:"foundation_date",children:(0,n.jsx)(x.XU,{timeZone:"UTC",value:1e3*r,...d.or.dateWithShortMonth})}),!!l&&!r&&(0,n.jsx)(m,{id:"team.established",value:l}),!!t&&(0,n.jsx)(m,{id:"team.championshipTitles",value:t}),!!(null==g?void 0:g.alpha2)&&!v&&(0,n.jsx)(m,{id:"country",children:(0,n.jsxs)(o.so,{align:"center",gap:"sm",children:[(0,n.jsx)("img",{src:(0,i.RHm)(g.alpha2),width:16,height:16,alt:g.alpha2}),g.name&&(0,n.jsx)(c.EY,{display:"block",children:(0,n.jsx)(u.A,{id:g.slug,defaultMessage:g.name})})]})}),void 0!==y&&(0,n.jsx)(m,{id:"am_football_super_bowl_wins",value:y}),w&&(0,n.jsx)(m,{id:(0,n.jsxs)(n.Fragment,{children:[i.ruz[b.type]," ",(0,n.jsx)(u.A,{id:"ranking"})]}),children:(0,n.jsx)(j.N_,{routeKey:"rankings",params:{sport:null==b?void 0:b.team.sport.slug,category:E},hash:String(null==b?void 0:b.team.id),children:(0,n.jsx)(o.so,{align:"center",gap:"sm",children:(0,n.jsxs)(c.EY,{color:{base:E?"primary.default":"neutrals.nLv1",_hover:"primary.default"},cursor:"pointer",children:[null==b?void 0:b.ranking,". (",Math.floor(null==b?void 0:b.points)," ",(0,n.jsx)(u.A,{id:"pts"}),")"]})})})})]})]})}var g=r(61255),v=r(4436),b=r(60867),_=r(94446),w=r(55729),E=r(18970),k=r(82536),C=r(94156),T=r(28188);let Y=e=>{let{transfers:s,direction:r}=e,a=(0,w.useContext)(E.Ws);return(0,n.jsx)(o.az,{children:s.map((e,s)=>{let l="transfers_arrivals"===r?e.transferFrom:e.transferTo;return(0,n.jsx)(j.uc,{player:e.player,sportSlug:a,children:(0,n.jsxs)(o.so,{minW:{base:"100%",md:"[320px]"},borderTop:s?"onSurface.nLv4":void 0,px:"lg",py:"sm",gap:"lg",justify:"space-between",align:"center",_hover:{bg:"surface.s2"},children:[(0,n.jsx)(_.t,{id:e.player.id,size:40}),(0,n.jsxs)(o.az,{flexGrow:1,children:[(0,n.jsx)(c.EY,{children:(0,n.jsx)(C.c,{entity:e.player})}),(0,n.jsxs)(o.so,{align:"center",gap:"xs",children:[(0,n.jsx)(c.EY,{textStyle:"assistive.default",color:"neutrals.nLv3",children:(0,n.jsx)(T.u,{transfer:e})}),(0,n.jsx)(c.EY,{textStyle:"body.medium",color:"secondary.default",children:(0,n.jsx)(T.N,{transfer:e})})]})]}),l&&(0,n.jsxs)(o.so,{direction:"column",align:"flex-end",children:[(0,n.jsx)(_.p,{id:l.id,size:20}),(0,n.jsx)(c.EY,{textStyle:"assistive.default",color:"neutrals.nLv3",mt:"2xs",display:"block",truncate:!0,children:(0,n.jsx)(x.XU,{value:1e3*e.transferDateTimestamp,...(0,d.og)(e.transferDateTimestamp,!0)})})]})]})},e.player.id)})})};function A(e){let{transfers:s,direction:r}=e,[a,l]=(0,w.useState)(!1),t="transfers_arrivals"===r?"latest_arrivals":"latest_departures";return(0,n.jsxs)(o.az,{w:"1/2",px:"lg",py:"sm",children:[(0,n.jsxs)(o.az,{display:"inline-flex",onClick:e=>{e.stopPropagation(),s.length&&l(!a)},cursor:s.length?"pointer":"default",children:[(0,n.jsx)(c.EY,{minW:"fit",textStyle:"display.small",color:"transfers_departures"===r?"status.error.default":"status.success.default",display:"block",children:(0,n.jsx)(u.A,{id:r,values:{playerCount:s.length}})}),(0,n.jsxs)(o.az,{h:"lg",position:"relative",ml:"xs",children:[(0,n.jsx)(p.G_L,{width:16,height:16,fill:"transfers_departures"===r?"error.default":"success.default"}),(0,n.jsx)(k.A,{isOpen:a,setIsOpen:l,header:t,children:(0,n.jsx)(Y,{direction:r,transfers:s})})]})]}),(0,n.jsx)(o.az,{pt:"sm",pb:"lg",children:s.length>0?s.slice(0,3).map(e=>(0,n.jsx)(c.EY,{mt:"xs",display:"block",children:(0,n.jsx)(C.c,{entity:e.player})},e.id)):(0,n.jsx)(c.EY,{mt:"xs",display:"block",children:(0,n.jsx)(u.A,{id:"transfers.no.recent"})})})]})}function I(e){let{transfers:s,direction:r}=e,[l,t]=(0,w.useState)(!1),i=s.length>3,d=l?s:s.slice(0,3);return(0,n.jsx)(o.az,{flex:"1",children:(0,n.jsxs)(a.Zp,{children:[(0,n.jsx)(a.Zp.Header,{title:(0,n.jsx)(o.I4.span,{color:"transfers_departures"===r?"status.error.default":"status.success.default",children:(0,n.jsx)(u.A,{id:r,values:{playerCount:s.length}})})}),(0,n.jsx)(Y,{direction:r,transfers:d}),(0,n.jsx)(a.Zp.Footer,{ctaParams:i?{messageId:l?"show_less":"show_more",icon:l?a.Xb.Up:a.Xb.Down,onClick:()=>t(e=>!e),size:"tertiary"}:void 0})]})})}function z(e){var s,r;let{teamTransfers:l}=e,{isMobile:t}=(0,c.$c)();if(!(null==l||null==(s=l.transfersIn)?void 0:s.length)&&!(null==l||null==(r=l.transfersOut)?void 0:r.length))return null;let i=t?A:I;return(0,n.jsxs)(a.Zp,{children:[(0,n.jsx)(a.Zp.Header,{titleId:"latest_transfers"}),(0,n.jsxs)(o.so,{children:[(0,n.jsx)(i,{transfers:l.transfersIn,direction:"transfers_arrivals"}),(0,n.jsx)(o.az,{borderEnd:"1px solid",borderColor:"neutrals.nLv4",my:"lg",hideBelow:"md"}),(0,n.jsx)(i,{transfers:l.transfersOut,direction:"transfers_departures"})]})]})}var S=r(59777);let Z=e=>{let{id:s,value:r,children:a}=e;return r||a||s?(0,n.jsxs)(o.so,{justify:"space-between",align:"center",px:"lg",py:"sm",children:[(0,n.jsx)(c.EY,{children:(0,n.jsx)(u.A,{id:s})}),(0,n.jsx)(c.EY,{display:"block",children:r||a})]}):null};function W(e){var s;let{venue:r}=e;return(0,n.jsxs)(a.Zp,{children:[(0,n.jsx)(a.Zp.Header,{titleId:"venue"}),(0,n.jsxs)(o.az,{pb:"sm",children:[r.hidden?(0,n.jsx)(Z,{id:"basic.name",value:r.stadium.name}):(0,n.jsx)(S.A,{venue:r,children:(0,n.jsxs)(o.so,{justify:"space-between",align:"center",px:"lg",py:"sm",children:[(0,n.jsx)(c.EY,{children:(0,n.jsx)(u.A,{id:"basic.name"})}),(0,n.jsxs)(o.so,{align:"center",gap:"xs",children:[(0,n.jsx)(c.EY,{color:"primary.default",children:r.stadium.name}),(0,n.jsx)(p.CCT,{width:16,height:16,fill:"primary.default"})]})]})}),(0,n.jsx)(Z,{id:"capacity",value:r.stadium.capacity}),(null==(s=r.country)?void 0:s.name)&&(0,n.jsx)(u.A,{id:r.country.slug,defaultMessage:r.country.name,children:e=>(0,n.jsx)(Z,{id:"city",value:"".concat(r.city.name,", ").concat(e)})})]})]})}function D(e){var s;let{allPlayers:r,foreignPlayers:i,nationalPlayers:d,teamUniqueTournaments:c,teamTransfers:o,ranking:u}=e,x=(0,t.SC)(),{sport:p,country:h,manager:j,venue:f,foundationDateTimestamp:m,established:_,championshipTitles:w,national:E,championshipsWon:k}=x,C=!!(null==o?void 0:o.transfersIn.length)&&!!(null==o?void 0:o.transfersOut.length),T=!!E,Y={activeCap:x.activeCap,capMaximum:x.capMaximum,capSpace:x.capSpace,luxuryTaxThreshold:x.luxuryTaxThreshold,signedPlayers:x.signedPlayers,totalCap:x.totalCap};return(0,n.jsx)(a.WC,{variant:"square",children:(0,n.jsxs)(l.X,{spreadLast:!0,children:[r.length>0&&(0,n.jsx)(l.X.Wide,{children:(0,n.jsx)(v.A,{totalPlayers:r,foreignPlayers:i,nationalTeamPlayers:d,national:T,sport:p})}),!!(null==c||null==(s=c.uniqueTournaments)?void 0:s.length)&&(0,n.jsx)(l.X.Wide,{children:(0,n.jsx)(g.P,{uniqueTournaments:c.uniqueTournaments})}),C&&(0,n.jsx)(l.X.Wide,{children:(0,n.jsx)(z,{teamTransfers:o})}),(0,n.jsx)(y,{manager:j,country:h,isNational:T,championshipTitles:w,championshipsWon:k,established:_,foundationDateTimestamp:m,ranking:u}),(0,n.jsx)(b.A,{salaryCap:Y}),f&&(0,n.jsx)(W,{venue:f})]})})}}}]);