!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]="4226af4e-555a-41b9-a471-fb08f415ab0f",e._sentryDebugIdIdentifier="sentry-dbid-4226af4e-555a-41b9-a471-fb08f415ab0f")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[19432],{5635:(e,t,s)=>{"use strict";s.d(t,{r:()=>o});var i=s(6029),n=s(28349),a=s(76356),r=s(90248),l=s(52466);let o=e=>{let{isOpen:t,onClick:s}=e;return(0,i.jsx)(a.so,{align:"center",justify:"center",p:"lg",children:(0,i.jsx)(a.I4.button,{onClick:s,padding:"0",cursor:"pointer",children:(0,i.jsxs)(a.so,{align:"center",children:[(0,i.jsx)(n.EY,{textStyle:"display.small",color:"primary.default",children:(0,i.jsx)(r.A,{id:t?"see_less":"basic.seeMore"})}),t?(0,i.jsx)(l.t8v,{fill:"primary.default",ml:"xs"}):(0,i.jsx)(l.QtO,{fill:"primary.default",ml:"xs"})]})})})}},14676:(e,t,s)=>{"use strict";s.d(t,{_:()=>M});var i=s(6029),n=s(28349),a=s(76356),r=s(36882),l=s(70251),o=s(64006),d=s(90510);let c=e=>{let{stages:t}=e;if(!t||t.length<=1)return null;let s=t[0].startDateTimestamp,a=t[t.length-1],r=a.endDateTimestamp||a.startDateTimestamp,l=s&&r&&new Date(1e3*s).getMonth()===new Date(1e3*r).getMonth();return(0,i.jsxs)(n.EY,{textStyle:"assistive.default",color:"neutrals.nLv3",children:[s&&(0,i.jsx)(d.XU,{value:1e3*s,day:"numeric",month:l?void 0:"short"}),r&&(0,i.jsxs)(i.Fragment,{children:["\xa0 - \xa0",(0,i.jsx)(d.XU,{value:1e3*r,day:"numeric",month:"short"})]})]})};var u=s(21377),x=s(4967),h=s(55729),p=s(90248),g=s(52466),m=s(16480),j=s(51755),v=s(41442);let f=(0,s(62042).Fj)({base:{},variants:{status:{notStarted:{color:"neutrals.nLv3"},finished:{color:"neutrals.nLv3"},today:{color:"neutrals.nLv1"},live:{color:"status.live"}}}}),y=(0,a.I4)(a.so,f),L=e=>{let{stage:t}=e,s=t.substages||t.eventSubstages||[],r=s.length>0?s[s.length-1]:t,l=(null==r?void 0:r.startDateTimestamp)||t.startDateTimestamp;return(0,i.jsxs)(a.so,{px:"md",justify:"space-between",children:[l&&(0,i.jsxs)(n.EY,{textStyle:"body.small",color:"neutrals.nLv3",ml:"2xs",children:[(0,i.jsx)(g.ABt,{mr:"sm",fill:"currentcolor"}),(0,i.jsx)(d.XU,{value:1e3*l,...x.or.dateTime})," •"," ",(0,i.jsx)(v.N,{id:r.description})]}),t.winner&&(0,i.jsxs)(a.zt,{gap:"sm",flexShrink:0,children:[(0,i.jsx)(g.$dv,{fill:"sofaSingles.value"}),(0,i.jsx)(n.EY,{textStyle:"body.small",color:"neutrals.nLv3",children:t.winner.name})]})]})},b=e=>{let{stage:t,isTimeline:s,isLast:a}=e,r=null==t?void 0:t.startDateTimestamp;if(!r)return null;let l=t.status.type===u.hzM.inprogress,o=t.status.type===u.hzM.notstarted,c=(0,x.cK)(1e3*r);return(0,i.jsxs)(y,{position:"relative",gap:"sm",align:"center",status:(e=>{let{isLive:t,isToday:s,notStartedYet:i}=e;return t?"live":s&&i?"today":i?"notStarted":"finished"})({isLive:l,isToday:c,notStartedYet:o}),_before:{content:'""',bg:"neutrals.nLv3",w:"[1px]",h:"[10px]",position:"absolute",left:"[3px]",top:"[16px]",display:s&&!a?"block":"none"},children:[(0,i.jsx)(m.m,{status:t.status.type,isToday:c}),(0,i.jsxs)(n.EY,{textStyle:"body.small",color:"[currentcolor]",children:[l?(0,i.jsx)(p.A,{id:"live"}):c?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(p.A,{id:"today"}),", ",(0,i.jsx)(d.ib,{value:1e3*r})]}):(0,x.ef)(1e3*r)?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(p.A,{id:"tomorrow"}),", ",(0,i.jsx)(d.ib,{value:1e3*r})]}):(0,i.jsx)(d.XU,{value:1e3*r,...x.or.dateTime})," ","• ",(0,i.jsx)(v.N,{id:t.description})]})]})},S=e=>{let{substages:t,timelineOpened:s}=e,n=(0,j.VL)(t);return(0,i.jsx)(i.Fragment,{children:s?(0,i.jsx)(i.Fragment,{children:t.map((e,s)=>(0,i.jsx)(b,{stage:e,isTimeline:!0,isLast:s===t.length-1},e.id))}):(0,i.jsx)(b,{stage:n})})},w=e=>{let{stage:t}=e,[s,r]=(0,h.useState)(!1),l=t.substages||t.eventSubstages||[],o=(0,j.YQ)(t.status.type),d=l.some(e=>void 0!==e.startDateTimestamp);return(0,h.useEffect)(()=>{r(function(e){if(!e)return!1;let t=new Date,s=t.getDay(),i=new Date(t);i.setHours(0,0,0,0),i.setDate(t.getDate()+(0===s?-6:1-s));let n=new Date(i);return n.setDate(i.getDate()+6),n.setHours(23,59,59,999),e.some(e=>{let t=new Date(1e3*e);return t>=i&&t<=n})}(l.map(e=>e.startDateTimestamp).filter(e=>void 0!==e)))},[t]),(0,i.jsxs)(a.so,{px:"md",justify:"space-between",cursor:"pointer",onClick:e=>{!o&&d&&(r(e=>!e),e.stopPropagation(),e.preventDefault())},children:[(0,i.jsx)(a.BJ,{ml:"[6px]",mt:"xs",children:l.length<=1?(0,i.jsx)(b,{stage:t}):d?(0,i.jsx)(S,{substages:l,timelineOpened:s}):(0,i.jsx)(b,{stage:t})}),o?(0,i.jsx)(n.EY,{textStyle:"body.small",color:"status.error.default",children:(0,i.jsx)(p.A,{id:"canceled"})}):(0,i.jsx)(i.Fragment,{children:l.length>1&&d&&(0,i.jsx)(a.so,{w:"xl",h:"xl",color:"neutrals.nLv3",children:(0,i.jsx)(g.zQC,{icon:"chevron-down",fill:"onSurface.nLv3",style:{transition:"0.2s all",transform:"rotate(".concat(180*!!s,"deg)")}})})})]})},C=e=>{let{stage:t}=e;return t.status.type===u.hzM.finished?(0,i.jsx)(L,{stage:t}):(0,i.jsx)(w,{stage:t})};var T=s(62304);let M=e=>{var t,s;let{stage:d,sport:u,isSelected:x,isLast:h,onClick:p}=e,g=!!(null==(t=d.info)?void 0:t.borderColor);return(0,i.jsx)(o.LC,{stage:d,sportSlug:u,onClick:p,"data-stage-id":d.id,children:(0,i.jsx)(a.az,{py:"md",ps:"lg",bg:{base:"surface.s1",md:x?"neutral.highlight":"surface.s1"},mdDown:{elevation:"2",br:"lg",borderBottom:g?"2px solid var(--cycling-border-color)":"none",border:g?"2px solid var(--cycling-border-color)":"none"},md:{borderBottom:"1px solid",borderBottomColor:h?"[transparent]":"neutrals.nLv4",borderLeft:g?"[4px solid var(--cycling-border-color)]":void 0,_hover:{bg:"surface.s0"}},style:{"--cycling-border-color":null==(s=d.info)?void 0:s.borderColor},children:(0,i.jsxs)(a.BJ,{children:[(0,i.jsxs)(a.so,{justify:"space-between",children:[(0,i.jsxs)(a.zt,{children:[(0,i.jsx)(T.Q,{stage:d,size:24}),(0,i.jsxs)(a.BJ,{gap:"2xs",children:[(0,i.jsx)(n.EY,{textStyle:"body.large",lineHeight:1,children:d.description}),(0,i.jsx)(c,{stages:(null==d?void 0:d.substages)||(null==d?void 0:d.eventSubstages)||[]})]})]}),(0,i.jsx)(a.so,{w:"4xl",h:"2xl",align:"center",justify:"center",borderStart:"1px solid",borderColor:"neutrals.nLv4",flexShrink:0,children:(0,i.jsx)(l.x,{id:d.id,uniqueStage:d.uniqueStage,location:r.y.RacesTab})})]}),(0,i.jsx)(C,{stage:d})]})})})}},16480:(e,t,s)=>{"use strict";s.d(t,{b:()=>w,m:()=>j});var i=s(6029),n=s(21377),a=s(4967),r=s(28349),l=s(76356),o=s(90510),d=s(90248),c=s(74664),u=s(52466),x=s(36882),h=s(70251),p=s(64006),g=s(62304),m=s(41442);let j=e=>{let{status:t,isToday:s}=e;switch(t){case n.hzM.inprogress:return(0,i.jsx)(l.az,{minW:"sm",h:"sm",br:"[100%]",bg:"status.live"});case n.hzM.finished:return(0,i.jsx)(l.az,{minW:"sm",h:"sm",br:"[100%]",bg:"neutrals.nLv3"});default:return(0,i.jsx)(l.so,{align:"center",justify:"center",minW:"[8px]",h:"sm",br:"sm",bg:s?"neutrals.nLv1":"neutrals.nLv3",children:(0,i.jsx)(l.az,{w:"xs",h:"xs",br:"[100%]",bg:"surface.s1"})})}},v=e=>{let{startDateTimestamp:t,live:s}=e;return t?(0,i.jsx)(l.az,{flexGrow:1,flexShrink:0,children:(0,i.jsx)(r.EY,{textStyle:"body.small",color:s?"status.live":"neutrals.nLv3",lineHeight:1,children:(0,i.jsx)(o.XU,{value:1e3*t,...a.or.dateTime})})}):null},f=e=>{let{winner:t}=e;return t?(0,i.jsxs)(l.so,{gap:"sm",align:"center",children:[(0,i.jsx)(u.$dv,{fill:"sofaSingles.value"}),(0,i.jsx)(r.EY,{lineHeight:"1",textStyle:"body.small",color:"neutrals.nLv3",children:t.name})]}):null},y=e=>{let{description:t,live:s}=e;return t?(0,i.jsxs)(l.so,{gap:"sm",children:[(0,i.jsx)(r.EY,{textStyle:"body.small",lineHeight:1,color:s?"status.live":"neutrals.nLv3",children:"•"}),(0,i.jsx)(r.EY,{textStyle:"body.small",lineHeight:1,truncate:!0,maxW:{base:"[250px]",md:"[150px]",lg:"[200px]"},color:s?"status.live":"neutrals.nLv3",children:(0,i.jsx)(m.N,{id:t})})]}):null},L=e=>{let{live:t}=e;return t?(0,i.jsx)(l.so,{bg:"status.live",px:"sm",br:"lg",h:"lg",align:"center",children:(0,i.jsx)(r.EY,{lineHeight:1,textStyle:"assistive.default",color:"[white]",children:(0,i.jsx)(d.A,{id:"live"})})}):null},b=e=>{var t,s,a,o,c,u;let{stage:x,categoryId:h}=e,p=(null==(t=x.substage)?void 0:t.status.type)===n.hzM.canceled,m=(null==(s=x.substage)?void 0:s.status.type)===n.hzM.inprogress;return(0,i.jsxs)(l.so,{flexGrow:1,justify:"space-between",align:"center",children:[(0,i.jsxs)(l.BJ,{gap:"xs",flexGrow:1,children:[(0,i.jsxs)(l.so,{align:"center",gap:"md",children:[(0,i.jsx)(g.Q,{stage:x,size:16,categoryId:h}),(0,i.jsx)(r.EY,{textStyle:"body.small",lineHeight:1,children:x.name})]}),(0,i.jsxs)(l.so,{children:[(0,i.jsx)(l.az,{minW:"[28px]"}),(0,i.jsxs)(l.so,{flexGrow:1,justify:"space-between",wrap:"wrap",gap:"sm",children:[(0,i.jsxs)(l.so,{gap:"sm",align:"center",wrap:"wrap",children:[(0,i.jsx)(j,{status:null==(a=x.substage)?void 0:a.status.type}),(0,i.jsx)(v,{startDateTimestamp:null==(o=x.substage)?void 0:o.startDateTimestamp,live:m}),(0,i.jsx)(y,{description:null==(c=x.substage)?void 0:c.description,live:m})]}),(0,i.jsx)(l.so,{align:"center",children:p?(0,i.jsx)(r.EY,{textStyle:"body.small",color:"status.live",lineHeight:1,children:(0,i.jsx)(d.A,{id:"canceled"})}):(0,i.jsx)(f,{winner:null==(u=x.substage)?void 0:u.winner})})]})]})]}),(0,i.jsx)(L,{live:m})]})},S=e=>{var t,s;let{stage:a}=e;return(null==(t=a.substage)?void 0:t.winner)||(null==(s=a.substage)?void 0:s.status.type)===n.hzM.canceled?null:(0,i.jsxs)(l.so,{gap:"sm",flexShrink:0,children:[(0,i.jsx)(l.cG,{w:"[1px]",bg:"neutrals.nLv4"}),(0,i.jsx)(h.x,{id:a.id,uniqueStage:a.uniqueStage,location:x.y.MainMatches})]})},w=e=>{let{stage:t,categoryId:s}=e,n=(0,c.o)();return(0,i.jsx)(p.LC,{stage:t,sportSlug:n,children:(0,i.jsxs)(l.so,{justify:"space-between",px:"md",align:"center",pb:"md",gap:"xs",children:[(0,i.jsx)(b,{stage:t,categoryId:s}),(0,i.jsx)(S,{stage:t})]})},t.id)}},22180:(e,t,s)=>{var i=s(22926),n=s(68668),a=s(86152),r=s(82694),l=s(79860),o=s(48546);e.exports=function(e,t,s){var d=-1,c=n,u=e.length,x=!0,h=[],p=h;if(s)x=!1,c=a;else if(u>=200){var g=t?null:l(e);if(g)return o(g);x=!1,c=r,p=new i}else p=t?[]:h;e:for(;++d{"use strict";s.d(t,{d:()=>o});var i=s(6029);let n=e=>{let{fill:t="#CB1818"}=e;return(0,i.jsxs)("svg",{width:"16",height:"18",viewBox:"0 0 16 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,i.jsxs)("mask",{id:"mask0_14506_63640",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"16",height:"18",children:[(0,i.jsx)("mask",{id:"path-1-inside-1_14506_63640",fill:"white",children:(0,i.jsx)("path",{d:"M14.625 1.31152L15.75 6.7041L14.0625 7.85449V17C14.0625 17.5523 13.6148 18 13.0625 18H2.6875C2.13522 18 1.6875 17.5523 1.6875 17V7.85449L0 6.7041L1.125 1.31152L5.36523 0C5.82877 0.562604 6.77772 0.949219 7.875 0.949219C8.97197 0.949219 9.92011 0.562343 10.3838 0L14.625 1.31152Z"})}),(0,i.jsx)("path",{d:"M14.625 1.31152L15.75 6.7041L14.0625 7.85449V17C14.0625 17.5523 13.6148 18 13.0625 18H2.6875C2.13522 18 1.6875 17.5523 1.6875 17V7.85449L0 6.7041L1.125 1.31152L5.36523 0C5.82877 0.562604 6.77772 0.949219 7.875 0.949219C8.97197 0.949219 9.92011 0.562343 10.3838 0L14.625 1.31152Z",fill:"#D8D8D8"}),(0,i.jsx)("path",{d:"M14.625 1.31152L15.6039 1.1073L15.4835 0.530294L14.9204 0.356159L14.625 1.31152ZM15.75 6.7041L16.3133 7.53037L16.8654 7.15399L16.7289 6.49988L15.75 6.7041ZM14.0625 7.85449L13.4992 7.02822L13.0625 7.32594V7.85449H14.0625ZM2.6875 18L2.6875 19H2.6875V18ZM1.6875 7.85449H2.6875V7.32594L2.25078 7.02822L1.6875 7.85449ZM0 6.7041L-0.978924 6.49988L-1.11539 7.15399L-0.563277 7.53037L0 6.7041ZM1.125 1.31152L0.829508 0.356178L0.266442 0.530337L0.146076 1.1073L1.125 1.31152ZM5.36523 0L6.13702 -0.63588L5.71052 -1.15354L5.06974 -0.955345L5.36523 0ZM10.3838 0L10.6792 -0.955364L10.0387 -1.15342L9.61224 -0.636174L10.3838 0ZM14.625 1.31152L13.6461 1.51575L14.7711 6.90832L15.75 6.7041L16.7289 6.49988L15.6039 1.1073L14.625 1.31152ZM15.75 6.7041L15.1867 5.87783L13.4992 7.02822L14.0625 7.85449L14.6258 8.68076L16.3133 7.53037L15.75 6.7041ZM14.0625 7.85449H13.0625V17H14.0625H15.0625V7.85449H14.0625ZM14.0625 17H13.0625V18V19C14.1671 19 15.0625 18.1046 15.0625 17H14.0625ZM13.0625 18V17H2.6875V18V19H13.0625V18ZM2.6875 18L2.6875 17H2.6875H1.6875H0.6875C0.6875 18.1046 1.58293 19 2.6875 19L2.6875 18ZM1.6875 17H2.6875V7.85449H1.6875H0.6875V17H1.6875ZM1.6875 7.85449L2.25078 7.02822L0.563277 5.87783L0 6.7041L-0.563277 7.53037L1.12422 8.68076L1.6875 7.85449ZM0 6.7041L0.978924 6.90832L2.10392 1.51575L1.125 1.31152L0.146076 1.1073L-0.978924 6.49988L0 6.7041ZM1.125 1.31152L1.42049 2.26687L5.66073 0.955345L5.36523 0L5.06974 -0.955345L0.829508 0.356178L1.125 1.31152ZM5.36523 0L4.59345 0.63588C5.30943 1.50489 6.59356 1.94922 7.875 1.94922V0.949219V-0.0507812C6.96188 -0.0507812 6.3481 -0.379683 6.13702 -0.63588L5.36523 0ZM7.875 0.949219V1.94922C9.15673 1.94922 10.4395 1.5043 11.1553 0.636174L10.3838 0L9.61224 -0.636174C9.4007 -0.379615 8.78721 -0.0507812 7.875 -0.0507812V0.949219ZM10.3838 0L10.0884 0.955364L14.3296 2.26689L14.625 1.31152L14.9204 0.356159L10.6792 -0.955364L10.3838 0Z",fill:"#979797",mask:"url(#path-1-inside-1_14506_63640)"})]}),(0,i.jsxs)("g",{mask:"url(#mask0_14506_63640)",children:[(0,i.jsx)("rect",{width:"28",height:"4",transform:"translate(-6.125 -3.00012)",fill:"white"}),(0,i.jsx)("rect",{x:"1.875",y:"-3.00012",width:"4",height:"4",rx:"2",fill:t}),(0,i.jsx)("rect",{x:"9.875",y:"-3.00012",width:"4",height:"4",rx:"2",fill:t}),(0,i.jsx)("rect",{width:"28",height:"4",transform:"translate(-6.125 0.999878)",fill:"white"}),(0,i.jsx)("rect",{x:"-2.125",y:"0.999878",width:"4",height:"4",rx:"2",fill:t}),(0,i.jsx)("rect",{x:"5.875",y:"0.999878",width:"4",height:"4",rx:"2",fill:t}),(0,i.jsx)("rect",{x:"13.875",y:"0.999878",width:"4",height:"4",rx:"2",fill:t}),(0,i.jsx)("rect",{width:"28",height:"4",transform:"translate(-6.125 4.99988)",fill:"white"}),(0,i.jsx)("rect",{x:"1.875",y:"4.99988",width:"4",height:"4",rx:"2",fill:t}),(0,i.jsx)("rect",{x:"9.875",y:"4.99988",width:"4",height:"4",rx:"2",fill:t}),(0,i.jsx)("rect",{width:"28",height:"4",transform:"translate(-6.125 8.99988)",fill:"white"}),(0,i.jsx)("rect",{x:"-2.125",y:"8.99988",width:"4",height:"4",rx:"2",fill:t}),(0,i.jsx)("rect",{x:"5.875",y:"8.99988",width:"4",height:"4",rx:"2",fill:t}),(0,i.jsx)("rect",{x:"13.875",y:"8.99988",width:"4",height:"4",rx:"2",fill:t}),(0,i.jsx)("rect",{width:"28",height:"4",transform:"translate(-6.125 12.9999)",fill:"white"}),(0,i.jsx)("rect",{x:"1.875",y:"12.9999",width:"4",height:"4",rx:"2",fill:t}),(0,i.jsx)("rect",{x:"9.875",y:"12.9999",width:"4",height:"4",rx:"2",fill:t}),(0,i.jsx)("rect",{width:"28",height:"4",transform:"translate(-6.125 16.9999)",fill:"white"}),(0,i.jsx)("rect",{x:"-2.125",y:"16.9999",width:"4",height:"4",rx:"2",fill:t}),(0,i.jsx)("rect",{x:"5.875",y:"16.9999",width:"4",height:"4",rx:"2",fill:t}),(0,i.jsx)("rect",{x:"13.875",y:"16.9999",width:"4",height:"4",rx:"2",fill:t}),(0,i.jsx)("path",{d:"M1.6875 13.5H14.0625V17C14.0625 17.5523 13.6148 18 13.0625 18H2.6875C2.13522 18 1.6875 17.5523 1.6875 17V13.5Z",fill:"url(#paint0_linear_14506_63640)"}),(0,i.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M14.0628 7.86292L13.5003 8.22604L13.5003 0.960584L14.6281 1.31363L15.7461 6.6927L14.0628 7.86292Z",fill:"url(#paint1_linear_14506_63640)"}),(0,i.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M1.69977 7.86279L2.25026 8.22192V0.961919L1.11964 1.31001L-0.00195312 6.69699L1.69977 7.86279Z",fill:"url(#paint2_linear_14506_63640)"})]}),(0,i.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.25 7.54673V17.4245H13.5V7.54673L15.1202 6.44171L14.1442 1.7637L10.5457 0.650199C9.90399 1.21285 8.91119 1.52506 7.875 1.52506C6.83881 1.52506 5.84601 1.21285 5.20434 0.650199L1.60578 1.7637L0.62984 6.44171L2.25 7.54673ZM0 6.70377L1.125 1.31124L5.36263 2.41011e-08C5.82578 0.563289 6.7769 0.949588 7.875 0.949588C8.9731 0.949588 9.92422 0.563289 10.3874 0L14.625 1.31124L15.75 6.70377L14.0625 7.85472V17.4245C14.0625 17.7423 13.8107 18 13.5 18H2.25C1.93934 18 1.6875 17.7424 1.6875 17.4245V7.85472L0 6.70377Z",fill:"black","fill-opacity":"0.25"}),(0,i.jsxs)("defs",{children:[(0,i.jsxs)("linearGradient",{id:"paint0_linear_14506_63640",x1:"1.6875",y1:"13.5",x2:"1.6875",y2:"18",gradientUnits:"userSpaceOnUse",children:[(0,i.jsx)("stop",{"stop-opacity":"0.01"}),(0,i.jsx)("stop",{offset:"1","stop-opacity":"0.1"})]}),(0,i.jsxs)("linearGradient",{id:"paint1_linear_14506_63640",x1:"13.5003",y1:"8.22608",x2:"13.5003",y2:"1.12983",gradientUnits:"userSpaceOnUse",children:[(0,i.jsx)("stop",{"stop-opacity":"0.1"}),(0,i.jsx)("stop",{offset:"1","stop-opacity":"0.01"})]}),(0,i.jsxs)("linearGradient",{id:"paint2_linear_14506_63640",x1:"2.25026",y1:"8.44651",x2:"2.25026",y2:"1.34994",gradientUnits:"userSpaceOnUse",children:[(0,i.jsx)("stop",{"stop-opacity":"0.1"}),(0,i.jsx)("stop",{offset:"1","stop-opacity":"0.01"})]})]})]})},a=e=>{let{fill:t}=e;return(0,i.jsxs)("svg",{width:"16",height:"18",viewBox:"0 0 16 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,i.jsxs)("mask",{id:"mask0_14506_63652",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"16",height:"18",children:[(0,i.jsx)("mask",{id:"path-1-inside-1_14506_63652",fill:"white",children:(0,i.jsx)("path",{d:"M14.625 1.31152L15.75 6.7041L14.0625 7.85449V17C14.0625 17.5523 13.6148 18 13.0625 18H2.6875C2.13522 18 1.6875 17.5523 1.6875 17V7.85449L0 6.7041L1.125 1.31152L5.36523 0C5.82877 0.562604 6.77772 0.949219 7.875 0.949219C8.97197 0.949219 9.92011 0.562343 10.3838 0L14.625 1.31152Z"})}),(0,i.jsx)("path",{d:"M14.625 1.31152L15.75 6.7041L14.0625 7.85449V17C14.0625 17.5523 13.6148 18 13.0625 18H2.6875C2.13522 18 1.6875 17.5523 1.6875 17V7.85449L0 6.7041L1.125 1.31152L5.36523 0C5.82877 0.562604 6.77772 0.949219 7.875 0.949219C8.97197 0.949219 9.92011 0.562343 10.3838 0L14.625 1.31152Z",fill:"#D8D8D8"}),(0,i.jsx)("path",{d:"M14.625 1.31152L15.6039 1.1073L15.4835 0.530294L14.9204 0.356159L14.625 1.31152ZM15.75 6.7041L16.3133 7.53037L16.8654 7.15399L16.7289 6.49988L15.75 6.7041ZM14.0625 7.85449L13.4992 7.02822L13.0625 7.32594V7.85449H14.0625ZM2.6875 18L2.6875 19H2.6875V18ZM1.6875 7.85449H2.6875V7.32594L2.25078 7.02822L1.6875 7.85449ZM0 6.7041L-0.978924 6.49988L-1.11539 7.15399L-0.563277 7.53037L0 6.7041ZM1.125 1.31152L0.829508 0.356178L0.266442 0.530337L0.146076 1.1073L1.125 1.31152ZM5.36523 0L6.13702 -0.63588L5.71052 -1.15354L5.06974 -0.955345L5.36523 0ZM10.3838 0L10.6792 -0.955364L10.0387 -1.15342L9.61224 -0.636174L10.3838 0ZM14.625 1.31152L13.6461 1.51575L14.7711 6.90832L15.75 6.7041L16.7289 6.49988L15.6039 1.1073L14.625 1.31152ZM15.75 6.7041L15.1867 5.87783L13.4992 7.02822L14.0625 7.85449L14.6258 8.68076L16.3133 7.53037L15.75 6.7041ZM14.0625 7.85449H13.0625V17H14.0625H15.0625V7.85449H14.0625ZM14.0625 17H13.0625V18V19C14.1671 19 15.0625 18.1046 15.0625 17H14.0625ZM13.0625 18V17H2.6875V18V19H13.0625V18ZM2.6875 18L2.6875 17H2.6875H1.6875H0.6875C0.6875 18.1046 1.58293 19 2.6875 19L2.6875 18ZM1.6875 17H2.6875V7.85449H1.6875H0.6875V17H1.6875ZM1.6875 7.85449L2.25078 7.02822L0.563277 5.87783L0 6.7041L-0.563277 7.53037L1.12422 8.68076L1.6875 7.85449ZM0 6.7041L0.978924 6.90832L2.10392 1.51575L1.125 1.31152L0.146076 1.1073L-0.978924 6.49988L0 6.7041ZM1.125 1.31152L1.42049 2.26687L5.66073 0.955345L5.36523 0L5.06974 -0.955345L0.829508 0.356178L1.125 1.31152ZM5.36523 0L4.59345 0.63588C5.30943 1.50489 6.59356 1.94922 7.875 1.94922V0.949219V-0.0507812C6.96188 -0.0507812 6.3481 -0.379683 6.13702 -0.63588L5.36523 0ZM7.875 0.949219V1.94922C9.15673 1.94922 10.4395 1.5043 11.1553 0.636174L10.3838 0L9.61224 -0.636174C9.4007 -0.379615 8.78721 -0.0507812 7.875 -0.0507812V0.949219ZM10.3838 0L10.0884 0.955364L14.3296 2.26689L14.625 1.31152L14.9204 0.356159L10.6792 -0.955364L10.3838 0Z",fill:"#979797",mask:"url(#path-1-inside-1_14506_63652)"})]}),(0,i.jsx)("g",{mask:"url(#mask0_14506_63652)",children:(0,i.jsx)("rect",{width:"15.75",height:"32",transform:"translate(0 -7)",fill:t})}),(0,i.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.25 7.54673V17.4245H13.5V7.54673L15.1202 6.44171L14.1442 1.7637L10.5457 0.650199C9.90399 1.21285 8.91119 1.52506 7.875 1.52506C6.83881 1.52506 5.84601 1.21285 5.20434 0.650199L1.60578 1.7637L0.62984 6.44171L2.25 7.54673ZM0 6.70377L1.125 1.31124L5.36263 2.41011e-08C5.82578 0.563289 6.7769 0.949588 7.875 0.949588C8.9731 0.949588 9.92422 0.563289 10.3874 0L14.625 1.31124L15.75 6.70377L14.0625 7.85472V17.4245C14.0625 17.7423 13.8107 18 13.5 18H2.25C1.93934 18 1.6875 17.7424 1.6875 17.4245V7.85472L0 6.70377Z",fill:"black","fill-opacity":"0.25"}),(0,i.jsx)("path",{d:"M1.6875 13.5H14.0625V17C14.0625 17.5523 13.6148 18 13.0625 18H2.6875C2.13522 18 1.6875 17.5523 1.6875 17V13.5Z",fill:"url(#paint0_linear_14506_63652)"}),(0,i.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M14.0628 7.86292L13.5003 8.22604L13.5003 0.960584L14.6281 1.31363L15.7461 6.6927L14.0628 7.86292Z",fill:"url(#paint1_linear_14506_63652)"}),(0,i.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M1.69977 7.86279L2.25026 8.22192V0.961919L1.11964 1.31001L-0.00195312 6.69699L1.69977 7.86279Z",fill:"url(#paint2_linear_14506_63652)"}),(0,i.jsxs)("defs",{children:[(0,i.jsxs)("linearGradient",{id:"paint0_linear_14506_63652",x1:"1.6875",y1:"13.5",x2:"1.6875",y2:"18",gradientUnits:"userSpaceOnUse",children:[(0,i.jsx)("stop",{"stop-opacity":"0.01"}),(0,i.jsx)("stop",{offset:"1","stop-opacity":"0.1"})]}),(0,i.jsxs)("linearGradient",{id:"paint1_linear_14506_63652",x1:"13.5003",y1:"8.22608",x2:"13.5003",y2:"1.12983",gradientUnits:"userSpaceOnUse",children:[(0,i.jsx)("stop",{"stop-opacity":"0.1"}),(0,i.jsx)("stop",{offset:"1","stop-opacity":"0.01"})]}),(0,i.jsxs)("linearGradient",{id:"paint2_linear_14506_63652",x1:"2.25026",y1:"8.44651",x2:"2.25026",y2:"1.34994",gradientUnits:"userSpaceOnUse",children:[(0,i.jsx)("stop",{"stop-opacity":"0.1"}),(0,i.jsx)("stop",{offset:"1","stop-opacity":"0.01"})]})]})]})};var r=s(32033);let l={"tour-de-france":{young:"#FFFFFF",general:"#FFE418",sprint:"#15B168",climb:"#CB1818"},"giro-ditalia":{young:"#FFFFFF",general:"#FF286E",sprint:"#98458C",climb:"#374DF5"},"vuelta-a-espana":{young:"#FFFFFF",general:"#C8102E",sprint:"#00A651",climb:"#0066CC"}};function o(e){var t;let{shirt:s}=e,{stage:o}=(0,r.a)();if("climb"===s&&("tour-de-france"===o.slug||"vuelta-a-espana"===o.slug))return(0,i.jsx)(n,{fill:l[o.slug].climb});let d=null==(t=l[o.slug])?void 0:t[s];return d?(0,i.jsx)(a,{fill:d}):null}},25747:(e,t,s)=>{"use strict";s.d(t,{M:()=>p});var i=s(6029),n=s(21377),a=s(15480),r=s(75837),l=s(92589),o=s(78148),d=s(38253),c=s(70941),u=s(68789),x=s(32033);let h=e=>{let{stage:t}=e,s=(0,u.Ae)(),{stage:n}=(0,x.a)(),{data:l,isLoading:c,error:h}=(0,o.K)(n.id);if(c)return(0,i.jsx)(a.t,{provider:s});if(!l||h)return null;let p={...l[0],choices:l.map(e=>e.choice)};return(0,i.jsx)(r.C,{stage:t,children:(0,i.jsx)(d.W,{market:p,stage:n})})},p=e=>{let{stage:t,isFeaturedOdds:s=!1}=e,o=(0,u.Ae)(),{stage:p}=(0,x.a)(),{data:g,isLoading:m,error:j}=(0,l.r)(p.id);if(m)return(0,i.jsx)(a.t,{provider:o});if(j||!g)return null;let v=function(e,t){let s=(0,c.tP)(t),i=t.status.type===n.hzM.inprogress;return e.find(e=>{var n;return e.marketId===s&&e.isLive===i&&(null==(n=e.stage)?void 0:n.id)===t.id})}(g,t);return s||void 0===v?(0,i.jsx)(h,{stage:t}):(0,i.jsx)(r.C,{stage:t,children:(0,i.jsx)(d.W,{market:v,stage:t})})}},32033:(e,t,s)=>{"use strict";s.d(t,{K:()=>r,a:()=>l});var i=s(6029),n=s(55729);let a=(0,n.createContext)(void 0),r=e=>{let{children:t,stage:s}=e;return(0,i.jsx)(a.Provider,{value:{stage:s},children:t})},l=()=>{let e=(0,n.useContext)(a);if(!e)throw Error();return e}},38253:(e,t,s)=>{"use strict";s.d(t,{W:()=>y});var i=s(6029),n=s(28349),a=s(76356),r=s(17763),l=s(22909),o=s(64046),d=s(78151),c=s(49519),u=s(21377),x=s(12927);let h=e=>{let{choice:t}=e;return(0,i.jsx)(a.so,{w:"100%",justify:"center",children:(0,i.jsx)(x.A,{team:t.team,outrightType:u.SNJ.Competitor,children:(0,i.jsxs)(a.az,{w:"2xl",h:"2xl",position:"relative",br:"50%",color:"neutrals.nLv4",children:[(0,i.jsx)(c.p,{id:t.team.id,name:t.team.name,w:32,h:32,br:"50%",style:{border:"1px solid currentcolor"}}),void 0!==t.team.country&&(0,i.jsx)(c.w,{alpha2:t.team.country.alpha2,w:16,h:16,style:{position:"absolute",right:"0",bottom:"0"}})]})})})};var p=s(11036),g=s(99012);let m=e=>{let{market:t,stage:s}=e,{ref:n,onSendClickImpression:r}=(0,g.A)({stageId:s.id,category:d.zK[s.type.id],location:d.ew.StageResults,position:o.ki.OddsValue,type:o.jF.Additional,status:s.status.type});return(0,i.jsx)(a.so,{gap:"sm",ref:n,children:t.choices.slice(0,3).map(e=>(0,i.jsxs)(a.BJ,{gap:"xs",flexGrow:1,w:"[0px]",children:[(0,i.jsx)(h,{choice:e}),(0,i.jsx)(p.K,{market:t,choice:e,label:e.team.nameCode||e.team.shortName||e.name,onClick:r})]},e.id))})};var j=s(50526),v=s(68789),f=s(63464);let y=e=>{let{market:t,stage:s}=e,c=(0,v.Ae)();return(0,i.jsxs)(a.BJ,{children:[(0,i.jsx)(r.A,{countryOddsProvider:c,children:(0,i.jsxs)(a.BJ,{children:[(0,i.jsxs)(a.so,{justify:"space-between",align:"center",children:[(0,i.jsx)(n.EY,{textStyle:"display.micro",children:(0,i.jsx)(f.C,{market:t,stage:s})}),(0,i.jsx)(l.p,{id:s.id,location:d.ew.StageResults,category:d.Nu[s.type.id],type:o.jF.Additional})]}),(0,i.jsx)(m,{market:t,stage:s})]})}),(0,i.jsx)(j.A,{})]})}},51755:(e,t,s)=>{"use strict";s.d(t,{CS:()=>a,Jx:()=>o,VL:()=>r,YQ:()=>l});var i=s(21377);let n=["vuelta-a-espana","tour-de-france","giro-ditalia"],a=e=>{let t=Math.floor(Date.now()/1e3),s=e.filter(e=>e.status.type===i.hzM.inprogress),a=s.find(e=>n.some(t=>e.slug===t));if(a)return a;if(s.length>0)return s[0];let r=e.filter(e=>{switch(e.status.type){case i.hzM.finished:var t;return(null!=(t=e.endDateTimestamp)?t:0)!==0;case i.hzM.notstarted:return 0!==e.startDateTimestamp;default:return!1}});if(r.length>0)return r.reduce((e,s)=>{var n,a,r,l;let o=Math.abs(t-(e.status.type===i.hzM.finished?null!=(n=e.endDateTimestamp)?n:0:null!=(a=e.startDateTimestamp)?a:0));return Math.abs(t-(s.status.type===i.hzM.finished?null!=(r=s.endDateTimestamp)?r:0:null!=(l=s.startDateTimestamp)?l:0))e.status.type===i.hzM.notstarted);return l||(e.length>0?e[e.length-1]:null)},r=e=>{let t=e[0],s=Number.MAX_VALUE,n=Date.now()/1e3;for(let a=0;a[i.hzM.canceled,i.hzM.cancelled,i.hzM.postponed].indexOf(e)>-1,o=e=>["MotoGP","Moto3","Moto2","Superbike"].indexOf(e)>-1?"riders.bikes":e.toLowerCase().indexOf("cycling")>-1?"cycling_rider":"drivers"},54521:(e,t,s)=>{"use strict";s.d(t,{C:()=>r});var i=s(55729),n=s(494),a=s(72753);function r(e){let t=(0,i.useMemo)(()=>(0,a.vt)(),[]);return(0,n.d4)(t,e)}},54804:(e,t,s)=>{"use strict";s.d(t,{E:()=>u});var i=s(6029),n=s(28349),a=s(76356),r=s(90248),l=s(64046),o=s(22909),d=s(78151),c=s(20725);let u=e=>{let{stageId:t,location:s,stageTypeId:u}=e,{countryOddsProvider:x}=(0,c.D)();return(null==x?void 0:x.branded)?(0,i.jsx)(a.so,{justify:"flex-end",children:(0,i.jsxs)(a.so,{gap:"sm",align:"center",children:[(0,i.jsx)(n.EY,{textStyle:"body.small",color:"neutrals.nLv3",children:(0,i.jsx)(r.A,{id:"featured_by"})}),(0,i.jsx)(o.p,{id:t,location:s,category:d.Nu[u],type:l.jF.Additional})]})}):null}},56737:(e,t,s)=>{"use strict";s.d(t,{UB:()=>I,GO:()=>eb,CS:()=>M.CS,VL:()=>M.VL});var i=s(6029),n=s(21377),a=s(55729),r=s(45860),l=s(46222),o=s(18970),d=s(8329),c=s(28349),u=s(99064),x=s(41735),h=s(15340),p=s(36882),g=s(64006),m=s(94156),j=s(76356),v=s(74664);let f={[n.QCR.Motorsport]:4,[n.QCR.Cycling]:4},y=()=>{var e;let t=null!=(e=f[(0,v.o)()])?e:4;return(0,i.jsx)(i.Fragment,{children:[...Array(t)].map((e,t)=>(0,i.jsx)(j.az,{h:"4xl",display:{base:"none",mdDown:"block"}},t))})};var L=s(4967),b=s(90510),S=s(90248),w=s(52466),C=s(70251),T=s(41442),M=s(51755),_=s(62304);let A=e=>(0,i.jsx)(u.az,{display:"inline-block",w:8,h:8,bg:"onSurface.nLv3",br:"50%",...e,children:e.isHollow&&(0,i.jsx)(u.az,{bg:"surface.s1",w:4,h:4,m:2,br:"50%"})}),E=e=>{let{stageId:t,fallbackRace:s}=e,{data:l}=(0,r.Ay)(n.dVR.substages(t)),o=(0,a.useMemo)(()=>l?(0,M.VL)(l.stages):s||null,[t,l,s]);if(!o)return null;if(!o.startDateTimestamp)return(0,i.jsx)(u.so,{minH:"32"});let d=((e,t)=>{switch(e){case n.hzM.inprogress:return"sofaSingles.live";case n.hzM.finished:default:return"onSurface.nLv3"}})(o.status.type);return(0,i.jsxs)(u.so,{pt:"xs",pb:"md",pr:"sm",children:[(0,i.jsx)(u.az,{children:(0,i.jsx)(A,{w:8,h:8,bg:d,my:"xs",mr:"sm",isHollow:![n.hzM.inprogress,n.hzM.finished].includes(o.status.type)})}),(0,i.jsxs)(u.EY,{lineHeight:"16px",font:"body.small",color:d,lineClamp:1,children:[o.startDateTimestamp&&(0,i.jsx)(b.XU,{value:1e3*o.startDateTimestamp,...L.or.dateTime}),l?(0,i.jsxs)(i.Fragment,{children:[o.startDateTimestamp&&o.description&&" • ",(0,i.jsx)(T.N,{id:o.description})]}):null]})]})},z=e=>{let{stage:t}=e;return(0,M.YQ)(t.status.type)?(0,i.jsx)(u.EY,{pt:"xs",pb:"md",lineHeight:"16px",font:"body.small",color:"error.default",children:(0,i.jsx)(S.A,{id:t.status.type})}):t.winner?(0,i.jsxs)(u.so,{pt:"xs",pb:"md",pr:"0",align:"center",children:[(0,i.jsx)(u.az,{children:(0,i.jsx)(w.$dv,{fill:"onSurface.nLv3",mr:"xs"})}),(0,i.jsx)(u.EY,{as:"bdi",lineHeight:"16px",font:"body.small",color:"onSurface.nLv3",lineClamp:1,children:t.winner.name})]}):null},k=e=>{let{stage:t,selected:s,small:r,isFirst:l}=e,d=(0,a.useContext)(o.Ws);return(0,i.jsx)(g.LC,{stage:t,sportSlug:d,children:(0,i.jsxs)(u.az,{borderTop:[void 0,l||r?void 0:"onSurface.nLv4"],py:"xs",px:"sm",h:[90,"auto",90],hoverBg:"surface.s2",bg:r?void 0:["surface.s1",s?"neutral.highlight":void 0],mt:[l?"md":"sm",0],mx:r?void 0:["sm",0],br:r?void 0:["sm",0],elevation:r?void 0:[2,void 0],children:[(0,i.jsxs)(u.so,{h:[48,"auto",48],py:6,align:"center",justify:"space-between",px:"lg",children:[(0,i.jsx)(_.Q,{stage:t}),(0,i.jsx)(u.EY,{style:{flexGrow:1},font:"body.large",color:"onSurface.nLv1",ml:"lg",children:t.description}),(0,i.jsx)(u.cG,{vertical:!0,mx:"md"}),(0,i.jsx)(C.x,{id:t.id,uniqueStage:t.uniqueStage,location:r?p.y.MainMatches:p.y.RacesTab})]}),(0,i.jsxs)(u.so,{align:"center",justify:"space-between",pl:"56px",pr:["xs","lg"],children:[(0,i.jsx)(E,{stageId:t.id,fallbackRace:d===n.QCR.Cycling?t:void 0}),!r&&(0,i.jsx)(z,{stage:t})]})]})})},D=(0,x.default)(u.so).withConfig({componentId:"sc-a40480ec-0"})({"& > *":{width:"100%"}}),V=e=>{let{uniqueStage:t,selected:s,selectedEventStageId:r,isFirst:l}=e,x=(0,a.useContext)(o.Ws),{isMobile:j}=(0,c.$c)();return(0,i.jsxs)(u.az,{borderTop:l?void 0:"onSurface.nLv4",hoverBg:"surface.s2",bg:s?[void 0,"neutral.highlight"]:void 0,children:[(0,i.jsxs)(u.so,{cursor:"pointer",justify:"space-between",children:[(0,i.jsx)(D,{w:"100%",children:(0,i.jsx)(g.So,{uniqueStage:t,sportSlug:x,children:(0,i.jsxs)(u.so,{p:"md",align:"center",children:[(0,i.jsx)(d.w,{name:t.name,categoryId:t.category.id,size:24}),(0,i.jsx)(u.EY,{lineHeight:"24px",font:"body.large",color:"onSurface.nLv1",ml:"xl",children:(0,i.jsx)(m.c,{entity:t})})]})})}),j&&(0,i.jsxs)(u.so,{py:"sm",px:"md",children:[(0,i.jsx)(u.cG,{vertical:!0,color:"onSurface.nLv4",mr:"md"}),(0,i.jsx)(h.e,{entity:n.bq7.UniqueStages,id:t.id,location:p.y.MainLeagues,type:p.b.UniqueStages})]})]}),!j&&t.featuredStages&&t.featuredStages.map(e=>(0,i.jsx)(k,{stage:e,selected:r===e.id,small:!0},e.id))]})},H=e=>{var t;let{data:s,error:a}=(0,r.Ay)(n.ZXN.uniqueStages(e.categoryId));if(void 0===s&&!a)return(0,i.jsx)(y,{});if(a||!(null==s||null==(t=s.uniqueStages)?void 0:t.length))return null;let l=((e,t)=>{let s=t.reduce((e,t)=>{if(t.uniqueStage){let s=t.uniqueStage.id;e[s]?e[s].push(t):e[s]=[t]}return e},{});return e.forEach(e=>{s[e.id]&&(e.featuredStages=s[e.id])}),e})(s.uniqueStages,e.featuredStages);return(0,i.jsx)(i.Fragment,{children:l.map(t=>(0,i.jsx)(V,{isFirst:e.isFirst,uniqueStage:t,selected:!!e.selectedUniqueStageId&&e.selectedUniqueStageId===t.id,selectedEventStageId:e.selectedEventStageId},t.id))})},U=e=>{let{categories:t,selectedUniqueStageId:s,selectedEventStageId:n,featuredStages:a}=e;return(0,i.jsx)(i.Fragment,{children:t.sort((e,t)=>{let s=(t.priority||0)-(e.priority||0);return 0===s?t.name{var r;return(0,i.jsx)(H,{categoryId:e.id,isFirst:!t,featuredStages:null!=(r=null==a?void 0:a.stages)?r:[],selectedUniqueStageId:s,selectedEventStageId:n},e.id)})})},I=e=>{let{selectedUniqueStageId:t,selectedEventStageId:s}=e,d=(0,a.useContext)(o.Ws),{data:c,error:u}=(0,r.Ay)(n.t3g.categories(d)),{data:x}=(0,r.Ay)(n.dVR.featuredStages(d),{refreshInterval:6e4});return(null==c?void 0:c.categories)&&!u?(0,i.jsx)(l.BU,{children:(0,i.jsxs)(l.Zp,{children:[(0,i.jsx)(l.Zp.Header,{titleId:"tournament.series"}),(0,i.jsx)(U,{categories:c.categories,featuredStages:x,selectedEventStageId:s,selectedUniqueStageId:t}),(0,i.jsx)(l.Zp.Footer,{})]})}):null};var Z=s(62042),F=s(494),Y=s(62389),O=s(95084),R=s(72753),q=s(53594),P=s(33398);let B=e=>{let{id:t,location:s}=e,r=(0,a.useMemo)(()=>(0,q.Uy)(),[]),l=(0,F.d4)(e=>r(e,t)),o=(0,F.d4)(R.fg),d=(0,F.wA)();return(0,i.jsx)(P.A,{disabled:o,isFollowed:l,onClick:()=>{l?(d((0,Y.q$)(n.bq7.UniqueStages,t)),(0,O.g2)({id:t,type:p.b.UniqueStages,location:s,isFollowed:!1})):(d((0,Y.UQ)(n.bq7.UniqueStages,t)),(0,O.g2)({id:t,type:p.b.UniqueStages,location:s,isFollowed:!0}))}})},N=e=>{let{seasons:t,activeSeasonId:s,setActiveSeasonId:a}=e,r=(0,v.o)(),l=t[0].uniqueStage;return l?(0,i.jsx)(j.so,{justify:"space-between",bg:{mdDown:"surface.s1"},children:(0,i.jsxs)(j.so,{w:"100%",px:"lg",py:"sm",justify:"space-between",align:"center",children:[(0,i.jsxs)(j.zt,{gap:{base:"md",md:"lg"},children:[r!==n.QCR.Cycling&&(0,i.jsx)(d.w,{name:l.name,categoryId:l.category.id,size:40}),(0,i.jsxs)(j.BJ,{gap:"xs",pt:{md:"2xs"},children:[(0,i.jsx)(c.EY,{textStyle:"assistive.default",lineHeight:1,children:(0,i.jsx)(m.c,{entity:l})}),(0,i.jsx)(j.az,{className:(0,Z.AH)({"& button":{padding:"0","&:focus:not(:active)":{boxShadow:"[none]"}}}),children:(0,i.jsx)(c.ms,{label:"Select competition season in unique stage header",items:t,negative:!0,selectedItem:t.find(e=>e.id===s),onSelectedItemChange:e=>a(e.selectedItem.id),renderItem:(e,t)=>e?t?(0,i.jsx)(c.EY,{textStyle:"display.large",children:e.year||e.description}):(0,i.jsx)(i.Fragment,{children:e.year||e.description}):null})})]})]}),(0,i.jsx)(B,{id:l.id,location:p.y.Header})]})}):null};var J=s(56132);let K={};async function W(e,t){try{let s=await (0,n.TtD)(n.dVR.extended(t));if(e===n.QCR.Cycling){let e=s.stage.substages;if(void 0===e)return[];return e.reduce((e,t)=>{var s;return e.concat(null!=(s=t.substages)?s:[])},[])}return s.stage.substages||[]}catch(e){return[]}}var G=s(93640),Q=s(31830),X=s(92673),$=s(81495),ee=s(37455),et=s(80055),es=s(6813),ei=s(92589),en=s(54804),ea=s(78151),er=s(173),el=s(53148),eo=s(5635),ed=s(60376),ec=s(99012),eu=s(20725),ex=s(70941),eh=s(64046),ep=s(8785);let eg=e=>{let{market:t,stage:s}=e,[r,l]=(0,a.useState)("hidden"),{countryOddsProvider:o}=(0,eu.D)(),{ref:d,onSendClickImpression:u}=(0,ec.A)({stageId:s.id,category:ea.Df.Season,location:ea.ew.CategoryInfo,position:eh.ki.OddsValue,type:eh.jF.Additional,status:n.XUj.InProgress});if((0,a.useEffect)(()=>{if(t.marketId===ea.On.ToWinOutrightConstructorChampionship)return void l("hidden");l("few-visible")},[t]),!o)return null;let x=["all-visible","hidden"].includes(r);return(0,i.jsxs)(j.BJ,{mdDown:{p:"sm"},ref:d,children:[(0,i.jsxs)(j.BJ,{gap:"lg",mdDown:{bg:"surface.s1",p:"md",br:"md",elevation:"2"},children:[(0,i.jsx)(c.EY,{textStyle:"display.small",children:(0,i.jsx)(S.A,{id:"motorsport_odds_championship_winner"})}),(0,i.jsx)(j.BJ,{children:(0,ex.JJ)(t.choices,x).map(e=>(0,i.jsxs)(j.so,{align:"center",children:[(0,i.jsx)(j.az,{flex:"[1 1 0px]",children:(0,i.jsx)(ed.i,{choice:e})}),(0,i.jsx)(j.az,{flex:"[1 1 0px]",children:(0,i.jsx)(el.i,{hideChoiceName:!0,choice:{...e,change:(0,ex.zN)(e)},countryOddsProvider:o,betSlipLink:(0,ep.Iz)(e,t,o),isLive:t.isLive,onClick:u})})]},e.team.id))}),"hidden"!==r&&(0,i.jsx)(eo.r,{isOpen:"all-visible"===r,onClick:()=>l(e=>"all-visible"===e?"few-visible":"all-visible")})]}),(0,i.jsx)(er.z,{provider:o,showTailingRegulation:!0})]})},em=e=>{let{markets:t,stage:s}=e,[r,l]=(0,a.useState)(ea.On.ToWinOutrightDriverChampionship),o=t.find(e=>e.marketId===r);return(0,i.jsx)(j.BJ,{gap:"md",md:{p:"md",bg:"surface.s1"},children:(0,i.jsxs)(u.tU,{value:r,onChange:e=>l(e),variant:"secondary",children:[(0,i.jsx)(j.az,{mdDown:{p:"sm",borderBottom:"1px solid",borderColor:"neutrals.nLv4",bg:"surface.s1"},children:(0,i.jsxs)(u.tU.List,{children:[(0,i.jsx)(u.tU.Tab,{tabKey:ea.On.ToWinOutrightDriverChampionship,children:(0,i.jsx)(S.A,{id:"drivers"})}),(0,i.jsx)(u.tU.Tab,{tabKey:ea.On.ToWinOutrightConstructorChampionship,children:(0,i.jsx)(S.A,{id:"teams"})})]})}),void 0!==o?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(j.az,{mdDown:{px:"sm"},children:(0,i.jsx)(en.E,{stageId:s.id,stageTypeId:n.CEM.Season,location:ea.ew.CategoryInfo})}),(0,i.jsx)(u.tU.Panel,{tabKey:ea.On.ToWinOutrightDriverChampionship,children:(0,i.jsx)(eg,{market:o,stage:s})}),(0,i.jsx)(u.tU.Panel,{tabKey:ea.On.ToWinOutrightConstructorChampionship,children:(0,i.jsx)(eg,{market:o,stage:s})})]}):(0,i.jsx)(es.p,{graphic:"no-data",titleMessageId:"No odds"})]})})},ej=e=>{let{currentSeason:t}=e,{data:s,error:n,isLoading:a}=(0,ei.r)(t.id);return a?(0,i.jsx)(j.az,{h:"[900px]"}):n||!s?(0,i.jsx)(j.az,{md:{bg:"surface.s1"},children:(0,i.jsx)(es.p,{graphic:"no-data",titleMessageId:"No odds"})}):(0,i.jsx)(em,{markets:s,stage:t})};var ev=s(14676);let ef=e=>{let{stages:t}=e,{selectedEventStageId:s}=(0,G.F)(),n=(0,v.o)();return(0,i.jsx)(j.so,{direction:"column",mdDown:{p:"sm",gap:"sm"},children:t.map((e,a)=>(0,i.jsx)(ev._,{stage:e,sport:n,isSelected:s===e.id,isLast:a===t.length-1},e.id))})},ey=e=>{let{activeSeasonId:t,setActiveStage:s}=e,{selectedEventStageId:l}=(0,G.F)(),{stages:o,loading:d,error:c}=(e=>{let t=(0,v.o)(),{data:s,error:i,isLoading:a}=(0,r.Ay)(["STAGE_SPORT_EXTENDED_SUBSTAGES",n.dVR.extended(e)],()=>W(t,e));return{stages:s||[],error:i,loading:a}})(t);return((0,a.useEffect)(()=>{s(o.find(e=>e.id===l)||null)},[o,l]),c||d)?(0,i.jsx)(j.az,{h:"[900px]"}):(0,i.jsx)(ef,{stages:o})},eL=e=>{let{activeSeasonId:t,activeTab:s,setActiveTab:r,seasons:l}=e,o=(0,v.o)(),d=(0,Q.A)(),{shouldShowOddsTab:c,setActiveStage:x}=(()=>{let[e,t]=(0,a.useState)(null),s=(0,F.d4)(ee.BF),i=(0,F.d4)((0,ee.ce)(e));return{shouldShowOddsTab:!s&&i,setActiveStage:t}})(),h=l[0],p=h.uniqueStage,g=c&&(null==p?void 0:p.id)===$.h.F1;return p?(0,i.jsxs)(u.tU,{variant:"primary",fullWidthTabs:!0,value:s,onChange:e=>{r(e)},children:[(0,i.jsx)(j.az,{color:"onColor.primary",bg:"surface.s1",children:(0,i.jsxs)(u.tU.List,{underline:!0,children:[(0,i.jsx)(u.tU.Tab,{tabKey:J.x.Races,onClick:e=>{e.nativeEvent.isTrusted&&(0,O.yy)({id:p.id,location:J.C.UniqueStagePage,type:J.x.Races})},children:(0,i.jsx)(S.A,{id:"races"})}),o!==n.QCR.Cycling&&(0,i.jsx)(u.tU.Tab,{tabKey:J.x.Rankings,onClick:e=>{e.nativeEvent.isTrusted&&(0,O.yy)({id:p.id,location:J.C.UniqueStagePage,type:J.x.Rankings})},children:(0,i.jsx)(S.A,{id:"app.standings"})}),g&&(0,i.jsx)(u.tU.Tab,{tabKey:J.x.Odds,onClick:e=>{e.nativeEvent.isTrusted&&(0,O.yy)({id:p.id,location:J.C.UniqueStagePage,type:J.x.Odds})},children:(0,i.jsx)(S.A,{id:"odds"})})]})}),(0,i.jsx)(u.tU.Panel,{tabKey:J.x.Races,children:(0,i.jsx)(ey,{activeSeasonId:t,setActiveStage:e=>x(e)})}),(0,i.jsx)(u.tU.Panel,{tabKey:J.x.Rankings,children:(0,i.jsx)(j.az,{bg:"surface.s1",children:(0,i.jsx)(X.n,{stageId:t,uniqueStageName:(0,et.s)(p,d)})})}),(0,i.jsx)(u.tU.Panel,{tabKey:J.x.Odds,children:(0,i.jsx)(ej,{currentSeason:h})})]}):null},eb=()=>{let{seasons:e,error:t,loading:s}=(()=>{let{selectedUniqueStageId:e}=(0,G.F)(),{data:t,error:s,isLoading:i}=(0,r.Ay)(n.qLD.seasons(e));return{seasons:(null==t?void 0:t.seasons)||[],error:s,loading:i}})(),{activeTab:d,setActiveTab:c,activeSeasonId:u,setActiveSeasonId:x}=(()=>{let{selectedSeasonId:e}=(0,G.F)(),[t,s]=(0,a.useState)(e),[i,l]=(0,a.useState)(J.x.Races),[d,c]=function(e){let t=(0,a.useContext)(o.Ws)===n.QCR.Cycling,{data:s}=(0,r.Ay)(n.dVR.substages(e)),{data:i}=(0,r.Ay)(t&&s?s.stages.map(e=>n.dVR.substages(e.id)):null,{fetcher:async e=>(await Promise.allSettled(e.map(n.TtD))).map(e=>"fulfilled"===e.status?e.value:null).filter(Boolean)}),l=null==i?void 0:i.map((e,t)=>(e.stages.forEach(e=>{if(e.stageParent&&(null==s?void 0:s.stages[t].stageParent)){var i;K[e.stageParent.id]=null==s||null==(i=s.stages[t].stageParent)?void 0:i.id}}),e.stages)).flat().sort((e,t)=>e.startDateTimestamp&&t.startDateTimestamp?e.startDateTimestamp-t.startDateTimestamp:0);return t?[l,K]:[null==s?void 0:s.stages,K]}(t);return{activeSeasonId:t,setActiveSeasonId:s,activeTab:i,setActiveTab:l,races:d,stageMapping:c}})();return s?(0,i.jsx)(j.az,{h:"[900px]"}):t?null:(0,i.jsxs)(l.Zp,{variant:"desktop-only",children:[(0,i.jsx)(N,{seasons:e,activeSeasonId:u,setActiveSeasonId:x}),(0,i.jsx)(eL,{activeTab:d,setActiveTab:c,seasons:e,activeSeasonId:u})]})}},59018:(e,t,s)=>{var i=s(22180);e.exports=function(e){return e&&e.length?i(e):[]}},62304:(e,t,s)=>{"use strict";s.d(t,{Q:()=>r});var i=s(6029),n=s(8329),a=s(41735);let r=e=>{var t,s;let{stage:r,size:l=24,national:o,categoryId:d}=e,c=(0,a.useTheme)();return(null==(t=r.info)?void 0:t.discipline)==="World Tour 1 Grand Tour"?(0,i.jsx)("img",{width:l,height:l,src:"/static/images/cycling/".concat(r.slug,"-").concat(c.name,".png"),alt:r.name,style:{objectFit:"contain"}}):(0,i.jsx)(n.w,{alpha2:null==(s=r.country)?void 0:s.alpha2,categoryId:d,size:l,national:o,fallback:(0,i.jsx)(n.w,{categoryId:1506,size:l})})}},63464:(e,t,s)=>{"use strict";s.d(t,{C:()=>o,T:()=>l});var i=s(6029),n=s(21377),a=s(90248),r=s(97340);let l=e=>{var t;let{market:s,stage:n}=e,r=(null==(t=n.uniqueStage)?void 0:t.slug)==="cycling-women"?"F":"M";switch(s.marketName){case"To Win Outright":return(0,i.jsx)(a.A,{id:"cycling_odds_race_winner",values:{gender:r}});case"Race Winner":case"To Win Stage":return(0,i.jsx)(a.A,{id:"cycling_odds_stage_winner",values:{gender:r,n:n.sequence}});default:return null}},o=e=>{var t;return(null==(t=e.stage.uniqueStage)?void 0:t.category.sport.slug)===n.QCR.Cycling?(0,i.jsx)(l,{...e}):(0,i.jsx)(r.f,{id:e.market.marketName})}},78148:(e,t,s)=>{"use strict";s.d(t,{K:()=>l});var i=s(21377),n=s(4967),a=s(45860),r=s(78151);let l=e=>{let{data:t,isLoading:s,error:l}=(0,a.Ay)(i.dVR.featuredOdds(e,r.z4),{refreshInterval:15*n.Z2});return{data:null==t?void 0:t.featured,error:l,isLoading:s}}},78551:(e,t,s)=>{"use strict";s.d(t,{p:()=>u});var i=s(6029),n=s(8329),a=s(28349),r=s(76356),l=s(12927),o=s(23405);let d={Disqualified:"DSQ"},c=e=>{var t,s,o,d;let{row:c,isDisabled:u}=e,x="Peloton"===c.team.name;return x?(0,i.jsxs)(r.BJ,{gap:"2xs",flexGrow:1,children:[(0,i.jsxs)(r.zt,{gap:"sm",children:[(0,i.jsx)(a.EY,{color:u?"neutrals.nLv3":"neutrals.nLv1",textStyle:"table.medium",children:c.team.name}),!x&&(0,i.jsx)(n.w,{alpha2:(null==(o=c.team.country)?void 0:o.alpha2)||"international",size:12})]}),(0,i.jsx)(a.EY,{textStyle:"assistive.micro",color:"neutrals.nLv3",children:null==(d=c.parentTeam)?void 0:d.name})]}):(0,i.jsx)(l.A,{team:c.team,style:{flexGrow:1},children:(0,i.jsxs)(r.BJ,{gap:"2xs",flexGrow:1,children:[(0,i.jsxs)(r.zt,{gap:"sm",children:[(0,i.jsx)(a.EY,{color:u?"neutrals.nLv3":"neutrals.nLv1",textStyle:"table.medium",children:c.team.name}),(0,i.jsx)(n.w,{alpha2:(null==(t=c.team.country)?void 0:t.alpha2)||"international",size:12})]}),(0,i.jsx)(a.EY,{textStyle:"assistive.micro",color:"neutrals.nLv3",children:null==(s=c.parentTeam)?void 0:s.name})]})})},u=e=>{let{row:t,statsValue:s,positionKey:n="position",isLast:l}=e,u=!!t.comment;return(0,i.jsx)(r.VJ,{inline:"sm",children:(0,i.jsxs)(r.zt,{gap:"lg",p:"sm",h:"4xl",borderBottom:"1px solid",borderBottomColor:l?"[transparent]":"neutrals.nLv4",children:[(0,i.jsx)(a.EY,{color:u?"neutrals.nLv3":"neutrals.nLv1",textStyle:"body.medium",textAlign:"center",w:"xl",children:u?"-":t[n]||"-"}),(0,i.jsx)(c,{row:t,isDisabled:u}),t.shirt&&(0,i.jsx)(o.d,{shirt:t.shirt}),u?(0,i.jsx)(a.EY,{color:"neutrals.nLv3",textAlign:"center",w:"4xl",textStyle:"table.medium",children:d[t.comment]||t.comment}):(0,i.jsx)(i.Fragment,{children:s||(0,i.jsxs)(r.zt,{children:[(0,i.jsx)(a.EY,{textAlign:"center",w:"4xl",textStyle:"table.medium",children:t.time||"-"}),(0,i.jsx)(a.EY,{textAlign:"center",w:"4xl",textStyle:"table.medium",children:t.gap||"-"})]})})]})})}},79860:(e,t,s)=>{var i=s(31736),n=s(78383),a=s(48546);e.exports=i&&1/a(new i([,-0]))[1]==1/0?function(e){return new i(e)}:n},92589:(e,t,s)=>{"use strict";s.d(t,{r:()=>l});var i=s(21377),n=s(4967),a=s(45860),r=s(78151);let l=e=>{let{data:t,isLoading:s,error:l}=(0,a.Ay)(i.dVR.allOdds(e,r.z4),{refreshInterval:15*n.Z2});return{data:null==t?void 0:t.markets,error:l,isLoading:s}}},92673:(e,t,s)=>{"use strict";s.d(t,{n:()=>q});var i=s(6029),n=s(32523),a=s(21377),r=s(21501),l=s(99064),o=s(90248),d=s(45860),c=s(6813),u=s(70344),x=s(51755),h=s(4967),p=s(28349),g=s(76356),m=s(55729),j=s(90510),v=s(46222),f=s(18970),y=s(52466);function L(e){let{children:t,closedHeight:s=64,...n}=e,[a,r]=(0,m.useState)(!1),[l,d]=(0,m.useState)(0),c=(0,m.useCallback)(()=>r(e=>!e),[]),{mediaBreakpoint:u}=(0,p.$c)(),x=(0,m.useRef)(null);(0,m.useEffect)(()=>{var e;d((null==x||null==(e=x.current)?void 0:e.scrollHeight)||0)},[x,t,u]);let h=l>s;return(0,i.jsxs)(g.az,{...n,children:[(0,i.jsx)(p.EY,{textStyle:"body.small",color:"neutrals.nLv1",lineClamp:!a&&h?4:void 0,ref:x,display:"block",children:t}),h&&(0,i.jsx)(g.az,{cursor:"pointer",onClick:c,mt:"sm",children:(0,i.jsxs)(p.EY,{textStyle:{base:"assistive.default",md:"display.small"},color:"action.primary.default",textAlign:"end",display:"block",children:[(0,i.jsx)(o.A,{id:a?"show_less":"show_more"}),a?(0,i.jsx)(y.t8v,{ml:"xs",fill:"action.primary.default"}):(0,i.jsx)(y.QtO,{ml:"xs",fill:"action.primary.default"})]})})]})}var b=s(64183);let S=JSON.parse('{"3":{"gap":"gap"},"4":{"gap":"gap"},"5":{"gap":"gap"},"victories":"wins","points":"Pts","sprint":"Pts","climb":"Pts","youngRider":"young_rider","gap":"time","lapTime":"bestLap","totalTime":"time","Finished":"stage_result_finished","Accident":"stage_result_accident","Fuelpump":"stage_result_fuelpump","Reargear":"stage_result_reargear","Electrical":"stage_result_electrical","Transmission":"stage_result_transmission","Garage":"stage_result_garage","Clutch":"stage_result_clutch","Brakes":"stage_result_brakes","Engine":"stage_result_engine","Suspension":"stage_result_suspension","Tooslow":"stage_result_too_slow"}');var w=s(91113);let C=e=>{let{id:t,selectedStageTypeId:s,children:n}=e,a=(0,w.O)(S,t,"".concat(s));return(0,i.jsx)(o.A,{id:a,children:e=>"function"==typeof n?n(e):(0,i.jsx)(i.Fragment,{children:e})})};var T=s(18858),M=function(e){return e.Time="time",e.Young="young",e.Sprint="sprint",e.Climb="climb",e}({});let _=(e,t)=>{let s=((e,t)=>{if(t===a.CEM.Season)return{victories:!1,polePositions:!1,podiums:!1,points:!0};if(!e)return{};let{gridPosition:s,pitStops:i,laps:n,gap:r,lapTime:l,lapsLed:o,status:d,totalTime:c}=e,u={};return s&&(u.gridPosition=!0),i&&n&&void 0!==r?u={...u,pitStops:!0,laps:!0,points:!1,gap:!0}:n&&l&&void 0!==r?u={...u,laps:!0,lapTime:!0,points:!1,gap:!0}:n&&o&&d?u={...u,laps:!0,lapsLed:!0,points:!1,status:!0}:n&&void 0!==r&&c?u=u.gridPosition?{...u,laps:!0,points:!1,gap:!0}:{...u,laps:!0,gap:!0,points:!1,totalTime:!0}:n&&l?u={...u,laps:!0,points:!1,lapTime:!0}:n&&void 0!==r?u={...u,laps:!0,points:!1,gap:!0}:n?u={...u,points:!1,laps:!0}:void 0!==r&&(u={...u,points:!1,gap:!0}),u})(e[0],t);return e.reduce((e,t)=>(t.updatedAtTimestamp>e.updatedAtTimestamp&&(e.updatedAtTimestamp=t.updatedAtTimestamp),t.isLive&&(e.isLive=!0),Object.keys(s).forEach(s=>{t[s]&&(e.columns[s]=!0)}),e),{columns:{...s},isLive:!1,updatedAtTimestamp:0})};var A=s(32033),E=s(25747),z=s(78551),k=s(23405);let D={[M.Young]:"youngRider",[M.Sprint]:"sprint",[M.Climb]:"climb"},V={[M.Young]:"youngRiderPosition",[M.Sprint]:"sprintPosition",[M.Climb]:"climbPosition"},H=e=>{let{results:t,stageTypeId:s,outrightTeamType:n,uniqueStageName:r,info:d}=e,{stage:c}=(0,A.a)(),u=n===a.SNJ.Team,{isDesktop:v}=(0,p.$c)(),f=(0,T.Ay)({isInMobileTabs:!1,isSportMenuVisible:!0}),y=v?b.Rl+b.pB:f,{updatedAtTimestamp:S}=_(t,s),[w,H]=(0,m.useState)(M.Time),U={[w===M.Young?"time":w]:!0},I=Object.keys(U).filter(e=>!!U[e]),Z=t.some(e=>void 0!==e.youngRiderPosition||void 0!==e.youngRider),F=t.some(e=>void 0!==e.sprintPosition||void 0!==e.sprint),Y=t.some(e=>void 0!==e.climbPosition||void 0!==e.climb),O=Z||F||Y,R=t.filter(e=>w===M.Time||!!e.position&&e[V[w]]).sort((e,t)=>e[V[w]]&&t[V[w]]?e[V[w]]-t[V[w]]:0);return(0,i.jsxs)(g.az,{bg:"surface.s1",children:[O&&(0,i.jsx)(g.az,{borderTop:s===a.CEM.Season?void 0:[void 0,"onSurface.nLv4"],borderBottom:["onSurface.nLv4",void 0],px:"md",py:"sm",children:(0,i.jsxs)(g.BJ,{gap:"md",children:[(0,i.jsx)(E.M,{isFeaturedOdds:!0,stage:c}),(0,i.jsx)(g.az,{children:(0,i.jsxs)(l.tU,{value:w,variant:"tertiary",onChange:e=>{H(e)},children:[(0,i.jsx)(l.tU.Tab,{tabKey:M.Time,children:(0,i.jsxs)(g.zt,{h:"[14px]",gap:"xs",children:[(0,i.jsx)(k.d,{shirt:"general"}),(0,i.jsx)(o.A,{id:"general_classification_short"})]})}),F&&(0,i.jsx)(l.tU.Tab,{tabKey:M.Sprint,children:(0,i.jsxs)(g.zt,{h:"[14px]",gap:"xs",children:[(0,i.jsx)(k.d,{shirt:"sprint"}),(0,i.jsx)(o.A,{id:"cycling_sprint_standings"})]})}),Z&&(0,i.jsx)(l.tU.Tab,{tabKey:M.Young,children:(0,i.jsxs)(g.zt,{h:"[14px]",gap:"xs",children:[(0,i.jsx)(k.d,{shirt:"young"}),(0,i.jsx)(o.A,{id:"cycling_young_standings"})]})}),Y&&(0,i.jsx)(l.tU.Tab,{tabKey:M.Climb,children:(0,i.jsxs)(g.zt,{h:"[14px]",gap:"xs",children:[(0,i.jsx)(k.d,{shirt:"climb"}),(0,i.jsx)(o.A,{id:"cycling_climb_standings"})]})})]})})]})}),(0,i.jsx)(l.PI,{top:y,isStickingDisabled:v,children:e=>{var t;return(0,i.jsxs)(g.so,{px:"sm",h:"4xl",align:"center",bg:"surface.s1",elevation:e?"2":void 0,children:[(0,i.jsx)(g.so,{h:"lg",me:"sm",align:"center",children:(0,i.jsx)(p.EY,{w:"2xl",textStyle:"table.medium",color:"neutrals.nLv3",textAlign:"center",display:"block",children:(0,i.jsx)(o.A,{id:"position.short"})})}),(0,i.jsx)(g.so,{h:"lg",grow:1,me:"sm",align:"center",children:(0,i.jsx)(p.EY,{textStyle:"table.medium",color:"neutrals.nLv3",children:(0,i.jsx)(o.A,{id:u?"team":(0,x.Jx)(r),values:{gender:(null==(t=R[0].team)?void 0:t.gender)||a.YT8.Male}})})}),I.map(e=>(0,i.jsx)(p.EY,{w:"[80px]",textStyle:"table.medium",color:"neutrals.nLv3",textAlign:"center",children:(0,i.jsx)(C,{id:e},e)},e))]})}}),(0,i.jsx)(g.az,{px:"sm",pb:"lg",children:R.map((e,t)=>(0,i.jsx)(z.p,{row:e,statsValue:(0,i.jsx)(g.zt,{pe:"lg",children:(0,i.jsx)(p.EY,{textAlign:"center",w:"4xl",textStyle:"table.medium",children:"time"===w?e.totalTime||e.time||e.gap:e[D[w]]})}),isLast:t===R.length-1,positionKey:V[w]},e.id))}),(0,i.jsx)(p.EY,{display:"block",textStyle:"body.small",p:"lg",pb:"sm",textAlign:"end",children:(0,i.jsx)(o.A,{id:"basic.lastUpdated",values:{dateTime:(0,i.jsx)(j.XU,{value:1e3*S,...h.or.dateTime})}})}),(null==d?void 0:d.note)&&(0,i.jsx)(L,{p:"lg",pt:"sm",children:d.note})]})};var U=s(12927);let I=e=>{var t;let{fastestLapData:s,outrightTeamType:n}=e;return(0,i.jsx)(l.az,{p:"sm",children:(0,i.jsxs)(l.so,{br:"lg",bg:"surface.s2",p:"md",align:"center",children:[(0,i.jsx)(y._Ll,{mr:"md",fill:"#A32090"}),(0,i.jsxs)(l.az,{grow:1,children:[(0,i.jsx)(U.A,{team:s.team,outrightType:n,children:(0,i.jsx)(l.EY,{font:"table.medium",color:"onSurface.nLv1",as:"div",hover:!0,children:s.team.name})}),(0,i.jsx)(l.EY,{font:"assistive.micro",color:"onSurface.nLv3",as:"div",children:(null==(t=s.parentTeam)?void 0:t.name)||""})]}),s.time&&(0,i.jsxs)(l.az,{children:[(0,i.jsx)(l.EY,{font:"table.medium",color:"onSurface.nLv1",as:"div",children:s.time}),(0,i.jsx)(l.EY,{font:"assistive.micro",color:"onSurface.nLv3",as:"div",children:(0,i.jsx)(o.A,{id:"fastestLap.label"})})]})]})})};var Z=s(49519);let F=(e,t)=>{let s=28;return["gap","totalTime","lapTime","status","time"].includes(e)?s=80:"points"===e&&t&&(s=40),s},Y=e=>{var t,s,n,a;let{stageResults:r,columns:o,showImage:d,positionKey:c="position",isTeam:u,outrightType:x,showTeamColor:h,isHighlighted:p,isFirst:g,hasLongPoints:m}=e,j=u?r.team.teamColors.primary:null==(s=r.parentTeam)||null==(t=s.teamColors)?void 0:t.primary,v=!!r.status&&"Finished"!==r.status,f=!r.position||v,L=0;r.position&&(L=r.gridPosition?r.gridPosition-r.position:r.previousPosition?r.previousPosition-r.position:0);let b=Object.keys(o).filter(e=>o[e]),S=b.reduce((e,t)=>e+F(t,m),0);return(0,i.jsx)(U.A,{team:r.team,outrightType:x,children:(0,i.jsxs)(l.so,{h:48,align:"center",justify:"space-between",bg:p?"neutral.highlight":void 0,hoverBg:"surface.s2",cursor:"pointer",borderTop:g?void 0:"1px solid onSurface.nLv4",children:[h&&(0,i.jsx)(l.az,{bg:f?"neutral.default":j,minW:4,w:4,h:36,br:"0 2px 2px 0"}),(0,i.jsxs)(l.so,{h:32,direction:"column",align:"center",pl:"sm",pr:"lg",children:[(0,i.jsx)(y.kKd,{fill:L>0?"success.default":"transparent"}),(0,i.jsx)(l.EY,{w:16,font:"table.medium",color:f?"onSurface.nLv3":"onSurface.nLv1",align:"center",as:"div",children:r[c]||"-"}),(0,i.jsx)(y.kKd,{fill:L<0?"error.default":"transparent",style:{transform:"rotate(180deg)"}})]}),d&&(0,i.jsx)(l.az,{pr:"md",children:(0,i.jsx)(Z.p,{id:r.team.id,name:r.team.name,size:32})}),(0,i.jsxs)(l.so,{direction:"column",overflow:"hidden",flex:"1 1 auto",justify:"flex-start",children:[u&&(0,i.jsx)(l.EY,{as:"bdi",font:"table.medium",color:"onSurface.nLv1",lineClamp:1,children:r.team.name}),!u&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(l.so,{align:"center",mb:"xxs",children:[(0,i.jsx)(l.EY,{as:"bdi",font:"table.medium",color:f?"onSurface.nLv3":"onSurface.nLv1",mr:"xs",lineClamp:1,children:r.team.name}),(0,i.jsx)(Z.w,{alpha2:null==(n=r.team.country)?void 0:n.alpha2,national:!0,size:12,d:"inline-block"})]}),(null==r||null==(a=r.parentTeam)?void 0:a.name)&&(0,i.jsx)(l.EY,{as:"bdi",font:"assistive.micro",color:"onSurface.nLv3",lineClamp:1,ellipsis:!0,children:r.parentTeam.name})]})]}),(0,i.jsx)(l.so,{mr:"md",grow:1,maxW:S,justify:"space-between",children:b.map(e=>{let t=r[e]||(["gap","time"].includes(e)?"":0);return"status"===e&&(t=(0,i.jsx)(C,{id:t})),(0,i.jsx)(l.EY,{font:"table.medium",color:f?"onSurface.nLv3":"onSurface.nLv1",w:F(e,m),align:"right",children:t},e)})})]})})},O=e=>{let{results:t,fastestLapData:s,stageTypeId:n,outrightTeamType:r,uniqueStageName:d,highlightedTeamId:c,selectedStageType:u,info:m}=e,v=r===a.SNJ.Team,{columns:f,updatedAtTimestamp:y}=_(t,n),{isDesktop:S}=(0,p.$c)(),w=(0,T.Ay)({isInMobileTabs:!1,isSportMenuVisible:!0}),M=S?b.Rl+b.pB:w,A="Formula 1"===d,E=Object.keys(f).filter(e=>!!f[e]),z=t.some(e=>e.points&&e.points.toString().length>2);return(0,i.jsxs)(g.az,{pb:"sm",children:[(0,i.jsx)(p.EY,{display:"block",textStyle:"body.small",p:"sm",textAlign:"end",children:(0,i.jsx)(o.A,{id:"basic.lastUpdated",values:{dateTime:(0,i.jsx)(j.XU,{value:1e3*y,...h.or.dateTime})}})}),"Formula 1"===d&&s&&(0,i.jsx)(I,{fastestLapData:s,outrightTeamType:a.SNJ.Competitor}),(0,i.jsx)(l.PI,{top:M,isStickingDisabled:S,children:e=>(0,i.jsx)(g.az,{elevation:e?"2":void 0,bg:"surface.s1",children:(0,i.jsxs)(g.so,{h:"4xl",align:"center",pl:A?"xs":void 0,pr:"sm",children:[(0,i.jsx)(g.so,{h:"lg",mr:"sm",align:"center",children:(0,i.jsx)(p.EY,{w:"2xl",textStyle:"table.medium",color:"neutrals.nLv3",textAlign:"center",display:"block",children:(0,i.jsx)(o.A,{id:"position.short"})})}),(0,i.jsx)(g.so,{h:"lg",grow:1,mr:"sm",align:"center",children:(0,i.jsx)(p.EY,{textStyle:"table.medium",color:"neutrals.nLv3",children:(0,i.jsx)(o.A,{id:v?"team":(0,x.Jx)(d)})})}),E.map((e,t)=>(0,i.jsx)(g.so,{h:"lg",borderStart:t?"neutrals.nLv4":void 0,px:"sm",align:"center",children:(0,i.jsx)(p.EY,{textStyle:"table.medium",color:"neutrals.nLv3",textAlign:"center",children:(0,i.jsx)(C,{id:e,selectedStageTypeId:null==u?void 0:u.id},e)})},e))]})})}),t.map((e,t)=>(0,i.jsx)(Y,{stageResults:e,columns:f,showImage:n!==a.CEM.Event,showTeamColor:A,isTeam:v,outrightType:r,isHighlighted:e.team.id===c,isFirst:0===t,hasLongPoints:z},e.team.id)),(null==m?void 0:m.note)&&(0,i.jsx)(L,{p:"lg",pt:"sm",children:m.note})]})},R=e=>{let{stageId:t,stageTypeId:s,outrightTeamType:n,uniqueStageName:r,selectedStageType:l,info:o}=e,{data:u,error:x}=(0,d.Ay)(a.dVR.standings(t,n),{refreshInterval:15e3}),h=(0,m.useContext)(f.Ws),p=(0,m.useMemo)(()=>{let e=null==u?void 0:u.standings.find(e=>!!e.fastestLapTime);return e?{team:e.team,parentTeam:e.parentTeam,time:e.fastestLapTime}:void 0},[u]);return x?(0,i.jsx)(v.Zp,{variant:"mobile-only",children:(0,i.jsx)(c.p,{graphic:"no-standings",descriptionMessageId:"stats.noResults"})}):u?h===a.QCR.Cycling?(0,i.jsx)(H,{results:u.standings,stageTypeId:s,outrightTeamType:n,fastestLapData:p,uniqueStageName:r,info:o}):(0,i.jsx)(v.Zp,{variant:"mobile-only",children:(0,i.jsx)(O,{results:u.standings,stageTypeId:s,outrightTeamType:n,fastestLapData:p,uniqueStageName:r,selectedStageType:l,info:o})}):(0,i.jsx)(g.az,{p:"sm",h:"[1100px]",bg:"surface.s2"})};function q(e){let{stageId:t,uniqueStageName:s}=e,{data:h,error:p}=(0,d.Ay)([a.dVR.standings(t,a.SNJ.Competitor),"HEAD"],{fetcher:u.n}),{data:g}=(0,d.Ay)([a.dVR.standings(t,a.SNJ.Team),"HEAD"],{fetcher:u.n});return(0,r.hX)()||void 0===h&&!p?(0,i.jsx)(n.E,{uniqueKey:"unique-stage-container-cl",height:1179,py:"sm",animate:!0}):void 0===h||void 0===g?null:h&&g?(0,i.jsxs)(l.tU,{variant:"secondary",initialValue:1,children:[(0,i.jsxs)(l.so,{bg:"surface.s1",p:"sm",borderBottom:"onSurface.nLv4",children:[(0,i.jsx)(l.tU.Tab,{tabKey:1,children:(0,i.jsx)(o.A,{id:(0,x.Jx)(s)})}),(0,i.jsx)(l.tU.Tab,{tabKey:2,children:(0,i.jsx)(o.A,{id:"teams"})})]}),(0,i.jsx)(l.tU.Panel,{tabKey:1,children:(0,i.jsx)(R,{stageId:t,stageTypeId:a.CEM.Season,uniqueStageName:s,outrightTeamType:a.SNJ.Competitor})}),(0,i.jsx)(l.tU.Panel,{tabKey:2,children:(0,i.jsx)(R,{stageId:t,stageTypeId:a.CEM.Season,uniqueStageName:s,outrightTeamType:a.SNJ.Team})})]}):h?(0,i.jsx)(R,{stageId:t,stageTypeId:a.CEM.Season,uniqueStageName:s,outrightTeamType:a.SNJ.Competitor}):(0,i.jsx)(c.p,{graphic:"race-start",descriptionMessageId:"stats.noResults"})}},93640:(e,t,s)=>{"use strict";s.d(t,{F:()=>l,X:()=>r});var i=s(6029),n=s(55729);let a=(0,n.createContext)(void 0),r=e=>{let{children:t,...s}=e;return(0,i.jsx)(a.Provider,{value:{...s},children:t})},l=()=>{let e=(0,n.useContext)(a);if(!e)throw Error();return e}}}]);