!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="0aadbb14-b138-4b1b-a866-07a5f47306f1",e._sentryDebugIdIdentifier="sentry-dbid-0aadbb14-b138-4b1b-a866-07a5f47306f1")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[98016],{11506:(e,n,t)=>{t.r(n),t.d(n,{default:()=>B});var s=t(6029),r=t(21377),a=t(4967),l=t(55729),i=t(45860),d=t(48683),o=t(75751),u=t(6354),c=t(79528),x=t(19944),m=t(83260),p=t(69435),h=t(86679),j=t(83318),g=t(97150),v=t(42078),f=t(77235),b=t(59721),y=t(76356),A=t(99064),w=t(68543),C=t(3539),I=t(50433);function T(e){let{standings:n,hasHomeAwayStandings:t}=(0,l.useContext)(p.P),a=n.find(n=>n.id===e.tableId);return a?(0,s.jsx)(C.d,{...e,children:(0,s.jsx)(w.A,{children:t?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(A.tU.Panel,{tabKey:"all",children:(0,s.jsx)(I.G,{tableName:a.name,...e,type:r.lpv.Total})}),(0,s.jsx)(A.tU.Panel,{tabKey:"home",children:(0,s.jsx)(I.G,{tableName:a.name,...e,type:r.lpv.Home,loaderHeight:a.rows.length})}),(0,s.jsx)(A.tU.Panel,{tabKey:"away",children:(0,s.jsx)(I.G,{tableName:a.name,...e,type:r.lpv.Away,loaderHeight:a.rows.length})})]}):(0,s.jsx)(I.G,{tableName:a.name,type:r.lpv.Total,...e})})}):null}var N=t(28349),F=t(90248),z=t(11033),E=t(65457),S=t(82287),k=function(e){return e[e.AFC=1]="AFC",e[e.NFC=2]="NFC",e[e.OVERALL=3]="OVERALL",e}({});let P={1:"American",2:"National"},_={1:"AFC",2:"NFC"};function G(e,n){return n.findIndex(e=>["AMERICAN","NATIONAL"].includes(e.name))>-1?P[e]:_[e]}var L=t(67149);let R=e=>{let{tab:n}=e,{standings:t,seasonId:a,isStandingsTableEmpty:i}=(0,l.useContext)(p.P),o=function(e,n){return 3===e?n.filter(e=>!(e.name.includes("AFC")||e.name.includes("NFC")||e.name.includes("AMERICAN")||e.name.includes("NATIONAL"))):1===e?n.filter(e=>e.name.includes("AFC")||e.name.includes("AMERICAN")):n.filter(e=>e.name.includes("NFC")||e.name.includes("NATIONAL"))}(n,t);return a?(0,s.jsx)(s.Fragment,{children:o.map((e,n)=>{let[t,a]=(0,L.Yp)(e.rows);return(0,s.jsx)(d.Zp,{children:(0,s.jsxs)(y.so,{direction:"column",py:"xs",children:[(0,s.jsxs)(y.so,{align:"center",px:"sm",pt:"sm",columnGap:"md",children:[(0,s.jsx)(b.e,{id:j.nJ,name:e.name,w:40,h:40}),(0,s.jsx)(N.EY,{textStyle:"display.large",children:e.name})]}),(0,s.jsxs)(S.C.Provider,{value:{colors:t,texts:a},children:[(0,s.jsx)(I.G,{tableName:e.name,type:r.lpv.Total}),!i&&(0,s.jsx)(z.K,{rows:e.rows,descriptions:e.descriptions,tieBreakingRule:e.tieBreakingRule,defaultOpenedFirstRules:0===n})]})]})},e.id)})}):null},D=()=>{let{standings:e,displayType:n,setDisplayType:t}=(0,l.useContext)(p.P),[r,a]=(0,l.useState)(k.AFC);return(0,s.jsxs)(y.so,{direction:"column",gap:"sm",children:[(0,s.jsx)(d.Zp,{children:(0,s.jsxs)(y.so,{p:"sm",justify:"space-between",children:[(0,s.jsx)("div",{children:(0,s.jsxs)(A.tU,{variant:"secondary",value:r,onChange:e=>a(e),children:[(0,s.jsx)(A.tU.Tab,{children:G(k.AFC,e)}),(0,s.jsx)(A.tU.Tab,{children:G(k.NFC,e)}),(0,s.jsx)(A.tU.Tab,{children:(0,s.jsx)(F.A,{id:"standings.overall"})})]})}),(0,s.jsx)(E.A,{displayType:n,setDisplayType:t,items:["short","form"],isNarrowLayout:!0})]})}),(0,s.jsx)(R,{tab:r})]})};var H=t(2438);function U(e){let{branding:n}=e,{isNarrowLayout:t,uniqueTournamentId:r,standings:a,seasonId:i}=(0,l.useContext)(p.P),[d,o]=(0,l.useState)(a[0]);if((0,l.useEffect)(()=>{o(a[0])},[a,i]),!d)return null;if(r===j.nJ&&t)return(0,s.jsx)(D,{});let u=(0,s.jsx)(y.az,{p:"sm",children:(0,s.jsx)(A.ms,{items:a,initialSelectedItem:d,selectedItem:d,renderItem:(e,n)=>{if(n&&e){var t,r;return(0,s.jsxs)(y.so,{align:"center",children:[(0,s.jsx)(y.az,{children:(0,s.jsx)(b.e,{id:(null==(t=e.tournament.uniqueTournament)?void 0:t.id)||e.tournament.id,name:null==(r=e.tournament.uniqueTournament)?void 0:r.name,size:24,ml:"-4",mr:"4"})}),(0,s.jsx)(y.az,{children:e.name})]})}return(0,s.jsx)(H.v,{table:e})},onSelectedItemChange:e=>{let{selectedItem:n}=e;null!==n&&o(n)}})});return(0,s.jsx)(T,{tableId:d.id,subheader:u,hasDropdown:!0,branding:n})}var V=t(7263),K=t(31215);function O(e){let{sport:n,branding:t}=e,{uniqueTournamentId:a,tournamentId:o,seasonId:u,standings:c}=(0,l.useContext)(p.P),{data:x}=(0,i.Ay)(a&&u?[r.V3t.seasonRounds(a,u),"HEAD"]:null,{fetcher:V.n}),{data:m}=(0,i.Ay)(a&&u?[r.V3t.seasonGroups(a,u),"HEAD"]:null,{fetcher:V.n});return x&&m?(0,s.jsx)(d.WC,{variant:"square-desktop",children:(0,s.jsx)(y.so,{direction:"column",gap:{base:"sm",md:"md"},children:c.map(e=>(0,s.jsx)(y.az,{md:{pb:"sm",borderBottom:"1px solid {colors.neutrals.nLv4}",_last:{borderBottom:"none",pb:"0"}},children:(0,s.jsx)(T,{tableId:e.id,hasRounds:x&&m,subheader:(0,s.jsx)(y.az,{pt:"md",px:"sm",pb:"xs",children:(0,s.jsx)(K.A,{tournamentId:o,uniqueTournamentId:a,tournamentName:(0,s.jsx)(H.v,{table:e})})}),branding:t,sport:n})},e.id))})}):(0,s.jsx)(U,{branding:t})}function B(e){let{uniqueTournament:n,seasonId:t,selectedSeason:b,isNarrowLayout:y}=e,{initialStandings:A}=(0,l.useContext)(u.O),[w,C]=(0,m.A)(j.s4,"short"),[I,N]=(0,l.useState)(),{data:F,error:z}=(0,i.Ay)(r.V3t.standings(n.id,t,r.lpv.Total),{keepPreviousData:!0}),E=(null==F?void 0:F.standings)||A||[],{hasGroups:S,hasDropdown:k,showHorizontalStandings:P,hasHomeAwayStandings:_}=function(e){let{standings:n,uniqueTournamentId:t,seasonId:s}=e,{initialHasHomeAway:a}=(0,l.useContext)(u.O),{hasHomeAway:i}=(0,h.A)({hasHomeAway:{route:r.V3t.standings(t,s,r.lpv.Home)}},[t,s]),d=t===r.G6l.Euro||t===r.G6l.CopaAmerica||t===r.G6l.ClubWorldCup,[o,c]=(0,l.useMemo)(()=>{let e,t=!1;for(let s=0,r=n.length;s1;return[t,s]},[n]);return{hasDropdown:c,hasGroups:o,showHorizontalStandings:d,hasHomeAwayStandings:null!=i?i:a}}({uniqueTournamentId:n.id,seasonId:t,standings:E}),{events:G}=(0,x.Y)(n.id,(0,a.UG)(new Date),P),L=(0,c.b)(n.id,"standings");return z?null:(null==E?void 0:E.length)&&void 0!==_?(0,s.jsx)(o.t,{tag:"StandingsContainer",children:(0,s.jsxs)(p.P.Provider,{value:{isNarrowLayout:!!y,uniqueTournamentId:n.id,seasonId:t,displayType:w,setDisplayType:C,standings:E,displayTypeOptions:[...r.ur4],homeTeamId:void 0,awayTeamId:void 0,selectedTeamId:void 0,hasPerformanceGraphFeature:!!n.hasPerformanceGraphFeature,tournamentId:P?(0,g.h)(G):void 0,hasHomeAwayStandings:_,selectedSeason:b,isStandingsTableEmpty:I,setIsStandingsTableEmpty:N},children:[P?(0,s.jsx)(f.A,{branding:L,utId:n.id}):S?(0,s.jsx)(O,{sport:n.category.sport.slug,branding:L}):k?(0,s.jsx)(U,{branding:L}):(0,s.jsx)(T,{tableId:E[0].id,hasDropdown:k,hasDefaultRightTeamInPerformanceGraph:!0,branding:L}),(0,s.jsx)(d.Zp.Footer,{})]})}):(0,s.jsx)(v.d,{noSeasonPicker:!0,noTitle:!0,isNarrowLayout:y,branding:L})}},19944:(e,n,t)=>{t.d(n,{Y:()=>l});var s=t(21377),r=t(4967),a=t(45860);let l=function(e,n){let t=!(arguments.length>2)||void 0===arguments[2]||arguments[2],l=t&&void 0!==n,{data:i,error:d,isLoading:o}=(0,a.Ay)(l?s.V3t.scheduledEvents(e,n):null);return{events:(null==i?void 0:i.events.filter(e=>(0,r.yk)(e.startTimestamp,Date.parse("".concat(n,"T12:00")))))||[],error:d,isLoading:o}}},25811:(e,n,t)=>{t.d(n,{n:()=>o});var s=t(6029),r=t(28349),a=t(62042),l=t(76356),i=t(99064),d=t(90248);function o(e){let{activeTabKey:n,onChange:t,tabs:o,variant:u,children:c,onTabClick:x,fullWidthTabs:m=!1}=e,p="secondary"===u;return(0,s.jsxs)(i.tU,{variant:"quaternary",value:n,onChange:t,children:[(0,s.jsx)(r.tR,{children:(0,s.jsx)(l.so,{gap:p?"xs":"sm",bg:p?"surface.s2":void 0,br:"lg",h:"[34px]",p:"2xs",className:p?(0,a.AH)({"--surface-s2":"transparent"}):void 0,w:m?"100%":"fit",mx:p?"auto":void 0,mb:m?"sm":void 0,children:o.map(e=>(0,s.jsx)(i.tU.Tab,{tabKey:e.tabKey,bg:e.tabKey===n?"neutrals.nLv1":void 0,display:"flex",h:"100%",px:"0",py:"0",br:"lg",ml:"0 !important",mr:"0 !important",onClick:()=>null==x?void 0:x(e.tabKey),w:m?"100%":void 0,children:e.isImage?(0,s.jsx)(l.az,{px:"lg",h:"xl",alignSelf:"center",children:e.tabValue}):(0,s.jsx)(r.EY,{display:"block",px:"tertiary"===u?"md":"lg",textStyle:p?"tab.secondary":"assistive.default",color:e.tabKey===n?"surface.s1":"neutrals.nLv1",textTransform:p?"uppercase":void 0,alignSelf:"center",children:"string"==typeof e.tabValue?(0,s.jsx)(d.A,{id:e.tabValue}):e.tabValue})},e.tabKey))})}),c]})}},31215:(e,n,t)=>{t.d(n,{A:()=>d});var s=t(6029),r=t(73045),a=t(28349),l=t(76356),i=t(90248);function d(e){let{tournamentName:n,tournamentId:t,uniqueTournamentId:d,hideLogo:o,isLive:u,mobileOnly:c}=e;return(0,s.jsx)(l.az,{hideBelow:c?"md":void 0,children:(0,s.jsxs)(l.so,{px:"sm",gap:"lg",justify:"space-between",align:"center",children:[(0,s.jsxs)(l.so,{gap:"lg",align:"center",children:[!o&&(d?(0,s.jsx)(r.e,{id:d,size:40}):(0,s.jsx)(r.l,{id:t,size:40})),(0,s.jsx)(a.EY,{textStyle:"display.large",lineClamp:2,children:n})]}),u&&(0,s.jsxs)(l.so,{align:"center",children:[(0,s.jsx)(l.az,{w:"sm",h:"sm",bg:"status.live",br:"50%",mr:"sm"}),(0,s.jsx)(a.EY,{lineHeight:"8px",textStyle:"body.small",color:"status.live",display:"block",children:(0,s.jsx)(i.A,{id:"live"})})]})]})})}},42078:(e,n,t)=>{t.d(n,{d:()=>u});var s=t(6029),r=t(76356),a=t(55729),l=t(48683),i=t(62859),d=t(85568),o=t(66757);let u=e=>{var n;let{noSeasonPicker:t,isNarrowLayout:u,isInlineLayout:c,branding:x,numberOfRows:m=20,noTitle:p=!1}=e,{event:h}=(0,a.useContext)(i.y$),j=null==h||null==(n=h.tournament.uniqueTournament)?void 0:n.hasPerformanceGraphFeature;return(0,s.jsxs)(r.so,{direction:"column",gap:["sm","md"],children:[(0,s.jsxs)(l.Zp,{variant:c?"never":void 0,children:[!u&&!c&&p&&(0,s.jsx)(d.U,{titleId:"app.standings",branding:x}),(0,s.jsxs)(r.az,{children:[!t&&(0,s.jsx)(r.az,{h:"4xl"}),(0,s.jsx)(r.az,{h:"2xl"}),(0,s.jsx)(r.az,{h:"2xl"}),(0,s.jsx)(o.e,{rows:m}),(0,s.jsx)(r.az,{h:"[92px]"}),(0,s.jsx)(r.az,{p:"sm",children:(0,s.jsx)(r.az,{h:"4xl",bg:"surface.s2",br:"lg"})})]})]}),j&&(0,s.jsxs)(l.Zp,{variant:c?"never":void 0,children:[!c&&(0,s.jsx)(l.Zp.Header,{titleId:"standings_tracker_title"}),(0,s.jsx)(r.az,{h:"[542px]"})]})]})}},50433:(e,n,t)=>{t.d(n,{G:()=>c});var s=t(6029),r=t(21377),a=t(55729),l=t(45860),i=t(76868),d=t(7079),o=t(66757),u=t(69435);function c(e){let{tableName:n,loaderHeight:t,type:c}=e,{uniqueTournamentId:x,seasonId:m,standings:p,hasHomeAwayStandings:h,setIsStandingsTableEmpty:j}=(0,a.useContext)(u.P),{data:g,error:v}=(0,l.Ay)(x&&m?r.V3t.standings(x,m,c):null,{refreshInterval:3e4}),f=(null==g?void 0:g.standings)||(c===r.lpv.Total?p:void 0),{data:b}=(0,l.Ay)(x&&m?r.V3t.teamEvents(x,m,c):null,{refreshInterval:3e4});if((0,a.useEffect)(()=>{h&&j&&f&&j(void 0===f.find(e=>e.name===n))},[f,n]),v)return null;if(!f)return(0,s.jsx)(o.e,{rows:t});let y=f.find(e=>e.name===n);if(!y)return(0,s.jsx)(i.p,{graphic:"no-standings",descriptionMessageId:"empty_recent_searches_title"});let A=b?b.tournamentTeamEvents[y.tournament.id]:void 0;return(0,s.jsx)(d.X,{type:c,table:y,teamEvents:A})}},66757:(e,n,t)=>{t.d(n,{e:()=>d});var s=t(6029),r=t(18612),a=t(76356),l=t(55729);function i(e){let{rows:n,rowHeight:t}=e;return(0,s.jsx)(r.D,{animate:!0,height:n*t,uniqueKey:"generic-table-cl",children:Array(n).fill(null).map((e,n)=>{let r=n*t;return(0,s.jsxs)(l.Fragment,{children:[(0,s.jsx)("circle",{cx:20,cy:r+t/2,r:12}),(0,s.jsx)("rect",{x:40,y:r+8,width:"calc(100% - 48px)",height:t-16})]},r)})})}function d(e){let{rows:n=12}=e;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a.az,{hideBelow:"md",children:(0,s.jsx)(i,{rowHeight:32,rows:n})}),(0,s.jsx)(a.az,{hideFrom:"md",children:(0,s.jsx)(i,{rowHeight:48,rows:n})})]})}},77235:(e,n,t)=>{t.d(n,{A:()=>b});var s=t(6029),r=t(21377),a=t(28349),l=t(21501),i=t(76356),d=t(55729),o=t(43072),u=t(48683),c=t(85568),x=t(47530),m=t(82287),p=t(69435),h=t(11033),j=t(65457),g=t(50433);function v(e){let{isSelected:n,onClick:t,children:r}=e,[d,o]=(0,l.c9)([]);return(0,a.rF)(d,[n],()=>!!n),(0,s.jsx)(i.az,{ref:o,children:(0,s.jsx)(i.so,{h:"2xl",minW:"[68px]",px:"sm",br:"sm",userSelect:"none",bg:n?"primary.highlight":"surface.s2",border:n?"1.5px solid {colors.primary.highlight}":"1.5px solid transparent",onClick:n?void 0:t,cursor:"pointer",justify:"center",align:"center",children:(0,s.jsx)(a.EY,{textStyle:"tab.secondary",color:n?"primary.default":"neutrals.nLv1",truncate:!0,textTransform:"uppercase",children:r})})})}function f(e){let{selectedIndex:n,setSelectedIndex:t}=e,{standings:l,isNarrowLayout:u,displayType:c,setDisplayType:m}=(0,d.useContext)(p.P),[h,f]=(0,o.Wx)({trackVisibility:!0,delay:100});return(0,s.jsxs)(i.az,{flexGrow:1,overflow:{md:"hidden"},children:[(0,s.jsxs)(i.so,{px:"sm",borderBottom:"1px solid {colors.neutrals.nLv4}",children:[(0,s.jsx)(a.tR,{buttonStyle:"solid",showButtons:"desktop",children:(0,s.jsxs)(i.so,{children:[(0,s.jsx)(i.so,{justify:"flex-start",gap:"lg",py:"sm",children:l.map((e,r)=>(0,s.jsx)(v,{isSelected:n===r,onClick:()=>t(r),children:(0,s.jsx)(x.__,{name:e.tournament.groupName||e.tournament.name})},e.id))}),(0,s.jsx)(i.az,{ref:h,w:"sm"})]})}),u&&(0,s.jsx)(i.so,{align:"center",ps:"sm",boxShadow:{_ltr:f?void 0:"[-3px 0 8px -7px {colors.neutrals.nLv1}]",_rtl:f?void 0:"[3px 0 8px -7px {colors.neutrals.nLv1}]"},children:(0,s.jsx)(j.A,{displayType:c,setDisplayType:m,isNarrowLayout:u})})]}),(0,s.jsx)(g.G,{tableName:l[n].name,type:r.lpv.Total})]})}function b(e){let{branding:n,utId:t}=e,{seasonId:r,standings:a,tournamentId:l}=(0,d.useContext)(p.P),[i,o]=(0,d.useState)(0);if((0,d.useEffect)(()=>{o(Math.max(a.findIndex(e=>e.tournament.id===l),0))},[r,l]),!a[i])return null;let x=a[i];return(0,s.jsxs)(u.Zp,{children:[(0,s.jsx)(c.U,{entityId:t,titleId:"tournament.standings",branding:n,location:"league_standings"}),(0,s.jsxs)(m.R,{standings:x,children:[(0,s.jsx)(f,{selectedIndex:i,setSelectedIndex:o}),(0,s.jsx)(h.c,{rows:x.rows,descriptions:x.descriptions,tieBreakingRule:x.tieBreakingRule,defaultOpenedFirstRules:!0})]})]})}},85568:(e,n,t)=>{t.d(n,{U:()=>i});var s=t(6029),r=t(28349),a=t(13030),l=t(51372);let i=e=>{let{branding:n,location:t,entityId:i,...d}=e,{isDesktop:o}=(0,r.$c)();return o&&n?(0,s.jsx)(a.A.Header,{...d,variant:"left-aligned",actionComponent:(0,s.jsx)(l.O,{minW:"[140px]",px:"sm",br:"xs",branding:n,location:t,entityId:i})}):(0,s.jsx)(a.A.Header,{...d})}},97150:(e,n,t)=>{t.d(n,{h:()=>r});var s=t(21377);let r=e=>{var n;let t=null==e?void 0:e.filter(e=>e.status.type===s.XUj.InProgress),r=null==e?void 0:e.filter(e=>e.status.type===s.XUj.NotStarted&&e.hasEventPlayerStatistics);return[...((null==t?void 0:t.length)>0?t:r.length>0?r:e).map(e=>e.tournament.id).reduce((e,n)=>{var t;return e.set(n,(null!=(t=e.get(n))?t:0)+1),e},new Map)].reduce((e,n)=>n[1]>e[1]?n:e,[void 0,0])[0]}}}]);