!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]="55be5f10-3602-4c6c-92dc-7274392fae06",e._sentryDebugIdIdentifier="sentry-dbid-55be5f10-3602-4c6c-92dc-7274392fae06")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7819],{37819:(e,t,s)=>{s.r(t),s.d(t,{default:()=>eh});var r=s(6029),l=s(21377),n=s(44194),i=s(76356),o=s(41249),a=s(90248),c=s(45860),d=s(65789),x=s(76868),u=s(55729),p=s(62859),h=s(41735),j=s(54409);let m=h.default.div.withConfig({componentId:"sc-8a732945-0"})(["display:flex;align-items:center;justify-content:center;width:48px;height:48px;border-radius:50%;background-color:",";"],e=>e.theme.colors.onSurface.nLv3),y=e=>{let{character:t,isInverted:s}=e;return(0,r.jsxs)(i.az,{position:"relative",children:[(0,r.jsx)(o._V,{src:l.fQV.characterImage(t.id),br:"50%",w:"48",h:"48",fallback:(0,r.jsx)(m,{}),alt:""}),(0,r.jsx)(i.az,{position:"absolute",w:"lg",h:"lg",br:"50%",bg:"surface.s1",bottom:"xs",left:s?"0":void 0,right:s?void 0:"0",children:(0,r.jsx)(j.cgL,{fill:"onSurface.nLv1"})})]})};function g(e){let{homeTeamBans:t,awayTeamBans:s}=e;return(0,r.jsxs)(i.so,{justify:"space-between",px:"md",gap:"xl",children:[(0,r.jsx)(i.so,{flex:"1",wrap:"wrap",rowGap:"lg",columnGap:"xs",children:t.map(e=>(0,r.jsx)(y,{character:e},e.id))}),(0,r.jsx)(i.so,{flex:"1",direction:"row-reverse",wrap:"wrap",rowGap:"lg",columnGap:"xs",children:s.map(e=>(0,r.jsx)(y,{character:e,isInverted:!0},e.id))})]})}var f=s(33144),v=s(93338);let b=[e=>(0,r.jsx)(j.p1j,{icon:"cs-counter-terrorists-kill",...e}),e=>(0,r.jsx)(j.p1j,{icon:"cs-counter-terrorists-defuse",...e}),e=>(0,r.jsx)(j.p1j,{icon:"cs-terrorists-bomb",...e}),e=>(0,r.jsx)(j.p1j,{icon:"cs-timeout",...e}),e=>(0,r.jsx)(j.p1j,{icon:"cs-terrorists-kill",...e})],w=e=>{let{plays:t,isHomeTerroristTeam:s,iconWidth:l,iconHeight:n,isTop:o,emptyWidth:a}=e;return(0,r.jsxs)(i.so,{children:[(0,r.jsx)(i.so,{align:"center",overflow:"hidden",children:t.map((e,t)=>{let a=o&&s[t]||!o&&!s[t];if(e){let s=b[e.outcome];return(0,r.jsx)(i.az,{bgColor:a?"eSports.cs.t/30":"eSports.cs.ct/30",children:(0,r.jsx)(s,{fill:a?v.S.var("colors.eSports.cs.t"):v.S.var("colors.eSports.cs.ct"),w:l,h:n,p:n>20?n>26?6:4:2})},t)}return(0,r.jsx)(i.az,{bgColor:a?"eSports.cs.t/30":"eSports.cs.ct/30",style:{width:l,height:n}},t)})}),a>0&&(0,r.jsx)(i.az,{bg:"[neutrals.nLv5]",style:{width:a,height:n}})]})};function S(e){let t,s,{rounds:o,maxRounds:c=12,headerInfo:d,iconHeight:x,iconWidth:h}=e,{event:j}=(0,u.useContext)(p.y$);if(!o.length)return null;let m=o.map(e=>e.homeTeamSide===l.U6N.Terrorist),y=[],g=[];o.forEach(e=>{e.winnerCode===l.Jfo.Left&&(y.push(e),g.push(null)),e.winnerCode===l.Jfo.Right&&(y.push(null),g.push(e))}),c%3==0?(t=c/3,s=3):c%5==0?(t=c/5,s=5):c%2==0?(t=c/2,s=2):(t=0,s=c);let v=[...Array(t)].map((e,t)=>(0,r.jsx)(i.az,{position:"absolute",h:"100%",w:"[1px]",bg:"surface.s1",top:"0",style:{left:"".concat((t+1)*s*h-.5,"px")}},t)),b=(c-y.length)*h,S=(c-g.length)*h;return(0,r.jsxs)(i.so,{pt:"xl",children:[(0,r.jsxs)(i.so,{direction:"column",justify:"space-between",mr:"sm",pt:"xs",children:[(0,r.jsx)(f.p,{id:j.homeTeam.id,size:x-2}),(0,r.jsx)(f.p,{id:j.awayTeam.id,size:x-2})]}),(0,r.jsxs)(i.az,{position:"relative",pt:"xs",children:[(0,r.jsx)(i.so,{align:"center",justify:"end",position:"absolute",w:"100%",h:"xl",transform:"translateY(-100%)",children:(0,r.jsx)(n.EY,{textStyle:"assistive.default",color:"neutrals.nLv3",display:"block",children:(0,r.jsx)(a.A,{id:d.messageId,values:d.values})})}),(0,r.jsx)(w,{plays:y,iconWidth:h,iconHeight:x,isHomeTerroristTeam:m,emptyWidth:b||0,isTop:!0}),(0,r.jsx)(w,{plays:g,iconWidth:h,iconHeight:x,isHomeTerroristTeam:m,emptyWidth:S||0}),v]})]})}function C(e){let{rounds:{normaltimeRounds:t,overtimeChunkSize:s,overtimeRounds:l,roundsInAHalf:o},iconSize:a}=e,{isDesktopMedium:c}=(0,n.$c)(),d=t.slice(0,o),x=t.slice(o),u=(null==l?void 0:l.length)||0,p=2*(s||0),h=[];if(u&&s)for(let e=0;e(0,r.jsx)(S,{rounds:e,maxRounds:p,iconHeight:a,iconWidth:a,headerInfo:{messageId:"ordinalOvertime",values:{n:t+1}}},t))})]})}function I(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:12,s=Math.floor((e-32-8-(12===t?8:1)*t)/(t+1));return s>24&&(s=24),s<16&&(s=16),s}function k(e){let{gameId:t}=e,{data:s}=(0,c.Ay)(l.fQV.rounds(t),{refreshInterval:15e3}),[n,o]=(0,u.useState)(I(300,null==s?void 0:s.roundsInAHalf)),{event:a}=(0,u.useContext)(p.y$),d=(0,u.useRef)(null),h=(0,u.useCallback)(()=>{d.current&&o(I(d.current.getBoundingClientRect().width,null==s?void 0:s.roundsInAHalf))},[null==s?void 0:s.roundsInAHalf]);(0,u.useEffect)(()=>(addEventListener("resize",h),()=>{removeEventListener("resize",h)}),[h]),(0,u.useEffect)(()=>{h()},[h,d.current]);let j=[l.xN6.ESportsStatistics,l.xN6.ESportsLive].includes(a.coverage),m=(null==s?void 0:s.normaltimeRounds)&&s.normaltimeRounds.length>0;return(0,r.jsxs)(i.az,{ref:d,px:"lg",pb:"lg",children:[j&&!m&&(0,r.jsx)(x.p,{graphic:"check-back-later",titleMessageId:"esports.afterStatistics"}),s&&m&&(0,r.jsx)(i.so,{justify:"center",children:(0,r.jsx)(C,{rounds:s,iconSize:n})})]})}var z=s(4967);let E=(0,s(62042).JB)({slots:["root","image"],base:{root:{position:"absolute",width:"100%",height:"100%",overflow:"hidden"},image:{content:'""',position:"absolute",width:"100%",height:"100%",filter:"[blur(2px) brightness(0.6)]",backgroundPosition:"center",backgroundRepeat:"no-repeat",backgroundSize:"cover"}}});function L(e){let{url:t,children:s}=e,{root:l,image:n}=E();return(0,r.jsxs)("div",{className:l,children:[(0,r.jsx)("div",{className:n,style:{backgroundImage:"url(".concat(t,")")}}),s]})}var H=s(90510),T=s(73022);let A=e=>{let{score:t,align:s}=e;return(0,r.jsx)(n.EY,{w:"lg",textStyle:"display.small",lineHeight:"20px",color:"onColor.primary",textAlign:s,children:t})},D=e=>{let{homeScore:t,awayScore:s,messageId:l,messageValues:o}=e;return(0,r.jsxs)(i.so,{justify:"space-between",children:[(0,r.jsx)(A,{score:t,align:"right"}),(0,r.jsx)(n.EY,{lineHeight:"20px",color:"onColor.primary",px:"sm",children:(0,r.jsx)(a.A,{id:l,values:o})}),(0,r.jsx)(A,{score:s,align:"left"})]})};function Y(e){let{homeScore:t,awayScore:s}=e;if(!t||!s)return null;let l="number"==typeof t.overtime||"number"==typeof s.overtime,n="number"==typeof t.period2||"number"==typeof s.period2;if(!l&&!n)return null;let o=t.period1||0,a=s.period1||0,c=t.period2||0,d=s.period2||0,x=t.overtime||0,u=s.overtime||0;return(0,r.jsxs)(i.az,{mt:"md",children:[(0,r.jsx)(D,{homeScore:l?x:c,awayScore:l?u:d,messageId:l?"overtime.short":"NHalf",messageValues:{n:2}}),(0,r.jsx)(i.az,{borderTop:"1px solid {colors.onColor.secondary}"}),(0,r.jsx)(D,{homeScore:l?o+c:o,awayScore:l?a+d:a,messageId:l?"full_time_short":"NHalf",messageValues:{n:1}})]})}let $=e=>{let{isLive:t,homeScore:s,awayScore:o,winnerCode:a}=e,c=t?"status.live":a===l.Jfo.Left?"onColor.primary":"onColor.secondary",d=t?"status.live":a===l.Jfo.Right?"onColor.primary":"onColor.secondary";return(0,r.jsxs)(i.so,{bg:"overlay.darken2",borderWidth:"2px",borderStyle:"solid",borderColor:t?"status.live":"onColor.secondary",h:"2xl",justify:"center",align:"center",px:"sm",br:"md",children:[(0,r.jsx)(n.EY,{textStyle:"display.large",color:c,children:s.display}),(0,r.jsx)(n.EY,{textStyle:"display.large",color:t?"status.live":"onColor.secondary",mx:"sm",children:"-"}),(0,r.jsx)(n.EY,{textStyle:"display.large",color:d,children:o.display})]})};function P(e){let{isCS:t,mapName:s,hasStarted:l,isLive:o,homeScore:c,awayScore:d,startDate:x,startTimestamp:u,winnerCode:p}=e;return(0,r.jsxs)(i.so,{direction:"column",justify:"center",align:"center",py:"xs",children:[t&&s&&l&&(0,r.jsx)(n.EY,{textStyle:"body.medium",color:"onColor.primary",mb:"sm",lineHeight:"20px",children:s}),l?(0,r.jsx)($,{isLive:o,homeScore:c,awayScore:d,winnerCode:p}):(0,r.jsxs)(i.so,{direction:"column",justify:"center",align:"center",color:"onColor.primary",children:[(0,r.jsx)(n.EY,{textStyle:"display.large",color:"onColor.secondary",textTransform:"capitalize",children:(0,r.jsx)(T.Gi.StyledComponent,{children:(0,r.jsx)(T.Gi,{startTimestamp:u})})}),(0,r.jsx)(n.EY,{textStyle:"assistive.default",color:"onColor.secondary",textAlign:"center",display:"block",children:(0,z.cK)(x)?(0,r.jsx)(a.A,{id:"status.today",values:{time:(0,r.jsx)(H.ib,{value:x})}}):(0,r.jsx)(H.XU,{value:z.pp(1e3*x.getTime()),...z.or.fullDateTime})})]}),t&&l&&(0,r.jsx)(Y,{homeScore:c,awayScore:d})]})}var K=s(70591),R=s(82640),M=s(63263);let N=e=>{let{team:t,badge:s,drakeKills:o,isReversed:a,teamColor:c}=e;return(0,r.jsxs)(i.az,{children:[(0,r.jsx)(i.so,{justify:a?"flex-end":"flex-start",children:(0,r.jsxs)(i.az,{position:"relative",w:"5xl",h:"5xl",br:"50%",bg:"onColor.primary",p:"2xs",children:[(0,r.jsx)(K.gT,{team:t,sport:l.QCR.ESports,children:(0,r.jsx)(f.p,{id:t.id,size:52,name:t.name,br:"50%"})}),s&&(0,r.jsx)(i.so,{justify:"center",align:"center",w:"xl",h:"xl",br:"50%",position:"absolute",left:a?"-sm":void 0,right:a?void 0:"-sm",bottom:"-sm",style:{backgroundColor:c},children:(0,r.jsx)(n.EY,{textStyle:"assistive.default",color:"onColor.primary",textAlign:"center",lineHeight:1.2,children:s})})]})}),!!(null==o?void 0:o.length)&&(0,r.jsx)(i.so,{w:"100%",wrap:"wrap",direction:a?"row-reverse":"row",children:o.filter(e=>e!==R.Au.Elder).map((e,s)=>{let l=(0,M.$l)(e);return s>3||!l?null:(0,r.jsx)(l,{width:24,height:24},"".concat(t.id,"-drake-icon-").concat(s))})})]})};var Z=s(19666);function J(e){let{homeScore:t,awayScore:s,winnerCode:n,backgroundImageSrc:o,startTimestamp:a,homeDrakeKills:c,awayDrakeKills:d,status:x,mapName:h}=e,{event:j}=(0,u.useContext)(p.y$),[m,y]=(0,M.ql)(),g=(0,u.useContext)(Z.qL),f=(0,Z.tR)(),v=(0,z.pp)(a),b=x.type===l.XUj.InProgress,w=x.type===l.XUj.NotStarted,S=g===l.$2C.CounterStrike,C=(0,M.K$)(f),[I,k]=S&&m&&y?C?[R.zz.Terrorists,R.zz.CounterTerrorists]:[R.zz.CounterTerrorists,R.zz.Terrorists]:[];return(0,r.jsx)(i.az,{position:"relative",minH:"[120px]",children:(0,r.jsx)(L,{url:o,children:(0,r.jsx)(i.so,{position:"absolute",w:"100%",h:"100%",justify:"space-between",children:(0,r.jsxs)(i.so,{w:"100%",justify:"space-between",align:"center",gap:"md",children:[(0,r.jsx)(i.az,{w:"xs",h:"100%",style:{backgroundColor:m}}),(0,r.jsx)(N,{team:j.homeTeam,drakeKills:c,badge:I,teamColor:m}),(0,r.jsx)(i.az,{flex:"1",children:(0,r.jsx)(P,{isCS:S,mapName:h,hasStarted:!w,isLive:b,homeScore:t,awayScore:s,startDate:v,startTimestamp:a,winnerCode:n})}),(0,r.jsx)(N,{team:j.awayTeam,drakeKills:d,badge:k,teamColor:y,isReversed:!0}),(0,r.jsx)(i.az,{w:"xs",h:"100%",style:{backgroundColor:y}})]})})})})}function _(e){let{isHomeAdvantage:t,backgroundImageSrc:s}=e,{leftTeam:o,rightTeam:c}=(0,u.useContext)(p.y$);return(0,r.jsxs)(i.az,{position:"relative",minH:"12xl",children:[(0,r.jsx)(L,{url:s}),(0,r.jsx)(i.so,{position:"absolute",w:"100%",h:"100%",justify:"space-between",children:(0,r.jsxs)(i.so,{px:"md",w:"100%",h:"100%",justify:"space-between",align:"center",children:[(0,r.jsx)(N,{team:o,teamColor:"transparent"}),(0,r.jsxs)(i.so,{justify:"center",align:"center",direction:"column",children:[(0,r.jsx)($,{isLive:!1,homeScore:t?{display:1}:{display:0},awayScore:t?{display:0}:{display:1},winnerCode:t?l.Jfo.Left:l.Jfo.Right}),(0,r.jsx)(n.EY,{textStyle:"body.medium",mt:"sm",color:"onColor.primary",children:(0,r.jsx)(a.A,{id:"advantage"})})]}),(0,r.jsx)(N,{team:c,teamColor:"transparent",isReversed:!0})]})})]})}var V=s(22648),F=s(10292),G=s(24159);let W=e=>{let t="number"==typeof e?e:"-";return"-"===t?t:t>0?"+".concat(t):t},Q=e=>{let t="number"==typeof e?e:"-";return"-"===t||0===t?void 0:t>0?"secondary.default":"status.live"},U=e=>{let{text:t,isInverted:s,color:l}=e;return(0,r.jsx)(n.EY,{w:"1/3",h:"lg",lineHeight:"18px",textStyle:"body.medium",color:l||"neutrals.nLv1",textAlign:s?"right":"left",display:"block",children:t})};function q(e){let{homePlayerStatistics:t,awayPlayerStatistics:s}=e,l=(0,M.Zb)(t,!0),o=(0,M.Zb)(s,!0);return(0,r.jsxs)(i.az,{px:"xs",children:[(0,r.jsxs)(i.so,{h:"lg",align:"center",justify:"space-between",children:[(0,r.jsx)(U,{text:l}),(0,r.jsx)(n.EY,{textStyle:"body.medium",color:"neutrals.nLv3",children:"K/A/D"}),(0,r.jsx)(U,{text:o,isInverted:!0})]}),(0,r.jsxs)(i.so,{h:"lg",align:"center",justify:"space-between",children:[(0,r.jsx)(U,{text:W(t.kdDiff),color:Q(t.kdDiff)}),(0,r.jsx)(n.EY,{textStyle:"body.medium",color:"neutrals.nLv3",children:"K - D"}),(0,r.jsx)(U,{text:W(s.kdDiff),color:Q(s.kdDiff),isInverted:!0})]}),(0,r.jsxs)(i.so,{h:"lg",align:"center",justify:"space-between",children:[(0,r.jsx)(U,{text:"number"==typeof t.adr?t.adr:"-"}),(0,r.jsx)(n.EY,{textStyle:"body.medium",color:"neutrals.nLv3",children:"ADR"}),(0,r.jsx)(U,{text:"number"==typeof s.adr?s.adr:"-",isInverted:!0})]})]})}let O=e=>{let{text:t,isInverted:s}=e;return(0,r.jsx)(n.EY,{w:"1/3",h:"lg",lineHeight:"18px",textStyle:"body.medium",color:"neutrals.nLv1",textAlign:s?"right":"left",display:"blockF",children:t})};function B(e){var t,s;let{homePlayerStatistics:l,awayPlayerStatistics:o}=e,c=(0,M.Zb)(l),d=(0,M.Zb)(o),x=l.player.position,u=o.player.position,p=x?null==(t=M.Js[x])?void 0:t.icon:null,h=u?null==(s=M.Js[u])?void 0:s.icon:null;return(0,r.jsxs)(i.az,{px:"xs",children:[(0,r.jsxs)(i.so,{h:"lg",align:"center",justify:"space-between",children:[(0,r.jsx)(O,{text:c}),(0,r.jsx)(n.EY,{textStyle:"body.medium",color:"neutrals.nLv3",children:"KDA"}),(0,r.jsx)(O,{text:d,isInverted:!0})]}),(0,r.jsxs)(i.so,{h:"lg",align:"center",justify:"space-between",children:[(0,r.jsx)(O,{text:"".concat("number"==typeof l.lastHits?l.lastHits:"-","/").concat("number"==typeof l.denies?l.denies:"-")}),(0,r.jsx)(n.EY,{textStyle:"body.medium",color:"neutrals.nLv3",children:"LH/DN"}),(0,r.jsx)(O,{text:"".concat("number"==typeof o.lastHits?o.lastHits:"-","/").concat("number"==typeof o.denies?o.denies:"-"),isInverted:!0})]}),(0,r.jsxs)(i.so,{h:"lg",align:"center",justify:"space-between",children:[(0,r.jsx)(O,{text:"number"==typeof l.goldPerMin?l.goldPerMin:"-"}),(0,r.jsx)(n.EY,{textStyle:"body.medium",color:"neutrals.nLv3",children:"G/Min"}),(0,r.jsx)(O,{text:"number"==typeof o.goldPerMin?o.goldPerMin:"-",isInverted:!0})]}),(0,r.jsxs)(i.so,{h:"lg",align:"center",justify:"space-between",children:[(0,r.jsx)(O,{text:"number"==typeof l.xpPerMin?l.xpPerMin:"-"}),(0,r.jsx)(n.EY,{textStyle:"body.medium",color:"neutrals.nLv3",children:"XP/Min"}),(0,r.jsx)(O,{text:"number"==typeof o.xpPerMin?o.xpPerMin:"-",isInverted:!0})]}),(p||h)&&(0,r.jsxs)(i.so,{h:"lg",align:"center",justify:"space-between",children:[(0,r.jsx)(i.az,{w:"lg",h:"lg",children:p&&(0,r.jsx)(p,{w:16,h:16,fill:"neutrals.nLv1"})}),(0,r.jsx)(n.EY,{textStyle:"body.medium",color:"neutrals.nLv3",children:(0,r.jsx)(a.A,{id:"position"})}),(0,r.jsx)(i.az,{w:"lg",h:"lg",children:h&&(0,r.jsx)(h,{w:16,h:16,fill:"neutrals.nLv1"})})]})]})}let X=e=>{let t=Math.abs(e),s="".concat(t);return t>=1e3&&(t=Math.round(t/100)/10,s="".concat(t,"K")),s},ee=e=>{let{homeGold:t,awayGold:s}=e,[l,o]=(0,M.ql)(),a=t-s,c=X(a);if(0===a)return null;let d=a>0?l:a<0?o:v.S.var("colors.neutrals.nLv1");return(0,r.jsxs)(i.so,{align:"center",justify:"center",w:"3xl",h:"lg",br:"xl",borderWidth:"1px",borderStyle:"solid",style:{color:d},children:[a>0&&(0,r.jsx)(j.yiO,{fill:d,width:8,height:8}),(0,r.jsx)(n.EY,{textStyle:"assistive.micro",color:"[inherit]",children:c}),a<0&&(0,r.jsx)(j.DxT,{fill:d,width:8,height:8})]})},et=e=>{let{Icon:t,text:s,isInverted:l}=e;return(0,r.jsxs)(n.EY,{h:"lg",lineHeight:"18px",textStyle:"body.medium",color:"neutrals.nLv1",textAlign:l?"right":"left",display:"block",children:[!l&&(0,r.jsx)(t,{h:16,w:16,fill:"neutral.default",mr:"xs",my:"1px"}),s,l&&(0,r.jsx)(t,{h:16,w:16,fill:"neutral.default",ml:"xs",my:"1px"})]})};function es(e){var t,s;let{homePlayerStatistics:l,awayPlayerStatistics:n}=e,o=(0,M.Zb)(l),a=(0,M.Zb)(n),c=l.player.position,d=n.player.position,x=c?null==(t=M.Ew[c])?void 0:t.icon:null,u=d?null==(s=M.Ew[d])?void 0:s.icon:null;return(0,r.jsxs)(i.az,{children:[(0,r.jsxs)(i.so,{justify:"space-between",children:[(0,r.jsx)(et,{Icon:e=>(0,r.jsx)(j.p1j,{icon:"lol-kda",...e}),text:o}),(0,r.jsx)(et,{Icon:e=>(0,r.jsx)(j.p1j,{icon:"lol-kda",...e}),text:a,isInverted:!0})]}),(0,r.jsxs)(i.so,{justify:"space-between",children:[(0,r.jsx)(et,{Icon:e=>(0,r.jsx)(j.p1j,{icon:"lol-cs",...e}),text:"number"==typeof l.minionsKilled?l.minionsKilled:"-"}),(0,r.jsx)(et,{Icon:e=>(0,r.jsx)(j.p1j,{icon:"lol-cs",...e}),text:"number"==typeof n.minionsKilled?n.minionsKilled:"-",isInverted:!0})]}),(0,r.jsxs)(i.so,{justify:"space-between",align:"center",children:[(0,r.jsx)(i.az,{w:"1/3",children:(0,r.jsx)(et,{Icon:e=>(0,r.jsx)(j.p1j,{icon:"lol-gold",...e}),text:"number"==typeof l.goldEarned?X(l.goldEarned):"-"})}),d===c&&(0,r.jsx)(ee,{homeGold:l.goldEarned||0,awayGold:n.goldEarned||0}),(0,r.jsx)(i.az,{w:"1/3",children:(0,r.jsx)(et,{Icon:e=>(0,r.jsx)(j.p1j,{icon:"lol-gold",...e}),text:"number"==typeof n.goldEarned?X(n.goldEarned):"-",isInverted:!0})})]}),(x||u)&&(0,r.jsxs)(i.so,{justify:"space-between",children:[(0,r.jsx)(i.az,{w:"lg",h:"lg",children:x&&(0,r.jsx)(x,{w:16,h:16})}),(0,r.jsx)(i.az,{w:"lg",h:"lg",children:u&&(0,r.jsx)(u,{w:16,h:16})})]})]})}let er=e=>{let{characterId:t,level:s,playerId:a,isInverted:c,isAlive:d}=e;return(0,r.jsxs)(i.az,{position:"relative",filter:d?void 0:"[grayscale(100%)]",children:[t?(0,r.jsx)(o._V,{src:l.fQV.characterImage(t),br:"50%",w:"52",h:"52",alt:"Character image"}):(0,r.jsx)(F.t,{id:a,size:52}),!!t&&s&&s>0&&(0,r.jsx)(i.so,{justify:"center",align:"center",position:"absolute",bg:"neutrals.nLv1",w:"lg",h:"lg",br:"50%",bottom:"0",left:c?"0":void 0,right:c?void 0:"0",children:(0,r.jsx)(n.EY,{textStyle:"assistive.micro",color:"surface.s1",textAlign:"center",children:s})})]})};function el(e){var t,s;let{hasTopBorder:o,homePlayerStatistics:a,awayPlayerStatistics:c,eSportType:d}=e,[x,u]=(0,M.ql)(),p=null==(t=a.character)?void 0:t.id,h=null==(s=c.character)?void 0:s.id,j=a.level||a.heroLevel,m=c.level||c.heroLevel,y="boolean"!=typeof a.alive||a.alive,g="boolean"!=typeof c.alive||c.alive;return(0,r.jsxs)(i.so,{justify:"space-between",children:[(0,r.jsx)(i.az,{w:"xs",style:{backgroundColor:x}}),(0,r.jsxs)(i.az,{flex:"1",children:[o&&(0,r.jsx)(i.az,{borderTop:"1px solid {colors.neutrals.nLv4}"}),(0,r.jsxs)(i.az,{px:"md",pt:"sm",pb:"lg",children:[(0,r.jsxs)(i.so,{mb:"xs",whiteSpace:"nowrap",overflow:"hidden",children:[(0,r.jsx)(i.az,{w:"1/2",truncate:!0,children:(0,r.jsx)(n.EY,{textStyle:"body.large",color:"neutrals.nLv1",children:(0,r.jsx)(G.c,{entity:a.player})})}),(0,r.jsx)(i.az,{w:"1/2",textAlign:"right",truncate:!0,children:(0,r.jsx)(n.EY,{textStyle:"body.large",color:"neutrals.nLv1",children:(0,r.jsx)(G.c,{entity:c.player})})})]}),(0,r.jsxs)(i.so,{justify:"space-between",align:"start",children:[(0,r.jsx)(er,{playerId:a.player.id,characterId:p,level:j,isAlive:y}),(0,r.jsxs)(i.az,{flex:"1",px:"xs",children:[d===l.$2C.LoL&&(0,r.jsx)(es,{homePlayerStatistics:a,awayPlayerStatistics:c}),d===l.$2C.Dota&&(0,r.jsx)(B,{homePlayerStatistics:a,awayPlayerStatistics:c}),d===l.$2C.CounterStrike&&(0,r.jsx)(q,{homePlayerStatistics:a,awayPlayerStatistics:c})]}),(0,r.jsx)(er,{playerId:c.player.id,characterId:h,level:m,isAlive:g,isInverted:!0})]})]})]}),(0,r.jsx)(i.az,{w:"xs",style:{backgroundColor:u}})]})}let en=(e,t)=>e.sort((e,s)=>{var r,n,i,o;let a=t===l.$2C.Dota?M.Js:M.Ew;return(null!=(i=null==(r=a[e.role||e.player.position||""])?void 0:r.sortIndex)?i:100)-(null!=(o=null==(n=a[s.role||s.player.position||""])?void 0:n.sortIndex)?o:100)}),ei=(e,t,s)=>{let r=[],n=[];e=en(e,s),t=en(t,s);let i=s===l.$2C.Dota?M.Js:M.Ew;return Object.keys(i).sort((e,t)=>i[e].sortIndex-i[t].sortIndex).forEach(s=>{let l=e.find(e=>s===(e.role||e.player.position)),i=t.find(e=>s===(e.role||e.player.position));void 0!==l&&void 0!==i&&(e=e.filter(e=>e.player.id!==(null==l?void 0:l.player.id)),t=t.filter(e=>e.player.id!==(null==i?void 0:i.player.id)),r.push(l),n.push(i))}),[r.concat(e),n.concat(t)]};function eo(e){let{gameId:t}=e,{data:s,error:n}=(0,c.Ay)(l.fQV.lineups(t),{refreshInterval:15e3}),i=(0,u.useContext)(Z.qL);if(n)return null;if(!s)return(0,r.jsx)(V.a,{});let{homeTeamPlayers:o,awayTeamPlayers:a}=s;if(!o||!o.length||!a||!a.length)return null;let[d,x]=ei(o,a,i),p=Math.max(...[o=d,a=x].map(e=>e.length));return(0,r.jsx)(r.Fragment,{children:Array.from({length:p},(e,t)=>{let s=a[t],l=o[t];if(!a||!l)return null;let n="".concat(l.player.id,"-").concat(s.player.id);return(0,r.jsx)(el,{homePlayerStatistics:l,awayPlayerStatistics:s,eSportType:i,hasTopBorder:t>0},n)})})}let ea=e=>{let{icon:t,count:s,game:o,side:a}=e,c={[l.$2C.LoL]:{home:v.S.var("colors.eSports.lol.red"),away:v.S.var("colors.eSports.lol.blue")},[l.$2C.Dota]:{home:v.S.var("colors.eSports.dota2.dire"),away:v.S.var("colors.eSports.dota2.radiant")}}[o][a];return(0,r.jsxs)(i.BJ,{gap:"0",children:[(0,r.jsx)(j.p1j,{icon:t,fill:c,w:24,h:24,mb:"xs"}),(0,r.jsx)(n.EY,{textStyle:"body.small",color:s?"neutrals.nLv1":"neutrals.nLv3",textAlign:"center",children:s||0})]})};function ec(e){let{objectives:t,isHomeTeam:s,eSportType:n}=e,o=(0,Z.tR)(),a=n===l.$2C.LoL,c=["home","away"];o&&!(0,M.K$)(o)&&c.reverse();let d=s?c[0]:c[1];return(0,r.jsxs)(i.so,{flex:"1",justify:"space-evenly",align:"center",direction:s?"row":"row-reverse",children:[(0,r.jsx)(ea,{icon:a?"drake-elder":"dota-barrack",game:n,side:d,count:a?t.elderDrakeKills:t.barracksDestroyed}),(0,r.jsx)(ea,{icon:a?"lol-baron":"dota-tower",game:n,side:d,count:a?t.nashorKills:t.towersDestroyed}),(0,r.jsx)(ea,{icon:a?"lol-inhibitor":"dota-kills",game:n,side:d,count:a?t.inhibitorKills:t.kills}),a&&(0,r.jsx)(ea,{icon:"lol-turret",game:n,side:d,count:t.towerKills})]})}function ed(e){let{homeObjectives:t,awayObjectives:s}=e,n=(0,u.useContext)(Z.qL);return[l.$2C.Dota,l.$2C.LoL].includes(n)?(0,r.jsxs)(i.so,{bg:"surface.s2",br:"sm",pt:"sm",pb:"xs",justify:"space-between",children:[(0,r.jsx)(ec,{objectives:t,eSportType:n,isHomeTeam:!0}),(0,r.jsx)(ec,{objectives:s,eSportType:n})]}):null}function ex(e){let{game:t}=e,{event:s}=(0,u.useContext)(p.y$),n=(0,u.useContext)(Z.qL),o=n===l.$2C.LoL,a=n===l.$2C.Dota,h=n===l.$2C.CounterStrike,{data:j}=(0,c.Ay)(h?null:l.fQV.teamStats(t.id),{refreshInterval:15e3}),{data:m}=(0,c.Ay)(a||o?l.fQV.bans(t.id):null),y=o&&j?(0,M.pK)(j.homeStatistics):void 0,f=o&&j?(0,M.pK)(j.awayStatistics):void 0,v=(0,M.Fk)(t,n),b=t.map&&t.map.name,w=j?j.homeStatistics:void 0,S=j?j.awayStatistics:void 0,C=t.startTimestamp||s.startTimestamp,I=s.coverage===l.xN6.ESportsFRO,z=s.coverage===l.xN6.ESportsStatistics;return(0,r.jsx)(Z.dR,{value:t.homeTeamStartingSide,children:(0,r.jsxs)(i.az,{children:[(0,r.jsx)(J,{homeScore:t.homeScore,awayScore:t.awayScore,homeDrakeKills:y,awayDrakeKills:f,startTimestamp:C,backgroundImageSrc:v,winnerCode:t.winnerCode,status:t.status,mapName:b}),(0,r.jsxs)(d.BU,{children:[(0,r.jsxs)(d.Zp,{isInverseDesktop:!0,children:[I&&(0,r.jsx)(x.p,{graphic:"no-data",titleMessageId:"esports.fro"}),z&&(o||a)&&!j&&(0,r.jsx)(x.p,{graphic:"check-back-later",titleMessageId:"esports.afterStatistics"}),h&&(0,r.jsx)(k,{gameId:t.id}),w&&S&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(d.Zp.Header,{titleId:"objectives"}),(0,r.jsx)(i.az,{p:"sm",children:(0,r.jsx)(ed,{homeObjectives:w,awayObjectives:S})})]})]}),(0,r.jsxs)(d.Zp,{isInverseDesktop:!0,children:[(0,r.jsx)(d.Zp.Header,{titleId:"lineups"}),(0,r.jsx)(eo,{gameId:t.id}),(0,r.jsx)(d.Zp.Footer,{})]}),m&&(0,r.jsxs)(d.Zp,{isInverseDesktop:!0,children:[(0,r.jsx)(d.Zp.Header,{titleId:"banPhase"}),(0,r.jsx)(g,{...m}),(0,r.jsx)(d.Zp.Footer,{})]})]})]})})}let eu=e=>{let{n:t}=e;return(0,r.jsx)(i.so,{justify:"center",bg:"surface.s1",p:"sm",children:[...Array(t)].map((e,t)=>(0,r.jsx)(o.tU.Tab,{children:(0,r.jsx)(a.A,{id:"ordinalPeriod.short",values:{n:t+1}})},"game-tab-".concat(t+1)))})},ep=e=>{let{panels:t}=e;return(0,r.jsx)(r.Fragment,{children:t.map((e,t)=>(0,r.jsx)(o.tU.Panel,{children:e},"game-panel-".concat(t+1)))})};function eh(e){let{event:t,isInWidget:s}=e,{isDesktop:a}=(0,n.$c)(),{data:u}=(0,c.Ay)(l.bnp.esportsGames(t.id),{refreshInterval:15e3});if(!u)return null;let p=t.gameAdvantageTeamId,h=t.tournament.category.name,j=t.coverage===l.xN6.ESportsFRO,m=u.games.map((e,t)=>(0,r.jsx)(ex,{game:e},"game-".concat(t+1)));if(p){let e=p===t.homeTeam.id,s=(0,M.Fk)({},h);m=[(0,r.jsxs)(i.az,{children:[(0,r.jsx)(_,{isHomeAdvantage:e,backgroundImageSrc:s}),j&&(0,r.jsx)(x.p,{graphic:"no-data",titleMessageId:"esports.fro"})]},"game-advantage"),...m]}let y=a&&!s;return m.length>0?(0,r.jsx)(Z.VX,{value:h,children:(0,r.jsxs)(d.HH,{isCard:y,children:[y&&(0,r.jsx)(d.Zp.Header,{titleId:"games",values:{sport:l.QCR.ESports}}),(0,r.jsxs)(o.tU,{variant:"secondary",children:[(0,r.jsx)(eu,{n:m.length}),(0,r.jsx)(ep,{panels:m})]})]})}):null}}}]);