1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7799],{57799:(e,n,t)=>{t.r(n),t.d(n,{Player:()=>eD});var i=t(53075),l=t(96642),o=t(65563),r=t(51490),a=t(7046),d=t(64982),u=t(48177),s=t(51714),v=t(39364),p=t(95586),c=t(3219);let m="joyn-vod",g="joyn-clips",E={clip:g,compilationItem:"joyn-compilation",compilationItemLegacy:m,filme:m,highlight:m,playlist:m,episode:m,sportsMatch:m,trailer:m,livetv:"joyn-live",extra:g},I=["Episode","Clip","Extra","Movie","Playlist","SportsMatch","CompilationItem"];var f=t(32840),y=t(10566),_=t(7946),h=t(41336),C=t(84638),N=t(79930),T=t(97726),R=t(16024),b=t(13661),A=t(61539),O=t(34524),P=t(30226),D=t(8206),L=t(55201),S=t(99217),x=t(4176),M=t(93850),w=t(63199);let k=e=>{var n,t;return"ctsTags"in e&&null!=(t=null==(n=e.ctsTags)?void 0:n.reduce((e,n)=>((null==n?void 0:n.iab)&&e.push(n.iab),e),[]))?t:[]},j=e=>"brands"in e?0===e.brands.length?e.studioBrand?{code:e.studioBrand}:void 0:e.brands.filter(w.z2).map(n=>{var t;let i=e.studioBrand||n.brandCode;return{name:n.title,id:n.id,url:null!=(t=n.path)?t:void 0,...i?{code:i}:{}}})[0]:void 0,V=(e,n)=>{let t=null==e?void 0:e.find(w.z2);if(!t)return;let i=n||t.brandCode||void 0;return{name:t.title,id:t.id,...i?{code:i}:{}}},Y=e=>{var n,t,i,l;return"video"in e&&null!=(l=null==(i=e.video)||null==(t=i.audioLanguages)||null==(n=t[0])?void 0:n.code)?l:void 0},B=e=>{var n,t,i;if(!("brands"in e&&"features"in e))return;let l=null==(t=e.brands[0])||null==(n=t.logo)?void 0:n.url;if(l&&(null==(i=e.features)?void 0:i.includes(O.lo.CornerBug)))return{logoUrl:l}},U=function(e){var n,t,i,l;let o=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=null==(n=e.series)?void 0:n.title;if(r)return o?{id:null==(l=e.series)?void 0:l.id,name:r}:{id:null==(t=e.series)?void 0:t.id,name:r,seasonNumber:(null==(i=e.season)?void 0:i.number)||void 0,episodeNumber:e.number||void 0}},$=e=>{switch(e.__typename){case"Episode":return U(e);case"Clip":return(e=>{var n,t,i;let l,o,r,a,{rootParent:d}=e;if(d&&"series"in d&&(null==(n=d.series)?void 0:n.title)?(l=d.series.title,o=null==(t=d.series)?void 0:t.id,r=(null==(i=d.season)?void 0:i.number)||void 0,a=d.number||void 0):d&&"title"in d&&(l=d.title,o=d.id),l)return{id:o,name:l,seasonNumber:r,episodeNumber:a}})(e);case"Extra":return(e=>{var n,t,i;let{parent:l}=e;if(l&&"series"in l&&(null==(n=l.series)?void 0:n.title))return{id:null==(t=l.series)?void 0:t.id,name:l.series.title,seasonNumber:(null==(i=l.season)?void 0:i.number)||void 0,episodeNumber:l.number||void 0}})(e);default:return}},F=e=>{var n;let t="Clip"===e.__typename?"rootParent"in e&&e.rootParent&&"genres"in e.rootParent?e.rootParent.genres:[]:e.genres;return null!=(n=null==t?void 0:t.map(e=>null==e?void 0:e.name).filter(Boolean).join(", "))?n:""},K=e=>{var n,t;return null!=(t=null==(n=e.tracking)?void 0:n.externalAssetId)?t:void 0}
1,Z=e=>{let n,{tracking:t}=e;if(!t)return;if(t.agfMetadata)try{n=JSON.parse(t.agfMetadata)}catch(e){}let i={...t.url&&{nol_c5:"p5,".concat(t.url)},...t.agofCode&&{nol_c16:"p16,".concat(t.agofCode)},...t.externalAssetId&&{nol_c15:"p15,".concat(t.externalAssetId)},...n};return Object.keys(i).length>0?i:void 0},G=()=>"staging"===(0,r.$)("NEXT_PUBLIC_TURBO_PLAYER_ENVIRONMENT")?"stg":void 0,H=e=>{var n,t,i,l,o,r,d,u,s,v,p,c,m,g,E,f;if(!e||!(0,M.C)(e,I))return[{id:"",poster:"",sources:[],title:""}];let y="video"in e&&(null==(n=e.video)?void 0:n.id)?e.video.id:e.id,_=[{token:null!=(v=(0,x.iD)())?v:"",id:y,mimetype:a.$F.JOYN,playbackMode:a.LS.VOD,environment:G()}],h={id:e.id,poster:null!=(p=null==(t=e.posterImage)?void 0:t.url)?p:"",title:e.title,sources:_,duration:"video"in e&&(null==(i=e.video)?void 0:i.duration)?e.video.duration:void 0,minimumAge:null!=(c=null==(l=e.ageRating)?void 0:l.minAge)?c:void 0,ageRatingDetails:null==(r=e.ageRating)||null==(o=r.descriptors)?void 0:o.map(e=>{var n;return null!=(n=null==e?void 0:e.text)?n:""}).filter(Boolean),description:null!=(m=e.description)?m:void 0,logo:null==(d=e.image)?void 0:d.url,logoAccentColor:null==(u=e.image)?void 0:u.accentColor,logoAltText:e.title,language:Y(e),branding:B(e),hasProductPlacement:!!("features"in e&&(null==(s=e.features)?void 0:s.includes(O.lo.ProductPlacement))),channel:j(e),iabCategories:k(e),releaseDate:"startsAt"in e&&e.startsAt&&null!=(g=(0,L.iR)(e.startsAt))?g:void 0};switch(e.__typename){case"Episode":return[{...h,show:$(e),genre:F(e),actors:(e=>{var n;return null==(n=e.cast)?void 0:n.map(e=>{var n;return null!=(n=null==e?void 0:e.name)?n:""})})(e),tvAirDate:e.airdate&&null!=(E=(0,L.iR)(e.airdate))?E:void 0,additionalIds:{externalId:K(e)},tracking:{nielsenDe:Z(e)}}];case"Extra":return[{...h,additionalIds:{externalId:K(e)},...((e,n)=>{let{parent:t}=e;return t&&"__typename"in t&&"Compilation"===t.__typename?{compilation:{id:t.id,name:t.title},channel:n||V(t.brands,e.studioBrand)}:t&&"__typename"in t&&"SportsCompetition"===t.__typename?{competition:{id:t.id,name:t.title}}:{show:$(e)}})(e,h.channel),tracking:{nielsenDe:Z(e)}}];case"Clip":return[{...h,additionalIds:{externalId:K(e)},genre:F(e),...(e=>{let{rootParent:n}=e;return n&&"__typename"in n&&"Compilation"===n.__typename?{compilation:{id:n.id,name:n.title}}:n&&"__typename"in n&&"SportsCompetition"===n.__typename?{competition:{id:n.id,name:n.title}}:{show:$(e)}})(e),tracking:{nielsenDe:Z(e)}}];case"Movie":return[{...h,genre:F(e),additionalIds:{externalId:K(e)},tracking:{nielsenDe:Z(e)}}];case"CompilationItem":{let n=V(null==(f=e.compilation)?void 0:f.brands,e.studioBrand);return[{...h,channel:null!=n?n:h.channel,compilation:e.compilation?{id:e.compilation.id,name:e.compilation.title}:void 0,additionalIds:{externalId:K(e)},tracking:{nielsenDe:Z(e)}}]}case"SportsMatch":return[{...h,competition:e.sportsCompetition?{id:e.sportsCompetition.id,name:e.sportsCompetition.title}:void 0,additionalIds:{externalId:K(e)},tracking:{nielsenDe:Z(e)}}];default:return[h]}},J=(0,r.$)("NEXT_PUBLIC_TURBO_PLAYER_ENVIRONMENT");var W=t(74997),q=t(13859),X=t(27394),z=t(60657);let Q=(()=>{let e={},n=(()=>{var e,n;return(null==(e=(n=globalThis).getNetId)?void 0:e.call(n))||void 0})();n&&(e.netId={id:n});let t=globalThis.localStorage.getItem("netid_utiq_adtechpass")||void 0;t&&(e.utiqId={id:t});let i=(0,X.hI)();i&&(e.ppid={id:i});let{tracking:l}=(0,u.F)(),o={appVersion:(0,r.$)("VERSION"),...(null==l?void 0:l.deviceContexts)?{b2bContext:(0,z.U8)(l.deviceContexts)}:{},providers:{joyn:()=>{var e;return{token:null!=(e=(0,x.iD)())?e:""}}}};return Object.keys(e).length>0&&(o.userIds=e),o})();var ee=t(50637);let en=["compilationItemLegacy","episode","filme","livetv","playlist","sportsMatch"],et="lightbox-external";var ei=t(11773),el=t(20015),eo=t(11567),er=t(80543);let ea={rE:"1.1578.1"};var ed=t(33113),eu=t(47939),es=t(97594),ev=t(99274),ep=t(25218),ec=t(86530),em=t(68126),eg=t(70467),eE=t(10584),eI=t(19487);let ef=["audiCustomAudiences","audiTargeting","netID"],ey="Joyn",e_={getConfig:u.F},eh=async e=>{var n,t;let i=null==(n=window.cmp)?void 0:n.getVendors(),l=null==(t=window.cmp)?void 0:t.getPurposes(),o=await z.c8.getTCF();if(i&&l){let n={...l,customPurposes:l.customPurposes.filter(e=>ef.some(n=>n===e.id))};e.updateConsent(i,n,o)}},eC=function(e,n){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e_,{playerTracking:i,headersDistributionTenant:l}=t.getConfig(),o=(0,c.useMemo)(()=>{let e=[new ei.W({endpoint:(0,r.$)("NEXT_PUBLIC_PLAYER_EVENT_COLLECTOR_BASE_URL"),devicePlatform:"web",deviceType:(0,ev.Fr)()?"mobile":"desktop",distributionTenant:l})];return(null==i?void 0:i.googleAnalytics4Id)&&e.push(new el.U({accountId:i.googleAnalytics4Id})),(null==i?void 0:i.dataZoomConfigId)&&(null==i?void 0:i.dataZoomContentDeliveryPlatformId)&&e.push(new eo.K({configurationId:i.dataZoomConfigId,contentDeliveryPlatformIdentifier:i.dataZoomContentDeliveryPlatformId})),new er.jI(e,{sessionInstallationId:(0,eu.lA)(),appVersion:(0,r.$)("VERSION"),appBuildNumber:(0,r.$)("VERSION"),productName:ey,playerVersion:ea.rE,advertisingIds:[]})},[l,null==i?void 0:i.dataZoomConfigId,null==i?void 0:i.dataZoomContentDeliveryPlatformId,null==i?void 0:i.googleAnalytics4Id]);(0,c.useEffect)(()=>{ed.j.trackActionHappened("PlayerPageOpened",{element_name:"TurboPlayerWeb"})},[]),(0,c.useEffect)(()=>{n&&eh(o)},[n,o]),(0,c.useEffect)(()=>
1{if(!i||!e)return;let n=(0,eE.s)(e,o),t=((e,n)=>{let t=[(0,ep.Y)(n,{accountCode:es.K?"soegprod":"soegdev",appName:ey,appVersion:(0,r.$)("VERSION")})];return(null==e?void 0:e.nielsenAppId)&&(null==e?void 0:e.nielsenVcid)&&t.push((0,ec.K)(n,{appId:e.nielsenAppId,vcid:e.nielsenVcid})),(null==e?void 0:e.comscorePublisherId)&&t.push((0,em.H)(n,{publisherId:e.comscorePublisherId,publisherName:ey})),(null==e?void 0:e.sensicMediaKey)&&t.push((0,eg.h)(n,{media:e.sensicMediaKey,platform:"web"})),()=>{t.forEach(e=>e())}})(i,e),l=(0,eI.k)(e);return()=>{n(),t(),l()}},[e,i,o])};var eN=t(87413),eT=t(97513),eR=t(62200);let{locale:eb}=(0,u.F)(),eA={livetv:e=>{let n=(0,c.useRef)((0,L.ZV)()).current,{data:t,isInitialLoading:i,isError:l,error:o}=(0,D.r$)(S.e,{customCacheKey:["PlayableLivestream",e],variables:{id:e,from:n,to:n+P.Xn}}),r=(null==t?void 0:t.liveStream)?(e=>{if(!e)return[{id:"",poster:"",sources:[],title:""}];let n="ON_DEMAND"===e.type,t=[];if(n)e.epgEvents.forEach(n=>{if((null==n?void 0:n.program)&&"video"in n.program){var i,l,o,r,d,u,s,v,p,c,m,g,E,I;let{program:f}=n,y=(null==(i=f.video)?void 0:i.id)||"",_=[{token:null!=(c=(0,x.iD)())?c:"",id:y,mimetype:a.$F.JOYN,playbackMode:a.LS.VOD,environment:G()}],h={title:f.title,id:f.id,sources:_,duration:null!=(m=null==(l=f.video)?void 0:l.duration)?m:void 0,poster:null!=(g=null==(o=f.posterImage)?void 0:o.url)?g:"",minimumAge:null!=(E=null==(r=f.ageRating)?void 0:r.minAge)?E:void 0,ageRatingDetails:null==(u=f.ageRating)||null==(d=u.descriptors)?void 0:d.map(e=>{var n;return null!=(n=null==e?void 0:e.text)?n:""}).filter(Boolean),description:null!=(I=f.description)?I:void 0,logo:null==(s=f.image)?void 0:s.url,logoAccentColor:null==(v=f.image)?void 0:v.accentColor,logoAltText:f.title,language:Y(f),branding:B(f),hasProductPlacement:!!(null==(p=f.features)?void 0:p.includes(O.lo.ProductPlacement)),channel:j(f),iabCategories:k(f),show:(0,M.C)(f,["Episode"])?U(f,!0):void 0,liveOnDemandChannel:{name:e.title,id:e.id}};t.push(h)}});else{var i,l,o,r,d,u,s,v,p,c,m,g,E;let n=[{token:null!=(s=(0,x.iD)())?s:"",id:e.id,mimetype:a.$F.JOYN,playbackMode:a.LS.LIVE,environment:G()}],I=null==e||null==(i=e.epgEvents[0])?void 0:i.program,f=I&&"posterImage"in I&&null!=(v=null==(l=I.posterImage)?void 0:l.url)?v:"",y=null==e?void 0:e.epgEvents.flatMap(e=>{var n,t;let i=null==e?void 0:e.program;if((null==i?void 0:i.__typename)!=="EpgEntry")return[];let l=(0,L.iR)(i.startDate),o=(0,L.iR)(i.endDate);return null===l||null===o?[]:[{startDate:l,endDate:o,name:i.title,poster:null==(n=i.posterImage)?void 0:n.url,title:null!=(t=i.secondaryTitle)?t:void 0}]}),_=(null==I?void 0:I.__typename)==="EpgEntry"?I:void 0,h=null==e||null==(o=e.epgEvents[e.epgEvents.length-1])?void 0:o.program,C=(null==h?void 0:h.__typename)==="EpgEntry"?h:void 0,N={id:null!=(p=null==I?void 0:I.id)?p:"",poster:f,title:null!=(c=null==I?void 0:I.title)?c:"",sources:n,logo:e.logo.url,logoAccentColor:e.logo.accentColor,logoAltText:e.title,channel:{id:null==(r=e.brand)?void 0:r.id,code:null!=(m=null==(d=e.brand)?void 0:d.brandCode)?m:"",name:null==(u=e.brand)?void 0:u.title},livestream:{startTime:null!=(g=(0,L.iR)(null==_?void 0:_.startDate))?g:0,endTime:null!=(E=(0,L.iR)(null==C?void 0:C.endDate))?E:0,epgEntries:y}};t.push(N)}return t})(t.liveStream):[];return{type:(null==t?void 0:t.liveStream)&&"type"in t.liveStream&&t.liveStream.type?t.liveStream.type:void 0,mediaItems:r,isLoading:i,isError:l,error:o}},playlist:e=>{var n,t,i,l,o;let{data:r,isInitialLoading:a,isError:d,error:u}=(0,D.r$)(eN.j,{customCacheKey:e,variables:{playlistId:e}});return{mediaItems:[null==r||null==(t=r.playlist)||null==(n=t.currentPlaylistItem)?void 0:n.asset,...null!=(o=null==r||null==(l=r.playlist)||null==(i=l.remainingPlaylistItems)?void 0:i.map(e=>null==e?void 0:e.asset))?o:[]].filter(w.z2).flatMap(H),isLoading:a,isError:d,error:u}}},eO="development"===(0,r.$)("NODE_ENV"),eP={developmentFlags:{corsProxyUrl:"https://player.joyn.de/cors-proxy?url={{url}}"}},eD=e=>{let{assetType:n,assetId:t,children:r}=e,[u,m]=(0,l.s)(),g=(0,d.L)(),{type:I,mediaItems:P,isLoading:D,isError:L,error:S}=(eA[n]||(e=>({mediaItems:[{provider:"joyn",id:e,environment:"staging"===J?"stage":"prod"}]})))(t),{hostContextData:x}=(()=>{let{data:e}=(0,W.useQuery)({queryKey:["liveramp-ids"],queryFn:async()=>{let e=await (0,q.O)(R.vF.error);return e.length?e:[]},refetchInterval:18e5,enabled:!0,staleTime:18e5});return{hostContextData:(0,c.useMemo)(()=>{var n;if((null==e?void 0:e[0])===void 0||(null==e?void 0:e[1])===void 0)return Q;let t=e[0][1],i=e[1][1],l=null==(n=e[2])?void 0:n[1],o={...null==Q?void 0:Q.userIds,liverampId:{id:t},pairId:{id:i},...l?{atsDirect:{id:l}}:{}};return{...Q,userIds:o}},[e])}})();if(eC(u,g),(e=>{let{fskRedirect:n}=(0,ee.e)(),{back:t}=(0,y.Y)();(0,c.useEffect)(()=>{let i=e=>{["startAgeSetup","forgotPin"].includes(e.detail.action)&&n()},l=e=>
1{"hidden"===e.detail.mode&&"hidden"!==e.detail.previousMode&&t()};return null==e||e.addEventListener(a.n8.UI_INTERACTION,i),null==e||e.addEventListener(a.n8.PLAYER_SET_PRESENTATION_MODE,l),()=>{null==e||e.removeEventListener(a.n8.UI_INTERACTION,i),null==e||e.removeEventListener(a.n8.PLAYER_SET_PRESENTATION_MODE,l)}},[t,n,e])})(u),((e,n,t)=>{let i=(0,c.useRef)(null),l=(0,_.r$)("from"),o=(0,y.Y)(),{hash:r}=(0,f.g)();(0,c.useEffect)(()=>{if("episode"!==t)return;let d=async()=>{try{var e;let{asset:t}=await (0,C.l)(b.e,{id:n},{hasToken:!1});i.current=null!=(e=null==t?void 0:t.path)?e:null}catch(e){R.vF.error("Could not fetch next episode for asset id ".concat(n),{data:{error:e}})}},u=()=>{if(i.current)o.replace((0,N.Y)("/play".concat(i.current)));else{let e=T.bW.of("string"==typeof l?l:void 0);(0,h.T)(o,e,r)}};return null==e||e.addEventListener(a.n8.CONTENT_MARKER_REACHED,d),null==e||e.addEventListener(a.n8.CONTENT_ENDED,u),()=>{null==e||e.removeEventListener(a.n8.CONTENT_MARKER_REACHED,d),null==e||e.removeEventListener(a.n8.CONTENT_ENDED,u)}},[e,n,l,r,o,t])})(u,t,n),((e,n)=>{let t=(0,y.Y)(),i=(0,_.r$)("from"),{hash:l}=(0,f.g)();(0,c.useEffect)(()=>{if(!e)return;let o=()=>{en.includes(n)&&e.setPresentationMode(et)},r=e=>{let{mode:n,previousMode:o}=e.detail;if("inline"===n&&o===et){let e="string"==typeof i?T.bW.just(i):T.bW.nothing();(0,h.T)(t,e,l)}};return e.addEventListener(a.n8.READY,o),e.addEventListener(a.n8.PLAYER_SET_PRESENTATION_MODE,r),()=>{e.removeEventListener(a.n8.READY,o),e.removeEventListener(a.n8.PLAYER_SET_PRESENTATION_MODE,r)}},[e,n,t,i,l])})(u,n),((e,n,t,i)=>{let l="livetv"===i,{setIsEpgOpen:o,programId:r,setProgramId:d}=(0,A.KQ)();(0,c.useEffect)(()=>{if(l&&r&&e){if(t===O.Bp.OnDemand){let t=n.findIndex(e=>{var n,t;return(null==(t=e.sources)||null==(n=t[0])?void 0:n.id)===r});e.index=t<0?0:t}e.play()}},[l,n,r,e,t]),(0,c.useEffect)(()=>{if(l)return null==e||e.addEventListener(a.n8.UI_INTERACTION,i),null==e||e.addEventListener(a.n8.CONTENT_SELECT,r),()=>{null==e||e.removeEventListener(a.n8.UI_INTERACTION,i),null==e||e.removeEventListener(a.n8.CONTENT_SELECT,r)};function i(e){let{detail:{action:n}}=e;"openEpg"===n&&o(!0)}function r(){var i,l;d(t===O.Bp.OnDemand?null==e||null==(i=e.source)?void 0:i.id:null==n||null==(l=n[0])?void 0:l.id)}},[l,e,o,d,r,n,t])})(u,P,I,n),(e=>{let{openUpselling:n}=(0,eT.P)();(0,c.useEffect)(()=>{let t=e=>{var t;let i=null==(t=e.detail)?void 0:t.action;"upgradeToHigherTier"===i?n():"login"===i?(0,eR.j)("LOGIN","RVOD",window.location.href,""):"register"===i&&(0,eR.j)("REGISTER","RVOD",window.location.href,"")};return null==e||e.addEventListener(a.n8.UI_INTERACTION,t),()=>{null==e||e.removeEventListener(a.n8.UI_INTERACTION,t)}},[n,e])})(u),L){let e=(null==S?void 0:S.message)||"".concat((0,o.Y)("GENERIC_ERROR_OOPS")," ").concat((0,o.Y)("GENERIC_ERROR_MESSAGE"));return(0,i.jsx)(p.Q,{items:[{key:"player",icon:"error",text:e}]})}return D||!g?(0,i.jsx)(s.Zv,{}):(0,i.jsx)(a.n3,{ref:m,tagName:"joyn-integration",moduleUrl:"https://player.joyn.de/integration/latest/integration.js",integrationId:E[n],"data-testid":v.Y.TurboPlayerContainer,mediaItems:P,hostContextData:x,userLanguage:eb,style:{width:"100%",height:"100%"},...eO&&{config:eP},children:r})}}}]);
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.