"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3657],{75349:function(e,t,a){var n=a(85893),i=a(65984),o=a(39484),s=a(24920),r=a(95429),c=a(54410),l=a(63991),m=a(82922),d=a(29425);let h=(0,m.k)(()=>({text:{fontSize:"1rem",color:"#7b38ab"}})),x=(0,m.k)(()=>({text:{fontSize:"0.85rem"}})),g=(0,m.k)(()=>({text:{fontSize:".75rem"}}));t.Z=e=>{let{comments:t,variant:a="small",includeCommentsText:m=!1,includeDownArrow:u=!1,onClick:j}=e,f=(0,i.rZ)(),p=(0,o.X)(),{classes:v}=h(),{classes:w}=x(),{classes:b}=g();return(0,n.jsx)(s.z,{variant:"outline",ml:2,p:0,bg:"dark"===p.colorScheme?f.colors.dark[7]:"white",w:"max-content",style:{...j?{cursor:"pointer"}:{},height:"unset",color:"unset",borderColor:"dark"===p.colorScheme?f.colors.dark[4]:f.colors.gray[3]},onClick:j,children:(0,n.jsxs)(r.k,{justify:"space-between",align:"center",gap:4,px:2,ml:u?2:0,children:[(0,n.jsx)(l.uMM,{size:16}),(0,n.jsxs)(c.x,{fw:"bold",my:"auto",className:{long:v,large:w,small:b}[a].text,lh:1,py:4,children:[t||0,m&&" Comment".concat((0,d._x)(t))]}),u&&(0,n.jsx)(l.C26,{size:20})]})})}},63327:function(e,t,a){a.d(t,{Qg:function(){return N},ZP:function(){return D},cz:function(){return y}});var n=a(85893),i=a(54410),o=a(95429),s=a(39484),r=a(1506),c=a(38878),l=a(10576),m=a(63991),d=a(41664),h=a.n(d),x=a(78964),g=a(25675),u=a.n(g),j=a(23262),f=a(82922),p=a(90167),v=a(36992),w=a(65014),b=a(38539),k=a(75349),S=a(52056);let y=(0,f.k)(e=>({container:{width:"100%",flexDirection:"row",gap:8,alignItems:"center"},teamName:{lineHeight:"22px",fontWeight:100},teamRecord:{lineHeight:"10px",fontSize:"10px"},teamScore:{lineHeight:"24px",float:"right",marginLeft:"auto"}})),N=(0,f.k)(e=>({dateHeader:{marginBottom:"4px"},teamRowContainer:{gap:4,flexGrow:1,flexDirection:"column"},teamRowContainerCompact:{gap:8,flexGrow:1,alignItems:"center"},teamRowDivider:{margin:"2px 8px"},actionButtonContainer:{marginLeft:"16px",justifyContent:"center",flexDirection:"column"},statisticsButtons:{borderRadius:"16px"},container:{width:"100%",flexDirection:"row",gap:8},teamName:{lineHeight:"22px"},teamRecord:{lineHeight:"10px",fontSize:"10px"},teamScore:{lineHeight:"24px",float:"right",marginLeft:"auto"}}));function _(e){var t,a,s,r;let{isWinner:c,teamScore:l,compact:m,reverse:d,team:h}=e,g=(0,b.Q)(h,"long"),j=(0,b.Q)(h,"short"),{classes:f}=y(),p=(0,x.a)("(max-width: 800px)"),v=(0,w.x0)(h);return m?(0,n.jsxs)(n.Fragment,{children:[d&&(0,n.jsx)(i.x,{fw:c?600:300,children:l}),(0,n.jsxs)(o.k,{className:f.container,style:d?{flexDirection:"row-reverse"}:{},children:[(0,n.jsx)(u(),{src:v,width:32,height:32,alt:"".concat(g," logo"),style:{objectFit:"contain"}}),(0,n.jsxs)(o.k,{direction:"column",children:[(0,n.jsx)(i.x,{className:f.teamName,fw:c?600:300,children:p?j:g}),(0,n.jsxs)(i.x,{className:f.teamRecord,ta:d?"right":"left",children:["(",null===(s=h.record)||void 0===s?void 0:s.wins," - ",null===(r=h.record)||void 0===r?void 0:r.losses,")"]})]})]}),!d&&(0,n.jsx)(i.x,{fw:c?600:300,children:l})]}):(0,n.jsxs)(o.k,{className:f.container,children:[(0,n.jsx)(u(),{src:v,width:24,height:24,alt:"".concat(g," logo"),style:{objectFit:"contain"}}),(0,n.jsxs)(o.k,{direction:"row",align:"center",gap:8,children:[(0,n.jsx)(i.x,{className:f.teamName,fw:c?600:300,children:g}),(0,n.jsxs)(i.x,{className:f.teamRecord,children:["(",null===(t=h.record)||void 0===t?void 0:t.wins," - ",null===(a=h.record)||void 0===a?void 0:a.losses,")"]})]}),(0,n.jsx)(i.x,{className:f.teamScore,fw:c?600:300,children:l})]})}function L(e){let{compact:t,reverse:a,advancedMatch:c,team_number:l,possibleTeams:d,isLoading:h}=e,{classes:g}=y(),j=(0,x.a)("(min-width: 768px)",!0),{teams:f}=(0,p.y)(null==c?void 0:c.event_id),v=(0,s.X)(),w=()=>c?1!==l||c.team1?2!==l||c.team2?"TBD":"Team 2 TBD":"Team 1 TBD":"TBD",b=()=>f&&d&&0!==d.length?d.map((e,t)=>{let a=f.find(t=>t.id===e);return a?(0,n.jsxs)(o.k,{align:"center",gap:12,children:["dark"===v.colorScheme?(0,n.jsx)(u(),{src:a.logo_darkmode||"/bpDarkLogo.png",width:24,height:24,alt:"".concat(a.name," logo"),style:{objectFit:"contain"}}):(0,n.jsx)(u(),{src:a.logo_lightmode||"/bpLightLogo.png",width:24,height:24,alt:"".concat(a.name," logo"),style:{objectFit:"contain"}}),(0,n.jsx)(i.x,{fw:100,children:j?a.name:a.name_medium}),t<d.length-1&&(0,n.jsx)(m.Pvr,{size:16,style:{marginBottom:3,marginRight:12}})]},a.id):null}):null;return h?(0,n.jsx)(r.O,{width:"100%",height:24.8,radius:4}):t?(0,n.jsxs)(o.k,{className:g.container,style:a?{flexDirection:"row-reverse"}:{},children:[(0,n.jsx)("div",{style:{height:32,width:32}}),(0,n.jsx)(o.k,{direction:"column",children:(0,n.jsx)(i.x,{className:g.teamName,children:d&&d.length>1?b():(0,n.jsxs)(o.k,{gap:12,align:"center",children:[(0,n.jsx)(m.jKT,{}),w()]})})})]}):(0,n.jsx)(o.k,{gap:12,className:g.container,children:(0,n.jsx)(o.k,{direction:"column",children:(0,n.jsx)(o.k,{className:g.teamName,children:d&&d.length>1?b():(0,n.jsxs)(o.k,{gap:12,align:"center",children:[(0,n.jsx)(m.jKT,{}),w()]})})})})}function D(e){var t,a,r,m,d,g,f;let{match:p,compact:w,advanced:b,advancedMatch:y}=e,{datetime:D,best_of:R,team_1_id:T,team_2_id:F,winner_id:C,team_1_score:I,team_2_score:z}=p,{classes:B}=N(),M=(0,s.X)(),H=(0,x.a)("(min-width: 768px)",!0),O=null===(t=p.team1)||void 0===t?void 0:t.record,E=null===(a=p.team2)||void 0===a?void 0:a.record,{matches:Z,isLoading:P}=(0,v._)(),G=Z?Z.reduce((e,t)=>(e[t.matchId]=e[t.matchId]||{team1:[],team2:[]},"team1"===t.position?e[t.matchId].team1=t.possibleTeams:e[t.matchId].team2=t.possibleTeams,e),{}):{},W=y&&(null===(r=G[y.id])||void 0===r?void 0:r.team1)||[],X=y&&(null===(m=G[y.id])||void 0===m?void 0:m.team2)||[];return y?(0,n.jsxs)(o.k,{direction:"column",w:"100%",style:{overflow:"visible"},children:[(0,n.jsxs)(o.k,{justify:H?"space-between":"flex-start",gap:4,mb:4,align:"center",children:[(0,n.jsxs)(i.x,{fz:"xs",fw:500,tt:"uppercase",c:null===C&&"live"===p.status?"red":"inherit",maw:"100%",mr:"auto",truncate:!0,children:["live"===p.status?"IN PROGRESS | ":null," ",D&&"".concat(new Date(D).toLocaleTimeString([],{timeStyle:"short"}))," ","| BO",R||"x",y.event&&(0,n.jsxs)(n.Fragment,{children:[" ","|"," ",(0,n.jsxs)(h(),{href:"/events/".concat(y.event.id),style:{color:"dark"===M.colorScheme?"white":"black"},children:[null===(d=y.round)||void 0===d?void 0:d.name_short," ",y.event.name_short," ",3===y.event.division_id&&(0,n.jsx)(n.Fragment,{children:"CDL "}),y.event.season_id]})]})]}),(0,n.jsxs)(o.k,{gap:4,align:"center",children:[(0,n.jsx)(S.Z,{rootType:"match",rootId:p.id,size:18,iconSize:13.6,showDefaultReactions:!1,prefetched:!0}),(0,n.jsx)(h(),{href:"/match/".concat(p.id,"?commentsFocused=1"),style:{textDecoration:"none",color:"unset",lineHeight:0},children:(0,n.jsx)(k.Z,{comments:y.comments||0,variant:"large"})})]})]}),(0,n.jsx)(h(),{href:"/match/".concat(p.id),style:{color:"inherit",textDecoration:"inherit",overflow:"visible"},children:(0,n.jsx)(c.Z,{pt:8,pb:8,style:{boxShadow:"0px 0px 5px 0px rgba(0,0,0,0.25)",overflow:"visible",background:T===C?"linear-gradient(to bottom left,".concat(null===(g=y.team1)||void 0===g?void 0:g.color_hex,"20,").concat("dark"===M.colorScheme?"rgb(37, 38, 43)":"#fff",",").concat("dark"===M.colorScheme?"rgb(37, 38, 43)":"#fff",")"):F===C?"linear-gradient(to top left,".concat(null===(f=y.team2)||void 0===f?void 0:f.color_hex,"20,").concat("dark"===M.colorScheme?"rgb(37, 38, 43)":"#fff",",").concat("dark"===M.colorScheme?"rgb(37, 38, 43)":"#fff",")"):""},w:"100%",children:(0,n.jsx)(o.k,{children:(0,n.jsxs)(o.k,{className:B.teamRowContainer,children:[T&&y.team1?(0,n.jsxs)(o.k,{justify:"space-between",className:B.container,children:[(0,n.jsxs)(o.k,{gap:"sm",align:"center",children:["dark"===M.colorScheme?(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(u(),{src:y.team1.logo_darkmode||"/bpDarkLogo.png",width:24,height:24,alt:"".concat(y.team1.name," logo"),style:{objectFit:"contain"}})}):(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(u(),{src:y.team1.logo_lightmode||"/bpLightLogo.png",width:24,height:24,alt:"".concat(y.team1.name," logo"),style:{objectFit:"contain"}})}),(0,n.jsxs)(o.k,{direction:"row",align:"center",gap:8,children:[(0,n.jsx)(i.x,{className:B.teamName,fw:T===C?700:300,children:y.team1.name}),(0,n.jsxs)(i.x,{className:B.teamRecord,children:["(",null==O?void 0:O.wins," - ",null==O?void 0:O.losses,")"]})]})]}),(0,n.jsxs)(o.k,{align:"center",children:[(0,n.jsx)(i.x,{ta:"center",className:B.teamScore,fw:T===C?900:300,style:{width:12},children:y.team_1_score}),T===C?(0,n.jsx)(j.Z,{size:12,style:{marginLeft:4}}):(0,n.jsx)("div",{style:{marginLeft:4,width:12}})]})]}):(0,n.jsx)(L,{isLoading:P,advancedMatch:y,team_number:1,possibleTeams:W}),(0,n.jsx)(l.i,{className:B.teamRowDivider,opacity:.3}),F&&y.team2?(0,n.jsxs)(o.k,{justify:"space-between",className:B.container,children:[(0,n.jsxs)(o.k,{gap:"sm",align:"center",children:["dark"===M.colorScheme?(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(u(),{src:y.team2.logo_darkmode||"/bpDarkLogo.png",width:24,height:24,alt:"".concat(y.team2.name," logo"),style:{objectFit:"contain"}})}):(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(u(),{src:y.team2.logo_lightmode||"/bpLightLogo.png",width:24,height:24,alt:"".concat(y.team2.name," logo"),style:{objectFit:"contain"}})}),(0,n.jsxs)(o.k,{direction:"row",align:"center",gap:8,children:[(0,n.jsx)(i.x,{className:B.teamName,fw:F===C?700:300,children:y.team2.name}),(0,n.jsxs)(i.x,{className:B.teamRecord,children:["(",null==E?void 0:E.wins," - ",null==E?void 0:E.losses,")"]})]})]}),(0,n.jsxs)(o.k,{align:"center",children:[(0,n.jsx)(i.x,{ta:"center",className:B.teamScore,fw:F===C?900:300,style:{width:12},children:y.team_2_score}),F===C?(0,n.jsx)(j.Z,{size:12,style:{marginLeft:4}}):(0,n.jsx)("div",{style:{marginLeft:4,width:12}})]})]}):(0,n.jsx)(L,{isLoading:P,advancedMatch:y,team_number:2,possibleTeams:X})]})})})})]}):w?(0,n.jsxs)(o.k,{direction:"column",w:"100%",style:{overflow:"visible"},children:[(0,n.jsxs)(i.x,{className:B.dateHeader,fz:"xs",fw:500,tt:"uppercase",c:null===C&&"live"===p.status?"red":"inherit",children:[null!==C?"FINAL":"live"===p.status?"IN PROGRESS":"UPCOMING"," ",D&&"| ".concat(new Date(D).toLocaleTimeString([],{timeStyle:"short"}))," ","| BO",R||"x"]}),(0,n.jsx)(h(),{href:"/match/".concat(p.id),style:{color:"inherit",textDecoration:"inherit",overflow:"visible"},children:(0,n.jsx)(c.Z,{style:{boxShadow:"0px 0px 5px 0px rgba(0,0,0,0.25)",overflow:"visible"},w:"100%",children:(0,n.jsx)(o.k,{children:(0,n.jsxs)(o.k,{className:B.teamRowContainerCompact,children:[T&&(0,n.jsx)(_,{teamScore:I,isWinner:T===C,compact:!0,team:p.team1}),"live"===p.status||"complete"===p.status?(0,n.jsx)(i.x,{children:":"}):null,F&&(0,n.jsx)(_,{reverse:!0,teamScore:z,isWinner:F===C,compact:!0,team:p.team2})]})})})})]}):b?(0,n.jsxs)(o.k,{direction:"column",w:"100%",style:{overflow:"visible"},children:[(0,n.jsxs)(i.x,{className:B.dateHeader,fz:"xs",fw:500,tt:"uppercase",c:null===C&&"live"===p.status?"red":"inherit",children:[null!==C?"FINAL":"live"===p.status?"IN PROGRESS":"UPCOMING"," ",D&&"| ".concat(new Date(D).toLocaleTimeString([],{timeStyle:"short"}))," ","| BO",R||"x"]}),(0,n.jsx)(h(),{href:"/match/".concat(p.id),style:{color:"inherit",textDecoration:"inherit",overflow:"visible"},children:(0,n.jsx)(c.Z,{style:{boxShadow:"0px 0px 5px 0px rgba(0,0,0,0.25)",overflow:"visible"},w:"100%",children:(0,n.jsx)(o.k,{children:(0,n.jsxs)(o.k,{className:B.teamRowContainer,children:[T?(0,n.jsx)(_,{teamScore:I,isWinner:T===C,team:p.team1}):(0,n.jsx)(L,{isLoading:P,advancedMatch:y,team_number:1,possibleTeams:W}),(0,n.jsx)(l.i,{className:B.teamRowDivider,opacity:.3}),F?(0,n.jsx)(_,{teamScore:z,isWinner:F===C,team:p.team2}):(0,n.jsx)(L,{isLoading:P,advancedMatch:y,team_number:2,possibleTeams:X})]})})})})]}):(0,n.jsxs)(o.k,{direction:"column",w:"100%",style:{overflow:"visible"},children:[(0,n.jsxs)(i.x,{className:B.dateHeader,fz:"xs",fw:500,tt:"uppercase",c:null===C&&"live"===p.status?"red":"inherit",children:[null!==C?"FINAL":"live"===p.status?"IN PROGRESS":"UPCOMING"," ",D&&"| ".concat(new Date(D).toLocaleTimeString([],{timeStyle:"short"}))," ","| BO",R||"x"]}),(0,n.jsx)(h(),{href:"/match/".concat(p.id),style:{color:"inherit",textDecoration:"inherit",overflow:"visible"},children:(0,n.jsx)(c.Z,{style:{boxShadow:"0px 0px 5px 0px rgba(0,0,0,0.25)",overflow:"visible",padding:"8px 16px"},w:"100%",children:(0,n.jsx)(o.k,{children:(0,n.jsxs)(o.k,{className:B.teamRowContainer,children:[T?(0,n.jsx)(_,{teamScore:I,isWinner:T===C,team:p.team1}):(0,n.jsx)(L,{isLoading:P,advancedMatch:y,team_number:1,possibleTeams:W}),(0,n.jsx)(l.i,{className:B.teamRowDivider,opacity:.3}),F?(0,n.jsx)(_,{teamScore:z,isWinner:F===C,team:p.team2}):(0,n.jsx)(L,{isLoading:P,advancedMatch:y,team_number:2,possibleTeams:X})]})})})})]})}},65014:function(e,t,a){a.d(t,{Hy:function(){return s},x0:function(){return r}});var n=a(67294),i=a(39484),o=a(79302);let s=e=>{let{team:t}=(0,o.t)(e),[a,s]=(0,n.useState)(""),r=(0,i.X)();return(0,n.useEffect)(()=>{if(!t){"dark"===r.colorScheme?s("/bpDarkLogo.png"):s("/bpLightLogo.png");return}"dark"===r.colorScheme?t.logo_darkmode&&s(t.logo_darkmode):t.logo_lightmode&&s(t.logo_lightmode)},[t,r.colorScheme]),a},r=e=>{let[t,a]=(0,n.useState)(""),o=(0,i.X)();return(0,n.useEffect)(()=>{"dark"===o.colorScheme?(null==e?void 0:e.logo_darkmode)?a(e.logo_darkmode):a("/bpDarkLogo.png"):(null==e?void 0:e.logo_lightmode)?a(e.logo_lightmode):a("/bpLightLogo.png")},[e,o.colorScheme]),t}},38539:function(e,t,a){a.d(t,{F:function(){return s},Q:function(){return o}});var n=a(67294),i=a(79302);let o=(e,t)=>{let[a,i]=(0,n.useState)("");return(0,n.useEffect)(()=>{if(!e){i("TBD");return}switch(t){case"short":i(e.name_short);break;case"medium":i(e.name_medium);break;case"long":i(e.name)}},[t,e]),a},s=(e,t)=>{let{team:a}=(0,i.t)(e);return o(a,t)}},36992:function(e,t,a){a.d(t,{_:function(){return o}});var n=a(79014),i=a(38751);let o=()=>{let{data:e,...t}=(0,i.J)("/match-predictions",()=>n.b$.cached.matches.fetchPossibleTeamsForUpcomingMatches.query());return{...t,matches:e}}},33482:function(e,t,a){a.d(t,{B:function(){return o}});var n=a(67294),i=a(79014);let o=e=>{let t=i.SX.useUtils(),a=i.SX.reactions.fetchReactionsForRoots.useMutation();(0,n.useEffect)(()=>{a.mutate({roots:e},{onSuccess:e=>{e.forEach((e,a)=>{t.reactions.fetchReactionsForRoot.setData({rootId:a.rootId,rootType:a.rootType},e)})}})},[e.length])}},79302:function(e,t,a){a.d(t,{t:function(){return r}});var n=a(96486),i=a.n(n),o=a(79014),s=a(38751);let r=e=>{let{data:t,...a}=(0,s.J)(i().isNil(e)?null:"/team/".concat(e),()=>o.b$.cached.teams.fetchTeam.query({id:e}));return{...a,team:null==t?void 0:t.data}}},90167:function(e,t,a){a.d(t,{y:function(){return o}});var n=a(79014),i=a(38751);let o=e=>{let{data:t,...a}=(0,i.J)("/teams/".concat(e),()=>n.b$.cached.teams.fetchTeams.query({eventId:e}));return{...a,teams:null==t?void 0:t.data}}}}]);