1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8370],{1105:(e,t,r)=>{r.d(t,{Ri:()=>o,TV:()=>a,V8:()=>n,Yj:()=>u,y$:()=>s});let i="u">typeof document,n={AD_CTX:"dtv_ctx",AD_RESERVE_DISABLE:"dtv_reserve_disable",AGE_BAND:"dtv_age_band",CONSENT_ACCEPTED:"consent-accepted",CONSENT_COOKIE:"cookie-consent",CONSENT_GDPR:"gdpr-consent",ENV:"dtv_env",HAS_VISITED:"dtv_has_visited",HOVER_CARD_DELAY:"dtv_hover_card_delay",LOW_TIER_MODE:"dtv_low_tier_device_mode_enabled",ONETRUST_ADDITIONAL_CONSENT:"OTAdditionalConsentString",ONETRUST_ALERT_BOX_CLOSED:"OptanonAlertBoxClosed",ONETRUST_CONSENT:"OptanonConsent",ONETRUST_TCF_V2:"eupubconsent-v2",PERF_EXPERIMENT:"dtv_perf_experiment",PLAYER_AUDIO:"dtv_player_audio",PLAYER_CAPTION:"dtv_player_caption",PLAYER_CONFIG:"dtv_player_config",SPOOF:"dtv_spoof"},a=(e,t,r={})=>{if(!i)return;let{days:n=365,domain:a,path:o="/",secure:s=!0}=r,u=new Date;u.setTime(u.getTime()+24*n*36e5);let l=window.self!==window.top,c=r.sameSite??(l?"None":"Lax"),d=[`${e}=${encodeURIComponent(t)}`,`Path=${o}`,`Expires=${u.toUTCString()}`,`SameSite=${c}`];(s||"None"===c)&&d.push("Secure"),a&&d.push(`Domain=${a}`),document.cookie=d.join("; ")},o=e=>{if(!i)return null;let t=document.cookie.split("; ").map(e=>{let t=e.indexOf("=");return -1===t?[e,""]:[e.slice(0,t),e.slice(t+1)]}).find(([t])=>t===e)?.[1]??null;if(null===t)return null;try{return decodeURIComponent(t)}catch{return t}},s=(e,t)=>{let r=o(e);if(null===r)return null;if(!t)return r;for(let e of r.split("&")){let r=e.indexOf("=");if(-1!==r&&e.slice(0,r)===t)return e.slice(r+1)}return null},u=(e,t)=>{if(!i)return;let r=window.self!==window.top?"None":"Lax",n="Max-Age=0; expires=Thu, 01 Jan 1970 00:00:00 GMT";if(t){let i=t.path??"/",a=t.domain?`; domain=${t.domain}`:"",o=t.secure||"None"===r;document.cookie=`${e}=; path=${i}${a}; ${n}${o?"; Secure":""}; SameSite=${r}`;return}let a=window.location.hostname,o=["",a,`.${a}`],s=a.split(".");if(s.length>2){let e=s.slice(-2).join(".");o.push(`.${e}`)}for(let t of o){let i=t?`; domain=${t}`:"";document.cookie=`${e}=; path=/${i}; ${n}; Secure; SameSite=${r}`,"None"!==r&&(document.cookie=`${e}=; path=/${i}; ${n}; SameSite=${r}`)}}},18370:(e,t,r)=>{r.d(t,{OJ:()=>s,As:()=>S,is:()=>k});var i=r(54568),n=r(99680),a=r(7620);let o=(0,a.createContext)({auth:null,getIdToken:()=>{throw Error("AuthContext not provided")},init:()=>{throw Error("AuthContext not provided")},isLoading:!0,logout:()=>{throw Error("AuthContext not provided")},setAuth:()=>{throw Error("AuthContext not provided")}});function s(e){let t,r,a=(0,n.c)(12),{auth:s,children:u,isLoading:l,methods:c}=e,{getIdToken:d,init:h,loginWithRedirect:p,logout:f,setAuth:g,signUpWithRedirect:T}=c;a[0]!==s||a[1]!==d||a[2]!==h||a[3]!==l||a[4]!==p||a[5]!==f||a[6]!==g||a[7]!==T?(t={auth:s,getIdToken:d,init:h,isLoading:l,loginWithRedirect:p,logout:f,setAuth:g,signUpWithRedirect:T},a[0]=s,a[1]=d,a[2]=h,a[3]=l,a[4]=p,a[5]=f,a[6]=g,a[7]=T,a[8]=t):t=a[8];let m=t;return a[9]!==u||a[10]!==m?(r=(0,i.jsx)(o.Provider,{value:m,children:u}),a[9]=u,a[10]=m,a[11]=r):r=a[11],r}var u=r(89880),l=r(37661),c=r(77357),d=r(96320),h=r(66233),p=r(53047);let f=async({getIdToken:e,namespace:t,type:r,userId:i})=>{if(!i)return null;let n=await e();if(!n)return null;let a=await (0,h.n)((({namespace:e,type:t})=>`${(0,p.Np)()}/records/v1/${e}/${t}`)({namespace:t,type:r}),{headers:{Authorization:n}});if(!a.ok)throw new d.h(a);return a.json()};var g=r(1105);let T=e=>null==e||"string"==typeof e&&""===e.trim()?null:String(e);var m=r(18601),_=r(61283);let w=(0,m.vt)()((0,_.Zr)(e=>({auth:null,clearAuth:()=>{e(e=>({...e,auth:null}))},setAuth:t=>{e(e=>({...e,auth:t}))}}),{name:"auth-storage",partialize:e=>({auth:e.auth})}));var A=r(70983);let E=["code","state","error","error_description","absStaticsLogout","absEmailNotVerifiedError"],k=({accountBaseUrl:e,clientId:t,domain:r,environment:i,locale:n,onEnvironmentSwitch:o,onSignIn:s,onSignOut:d})=>{let h=(0,u.useRouter)(),p=(0,c.tT)(),m=(0,a.useRef)(!1),_=(0,a.useRef)(null),[k,v]=(0,a.useState)(!0),[R,S]=(0,a.useState)(null),[b,C]=(0,a.useState)(null),N=(0,c.wV)(),y=w(e=>e.setAuth),$=w(e=>e.clearAuth),x=(0,a.useCallback)(({skipReload:e}={})=>{$(),(0,g.Ri)(g.V8.AGE_BAND)&&((0,g.Yj)(g.V8.AGE_BAND),e||window.location.reload())}
1,[$]),O=(0,a.useRef)(null),D=(0,a.useRef)(!1);(0,a.useEffect)(()=>{if(!o)return;let e=new URLSearchParams(window.location.search),t=e.get("checkUser"),r=e.get("subPayment");if(("true"===t||"true"===r)&&!D.current){let{hostname:e}=window.location,t=[/(^|[.-])qa\./,/(^|[.-])staging\./,/^dtv-dev-\d+\./,/^localhost$/,/^127\.0\.0\.1$/,/^0\.0\.0\.0$/].some(t=>t.test(e)),r=(0,g.Ri)(g.V8.ENV)||"production";if(t&&"qa"!==r){D.current=!0,o("qa"),window.location.reload();return}t||"qa"!==r||(D.current=!0,o("production"),window.location.reload())}},[o]),(0,a.useEffect)(()=>{R?.user.id&&!O.current?(O.current=!0,s?.()):!R?.user.id&&O.current?(O.current=!1,d?.()):R?.user.id||null!==O.current||(O.current=!1,d?.())},[R?.user.id,s,d]),(0,a.useEffect)(()=>{(async()=>{if(m.current)return;m.current=!0,v(!0);let e=()=>{let e=new URLSearchParams(window.location.search);if(!E.some(t=>!!e.get(t)))return;for(let t of E)e.delete(t);let t=e.toString();h.replace(t?`${window.location.pathname}?${t}`:window.location.pathname)};try{let a=await new l.AbsAuth0ApiBuilder().withDomain(r).withClientId(t).withDefaultLocale(n).withEnvironment(i).withRedirectUri(window.location.origin).initialize();C(a);let o=await a.handleRedirectCallback(),{isAuthenticated:s,jwt:u}=await a.isUserAuthenticated();if(s){let t=await a.getJwtPayload(),r=await a.getAccessToken(),i=await a.getRefreshToken(),n=o?.appState?.returnTo&&"/"!==o.appState.returnTo?o.appState.returnTo:null,s=()=>{n?window.location.replace(n):window.location.reload()},l=(0,g.Ri)(g.V8.AGE_BAND);if(p.is_content_restrictions_feature_enabled&&N.maturity_rating_age_bands?.length){let e=null,r=!1;try{e=await f({getIdToken:async()=>await a.getAccessToken(),namespace:p.api_namespace,type:"content_restriction_setting",userId:t?.profile.user_id}),r=!0}catch(e){if(l){(0,g.Yj)(g.V8.AGE_BAND),s();return}}if(r){let t=T(l),r=T(e?.content?.age_band);if(t!==r){null===r?(0,g.Yj)(g.V8.AGE_BAND):(0,g.TV)(g.V8.AGE_BAND,r),s();return}}}else if(l){(0,g.Yj)(g.V8.AGE_BAND),s();return}let c={accessToken:r,expiresAt:1e3*Number(t?.exp),idToken:u,refreshToken:i,user:{email:t?.email,firstName:t?.profile.first_name,id:t?.profile.user_id,lastName:t?.profile.last_name}};S(c),y(c),n?h.replace(n):e()}else S(null),x(),e()}catch{console.error("Error initializing Auth0 API"),S(null),x(),e()}finally{v(!1)}})()},[x,t,r,p.is_content_restrictions_feature_enabled,N.maturity_rating_age_bands?.length,i,n,p.api_namespace,y,h.replace]);let I=(0,a.useCallback)(async()=>{if(!b||!R)return;let{isAuthenticated:e,jwt:t}=await b.isUserAuthenticated();if(!e||!t){S(null),x();return}let[r,i,n]=await Promise.all([b.getAccessToken(),b.getJwtPayload(),b.getRefreshToken()]),a={...R,accessToken:r,expiresAt:1e3*Number(i?.exp),idToken:t,refreshToken:n??R.refreshToken};return S(a),y(a),a.idToken},[R,b,x,y]),L=(0,a.useCallback)(async()=>{if(R?.idToken&&!(R.expiresAt<(0,A.tB)()+1e4))return R.idToken;if(b){if(!R){let e=await b.isUserAuthenticated();return e?.jwt}return _.current||(_.current=(async()=>{try{return await I()}finally{_.current=null}})()),_.current}},[R,b,I]),U=(0,a.useCallback)(()=>{console.log("Init auth0 auth")},[]),P=(0,a.useCallback)(()=>{if(x({skipReload:!0}),e){let t=`${e}/logout`;b?.logout({appState:{returnTo:t},returnTo:t})}else b?.logout()},[e,b,x]),V=(0,a.useCallback)(async()=>{let e=await b?.isUserAuthenticated();e?.isAuthenticated?P():await b?.loginWithRedirect()},[b,P]),j=(0,a.useCallback)(async()=>{let e=await b?.isUserAuthenticated();e?.isAuthenticated?P():await b?.signUp()},[b,P]);return{auth:R,getIdToken:L,init:U,isLoading:k,loginWithRedirect:V,logout:P,signUpWithRedirect:j}};r(23716);var v=r(1178);v.Ik({accessToken:v.Yj(),expiresAt:v.ai(),idToken:v.Yj(),refreshToken:v.Yj(),user:v.Ik({email:v.Yj(),firstName:v.Yj(),id:v.Yj(),lastName:v.Yj()})});let R=async()=>{},S=()=>{let e,t,r,i,s,u=(0,n.c)(24),l=(0,a.useContext)(o),c=(0,a.useRef)(l.getIdToken);u[0]!==l.getIdToken?(e=()=>{c.current=l.getIdToken},t=[l.getIdToken],u[0]=l.getIdToken,u[1]=e,u[2]=t):(e=u[1],t=u[2]),(0,a.useEffect)(e,t),u[3]===Symbol.for("react.memo_cache_sentinel")?(r=async()=>{let e=await c.current();if(!e)throw Error("Token not found");return e},u[3]=r):r=u[3];let d=r;if(!l.auth){let e;return u[4]!==l.isLoading||u[5]!==l.loginWithRedirect||u[6]!==l.logout||u[7]!==l.setAuth||u[8]!==l.signUpWithRedirect?(e={accessToken:void 0,getIdToken:R,idToken:void 0,idTokenExpiresAt:void 0,isAuthenticated:!1,isLoading:l.isLoading,loginWithRedirect:l.loginWithRedirect,logout:l.logout,refreshToken:void 0,setAuth:l.setAuth,signUpWithRedirect:l.signUpWithRedirect,user:void 0},u[4]=l.isLoading,u[5]=l.loginWithRedirect,u[6]=l.logout,u[7]=l.setAuth,u[8]=l.signUpWithRedirect,u[9]=e):e=u[9],e}let h=`${l.auth.user.firstName[0]}${l.auth.user.lastName[0]}`;return u[10]!==l.auth.user||u[11]!==h?(i={...l.auth.user,initials:h}
1,u[10]=l.auth.user,u[11]=h,u[12]=i):i=u[12],u[13]!==l.auth.accessToken||u[14]!==l.auth.expiresAt||u[15]!==l.auth.idToken||u[16]!==l.auth.refreshToken||u[17]!==l.isLoading||u[18]!==l.loginWithRedirect||u[19]!==l.logout||u[20]!==l.setAuth||u[21]!==l.signUpWithRedirect||u[22]!==i?(s={accessToken:l.auth.accessToken,getIdToken:d,idToken:l.auth.idToken,idTokenExpiresAt:l.auth.expiresAt,isAuthenticated:!0,isLoading:l.isLoading,loginWithRedirect:l.loginWithRedirect,logout:l.logout,refreshToken:l.auth.refreshToken,setAuth:l.setAuth,signUpWithRedirect:l.signUpWithRedirect,user:i},u[13]=l.auth.accessToken,u[14]=l.auth.expiresAt,u[15]=l.auth.idToken,u[16]=l.auth.refreshToken,u[17]=l.isLoading,u[18]=l.loginWithRedirect,u[19]=l.logout,u[20]=l.setAuth,u[21]=l.signUpWithRedirect,u[22]=i,u[23]=s):s=u[23],s}},53047:(e,t,r)=>{r.d(t,{C3:()=>l,F2:()=>p,L$:()=>u,Np:()=>h,e9:()=>d,i$:()=>c});var i=r(1105);let n={production:"https://tv-api.redbull.com",qa:"https://tv-api-qa.redbull.com"},a={production:"https://actions-service.redbull.com",qa:"https://actions-service-qa.redbull.com"},o={production:"https://resources.redbull.tv",qa:"https://resources-qa.redbull.tv"},s=["qa","staging"],u=({ddEnv:e,qaSettingsEnabled:t})=>{if(t)return"qa";let r=e?.trim().toLowerCase();return r&&s.includes(r)?"qa":"production"},l=()=>(0,i.Ri)(i.V8.ENV),c=e=>{(0,i.TV)(i.V8.ENV,e)},d=e=>n[e||l()]??n.production,h=e=>a[e||l()]??a.production,p=e=>o[e||l()]??o.production},66233:(e,t,r)=>{r.d(t,{Q:()=>i,n:()=>n}),r(50804).env.FETCH_TIMEOUT_SERVER_MS;class i extends Error{constructor(e,t){super(`Request timed out after ${t}ms: ${e}`),this.name="FetchTimeoutError"}}let n=async(e,t)=>{let{serverTimeoutMs:r=8e3,clientTimeoutMs:n=15e3,...a}=t??{},o=new AbortController,s=!1,u=setTimeout(()=>{s=!0,o.abort()},n),l=a.signal;l&&(l.aborted?o.abort():l.addEventListener("abort",()=>o.abort(),{once:!0}));try{return await fetch(e,{...a,signal:o.signal})}catch(t){if(t instanceof Error&&"AbortError"===t.name&&s)throw new i(String(e),n);throw t}finally{clearTimeout(u)}}},70983:(e,t,r)=>{r.d(t,{Bt:()=>k,C:()=>_,C_:()=>g,EM:()=>f,GJ:()=>E,IS:()=>R,K5:()=>p,RD:()=>b,Rt:()=>C,eI:()=>v,ec:()=>T,fU:()=>S,st:()=>A,tB:()=>w,uE:()=>y,vd:()=>m,x5:()=>N});var i=r(16105),n=r.n(i),a=r(1830),o=r.n(a),s=r(21742),u=r.n(s),l=r(3937),c=r.n(l),d=r(91464),h=r.n(d);n().extend(o()),n().extend(u()),n().extend(h()),n().extend(c());let p=1e3,f=6e4,g=36e5,T=864e5,m=e=>!!e&&n()(e).isValid(),_=e=>m(e)?n()(e).valueOf():0,w=()=>Date.now(),A=()=>new Date().toISOString(),E=e=>!!m(e)&&_(e)>w(),k=({endTime:e,inclusivity:t="()",precision:r="millisecond",selectedTime:i,startTime:a})=>![i,a,e].some(e=>!m(e))&&n()(i).isBetween(a,e,r,t),v=e=>e-e%f,R=(e,t,r)=>!!e&&!!t&&r>=v(e)&&r<v(t),S=(e,t="default")=>m(e)?new Date(e).toLocaleTimeString(t.replaceAll("_","-"),{hour:"numeric",minute:"2-digit"}):"",b=(e,t="default")=>m(e)?new Intl.DateTimeFormat(t.replaceAll("_","-"),{hour:"numeric",minute:"2-digit"}).formatToParts(new Date(e)).filter(e=>"dayPeriod"!==e.type).map(e=>e.value).join("").trim():"",C=(e,t,r)=>{let{day:i,hour:n,minute:a,month:o,timeZone:s,weekday:u,year:l}=r||{};return t&&m(e)?new Intl.DateTimeFormat(t.replaceAll("_","-"),{day:i,hour:n,minute:a,month:o,timeZone:s,weekday:u,year:l}).format(new Date(e)).replace(/\./g,""):""},N=({endTime:e,locale:t,showTime:r,startTime:i,timeZone:a,translate:o})=>{if(!t||!i||!m(i))return"";let s=new Date(i),u=new Date,l={...s.getFullYear()!==u.getFullYear()?{year:"numeric"}:{},day:"numeric",month:"short",timeZone:a},c={hour:"numeric",minute:"2-digit",timeZone:a};if(e){var d;return d={global:l,start:{...l,year:void 0}},t&&m(i)&&m(e)?`${C(i,t,d?.start||d?.global)} - ${C(e,t,d?.end||d?.global)}`:""}if(((e,t)=>{if(!m(e))return!1;var r=A();if(!m(e)||!m(r))return!1;let i=t?n()(e).tz(t):n()(e),a=t?n()(r).tz(t):n()(r);return i.isSame(a,"day")})(i,a))return r?C(i,t,c):o("today");let h=(s.getTime()-u.getTime())/T;return h>6||h<0?C(i,t,l):C(i,t,{weekday:r?"short":"long",...r?c:{}})},y=(e,t)=>m(e)&&m(t)?k({endTime:t,inclusivity:"[)",selectedTime:A(),startTime:e})?"live":_(e)>w()?"future":"past":"future"},96320:(e,t,r)=>{r.d(t,{d:()=>n,h:()=>i});
1class i extends Error{status;statusText;url;isClientError;isServerError;constructor(e){super(`API Error: ${e.status} ${e.statusText}`),this.name="ApiError",this.status=e.status,this.statusText=e.statusText,this.url=e.url,this.isClientError=e.status>=400&&e.status<500,this.isServerError=e.status>=500,Error.captureStackTrace&&Error.captureStackTrace(this,i),Object.defineProperty(this,"status",{enumerable:!0}),Object.defineProperty(this,"statusText",{enumerable:!0}),Object.defineProperty(this,"url",{enumerable:!0}),Object.defineProperty(this,"isClientError",{enumerable:!0}),Object.defineProperty(this,"isServerError",{enumerable:!0})}isNotFound(){return 404===this.status}isUnauthorized(){return 401===this.status}isForbidden(){return 403===this.status}toLogContext(){return{isClientError:this.isClientError,isServerError:this.isServerError,status:this.status,statusText:this.statusText,url:this.url}}}function n(e){return e instanceof i}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.