!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]="cad7cc73-772b-41f0-ac3b-4b67754edff8",e._sentryDebugIdIdentifier="sentry-dbid-cad7cc73-772b-41f0-ac3b-4b67754edff8")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[31702],{15340:(e,t,n)=>{n.d(t,{w:()=>i,e:()=>m});var r=n(55729);let i=(0,r.createContext)("");var o=n(6029),a=n(947),l=n(494),s=n(73498),d=n(52466),u=n(33398),c=n(95084),p=n(72753),f=n(73559),g=n(62389),h=n(35152);function m(e){let{entity:t,id:n,location:i,type:m,isOnOverlay:x,isDisabled:b,hasNoBorder:v=!1,onClick:y,isNewButton:w}=e,j=(0,l.wA)(),_=(0,a.A)(),{entityStatus:C,wasFollowed:k}=(0,f.e)({entity:t,id:n}),F=(0,l.d4)(p.fg)||b,S=(0,r.useCallback)(()=>{if(!F){if(k){let e=C===p.dE.Favorite?(0,h.Hz)(t):t;j((0,g.q$)(e,n))}else{let e=(0,h.Hz)(t);j((0,g.UQ)(e,n))}(0,c.g2)({id:n,type:m,location:i,isFollowed:!k})}},[k,F,t,n]);return w?(0,o.jsx)(s.u,{disabled:F,variant:k?"compact":"primary",label:_.formatMessage({id:"button_favourite"}),onClick:e=>{e.stopPropagation(),e.preventDefault(),null==y||y(),S()},children:(0,o.jsx)(d.zQC,{icon:k?"follow-active":"follow-default"})}):(0,o.jsx)(u.A,{isFollowed:k,disabled:F,onClick:S,isOnOverlay:x,hasNoBorder:v})}},33398:(e,t,n)=>{n.d(t,{A:()=>a});var r=n(6029),i=n(20325),o=n(52466);function a(e){let{isFollowed:t,disabled:n,onClick:a,isOnOverlay:l,hasNoBorder:s=!1}=e;return(0,r.jsx)(i.I4.button,{border:s?"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:n,_disabled:{opacity:.5,color:"neutral.default",cursor:"not-allowed"},_hover:n?{}:{bg:"primary.default/8"},_active:n?{}:{bg:"primary.default/15"},_focusVisible:{},onClick:e=>{e.stopPropagation(),e.preventDefault(),null==a||a(e)},children:(0,r.jsx)(o.zQC,{icon:t?"follow-active":"follow-default",color:l?"onColor.primary":t?"primary.default":"neutral.default",style:{width:24,height:24}})})}},36882:(e,t,n)=>{n.d(t,{b:()=>r,y:()=>i});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}({}),i=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.Rankings="rankings_page",e.FeaturedTournament="featured_tournament",e.Trending="trending",e}({})},70251:(e,t,n)=>{n.d(t,{h:()=>j,x:()=>F});var r=n(6029),i=n(46787),o=n(51569),a=n(60235),l=n(20325),s=n(55729),d=n(90248),u=n(494),c=n(23240),p=n(62389),f=n(95084),g=n(72753),h=n(52466);let m=e=>{let{image:t,name:n,LinkComponent:i}=e,a=(0,r.jsxs)(l.so,{align:"center",cursor:"pointer",gap:"lg",children:[t,(0,r.jsx)(l.az,{style:{width:"102px"},textAlign:"start",children:(0,r.jsx)(o.EY,{color:"neutrals.nLv1",textStyle:"body.medium",children:n})})]});return(0,r.jsx)(l.az,{my:"md",children:i?(0,r.jsx)(i,{children:a}):a})},x=e=>{let{isEventFollowed:t,entities:n=[],onDeleteClick:i,menuPosition:a,isMenuInverted:s,ref:u}=e,{textDirection:c}=(0,o.$c)(),{isMobile:p}=(0,o.$c)();return"rtl"===c&&(a="right"===a?"left":"right"),(0,r.jsx)(l.az,{ref:u,position:"absolute",w:"[174px]",bg:"surface.s1",elevation:"3",br:"md",py:"sm",zIndex:"popover",style:{...((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%)"}}})(p,a,s),whiteSpace:"normal"},children:t&&i?(0,r.jsxs)(l.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)(h.xV8,{color:"status.error.default",width:24,height:24,mr:"lg"}),(0,r.jsx)(l.az,{style:{width:"102px"},children:(0,r.jsx)(o.EY,{color:"neutrals.nLv1",textStyle:"body.medium",children:(0,r.jsx)(d.A,{id:"remove_from_favourites"})})})]}):(0,r.jsxs)(l.az,{px:"lg",minH:"4xl",children:[(0,r.jsx)(l.az,{textAlign:"start",children:(0,r.jsx)(o.EY,{color:"neutrals.nLv3",textStyle:"assistive.default",pb:"sm",children:(0,r.jsx)(d.A,{id:"favorites.becauseYouFollow"})})}),n.map(e=>(0,r.jsx)(m,{...e},e.entityType+e.id))]})})};var b=n(53594),v=n(33398);let y=e=>{e.stopPropagation(),e.preventDefault()},w=e=>{let{image:t,name:n,LinkComponent:i}=e,a=(0,r.jsxs)(l.so,{align:"center",cursor:"pointer",gap:"lg",children:[t,(0,r.jsx)(o.EY,{display:"block",children:n})]});return(0,r.jsx)(l.az,{my:"md",children:i?(0,r.jsx)(i,{children:a}):a})};function j(e){let{children:t,id:n,leftTeam:h,rightTeam:m,tournament:j,menuPosition:_,isMenuInverted:C,isOnOverlay:k,location:F,type:S,isBottomSheet:E=!1}=e,z=(0,s.useMemo)(()=>(0,b.fB)(),[]),D=(0,s.useMemo)(()=>(0,b.KL)(),[]),P=(0,s.useMemo)(()=>({leftTeam:h,rightTeam:m,tournament:j}),[h.id,m.id,j.id]),A=(0,u.d4)(e=>z(e,n)),M=(0,u.d4)(e=>D(e,P)),q=(0,u.d4)(g.fg),I=A!==g.dE.NotFollowed&&!!A,T=I||!!M.length,{invertedMenu:Y}=(0,c.l)(),H=(0,u.wA)(),N=()=>{H((0,p.q$)(i.bq7.Events,n)),H((0,p.q$)(i.bq7.MutedEvents,n)),(0,f.g2)({id:n,type:S,location:F,isFollowed:!1})},[$,L]=(0,s.useState)(!1),O=(0,s.useCallback)(()=>L(!1),[]),Q=(0,a.jz)(O),U=e=>{y(e),q||(T?I?N():L(e=>!e):(H((0,p.UQ)(i.bq7.Events,n)),(0,f.g2)({id:n,type:S,location:F,isFollowed:!0})))};return(0,r.jsxs)(l.az,{ref:Q,w:"fit",children:["function"==typeof t?t({disabled:q,isFollowed:T,isOnOverlay:k,isOpen:$,onClick:U}):(0,r.jsx)(v.A,{"aria-label":T?"Remove from favourites":"Add to favourites",disabled:q,isFollowed:T,isOnOverlay:k,onClick:U}),T&&$&&!I&&!E&&(0,r.jsx)(x,{isEventFollowed:I,entities:M,menuPosition:_,isMenuInverted:Y||C,onDeleteClick:e=>{y(e),N(),O()}}),(0,r.jsx)(o.Xn,{isOpen:T&&$&&!I&&E,onClose:()=>L(!1),size:"contentFit",title:(0,r.jsx)(d.A,{id:"favorites.becauseYouFollow"}),children:(0,r.jsx)(l.az,{px:"lg",mb:"3xl",children:M.map(e=>(0,r.jsx)(w,{...e},e.entityType+e.id))})})]})}var _=n(18970),C=n(36882),k=n(83677);function F(e){let{id:t,uniqueStage:n,menuPosition:o,location:d,isSubstageCell:h}=e,m=(0,s.useContext)(_.Ws),y=(0,s.useMemo)(()=>(0,b.BD)(),[]),w=(0,s.useMemo)(()=>(0,b.jM)(),[]),j=(0,u.d4)(e=>y(e,t)),F=(0,u.d4)(e=>w(e,null==n?void 0:n.id)),S=(0,u.d4)(g.fg),E=F&&n?(0,k.P3)({uniqueStage:n,sportSlug:m}):void 0,{invertedMenu:z}=(0,c.l)(),D=(0,u.wA)(),[P,A]=(0,s.useState)(!1),M=()=>A(!1),q=(0,a.jz)(M),I=j||F,T=F&&!h;return(0,r.jsxs)(l.az,{ref:q,position:"relative",w:"fit",children:[(0,r.jsx)(v.A,{disabled:S,isFollowed:I,onClick:e=>{e.stopPropagation(),e.preventDefault(),S||(I?A(e=>!e):(D((0,p.UQ)(i.bq7.Stages,t)),(0,f.g2)({id:t,type:h?C.b.Substage:C.b.Stage,location:d,isFollowed:!0})))}}),I&&P&&(0,r.jsx)(x,{entities:E?[E]:void 0,isEventFollowed:j&&!T,menuPosition:o,isMenuInverted:z,onDeleteClick:e=>{e.stopPropagation(),e.preventDefault(),D((0,p.q$)(i.bq7.Stages,t)),(0,f.g2)({id:t,type:h?C.b.Substage:C.b.Stage,location:d,isFollowed:!1}),M()}})]})}},73498:(e,t,n)=>{n.d(t,{u:()=>l});var r=n(6029),i=n(51569),o=n(20325),a=n(85658);function l(e){let{variant:t,children:n,label:l,...s}=e,d=!!(0,a.dw)()&&"compact"!==t,u="string"==typeof l;return(0,r.jsxs)(i.$n,{...s,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":"xs",backgroundColor:{base:d?void 0:"surface.s2",_hover:d?void 0:"primary.highlight"},"aria-label":u?l:void 0,children:[n,u&&(0,r.jsx)(o.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)(o.I4.span,{overflow:"hidden",children:l})})]})}},73559:(e,t,n)=>{n.d(t,{e:()=>o});var r=n(494),i=n(72753);function o(e){let{entity:t,id:n}=e,o=(0,r.d4)(e=>(0,i.SK)(e,t,n),r.bN),a="boolean"==typeof o?o:o!==i.dE.NotFollowed;return{entityStatus:o,wasFollowed:a}}},85658:(e,t,n)=>{n.d(t,{P2:()=>a,dw:()=>l,hD:()=>d});var r=n(6029),i=n(55729);let o=(0,i.createContext)(!1),a=o.Consumer;function l(){return!!(0,i.useContext)(o)}function s(e){let{children:t}=e;return(0,r.jsx)(o,{value:!0,children:t})}function d(e){let{children:t}=e,n=0;return(0,r.jsx)(r.Fragment,{children:i.Children.map(t,e=>e?0==n++?(0,r.jsx)(s,{children:e}):e:null)})}}}]);