!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]="07608b42-8fe8-4b97-b416-67656d8df39a",e._sentryDebugIdIdentifier="sentry-dbid-07608b42-8fe8-4b97-b416-67656d8df39a")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[40774],{25022:(e,t,r)=>{r.d(t,{r9:()=>i,Fx:()=>l,BE:()=>g,aQ:()=>a,ov:()=>c,KA:()=>b,bs:()=>d,d_:()=>v,TI:()=>function e(t,r,n,i,o,l){var a,c,d,u,x,f,g;if(null===n){let n=t.rounds.length-1;if(n>=0){if(t.rounds[n].type>=0&&(!/final/i.test(t.rounds[n].description)||1!==t.rounds[n].type)&&t.rounds[n].blocks.length>1)return e(function(e){let t=e.rounds.length-1;if(t>=0){let r=s()(e);for(;r.rounds[t].blocks.length>1;){let e=r.rounds[t],n={id:-1,order:e.order+1,description:"",type:-1,blocks:[]};e.blocks.forEach((e,t)=>{if(t%2==0){let r={blockId:e.blockId+9999,events:[],result:"",isHidden:!0,order:Math.ceil((t+1)/2),participants:[{sourceBlockId:e.blockId}]};n.blocks.push(r)}else n.blocks[n.blocks.length-1].participants.push({sourceBlockId:e.blockId})}),r.rounds.push(n),t=r.rounds.length-1}return r}return e}(t),r,null);if(0===t.rounds[n].blocks.length||1===t.rounds[n].blocks.length&&!t.rounds[n].blocks[0].participants){let s=p()(t),i=n;for(;i>=0&&!s.rounds[i].blocks.some(e=>e.participants.length>0);)s.rounds.pop(),i--;return e(s,r,null)}let i={...t.rounds[n].blocks[0]};i.roundIndex=n,i.participantDraw=t.rounds[n].participantDraw,2===t.rounds[n].blocks.length&&(i.thirdPlaceBlock={...t.rounds[n].blocks[1],roundIndex:n});let o=i.order||1,l=h(t)&&m(t);return i.left=e(t,r,null==(a=i.participants[0])?void 0:a.sourceBlockId,n-1,2*o-1,l),i.right=e(t,r,null==(c=i.participants[1])?void 0:c.sourceBlockId,n-1,2*o,l),i}}if("number"==typeof i){let s;if((s=l&&void 0!==n?null==(d=t.rounds[i])?void 0:d.blocks.find(e=>e.blockId===n):null==(u=t.rounds[i])?void 0:u.blocks.find(e=>e.order===o))&&s.blockId>0){let n=s.order||1;return(s.participantDraw=null==(x=t.rounds[i])?void 0:x.participantDraw,0===s.participants.length||2===s.participants.length)?{...s,roundIndex:i,left:e(t,r,null==(f=s.participants[0])?void 0:f.sourceBlockId,i-1,2*n-1,l),right:e(t,r,null==(g=s.participants[1])?void 0:g.sourceBlockId,i-1,2*n,l)}:{...s,roundIndex:i,left:e(t,r,void 0,i-1,2*n-1,l),right:e(t,r,void 0,i-1,2*n,l)}}}},y6:()=>function e(t){return t?Math.max(e(t.left),e(t.right))+1:0},P4:()=>f});var n=r(9922),s=r.n(n);let i=e=>{let{hasWinner:t,isFirstParticipantWinner:r,isSecondParticipantWinner:n,isLive:s,isSeriesInProgress:i}=e;return s?{firstParticipantName:"live",secondParticipantName:"live",firstParticipantScore:"live",secondParticipantScore:"live"}:{firstParticipantName:!t||r?"default":"secondary",secondParticipantName:!t||n?"default":"secondary",firstParticipantScore:i?"success":r?"default":"secondary",secondParticipantScore:i?"success":n?"default":"secondary"}};var o=r(21377);let l=e=>{let{firstParticipant:t,secondParticipant:r,block:n}=e,s=n.result===o.pq_.Walkover,i=n.result===o.pq_.Retired,l=!!(null==t?void 0:t.winner),a=!!(null==r?void 0:r.winner);return{isLive:!!n.eventInProgress,isSeriesInProgress:!n.finished,isRetired:i,isWalkover:s,isSpecial:i||s,isFirstParticipantWinner:l,isSecondParticipantWinner:a,hasWinner:l||a,hasScore:!!n.homeTeamScore&&!!n.awayTeamScore,hasStartTime:!!n.seriesStartDateTimestamp}},a=e=>{let t=[];return(e.forEach((e,r)=>{/qualif/i.test(e.name)&&e.rounds.filter(e=>e.type>=0).every(e=>e.blocks.every(e=>!1===e.eventInProgress||e.finished))&&t.push(r)}),t.length===e.length)?[]:t};function c(e,t){return function e(r){if(void 0===r)return 0;let n=0;return r.isHidden||(t&&r.participants.length>=1?n=1:2===r.participants.length&&(n=1)),n+e(null==r?void 0:r.left)+e(null==r?void 0:r.right)}(e)>0}let d=e=>e.type===o.FFH.Finals||e.type%2==0&&(e.type===o.FFH.ThirdPlace&&1===e.blocks.length||e.type<=8);var u=r(932),p=r.n(u);let h=e=>{if(e.rounds.some(e=>1!==e.blocks.length&&e.blocks.length%2!=0))return!0;let t=0;for(let r=0;re.rounds.some(e=>e.blocks.some(e=>e.participants.some(e=>e.sourceBlockId))),x=e=>/qualif|preliminary/i.test(e),f=(e,t)=>{let r,n=t||e.rounds;if(e.currentRound){var s;r=(null==(s=n[e.currentRound-1])?void 0:s.type)<=o.FFH.EighthFinals}if(!1===r||1===e.rounds.length&&1===e.rounds[0].type||e.rounds.length>0&&e.rounds[0].blocks.length>8)return!1;let i=e.rounds.filter(e=>!x(e.description));return!!i.length&&!(i.some(e=>e.blocks.some(t=>(t.order?t.order:0)>e.blocks.length))||i.every(e=>e.blocks.every(e=>e.participants.every(e=>e.team.disabled))))&&i.some(e=>e.blocks.some(e=>e.participants.length>0))};function g(e){let t=[];return e.forEach((e,r)=>{let n=new Set;e.blocks.forEach(e=>{e.participants.forEach(r=>{var s;if((null==r||null==(s=r.team)?void 0:s.id)&&!r.team.disabled){if(t.some(e=>e.has(r.team.id))||1===e.participants.length)return;n.add(r.team.id)}})}),t.push(n)}),t}function v(e,t,r){if(0===t)return!1;let n=null==r?void 0:r[t];if(n){var s;if((null==e||null==(s=e.team)?void 0:s.id)&&n.has(e.team.id))return!0}return!1}function b(e){return!!e&&e.some((e,t)=>t>0&&e.size>0)}},48686:(e,t,r)=>{r.d(t,{AK:()=>i,Dh:()=>n,GA:()=>u,Gj:()=>l,IT:()=>c,XV:()=>a,Yv:()=>s,ut:()=>o,zi:()=>d});let n=20,s=.2,i=1.5,o=4,l=32,a=658,c=880,d=80,u=16},73940:(e,t,r)=>{r.d(t,{eo:()=>ew,b8:()=>em,fT:()=>b,Y9:()=>I,eS:()=>ek,_4:()=>C,Vr:()=>eb,b2:()=>u,Cq:()=>ey,WR:()=>E,Xs:()=>ef,Bg:()=>ev,Dg:()=>ej});var n=r(6029),s=r(28349),i=r(76356),o=r(90248),l=r(68379),a=r(47530);let c=e=>{let{isColorless:t}=e;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(i.so,{mb:"sm",gap:"md",children:[(0,n.jsx)(l.J,{position:"relative",mt:"2xs",seed:1,colorless:t}),(0,n.jsx)(s.EY,{textStyle:"body.mediumParagraph",children:(0,n.jsx)(o.A,{id:"tennis_seeded_player"})})]}),(0,n.jsxs)(i.so,{mb:"sm",gap:"md",children:[(0,n.jsx)(l.J,{position:"relative",mt:"2xs",seed:"WC",colorless:t}),(0,n.jsx)(s.EY,{textStyle:"body.mediumParagraph",children:(0,n.jsx)(o.A,{id:"abbr.wc"})})]}),(0,n.jsxs)(i.so,{mb:"sm",gap:"md",children:[(0,n.jsx)(l.J,{position:"relative",mt:"2xs",seed:"LL",colorless:t}),(0,n.jsx)(s.EY,{textStyle:"body.mediumParagraph",children:(0,n.jsx)(o.A,{id:"abbr.ll"})})]}),(0,n.jsxs)(i.so,{mb:"sm",gap:"md",children:[(0,n.jsx)(l.J,{position:"relative",mt:"2xs",seed:"PR",colorless:t}),(0,n.jsx)(s.EY,{textStyle:"body.mediumParagraph",children:(0,n.jsx)(o.A,{id:"abbr.pr"})})]}),(0,n.jsxs)(i.so,{mb:"sm",gap:"md",children:[(0,n.jsx)(l.J,{position:"relative",mt:"2xs",seed:"Q",colorless:t}),(0,n.jsx)(s.EY,{textStyle:"body.mediumParagraph",children:(0,n.jsx)(o.A,{id:"abbr.qp"})})]}),(0,n.jsxs)(i.so,{mb:"sm",gap:"md",children:[(0,n.jsx)(l.J,{position:"relative",mt:"2xs",seed:"A",colorless:t}),(0,n.jsx)(s.EY,{textStyle:"body.mediumParagraph",children:(0,n.jsx)(o.A,{id:"abbr.a"})})]}),(0,n.jsxs)(i.so,{mb:"sm",gap:"md",children:[(0,n.jsx)(l.J,{position:"relative",mt:"2xs",seed:"SE",colorless:t}),(0,n.jsx)(s.EY,{textStyle:"body.mediumParagraph",children:(0,n.jsx)(o.A,{id:"abbr.se"})})]})]})},d={Quarterfinal:"1/4",Quarterfinals:"1/4",Semifinal:"1/2",Semifinals:"1/2",Final:"1/1","Round 1":"R1","Round 2":"R2","Round 3":"R3","Round 4":"R4","Round 5":"R5","Round 6":"R6","Round 7":"R7","Round 8":"R8","Round 9":"R9","Round 10":"R10","Qualification round 1":"QR1","Qualification round 2":"QR2","Qualification round 3":"QR3","Qualification round 4":"QR4","Qualification round 5":"QR5","Qualification round 6":"QR6","Preliminary round":"PR","Preliminary round 1":"PR1","Preliminary round 2":"PR2","Round of 16":"1/8","Round of 32":"1/16","Round of 64":"1/32","Round of 128":"1/64",R16:"1/8",R32:"1/16",R64:"1/32",R128:"1/64","1/8":"1/8","1/16":"1/16","1/32":"1/32","1/64":"1/64"};function u(e){let{roundName:t}=e;return t in d?(0,n.jsx)(n.Fragment,{children:d[t]}):(0,n.jsx)(a.rC,{roundName:t})}var p=r(21377),h=r(947),m=r(79387),x=r(19451),f=r(26331),g=r(73088),v=r(30479);let b=e=>{let{uniqueTournamentId:t,seasonId:r,cupTree:s,sport:l,categorySlug:a,uniqueTournamentSlug:c}=e,d=(0,h.A)(),u=(0,f.A)(),b=s.rounds.length,j=(()=>{switch(b){case 1:return 250;case 2:return 278;case 4:return 466;default:return 642}})(),y=s.id,k=s.name,w=(0,x.vf)(d.locale),S="".concat(p.yuv).concat(w?"/".concat(w):"","/embed/unique-tournament/").concat(t,"/season/").concat(r,"/cuptree/").concat(y),R="sofa-cupTree-embed-".concat(t,"-").concat(r,"-").concat(y),P="height:".concat(j+2+16+48+16+148,"px!important;max-width:700px!important;width:100%!important;"),T=(0,p.Lo9)(g.z.getTranslatedRoute(u,"uniqueTournament",{sport:l,category:a,tournament:c,id:t},(0,v.HL)({id:r})).route,{isApiRoute:!1}),E=d.formatMessage({id:"cupTree.embed.backLink"},{linkToSofascore:'Sofascore')}),I='\n
\n ').concat(E,"\n
");return(0,n.jsx)(i.az,{px:"sm",pb:"sm",children:(0,n.jsx)(m.C,{px:"0",callToAction:(0,n.jsx)(o.A,{id:"bracket_embed"}),embedString:I})})};var j=r(48683),y=r(55729),k=r(6354),w=r(20336),S=r(79154);let R={};var P=r(54409),T=r(54053);function E(){let[e,t]=(0,y.useState)(!1);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(i.az,{h:"xl",w:"xl",onClick:()=>t(!0),cursor:"pointer",children:(0,n.jsx)(P.G_L,{fill:"onSurface.nLv1"})}),(0,n.jsx)(T.A,{isOpen:e,setIsOpen:t,header:"tennis_seedings_title",children:(0,n.jsx)(i.az,{px:"lg",pt:"sm",maxW:{md:"[328px]"},children:(0,n.jsx)(c,{})})})]})}function I(e){let{id:t,name:r,sport:s,phaseSelector:o}=e,l=s===p.QCR.Tennis,a=function(e,t){let{uniqueTournamentId:r,uniqueTournamentName:n}=(0,y.useContext)(k.O),s=(0,h.A)();if(R[t])return R[t];let i=s.formatMessage({id:e||"tournament.cupTree"});if(!r||!n||!(r in S))return R[t]=i,i;let o=s.formatMessage({id:S[r]}),l=(0,w.t)(e,p.QCR.Football,s);return(l=l.replace(new RegExp("\\b".concat(n,"\\b")),o))===e?(R[t]=i,i):(R[t]=l,l)}(r,t),c=(0,n.jsx)(i.az,{position:"relative",h:"2xl",children:(0,n.jsxs)(i.so,{align:"center",gap:"sm",position:"absolute",right:"-xs",top:"0",children:[o,l&&(0,n.jsx)(E,{})]})});return(0,n.jsx)(j.Zp.Header,{variant:"left-aligned-desktop",title:(0,n.jsx)("bdi",{children:a}),actionComponent:c})}function C(){return(0,n.jsx)(i.so,{className:"cupTree-instruction-snackbar",position:"absolute",justify:"center",top:"[112px]",left:"0",w:"100%",children:(0,n.jsxs)(i.so,{align:"center",bg:"surface.t",px:"lg",py:"md",br:"lg",h:"4xl",children:[(0,n.jsx)(P.fRW,{fill:"surface.s1"}),(0,n.jsx)(s.EY,{ml:"md",textStyle:"body.medium",color:"surface.s1",children:(0,n.jsx)(o.A,{id:"bracket_zoom_snackbar"})})]})})}var D=r(99064),B=r(494),A=r(22648),L=r(89489),_=r(95211);function H(e){let[t,r]=(0,y.useState)(!1),l=e.block,a=(0,B.wA)(),c=(0,B.d4)(e=>l.events?l.events.map(t=>e.favorites.events[t]).filter(Boolean):[]);async function d(){try{if(l.events&&c.lengthp.nk6.fetchEvent(e)))).map(e=>{let{event:t}=e;return t});a((0,L.oU)(e)),r(!1)}}catch(e){r(!1)}}return(0,y.useEffect)(()=>{d()},[l.blockId,l.events]),(0,n.jsx)(i.az,{position:"absolute",left:"0",top:"[72px]",bg:"surface.s1",w:"[300px]",p:"sm",br:"sm",elevation:"3",zIndex:"popover",children:t?(0,n.jsx)(A.a,{}):c.length?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.EY,{textAlign:"center",display:"block",p:"sm",textStyle:"display.small",children:(0,n.jsx)(o.A,{id:"tournament.series",defaultMessage:"Series"})}),c.map(e=>(0,n.jsx)("div",{onClick:e=>{e.stopPropagation()},children:(0,n.jsx)(_.n6,{event:e,isNarrow:!0,isShort:!0,isShortDate:!0,children:null})},e.id)),(0,n.jsx)(s.$n,{w:"100%",variant:"clear",onClick:t=>{t.stopPropagation(),e.close()},children:(0,n.jsx)(o.A,{id:"close_window_button",defaultMessage:"Close"})})]}):(0,n.jsx)(o.A,{id:"basic.noEvents",defaultMessage:"No events"})})}var z=r(31710),F=r(41735),V=r(94497),Y=r(62827),M=r(48686);function N(){let e=(0,z._)(["\n > .connector-left,\n > .connector-right,\n > .connector-left-participant-draw,\n > .connector-right-participant-draw,\n > .connector-left:after,\n > .connector-right:after {\n border-color: ",";\n }\n "]);return N=function(){return e},e}let q=(0,F.default)(D.az).withConfig({componentId:"sc-540b4a21-0"})(["width:calc(100% - 2 * ","px);position:relative;right:",";left:",";margin:","px 0;&.participant-connector:after{content:'';display:block;position:absolute;top:50%;right:-","px;width:1px;height:var(--participant-connector-height);border-right:","px dashed ",";}> .connector-left{border-top:","px solid ",";border-right:",";border-left:",";animation:"," 0.2s ease-in-out;:after{content:'';display:block;position:absolute;bottom:0px;right:",";left:",";width:","px;height:0px;border-top:","px solid ",";}}> .connector-right{border-bottom:","px solid ",";border-right:",";border-left:",";animation:"," 0.2s ease-in-out;:after{content:'';display:block;position:absolute;top:0px;right:",";left:",";width:","px;height:0px;border-top:","px solid ",";}}> .connector-left-participant-draw{border-top:","px dashed ",";border-left:",";animation:"," 0.2s ease-in-out;}> .connector-right-participant-draw{border-bottom:","px dashed ",";border-left:",";animation:"," 0.2s ease-in-out;}",""],M.Dh,(0,Y.UR)("-".concat(M.Dh+4,"px"),"unset"),(0,Y.UR)("unset","-".concat(M.Dh+4,"px")),M.ut,M.Dh+1,M.ut,e=>e.theme.colors.surface.s2,M.ut,e=>e.theme.colors.surface.s1,e=>(0,Y.UR)("".concat(M.ut,"px solid ").concat(e.theme.colors.surface.s1),"unset"),e=>(0,Y.UR)("unset","".concat(M.ut,"px solid ").concat(e.theme.colors.surface.s1)),V.qG,(0,Y.UR)("-".concat(M.Dh+4,"px"),"unset"),(0,Y.UR)("unset","-".concat(M.Dh+4,"px")),M.Dh,M.ut,e=>e.theme.colors.surface.s1,M.ut,e=>e.theme.colors.surface.s1,e=>(0,Y.UR)("".concat(M.ut,"px solid ").concat(e.theme.colors.surface.s1),"unset"),e=>(0,Y.UR)("unset","".concat(M.ut,"px solid ").concat(e.theme.colors.surface.s1)),V.qG,(0,Y.UR)("-".concat(M.Dh+4,"px"),"unset"),(0,Y.UR)("unset","-".concat(M.Dh+4,"px")),M.Dh,M.ut,e=>e.theme.colors.surface.s1,M.ut,e=>e.theme.colors.surface.s1,e=>(0,Y.UR)("unset","".concat(M.ut,"px dashed ").concat(e.theme.colors.surface.s1)),V.qG,M.ut,e=>e.theme.colors.surface.s1,e=>(0,Y.UR)("unset","".concat(M.ut,"px dashed ").concat(e.theme.colors.surface.s1)),V.qG,e=>e.theme.breakpoints.query.mdMin(N(),e.theme.colors.surface.s2)),Q=(0,F.default)(D.az).withConfig({componentId:"sc-540b4a21-1"})(["transition:opacity 0.6s ease-in-out,width 0.2s ease-in-out,height 0.2s ease-in-out;position:relative;opacity:0;",""],e=>e.isVisibleRound&&"opacity: 1;"),U=(0,F.default)(D.so).withConfig({componentId:"sc-540b4a21-2"})(["user-select:none;position:relative;height:","px;border-radius:8px;width:72px;margin:14px 4px;flex-direction:column;::before{content:'';position:absolute;border-left:","px solid ",";bottom:","px;left:calc(50% - ","px);height:","px;","}::after{content:'';position:absolute;border-left:","px solid ",";top:","px;left:calc(50% - ","px);height:","px;","}"],M.zi,M.ut,e=>e.inCard?e.theme.colors.surface.s2:e.theme.colors.surface.s1,M.zi,M.ut/2,M.GA,e=>e.hideTopConnector&&"display: none;",M.ut,e=>e.inCard?e.theme.colors.surface.s2:e.theme.colors.surface.s1,M.zi,M.ut/2,M.GA,e=>e.hideBottomConnector&&"display: none;");var G=r(65078),W=r(13266),X=r(33144),J=r(94604),K=r(85986);let O=(0,r(62042).Fj)({variants:{variant:{default:{color:"neutrals.nLv1"},secondary:{color:"neutrals.nLv3"},live:{color:"status.live"},success:{color:"secondary.default"}}},defaultVariants:{variant:"default"}}),Z=(0,i.I4)("span",O),$=(0,i.I4)("bdi",O),ee="cupTreeHighlight-team",et=()=>(0,n.jsx)(i.az,{px:"sm",br:"sm",bg:"secondary.highlight",h:"md",w:"2xl",children:(0,n.jsx)(s.EY,{textStyle:"assistive.micro",color:"secondary.default",verticalAlign:"top",children:"BYE"})}),er=(0,y.memo)(function(e){var t,r;let{participant:s,seed:a,nameColor:c,scoreColor:d,score:u,isFirst:p,isNewEntrant:h,isEmptyBlock:m}=e,{showSingleParticipantByeBlocks:x}=(0,K.B)(),f=(null==s||null==(t=s.team)?void 0:t.id)||0,g=(null==(r=document)?void 0:r.dir)==="rtl",v=x&&(null==s?void 0:s.team)===void 0&&!m;return(0,n.jsxs)(i.so,{h:"[34px]",pl:{lgDown:"sm",lg:"md"},pr:{mdDown:"sm",md:u?"sm":void 0,lg:u?"md":void 0},pt:p?"sm":"xs",pb:p?"xs":"sm",align:"center",justify:"space-between",className:f?"".concat(ee,"-").concat(f):"",borderStartStartRadius:g?p&&u?"sm":void 0:p?"sm":void 0,borderStartEndRadius:g?p?"sm":void 0:p&&u?"sm":void 0,borderEndEndRadius:g?p?void 0:"sm":p||!u?void 0:"sm",borderEndStartRadius:g?p||!u?void 0:"sm":p?void 0:"sm",children:[(0,n.jsxs)(i.so,{w:"100%",align:"center",overflowX:"clip",h:"xl",children:[(0,n.jsx)(i.az,{position:"relative",children:v?(0,n.jsx)(i.az,{w:"xl",h:"xl"}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(X.p,{id:f,name:null==s?void 0:s.team.name,size:24,style:{verticalAlign:"top"}}),(0,n.jsx)(l.J,{seed:a,right:"[0px]",bottom:"-xs",h:"md",textStyle:"assistive.micro"})]})}),(0,n.jsx)($,{ml:"sm",variant:c,textStyle:"body.medium",truncate:!0,maxW:{mdDown:"[124px]",md:"[180px]"},children:v?(0,n.jsx)(et,{}):(null==s?void 0:s.team)?(0,n.jsxs)(n.Fragment,{children:[h&&(0,n.jsx)(P.UPF,{fill:"playoffs.promotionToX",w:"16",h:"16",mr:"xs",mt:"-1",style:{transform:g?"rotate(-90deg)":"rotate(90deg)",verticalAlign:"middle"}}),(0,n.jsx)(J.Rm,{team:s.team,short:!0})]}):(0,n.jsx)(o.A,{id:"label_to_be_determined",defaultMessage:"TBD"})})]}),u&&(0,n.jsx)(Z,{style:{whiteSpace:"nowrap"},variant:d,children:u})]})});var en=r(4967),es=r(90510);let ei=e=>{let{seriesStartDateTimestamp:t,isLive:r}=e,i=1e3*t,l=(0,en.cK)(i)||(0,en.ef)(i);return(0,n.jsx)(s.EY,{textStyle:"assistive.default",textAlign:"end",display:"block",pr:"sm",minW:"[52px]",color:r?"status.live":"neutrals.nLv3",children:r?(0,n.jsx)(o.A,{id:"inProgress"}):(0,n.jsxs)(n.Fragment,{children:[l?(0,n.jsx)(o.A,{id:(0,en.cK)(i)?"today":"tomorrow"}):(0,n.jsx)(es.XU,{day:"numeric",month:"short",value:i}),(0,n.jsx)("br",{}),(0,n.jsx)(es.ib,{value:i})]})})},eo=e=>{let{isRetired:t,isWalkover:r}=e;return(0,n.jsx)(s.EY,{textStyle:"assistive.default",display:"block",color:"neutrals.nLv3",px:"sm",truncate:!0,children:(0,n.jsx)(o.A,{id:r?"walkover":t?"retired":""})})},el=e=>{let{isFinals:t}=e;return(0,n.jsx)(i.az,{bg:t?"status.val":"neutral.default",br:"sm",position:"absolute",bottom:"[0px]",left:"[50%]",transform:{base:"translate(-50%,50%)",_rtl:"translate(50%,50%)"},pb:"2xs",children:(0,n.jsx)(s.EY,{textStyle:"assistive.micro",color:"surface.s1",px:"md",display:"block",children:(0,n.jsx)(o.A,{id:t?"final":"3rdPlace"})})})};var ea=r(25022);let ec=e=>{let{eventId:t,children:r}=e,s=(0,f.A)(),i=async e=>{if(e.preventDefault(),!t)return;let{event:r}=await p.nk6.fetchEvent(t);(0,W.zw)(s,"event",{id:r.customId,name:r.slug,sport:r.tournament.category.sport.slug})};return(0,n.jsx)("a",{href:"#",onClick:i,children:r})},ed=e=>{let t=e.querySelector(".cuptree-round-descriptions"),r=null==t?void 0:t.style.transform.match(/scaleX\(([^)]+)\)/),n=1;return r&&r[1]&&(n=+r[1]),n};function eu(e){var t,r,o;let{block:l,highlights:a,selectedRoundIndex:c}=e,d=(0,G.g3)(),{rounds:u,sourceTreeId:p,phaseFilter:h,entrantsPerRound:m}=(0,K.B)(),x=(0,y.useRef)(null),f=(0,y.useRef)(null),g=(0,y.useRef)(null),v=null==(t=l.events)?void 0:t[0],b=d?l.participants[1]:l.participants[0],j=null==b?void 0:b.teamSeed,k=d?l.awayTeamScore:l.homeTeamScore,w=d?l.participants[0]:l.participants[1],S=null==w?void 0:w.teamSeed,R=d?l.homeTeamScore:l.awayTeamScore,T=(0,ea.Fx)({firstParticipant:b,secondParticipant:w,block:l}),E=(0,ea.r9)(T),I=(T.hasScore||T.isLive)&&!T.isSpecial,C=!!l.seriesStartDateTimestamp&&!I&&!T.isSpecial;(0,y.useLayoutEffect)(()=>{if(!e.is3rdPlace)return setTimeout(()=>{!function(){var t;let r="rtl"===document.dir,n=document.querySelector('[data-tree-id="'.concat(p,'"]'))||document;if(!n)return;let s=ed(n),i=(null==b?void 0:b.sourceBlockId)?n.querySelector('[data-blockId="'.concat(null==b?void 0:b.sourceBlockId,'"][data-level="').concat((e.level||0)+1,'"]')):n.querySelector('[data-order="'.concat(2*(l.order||1)-1,'"][data-level="').concat((e.level||0)+1,'"]')),o=(null==w?void 0:w.sourceBlockId)?n.querySelector('[data-blockId="'.concat(null==w?void 0:w.sourceBlockId,'"][data-level="').concat((e.level||0)+1,'"]')):n.querySelector('[data-order="'.concat(2*(l.order||1),'"][data-level="').concat((e.level||0)+1,'"]')),a=null==(t=x.current)?void 0:t.getBoundingClientRect(),c=null==i?void 0:i.getBoundingClientRect(),d=null==o?void 0:o.getBoundingClientRect();if(a){if(c){let t=Math.abs(a.top-c.top)/s;f.current&&(l.participantDraw?f.current.classList.add("connector-left-participant-draw","edge-"+(e.edge||"none"),"arrangement-"+(e.arrangement||"none")):f.current.classList.add("connector-left"),r?f.current.style.right="-".concat(2*M.Dh,"px"):f.current.style.left="-".concat(2*M.Dh,"px"),f.current.style.width="".concat(M.Dh,"px"),f.current.style.top=-t+M.Gj+"px",f.current.style.height=t+M.ut+"px")}if(d){let t=Math.abs(d.top-a.top)/s;g.current&&(l.participantDraw?g.current.classList.add("connector-right-participant-draw","edge-"+(e.edge||"none"),"arrangement-"+(e.arrangement||"none")):g.current.classList.add("connector-right"),r?g.current.style.right="-".concat(2*M.Dh,"px"):g.current.style.left="-".concat(2*M.Dh,"px"),g.current.style.width="".concat(M.Dh,"px"),g.current.style.bottom=-t+M.Gj+"px",g.current.style.height=t+M.ut+"px")}if(l.participantDraw&&"left"===e.edge){let t=document.querySelectorAll('[data-level="'.concat((e.level||0)+1,'"]')),r=t[0],n=t[t.length-1];if(r&&n){let e=r.getBoundingClientRect(),t=n.getBoundingClientRect(),i=Math.abs(e.top-t.top)/s;r.setAttribute("style","--participant-connector-height:".concat(i,"px")),r.classList.add("participant-connector")}}}}()},200),()=>{var e,t;null==(e=f.current)||e.classList.remove("connector-left"),null==(t=g.current)||t.classList.remove("connector-right")}},[c,h]);let D=l.venue&&!b&&!w,B=!b&&!w;return(0,n.jsxs)(q,{ref:x,"data-blockId":l.blockId,"data-order":l.order,"data-level":e.level,"data-leftBlockId":null==b?void 0:b.sourceBlockId,"data-rightBlockId":null==w?void 0:w.sourceBlockId,position:"relative",onMouseEnter:()=>{var e,t;return a.set([null==b||null==(e=b.team)?void 0:e.id,null==w||null==(t=w.team)?void 0:t.id])},onMouseLeave:a.clear,children:[(0,n.jsx)(i.az,{position:"absolute",top:"[36px]",left:"0",ref:f,pointerEvents:"none"}),(0,n.jsx)(i.az,{position:"absolute",left:"0",ref:g,pointerEvents:"none"}),(0,n.jsx)(ec,{eventId:v,children:(0,n.jsxs)(i.so,{position:"relative",bg:{mdDown:"surface.s1",md:"surface.s2"},br:"sm",cursor:"pointer",align:"center",justify:"space-between",className:"cup-tree-block",elevation:{mdDown:"2"},children:[(0,n.jsx)(i.az,{flexGrow:1,overflow:"hidden",h:"[68px]",children:D?(0,n.jsxs)(i.so,{pl:"md",h:"100%",align:"center",children:[(0,n.jsx)(i.az,{w:"xl",h:"xl",mr:"sm",children:(0,n.jsx)(P.EGm,{w:"24",h:"24",fill:"onSurface.nLv1"})}),(0,n.jsxs)(i.az,{children:[(0,n.jsx)(s.EY,{maxW:"[148px]",truncate:!0,display:"block",children:null==(r=l.venue)?void 0:r.name}),(0,n.jsx)(s.EY,{color:"neutrals.nLv3",textStyle:"assistive.default",display:"block",children:null==(o=l.venue)?void 0:o.city.name})]})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(er,{participant:b,seed:j,nameColor:E.firstParticipantName,scoreColor:E.firstParticipantScore,score:I?k||"-":void 0,isEmptyBlock:B,isNewEntrant:(0,ea.d_)(b,u.length-(e.level||0)-1,m),isFirst:!0}),(0,n.jsx)(er,{participant:w,seed:S,nameColor:E.secondParticipantName,scoreColor:E.secondParticipantScore,score:I?R||"-":void 0,isEmptyBlock:B,isNewEntrant:(0,ea.d_)(w,u.length-(e.level||0)-1,m)})]})}),(e.isFinals||e.is3rdPlace)&&(0,n.jsx)(el,{isFinals:e.isFinals}),T.isSpecial?(0,n.jsx)(eo,{isRetired:T.isRetired,isWalkover:T.isWalkover}):C?(0,n.jsx)(ei,{isLive:T.isLive,seriesStartDateTimestamp:l.seriesStartDateTimestamp}):null]})})]})}function ep(e){var t;let{thirdPlaceBlock:r,...s}=e,o=s.block.events.length>1,[l,a]=(0,y.useState)(!1),c=(0,D.jz)(()=>a(!1)),{showSingleParticipantByeBlocks:d,rounds:u}=(0,K.B)(),h=0===s.level&&!s.isRelegationDecider&&(null==(t=u[u.length-1])?void 0:t.type)===p.FFH.Finals,m=d?0===s.block.participants.length:s.block.participants.length<2;return s.ancestorHasParticipants&&m&&!s.block.venue&&!s.block.seriesStartDateTimestamp||s.block.isHidden?null:(0,n.jsxs)(Q,{w:s.isVisibleRound?s.columnWidth:0,h:78*!!s.isVisibleRound,isVisibleRound:s.isVisibleRound,ref:c,position:"relative",role:"button",onClick:e=>{e.stopPropagation(),a(!0)},children:[(0,n.jsx)(eu,{...s,withLink:!o,isFinals:!s.is3rdPlace&&h,is3rdPlace:s.is3rdPlace}),o&&l&&(0,n.jsx)(H,{...s,close:()=>a(!1),isFinals:h}),h&&r&&(0,n.jsx)(i.az,{w:"100%",position:"absolute",bottom:"-2xl",left:"[0px]",transform:"translateY(100%)",children:(0,n.jsx)(ep,{...s,block:r,is3rdPlace:!0})})]})}let eh=e=>{let{status:t,colors:r,block:i}=e,l=i.homeTeamScore&&i.homeTeamScore.length>5||i.awayTeamScore&&i.awayTeamScore.length>5;return t.isWalkover?(0,n.jsx)(s.EY,{textStyle:"assistive.default",color:"neutrals.nLv3",mt:"xs",children:(0,n.jsx)(o.A,{id:"walkover"})}):t.isRetired?(0,n.jsx)(s.EY,{textStyle:"assistive.default",color:"neutrals.nLv3",mt:"xs",children:(0,n.jsx)(o.A,{id:"retired"})}):t.hasScore?(0,n.jsxs)(s.EY,{textAlign:"center",mt:"xs",style:{whiteSpace:"nowrap"},children:[(0,n.jsx)(Z,{textStyle:l?"body.small":"body.large",variant:r.firstParticipantScore,children:i.homeTeamScore.replace(" ","")})," : ",(0,n.jsx)(Z,{textStyle:l?"body.small":"body.large",variant:r.secondParticipantScore,children:i.awayTeamScore.replace(" ","")})]}):t.hasStartTime?(0,n.jsx)(s.EY,{textStyle:"assistive.default",color:t.isLive?"status.live":"neutrals.nLv3",mt:"xs",children:(0,en.cK)(1e3*i.seriesStartDateTimestamp)?(0,n.jsx)(es.ib,{value:1e3*i.seriesStartDateTimestamp}):(0,n.jsx)(es.XU,{day:"numeric",month:"short",value:1e3*i.seriesStartDateTimestamp})}):null};function em(e){var t,r;let{block:a,hideTopConnector:c,hideBottomConnector:d,inCard:u}=e,p=a.participants[0],h=a.participants[1],m=(0,ea.Fx)({firstParticipant:p,secondParticipant:h,block:a}),x=(0,ea.r9)(m);return(0,n.jsxs)(U,{align:"center",justify:"center",bg:u?"surface.s2":"surface.s1",elevation:2,hideTopConnector:c,hideBottomConnector:d,inCard:u,children:[(0,n.jsxs)(i.so,{align:"center",justify:"center",children:[(0,n.jsxs)(i.so,{mx:"xs",w:"1/2",direction:"column",justify:"center",align:"center",textAlign:"center",position:"relative",children:[(0,n.jsx)(X.p,{id:null==p||null==(t=p.team)?void 0:t.id,size:28}),(null==p?void 0:p.team)?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l.J,{seed:p.teamSeed,bottom:"lg",h:"md",textStyle:"assistive.micro"}),(0,n.jsx)(Z,{mt:"xs",textStyle:"assistive.default",variant:x.firstParticipantName,children:p.team.nameCode||p.team.name.slice(0,3)})]}):(0,n.jsx)(s.EY,{textTransform:"uppercase",mt:"xs",textStyle:"assistive.default",color:"neutrals.nLv3",children:(0,n.jsx)(o.A,{id:"label_to_be_determined",defaultMessage:"TBD"})})]}),(0,n.jsxs)(i.so,{mx:"xs",w:"1/2",direction:"column",justify:"center",align:"center",textAlign:"center",position:"relative",children:[(0,n.jsx)(X.p,{id:null==h||null==(r=h.team)?void 0:r.id,size:28}),(null==h?void 0:h.team)?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l.J,{seed:h.teamSeed,bottom:"lg",h:"md",textStyle:"assistive.micro"}),(0,n.jsx)(Z,{mt:"xs",textStyle:"assistive.default",variant:x.secondParticipantName,children:h.team.nameCode||h.team.name.slice(0,3)})]}):(0,n.jsx)(s.EY,{textTransform:"uppercase",mt:"xs",textStyle:"assistive.default",color:"neutrals.nLv3",children:(0,n.jsx)(o.A,{id:"label_to_be_determined",defaultMessage:"TBD"})})]})]}),(0,n.jsx)(eh,{block:a,colors:x,status:m})]})}var ex=r(59721);function ef(){let{tournamentId:e}=(0,K.B)();return(0,n.jsxs)(i.az,{position:"absolute",top:"[calc(50% - 28px)]",right:"[-42px]",children:[(0,n.jsxs)("svg",{width:"56",height:"56",viewBox:"0 0 56 56",fill:"none",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",children:[(0,n.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M29.9608 41.0577V39.4808H31.5294V36.3269H24.4706V39.4808H26.0392V41.0577H20.1569L17.8039 43.4231V45H38.1961V43.4231L35.8431 41.0577H29.9608ZM48 7.54808H42.1176V11.4904H44.0784V18.1608L40.549 21.7088V4H15.451V21.7088L11.9216 18.1608V11.4904H13.8824V7.54808H8V19.8008L15.451 27.2912V30.8077L17.8039 32.3846L21.7255 34.75H34.2745L38.1961 32.3846L40.549 30.8077V27.2912L48 19.8008V7.54808Z",fill:"#E8B345"}),(0,n.jsx)("path",{d:"M16.9 44.9V49.9L11.9 49.9V54H43V52.0001L39 52V45L16.9 44.9Z",fill:"#374DF5"}),(0,n.jsx)("rect",{x:"20",y:"10",width:"16",height:"16",fill:"url(#pattern0_2354_307)"}),(0,n.jsx)("defs",{children:(0,n.jsx)("pattern",{id:"pattern0_2354_307",patternContentUnits:"objectBoundingBox",width:"1",height:"1",children:(0,n.jsx)("use",{xlinkHref:"#image0_2354_307",transform:"scale(0.015625)"})})})]}),(0,n.jsx)(ex.e,{id:e,size:16,style:{position:"absolute",top:8,left:20}})]})}var eg=function(e){return e.Left="left",e.Right="right",e.Inner="inner",e}({});function ev(e){let{tree:t,initialOrientation:r="top",inCard:s}=e;if(!t)return null;let o=t.left||t.right;return(0,n.jsxs)(i.so,{flexGrow:1,flexShrink:1,direction:"top"===r?"column":"column-reverse",children:[(0,n.jsxs)(i.so,{children:[(0,n.jsx)(ev,{tree:t.left,initialOrientation:r,inCard:s}),(0,n.jsx)(ev,{tree:t.right,initialOrientation:r,inCard:s})]}),(0,n.jsxs)(i.so,{justify:"center",position:"relative",children:[o&&(0,n.jsx)(i.az,{position:"absolute",borderTopColor:s?"surface.s2":"surface.s1",borderTopWidth:"4px",borderTopStyle:"solid",w:"[calc(50% + 4px)]",left:"[calc(25% - 2px)]",top:"top"===r?"-2xs":"[calc(100% - 2px)]"}),(0,n.jsx)(em,{block:t,hideTopConnector:!o&&"top"===r,hideBottomConnector:!o&&"bottom"===r,inCard:s})]})]})}let eb=(0,y.memo)(function e(t){var r;let{selectedRoundIndex:s}=t,{tree:o,level:l=0,depth:a}=t,{rounds:c}=(0,K.B)(),d=a-l-1,u=void 0===s||s===d||s-1===d||s+1===d;if(!o)return null;let h=t.ancestorHasParticipants||!o.isHidden&&o.participants.length>0,{left:m,right:x,...f}=o,g=!t.isRelegationDecider&&0===l&&(null==(r=c[c.length-1])?void 0:r.type)===p.FFH.Finals&&f.finished;return(0,n.jsxs)(i.so,{flexGrow:1,flexShrink:1,flexBasis:"[1px]",justify:"flex-end",children:[(m||x)&&(0,n.jsxs)(i.az,{position:"relative",children:[(0,n.jsx)(e,{...t,ancestorHasParticipants:h,level:l+1,tree:m,arrangement:"left",edge:t.edge===eg.Inner||t.edge===eg.Right?eg.Inner:eg.Left}),(0,n.jsx)(e,{...t,ancestorHasParticipants:h,level:l+1,tree:x,arrangement:"right",edge:t.edge===eg.Inner||t.edge===eg.Left?eg.Inner:eg.Right})]}),(0,n.jsxs)(i.so,{position:"relative",direction:"column",justify:"space-around",children:[g&&u&&(0,n.jsx)(ef,{}),(0,n.jsx)(ep,{block:f,thirdPlaceBlock:f.thirdPlaceBlock,highlights:t.highlights,arrangement:t.arrangement,edge:t.edge,level:l,isRelegationDecider:t.isRelegationDecider,ancestorHasParticipants:t.ancestorHasParticipants,isVisibleRound:u,selectedRoundIndex:s,columnWidth:t.columnWidth},f.blockId||"".concat(l,"-").concat(t.depth,"-").concat(f.order))]})]})});function ej(e){let{onZoomIn:t,onZoomOut:r}=e;return(0,n.jsxs)(i.so,{dir:"ltr",direction:"column",position:"absolute",top:"[64px]",right:"xl",gap:"2xs",children:[(0,n.jsx)(s.K0,{size:"primary",onClick:t,children:(0,n.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",children:(0,n.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20 11H13V4H11V11H4V13H11V20H13V13H20V11Z",fill:"var(--surface-s1)"})})}),(0,n.jsx)(s.K0,{size:"primary",onClick:r,children:(0,n.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",children:(0,n.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20 11H13H11H4V13H11H13H20V11Z",fill:"var(--surface-s1)"})})})]})}function ey(e){let{x:t,scale:r,roundNames:o}=e,l=(0,y.useMemo)(()=>r>0?1/r:1,[r]),{sport:c}=(0,K.B)();return(0,n.jsx)(i.so,{gap:"3xl",px:"lg",transformOrigin:{base:"0px 0px 0px",_rtl:"top right 0px"},style:{transform:"translateX(".concat(t,"px) scaleX(").concat(r,")")},className:"cuptree-round-descriptions",children:o.map((e,t)=>(0,n.jsx)(i.az,{h:"4xl",py:"lg",flexGrow:0,flexShrink:0,flexBasis:"[260px]",overflowClipMargin:10,overflowX:"clip",children:(0,n.jsx)(s.EY,{display:"block",textStyle:"table.medium",textAlign:"center",style:{transformOrigin:"50% 50%",transform:"scaleX(".concat(l,")")},children:r<.3?(0,n.jsx)(u,{roundName:e}):(0,n.jsx)(a.rC,{roundName:e,sport:c})})},e+t))})}function ek(e){let{onChange:t}=e,[r,s]=(0,y.useState)([]),i=(0,F.useTheme)();return(0,y.useEffect)(()=>(t.push(e=>{s(e)}),()=>{t.pop()}),[]),(0,n.jsx)("style",{children:r.map(e=>"\n .".concat(ee,"-").concat(e," { background: ").concat(i.colors.neutral.highlight,"; }\n .").concat(ee,"-").concat(e,":hover { background: ").concat(i.colors.neutral.highlight,"; }\n "))})}function ew(){let e="rtl"===document.dir;return(0,n.jsxs)(i.az,{px:"sm",py:"md",children:[(0,n.jsx)(P.UPF,{fill:"playoffs.promotionToX",w:"24",h:"24",mr:"xs",mt:"-1",style:{transform:e?"rotate(-90deg)":"rotate(90deg)",verticalAlign:"middle"}}),(0,n.jsx)(s.EY,{ml:"xs",textStyle:"assistive.default",children:(0,n.jsx)(o.A,{id:"bracket_bye_explainer",defaultMessage:"Bye - automatic advancement"})})]})}},85986:(e,t,r)=>{r.d(t,{B:()=>l,J:()=>o});var n=r(6029),s=r(55729);let i=(0,s.createContext)(void 0),o=e=>{let{children:t,...r}=e;return(0,n.jsx)(i.Provider,{value:r,children:t})},l=()=>{let e=(0,s.useContext)(i);if(void 0===e)throw Error("useCupTreeContext must be used within a CupTreeProvider");return e}},95195:(e,t,r)=>{r.d(t,{Q:()=>o});var n=r(21377),s=r(45860),i=r(25022);function o(e,t){let{data:r,error:o,isLoading:l}=(0,s.Ay)(n.V3t.cupTrees(e,t));if(o)return[void 0,l];if(r){let e=(0,i.aQ)(r.cupTrees);if(e.length===r.cupTrees.length)return[void 0,l];let t=r.cupTrees.filter((t,r)=>!e.includes(r));if(t.length)return[t,l]}return[void 0,l]}}}]);