!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]="4762793d-9a59-4d3f-909e-f7766759aa33",e._sentryDebugIdIdentifier="sentry-dbid-4762793d-9a59-4d3f-909e-f7766759aa33")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[857],{7447:(e,t,n)=>{n.d(t,{A:()=>o});var r=n(6029),a=n(28349),i=n(54409);function o(e){let{isFollowed:t,disabled:n,onClick:o,isOnOverlay:l}=e;return(0,r.jsx)(a.D7,{onClick:o,disabled:n,bg:"[transparent]",children:(0,r.jsx)(i.zQC,{icon:t?"follow-active":"follow-default",fill:l?"onColor.primary":t?"primary.default":"neutral.default",style:{width:24,height:24}})})}},8973:(e,t,n)=>{n.d(t,{b:()=>r,y:()=>a});var r=function(e){return e.Event="event",e.Team="team",e.UniqueTournament="unique_tournament",e.Tournament="tournament",e.Player="player",e.Stage="stage",e.Substage="substage",e.UniqueStages="unique_stage",e.Constructor="constructor",e.Driver="driver",e}({}),a=function(e){return e.MainMatches="main_matches",e.MainLeagues="main_leagues",e.Header="header",e.EventHeader="event_header",e.EventsTab="events_tab",e.EventWidget="event_widget",e.MatchesSection="matches_section",e.H2HSection="h2h_section",e.FloatingHeader="floating_header",e.Favorites="favorites",e.PlayerStatistics="player_statistics",e.RacesTab="races_tab",e.FightNight="fight_night",e.Fights="fights",e.PopularPlayers="popular_players",e.PopularTeams="popular_teams",e.Search="search",e.Popup="popup",e}({})},10801:(e,t,n)=>{n.d(t,{d:()=>o,h:()=>s});var r=n(6029),a=n(55729);let i=(0,a.createContext)(!1);function o(){return!!(0,a.useContext)(i)}function l(e){let{children:t}=e;return(0,r.jsx)(i.Provider,{value:!0,children:t})}function s(e){let{children:t}=e,n=0;return(0,r.jsx)(r.Fragment,{children:a.Children.map(t,e=>e?0==n++?(0,r.jsx)(l,{children:e}):e:null)})}},39969:(e,t,n)=>{n.d(t,{h:()=>w,x:()=>_});var r=n(6029),a=n(21377),i=n(99064),o=n(55729),l=n(494),s=n(24313),d=n(70757),c=n(61836),u=n(10794),f=n(28349),p=n(76356),h=n(90248),m=n(54409);let g=(e,t,n)=>{if(n)switch(t){case"right":return{top:"-8px",left:0,transform:"translateY(-100%)"};case"bottom":return{};default:return{top:"-8px",right:0,transform:"translateY(-100%)"}}switch(t){case"right":return{bottom:"-8px",left:0,transform:"translateY(100%)"};case"bottom":return e?{transform:"translateX(-100%)"}:{};default:return{bottom:"-8px",right:0,transform:"translateY(100%)"}}},v=e=>{let{image:t,name:n,LinkComponent:a}=e,i=(0,r.jsxs)(p.so,{align:"center",cursor:"pointer",gap:"lg",children:[t,(0,r.jsx)(p.az,{style:{width:"102px"},textAlign:"start",children:(0,r.jsx)(f.EY,{color:"neutrals.nLv1",textStyle:"body.medium",children:n})})]});return(0,r.jsx)(p.az,{my:"md",children:a?(0,r.jsx)(a,{children:i}):i})},x=(0,o.forwardRef)((e,t)=>{let{isEventFollowed:n,entities:a=[],onDeleteClick:i,menuPosition:o,isMenuInverted:l}=e,{textDirection:s}=(0,f.$c)(),{isMobile:d}=(0,f.$c)();return"rtl"===s&&(o="right"===o?"left":"right"),(0,r.jsx)(p.az,{ref:t,position:"absolute",w:"[174px]",bg:"surface.s1",elevation:"3",br:"md",py:"sm",zIndex:"popover",style:{...g(d,o,l),whiteSpace:"normal"},children:n&&i?(0,r.jsxs)(p.so,{tabIndex:0,px:"lg",py:"sm",minH:"4xl",align:"center",br:"md",onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(null==i||i(e))},onClick:i,cursor:"pointer",children:[(0,r.jsx)(m.xV8,{fill:"error.default",width:24,height:24,mr:"lg"}),(0,r.jsx)(p.az,{style:{width:"102px"},children:(0,r.jsx)(f.EY,{color:"neutrals.nLv1",textStyle:"body.medium",children:(0,r.jsx)(h.A,{id:"remove_from_favourites"})})})]}):(0,r.jsxs)(p.az,{px:"lg",minH:"4xl",children:[(0,r.jsx)(p.az,{textAlign:"start",children:(0,r.jsx)(f.EY,{color:"neutrals.nLv3",textStyle:"assistive.default",pb:"sm",children:(0,r.jsx)(h.A,{id:"favorites.becauseYouFollow"})})}),a.map(e=>(0,r.jsx)(v,{...e},e.entityType+e.id))]})})});var y=n(37356),b=n(7447);let j=e=>{e.stopPropagation(),e.preventDefault()};function w(e){let{children:t,id:n,leftTeam:f,rightTeam:p,tournament:h,menuPosition:m,isMenuInverted:g,isOnOverlay:v,location:w,type:C}=e,k=(0,o.useMemo)(()=>(0,y.fB)(),[]),S=(0,o.useMemo)(()=>(0,y.KL)(),[]),_=(0,o.useMemo)(()=>({leftTeam:f,rightTeam:p,tournament:h}),[f.id,p.id,h.id]),E=(0,l.d4)(e=>k(e,n)),F=(0,l.d4)(e=>S(e,_)),I=(0,l.d4)(u.fg),P=E!==u.dE.NotFollowed&&!!E,T=P||!!F.length,{invertedMenu:z}=(0,s.l)(),D=(0,l.wA)(),M=()=>{D((0,d.q$)(a.bq7.Events,n)),D((0,d.q$)(a.bq7.MutedEvents,n)),(0,c.g2)({id:n,type:C,location:w,isFollowed:!1})},A=()=>{D((0,d.UQ)(a.bq7.Events,n)),(0,c.g2)({id:n,type:C,location:w,isFollowed:!0})},[L,q]=(0,o.useState)(!1),Q=()=>q(e=>!e),N=(0,o.useCallback)(()=>q(!1),[]),$=(0,i.jz)(N),R=e=>{j(e),I||(T?P?M():Q():A())};return(0,r.jsxs)(i.az,{ref:$,w:"fit-content",children:["function"==typeof t?t({disabled:I,isFollowed:T,isOnOverlay:v,onClick:R}):(0,r.jsx)(b.A,{"aria-label":T?"Remove from favourites":"Add to favourites",disabled:I,isFollowed:T,isOnOverlay:v,onClick:R}),T&&L&&!P&&(0,r.jsx)(x,{isEventFollowed:P,entities:F,menuPosition:m,isMenuInverted:z||g,onDeleteClick:e=>{j(e),M(),N()}})]})}var C=n(62859),k=n(8973),S=n(37470);function _(e){let{id:t,uniqueStage:n,menuPosition:f,location:p,isSubstageCell:h}=e,m=(0,o.useContext)(C.Ws),g=(0,o.useMemo)(()=>(0,y.BD)(),[]),v=(0,o.useMemo)(()=>(0,y.jM)(),[]),j=(0,l.d4)(e=>g(e,t)),w=(0,l.d4)(e=>v(e,null==n?void 0:n.id)),_=(0,l.d4)(u.fg),E=w&&n?(0,S.P3)({uniqueStage:n,sportSlug:m}):void 0,{invertedMenu:F}=(0,s.l)(),I=(0,l.wA)(),P=()=>{I((0,d.UQ)(a.bq7.Stages,t)),(0,c.g2)({id:t,type:h?k.b.Substage:k.b.Stage,location:p,isFollowed:!0})},T=()=>{I((0,d.q$)(a.bq7.Stages,t)),(0,c.g2)({id:t,type:h?k.b.Substage:k.b.Stage,location:p,isFollowed:!1})},[z,D]=(0,o.useState)(!1),M=()=>D(e=>!e),A=()=>D(!1),L=(0,i.jz)(A),q=j||w,Q=w&&!h;return(0,r.jsxs)(i.az,{ref:L,position:"relative",w:"fit-content",children:[(0,r.jsx)(b.A,{disabled:_,isFollowed:q,onClick:e=>{e.stopPropagation(),e.preventDefault(),_||(q?M():P())}}),q&&z&&(0,r.jsx)(x,{entities:E?[E]:void 0,isEventFollowed:j&&!Q,menuPosition:f,isMenuInverted:F,onDeleteClick:e=>{e.stopPropagation(),e.preventDefault(),T(),A()}})]})}},46009:(e,t,n)=>{n.d(t,{w:()=>a,e:()=>g});var r=n(55729);let a=(0,r.createContext)("");var i=n(6029),o=n(76356),l=n(947),s=n(494),d=n(68228),c=n(54409),u=n(61836),f=n(10794),p=n(70757),h=n(12759);let m=e=>{e.stopPropagation(),e.preventDefault()};function g(e){let{entity:t,id:n,location:a,type:g,isOnOverlay:v,isDisabled:x,hasNoBorder:y=!1,onClick:b,isNewButton:j}=e,w=(0,s.wA)(),C=(0,l.A)(),k=(0,s.d4)(e=>(0,f.Ql)(e,t,n),s.bN),S="boolean"==typeof k?k:k!==f.dE.NotFollowed,_=(0,s.d4)(f.fg)||x,E=(0,r.useCallback)(()=>{if(!_){if(S){let e=k===f.dE.Favorite?(0,h.Hz)(t):t;w((0,p.q$)(e,n))}else{let e=(0,h.Hz)(t);w((0,p.UQ)(e,n))}(0,u.g2)({id:n,type:g,location:a,isFollowed:!S})}},[S,_,t,n]);return j?(0,i.jsx)(d.u,{disabled:_,variant:S?"compact":"primary",label:C.formatMessage({id:"button_favourite"}),onClick:e=>{m(e),null==b||b(),E()},children:(0,i.jsx)(c.zQC,{icon:S?"follow-active":"follow-default"})}):(0,i.jsx)(o.I4.button,{border:y?"1.5px solid transparent":void 0,alignItems:"center",appearance:"none",cursor:"pointer",display:"inline-flex",isolation:"isolate",justifyContent:"center",outline:"none",position:"relative",userSelect:"none",flexShrink:"0",whiteSpace:"nowrap",h:"[32px]",w:"[32px]",px:"[0px]",textStyle:"action.button.primary",gap:"xs",br:"sm",color:"primary.default",backgroundColor:"[transparent]",disabled:_,_disabled:{opacity:.5,color:"neutral.default",cursor:"not-allowed"},_hover:_?{}:{bg:"primary.default/8"},_active:_?{}:{bg:"primary.default/15"},_focusVisible:{},onClick:e=>{m(e),null==b||b(),E()},children:S?(0,i.jsx)(c.zQC,{icon:"follow-active",m:"0",fill:v?"onColor.primary":"primary.default"}):(0,i.jsx)(c.zQC,{icon:"follow-default",m:"0",fill:v?"onColor.primary":"neutral.default"})})}},53486:(e,t,n)=>{n.d(t,{n6:()=>_,MC:()=>p.MC,gY:()=>F,G:()=>z,ey:()=>T});var r=n(6029),a=n(87827),i=n(21377),o=n(21501),l=n(99064),s=n(55729),d=n(90248),c=n(494),u=n(62859),f=n(54409),p=n(60988),h=n(41735);let m=h.default.span.withConfig({componentId:"sc-8e60f6ed-0"})(["padding:3px;color:white;font-size:12px;font-weight:600;min-width:44px;border-radius:4px;text-align:center;display:inline-block;background:",";"],e=>e.isWinner?e.theme.colors.secondary.default:e.theme.colors.onSurface.nLv3),g=function(e){let{points:t,isWinner:n,...a}=e;return(0,r.jsx)(m,{isWinner:n,...a,children:"number"==typeof t?"".concat(t," pts"):"-"})};var v=n(8703),x=n(65078),y=n(16620),b=n(48886),j=n(8973),w=n(39969),C=n(13266);let k=(0,h.default)(C.tj).withConfig({componentId:"sc-3f813a14-0"})(["display:block;border-radius:2px;:hover{background:",";}:active{background:",";}"],e=>e.theme.colors.surface.s2,e=>e.theme.colors.surface.s0),S=(0,h.default)(l.$n).withConfig({componentId:"sc-3f813a14-1"})(["display:inline-block;&:hover > *{transform:scale(1.1);}"]);function _(e){let t=(0,s.useRef)(null),n=(0,c.d4)(t=>t.favorites.events[e.event.id],c.bN),[a,i]=(0,x.jr)(n,"homeTeam","awayTeam",n),[l,d]=(0,x.jr)(n,"homeScore","awayScore",n),f=(0,o.ZC)(null==n?void 0:n.status.type);return((0,s.useEffect)(()=>{e.mutate&&f&&(null==n?void 0:n.status.type)&&f!==n.status.type&&e.mutate()},[e.mutate,f,null==n?void 0:n.status.type]),n)?(0,r.jsx)(u.y$.Provider,{value:{event:n,leftTeam:a,rightTeam:i,leftScore:l,rightScore:d},children:(0,r.jsx)(k,{event:n,className:"event-hl-".concat(n.id),onClick:t=>{e.onClick&&e.onClick(t,(null==n?void 0:n.id)||-1,e.isMobile)},children:(0,r.jsx)("div",{ref:t,children:(0,r.jsx)(p.n6,{...e,event:n,location:e.location})})})}):null}let E=()=>{let{event:e,leftTeam:t,rightTeam:n}=(0,s.useContext)(u.y$),{location:a}=(0,p.lv)();return(0,r.jsx)(w.h,{id:e.id,tournament:e.tournament,leftTeam:t,rightTeam:n,type:j.b.Event,location:a})},F=e=>(0,r.jsx)(_,{...e,children:E}),I=e=>{let{referenceId:t,isReferenceTeamId:n}=e,a=(0,x.h2)(t,n),o={background:"onSurface.nLv3",char:"?"};switch(a){case i.h18.Win:o={background:"secondary.default",char:"W"};break;case i.h18.OvertimeLoss:case i.h18.Lose:o={background:"error.default",char:"L"};break;case i.h18.Draw:o={background:"onSurface.nLv3",char:"D"}}return(0,r.jsx)(l.az,{w:24,h:24,br:"50%",bg:o.background,mx:"xs",children:(0,r.jsx)(l.EY,{font:"display.small",color:"onColor.primary",lineHeight:"24px",w:24,align:"center",as:"div",children:o.char})})},P=e=>{let{event:t,leftTeam:n,rightTeam:a}=(0,s.useContext)(u.y$);return[i.XUj.NotStarted,i.XUj.InProgress].includes(t.status.type)?(0,r.jsx)(w.h,{type:j.b.Event,location:j.y.MatchesSection,id:t.id,tournament:t.tournament,leftTeam:n,rightTeam:a}):(0,r.jsx)(I,{...e})},T=e=>{let{referenceId:t,isReferenceTeamId:n,incidentsMap:a,...i}=e;return e=>(0,r.jsx)(_,{incidents:a?a[e.event.id]:void 0,isReferenceTeamId:n,...i,...e,children:()=>(0,r.jsx)(P,{referenceId:t,isReferenceTeamId:n})})},z=e=>{let{rating:t,points:n,player:o,playedFor:c,isOnBench:p,incidents:h,isReferenceTeamId:m}=e;return e=>(0,r.jsx)(_,{incidents:h,entity:i.wNW.Player,...e,isReferenceTeamId:m,children:(0,v.rK)(e.event)?()=>{let{openEventPlayerStatistics:e}=(0,y.d)(),{event:h,leftTeam:m,rightTeam:v}=(0,s.useContext)(u.y$),x=h.status.type,C=h.tournament.category.sport,k=h.winnerCode===i.Jfo.Left?m.id:v.id,_=C.slug===i.QCR.Football,E=C.slug===i.QCR.Basketball,F=C.slug===i.QCR.Volleyball,I=x===i.XUj.NotStarted,P=(E||F)&&void 0!==n,T=!_&&!P;return p&&C.slug===i.QCR.Football?(0,r.jsx)(l.az,{w:"28",h:"28",children:(0,r.jsx)(f.IKQ,{width:24,height:24,fill:"onSurface.nLv3"})}):I?(0,r.jsx)(w.h,{id:h.id,type:j.b.Event,location:j.y.MatchesSection,tournament:h.tournament,leftTeam:m,rightTeam:v}):h.hasEventPlayerStatistics?(0,r.jsxs)(S,{onClickCapture:t=>{t.preventDefault(),t.stopPropagation(),h.hasEventPlayerStatistics&&o&&e({event:h,player:o},b._.EventCell)},variant:T?void 0:"unshielded",colorScheme:T?"secondary":void 0,p:"0",w:P?48:28,h:"28",children:[_&&(0,r.jsx)(a.G,{rating:t}),P&&(0,r.jsx)(g,{points:n,isWinner:k===c}),T&&(0,r.jsx)(f.Abd,{width:24,height:24,fill:"onColor.primary"})]}):(0,r.jsx)(l.so,{w:"28",h:"28",align:"center",justify:"center",children:(0,r.jsx)(l.EY,{font:"assistive.default",color:"onSurface.nLv3",children:(0,r.jsx)(d.A,{id:"N/A"})})})}:null})}},68228:(e,t,n)=>{n.d(t,{u:()=>l});var r=n(6029),a=n(28349),i=n(76356),o=n(10801);function l(e){let{variant:t,children:n,label:l,...s}=e,d=!!(0,o.d)()&&"compact"!==t,c="string"==typeof l;return(0,r.jsxs)(a.$n,{...s,h:"2xl",minW:"2xl",gap:"0",transitionProperty:"padding-inline-start, padding-inline-end, background-color, color, fill",transitionDuration:"normal",transitionTimingFunction:"ease-in-out",variant:d?"filled":"clear",px:d?"md":"0",backgroundColor:{base:d?void 0:"surface.s2",_hover:d?void 0:"primary.highlight"},"aria-label":"string"==typeof l?l:void 0,children:[n,c&&(0,r.jsx)(i.I4.div,{overflow:"hidden",transitionProperty:"grid-template-columns, opacity, margin-left",transitionDuration:"normal",transitionTimingFunction:"ease-in-out",display:"grid",style:{gridTemplateColumns:d?"1fr":"0fr",opacity:+!!d,marginLeft:d?"4px":"0"},children:(0,r.jsx)(i.I4.span,{overflow:"hidden",children:l})})]})}}}]);