!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]="eb0b720e-28c3-434d-8467-627ac9d79a66",e._sentryDebugIdIdentifier="sentry-dbid-eb0b720e-28c3-434d-8467-627ac9d79a66")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3554],{3468:(e,t,l)=>{l.d(t,{C:()=>n});var s=l(55729),r=l(62827);let n=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3e3,t=(0,s.useRef)(!1);return(0,s.useCallback)((l,s)=>{t.current||(t.current=!0,setTimeout(()=>{t.current=!1},e),(0,r.MZ)(l,s))},[])}},3881:(e,t,l)=>{l.d(t,{E:()=>a});var s=l(64082),r=l(6029),n=l(41249),i=l(43451);function a(e){var{height:t=800,width:l="100%",rowHeight:a=45,wrapperStyle:o={},rows:d,animate:c=!1,rowGap:u=8,uniqueKey:x}=e,p=(0,s.T)(e,["height","width","rowHeight","wrapperStyle","rows","animate","rowGap","uniqueKey"]);return 0===t?null:(0,r.jsx)(n.az,Object.assign({maxW:"100%",bg:"surface.s1",overflow:"hidden"},p,{style:o},{children:(0,r.jsx)(i.D,Object.assign({animate:c,width:l,height:d&&a?d*(a+u):t,uniqueKey:x},{children:(0,r.jsx)(r.Fragment,{children:d?Array(d).fill(null).map((e,t)=>(0,r.jsx)("rect",{x:0,y:t*(a+u),width:"100%",height:a},t)):(0,r.jsx)("rect",{x:0,y:0,width:"100%",height:t})})}))}))}},6198:(e,t,l)=>{l.d(t,{iC:()=>eB,GN:()=>tf,Aw:()=>eJ,iy:()=>f,bj:()=>el,ET:()=>eM,Ay:()=>eW});var s=l(6029),r=l(32523),n=l(44194),i=l(76356),a=l(55729),o=l(90248),d=l(90510),c=l(494),u=l(65789),x=l(88339),p=l(41249);function h(e){let{children:t,...l}=e;return(0,s.jsx)(p.so,{direction:"column",gap:"sm",bg:"linear-gradient(180deg, rgba(55, 77, 245, 0.40) 0%, rgba(55, 77, 245, 0.00) 100%)",...l,children:t})}var m=l(70679),g=l(89642),j=l(33752);function f(){let{userId:e,userAccount:t}=(0,a.useContext)(g.t),l=(0,c.d4)(x.$F),r=e===(null==l?void 0:l.id),n=r?null==l?void 0:l.nickname:null==t?void 0:t.nickname;return(0,s.jsx)(i.az,{px:{base:"lg",md:"0"},py:"md",children:(0,s.jsxs)(j.B,{children:[(0,s.jsx)(j.B.Item,{children:(0,s.jsx)(o.A,{id:r?"profile_my_profile":"app.profile"})}),(0,s.jsx)(j.B.Item,{children:n})]})})}var v=l(21377),y=l(947),b=l(54409),_=l(54053),w=l(8476),k=l(76410),A=l(25862),S=l(45860),C=l(41735),E=l(40528),T=l(3468),L=l(52679);let F={[v.lqH.Predictor]:"profile_badge_top_predictor",[v.lqH.Crowdsourcer]:"user_status_contributor",[v.lqH.Editor]:"user_status_editor",[v.lqH.Moderator]:"basic.moderator"},H=e=>{let{badgeType:t,isActive:l,disabled:r,blocked:a,onClick:d}=e,{colors:c}=(0,C.useTheme)(),u=t?F[t]:"profile_badge_selection_no_badge",x=(0,T.C)();return u?(0,s.jsxs)(i.az,{br:"sm",minH:"6xl",position:"relative",onClick:()=>{if(!a)return r?void x((0,s.jsx)(E.y,{font:"display.small",messageId:"profile_badge_toast_message_text"})):d()},border:"1px solid",borderColor:l&&!a?"primary.default":"neutrals.nLv3",bg:{base:l&&!a?"primary.highlight":"surface.s2",_hover:r||a||l?void 0:"surface.s0"},cursor:r||a?"not-allowed":l?void 0:"pointer",children:[(0,s.jsxs)(i.so,{align:"center",justify:"center",direction:"column",gap:"sm",py:"sm",px:"xs",children:[t?(0,s.jsx)(L.A,{userBadge:t,bg:r||a?c.onSurface.nLv3:void 0,size:24}):(0,s.jsx)(b.Cfq,{fill:a?"onSurface.nLv3":"onSurface.nLv2"}),(0,s.jsx)(n.EY,{userSelect:"none",color:r||a?"neutrals.nLv3":"neutrals.nLv1",children:(0,s.jsx)(o.A,{id:u})})]}),l&&(0,s.jsx)(i.az,{position:"absolute",top:"xs",right:"xs",children:(0,s.jsx)(b.sk6,{fill:a?"onSurface.nLv3":"primary.default",isRtlPrevented:!0})})]}):null};function I(e){var t;let{newBadge:l,setNewBadge:r}=e,d=(0,c.d4)(x.$F),u=(null==d?void 0:d.userBadge)===v.lqH.Moderator,{data:p}=(0,S.Ay)(d?v.oJZ.badges(d.id):null),[h,m]=(0,a.useState)(null!=(t=null==d?void 0:d.userBadge)?t:void 0),g=Object.values(v.lqH);return(0,a.useEffect)(()=>{h!==l&&r(h)},[h]),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(i.az,{p:"lg",children:[(0,s.jsx)(n.EY,{display:"block",textStyle:"display.medium",textAlign:"center",color:u?"neutrals.nLv3":"neutrals.nLv1",children:(0,s.jsx)(o.A,{id:"profile_badges"})}),(0,s.jsx)(n.EY,{display:"block",textStyle:"assistive.default",textAlign:"center",color:"neutrals.nLv3",mt:"2xs",children:(0,s.jsx)(o.A,{id:"profile_badges_description"})})]}),(0,s.jsxs)(i.xA,{columns:2,gap:"sm",px:"lg",children:[(0,s.jsx)(H,{onClick:()=>{(null==d?void 0:d.userBadge)===void 0?m(void 0):h&&"no_badge"!==h&&m("no_badge")},isActive:!h||"no_badge"===h,blocked:u}),g.map(e=>(0,s.jsx)(H,{badgeType:e,isActive:h===e,disabled:!(null==p?void 0:p.badges.includes(e)),blocked:u,onClick:()=>m(e)},e))]})]})}function z(e){let{isOpen:t,setIsOpen:l,nickname:r,isChatModerator:d,image:u}=e,h=(0,c.wA)(),g=(0,y.A)(),j=(0,c.d4)(x.$F),[f,v]=(0,a.useState)(null),[S,C]=(0,a.useState)(),[E,T]=(0,a.useState)(null),[F,H]=(0,a.useState)(null),z=(0,c.d4)(x.gw),V=(null==j?void 0:j.providerType)?String(null==j?void 0:j.providerType).charAt(0).toUpperCase()+String(null==j?void 0:j.providerType).slice(1):null;return(0,a.useEffect)(()=>{z===r&&(v(z),l(!1))},[z]),(0,s.jsx)(_.A,{isOpen:t,width:360,setIsOpen:l,renderAdPlaceholder:!1,header:(0,s.jsx)(i.az,{h:"xl"}),footer:(0,s.jsxs)(i.so,{justify:"flex-end",my:"sm",px:"lg",gap:"lg",children:[(0,s.jsx)(n.$n,{variant:"clear",onClick:()=>l(!1),children:(0,s.jsx)(o.A,{id:"basic.cancel"})}),(0,s.jsx)(n.$n,{variant:"filled",onClick:()=>{f&&h((0,w.fV)(f)),E&&h((0,w.bs)(E)),void 0!==S&&(null==j?void 0:j.userBadge)!==S&&(h((0,w.U1)("no_badge"===S?null:S)),(0,k.ke)({action:"change_badge",location:"profile",type:S||"no_badge"})),f===r&&l(!1)},children:(0,s.jsx)(o.A,{id:"basic.save"})})]}),children:(0,s.jsxs)(i.az,{bg:"surface.sp",br:"lg",w:"100%",maxW:"[360px]",pb:"lg",mx:"auto",children:[(0,s.jsxs)(i.so,{direction:"column",align:"center",gap:"md",mb:"lg",p:"lg",children:[(0,s.jsxs)(i.az,{position:"relative",children:[(0,s.jsx)(m.A,{size:150,src:F||u}),(0,s.jsxs)(i.az,{position:"absolute",bottom:"0",right:"0",children:[void 0===S&&(null==j?void 0:j.userBadge)&&(0,s.jsx)(L.A,{userBadge:null==j?void 0:j.userBadge}),S&&"no_badge"!==S&&(0,s.jsx)(L.A,{userBadge:S})]})]}),(0,s.jsxs)(i.I4.label,{cursor:"pointer",children:[(0,s.jsx)(n.EY,{textStyle:"assistive.default",color:"primary.default",p:"xs",cursor:"pointer",children:(0,s.jsx)(o.A,{id:"change_profile_picture"})}),(0,s.jsx)(i.I4.input,{type:"file",accept:"image/*",display:"none",onChange:e=>{if(e.target&&"files"in e.target){var t;let l=null==(t=e.target.files)?void 0:t[0];if(l){if(l.size>5e7)return void h((0,A.aT)({msgId:"profile_image_error_too_large",toastOptions:{autoClose:3e3,closeButton:!0}}));T(l),H(URL.createObjectURL(l))}}}})]})]}),d&&(0,s.jsxs)(i.so,{mb:"lg",mx:"lg",bg:"surface.s2",br:"lg",py:"md",px:"lg",gap:"lg",children:[(0,s.jsx)(i.az,{children:(0,s.jsx)(b.G_L,{fill:"onSurface.nLv3"})}),(0,s.jsx)(n.EY,{color:"neutrals.nLv1",textStyle:"body.small",children:(0,s.jsx)(o.A,{id:"moderators_nickname_edit_restriction"})})]}),(0,s.jsx)(p.pd,{px:"lg",label:(0,s.jsx)(o.A,{id:"nickname_hint"}),value:null===f?r:f,onChange:e=>v(e),disabled:d,maxLength:30}),j&&V&&(0,s.jsxs)(i.so,{py:"xs",px:"lg",align:"center",minH:"3xl",gap:"sm",mb:"sm",children:[(0,s.jsx)(i.az,{w:"lg",h:"lg",children:(0,s.jsx)(b.zzQ,{w:16,h:16,fill:"onSurface.nLv1"})}),(0,s.jsx)(n.EY,{color:"neutrals.nLv3",textStyle:"body.small",lineHeight:1,children:(0,s.jsx)(o.A,{id:"profile_account_creation_info",values:{platformName:V,date:g.formatDate(1e3*j.createdTimestamp,{dateStyle:"medium"})}})})]}),(0,s.jsx)(p.cG,{}),(0,s.jsx)(I,{newBadge:S,setNewBadge:C})]})})}var V=l(76868),M=function(e){return e.Reason="Reason",e.Confirm="Confirm",e}({}),Y=function(e){return e.TooMany="too-many",e.NoValue="no-value",e.SomethingElse="something-else",e}({});function D(e){let{activeStep:t,onClose:l,onContinueClick:r,isContinueDisabled:a,isSubmitDisabled:d}=e;switch(t){case M.Reason:return(0,s.jsxs)(i.so,{justify:"flex-end",m:"lg",children:[(0,s.jsx)(i.az,{hideBelow:"md",children:(0,s.jsx)(n.$n,{type:"button",variant:"clear",onClick:l,children:(0,s.jsx)(o.A,{id:"close"})},"close")}),(0,s.jsx)(n.$n,{type:"button",variant:"filled",onClick:r,disabled:a,ml:"lg",children:(0,s.jsx)(o.A,{id:"basic.continue"})},"continue")]});case M.Confirm:return(0,s.jsxs)(i.so,{gap:"lg",wrap:"wrap",justify:"flex-end",m:"lg",children:[(0,s.jsx)(i.az,{hideBelow:"md",children:(0,s.jsx)(n.$n,{type:"button",variant:"clear",onClick:l,children:(0,s.jsx)(o.A,{id:"button_not_delete"})},"not-delete")}),(0,s.jsx)(n.$n,{type:"submit",variant:"filled",disabled:d,children:(0,s.jsx)(o.A,{id:"user.confirmDelete"})},"submit")]});default:return null}}function O(e){let{activeStep:t}=e;return(0,s.jsxs)(i.az,{md:{px:"lg",pb:"sm",pt:"lg"},children:[t===M.Reason&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.EY,{display:"block",color:"neutrals.nLv1",textStyle:"display.large",children:(0,s.jsx)(o.A,{id:"delete_account_main_reason"})}),(0,s.jsx)(n.EY,{textStyle:"assistive.default",color:"neutrals.nLv3",children:(0,s.jsx)(o.A,{id:"select_one"})})]}),t===M.Confirm&&(0,s.jsx)(n.EY,{color:"neutrals.nLv1",textStyle:"display.large",children:(0,s.jsx)(o.A,{id:"user.deleteAccount"})})]})}function W(e){let{options:t,currentValue:l,onChange:r}=e,n=(0,y.A)();return(0,s.jsx)(s.Fragment,{children:t.map(e=>(0,s.jsx)(p.a,{id:e.value,name:"delete-reason",label:n.formatMessage({id:e.label}),value:e.value,checked:l===e.value,onChange:()=>r(e),gap:"lg",py:"md",px:"lg"},e.value))})}let B={[Y.NoValue]:"too_many_accounts",[Y.TooMany]:"dont_see_value",[Y.SomethingElse]:"something_else"};function P(e){let{isOpen:t,setIsOpen:l}=e,r=(0,y.A)(),o=(0,c.wA)(),d=(0,c.d4)(x.Cd),[u,p]=(0,a.useState)(M.Reason),[h,m]=(0,a.useState)(!1),[g,j]=(0,a.useState)(""),[f,b]=(0,a.useState)(""),A=g===Y.SomethingElse&&!f;(0,a.useEffect)(()=>{t&&(0,k.Ex)({source:"other",type:"delete_account"})},[t]);let S=async e=>{e.preventDefault(),m(!0);try{let e=new FormData,t=JSON.stringify({feedback:f,type:1});e.append("payload",t),g===Y.SomethingElse&&f&&d&&await v.QHp.postFeedback(e,d)}finally{(0,k.t9)({source:"other",type:"delete_account",action:"cta_click",choice:B[g]||""}),l(!1),m(!1),o((0,w.mN)())}};return(0,s.jsx)(_.A,{isOpen:t,setIsOpen:l,renderAdPlaceholder:!1,header:(0,s.jsx)(O,{activeStep:u}),footer:null,children:(0,s.jsxs)("form",{method:"post",onSubmit:S,children:[(0,s.jsxs)(i.az,{w:{md:"[400px]"},mx:"auto",children:[u===M.Reason&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(W,{options:[{label:"delete_account_reason_too_many",value:Y.TooMany},{label:"delete_account_reason_no_value",value:Y.NoValue},{label:"delete_account_reason_something",value:Y.SomethingElse}],onChange:e=>j(e.value),currentValue:g}),g===Y.SomethingElse&&(0,s.jsxs)(i.az,{mx:"lg",mb:{mdDown:"lg"},children:[(0,s.jsx)(n.fs,{name:"delete-reason",label:r.formatMessage({id:"hint_text_field"}),maxLength:300,minLength:1,height:"10xl",value:f,onChange:e=>b(e),resize:!1}),(0,s.jsxs)(n.EY,{display:"block",mt:"2xs",textStyle:"assistive.default",color:"neutrals.nLv3",textAlign:"right",children:[f.length,"/",300]})]})]}),u===M.Confirm&&(0,s.jsx)(V.p,{graphic:"chat",titleMessageId:"delete_account_offboarding_title",descriptionMessageId:"delete_account_offboarding_description"})]}),(0,s.jsx)(D,{activeStep:u,onContinueClick:()=>p(M.Confirm),onClose:()=>{l(!1),(0,k.t9)({source:"other",type:"delete_account",action:"close"})},isContinueDisabled:!g||A,isSubmitDisabled:h})]})})}let R=e=>{let{onClick:t,children:l}=e;return(0,s.jsx)(i.so,{h:"4xl",gap:"lg",px:"lg",align:"center",bg:{_hover:"surface.s2"},cursor:"pointer",onClick:t,children:l})},U=e=>{let{onModalToggle:t}=e,l=(0,c.wA)(),[r,d]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{t(r)},[r]),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(i.az,{py:"sm",children:[(0,s.jsxs)(R,{onClick:()=>l((0,A.aS)()),children:[(0,s.jsx)(b.EwR,{w:24,h:24,fill:"onSurface.nLv3"}),(0,s.jsx)(n.EY,{textStyle:"body.medium",color:"neutrals.nLv1",children:(0,s.jsx)(o.A,{id:"user.signOut"})})]}),(0,s.jsxs)(R,{onClick:()=>d(!0),children:[(0,s.jsx)(b.xV8,{w:24,h:24,fill:"error.default"}),(0,s.jsx)(n.EY,{textStyle:"body.medium",color:"status.error.default",children:(0,s.jsx)(o.A,{id:"user.deleteAccount"})})]})]}),(0,s.jsx)(P,{isOpen:r,setIsOpen:d})]})};function Z(){let[e,t]=(0,a.useState)(!1),[l,r]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{t(l)},[l]),(0,s.jsx)(p.AM,{trigger:(0,s.jsx)(p.AM.TriggerWrapper,{children:(0,s.jsx)(i.az,{p:"2xs",w:"[28px]",h:"[28px]",children:(0,s.jsx)(b.Hop,{fill:"primary.default",w:24,h:24})})}),controls:[e,t],closeOnOutsideClick:!l,children:(0,s.jsx)(p.AM.Content,{right:0,minW:180,p:0,elevation:3,br:"lg",children:(0,s.jsx)(U,{onModalToggle:e=>r(e)})})})}var K=l(62827);function $(e){let{userId:t}=e,{isMobile:l}=(0,n.$c)(),[r,d]=(0,a.useState)(!1),c=window.location.origin+v.oJZ.profile(t),u=(0,a.useCallback)(async()=>{!r&&(d(!0),setTimeout(()=>{d(!1)},3e3),(0,k.oD)("profile"),l&&navigator.share?navigator.share({title:"Sofascore profile share",url:c}):"writeText"in window.navigator.clipboard&&(await window.navigator.clipboard.writeText(c),(0,K.MZ)((0,s.jsxs)(i.so,{align:"center",children:[(0,s.jsx)(b.G_L,{fill:"surface.s1",mr:"lg"}),(0,s.jsx)(n.EY,{display:"block",color:"surface.s1",textStyle:"display.small",children:(0,s.jsx)(o.A,{id:"basic.copiedToClipboard"})})]}))))},[l,r]);return(0,s.jsx)(n.K0,{onClick:u,variant:"clear",size:"primary",children:(0,s.jsx)(b.VJ,{fill:"primary.default",isRtlPrevented:!0})})}function q(){let e=(0,c.d4)(x.$F),{userAccount:t}=(0,a.useContext)(g.t),[l,r]=(0,a.useState)(!1),d=(null==e?void 0:e.id)===(null==t?void 0:t.id);return t&&e?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(i.so,{gap:"sm",align:"center",children:[d&&(0,s.jsx)(n.$n,{variant:"outline",size:"tertiary",onClick:()=>r(!l),children:(0,s.jsx)(n.EY,{color:"primary.default",textStyle:"assistive.default",children:(0,s.jsx)(o.A,{id:"edit"})})}),(0,s.jsx)($,{userId:t.id}),d&&(0,s.jsx)(Z,{})]}),d&&(0,s.jsx)(z,{isOpen:l,setIsOpen:r,nickname:e.nickname,isChatModerator:e.userBadge===v.lqH.Moderator,image:e.imageURL})]}):null}let N={[v.lqH.Predictor]:{title:"profile_badge_top_predictor_info",text:"profile_badge_top_predictor_info_description"},[v.lqH.Editor]:{title:"editor_badge_title",text:"editor_badge_text"},[v.lqH.Crowdsourcer]:{title:"contributor_badge_title",text:"contributor_badge_text"},[v.lqH.Moderator]:{title:"moderator_badge_title",text:"moderator_badge_text"}};function G(e){let{isOpen:t,setIsOpen:l,userBadge:r}=e,a=(0,c.d4)(x.$F),{title:d,text:u}=N[r]||{};return(0,s.jsx)(_.A,{isOpen:t,setIsOpen:l,renderAdPlaceholder:!1,header:(0,s.jsx)(i.az,{m:"lg",mt:["sm","lg"],children:(0,s.jsx)(n.EY,{textStyle:"display.large",children:d&&(0,s.jsx)(o.A,{id:d})})}),footer:null,children:(0,s.jsxs)(i.so,{direction:"column",px:"lg",py:"sm",gap:"xl",maxW:{md:"[350px]"},children:[(0,s.jsx)(i.so,{justify:"center",children:(0,s.jsx)(L.A,{userBadge:r})}),(0,s.jsx)(n.EY,{textStyle:"body.mediumParagraph",children:u&&(0,s.jsx)(o.A,{id:u})}),!(null==a?void 0:a.editor)&&r===v.lqH.Editor&&(0,s.jsxs)(n.Mz,{w:"fit",href:"https://torneo.sofascore.com",target:"_blank",rel:"noreferrer",children:[(0,s.jsx)(n.EY,{textStyle:"display.small",color:"primary.default",mr:"xs",userSelect:"none",children:(0,s.jsx)(o.A,{id:"editor_badge_cta_link"})}),(0,s.jsx)(b.HW5,{})]}),(0,s.jsx)(i.so,{justify:"center",mb:"xl",children:(0,s.jsx)(n.$n,{w:"100%",onClick:()=>l(!1),children:(0,s.jsx)(o.A,{id:"got_it_button"})})})]})})}let J={[v.lqH.Moderator]:"basic.moderator",[v.lqH.Predictor]:"profile_badge_top_predictor",[v.lqH.Editor]:"user_status_editor",[v.lqH.Crowdsourcer]:"user_status_contributor"};function Q(e){let{userAccount:t,...l}=e,r=J[t.userBadge];return r?(0,s.jsx)(n.EY,{...l,children:(0,s.jsx)(o.A,{id:r})}):null}function X(e){let{userAccount:t}=e,[l,r]=(0,a.useState)(!1);return Object.values(v.lqH).includes(t.userBadge)?(0,s.jsxs)(i.so,{py:"xs",px:"sm",br:"xl",gap:"xs",bg:{base:"surface.s0",_hover:"surface.s1"},role:"button",cursor:"pointer",w:"fit",onClick:()=>r(!0),children:[(0,s.jsx)(L.A,{userBadge:t.userBadge,size:16}),(0,s.jsx)(Q,{userAccount:t,textStyle:"assistive.default",color:"neutrals.nLv1"}),(0,s.jsx)(G,{isOpen:l,setIsOpen:r,userBadge:t.userBadge})]}):(0,s.jsx)(i.az,{w:"lg"})}function ee(e){let{userAccount:t}=e,l=t.userBadge===v.lqH.Moderator,r=t.userBadge===v.lqH.Editor&&t.editor;return(0,s.jsxs)(i.az,{overflow:"hidden",children:[(0,s.jsx)(n.EY,{color:"neutrals.nLv1",textStyle:"display.large",lineClamp:2,overflowWrap:"anywhere",title:t.nickname,children:t.nickname}),!l&&r&&(0,s.jsx)(n.EY,{display:"block",mt:"2xs",color:"neutrals.nLv1",textStyle:"assistive.default",title:t.editorName,truncate:!0,children:t.editorName})]})}function et(e){let{children:t}=e,{isMobile:l}=(0,n.$c)();return(0,s.jsx)(u.HH,{isCard:!l,children:(0,s.jsx)(i.az,{bg:{mdDown:"surface.s1"},children:t})})}let el=()=>{let e=(0,c.d4)(x.$F),{userAccount:t,isUserLoading:l}=(0,a.useContext)(g.t),{isMobile:u}=(0,n.$c)();if(l)return(0,s.jsx)(r.E,{uniqueKey:"user-account-info-cl",h:[270,838],br:[void 0,"lg"]});if(!t)return null;let p=(null==e?void 0:e.id)===t.id?e:t;return(0,s.jsx)(et,{children:(0,s.jsxs)(h,{pt:[0,"lg"],pb:"sm",br:[0,"xl"],children:[u&&(0,s.jsx)(f,{}),(0,s.jsxs)(i.so,{justify:"space-between",align:"center",mx:"lg",children:[(0,s.jsx)(X,{userAccount:p}),(0,s.jsxs)(n.EY,{textStyle:"assistive.micro",children:[(0,s.jsx)(o.A,{id:"profile.joinDate"})," ",(0,s.jsx)(d.XU,{value:1e3*p.createdTimestamp})]})]}),(0,s.jsx)(i.so,{h:"[110px]",py:"xs",justify:"center",align:"center",children:(0,s.jsx)(m.A,{src:p.imageURL,size:102})}),(0,s.jsxs)(i.so,{justify:"space-between",align:"center",minH:"[60px]",px:"lg",gap:"lg",children:[(0,s.jsx)(ee,{userAccount:p}),(0,s.jsx)(q,{})]})]})})};var es=l(22648),er=l(37567),en=l(4967),ei=l(93338),ea=l(47146);let eo=(0,a.createContext)(null),ed=()=>{let e=(0,a.useContext)(eo);if(!e)throw Error("usePredictionsContext must be used within an PredictionsContextProvider");return e};var ec=l(70591),eu=l(23419),ex=l(94604),ep=l(49519);function eh(e){let{teamId:t,teamName:l,teamType:r,alpha2:n}=e;return r===v.YVh.Person?(0,s.jsx)(ep.w,{size:16,name:l,alt:l,alpha2:n,fallback:(0,s.jsx)(p._V,{src:"/static/images/placeholders/team.svg",width:16,height:16,alt:l})}):r===v.YVh.Regular?(0,s.jsx)(ep.p,{id:t,size:16,alt:l,isSmall:!0}):null}var em=l(75791),eg=l(2294),ej=l(98516),ef=l(62121);let ev=e=>{let{event:t,voteType:l,location:r}=e,[d,c]=(0,a.useState)(!1);return(0,s.jsxs)(i.so,{gap:"sm",children:[(0,s.jsx)(p.cG,{vertical:!0}),(0,s.jsx)(n.K0,{variant:"clear",onClick:()=>c(!0),children:(0,s.jsx)(b.GI1,{w:"24",h:"24",fill:"primary.default"})}),(0,s.jsx)(n.aF,{isOpen:d,children:(0,s.jsxs)(i.az,{w:"[312px]",bg:"surface.sp",p:"lg",br:"lg",elevation:"3",mx:"auto",children:[(0,s.jsx)(n.EY,{textStyle:"display.large",color:"neutrals.nLv1",lineHeight:"24px",mb:"sm",display:"block",children:(0,s.jsx)(o.A,{id:"profile.changeVoteTooltipDescription"})}),(0,s.jsx)(n.EY,{textStyle:"body.medium",color:"neutrals.nLv1",display:"block",children:(0,s.jsx)(o.A,{id:"change_vote_watch_ad"})}),(0,s.jsxs)(i.so,{justify:"flex-end",mt:"xl",children:[(0,s.jsx)(n.$n,{variant:"clear",onClick:()=>c(!1),children:(0,s.jsx)(o.A,{id:"close_window_button"})}),(0,s.jsx)(ec.tj,{event:t,params:{editVote:"true",voteType:l},children:(0,s.jsx)(n.$n,{variant:"clear",onClick:()=>{(0,k.tN)({type:ef._7[l],location:r,id:t.id,position:(0,ef.mt)(l)||""})},children:(0,s.jsx)(o.A,{id:"pickem.continue"})})})]})]})})]})},ey={[v.rjx.WhoWillWin]:"who_will_win",[v.rjx.FirstTeamToScore]:"who_will_score_first_title",[v.rjx.WillBothTeamsScore]:"will_both_teams_score_title"};var eb=l(57126);let e_=e=>{let{correct:t,vote:l}=e;return(0,s.jsx)(i.so,{align:"center",justify:"center",mr:"sm",py:"xs",px:"sm",minW:"xl",minH:"xl",br:l.length>1?"md":"50%",bg:1===t?"status.success.default":0===t?"status.error.default":"neutrals.nLv5",children:(0,s.jsx)(n.EY,{color:-1!==t?"surface.s1":"neutrals.nLv1",textStyle:"display.small",textTransform:"uppercase",children:(0,s.jsx)(o.A,{id:l})})})},ew=e=>{let{score:t,votingEnabled:l}=e;return void 0===t?null:(0,s.jsx)(i.az,{minW:"3xl",mr:l?"sm":void 0,children:(0,s.jsxs)(n.Ym,{display:"block",textStyle:"body.small",textAlign:"right",color:t<0?"status.error.default":t>0?"status.success.default":"neutrals.nLv3",children:[t>0?"+":"",(0,ej.M)(t,2)]})})},ek=e=>{let{prediction:t,predictionVote:l,event:r,userId:a,isLastItem:d,isDaily10x:u}=e,p=(0,c.d4)(eg.BF),{location:h,color:m}=ed(),{correct:g,odds:j,voteType:f}=l,y=function(e,t){let l=(0,c.d4)(eb.xl);if(!l)return t;switch(t){case v.gbi.One:return e.homeNameCode;case v.gbi.Two:return e.awayNameCode;case v.gbi.X:return"Tie";default:return t}}(t,l.vote),_=(0,c.d4)(x.$F),w=ey[f],k=1e3*r.startTimestamp>Date.now()&&r.status.type===v.XUj.NotStarted,A=u&&0!==g;return(0,s.jsxs)(i.so,{justify:"space-between",align:"center",minH:"[44px]",px:"lg",pb:"xs",roundedBottom:d?"lg":void 0,style:{backgroundColor:ei.S.var("colors.".concat(m.card))},children:[(0,s.jsxs)(i.so,{align:"center",gap:"sm",children:[A&&(0,s.jsx)(b.W84,{width:18,height:18}),(0,s.jsx)(n.EY,{textStyle:"body.small",color:"neutrals.nLv1",fontWeight:A?"bold":void 0,children:w&&(0,s.jsx)(o.A,{id:w})})]}),(0,s.jsxs)(i.so,{align:"center",children:[(0,s.jsx)(e_,{correct:g,vote:y}),"weekly_challenge"===h&&(0,s.jsx)(ew,{score:l.score,votingEnabled:k}),"predictions"===h&&!p&&(0,s.jsx)(em.c,{fractionalValue:j.fractionalValue,children:e=>(0,s.jsx)(n.EY,{textAlign:"center",minW:"4xl",color:"-"!==j.fractionalValue?"secondary.default":"neutrals.nLv3",textStyle:"table.medium",children:e})}),k&&!(0,K.ux)(r)&&(null==_?void 0:_.id)===a&&(0,s.jsx)(ev,{event:r,voteType:f,location:h})]})]})};function eA(e,t,l){let s=(0,c.d4)(eb.xl),r=e.displayInverseHomeAwayTeams&&s,[n,i]=[e[t],e[l]];return r?[i,n]:[n,i]}function eS(e){let{prediction:t,userId:l}=e,r={id:t.eventId,slug:t.eventSlug,customId:t.customId,status:t.status,startTimestamp:t.startDateTimestamp,finalResultOnly:t.finalResultOnly,tournament:{category:{sport:{slug:t.sportSlug}}}},[o,c]=eA(t,"homeTeamId","awayTeamId"),[u,x]=eA(t,"homeTeamName","awayTeamName"),[h,m]=eA(t,"homeTeamType","awayTeamType"),[g,j]=eA(t,"homeTeamAlpha2","awayTeamAlpha2"),{color:f}=ed(),y=(0,a.useContext)(eu.k);return(0,s.jsxs)(i.az,{mx:"sm",children:[(0,s.jsx)(i.az,{h:"[44px]",roundedTop:"lg",bg:{_hover:"neutrals.nLv4"},children:(0,s.jsx)(ec.tj,{event:r,children:(0,s.jsxs)(i.so,{h:"[44px]",px:"lg",pt:"xs",roundedTop:"lg",align:"center",justify:"space-between",style:{backgroundColor:ei.S.var("colors.".concat(f.card))},children:[(0,s.jsxs)(i.so,{grow:1,basis:"[0px]",align:"center",gap:["xs","sm"],minW:"[0px]",children:[(0,s.jsx)(eh,{teamId:o,teamName:u,teamType:h,alpha2:g}),(0,s.jsx)(n.EY,{color:"neutrals.nLv1",textStyle:"display.micro",textAlign:"center",display:"block",truncate:!0,children:(0,s.jsx)(ex.lC,{original:u})})]}),(0,s.jsx)(n.EY,{color:"neutrals.nLv3",textStyle:"body.small",mx:"sm",children:(0,s.jsx)(d.ib,{value:1e3*t.startDateTimestamp})}),(0,s.jsxs)(i.so,{grow:1,basis:"[0px]",align:"center",gap:["xs","sm"],minW:"[0px]",justify:"flex-end",children:[(0,s.jsx)(n.EY,{color:"neutrals.nLv1",textStyle:"display.micro",textAlign:"center",display:"block",truncate:!0,children:(0,s.jsx)(ex.lC,{original:x})}),(0,s.jsx)(eh,{teamId:c,teamName:x,teamType:m,alpha2:j})]})]})})}),(0,s.jsx)(i.az,{style:{backgroundColor:ei.S.var("colors.".concat(f.bg))},children:(0,s.jsx)(p.cG,{})}),[v.rjx.WhoWillWin,v.rjx.WillBothTeamsScore,v.rjx.FirstTeamToScore].map(e=>({voteType:e,predictionVote:t.votes.find(t=>t.voteType===e)})).filter(e=>{let{predictionVote:t}=e;return!!t}).map((e,n,i)=>{let{voteType:a,predictionVote:o}=e;return(0,s.jsx)(ek,{prediction:t,predictionVote:o,event:r,userId:l,isLastItem:n===i.length-1,isDaily10x:!!y&&!!(null==o?void 0:o.weeklyChallengeBonusDateTimestamp)},a)})]})}var eC=l(12047);let eE=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:48,{isBottomSheet:t}=ed(),{isDesktop:l}=(0,n.$c)(),s=(0,eC.Ay)({isInMobileTabs:!1,isSportMenuVisible:!1});return t?e:l?0:s+48+e},eT=e=>{let{userId:t,predictions:l,date:r}=e,{color:a,location:c,activeTab:u}=ed(),x=eE(),{isDesktop:h}=(0,n.$c)(),m=new Date,g=new Date(1e3*l[0].startDateTimestamp).setHours(m.getHours(),m.getMinutes(),m.getSeconds(),m.getMilliseconds());return(0,s.jsxs)(i.so,{direction:"column",children:[(0,s.jsx)(p.PI,{isStickingDisabled:h,zIndex:p.Py.Sticky-2,top:x,mt:"md",children:(0,s.jsxs)(i.so,{align:"center",px:"xl",py:"md",style:{backgroundColor:ei.S.var("colors.".concat(a.bg))},children:[(0,s.jsx)(ea.v,{timestamp:g,children:e=>{let t=(0,en.Ui)(new Date(r).setHours(0,0,0,0),new Date().setHours(0,0,0,0),"days");return t>-2&&t<2?(0,s.jsxs)(n.EY,{color:"neutrals.nLv1",textStyle:"assistive.default",textTransform:"capitalize",children:[e+",","\xa0"]}):null}}),(0,s.jsx)(n.EY,{color:"neutrals.nLv1",textStyle:"assistive.default",children:(0,s.jsx)(d.XU,{value:g,weekday:"short",day:"numeric",month:"numeric"})}),(0,s.jsx)(n.EY,{color:"neutrals.nLv3",textStyle:"body.small",ml:"auto",children:(0,s.jsx)(o.A,{id:"basic.nEvents",values:{n:l.length}})})]})}),(0,s.jsx)(i.so,{direction:"column",gap:{base:"sm",md:"predictions"===c?"md":"sm"},children:l.map(e=>(0,s.jsx)(eS,{userId:t,prediction:e},"".concat(e.eventId,"-").concat(u)))})]})};var eL=l(25442),eF=l(43072),eH=l(7643);let eI=(e,t)=>e.sort((e,l)=>t?e.startDateTimestamp-l.startDateTimestamp:l.startDateTimestamp-e.startDateTimestamp).reduce((e,t)=>{let l=new Date(1e3*t.startDateTimestamp).toDateString();return e[l]?e[l].push(t):e[l]=[t],e},[]),ez=e=>{let{userId:t,leaderboardId:l}=e,r=(0,c.wA)(),{activeTab:n}=ed(),{predictions:o,hasMore:d,error:u,isLoading:h,isValidating:m,triggerRef:g,setSize:j}=function(e,t){var l;let{activeTab:s,location:r}=ed(),{ref:n,inView:i}=(0,eF.Wx)(),o=s===eL.H.Finished,{data:d,size:c,setSize:u,isLoading:x,isValidating:p,error:h}=(0,eH.Ay)((l,s)=>{let n=null;return"weekly_challenge"===r&&t&&(n=v.rGM.predictions(t,e,o,l)),"predictions"===r&&(n=v.VfS.predictions(e,o,l)),0===l||(null==s?void 0:s.hasNextPage)?n:null},v.TtD),m=d||[],g=!!m.length&&(null==(l=m[c-1])?void 0:l.hasNextPage),j=m.reduce((e,t)=>[...e,...t.predictions],[]);return(0,a.useEffect)(()=>{i&&g&&!p&&u(e=>e+1)},[i]),{predictions:j,hasMore:g,isLoading:x,isValidating:p,error:h,triggerRef:n,setSize:u}}(t,l),f=(0,c.d4)(x.$F),y=n===eL.H.Finished,b=(0,a.useCallback)(()=>{o&&(null==f?void 0:f.id)===t&&r((0,er.UU)({predictions:o}))},[o]);if((0,a.useEffect)(()=>{b()},[o]),(0,a.useEffect)(()=>{j(1),b()},[n]),u||o&&!o.length&&!h){let e=n===eL.H.Finished?"weekly_challenge_finished_empty":"weekly_challenge_active_empty";return(0,s.jsx)(V.p,{graphic:"predictions-1x2",descriptionMessageId:e,m:"lg auto",px:"md",h:284,maxW:300})}if(o&&o.length){let e=eI(o,!y);return(0,s.jsxs)(s.Fragment,{children:[Object.keys(e).map(l=>(0,s.jsx)(eT,{userId:t,date:l,predictions:e[l]},l)),(d||m)&&(0,s.jsx)(i.so,{justify:"center",children:(0,s.jsx)(i.az,{ref:g,py:"lg",children:(0,s.jsx)(es.a,{})})})]})}return(0,s.jsx)(i.so,{justify:"center",h:"[600px]",py:"lg",children:(0,s.jsx)(p.y$,{})})},eV=e=>{let{children:t,...l}=e,{isMobile:r}=(0,n.$c)(),{activeTab:d,setActiveTab:c,isBottomSheet:u,location:x,bottomSheetRef:h,color:m}=ed(),g=(0,a.useRef)(null),j=eE(0);return r&&"predictions"===x?(0,s.jsx)(s.Fragment,{children:t}):(0,s.jsxs)(i.so,{direction:"column",pb:{base:"sm",md:"sm"},mb:{mdDown:"md"},style:{backgroundColor:ei.S.var("colors.".concat(m.bg))},...l,children:[!u&&(0,s.jsx)(i.az,{ref:g,style:{height:40},children:(0,s.jsx)(n.EY,{display:"block",textAlign:"center",color:"neutrals.nLv1",lineHeight:"24px",textStyle:"display.medium",pt:"md",pb:"xs",children:(0,s.jsx)(o.A,{id:"weekly_challenge"===x?"weekly_challenge_votes_this_week":"predictions"})})}),(0,s.jsx)(i.so,{align:"center",p:"sm",position:"sticky",zIndex:"sticky",style:{backgroundColor:ei.S.var("colors.".concat(m.bg)),height:48,top:j},children:(0,s.jsxs)(p.tU,{variant:"tertiary",initialValue:eL.H.Upcoming,value:d,onChange:e=>{c(e),u&&(null==h?void 0:h.current)&&h.current.scrollTo({top:0}),r&&!u&&g.current&&g.current.getBoundingClientRect().y-j<0&&window.scrollTo({top:g.current.offsetTop-j-40})},children:[(0,s.jsx)(p.tU.Tab,{tabKey:eL.H.Upcoming,children:(0,s.jsx)(o.A,{id:"chip_active"})}),(0,s.jsx)(p.tU.Tab,{tabKey:eL.H.Finished,children:(0,s.jsx)(o.A,{id:"finished"})})]})}),t]})},eM=e=>{let{activeTab:t,setActiveTab:l}=e,{isMobile:i}=(0,n.$c)(),{userAccount:o,isUserLoading:d}=(0,a.useContext)(g.t);return(0,s.jsx)(eo.Provider,{value:{activeTab:t,setActiveTab:l,location:"predictions",color:{bg:i?"surface.s0":"surface.s1",card:i?"surface.s1":"surface.s2"}},children:(0,s.jsx)(eV,{bg:i?"surface.s0":void 0,pb:"sm",br:{md:"xl"},children:d?(0,s.jsx)(r.E,{uniqueKey:"user-predictions-cl"}):o&&(0,s.jsx)(ez,{userId:o.id})})})};var eY=l(78383),eD=l.n(eY),eO=l(86501);function eW(){let[e,t]=(0,a.useState)(eL.H.Upcoming),l=(0,eC.Ay)({isInMobileTabs:!0,isSportMenuVisible:!1});return(0,s.jsxs)(p.tU,{onChange:l=>{e!==l&&(t(l),window.scrollTo({left:0,top:0}))},initialValue:eL.H.Upcoming,value:e,variant:"secondary",children:[(0,s.jsxs)(p.PI,{zIndex:p.Py.Sticky-1,bg:"surface.s1",p:"sm",h:48,top:l,children:[(0,s.jsx)(p.tU.Tab,{tabKey:eL.H.Upcoming,children:(0,s.jsx)(o.A,{id:"chip_active"})}),(0,s.jsx)(p.tU.Tab,{tabKey:eL.H.Finished,children:(0,s.jsx)(o.A,{id:"finished"})}),(0,s.jsx)(p.tU.Tab,{tabKey:eL.H.Statistics,children:(0,s.jsx)(o.A,{id:"statistics"})})]}),(0,s.jsx)(p.tU.Panel,{tabKey:eL.H.Upcoming,children:(0,s.jsx)(eM,{activeTab:e,setActiveTab:eD()})}),(0,s.jsx)(p.tU.Panel,{tabKey:eL.H.Finished,children:(0,s.jsx)(eM,{activeTab:e,setActiveTab:eD()})}),(0,s.jsx)(p.tU.Panel,{tabKey:eL.H.Statistics,children:(0,s.jsx)(eO._,{})})]})}function eB(e){let{isBottomSheet:t,bottomSheetRef:l}=e,r=(0,c.d4)(x.$F),[n,i]=(0,a.useState)(eL.H.Upcoming);return(null==r?void 0:r.id)&&(null==r?void 0:r.leaderboardId)?(0,s.jsx)(eo.Provider,{value:{activeTab:n,setActiveTab:i,location:"weekly_challenge",isBottomSheet:t,bottomSheetRef:l,color:{bg:t?"surface.sp":"surface.s1",card:"surface.s2"}},children:(0,s.jsx)(eV,{br:{md:"xl"},elevation:{md:"2"},children:(0,s.jsx)(ez,{userId:r.id,leaderboardId:r.leaderboardId})})}):null}var eP=l(67333),eR=l(41007),eU=l(47550),eZ=l(28157),eK=l(19451),e$=l(70355);let eq=e=>{let{textId:t,routeName:l,eventType:r,icon:n}=e;return(0,s.jsx)(ec.N_,{routeKey:e$.UE[l],children:(0,s.jsxs)(p.so,{h:48,align:"center",justify:"space-between",px:"lg",py:"md",onClick:()=>(0,k.Wk)({type:r,location:"profile"}),children:[(0,s.jsxs)(p.so,{gap:"lg",align:"center",children:[n,(0,s.jsx)(p.EY,{as:"div",children:(0,s.jsx)(o.A,{id:t})})]}),(0,s.jsx)(b.zQC,{width:24,height:24,icon:"chevron-right",fill:"primary.default"})]})})};function eN(){return(0,s.jsxs)(u.Zp,{children:[(0,s.jsx)(u.Zp.Header,{titleId:"leaderboards_title"}),(0,s.jsx)(eq,{textId:"topPredictors",routeName:eK.xW.TopPredictors,eventType:"top_predictors",icon:(0,s.jsx)(b.nJv,{fill:"onSurface.nLv1",isRtlPrevented:!0})}),(0,s.jsx)(eq,{textId:"top_contributors_leaderboard",routeName:eK.xW.TopContributors,eventType:"top_contributors",icon:(0,s.jsx)(b.M_r,{fill:"onSurface.nLv1",isRtlPrevented:!0})}),(0,s.jsx)(eq,{textId:"top_editors_leaderboard",routeName:eK.xW.TopEditors,eventType:"top_editors",icon:(0,s.jsx)(b.mTZ,{fill:"onSurface.nLv1",isRtlPrevented:!0})}),(0,s.jsx)(u.Zp.Footer,{defaultHeight:"sm"})]})}var eG=l(55794);function eJ(){let{userId:e}=(0,a.useContext)(g.t);return(0,s.jsxs)(i.so,{direction:"column",gap:"sm",m:"sm",children:[(0,s.jsx)(eZ.A,{}),(0,s.jsx)(eU.pk,{utIds:null}),(0,s.jsx)(eN,{}),(0,s.jsx)(eG.S,{}),(0,s.jsx)(eP.A,{userId:e}),(0,s.jsx)(eR.A,{userId:e})]})}var eQ=l(37377),eX=l(3881),e0=l(33480),e1=l(59721);let e4=e=>{let{managedLeague:t}=e,{uniqueTournament:l}=t;return(0,s.jsx)(ec.tQ,{tournament:l,children:(0,s.jsxs)(i.so,{align:"center",h:"4xl",minW:{md:"[360px]"},px:"lg",gap:"md",cursor:"pointer",bg:{_hover:"neutrals.nLv5"},children:[(0,s.jsx)(e1.e,{size:24,id:l.id}),(0,s.jsx)(n.EY,{display:"block",textStyle:"body.medium",color:"neutrals.nLv1",children:l.name})]})})};function e2(e){let{uniqueTournaments:t,isOpen:l,setIsOpen:r}=e;return(0,s.jsx)(_.A,{header:"profile_edited_competitions",isOpen:l,setIsOpen:r,children:(0,s.jsx)(i.az,{maxH:"[60vh]",children:t.map(e=>(0,s.jsx)(e4,{managedLeague:e},e.uniqueTournament.id))})})}let e3=e=>{let{managedLeague:t}=e,{uniqueTournament:l}=t;return(0,s.jsx)(ec.tQ,{tournament:l,children:(0,s.jsxs)(i.so,{justify:"space-between",align:"center",h:"4xl",px:"lg",cursor:"pointer",bg:{_hover:"neutrals.nLv5"},children:[(0,s.jsxs)(i.so,{gap:"md",align:"center",children:[(0,s.jsx)(e0.e,{size:24,id:l.id}),(0,s.jsx)(n.EY,{display:"block",textStyle:"body.medium",color:"neutrals.nLv1",children:l.name})]}),(0,s.jsx)(b.zQC,{icon:"chevron-right",width:24,height:24,fill:"primary.default"})]})})};function e5(){let{userId:e}=(0,a.useContext)(g.t),{data:t,isLoading:l}=(0,S.Ay)(v.VfS.managedLeagues(e)),[r,d]=(0,a.useState)(!1),c=null==t?void 0:t.uniqueTournaments,x=null==c?void 0:c.filter((e,t,l)=>l.map(e=>e.uniqueTournament.id).indexOf(e.uniqueTournament.id)===t);return l?(0,s.jsx)(eX.E,{uniqueKey:"edited-competitions-cl",h:328,br:"lg"}):(null==x?void 0:x.length)?(0,s.jsxs)(u.Zp,{isInverseDesktop:!0,children:[(0,s.jsx)(u.Zp.Header,{titleId:"profile_edited_competitions"}),null==x?void 0:x.slice(0,5).map(e=>(0,s.jsx)(e3,{managedLeague:e},e.uniqueTournament.id)),x&&x.length>5&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(i.so,{justify:"center",mt:"sm",children:(0,s.jsx)(n.$n,{size:"tertiary",onClick:()=>d(!0),children:(0,s.jsx)(o.A,{id:"see_all"})})}),(0,s.jsx)(e2,{isOpen:r,setIsOpen:d,uniqueTournaments:x})]}),(0,s.jsx)(u.Zp.Footer,{defaultHeight:"sm"})]}):null}var e6=l(75414);let e7=()=>{(0,k.Wk)({type:"top_editors",location:"profile"})};function e9(){return(0,s.jsx)(ec.N_,{routeKey:e$.UE[eK.xW.TopEditors],onClick:e7,children:(0,s.jsxs)(i.so,{align:"center",justify:"space-between",py:"md",px:"lg",gap:"md",cursor:"pointer",bg:{_hover:"neutrals.nLv5"},roundedBottom:"lg",children:[(0,s.jsxs)(i.so,{gap:"md",align:"center",children:[(0,s.jsx)(L.A,{userBadge:v.lqH.Editor,size:24}),(0,s.jsx)(n.EY,{display:"block",textStyle:"body.medium",color:"neutrals.nLv1",userSelect:"none",children:(0,s.jsx)(o.A,{id:"profile_view_top_editors"})})]}),(0,s.jsx)(b.zQC,{icon:"chevron-right",width:24,height:24,fill:"primary.default"})]})})}function e8(e){let{stat:t,titleId:l}=e;return(0,s.jsxs)(i.so,{direction:"column",align:"center",justify:"center",grow:1,w:"1/2",p:"sm",br:"lg",gap:"xs",bg:{md:"surface.s2"},children:[(0,s.jsx)(n.EY,{display:"block",textAlign:"center",textStyle:{base:"display.small",md:"display.medium"},color:"neutrals.nLv1",children:"string"==typeof t?t:(0,e6.A)(+(0,ej.M)(t||0))}),(0,s.jsx)(n.EY,{display:"block",textAlign:"center",textStyle:"assistive.default",color:"neutrals.nLv3",children:(0,s.jsx)(o.A,{id:l})})]})}function te(){let{userAccount:e,isUserLoading:t,userId:l}=(0,a.useContext)(g.t),{data:r,isLoading:n}=(0,S.Ay)(v.VfS.editorEventsCount(l));if(n||t)return(0,s.jsx)(i.so,{justify:"center",py:"lg",h:{base:"[168px]",md:"[124px]"},children:(0,s.jsx)(p.y$,{})});let o=null==e?void 0:e.userEditorScoreAggregates;return o||r?(0,s.jsxs)(i.az,{bg:"surface.s1",elevation:{mdDown:"2"},br:{mdDown:"lg"},children:[(0,s.jsxs)(i.az,{py:{mdDown:"sm"},px:{mdDown:"lg"},children:[(0,s.jsxs)(i.so,{gap:{md:"sm"},mb:{md:"sm"},children:[(0,s.jsx)(e8,{stat:null==r?void 0:r.editedEvents,titleId:"profile_added_matches"}),(0,s.jsx)(e8,{stat:null==r?void 0:r.eventOpenings,titleId:"match_views"})]}),(0,s.jsxs)(i.so,{gap:{md:"sm"},children:[(0,s.jsx)(e8,{stat:(null==o?void 0:o.currentRanking)||"-",titleId:"profile_leaderboard_position"}),(0,s.jsx)(e8,{stat:null==o?void 0:o.score,titleId:"points"})]})]}),(0,s.jsxs)(i.az,{display:["block","none"],children:[(0,s.jsx)(p.cG,{}),(0,s.jsx)(e9,{},l)]})]}):null}var tt=l(21501),tl=l(78488),ts=l(83170),tr=l(28446),tn=l(56591),ti=l(10533),ta=l(71024),to=l.n(ta);let td=to()(()=>l.e(2254).then(l.bind(l,22254)),{loadableGenerated:{webpack:()=>[22254]},loading:()=>(0,s.jsx)(r.E,{uniqueKey:"event-openings-graph-graphic-cl",h:171})}),tc=to()(()=>l.e(4140).then(l.bind(l,94140)),{loadableGenerated:{webpack:()=>[94140]},loading:()=>(0,s.jsx)(r.E,{uniqueKey:"rtl-event-openings-graph-graphic-cl",h:171})});function tu(){let[e,t]=(0,a.useState)(!1),l="rtl"===(0,a.useContext)(C.ThemeContext).settings.textDirection;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(_.A,{header:"monthly_match_views",isOpen:e,setIsOpen:t,children:(0,s.jsxs)(i.az,{w:{base:"100%",md:"[320px]"},px:"lg",children:[(0,s.jsx)(n.EY,{display:"block",textStyle:"body.mediumParagraph",color:"neutrals.nLv1",pb:"lg",children:(0,s.jsx)(o.A,{id:"monthly_match_views_info_bubble"})}),(0,s.jsx)(n.EY,{display:"block",textStyle:"assistive.default",color:"neutral.default",ml:"xl",children:(0,s.jsx)(o.A,{id:"profile_number_of_match_openings"})}),(0,s.jsxs)(i.so,{align:"center",overflow:"hidden",children:[l?(0,s.jsx)(tc,{}):(0,s.jsx)(td,{}),(0,s.jsx)(n.EY,{display:"block",textStyle:"assistive.default",color:"status.val",mt:"sm",children:(0,s.jsx)(o.A,{id:"profile_all_editors_average"})})]}),(0,s.jsx)(n.EY,{display:"block",textStyle:"assistive.default",color:"neutral.default",ml:"[120px]",children:(0,s.jsx)(o.A,{id:"month"})})]})}),(0,s.jsx)(n.K0,{variant:"clear",onClick:()=>t(!0),children:(0,s.jsx)(b.G_L,{fill:"onSurface.nLv3"})})]})}function tx(e){let{points:t,avg:l}=e,{colors:r,typography:n,settings:o}=(0,C.useTheme)(),d="rtl"===o.textDirection,c=(0,y.A)(),u=(0,a.useRef)(null),x=new Date,p=new Date(x.getFullYear(),x.getMonth()-6+1,1),h=function(e,t){let l=new Date;if(!t)return[e,l].map(e=>({date:e,score:0}));let s=(0,en.ZV)(e),r=Object.keys(t).map(e=>+e),n=Math.min(...r),i=r.filter(e=>e>=s).map(e=>({date:(0,en.pp)(e),score:t[e]}));if(!i.find(t=>t.date===e)){let l=r.findIndex(e=>e>s),n=t[r[l-1]];n&&i.unshift({date:e,score:n})}return n>s&&(i.unshift({date:(0,en.pp)(n-86400),score:0}),i.unshift({date:e,score:0})),i}(p,t),m=[p,x],g=Math.ceil(Math.max(...h.map(e=>e.score))),j=[0,.33*g,.66*g,g],f=l>g,v={left:d?16:36,right:d?36:16,top:f?26:16,bottom:36};return(0,tt.st)(()=>{var e;if(!u.current)return;(0,tn.A)(u.current).selectAll("*").remove();let t=(0,tn.A)(u.current).append("svg").attr("width","100%").attr("height",116+v.bottom+v.top),s=null==(e=t.node())?void 0:e.getBoundingClientRect(),i=(null==s?void 0:s.width)||u.current.clientWidth,a=(0,ts.A)().domain(d?m.reverse():m).range([v.left,i-v.right]).clamp(!0),o=(0,tr.A)().domain([0,g]).range([116+v.top,v.top]).clamp(!0),y=d?i-v.right:v.left;t.selectAll("g.y-axis").data([null]).join("g").attr("class","y-axis").attr("transform","translate(".concat(y,", 0)")).call((d?tl.eH:tl.V4)(o).tickSize(0).tickValues(j).tickPadding(16).tickFormat(e=>(0,e6.A)(+(0,ej.M)(e.valueOf())))).attr("text-anchor","middle").call(e=>e.select(".domain").attr("stroke-width",0)),t.selectAll("g.x-axis").data([null]).join("g").attr("class","x-axis").attr("transform","translate(0, ".concat(116+v.top,")")).call((0,tl.l7)(a).ticks(6).tickSize(0).tickPadding(16).tickFormat(e=>c.formatDate(new Date(e.toString()),{month:"short"}))).call(e=>e.select(".domain").attr("stroke-width",0)),t.selectAll("g.tick").select("text").attr("color",r.onSurface.nLv3).attr("font",n.family.sofascoreSans).attr("font-weight",n.weight.medium).attr("font-size",n.size.micro),t.append("g").classed("grid",!0).selectAll("line").data(j).join("line").attr("x1",a(p)).attr("x2",a(x)).attr("y1",e=>o(e)).attr("y2",e=>o(e)).attr("stroke",r.onSurface.nLv4).attr("stroke-dasharray","4 4").attr("stroke-width","1px");let b=(0,ti.A)().x(e=>a(e.date)).y(e=>o(e.score));t.append("path").attr("stroke",r.secondary.default).attr("fill","none").attr("stroke-width","2px").attr("d",b(h)||"");let _=f?o(l)-10:o(l);t.append("g").classed("avg",!0).selectAll("line").data([null]).join("line").attr("x1",a(p)).attr("x2",a(x)).attr("y1",_).attr("y2",_).attr("stroke",r.sofaSingles.value).attr("stroke-dasharray","8 8").attr("stroke-width","2px"),t.append("text").attr("font",n.family.sofascoreSans).attr("font-weight",n.weight.medium).attr("font-size",n.size.small).attr("fill",r.sofaSingles.value).attr("x",d?i-v.right:v.left).attr("y",o(l)-(f?16:6)).text(c.formatMessage({id:"avg.lc"})+" "+(0,e6.A)(l))},200,[h]),(0,s.jsx)(i.az,{ref:u})}function tp(){let{userId:e}=(0,a.useContext)(g.t),{data:t,isLoading:l}=(0,S.Ay)(v.VfS.eventOpeningsGraph(e));return t||l?(0,s.jsxs)(u.Zp,{isInverseDesktop:!0,children:[(0,s.jsx)(u.Zp.Header,{titleId:"monthly_match_views",actionComponent:(0,s.jsx)(tu,{})}),t?(0,s.jsx)(tx,{points:t.points,avg:t.average}):(0,s.jsx)(r.E,{uniqueKey:"editor-event-openings-graph-cl",h:168,br:"lg",mx:"sm",animate:!0})]}):null}var th=l(91603),tm=l(65078);function tg(e){let{eventData:t,index:l}=e,{event:r,eventOpenings:a}=t,o=(0,tm.gm)(r,"winnerCode"),d=o===v.Jfo.Left?"neutrals.nLv1":"neutrals.nLv3",c=o===v.Jfo.Right?"neutrals.nLv1":"neutrals.nLv3",[u,x]=(0,tm.jr)(r,"homeTeam","awayTeam"),[h,m]=(0,tm.jr)(r,"homeScore","awayScore");return(0,s.jsx)(i.az,{cursor:"pointer",bg:{_hover:"neutrals.nLv5"},children:(0,s.jsx)(ec.tj,{event:r,children:(0,s.jsxs)(i.so,{pl:"lg",pr:"md",h:"4xl",align:"center",children:[(0,s.jsxs)(n.Ym,{minW:"xl",textAlign:"center",color:"neutrals.nLv1",textStyle:"body.small",children:[l+1,"."]}),(0,s.jsx)(p.cG,{vertical:!0,mx:"sm",my:"6px"}),(0,s.jsx)(i.az,{flexGrow:"1",overflow:"hidden",children:(0,s.jsxs)(i.so,{direction:"column",gap:"2xs",children:[(0,s.jsxs)(i.so,{justify:"space-between",children:[(0,s.jsxs)(i.so,{grow:1,align:"center",gap:"sm",overflowX:"hidden",children:[(0,s.jsx)(th.p,{size:16,id:u.id}),(0,s.jsx)(n.Ym,{color:d,textStyle:"body.medium",truncate:!0,children:(0,s.jsx)(ex.lC,{original:u.name})})]}),(0,s.jsx)(n.EY,{display:"block",color:d,textStyle:"body.medium",ml:"lg",children:h.display})]}),(0,s.jsxs)(i.so,{justify:"space-between",children:[(0,s.jsxs)(i.so,{grow:1,align:"center",gap:"sm",overflowX:"hidden",children:[(0,s.jsx)(th.p,{size:16,id:x.id}),(0,s.jsx)(n.Ym,{color:c,textStyle:"body.medium",truncate:!0,children:(0,s.jsx)(ex.lC,{original:x.name})})]}),(0,s.jsx)(n.EY,{display:"block",color:c,textStyle:"body.medium",ml:"lg",children:m.display})]})]})}),(0,s.jsx)(p.cG,{vertical:!0,mx:"sm",my:"6px"}),(0,s.jsxs)(i.so,{direction:"column",align:"center",minW:"2xl",gap:"2xs",children:[(0,s.jsx)(b.Mv5,{fill:"onSurface.nLv3"}),(0,s.jsx)(n.EY,{color:"primary.default",textStyle:"assistive.default",children:(0,e6.A)(a)})]})]})})})}function tj(){let{userId:e}=(0,a.useContext)(g.t),{data:t,isLoading:l}=(0,S.Ay)(v.VfS.mostOpenedEvents(e));return l?(0,s.jsx)(eX.E,{uniqueKey:"editor-popular-events-cl",h:304,br:"lg"}):(null==t?void 0:t.events.length)?(0,s.jsxs)(u.Zp,{isInverseDesktop:!0,children:[(0,s.jsx)(u.Zp.Header,{titleId:"most_viewed_matches"}),t.events.map((e,t)=>(0,s.jsx)(tg,{eventData:e,index:t},e.event.id))]}):null}function tf(){let{isMobile:e}=(0,n.$c)(),{userAccount:t}=(0,a.useContext)(g.t);return(0,s.jsxs)(u.BU,{children:[(0,s.jsx)(te,{}),(0,s.jsx)(e5,{}),(0,s.jsx)(tp,{}),(0,s.jsx)(tj,{}),e&&(null==t?void 0:t.editor)&&(0,s.jsx)(eQ.s,{})]})}},12047:(e,t,l)=>{l.d(t,{Ay:()=>i});var s=l(44194),r=l(21501),n=l(55729);function i(){let{isInMobileTabs:e=!0,isSportMenuVisible:t=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},[l,i]=(0,n.useState)(0),a=(0,r.YU)(),{isMobile:o}=(0,s.$c)(),d=50*!!e,c=48+d+48*!!t;return(0,n.useEffect)(()=>{if(!o)return void i(0);i(a===r.Dh.Up?c:d)},[a,o]),l}},17357:(e,t,l)=>{l.d(t,{A:()=>o});var s=l(21377),r=l(55729),n=l(494),i=l(30720),a=l(19121);function o(e,t){let l=null==t?void 0:t.shouldRefresh,[o,d]=(0,r.useState)(),[c,u]=(0,r.useState)(),x=(0,n.wA)();(0,r.useEffect)(()=>{(null==t?void 0:t.event)?x((0,a.$n)(t.event)):e&&s.nk6.fetchEvent(e).then(e=>{x((0,a.$n)(e.event)),d(e.event),u(void 0)}).catch(e=>{u(e),(null==t?void 0:t.onFetchError)&&t.onFetchError(),d(void 0)})},[e,null==t?void 0:t.event]);let p=(0,n.d4)(t=>{let{favorites:{events:l}}=t;return e?l[e]:void 0});(0,r.useEffect)(()=>{if(!e||!l)return;let t="event-details-".concat(e);return x((0,a.vB)({entities:[e],refreshTaskId:t},{fetchFunction:s.nk6.fetchEvent.bind(null,e)})),()=>{x((0,a.tM)(t))}},[e,l]);let[h,m]=(0,i.A)(p||(null==t?void 0:t.event),"homeTeam","awayTeam",o||(null==t?void 0:t.event)),[g,j]=(0,i.A)(p||(null==t?void 0:t.event),"homeScore","awayScore",o||(null==t?void 0:t.event));return{event:p,fetchedEvent:o,leftTeam:h,rightTeam:m,leftScore:g,rightScore:j,error:c}}},23419:(e,t,l)=>{l.d(t,{A:()=>n,k:()=>r});var s=l(55729);let r=(0,s.createContext)(null);function n(){let e=(0,s.useContext)(r);if(!e)throw Error("useWeeklyChallengeContext must be used within an WeeklyChallengeContextProvider");return e}},25442:(e,t,l)=>{l.d(t,{H:()=>s});var s=function(e){return e[e.Upcoming=0]="Upcoming",e[e.Finished=1]="Finished",e[e.Statistics=2]="Statistics",e}({})},28157:(e,t,l)=>{l.d(t,{A:()=>p});var s=l(6029),r=l(41249),n=l(90248),i=l(494),a=l(65789),o=l(54409),d=l(70591),c=l(2294),u=l(76410);let x=e=>{let{routeKey:t,icon:l,id:i,onClick:a}=e;return(0,s.jsx)(d.N_,{routeKey:t,onClick:a,children:(0,s.jsxs)(r.so,{justify:"space-between",align:"center",p:"md lg",children:[(0,s.jsxs)(r.so,{gap:"lg",children:[l,(0,s.jsx)(r.EY,{font:"body.mediumParagraph",children:(0,s.jsx)(n.A,{id:i})})]}),(0,s.jsx)(o.zQC,{icon:"chevron-right",width:24,height:24,fill:"primary.default"})]})})};function p(){let e=(0,i.d4)(c.BF);return(0,s.jsxs)(a.Zp,{children:[(0,s.jsx)(a.Zp.Header,{titleId:"quick_links"}),(0,s.jsx)(x,{routeKey:"user.weeklyChallenge",onClick:()=>(0,u.Wk)({type:"weekly_challenge",location:"profile"}),id:"weekly_challenge",icon:(0,s.jsx)(o.zQC,{icon:"leagues-outline",fill:"onSurface.nLv1"})}),!e&&(0,s.jsx)(x,{routeKey:"betting",id:"app.droppingOdds",icon:(0,s.jsx)(o.dv0,{fill:"onSurface.nLv1",width:"24",height:"24"}),onClick:u.M8}),(0,s.jsx)(a.Zp.Footer,{defaultHeight:"sm"})]})}},28171:(e,t,l)=>{l.d(t,{A:()=>a});var s=l(44194),r=l(78383),n=l.n(r),i=l(76410);function a(){let{isMobile:e}=(0,s.$c)();return{logTabChange:e?i.yy:n()}}},30720:(e,t,l)=>{l.d(t,{A:()=>r});var s=l(69385);function r(e,t,l,r){let n=(0,s.A)(r);if(!(e&&void 0!==t&&void 0!==l))return[];let[i,a]=[e[t],e[l]];return n?[a,i]:[i,a]}},32523:(e,t,l)=>{l.d(t,{E:()=>s.E});var s=l(3881)},33144:(e,t,l)=>{l.d(t,{p:()=>s.p});var s=l(91603)},33752:(e,t,l)=>{l.d(t,{B:()=>p});var s=l(6029),r=l(44194),n=l(62042),i=l(76356);let a=(0,n.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",a),d=(0,n.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]"}}}),c=(0,i.I4)("ul",d),u=(0,n.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:{mdDown:{padding:"[0px !important]"}}}}}),x=(0,i.I4)("div",u),p=e=>{let{children:t,isHomePage:l}=e;return(0,s.jsx)(x,{isHomePage:l,children:(0,s.jsx)(c,{children:t})})};p.Item=e=>{let{children:t}=e;return(0,s.jsx)(o,{"data-testid":"breadcrumb",children:t})},p.Title=e=>{let{children:t}=e;return(0,s.jsx)(r.Li,{display:"inline",className:"breadcrumb-title","data-testid":"breadcrumb_title",children:(0,s.jsx)(r.H1,{display:"inline",textStyle:"display.micro",color:"neutrals.nLv3",children:t})})}},37377:(e,t,l)=>{l.d(t,{s:()=>x});var s=l(6029),r=l(44194),n=l(76356),i=l(90248),a=l(494),o=l(65789),d=l(54409),c=l(88339),u=l(76410);let x=e=>{let{isInWidget:t}=e,l=(0,a.d4)(c.$F);return(null==l?void 0:l.editor)?null:(0,s.jsx)(o.Zp,{isInverseDesktop:t,children:(0,s.jsxs)(n.az,{p:"md",children:[(0,s.jsxs)(n.so,{align:"center",p:"xs",mb:"xs",children:[(0,s.jsx)(d._jO,{minW:40,minH:40,width:"40px",height:"40px",mr:"md",fill:"primary.default"}),(0,s.jsx)(r.EY,{textStyle:"display.small",color:"neutrals.nLv1",children:(0,s.jsx)(i.A,{id:"torneo_promo_text"})})]}),(0,s.jsx)("img",{style:{maxWidth:"280px",width:"100%"},src:"/static/images/editor/editor-mobile.png",alt:"eventTorneoBannerImage"}),(0,s.jsx)("a",{href:"https://torneo.sofascore.com/?utm_source=torneo.sofascore.com&utm_medium=web_button&utm_campaign=join_sofascore_editor_team_desktop&utm_content=web_button_desktop",target:"_blank",rel:"noreferrer",onClick:u.ix,children:(0,s.jsxs)(n.so,{justify:"center",align:"center",gap:"xs",bg:"surface.s2",cursor:"pointer",br:"sm",mt:"lg",p:"md",children:[(0,s.jsx)(r.EY,{textStyle:"display.small",color:"primary.default",_hover:{filter:"auto",brightness:1.3,textDecoration:"underline"},children:(0,s.jsx)(i.A,{id:"check_out_torneo_by_sofascore"})}),(0,s.jsx)(d.HW5,{fill:"primary.default",width:16,height:16})]})})]})})}},39419:(e,t,l)=>{l.d(t,{M:()=>d});var s=l(6029),r=l(4967),n=l(41249),i=l(55729),a=l(947),o=l(96470);let d=e=>{let{hasChallengeEnded:t,challengeEndTime:l,...d}=e,[c,u]=(0,i.useState)(new Date().getTime()),x=(0,a.A)();if((0,i.useEffect)(()=>{let e=setInterval(()=>u(new Date().getTime()),1e3);return()=>clearInterval(e)},[c]),!l)return null;let p=t?l+r.dp:l;return(0,s.jsx)(n.EY,{...d,children:p{l.d(t,{y:()=>a});var s=l(6029),r=l(41249),n=l(90248),i=l(54409);let a=e=>{let{messageId:t,font:l="body.medium"}=e;return(0,s.jsxs)(r.so,{align:"center",gap:"lg",children:[(0,s.jsx)(i.G_L,{fill:"surface.s1"}),(0,s.jsx)(r.EY,{block:!0,color:"surface.s1",font:l,children:(0,s.jsx)(n.A,{id:t})})]})}},41007:(e,t,l)=>{l.d(t,{A:()=>x});var s=l(6029),r=l(41249),n=l(494),i=l(65789),a=l(62827),o=l(7067),d=l(14930),c=l(27705);function u(e){let{experiments:t}=e,[l,n]=(0,a.yR)("experimentPickerValue","-"),d=[{label:"-"}];return t.forEach(e=>{e.variants.forEach(t=>{t!==o.KT.Control&&t!==o.KT.None&&d.push({label:t===o.KT.Treatment?e.name:"".concat(e.name,"---").concat(t)})})}),(0,s.jsx)(i.Zp,{children:(0,s.jsx)(r.az,{p:"md",children:(0,s.jsx)(r.jT,{label:"Experiment:",options:d,value:{label:l},onChange:e=>{let{label:l}=e;n(l),t.forEach(e=>{let t=l.split("---"),s=t[0],r=t[1]||o.KT.Treatment;e.name===s?(0,a.IO)((0,c.L4)(e.name),r):(0,a.IO)((0,c.L4)(e.name),o.KT.None)})},clearable:!1})})})}let x=e=>{let{userId:t}=e,l=(0,n.d4)(e=>e.auth.userAccount),r=(null==l?void 0:l.chatRole)==="admin",i=!t||(null==l?void 0:l.id)===t,a=[...d.f_,...d.gc];return a.length&&i&&r?(0,s.jsx)(u,{experiments:a}):null}},50148:(e,t,l)=>{l.d(t,{A:()=>c});var s=l(6029),r=l(44194),n=l(76356),i=l(90248),a=l(54053),o=l(3541);let d=e=>{let{titleId:t,bulletIds:l}=e;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.az,{px:"lg",textStyle:"body.mediumParagraph",fontWeight:700,children:(0,s.jsx)(i.A,{id:t})}),(0,s.jsx)("ul",{children:l.map(e=>(0,s.jsx)(r.Li,{children:(0,s.jsx)(i.A,{id:e})},e))})]})};function c(e){let{isOpen:t,setIsOpen:l}=e;return(0,s.jsx)(a.A,{header:(0,s.jsxs)(n.so,{h:"4xl",pt:"lg",pb:"sm",gap:"lg",px:{md:"lg"},justify:"space-between",children:[(0,s.jsx)(n.az,{textStyle:"display.large",color:"neutrals.nLv1",truncate:!0,children:(0,s.jsx)(i.A,{id:"weekly_about_streaks"})}),(0,s.jsx)(o.A,{h:24})]}),isOpen:t,setIsOpen:l,children:(0,s.jsxs)(n.az,{pt:"sm",maxW:{md:"[360px]"},children:[(0,s.jsx)(d,{titleId:"weekly_streaks_starting_losing",bulletIds:["weekly_streaks_starting_bullet","weekly_streaks_staying_bullet","weekly_streaks_losing_bullet"]}),(0,s.jsx)("br",{}),(0,s.jsx)(d,{titleId:"weekly_streaks_tracking",bulletIds:["weekly_streaks_tracking_rivals"]})]})})}},55365:(e,t,l)=>{l.d(t,{KY:()=>c,UR:()=>x,gj:()=>d,lZ:()=>o,mq:()=>u});var s=l(6029),r=l(21377),n=l(93338),i=l(54409),a=l(98516);r.QCR.AussieRules,r.QCR.Football,r.QCR.Futsal,r.QCR.Handball,r.QCR.Rugby;let o=(e,t,l)=>{let s=e.status.type===r.XUj.InProgress,i=s&&e.crowdsourcingDataDisplayEnabled,a=t===r.Jfo.Left,o=t===r.Jfo.Right;return i?n.S.var("colors.status.crowdsourcingLive"):s?n.S.var("colors.status.live"):l?a?n.S.var("colors.neutrals.nLv1"):n.S.var("colors.neutrals.nLv3"):o?n.S.var("colors.neutrals.nLv1"):n.S.var("colors.neutrals.nLv3")};function d(e){let t=(null==e?void 0:e.score)||0,l=(null==e?void 0:e.wickets)||0;return t||l?"".concat(t).concat(l>=0&&l<10?"-".concat(l):""):"-"}let c=(e,t)=>(0,a.M)(e.map(e=>{var l,s;return null!=(s=null==t||null==(l=t[e])?void 0:l.overs)?s:0}).reduce((e,t)=>e+t,0),1),u=e=>{switch(e){case"WC":case"LL":return"colors.playoffs.relegation";case"Q":case"A":case"PR":case"SE":return"colors.playoffs.promotionToXPlayoff";default:return"colors.playoffs.promotionToYPlayoff"}},x=(e,t,l)=>{if(e===r.QCR.Tennis)return l===r.Jfo.Left||l===r.Jfo.Right?(0,s.jsx)(i.OXq,{fill:"secondary.default"}):void 0;if(e===r.QCR.AmericanFootball){let e=null==t?void 0:t.currentPossession,l=Number(null==t?void 0:t.currentDown);return l>=1&&l<=4&&(e===r.Jfo.Left||e===r.Jfo.Right)?(0,s.jsx)(i.CvR,{icon:"af-touchdown",w:16,h:16,fill:"sofaSingles.live"}):void 0}}},55794:(e,t,l)=>{l.d(t,{S:()=>y});var s=l(6029),r=l(44194),n=l(76356),i=l(55729),a=l(43072),o=l(947),d=l(90248),c=l(494),u=l(54409),x=l(50801),p=l(40528),h=l(88339),m=l(89642),g=l(76410),j=l(3468);let f=()=>(0,s.jsxs)("svg",{width:"102",height:"101",viewBox:"0 0 102 101",fill:"none",style:{position:"absolute",bottom:16,right:0,opacity:.1},children:[(0,s.jsx)("path",{d:"M66.8686 67.5H50.1543V84.2501H66.8686V67.5Z",fill:"#FCFCFE"}),(0,s.jsxs)("g",{opacity:"0.5",children:[(0,s.jsx)("path",{d:"M100.287 84.25H83.5723V101H100.287V84.25Z",fill:"#FCFCFE"}),(0,s.jsx)("path",{d:"M16.7142 84.25H0V101H16.7142V84.25Z",fill:"#FCFCFE"}),(0,s.jsx)("path",{d:"M50.142 67.5H33.4277V84.2501H50.142V67.5Z",fill:"#FCFCFE"}),(0,s.jsx)("path",{d:"M116.999 50.75H100.285V67.5001H116.999V50.75Z",fill:"#FCFCFE"}),(0,s.jsx)("path",{d:"M66.8569 50.75H50.1426V67.5001H66.8569V50.75Z",fill:"#FCFCFE"}),(0,s.jsx)("path",{d:"M50.142 34H33.4277V50.7497H50.142V34Z",fill:"#FCFCFE"}),(0,s.jsx)("path",{d:"M33.4291 34H16.7148V50.7497H33.4291V34Z",fill:"#FCFCFE"}),(0,s.jsx)("path",{d:"M83.5717 17.25H66.8574V33.9997H83.5717V17.25Z",fill:"#FCFCFE"}),(0,s.jsx)("path",{d:"M50.142 17.25H33.4277V33.9997H50.142V17.25Z",fill:"#FCFCFE"}),(0,s.jsx)("path",{d:"M83.5717 0.5H66.8574V17.2501H83.5717V0.5Z",fill:"#FCFCFE"}),(0,s.jsx)("path",{d:"M50.142 0.5H33.4277V17.2501H50.142V0.5Z",fill:"#FCFCFE"})]}),(0,s.jsxs)("g",{opacity:"0.8",children:[(0,s.jsx)("path",{d:"M83.5717 84.25H66.8574V101H83.5717V84.25Z",fill:"#FCFCFE"}),(0,s.jsx)("path",{d:"M66.8569 84.25H50.1426V101H66.8569V84.25Z",fill:"#FCFCFE"}),(0,s.jsx)("path",{d:"M33.4291 84.25H16.7148V101H33.4291V84.25Z",fill:"#FCFCFE"}),(0,s.jsx)("path",{d:"M83.5717 67.5H66.8574V84.2501H83.5717V67.5Z",fill:"#FCFCFE"}),(0,s.jsx)("path",{d:"M50.142 50.7495H33.4277V67.4996H50.142V50.7495Z",fill:"#FCFCFE"}),(0,s.jsx)("path",{d:"M33.4291 50.7495H16.7148V67.4996H33.4291V50.7495Z",fill:"#FCFCFE"}),(0,s.jsx)("path",{d:"M66.8569 17.25H50.1426V33.9997H66.8569V17.25Z",fill:"#FCFCFE"}),(0,s.jsx)("path",{d:"M33.4291 17.25H16.7148V33.9997H33.4291V17.25Z",fill:"#FCFCFE"}),(0,s.jsx)("path",{d:"M16.7142 17.25H0V33.9997H16.7142V17.25Z",fill:"#FCFCFE"})]})]}),v="https://app.sofascore.com/nixz/rix1kpvt",y=()=>{let{userId:e}=(0,i.useContext)(m.t),t=(0,c.d4)(h.$F),l=(null==t?void 0:t.id)===e,{isMobile:y}=(0,r.$c)(),b=(0,j.C)(),_=(0,o.A)(),{ref:w,inView:k}=(0,a.Wx)({triggerOnce:!0}),A=async()=>{try{(0,g.oD)("referral"),y&&navigator.share?await navigator.share({title:"",text:_.formatMessage({id:"sofascore_share_link_text"}),url:v}):(await navigator.clipboard.writeText(v),b((0,s.jsx)(p.y,{messageId:"share_link_copied_to_clipboard"})))}catch(e){b((0,s.jsx)(p.y,{messageId:"error.generic2"}))}};return((0,i.useEffect)(()=>{k&&(0,g.ke)({action:"impression",location:"profile",type:"referral"})},[k]),l)?(0,s.jsxs)(n.so,{bg:"primary.default",align:"center",p:"lg",br:"xl",minH:"[124px]",gap:"sm",position:"relative",ref:w,children:[(0,s.jsx)(n.az,{overflow:"hidden",children:(0,s.jsx)(f,{})}),(0,s.jsxs)(n.so,{direction:"column",justify:"space-between",minH:"[92px]",gap:"sm",grow:1,shrink:1,children:[(0,s.jsx)(r.EY,{textStyle:"display.medium",color:"surface.s1",children:(0,s.jsx)(d.A,{id:"profile_referral_banner_header"})}),(0,s.jsx)(r.EY,{textStyle:"assistive.default",color:"surface.s1",children:(0,s.jsx)(d.A,{id:"profile_referral_banner_description"})}),(0,s.jsx)(n.so,{justify:"flex-start",w:"100%",children:(0,s.jsxs)(r.$n,{size:"tertiary",variant:"filled",bg:"surface.s1",onClick:A,children:[(0,s.jsx)(r.EY,{display:"block",lineHeight:1,textStyle:"assistive.default",color:"neutrals.nLv1",children:(0,s.jsx)(d.A,{id:"profile_button_share_link"})}),(0,s.jsx)(n.az,{h:"lg",w:"lg",children:(0,s.jsx)(u.VJ,{h:16,w:16,fill:"onSurface.nLv1"})})]})})]}),(0,s.jsx)(n.az,{w:"[68px]",h:"[68px]",children:(0,s.jsx)(x.A,{graphic:"twitter-feed"})})]}):null}},58918:(e,t,l)=>{l.d(t,{K:()=>o});var s=l(6029),r=l(33144),n=l(76356),i=l(70591),a=l(68379);let o=e=>{var t,l;let{sport:o,teams:d,seeding:c,size:u,hideFlags:x,ignoreLink:p}=e;return(0,s.jsxs)(n.so,{children:[(0,s.jsx)(i.gT,{sport:o,team:d[0],ignoreLink:p,children:(0,s.jsx)(r.p,{hasFlag:!0,id:d[0].id,name:d[0].name,size:u||40,alpha2:x||null==(t=d[0].country)?void 0:t.alpha2,boxProps:{mr:-8}})}),(0,s.jsx)(i.gT,{sport:o,team:d[1],ignoreLink:p,children:(0,s.jsx)(r.p,{hasFlag:!0,id:d[1].id,name:d[1].name,size:u||40,alpha2:x||null==(l=d[1].country)?void 0:l.alpha2,right:!0})}),(0,s.jsx)(a.J,{seed:c,transform:"translateX(100%)"})]})}},59721:(e,t,l)=>{l.d(t,{e:()=>s.e});var s=l(33480)},62121:(e,t,l)=>{l.d(t,{_7:()=>s._7,mt:()=>s.mt,Q3:()=>s.Q3,bZ:()=>s.bZ,wH:()=>s.wH}),l(29469),l(89042);var s=l(70448)},65078:(e,t,l)=>{l.d(t,{gm:()=>s.A,g3:()=>r.A,mJ:()=>n.A,jr:()=>i.A,AR:()=>o,h2:()=>p});var s=l(70215),r=l(69385),n=l(17357),i=l(30720),a=l(494);function o(e){let t=(0,a.d4)(t=>{let{favorites:{events:l}}=t;return l[e.id]}),[l,s]=(0,i.A)(e,"homeTeam","awayTeam",e),[r,n]=(0,i.A)(e,"homeScore","awayScore",e);return{event:t||e,leftTeam:l,rightTeam:s,leftScore:r,rightScore:n}}var d=l(21377),c=l(55729),u=l(62859);let x=e=>t=>e===t;function p(e,t){var l,r;let{event:n,leftTeam:i,rightTeam:a}=(0,c.useContext)(u.y$),o=(0,s.A)(n,"winnerCode"),p=(n.status.code===d.sum.AET||n.status.code===d.sum.AP)&&n.tournament.category.sport.slug===d.QCR.IceHockey,h=e?x(e):t||(()=>!1),m=h(i.id,n.id)||(null==(l=i.subTeams)?void 0:l.some(e=>h(e.id,n.id))),g=h(a.id,n.id)||(null==(r=a.subTeams)?void 0:r.some(e=>h(e.id,n.id)));switch(o){case d.Jfo.Left:if(m)return d.h18.Win;if(g)return p?d.h18.OvertimeLoss:d.h18.Lose;break;case d.Jfo.Right:if(m)return p?d.h18.OvertimeLoss:d.h18.Lose;if(g)return d.h18.Win;break;case d.Jfo.Draw:if(m||g)return d.h18.Draw}}},67333:(e,t,l)=>{l.d(t,{A:()=>x});var s=l(6029),r=l(21377),n=l(44194),i=l(76356),a=l(494),o=l(45860),d=l(65789),c=l(88339);function u(e){let{branches:t}=e;if(!(null==t?void 0:t.length))return null;let l=[r.rKn,...[...t].sort((e,t)=>e.localeCompare(t))].map(e=>({label:e}));return(0,s.jsx)(d.Zp,{children:(0,s.jsx)(i.az,{p:"md",children:(0,s.jsx)(n.jT,{label:"Branches:",options:l,value:{label:(0,r.Srs)()||r.rKn},onChange:e=>{(null==e?void 0:e.label)&&(e.label===r.rKn?(0,r.Sdf)(void 0):(0,r.Sdf)("https://".concat(e.label,"api/v1")))}})})})}let x=e=>{let{userId:t}=e,l=(0,a.d4)(c.$F),n=(0,a.d4)(c.Cd),i=(null==l?void 0:l.chatRole)==="admin",d=!t||(null==l?void 0:l.id)===t,x=async e=>{let[t,l]=e;return(0,r.B2D)(t,{},{headers:(0,r.MXE)(l)})},{data:p}=(0,o.Ay)(i&&n?[r.GJU.branches(),n]:null,{fetcher:x});return i&&d?(0,s.jsx)(u,{branches:null==p?void 0:p.branches}):null}},68379:(e,t,l)=>{l.d(t,{J:()=>o});var s=l(6029),r=l(44194),n=l(76356),i=l(93338),a=l(55365);let o=e=>{let{seed:t,colorless:l,position:o="absolute",left:d,right:c,bottom:u="0",h:x="lg",minW:p="xl",textStyle:h="assistive.default",...m}=e;return t?(0,s.jsx)(n.ov,{display:"inline-flex",position:o,bottom:u,left:d,right:c,br:"sm",style:l?void 0:{background:i.S.var((0,a.mq)(t))},h:x,minW:p,zIndex:"button",...m,children:(0,s.jsx)(r.EY,{textStyle:h,color:l?"neutrals.nLv1":"surface.s1",lineHeight:1,children:t})}):null}},69385:(e,t,l)=>{l.d(t,{A:()=>a});var s=l(55729),r=l(494),n=l(62859),i=l(57126);function a(e){var t;let l=(0,s.useContext)(n.y$),a=e||l.event,o=(0,r.d4)(i.xl);return(null==a||null==(t=a.tournament.uniqueTournament)?void 0:t.displayInverseHomeAwayTeams)&&o}},70215:(e,t,l)=>{l.d(t,{A:()=>r});var s=l(69385);function r(e,t,l){let r=(0,s.A)(l);if(!(e&&t))return;let n=e[t];if("number"==typeof n)return r&&[1,2].includes(n)?1===n?2:1:n}},70355:(e,t,l)=>{l.d(t,{GH:()=>r,UE:()=>i,v9:()=>n});var s=l(19451);let r=[1,0,2],n={1:160,2:130,3:120},i={[s.xW.TopPredictors]:"user.topPredictors",[s.xW.TopContributors]:"user.topContributors",[s.xW.TopEditors]:"user.topEditors"}},72110:(e,t,l)=>{l.d(t,{I:()=>d,p:()=>c});var s=l(6029),r=l(44194),n=l(76356),i=l(90248),a=l(65789),o=l(54409);function d(e){let{onClick:t,children:l}=e;return(0,s.jsx)(n.so,{direction:"column",align:"center",justify:"center",gap:"xs",h:"[60px]",bg:"surface.s2",br:{base:"sm",md:"lg"},cursor:t?"pointer":"default",onClick:t,flexGrow:1,flexBasis:"[0px]",children:l})}function c(e){let{titleId:t,hasInfo:l,onInfoClick:d,children:c}=e,{isMobile:u}=(0,r.$c)();return(0,s.jsxs)(a.HH,{isCard:u,children:[t&&(0,s.jsxs)(n.so,{align:"center",justify:"center",gap:"xs",px:"sm",pb:"sm",pt:"lg",children:[(0,s.jsx)(r.EY,{display:"block",textStyle:"display.small",textAlign:"center",color:"neutrals.nLv1",children:(0,s.jsx)(i.A,{id:t})}),l&&(0,s.jsx)(r.K0,{onClick:()=>null==d?void 0:d(),variant:"clear",children:(0,s.jsx)(o.G_L,{fill:"primary.default",width:16,height:16})})]}),(0,s.jsx)(n.so,{justify:"space-between",gap:"sm",p:{mdDown:"sm"},children:c})]})}},72629:(e,t,l)=>{l.d(t,{A:()=>p});var s=l(6029),r=l(44194),n=l(76356),i=l(55729),a=l(90248),o=l(54409),d=l(3541),c=l(50148),u=l(72110);let x=e=>{let{length:t}=e;return(0,s.jsxs)(n.so,{align:"center",gap:"xs",children:[(0,s.jsx)(d.A,{h:20}),(0,s.jsx)(r.EY,{textStyle:"display.medium",children:void 0===t?"-":(0,s.jsx)(a.A,{id:"weekly_streak_counter",values:{n:t}})})]})};function p(e){let{maxWeeklyStreak:t,currentWeeklyStreak:l,hasCurrentStreakInfo:d,showTitle:p,onCurrentStreakClick:h}=e,[m,g]=(0,i.useState)(!1);return(0,s.jsxs)(u.p,{titleId:p?"weekly_streak_title":void 0,onInfoClick:()=>g(!0),hasInfo:!0,children:[(0,s.jsxs)(u.I,{onClick:d?()=>{d&&(g(!0),null==h||h())}:void 0,children:[(0,s.jsx)(x,{length:l,messageId:"weekly_streak_counter"}),(0,s.jsxs)(n.so,{justify:"center",px:"sm",gap:"xs",w:"100%",overflow:"hidden",children:[(0,s.jsx)(r.EY,{textStyle:"assistive.default",color:"neutrals.nLv3",truncate:!0,children:(0,s.jsx)(a.A,{id:"weekly_current_streak"})}),d&&(0,s.jsx)(n.az,{h:"lg",w:"lg",children:(0,s.jsx)(o.FFV,{fill:"primary.default"})})]})]}),(0,s.jsxs)(u.I,{children:[(0,s.jsx)(x,{length:t,messageId:"weekly_streak_counter"}),(0,s.jsx)(r.EY,{textStyle:"assistive.default",color:"neutrals.nLv3",children:(0,s.jsx)(a.A,{id:"weekly_longest_streak"})})]}),(0,s.jsx)(c.A,{isOpen:m,setIsOpen:g})]})}},75414:(e,t,l)=>{l.d(t,{A:()=>s});let s=function(e){switch(!0){case e<1e3:return"".concat(e);case e<1e4&&e/1e3%1>=.1:let t="".concat((e/1e3).toPrecision(2));return t.endsWith(".0")&&(t=t.substring(0,t.length-2)),"".concat(t,"k");case e<1e6:let l=Math.round(e/1e3);if(1e3===l)return"1M";return"".concat(l,"k");case e<1e7:let s=(e/1e5).toFixed();return s=s.endsWith("0")?s.substring(0,s.length-1):"".concat(s[0],".").concat(s[1]),"".concat(s,"M");case e<1e8:return"".concat(Math.round(e/1e6),"M");case e<1e9:let r=Math.round(e/1e6);if(1e3===r)return"1B";return"".concat(r,"M");default:return"".concat(e)}}},86501:(e,t,l)=>{l.d(t,{_:()=>I,g:()=>L});var s=l(6029),r=l(32523),n=l(44194),i=l(76356),a=l(41249),o=l(55729),d=l(90248),c=l(89642),u=l(494),x=l(75791),p=l(2294),h=l(54409);let m=e=>{let{messageId:t,value:l,isButton:r,onClick:a}=e;return(0,s.jsxs)(i.so,{justify:"space-between",align:"center",py:"sm",children:[(0,s.jsxs)(i.so,{align:"center",gap:"xs",onClick:a,children:[(0,s.jsx)(n.EY,{color:r?"primary.default":"neutrals.nLv1",textStyle:"body.medium",children:(0,s.jsx)(d.A,{id:t})}),r&&(0,s.jsx)(h.G_L,{fill:"primary.default",h:16,w:16})]}),(0,s.jsx)(n.EY,{color:"neutrals.nLv1",textStyle:"body.medium",children:l})]})},g=e=>{let{messageId:t,value:l,isButton:r,onClick:a}=e;return(0,s.jsxs)(i.so,{direction:"column",justify:"center",align:"center",gap:"xs",p:"sm",br:"lg",bg:{base:"surface.s2",_hover:{mdDown:"neutrals.nLv4"}},onClick:a,cursor:r?"pointer":"default",children:[(0,s.jsx)(n.EY,{textStyle:"display.medium",children:l}),(0,s.jsxs)(n.EY,{textAlign:"center",textStyle:"assistive.default",color:r?"primary.default":"neutrals.nLv3",children:[(0,s.jsx)(d.A,{id:t}),r&&(0,s.jsx)(h.G_L,{fill:"primary.default",h:16,w:16,ml:"xs"})]})]})};function j(e){let{isMobile:t}=(0,n.$c)();return t?(0,s.jsx)(m,{...e}):(0,s.jsx)(g,{...e})}var f=l(54053);function v(e){let{isOpen:t,setIsOpen:l}=e,r=(0,u.d4)(p.BF);return(0,s.jsx)(f.A,{setIsOpen:l,isOpen:t,footer:(0,s.jsx)(i.so,{display:["none","flex"],justify:"flex-end",m:"lg",children:(0,s.jsx)(n.$n,{onClick:()=>l(!1),ml:"lg",variant:"outline",children:(0,s.jsx)(d.A,{id:"ok_got_it_button"})})}),renderAdPlaceholder:!1,children:(0,s.jsxs)(i.az,{maxW:{md:"[312px]"},p:"lg",mx:"auto",children:[(0,s.jsx)(n.EY,{display:"block",color:"neutrals.nLv1",textStyle:"display.large",mb:"sm",children:(0,s.jsx)(d.A,{id:r?"points":"profile.roi"})}),(0,s.jsx)(n.EY,{display:"block",color:"neutrals.nLv1",textStyle:"body.mediumParagraph",children:(0,s.jsx)(d.A,{id:r?"points_VROI_info_bubble":"virtual_return_on_investment_info"})})]})})}function y(e){let{stat:t}=e,l=(0,u.d4)(p.BF),[r,n]=(0,o.useState)(!1);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(j,{onClick:()=>n(!0),messageId:l?"points":"profile.roi",value:t,isButton:!0}),(0,s.jsx)(v,{isOpen:r,setIsOpen:n})]})}function b(e){let{children:t}=e,{isMobile:l}=(0,n.$c)();return l?(0,s.jsx)(s.Fragment,{children:t}):(0,s.jsx)(i.xA,{gap:"sm",columns:2,children:t})}let _=e=>{let{stats:t}=e,l=(0,u.d4)(p.BF),{correct:r,total:n,percentage:i,avgCorrectOdds:a,roi:o,ranking:d}=t;return(0,s.jsxs)(b,{children:[(0,s.jsx)(j,{messageId:"profile.correctPredictions",value:"".concat(r,"/").concat(n," (").concat(i,")")}),!l&&(0,s.jsx)(x.c,{fractionalValue:a.fractionalValue,children:e=>(0,s.jsx)(j,{messageId:"profile.correctOdds",value:e})}),(0,s.jsx)(y,{stat:o}),(0,s.jsx)(j,{messageId:"best_predictors_rank",value:d})]})};var w=l(98914),k=l(76410);let A=(e,t,l)=>"".concat(e,"/").concat(t," (").concat(l,")"),S=e=>{let{correct:t,total:l,messageId:r}=e;return(0,s.jsxs)(i.so,{justify:"space-between",gap:"lg",children:[(0,s.jsx)(n.EY,{display:"block",textStyle:"body.mediumParagraph",color:"neutrals.nLv1",children:(0,s.jsx)(d.A,{id:r})}),(0,s.jsx)(n.EY,{display:"block",textStyle:"body.mediumParagraph",color:"neutrals.nLv1",children:0===l?"0":A(t,l,"".concat((0,w.M)(t/l,2),"%"))})]})},C=e=>{let{isOpen:t,setIsOpen:l,stats:r}=e;return(0,s.jsx)(f.A,{setIsOpen:l,isOpen:t,header:"profile.correctPredictions",renderAdPlaceholder:!1,children:(0,s.jsx)(i.az,{minW:"[312px]",p:"lg",pt:"0",pb:{base:"2xl",md:"lg"},mx:"auto",children:(0,s.jsxs)(i.so,{direction:"column",gap:"xl",children:[(0,s.jsx)(S,{messageId:"profile_predictions_with_odds",correct:r.correctVotesWithOdds,total:r.totalVotesWithOdds}),(0,s.jsx)(S,{messageId:"profile_predictions_without_odds",correct:r.correctVotesWithoutOdds,total:r.totalVotesWithoutOdds})]})})})},E=e=>{let{stats:t}=e,l=(0,u.d4)(p.BF),[r,n]=(0,o.useState)(!1),i=A(t.correct,t.total,t.percentage);return l||0===Number(t.total)?(0,s.jsx)(j,{messageId:"profile.correctPredictions",value:i}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(j,{onClick:()=>{n(!0),(0,k.ke)({action:"click",location:"user_profile",type:"correct_predictions_info_button"})},messageId:"profile.correctPredictions",value:i,isButton:!0}),(0,s.jsx)(C,{isOpen:r,setIsOpen:n,stats:t})]})},T=e=>{let{stats:t}=e,l=(0,u.d4)(p.BF),{avgCorrectOdds:r,roi:n,ranking:i}=t;return(0,s.jsxs)(b,{children:[(0,s.jsx)(E,{stats:t}),!l&&(0,s.jsx)(x.c,{fractionalValue:r.fractionalValue,children:e=>(0,s.jsx)(j,{messageId:"profile.correctOdds",value:e})}),(0,s.jsx)(y,{stat:n}),(0,s.jsx)(j,{messageId:"profile_predictor_rank",value:i})]})};function L(){let{userAccount:e,isUserLoading:t}=(0,o.useContext)(c.t);return t?(0,s.jsx)(r.E,{uniqueKey:"predictions-overview-cl",h:[228,237],br:[void 0,"lg"]}):e?(0,s.jsxs)(i.so,{direction:"column",p:"sm",m:{mdDown:"sm"},br:{mdDown:"lg"},bg:{mdDown:"surface.s1"},elevation:{mdDown:"2"},gap:{md:"md"},children:[(0,s.jsx)(n.EY,{textAlign:"center",pt:"md",pb:"sm",color:"neutrals.nLv1",textStyle:"display.medium",textTransform:"capitalize",children:(0,s.jsx)(d.A,{id:"overview"})}),(0,s.jsxs)(a.tU,{variant:"tertiary",children:[(0,s.jsxs)(i.az,{py:"sm",children:[(0,s.jsx)(a.tU.Tab,{tabKey:1,children:(0,s.jsx)(d.A,{id:"profile.last30Days"})}),(0,s.jsx)(a.tU.Tab,{tabKey:2,children:(0,s.jsx)(d.A,{id:"profile.predictions.allTime"})})]}),(0,s.jsx)(a.tU.Panel,{tabKey:1,children:(0,s.jsx)(T,{stats:e.voteStatistics.current})}),(0,s.jsx)(a.tU.Panel,{tabKey:2,children:(0,s.jsx)(_,{stats:e.voteStatistics.allTime})})]})]}):null}var F=l(65789);let H=e=>{let{titleId:t,children:l}=e;return(0,s.jsxs)(F.Zp,{children:[(0,s.jsx)(F.Zp.Header,{titleId:t}),(0,s.jsx)(i.az,{px:"lg",children:l}),(0,s.jsx)(F.Zp.Footer,{defaultHeight:"sm"})]})};function I(){var e;let{userAccount:t}=(0,o.useContext)(c.t);if(!t)return null;let l=Number(null==(e=t.voteStatistics.current)?void 0:e.total)>0;return(0,s.jsxs)(F.BU,{children:[l&&(0,s.jsx)(H,{titleId:"profile.last30Days",children:(0,s.jsx)(T,{stats:t.voteStatistics.current})}),(0,s.jsx)(H,{titleId:"profile.predictions.allTime",children:(0,s.jsx)(_,{stats:t.voteStatistics.allTime})})]})}},89642:(e,t,l)=>{l.d(t,{t:()=>s});let s=(0,l(55729).createContext)({userId:"",userAccount:void 0,isUserLoading:!0})},96470:(e,t,l)=>{l.d(t,{Y:()=>r,j:()=>n});var s=l(4967);function r(e,t,l,s){let r=e>0?s.slice(0,e).map(e=>e.id):[],n=t>0?s.slice(e,e+t).map(e=>e.id):[];return{userIds:{promoted:r,demoted:s.length>e+t&&l>0?s.slice(-s.length+e+t).map(e=>e.id):[],neutral:n}}}function n(e,t,l){let{days:r,hours:n,minutes:i,seconds:a}=(0,s.DU)(e,t),o=r>0?r+l.formatMessage({id:"days_short"}):"",d=n>0?n+l.formatMessage({id:"hours_short"}):"";return[o,d,(n>0||i>0)&&!r?i+l.formatMessage({id:"minutes_short"}):"",(i>0||a>0)&&!r&&!n?a+l.formatMessage({id:"seconds_short"}):""].filter(Boolean).join(" ")}},96913:(e,t,l)=>{l.d(t,{m:()=>h.m,A:()=>p});var s=l(6029),r=l(44194),n=l(41249),i=l(78383),a=l.n(i),o=l(55729),d=l(90248),c=l(12047),u=l(28171);let x=(e,t)=>{let l=(0,o.useState)(e);return t||l};function p(e){let{id:t,location:l,initialTabKey:i,onChange:p=a(),tabs:h,children:m,customControls:g,noSportMenu:j,eventStatusType:f,seasonId:v,isInWidget:y}=e,b=(0,o.useRef)(null),{isMobile:_}=(0,r.$c)(),[w,k]=x(i,g),{logTabChange:A}=(0,u.A)(),S=(0,c.Ay)({isSportMenuVisible:!j,isInMobileTabs:!1});return(0,o.useEffect)(()=>{w!==i&&k(i)},[t,l,v]),(0,s.jsx)(n.tU,{onChange:e=>{w!==e&&(k(e),p(e),y||window.scrollTo({left:0,top:0}))},initialValue:i||w,value:w,variant:"primary",fullWidthTabs:_||y,children:(0,s.jsxs)(n.az,{d:"inline",style:{verticalAlign:"top"},ref:b,children:[(0,s.jsx)(n.PI,{isStickingDisabled:y||!_,bg:["surface.s1","transparent"],borderBottom:["effect.elevation1",void 0],top:S,children:(0,s.jsx)(n.tU.List,{underline:!0,scroll:!0,children:h.filter(e=>!e.isHidden).map(e=>(0,s.jsx)(n.tU.Tab,{tabKey:e.tabKey,style:{marginLeft:0},as:"h2",onClick:s=>s.nativeEvent.isTrusted&&e.tabKey!==w?A({type:e.tabKey,id:t,location:l,status:f}):void 0,children:(0,s.jsx)("a",{href:"#tab:".concat(e.tabKey),onClick:e=>e.preventDefault(),style:{color:"inherit"},children:"string"==typeof e.item?(0,s.jsx)(d.A,{id:e.item,values:e.values}):e.item})},"".concat(t,"-").concat(e.tabKey)))})}),(0,s.jsx)(n.az,{children:m})]})},t)}var h=l(28132)},98095:(e,t,l)=>{l.d(t,{j:()=>i});var s=l(4967),r=l(45860);let n=e=>fetch(e,{method:"HEAD",cache:"no-store"});function i(){let{data:e,error:t,isLoading:l}=(0,r.Ay)("https://cdn.adapex.io/hb/aaw.sofascore.js",{fetcher:n,dedupingInterval:s.d_});return{isLoading:l,hasAdBlock:!!(null==e?void 0:e.redirected)||void 0!==t}}},98914:(e,t,l)=>{l.d(t,{M:()=>s});let s=function(e,t=0){var l,s,r;return(l="round",s=e,0==+(r=-t)?Math[l](+s):(r*=1,isNaN(s*=1)||"number"!=typeof r||r%1!=0)?NaN:+((s=(s=Math[l](+((s=s.toString().split("e"))[0]+"e"+(s[1]?s[1]-r:-r)))).toString().split("e"))[0]+"e"+(s[1]?+s[1]+r:r))).toFixed(t)}}}]);