@castlabs/prestoplay 6.34.0 → 6.35.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/cjs/cl.adobe.js +3 -3
  2. package/cjs/cl.airplay.js +3 -3
  3. package/cjs/cl.broadpeak.js +18 -18
  4. package/cjs/cl.cast.js +125 -125
  5. package/cjs/cl.conviva.js +31 -31
  6. package/cjs/cl.core.js +579 -577
  7. package/cjs/cl.crypto.js +9 -9
  8. package/cjs/cl.dash.js +100 -100
  9. package/cjs/cl.freewheel.js +26 -26
  10. package/cjs/cl.hls.js +76 -76
  11. package/cjs/cl.hlssmpte.js +6 -6
  12. package/cjs/cl.htmlcue.js +30 -30
  13. package/cjs/cl.ima.js +25 -25
  14. package/cjs/cl.mediatailor.js +3 -3
  15. package/cjs/cl.mse.js +345 -345
  16. package/cjs/cl.muxdata.js +13 -13
  17. package/cjs/cl.onboard.js +4 -4
  18. package/cjs/cl.persistent.js +14 -14
  19. package/cjs/cl.playlist.js +5 -5
  20. package/cjs/cl.simid.js +16 -16
  21. package/cjs/cl.smooth.js +70 -70
  22. package/cjs/cl.thumbnails.js +25 -25
  23. package/cjs/cl.tizen.js +67 -67
  24. package/cjs/cl.ttml.js +29 -29
  25. package/cjs/cl.verimatrix.js +5 -5
  26. package/cjs/cl.vimond.js +8 -8
  27. package/cjs/cl.vr.js +19 -19
  28. package/cjs/cl.vtt.js +14 -14
  29. package/cjs/cl.yospace.js +3 -3
  30. package/cjs/cl.youbora.js +38 -38
  31. package/cl.adobe.js +3 -3
  32. package/cl.airplay.js +3 -3
  33. package/cl.broadpeak.js +14 -14
  34. package/cl.cast.js +97 -97
  35. package/cl.conviva.js +28 -27
  36. package/cl.core.js +463 -462
  37. package/cl.crypto.js +8 -8
  38. package/cl.dash.js +89 -89
  39. package/cl.freewheel.js +20 -20
  40. package/cl.hls.js +82 -82
  41. package/cl.hlssmpte.js +5 -5
  42. package/cl.htmlcue.js +26 -26
  43. package/cl.ima.js +19 -19
  44. package/cl.mediatailor.js +2 -2
  45. package/cl.mse.js +299 -299
  46. package/cl.muxdata.js +11 -11
  47. package/cl.onboard.js +5 -5
  48. package/cl.persistent.js +10 -10
  49. package/cl.playlist.js +5 -5
  50. package/cl.simid.js +14 -14
  51. package/cl.smooth.js +60 -60
  52. package/cl.thumbnails.js +17 -17
  53. package/cl.tizen.js +55 -55
  54. package/cl.ttml.js +22 -22
  55. package/cl.verimatrix.js +4 -4
  56. package/cl.vimond.js +7 -7
  57. package/cl.vr.js +14 -14
  58. package/cl.vtt.js +12 -12
  59. package/cl.yospace.js +3 -3
  60. package/cl.youbora.js +31 -31
  61. package/package.json +1 -1
package/cl.core.js CHANGED
@@ -1,14 +1,14 @@
1
- let g={}; let _ = {};let f=function(window){'use strict';var ba,ca,fa,ma,pa,ta,wa,xa,ya,Aa,Fa,Ga,Ha,Ia,Ja,La,Ma,Ra,Ta,Ua,Va,Wa,Za,$a,db,gb,lb,ob,pb,sb,vb,zb,Ab,Bb,Eb,Fb,Jb,Kb,Nb,Rb,Yb,Zb,$b,zc,Hc,Pc,Qc,Xc,Yc,Zc,cd,dd,ed,fd,hd,id,jd,kd,ld,qd,sd,vd,Bd,Cd,Dd,Ed,Gd,Hd,Id,Ld,Nd,Pd,Vd,ce,ee,fe,me,Je,Qe,Se,Te,Ue,Ve,We,Xe,Ye,Ze,$e,af,ff,gf,hf,jf,kf,lf,nf,sf,uf,Jf,Lf,Mf,Rf,dg,gg,mg,Bg,Cg,Dg,Eg,Fg,Hg,Ig,Jg,Pg,Qg,Tg,Ug,Zg,Wg,gh,hh,jh,mh,oh,wh,xh,yh,Bh,Ch,Ah,zh,Dh,Gh,Eh,Kh,Rh,Qh,bi,Uh,Th,ni,mi,oi,pi,qi,ti,ui,xi,Ki,Ni,Mi,Li,Ti,Ui,Yi,Si,Zi,Xi,$i,aj,Vi,Wi,
2
- dj,ij,jj,ej,hj,gj,fj,lj,nj,mj,rj,sj,tj,wj,xj,yj,Gj,Jj,Kj,Lj,Nj,Oj,Rj,Qj,Vj,Xj,ak,bk,ck,fk,gk,hk,jk,kk,xk,zk,Ak,yk,Bk,Ck,Ek,Fk,Gk,Ik,Hk,Kk,Lk,Uk,uk,Xk,Wk,Vk,Yk,Zk,$k,al,bl,el,fl,hl,il,ll,nl,ol,sl,ul,pl,rl,tl,vl,wl,xl,zl,Al,El,Pl,Tl,Ul,Sl,Vl,Xl,Yl,Zl,$l,am,Rl,bm,Ql,dm,fm,gm,hm,im,jm,Wl,cm,em,lm,nm,pm,sm,um,vm,wm,xm,ym,Km,Mm,Sm,Wm,Ym,an,dn,gn,hn,ln,nn,on,pn,sn,qn,rn,tn,un,vn,yn,Gn,Hn,Pn,Sn,Tn,Vn,Xn,Yn,Zn,$n,Qn,Wn,ao,bo,co,eo,no,go,oo,fo,ho,io,po,uo,wo,yo,xo,Ao,so,Ho,Eo,Go,Fo,vo,Io,Jo,Ko,Lo,Mo,No,Oo,
3
- Po,Wo,Xo,Yo,$o,ap,ep,gp,hp,ip,dp,kp,lp,mp,qp,vp,wp,xp,yp,Ap,Bp,Cp,Hp,Ip,Jp,Kp,Lp,Np,Op,Pp,Qp,dq,Zp,fq,gq,hq,jq,kq,iq,nq,oq,pq,mq,Rp,Sp,Vp,Wp,Xp,Yp,$p,aq,bq,cq,wq,xq,eq,lq,yq,tq,sq,vq,qq,zq,Aq,Bq,Cq,Dq,Gq,Hq,Eq,Pq,Qq,Rq,Oq,Zq,Fq,Sq,Tq,Uq,Vq,Wq,Xq,Yq,ar,Jq,$q,Kq,Iq,Lq,br,cr,er,fr,dr,gr,Mq,Nq,hr,ir,lr,mr,nr,kr,jr,pr,rr,tr,vr,wr,xr,yr,zr,Ar,Br,Cr,Dr,Er,Fr,Kr,Or,Lr,Qr,Vr,Xr,Zr,as,bs,cs,es,ns,fs,gs,is,ps,ls,Ur,qs,ts,us,vs,rs,ss,ws,xs,As,Hs,Is,Ls,Ns,Os,Ms,Js,zs,Gs,Bs,Fs,Rs,Ws,$s,at,ct,et,gt,ft,ht,it,jt,
4
- kt,lt,qt,rt,st,tt,ut,vt,wt,xt,yt,Jt,Nt,Rg,Sg;_.aa=" is registered.";ba=" is unsupported on this platform.";ca=" to a log level. Falling back to default!";_.da="#text";_.ea="6.34.0";fa="APPLE";_.ha="AdaptationSet";_.ia="Already destroyed. No-op";_.ja="Already released. No-op";_.la="Autoplay is not allowed due to browser policy.";ma="Autoplay should not be used for preloaded streams. ";_.na="BANDWIDTH";_.oa="BASIC";pa="CHECKSUM";_.qa="CODECS";_.ra="Cannot retrieve buffer information due to platform limitations";
1
+ let g={}; let _ = {};let f=function(window){'use strict';var ba,ca,fa,ma,pa,ta,wa,xa,ya,Aa,Fa,Ga,Ha,Ia,Ja,La,Ma,Ra,Ta,Ua,Va,Wa,Za,$a,db,gb,lb,ob,pb,tb,wb,zb,Ab,Bb,Eb,Fb,Jb,Kb,Nb,Rb,Yb,Zb,$b,zc,Hc,Pc,Qc,Xc,Yc,Zc,cd,dd,ed,fd,hd,id,jd,kd,ld,qd,sd,vd,Bd,Cd,Dd,Ed,Gd,Hd,Id,Ld,Nd,Pd,Vd,ce,ee,fe,me,Je,Qe,Se,Te,Ue,Ve,We,Xe,Ye,Ze,$e,af,ff,gf,hf,jf,kf,lf,nf,sf,uf,Jf,Lf,Mf,Rf,dg,gg,mg,Bg,Cg,Dg,Eg,Fg,Hg,Ig,Jg,Pg,Qg,Tg,Ug,Zg,Wg,gh,hh,jh,mh,oh,wh,zh,Ah,Bh,yh,xh,Ch,Fh,Dh,Gh,Hh,Lh,Sh,Rh,ci,Vh,Uh,oi,ni,pi,qi,ri,ui,vi,yi,Li,Oi,Ni,Mi,Ui,Vi,Zi,Ti,$i,Yi,aj,bj,Wi,
2
+ Xi,ej,jj,kj,fj,ij,hj,gj,mj,oj,nj,sj,tj,uj,xj,yj,zj,Hj,Kj,Lj,Mj,Oj,Pj,Sj,Rj,Wj,Yj,bk,ck,dk,gk,hk,ik,kk,lk,yk,Ak,Bk,zk,Ck,Dk,Fk,Gk,Hk,Jk,Ik,Lk,Mk,Vk,vk,Yk,Xk,Wk,Zk,$k,al,bl,dl,fl,gl,il,jl,ml,ol,pl,tl,vl,ql,sl,ul,wl,xl,yl,Al,Bl,Fl,Ql,Ul,Vl,Tl,Wl,Yl,Zl,$l,am,bm,Sl,cm,Rl,em,gm,hm,im,jm,km,Xl,dm,fm,mm,om,qm,tm,vm,wm,xm,ym,zm,Lm,Nm,Tm,Xm,Zm,bn,en,hn,jn,mn,on,pn,qn,tn,rn,sn,un,vn,wn,zn,Hn,In,Qn,Tn,Un,Wn,Yn,Zn,$n,ao,Rn,Xn,bo,co,eo,fo,oo,ho,po,go,io,jo,qo,vo,xo,zo,yo,Bo,to,Io,Fo,Ho,Go,wo,Jo,Ko,Lo,Mo,No,Oo,
3
+ Po,Qo,Xo,Yo,Zo,ap,bp,fp,hp,ip,jp,ep,lp,mp,np,rp,wp,xp,yp,zp,Bp,Cp,Dp,Ip,Jp,Kp,Lp,Mp,Op,Pp,Qp,Rp,eq,$p,gq,hq,iq,kq,lq,jq,oq,pq,qq,nq,Sp,Tp,Wp,Xp,Yp,Zp,aq,bq,cq,dq,xq,yq,fq,mq,zq,uq,tq,wq,rq,Aq,Bq,Cq,Dq,Eq,Hq,Iq,Fq,Qq,Rq,Sq,Pq,$q,Gq,Tq,Uq,Vq,Wq,Xq,Yq,Zq,br,Kq,ar,Lq,Jq,Mq,cr,dr,fr,gr,er,hr,Nq,Oq,ir,jr,mr,nr,or,lr,kr,qr,sr,ur,wr,xr,yr,zr,Ar,Br,Cr,Dr,Er,Fr,Gr,Lr,Pr,Mr,Rr,Wr,Yr,$r,bs,cs,ds,fs,os,gs,hs,js,qs,ms,Vr,rs,us,vs,ws,ss,ts,xs,ys,Bs,Is,Js,Ms,Os,Ps,Ns,Ks,As,Hs,Cs,Gs,Ss,Xs,at,bt,dt,ft,ht,gt,it,jt,
4
+ kt,lt,mt,rt,st,tt,ut,vt,wt,xt,yt,zt,Kt,Ot,Rg,Sg;_.aa=" is registered.";ba=" is unsupported on this platform.";ca=" to a log level. Falling back to default!";_.da="#text";_.ea="6.35.0-beta.1";fa="APPLE";_.ha="AdaptationSet";_.ia="Already destroyed. No-op";_.ja="Already released. No-op";_.la="Autoplay is not allowed due to browser policy.";ma="Autoplay should not be used for preloaded streams. ";_.na="BANDWIDTH";_.oa="BASIC";pa="CHECKSUM";_.qa="CODECS";_.ra="Cannot retrieve buffer information due to platform limitations";
5
5
  _.sa="CastlabsPlayer";ta="Content-Length";_.ua="Content-Type";_.va="Could not find configured DRM environment.";wa="DRM licenses loaded";xa="Destroying player";ya="Error while decoding string!";Aa="Error while fetching certificate!";_.Ba="FairPlay Certificate URL is not defined";_.Ca="FairPlay License URL is not defined";_.Ea="GROUP-ID";Fa="HW_SECURE_ALL";Ga="HW_SECURE_CRYPTO";Ha="HW_SECURE_DECODE";Ia="HeaderDrm";Ja="InvalidStateError";_.Ka="LANGUAGE";La="License verification failed: ";Ma="Load interrupted while a player release is pending";
6
6
  _.Na="Loading player with configuration";_.Oa="MaxHeight";_.Pa="MaxWidth";Ra="Missing media element";_.Sa="NAME";Ta="No drmtoday configuration found in player configuration. Unable to modify the DRM license request!";Ua="No items in the playlist";Va="No sources provided!";Wa="Not a persistent session.";_.Ya="Not supported";Za="NotAllowedError";$a="NotSupportedError";_.ab="PLAYLIST";_.bb="POST";_.cb="PlayReady License URL is not defined";db="Player not ready yet.";_.eb="Player sources";_.fb="Please make sure ";
7
- gb="Preloading is not supported by this player.";_.hb="QualityLevel";_.ib="RESOLUTION";_.kb="Representation";lb="STANDARD";_.mb="SW_SECURE_CRYPTO";_.nb="SW_SECURE_DECODE";ob="Session is closed";pb="Skipping Session creation. License for init data was already requested in ";_.qb="SmoothStreamingMedia";_.rb="TYPE";sb="The index is not in the allowed range.";_.ub="URI";vb="Unable to translate ";_.xb="Unhandled/ignored event";_.yb="Unregistering listeners";zb="Unsupported keySystem";Ab="Updating playout limit for interstitial";
7
+ gb="Preloading is not supported by this player.";_.hb="QualityLevel";_.ib="RESOLUTION";_.kb="Representation";lb="STANDARD";_.mb="SW_SECURE_CRYPTO";_.nb="SW_SECURE_DECODE";ob="Session is closed";pb="Skipping Session creation. License for init data was already requested in ";_.qb="SmoothStreamingMedia";_.rb="TYPE";tb="The index is not in the allowed range.";_.ub="URI";wb="Unable to translate ";_.xb="Unhandled/ignored event";_.yb="Unregistering listeners";zb="Unsupported keySystem";Ab="Updating playout limit for interstitial";
8
8
  Bb="Using VTTCue polyfill from 3 argument TextTrackCue.";_.Cb="VIDEO";_.Db="VOD";Eb="Wait for preloading to finish";Fb="WebkitEmeManager.MediaKeySession.load";_.Gb="Widevine License URL is not defined";Jb="Will create EME Manager: ";Kb="X-AD-CREATIVE-SIGNALING";_.Lb="X-ASSET-LIST";_.Mb="X-ASSET-URI";Nb="X-GROUPED-ASSET-LIST";_.Ob="X-PLAYOUT-LIMIT";_.Pb="X-RESTRICT";_.Qb="X-RESUME-OFFSET";Rb="X-TIMELINE-OCCUPIES";_.Sb="ad-break-started";_.Tb="ad-break-stopped";_.Ub="ad-buffering";_.Vb="ad-clicked";
9
- _.Wb="ad-completed";_.Xb="ad-first-quartile";Yb="ad-hls-asset-list-request";Zb="ad-hls-asset-list-response";$b="ad-hls-resoled";_.ac="ad-impression";_.bc="ad-loaded";_.cc="ad-midpoint";_.dc="ad-paused";_.ec="ad-progress";_.fc="ad-resumed";_.ic="ad-skipped";_.kc="ad-started";_.lc="ad-stopped";_.mc="ad-third-quartile";_.nc="addtrack";_.oc="ads-timeline-changed";_.pc="airplay-casting-ended";_.qc="airplay-casting-started";_.rc="airplay-status-changed";_.sc="application/cea-608";_.tc="application/dash+xml";
10
- _.uc="application/mp4";_.xc='application/mp4; codecs\x3d"stpp"';_.yc='application/mp4; codecs\x3d"wvtt"';zc="application/octet-stream";_.Ac="application/ttml+xml";_.Bc="application/vnd.ms-sstr+xml";_.Cc="application/x-www-form-urlencoded";_.q="audio";_.Dc="audio/aac";_.Ec="audio/ac3";_.Fc="audio/eac3";_.Gc="audio/mp4";Hc='audio/mp4;codecs\x3d"mp4a.40.2"';_.Ic="audiobufferchanged";_.Jc="audiotrackchanged";_.Kc="autoplaynotallowed";_.Lc="bitratechanged";_.Mc="boolean";_.Nc="bufferingended";_.Oc="bufferingstarted";
11
- Pc="canplay";Qc="canplaythrough";_.Rc="castingstarted";_.Sc="caststatuschanged";_.Tc="castvisibilitychanged";_.Uc="cdn-switch-success";_.Vc="cenc";_.Wc="center";Xc="certificate-request";Yc="change";Zc="chrome";_.bd="clpp-fill";cd="clpp-hidden";dd="clpp-mc-playlist";ed="clpp-visible";fd="clpp.PlayerFleet";_.gd="clpp.cast.CastSender";hd="clpp.drm.HeaderDrm";id="clpp.drm.eme.AppleEmeManager";jd="clpp.native.Player";kd="clpp.playlist.McPlaylist";ld="clpp.utils.Platform";_.md="codecs";_.nd="column-reverse";
9
+ _.Wb="ad-completed";_.Xb="ad-first-quartile";Yb="ad-hls-asset-list-request";Zb="ad-hls-asset-list-response";$b="ad-hls-resoled";_.ac="ad-impression";_.bc="ad-loaded";_.cc="ad-midpoint";_.dc="ad-paused";_.ec="ad-progress";_.fc="ad-resumed";_.gc="ad-skipped";_.jc="ad-started";_.lc="ad-stopped";_.mc="ad-third-quartile";_.nc="addtrack";_.oc="ads-timeline-changed";_.pc="airplay-casting-ended";_.qc="airplay-casting-started";_.rc="airplay-status-changed";_.sc="application/cea-608";_.tc="application/dash+xml";
10
+ _.uc="application/mp4";_.vc='application/mp4; codecs\x3d"stpp"';_.wc='application/mp4; codecs\x3d"wvtt"';zc="application/octet-stream";_.Ac="application/ttml+xml";_.Bc="application/vnd.ms-sstr+xml";_.Cc="application/x-www-form-urlencoded";_.q="audio";_.Dc="audio/aac";_.Ec="audio/ac3";_.Fc="audio/eac3";_.Gc="audio/mp4";Hc='audio/mp4;codecs\x3d"mp4a.40.2"';_.Ic="audiobufferchanged";_.Jc="audiotrackchanged";_.Kc="autoplaynotallowed";_.Lc="bitratechanged";_.Mc="boolean";_.Nc="bufferingended";_.Oc="bufferingstarted";
11
+ Pc="canplay";Qc="canplaythrough";_.Rc="castingstarted";_.Sc="caststatuschanged";_.Tc="castvisibilitychanged";_.Uc="cdn-switch-success";_.Vc="cenc";_.Wc="center";Xc="certificate-request";Yc="change";Zc="chrome";_.$c="clpp-fill";cd="clpp-hidden";dd="clpp-mc-playlist";ed="clpp-visible";fd="clpp.PlayerFleet";_.gd="clpp.cast.CastSender";hd="clpp.drm.HeaderDrm";id="clpp.drm.eme.AppleEmeManager";jd="clpp.native.Player";kd="clpp.playlist.McPlaylist";ld="clpp.utils.Platform";_.md="codecs";_.nd="column-reverse";
12
12
  _.od="com.adobe.primetime";_.pd="com.apple.fps";qd="com.apple.quicktime.HLS";_.rd="com.microsoft.playready";sd="com.microsoft.playready.recommendation";_.td="com.widevine.alpha";_.ud="config.drm.customData is not defined";vd="controls";_.wd="cuechange";_.xd="decoder";_.yd="destroy()";_.zd="disabled";_.Ad="div";Bd="drm.mediaKeys.end";Cd="drm.mediaKeys.start";Dd="drm.onPlay.end";Ed="drm.onPlay.start";_.Fd="drmexpirationupdate";Gd="drmlicenserequested";Hd="drmrenewalstarted";Id="drmsessioncreated";
13
13
  _.Jd="drmsessionpersisted";_.Kd="drmsessionupdate";Ld="drmtoday";Nd="durationchange";_.Od="ec-3";Pd="encrypted";_.Qd="end";_.Rd="ended";_.Sd="error";_.Td="estimatedThroughputKbps";_.Ud="forced";Vd="fullscreenElement";_.Wd="function";_.Xd="height";_.Yd="hidden";_.Zd="html";_.$d="https://";_.ae="image";_.be="internal-error";ce="keystatuseschange";_.de="left";ee="license-renewal";fe="license-request";_.ge="line-left";_.he="line-right";_.ie="live-turned-static";_.je="load";_.ke="loadeddata";_.le="loadedmetadata";
14
14
  me="loadstart";_.ne="main";_.oe="mdat";_.pe="mdia";_.qe="message";_.re="metadata";_.se="mimeType";_.te="minf";_.ue="moov";_.ve="mpd-type-changed";_.we="mpeg-dash-callback-event";_.xe="native";_.Be="none";_.r="number";_.Ce="object";_.De="onBitrateChanged()";_.Ee="onContentLoaded";_.Fe="onPlayerError()";_.Ge="onPlayerWillDestroy";_.He="onPlayerWillRelease";_.Ie="onStateChanged()";Je="online-status-changed";_.Ke="optional";_.Le="org.w3.clearkey";_.Me="output-restricted";_.Ne="pause";_.Oe="persistent";
@@ -23,345 +23,346 @@ Zg=function(a,b,c){const d=c+1;if(_.z(a)||!_.ah(a))a={};for(const e in b)c=b[e],
23
23
  _.bh=function(a){return typeof a===_.Wd};_.dh=function(a){return typeof a===_.Of};_.eh=function(a){return typeof a===_.r};_.ch=function(a){if(_.z(a)||!_.ah(a))return!1;a=Object.getPrototypeOf(a);return a===Object.prototype||null===a};
24
24
  _.fh=function(a,b,c,d){if(a===b||null===a&&null===b||void 0===a&&void 0===b)return!0;if(null===a&&null!==b||null!==a&&null===b||void 0!==a&&void 0===b||void 0===a&&void 0!==b||!_.ah(a)||!_.ah(b))return!1;const e=c||Object.keys(a),f={};for(let g=0;g<e.length;g++){const h=e[g];if(_.z(d)||0>d.indexOf(h))if(f[h]=!0,a[h]!==b[h])return!1}if(_.z(c))for(a=Object.keys(b),b=0;b<a.length;b++)if(c=a[b],(_.z(d)||0>d.indexOf(c))&&!f[c])return!1;return!0};
25
25
  gh=function(a){return(Number.hasOwnProperty("isNaN")?Number.isNaN:b=>b!==b)(a)};hh=function(a){const b=new Map;for(const c of Object.keys(a))b.set(c,a[c]);return b};_.ih=function(a){const b={};a.forEach((c,d)=>{b[d]=c});return b};jh=function(a,b){b=b.toLowerCase();for(const [c,d]of Object.entries(a))if(c.toLowerCase()===b)return d;return null};mh=function(a){return a&&0<=kh[a]?kh[a]:lh};
26
- oh=function(a){if(!a)return _.A("clpp.log",vb+a+ca),-1;const b=nh[a.toUpperCase()];return void 0===b?(_.A("clpp.log",vb+a+ca),-1):b};_.qh=function(a){ph.info.apply(ph,arguments)};_.rh=function(a){ph.debug.apply(ph,arguments)};_.A=function(a){ph.warn.apply(ph,arguments)};_.sh=function(a){ph.error.apply(ph,arguments)};_.vh=function(a){if(a){var b=a.a();b in _.th?_.uh.warn("Player-Factory '"+b+"' already registered"):(_.th[b]=a,_.uh.info("Registered Player-Factory: '"+b+"'"))}};
27
- wh=function(a){return Object.values(_.th).find(a)||null};xh=function(a,b,c){a.stop();let d=!0,e=null;a.a=()=>{c?clearInterval(e):clearTimeout(e);d=!1};const f=()=>{d&&a.f()};e=c?setInterval(f,1E3*b):setTimeout(f,1E3*b);return a};yh=function(a){return 0>=a?Promise.resolve():new Promise(b=>{setTimeout(()=>{b()},1E3*a)})};Bh=function(a,b){return _.v(function*(){yield zh(a,()=>Promise.all(Ah(a).map(b)))})};Ch=function(a,b){_.v(function*(){yield zh(a,()=>Promise.all(a.f.filter(c=>null!=c.Sa()).map(b)))})};
28
- Ah=function(a){return[a.Kc,...a.f].filter(b=>null!=b)};zh=function(a,b){return _.v(function*(){a.a&&(yield a.a);a.a=b().then(()=>{a.a=null})})};Dh=function(a,b,c,d){a=`${a===_.C?"FATAL":"RECOVERABLE"} Clpp-Error [Category ${b} - Code ${c}]`;if(_.dh(d))a+=": "+d;else if(null!=d)if(null!=d.message)a+=": "+d.message,delete d.message;else try{a+=": "+JSON.stringify(d)}catch(e){}return a};
29
- _.Fh=function(a){var b=a.a;var c=[];for(const d in b.a)c.push.apply(c,b.a[d]);b=c;for(c=0;c<b.length;++c)Eh(b[c]);a.a.clear()};Gh=function(a,b,c){var d=[Pd,"msneedkey",Fg,"needkey"];const e=f=>{for(const g of d)a.off(b,g,e);c(f)};for(const f of d)a.on(b,f,e)};Eh=function(a){a.target.removeEventListener(a.type,a.a,a.f);a.target=null;a.a=null};
30
- Kh=function(){if(Hh)return Hh;Ih||(Ih=new _.Jh(()=>{Hh=null}));(Hh=document.querySelector(_.t)||document.querySelector(_.q))||(Hh=document.createElement(_.t));Ih.la(1);return Hh};_.Lh=function(){return!!navigator.userAgent.match(/Edge?\//)};_.Oh=function(a){return(navigator.userAgent||"").includes(a)};_.Ph=function(a){return _.Oh("Tizen"+(a?" "+String(a):""))};
31
- Rh=function(a){const b={major:-1,name:_.fg};if(!a)return b;var c=a.replace(/_/g,".");b.name=c;c=c.split(".");1<=c.length&&(b.major=Qh(a,c[0]));2<=c.length&&(b.minor=Qh(a,c[1]));3<=c.length&&(b.patch=Qh(a,c[2]));4<=c.length&&(b.build=Qh(a,c[3]));return b};_.Sh=function(){return _.Oh("Web0S")};_.Wh=function(){const a=Th();const b=["ie","edge","opera","firefox","safari",Zc];var c=Uh();const d=Vh[c];for(let e=0,f=b.length;e<f;e++)if(c=d[b[e]]&&a.match(d[b[e]]))return Rh(c[1]);return Rh("")};_.Xh=function(){return _.Oh("CrKey")};
32
- _.Yh=function(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!_.Ph()};_.Zh=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:_.Yh()&&1<navigator.maxTouchPoints};_.$h=function(){return/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)};Qh=function(a,b){try{return parseInt(b,10)}catch(c){ai.warn("Unable to parse version number for '"+b+"' from '"+a+"'")}return-1};
33
- bi=function(a,b){if(!a||!b||0===b.length)return!1;for(let c=0;c<b.length;c++)if(0<=a.indexOf(b[c]))return!0;return!1};Uh=function(){const a=Th();if(!a)return ci;var b=a.match(/^.+?(?=\))/);if(!b)return ci;b=b[0];if(bi(b,["iphone","ipad"]))return di;if(bi(b,["android"]))return ei;if(bi(b,["macintosh"]))return fi;if(bi(b,["windows nt"]))return gi;if(bi(b,["tizen"]))return hi;if(bi(b,["web0s"]))return ii;if(bi(b,["linux"]))return ji;ai.warn("Unable to identify OS from user agent: "+a);return ci};
34
- Th=function(){let a=window.navigator.userAgent;return a=a.toLowerCase()};
35
- _.li=function(){var a=Uh();var b=Uh();var c=Vh[b];if(c){c=Th().match(c.os_version)[1];c=Rh(c);if(b===gi)if("5.1"===c.name)c.name="xp";else if("6.1"===c.name)c.name="7";else if("6.2"===c.name||"6.3"===c.name)c.name="8";b=c}else b=Rh("");a:{c=Th();const e=["ie","edge","opera","firefox","safari",Zc];var d=Uh();d=Vh[d];for(let f=0,g=e.length;f<g;f++)if(d[e[f]]&&c.match(d[e[f]])){c=e[f];break a}c=ki}return{os:a,osVersion:b,browser:c,browserVersion:_.Wh()}};
36
- ni=function(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!==b.byteLength)return!1;if(mi(a)===mi(b)&&(a.byteOffset||0)===(b.byteOffset||0))return!0;const c=_.E(a);b=_.E(b);for(let d=0;d<a.byteLength;d++)if(c[d]!==b[d])return!1;return!0};mi=function(a){return a instanceof ArrayBuffer?a:a.buffer};_.E=function(a,b=0,c=Infinity){return oi(a,b,c,Uint8Array)};
37
- oi=function(a,b,c,d){const e=d.BYTES_PER_ELEMENT||1,f=mi(a),g=(a.byteOffset||0)+a.byteLength;a=Math.max(0,Math.min((a.byteOffset||0)+b*e,g));c=Math.min(a+Math.max(c*e,0),g);a/=e;return new d(f,a,c/e-a)};pi=function(a,b=0,c=Infinity){return oi(a,b,c,Uint16Array)};qi=function(a,b=0,c=Infinity){return oi(a,b,c,Uint32Array)};_.ri=function(a,b=0,c=Infinity){return oi(a,b,c,Int32Array)};_.si=function(a,b=0,c=Infinity){return oi(a,b,c,DataView)};
38
- ti=function(a){return a instanceof ArrayBuffer?a:0===a.byteOffset&&a.byteLength===a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer};ui=function(a){let b="";for(let c=0;c<a.length;c+=16E3)b+=String.fromCharCode.apply(null,a.subarray(c,c+16E3));return b};
39
- _.vi=function(a){if(!a)return"";a=_.E(a);239===a[0]&&187===a[1]&&191===a[2]&&(a=a.subarray(3));if("TextDecoder"in window){a=(new TextDecoder).decode(a);if(a.includes("\ufffd"))throw Error(ya);return a}a=escape(ui(a));try{return decodeURIComponent(a)}catch(b){throw Error(ya);}};
40
- xi=function(a,b,c){if(!a)return"";if(!c&&0!==a.byteLength%2)throw wi.error("Data has an incorrect length, must be even."),Error("Data does not seem to be UTF-16 encoded!");c=_.E(a);if(b&&255===c[0]&&254===c[1]||254===c[0]&&255===c[1])a=c.subarray(2);if(a instanceof ArrayBuffer)var d=a;else c=new Uint8Array(a.byteLength),c.set(_.E(a)),d=c.buffer;a=Math.floor(a.byteLength/2);c=new Uint16Array(a);d=new DataView(d);for(let e=0;e<a;e++)c[e]=d.getUint16(2*e,b);return ui(c)};
41
- _.yi=function(a,b){if(_.dh(a))return a;let c="";b=!!b;const d=_.E(a);239===d[0]&&187===d[1]&&191===d[2]?c=_.vi(d):254===d[0]&&255===d[1]?c=xi(d.subarray(2),!1):255===d[0]&&254===d[1]&&(c=xi(d.subarray(2),!0));const e=function(f,g){return f.byteLength<=g||32<=f[g]&&126>=f[g]}.bind(null,d);wi.debug("Unable to find byte-order-mark, making an educated guess.");0===d[0]&&0===d[2]?c=xi(a,!1):0===d[1]&&0===d[3]?c=xi(a,!0):e(0)&&e(1)&&e(2)&&e(3)&&(c=_.vi(a));if(c)return b&&(c=escape(c)),c;throw Error("Unable to detect text encoding");
42
- };_.zi=function(a){if("TextEncoder"in window)return(new TextEncoder).encode(a);a=encodeURIComponent(a);a=unescape(a);const b=new Uint8Array(a.length);for(let c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b};_.Ai=function(a,b){const c=new Uint8Array(2*a.length),d=new DataView(c.buffer);for(let e=0;e<a.length;++e)d.setUint16(2*e,a.charCodeAt(e),b);return c.buffer};
43
- _.Bi=function(a,b){var c=b||1;b=a.length;const d=new ArrayBuffer(b*c);let e;4===c?e=qi(d):2===c?e=pi(d):e=_.E(d);for(c=0;c<b;c++)e[c]=a.charCodeAt(c);return d};_.Ci=function(a,b){return String.prototype.startsWith?a.startsWith(b):0===a.indexOf(b)};_.Di=function(a,b){if(String.prototype.endsWith)return a.endsWith(b);const c=a.length-b.length;a=a.lastIndexOf(b,c);return-1!==a&&a===c};_.Ei=function(a){return!!(a&&0<a.length)};_.Fi=function(a){return!a||0===a.length};
44
- _.Gi=function(a){if(void 0===a||null===a||""===a)return"";try{let b=Number(a);if(gh(b))return"";a="bps";1E3<=Math.abs(b)&&(a="Kbps",b/=1E3);1E3<=Math.abs(b)&&(a="Mbps",b/=1E3);return`${b.toFixed(2).replace(/[.,]00$/,"")}${a}`}catch(b){return""}};_.Hi=function(a,b){for(const c in b)if(b[c]===a)return c;return""};_.Ji=function(a){a=a.replace(/<[^>]+>/gi,"");Ii.innerHTML=a;a=Ii.textContent;return a=a.replace(/<[^>]+>/gi,"")};
45
- Ki=function(a){if(null===a||void 0===a||""===a)return null;a=Number(a);return isNaN(a)?null:a};
46
- Ni=function(a){a.g.debug("Start watching for video events for "+a.m.namespace());const b=a.m,c=d=>Li(a,d.type);a.a.on(b,_.Rd,()=>{a.ga||(a.h=!1,Mi(a,11))});a.a.on(b,Pc,c);a.a.on(b,_.cf,()=>{a.B=!0;a.h=!1;Li(a,_.cf)});a.a.on(b,_.Ne,()=>{a.B=!1;a.h=!1;Li(a,_.Ne)});a.a.on(b,_.$f,c);a.a.on(b,_.rf,c);a.a.on(b,_.Cf,d=>{a.ga=!1;a.h=!1;Li(a,d.type)});a.a.on(b,_.Df,d=>{a.ga=!0;Li(a,d.type)});a.a.on(b,Jf,c);a.a.on(b,_.zg,()=>{a.h=!0;Li(a,_.zg)});a.a.on(b,_.Sd,d=>{(d=d&&d.detail)&&d.severity&&d.severity===_.C&&
47
- Mi(a,3)});a.a.on(b,_.le,c);a.a.on(b,Qc,()=>{a.A=!0;Li(a,Qc)});a.a.on(b,_.kg,d=>{a.ga=!0;Li(a,d.type)});a.a.on(b,_.jg,d=>{a.ga=!1;a.h=!1;Li(a,d.type)})};
48
- Mi=function(a,b){if(a.f===b)return!1;const c=Date.now(),d=6===a.f;a.w=a.f;a.f=b;11===a.w&&(a.G=c,a.l=0);a.l||(a.l=a.G||c);a.I=c-a.l;a.l=c;6===b?(a.J=a.l,a.o=a.ga?1:2,a.g.info("Buffering started. Reason: "+_.Hi(a.o,Oi)),a.m.trigger(new _.H(_.Oc,{detail:{bufferedTimeMS:-1,reason:a.o}}))):d&&(a.C=a.l-a.J,a.g.info("Buffering finished. Reason: "+_.Hi(a.o,Oi)+". Buffering time: "+a.C+" ms"),a.m.trigger(new _.H(_.Nc,{detail:{bufferedTimeMS:a.C,reason:a.o}})));b={currentState:a.f,previousState:a.w,timeSinceLastStateChangeMS:a.I};
26
+ oh=function(a){if(!a)return _.A("clpp.log",wb+a+ca),-1;const b=nh[a.toUpperCase()];return void 0===b?(_.A("clpp.log",wb+a+ca),-1):b};_.qh=function(a){ph.info.apply(ph,arguments)};_.rh=function(a){ph.debug.apply(ph,arguments)};_.A=function(a){ph.warn.apply(ph,arguments)};_.sh=function(a){ph.error.apply(ph,arguments)};_.vh=function(a){if(a){var b=a.a();b in _.th?_.uh.warn("Player-Factory '"+b+"' already registered"):(_.th[b]=a,_.uh.info("Registered Player-Factory: '"+b+"'"))}};
27
+ wh=function(a){return Object.values(_.th).find(a)||null};zh=function(a,b){return _.v(function*(){yield xh(a,()=>Promise.all(yh(a).map(b)))})};Ah=function(a){if(!a)return!1;var b=a.getConfiguration();b=!!(b&&b.ads&&b.ads.hls&&b.ads.hls.sideAdContainer);return a.Ka()&&!b};Bh=function(a,b){_.v(function*(){yield xh(a,()=>Promise.all(a.f.filter(c=>null!=c.Ua()).map(b)))})};yh=function(a){return[a.Rb,...a.f].filter(b=>null!=b)};
28
+ xh=function(a,b){return _.v(function*(){a.a&&(yield a.a);a.a=b().then(()=>{a.a=null})})};Ch=function(a,b,c,d){a=`${a===_.C?"FATAL":"RECOVERABLE"} Clpp-Error [Category ${b} - Code ${c}]`;if(_.dh(d))a+=": "+d;else if(null!=d)if(null!=d.message)a+=": "+d.message,delete d.message;else try{a+=": "+JSON.stringify(d)}catch(e){}return a};_.Eh=function(a){var b=a.a;var c=[];for(const d in b.a)c.push.apply(c,b.a[d]);b=c;for(c=0;c<b.length;++c)Dh(b[c]);a.a.clear()};
29
+ Fh=function(a,b,c){var d=[Pd,"msneedkey",Fg,"needkey"];const e=f=>{for(const g of d)a.off(b,g,e);c(f)};for(const f of d)a.on(b,f,e)};Dh=function(a){a.target.removeEventListener(a.type,a.a,a.f);a.target=null;a.a=null};Gh=function(a,b,c){a.stop();let d=!0,e=null;a.a=()=>{c?clearInterval(e):clearTimeout(e);d=!1};const f=()=>{d&&a.f()};e=c?setInterval(f,1E3*b):setTimeout(f,1E3*b);return a};Hh=function(a){return 0>=a?Promise.resolve():new Promise(b=>{setTimeout(()=>{b()},1E3*a)})};
30
+ Lh=function(){if(Ih)return Ih;Jh||(Jh=new _.Kh(()=>{Ih=null}));(Ih=document.querySelector(_.t)||document.querySelector(_.q))||(Ih=document.createElement(_.t));Jh.la(1);return Ih};_.Oh=function(){return!!navigator.userAgent.match(/Edge?\//)};_.Ph=function(a){return(navigator.userAgent||"").includes(a)};_.Qh=function(a){return _.Ph("Tizen"+(a?" "+String(a):""))};
31
+ Sh=function(a){const b={major:-1,name:_.fg};if(!a)return b;var c=a.replace(/_/g,".");b.name=c;c=c.split(".");1<=c.length&&(b.major=Rh(a,c[0]));2<=c.length&&(b.minor=Rh(a,c[1]));3<=c.length&&(b.patch=Rh(a,c[2]));4<=c.length&&(b.build=Rh(a,c[3]));return b};_.Th=function(){return _.Ph("Web0S")};_.Xh=function(){const a=Uh();const b=["ie","edge","opera","firefox","safari",Zc];var c=Vh();const d=Wh[c];for(let e=0,f=b.length;e<f;e++)if(c=d[b[e]]&&a.match(d[b[e]]))return Sh(c[1]);return Sh("")};_.Yh=function(){return _.Ph("CrKey")};
32
+ _.Zh=function(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!_.Qh()};_.$h=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:_.Zh()&&1<navigator.maxTouchPoints};_.ai=function(){return/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)};Rh=function(a,b){try{return parseInt(b,10)}catch(c){bi.warn("Unable to parse version number for '"+b+"' from '"+a+"'")}return-1};
33
+ ci=function(a,b){if(!a||!b||0===b.length)return!1;for(let c=0;c<b.length;c++)if(0<=a.indexOf(b[c]))return!0;return!1};Vh=function(){const a=Uh();if(!a)return di;var b=a.match(/^.+?(?=\))/);if(!b)return di;b=b[0];if(ci(b,["iphone","ipad"]))return ei;if(ci(b,["android"]))return fi;if(ci(b,["macintosh"]))return gi;if(ci(b,["windows nt"]))return hi;if(ci(b,["tizen"]))return ii;if(ci(b,["web0s"]))return ji;if(ci(b,["linux"]))return ki;bi.warn("Unable to identify OS from user agent: "+a);return di};
34
+ Uh=function(){let a=window.navigator.userAgent;return a=a.toLowerCase()};
35
+ _.mi=function(){var a=Vh();var b=Vh();var c=Wh[b];if(c){c=Uh().match(c.os_version)[1];c=Sh(c);if(b===hi)if("5.1"===c.name)c.name="xp";else if("6.1"===c.name)c.name="7";else if("6.2"===c.name||"6.3"===c.name)c.name="8";b=c}else b=Sh("");a:{c=Uh();const e=["ie","edge","opera","firefox","safari",Zc];var d=Vh();d=Wh[d];for(let f=0,g=e.length;f<g;f++)if(d[e[f]]&&c.match(d[e[f]])){c=e[f];break a}c=li}return{os:a,osVersion:b,browser:c,browserVersion:_.Xh()}};
36
+ oi=function(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!==b.byteLength)return!1;if(ni(a)===ni(b)&&(a.byteOffset||0)===(b.byteOffset||0))return!0;const c=_.E(a);b=_.E(b);for(let d=0;d<a.byteLength;d++)if(c[d]!==b[d])return!1;return!0};ni=function(a){return a instanceof ArrayBuffer?a:a.buffer};_.E=function(a,b=0,c=Infinity){return pi(a,b,c,Uint8Array)};
37
+ pi=function(a,b,c,d){const e=d.BYTES_PER_ELEMENT||1,f=ni(a),g=(a.byteOffset||0)+a.byteLength;a=Math.max(0,Math.min((a.byteOffset||0)+b*e,g));c=Math.min(a+Math.max(c*e,0),g);a/=e;return new d(f,a,c/e-a)};qi=function(a,b=0,c=Infinity){return pi(a,b,c,Uint16Array)};ri=function(a,b=0,c=Infinity){return pi(a,b,c,Uint32Array)};_.si=function(a,b=0,c=Infinity){return pi(a,b,c,Int32Array)};_.ti=function(a,b=0,c=Infinity){return pi(a,b,c,DataView)};
38
+ ui=function(a){return a instanceof ArrayBuffer?a:0===a.byteOffset&&a.byteLength===a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer};vi=function(a){let b="";for(let c=0;c<a.length;c+=16E3)b+=String.fromCharCode.apply(null,a.subarray(c,c+16E3));return b};
39
+ _.wi=function(a){if(!a)return"";a=_.E(a);239===a[0]&&187===a[1]&&191===a[2]&&(a=a.subarray(3));if("TextDecoder"in window){a=(new TextDecoder).decode(a);if(a.includes("\ufffd"))throw Error(ya);return a}a=escape(vi(a));try{return decodeURIComponent(a)}catch(b){throw Error(ya);}};
40
+ yi=function(a,b,c){if(!a)return"";if(!c&&0!==a.byteLength%2)throw xi.error("Data has an incorrect length, must be even."),Error("Data does not seem to be UTF-16 encoded!");c=_.E(a);if(b&&255===c[0]&&254===c[1]||254===c[0]&&255===c[1])a=c.subarray(2);if(a instanceof ArrayBuffer)var d=a;else c=new Uint8Array(a.byteLength),c.set(_.E(a)),d=c.buffer;a=Math.floor(a.byteLength/2);c=new Uint16Array(a);d=new DataView(d);for(let e=0;e<a;e++)c[e]=d.getUint16(2*e,b);return vi(c)};
41
+ _.zi=function(a,b){if(_.dh(a))return a;let c="";b=!!b;const d=_.E(a);239===d[0]&&187===d[1]&&191===d[2]?c=_.wi(d):254===d[0]&&255===d[1]?c=yi(d.subarray(2),!1):255===d[0]&&254===d[1]&&(c=yi(d.subarray(2),!0));const e=function(f,g){return f.byteLength<=g||32<=f[g]&&126>=f[g]}.bind(null,d);xi.debug("Unable to find byte-order-mark, making an educated guess.");0===d[0]&&0===d[2]?c=yi(a,!1):0===d[1]&&0===d[3]?c=yi(a,!0):e(0)&&e(1)&&e(2)&&e(3)&&(c=_.wi(a));if(c)return b&&(c=escape(c)),c;throw Error("Unable to detect text encoding");
42
+ };_.Ai=function(a){if("TextEncoder"in window)return(new TextEncoder).encode(a);a=encodeURIComponent(a);a=unescape(a);const b=new Uint8Array(a.length);for(let c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b};_.Bi=function(a,b){const c=new Uint8Array(2*a.length),d=new DataView(c.buffer);for(let e=0;e<a.length;++e)d.setUint16(2*e,a.charCodeAt(e),b);return c.buffer};
43
+ _.Ci=function(a,b){var c=b||1;b=a.length;const d=new ArrayBuffer(b*c);let e;4===c?e=ri(d):2===c?e=qi(d):e=_.E(d);for(c=0;c<b;c++)e[c]=a.charCodeAt(c);return d};_.Di=function(a,b){return String.prototype.startsWith?a.startsWith(b):0===a.indexOf(b)};_.Ei=function(a,b){if(String.prototype.endsWith)return a.endsWith(b);const c=a.length-b.length;a=a.lastIndexOf(b,c);return-1!==a&&a===c};_.Fi=function(a){return!!(a&&0<a.length)};_.Gi=function(a){return!a||0===a.length};
44
+ _.Hi=function(a){if(void 0===a||null===a||""===a)return"";try{let b=Number(a);if(gh(b))return"";a="bps";1E3<=Math.abs(b)&&(a="Kbps",b/=1E3);1E3<=Math.abs(b)&&(a="Mbps",b/=1E3);return`${b.toFixed(2).replace(/[.,]00$/,"")}${a}`}catch(b){return""}};_.Ii=function(a,b){for(const c in b)if(b[c]===a)return c;return""};_.Ki=function(a){a=a.replace(/<[^>]+>/gi,"");Ji.innerHTML=a;a=Ji.textContent;return a=a.replace(/<[^>]+>/gi,"")};
45
+ Li=function(a){if(null===a||void 0===a||""===a)return null;a=Number(a);return isNaN(a)?null:a};
46
+ Oi=function(a){a.g.debug("Start watching for video events for "+a.m.namespace());const b=a.m,c=d=>Mi(a,d.type);a.a.on(b,_.Rd,()=>{a.ga||(a.h=!1,Ni(a,11))});a.a.on(b,Pc,c);a.a.on(b,_.cf,()=>{a.B=!0;a.h=!1;Mi(a,_.cf)});a.a.on(b,_.Ne,()=>{a.B=!1;a.h=!1;Mi(a,_.Ne)});a.a.on(b,_.$f,c);a.a.on(b,_.rf,c);a.a.on(b,_.Cf,d=>{a.ga=!1;a.h=!1;Mi(a,d.type)});a.a.on(b,_.Df,d=>{a.ga=!0;Mi(a,d.type)});a.a.on(b,Jf,c);a.a.on(b,_.zg,()=>{a.h=!0;Mi(a,_.zg)});a.a.on(b,_.Sd,d=>{(d=d&&d.detail)&&d.severity&&d.severity===_.C&&
47
+ Ni(a,3)});a.a.on(b,_.le,c);a.a.on(b,Qc,()=>{a.A=!0;Mi(a,Qc)});a.a.on(b,_.kg,d=>{a.ga=!0;Mi(a,d.type)});a.a.on(b,_.jg,d=>{a.ga=!1;a.h=!1;Mi(a,d.type)})};
48
+ Ni=function(a,b){if(a.f===b)return!1;const c=Date.now(),d=6===a.f;a.w=a.f;a.f=b;11===a.w&&(a.G=c,a.l=0);a.l||(a.l=a.G||c);a.I=c-a.l;a.l=c;6===b?(a.J=a.l,a.o=a.ga?1:2,a.g.info("Buffering started. Reason: "+_.Ii(a.o,Pi)),a.m.trigger(new _.H(_.Oc,{detail:{bufferedTimeMS:-1,reason:a.o}}))):d&&(a.C=a.l-a.J,a.g.info("Buffering finished. Reason: "+_.Ii(a.o,Pi)+". Buffering time: "+a.C+" ms"),a.m.trigger(new _.H(_.Nc,{detail:{bufferedTimeMS:a.C,reason:a.o}})));b={currentState:a.f,previousState:a.w,timeSinceLastStateChangeMS:a.I};
49
49
  if(6===a.f||6===a.w)b.reason=a.o;a.m.trigger(new _.H(_.bf,{detail:b}));return!0};
50
- Li=function(a,b){if(3===a.f)a.g.warn("Player is in error state, aborting any further state checks");else{var c=a.m.isPaused(),d=a.m.isEnded();if(d)a.ga||(a.h=!1,Mi(a,11));else if(b!==_.$f){var e=a.m.getPosition();e=null!==e&&void 0!==e&&0<=e?a.m.getBufferInfo().Pa(e,!0):-1;a.F=e;e=a.m.getSurface().getMedia();a.j=e?e.readyState:null;a.H=a.m.getPlaybackRate()||1;e=typeof a.j===_.r&&a.j<Pi&&e.networkState===Qi;var f=typeof a.j===_.r&&0>=a.F&&0===a.f,g=typeof a.j===_.r&&a.j<=Pi&&a.h;e=a.ga||f||e||g;!a.K||
51
- a.m.isLive()||6!==a.f||e||(f=b===_.Cf&&4===a.j,(g=2===a.w)&&!a.A?e=!0:g||a.A||f||(e=!0));f=!1;e?f=Mi(a,6):c?f=Mi(a,10):a.B&&(f=Mi(a,8));f&&(a.A=!1);a.g.debug("Video state check for event "+b+":: seeking: "+a.ga+", waiting: "+a.h+", playing: "+a.B+", paused: "+c+", readyState: "+a.j+", rate: "+a.H+", buffer: "+a.F+", ended: "+d+". Changed state: "+f+", Current state: "+_.Hi(a.f,_.Ri))}}};Ti=function(a){return Si(a).filter(b=>b.type===qd&&!b.nf)};Ui=function(a){a.forEach(b=>{b.nf=!0})};
52
- Yi=function(a,b){a=a.map(c=>({startTime:c.startTime,endTime:c.endTime,key:c.value.key,value:c.value.data,yg:!1}));a=Vi(a);b&&(a=Wi(a));return new Set(Xi(a))};Si=function(a){const b=[];for(const c of a)b.push(c);return b};Zi=function(a,b){const c=a.endTime-a.startTime,d=b.endTime-b.startTime,e=a.gg||a.startTime,f=b.gg||b.startTime;return(Infinity===c&&Infinity===d||.01>Math.abs(c-d))&&.5>Math.abs(e-f)&&a.value.key===b.value.key&&a.value.data===b.value.data};
53
- Xi=function(a){const b=[];for(const c of a)(a=b.find(d=>d.startTime===c.startTime&&d.endTime===c.endTime))?$i(c,a):(a=aj(c),b.push(a));return b};$i=function(a,b){if(a.key.startsWith("X-"))b.customAttributes||(b.customAttributes={}),b.customAttributes[a.key]=a.value,"X-CUSTOM-ID"===a.key&&(b.id=a.value);else if("SCTE35-OUT"===a.key||"SCTE35-IN"===a.key)b.schemeIdUri=_.ig,b.type=_.bj};
54
- aj=function(a){var b=a.startTime;const c=a.endTime;b={schemeIdUri:"",value:"",startTime:b,endTime:c,id:`T${b.toFixed(2)}-${c.toFixed(2)}`,type:_.cj,eventElement:null};$i(a,b);return b};Vi=function(a){const b=new Set(a),c=new Set(a.filter(d=>"SCTE35-OUT"===d.key).map(dj));a.filter(d=>"SCTE35-IN"===d.key).forEach(d=>{c.has(dj(d))||(d.yg=!0)});return Array.from(b.values())};Wi=function(a){a.forEach(b=>{b.yg&&(b.endTime=b.startTime,b.startTime=0)});return a};dj=function(a){return`${a.startTime}-${a.endTime}`};
55
- ij=function(a,b){a.g.debug("onMetadataTrackAdded_()");b.mode=_.Yd;var c=!b.cues||0===b.cues.length;if(a.m.isLive()||!c){var d=b.cues;c=Ti(d);Ui(c);a.a=Yi(c,a.l);0<a.a.size&&(ej(a,a.a),a.m.trigger(new _.H(_.Zf)));a.j.on(b,_.wd,()=>{{const l=a.m.getPosition();for(const m of a.a){var e,f=a,g=m,h=l;if(Infinity===g.endTime){if(e=!f.f.has(g)){var k=g.startTime;e=k;k+=.5;e=e<=h&&h<=k}e&&(f.f.add(g),f.m.trigger(new _.H(_.Xf,{detail:g})))}else h=g.startTime<=h&&h<=g.endTime,!h&&f.f.has(g)?(f.f.delete(g),f.m.trigger(new _.H(_.Yf,
56
- {detail:g}))):h&&!f.f.has(g)&&(f.f.add(g),f.m.trigger(new _.H(_.Xf,{detail:g})))}}});a.m.isLive()&&(a.h=setInterval(()=>{if(b.cues){var e=a.m.getSeekRange().start;var f=[];for(var g of b.cues)g.endTime<e&&f.push(g);fj(a,b,f);0<f.length&&a.g.debug(`Evicted ${f.length} old cues.`);for(var h of a.a)h.endTime<e&&a.a.delete(h);e=0<f.length}else e=!1;gj(a,b);f=Ti(d);var k=Yi(f,a.l);g=new Set;h=!1;for(l of k)(k=hj(a,l))?(l.customAttributes&&(k.customAttributes=_.Xg(k.customAttributes||{},l.customAttributes)||
57
- void 0),h=!0):(a.a.add(l),g.add(l));var l={vi:g,wh:0<g.size||h};const {vi:m,wh:n}=l;Ui(f);(e||n)&&a.m.trigger(new _.H(_.Zf));ej(a,m)},6E3))}};jj=function(a,b){a.j.on(b,_.nc,c=>{c=c.track;c.kind===_.re&&ij(a,c)})};ej=function(a,b){for(const c of b)a.m.trigger(new _.H(_.Wf,{detail:c}))};hj=function(a,b){return Array.from(a.a.values()).find(c=>b.startTime===c.startTime&&b.endTime===c.endTime)||null};
58
- gj=function(a,b){if(b.cues){var c=Si(b.cues).filter(f=>f.type===qd),d=c.filter(f=>f.nf);c=c.filter(f=>!f.nf);var e=[];for(const f of c)for(const g of d)Zi(f,g)&&(e.push(f),g.gg=f.startTime);fj(a,b,e);0<e.length&&a.g.debug(`Removed ${e.length} duplicated cues.`)}};fj=function(a,b,c){for(const d of c)try{b.removeCue(d)}catch(e){a.g.debug("Failed to remove cue",d,e)}};_.kj=function(a){return Array.isArray(a)?a:[a]};lj=function(a,b){return a===b?!0:a.length===b.length&&a.every((c,d)=>c===b[d])};
59
- nj=function(a,b,c){if(null==a&&null==b)return!0;if(null==a||null==b)return!1;a=c?a.map(c):a;b=c?b.map(c):b;return mj(a,b)&&mj(b,a)};mj=function(a,b){const c=new Set(a);return b.every(d=>c.has(d))};_.qj=function(a,b={}){if(b.dg){const c=[];for(const d of a)c.some(e=>b.dg(d,e))||c.push(d);return c}return Array.from((new Set(a)).values())};rj=function(a,b){const c=new Set(a),d=new Set(b);return{Ni:a.filter(e=>!d.has(e)),Nj:a.filter(e=>d.has(e)),th:b.filter(e=>!c.has(e))}};
60
- sj=function(a,b){b=b.track;if(b.kind!==_.re)a.a.on(b,_.wd,c=>{c=c.target||c.srcElement;c.activeCues&&(c=Array.from(c.activeCues).map(a.j),a.h.append(c,[]))})};tj=function(a,b){const c=b||lj;let d=null,e=null,f=!1;return function(...g){if(f&&c(g,d))return e;f=!0;d=g;return e=a(...g)}};_.uj=function(a){return null!=a};wj=function(...a){for(let b=0;b<a.length;b++){const c=a[b];if(null!==c&&void 0!==c)return c}throw new _.vj("No non-null, non-undefined value found");};
61
- xj=function(...a){for(let b=0;b<a.length;b++){const c=a[b];if(null!==c&&void 0!==c)return c}};yj=function(a,b){try{return new URL(a,b)}catch(c){return null}};_.zj=function(a){return`${a.scheme}//`+`${a.a}${a.port?":"+a.port:""}${a.path}${a.h}${a.f}`};_.Aj=function(a,b,c){return a?(c||Object.keys(a).sort()).reduce(function(d,e){if(!(e in a))return d;const f=a[e];let g="\x26";""===d&&(g=b?"":"?");d=d+g+encodeURIComponent(e);return d=d+"\x3d"+encodeURIComponent(void 0===f?"":f)},""):""};
62
- _.Bj=function(a){const b={};a=a||"";a=a.substring(a.indexOf("?")+1);for(const d of a.split("\x26")){var c=d.split("\x3d");a=decodeURIComponent(c[0]);c=decodeURIComponent(c[1]||"");a&&(b[a]=c)}return b};_.Cj=function(a,b){if(a.startsWith("http://")||a.startsWith(_.$d))return a;let c=b;b.startsWith("//")&&(c=`${location.protocol}${c}`);b=new URL(c);b.search="";return(new URL(a,b)).toString()};
63
- _.Ej=function(a){if(!a)return null;a=(new _.Dj(a)).a.pathname.split("/");if(1>a.length)return null;a=a.pop().split(".");return 1>=a.length?null:a.pop().toLowerCase()};Gj=function(a,b){const c=Fj[a];for(const d of c)for(const e of b)if(d.test(e.trim()))return e.trim();return a===_.I?"":null};_.K=function(a,b,c,d){d=void 0===d?{}:d;a=a.getAttribute(b);if(!a&&d.required)throw new _.J(_.C,4,4023,`Required attribute missing: ${b}`);return a?a.value:c||null};
64
- _.Hj=function(a){return"com.apple.hls.interstitial"===a||"com.apple.hls.overlay"===a};_.Ij=function(a){if(!a)return!1;const b=!!a[_.Mb];a=!!a[_.Lb];return(b||a)&&!(b&&a)};Jj=function(a){return a&&a.ASSETS&&Array.isArray(a.ASSETS)?a.ASSETS.every(b=>typeof b.URI===_.Of&&typeof b.DURATION===_.r):!1};Kj=function(a){return a.Lf&&!(a.once&&a.Wg)&&[0,6].includes(a.state)};Lj=function(a){a=a.customAttributes[Kb];if(!a)return null;try{return JSON.parse(atob(a))}catch(b){return null}};
65
- Nj=function(a,b){for(let d=0;d<a.length;d++){const e=a[d];var c=d===a.length-1;c&&b===_.Mj||(c?(e.next=[nf],e.transition={Ea:nf}):(c=a[d+1].id,e.next=[c],e.transition={Ea:c}))}};Oj=function(a){const b={};a=a.map(d=>d.customAttributes||{});const c=new Set;a.forEach(d=>{Object.keys(d).forEach(e=>{c.add(e)})});for(const d of c)if(d===_.Pb){const e=new Set([]);a.forEach(f=>{f[d]&&f[d].forEach(g=>e.add(g))});b[d]=Array.from(e)}else if(d===_.Qb){const e=a.reduce((f,g)=>g[d]?f+g[d]:f,0);b[d]=e}return b};
66
- Rj=function(a,b){if(0===a.length)return a;const c=new Map;b===_.Pj?a.forEach(d=>{const e=c.get(d.startTime)||[];e.push(d);c.set(d.startTime,e)}):c.set(0,a);a=[];for(const d of c.values())1===d.length?a.push(d[0]):(b=Qj(d),a.push(b));return a};
67
- Qj=function(a){const b=[];let c=0;a.forEach(f=>{var g=Math.max(0,f.endTime-f.startTime);c+=g;var h=f.customAttributes[_.Lb];h&&b.push({type:"list",id:f.id,customAttributes:f.customAttributes,uc:{URI:h,DURATION:0}});if(h=f.customAttributes[_.Mb])g={type:"uri",id:f.id,customAttributes:f.customAttributes,uc:{URI:h,DURATION:g}},(f=Lj(f))&&(g.uc[Kb]=f),b.push(g)});const d=Oj(a);d[Nb]={entries:b,pa:[]};const e=a[0];a=a.map(f=>f.id).join("+");return Object.assign({},e,{id:a,endTime:e.startTime+c,customAttributes:d})};
68
- _.Tj=function(a){var b=(a||"").split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=Sj.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a};_.Uj=function(a,b){a=_.Tj(a);b=_.Tj(b);return a.split("-")[0]===b.split("-")[0]};Vj=function(a,b){a=_.Tj(a);b=_.Tj(b);a=a.split("-");b=b.split("-");return a[0]===b[0]&&1===a.length&&2===b.length};
69
- _.Wj=function(a,b){a=_.Tj(a);const c=new Set;for(var d of b)c.add(_.Tj(d));for(const e of c)if(e===a)return e;for(const e of c)if(Vj(e,a))return e;for(const e of c)if(d=e,b=a,d=_.Tj(d),b=_.Tj(b),d=d.split("-"),b=b.split("-"),b=2===d.length&&2===b.length&&d[0]===b[0])return e;for(const e of c)if(Vj(a,e))return e;return null};Xj=function(a){return a.reduce((b,c)=>b+c,0)};_.Zj=function(){return{maxAttempts:1,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:0,fatalStatusCodes:[...Yj]}};
70
- ak=function(a,b){a.timeout=b.timeout;a.baseDelay=b.baseDelay;a.backoffFactor=b.backoffFactor;a.fuzzFactor=b.fuzzFactor;a.maxAttempts=b.maxAttempts;a.fatalStatusCodes=b.fatalStatusCodes||[...Yj]};bk=function(a){const b={};a.forEach((c,d)=>{b[d.trim()]=c});return b};ck=function(a){const b={};if(!a)return b;for(const c of a.trim().split("\r\n"))c&&(a=c.split(": "),b[a[0].toLowerCase()]=a.slice(1).join(": "));return b};
71
- _.ek=function(a,b){_.dh(a)&&(a={uris:[a]});Array.isArray(a)&&(a={uris:a});const c={uris:a.uris||[],type:a.type||_.dk,uriIndex:0,method:a.method||"GET",body:a.body||null,headers:Object.assign({},a.headers),allowCrossSiteCredentials:a.allowCrossSiteCredentials||!1,onProgress:a.onProgress||null,onFragment:a.onFragment||null,maxAttempts:a.maxAttempts||1,currentAttempt:0,baseDelay:a.baseDelay||1E3,backoffFactor:a.backoffFactor||2,fuzzFactor:a.fuzzFactor||.5,timeout:a.timeout||0,requestModifiers:a.requestModifiers||
72
- [],responseModifiers:a.responseModifiers||[],startTime:a.startTime||null,endTime:a.endTime||null,contentType:a.contentType||null,licenseRequestType:a.licenseRequestType||null,sessionId:null,bytesRemaining:-1,bytesLoaded:-1,bytesTotal:-1,timescale:a.timescale||null,rateLimitBps:a.rateLimitBps||null,disableFragmentSupport:a.disableFragmentSupport||!1,disableMergedFragments:a.disableMergedFragments||!1,fatalStatusCodes:[...Yj],requestStartTimestamp:null};a.keyInfo&&(c.keyInfo=a.keyInfo);b&&ak(c,b);return c};
73
- _.ik=function(a,b,c,d,e,f,g,h){a={uri:e||d,data:b,headers:a,status:c,timeMs:g,responseStartMs:h,request:f};if(fk(c))return gk(a);throw hk(a);};fk=function(a){return 200<=a&&299>=a&&202!==a};gk=function(a){return{uri:a.uri,data:a.data||new ArrayBuffer(0),headers:a.headers,status:a.status,fromCache:!!a.headers["x-shaka-from-cache"],timeMs:a.timeMs,responseStartMs:a.responseStartMs,request:a.request}};
74
- hk=function(a){a=gk(a);try{var b=_.yi(a.data,!0)}catch(e){b=null}_.rh("HTTP error text:",b);var c=a.request;c=0<=(c?c.fatalStatusCodes||[]:[]).indexOf(a.status)?_.C:1;let d=3001;null!=a.status&&(d=3E3+a.status);return new _.J(c,1,1001,{url:a.uri,status:a.status,responseText:b,headers:a.headers,request:a.request,response:a},void 0,d)};jk=function(a,b){b=null==b?-1:b;a.bytesTotal=b;a.bytesLoaded=0;a.bytesRemaining=b};
75
- kk=function(a,b,c){0<a.bytesRemaining&&(a.bytesRemaining-=b,0>a.bytesRemaining&&(a.bytesTotal+=-a.bytesRemaining,a.bytesRemaining=0));a.bytesLoaded+=b;if(a.onProgress)a.onProgress(b,c)};_.mk=function(a){_.lk[a.K]=a};
76
- _.ok=function(a){const b={attemptParameters:_.Zj(),enforceSingleSession:!1,delayLicenseRequestUntilPlayed:!1,enableSessionCacheForSkd:!1,ignoreUnrecognizedInitData:!0,Ma:{},widevineVersion:_.td};if(a&&(b.enforceSingleSession=!!a.enforceSingleSession,b.delayLicenseRequestUntilPlayed=!!a.delayLicenseRequestUntilPlayed,b.preferredDrmSystem=a.preferredDrmSystem,b.emeApi=a.emeApi,a.attemptParameters&&(b.attemptParameters=a.attemptParameters),b.enableSessionCacheForSkd=!!a.enableSessionCacheForSkd,void 0!==
77
- a.ignoreUnrecognizedInitData&&(b.ignoreUnrecognizedInitData=!!a.ignoreUnrecognizedInitData),typeof a.widevineVersion===_.Of&&0<a.widevineVersion.length&&(b.widevineVersion=a.widevineVersion),a.env)){const c=_.lk[a.env]||null;if(!c)throw _.rh(_.va,_.fb+a.env+_.aa),new _.J(_.C,6,6015,`DRM environment '${a.env}' is missing.`);b.Ma=_.nk(c,a.customData)||{};_.Ci(a.env.toLowerCase(),Ld)&&(b.enforceSingleSession=!0)}return b};
78
- _.pk=function(a,b){b.lastIndex=a.a;b=b.exec(a.f);b=null==b?null:{position:b.index,length:b[0].length,results:b};if(a.a===a.f.length||null===b||b.position!==a.a)return null;a.a+=b.length;return b.results};
79
- _.tk=function(a,b){var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new _.J(_.C,4,4016,{invalidTag:b});b=c[1];var d=c[2];c=[];let e;if(d){d=new _.qk(d);var f;(f=_.pk(d,/^([^,=]+)(?:,|$)/g))&&f[1]&&(e=f[1].trim());const g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;for(;f=_.pk(d,g);)c.push(new _.rk(f[1],f[2]||f[3]||""))}return new _.sk(a,b,c,e)};_.vk=function(a,b){a.a.push(uk(b,()=>{{var c=a.a;const d=c.indexOf(b);-1<d&&c.splice(d,1)}}))};
80
- _.wk=function(){let a,b;const c=new Promise((e,f)=>{a=e;b=f}),d=Object.assign(c,{done:!1,uf:!1,Li:!1,value:null,error:null,resolve(e){d.uf=!0;d.done=!0;d.value=e;a(e)},reject(e){d.Li=!0;d.done=!0;d.error=e;b(e)}});return d};xk=function(a,b,c){b=void 0===b?0:b;c=void 0===c?a.a-b:c;if(0>b||b>a.a)throw new RangeError(`getDataView: start ${b} out of range [0, ${a.a}]`);if(0>c||b+c>a.a)throw new RangeError(`getDataView: length ${c} out of range [0, ${a.a-b}]`);return new DataView(a.f.buffer,b,c)};
81
- zk=function(a){const b=a.a;if(a.a+4>=a.f)return a.a=a.f,null;var c=yk(a);if(a.a+4>=a.f)return a.a=a.f,null;var d=yk(a);d=String.fromCharCode(d>>24&255,d>>16&255,d>>8&255,d&255);switch(c){case 0:c=a.f-b;break;case 1:if(a.a+8>=a.f)return a.a=a.f,null;{let e,f;try{f=a.j.getUint32(a.a,!1),e=a.j.getUint32(a.a+4,!1)}catch(g){throw new _.J(_.C,3,3E3);}if(2097151<f)throw new _.J(_.C,3,3E3);a.a+=8;c=f*Math.pow(2,32)+e}}c=b+c;a.l=c;return a.f>=c?(a.a=c,{name:d,start:b,end:c}):null};
82
- Ak=function(a){if(0<=a.l&&a.f<a.l)return null;let b=zk(a);for(;null!==b;){if(b.name===_.oe){const c={start:a.h,end:b.end,length:b.end-a.h,data:xk(a.o,a.h,b.end-a.h),count:1};a.h=b.end;return c}b=zk(a)}return null};yk=function(a){const b=a.j.getUint32(a.a,!1);a.a+=4;return b};Bk=function(){return window.performance&&window.performance.now?window.performance.now():Date.now()};Ck=function(a){return Bk()-a.a};Ek=function(a){const b=new Dk;b.a=a.a;return b};
83
- Fk=function(a,b){return _.v(function*(){var c=a.f;c.a=c.h;c.j=xk(c.o);c.f=c.j.byteLength;var d=Ak(a.f);for(c=[];d;)c.push(d),d=Ak(a.f);if(0!==c.length)if(a.j){var e=c[0];if(1<c.length){e=c[0];d=c[c.length-1];const f=d.end-e.start;e={start:e.start,end:d.end,length:f,data:xk(a.a,e.start,f),count:c.length}}(c=b(e))&&(yield c)}else for(e of c)(c=b(e))&&(yield c)})};
84
- Gk=function(a,b,c,d){return _.v(function*(){const e=new Dk;for(jk(c,a.h);;){var f=yield b.read();if(f.done)break;f=f.value;a.a.append(f);const g=Ck(e);e.a=Bk();kk(c,f.byteLength,g);d&&(yield Fk(a,d))}return a.a.get()})};
85
- Ik=function(a){var b=new window.Headers;for(const e in a.headers)b.append(e.toLowerCase(),a.headers[e]);const c=new window.AbortController,d={wd:!1,$g:!1};b={V:Hk(a.uris[a.uriIndex],a,{body:a.body||void 0,headers:b,method:a.method,signal:c.signal,credentials:a.allowCrossSiteCredentials?"include":void 0},d),request:a,abort:()=>{d.wd||(d.wd=!0,c.abort());return Promise.resolve()}};if(a=a.timeout){const e=window.setTimeout(()=>{d.$g=!0;c.abort()},a);b.V=b.V.finally(()=>{window.clearTimeout(e)})}return b};
86
- Hk=function(a,b,c,d){return _.v(function*(){const e=new Dk;try{_.rh("sending Fetch request",c.method,a);const g=yield window.fetch(a,c);var f=bk(g.headers);const h={uri:g.url,data:null,headers:f,status:g.status,timeMs:0,responseStartMs:Ck(e),request:b};if(!fk(g.status))throw h.data=yield g.arrayBuffer(),h.timeMs=Ck(e),hk(h);const k=g.headers.get(ta),l=Ki(k);if(!g.body)return jk(b,0),h.data=new ArrayBuffer(0),h.timeMs=Ck(e),gk(h);const m=g.body.getReader(),n=new Jk(l,!b.disableMergedFragments);f=null;
87
- Kk(b,g)&&(f=p=>{if(!d.wd)return b.onFragment(p)});h.data=yield Gk(n,m,b,f);if(d.wd)throw Error("Request was aborted");h.timeMs=Ck(e);return gk(h)}catch(g){if(d.wd)throw new _.J(1,1,7001,{url:a,request:b});if(d.$g)throw new _.J(1,1,1003,{url:a,request:b});if(g&&1001===g.code)throw g;_.sh("Error while fetching data:",g);throw new _.J(1,1,1002,{url:a,error:g,request:b,status:-1},g);}})};
88
- Kk=function(a,b){b=(b=b.headers.get(_.ua))?b.split(";")[0].trim():null;return!(b!==_.qg&&b!==_.Gc&&b!==_.uc||!a.onFragment||a.disableFragmentSupport||2!==a.type)};
89
- Lk=function(a){const b=a.uris[a.uriIndex],c=new window.XMLHttpRequest,d=new Dk,e=Ek(d);let f=0,g;const h=new _.wk;c.open(a.method,b,!0);c.responseType="arraybuffer";c.timeout=a.timeout;c.withCredentials=a.allowCrossSiteCredentials;let k=!1,l=!1;c.onreadystatechange=function(){c.readyState>=XMLHttpRequest.LOADING&&0===f&&(g=Ck(e));if(c.readyState>=XMLHttpRequest.HEADERS_RECEIVED&&!k){const m=c.getResponseHeader(ta);jk(a,Ki(m));k=!0}};c.onload=function(){return _.v(function*(){const m=ck(c.getAllResponseHeaders());
90
- try{const n=c.response,p=Ck(e);l||kk(a,n?n.byteLength:0,p);const u=_.ik(m,n,c.status,b,c.responseURL,a,p,g);h.resolve(u)}catch(n){h.reject(n)}})};c.onerror=function(){if(0>=c.status)h.reject(new _.J(1,1,1002,{url:b,request:a,status:c.status}));else{var m=ck(c.getAllResponseHeaders());m=_.ik(m,c.response,c.status,b,c.responseURL,a,Ck(e),g);h.resolve(m)}};c.ontimeout=function(){h.reject(new _.J(1,1,1003,{url:b,request:a}))};c.onprogress=function(m){const n=Ck(d);m.lengthComputable&&(100<n||m.loaded>=
91
- m.total)&&(d.a=Bk(),kk(a,m.loaded-f,n),f=m.loaded,l=!0)};for(const m in a.headers)c.setRequestHeader(m.toLowerCase(),a.headers[m]);_.rh("sending XHR request",a.method,b);c.send(a.body);return{V:h,request:a,abort:()=>{c.abort();h.reject(new _.J(1,1,7001,{url:b,request:a}));return Promise.resolve()}}};_.Nk=function(a,b=!0){a=_.Mk(a).replace(/\+/g,"-").replace(/\//g,"_");return b?a:a.replace(/[=]*$/,"")};_.Mk=function(a){a=ui(_.E(a));return btoa(a)};
92
- _.Ok=function(a){a=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));const b=new Uint8Array(a.length);for(let c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b};_.Pk=function(a){const b=new Uint8Array(a.length/2);for(let c=0;c<a.length;c+=2)b[c/2]=window.parseInt(a.substr(c,2),16);return b};_.Qk=function(a){let b="";for(let c=0;c<a.length;++c){let d=a[c].toString(16);1===d.length&&(d="0"+d);b+=d}return b};
93
- _.Rk=function(a,b){if(!a&&!b)return!0;if(!a||!b||a.length!==b.length)return!1;for(let c=0;c<a.length;++c)if(a[c]!==b[c])return!1;return!0};_.Sk=function(a){var b=0;for(var c=0;c<arguments.length;++c)b+=arguments[c].length;b=new Uint8Array(+b);c=0;for(let d=0;d<arguments.length;++d)b.set(arguments[d],c),c+=arguments[d].length;return b};
94
- Uk=function(a){try{const b=a.uris[a.uriIndex],c=_.Tk(b);return{V:Promise.resolve({uri:b,data:c.data,request:a,headers:{"content-type":c.contentType}}),request:a,abort:()=>Promise.resolve()}}catch(b){return{V:Promise.reject(b),request:a,abort:()=>Promise.resolve()}}};
95
- _.Tk=function(a){var b=a.split(":");if(2>b.length||"data"!==b[0])throw _.sh("Bad data URI, failed to parse scheme"),new _.J(_.C,1,1004,{uri:a});b=b.slice(1).join(":").split(",");if(2>b.length)throw _.sh("Bad data URI, failed to extract encoding and MIME type"),new _.J(_.C,1,1004,{uri:a});var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];let d=!1;1<b.length&&"base64"===b[b.length-1]&&(d=!0,b.pop());return{data:d?_.Ok(a).buffer:_.zi(a).buffer,contentType:c}};
96
- uk=function(a,b){a.V.then(()=>b(!0),()=>b(!1));return a};
97
- Xk=function(a){a.j=a.C.then(e=>{a.f=e.request;e.request.uriIndex=e.request.currentAttempt%e.request.uris.length;if(0<e.request.currentAttempt){-1===a.h&&(a.h=Vk(e.request.baseDelay,1E3));const f=a.h*(1+(2*Math.random()-1)*Vk(e.request.fuzzFactor,.5));a.h*=Vk(e.request.backoffFactor,2);if(0<f)return(new Promise((g,h)=>{a.l=h;Wk(a,()=>{g(e.plugin(e.request))},f)})).catch(g=>{if(!a.a)throw g;})}if(a.a)throw new _.J(1,1,7001,{url:e.request.uris[e.request.uriIndex],request:e.request});return e.plugin(e.request)});
98
- let b=0,c=0,d=0;return a.j.then(e=>{const f=e.request;f.currentAttempt+=1;b=f.currentAttempt;c=f.maxAttempts;d=f.uris.length;return e.V}).then(e=>{a.w.resolve(e)}).catch(e=>{if(e instanceof _.J){const f=b<d,g=7001!==e.code,h=b<c;if((1===e.severity||f)&&g&&h)return e.a(1),a.A&&a.A(e),Xk(a);g&&e.a(_.C);a.w.reject(e)}else a.w.reject(e)})};Wk=function(a,b,c){a.o=setTimeout(b,c)};Vk=function(a,b){return null===a||void 0===a?b:a};
99
- Yk=function(a,b){b=(void 0===b?0:b)||!window.fetch||!window.AbortController||_.Ph(6)||_.Sh()&&68<_.li().browserVersion.major?Lk:Ik;a.l.http=b;a.l.https=b};Zk=function(a,b){Yk(a,b.forceXhr)};$k=function(a,b){a.A=b};al=function(a,b){return _.v(function*(){const c=yield a.fetch(b);return _.vi(c.data).replace(/\r\n|\r(?=[^\n]|$)/gm,"\n")})};
100
- bl=function(a,b){return _.v(function*(){const c=yield al(a,b);if(!c)return null;try{const d=JSON.parse(c);if(null==d||typeof d!==_.Ce)throw Error("Not an object");return d}catch(d){throw new _.vj("Failed to parse JSON response","json-failed");}})};
101
- _.gl=function(a,b,c){if(a.w)return new dl(Promise.reject(new _.J(1,1,7001,{url:b.uris[b.uriIndex],request:b})));a.j&&0<a.j&&(b.rateLimitBps=a.j);var d=[];for(var e of a.f)d.push(e);if(b.requestModifiers)for(const g of b.requestModifiers)d.push(g);b.requestModifiers=d;el(a,b);b.responseModifiers=[...a.h,...b.responseModifiers||[]];let f;e=d=new _.wk;try{const g=[{type:"public",modifiers:b.requestModifiers},{type:"internal",modifiers:a.a}];for(const h of g)for(const k of h.modifiers)e=e.then(l=>{if(f.a)throw new _.J(_.C,
102
- 1,7001,l?{url:l.uris[l.uriIndex],request:l}:null);return"internal"===h.type?k(l,c)||l:k(l)||l}).catch(l=>{if(l instanceof _.J)throw l;throw new _.J(_.C,1,1006,null,l);});e=e.then(h=>({request:h,plugin:fl(a,h)}));f=new dl(e,a.A);for(const h of b.responseModifiers)f.then(k=>{const l=()=>{if(f.a)throw new _.J(_.C,1,7001,k?{url:k.request.uris[k.request.uriIndex],request:k.request}:null);};l();const m=h(k)||k;l();return m}).catch(k=>{if(k instanceof _.J&&k.data&&k.data.response){const l=h(k.data.response);
103
- if(l&&l.then)return l.then(()=>Promise.reject(k))}return Promise.reject(k)}).catch(k=>{if(k instanceof _.J)throw k;throw new _.J(_.C,1,1007,null,k);});_.vk(a.o,f);d.resolve(b);return f}catch(g){return new dl(Promise.reject(g))}};el=function(a,b){for(const c of a.headers){const [d,e]=c;b.headers[d]||(b.headers[d]=e)}};fl=function(a,b){b=b.uris[b.uriIndex];var c=new _.Dj(b,location.href);c=c?c.a.protocol.slice(0,-1):"";const d=a.l[c];if(!d)throw new _.J(_.C,1,1E3,{url:b});return e=>d(e)};
104
- hl=function(a,b,c,d){d=void 0===d?"HEAD":d;return _.v(function*(){if(!navigator.onLine)return!1;if(b){const e=_.ek(b,c);e.method=d;c||(e.timeout=5E3);e.headers["cache-control"]="no-cache";try{yield a.fetch(e).V}catch(f){if(1002===f.code||1003===f.code)return!1}}return!0})};il=function(a){return`@@scheme:${a.scheme||""}`+`@@value:${a.value}`+`@@id:${a.id||""}@@type:${a.type||""}`+`@@protocol:${a.protocol||""}`};_.jl=function(a){return a&&a!==_.eg?a:null};
105
- ll=function(a){if(!a)throw new _.J(_.C,3,3101,`Invalid track type: ${a}`);if(!_.dh(a))throw new _.J(_.C,3,3101,`Invalid track type: ${a}. Track type must be a string!`);switch(a.toLowerCase()){case _.L:return _.L;case _.M:return _.M;case _.N:return _.N;case kl:return kl}throw new _.J(_.C,3,3101,`Unknown track type: ${a}.`);};
106
- nl=function(a,b,c){a=ll(a);const d=_.jl(c.kind);a=new _.ml(b,d===_.re?kl:a);a.kind=d;a.label=_.jl(c.label);a.language=_.jl(c.language);a.originalLanguage=c.originalLanguage||a.language;return a};ol=function(a,b){return _.v(function*(){const c=_.ek(b);return yield al(a.f,c)})};
107
- sl=function(a,b,c){return _.v(function*(){const {mimeType:d,renditions:e}=yield pl(a,b,c),f=new _.ml("dummy",_.N),g=e.map((h,k)=>{k=new _.ql(`R${k}`,f);k.bandwidth=h.bandwidth;k.ud=h.ud;k.codec=h.codec;k.width=h.width;k.height=h.height;return k});rl(g);return{renditions:g,mimeType:d||void 0}})};
108
- ul=function(a){a=a.split("\n").filter(c=>c.trim().startsWith("#EXT-X-MEDIA:")).map(c=>tl(c));const b=new Map;a.forEach(c=>{if(c.type&&c.name){const d=`${c.type}:${c.name}`;if(b.has(d))throw Error("#EXT-X-MEDIA:NAME attributes are not unique. It is impossible to map HLS metadata to Safari data structures.");b.set(d,c)}});return b};pl=function(a,b,c){return _.v(function*(){const d=vl(b),e=wl(b,c);return{mimeType:yield xl(a,e,d[0]?d[0].codec:null),renditions:d}})};
109
- rl=function(a){const b=new Set;a.forEach(c=>{b.add(`${c.width}x${c.height}`)});if(b.size<a.length)throw Error("Playlist contains multiple renditions with the same resolution.");};tl=function(a){const b=_.tk(0,a);a=d=>(d=b.getAttribute(d))?d.value:void 0;var c=a(_.rb);c=null!=c?{AUDIO:_.M,VIDEO:_.N,SUBTITLES:_.L}[c]:void 0;return{type:c,groupId:a(_.Ea),name:a(_.Sa),language:a(_.Ka),xj:a("AUTOSELECT"),default:a("DEFAULT"),Ej:a("FORCED"),cg:a("CHARACTERISTICS"),uri:a(_.ub)}};
110
- vl=function(a){return a.split("\n").filter(b=>b.trim().startsWith("#EXT-X-STREAM-INF:")).map(b=>{var c=_.tk(0,b);if(c.getAttribute(_.Cb))throw Error("Playlist contains alternative video streams.");var d=_.K(c,_.ib);b=d?Number(d.split("x")[0]):null;d=d?Number(d.split("x")[1]):null;var e=_.K(c,_.na);e=e?Number(e):null;var f=_.K(c,"AVERAGE-BANDWIDTH");f=f?Number(f):null;c=_.K(c,_.qa);c=_.yl(_.t,c?c.split(","):[]);return b={bandwidth:e,ud:f,codec:c,width:b,height:d,mimeType:null}})};
111
- wl=function(a,b){return(a=a.split("\n").filter(c=>c.trim().endsWith(".m3u8"))[0])?_.Cj(a,b):null};xl=function(a,b,c){return _.v(function*(){if(!b||!c)return null;var d=yield ol(a,b);d=[zl(d,b),Al(d,b)].filter(Boolean);return _.Bl(d,_.t,c)})};zl=function(a,b){return(a=a.split("\n").find(c=>!c.startsWith("#")&&0<c.trim().length))?_.Cj(a,b):null};Al=function(a,b){a=a.split("\n").find(c=>c.startsWith("#EXT-X-MAP:"));return a?(a=_.K(_.tk(0,a),_.ub))?_.Cj(a,b):null:null};
112
- El=function(a,b){var c=Cl;Dl.set(`${a.toLowerCase().split(";")[0]}-${c}`,{priority:c,plugin:b})};_.Il=function(a,b){var c=[Fl,Gl,Hl,Cl];for(const d of c)if(c=Dl.get(`${a.toLowerCase().split(";")[0]}-${d}`)){const e=c.plugin(),f=e.isSupported(a,b);e.destroy();if(f)return c.plugin}return null};_.Jl=function(a,b){b&&(a+=';codecs\x3d"'+b+'"');return a.replace(/\s/g,"")};_.Kl=function(a){return a.split(";")[0]};
113
- _.Ll=function(a){a=a.split(/\s*;\s*/);a.shift();return(a=a.find(b=>b.startsWith("codecs\x3d")))?a.split("\x3d")[1].replace(/^"|"$/g,"").split(/\s*,\s*/).join(","):""};_.Nl=function(a,b,c){for(const d of _.Ml)if(d.probe(b,c))return d.create(a);return null};_.Ol=function(a){a=_.Ml.indexOf(a);0<=a&&_.Ml.splice(a,1)};Pl=function(a){a.h=[];a.A={};a.a.clear();a.o.clear();a.f.release()};
114
- Tl=function(a,b,c){const d=Ql(a,b);if(d&&b!==_.N){if(c){if(c.type!==b||!a.h.find(f=>f.id===c.id))return;const e=d.find(f=>Rl(c,f,c.type));if(!e)return;a.o.set(b,c);if(b===_.L){d.forEach(f=>{f.mode=_.zd});e.mode=Sl(a);a.m.trigger(new _.H(_.Vf));a.g.info("Selected text track",e);return}if(b===_.M){d.forEach(f=>{f.enabled=!1});e.enabled=!0;a.m.trigger(new _.H(_.Jc));a.g.info("Selected audio track",e);return}}a.a.get(b)&&b===_.L&&(d.forEach(e=>{e.mode=_.zd}),a.a.set(b,null),a.m.trigger(new _.H(_.Vf)),
115
- a.g.info("Disabled text track"))}};Ul=function(a){if(0!==a.j.size){for(const b of a.j){const [c,d]=b;{const e=c;if(null===d)Tl(a,e,null);else{const f=d,g=a.h.find(h=>h.type===e&&h.language===f.language&&h.kind===f.kind&&h.label===f.label);g&&Tl(a,e,g)}}}a.j.clear()}};Sl=function(a){return(a=a.m.getTextDisplayer())?a.isRenderer()?_.Yd:_.Ef:_.Ef};Vl=function(a){return a.enabled||a.selected||a.mode===_.Ef||a.mode===_.Yd};Xl=function(a,b,c){return Wl(a)&&b===_.N&&!!c.enableHlsVideoTrackInfo};
116
- Yl=function(a,b,c){return _.v(function*(){var d=a.m.getLoadedSource();d&&a.l&&(d=yield a.l.a(d.url,c),d.mimeType&&(b.mimeType=d.mimeType),d.renditions&&0<d.renditions.length&&(b.renditions=d.renditions,b.renditions.forEach(e=>{e.track=b})))})};Zl=function(a,b,c){return Wl(a)&&(b===_.M||b===_.L)&&!!c.enableMetadata};
117
- $l=function(a,b,c){return _.v(function*(){var d=a.m.getLoadedSource();d&&a.l&&(d=yield a.l.a(d.url,c),d.Mc&&(d=d.Mc.get(`${b.type}:${b.label}`))&&d.cg&&(b.accessibility=d.cg.split(",").map(e=>e.trim()).map(e=>({value:e,type:b.type,protocol:"HLS"}))))})};am=function(a,b){return a.h.filter(c=>c.type===b)};Rl=function(a,b,c){return a.type!==c?!1:b.id||c!==_.L?a.id===b.id:a.language===(b.language||null)&&a.kind===(b.kind||null)&&a.label===(b.label||null)};
118
- bm=function(a){(a=a.m.getTextDisplayer())&&a.remove(0,Infinity)};Ql=function(a,b){if(a=cm(a,b))a=Array.from(a),b===_.L&&(a=a.filter(c=>c.kind!==_.re));return a};dm=function(a){var b=cm(a,_.L);b&&(a.f.on(b,_.nc,a.M),a.f.on(b,uf,a.R),a.f.on(b,Yc,a.P));if(b=cm(a,_.M))a.f.on(b,_.nc,a.J),a.f.on(b,uf,a.L),a.f.on(b,Yc,a.K);if(b=cm(a,_.N))a.f.on(b,_.nc,a.S),a.f.on(b,uf,a.W),a.f.on(b,Yc,a.U)};
119
- fm=function(a){_.v(function*(){const b=a.m.getConfiguration();em(a,_.M,b.preferredAudioLanguage);if(!Ql(a,_.L).some(c=>Vl(c))){const c=cm(a,_.L);yield new Promise(d=>{a.f.one(c,Yc,d);(new _.Jh(d)).la(1)})}a.B||em(a,_.L,b.preferredTextLanguage)})};gm=function(a,b){return(a=a.a.get(b)||null)&&a.renditions[0]};hm=function(a,b){return(a=a.o.get(b))&&a.renditions[0]};
120
- im=function(a,b,c,d){const e=document.createElement("track");e.id=c;e.kind=b.kind;e.srclang=b.language;b.label&&(e.label=b.label);e.src=_.Fi(b.url)?URL.createObjectURL(new Blob([])):b.url;d.appendChild(e);a.C.add(e)};
121
- jm=function(a,b,c){return _.v(function*(){var d=a.m.getConfiguration();if(d=_.Nl(d,b.mimeType,_.Tf)){var e=_.ek(b.url),f={objectType:b.mimeType===_.uc?"tt":"c"};(f=yield _.gl(a.m.getNetworkEngine(),e,f).V)&&f.data&&(e="External_"+`${a.I++}`,a.A[e]=b,d=d.a(_.E(f.data)),d={url:URL.createObjectURL(new Blob([d])),kind:b.kind,language:b.language,label:b.label,mimeType:_.Tf},im(a,d,e,c))}else a.g.warn("Track MIME type is not supported",b)})};
122
- Wl=function(a){a=a.m.getLoadedSource();return!(!a||a.type!==_.km&&!a.url.endsWith(".m3u8"))&&_.Yh()};cm=function(a,b){if(!a.m)return null;a=a.m.getSurface();if(!a)return null;a=a.getMedia();if(!a)return null;switch(b){case _.M:return a.audioTracks;case _.N:return a.videoTracks;case _.L:return a.textTracks;default:return null}};em=function(a,b,c){var d=_.kj(c).filter(Boolean);const e=am(a,b);(d=lm(e,d))?(a.g.info(`Selected track by language ${d.language}.`),Tl(a,b,d)):a.g.info(`No track found for language ${c}.`)};
123
- lm=function(a,b){const c=a.map(d=>d.language).filter(Boolean);for(const d of b){b=_.Tj(d);const e=_.Wj(b,c);if(b=a.find(f=>_.Tj(f.language||"")===e))return b}return null};nm=function(a){return a.name===Za&&mm.some(b=>a.message.startsWith(b))};
124
- _.rm=function(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&_.Zh()&&(a=360);const b=_.Zj();b.maxAttempts=3;a={source:"",license:om,viewerId:void 0,autoplay:void 0,pauseWhenInBackground:!1,ads:{hls:{enable:!0,resolutionOffsetSec:35}},manifest:{attemptParameters:_.Zj(),availabilityWindowOverride:NaN,clockSyncUri:"",ignoreDrmInfo:!1,xlinkFailGracefully:!1,autoCorrectDrift:!0,timeline:{version:1,type:void 0}},abr:{enabled:!0,defaultBandwidthEstimate:1E3,switchInterval:8,bandwidthUpgradeTarget:.85,
125
- bandwidthDowngradeTarget:.95,useSwitchIntervalForInitialSwitch:!1,restrictions:pm(a),useCmsd:!0},contentSteering:{enabled:!0,attemptParameters:_.Zj()},drm:null,cmcd:{enabled:!1,version:1,rtpMultiplier:5,deliveryMode:"headers"},enableHtmlCue:!0,preferredAudioLanguage:"",preferredTextLanguage:"",preferredAudioRole:_.ne,preferredTextRole:"",preferredAudioChannelCount:2,preferredAudioCodec:[],preferredVideoCodec:[],preferSpatialAudio:!1,preferForcedSubtitles:!1,volume:null,startTime:null,loop:!1,lowLatencyMode:!1,
126
- suggestedPresentationDelay:void 0,muted:void 0,forceWaitForTracks:!1,xmlParser:_.qm,streaming:{attemptParameters:b,bufferingGoal:10,rebufferingGoal:2,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,relativeTextTimestamp:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.1,disableAudioTracks:!1,disableVideoTracks:!1,smallGapLimit:.5,jumpLargeGaps:!0,gapTolerance:.001,durationBackoff:1,maxSegmentToMediaOffset:1,forceNativeTS:!1,preferNativeHlsOnSafari:!0,safeSeekOffset:5,stallEnabled:!0,
127
- stallThreshold:3,stallSkip:.5,bufferLimitUpdateInterval:.5,overridePasp:!1,enableLiveEdgeChasing:!1,chasingRate:1.15,startChasingAt:5,stopChasingAt:2,chaseJumpDistance:10,patchEdgeWhenMixedContent:!1,ignoreDrift:!1,disableFragmentSupport:!1,disableMergedFragments:!1,ignoreManagedMediaSourceStreamingHints:!1,enableStalledSegmentAbort:!0},mediaSource:{codecSwitchingStrategy:_.mf},restrictions:pm(),tizen:{sideStreamText:_.Ph(2)},safari:{enableHlsVideoTrackInfo:!1,enableMetadata:!1},mse:{sendPlaybackSessionIdHeader:!1},
128
- trickPlay:{speedUpMode:_.xd,preferTrickPlayTracks:!0},playlist:{timeline:"basic",content:_.Db,cropTimeline:!1},yospace:{enabled:!1},broadpeak:{adTracking:!1},cmsd:{enabled:!0},mediatailor:{enabled:!1,sessionConfig:{}},disableRestrictions:!1,chromecast:{useSenderAbrConfig:!1,useSenderStreamingConfig:!1}};if(_.Ph()||_.Sh())a.ads.hls.enable=!1;if(_.Oh("Edge/")||_.Ph())a.streaming.gapDetectionThreshold=.5;_.Sh()&&(a.streaming.stallEnabled=!1);_.Sh()&&79===_.Wh().major&&(a.streaming.stallEnabled=!0,a.streaming.stallThreshold=
129
- 1,a.streaming.stallSkip=1,a.streaming.gapDetectionThreshold=.02);_.Ph()&&(a.streaming.stallEnabled=!0,a.streaming.stallThreshold=1,a.streaming.stallSkip=0);a.vr={enable:!1,attachMouseListener:!0,fieldOfView:70,sensitivity:1,invertHorizontalControl:!1,invertVerticalControl:!1};return a};pm=function(a){a=void 0===a?Infinity:a;return{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:a,minPixels:0,maxPixels:Infinity,minBandwidth:0,maxBandwidth:Infinity}};
130
- _.tm=function(a,b){b=void 0===b?{}:b;if(!a)return _.rm();const c=[_.rm()];let d=!1;for(let e of a)null!==e&&void 0!==e&&(_.dh(e)&&(e={source:e}),e.lowLatencyMode&&!d&&(c.push({streaming:{rebufferingGoal:.1,bufferLimitUpdateInterval:.01,attemptParameters:{maxAttempts:3,baseDelay:250,backoffFactor:1}},abr:{bandwidthUpgradeTarget:.6,bandwidthDowngradeTarget:.95},manifest:{lowLatencyMode:!0}}),d=!0),c.push(e),b.Ri||null==e.suggestedPresentationDelay||c.push({manifest:{suggestedPresentationDelay:e.suggestedPresentationDelay}}));
50
+ Mi=function(a,b){if(3===a.f)a.g.warn("Player is in error state, aborting any further state checks");else{var c=a.m.isPaused(),d=a.m.isEnded();if(d)a.ga||(a.h=!1,Ni(a,11));else if(b!==_.$f){var e=a.m.getPosition();e=null!==e&&void 0!==e&&0<=e?a.m.getBufferInfo().Ra(e,!0):-1;a.F=e;e=a.m.getSurface().getMedia();a.j=e?e.readyState:null;a.H=a.m.getPlaybackRate()||1;e=typeof a.j===_.r&&a.j<Qi&&e.networkState===Ri;var f=typeof a.j===_.r&&0>=a.F&&0===a.f,g=typeof a.j===_.r&&a.j<=Qi&&a.h;e=a.ga||f||e||g;!a.K||
51
+ a.m.isLive()||6!==a.f||e||(f=b===_.Cf&&4===a.j,(g=2===a.w)&&!a.A?e=!0:g||a.A||f||(e=!0));f=!1;e?f=Ni(a,6):c?f=Ni(a,10):a.B&&(f=Ni(a,8));f&&(a.A=!1);a.g.debug("Video state check for event "+b+":: seeking: "+a.ga+", waiting: "+a.h+", playing: "+a.B+", paused: "+c+", readyState: "+a.j+", rate: "+a.H+", buffer: "+a.F+", ended: "+d+". Changed state: "+f+", Current state: "+_.Ii(a.f,_.Si))}}};Ui=function(a){return Ti(a).filter(b=>b.type===qd&&!b.nf)};Vi=function(a){a.forEach(b=>{b.nf=!0})};
52
+ Zi=function(a,b){a=a.map(c=>({startTime:c.startTime,endTime:c.endTime,key:c.value.key,value:c.value.data,yg:!1}));a=Wi(a);b&&(a=Xi(a));return new Set(Yi(a))};Ti=function(a){const b=[];for(const c of a)b.push(c);return b};$i=function(a,b){const c=a.endTime-a.startTime,d=b.endTime-b.startTime,e=a.gg||a.startTime,f=b.gg||b.startTime;return(Infinity===c&&Infinity===d||.01>Math.abs(c-d))&&.5>Math.abs(e-f)&&a.value.key===b.value.key&&a.value.data===b.value.data};
53
+ Yi=function(a){const b=[];for(const c of a)(a=b.find(d=>d.startTime===c.startTime&&d.endTime===c.endTime))?aj(c,a):(a=bj(c),b.push(a));return b};aj=function(a,b){if(a.key.startsWith("X-"))b.customAttributes||(b.customAttributes={}),b.customAttributes[a.key]=a.value,"X-CUSTOM-ID"===a.key&&(b.id=a.value);else if("SCTE35-OUT"===a.key||"SCTE35-IN"===a.key)b.schemeIdUri=_.ig,b.type=_.cj};
54
+ bj=function(a){var b=a.startTime;const c=a.endTime;b={schemeIdUri:"",value:"",startTime:b,endTime:c,id:`T${b.toFixed(2)}-${c.toFixed(2)}`,type:_.dj,eventElement:null};aj(a,b);return b};Wi=function(a){const b=new Set(a),c=new Set(a.filter(d=>"SCTE35-OUT"===d.key).map(ej));a.filter(d=>"SCTE35-IN"===d.key).forEach(d=>{c.has(ej(d))||(d.yg=!0)});return Array.from(b.values())};Xi=function(a){a.forEach(b=>{b.yg&&(b.endTime=b.startTime,b.startTime=0)});return a};ej=function(a){return`${a.startTime}-${a.endTime}`};
55
+ jj=function(a,b){a.g.debug("onMetadataTrackAdded_()");b.mode=_.Yd;var c=!b.cues||0===b.cues.length;if(a.m.isLive()||!c){var d=b.cues;c=Ui(d);Vi(c);a.a=Zi(c,a.l);0<a.a.size&&(fj(a,a.a),a.m.trigger(new _.H(_.Zf)));a.j.on(b,_.wd,()=>{{const l=a.m.getPosition();for(const m of a.a){var e,f=a,g=m,h=l;if(Infinity===g.endTime){if(e=!f.f.has(g)){var k=g.startTime;e=k;k+=.5;e=e<=h&&h<=k}e&&(f.f.add(g),f.m.trigger(new _.H(_.Xf,{detail:g})))}else h=g.startTime<=h&&h<=g.endTime,!h&&f.f.has(g)?(f.f.delete(g),f.m.trigger(new _.H(_.Yf,
56
+ {detail:g}))):h&&!f.f.has(g)&&(f.f.add(g),f.m.trigger(new _.H(_.Xf,{detail:g})))}}});a.m.isLive()&&(a.h=setInterval(()=>{if(b.cues){var e=a.m.getSeekRange().start;var f=[];for(var g of b.cues)g.endTime<e&&f.push(g);gj(a,b,f);0<f.length&&a.g.debug(`Evicted ${f.length} old cues.`);for(var h of a.a)h.endTime<e&&a.a.delete(h);e=0<f.length}else e=!1;hj(a,b);f=Ui(d);var k=Zi(f,a.l);g=new Set;h=!1;for(l of k)(k=ij(a,l))?(l.customAttributes&&(k.customAttributes=_.Xg(k.customAttributes||{},l.customAttributes)||
57
+ void 0),h=!0):(a.a.add(l),g.add(l));var l={vi:g,wh:0<g.size||h};const {vi:m,wh:n}=l;Vi(f);(e||n)&&a.m.trigger(new _.H(_.Zf));fj(a,m)},6E3))}};kj=function(a,b){a.j.on(b,_.nc,c=>{c=c.track;c.kind===_.re&&jj(a,c)})};fj=function(a,b){for(const c of b)a.m.trigger(new _.H(_.Wf,{detail:c}))};ij=function(a,b){return Array.from(a.a.values()).find(c=>b.startTime===c.startTime&&b.endTime===c.endTime)||null};
58
+ hj=function(a,b){if(b.cues){var c=Ti(b.cues).filter(f=>f.type===qd),d=c.filter(f=>f.nf);c=c.filter(f=>!f.nf);var e=[];for(const f of c)for(const g of d)$i(f,g)&&(e.push(f),g.gg=f.startTime);gj(a,b,e);0<e.length&&a.g.debug(`Removed ${e.length} duplicated cues.`)}};gj=function(a,b,c){for(const d of c)try{b.removeCue(d)}catch(e){a.g.debug("Failed to remove cue",d,e)}};_.lj=function(a){return Array.isArray(a)?a:[a]};mj=function(a,b){return a===b?!0:a.length===b.length&&a.every((c,d)=>c===b[d])};
59
+ oj=function(a,b,c){if(null==a&&null==b)return!0;if(null==a||null==b)return!1;a=c?a.map(c):a;b=c?b.map(c):b;return nj(a,b)&&nj(b,a)};nj=function(a,b){const c=new Set(a);return b.every(d=>c.has(d))};_.rj=function(a,b={}){if(b.dg){const c=[];for(const d of a)c.some(e=>b.dg(d,e))||c.push(d);return c}return Array.from((new Set(a)).values())};sj=function(a,b){const c=new Set(a),d=new Set(b);return{Ni:a.filter(e=>!d.has(e)),Nj:a.filter(e=>d.has(e)),th:b.filter(e=>!c.has(e))}};
60
+ tj=function(a,b){b=b.track;if(b.kind!==_.re)a.a.on(b,_.wd,c=>{c=c.target||c.srcElement;c.activeCues&&(c=Array.from(c.activeCues).map(a.j),a.h.append(c,[]))})};uj=function(a,b){const c=b||mj;let d=null,e=null,f=!1;return function(...g){if(f&&c(g,d))return e;f=!0;d=g;return e=a(...g)}};_.vj=function(a){return null!=a};xj=function(...a){for(let b=0;b<a.length;b++){const c=a[b];if(null!==c&&void 0!==c)return c}throw new _.wj("No non-null, non-undefined value found");};
61
+ yj=function(...a){for(let b=0;b<a.length;b++){const c=a[b];if(null!==c&&void 0!==c)return c}};zj=function(a,b){try{return new URL(a,b)}catch(c){return null}};_.Aj=function(a){return`${a.scheme}//`+`${a.a}${a.port?":"+a.port:""}${a.path}${a.h}${a.f}`};_.Bj=function(a,b,c){return a?(c||Object.keys(a).sort()).reduce(function(d,e){if(!(e in a))return d;const f=a[e];let g="\x26";""===d&&(g=b?"":"?");d=d+g+encodeURIComponent(e);return d=d+"\x3d"+encodeURIComponent(void 0===f?"":f)},""):""};
62
+ _.Cj=function(a){const b={};a=a||"";a=a.substring(a.indexOf("?")+1);for(const d of a.split("\x26")){var c=d.split("\x3d");a=decodeURIComponent(c[0]);c=decodeURIComponent(c[1]||"");a&&(b[a]=c)}return b};_.Dj=function(a,b){if(a.startsWith("http://")||a.startsWith(_.$d))return a;let c=b;b.startsWith("//")&&(c=`${location.protocol}${c}`);b=new URL(c);b.search="";return(new URL(a,b)).toString()};
63
+ _.Fj=function(a){if(!a)return null;a=(new _.Ej(a)).a.pathname.split("/");if(1>a.length)return null;a=a.pop().split(".");return 1>=a.length?null:a.pop().toLowerCase()};Hj=function(a,b){const c=Gj[a];for(const d of c)for(const e of b)if(d.test(e.trim()))return e.trim();return a===_.I?"":null};_.K=function(a,b,c,d){d=void 0===d?{}:d;a=a.getAttribute(b);if(!a&&d.required)throw new _.J(_.C,4,4023,`Required attribute missing: ${b}`);return a?a.value:c||null};
64
+ _.Ij=function(a){return"com.apple.hls.interstitial"===a||"com.apple.hls.overlay"===a};_.Jj=function(a){if(!a)return!1;const b=!!a[_.Mb];a=!!a[_.Lb];return(b||a)&&!(b&&a)};Kj=function(a){return a&&a.ASSETS&&Array.isArray(a.ASSETS)?a.ASSETS.every(b=>typeof b.URI===_.Of&&typeof b.DURATION===_.r):!1};Lj=function(a){return a.Lf&&!(a.once&&a.Wg)&&[0,6].includes(a.state)};Mj=function(a){a=a.customAttributes[Kb];if(!a)return null;try{return JSON.parse(atob(a))}catch(b){return null}};
65
+ Oj=function(a,b){for(let d=0;d<a.length;d++){const e=a[d];var c=d===a.length-1;c&&b===_.Nj||(c?(e.next=[nf],e.transition={Fa:nf}):(c=a[d+1].id,e.next=[c],e.transition={Fa:c}))}};Pj=function(a){const b={};a=a.map(d=>d.customAttributes||{});const c=new Set;a.forEach(d=>{Object.keys(d).forEach(e=>{c.add(e)})});for(const d of c)if(d===_.Pb){const e=new Set([]);a.forEach(f=>{f[d]&&f[d].forEach(g=>e.add(g))});b[d]=Array.from(e)}else if(d===_.Qb){const e=a.reduce((f,g)=>g[d]?f+g[d]:f,0);b[d]=e}return b};
66
+ Sj=function(a,b){if(0===a.length)return a;const c=new Map;b===_.Qj?a.forEach(d=>{const e=c.get(d.startTime)||[];e.push(d);c.set(d.startTime,e)}):c.set(0,a);a=[];for(const d of c.values())1===d.length?a.push(d[0]):(b=Rj(d),a.push(b));return a};
67
+ Rj=function(a){const b=[];let c=0;a.forEach(f=>{var g=Math.max(0,f.endTime-f.startTime);c+=g;var h=f.customAttributes[_.Lb];h&&b.push({type:"list",id:f.id,customAttributes:f.customAttributes,vc:{URI:h,DURATION:0}});if(h=f.customAttributes[_.Mb])g={type:"uri",id:f.id,customAttributes:f.customAttributes,vc:{URI:h,DURATION:g}},(f=Mj(f))&&(g.vc[Kb]=f),b.push(g)});const d=Pj(a);d[Nb]={entries:b,pa:[]};const e=a[0];a=a.map(f=>f.id).join("+");return Object.assign({},e,{id:a,endTime:e.startTime+c,customAttributes:d})};
68
+ _.Uj=function(a){var b=(a||"").split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=Tj.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a};_.Vj=function(a,b){a=_.Uj(a);b=_.Uj(b);return a.split("-")[0]===b.split("-")[0]};Wj=function(a,b){a=_.Uj(a);b=_.Uj(b);a=a.split("-");b=b.split("-");return a[0]===b[0]&&1===a.length&&2===b.length};
69
+ _.Xj=function(a,b){a=_.Uj(a);const c=new Set;for(var d of b)c.add(_.Uj(d));for(const e of c)if(e===a)return e;for(const e of c)if(Wj(e,a))return e;for(const e of c)if(d=e,b=a,d=_.Uj(d),b=_.Uj(b),d=d.split("-"),b=b.split("-"),b=2===d.length&&2===b.length&&d[0]===b[0])return e;for(const e of c)if(Wj(a,e))return e;return null};Yj=function(a){return a.reduce((b,c)=>b+c,0)};_.ak=function(){return{maxAttempts:1,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:0,fatalStatusCodes:[...Zj]}};
70
+ bk=function(a,b){a.timeout=b.timeout;a.baseDelay=b.baseDelay;a.backoffFactor=b.backoffFactor;a.fuzzFactor=b.fuzzFactor;a.maxAttempts=b.maxAttempts;a.fatalStatusCodes=b.fatalStatusCodes||[...Zj]};ck=function(a){const b={};a.forEach((c,d)=>{b[d.trim()]=c});return b};dk=function(a){const b={};if(!a)return b;for(const c of a.trim().split("\r\n"))c&&(a=c.split(": "),b[a[0].toLowerCase()]=a.slice(1).join(": "));return b};
71
+ _.fk=function(a,b){_.dh(a)&&(a={uris:[a]});Array.isArray(a)&&(a={uris:a});const c={uris:a.uris||[],type:a.type||_.ek,uriIndex:0,method:a.method||"GET",body:a.body||null,headers:Object.assign({},a.headers),allowCrossSiteCredentials:a.allowCrossSiteCredentials||!1,onProgress:a.onProgress||null,onFragment:a.onFragment||null,maxAttempts:a.maxAttempts||1,currentAttempt:0,baseDelay:a.baseDelay||1E3,backoffFactor:a.backoffFactor||2,fuzzFactor:a.fuzzFactor||.5,timeout:a.timeout||0,requestModifiers:a.requestModifiers||
72
+ [],responseModifiers:a.responseModifiers||[],startTime:a.startTime||null,endTime:a.endTime||null,contentType:a.contentType||null,licenseRequestType:a.licenseRequestType||null,sessionId:null,bytesRemaining:-1,bytesLoaded:-1,bytesTotal:-1,timescale:a.timescale||null,rateLimitBps:a.rateLimitBps||null,disableFragmentSupport:a.disableFragmentSupport||!1,disableMergedFragments:a.disableMergedFragments||!1,fatalStatusCodes:[...Zj],requestStartTimestamp:null};a.keyInfo&&(c.keyInfo=a.keyInfo);b&&bk(c,b);return c};
73
+ _.jk=function(a,b,c,d,e,f,g,h){a={uri:e||d,data:b,headers:a,status:c,timeMs:g,responseStartMs:h,request:f};if(gk(c))return hk(a);throw ik(a);};gk=function(a){return 200<=a&&299>=a&&202!==a};hk=function(a){return{uri:a.uri,data:a.data||new ArrayBuffer(0),headers:a.headers,status:a.status,fromCache:!!a.headers["x-shaka-from-cache"],timeMs:a.timeMs,responseStartMs:a.responseStartMs,request:a.request}};
74
+ ik=function(a){a=hk(a);try{var b=_.zi(a.data,!0)}catch(e){b=null}_.rh("HTTP error text:",b);var c=a.request;c=0<=(c?c.fatalStatusCodes||[]:[]).indexOf(a.status)?_.C:1;let d=3001;null!=a.status&&(d=3E3+a.status);return new _.J(c,1,1001,{url:a.uri,status:a.status,responseText:b,headers:a.headers,request:a.request,response:a},void 0,d)};kk=function(a,b){b=null==b?-1:b;a.bytesTotal=b;a.bytesLoaded=0;a.bytesRemaining=b};
75
+ lk=function(a,b,c){0<a.bytesRemaining&&(a.bytesRemaining-=b,0>a.bytesRemaining&&(a.bytesTotal+=-a.bytesRemaining,a.bytesRemaining=0));a.bytesLoaded+=b;if(a.onProgress)a.onProgress(b,c)};_.nk=function(a){_.mk[a.K]=a};
76
+ _.pk=function(a){const b={attemptParameters:_.ak(),enforceSingleSession:!1,delayLicenseRequestUntilPlayed:!1,enableSessionCacheForSkd:!1,ignoreUnrecognizedInitData:!0,Oa:{},widevineVersion:_.td};if(a&&(b.enforceSingleSession=!!a.enforceSingleSession,b.delayLicenseRequestUntilPlayed=!!a.delayLicenseRequestUntilPlayed,b.preferredDrmSystem=a.preferredDrmSystem,b.emeApi=a.emeApi,a.attemptParameters&&(b.attemptParameters=a.attemptParameters),b.enableSessionCacheForSkd=!!a.enableSessionCacheForSkd,void 0!==
77
+ a.ignoreUnrecognizedInitData&&(b.ignoreUnrecognizedInitData=!!a.ignoreUnrecognizedInitData),typeof a.widevineVersion===_.Of&&0<a.widevineVersion.length&&(b.widevineVersion=a.widevineVersion),a.env)){const c=_.mk[a.env]||null;if(!c)throw _.rh(_.va,_.fb+a.env+_.aa),new _.J(_.C,6,6015,`DRM environment '${a.env}' is missing.`);b.Oa=_.ok(c,a.customData)||{};_.Di(a.env.toLowerCase(),Ld)&&(b.enforceSingleSession=!0)}return b};
78
+ _.qk=function(a,b){b.lastIndex=a.a;b=b.exec(a.f);b=null==b?null:{position:b.index,length:b[0].length,results:b};if(a.a===a.f.length||null===b||b.position!==a.a)return null;a.a+=b.length;return b.results};
79
+ _.uk=function(a,b){var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new _.J(_.C,4,4016,{invalidTag:b});b=c[1];var d=c[2];c=[];let e;if(d){d=new _.rk(d);var f;(f=_.qk(d,/^([^,=]+)(?:,|$)/g))&&f[1]&&(e=f[1].trim());const g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;for(;f=_.qk(d,g);)c.push(new _.sk(f[1],f[2]||f[3]||""))}return new _.tk(a,b,c,e)};_.wk=function(a,b){a.a.push(vk(b,()=>{{var c=a.a;const d=c.indexOf(b);-1<d&&c.splice(d,1)}}))};
80
+ _.xk=function(){let a,b;const c=new Promise((e,f)=>{a=e;b=f}),d=Object.assign(c,{done:!1,uf:!1,Li:!1,value:null,error:null,resolve(e){d.uf=!0;d.done=!0;d.value=e;a(e)},reject(e){d.Li=!0;d.done=!0;d.error=e;b(e)}});return d};yk=function(a,b,c){b=void 0===b?0:b;c=void 0===c?a.a-b:c;if(0>b||b>a.a)throw new RangeError(`getDataView: start ${b} out of range [0, ${a.a}]`);if(0>c||b+c>a.a)throw new RangeError(`getDataView: length ${c} out of range [0, ${a.a-b}]`);return new DataView(a.f.buffer,b,c)};
81
+ Ak=function(a){const b=a.a;if(a.a+4>=a.f)return a.a=a.f,null;var c=zk(a);if(a.a+4>=a.f)return a.a=a.f,null;var d=zk(a);d=String.fromCharCode(d>>24&255,d>>16&255,d>>8&255,d&255);switch(c){case 0:c=a.f-b;break;case 1:if(a.a+8>=a.f)return a.a=a.f,null;{let e,f;try{f=a.j.getUint32(a.a,!1),e=a.j.getUint32(a.a+4,!1)}catch(g){throw new _.J(_.C,3,3E3);}if(2097151<f)throw new _.J(_.C,3,3E3);a.a+=8;c=f*Math.pow(2,32)+e}}c=b+c;a.l=c;return a.f>=c?(a.a=c,{name:d,start:b,end:c}):null};
82
+ Bk=function(a){if(0<=a.l&&a.f<a.l)return null;let b=Ak(a);for(;null!==b;){if(b.name===_.oe){const c={start:a.h,end:b.end,length:b.end-a.h,data:yk(a.o,a.h,b.end-a.h),count:1};a.h=b.end;return c}b=Ak(a)}return null};zk=function(a){const b=a.j.getUint32(a.a,!1);a.a+=4;return b};Ck=function(){return window.performance&&window.performance.now?window.performance.now():Date.now()};Dk=function(a){return Ck()-a.a};Fk=function(a){const b=new Ek;b.a=a.a;return b};
83
+ Gk=function(a,b){return _.v(function*(){var c=a.f;c.a=c.h;c.j=yk(c.o);c.f=c.j.byteLength;var d=Bk(a.f);for(c=[];d;)c.push(d),d=Bk(a.f);if(0!==c.length)if(a.j){var e=c[0];if(1<c.length){e=c[0];d=c[c.length-1];const f=d.end-e.start;e={start:e.start,end:d.end,length:f,data:yk(a.a,e.start,f),count:c.length}}(c=b(e))&&(yield c)}else for(e of c)(c=b(e))&&(yield c)})};
84
+ Hk=function(a,b,c,d){return _.v(function*(){const e=new Ek;for(kk(c,a.h);;){var f=yield b.read();if(f.done)break;f=f.value;a.a.append(f);const g=Dk(e);e.a=Ck();lk(c,f.byteLength,g);d&&(yield Gk(a,d))}return a.a.get()})};
85
+ Jk=function(a){var b=new window.Headers;for(const e in a.headers)b.append(e.toLowerCase(),a.headers[e]);const c=new window.AbortController,d={wd:!1,$g:!1};b={V:Ik(a.uris[a.uriIndex],a,{body:a.body||void 0,headers:b,method:a.method,signal:c.signal,credentials:a.allowCrossSiteCredentials?"include":void 0},d),request:a,abort:()=>{d.wd||(d.wd=!0,c.abort());return Promise.resolve()}};if(a=a.timeout){const e=window.setTimeout(()=>{d.$g=!0;c.abort()},a);b.V=b.V.finally(()=>{window.clearTimeout(e)})}return b};
86
+ Ik=function(a,b,c,d){return _.v(function*(){const e=new Ek;try{_.rh("sending Fetch request",c.method,a);const g=yield window.fetch(a,c);var f=ck(g.headers);const h={uri:g.url,data:null,headers:f,status:g.status,timeMs:0,responseStartMs:Dk(e),request:b};if(!gk(g.status))throw h.data=yield g.arrayBuffer(),h.timeMs=Dk(e),ik(h);const k=g.headers.get(ta),l=Li(k);if(!g.body)return kk(b,0),h.data=new ArrayBuffer(0),h.timeMs=Dk(e),hk(h);const m=g.body.getReader(),n=new Kk(l,!b.disableMergedFragments);f=null;
87
+ Lk(b,g)&&(f=p=>{if(!d.wd)return b.onFragment(p)});h.data=yield Hk(n,m,b,f);if(d.wd)throw Error("Request was aborted");h.timeMs=Dk(e);return hk(h)}catch(g){if(d.wd)throw new _.J(1,1,7001,{url:a,request:b});if(d.$g)throw new _.J(1,1,1003,{url:a,request:b});if(g&&1001===g.code)throw g;_.sh("Error while fetching data:",g);throw new _.J(1,1,1002,{url:a,error:g,request:b,status:-1},g);}})};
88
+ Lk=function(a,b){b=(b=b.headers.get(_.ua))?b.split(";")[0].trim():null;return!(b!==_.qg&&b!==_.Gc&&b!==_.uc||!a.onFragment||a.disableFragmentSupport||2!==a.type)};
89
+ Mk=function(a){const b=a.uris[a.uriIndex],c=new window.XMLHttpRequest,d=new Ek,e=Fk(d);let f=0,g;const h=new _.xk;c.open(a.method,b,!0);c.responseType="arraybuffer";c.timeout=a.timeout;c.withCredentials=a.allowCrossSiteCredentials;let k=!1,l=!1;c.onreadystatechange=function(){c.readyState>=XMLHttpRequest.LOADING&&0===f&&(g=Dk(e));if(c.readyState>=XMLHttpRequest.HEADERS_RECEIVED&&!k){const m=c.getResponseHeader(ta);kk(a,Li(m));k=!0}};c.onload=function(){return _.v(function*(){const m=dk(c.getAllResponseHeaders());
90
+ try{const n=c.response,p=Dk(e);l||lk(a,n?n.byteLength:0,p);const u=_.jk(m,n,c.status,b,c.responseURL,a,p,g);h.resolve(u)}catch(n){h.reject(n)}})};c.onerror=function(){if(0>=c.status)h.reject(new _.J(1,1,1002,{url:b,request:a,status:c.status}));else{var m=dk(c.getAllResponseHeaders());m=_.jk(m,c.response,c.status,b,c.responseURL,a,Dk(e),g);h.resolve(m)}};c.ontimeout=function(){h.reject(new _.J(1,1,1003,{url:b,request:a}))};c.onprogress=function(m){const n=Dk(d);m.lengthComputable&&(100<n||m.loaded>=
91
+ m.total)&&(d.a=Ck(),lk(a,m.loaded-f,n),f=m.loaded,l=!0)};for(const m in a.headers)c.setRequestHeader(m.toLowerCase(),a.headers[m]);_.rh("sending XHR request",a.method,b);c.send(a.body);return{V:h,request:a,abort:()=>{c.abort();h.reject(new _.J(1,1,7001,{url:b,request:a}));return Promise.resolve()}}};_.Ok=function(a,b=!0){a=_.Nk(a).replace(/\+/g,"-").replace(/\//g,"_");return b?a:a.replace(/[=]*$/,"")};_.Nk=function(a){a=vi(_.E(a));return btoa(a)};
92
+ _.Pk=function(a){a=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));const b=new Uint8Array(a.length);for(let c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b};_.Qk=function(a){const b=new Uint8Array(a.length/2);for(let c=0;c<a.length;c+=2)b[c/2]=window.parseInt(a.substr(c,2),16);return b};_.Rk=function(a){let b="";for(let c=0;c<a.length;++c){let d=a[c].toString(16);1===d.length&&(d="0"+d);b+=d}return b};
93
+ _.Sk=function(a,b){if(!a&&!b)return!0;if(!a||!b||a.length!==b.length)return!1;for(let c=0;c<a.length;++c)if(a[c]!==b[c])return!1;return!0};_.Tk=function(a){var b=0;for(var c=0;c<arguments.length;++c)b+=arguments[c].length;b=new Uint8Array(+b);c=0;for(let d=0;d<arguments.length;++d)b.set(arguments[d],c),c+=arguments[d].length;return b};
94
+ Vk=function(a){try{const b=a.uris[a.uriIndex],c=_.Uk(b);return{V:Promise.resolve({uri:b,data:c.data,request:a,headers:{"content-type":c.contentType}}),request:a,abort:()=>Promise.resolve()}}catch(b){return{V:Promise.reject(b),request:a,abort:()=>Promise.resolve()}}};
95
+ _.Uk=function(a){var b=a.split(":");if(2>b.length||"data"!==b[0])throw _.sh("Bad data URI, failed to parse scheme"),new _.J(_.C,1,1004,{uri:a});b=b.slice(1).join(":").split(",");if(2>b.length)throw _.sh("Bad data URI, failed to extract encoding and MIME type"),new _.J(_.C,1,1004,{uri:a});var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];let d=!1;1<b.length&&"base64"===b[b.length-1]&&(d=!0,b.pop());return{data:d?_.Pk(a).buffer:_.Ai(a).buffer,contentType:c}};
96
+ vk=function(a,b){a.V.then(()=>b(!0),()=>b(!1));return a};
97
+ Yk=function(a){a.j=a.C.then(e=>{a.f=e.request;e.request.uriIndex=e.request.currentAttempt%e.request.uris.length;if(0<e.request.currentAttempt){-1===a.h&&(a.h=Wk(e.request.baseDelay,1E3));const f=a.h*(1+(2*Math.random()-1)*Wk(e.request.fuzzFactor,.5));a.h*=Wk(e.request.backoffFactor,2);if(0<f)return(new Promise((g,h)=>{a.l=h;Xk(a,()=>{g(e.plugin(e.request))},f)})).catch(g=>{if(!a.a)throw g;})}if(a.a)throw new _.J(1,1,7001,{url:e.request.uris[e.request.uriIndex],request:e.request});return e.plugin(e.request)});
98
+ let b=0,c=0,d=0;return a.j.then(e=>{const f=e.request;f.currentAttempt+=1;b=f.currentAttempt;c=f.maxAttempts;d=f.uris.length;return e.V}).then(e=>{a.w.resolve(e)}).catch(e=>{if(e instanceof _.J){const f=b<d,g=7001!==e.code,h=b<c;if((1===e.severity||f)&&g&&h)return e.a(1),a.A&&a.A(e),Yk(a);g&&e.a(_.C);a.w.reject(e)}else a.w.reject(e)})};Xk=function(a,b,c){a.o=setTimeout(b,c)};Wk=function(a,b){return null===a||void 0===a?b:a};
99
+ Zk=function(a,b){b=(void 0===b?0:b)||!window.fetch||!window.AbortController||_.Qh(6)||_.Th()&&68<_.mi().browserVersion.major?Mk:Jk;a.l.http=b;a.l.https=b};$k=function(a,b){Zk(a,b.forceXhr)};al=function(a,b){a.A=b};bl=function(a,b){return _.v(function*(){const c=yield a.fetch(b);return _.wi(c.data).replace(/\r\n|\r(?=[^\n]|$)/gm,"\n")})};
100
+ dl=function(a,b){return _.v(function*(){const c=yield bl(a,b);if(!c)return null;try{const d=JSON.parse(c);if(null==d||typeof d!==_.Ce)throw Error("Not an object");return d}catch(d){throw new _.wj("Failed to parse JSON response","json-failed");}})};
101
+ _.hl=function(a,b,c){if(a.w)return new el(Promise.reject(new _.J(1,1,7001,{url:b.uris[b.uriIndex],request:b})));a.j&&0<a.j&&(b.rateLimitBps=a.j);var d=[];for(var e of a.f)d.push(e);if(b.requestModifiers)for(const g of b.requestModifiers)d.push(g);b.requestModifiers=d;fl(a,b);b.responseModifiers=[...a.h,...b.responseModifiers||[]];let f;e=d=new _.xk;try{const g=[{type:"public",modifiers:b.requestModifiers},{type:"internal",modifiers:a.a}];for(const h of g)for(const k of h.modifiers)e=e.then(l=>{if(f.a)throw new _.J(_.C,
102
+ 1,7001,l?{url:l.uris[l.uriIndex],request:l}:null);return"internal"===h.type?k(l,c)||l:k(l)||l}).catch(l=>{if(l instanceof _.J)throw l;throw new _.J(_.C,1,1006,null,l);});e=e.then(h=>({request:h,plugin:gl(a,h)}));f=new el(e,a.A);for(const h of b.responseModifiers)f.then(k=>{const l=()=>{if(f.a)throw new _.J(_.C,1,7001,k?{url:k.request.uris[k.request.uriIndex],request:k.request}:null);};l();const m=h(k)||k;l();return m}).catch(k=>{if(k instanceof _.J&&k.data&&k.data.response){const l=h(k.data.response);
103
+ if(l&&l.then)return l.then(()=>Promise.reject(k))}return Promise.reject(k)}).catch(k=>{if(k instanceof _.J)throw k;throw new _.J(_.C,1,1007,null,k);});_.wk(a.o,f);d.resolve(b);return f}catch(g){return new el(Promise.reject(g))}};fl=function(a,b){for(const c of a.headers){const [d,e]=c;b.headers[d]||(b.headers[d]=e)}};gl=function(a,b){b=b.uris[b.uriIndex];var c=new _.Ej(b,location.href);c=c?c.a.protocol.slice(0,-1):"";const d=a.l[c];if(!d)throw new _.J(_.C,1,1E3,{url:b});return e=>d(e)};
104
+ il=function(a,b,c,d){d=void 0===d?"HEAD":d;return _.v(function*(){if(!navigator.onLine)return!1;if(b){const e=_.fk(b,c);e.method=d;c||(e.timeout=5E3);e.headers["cache-control"]="no-cache";try{yield a.fetch(e).V}catch(f){if(1002===f.code||1003===f.code)return!1}}return!0})};jl=function(a){return`@@scheme:${a.scheme||""}`+`@@value:${a.value}`+`@@id:${a.id||""}@@type:${a.type||""}`+`@@protocol:${a.protocol||""}`};_.kl=function(a){return a&&a!==_.eg?a:null};
105
+ ml=function(a){if(!a)throw new _.J(_.C,3,3101,`Invalid track type: ${a}`);if(!_.dh(a))throw new _.J(_.C,3,3101,`Invalid track type: ${a}. Track type must be a string!`);switch(a.toLowerCase()){case _.L:return _.L;case _.M:return _.M;case _.N:return _.N;case ll:return ll}throw new _.J(_.C,3,3101,`Unknown track type: ${a}.`);};
106
+ ol=function(a,b,c){a=ml(a);const d=_.kl(c.kind);a=new _.nl(b,d===_.re?ll:a);a.kind=d;a.label=_.kl(c.label);a.language=_.kl(c.language);a.originalLanguage=c.originalLanguage||a.language;return a};pl=function(a,b){return _.v(function*(){const c=_.fk(b);return yield bl(a.f,c)})};
107
+ tl=function(a,b,c){return _.v(function*(){const {mimeType:d,renditions:e}=yield ql(a,b,c),f=new _.nl("dummy",_.N),g=e.map((h,k)=>{k=new _.rl(`R${k}`,f);k.bandwidth=h.bandwidth;k.ud=h.ud;k.codec=h.codec;k.width=h.width;k.height=h.height;return k});sl(g);return{renditions:g,mimeType:d||void 0}})};
108
+ vl=function(a){a=a.split("\n").filter(c=>c.trim().startsWith("#EXT-X-MEDIA:")).map(c=>ul(c));const b=new Map;a.forEach(c=>{if(c.type&&c.name){const d=`${c.type}:${c.name}`;if(b.has(d))throw Error("#EXT-X-MEDIA:NAME attributes are not unique. It is impossible to map HLS metadata to Safari data structures.");b.set(d,c)}});return b};ql=function(a,b,c){return _.v(function*(){const d=wl(b),e=xl(b,c);return{mimeType:yield yl(a,e,d[0]?d[0].codec:null),renditions:d}})};
109
+ sl=function(a){const b=new Set;a.forEach(c=>{b.add(`${c.width}x${c.height}`)});if(b.size<a.length)throw Error("Playlist contains multiple renditions with the same resolution.");};ul=function(a){const b=_.uk(0,a);a=d=>(d=b.getAttribute(d))?d.value:void 0;var c=a(_.rb);c=null!=c?{AUDIO:_.M,VIDEO:_.N,SUBTITLES:_.L}[c]:void 0;return{type:c,groupId:a(_.Ea),name:a(_.Sa),language:a(_.Ka),xj:a("AUTOSELECT"),default:a("DEFAULT"),Ej:a("FORCED"),cg:a("CHARACTERISTICS"),uri:a(_.ub)}};
110
+ wl=function(a){return a.split("\n").filter(b=>b.trim().startsWith("#EXT-X-STREAM-INF:")).map(b=>{var c=_.uk(0,b);if(c.getAttribute(_.Cb))throw Error("Playlist contains alternative video streams.");var d=_.K(c,_.ib);b=d?Number(d.split("x")[0]):null;d=d?Number(d.split("x")[1]):null;var e=_.K(c,_.na);e=e?Number(e):null;var f=_.K(c,"AVERAGE-BANDWIDTH");f=f?Number(f):null;c=_.K(c,_.qa);c=_.zl(_.t,c?c.split(","):[]);return b={bandwidth:e,ud:f,codec:c,width:b,height:d,mimeType:null}})};
111
+ xl=function(a,b){return(a=a.split("\n").filter(c=>c.trim().endsWith(".m3u8"))[0])?_.Dj(a,b):null};yl=function(a,b,c){return _.v(function*(){if(!b||!c)return null;var d=yield pl(a,b);d=[Al(d,b),Bl(d,b)].filter(Boolean);return _.Cl(d,_.t,c)})};Al=function(a,b){return(a=a.split("\n").find(c=>!c.startsWith("#")&&0<c.trim().length))?_.Dj(a,b):null};Bl=function(a,b){a=a.split("\n").find(c=>c.startsWith("#EXT-X-MAP:"));return a?(a=_.K(_.uk(0,a),_.ub))?_.Dj(a,b):null:null};
112
+ Fl=function(a,b){var c=Dl;El.set(`${a.toLowerCase().split(";")[0]}-${c}`,{priority:c,plugin:b})};_.Jl=function(a,b){var c=[Gl,Hl,Il,Dl];for(const d of c)if(c=El.get(`${a.toLowerCase().split(";")[0]}-${d}`)){const e=c.plugin(),f=e.isSupported(a,b);e.destroy();if(f)return c.plugin}return null};_.Kl=function(a,b){b&&(a+=';codecs\x3d"'+b+'"');return a.replace(/\s/g,"")};_.Ll=function(a){return a.split(";")[0]};
113
+ _.Ml=function(a){a=a.split(/\s*;\s*/);a.shift();return(a=a.find(b=>b.startsWith("codecs\x3d")))?a.split("\x3d")[1].replace(/^"|"$/g,"").split(/\s*,\s*/).join(","):""};_.Ol=function(a,b,c){for(const d of _.Nl)if(d.probe(b,c))return d.create(a);return null};_.Pl=function(a){a=_.Nl.indexOf(a);0<=a&&_.Nl.splice(a,1)};Ql=function(a){a.h=[];a.A={};a.a.clear();a.o.clear();a.f.release()};
114
+ Ul=function(a,b,c){const d=Rl(a,b);if(d&&b!==_.N){if(c){if(c.type!==b||!a.h.find(f=>f.id===c.id))return;const e=d.find(f=>Sl(c,f,c.type));if(!e)return;a.o.set(b,c);if(b===_.L){d.forEach(f=>{f.mode=_.zd});e.mode=Tl(a);a.m.trigger(new _.H(_.Vf));a.g.info("Selected text track",e);return}if(b===_.M){d.forEach(f=>{f.enabled=!1});e.enabled=!0;a.m.trigger(new _.H(_.Jc));a.g.info("Selected audio track",e);return}}a.a.get(b)&&b===_.L&&(d.forEach(e=>{e.mode=_.zd}),a.a.set(b,null),a.m.trigger(new _.H(_.Vf)),
115
+ a.g.info("Disabled text track"))}};Vl=function(a){if(0!==a.j.size){for(const b of a.j){const [c,d]=b;{const e=c;if(null===d)Ul(a,e,null);else{const f=d,g=a.h.find(h=>h.type===e&&h.language===f.language&&h.kind===f.kind&&h.label===f.label);g&&Ul(a,e,g)}}}a.j.clear()}};Tl=function(a){return(a=a.m.getTextDisplayer())?a.isRenderer()?_.Yd:_.Ef:_.Ef};Wl=function(a){return a.enabled||a.selected||a.mode===_.Ef||a.mode===_.Yd};Yl=function(a,b,c){return Xl(a)&&b===_.N&&!!c.enableHlsVideoTrackInfo};
116
+ Zl=function(a,b,c){return _.v(function*(){var d=a.m.getLoadedSource();d&&a.l&&(d=yield a.l.a(d.url,c),d.mimeType&&(b.mimeType=d.mimeType),d.renditions&&0<d.renditions.length&&(b.renditions=d.renditions,b.renditions.forEach(e=>{e.track=b})))})};$l=function(a,b,c){return Xl(a)&&(b===_.M||b===_.L)&&!!c.enableMetadata};
117
+ am=function(a,b,c){return _.v(function*(){var d=a.m.getLoadedSource();d&&a.l&&(d=yield a.l.a(d.url,c),d.Mc&&(d=d.Mc.get(`${b.type}:${b.label}`))&&d.cg&&(b.accessibility=d.cg.split(",").map(e=>e.trim()).map(e=>({value:e,type:b.type,protocol:"HLS"}))))})};bm=function(a,b){return a.h.filter(c=>c.type===b)};Sl=function(a,b,c){return a.type!==c?!1:b.id||c!==_.L?a.id===b.id:a.language===(b.language||null)&&a.kind===(b.kind||null)&&a.label===(b.label||null)};
118
+ cm=function(a){(a=a.m.getTextDisplayer())&&a.remove(0,Infinity)};Rl=function(a,b){if(a=dm(a,b))a=Array.from(a),b===_.L&&(a=a.filter(c=>c.kind!==_.re));return a};em=function(a){var b=dm(a,_.L);b&&(a.f.on(b,_.nc,a.M),a.f.on(b,uf,a.R),a.f.on(b,Yc,a.P));if(b=dm(a,_.M))a.f.on(b,_.nc,a.J),a.f.on(b,uf,a.L),a.f.on(b,Yc,a.K);if(b=dm(a,_.N))a.f.on(b,_.nc,a.S),a.f.on(b,uf,a.W),a.f.on(b,Yc,a.U)};
119
+ gm=function(a){_.v(function*(){const b=a.m.getConfiguration();fm(a,_.M,b.preferredAudioLanguage);if(!Rl(a,_.L).some(c=>Wl(c))){const c=dm(a,_.L);yield new Promise(d=>{a.f.one(c,Yc,d);(new _.Kh(d)).la(1)})}a.B||fm(a,_.L,b.preferredTextLanguage)})};hm=function(a,b){return(a=a.a.get(b)||null)&&a.renditions[0]};im=function(a,b){return(a=a.o.get(b))&&a.renditions[0]};
120
+ jm=function(a,b,c,d){const e=document.createElement("track");e.id=c;e.kind=b.kind;e.srclang=b.language;b.label&&(e.label=b.label);e.src=_.Gi(b.url)?URL.createObjectURL(new Blob([])):b.url;d.appendChild(e);a.C.add(e)};
121
+ km=function(a,b,c){return _.v(function*(){var d=a.m.getConfiguration();if(d=_.Ol(d,b.mimeType,_.Tf)){var e=_.fk(b.url),f={objectType:b.mimeType===_.uc?"tt":"c"};(f=yield _.hl(a.m.getNetworkEngine(),e,f).V)&&f.data&&(e="External_"+`${a.I++}`,a.A[e]=b,d=d.a(_.E(f.data)),d={url:URL.createObjectURL(new Blob([d])),kind:b.kind,language:b.language,label:b.label,mimeType:_.Tf},jm(a,d,e,c))}else a.g.warn("Track MIME type is not supported",b)})};
122
+ Xl=function(a){a=a.m.getLoadedSource();return!(!a||a.type!==_.lm&&!a.url.endsWith(".m3u8"))&&_.Zh()};dm=function(a,b){if(!a.m)return null;a=a.m.getSurface();if(!a)return null;a=a.getMedia();if(!a)return null;switch(b){case _.M:return a.audioTracks;case _.N:return a.videoTracks;case _.L:return a.textTracks;default:return null}};fm=function(a,b,c){var d=_.lj(c).filter(Boolean);const e=bm(a,b);(d=mm(e,d))?(a.g.info(`Selected track by language ${d.language}.`),Ul(a,b,d)):a.g.info(`No track found for language ${c}.`)};
123
+ mm=function(a,b){const c=a.map(d=>d.language).filter(Boolean);for(const d of b){b=_.Uj(d);const e=_.Xj(b,c);if(b=a.find(f=>_.Uj(f.language||"")===e))return b}return null};om=function(a){return a.name===Za&&nm.some(b=>a.message.startsWith(b))};
124
+ _.sm=function(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&_.$h()&&(a=360);const b=_.ak();b.maxAttempts=3;a={source:"",license:pm,viewerId:void 0,autoplay:void 0,pauseWhenInBackground:!1,ads:{hls:{enable:!0,resolutionOffsetSec:35}},manifest:{attemptParameters:_.ak(),availabilityWindowOverride:NaN,clockSyncUri:"",ignoreDrmInfo:!1,xlinkFailGracefully:!1,autoCorrectDrift:!0,timeline:{version:1,type:void 0}},abr:{enabled:!0,defaultBandwidthEstimate:1E3,switchInterval:8,bandwidthUpgradeTarget:.85,
125
+ bandwidthDowngradeTarget:.95,useSwitchIntervalForInitialSwitch:!1,restrictions:qm(a),useCmsd:!0},contentSteering:{enabled:!0,attemptParameters:_.ak()},drm:null,cmcd:{enabled:!1,version:1,rtpMultiplier:5,deliveryMode:"headers"},enableHtmlCue:!0,preferredAudioLanguage:"",preferredTextLanguage:"",preferredAudioRole:_.ne,preferredTextRole:"",preferredAudioChannelCount:2,preferredAudioCodec:[],preferredVideoCodec:[],preferSpatialAudio:!1,preferForcedSubtitles:!1,volume:null,startTime:null,loop:!1,lowLatencyMode:!1,
126
+ suggestedPresentationDelay:void 0,muted:void 0,forceWaitForTracks:!1,xmlParser:_.rm,streaming:{attemptParameters:b,bufferingGoal:10,rebufferingGoal:2,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,relativeTextTimestamp:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.1,disableAudioTracks:!1,disableVideoTracks:!1,smallGapLimit:.5,jumpLargeGaps:!0,gapTolerance:.001,durationBackoff:1,maxSegmentToMediaOffset:1,forceNativeTS:!1,preferNativeHlsOnSafari:!0,safeSeekOffset:5,stallEnabled:!0,
127
+ stallThreshold:3,stallSkip:.5,bufferLimitUpdateInterval:.5,overridePasp:!1,enableLiveEdgeChasing:!1,chasingRate:1.15,startChasingAt:5,stopChasingAt:2,chaseJumpDistance:10,patchEdgeWhenMixedContent:!1,ignoreDrift:!1,disableFragmentSupport:!1,disableMergedFragments:!1,ignoreManagedMediaSourceStreamingHints:!1,enableStalledSegmentAbort:!0},mediaSource:{codecSwitchingStrategy:_.mf},restrictions:qm(),tizen:{sideStreamText:_.Qh(2)},safari:{enableHlsVideoTrackInfo:!1,enableMetadata:!1},mse:{sendPlaybackSessionIdHeader:!1},
128
+ trickPlay:{speedUpMode:_.xd,preferTrickPlayTracks:!0},playlist:{timeline:"basic",content:_.Db,cropTimeline:!1},yospace:{enabled:!1},broadpeak:{adTracking:!1},cmsd:{enabled:!0},mediatailor:{enabled:!1,sessionConfig:{}},disableRestrictions:!1,chromecast:{useSenderAbrConfig:!1,useSenderStreamingConfig:!1}};if(_.Qh()||_.Th())a.ads.hls.enable=!1;if(_.Ph("Edge/")||_.Qh())a.streaming.gapDetectionThreshold=.5;_.Th()&&(a.streaming.stallEnabled=!1);_.Th()&&79===_.Xh().major&&(a.streaming.stallEnabled=!0,a.streaming.stallThreshold=
129
+ 1,a.streaming.stallSkip=1,a.streaming.gapDetectionThreshold=.02);_.Qh()&&(a.streaming.stallEnabled=!0,a.streaming.stallThreshold=1,a.streaming.stallSkip=0);a.vr={enable:!1,attachMouseListener:!0,fieldOfView:70,sensitivity:1,invertHorizontalControl:!1,invertVerticalControl:!1};return a};qm=function(a){a=void 0===a?Infinity:a;return{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:a,minPixels:0,maxPixels:Infinity,minBandwidth:0,maxBandwidth:Infinity}};
130
+ _.um=function(a,b){b=void 0===b?{}:b;if(!a)return _.sm();const c=[_.sm()];let d=!1;for(let e of a)null!==e&&void 0!==e&&(_.dh(e)&&(e={source:e}),e.lowLatencyMode&&!d&&(c.push({streaming:{rebufferingGoal:.1,bufferLimitUpdateInterval:.01,attemptParameters:{maxAttempts:3,baseDelay:250,backoffFactor:1}},abr:{bandwidthUpgradeTarget:.6,bandwidthDowngradeTarget:.95},manifest:{lowLatencyMode:!0}}),d=!0),c.push(e),b.Ri||null==e.suggestedPresentationDelay||c.push({manifest:{suggestedPresentationDelay:e.suggestedPresentationDelay}}));
131
131
  a=_.Xg.apply(null,c);_.dh(a.volume)&&(""===""+a.volume?a.volume=null:a.volume=Number(a.volume));if(!_.z(a.volume)&&(!_.eh(a.volume)||gh(a.volume)))throw new _.J(_.C,7,7100,"config.volume is not a number");if(!_.z(a.preferredTextLanguage)&&!_.dh(a.preferredTextLanguage)&&!Array.isArray(a.preferredTextLanguage))throw new _.J(_.C,7,7100,"config.preferredTextLanguage is not a string or an array");if(!_.z(a.preferredAudioLanguage)&&!_.dh(a.preferredAudioLanguage)&&!Array.isArray(a.preferredAudioLanguage))throw new _.J(_.C,
132
132
  7,7100,"config.preferredAudioLanguage is not a string or an array");if(!_.z(a.preferredAudioCodec)&&!_.dh(a.preferredAudioCodec)&&!Array.isArray(a.preferredAudioCodec))throw new _.J(_.C,7,7100,"config.preferredAudioCodec is not a string or an array");if(!_.z(a.preferredVideoCodec)&&!_.dh(a.preferredVideoCodec)&&!Array.isArray(a.preferredVideoCodec))throw new _.J(_.C,7,7100,"config.preferredVideoCodec is not a string or an array");if(!_.z(a.drm)){if(a.drm.env&&!_.dh(a.drm.env))throw new _.J(_.C,7,
133
133
  7100,"config.drm.env is not a string");if(a.drm.offlineId&&!_.dh(a.drm.offlineId))throw new _.J(_.C,7,7100,"config.drm.offlineId is not a string");}if(b=a.streaming){b.bufferingGoal=Number(b.bufferingGoal);b.rebufferingGoal=Number(b.rebufferingGoal);b.bufferBehind=Number(b.bufferBehind);b.smallGapLimit=Number(b.smallGapLimit);b.durationBackoff=Number(b.durationBackoff);if(!_.eh(b.bufferingGoal)||gh(b.bufferingGoal))throw new _.J(_.C,7,7100,"config.streaming.bufferingGoal is not a number");if(!_.eh(b.rebufferingGoal)||
134
134
  gh(b.rebufferingGoal))throw new _.J(_.C,7,7100,"config.streaming.rebufferingGoal is not a number");if(b.rebufferingGoal>b.bufferingGoal)throw new _.J(_.C,7,7100,"config.streaming.rebufferingGoal must be \x3e\x3d bufferingGoal");if(!_.eh(b.bufferBehind)||gh(b.bufferBehind))throw new _.J(_.C,7,7100,"config.streaming.bufferBehind is not a number");if(!_.eh(b.smallGapLimit)||gh(b.smallGapLimit))throw new _.J(_.C,7,7100,"config.streaming.smallGapLimit is not a number");if(!_.eh(b.durationBackoff)||gh(b.durationBackoff))throw new _.J(_.C,
135
- 7,7100,"config.streaming.durationBackoff is not a number");b=a.manifest;if(_.z(b.availabilityWindowOverride))b.availabilityWindowOverride=NaN;else if(typeof b.availabilityWindowOverride!==_.r)throw new _.J(_.C,7,7100,"Invalid value for |manifest.availabilityWindowOverride|");sm(a.restrictions);sm(a.abr.restrictions);a.abr.initialRestrictions&&sm(a.abr.initialRestrictions)}return a};
136
- sm=function(a){_.z(a.maxPixels)&&(a.maxPixels=Infinity);_.z(a.maxBandwidth)&&(a.maxBandwidth=Infinity);_.z(a.maxHeight)&&(a.maxHeight=Infinity);_.z(a.maxWidth)&&(a.maxWidth=Infinity);_.z(a.minPixels)&&(a.minPixels=0);_.z(a.minBandwidth)&&(a.minBandwidth=0);_.z(a.minHeight)&&(a.minHeight=0);_.z(a.minWidth)&&(a.minWidth=0);a.minWidth=Number(a.minWidth);a.maxWidth=Number(a.maxWidth);a.minHeight=Number(a.minHeight);a.maxHeight=Number(a.maxHeight);a.minBandwidth=Number(a.minBandwidth);a.maxBandwidth=Number(a.maxBandwidth);
137
- a.minPixels=Number(a.minPixels);a.maxPixels=Number(a.maxPixels);if(Number.isNaN(a.minWidth)||Number.isNaN(a.maxWidth)||Number.isNaN(a.minHeight)||Number.isNaN(a.maxHeight)||Number.isNaN(a.minBandwidth)||Number.isNaN(a.maxBandwidth)||Number.isNaN(a.minPixels)||Number.isNaN(a.maxPixels))throw new _.J(_.C,7,7100,"Restrictions contain NaN");};um=function(a){return typeof a===_.Ce&&!Array.isArray(a)&&"source"in a};
138
- vm=function(a,b){return _.v(function*(){0===a.getState()&&(a.log.debug("Player is in IDLE state. Postpone seek."),yield new Promise((c,d)=>{a.M.one(a,_.bf,()=>{switch(a.getState()){case 6:case 8:case 10:a.log.debug("Valid seek state reached.");c();break;default:a.log.warn("Invalid seek target state. Aborting seek"),d()}})}));b.readyState>HTMLMediaElement.HAVE_NOTHING||(yield new Promise(c=>{a.M.one(b,_.le,c)}))})};
139
- wm=function(a,b,c,d,e){return new Promise(f=>{const g=h=>{const k=a.getMediaPosition(),l=.1>=Math.abs(c-k);var m=.25<k-c;const n=b.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA,p=h.type===_.Cf,u=h.type===_.of,x=h.type===_.$f,y=u&&n;m=p||l&&y||x&&m;a.log.debug("Checking seeking state after "+h.type+" event. Seek completed:",m,"Current Time:",k,"Target Time:",c,"Native Event:",p,"Time reached",l,"Timeupdate:",x,"Progress:",u,"ReadyState:",n,"Progress Ready:",y);m?(a.qf=!1,a.Jb=!1,a.M.off(b,_.Cf,g),
140
- a.M.off(b,_.$f,g),a.M.off(b,_.of,g),a.Nf(),a.trigger(new _.H(_.jg)),f()):u&&e===k&&(a.log.debug("Seek seemed to have been ignored. Trying again"),b.currentTime=c)};a.trigger(new _.H(_.kg));a.M.on(b,_.Cf,g);a.M.on(b,_.$f,g);a.M.on(b,_.of,g);a.log.info(`Seeking to ${c}. Delta ${d}`);a.qf=!0;a.Jb=!0;b.currentTime=c})};xm=function(a,b){3===b.type&&(a.f&&(a.g.debug("Attaching tracking token"),b.headers[Hg]=a.f),a.a&&(b.headers[Ig]=a.a))};
141
- ym=function(a,b){return b.request&&3===b.request.type&&(a.f=b.headers[Hg],a.a=b.headers[Ig],b=b.headers["x-dt-csl-renewal-info"],a.f&&a.g.debug("Loaded tracking token "+a.f),a.a&&a.g.debug("Loaded followup token "+a.a),b)?(a=JSON.parse(_.vi(_.Ok(b))),{delay:a.renewalPeriod,tj:{maxAttempts:a.retryCount,baseDelay:1E3*a.retryPeriod,backoffFactor:1,fuzzFactor:0,timeout:0}}):null};_.zm=function(){throw new _.J(_.C,3,3E3);};
142
- _.Am=function(a,b,c){const d=c||0;c=b.byteLength-d;const e=_.E(a.f.buffer);b=_.E(b.buffer,d,c);try{e.set(b,a.a),a.a+=c}catch(f){_.zm()}};_.O=function(a,b){try{a.f.setUint32(a.a,b,a.h),a.a+=4}catch(c){_.zm()}};_.Bm=function(a){return a.a<a.f.byteLength};_.Cm=function(){throw new _.J(_.C,3,3E3,"Buffer read out of bounds.");};_.Dm=function(a){try{const b=a.f.getUint8(a.a);a.a+=1;return b}catch(b){_.Cm()}};_.Em=function(a){try{const b=a.f.getUint16(a.a,a.h);a.a+=2;return b}catch(b){_.Cm()}};
143
- _.P=function(a){try{const b=a.f.getUint32(a.a,a.h);a.a+=4;return b}catch(b){_.Cm()}};_.Fm=function(a){try{const b=a.f.getInt32(a.a,a.h);a.a+=4;return b}catch(b){_.Cm()}};_.Gm=function(a){let b=0,c=0;try{!0===a.h?(b=a.f.getUint32(a.a,!0),c=a.f.getUint32(a.a+4,!0)):(c=a.f.getUint32(a.a,!1),b=a.f.getUint32(a.a+4,!1))}catch(d){_.Cm()}if(2097151<c)throw new _.J(_.C,3,3001);a.a+=8;return c*Math.pow(2,32)+b};Km=function(a,b){const c=new Uint8Array(b);for(let d=0;d<b;d++)c[d]=_.Dm(a);return c};
144
- _.Lm=function(a,b){a.a+b>a.f.byteLength&&_.Cm();var c=a.a+a.f.byteOffset;c=a.f.buffer.slice(c,c+b);a.a+=b;return _.E(c)};Mm=function(a){let b=0;for(let c=0;c<a.length;c++)b=b<<8|a.charCodeAt(c);return b};_.Nm=function(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)};_.Om=function(a){for(;_.Bm(a.reader)&&!a.parser.a;)a.parser.Ce(a.start+a.headerSize,a.reader,a.partialOkay)};_.Pm=function(a){for(let b=_.P(a.reader);0<b&&!a.parser.a;--b)a.parser.Ce(a.start+a.headerSize,a.reader,a.partialOkay)};
145
- _.Qm=function(a){return b=>{const c=b.reader.Ta()-b.reader.getPosition();a(_.Lm(b.reader,c))}};_.Rm=function(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)};Sm=function(a){let b="";try{b=_.yi(a)}catch(c){}return b};_.Um=function(a){a=Sm(a);let b="";a.length&&(b=(new _.Tm(a)).a);return b};
146
- Wm=function(a){if(!a)return null;let b=null;try{const c=JSON.parse(_.vi(a)),d=_.Ok(c.sinf[0]);(new _.Vm).N(_.Hf,_.Om).N("schi",_.Om).N("tenc",e=>{e.reader.skip(6);_.Dm(e.reader)&&(e.reader.skip(1),b=_.Qk(_.Lm(e.reader,16)));e.parser.stop()}).parse(d)}catch(c){}return b};
147
- Ym=function(a,b,c){if(!c||!c.byteLength)throw new _.J(_.C,6,6102);let d;typeof b===_.Of?d=_.Ai(b,!0):d=b;a=_.Ai(Sm(a),!0);b=new _.Xm(12+a.byteLength+d.byteLength+c.byteLength,!0);_.O(b,a.byteLength);_.Am(b,_.E(a));_.O(b,d.byteLength);_.Am(b,_.E(d));_.O(b,c.byteLength);_.Am(b,_.E(c));return _.E(b.buffer)};_.Zm=function(a){var b=_.E(a.body);b=_.Nk(b);a.headers[_.ua]=_.Cc;a.body=_.zi("spc\x3d"+b).buffer};
148
- _.$m=function(a){let b;try{b=_.vi(a.data)}catch(c){return}b=b.trim();"\x3cckc\x3e"===b.substr(0,5)&&"\x3c/ckc\x3e"===b.substr(-6)&&(b=b.slice(5,-6));try{const c=JSON.parse(b);c.ckc&&(b=c.ckc);c.CkcMessage&&(b=c.CkcMessage);c.License&&(b=c.License)}catch(c){}a.data=ti(_.Ok(b))};
149
- an=function(a){switch(a){case "PRODUCTION":return"https://lic.drmtoday.com";case "STAGING":return"https://lic.staging.drmtoday.com";case "DEMO":return"https://lic-demo.staging.drmtoday.com";case "TEST":return"https://lic.test.drmtoday.com";default:throw new _.vj(`Cannot infer DRMtoday base URL for environment: ${a}`);}};_.bn=function(a){a=a.replace(/assetid/gi,"assetId");a=a.replace(/variantid/gi,"variantId");return a=a.replace(/keyid/gi,"keyId")};
150
- dn=function(a,b){b=Sm(b);b=new _.Tm(_.bn(b));const c=_.Bj(b.f);if(a&&a.drm&&a.drm.customData){var d=a.drm.customData;a=d.assetId;d=d.variantId;a&&_.Ei(`${a}`)&&(c.assetId=a,_.cn.debug("Using assetId from the configuration instead of the value from the HLS manifest."));d&&_.Ei(`${d}`)&&(c.variantId=d,_.cn.info("Using variantId from the configuration instead of the value from the HLS manifest."))}c.keyId?(a=["keyId"],_.cn.debug("KeyId found in FPS SKD. Removing other parameters")):a=["assetId","variantId"];
151
- b.f=_.Aj(c,!1,a);"/"!==b.path||b.j.includes(`${b.a}/`)||(b.path="");return _.zj(b)};_.en=function(a,b){if((b=b.drm)&&b.customData){var c={userId:b.customData.userId,sessionId:b.customData.sessionId,merchant:b.customData.merchant};_.$g(c)&&(a.headers["dt-custom-data"]=btoa(JSON.stringify(c)));(b=b.customData.authToken)&&(a.headers["x-dt-auth-token"]=b)}};gn=function(a){const b={},c=a?a[Jg]:void 0;a=fn[a?a[Jg]:void 0];c&&(b.drmTodayErrorCode=c);a&&(b.drmTodayErrorMessage=a);return b};
152
- hn=function(a){a=a["x-dt-li"];if(!a)return null;try{const b=JSON.parse(atob(a));a={};b.ti&&(a.requestId=b.ti);b.rpd&&(a.delay=Number(b.rpd)/1E3);return a}catch(b){return _.cn.warn("Unable to parse DRMtoday License Info header (x-dt-li)",b),null}};_.kn=function(a){a=jn[a];if(!a)return null;const b=_.li();return b.os===ei&&4===b.osVersion.major&&4===b.osVersion.minor?null:new Uint8Array(a)};ln=function(a,b){a.size=void 0===b?0:1;a.g.debug("Setting key status to",b);a.a=b};
153
- nn=function(a,b,c,d){b===HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=mn.value().get(b),c.one(a,b,d))};
154
- on=function(a,b){a.f=b;_.Fh(a.a);if(!b)return Promise.resolve();a.a.on(b,Pd,c=>{_.rh("AppleEmeManager.cancelNativeMediaEncryptedEvent_",c);"MediaEncryptedEvent"in window&&c instanceof MediaEncryptedEvent&&(a.g.info("Cancel native MediaEncryptedEvent when using Apple-prefixed EME"),c.stopImmediatePropagation())});a.a.on(b,Fg,c=>{{a.g.debug("Handle webkitNeedKey event");c=_.E(c.initData);if(_.si(c).getUint32(0,!0)+4!==c.byteLength)throw new RangeError("Malformed FairPlay init data");c=xi(c.subarray(4),
155
- !0);c=_.zi(c);const d=new Event(Pd);d.initDataType="skd";d.initData=ti(c);a.f.dispatchEvent(d)}});nn(b,HTMLMediaElement.HAVE_METADATA,a.a,()=>b.webkitSetMediaKeys(a.h));return Promise.resolve()};pn=function(a,b){ln(a.keyStatuses,b);b=new _.H(ce);a.dispatchEvent(b)};
156
- sn=function(a,b){a.a=b;_.Fh(a.f);b&&(a.f.on(b,a.h+"needkey",c=>{{const d=new Event(Pd);d.initDataType=_.Vc;d.initData=ti(c.initData);a.a.dispatchEvent(d)}}),a.f.on(b,a.h+"keymessage",c=>{{const e=qn(a,c.sessionId);if(e){var d=void 0===e.keyStatuses.getStatus();c=new _.H(_.qe,{messageType:d?fe:ee,message:c.message});d=e;_.rh("WebkitEmeManager.MediaKeySession.generated");d.f&&(d.f.resolve(),d.f=null);e.dispatchEvent(c)}else _.sh("Session not found",c.sessionId)}}),a.f.on(b,a.h+"keyadded",c=>{(c=qn(a,
157
- c.sessionId))&&c.ready()}),a.f.on(b,a.h+"keyerror",c=>{var d=qn(a,c.sessionId);if(d){{var e=Error("EME v0.1b key error");const f=c.errorCode;f.systemCode=c.systemCode;e.errorCode=f;!c.sessionId&&d.f?(45===c.systemCode&&(e.message="Unsupported session type."),d.f.reject(e),d.f=null):c.sessionId&&d.a?(d.a.reject(e),d.a=null):(e=c.systemCode,c.errorCode.code===MediaKeyError.MEDIA_KEYERR_OUTPUT?rn(d,_.Me):1===e?rn(d,"expired"):rn(d,_.be))}}}))};
158
- qn=function(a,b){let c=a.l.get(b);return c?c:(c=a.j.shift())?(c.sessionId=b,a.l.set(b,c),c):null};rn=function(a,b){ln(a.keyStatuses,b);b=new _.H(ce);a.dispatchEvent(b)};tn=function(a,b){return a.w?a.w+b.charAt(0).toUpperCase()+b.slice(1):b};
159
- un=function(a,b,c){if(a.o)return Promise.reject(Error("The session is already initialized."));a.o=!0;let d;try{if(a.l===_.Pe)if(c)d=_.E(_.zi("LOAD_SESSION|"+c));else{const f=_.zi("PERSISTENT|"),g=new Uint8Array(f.byteLength+b.byteLength);g.set(f,0);g.set(_.E(b),f.byteLength);d=g}else d=_.E(b)}catch(f){return Promise.reject(f)}a.f=new _.wk;const e=tn(a,"generateKeyRequest");try{a.j[e](a.h,d)}catch(f){if(f.name!==Ja)return a.f=null,Promise.reject(f);(new _.Jh(()=>{try{a.j[e](a.h,d)}catch(g){a.f.reject(g),
160
- a.f=null}})).la(.01)}return a.f};vn=function(a,b,c){if(a.a)a.a.then(()=>vn(a,b,c)).catch(()=>vn(a,b,c));else{a.a=b;if(a.h===Bg){var d=_.vi(c);var e=JSON.parse(d);"oct"!==e.keys[0].kty&&(a.a.reject(Error("Response is not a valid JSON Web Key Set.")),a.a=null);d=_.Ok(e.keys[0].k);e=_.Ok(e.keys[0].kid)}else d=_.E(c),e=null;var f=tn(a,"addKey");try{a.j[f](a.h,d,e,a.sessionId)}catch(g){a.a.reject(g),a.a=null}}};
161
- yn=function(a,b){var c=wn;if(a){var d=c.find(e=>e.a()===a);if(d)return xn.info(Jb+d.a()),d.create();xn.info("Cannot create selected EME manager, falling back to the default.")}if(b&&(d=c.find(e=>e.a()===b)))return xn.info(Jb+d.a()),d.create();c=c[0];if(!c)throw Error("Missing EME managers.");xn.info(Jb+c.a());return c.create()};_.Bn=function(a){var b=_.Pk(a);b=parseInt(b.byteLength,10).toString(16);b=_.Pk("12"+b+a);return new zn(An,a,b)};
162
- _.Dn=function(a){const b=new _.Cn(new DataView(a.buffer,a.byteOffset,a.byteLength),!1);a=_.P(b);var c=_.P(b);c=_.Nm(c);var d=_.P(b);const e=d>>>24;d&=16777215;var f=_.Lm(b,16);f=_.Qk(f);if(0<e){var g=_.P(b);b.skip(16*g)}g=_.P(b);const h=()=>{let u=_.Dm(b),x=(u&127)>>>0,y=7;for(;128<=u&&28>=y;)u=_.Dm(b),x=(x|(u&(28>y?127:15))<<y)>>>0,y+=7;return 28<y?-1:x},k=u=>{switch(u){case 0:do if(!_.Bm(b))throw Error("not enough data to skip!");while(_.Dm(b)&128);break;case 1:b.skip(8);break;case 2:b.skip(h());
163
- break;case 3:for(;4!==(u=h()&7);)k(u);break;case 5:b.skip(4);break;default:throw Error("invalid wire type "+u);}},l=[];let m=null;for(;_.Bm(b);){var n=h(),p=n&7;n>>>=3;if(2===p){p=h();if(0>p)throw Error(`unable to read length of field ${n}`);p=Km(b,p);2===n?l.push(p):4===n&&(m=p)}else k(p)}_.rh("Parsed WV PSSH Box","size",a,"name",c,mg,e,"flags",d,"size",g,"systemId",f,"contentId (base64)",m?_.Mk(m):"","keyIds",l.map(u=>_.Qk(u)));return 0<l.length?_.Bn(_.Qk(l[0])):null};
164
- _.En=function(a){const b=[];b.push(a[3]);b.push(a[2]);b.push(a[1]);b.push(a[0]);b.push(a[5]);b.push(a[4]);b.push(a[7]);b.push(a[6]);a=_.E(a);a.set(b,0);return a};
165
- _.Kn=function(a){var b=_.Fn;a:{var c=new _.Cn(new DataView(a.buffer),!0);_.P(c);for(_.Em(c);_.Bm(c);)if(1===_.Em(c)){var d=_.Em(c);c=_.Lm(c,d);break a}c=null}c||(c=a);a=xi(c,!0);d=b.j(a,"WRMHEADER");a=d.getAttribute(mg)||"";d=b.h(d,"DATA");var e=b.h(d,"LA_URL");b=e?b.f(e):"";var f=_.Fn;if(e=f.h(d,"KID"))if(e=f.f(e)){var g=f.h(d,pa);f=g?f.f(g):null;e={value:e,Re:f}}else e=null;else e=null;d=e?[e]:(e=Gn(d))?[e]:(d=Hn(d))?d:null;const {value:h="",Re:k}=d&&d[0]||{};d=_.Ok(h);d=_.En(d);d=_.Qk(d);return new _.In(_.Jn,
166
- d,b,c,a,k)};Gn=function(a){var b=_.Fn;a=b.h(a,"PROTECTINFO");if(!a)return null;var c=b.h(a,"KID");if(!c)return null;b=c.getAttribute("VALUE");if(!b)return null;a=c.getAttribute(pa);c=c.getAttribute("ALGID");return{value:b,Re:a,uh:c}};
167
- Hn=function(a){var b=_.Fn;a=b.h(a,"PROTECTINFO");if(!a)return null;a=b.h(a,"KIDS");if(!a)return null;a=b.a(a,"KID");if(!a.length)return null;b=[];for(const c of a)if(a=c.getAttribute("VALUE")){const d=c.getAttribute(pa),e=c.getAttribute("ALGID");b.push({value:a,Re:d,uh:e})}return b.length?b:null};_.Mn=function(a){Ln&&performance.mark(a)};_.On=function(a,b,c){Ln&&(b=performance.measure(a,b,c),null!=b&&Nn.info(`Step: "${a}" took ${b.duration.toFixed(0)} ms.`))};
168
- Pn=function(a){return _.v(function*(){const b=new Promise(c=>{(new _.Jh(c)).la(1)});(yield Promise.race([a.close().then(()=>!0),b.then(()=>!1)]))||_.A("Timeout waiting for session close")})};_.Rn=function(a){return Qn(a)?_.rd:a};Sn=function(a,b){const c=[];b.forEach((d,e)=>{c.push({keySystem:e,licenseServerUri:d.licenseUrl,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:[],keyIds:[]})});for(const d of a)d.drmInfos=c};
169
- Tn=function(a,b){b=b[_.Rn(a.keySystem)];a.keyIds||(a.keyIds=[]);b&&(a.distinctiveIdentifierRequired||(a.distinctiveIdentifierRequired=b.distinctiveIdentifierRequired),a.persistentStateRequired||(a.persistentStateRequired=b.persistentStateRequired),a.videoRobustness||(a.videoRobustness=b.videoRobustness||""),a.audioRobustness||(a.audioRobustness=b.audioRobustness||""),a.serverCertificate||(a.serverCertificate=b.serverCertificate||null))};
170
- _.Un=function(a,b){b=_.Jl(a.mimeType,b||a.codecs);if(_.Il(b,a.type)){a=a.type;var c=_.Il(b,a);c&&(c=c(),b=c.convertCodecs(a,b),c.destroy())}return b};Vn=function(a){for(const b of a.audioCapabilities||[])delete b.robustness;for(const b of a.videoCapabilities||[])delete b.robustness};Xn=function(a){return(a.audioCapabilities||[]).some(Wn)||(a.videoCapabilities||[]).some(Wn)};
171
- Yn=function(a,b){a=_.Um(b);_.rh("Using default Content ID extractor. The hostname part from HLS #EXT-X-KEY:URI skd:// will be used.","Extracted Content ID: "+a);return a};
172
- Zn=function(a){var {playerConfig:b,initData:c,initDataType:d,drmInfo:e,drmSystemConfig:f,sessionContext:g,emeApi:h}=a;if("skd"===d&&h===fa){a=e.serverCertificate;let k=f&&f.modifiers&&f.modifiers.extractContentId;_.bh(k)||(k=Yn);let l="";try{l=k(b,c,g)}catch(m){throw new _.J(_.C,6,6103);}if(!l.length)throw new _.J(_.C,6,6101,"Content ID is an empty string");c=Ym(c,l,a)}return c};$n=function(a){return!!a.match(/^com\.widevine\.alpha/)};Qn=function(a){return!!a.match(/^com\.(microsoft|chromecast)\.playready/)};
173
- Wn=function(a){return null!=a.robustness&&""!==a.robustness};ao=function(a,b,c,d,e){for(const f of a){b.includes(f.licenseServerUri)||b.push(f.licenseServerUri);f.serverCertificate&&(c.some(g=>_.Rk(g,f.serverCertificate))||c.push(f.serverCertificate));if(f.initData){for(const g of f.initData)g.periodId=f.periodId;for(const g of f.initData)d.some(h=>h.keyId&&h.keyId===g.keyId&&h.periodId===g.periodId?!0:!1)||d.push(g)}if(f.keyIds)for(a=0;a<f.keyIds.length;++a)e.includes(f.keyIds[a])||e.push(f.keyIds[a])}};
174
- bo=function(a){var b=a.o;const c=a.Z;c.clear();b.forEach((d,e)=>c.set(e,d));b=Array.from(c.values());b.length&&b.every(d=>"expired"===d)&&a.w(new _.J(_.C,6,6014));a.D.hf(_.ih(c));a.A||a.g.info(wa);a.A=!0;a.F=!1};co=function(a){a.h.forEach((b,c)=>{const d=b.df;let e=c.expiration;isNaN(e)&&(e=Infinity);e!==d&&(a.D.gf(c.sessionId,e),b.df=e)})};
175
- eo=function(a){return _.v(function*(){a.B.release();a.B=null;a.M.release();a.M=null;a.A=!1;a.F=!1;a.H.reject();a.ca.stop();a.ca=null;a.U.stop();a.U=null;const b=Array.from(a.h.keys());for(const c of a.h.values())c.Uc&&c.Uc.stop();a.h.clear();yield Promise.all(b.map(c=>Promise.resolve().then(()=>_.v(function*(){a.g.debug("Closing session",c.sessionId);try{yield Pn(c)}catch(d){a.g.warn("Error while closing session",d)}}))));if(a.C){try{yield a.l.h(null)}catch(c){a.g.warn("Error while resetting media keys",
176
- c)}a.C=null}a.l=null;a.a=null;a.J.clear();a.I=null;a.L=[];a.f=null;a.w=null;a.D=null;a.R=0;a.P=null})};_.ko=function(a,b){const c=fo(a,b),d=go(b);for(const e of d)ho(a,e,a.f.Ma);b=io(a,b);if(!b.size)return a.S=!0,Promise.resolve();_.Mn(Cd);a=_.jo(a,b);return(c?a:a.catch(()=>{})).then(()=>{_.Mn(Bd);_.On("DRM queryMediaKeys_()",Cd,Bd)})};
177
- _.mo=function(a,b,c){c=void 0===c?[]:c;a.K=lo;a.L=c;a.G=0<c.length;a.g.debug("Using Persisted Licenses: "+a.G);a.f&&a.f.enableSessionCacheForSkd&&a.g.info("Enabled session cache for SKD license requests");return _.ko(a,b)};
178
- _.jo=function(a,b){if(1===b.size&&b.has(""))return Promise.reject(new _.J(_.C,6,6E3));null===a.l&&(a.l=yn(a.f.emeApi,a.lb));for(var c of b.values())0===c.audioCapabilities.length&&delete c.audioCapabilities,0===c.videoCapabilities.length&&delete c.videoCapabilities;let d=c=new _.wk;const e=_.li(),f=(k,l,m)=>{l.drmInfos.some(n=>!!n.licenseServerUri)===k&&(d=d.catch(()=>{if(a.j)return null;if(m===_.rd){if((_.Lh()||e.os===gi&&_.Oh("Chrome")&&!_.Lh())&&!a.f.Ma[m].useLegacySystem)return l.label=sd,a.l.a(sd,
179
- [l]).catch(()=>{a.g.warn("Unable to create com.microsoft.playready.recommendation. Falling back to com.microsoft.playready.");l.label=_.rd;Vn(l);return a.l.a(m,[l])});Vn(l)}if(m===_.td&&a.f.widevineVersion!==_.td){const n=a.f.widevineVersion;if(!n.startsWith(_.td))return a.g.error(`Invalid "widevineVersion" value "${n}".`),Promise.reject();const p=Object.assign({},l,{label:n,distinctiveIdentifier:_.Ke,persistentState:_.Ke});return a.l.a(n,[p]).catch(()=>a.l.a(m,[l]))}return a.l.a(m,[l]).catch(n=>
180
- {a:{if(m===_.td&&Xn(l)){const p=_.li();if(Xn(l)&&p.os===ei&&p.browser===Zc){a.g.warn("requestMediaKeySystemAccess() failed",n);a.g.warn("Will try to recover by removing the robustness attribute of videoCapabilities and audioCapabilities.");Vn(l);n=a.l.a(m,[l]);break a}}throw n;}return n})}))};let g=a.f.preferredDrmSystem;if(!g){var h=_.li();if(h.os===gi&&10<=h.osVersion.major&&"edge"===h.browser)g=_.rd;else if("safari"===h.browser)g=_.pd;else if(h.browser===Zc||"firefox"===h.browser)g=_.td}g&&(h=
181
- b.get(g))&&(f(!0,h,g),f(!1,h,g));for(const k of[!0,!1])b.forEach((l,m)=>{m!==g&&f(k,l,m)});d=d.catch(()=>{throw new _.J(_.C,6,6001,"Failed to get MediaKeySystemAccess.");});d=d.then(k=>{if(a.j)return null;a.J.clear();var l=k.getConfiguration();a.g.info("Got MediaKeySystemAccess with configuration",l);var m=l.audioCapabilities||[];l=l.videoCapabilities||[];for(var n of m)a.J.add(n.contentType.toLowerCase());for(var p of l)a.J.add(p.contentType.toLowerCase());{m=k.keySystem;n=b.get(_.Rn(k.keySystem));
182
- p=[];l=[];const u=[],x=[];ao(n.drmInfos,p,l,u,x);1<l.length&&_.A("Multiple unique server certificates found! Only the first will be used.");1<p.length&&_.A("Multiple unique license server URIs found! Only the first will be used.");m={keySystem:m,licenseServerUri:p[0],distinctiveIdentifierRequired:n.distinctiveIdentifier===_.vf,persistentStateRequired:n.persistentState===_.vf,audioRobustness:n.audioCapabilities?n.audioCapabilities[0].robustness:"",videoRobustness:n.videoCapabilities?n.videoCapabilities[0].robustness:
135
+ 7,7100,"config.streaming.durationBackoff is not a number");b=a.manifest;if(_.z(b.availabilityWindowOverride))b.availabilityWindowOverride=NaN;else if(typeof b.availabilityWindowOverride!==_.r)throw new _.J(_.C,7,7100,"Invalid value for |manifest.availabilityWindowOverride|");tm(a.restrictions);tm(a.abr.restrictions);a.abr.initialRestrictions&&tm(a.abr.initialRestrictions)}return a};
136
+ tm=function(a){_.z(a.maxPixels)&&(a.maxPixels=Infinity);_.z(a.maxBandwidth)&&(a.maxBandwidth=Infinity);_.z(a.maxHeight)&&(a.maxHeight=Infinity);_.z(a.maxWidth)&&(a.maxWidth=Infinity);_.z(a.minPixels)&&(a.minPixels=0);_.z(a.minBandwidth)&&(a.minBandwidth=0);_.z(a.minHeight)&&(a.minHeight=0);_.z(a.minWidth)&&(a.minWidth=0);a.minWidth=Number(a.minWidth);a.maxWidth=Number(a.maxWidth);a.minHeight=Number(a.minHeight);a.maxHeight=Number(a.maxHeight);a.minBandwidth=Number(a.minBandwidth);a.maxBandwidth=Number(a.maxBandwidth);
137
+ a.minPixels=Number(a.minPixels);a.maxPixels=Number(a.maxPixels);if(Number.isNaN(a.minWidth)||Number.isNaN(a.maxWidth)||Number.isNaN(a.minHeight)||Number.isNaN(a.maxHeight)||Number.isNaN(a.minBandwidth)||Number.isNaN(a.maxBandwidth)||Number.isNaN(a.minPixels)||Number.isNaN(a.maxPixels))throw new _.J(_.C,7,7100,"Restrictions contain NaN");};vm=function(a){return typeof a===_.Ce&&!Array.isArray(a)&&"source"in a};
138
+ wm=function(a,b){return _.v(function*(){0===a.getState()&&(a.log.debug("Player is in IDLE state. Postpone seek."),yield new Promise((c,d)=>{a.M.one(a,_.bf,()=>{switch(a.getState()){case 6:case 8:case 10:a.log.debug("Valid seek state reached.");c();break;default:a.log.warn("Invalid seek target state. Aborting seek"),d()}})}));b.readyState>HTMLMediaElement.HAVE_NOTHING||(yield new Promise(c=>{a.M.one(b,_.le,c)}))})};
139
+ xm=function(a,b,c,d,e){return new Promise(f=>{const g=h=>{const k=a.getMediaPosition(),l=.1>=Math.abs(c-k);var m=.25<k-c;const n=b.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA,p=h.type===_.Cf,u=h.type===_.of,x=h.type===_.$f,y=u&&n;m=p||l&&y||x&&m;a.log.debug("Checking seeking state after "+h.type+" event. Seek completed:",m,"Current Time:",k,"Target Time:",c,"Native Event:",p,"Time reached",l,"Timeupdate:",x,"Progress:",u,"ReadyState:",n,"Progress Ready:",y);m?(a.qf=!1,a.Kb=!1,a.M.off(b,_.Cf,g),
140
+ a.M.off(b,_.$f,g),a.M.off(b,_.of,g),a.Nf(),a.trigger(new _.H(_.jg)),f()):u&&e===k&&(a.log.debug("Seek seemed to have been ignored. Trying again"),b.currentTime=c)};a.trigger(new _.H(_.kg));a.M.on(b,_.Cf,g);a.M.on(b,_.$f,g);a.M.on(b,_.of,g);a.log.info(`Seeking to ${c}. Delta ${d}`);a.qf=!0;a.Kb=!0;b.currentTime=c})};ym=function(a,b){3===b.type&&(a.f&&(a.g.debug("Attaching tracking token"),b.headers[Hg]=a.f),a.a&&(b.headers[Ig]=a.a))};
141
+ zm=function(a,b){return b.request&&3===b.request.type&&(a.f=b.headers[Hg],a.a=b.headers[Ig],b=b.headers["x-dt-csl-renewal-info"],a.f&&a.g.debug("Loaded tracking token "+a.f),a.a&&a.g.debug("Loaded followup token "+a.a),b)?(a=JSON.parse(_.wi(_.Pk(b))),{delay:a.renewalPeriod,tj:{maxAttempts:a.retryCount,baseDelay:1E3*a.retryPeriod,backoffFactor:1,fuzzFactor:0,timeout:0}}):null};_.Am=function(){throw new _.J(_.C,3,3E3);};
142
+ _.Bm=function(a,b,c){const d=c||0;c=b.byteLength-d;const e=_.E(a.f.buffer);b=_.E(b.buffer,d,c);try{e.set(b,a.a),a.a+=c}catch(f){_.Am()}};_.O=function(a,b){try{a.f.setUint32(a.a,b,a.h),a.a+=4}catch(c){_.Am()}};_.Cm=function(a){return a.a<a.f.byteLength};_.Dm=function(){throw new _.J(_.C,3,3E3,"Buffer read out of bounds.");};_.Em=function(a){try{const b=a.f.getUint8(a.a);a.a+=1;return b}catch(b){_.Dm()}};_.Fm=function(a){try{const b=a.f.getUint16(a.a,a.h);a.a+=2;return b}catch(b){_.Dm()}};
143
+ _.P=function(a){try{const b=a.f.getUint32(a.a,a.h);a.a+=4;return b}catch(b){_.Dm()}};_.Gm=function(a){try{const b=a.f.getInt32(a.a,a.h);a.a+=4;return b}catch(b){_.Dm()}};_.Hm=function(a){let b=0,c=0;try{!0===a.h?(b=a.f.getUint32(a.a,!0),c=a.f.getUint32(a.a+4,!0)):(c=a.f.getUint32(a.a,!1),b=a.f.getUint32(a.a+4,!1))}catch(d){_.Dm()}if(2097151<c)throw new _.J(_.C,3,3001);a.a+=8;return c*Math.pow(2,32)+b};Lm=function(a,b){const c=new Uint8Array(b);for(let d=0;d<b;d++)c[d]=_.Em(a);return c};
144
+ _.Mm=function(a,b){a.a+b>a.f.byteLength&&_.Dm();var c=a.a+a.f.byteOffset;c=a.f.buffer.slice(c,c+b);a.a+=b;return _.E(c)};Nm=function(a){let b=0;for(let c=0;c<a.length;c++)b=b<<8|a.charCodeAt(c);return b};_.Om=function(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)};_.Pm=function(a){for(;_.Cm(a.reader)&&!a.parser.a;)a.parser.Ce(a.start+a.headerSize,a.reader,a.partialOkay)};_.Qm=function(a){for(let b=_.P(a.reader);0<b&&!a.parser.a;--b)a.parser.Ce(a.start+a.headerSize,a.reader,a.partialOkay)};
145
+ _.Rm=function(a){return b=>{const c=b.reader.Va()-b.reader.getPosition();a(_.Mm(b.reader,c))}};_.Sm=function(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)};Tm=function(a){let b="";try{b=_.zi(a)}catch(c){}return b};_.Vm=function(a){a=Tm(a);let b="";a.length&&(b=(new _.Um(a)).a);return b};
146
+ Xm=function(a){if(!a)return null;let b=null;try{const c=JSON.parse(_.wi(a)),d=_.Pk(c.sinf[0]);(new _.Wm).N(_.Hf,_.Pm).N("schi",_.Pm).N("tenc",e=>{e.reader.skip(6);_.Em(e.reader)&&(e.reader.skip(1),b=_.Rk(_.Mm(e.reader,16)));e.parser.stop()}).parse(d)}catch(c){}return b};
147
+ Zm=function(a,b,c){if(!c||!c.byteLength)throw new _.J(_.C,6,6102);let d;typeof b===_.Of?d=_.Bi(b,!0):d=b;a=_.Bi(Tm(a),!0);b=new _.Ym(12+a.byteLength+d.byteLength+c.byteLength,!0);_.O(b,a.byteLength);_.Bm(b,_.E(a));_.O(b,d.byteLength);_.Bm(b,_.E(d));_.O(b,c.byteLength);_.Bm(b,_.E(c));return _.E(b.buffer)};_.$m=function(a){var b=_.E(a.body);b=_.Ok(b);a.headers[_.ua]=_.Cc;a.body=_.Ai("spc\x3d"+b).buffer};
148
+ _.an=function(a){let b;try{b=_.wi(a.data)}catch(c){return}b=b.trim();"\x3cckc\x3e"===b.substr(0,5)&&"\x3c/ckc\x3e"===b.substr(-6)&&(b=b.slice(5,-6));try{const c=JSON.parse(b);c.ckc&&(b=c.ckc);c.CkcMessage&&(b=c.CkcMessage);c.License&&(b=c.License)}catch(c){}a.data=ui(_.Pk(b))};
149
+ bn=function(a){switch(a){case "PRODUCTION":return"https://lic.drmtoday.com";case "STAGING":return"https://lic.staging.drmtoday.com";case "DEMO":return"https://lic-demo.staging.drmtoday.com";case "TEST":return"https://lic.test.drmtoday.com";default:throw new _.wj(`Cannot infer DRMtoday base URL for environment: ${a}`);}};_.cn=function(a){a=a.replace(/assetid/gi,"assetId");a=a.replace(/variantid/gi,"variantId");return a=a.replace(/keyid/gi,"keyId")};
150
+ en=function(a,b){b=Tm(b);b=new _.Um(_.cn(b));const c=_.Cj(b.f);if(a&&a.drm&&a.drm.customData){var d=a.drm.customData;a=d.assetId;d=d.variantId;a&&_.Fi(`${a}`)&&(c.assetId=a,_.dn.debug("Using assetId from the configuration instead of the value from the HLS manifest."));d&&_.Fi(`${d}`)&&(c.variantId=d,_.dn.info("Using variantId from the configuration instead of the value from the HLS manifest."))}c.keyId?(a=["keyId"],_.dn.debug("KeyId found in FPS SKD. Removing other parameters")):a=["assetId","variantId"];
151
+ b.f=_.Bj(c,!1,a);"/"!==b.path||b.j.includes(`${b.a}/`)||(b.path="");return _.Aj(b)};_.fn=function(a,b){if((b=b.drm)&&b.customData){var c={userId:b.customData.userId,sessionId:b.customData.sessionId,merchant:b.customData.merchant};_.$g(c)&&(a.headers["dt-custom-data"]=btoa(JSON.stringify(c)));(b=b.customData.authToken)&&(a.headers["x-dt-auth-token"]=b)}};hn=function(a){const b={},c=a?a[Jg]:void 0;a=gn[a?a[Jg]:void 0];c&&(b.drmTodayErrorCode=c);a&&(b.drmTodayErrorMessage=a);return b};
152
+ jn=function(a){a=a["x-dt-li"];if(!a)return null;try{const b=JSON.parse(atob(a));a={};b.ti&&(a.requestId=b.ti);b.rpd&&(a.delay=Number(b.rpd)/1E3);return a}catch(b){return _.dn.warn("Unable to parse DRMtoday License Info header (x-dt-li)",b),null}};_.ln=function(a){a=kn[a];if(!a)return null;const b=_.mi();return b.os===fi&&4===b.osVersion.major&&4===b.osVersion.minor?null:new Uint8Array(a)};mn=function(a,b){a.size=void 0===b?0:1;a.g.debug("Setting key status to",b);a.a=b};
153
+ on=function(a,b,c,d){b===HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=nn.value().get(b),c.one(a,b,d))};
154
+ pn=function(a,b){a.f=b;_.Eh(a.a);if(!b)return Promise.resolve();a.a.on(b,Pd,c=>{_.rh("AppleEmeManager.cancelNativeMediaEncryptedEvent_",c);"MediaEncryptedEvent"in window&&c instanceof MediaEncryptedEvent&&(a.g.info("Cancel native MediaEncryptedEvent when using Apple-prefixed EME"),c.stopImmediatePropagation())});a.a.on(b,Fg,c=>{{a.g.debug("Handle webkitNeedKey event");c=_.E(c.initData);if(_.ti(c).getUint32(0,!0)+4!==c.byteLength)throw new RangeError("Malformed FairPlay init data");c=yi(c.subarray(4),
155
+ !0);c=_.Ai(c);const d=new Event(Pd);d.initDataType="skd";d.initData=ui(c);a.f.dispatchEvent(d)}});on(b,HTMLMediaElement.HAVE_METADATA,a.a,()=>b.webkitSetMediaKeys(a.h));return Promise.resolve()};qn=function(a,b){mn(a.keyStatuses,b);b=new _.H(ce);a.dispatchEvent(b)};
156
+ tn=function(a,b){a.a=b;_.Eh(a.f);b&&(a.f.on(b,a.h+"needkey",c=>{{const d=new Event(Pd);d.initDataType=_.Vc;d.initData=ui(c.initData);a.a.dispatchEvent(d)}}),a.f.on(b,a.h+"keymessage",c=>{{const e=rn(a,c.sessionId);if(e){var d=void 0===e.keyStatuses.getStatus();c=new _.H(_.qe,{messageType:d?fe:ee,message:c.message});d=e;_.rh("WebkitEmeManager.MediaKeySession.generated");d.f&&(d.f.resolve(),d.f=null);e.dispatchEvent(c)}else _.sh("Session not found",c.sessionId)}}),a.f.on(b,a.h+"keyadded",c=>{(c=rn(a,
157
+ c.sessionId))&&c.ready()}),a.f.on(b,a.h+"keyerror",c=>{var d=rn(a,c.sessionId);if(d){{var e=Error("EME v0.1b key error");const f=c.errorCode;f.systemCode=c.systemCode;e.errorCode=f;!c.sessionId&&d.f?(45===c.systemCode&&(e.message="Unsupported session type."),d.f.reject(e),d.f=null):c.sessionId&&d.a?(d.a.reject(e),d.a=null):(e=c.systemCode,c.errorCode.code===MediaKeyError.MEDIA_KEYERR_OUTPUT?sn(d,_.Me):1===e?sn(d,"expired"):sn(d,_.be))}}}))};
158
+ rn=function(a,b){let c=a.l.get(b);return c?c:(c=a.j.shift())?(c.sessionId=b,a.l.set(b,c),c):null};sn=function(a,b){mn(a.keyStatuses,b);b=new _.H(ce);a.dispatchEvent(b)};un=function(a,b){return a.w?a.w+b.charAt(0).toUpperCase()+b.slice(1):b};
159
+ vn=function(a,b,c){if(a.o)return Promise.reject(Error("The session is already initialized."));a.o=!0;let d;try{if(a.l===_.Pe)if(c)d=_.E(_.Ai("LOAD_SESSION|"+c));else{const f=_.Ai("PERSISTENT|"),g=new Uint8Array(f.byteLength+b.byteLength);g.set(f,0);g.set(_.E(b),f.byteLength);d=g}else d=_.E(b)}catch(f){return Promise.reject(f)}a.f=new _.xk;const e=un(a,"generateKeyRequest");try{a.j[e](a.h,d)}catch(f){if(f.name!==Ja)return a.f=null,Promise.reject(f);(new _.Kh(()=>{try{a.j[e](a.h,d)}catch(g){a.f.reject(g),
160
+ a.f=null}})).la(.01)}return a.f};wn=function(a,b,c){if(a.a)a.a.then(()=>wn(a,b,c)).catch(()=>wn(a,b,c));else{a.a=b;if(a.h===Bg){var d=_.wi(c);var e=JSON.parse(d);"oct"!==e.keys[0].kty&&(a.a.reject(Error("Response is not a valid JSON Web Key Set.")),a.a=null);d=_.Pk(e.keys[0].k);e=_.Pk(e.keys[0].kid)}else d=_.E(c),e=null;var f=un(a,"addKey");try{a.j[f](a.h,d,e,a.sessionId)}catch(g){a.a.reject(g),a.a=null}}};
161
+ zn=function(a,b){var c=xn;if(a){var d=c.find(e=>e.a()===a);if(d)return yn.info(Jb+d.a()),d.create();yn.info("Cannot create selected EME manager, falling back to the default.")}if(b&&(d=c.find(e=>e.a()===b)))return yn.info(Jb+d.a()),d.create();c=c[0];if(!c)throw Error("Missing EME managers.");yn.info(Jb+c.a());return c.create()};_.Cn=function(a){var b=_.Qk(a);b=parseInt(b.byteLength,10).toString(16);b=_.Qk("12"+b+a);return new An(Bn,a,b)};
162
+ _.En=function(a){const b=new _.Dn(new DataView(a.buffer,a.byteOffset,a.byteLength),!1);a=_.P(b);var c=_.P(b);c=_.Om(c);var d=_.P(b);const e=d>>>24;d&=16777215;var f=_.Mm(b,16);f=_.Rk(f);if(0<e){var g=_.P(b);b.skip(16*g)}g=_.P(b);const h=()=>{let u=_.Em(b),x=(u&127)>>>0,y=7;for(;128<=u&&28>=y;)u=_.Em(b),x=(x|(u&(28>y?127:15))<<y)>>>0,y+=7;return 28<y?-1:x},k=u=>{switch(u){case 0:do if(!_.Cm(b))throw Error("not enough data to skip!");while(_.Em(b)&128);break;case 1:b.skip(8);break;case 2:b.skip(h());
163
+ break;case 3:for(;4!==(u=h()&7);)k(u);break;case 5:b.skip(4);break;default:throw Error("invalid wire type "+u);}},l=[];let m=null;for(;_.Cm(b);){var n=h(),p=n&7;n>>>=3;if(2===p){p=h();if(0>p)throw Error(`unable to read length of field ${n}`);p=Lm(b,p);2===n?l.push(p):4===n&&(m=p)}else k(p)}_.rh("Parsed WV PSSH Box","size",a,"name",c,mg,e,"flags",d,"size",g,"systemId",f,"contentId (base64)",m?_.Nk(m):"","keyIds",l.map(u=>_.Rk(u)));return 0<l.length?_.Cn(_.Rk(l[0])):null};
164
+ _.Fn=function(a){const b=[];b.push(a[3]);b.push(a[2]);b.push(a[1]);b.push(a[0]);b.push(a[5]);b.push(a[4]);b.push(a[7]);b.push(a[6]);a=_.E(a);a.set(b,0);return a};
165
+ _.Ln=function(a){var b=_.Gn;a:{var c=new _.Dn(new DataView(a.buffer),!0);_.P(c);for(_.Fm(c);_.Cm(c);)if(1===_.Fm(c)){var d=_.Fm(c);c=_.Mm(c,d);break a}c=null}c||(c=a);a=yi(c,!0);d=b.j(a,"WRMHEADER");a=d.getAttribute(mg)||"";d=b.h(d,"DATA");var e=b.h(d,"LA_URL");b=e?b.f(e):"";var f=_.Gn;if(e=f.h(d,"KID"))if(e=f.f(e)){var g=f.h(d,pa);f=g?f.f(g):null;e={value:e,Re:f}}else e=null;else e=null;d=e?[e]:(e=Hn(d))?[e]:(d=In(d))?d:null;const {value:h="",Re:k}=d&&d[0]||{};d=_.Pk(h);d=_.Fn(d);d=_.Rk(d);return new _.Jn(_.Kn,
166
+ d,b,c,a,k)};Hn=function(a){var b=_.Gn;a=b.h(a,"PROTECTINFO");if(!a)return null;var c=b.h(a,"KID");if(!c)return null;b=c.getAttribute("VALUE");if(!b)return null;a=c.getAttribute(pa);c=c.getAttribute("ALGID");return{value:b,Re:a,uh:c}};
167
+ In=function(a){var b=_.Gn;a=b.h(a,"PROTECTINFO");if(!a)return null;a=b.h(a,"KIDS");if(!a)return null;a=b.a(a,"KID");if(!a.length)return null;b=[];for(const c of a)if(a=c.getAttribute("VALUE")){const d=c.getAttribute(pa),e=c.getAttribute("ALGID");b.push({value:a,Re:d,uh:e})}return b.length?b:null};_.Nn=function(a){Mn&&performance.mark(a)};_.Pn=function(a,b,c){Mn&&(b=performance.measure(a,b,c),null!=b&&On.info(`Step: "${a}" took ${b.duration.toFixed(0)} ms.`))};
168
+ Qn=function(a){return _.v(function*(){const b=new Promise(c=>{(new _.Kh(c)).la(1)});(yield Promise.race([a.close().then(()=>!0),b.then(()=>!1)]))||_.A("Timeout waiting for session close")})};_.Sn=function(a){return Rn(a)?_.rd:a};Tn=function(a,b){const c=[];b.forEach((d,e)=>{c.push({keySystem:e,licenseServerUri:d.licenseUrl,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:[],keyIds:[]})});for(const d of a)d.drmInfos=c};
169
+ Un=function(a,b){b=b[_.Sn(a.keySystem)];a.keyIds||(a.keyIds=[]);b&&(a.distinctiveIdentifierRequired||(a.distinctiveIdentifierRequired=b.distinctiveIdentifierRequired),a.persistentStateRequired||(a.persistentStateRequired=b.persistentStateRequired),a.videoRobustness||(a.videoRobustness=b.videoRobustness||""),a.audioRobustness||(a.audioRobustness=b.audioRobustness||""),a.serverCertificate||(a.serverCertificate=b.serverCertificate||null))};
170
+ _.Vn=function(a,b){b=_.Kl(a.mimeType,b||a.codecs);if(_.Jl(b,a.type)){a=a.type;var c=_.Jl(b,a);c&&(c=c(),b=c.convertCodecs(a,b),c.destroy())}return b};Wn=function(a){for(const b of a.audioCapabilities||[])delete b.robustness;for(const b of a.videoCapabilities||[])delete b.robustness};Yn=function(a){return(a.audioCapabilities||[]).some(Xn)||(a.videoCapabilities||[]).some(Xn)};
171
+ Zn=function(a,b){a=_.Vm(b);_.rh("Using default Content ID extractor. The hostname part from HLS #EXT-X-KEY:URI skd:// will be used.","Extracted Content ID: "+a);return a};
172
+ $n=function(a){var {playerConfig:b,initData:c,initDataType:d,drmInfo:e,drmSystemConfig:f,sessionContext:g,emeApi:h}=a;if("skd"===d&&h===fa){a=e.serverCertificate;let k=f&&f.modifiers&&f.modifiers.extractContentId;_.bh(k)||(k=Zn);let l="";try{l=k(b,c,g)}catch(m){throw new _.J(_.C,6,6103);}if(!l.length)throw new _.J(_.C,6,6101,"Content ID is an empty string");c=Zm(c,l,a)}return c};ao=function(a){return!!a.match(/^com\.widevine\.alpha/)};Rn=function(a){return!!a.match(/^com\.(microsoft|chromecast)\.playready/)};
173
+ Xn=function(a){return null!=a.robustness&&""!==a.robustness};bo=function(a,b,c,d,e){for(const f of a){b.includes(f.licenseServerUri)||b.push(f.licenseServerUri);f.serverCertificate&&(c.some(g=>_.Sk(g,f.serverCertificate))||c.push(f.serverCertificate));if(f.initData){for(const g of f.initData)g.periodId=f.periodId;for(const g of f.initData)d.some(h=>h.keyId&&h.keyId===g.keyId&&h.periodId===g.periodId?!0:!1)||d.push(g)}if(f.keyIds)for(a=0;a<f.keyIds.length;++a)e.includes(f.keyIds[a])||e.push(f.keyIds[a])}};
174
+ co=function(a){var b=a.o;const c=a.Z;c.clear();b.forEach((d,e)=>c.set(e,d));b=Array.from(c.values());b.length&&b.every(d=>"expired"===d)&&a.w(new _.J(_.C,6,6014));a.D.hf(_.ih(c));a.A||a.g.info(wa);a.A=!0;a.F=!1};eo=function(a){a.h.forEach((b,c)=>{const d=b.df;let e=c.expiration;isNaN(e)&&(e=Infinity);e!==d&&(a.D.gf(c.sessionId,e),b.df=e)})};
175
+ fo=function(a){return _.v(function*(){a.B.release();a.B=null;a.M.release();a.M=null;a.A=!1;a.F=!1;a.H.reject();a.ca.stop();a.ca=null;a.U.stop();a.U=null;const b=Array.from(a.h.keys());for(const c of a.h.values())c.Uc&&c.Uc.stop();a.h.clear();yield Promise.all(b.map(c=>Promise.resolve().then(()=>_.v(function*(){a.g.debug("Closing session",c.sessionId);try{yield Qn(c)}catch(d){a.g.warn("Error while closing session",d)}}))));if(a.C){try{yield a.l.h(null)}catch(c){a.g.warn("Error while resetting media keys",
176
+ c)}a.C=null}a.l=null;a.a=null;a.J.clear();a.I=null;a.L=[];a.f=null;a.w=null;a.D=null;a.R=0;a.P=null})};_.lo=function(a,b){const c=go(a,b),d=ho(b);for(const e of d)io(a,e,a.f.Oa);b=jo(a,b);if(!b.size)return a.S=!0,Promise.resolve();_.Nn(Cd);a=_.ko(a,b);return(c?a:a.catch(()=>{})).then(()=>{_.Nn(Bd);_.Pn("DRM queryMediaKeys_()",Cd,Bd)})};
177
+ _.no=function(a,b,c){c=void 0===c?[]:c;a.K=mo;a.L=c;a.G=0<c.length;a.g.debug("Using Persisted Licenses: "+a.G);a.f&&a.f.enableSessionCacheForSkd&&a.g.info("Enabled session cache for SKD license requests");return _.lo(a,b)};
178
+ _.ko=function(a,b){if(1===b.size&&b.has(""))return Promise.reject(new _.J(_.C,6,6E3));null===a.l&&(a.l=zn(a.f.emeApi,a.nb));for(var c of b.values())0===c.audioCapabilities.length&&delete c.audioCapabilities,0===c.videoCapabilities.length&&delete c.videoCapabilities;let d=c=new _.xk;const e=_.mi(),f=(k,l,m)=>{l.drmInfos.some(n=>!!n.licenseServerUri)===k&&(d=d.catch(()=>{if(a.j)return null;if(m===_.rd){if((_.Oh()||e.os===hi&&_.Ph("Chrome")&&!_.Oh())&&!a.f.Oa[m].useLegacySystem)return l.label=sd,a.l.a(sd,
179
+ [l]).catch(()=>{a.g.warn("Unable to create com.microsoft.playready.recommendation. Falling back to com.microsoft.playready.");l.label=_.rd;Wn(l);return a.l.a(m,[l])});Wn(l)}if(m===_.td&&a.f.widevineVersion!==_.td){const n=a.f.widevineVersion;if(!n.startsWith(_.td))return a.g.error(`Invalid "widevineVersion" value "${n}".`),Promise.reject();const p=Object.assign({},l,{label:n,distinctiveIdentifier:_.Ke,persistentState:_.Ke});return a.l.a(n,[p]).catch(()=>a.l.a(m,[l]))}return a.l.a(m,[l]).catch(n=>
180
+ {a:{if(m===_.td&&Yn(l)){const p=_.mi();if(Yn(l)&&p.os===fi&&p.browser===Zc){a.g.warn("requestMediaKeySystemAccess() failed",n);a.g.warn("Will try to recover by removing the robustness attribute of videoCapabilities and audioCapabilities.");Wn(l);n=a.l.a(m,[l]);break a}}throw n;}return n})}))};let g=a.f.preferredDrmSystem;if(!g){var h=_.mi();if(h.os===hi&&10<=h.osVersion.major&&"edge"===h.browser)g=_.rd;else if("safari"===h.browser)g=_.pd;else if(h.browser===Zc||"firefox"===h.browser)g=_.td}g&&(h=
181
+ b.get(g))&&(f(!0,h,g),f(!1,h,g));for(const k of[!0,!1])b.forEach((l,m)=>{m!==g&&f(k,l,m)});d=d.catch(()=>{throw new _.J(_.C,6,6001,"Failed to get MediaKeySystemAccess.");});d=d.then(k=>{if(a.j)return null;a.J.clear();var l=k.getConfiguration();a.g.info("Got MediaKeySystemAccess with configuration",l);var m=l.audioCapabilities||[];l=l.videoCapabilities||[];for(var n of m)a.J.add(n.contentType.toLowerCase());for(var p of l)a.J.add(p.contentType.toLowerCase());{m=k.keySystem;n=b.get(_.Sn(k.keySystem));
182
+ p=[];l=[];const u=[],x=[];bo(n.drmInfos,p,l,u,x);1<l.length&&_.A("Multiple unique server certificates found! Only the first will be used.");1<p.length&&_.A("Multiple unique license server URIs found! Only the first will be used.");m={keySystem:m,licenseServerUri:p[0],distinctiveIdentifierRequired:n.distinctiveIdentifier===_.vf,persistentStateRequired:n.persistentState===_.vf,audioRobustness:n.audioCapabilities?n.audioCapabilities[0].robustness:"",videoRobustness:n.videoCapabilities?n.videoCapabilities[0].robustness:
183
183
  "",serverCertificate:l[0],initData:u,keyIds:x,periodId:null}}a.a=m;if(!a.a.licenseServerUri)throw new _.J(_.C,6,6012,a.a.keySystem);return k.createMediaKeys()}).then(k=>{a.j||(a.g.info("Created MediaKeys for key system",a.a.keySystem),a.I=k,a.S=!0)}).catch(k=>{if(!a.j){a.a=null;a.J.clear();if(k instanceof _.J)throw k;throw new _.J(_.C,6,6002,{browserError:k.message});}});c.reject();return d};
184
- no=function(a){a=hh(a.f.Ma[_.Le]||{});if(0===a.size)return null;const b=[],c=[];a.forEach((e,f)=>{f=_.Pk(f);e=_.Pk(e);e={kty:"oct",kid:_.Nk(f,!1),k:_.Nk(e,!1)};b.push(e);c.push(e.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:_.zi(d),initDataType:"keyids"}];return{keySystem:_.Le,licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:d,
185
- keyIds:[],periodId:null}};go=function(a){const b=[];for(const c of a)for(const d of c.drmInfos)b.push(d);return b};oo=function(a,b){for(const c of b)""===c.licenseServerUri||a.f.Ma[c.keySystem]||(a.f.Ma[c.keySystem]={licenseUrl:""})};
186
- fo=function(a,b){const c=b.some(g=>0<g.drmInfos.length);if(!c){var d=hh(a.f.Ma);Sn(b,d)}d=a.f.Ma[_.pd];const e=b.some(g=>g.drmInfos.some(h=>h.keySystem===_.pd));if(!1!==a.f.wj&&_.Yh()&&!e&&d)for(var f of b)f.drmInfos.push({keySystem:_.pd,licenseServerUri:d.licenseUrl,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:[],keyIds:[],periodId:null});if(f=no(a))for(const g of b)g.drmInfos=[f];b=go(b);oo(a,b);for(const g of b)Tn(g,
187
- a.f.Ma);return c};ho=function(a,b,c){const d=_.Rn(b.keySystem);c=c[d];d===_.Le&&b.licenseServerUri?a.g.debug("Using Clear Key data URI for",d):c&&c.licenseUrl?(b.licenseServerUri=c.licenseUrl,a.g.debug("Using license server URI from user-configured clpp.drm.DrmEnvironment (licenseUrl) for",d)):a.g.debug("Using license server URI from the manifest for ",d)};
188
- io=function(a,b){var c=new Set(go(b));const d=a.G?_.vf:_.Ke,e=a.G?[_.Pe]:[Rf];a=new Map;for(const f of c)a.set(f.keySystem,{initDataTypes:[_.Vc],audioCapabilities:[],videoCapabilities:[],distinctiveIdentifier:_.Ke,persistentState:d,sessionTypes:e,label:f.keySystem,drmInfos:[]});for(const f of b){b=f.audio;c=f.video;const g=b?_.Un(b):"";let h=null;b&&"ac-3"===b.codecs.toLowerCase()&&_.Ph()&&(h=_.Un(b,_.Od));const k=c?_.Un(c):"";let l=null;c&&"ac-3"===c.codecs.toLowerCase()&&_.Ph()&&(l=_.Un(c,_.Od));
189
- for(const m of f.drmInfos){const n=a.get(m.keySystem);n.drmInfos.push(m);m.initData&&m.initData.length&&(n.initDataTypes=[...new Set(m.initData.map(p=>p.initDataType))]);m.distinctiveIdentifierRequired&&(n.distinctiveIdentifier=_.vf);m.persistentStateRequired&&(n.persistentState=_.vf);b&&_.kj(m.audioRobustness).forEach(p=>{const u={robustness:p||"",contentType:g};n.audioCapabilities.find(x=>x.robustness===u.robustness&&x.contentType===u.contentType)||n.audioCapabilities.push(u);h&&n.audioCapabilities.push({robustness:p||
190
- "",contentType:h})});c&&_.kj(m.videoRobustness).forEach(p=>{const u={robustness:p||"",contentType:k};n.videoCapabilities.find(x=>x.robustness===u.robustness&&x.contentType===u.contentType)||n.videoCapabilities.push(u);l&&n.videoCapabilities.push({robustness:p||"",contentType:l})})}}return a};po=function(a){return _.v(function*(){if(!a.l.o())if(a.P)yield a.P;else try{a.P=a.l.h(a.I),yield a.P}catch(b){a.j||a.w(new _.J(_.C,6,6003,b.message,b))}})};
191
- _.to=function(a,b,c,d){d=void 0===d?"":d;if(c.length&&(!a.G||a.K!==lo)){var e=a.keySystem();if(!e.startsWith(_.pd)&&b===_.Vc){const f=new qo(c);if(1<f.a.length&&(e={"org.w3.clearkey":"1077efecc0b24d02ace33c1e52e2fb4b","com.widevine.alpha":"edef8ba979d64acea3c827dcd51d21ed","com.microsoft.playready":"9a04f07998404286ab92e65be0885f95","com.adobe.primetime":"f239e769efa348509c16a903c6932efb"}[e]))for(let g=0;g<f.f.length;g++)if(e===f.f[g]){c=c.subarray(f.a[g].start,f.a[g].end+1);break}}(a.C.webkitCurrentPlaybackTargetIsWireless||
192
- _.Ph(2)||a.keySystem().startsWith(_.pd)||!_.ro(a,d,c,!0))&&so(a,d,null,b,c)}};uo=function(a,b){return _.v(function*(){a.g.info(`Handle encrypted event for type ${b.initDataType}`);yield po(a);b.initData&&_.to(a,b.initDataType,_.E(b.initData))})};wo=function(a){return _.v(function*(){_.Mn(Ed);const b=a.W.map(c=>vo(a,c));a.ja=!0;a.W=[];yield Promise.all(b);_.Mn(Dd);_.On("drm.onPlay",Ed,Dd)})};
193
- yo=function(a){const b=a.keySystem(),c=a.f.Ma[b],d=c.certificateUrl||"";if(""===d)return Promise.resolve();const e=a.D.getConfiguration();return xo(a,e).then(()=>{var f=c.modifiers;const g=f&&f.certificateRequest,h=f&&f.certificateResponse;f=_.ek([d],a.f.attemptParameters);f.type=3;f.licenseRequestType=Xc;g&&f.requestModifiers.push(k=>g(e,k));h&&f.responseModifiers.push(k=>h(e,k));a.g.debug("Fetching certificate");return a.D.Bb.fetch(f).V}).then(f=>{a.a.serverCertificate=_.E(f.data)}).catch(f=>{var g=
194
- f.data.headers;g=Object.assign({message:Aa,url:f.data.url,status:f.data.status,response:f.data.response},g?{headers:g}:{},gn(g));throw new _.J(_.C,6,6100,g,f);})};
195
- _.zo=function(a){return _.v(function*(){if(a.I&&a.a&&a.a.serverCertificate&&a.a.serverCertificate.length)try{const b=yield a.I.setServerCertificate(a.a.serverCertificate);void 0===b||b||a.g.debug("Server certificates are not supported by the key system. The server certificate has been ignored.")}catch(b){throw new _.J(_.C,6,6004,{browserError:b.message});}})};
196
- _.Co=function(a){const b=a.a?a.a.initData||[]:[];for(const c of b){let d=!_.Ph(2);if(a.f.enforceSingleSession&&!a.keySystem().startsWith(_.pd)){const e=a.h.values();for(const f of e)_.Rk(c.initData,f.initData)?(a.g.info("Skipping Session creation. Existing init data in single session mode!"),d=!1):f.periodId===c.periodId&&(a.g.info("Skipping Session creation. Merging init data for period in single session mode "+`for Key ID ${c.keyId}.`),Ao(c.initData,f)||(f.me.push(c.initData),c.keyId&&!f.ub.includes(c.keyId)&&
197
- f.ub.push(c.keyId),a.o.get(c.keyId)||a.o.set(c.keyId,Mf)),d=!1)}!d||a.G&&a.K===lo||(_.ro(a,c.keyId,c.initData)&&(d=!1),d&&(a.g.info("Request new media key session on create"),so(a,c.keyId,c.periodId,c.initDataType,c.initData)))}for(const c of a.L)_.Bo(a,c);b.length||a.L.length||(a.A||a.g.info(wa),a.A=!0,a.F=!1,a.H.resolve());return a.H};
198
- _.Do=function(a,b){if(!a.I)return Gh(a.B,b,()=>{a.w(new _.J(_.C,6,6010))}),Promise.resolve();a.C=b;a.l.l(b);a.B.one(a.C,_.Re,()=>wo(a));a.B.on(a.C,_.Ag,e=>{const f=a.F;a.F=!a.A;!f&&a.F&&(a.g.info("Waiting for DRM license key delivery"),a.D.onEvent(e))});var c=a.a.initData.find(e=>0<e.initData.length);let d=Promise.resolve();if(c||a.l.f()!==lb||a.L.length)d=po(a);c=Promise.resolve();_.Sh()&&38===_.Wh().major||(a.a&&a.a.keySystem!==_.Le&&!a.a.serverCertificate&&(c=yo(a)),c=c.then(()=>_.zo(a)));return Promise.all([d,
199
- c]).then(()=>{a.j||(_.Co(a),a.B.on(a.C,Pd,e=>uo(a,e)))}).catch(e=>{if(!a.j){if(6004===e.code&&a.a&&a.a.keySystem===_.td&&1>a.R&&a.a.serverCertificate&&a.a.serverCertificate.length)return a.g.warn("Detected invalid widevine server certificate!. Retrying"),a.w(new _.J(1,6,6004)),a.a.serverCertificate=null,a.R++,_.Do(a,b);1<=a.R&&a.g.info("Could not get valid widevine server certificate. Giving up");throw e;}})};
200
- xo=function(a,b){return _.v(function*(){const c=a.D.Zc();if(c){var d=b&&b.drm&&b.drm.customData;d&&(yield c(d))}})};
201
- _.Bo=function(a,b){let c;try{a.g.debug("Attempting to load an offline session",b),c=a.I.createSession(_.Pe)}catch(e){const f=new _.J(_.C,6,6005,{browserError:e.message});a.w(f);return Promise.reject(f)}a.B.on(c,_.qe,a.eb.bind(a));a.B.on(c,ce,a.cb.bind(a));const d={initData:null,loaded:!1,df:Infinity,tc:null,qb:new _.wk,periodId:null,me:[],keyId:null,ub:[],initDataType:null,Ac:null,sessionContext:{ldlDelay:0,customData:{}}};d.qb.catch(()=>{});a.h.set(c,d);return c.load(b).then(e=>{if(a.j)return null;
202
- a.g.debug("Loaded offline session",b,e);if(!e)return a.h.delete(c),a.w(new _.J(_.C,6,6013)),null;d.loaded=!0;Eo(a)&&(a.A||a.g.info(wa),a.A=!0,a.F=!1,a.H.resolve());return c},e=>{a.j||(a.h.delete(c),a.w(new _.J(_.C,6,6005,{browserError:e.message})))})};Ao=function(a,b){if(!a)return!1;for(let c=0;c<b.me.length;c++)if(_.Rk(a,b.me[c]))return!0;return!1};
203
- _.ro=function(a,b,c,d){d=void 0===d?!1:d;for(const e of a.h.keys()){const f=a.h.get(e);if(_.Rk(c,f.initData))return b?f.ub.includes(b)?d&&a.g.info("Skipping Session creation. "+`License for init data with Key ID ${b} was already `+`requested in Session: '${e.sessionId}'. `):(f.ub.push(b),a.o.get(b)||a.o.set(b,Mf),d&&a.g.info(pb+`Session: '${e.sessionId}'`+`Adding Key ID ${b} to session meta-data.`)):d&&a.g.info(pb+`Session: '${e.sessionId}'`),!0;if(Ao(c,f))return d&&a.g.info("Skipping Session creation. License for init data was already requested [extra]"),
184
+ oo=function(a){a=hh(a.f.Oa[_.Le]||{});if(0===a.size)return null;const b=[],c=[];a.forEach((e,f)=>{f=_.Qk(f);e=_.Qk(e);e={kty:"oct",kid:_.Ok(f,!1),k:_.Ok(e,!1)};b.push(e);c.push(e.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:_.Ai(d),initDataType:"keyids"}];return{keySystem:_.Le,licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:d,
185
+ keyIds:[],periodId:null}};ho=function(a){const b=[];for(const c of a)for(const d of c.drmInfos)b.push(d);return b};po=function(a,b){for(const c of b)""===c.licenseServerUri||a.f.Oa[c.keySystem]||(a.f.Oa[c.keySystem]={licenseUrl:""})};
186
+ go=function(a,b){const c=b.some(g=>0<g.drmInfos.length);if(!c){var d=hh(a.f.Oa);Tn(b,d)}d=a.f.Oa[_.pd];const e=b.some(g=>g.drmInfos.some(h=>h.keySystem===_.pd));if(!1!==a.f.wj&&_.Zh()&&!e&&d)for(var f of b)f.drmInfos.push({keySystem:_.pd,licenseServerUri:d.licenseUrl,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:[],keyIds:[],periodId:null});if(f=oo(a))for(const g of b)g.drmInfos=[f];b=ho(b);po(a,b);for(const g of b)Un(g,
187
+ a.f.Oa);return c};io=function(a,b,c){const d=_.Sn(b.keySystem);c=c[d];d===_.Le&&b.licenseServerUri?a.g.debug("Using Clear Key data URI for",d):c&&c.licenseUrl?(b.licenseServerUri=c.licenseUrl,a.g.debug("Using license server URI from user-configured clpp.drm.DrmEnvironment (licenseUrl) for",d)):a.g.debug("Using license server URI from the manifest for ",d)};
188
+ jo=function(a,b){var c=new Set(ho(b));const d=a.G?_.vf:_.Ke,e=a.G?[_.Pe]:[Rf];a=new Map;for(const f of c)a.set(f.keySystem,{initDataTypes:[_.Vc],audioCapabilities:[],videoCapabilities:[],distinctiveIdentifier:_.Ke,persistentState:d,sessionTypes:e,label:f.keySystem,drmInfos:[]});for(const f of b){b=f.audio;c=f.video;const g=b?_.Vn(b):"";let h=null;b&&"ac-3"===b.codecs.toLowerCase()&&_.Qh()&&(h=_.Vn(b,_.Od));const k=c?_.Vn(c):"";let l=null;c&&"ac-3"===c.codecs.toLowerCase()&&_.Qh()&&(l=_.Vn(c,_.Od));
189
+ for(const m of f.drmInfos){const n=a.get(m.keySystem);n.drmInfos.push(m);m.initData&&m.initData.length&&(n.initDataTypes=[...new Set(m.initData.map(p=>p.initDataType))]);m.distinctiveIdentifierRequired&&(n.distinctiveIdentifier=_.vf);m.persistentStateRequired&&(n.persistentState=_.vf);b&&_.lj(m.audioRobustness).forEach(p=>{const u={robustness:p||"",contentType:g};n.audioCapabilities.find(x=>x.robustness===u.robustness&&x.contentType===u.contentType)||n.audioCapabilities.push(u);h&&n.audioCapabilities.push({robustness:p||
190
+ "",contentType:h})});c&&_.lj(m.videoRobustness).forEach(p=>{const u={robustness:p||"",contentType:k};n.videoCapabilities.find(x=>x.robustness===u.robustness&&x.contentType===u.contentType)||n.videoCapabilities.push(u);l&&n.videoCapabilities.push({robustness:p||"",contentType:l})})}}return a};qo=function(a){return _.v(function*(){if(!a.l.o())if(a.P)yield a.P;else try{a.P=a.l.h(a.I),yield a.P}catch(b){a.j||a.w(new _.J(_.C,6,6003,b.message,b))}})};
191
+ _.uo=function(a,b,c,d){d=void 0===d?"":d;if(c.length&&(!a.G||a.K!==mo)){var e=a.keySystem();if(!e.startsWith(_.pd)&&b===_.Vc){const f=new ro(c);if(1<f.a.length&&(e={"org.w3.clearkey":"1077efecc0b24d02ace33c1e52e2fb4b","com.widevine.alpha":"edef8ba979d64acea3c827dcd51d21ed","com.microsoft.playready":"9a04f07998404286ab92e65be0885f95","com.adobe.primetime":"f239e769efa348509c16a903c6932efb"}[e]))for(let g=0;g<f.f.length;g++)if(e===f.f[g]){c=c.subarray(f.a[g].start,f.a[g].end+1);break}}(a.C.webkitCurrentPlaybackTargetIsWireless||
192
+ _.Qh(2)||a.keySystem().startsWith(_.pd)||!_.so(a,d,c,!0))&&to(a,d,null,b,c)}};vo=function(a,b){return _.v(function*(){a.g.info(`Handle encrypted event for type ${b.initDataType}`);yield qo(a);b.initData&&_.uo(a,b.initDataType,_.E(b.initData))})};xo=function(a){return _.v(function*(){_.Nn(Ed);const b=a.W.map(c=>wo(a,c));a.ja=!0;a.W=[];yield Promise.all(b);_.Nn(Dd);_.Pn("drm.onPlay",Ed,Dd)})};
193
+ zo=function(a){const b=a.keySystem(),c=a.f.Oa[b],d=c.certificateUrl||"";if(""===d)return Promise.resolve();const e=a.D.getConfiguration();return yo(a,e).then(()=>{var f=c.modifiers;const g=f&&f.certificateRequest,h=f&&f.certificateResponse;f=_.fk([d],a.f.attemptParameters);f.type=3;f.licenseRequestType=Xc;g&&f.requestModifiers.push(k=>g(e,k));h&&f.responseModifiers.push(k=>h(e,k));a.g.debug("Fetching certificate");return a.D.Cb.fetch(f).V}).then(f=>{a.a.serverCertificate=_.E(f.data)}).catch(f=>{var g=
194
+ f.data.headers;g=Object.assign({message:Aa,url:f.data.url,status:f.data.status,response:f.data.response},g?{headers:g}:{},hn(g));throw new _.J(_.C,6,6100,g,f);})};
195
+ _.Ao=function(a){return _.v(function*(){if(a.I&&a.a&&a.a.serverCertificate&&a.a.serverCertificate.length)try{const b=yield a.I.setServerCertificate(a.a.serverCertificate);void 0===b||b||a.g.debug("Server certificates are not supported by the key system. The server certificate has been ignored.")}catch(b){throw new _.J(_.C,6,6004,{browserError:b.message});}})};
196
+ _.Do=function(a){const b=a.a?a.a.initData||[]:[];for(const c of b){let d=!_.Qh(2);if(a.f.enforceSingleSession&&!a.keySystem().startsWith(_.pd)){const e=a.h.values();for(const f of e)_.Sk(c.initData,f.initData)?(a.g.info("Skipping Session creation. Existing init data in single session mode!"),d=!1):f.periodId===c.periodId&&(a.g.info("Skipping Session creation. Merging init data for period in single session mode "+`for Key ID ${c.keyId}.`),Bo(c.initData,f)||(f.me.push(c.initData),c.keyId&&!f.ub.includes(c.keyId)&&
197
+ f.ub.push(c.keyId),a.o.get(c.keyId)||a.o.set(c.keyId,Mf)),d=!1)}!d||a.G&&a.K===mo||(_.so(a,c.keyId,c.initData)&&(d=!1),d&&(a.g.info("Request new media key session on create"),to(a,c.keyId,c.periodId,c.initDataType,c.initData)))}for(const c of a.L)_.Co(a,c);b.length||a.L.length||(a.A||a.g.info(wa),a.A=!0,a.F=!1,a.H.resolve());return a.H};
198
+ _.Eo=function(a,b){if(!a.I)return Fh(a.B,b,()=>{a.w(new _.J(_.C,6,6010))}),Promise.resolve();a.C=b;a.l.l(b);a.B.one(a.C,_.Re,()=>xo(a));a.B.on(a.C,_.Ag,e=>{const f=a.F;a.F=!a.A;!f&&a.F&&(a.g.info("Waiting for DRM license key delivery"),a.D.onEvent(e))});var c=a.a.initData.find(e=>0<e.initData.length);let d=Promise.resolve();if(c||a.l.f()!==lb||a.L.length)d=qo(a);c=Promise.resolve();_.Th()&&38===_.Xh().major||(a.a&&a.a.keySystem!==_.Le&&!a.a.serverCertificate&&(c=zo(a)),c=c.then(()=>_.Ao(a)));return Promise.all([d,
199
+ c]).then(()=>{a.j||(_.Do(a),a.B.on(a.C,Pd,e=>vo(a,e)))}).catch(e=>{if(!a.j){if(6004===e.code&&a.a&&a.a.keySystem===_.td&&1>a.R&&a.a.serverCertificate&&a.a.serverCertificate.length)return a.g.warn("Detected invalid widevine server certificate!. Retrying"),a.w(new _.J(1,6,6004)),a.a.serverCertificate=null,a.R++,_.Eo(a,b);1<=a.R&&a.g.info("Could not get valid widevine server certificate. Giving up");throw e;}})};
200
+ yo=function(a,b){return _.v(function*(){const c=a.D.Zc();if(c){var d=b&&b.drm&&b.drm.customData;d&&(yield c(d))}})};
201
+ _.Co=function(a,b){let c;try{a.g.debug("Attempting to load an offline session",b),c=a.I.createSession(_.Pe)}catch(e){const f=new _.J(_.C,6,6005,{browserError:e.message});a.w(f);return Promise.reject(f)}a.B.on(c,_.qe,a.fb.bind(a));a.B.on(c,ce,a.eb.bind(a));const d={initData:null,loaded:!1,df:Infinity,uc:null,qb:new _.xk,periodId:null,me:[],keyId:null,ub:[],initDataType:null,Bc:null,sessionContext:{ldlDelay:0,customData:{}}};d.qb.catch(()=>{});a.h.set(c,d);return c.load(b).then(e=>{if(a.j)return null;
202
+ a.g.debug("Loaded offline session",b,e);if(!e)return a.h.delete(c),a.w(new _.J(_.C,6,6013)),null;d.loaded=!0;Fo(a)&&(a.A||a.g.info(wa),a.A=!0,a.F=!1,a.H.resolve());return c},e=>{a.j||(a.h.delete(c),a.w(new _.J(_.C,6,6005,{browserError:e.message})))})};Bo=function(a,b){if(!a)return!1;for(let c=0;c<b.me.length;c++)if(_.Sk(a,b.me[c]))return!0;return!1};
203
+ _.so=function(a,b,c,d){d=void 0===d?!1:d;for(const e of a.h.keys()){const f=a.h.get(e);if(_.Sk(c,f.initData))return b?f.ub.includes(b)?d&&a.g.info("Skipping Session creation. "+`License for init data with Key ID ${b} was already `+`requested in Session: '${e.sessionId}'. `):(f.ub.push(b),a.o.get(b)||a.o.set(b,Mf),d&&a.g.info(pb+`Session: '${e.sessionId}'`+`Adding Key ID ${b} to session meta-data.`)):d&&a.g.info(pb+`Session: '${e.sessionId}'`),!0;if(Bo(c,f))return d&&a.g.info("Skipping Session creation. License for init data was already requested [extra]"),
204
204
  !0}return!1};
205
- so=function(a,b,c,d,e,f,g){f=void 0===f?null:f;g=void 0===g?!1:g;_.v(function*(){if(e.length){var h=b;if(!h)try{h=Fo(a,d,e,f)}catch(u){if(a.g.warn("Ignoring unrecognized init data. This may be caused by unsupported or malformed init data. Set `drm.ignoreUnrecognizedInitData \x3d false` if you want to override this behavior and use the init data after all.",{error:u,initDataType:d,initData:e}),a.f.ignoreUnrecognizedInitData)return}if(!g&&Go(a,h,d,e)){var k=!0;if("skd"===d&&!a.f.enableSessionCacheForSkd)for(var l of a.h.keys()){var m=a.h.get(l);
206
- if(h&&m.keyId===h){a.g.warn(`Close and re-open session for ${h}`);try{yield l.close()}catch(u){a.g.warn("Unable to close session",u)}k=!1}}if(k){a.g.warn(`Skip creating a new session for ${h}`);return}}try{var n=a.G?_.Pe:Rf;var p=a.I.createSession(n);a.D.onEvent(new _.H(Id,{keySystem:a.keySystem()}));a.g.info(`Created new ${n} session for Key ID: '${h}'. `+`Init data type: ${d}.`)}catch(u){a.w(new _.J(_.C,6,6005,{browserError:u.message}));return}a.B.on(p,_.qe,a.eb.bind(a));a.B.on(p,ce,a.cb.bind(a));
207
- k={Ac:f,me:[],initData:e,initDataType:d,keyId:h,ub:h?[h]:[],loaded:!1,df:Infinity,periodId:c,tc:null,qb:new _.wk,sessionContext:{ldlDelay:0,customData:{}}};k.qb.catch(()=>{});f&&(l=a.h.get(f),k.sessionContext=l.sessionContext);a.h.set(p,k);h&&!a.o.get(h)&&a.o.set(h,Mf);if(e)for(l=0;l<a.a.initData.length;l++)m=a.a.initData[l],m.keyId&&!k.ub.includes(m.keyId)&&_.Rk(m.initData,e)&&(k.keyId||(k.keyId=m.keyId),k.ub.push(m.keyId),a.o.get(m.keyId)||a.o.set(m.keyId,Mf));l=a.D.getConfiguration();m=a.keySystem();
208
- m=a.f.Ma[m];n=(n=m.modifiers)&&n.transformInitData;_.bh(n)||(n=Zn);try{e=n({playerConfig:l,initData:e,initDataType:d,drmInfo:a.a,drmSystemConfig:m,sessionContext:k.sessionContext,emeApi:a.l.f()})}catch(u){h=u;u instanceof _.J||(h=new _.J(_.C,6,6016,u));k.qb&&k.qb.reject(u);a.w(h);return}a.g.info(`Generate License Request for key ID: '${h}'`);p.generateRequest(d,e.buffer).catch(u=>{if(!a.j){var x=null;u.errorCode&&u.errorCode.systemCode&&(x=u.errorCode.systemCode,0>x&&(x+=Math.pow(2,32)),x="0x"+x.toString(16));
209
- a.w(new _.J(_.C,6,6006,{browserError:u.message,error:u,extended:x},u))}})}else a.g.warn("Empty init data")})};Ho=function(a){let b=Infinity;a=a.h.keys();for(const c of a)isNaN(c.expiration)||(b=Math.min(b,c.expiration));return b};Eo=function(a){for(const b of a.h.values())if(!b.loaded)return!1;return!0};Go=function(a,b,c,d){if(!b&&c!==_.Hf)return!1;d=b||Wm(d);for(const e of a.h.values())if(b&&e.keyId===b||b&&e.ub.includes(b)||c===_.Hf&&(e.keyId||Wm(e.initData))===d)return!0;return!1};
210
- Fo=function(a,b,c,d){d=void 0===d?null:d;if("skd"===b){a:{var e=d;e=void 0===e?null:e;var f=a.keySystem(),g=a.f.Ma[f];f=a.D.getConfiguration();g=g&&g.modifiers&&g.modifiers.extractContentId;_.bh(g)||(g=Yn);try{var h={ldlDelay:0,customData:{}};e&&(h=a.h.get(e).sessionContext);var k=g(f,c,h);a.g.debug(`Extracted Content ID '${k}' from SKD`);var l=k;break a}catch(m){a.g.warn("Unable to extract Content ID from SKD",m)}l=""}return l}if(b===_.Hf)return Wm(c)||"";if(b===_.Vc){l=a.keySystem();try{if($n(l)){const m=
211
- _.Dn(c);if(m)return m.a}else if(Qn(l)){{f=new _.Cn(new DataView(c.buffer,c.byteOffset,c.byteLength),!1);g=_.P(f);const m=_.P(f);h=_.Nm(m);const n=_.P(f);c=n>>>24;k=n&16777215;const p=_.Lm(f,16),u=_.Qk(p);if(0<c){const F=_.P(f);f.skip(16*F)}const x=_.P(f),y=_.Lm(f,x),B=_.Kn(y);_.rh("Parsed PR PSSH Box","size",g,"name",h,mg,c,"flags",k,"size",x,"systemId",u,"keyId",B.a);e=B}if(e)return e.a}}catch(m){throw a.g.warn("Unable to extract Key ID from PSSH data.",{error:m,keySystem:l}),m;}}return""};
212
- vo=function(a,b){return _.v(function*(){const c=b.target,d=a.h.get(c);if(d){var e=a.a.licenseServerUri;if(Io(a,b))yield Jo(a,e,b,c,d);else{var f=a.Aa;if(0<f&&(a.g.info(`Delaying license request by ${f} s.`),yield yh(f),a.j))return;var g=a.keySystem(),h=a.f.Ma[g];"individualization-request"===b.messageType&&h&&h.individualizationServer&&(e=h.individualizationServer);var k=_.ek([e],a.f.attemptParameters);k.type=3;k.body=b.message;k.method=_.bb;$n(g)&&(k.headers[_.ua]=zc);k.licenseRequestType=b.messageType===
213
- fe&&d.Ac?ee:b.messageType;k.sessionId=c.sessionId;if(k.licenseRequestType===ee)a.D.onEvent(new _.H(Hd));Qn(a.a.keySystem)&&Ko(a,k);xm(a.M,k);h=String(Math.floor(b.timeStamp));if(f=yield Lo(a,k,d,h,e,c.sessionId,b.messageType,f))if(e=ym(a.M,f),yield Mo(a,c,f.data,d,h))h=Ho(a),a.D.onEvent(new _.H(_.Kd,{keySystem:g,expirationTime:h,expectedRenewalTime:e?Date.now()+1E3*e.delay:Number.NaN})),d.tc&&d.tc.resolve(),d.Ac&&(h=d.Ac,a.g.info(`Closing expired session '${h.sessionId}'`),Pn(h).catch(()=>{a.g.warn("Unable to close expired session in time")}),
214
- (h=a.h.get(d.Ac))&&h.Uc&&h.Uc.stop(),a.h.delete(d.Ac),d.Ac=null),(new _.Jh(()=>{a.j||(d.loaded=!0,d.qb&&d.qb.resolve(),Eo(a)&&(a.A||a.g.info(wa),a.A=!0,a.F=!1,a.H.resolve()))})).la(5),null!==d.initData&&(0<d.sessionContext.ldlDelay||e&&(_.Ci(g,_.pd)||_.Ci(g,_.rd)))&&(h=new _.Jh(()=>{!a.j&&a.M&&(a.g.info("Updating CSL Sessions"),Qn(g)?so(a,d.keyId,d.periodId,d.initDataType,d.initData,c,!0):g.startsWith(_.pd)&&c.update(_.zi("renew")))}),d.Uc=h,h.la(e?e.delay:d.sessionContext.ldlDelay))}}else a.g.error(`Session metadata not found for ${c.sessionId}.`)})};
215
- Io=function(a,b){a=a.keySystem();return $n(a)&&b.message&&2===b.message.byteLength};Jo=function(a,b,c,d,e){return _.v(function*(){var f=_.ek([b],a.f.attemptParameters);f.type=3;f.body=c.message;f.method=_.bb;f.licenseRequestType=Xc;f.sessionId=d.sessionId;f.headers[_.ua]=zc;(f=yield No(a,f,e,b,d.sessionId,c.messageType))&&(yield Mo(a,d,f.data,e,String(Math.floor(c.timeStamp))))})};
216
- Ko=function(a,b){var c=xi(b.body,!0,!0);if(c.includes("PlayReadyKeyMessage")){a.g.debug("Unwrapping PlayReady request.");a=(new DOMParser).parseFromString(c,"application/xml");c=a.getElementsByTagName("HttpHeader");for(let d=0;d<c.length;++d)b.headers[c[d].querySelector("name").textContent]=c[d].querySelector(_.lg).textContent;b.body=_.Ok(a.querySelector("Challenge").textContent).buffer}else a.g.debug("PlayReady request is already unwrapped."),b.headers[_.ua]="text/xml; charset\x3dutf-8"};
217
- Lo=function(a,b,c,d,e,f,g,h){return _.v(function*(){a.g.info("License request for "+`SID:'${f}'/KID:'${c.keyId}' `+`from msg '${g}'.`);yield Oo(a,b,c.sessionContext);a.g.debug("Sending DRM license request to",e,b);a.D.onEvent(new _.H(Gd,{delay:h}));var k=Date.now();_.Mn(`drm.license.req.${d}.start`);var l=null;try{l=yield a.D.Bb.fetch(b).V}catch(p){if(a.j)return null;l=p.data.headers;l=Object.assign({message:"Error while fetching DRM license!",url:p.data.url,status:p.data.status,response:p.data.response},
218
- l?{headers:l}:{},gn(l));l=new _.J(_.C,6,6007,l,p);Po(a,l,c);return null}_.Mn(`drm.license.req.${d}.end`);_.On(`drm.license.req.${d}`,`drm.license.req.${d}.start`,`drm.license.req.${d}.end`);k=Date.now()-k;const m=hn(l.headers);m&&(a.Aa=m.delay||0);let n="";m&&m.requestId&&(n=` RID:${m.requestId}`);a.g.info("License response for "+`SID:'${f}'/`+`KID:'${c.keyId}' `+`${l.data.byteLength} bytes `+`in ${k}ms${n}`);return a.j?null:l})};
219
- Mo=function(a,b,c,d,e){return _.v(function*(){_.Mn(`drm.sess.update.${e}.start`);try{yield b.update(c)}catch(f){if(a.j)return!1;if(f===ob)return a.g.info("Ignore update for closed sessions"),!1;const g=new _.J(_.C,6,6008,{browserError:f.message});Po(a,g,d);return!1}_.Mn(`drm.sess.update.${e}.end`);_.On(`drm.sess.update.${e}`,`drm.sess.update.${e}.start`,`drm.sess.update.${e}.end`);return a.j?!1:!0})};
220
- No=function(a,b,c,d,e,f){return _.v(function*(){a.g.info("WV Server certificate request for "+`SID:'${e} from msg '${f}'.`);yield Oo(a,b,c.sessionContext);a.g.debug("Sending Widevine certificate request to",d,b);var g=Date.now(),h=null;try{h=yield a.D.Bb.fetch(b).V}catch(m){if(a.j)return null;h=m.data.headers;h=Object.assign({message:Aa,url:m.data.url,status:m.data.status,response:m.data.response},h?{headers:h}:{},gn(h));h=new _.J(_.C,6,6100,h,m);Po(a,h,c);return null}g=Date.now()-g;const k=hn(h.headers);
205
+ to=function(a,b,c,d,e,f,g){f=void 0===f?null:f;g=void 0===g?!1:g;_.v(function*(){if(e.length){var h=b;if(!h)try{h=Go(a,d,e,f)}catch(u){if(a.g.warn("Ignoring unrecognized init data. This may be caused by unsupported or malformed init data. Set `drm.ignoreUnrecognizedInitData \x3d false` if you want to override this behavior and use the init data after all.",{error:u,initDataType:d,initData:e}),a.f.ignoreUnrecognizedInitData)return}if(!g&&Ho(a,h,d,e)){var k=!0;if("skd"===d&&!a.f.enableSessionCacheForSkd)for(var l of a.h.keys()){var m=a.h.get(l);
206
+ if(h&&m.keyId===h){a.g.warn(`Close and re-open session for ${h}`);try{yield l.close()}catch(u){a.g.warn("Unable to close session",u)}k=!1}}if(k){a.g.warn(`Skip creating a new session for ${h}`);return}}try{var n=a.G?_.Pe:Rf;var p=a.I.createSession(n);a.D.onEvent(new _.H(Id,{keySystem:a.keySystem()}));a.g.info(`Created new ${n} session for Key ID: '${h}'. `+`Init data type: ${d}.`)}catch(u){a.w(new _.J(_.C,6,6005,{browserError:u.message}));return}a.B.on(p,_.qe,a.fb.bind(a));a.B.on(p,ce,a.eb.bind(a));
207
+ k={Bc:f,me:[],initData:e,initDataType:d,keyId:h,ub:h?[h]:[],loaded:!1,df:Infinity,periodId:c,uc:null,qb:new _.xk,sessionContext:{ldlDelay:0,customData:{}}};k.qb.catch(()=>{});f&&(l=a.h.get(f),k.sessionContext=l.sessionContext);a.h.set(p,k);h&&!a.o.get(h)&&a.o.set(h,Mf);if(e)for(l=0;l<a.a.initData.length;l++)m=a.a.initData[l],m.keyId&&!k.ub.includes(m.keyId)&&_.Sk(m.initData,e)&&(k.keyId||(k.keyId=m.keyId),k.ub.push(m.keyId),a.o.get(m.keyId)||a.o.set(m.keyId,Mf));l=a.D.getConfiguration();m=a.keySystem();
208
+ m=a.f.Oa[m];n=(n=m.modifiers)&&n.transformInitData;_.bh(n)||(n=$n);try{e=n({playerConfig:l,initData:e,initDataType:d,drmInfo:a.a,drmSystemConfig:m,sessionContext:k.sessionContext,emeApi:a.l.f()})}catch(u){h=u;u instanceof _.J||(h=new _.J(_.C,6,6016,u));k.qb&&k.qb.reject(u);a.w(h);return}a.g.info(`Generate License Request for key ID: '${h}'`);p.generateRequest(d,e.buffer).catch(u=>{if(!a.j){var x=null;u.errorCode&&u.errorCode.systemCode&&(x=u.errorCode.systemCode,0>x&&(x+=Math.pow(2,32)),x="0x"+x.toString(16));
209
+ a.w(new _.J(_.C,6,6006,{browserError:u.message,error:u,extended:x},u))}})}else a.g.warn("Empty init data")})};Io=function(a){let b=Infinity;a=a.h.keys();for(const c of a)isNaN(c.expiration)||(b=Math.min(b,c.expiration));return b};Fo=function(a){for(const b of a.h.values())if(!b.loaded)return!1;return!0};Ho=function(a,b,c,d){if(!b&&c!==_.Hf)return!1;d=b||Xm(d);for(const e of a.h.values())if(b&&e.keyId===b||b&&e.ub.includes(b)||c===_.Hf&&(e.keyId||Xm(e.initData))===d)return!0;return!1};
210
+ Go=function(a,b,c,d){d=void 0===d?null:d;if("skd"===b){a:{var e=d;e=void 0===e?null:e;var f=a.keySystem(),g=a.f.Oa[f];f=a.D.getConfiguration();g=g&&g.modifiers&&g.modifiers.extractContentId;_.bh(g)||(g=Zn);try{var h={ldlDelay:0,customData:{}};e&&(h=a.h.get(e).sessionContext);var k=g(f,c,h);a.g.debug(`Extracted Content ID '${k}' from SKD`);var l=k;break a}catch(m){a.g.warn("Unable to extract Content ID from SKD",m)}l=""}return l}if(b===_.Hf)return Xm(c)||"";if(b===_.Vc){l=a.keySystem();try{if(ao(l)){const m=
211
+ _.En(c);if(m)return m.a}else if(Rn(l)){{f=new _.Dn(new DataView(c.buffer,c.byteOffset,c.byteLength),!1);g=_.P(f);const m=_.P(f);h=_.Om(m);const n=_.P(f);c=n>>>24;k=n&16777215;const p=_.Mm(f,16),u=_.Rk(p);if(0<c){const F=_.P(f);f.skip(16*F)}const x=_.P(f),y=_.Mm(f,x),B=_.Ln(y);_.rh("Parsed PR PSSH Box","size",g,"name",h,mg,c,"flags",k,"size",x,"systemId",u,"keyId",B.a);e=B}if(e)return e.a}}catch(m){throw a.g.warn("Unable to extract Key ID from PSSH data.",{error:m,keySystem:l}),m;}}return""};
212
+ wo=function(a,b){return _.v(function*(){const c=b.target,d=a.h.get(c);if(d){var e=a.a.licenseServerUri;if(Jo(a,b))yield Ko(a,e,b,c,d);else{var f=a.Aa;if(0<f&&(a.g.info(`Delaying license request by ${f} s.`),yield Hh(f),a.j))return;var g=a.keySystem(),h=a.f.Oa[g];"individualization-request"===b.messageType&&h&&h.individualizationServer&&(e=h.individualizationServer);var k=_.fk([e],a.f.attemptParameters);k.type=3;k.body=b.message;k.method=_.bb;ao(g)&&(k.headers[_.ua]=zc);k.licenseRequestType=b.messageType===
213
+ fe&&d.Bc?ee:b.messageType;k.sessionId=c.sessionId;if(k.licenseRequestType===ee)a.D.onEvent(new _.H(Hd));Rn(a.a.keySystem)&&Lo(a,k);ym(a.M,k);h=String(Math.floor(b.timeStamp));if(f=yield Mo(a,k,d,h,e,c.sessionId,b.messageType,f))if(e=zm(a.M,f),yield No(a,c,f.data,d,h))h=Io(a),a.D.onEvent(new _.H(_.Kd,{keySystem:g,expirationTime:h,expectedRenewalTime:e?Date.now()+1E3*e.delay:Number.NaN})),d.uc&&d.uc.resolve(),d.Bc&&(h=d.Bc,a.g.info(`Closing expired session '${h.sessionId}'`),Qn(h).catch(()=>{a.g.warn("Unable to close expired session in time")}),
214
+ (h=a.h.get(d.Bc))&&h.Uc&&h.Uc.stop(),a.h.delete(d.Bc),d.Bc=null),(new _.Kh(()=>{a.j||(d.loaded=!0,d.qb&&d.qb.resolve(),Fo(a)&&(a.A||a.g.info(wa),a.A=!0,a.F=!1,a.H.resolve()))})).la(5),null!==d.initData&&(0<d.sessionContext.ldlDelay||e&&(_.Di(g,_.pd)||_.Di(g,_.rd)))&&(h=new _.Kh(()=>{!a.j&&a.M&&(a.g.info("Updating CSL Sessions"),Rn(g)?to(a,d.keyId,d.periodId,d.initDataType,d.initData,c,!0):g.startsWith(_.pd)&&c.update(_.Ai("renew")))}),d.Uc=h,h.la(e?e.delay:d.sessionContext.ldlDelay))}}else a.g.error(`Session metadata not found for ${c.sessionId}.`)})};
215
+ Jo=function(a,b){a=a.keySystem();return ao(a)&&b.message&&2===b.message.byteLength};Ko=function(a,b,c,d,e){return _.v(function*(){var f=_.fk([b],a.f.attemptParameters);f.type=3;f.body=c.message;f.method=_.bb;f.licenseRequestType=Xc;f.sessionId=d.sessionId;f.headers[_.ua]=zc;(f=yield Oo(a,f,e,b,d.sessionId,c.messageType))&&(yield No(a,d,f.data,e,String(Math.floor(c.timeStamp))))})};
216
+ Lo=function(a,b){var c=yi(b.body,!0,!0);if(c.includes("PlayReadyKeyMessage")){a.g.debug("Unwrapping PlayReady request.");a=(new DOMParser).parseFromString(c,"application/xml");c=a.getElementsByTagName("HttpHeader");for(let d=0;d<c.length;++d)b.headers[c[d].querySelector("name").textContent]=c[d].querySelector(_.lg).textContent;b.body=_.Pk(a.querySelector("Challenge").textContent).buffer}else a.g.debug("PlayReady request is already unwrapped."),b.headers[_.ua]="text/xml; charset\x3dutf-8"};
217
+ Mo=function(a,b,c,d,e,f,g,h){return _.v(function*(){a.g.info("License request for "+`SID:'${f}'/KID:'${c.keyId}' `+`from msg '${g}'.`);yield Po(a,b,c.sessionContext);a.g.debug("Sending DRM license request to",e,b);a.D.onEvent(new _.H(Gd,{delay:h}));var k=Date.now();_.Nn(`drm.license.req.${d}.start`);var l=null;try{l=yield a.D.Cb.fetch(b).V}catch(p){if(a.j)return null;l=p.data.headers;l=Object.assign({message:"Error while fetching DRM license!",url:p.data.url,status:p.data.status,response:p.data.response},
218
+ l?{headers:l}:{},hn(l));l=new _.J(_.C,6,6007,l,p);Qo(a,l,c);return null}_.Nn(`drm.license.req.${d}.end`);_.Pn(`drm.license.req.${d}`,`drm.license.req.${d}.start`,`drm.license.req.${d}.end`);k=Date.now()-k;const m=jn(l.headers);m&&(a.Aa=m.delay||0);let n="";m&&m.requestId&&(n=` RID:${m.requestId}`);a.g.info("License response for "+`SID:'${f}'/`+`KID:'${c.keyId}' `+`${l.data.byteLength} bytes `+`in ${k}ms${n}`);return a.j?null:l})};
219
+ No=function(a,b,c,d,e){return _.v(function*(){_.Nn(`drm.sess.update.${e}.start`);try{yield b.update(c)}catch(f){if(a.j)return!1;if(f===ob)return a.g.info("Ignore update for closed sessions"),!1;const g=new _.J(_.C,6,6008,{browserError:f.message});Qo(a,g,d);return!1}_.Nn(`drm.sess.update.${e}.end`);_.Pn(`drm.sess.update.${e}`,`drm.sess.update.${e}.start`,`drm.sess.update.${e}.end`);return a.j?!1:!0})};
220
+ Oo=function(a,b,c,d,e,f){return _.v(function*(){a.g.info("WV Server certificate request for "+`SID:'${e} from msg '${f}'.`);yield Po(a,b,c.sessionContext);a.g.debug("Sending Widevine certificate request to",d,b);var g=Date.now(),h=null;try{h=yield a.D.Cb.fetch(b).V}catch(m){if(a.j)return null;h=m.data.headers;h=Object.assign({message:Aa,url:m.data.url,status:m.data.status,response:m.data.response},h?{headers:h}:{},hn(h));h=new _.J(_.C,6,6100,h,m);Qo(a,h,c);return null}g=Date.now()-g;const k=jn(h.headers);
221
221
  let l="";k&&k.requestId&&(l=` RID:${k.requestId}`);a.g.info("WV Server certificate response for "+`SID:'${e}' `+`${h.data.byteLength} bytes `+`in ${g}ms${l}`);return a.j?null:h})};
222
- Oo=function(a,b,c){return _.v(function*(){const d=a.D.getConfiguration();yield xo(a,d);const e=a.keySystem();var f=a.f.Ma[e];const g=(f=f&&f.modifiers)&&f.licenseRequest,h=f&&f.licenseResponse;g?b.requestModifiers.push(k=>g(d,k,c)):e.startsWith(_.pd)&&b.requestModifiers.push(k=>_.Zm(k));h?b.responseModifiers.push(k=>h(d,k,c)):e.startsWith(_.pd)&&b.responseModifiers.push(k=>_.$m(k))})};Po=function(a,b,c){a.j||(a.w(b),c.tc&&c.tc.reject(b),c.qb&&c.qb.reject(b))};
223
- _.So=function(a,b){a&&b&&(_.Qo.set(a,b),_.Ro.info(`Registered TextDisplayerFactory: '${a}'`))};_.To=function(a,b){b=b.find(c=>(c=_.Qo.get(c))?c.a(a):!1);if(null==b)return _.Ro.warn("Subtitles may not work as expected. No compatible text displayer found for this platform."),null;_.Ro.info(`Chosen the text displayer: ${b}`);return _.Qo.get(b)};
224
- _.Uo=function(a){switch(a){case 0:return 0;case 2:case 4:return 1;case 6:case 5:return 2;case 7:case 8:return 3;case 9:case 10:return 4;case 11:case 1:return 5;case 3:return 6;default:return 0}};_.Vo=function(a,b){if(null==a.a)a.a={timestamp:Date.now()/1E3,state:b,duration:0};else{{const c=Date.now()/1E3;a.a.duration=c-a.a.timestamp;a.a.state!==b&&(a.f.push(a.a),a.a={timestamp:c,state:b,duration:0})}}};
225
- Wo=function(a,b){let c=0;a.a&&a.a.state===b&&(c+=a.a.duration);for(const d of a.f)c+=d.state===b?d.duration:0;return c};Xo=function(a){const b=d=>({timestamp:d.timestamp,state:d.state,duration:d.duration}),c=[];for(const d of a.f)c.push(b(d));a.a&&c.push(b(a.a));return c};Yo=function(a){return a.a.map(b=>_.Yg(b))};
226
- _.Zo=function(){return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,estimatedBandwidth:NaN,loadLatency:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,switchHistory:[],stateHistory:[]}};$o=function(a){if(!a)return null;a=(new _.Dj(a)).a.pathname.toUpperCase();return a.endsWith(".MPD")?_.tc:a.endsWith(".M3U8")?_.km:a.endsWith(".MP4")?_.qg:a.endsWith(".MP3")?"audio/mp3":a.endsWith("MANIFEST")||a.endsWith(".ISM")?_.Bc:null};
227
- _.bp=function(a){let b;um(a)?b=a.source:b=a;Array.isArray(b)||(b=[b]);b=b.filter(c=>typeof c===_.Of||"url"in c);a=[];for(let c=0;c<b.length;c++){const d=ap(b[c]);d&&a.push(d)}return a};
228
- ap=function(a){let b=null;_.dh(a)&&(a={url:a});typeof a===_.Ce&&!Array.isArray(a)&&"url"in a&&(b={url:a.url,type:a.type?a.type:null},_.z(a.drmProtected)||typeof a.drmProtected!==_.Mc||(b.drmProtected=a.drmProtected),_.z(a.isLive)||typeof a.isLive!==_.Mc||(b.isLive=a.isLive),_.z(a.name)||typeof a.name!==_.Of||(b.name=a.name),_.z(a.videoMimeType)||typeof a.videoMimeType!==_.Of||(b.videoMimeType=a.videoMimeType),_.z(a.audioMimeType)||typeof a.audioMimeType!==_.Of||(b.audioMimeType=a.audioMimeType));
229
- b&&!b.type&&(b.type=$o(a.url),b.type?cp.debug("Detect media type "+b.type+" for "+a.url):cp.warn("Unable to detect media type for "+a.url));return b};ep=function(a,b){if(a.w)throw new _.J(_.C,7,7E3);a.a||(a.h.on(b,_.Sd,()=>{{const c=dp(a);if(c)a.onError(c)}}),a.h.on(b,_.wf,()=>{const c=b.videoWidth,d=b.videoHeight,e=a.getTrackManager();e&&0<c&&0<d&&(e.w={width:c,height:d});a.trigger(new _.H(_.Lc,{detail:{width:c,height:d}}))}),a.a=b)};gp=function(a){const b=_.Yh()?fa:void 0;return new _.fp(a,b)};
230
- hp=function(a){return _.v(function*(){if(a.w)return Promise.reject(new _.J(_.C,7,7E3));var b=a.ia[a.getSourceIndex()];if(!a.configuration.drm||!1===b.drmProtected)return a.log.debug("No DRM configuration present.","Skipping DRM engine initialization"),Promise.resolve();b=_.ok(a.configuration.drm);a.log.debug("Drm configuration: ",b);const c=a.getNetworkEngine();a.o=gp({Bb:c,onError:d=>a.onError(d),hf:()=>{},gf:(d,e)=>{a.trigger(new _.H(_.Fd,{expirationTime:e}))},onEvent:d=>{d instanceof _.H?a.dispatchEvent(d):
231
- a.log.debug(_.xb,d.type)},getConfiguration:()=>a.getConfiguration(),Zc:()=>a.Zc()});a.o.f=b;yield _.mo(a.o,[{id:0,language:_.eg,primary:!1,audio:null,video:{id:0,originalId:null,createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:()=>null,getSegmentReference:()=>null,adjustSegmentDurations:()=>{},getDuration:a.getDuration.bind(a),initSegmentReference:null,La:0,mimeType:_.qg,codecs:"",encrypted:!0,keyId:null,language:_.eg,originalLanguage:_.eg,label:null,type:_.t,primary:!1,frameRate:void 0,
232
- Ij:void 0,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,spatialAudio:!1,uj:null,closedCaptions:null},bandwidth:100,drmInfos:[],allowedByApplication:!0,allowedByKeySystem:!0}]);yield _.Do(a.o,a.a)})};ip=function(a,b){nn(a.a,HTMLMediaElement.HAVE_CURRENT_DATA,a.h,()=>{3!==a.getState()&&a.seek(b).catch(c=>{a.log.warn("Error while seeking to start position.",c)})})};
233
- dp=function(a){if(null===a.ia||!a.a.error)return null;const b=a.a.error.code;if(1===b)return null;let c=a.a.error.msExtendedCode;c&&(0>c&&(c+=Math.pow(2,32)),c=c.toString(16));return new _.J(_.C,3,3016,{code:b,Dj:c,message:a.a.error.message})};
234
- kp=function(a){if(a.w)return new _.jp(Promise.reject(new _.J(_.C,7,7E3)),()=>{});const b=a.ia[a.getSourceIndex()],c=a.configuration.startTime||null,d=a.a,e=a.H;c&&ip(a,c);if(d.preload!==_.Be)a.h.one(d,_.le,()=>{const g=Date.now()/1E3-e;a.f.B=g;a.log.debug("Time to load: ",g)});d.src=b.url;(_.Ph()||_.Sh())&&d.load();const f=new _.wk;a.h.one(d,Jf,()=>{const g=a.getConfiguration().manifest.attemptParameters.timeout||30;a.B||(a.B=(new _.Jh(()=>{f.reject(new _.J(_.C,3,3100,{message:`Unable to load media source successfully from ${b.url}`,
235
- uri:b.url},d.error))})).la(g))});nn(d,a.configuration.forceWaitForTracks?HTMLMediaElement.HAVE_CURRENT_DATA:HTMLMediaElement.HAVE_METADATA,a.h,()=>f.resolve());d.error?f.reject(dp(a)):d.preload===_.Be&&(a.log.warn('With \x3cvideo preload\x3d"none"\x3e, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way. Please do not use preload\x3d"none" with PRESTOplay for Web Apps.'),f.resolve());a.h.one(d,_.Sd,()=>{f.reject(dp(a))});return new _.jp(f,
236
- ()=>{const g=new _.J(_.C,7,7001);f.reject(g);return Promise.resolve()})};lp=function(a,b){nn(b,HTMLMediaElement.HAVE_CURRENT_DATA,a.h,()=>{if(a.isLive()&&3!==a.getState()){var c=a.getSeekRange().end,d=a.getPosition();Infinity===c||20>c-d||(a.log.warn("Detected that HLS live stream was not started from close to the live edge. Auto-fixing, seeking to seek range end."+`(position: ${d}, seek range end: ${c})`),a.seek(c).catch(e=>{a.log.warn("Error while seeking to seek range edge.",e)}))}})};
237
- mp=function(a,b){let c=!1;a.h.on(b,_.Df,()=>{c=b.paused});a.h.on(b,_.Cf,()=>{.2>b.duration-b.currentTime&&b.paused&&!c&&(a.log.warn("Player was auto-paused during seek to the end, auto-resuming."),b.play())})};_.pp=function(a){0<=np.indexOf(a)?op.warn(`Factory '${a.name()}' is already registered`):(np.push(a),op.info(`Factory '${a.name()}' has been registered.`))};qp=function(a,b){const c=np.find(d=>d.a(a,b))||null;c&&op.info(`Chosen ads manager: ${c.name()}`);return c};
238
- _.sp=function(a){return _.rp.get(a)||null};_.up=function(a){_.rp.get(a.id())?tp.warn("Component already in use."):_.rp.set(a.id(),a)};vp=function(a){return Array.from(_.rp.values()).find(b=>b instanceof a)||null};wp=function(a){for(const b of _.rp.values())a(b)};xp=function(a){wp(b=>{b.playerConstructed(a)})};yp=function(a){wp(b=>{b.beforeLoad(a)})};_.zp=function(a){wp(b=>{b.drmConfigurationResolved(a)})};Ap=function(a){wp(b=>{b.afterLoad(a)})};
239
- Bp=function(a){if(null!==vp(a))return null;a=new a;a.install();_.up(a);tp.info("Installed component:",a.id());return a};Cp=function(a){if(a=vp(a))a.uninstall(),_.rp.delete(a.id()),tp.info("Uninstalled component:",a.id())};_.Dp=function(a,b){a=document.createElement(a);for(const c in b){const d=b[c];null===d||void 0===d?a.setAttribute(c,""):a.setAttribute(c,d)}return a};_.Ep=function(a,b){a.classList.add(b)};_.Fp=function(a,b){if(a&&typeof b===_.Ce)for(const c in b)a.style[c]=b[c]};_.Gp=function(a){return document.createElement(a)};
240
- Hp=function(a,b){const c=new MutationObserver(()=>{const d=Array.from(a.h.values());mj(Array.from(b.classList),Array.from(d))||b.classList.add(...d)});c.observe(b,{attributes:!0,attributeFilter:["class"]});return c};Ip=function(a,b){a.a&&0!==b.length&&(a.a.classList.add(b),a.h.add(b))};Jp=function(a,b,c){b.hasAttribute(vd)||(b.style.opacity="0",b.setAttribute(vd,""),a.j.one(b,Nd,()=>{b.removeAttribute(vd);b.style.opacity="1";c&&(c.style.opacity="1")}))};
241
- Kp=function(a){if(a.Na){let b=a.player.getDuration();a.maxDuration&&(b=Math.min(b,a.maxDuration));a.Na.h=b}a.Ae&&a.Ae()};Lp=function(a){if(a.sideAdContainer)a=a.sideAdContainer;else if(a=a.Og.getSurface().getContainer(),!a)throw Error("Primary player does not have a container");return a};
242
- Np=function(a,b,c){return Array.from({length:2}).map((d,e)=>{var f=document.createElement(_.t);b.appendChild(f);d=a.ha.nb.create();f=new Mp(f);d.init(f,c);d.setSourceIndex(0);const g=f.getContainer();if(!g)throw Error("Failed to create player surface container element");g.classList.add("secondary");f.getMedia().classList.add(`v-${e}`);a.A.push(g);return d})};Op=function(a){return[a.a,...a.o.a.map(b=>b.player)]};
243
- Pp=function(a,b,c){const d=b.getSurface().getMedia();b=b.getSurface().getUniqueCssClass();d&&(c?(a.g.debug(`Show video element .${b}`),d.classList.add(ed),d.classList.remove("clpp-hide")):(a.g.debug(`Hide video element .${b}`),d.classList.remove(ed),d.classList.add("clpp-hide")),a.F&&a.F(d,c))};Qp=function(a){return a.h.find(b=>!!b.primary)||null};
244
- dq=function(a,b,c){return _.v(function*(){if(a.w)a.g.warn(`Cannot ${c} item while busy (ID: ${b})`);else{var d=Rp(a,b);if(d){a.g.info(`${c} item (ID: ${b})`);a.w=!0;var e=a.f;e&&(e.player.isPaused()||(a.l?e.primary?Sp(a,e,Tp):e.player.pause():a.a.isLive()||e.player.pause()),e.primary?Sp(a,e,Tp):Sp(a,e,Up));var f=a.j.has(b);f&&a.j.delete(b);try{c===_.Re?(e&&d.primary?yield Vp(a,d):f?yield Wp(a,d):yield Xp(a,d),Kp(d)):f?a.g.error("Loading preloaded items is not supported"):yield Yp(a,d);Zp(a,d);d.primary?
245
- Sp(a,d,Up):Sp(a,d,Tp);d.Na&&$p(a,d,d.Na);if(d.Ea)d.player.one(_.Rd,d.Ea);e&&aq(a,e)}catch(g){a.g.error(`Item failed to ${c} (ID: ${b})`,g);if(d.primary)throw g;const h=Qp(a);h&&(a.g.warn("Ad failed, resuming primary item"),yield Vp(a,h))}finally{a.w=!1,bq(a),cq(a,d.next)}}else a.g.warn(`Item not found (ID: ${b})`)}})};
246
- Zp=function(a,b){const c=b.transition;if(c&&!c.Vg){if(c.Ea){const d=c.Ea,e=()=>{a.g.info(`Transition onEnded to (ID: ${d})`);a.play(d)};b.player.one(_.Rd,e);b.disposers.push(()=>{b.player.off(_.Rd,e)})}c.ye&&eq(a,b,()=>{const d=a.f.Na;d&&(b.disposers.forEach(e=>e()),b.disposers=[],a.a.trigger(new _.H(_.lc,{ad:d})),a.a.trigger(new _.H(_.Wb,{ad:d})),a.a.trigger(new _.H(_.Tb,{id:b.Yb})))});c.Vg=!0}};
247
- fq=function(a,b){return _.v(function*(){a.g.info("Crop ads by playout limit",b);var c=Qp(a),d=a.getCurrentItem();if(c&&d&&d.Na&&null!=c.Y){var e=a.h.filter(l=>!l.primary),f=Math.max(...e.map(l=>l.vb));if(b>f)a.g.info("Playout limit is greater than ad pod duration, ignored.");else{var g=d.player.getPosition()+(d.vb-d.duration),h=e.sort((l,m)=>m.vb-l.vb)[0],k=c.Y;b<=g?(c.Y-=f-g,a.g.warn("Playout limit exceeded, immediately returning "+`to primary at ${c.Y.toFixed(1)} instead of `+`${k.toFixed(1)}`),
248
- yield dq(a,c.id,_.Re),h.Ea&&h.Ea(),c=d.Na,a.a.trigger(new _.H(_.lc,{ad:c})),a.a.trigger(new _.H(_.Wb,{ad:c})),a.a.trigger(new _.H(_.Tb,{id:d.Yb}))):(a.g.warn("Limiting playout of ads to",b),(d=e.find(l=>b<=l.vb&&b>=l.vb-l.duration))?(e=b-(d.vb-d.duration),d.Na.h=e,c.Y-=f-b,a.g.info("Last ad is now ",d.Na.hb(),"with cropped duration",e,"and primary will resume at",c.Y.toFixed(1),"instead of",k.toFixed(1)),h.Ea&&(d.Ea=h.Ea),d.transition={ye:{position:e,itemId:c.id,Y:c.Y}},Zp(a,d)):a.g.warn("Cannot find ad hit by limit"))}}})};
249
- gq=function(a){return _.v(function*(){const b=a.f;b&&("loaded"!==b.state&&(yield b.jd),yield b.player.play(),b.state=_.cf,Kp(b))})};hq=function(a,b){a.g.info("Add items",b);a.h=a.h.concat(b.map(c=>Object.assign({},c,{state:"idle",disposers:[],preloadPromise:Promise.resolve(),jd:Promise.resolve()})))};
250
- jq=function(a,b){return _.v(function*(){a.g.info("Remove items",b);const c=[],d=[];for(const e of a.h)b.includes(e.id)?d.push(e):c.push(e);a.h=c;yield Promise.all(d.map(e=>{e.disposers.forEach(f=>f());e.disposers=[];return iq(a,e.id)}))})};kq=function(a){return _.v(function*(){yield jq(a,a.h.map(b=>b.id))})};iq=function(a,b){return _.v(function*(){const c=a.j.get(b);c&&(a.g.info(`Stop preloading item (ID: ${b})`),c.player&&(yield lq(a,c.player)),a.j.delete(b))})};
251
- nq=function(a){const b=Qp(a);b&&(b.transition=void 0,b.next=[],mq(a))};oq=function(a){return _.v(function*(){const b=a.h.filter(c=>!c.primary).map(c=>c.id);nq(a);yield jq(a,b)})};pq=function(a){_.v(function*(){const b=a.getCurrentItem(),c=b.next[0];b&&b.primary&&c&&(nq(a),yield a.play(c))})};mq=function(a){a.f&&(a.f.disposers.forEach(b=>b()),a.f.disposers=[],a.f.transition&&(a.f.transition.Vg=!1),Zp(a,a.f))};Rp=function(a,b){return a.h.find(c=>c.id===b)||null};
252
- Sp=function(a,b,c){const d=b?b.Yb||null:null;a.B?(a.a.setMuted(!0),qq(a,!0)):(b.audio&&(c=b.audio),a.ha.onAudioDecision&&(c=a.ha.onAudioDecision(d)),c===Up?(a.a.setMuted(!1),qq(a,!0)):c===Tp?(a.a.setMuted(!0),qq(a,!1)):a.g.warn("Audio decision not supported",c))};
253
- Vp=function(a,b){return _.v(function*(){if(b.player){a.G();if(b.state===lf){a.g.info("Wait for seek to finish");try{yield b.preloadPromise}catch(c){}}a.ga=!1;b.Y&&(yield b.player.seek(b.Y,!0));a.f=b;b.role=rq;Pp(a,b.player,!0);b.state="loading";a.l?(Sp(a,b,Up),b.player.isPaused()&&(yield b.player.play())):a.a.isPaused()&&(yield b.player.play());b.state=_.cf}})};
254
- Wp=function(a,b){return _.v(function*(){const c=b.player;if(c){if(b.state===lf){a.g.info(Eb);try{yield b.preloadPromise}catch(d){}}a.f=b;b.role=rq;Pp(a,c,!0);b.state===kf?yield c.play():b.state===jf&&(yield sq(a,c,b.config,b.Td));b.state=_.cf}})};Xp=function(a,b){return _.v(function*(){yield Yp(a,b);yield b.player.play();b.state=_.cf})};
255
- Yp=function(a,b){return _.v(function*(){const c=yield tq(a,!!b.primary);a.f=b;b.role=rq;a.f.player=c;a.f.videoEl=c.getSurface().getMedia();Pp(a,c,!0);b.state="loading";b.jd=sq(a,c,b.config,b.Td);yield b.jd;b.state="loaded"})};
256
- $p=function(a,b,c){const d=b.player,e=()=>{const l=d.getPosition(),m=c.getDuration();c.setPosition(l);a.a.trigger(new _.H(_.ec,{ad:c}));!c.j&&l>=m/4&&(c.j=!0,a.a.trigger(new _.H(_.Xb,{ad:c})));!c.l&&l>=m/2&&(c.l=!0,a.a.trigger(new _.H(_.cc,{ad:c})));!c.o&&l>=3*m/4&&(c.o=!0,a.a.trigger(new _.H(_.mc,{ad:c})))},f=()=>{d.isEnded()||a.a.trigger(new _.H(_.dc,{ad:c}))},g=()=>{a.a.trigger(new _.H(_.fc,{ad:c}))},h=()=>{a.a.trigger(new _.H(_.Ub,{ad:c}))},k=()=>{a.a.trigger(new _.H(_.lc,{ad:c}));a.a.trigger(new _.H(_.Wb,
257
- {ad:c}));c.f===c.a&&a.a.trigger(new _.H(_.Tb,{id:b.Yb}))};d.on(_.$f,e);d.on(_.Ne,f);d.on(_.cf,g);d.on(_.Oc,h);d.one(_.Rd,k);b.disposers.push(()=>{d.off(_.$f,e);d.off(_.Ne,f);d.off(_.cf,g);d.off(_.Oc,h);d.off(_.Rd,k)});1===c.f&&a.a.trigger(new _.H(_.Sb,{id:b.Yb}));c.videoEl=d.getSurface().getMedia();a.a.trigger(new _.H(_.ac,{ad:c}));a.a.trigger(new _.H(_.kc,{ad:c}))};
258
- aq=function(a,b){return _.v(function*(){const c=b.player;b.primary?(a.g.info("Pause primary playback"),a.l||Pp(a,c,!1)):(a.g.info(`Stop previous playback (ID: ${b.id})`),b.disposers.forEach(d=>d()),b.disposers=[],b.player=null,b.videoEl=null,b.role=uq,b.tf?(a.g.info(`Release player (ID: ${b.id}) `+`after delay ${b.tf} ms.`),yield new Promise(d=>{setTimeout(()=>_.v(function*(){yield lq(a,c);Pp(a,c,!1);a.a.trigger(new _.H("ad-hls-released"));d()}),b.tf)})):(yield lq(a,c),Pp(a,c,!1)))})};
259
- bq=function(a){Promise.all(Array.from(a.j.keys()).map(b=>iq(a,b)))};cq=function(a,b){_.v(function*(){if(0!==b.length){a.g.info(`Preload items (IDs: ${b})`);var c=a.h.filter(d=>b.includes(d.id))||[];yield Promise.all(c.map(d=>vq(a,d)))}})};wq=function(a,b,c){c=void 0===c?!1:c;if(!a.ga&&!a.a.isLive()){var d=Qp(a);d?(d.Y=b,c&&(a.ga=!0)):a.g.error("Failed to get primary item. Cannot configure resume position.")}};xq=function(a){a.A.forEach(b=>a.C.removeChild(b));a.A=[];Pp(a,a.a,!0)};
260
- eq=function(a,b,c){const d=b.transition.ye;let e=null;d.Y&&wq(a,d.Y);const f=()=>{const k=b.player.getPosition();.5>=d.position-k&&(a.g.info("Start RAF polling"),h(),g())},g=()=>{var k=b.player.getPosition();k>=d.position?(c(),a.g.info(`Transition onPosition to (ID: ${d.itemId}), `+`playback position: ${k.toFixed(3)} s, `+`transition point: ${d.position.toFixed(3)} s. `),a.play(d.itemId),k=!0):k=!1;k?e=null:e=requestAnimationFrame(g)},h=()=>{a.g.info("Stop timeupdate polling");b.player.off(_.$f,f)};
261
- a.g.info("Start timeupdate polling");b.player.on(_.$f,f);b.disposers.push(()=>{null!=e&&(a.g.info("Stop RAF polling"),cancelAnimationFrame(e),e=null)});b.disposers.push(h)};lq=function(a,b){return _.v(function*(){b!==a.a&&(yield a.o.release(b))})};yq=function(a){return _.v(function*(){a.f&&(yield aq(a,a.f),Pp(a,a.a,!0))})};tq=function(a,b){return _.v(function*(){if(b)return a.a;const c=yield a.o.get();if(!c)throw Error("No player available");return c})};
262
- sq=function(a,b,c,d){return _.v(function*(){yield b.release();yield b.load(c);d&&d(b.getDuration());if(a.f&&a.f.player){const e=a.f.player.getVolume();b.setVolume(null==e?1:e);b.setMuted(a.f.player.isMuted()||!1)}})};
263
- vq=function(a,b){return _.v(function*(){if(b.primary){b.state=lf;a.j.set(b.id,b);if(b.Y&&!a.l){var c=b.player;a.g.info("Preparing to resume at",b.Y);Sp(a,b,Tp);yield c.seek(b.Y,!0)}b.state=kf}else{c=b.id;var d=yield tq(a,!1);b.player=d;b.videoEl=d.getSurface().getMedia();b.role=uq;b.state=lf;try{a.j.set(c,b);b.config.autoplay&&(a.g.warn(ma+`Force disabling autoplay (ID: ${c})`),b.config.autoplay=!1);const e=a.a.getBandwidthEstimate();e&&(b.config.abr||(b.config.abr={}),b.config.abr.defaultBandwidthEstimate=
264
- e);b.preloadPromise=sq(a,d,b.config,b.Td);yield b.preloadPromise;b.state=kf}catch(e){7001===e.code?(a.g.info(`Preload aborted (ID: ${c})`),b.state=hf):(a.g.warn(`Preload failed (ID: ${c})`,e),b.state=jf)}}})};qq=function(a,b){a.h.filter(c=>!c.primary&&c.player).forEach(c=>c.player.setMuted(b))};zq=function(a){return a.a.find(b=>1===b.state)||null};Aq=function(a,b){const c=a.f.getPosition();b>=c||a.a.filter(d=>d.od===_.Pj&&!d.once&&d.Dg&&d.startTime>b).forEach(d=>{d.Lf=!0})};
265
- Bq=function(a){return a.a.find(b=>4===b.state)||null};Cq=function(a,b){return a.a.find(c=>Kj(c)&&!c.ji&&c.od===_.Pj&&b>c.startTime&&b<c.endTime)||null};Dq=function(a,b){const c=a.f.getPosition();return a.a.filter(d=>d.od===_.Pj&&!d.ag).sort((d,e)=>e.startTime-d.startTime).find(d=>d.startTime>c&&d.startTime<b)||null};Gq=function(a,b,c){_.v(function*(){a.ga=!0;try{const d=Bq(a);d&&(yield Eq(a,d));a.g.info("Seek into interstitial",b.ea);yield Fq(a,b)}catch(d){yield a.f.seek(c)}finally{a.ga=!1}})};
266
- Hq=function(a,b,c){_.v(function*(){a.ga=!0;try{const d=Bq(a);d&&(yield Eq(a,d));a.g.info("Play jumped interstitial",b.ea,"resume at",c.toFixed(2));yield Fq(a,b,c)}catch(d){a.g.warn("Failed to play jumped interstitial",b.ea,d),b.Jh=new Date,yield a.f.seek(c)}finally{a.ga=!1}})};Eq=function(a,b){return _.v(function*(){a.g.info("Unschedule interstitial",b.ea);yield oq(a.X);b.state=0})};
267
- Pq=function(a,b){const c=()=>_.v(function*(){if(!a.ga&&!a.Me){var g=b.getPosition(),h=Iq(a,g);h&&(yield Jq(a,h))&&Kq(a,h,b);if((h=Lq(a))&&0===h.state&&b.getDuration()-g<a.ha.resolutionOffsetSec&&(yield Jq(a,h)))if(h.pa&&0!==h.pa.length){if(g=a.X.getCurrentItem()){var k=Mq(a,h,_.Mj);if(0!==k.length){var l=k[0].id;g.next=[l];g.transition={Ea:l};a.g.info(`Schedule postroll interstitial ${h.ea}`);Nq(a,h,k)}}}else a.g.warn("Postroll interstitial has no assets, ignoring.")}});b.on(_.$f,c);a.h.push(()=>
268
- {b.off(_.$f,c)});const d=()=>{Oq(a,!1,!0,!0)};b.on(_.Zf,d);a.h.push(()=>{b.off(_.Zf,d)});const e=()=>{a.Me=!0};b.on(_.Sb,e);a.h.push(()=>{b.off(_.Sb,e)});const f=()=>{a.Me=!1};b.on(_.Tb,f);a.h.push(()=>{b.off(_.Tb,f)})};Qq=function(a){a.h.forEach(b=>b());a.h=[]};Rq=function(a){return(a=a.X.getCurrentItem())&&!a.primary?a.player:null};
269
- Oq=function(a,b,c,d){var e=Sq(a);a.g.info("Interstitial cues changed",e);var f=e;if(d){f=rj(a.a.map(p=>p.ea),e.map(p=>p.id));Tq(a,f.Ni);const n=new Set(f.th);f=e.filter(p=>n.has(p.id))}if(!Uq(a,f))return!1;const g=[],h=[],k=[];f.forEach(n=>{const p=n.customAttributes.CUE||[];p.includes(_.bb)?h.push(n):!d&&p.includes("PRE")?g.push(n):!c&&n.startTime<a.ha.Ji?g.push(n):k.push(n)});e=Rj(g,0);f=Rj(h,_.Mj);const l=Rj(k,_.Pj),m=e.concat(f,l);Vq(a,m);0<e.length&&Wq(a,e[0],b);l.forEach(n=>Xq(a,n,_.Pj));0<
270
- f.length&&Xq(a,f[0],_.Mj);Yq(a,m);return 0<e.length};Zq=function(a){_.v(function*(){var b=a.X;hq(b,[{id:nf,primary:!0,config:b.a.getConfiguration(),next:[],vb:0,duration:0,Yb:null}]);var c=Qp(b);if(!c)throw Error("Failed to find primary item");b.f=c;c.role=rq;c.player=b.a;c.videoEl=c.player.getSurface().getMedia();Pp(b,c.player,!0);b=a.f;c=b.getConfiguration();a.j=Oq(a,!c.autoplay,b.isLive(),!1);if(a.j){if(b=a.X,c=b.o,c=c.a[0]?c.a[0].player:null)b.l||Pp(b,b.a,!1),Pp(b,c,!0)}else c.autoplay&&(yield gq(a.X))})};
271
- Fq=function(a,b,c){return _.v(function*(){if(!(yield Jq(a,b)))throw Error("Failed to bind");yield $q(a,b,_.Pj,!1,c)})};Sq=function(a){return a.f.getTimelineCues().filter(b=>_.Hj(b.schemeIdUri)&&b.customAttributes)};Tq=function(a,b){const c=new Set(b);a.a.forEach(d=>{c.has(d.ea)&&!Kj(d)&&a.g.warn("Removing an interstitial in active state",d)});a.a=a.a.filter(d=>!c.has(d.ea))};
272
- Uq=function(a,b){const c=[];b.forEach(d=>{_.Ij(d.customAttributes)||c.push(`Interstitial cue ${d.id} is invalid `+"it must contain exactly one of X-ASSET-LIST or X-ASSET-URI.")});0<c.length&&a.g.error("Invalid interstitials, all interstitials will "+`be skipped. ${c.join(" ")}`);return 0===c.length};
273
- Vq=function(a,b){var c=b.sort((f,g)=>f.startTime-g.startTime);b=a.ha.resolutionOffsetSec;let d=Infinity;const e=[];for(let f=0;f<c.length-1;f++){const g=c[f],h=c[f+1];h&&(d=Math.min(d,h.startTime-g.endTime));h&&h.startTime<=g.endTime&&e.push(`Interstitials ${g.id} and ${h.id} `+"overlap.")}d<b&&(c=d/2,a.ha.resolutionOffsetSec=c,a.g.info("Interstitials are closer than configured "+`resolutionOffsetSec (${b} s) auto-reconfiguring to `+`${c} s.`));0<e.length&&a.g.warn("Unsupported format of interstitials, playback may not "+
274
- `behave correctly. ${e.join(" ")}`)};Wq=function(a,b,c){_.v(function*(){var d=Xq(a,b,0);const e=yield Jq(a,d),f=d.pa?d.pa.length:0;if(e&&0<f)try{a.g.info(`Player preroll interstitial ${d.ea}`),yield $q(a,d,0,c)}catch(g){a.g.error("Preroll interstitial failed.",g),(d=Qp(a.X))&&(yield a.X.play(d.id))}else e?a.g.warn("Preroll interstitial has no assets, skipping"):a.g.error("Preroll interstitial failed, skipping"),yield yq(a.X),c||(yield gq(a.X))})};
275
- Xq=function(a,b,c){{const e=b.customAttributes[_.Mb],f=b.customAttributes[_.Lb],g=b.customAttributes[Nb],h=b.customAttributes[_.Qb],k=b.customAttributes[_.Ob],l=b.customAttributes[_.Pb]||[];b.customAttributes[Rb]||(b.customAttributes[Rb]=null==h||0<h?"RANGE":"POINT");var d=b.customAttributes["X-YOSPACE-AUDIO-PRIORITY"];d="CONTENT"===d?Up:"AD"===d?Tp:void 0;b={ea:b.id,startTime:b.startTime,endTime:b.endTime,state:0,Qf:f,Rf:e,Hd:g,pa:null,Y:null==h?null:Math.max(0,b.startTime+h),Pi:h,oc:k,od:c,ji:"POINT"===
276
- b.customAttributes[Rb],Bh:!l.includes("SKIP"),ag:!l.includes("JUMP"),Xg:Lj(b),Dg:null!=h&&0>h,once:(b.customAttributes.CUE||[]).includes("ONCE"),Wg:!1,Lf:!0,customAttributes:b.customAttributes,audio:d}}a.a.push(b);return b};
277
- Yq=function(a,b){_.v(function*(){const c=a.X.getCurrentItem();if(c)if(c.primary)a.a.forEach(g=>{const h=b.find(k=>k.id===g.ea);if(h){const k=h.customAttributes[_.Ob];null==g.oc&&null!=k&&(a.g.info(Ab,h.id,"Playout limit",k),g.oc=k,g.od===_.Pj&&4===g.state&&ar(a,g))}});else{var d=b.find(g=>g.id===c.Yb);if(d){var e=d.customAttributes[_.Ob];if(null!=e){var f=a.a.find(g=>g.ea===d.id);f&&null==f.oc&&(a.g.info(Ab,d.id,"Playout limit",e),f.oc=e,yield fq(a.X,e))}}}})};
278
- ar=function(a,b){_.v(function*(){yield Eq(a,b);yield Kq(a,b,a.f)})};Jq=function(a,b){return _.v(function*(){b.state=1;if(b.Hd)yield br(a,b,b.Hd);else if(b.Qf)yield cr(a,b,b.Qf);else if(b.Rf){b.pa=[{URI:b.Rf,DURATION:b.endTime-b.startTime}];var c={URI:b.pa[0].URI,DURATION:b.pa[0].DURATION};b.Xg&&(c[Kb]=b.Xg);c={ASSETS:[c]};dr(a,new _.H($b,{id:b.ea,detail:c}));b.state=2}else b.state=3;return 2===b.state})};
279
- $q=function(a,b,c,d,e){return _.v(function*(){if(0!==b.pa.length&&a.X.getCurrentItem()){var f=Mq(a,b,c);0!==f.length&&(Nq(a,b,f),0===c&&a.f.isLive()||(null!=e?wq(a.X,e,!0):null!=b.Y&&wq(a.X,b.Y)),d?yield a.X.load(f[0].id):yield a.X.play(f[0].id))}})};
280
- Kq=function(a,b,c){if(b.pa)if(0===b.pa.length){const g=()=>{c.isLive()?a.g.info("Skipping empty "+`live interstitial ${b.ea}`):null!=b.Y&&0!==b.Pi?c.seek(b.Y):a.g.info(`Empty VOD interstitial ${b.ea}, `+"continuing to next segment")};c.one(_.Xf,g);a.h.push(()=>{c.off(_.Xf,g)});a.g.info(`Schedule interstitial ${b.ea} to `+"be skipped")}else{var d=a.X.getCurrentItem();if(d){var e=Mq(a,b,_.Pj);if(0!==e.length){var f=e[0].id;null!=b.Y&&wq(a.X,b.Y);d.next=[f];d.transition={ye:{position:b.startTime,itemId:f,
281
- Y:b.Y}};a.g.info(`Schedule interstitial ${b.ea} for `+`${b.startTime} s`);Nq(a,b,e)}}}};Iq=function(a,b){return a.a.find(c=>{const d=c.startTime-b;return c.od===_.Pj&&Kj(c)&&0<d&&d<=a.ha.resolutionOffsetSec})||null};Lq=function(a){return a.a.find(b=>b.od===_.Mj)||null};
282
- br=function(a,b,c){return _.v(function*(){try{const d=[],e=c.entries,f=e.map(h=>_.v(function*(){if("list"===h.type)return(yield er(a,h.uc.URI)).ASSETS.map(k=>({id:h.id,customAttributes:h.customAttributes,uc:k}));if("uri"===h.type)return[{id:h.id,customAttributes:h.customAttributes,uc:h.uc}];throw new _.vj("Invalid group asset entry type");}));(yield Promise.all(f)).forEach(h=>d.push(...h));b.Hd={entries:e,pa:d};const g={ASSETS:d.map(h=>h.uc)};fr(a,b,g)}catch(d){a.g.error(`Failed to bind grouped asset list for ${b.ea}`,
283
- d),b.state=3}})};cr=function(a,b,c){return _.v(function*(){try{a.g.info(`Load X-ASSET-LIST for ${b.ea}`);dr(a,new _.H(Yb));const d=yield er(a,c);fr(a,b,d)}catch(d){a.g.error("Failed to load X-ASSET-LIST",d),b.state=3}})};
284
- er=function(a,b){return _.v(function*(){var c=a.X.qe();if(!c)throw Error("No player found");c=c.getNetworkEngine();const d=_.ek(gr(a,b));c=yield bl(c,d);if(null===c)return a.g.warn(`X-ASSET-LIST ${b} returned no content`),{ASSETS:[]};if(!Jj(c))throw new _.vj("Invalid X-ASSET-LIST list response");return c})};
285
- fr=function(a,b,c){b.pa=c.ASSETS;b.pa&&0!==b.pa.length||a.g.info(`Interstitial ${b.ea} has no assets, `+"will be smoothly skipped");if(null==b.Y){const d=Xj(b.pa.map(e=>e.DURATION));b.Y=b.startTime+(null==b.oc?d:Math.min(b.oc,d))}b.state=2;dr(a,new _.H(Zb));dr(a,new _.H($b,{id:b.ea,detail:c}))};dr=function(a,b){a.f.trigger(b)};gr=function(a,b){return(a=a.ha.Ii)?(b=new URL(b),b.searchParams.set("_HLS_primary_id",a),b.toString()):b};
286
- Mq=function(a,b,c){let d=0;const e=!!b.Hd;let f=b.pa.map((l,m)=>{let n=b.ea;e&&(n=b.Hd.pa[m].id);d+=l.DURATION;return{id:`${n}-${m}`,config:{source:{url:gr(a,l.URI),type:_.km}},duration:l.DURATION,vb:d,Yb:n,next:[],Na:new Q(c,m+1,b.pa.length,l.DURATION,n,b.Bh,b.customAttributes||null),audio:b.audio}});Nj(f,c);f.forEach(l=>{l.Ae=()=>{var m=l.Na;a.g.info(`Playing ad ${`${m.f}/${m.a}`} of interstitial `+l.Yb)};l.Td=()=>{dr(a,new _.H(_.bc,{ad:l.Na}))}});if(null!=b.oc&&(f=hr(a,b,f),0===f.length))return[];
287
- const g=f[0].Ae;f[0].Ae=()=>{b.state=5;b.Wg=!0;b.Dg&&(b.Lf=!1);a.g.info(`Playing interstitial ${b.ea} with `+`${b.pa.length} assets and will resume primary `+`content ${b.Y?`at ${b.Y.toFixed(1)} s`:"after interstitial ended"}.`);g()};const h=f[0].Td;f[0].Td=l=>{null==b.Y&&(b.Y=b.startTime+l,wq(a.X,b.Y),a.g.info("Primary content will resume at",b.Y.toFixed(1),"s"));h(l)};const k=f[f.length-1];k.Ea=()=>{b.state=6;jq(a.X,f.map(l=>l.id));c===_.Mj&&yq(a.X)};k.tf=a.ha.adReleaseDelayMs;return f};
288
- Nq=function(a,b,c){hq(a.X,c);a=a.X;mq(a);a.f&&(a.f.Na&&$p(a,a.f,a.f.Na),bq(a),cq(a,a.f.next));b.state=4};
289
- hr=function(a,b,c){const d=b.oc;a.g.info(`Playout limit for ${b.ea} is `+`${d} s`);b=c[c.length-1].vb;if(d>=b)return a.g.info(`Playout limit (${d}) is`+`larger or equal to total duration: (${b}).`),c;if(0>=d)return a.g.info("Discarding all ads."),[];const e=c.filter(f=>f.vb-f.duration<=d);e.forEach(f=>{f.Na.a=e.length});a=e[e.length-1];c=d-(a.vb-a.duration);.1>Math.abs(c-a.duration)?a.transition.Ea=nf:a.transition.ye={position:c,itemId:nf,Y:null};a.maxDuration=c;return e};
290
- ir=function(){try{const a=URL.createObjectURL(new Blob);URL.revokeObjectURL(a);return a.slice(a.lastIndexOf("/")+1)}catch(a){let b=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,c=>{const d=(b+16*Math.random())%16|0;b=Math.floor(b/16);return("x"===c?d:d&3|8).toString(16)})}};
291
- lr=function(a){a.f.on(window,"offline",()=>{jr(a,!1)});a.f.on(window,"online",()=>{a.a||kr(a)});a.f.on(a.m,Jf,()=>{a.a&&kr(a)});a.f.on(a.m,"suspend",()=>{a.a&&kr(a)});a.f.on(a.m,_.zg,()=>{a.a&&kr(a)});a.f.on(a.m,_.cf,()=>{a.a||kr(a)});a.f.on(a.m,_.of,()=>{a.a||kr(a)});a.f.on(a.m,_.bf,b=>{b.detail&&a.a&&kr(a)})};mr=function(a){a.h&&(a.h.stop(),a.h=null)};
292
- nr=function(a){return _.v(function*(){var b=a.m.getConfiguration().connectivityCheck;b&&a.m&&(b=yield hl(a.j,b.url,b.attemptParameters,b.method),jr(a,b))})};kr=function(a){a.m.getConfiguration().connectivityCheck&&(mr(a),a.h=(new _.Jh(()=>nr(a))).la(5))};jr=function(a,b){mr(a);a.a!==b&&(a.a=b,a.m&&a.m.getConfiguration().connectivityCheck&&a.m.trigger(new _.H(Je,{online:a.a})))};pr=function(){or.forEach(a=>a())};_.qr=function(a){or.push(a)};rr=function(a,b){a.onError(b);a.release().then(()=>a.destroy())};
293
- tr=function(a){var b=sr;const c={kty:"RSA",n:b.n,e:b.e},d=a.h+"."+a.f,e=a.j;return new Promise(function(f,g){let h;try{h=window&&window.crypto&&window.crypto.subtle}catch(l){}if(h){var k={name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};h.importKey("jwk",c,k,!1,["verify"]).then(function(l){const m=_.zi(d),n=_.Ok(e);return h.verify(k,l,n.buffer,m.buffer)}).then(function(l){l?f():g(new _.vj("Signature Verification failed",dg))}).catch(g)}else f()})};
294
- vr=function(a){if(!a.a){var b=a.f.split(".");if(3!==b.length)throw Error("Expected to find 3 data sections in JWT raw data");b=new ur(b[0],b[1],b[2]);a.a=b}return a.a};wr=function(a){return _.v(function*(){var b=vr(a);try{yield tr(b)}catch(c){if(c&&c.code===dg)throw c;b=new _.Dj(window.location.href);if(!/(^127\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^192\.168\.)|(^localhost)/.test(b.a.hostname))throw c;}})};
295
- xr=function(a){switch((a.ia[0]||{src:"",type:""}).type){case _.tc:a="dash";break;case _.Bc:a="ss";break;case _.km:a="hls";break;case _.qg:a="mp4";break;default:a=""}return a};yr=function(a){return a.viewerId?a.viewerId:(a=a.drm||null)&&a.customData&&a.customData.userId?`${a.customData.userId}`:""};zr=function(a){return(a=a.drm||null)&&a.customData&&a.customData.assetId?`${a.customData.assetId}`:""};
296
- Ar=function(a){return(a=a.drm||null)&&a.customData&&a.customData.sessionId?`${a.customData.sessionId}`:""};Br=function(a){return(a=(a=a.drmInfo)&&a.licenseServerUri||"")?(new _.Dj(a)).a.hostname:""};Cr=function(a){const b=a.configuration;let c="no";b.drm&&!_.fh(b.drm,{})&&(c="custom",b.drm.env&&b.drm.env.toLowerCase().startsWith(Ld)||Br(a).endsWith("drmtoday.com"))&&(c=Ld);return c};
297
- Dr=function(a){a=a.drmInfo;let b="";if(a)switch(a.keySystem){case _.td:b="wv";break;case _.rd:b="pr";break;case _.pd:b="fps"}return b};Er=function(a){a=a.drmInfo;let b=!1;a&&(b=a.persistentStateRequired);return b.toString()};Fr=function(a){a=a.drmInfo;let b="";if(a)switch(a.videoRobustness){case Ha:case Fa:b="L1";break;case Ga:b="L2";break;case _.nb:case _.mb:b="L3"}return b};
298
- Kr=function(a,b){const c=b.configuration;var d=[...Array.from(_.rp.keys()),...b.Ng];d={"CL-KEY":a.f,"CL-LOCATION":window.location.href,"CL-SDK-VERSION":_.ea,"CL-USER-ID":yr(c),"CL-ASSET-ID":zr(c),"CL-SESSION-ID":Ar(c),"CL-PLAYBACK-TYPE":b.isLive?Gr:Hr,"CL-CONTENT-TYPE":xr(b),"CL-PLUGINS":d.join(" "),"CL-DRM":Cr(b),"CL-DRM-CDM":Dr(b),"CL-DRM-SEC-LEVEL":Fr(b),"CL-DRM-OFFLINE":Er(b),"CL-DRM-IP":Br(b)};Ir&&Ir.companionSdk&&(Ir.companionSdk.name&&(d["CL-COMPANION-SDK"]=Ir.companionSdk.name),Ir.companionSdk.version&&
299
- (d["CL-COMPANION-SDK-VERSION"]=Ir.companionSdk.version));b=_.ek(["https://downloads.castlabs.com/r/register/"]);b.method="GET";b.headers=d;d=new _.Jr;Zk(d,{forceXhr:c.forceXhr});return d.fetch(b).V.catch(e=>{a:{var f=vr(a);e=e.data;var g=e.status;if(f.a&&f.a.ilv)f=Promise.resolve();else{switch(g){case 403:case 404:f=7101;var h="Castlabs Player license is invalid";if(403===g){g=h;h="";try{h=JSON.parse(decodeURIComponent(e.responseText)).message}catch(k){}e=h;e=g+(": "+e)}else e=h+"!";h=e;break;case 412:f=
222
+ Po=function(a,b,c){return _.v(function*(){const d=a.D.getConfiguration();yield yo(a,d);const e=a.keySystem();var f=a.f.Oa[e];const g=(f=f&&f.modifiers)&&f.licenseRequest,h=f&&f.licenseResponse;g?b.requestModifiers.push(k=>g(d,k,c)):e.startsWith(_.pd)&&b.requestModifiers.push(k=>_.$m(k));h?b.responseModifiers.push(k=>h(d,k,c)):e.startsWith(_.pd)&&b.responseModifiers.push(k=>_.an(k))})};Qo=function(a,b,c){a.j||(a.w(b),c.uc&&c.uc.reject(b),c.qb&&c.qb.reject(b))};
223
+ _.To=function(a,b){a&&b&&(_.Ro.set(a,b),_.So.info(`Registered TextDisplayerFactory: '${a}'`))};_.Uo=function(a,b){b=b.find(c=>(c=_.Ro.get(c))?c.a(a):!1);if(null==b)return _.So.warn("Subtitles may not work as expected. No compatible text displayer found for this platform."),null;_.So.info(`Chosen the text displayer: ${b}`);return _.Ro.get(b)};
224
+ _.Vo=function(a){switch(a){case 0:return 0;case 2:case 4:return 1;case 6:case 5:return 2;case 7:case 8:return 3;case 9:case 10:return 4;case 11:case 1:return 5;case 3:return 6;default:return 0}};_.Wo=function(a,b){if(null==a.a)a.a={timestamp:Date.now()/1E3,state:b,duration:0};else{{const c=Date.now()/1E3;a.a.duration=c-a.a.timestamp;a.a.state!==b&&(a.f.push(a.a),a.a={timestamp:c,state:b,duration:0})}}};
225
+ Xo=function(a,b){let c=0;a.a&&a.a.state===b&&(c+=a.a.duration);for(const d of a.f)c+=d.state===b?d.duration:0;return c};Yo=function(a){const b=d=>({timestamp:d.timestamp,state:d.state,duration:d.duration}),c=[];for(const d of a.f)c.push(b(d));a.a&&c.push(b(a.a));return c};Zo=function(a){return a.a.map(b=>_.Yg(b))};
226
+ _.$o=function(){return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,estimatedBandwidth:NaN,loadLatency:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,switchHistory:[],stateHistory:[]}};ap=function(a){if(!a)return null;a=(new _.Ej(a)).a.pathname.toUpperCase();return a.endsWith(".MPD")?_.tc:a.endsWith(".M3U8")?_.lm:a.endsWith(".MP4")?_.qg:a.endsWith(".MP3")?"audio/mp3":a.endsWith("MANIFEST")||a.endsWith(".ISM")?_.Bc:null};
227
+ _.cp=function(a){let b;vm(a)?b=a.source:b=a;Array.isArray(b)||(b=[b]);b=b.filter(c=>typeof c===_.Of||"url"in c);a=[];for(let c=0;c<b.length;c++){const d=bp(b[c]);d&&a.push(d)}return a};
228
+ bp=function(a){let b=null;_.dh(a)&&(a={url:a});typeof a===_.Ce&&!Array.isArray(a)&&"url"in a&&(b={url:a.url,type:a.type?a.type:null},_.z(a.drmProtected)||typeof a.drmProtected!==_.Mc||(b.drmProtected=a.drmProtected),_.z(a.isLive)||typeof a.isLive!==_.Mc||(b.isLive=a.isLive),_.z(a.name)||typeof a.name!==_.Of||(b.name=a.name),_.z(a.videoMimeType)||typeof a.videoMimeType!==_.Of||(b.videoMimeType=a.videoMimeType),_.z(a.audioMimeType)||typeof a.audioMimeType!==_.Of||(b.audioMimeType=a.audioMimeType));
229
+ b&&!b.type&&(b.type=ap(a.url),b.type?dp.debug("Detect media type "+b.type+" for "+a.url):dp.warn("Unable to detect media type for "+a.url));return b};fp=function(a,b){if(a.w)throw new _.J(_.C,7,7E3);a.a||(a.h.on(b,_.Sd,()=>{{const c=ep(a);if(c)a.onError(c)}}),a.h.on(b,_.wf,()=>{const c=b.videoWidth,d=b.videoHeight,e=a.getTrackManager();e&&0<c&&0<d&&(e.w={width:c,height:d});a.trigger(new _.H(_.Lc,{detail:{width:c,height:d}}))}),a.a=b)};hp=function(a){const b=_.Zh()?fa:void 0;return new _.gp(a,b)};
230
+ ip=function(a){return _.v(function*(){if(a.w)return Promise.reject(new _.J(_.C,7,7E3));var b=a.ia[a.getSourceIndex()];if(!a.configuration.drm||!1===b.drmProtected)return a.log.debug("No DRM configuration present.","Skipping DRM engine initialization"),Promise.resolve();b=_.pk(a.configuration.drm);a.log.debug("Drm configuration: ",b);const c=a.getNetworkEngine();a.o=hp({Cb:c,onError:d=>a.onError(d),hf:()=>{},gf:(d,e)=>{a.trigger(new _.H(_.Fd,{expirationTime:e}))},onEvent:d=>{d instanceof _.H?a.dispatchEvent(d):
231
+ a.log.debug(_.xb,d.type)},getConfiguration:()=>a.getConfiguration(),Zc:()=>a.Zc()});a.o.f=b;yield _.no(a.o,[{id:0,language:_.eg,primary:!1,audio:null,video:{id:0,originalId:null,createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:()=>null,getSegmentReference:()=>null,adjustSegmentDurations:()=>{},getDuration:a.getDuration.bind(a),initSegmentReference:null,Na:0,mimeType:_.qg,codecs:"",encrypted:!0,keyId:null,language:_.eg,originalLanguage:_.eg,label:null,type:_.t,primary:!1,frameRate:void 0,
232
+ Ij:void 0,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,spatialAudio:!1,uj:null,closedCaptions:null},bandwidth:100,drmInfos:[],allowedByApplication:!0,allowedByKeySystem:!0}]);yield _.Eo(a.o,a.a)})};jp=function(a,b){on(a.a,HTMLMediaElement.HAVE_CURRENT_DATA,a.h,()=>{3!==a.getState()&&a.seek(b).catch(c=>{a.log.warn("Error while seeking to start position.",c)})})};
233
+ ep=function(a){if(null===a.ia||!a.a.error)return null;const b=a.a.error.code;if(1===b)return null;let c=a.a.error.msExtendedCode;c&&(0>c&&(c+=Math.pow(2,32)),c=c.toString(16));return new _.J(_.C,3,3016,{code:b,Dj:c,message:a.a.error.message})};
234
+ lp=function(a){if(a.w)return new _.kp(Promise.reject(new _.J(_.C,7,7E3)),()=>{});const b=a.ia[a.getSourceIndex()],c=a.configuration.startTime||null,d=a.a,e=a.H;c&&jp(a,c);if(d.preload!==_.Be)a.h.one(d,_.le,()=>{const g=Date.now()/1E3-e;a.f.B=g;a.log.debug("Time to load: ",g)});d.src=b.url;(_.Qh()||_.Th())&&d.load();const f=new _.xk;a.h.one(d,Jf,()=>{const g=a.getConfiguration().manifest.attemptParameters.timeout||30;a.B||(a.B=(new _.Kh(()=>{f.reject(new _.J(_.C,3,3100,{message:`Unable to load media source successfully from ${b.url}`,
235
+ uri:b.url},d.error))})).la(g))});on(d,a.configuration.forceWaitForTracks?HTMLMediaElement.HAVE_CURRENT_DATA:HTMLMediaElement.HAVE_METADATA,a.h,()=>f.resolve());d.error?f.reject(ep(a)):d.preload===_.Be&&(a.log.warn('With \x3cvideo preload\x3d"none"\x3e, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way. Please do not use preload\x3d"none" with PRESTOplay for Web Apps.'),f.resolve());a.h.one(d,_.Sd,()=>{f.reject(ep(a))});return new _.kp(f,
236
+ ()=>{const g=new _.J(_.C,7,7001);f.reject(g);return Promise.resolve()})};mp=function(a,b){on(b,HTMLMediaElement.HAVE_CURRENT_DATA,a.h,()=>{if(a.isLive()&&3!==a.getState()){var c=a.getSeekRange().end,d=a.getPosition();Infinity===c||20>c-d||(a.log.warn("Detected that HLS live stream was not started from close to the live edge. Auto-fixing, seeking to seek range end."+`(position: ${d}, seek range end: ${c})`),a.seek(c).catch(e=>{a.log.warn("Error while seeking to seek range edge.",e)}))}})};
237
+ np=function(a,b){let c=!1;a.h.on(b,_.Df,()=>{c=b.paused});a.h.on(b,_.Cf,()=>{.2>b.duration-b.currentTime&&b.paused&&!c&&(a.log.warn("Player was auto-paused during seek to the end, auto-resuming."),b.play())})};_.qp=function(a){0<=op.indexOf(a)?pp.warn(`Factory '${a.name()}' is already registered`):(op.push(a),pp.info(`Factory '${a.name()}' has been registered.`))};rp=function(a,b){const c=op.find(d=>d.a(a,b))||null;c&&pp.info(`Chosen ads manager: ${c.name()}`);return c};
238
+ _.tp=function(a){return _.sp.get(a)||null};_.vp=function(a){_.sp.get(a.id())?up.warn("Component already in use."):_.sp.set(a.id(),a)};wp=function(a){return Array.from(_.sp.values()).find(b=>b instanceof a)||null};xp=function(a){for(const b of _.sp.values())a(b)};yp=function(a){xp(b=>{b.playerConstructed(a)})};zp=function(a){xp(b=>{b.beforeLoad(a)})};_.Ap=function(a){xp(b=>{b.drmConfigurationResolved(a)})};Bp=function(a){xp(b=>{b.afterLoad(a)})};
239
+ Cp=function(a){if(null!==wp(a))return null;a=new a;a.install();_.vp(a);up.info("Installed component:",a.id());return a};Dp=function(a){if(a=wp(a))a.uninstall(),_.sp.delete(a.id()),up.info("Uninstalled component:",a.id())};_.Ep=function(a,b){a=document.createElement(a);for(const c in b){const d=b[c];null===d||void 0===d?a.setAttribute(c,""):a.setAttribute(c,d)}return a};_.Fp=function(a,b){a.classList.add(b)};_.Gp=function(a,b){if(a&&typeof b===_.Ce)for(const c in b)a.style[c]=b[c]};_.Hp=function(a){return document.createElement(a)};
240
+ Ip=function(a,b){const c=new MutationObserver(()=>{const d=Array.from(a.h.values());nj(Array.from(b.classList),Array.from(d))||b.classList.add(...d)});c.observe(b,{attributes:!0,attributeFilter:["class"]});return c};Jp=function(a,b){a.a&&0!==b.length&&(a.a.classList.add(b),a.h.add(b))};Kp=function(a,b,c){b.hasAttribute(vd)||(b.style.opacity="0",b.setAttribute(vd,""),a.j.one(b,Nd,()=>{b.removeAttribute(vd);b.style.opacity="1";c&&(c.style.opacity="1")}))};
241
+ Lp=function(a){if(a.Pa){let b=a.player.getDuration();a.maxDuration&&(b=Math.min(b,a.maxDuration));a.Pa.h=b}a.Ae&&a.Ae()};Mp=function(a){if(a.sideAdContainer)a=a.sideAdContainer;else if(a=a.Og.getSurface().getContainer(),!a)throw Error("Primary player does not have a container");return a};
242
+ Op=function(a,b,c){return Array.from({length:2}).map((d,e)=>{var f=document.createElement(_.t);b.appendChild(f);d=a.ha.ob.create();f=new Np(f);d.init(f,c);d.setSourceIndex(0);const g=f.getContainer();if(!g)throw Error("Failed to create player surface container element");g.classList.add("secondary");f.getMedia().classList.add(`v-${e}`);a.A.push(g);return d})};Pp=function(a){return[a.a,...a.o.a.map(b=>b.player)]};
243
+ Qp=function(a,b,c){const d=b.getSurface().getMedia();b=b.getSurface().getUniqueCssClass();d&&(c?(a.g.debug(`Show video element .${b}`),d.classList.add(ed),d.classList.remove("clpp-hide")):(a.g.debug(`Hide video element .${b}`),d.classList.remove(ed),d.classList.add("clpp-hide")),a.F&&a.F(d,c))};Rp=function(a){return a.h.find(b=>!!b.primary)||null};
244
+ eq=function(a,b,c){return _.v(function*(){if(a.w)a.g.warn(`Cannot ${c} item while busy (ID: ${b})`);else{var d=Sp(a,b);if(d){a.g.info(`${c} item (ID: ${b})`);a.w=!0;var e=a.f;e&&(e.player.isPaused()||(a.l?e.primary?Tp(a,e,Up):e.player.pause():a.a.isLive()||e.player.pause()),e.primary?Tp(a,e,Up):Tp(a,e,Vp));var f=a.j.has(b);f&&a.j.delete(b);try{c===_.Re?(e&&d.primary?yield Wp(a,d):f?yield Xp(a,d):yield Yp(a,d),Lp(d)):f?a.g.error("Loading preloaded items is not supported"):yield Zp(a,d);$p(a,d);d.primary?
245
+ Tp(a,d,Vp):Tp(a,d,Up);d.Pa&&aq(a,d,d.Pa);if(d.Fa)d.player.one(_.Rd,d.Fa);e&&bq(a,e)}catch(g){a.g.error(`Item failed to ${c} (ID: ${b})`,g);if(d.primary)throw g;const h=Rp(a);h&&(a.g.warn("Ad failed, resuming primary item"),yield Wp(a,h))}finally{a.w=!1,cq(a),dq(a,d.next)}}else a.g.warn(`Item not found (ID: ${b})`)}})};
246
+ $p=function(a,b){const c=b.transition;if(c&&!c.Vg){if(c.Fa){const d=c.Fa,e=()=>{a.g.info(`Transition onEnded to (ID: ${d})`);a.play(d)};b.player.one(_.Rd,e);b.disposers.push(()=>{b.player.off(_.Rd,e)})}c.ye&&fq(a,b,()=>{const d=a.f.Pa;d&&(b.disposers.forEach(e=>e()),b.disposers=[],a.a.trigger(new _.H(_.lc,{ad:d})),a.a.trigger(new _.H(_.Wb,{ad:d})),a.a.trigger(new _.H(_.Tb,{id:b.Zb})))});c.Vg=!0}};
247
+ gq=function(a,b){return _.v(function*(){a.g.info("Crop ads by playout limit",b);var c=Rp(a),d=a.getCurrentItem();if(c&&d&&d.Pa&&null!=c.Y){var e=a.h.filter(l=>!l.primary),f=Math.max(...e.map(l=>l.vb));if(b>f)a.g.info("Playout limit is greater than ad pod duration, ignored.");else{var g=d.player.getPosition()+(d.vb-d.duration),h=e.sort((l,m)=>m.vb-l.vb)[0],k=c.Y;b<=g?(c.Y-=f-g,a.g.warn("Playout limit exceeded, immediately returning "+`to primary at ${c.Y.toFixed(1)} instead of `+`${k.toFixed(1)}`),
248
+ yield eq(a,c.id,_.Re),h.Fa&&h.Fa(),c=d.Pa,a.a.trigger(new _.H(_.lc,{ad:c})),a.a.trigger(new _.H(_.Wb,{ad:c})),a.a.trigger(new _.H(_.Tb,{id:d.Zb}))):(a.g.warn("Limiting playout of ads to",b),(d=e.find(l=>b<=l.vb&&b>=l.vb-l.duration))?(e=b-(d.vb-d.duration),d.Pa.h=e,c.Y-=f-b,a.g.info("Last ad is now ",d.Pa.ib(),"with cropped duration",e,"and primary will resume at",c.Y.toFixed(1),"instead of",k.toFixed(1)),h.Fa&&(d.Fa=h.Fa),d.transition={ye:{position:e,itemId:c.id,Y:c.Y}},$p(a,d)):a.g.warn("Cannot find ad hit by limit"))}}})};
249
+ hq=function(a){return _.v(function*(){const b=a.f;b&&("loaded"!==b.state&&(yield b.jd),yield b.player.play(),b.state=_.cf,Lp(b))})};iq=function(a,b){a.g.info("Add items",b);a.h=a.h.concat(b.map(c=>Object.assign({},c,{state:"idle",disposers:[],preloadPromise:Promise.resolve(),jd:Promise.resolve()})))};
250
+ kq=function(a,b){return _.v(function*(){a.g.info("Remove items",b);const c=[],d=[];for(const e of a.h)b.includes(e.id)?d.push(e):c.push(e);a.h=c;yield Promise.all(d.map(e=>{e.disposers.forEach(f=>f());e.disposers=[];return jq(a,e.id)}))})};lq=function(a){return _.v(function*(){yield kq(a,a.h.map(b=>b.id))})};jq=function(a,b){return _.v(function*(){const c=a.j.get(b);c&&(a.g.info(`Stop preloading item (ID: ${b})`),c.player&&(yield mq(a,c.player)),a.j.delete(b))})};
251
+ oq=function(a){const b=Rp(a);b&&(b.transition=void 0,b.next=[],nq(a))};pq=function(a){return _.v(function*(){const b=a.h.filter(c=>!c.primary).map(c=>c.id);oq(a);yield kq(a,b)})};qq=function(a){_.v(function*(){const b=a.getCurrentItem(),c=b.next[0];b&&b.primary&&c&&(oq(a),yield a.play(c))})};nq=function(a){a.f&&(a.f.disposers.forEach(b=>b()),a.f.disposers=[],a.f.transition&&(a.f.transition.Vg=!1),$p(a,a.f))};Sp=function(a,b){return a.h.find(c=>c.id===b)||null};
252
+ Tp=function(a,b,c){const d=b?b.Zb||null:null;a.B?(a.a.setMuted(!0),rq(a,!0)):(b.audio&&(c=b.audio),a.ha.onAudioDecision&&(c=a.ha.onAudioDecision(d)),c===Vp?(a.a.setMuted(!1),rq(a,!0)):c===Up?(a.a.setMuted(!0),rq(a,!1)):a.g.warn("Audio decision not supported",c))};
253
+ Wp=function(a,b){return _.v(function*(){if(b.player){a.G();if(b.state===lf){a.g.info("Wait for seek to finish");try{yield b.preloadPromise}catch(c){}}a.ga=!1;b.Y&&(yield b.player.seek(b.Y,!0));a.f=b;b.role=sq;Qp(a,b.player,!0);b.state="loading";a.l?(Tp(a,b,Vp),b.player.isPaused()&&(yield b.player.play())):a.a.isPaused()&&(yield b.player.play());b.state=_.cf}})};
254
+ Xp=function(a,b){return _.v(function*(){const c=b.player;if(c){if(b.state===lf){a.g.info(Eb);try{yield b.preloadPromise}catch(d){}}a.f=b;b.role=sq;Qp(a,c,!0);b.state===kf?yield c.play():b.state===jf&&(yield tq(a,c,b.config,b.Td));b.state=_.cf}})};Yp=function(a,b){return _.v(function*(){yield Zp(a,b);yield b.player.play();b.state=_.cf})};
255
+ Zp=function(a,b){return _.v(function*(){const c=yield uq(a,!!b.primary);a.f=b;b.role=sq;a.f.player=c;a.f.videoEl=c.getSurface().getMedia();Qp(a,c,!0);b.state="loading";b.jd=tq(a,c,b.config,b.Td);yield b.jd;b.state="loaded"})};
256
+ aq=function(a,b,c){const d=b.player,e=()=>{const l=d.getPosition(),m=c.getDuration();c.setPosition(l);a.a.trigger(new _.H(_.ec,{ad:c}));!c.j&&l>=m/4&&(c.j=!0,a.a.trigger(new _.H(_.Xb,{ad:c})));!c.l&&l>=m/2&&(c.l=!0,a.a.trigger(new _.H(_.cc,{ad:c})));!c.o&&l>=3*m/4&&(c.o=!0,a.a.trigger(new _.H(_.mc,{ad:c})))},f=()=>{d.isEnded()||a.a.trigger(new _.H(_.dc,{ad:c}))},g=()=>{a.a.trigger(new _.H(_.fc,{ad:c}))},h=()=>{a.a.trigger(new _.H(_.Ub,{ad:c}))},k=()=>{a.a.trigger(new _.H(_.lc,{ad:c}));a.a.trigger(new _.H(_.Wb,
257
+ {ad:c}));c.f===c.a&&a.a.trigger(new _.H(_.Tb,{id:b.Zb}))};d.on(_.$f,e);d.on(_.Ne,f);d.on(_.cf,g);d.on(_.Oc,h);d.one(_.Rd,k);b.disposers.push(()=>{d.off(_.$f,e);d.off(_.Ne,f);d.off(_.cf,g);d.off(_.Oc,h);d.off(_.Rd,k)});1===c.f&&a.a.trigger(new _.H(_.Sb,{id:b.Zb}));c.videoEl=d.getSurface().getMedia();a.a.trigger(new _.H(_.ac,{ad:c}));a.a.trigger(new _.H(_.jc,{ad:c}))};
258
+ bq=function(a,b){return _.v(function*(){const c=b.player;b.primary?(a.g.info("Pause primary playback"),a.l||Qp(a,c,!1)):(a.g.info(`Stop previous playback (ID: ${b.id})`),b.disposers.forEach(d=>d()),b.disposers=[],b.player=null,b.videoEl=null,b.role=vq,b.tf?(a.g.info(`Release player (ID: ${b.id}) `+`after delay ${b.tf} ms.`),yield new Promise(d=>{setTimeout(()=>_.v(function*(){yield mq(a,c);Qp(a,c,!1);a.a.trigger(new _.H("ad-hls-released"));d()}),b.tf)})):(yield mq(a,c),Qp(a,c,!1)))})};
259
+ cq=function(a){Promise.all(Array.from(a.j.keys()).map(b=>jq(a,b)))};dq=function(a,b){_.v(function*(){if(0!==b.length){a.g.info(`Preload items (IDs: ${b})`);var c=a.h.filter(d=>b.includes(d.id))||[];yield Promise.all(c.map(d=>wq(a,d)))}})};xq=function(a,b,c){c=void 0===c?!1:c;if(!a.ga&&!a.a.isLive()){var d=Rp(a);d?(d.Y=b,c&&(a.ga=!0)):a.g.error("Failed to get primary item. Cannot configure resume position.")}};yq=function(a){a.A.forEach(b=>a.C.removeChild(b));a.A=[];Qp(a,a.a,!0)};
260
+ fq=function(a,b,c){const d=b.transition.ye;let e=null;d.Y&&xq(a,d.Y);const f=()=>{const k=b.player.getPosition();.5>=d.position-k&&(a.g.info("Start RAF polling"),h(),g())},g=()=>{var k=b.player.getPosition();k>=d.position?(c(),a.g.info(`Transition onPosition to (ID: ${d.itemId}), `+`playback position: ${k.toFixed(3)} s, `+`transition point: ${d.position.toFixed(3)} s. `),a.play(d.itemId),k=!0):k=!1;k?e=null:e=requestAnimationFrame(g)},h=()=>{a.g.info("Stop timeupdate polling");b.player.off(_.$f,f)};
261
+ a.g.info("Start timeupdate polling");b.player.on(_.$f,f);b.disposers.push(()=>{null!=e&&(a.g.info("Stop RAF polling"),cancelAnimationFrame(e),e=null)});b.disposers.push(h)};mq=function(a,b){return _.v(function*(){b!==a.a&&(yield a.o.release(b))})};zq=function(a){return _.v(function*(){a.f&&(yield bq(a,a.f),Qp(a,a.a,!0))})};uq=function(a,b){return _.v(function*(){if(b)return a.a;const c=yield a.o.get();if(!c)throw Error("No player available");return c})};
262
+ tq=function(a,b,c,d){return _.v(function*(){yield b.release();yield b.load(c);d&&d(b.getDuration());if(a.f&&a.f.player){const e=a.f.player.getVolume();b.setVolume(null==e?1:e);b.setMuted(a.f.player.isMuted()||!1)}})};
263
+ wq=function(a,b){return _.v(function*(){if(b.primary){b.state=lf;a.j.set(b.id,b);if(b.Y&&!a.l){var c=b.player;a.g.info("Preparing to resume at",b.Y);Tp(a,b,Up);yield c.seek(b.Y,!0)}b.state=kf}else{c=b.id;var d=yield uq(a,!1);b.player=d;b.videoEl=d.getSurface().getMedia();b.role=vq;b.state=lf;try{a.j.set(c,b);b.config.autoplay&&(a.g.warn(ma+`Force disabling autoplay (ID: ${c})`),b.config.autoplay=!1);const e=a.a.getBandwidthEstimate();e&&(b.config.abr||(b.config.abr={}),b.config.abr.defaultBandwidthEstimate=
264
+ e);b.preloadPromise=tq(a,d,b.config,b.Td);yield b.preloadPromise;b.state=kf}catch(e){7001===e.code?(a.g.info(`Preload aborted (ID: ${c})`),b.state=hf):(a.g.warn(`Preload failed (ID: ${c})`,e),b.state=jf)}}})};rq=function(a,b){a.h.filter(c=>!c.primary&&c.player).forEach(c=>c.player.setMuted(b))};Aq=function(a){return a.a.find(b=>1===b.state)||null};Bq=function(a,b){const c=a.f.getPosition();b>=c||a.a.filter(d=>d.od===_.Qj&&!d.once&&d.Dg&&d.startTime>b).forEach(d=>{d.Lf=!0})};
265
+ Cq=function(a){return a.a.find(b=>4===b.state)||null};Dq=function(a,b){return a.a.find(c=>Lj(c)&&!c.ji&&c.od===_.Qj&&b>c.startTime&&b<c.endTime)||null};Eq=function(a,b){const c=a.f.getPosition();return a.a.filter(d=>d.od===_.Qj&&!d.ag).sort((d,e)=>e.startTime-d.startTime).find(d=>d.startTime>c&&d.startTime<b)||null};Hq=function(a,b,c){_.v(function*(){a.ga=!0;try{const d=Cq(a);d&&(yield Fq(a,d));a.g.info("Seek into interstitial",b.ea);yield Gq(a,b)}catch(d){yield a.f.seek(c)}finally{a.ga=!1}})};
266
+ Iq=function(a,b,c){_.v(function*(){a.ga=!0;try{const d=Cq(a);d&&(yield Fq(a,d));a.g.info("Play jumped interstitial",b.ea,"resume at",c.toFixed(2));yield Gq(a,b,c)}catch(d){a.g.warn("Failed to play jumped interstitial",b.ea,d),b.Jh=new Date,yield a.f.seek(c)}finally{a.ga=!1}})};Fq=function(a,b){return _.v(function*(){a.g.info("Unschedule interstitial",b.ea);yield pq(a.X);b.state=0})};
267
+ Qq=function(a,b){const c=()=>_.v(function*(){if(!a.ga&&!a.Me){var g=b.getPosition(),h=Jq(a,g);h&&(yield Kq(a,h))&&Lq(a,h,b);if((h=Mq(a))&&0===h.state&&b.getDuration()-g<a.ha.resolutionOffsetSec&&(yield Kq(a,h)))if(h.pa&&0!==h.pa.length){if(g=a.X.getCurrentItem()){var k=Nq(a,h,_.Nj);if(0!==k.length){var l=k[0].id;g.next=[l];g.transition={Fa:l};a.g.info(`Schedule postroll interstitial ${h.ea}`);Oq(a,h,k)}}}else a.g.warn("Postroll interstitial has no assets, ignoring.")}});b.on(_.$f,c);a.h.push(()=>
268
+ {b.off(_.$f,c)});const d=()=>{Pq(a,!1,!0,!0)};b.on(_.Zf,d);a.h.push(()=>{b.off(_.Zf,d)});const e=()=>{a.Me=!0};b.on(_.Sb,e);a.h.push(()=>{b.off(_.Sb,e)});const f=()=>{a.Me=!1};b.on(_.Tb,f);a.h.push(()=>{b.off(_.Tb,f)})};Rq=function(a){a.h.forEach(b=>b());a.h=[]};Sq=function(a){return(a=a.X.getCurrentItem())&&!a.primary?a.player:null};
269
+ Pq=function(a,b,c,d){var e=Tq(a);a.g.info("Interstitial cues changed",e);var f=e;if(d){f=sj(a.a.map(p=>p.ea),e.map(p=>p.id));Uq(a,f.Ni);const n=new Set(f.th);f=e.filter(p=>n.has(p.id))}if(!Vq(a,f))return!1;const g=[],h=[],k=[];f.forEach(n=>{const p=n.customAttributes.CUE||[];p.includes(_.bb)?h.push(n):!d&&p.includes("PRE")?g.push(n):!c&&n.startTime<a.ha.Ji?g.push(n):k.push(n)});e=Sj(g,0);f=Sj(h,_.Nj);const l=Sj(k,_.Qj),m=e.concat(f,l);Wq(a,m);0<e.length&&Xq(a,e[0],b);l.forEach(n=>Yq(a,n,_.Qj));0<
270
+ f.length&&Yq(a,f[0],_.Nj);Zq(a,m);return 0<e.length};$q=function(a){_.v(function*(){var b=a.X;iq(b,[{id:nf,primary:!0,config:b.a.getConfiguration(),next:[],vb:0,duration:0,Zb:null}]);var c=Rp(b);if(!c)throw Error("Failed to find primary item");b.f=c;c.role=sq;c.player=b.a;c.videoEl=c.player.getSurface().getMedia();Qp(b,c.player,!0);b=a.f;c=b.getConfiguration();a.j=Pq(a,!c.autoplay,b.isLive(),!1);if(a.j){if(b=a.X,c=b.o,c=c.a[0]?c.a[0].player:null)b.l||Qp(b,b.a,!1),Qp(b,c,!0)}else c.autoplay&&(yield hq(a.X))})};
271
+ Gq=function(a,b,c){return _.v(function*(){if(!(yield Kq(a,b)))throw Error("Failed to bind");yield ar(a,b,_.Qj,!1,c)})};Tq=function(a){return a.f.getTimelineCues().filter(b=>_.Ij(b.schemeIdUri)&&b.customAttributes)};Uq=function(a,b){const c=new Set(b);a.a.forEach(d=>{c.has(d.ea)&&!Lj(d)&&a.g.warn("Removing an interstitial in active state",d)});a.a=a.a.filter(d=>!c.has(d.ea))};
272
+ Vq=function(a,b){const c=[];b.forEach(d=>{_.Jj(d.customAttributes)||c.push(`Interstitial cue ${d.id} is invalid `+"it must contain exactly one of X-ASSET-LIST or X-ASSET-URI.")});0<c.length&&a.g.error("Invalid interstitials, all interstitials will "+`be skipped. ${c.join(" ")}`);return 0===c.length};
273
+ Wq=function(a,b){var c=b.sort((f,g)=>f.startTime-g.startTime);b=a.ha.resolutionOffsetSec;let d=Infinity;const e=[];for(let f=0;f<c.length-1;f++){const g=c[f],h=c[f+1];h&&(d=Math.min(d,h.startTime-g.endTime));h&&h.startTime<=g.endTime&&e.push(`Interstitials ${g.id} and ${h.id} `+"overlap.")}d<b&&(c=d/2,a.ha.resolutionOffsetSec=c,a.g.info("Interstitials are closer than configured "+`resolutionOffsetSec (${b} s) auto-reconfiguring to `+`${c} s.`));0<e.length&&a.g.warn("Unsupported format of interstitials, playback may not "+
274
+ `behave correctly. ${e.join(" ")}`)};Xq=function(a,b,c){_.v(function*(){var d=Yq(a,b,0);const e=yield Kq(a,d),f=d.pa?d.pa.length:0;if(e&&0<f)try{a.g.info(`Player preroll interstitial ${d.ea}`),yield ar(a,d,0,c)}catch(g){a.g.error("Preroll interstitial failed.",g),(d=Rp(a.X))&&(yield a.X.play(d.id))}else e?a.g.warn("Preroll interstitial has no assets, skipping"):a.g.error("Preroll interstitial failed, skipping"),yield zq(a.X),c||(yield hq(a.X))})};
275
+ Yq=function(a,b,c){{const e=b.customAttributes[_.Mb],f=b.customAttributes[_.Lb],g=b.customAttributes[Nb],h=b.customAttributes[_.Qb],k=b.customAttributes[_.Ob],l=b.customAttributes[_.Pb]||[];b.customAttributes[Rb]||(b.customAttributes[Rb]=null==h||0<h?"RANGE":"POINT");var d=b.customAttributes["X-YOSPACE-AUDIO-PRIORITY"];d="CONTENT"===d?Vp:"AD"===d?Up:void 0;b={ea:b.id,startTime:b.startTime,endTime:b.endTime,state:0,Qf:f,Rf:e,Hd:g,pa:null,Y:null==h?null:Math.max(0,b.startTime+h),Pi:h,pc:k,od:c,ji:"POINT"===
276
+ b.customAttributes[Rb],Bh:!l.includes("SKIP"),ag:!l.includes("JUMP"),Xg:Mj(b),Dg:null!=h&&0>h,once:(b.customAttributes.CUE||[]).includes("ONCE"),Wg:!1,Lf:!0,customAttributes:b.customAttributes,audio:d}}a.a.push(b);return b};
277
+ Zq=function(a,b){_.v(function*(){const c=a.X.getCurrentItem();if(c)if(c.primary)a.a.forEach(g=>{const h=b.find(k=>k.id===g.ea);if(h){const k=h.customAttributes[_.Ob];null==g.pc&&null!=k&&(a.g.info(Ab,h.id,"Playout limit",k),g.pc=k,g.od===_.Qj&&4===g.state&&br(a,g))}});else{var d=b.find(g=>g.id===c.Zb);if(d){var e=d.customAttributes[_.Ob];if(null!=e){var f=a.a.find(g=>g.ea===d.id);f&&null==f.pc&&(a.g.info(Ab,d.id,"Playout limit",e),f.pc=e,yield gq(a.X,e))}}}})};
278
+ br=function(a,b){_.v(function*(){yield Fq(a,b);yield Lq(a,b,a.f)})};Kq=function(a,b){return _.v(function*(){b.state=1;if(b.Hd)yield cr(a,b,b.Hd);else if(b.Qf)yield dr(a,b,b.Qf);else if(b.Rf){b.pa=[{URI:b.Rf,DURATION:b.endTime-b.startTime}];var c={URI:b.pa[0].URI,DURATION:b.pa[0].DURATION};b.Xg&&(c[Kb]=b.Xg);c={ASSETS:[c]};er(a,new _.H($b,{id:b.ea,detail:c}));b.state=2}else b.state=3;return 2===b.state})};
279
+ ar=function(a,b,c,d,e){return _.v(function*(){if(0!==b.pa.length&&a.X.getCurrentItem()){var f=Nq(a,b,c);0!==f.length&&(Oq(a,b,f),0===c&&a.f.isLive()||(null!=e?xq(a.X,e,!0):null!=b.Y&&xq(a.X,b.Y)),d?yield a.X.load(f[0].id):yield a.X.play(f[0].id))}})};
280
+ Lq=function(a,b,c){if(b.pa)if(0===b.pa.length){const g=()=>{c.isLive()?a.g.info("Skipping empty "+`live interstitial ${b.ea}`):null!=b.Y&&0!==b.Pi?c.seek(b.Y):a.g.info(`Empty VOD interstitial ${b.ea}, `+"continuing to next segment")};c.one(_.Xf,g);a.h.push(()=>{c.off(_.Xf,g)});a.g.info(`Schedule interstitial ${b.ea} to `+"be skipped")}else{var d=a.X.getCurrentItem();if(d){var e=Nq(a,b,_.Qj);if(0!==e.length){var f=e[0].id;null!=b.Y&&xq(a.X,b.Y);d.next=[f];d.transition={ye:{position:b.startTime,itemId:f,
281
+ Y:b.Y}};a.g.info(`Schedule interstitial ${b.ea} for `+`${b.startTime} s`);Oq(a,b,e)}}}};Jq=function(a,b){return a.a.find(c=>{const d=c.startTime-b;return c.od===_.Qj&&Lj(c)&&0<d&&d<=a.ha.resolutionOffsetSec})||null};Mq=function(a){return a.a.find(b=>b.od===_.Nj)||null};
282
+ cr=function(a,b,c){return _.v(function*(){try{const d=[],e=c.entries,f=e.map(h=>_.v(function*(){if("list"===h.type)return(yield fr(a,h.vc.URI)).ASSETS.map(k=>({id:h.id,customAttributes:h.customAttributes,vc:k}));if("uri"===h.type)return[{id:h.id,customAttributes:h.customAttributes,vc:h.vc}];throw new _.wj("Invalid group asset entry type");}));(yield Promise.all(f)).forEach(h=>d.push(...h));b.Hd={entries:e,pa:d};const g={ASSETS:d.map(h=>h.vc)};gr(a,b,g)}catch(d){a.g.error(`Failed to bind grouped asset list for ${b.ea}`,
283
+ d),b.state=3}})};dr=function(a,b,c){return _.v(function*(){try{a.g.info(`Load X-ASSET-LIST for ${b.ea}`);er(a,new _.H(Yb));const d=yield fr(a,c);gr(a,b,d)}catch(d){a.g.error("Failed to load X-ASSET-LIST",d),b.state=3}})};
284
+ fr=function(a,b){return _.v(function*(){var c=a.X.qe();if(!c)throw Error("No player found");c=c.getNetworkEngine();const d=_.fk(hr(a,b));c=yield dl(c,d);if(null===c)return a.g.warn(`X-ASSET-LIST ${b} returned no content`),{ASSETS:[]};if(!Kj(c))throw new _.wj("Invalid X-ASSET-LIST list response");return c})};
285
+ gr=function(a,b,c){b.pa=c.ASSETS;b.pa&&0!==b.pa.length||a.g.info(`Interstitial ${b.ea} has no assets, `+"will be smoothly skipped");if(null==b.Y){const d=Yj(b.pa.map(e=>e.DURATION));b.Y=b.startTime+(null==b.pc?d:Math.min(b.pc,d))}b.state=2;er(a,new _.H(Zb));er(a,new _.H($b,{id:b.ea,detail:c}))};er=function(a,b){a.f.trigger(b)};hr=function(a,b){return(a=a.ha.Ii)?(b=new URL(b),b.searchParams.set("_HLS_primary_id",a),b.toString()):b};
286
+ Nq=function(a,b,c){let d=0;const e=!!b.Hd;let f=b.pa.map((l,m)=>{let n=b.ea;e&&(n=b.Hd.pa[m].id);d+=l.DURATION;return{id:`${n}-${m}`,config:{source:{url:hr(a,l.URI),type:_.lm}},duration:l.DURATION,vb:d,Zb:n,next:[],Pa:new Q(c,m+1,b.pa.length,l.DURATION,n,b.Bh,b.customAttributes||null),audio:b.audio}});Oj(f,c);f.forEach(l=>{l.Ae=()=>{var m=l.Pa;a.g.info(`Playing ad ${`${m.f}/${m.a}`} of interstitial `+l.Zb)};l.Td=()=>{er(a,new _.H(_.bc,{ad:l.Pa}))}});if(null!=b.pc&&(f=ir(a,b,f),0===f.length))return[];
287
+ const g=f[0].Ae;f[0].Ae=()=>{b.state=5;b.Wg=!0;b.Dg&&(b.Lf=!1);a.g.info(`Playing interstitial ${b.ea} with `+`${b.pa.length} assets and will resume primary `+`content ${b.Y?`at ${b.Y.toFixed(1)} s`:"after interstitial ended"}.`);g()};const h=f[0].Td;f[0].Td=l=>{null==b.Y&&(b.Y=b.startTime+l,xq(a.X,b.Y),a.g.info("Primary content will resume at",b.Y.toFixed(1),"s"));h(l)};const k=f[f.length-1];k.Fa=()=>{b.state=6;kq(a.X,f.map(l=>l.id));c===_.Nj&&zq(a.X)};k.tf=a.ha.adReleaseDelayMs;return f};
288
+ Oq=function(a,b,c){iq(a.X,c);a=a.X;nq(a);a.f&&(a.f.Pa&&aq(a,a.f,a.f.Pa),cq(a),dq(a,a.f.next));b.state=4};
289
+ ir=function(a,b,c){const d=b.pc;a.g.info(`Playout limit for ${b.ea} is `+`${d} s`);b=c[c.length-1].vb;if(d>=b)return a.g.info(`Playout limit (${d}) is`+`larger or equal to total duration: (${b}).`),c;if(0>=d)return a.g.info("Discarding all ads."),[];const e=c.filter(f=>f.vb-f.duration<=d);e.forEach(f=>{f.Pa.a=e.length});a=e[e.length-1];c=d-(a.vb-a.duration);.1>Math.abs(c-a.duration)?a.transition.Fa=nf:a.transition.ye={position:c,itemId:nf,Y:null};a.maxDuration=c;return e};
290
+ jr=function(){try{const a=URL.createObjectURL(new Blob);URL.revokeObjectURL(a);return a.slice(a.lastIndexOf("/")+1)}catch(a){let b=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,c=>{const d=(b+16*Math.random())%16|0;b=Math.floor(b/16);return("x"===c?d:d&3|8).toString(16)})}};
291
+ mr=function(a){a.f.on(window,"offline",()=>{kr(a,!1)});a.f.on(window,"online",()=>{a.a||lr(a)});a.f.on(a.m,Jf,()=>{a.a&&lr(a)});a.f.on(a.m,"suspend",()=>{a.a&&lr(a)});a.f.on(a.m,_.zg,()=>{a.a&&lr(a)});a.f.on(a.m,_.cf,()=>{a.a||lr(a)});a.f.on(a.m,_.of,()=>{a.a||lr(a)});a.f.on(a.m,_.bf,b=>{b.detail&&a.a&&lr(a)})};nr=function(a){a.h&&(a.h.stop(),a.h=null)};
292
+ or=function(a){return _.v(function*(){var b=a.m.getConfiguration().connectivityCheck;b&&a.m&&(b=yield il(a.j,b.url,b.attemptParameters,b.method),kr(a,b))})};lr=function(a){a.m.getConfiguration().connectivityCheck&&(nr(a),a.h=(new _.Kh(()=>or(a))).la(5))};kr=function(a,b){nr(a);a.a!==b&&(a.a=b,a.m&&a.m.getConfiguration().connectivityCheck&&a.m.trigger(new _.H(Je,{online:a.a})))};qr=function(){pr.forEach(a=>a())};_.rr=function(a){pr.push(a)};sr=function(a,b){a.onError(b);a.release().then(()=>a.destroy())};
293
+ ur=function(a){var b=tr;const c={kty:"RSA",n:b.n,e:b.e},d=a.h+"."+a.f,e=a.j;return new Promise(function(f,g){let h;try{h=window&&window.crypto&&window.crypto.subtle}catch(l){}if(h){var k={name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};h.importKey("jwk",c,k,!1,["verify"]).then(function(l){const m=_.Ai(d),n=_.Pk(e);return h.verify(k,l,n.buffer,m.buffer)}).then(function(l){l?f():g(new _.wj("Signature Verification failed",dg))}).catch(g)}else f()})};
294
+ wr=function(a){if(!a.a){var b=a.f.split(".");if(3!==b.length)throw Error("Expected to find 3 data sections in JWT raw data");b=new vr(b[0],b[1],b[2]);a.a=b}return a.a};xr=function(a){return _.v(function*(){var b=wr(a);try{yield ur(b)}catch(c){if(c&&c.code===dg)throw c;b=new _.Ej(window.location.href);if(!/(^127\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^192\.168\.)|(^localhost)/.test(b.a.hostname))throw c;}})};
295
+ yr=function(a){switch((a.ia[0]||{src:"",type:""}).type){case _.tc:a="dash";break;case _.Bc:a="ss";break;case _.lm:a="hls";break;case _.qg:a="mp4";break;default:a=""}return a};zr=function(a){return a.viewerId?a.viewerId:(a=a.drm||null)&&a.customData&&a.customData.userId?`${a.customData.userId}`:""};Ar=function(a){return(a=a.drm||null)&&a.customData&&a.customData.assetId?`${a.customData.assetId}`:""};
296
+ Br=function(a){return(a=a.drm||null)&&a.customData&&a.customData.sessionId?`${a.customData.sessionId}`:""};Cr=function(a){return(a=(a=a.drmInfo)&&a.licenseServerUri||"")?(new _.Ej(a)).a.hostname:""};Dr=function(a){const b=a.configuration;let c="no";b.drm&&!_.fh(b.drm,{})&&(c="custom",b.drm.env&&b.drm.env.toLowerCase().startsWith(Ld)||Cr(a).endsWith("drmtoday.com"))&&(c=Ld);return c};
297
+ Er=function(a){a=a.drmInfo;let b="";if(a)switch(a.keySystem){case _.td:b="wv";break;case _.rd:b="pr";break;case _.pd:b="fps"}return b};Fr=function(a){a=a.drmInfo;let b=!1;a&&(b=a.persistentStateRequired);return b.toString()};Gr=function(a){a=a.drmInfo;let b="";if(a)switch(a.videoRobustness){case Ha:case Fa:b="L1";break;case Ga:b="L2";break;case _.nb:case _.mb:b="L3"}return b};
298
+ Lr=function(a,b){const c=b.configuration;var d=[...Array.from(_.sp.keys()),...b.Ng];d={"CL-KEY":a.f,"CL-LOCATION":window.location.href,"CL-SDK-VERSION":_.ea,"CL-USER-ID":zr(c),"CL-ASSET-ID":Ar(c),"CL-SESSION-ID":Br(c),"CL-PLAYBACK-TYPE":b.isLive?Hr:Ir,"CL-CONTENT-TYPE":yr(b),"CL-PLUGINS":d.join(" "),"CL-DRM":Dr(b),"CL-DRM-CDM":Er(b),"CL-DRM-SEC-LEVEL":Gr(b),"CL-DRM-OFFLINE":Fr(b),"CL-DRM-IP":Cr(b)};Jr&&Jr.companionSdk&&(Jr.companionSdk.name&&(d["CL-COMPANION-SDK"]=Jr.companionSdk.name),Jr.companionSdk.version&&
299
+ (d["CL-COMPANION-SDK-VERSION"]=Jr.companionSdk.version));b=_.fk(["https://downloads.castlabs.com/r/register/"]);b.method="GET";b.headers=d;d=new _.Kr;$k(d,{forceXhr:c.forceXhr});return d.fetch(b).V.catch(e=>{a:{var f=wr(a);e=e.data;var g=e.status;if(f.a&&f.a.ilv)f=Promise.resolve();else{switch(g){case 403:case 404:f=7101;var h="Castlabs Player license is invalid";if(403===g){g=h;h="";try{h=JSON.parse(decodeURIComponent(e.responseText)).message}catch(k){}e=h;e=g+(": "+e)}else e=h+"!";h=e;break;case 412:f=
300
300
  7103;h="License requires a viewer ID. It should be supplied either via the `viewerId` config or in case of DRMtoday via the `drm.customData.userID` config.";break;default:f=Promise.resolve();break a}a.g.error(La+h);f=Promise.reject(new _.J(_.C,7,f,h))}}return f})};
301
- Or=function(a){try{const b=a.split(",").map(c=>{const d={};c=c.split(";");for(let e=0;e<c.length;e++){const {key:f,value:g}=Lr(c[e]);Object.keys(Mr).includes(f)&&(d[Mr[f]]=g)}return d}).filter(c=>_.$g(c));return 0<b.length?b:null}catch(b){return Nr.error("CmsdManager parseCmsdDynamicHeader_ failed:",b),null}};
302
- Lr=function(a){var b=a.split("\x3d");const c=b[0];b=b[1];if(!c)throw new _.vj("Parsing CMSD, missing parameter or wrong format");if(c&&!b)return{key:c,value:!0};const d=b[0];if('"'===d&&'"'===b[b.length-1])return{key:c,value:b.replaceAll(/(^")|("$)/g,"")};if(/^[-0-9]/.test(d))return{key:c,value:parseInt(b,10)};if(/^[a-zA-Z*]/.test(d))return{key:c,value:b};throw new _.vj(`Parsing CMSD, not recognized value type of ${a}`);};
303
- Qr=function(a){return b=>{{var c=b.headers;let e=b=null;var d=jh(c,"cmsd-dynamic");c=jh(c,"cmsd-static");d&&(b=Or(d),a.a=b);if(c)try{d={};const f=c.split(",");for(c=0;c<f.length;c++){const {key:g,value:h}=Lr(f[c]);Object.keys(Pr).includes(g)&&(d[Pr[g]]=h)}e=_.$g(d)?d:null}catch(f){Nr.error("CmsdManager parseCmsdStaticHeader_ failed:",f),e=null}(b||e)&&a.m.trigger(new _.H("cmsd-event",{Cj:b,Pj:e}))}}};_.Sr=function(a){a&&(0<=Rr.indexOf(a)||Rr.push(a))};
304
- Vr=function(a){if(!a.h&&a.B&&a.a&&a.f.ads.hls.enable&&a.getTimelineCues().some(b=>_.Hj(b.schemeIdUri))){const b=new Tr;b.A(a.a,a.B,a.f.mse.sendPlaybackSessionIdHeader?a.G:null);Ur(a,b,a.f)}};Xr=function(a,b){a.J=new Wr(b);wr(a.J).catch(c=>{setTimeout(()=>{a.g.error(La+c);a.trigger(new _.H(_.Sd,{detail:new _.J(_.C,7,7101)}));a.destroy()},1E3)})};
305
- _.Yr=function(a,b,c){c=void 0===c?null:c;null!=b&&b===a.a?a.a.forwardEventsTo(a):(a.a&&(a.a.stopForwardingEventsTo(a),a.a.destroy(),a.a=null,a.B=null),b&&(b.init(a.j,a.F),b.setNetworkEngine(a.getNetworkEngine()),b.forwardEventsTo(a),a.a=b,a.B=c))};
306
- Zr=function(a,b){_.v(function*(){a.j.getMedia()||a.j.getCastElement();a.J||(a.J=new Wr(a.f.license));try{a.g.debug("Verifying license remotely"),yield Kr(a.J,b),a.g.debug("License verified remotely")}catch(c){a.g.debug("License rejected by remote",c),setTimeout(rr,1E3,{release:a.release.bind(a),destroy:a.destroy.bind(a),onError:a.onError.bind(a)},c)}})};_.$r=function(a,b,...c){const d=a.W.map(e=>e[b].call(e,a,...c)).filter(e=>e instanceof Promise);return Promise.all(d)};
307
- as=function(a){return _.v(function*(){if(a.H)a.g.debug("The player is already released. No-op");else if(a.Z.off(document,_.ug),a.trigger(new _.H(_.tf)),a.j&&a.j.release(),a.h&&(yield a.h.o(),a.h=null),a.C&&(yield a.C.release(),a.C=null),a.a){var b=null,c=a.a.on(_.bf,d=>{b=d});try{yield _.$r(a,_.He),a.a.stopForwardingEventsTo(a),yield Promise.all([a.a.release(),a.A.release()]),a.g.debug("Releasing player completed"),b&&(a.g.debug("Re-post player state change event after release"),a.trigger(b)),a.trigger(new _.H(sf)),
308
- a.H=!0}finally{a.a.off(_.bf,c)}}else a.trigger(new _.H(sf)),a.H=!0})};bs=function(a){a.G&&(a.g.info("Playback session ended, ID:",a.G),a.G=null,a.a&&a.a.setPlaybackSessionId(null))};cs=function(a,b){const c=wh(d=>d.f(_.ab)&&a.every(e=>2===d.canPlay(e,b)));if(!c)throw new _.J(_.C,7,7003,"No compatible player implementing playlist mode found!");return{nb:c,player:c.create(),sourceIndex:0}};
309
- es=function(a,b,c){if(a.P===_.ab)b=cs(b,c);else if(2!==(a.a?a.a.canPlay(b[0],c):0)||a.S){a.S=!1;if(b){var d=a=null;for(var e=0;e<b.length;e++);e=Object.values(_.th);for(let f=0;f<b.length;f++)for(let g=0;g<e.length;g++){const h={nb:e[g],confidence:e[g].canPlay(b[f],c)};if(null===a||a.confidence<h.confidence)a=h,d=f}a&&typeof d===_.r&&0<a.confidence?(_.uh.debug("Player Factory '"+a.nb.a()+"' can play",b[d]),b=new ds(a.nb,d)):(_.uh.debug("No compatible Player Factory found for sources:",b),b=null)}else b=
310
- null;if(!b)throw new _.J(_.C,7,7003,"No player factory compatible with given sources found!");c=b.nb;a=c.create();b={nb:c,player:a,sourceIndex:b.sourceIndex}}else b={nb:a.B,player:a.a,sourceIndex:0};return b};
311
- _.js=function(a,b,c){return _.v(function*(){if(a.R)throw new _.J(_.C,7,7E3,"Player is already destroyed.");if(!a.j)throw new _.J(_.C,7,7E3,"No surface associated with this player!");_.Mn(Xe);yield a.release();var d=c||_.bp(b);if(!b||0===d.length)throw new _.J(_.C,7,7003,Va);a.ca=d;a.f=_.tm([a.F,b,{source:d}]);Zk(a.A,a.f);a.H=!1;d=es(a,d,a.f);_.Yr(a,d.player,d.nb);fs(a,a.a);a.a&&a.a.setSourceIndex(d.sourceIndex);gs(a);a.a&&a.a.setCdnErrorCallback(a.M);_.hs(a,a.f);is(a);if(a.f.pauseWhenInBackground)a.Z.on(document,
312
- _.ug,()=>{document.hidden?(a.g.debug("Player is hidden: pausing..."),a.pause()):(a.g.debug("Player is visible: resuming..."),a.play())});_.zp(a.f.drm);yp(a);yield _.$r(a,"onContentWillLoad",a.f.source[d.sourceIndex]);_.Mn(We);_.On("player.beforeLoad",Xe,We)})};_.ks=function(a){return _.v(function*(){a.j.getMedia()||a.j.getCastElement();a.trigger(new _.H(me));yield Promise.all([a.a.load(a.f),a.h?a.h.load():Promise.resolve()])})};
313
- _.ms=function(a){return _.v(function*(){_.Mn(Te);Zr(a,{configuration:a.getConfiguration(),ia:a.sg(),drmInfo:a.getDrmInfo(),Ng:Object.keys(a.L),isLive:a.isLive()});ls(a);Ap(a);yield _.$r(a,_.Ee);a.f.autoplay&&(a.h?a.h.w():1)&&(yield a.play());_.Mn(Se);_.On("player.afterLoad",Te,Se)})};ns=function(a){return _.v(function*(){if(a.a){var b=a.a;b.ah?(a.trigger(new _.H(me)),yield b.ah(),yield _.ms(a)):a.g.warn(gb)}else a.g.warn(db)})};
314
- fs=function(a,b){try{var c=crypto.randomUUID()}catch(d){c=ir()}a.g.info("Playback session started, ID:",c);b.setPlaybackSessionId(c);a.G=c};gs=function(a){a.a&&a.a.setDrmCustomDataModifier(b=>_.v(function*(){a.Ze&&a.Wc&&(yield a.Wc(b))}))};_.hs=function(a,b){b=b||a.f;var c=qp(a,b);c&&(c=c.create(a),Ur(a,c,b))};is=function(a){a.f.cmsd.enabled&&(a.C=new os(a),a.a.setCmsdManager(a.C))};
315
- ps=function(a){const b=_.kj(a.f.preferredTextLanguage).filter(f=>f),c=a.f.preferForcedSubtitles,d=a.getTrackManager().sa().filter(f=>c?f.kind===_.Ud:f.kind!==_.Ud);if(0===d.length)c&&a.g.warn("Forced subtitles are configured to be preferred, but no forced subtitles are available.");else{if(c&&0===b.length){var e=a.getTrackManager().ra();e&&e.language?(e=_.Tj(e.language||""),b.push(e)):(e=a.getTrackManager().Ia())&&e.language&&(e=_.Tj(e.language||""),b.push(e));0===b.length&&a.g.warn("Forced subtitles are configured to be preferred, but neither the preferred text language is set, nor the audio or video track language is available to determine which forced subtitles language to select.")}b.some(f=>
316
- {const g=_.Tj(f);if(f=d.find(h=>{h=_.Tj(h.language||"");return _.Uj(h,g)}))return a.getTrackManager().ab(f),!0;c&&a.g.warn("Forced subtitles are configured to be preferred, but no forced subtitles match the preferred languages: ",b);return!1})}};ls=function(a){_.v(function*(){const b=[];if(a.f.remoteTextTracks)for(const c of a.f.remoteTextTracks)b.push(a.getTrackManager().addTextTrack(c));yield Promise.all(b);ps(a)})};Ur=function(a,b,c){a.h=b;b.h(null==c.volume?1:c.volume);b.setMuted(c.muted||!1)};
317
- qs=function(a){a.K.forEach(b=>b());a.K=[]};ts=function(a,b){return _.v(function*(){try{_.Mn(af);a.P=_.ab;const c=b.slice(1).map(d=>({config:d,ia:_.bp(d)}));yield _.js(a,b[0]);c.forEach(d=>{rs(a,d.config,d.ia)});a.trigger(new _.H(me));yield a.a.setupPlaylist(b);yield _.ms(a);c.forEach(d=>{ss(a,d.config,d.ia)});_.Mn($e);_.On("player.setupPlaylist",af,$e)}catch(c){if(a.l)throw a.g.info(Ma),new _.J(_.C,7,7E3);throw c;}})};
318
- us=function(a,b){const c=d=>{a.I=a.o.findIndex(e=>e.id===d.id)};a.addEventListener(_.zf,c);a.K.push(()=>{a.removeEventListener(_.zf,c)});if(b.endTime){const d=b.endTime,e=()=>{a.getPosition()>=d&&(a.removeEventListener(_.$f,e),a.g.info("Playlist end time reached. Stopping playback."),a.trigger(new _.H(_.yf)),a.pause())};a.addEventListener(_.$f,e);a.K.push(()=>{a.removeEventListener(_.$f,e)})}};
319
- vs=function(a,b){return _.v(function*(){try{_.Mn(Ve);const c=_.bp(b);rs(a,b,c);yield a.a.appendLoad(b);ss(a,b,c);_.Mn(Ue);_.On("player.appendLoad",Ve,Ue)}catch(c){if(a.l)throw a.g.info(Ma),new _.J(_.C,7,7E3,{id:b.id});throw c;}})};
320
- rs=function(a,b,c){if(0===c.length)throw new _.J(_.C,7,7003,{message:Va,id:b.id});if(1<c.length)throw new _.J(_.C,7,7003,{message:"Multiple sources not supported!",id:b.id,source:c});if(2!==(a.a?a.a.canPlay(c[0],a.f):0))throw new _.J(_.C,7,7003,{message:"Source not supported by the current player!",id:b.id,source:c[0]});};ss=function(a,b,c){Zr(a,{configuration:b,ia:c,drmInfo:a.getDrmInfo(),Ng:Object.keys(a.L),isLive:c[0].isLive})};
321
- ws=function(a,b){const c=document.getElementById(a);if(!c)throw Error("Anchor element not found");c.classList.add(dd);return Array.from({length:3}).map(()=>{const d=document.createElement(_.t);d.classList.add("clpp-mc-playlist-video-el");const e=document.createElement(_.Ad);e.classList.add("clpp-mc-playlist-item");e.appendChild(d);c.appendChild(e);return new _.R(d,b)})};
322
- xs=function(a,b,c){const d=b.getSurface().getMedia();b=b.getSurface().getUniqueCssClass();d&&(c?(a.g.info(`Show video element .${b}`),d.classList.add(ed)):(a.g.info(`Hide video element .${b}`),d.classList.remove(ed)),a.w&&a.w(d,c))};As=function(a,b){return _.v(function*(){const c=yield a.o.get();a.f=b;b.role=ys;a.f.player=c;a.f.videoEl=c.getSurface().getMedia();xs(a,c,!0);yield c.open(b.config);zs(a,b);b.config.autoplay||(yield c.play())})};
323
- Hs=function(a){_.v(function*(){if(0===a.a)yield Bs(a);else if(a.a===a.h.length-1)yield Fs(a);else{const b=[a.a-1,a.a+1];a.g.info(`Preload items (indices: ${b})`);yield Promise.all(b.map(c=>Gs(a,c)))}})};
324
- Is=function(a,b){return _.v(function*(){if(b.player){if(b.state===lf){a.g.info(Eb);try{yield b.preloadPromise}catch(c){}}a.f=b;b.role=ys;xs(a,b.player,!0);b.state===kf?(_.Mn(gf),a.ha.preloadMedia?yield b.player.play():yield ns(b.player),_.Mn(ff),_.On("playlist.next",gf,ff)):b.state===jf&&(yield b.player.open(b.config));zs(a,b);b.config.autoplay||(yield b.player.play())}})};
325
- Ls=function(a,b){return _.v(function*(){a.g.info(`Stop current playback (index: ${b.index})`);b.player.pause();xs(a,b.player,!1);yield Js(a,b);b.player=null;b.videoEl=null;b.role=Ks})};Ns=function(a){return Promise.all(Array.from(a.l.keys()).map(b=>Ms(a,b)))};Os=function(a){return _.v(function*(){yield a.o.destroy();const b=document.getElementById(a.ha.anchorId);b&&(b.classList.remove(dd),b.innerHTML="")})};
326
- Ms=function(a,b){return _.v(function*(){const c=a.l.get(b);c&&(a.g.info(`Stop preloading item (index: ${b})`),c.player&&(yield Js(a,c)),a.l.delete(b))})};Js=function(a,b){return _.v(function*(){b.disposers.forEach(c=>c());b.disposers=[];b.player&&(yield a.o.release(b.player))})};zs=function(a,b){if(a.ha.autoplayNext){const c=()=>{a.g.info("Automatically transition to next item");a.Lg()};b.player.on(_.Rd,c);const d=b.player;b.disposers.push(()=>{d.off(_.Rd,c)})}};
327
- Gs=function(a,b){return _.v(function*(){const c=yield a.o.get(),d=a.h[b];d.player=c;d.videoEl=c.getSurface().getMedia();d.role=Ks;d.state=lf;a.trigger(new _.H(gg));try{a.l.set(b,d),a.ha.preloadMedia?(d.config.autoplay&&(a.g.warn(ma+`Force disabling autoplay (index: ${b})`),d.config.autoplay=!1),d.preloadPromise=c.open(d.config)):d.preloadPromise=c.preload(d.config),yield d.preloadPromise,d.state=kf,a.trigger(new _.H(gg))}catch(e){7001===e.code?(a.g.info(`Preload aborted (index: ${b})`),d.state=hf):
328
- (a.g.warn(`Preload failed (index: ${b})`,e),a.trigger(new _.H(_.Sd,{detail:e})),d.state=jf),a.trigger(new _.H(gg))}})};Bs=function(a){return _.v(function*(){const b=a.a+1;a.g.info(`Preload following item (index: ${b})`);yield Gs(a,b)})};Fs=function(a){return _.v(function*(){const b=a.a-1;a.g.info(`Preload preceding item (index: ${b})`);yield Gs(a,b)})};
329
- _.Qs=function(a){if(Ps.has(a))return Ps.get(a);if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported(a);Ps.set(a,b);return b}return window.MediaSource?(b=MediaSource.isTypeSupported(a),Ps.set(a,b),b):!1};Rs=function(a,b){b=b.replace(/mp2t/i,"mp4");a===_.q&&(b=b.replace(_.t,_.q));if(a=/avc1\.(66|77|100)\.(\d+)/.exec(b)){let d="avc1.";var c=a[1];d="66"===c?d+"4200":"77"===c?d+"4d00":d+"6400";c=Number(a[2]);d+=(c>>4).toString(16);d+=(c&15).toString(16);b=b.replace(a[0],d)}return b};
330
- _.Ss=function(a,b){return void 0===a?b:null===a?null:typeof a===_.Of?_.kn(a):a};
331
- _.nk=function(a,b){const c={};var d=b?b.widevineVideoRobustness:void 0,e=b?b.widevineAudioRobustness:void 0;const f=b?b.serverCertificate:void 0;let g=a.h[_.td];g&&(c[_.td]={licenseUrl:a.f(_.td,g,b),videoRobustness:xj(d,g.videoRobustness),audioRobustness:xj(e,g.audioRobustness),modifiers:g.modifiers,distinctiveIdentifierRequired:wj(b?b.widevineDistinctiveIdentifierRequired:void 0,g.distinctiveIdentifierRequired,!1),persistentStateRequired:wj(b?b.widevinePersistentStateRequired:void 0,g.persistentStateRequired,
332
- !1),serverCertificate:_.Ss(f,g.serverCertificate)});(g=a.h[_.pd])&&(c[_.pd]={licenseUrl:a.f(_.pd,g,b),certificateUrl:a.G(g,b),modifiers:g.modifiers});d=b?b.playReadyVideoRobustness:void 0;e=b?b.playReadyAudioRobustness:void 0;(g=a.h[_.rd])&&(c[_.rd]={licenseUrl:a.f(_.rd,g,b),videoRobustness:d||g.videoRobustness,audioRobustness:e||g.audioRobustness,individualizationServer:g.individualizationServer,useLegacySystem:g.useLegacySystem,modifiers:g.modifiers});return c};
333
- Ws=function(a,b){b=an(b);switch(a){case _.td:return b+Ts;case _.rd:return b+Us;case _.pd:return b+Vs;default:throw new _.vj(`Cannot infer DRMtoday license URL for key system: ${a}`);}};_.Xs=function(a,b,c){a=dn(a,b);return(c&&c.customData?c.customData:{}).fpsContentId=a};
334
- _.Zs=function(a,b,c,d){d=void 0===d?!0:d;c=a.drm;c?c.customData&&(_.en(b,a),a=a.drm,(void 0===d||d)&&a&&a.customData&&(c=a.customData.assetId))&&(d=b.uris[0],d+="?assetId\x3d"+encodeURIComponent(`${c}`),(a=a.customData.variantId)&&(d+="\x26variantId\x3d"+encodeURIComponent(`${a}`)),b.uris[0]=d):_.Ys.warn(Ta)};$s=function(a,b,c){_.Zs(a,b,c);a=a.drm;a=!(!a||!a.offlineId);c=new _.Dj(b.uris[0]);c.a.searchParams.set(_.Oe,a.toString());b.uris[0]=c.toString()};
335
- at=function(a,b,c){_.Zs(a,b,c,!1);b.headers[_.ua]=_.Cc;a={spc:_.Mk(b.body)};b.body=_.Bi(_.Aj(a,!0))};_.bt=function(a,b){200===b.status&&(a=_.vi(b.data).trim(),a.startsWith("\x3cckc\x3e")&&a.endsWith("\x3c/ckc\x3e")&&(a=a.slice(5,-6)),a=_.Ok(a).buffer,b.data=a)};ct=function(a,b){a=a.drm;if(!a)_.Ys.warn(Ta);else if(a.customData&&a.customData.merchant){const c=new _.Dj(b.uris[0]);let d=c.a.pathname;d.endsWith("/")||(d+="/");d+=a.customData.merchant;c.a.pathname=d;b.uris[0]=c.toString()}};
336
- _.dt=function(a,b){try{const d=_.E(b.data),e=JSON.parse(String.fromCharCode.apply(null,d));_.cn.debug("Widevine License response",e);const f=atob(e.license),g=new Uint8Array(f.length);for(a=0;a<f.length;++a)g[a]=f.charCodeAt(a);var c=g.buffer}catch(d){_.cn.debug("Unable to parse DRMtoday response JSON, assuming the response contained raw data"),c=null}c&&(b.data=c)};et=function(a){a=a&&(a.organizationId||a.merchant);if(null==a||!`${a}`)throw new _.J(_.C,6,7100,"DRMtoday organizationId missing");return`${a}`};
337
- gt=function(a,b){(a=a.drm)&&a.customData&&ft(b,a.customData)};ft=function(a,b){var c=b.authToken;c=null!=c?`${c}`.trim():"";""!==c?a.headers.Authorization=`Bearer ${c.replace(/^Bearer\s+/i,"").trim()}`:(c={},null!=b.userId&&(c.userId=b.userId),null!=b.sessionId&&(c.sessionId=b.sessionId),0!==Object.keys(c).length&&(a.headers["x-dt-custom-data"]=btoa(JSON.stringify(c))))};ht=function(a,b){gt(a,b);b.headers[_.ua]=zc};it=function(a,b){(a=a.drm)&&a.customData&&ft(b,a.customData)};
338
- jt=function(a,b){gt(a,b);a=a.drm;a=!(!a||!a.offlineId);const c=new _.Dj(b.uris[0]);c.a.searchParams.set(_.Oe,a.toString());b.uris[0]=c.toString()};kt=function(){};lt=function(a,b){return dn(a,b)};qt=function(a){switch(a){case "DRMtoday":return mt;case "DRMtoday_STAGING":return nt;case "DRMtoday_DEMO":return ot;case "DRMtoday_TEST":return pt;default:return null}};rt=function(a){switch(a){case mt:case nt:case ot:return _.kn("V2")}return null};
339
- st=function(a){const b=new Event(a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase(),a);a.target.dispatchEvent(b)};tt=function(a){a=a.target;if(a.webkitPresentationMode===Qe){document.pictureInPictureElement=a;var b=new Event("enterpictureinpicture");a.dispatchEvent(b)}else document.pictureInPictureElement===a&&(document.pictureInPictureElement=null),b=new Event("leavepictureinpicture"),a.dispatchEvent(b)};
340
- ut=function(){return this.webkitSupportsPresentationMode(Qe)?(this.webkitSetPresentationMode(Qe),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))};vt=function(){const a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))};
341
- wt=function(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}};xt=function(a,b,c){return new window.TextTrackCue(a,b,c)};yt=function(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)};_.zt=function(a){const b=[];for(const c of a)for(const d of c.variants)b.push(d);return b};_.Bt=function(a,b){a=_.Jl(_.Kl(a),_.Ll(a));_.At[a]=b};
342
- _.Ct=function(a){a=_.Jl(_.Kl(a),_.Ll(a));return _.At[a]||null};_.Dt=function(a){a=_.Jl(_.Kl(a),_.Ll(a));delete _.At[a]};_.It=function(a){if(!a.w)return null;const b=a.H;switch(a.w){case Et:return`-2px -2px 0 ${b}, -1px -1px 0 ${b}`;case Ft:return`2px 2px 0 ${b}, 1px 1px 0 ${b}`;case Gt:return`-1px 0 ${b}, 0 1px ${b}, 1px 0 ${b}, `+`0 -1px ${b}`;case Ht:return`2px 2px 3px ${b}, 2px 2px 4px ${b}, `+`2px 2px 5px ${b}`;default:return _.Be}};
343
- _.Kt=function(a,b,c,d){return _.v(function*(){try{return new (yield Jt(a,b,c,d))}catch(e){throw e.a(_.C),e;}})};
344
- Jt=function(a,b,c,d){return _.v(function*(){if(d){var e=_.Lt[d.toLowerCase()];if(e)return e;_.A("Could not determine manifest type using MIME type ",d)}if(e=_.Ej(a)){const f=_.Mt[e];if(f)return f;_.A("Could not determine manifest type for extension ",e)}else _.A("Could not find extension for ",a);if(!d&&(d=yield Nt(a,b,c))){if(e=_.Lt[d])return e;_.A("Could not determine manifest type using MIME type",d)}throw new _.J(_.C,4,4E3,{url:a});})};
345
- Nt=function(a,b,c){return _.v(function*(){var d=_.ek(a);ak(d,c);d.type=1;d.method="HEAD";return(d=(yield b.fetch(d).V).headers["content-type"])?d.toLowerCase():""})};_.Ng=[];Rg="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this;Sg=typeof Object.defineProperties==_.Wd?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)};
301
+ Pr=function(a){try{const b=a.split(",").map(c=>{const d={};c=c.split(";");for(let e=0;e<c.length;e++){const {key:f,value:g}=Mr(c[e]);Object.keys(Nr).includes(f)&&(d[Nr[f]]=g)}return d}).filter(c=>_.$g(c));return 0<b.length?b:null}catch(b){return Or.error("CmsdManager parseCmsdDynamicHeader_ failed:",b),null}};
302
+ Mr=function(a){var b=a.split("\x3d");const c=b[0];b=b[1];if(!c)throw new _.wj("Parsing CMSD, missing parameter or wrong format");if(c&&!b)return{key:c,value:!0};const d=b[0];if('"'===d&&'"'===b[b.length-1])return{key:c,value:b.replaceAll(/(^")|("$)/g,"")};if(/^[-0-9]/.test(d))return{key:c,value:parseInt(b,10)};if(/^[a-zA-Z*]/.test(d))return{key:c,value:b};throw new _.wj(`Parsing CMSD, not recognized value type of ${a}`);};
303
+ Rr=function(a){return b=>{{var c=b.headers;let e=b=null;var d=jh(c,"cmsd-dynamic");c=jh(c,"cmsd-static");d&&(b=Pr(d),a.a=b);if(c)try{d={};const f=c.split(",");for(c=0;c<f.length;c++){const {key:g,value:h}=Mr(f[c]);Object.keys(Qr).includes(g)&&(d[Qr[g]]=h)}e=_.$g(d)?d:null}catch(f){Or.error("CmsdManager parseCmsdStaticHeader_ failed:",f),e=null}(b||e)&&a.m.trigger(new _.H("cmsd-event",{Cj:b,Pj:e}))}}};_.Tr=function(a){a&&(0<=Sr.indexOf(a)||Sr.push(a))};
304
+ Wr=function(a){if(!a.h&&a.B&&a.a&&a.f.ads.hls.enable&&a.getTimelineCues().some(b=>_.Ij(b.schemeIdUri))){const b=new Ur;b.A(a.a,a.B,a.f.mse.sendPlaybackSessionIdHeader?a.G:null);Vr(a,b,a.f)}};Yr=function(a,b){a.J=new Xr(b);xr(a.J).catch(c=>{setTimeout(()=>{a.g.error(La+c);a.trigger(new _.H(_.Sd,{detail:new _.J(_.C,7,7101)}));a.destroy()},1E3)})};
305
+ _.Zr=function(a,b,c){c=void 0===c?null:c;null!=b&&b===a.a?a.a.forwardEventsTo(a):(a.a&&(a.a.stopForwardingEventsTo(a),a.a.destroy(),a.a=null,a.B=null),b&&(b.init(a.j,a.F),b.setNetworkEngine(a.getNetworkEngine()),b.forwardEventsTo(a),a.a=b,a.B=c))};
306
+ $r=function(a,b){_.v(function*(){a.j.getMedia()||a.j.getCastElement();a.J||(a.J=new Xr(a.f.license));try{a.g.debug("Verifying license remotely"),yield Lr(a.J,b),a.g.debug("License verified remotely")}catch(c){a.g.debug("License rejected by remote",c),setTimeout(sr,1E3,{release:a.release.bind(a),destroy:a.destroy.bind(a),onError:a.onError.bind(a)},c)}})};_.as=function(a,b,...c){const d=a.W.map(e=>e[b].call(e,a,...c)).filter(e=>e instanceof Promise);return Promise.all(d)};
307
+ bs=function(a){return _.v(function*(){if(a.H)a.g.debug("The player is already released. No-op");else if(a.Z.off(document,_.ug),a.trigger(new _.H(_.tf)),a.j&&a.j.release(),a.h&&(yield a.h.o(),a.h=null),a.C&&(yield a.C.release(),a.C=null),a.a){var b=null,c=a.a.on(_.bf,d=>{b=d});try{yield _.as(a,_.He),a.a.stopForwardingEventsTo(a),yield Promise.all([a.a.release(),a.A.release()]),a.g.debug("Releasing player completed"),b&&(a.g.debug("Re-post player state change event after release"),a.trigger(b)),a.trigger(new _.H(sf)),
308
+ a.H=!0}finally{a.a.off(_.bf,c)}}else a.trigger(new _.H(sf)),a.H=!0})};cs=function(a){a.G&&(a.g.info("Playback session ended, ID:",a.G),a.G=null,a.a&&a.a.setPlaybackSessionId(null))};ds=function(a,b){const c=wh(d=>d.f(_.ab)&&a.every(e=>2===d.canPlay(e,b)));if(!c)throw new _.J(_.C,7,7003,"No compatible player implementing playlist mode found!");return{ob:c,player:c.create(),sourceIndex:0}};
309
+ fs=function(a,b,c){if(a.P===_.ab)b=ds(b,c);else if(2!==(a.a?a.a.canPlay(b[0],c):0)||a.S){a.S=!1;if(b){var d=a=null;for(var e=0;e<b.length;e++);e=Object.values(_.th);for(let f=0;f<b.length;f++)for(let g=0;g<e.length;g++){const h={ob:e[g],confidence:e[g].canPlay(b[f],c)};if(null===a||a.confidence<h.confidence)a=h,d=f}a&&typeof d===_.r&&0<a.confidence?(_.uh.debug("Player Factory '"+a.ob.a()+"' can play",b[d]),b=new es(a.ob,d)):(_.uh.debug("No compatible Player Factory found for sources:",b),b=null)}else b=
310
+ null;if(!b)throw new _.J(_.C,7,7003,"No player factory compatible with given sources found!");c=b.ob;a=c.create();b={ob:c,player:a,sourceIndex:b.sourceIndex}}else b={ob:a.B,player:a.a,sourceIndex:0};return b};
311
+ _.ks=function(a,b,c){return _.v(function*(){if(a.R)throw new _.J(_.C,7,7E3,"Player is already destroyed.");if(!a.j)throw new _.J(_.C,7,7E3,"No surface associated with this player!");_.Nn(Xe);yield a.release();var d=c||_.cp(b);if(!b||0===d.length)throw new _.J(_.C,7,7003,Va);a.ca=d;a.f=_.um([a.F,b,{source:d}]);$k(a.A,a.f);a.H=!1;d=fs(a,d,a.f);_.Zr(a,d.player,d.ob);gs(a,a.a);a.a&&a.a.setSourceIndex(d.sourceIndex);hs(a);a.a&&a.a.setCdnErrorCallback(a.M);_.is(a,a.f);js(a);if(a.f.pauseWhenInBackground)a.Z.on(document,
312
+ _.ug,()=>{document.hidden?(a.g.debug("Player is hidden: pausing..."),a.pause()):(a.g.debug("Player is visible: resuming..."),a.play())});_.Ap(a.f.drm);zp(a);yield _.as(a,"onContentWillLoad",a.f.source[d.sourceIndex]);_.Nn(We);_.Pn("player.beforeLoad",Xe,We)})};_.ls=function(a){return _.v(function*(){a.j.getMedia()||a.j.getCastElement();a.trigger(new _.H(me));yield Promise.all([a.a.load(a.f),a.h?a.h.load():Promise.resolve()])})};
313
+ _.ns=function(a){return _.v(function*(){_.Nn(Te);$r(a,{configuration:a.getConfiguration(),ia:a.sg(),drmInfo:a.getDrmInfo(),Ng:Object.keys(a.L),isLive:a.isLive()});ms(a);Bp(a);yield _.as(a,_.Ee);a.f.autoplay&&(a.h?a.h.w():1)&&(yield a.play());_.Nn(Se);_.Pn("player.afterLoad",Te,Se)})};os=function(a){return _.v(function*(){if(a.a){var b=a.a;b.ah?(a.trigger(new _.H(me)),yield b.ah(),yield _.ns(a)):a.g.warn(gb)}else a.g.warn(db)})};
314
+ gs=function(a,b){try{var c=crypto.randomUUID()}catch(d){c=jr()}a.g.info("Playback session started, ID:",c);b.setPlaybackSessionId(c);a.G=c};hs=function(a){a.a&&a.a.setDrmCustomDataModifier(b=>_.v(function*(){a.Ze&&a.Wc&&(yield a.Wc(b))}))};_.is=function(a,b){b=b||a.f;var c=rp(a,b);c&&(c=c.create(a),Vr(a,c,b))};js=function(a){a.f.cmsd.enabled&&(a.C=new ps(a),a.a.setCmsdManager(a.C))};
315
+ qs=function(a){const b=_.lj(a.f.preferredTextLanguage).filter(f=>f),c=a.f.preferForcedSubtitles,d=a.getTrackManager().sa().filter(f=>c?f.kind===_.Ud:f.kind!==_.Ud);if(0===d.length)c&&a.g.warn("Forced subtitles are configured to be preferred, but no forced subtitles are available.");else{if(c&&0===b.length){var e=a.getTrackManager().ra();e&&e.language?(e=_.Uj(e.language||""),b.push(e)):(e=a.getTrackManager().Ja())&&e.language&&(e=_.Uj(e.language||""),b.push(e));0===b.length&&a.g.warn("Forced subtitles are configured to be preferred, but neither the preferred text language is set, nor the audio or video track language is available to determine which forced subtitles language to select.")}b.some(f=>
316
+ {const g=_.Uj(f);if(f=d.find(h=>{h=_.Uj(h.language||"");return _.Vj(h,g)}))return a.getTrackManager().bb(f),!0;c&&a.g.warn("Forced subtitles are configured to be preferred, but no forced subtitles match the preferred languages: ",b);return!1})}};ms=function(a){_.v(function*(){const b=[];if(a.f.remoteTextTracks)for(const c of a.f.remoteTextTracks)b.push(a.getTrackManager().addTextTrack(c));yield Promise.all(b);qs(a)})};Vr=function(a,b,c){a.h=b;b.h(null==c.volume?1:c.volume);b.setMuted(c.muted||!1)};
317
+ rs=function(a){a.K.forEach(b=>b());a.K=[]};us=function(a,b){return _.v(function*(){try{_.Nn(af);a.P=_.ab;const c=b.slice(1).map(d=>({config:d,ia:_.cp(d)}));yield _.ks(a,b[0]);c.forEach(d=>{ss(a,d.config,d.ia)});a.trigger(new _.H(me));yield a.a.setupPlaylist(b);yield _.ns(a);c.forEach(d=>{ts(a,d.config,d.ia)});_.Nn($e);_.Pn("player.setupPlaylist",af,$e)}catch(c){if(a.l)throw a.g.info(Ma),new _.J(_.C,7,7E3);throw c;}})};
318
+ vs=function(a,b){const c=d=>{a.I=a.o.findIndex(e=>e.id===d.id)};a.addEventListener(_.zf,c);a.K.push(()=>{a.removeEventListener(_.zf,c)});if(b.endTime){const d=b.endTime,e=()=>{a.getPosition()>=d&&(a.removeEventListener(_.$f,e),a.g.info("Playlist end time reached. Stopping playback."),a.trigger(new _.H(_.yf)),a.pause())};a.addEventListener(_.$f,e);a.K.push(()=>{a.removeEventListener(_.$f,e)})}};
319
+ ws=function(a,b){return _.v(function*(){try{_.Nn(Ve);const c=_.cp(b);ss(a,b,c);yield a.a.appendLoad(b);ts(a,b,c);_.Nn(Ue);_.Pn("player.appendLoad",Ve,Ue)}catch(c){if(a.l)throw a.g.info(Ma),new _.J(_.C,7,7E3,{id:b.id});throw c;}})};
320
+ ss=function(a,b,c){if(0===c.length)throw new _.J(_.C,7,7003,{message:Va,id:b.id});if(1<c.length)throw new _.J(_.C,7,7003,{message:"Multiple sources not supported!",id:b.id,source:c});if(2!==(a.a?a.a.canPlay(c[0],a.f):0))throw new _.J(_.C,7,7003,{message:"Source not supported by the current player!",id:b.id,source:c[0]});};ts=function(a,b,c){$r(a,{configuration:b,ia:c,drmInfo:a.getDrmInfo(),Ng:Object.keys(a.L),isLive:c[0].isLive})};
321
+ xs=function(a,b){const c=document.getElementById(a);if(!c)throw Error("Anchor element not found");c.classList.add(dd);return Array.from({length:3}).map(()=>{const d=document.createElement(_.t);d.classList.add("clpp-mc-playlist-video-el");const e=document.createElement(_.Ad);e.classList.add("clpp-mc-playlist-item");e.appendChild(d);c.appendChild(e);return new _.R(d,b)})};
322
+ ys=function(a,b,c){const d=b.getSurface().getMedia();b=b.getSurface().getUniqueCssClass();d&&(c?(a.g.info(`Show video element .${b}`),d.classList.add(ed)):(a.g.info(`Hide video element .${b}`),d.classList.remove(ed)),a.w&&a.w(d,c))};Bs=function(a,b){return _.v(function*(){const c=yield a.o.get();a.f=b;b.role=zs;a.f.player=c;a.f.videoEl=c.getSurface().getMedia();ys(a,c,!0);yield c.open(b.config);As(a,b);b.config.autoplay||(yield c.play())})};
323
+ Is=function(a){_.v(function*(){if(0===a.a)yield Cs(a);else if(a.a===a.h.length-1)yield Gs(a);else{const b=[a.a-1,a.a+1];a.g.info(`Preload items (indices: ${b})`);yield Promise.all(b.map(c=>Hs(a,c)))}})};
324
+ Js=function(a,b){return _.v(function*(){if(b.player){if(b.state===lf){a.g.info(Eb);try{yield b.preloadPromise}catch(c){}}a.f=b;b.role=zs;ys(a,b.player,!0);b.state===kf?(_.Nn(gf),a.ha.preloadMedia?yield b.player.play():yield os(b.player),_.Nn(ff),_.Pn("playlist.next",gf,ff)):b.state===jf&&(yield b.player.open(b.config));As(a,b);b.config.autoplay||(yield b.player.play())}})};
325
+ Ms=function(a,b){return _.v(function*(){a.g.info(`Stop current playback (index: ${b.index})`);b.player.pause();ys(a,b.player,!1);yield Ks(a,b);b.player=null;b.videoEl=null;b.role=Ls})};Os=function(a){return Promise.all(Array.from(a.l.keys()).map(b=>Ns(a,b)))};Ps=function(a){return _.v(function*(){yield a.o.destroy();const b=document.getElementById(a.ha.anchorId);b&&(b.classList.remove(dd),b.innerHTML="")})};
326
+ Ns=function(a,b){return _.v(function*(){const c=a.l.get(b);c&&(a.g.info(`Stop preloading item (index: ${b})`),c.player&&(yield Ks(a,c)),a.l.delete(b))})};Ks=function(a,b){return _.v(function*(){b.disposers.forEach(c=>c());b.disposers=[];b.player&&(yield a.o.release(b.player))})};As=function(a,b){if(a.ha.autoplayNext){const c=()=>{a.g.info("Automatically transition to next item");a.Lg()};b.player.on(_.Rd,c);const d=b.player;b.disposers.push(()=>{d.off(_.Rd,c)})}};
327
+ Hs=function(a,b){return _.v(function*(){const c=yield a.o.get(),d=a.h[b];d.player=c;d.videoEl=c.getSurface().getMedia();d.role=Ls;d.state=lf;a.trigger(new _.H(gg));try{a.l.set(b,d),a.ha.preloadMedia?(d.config.autoplay&&(a.g.warn(ma+`Force disabling autoplay (index: ${b})`),d.config.autoplay=!1),d.preloadPromise=c.open(d.config)):d.preloadPromise=c.preload(d.config),yield d.preloadPromise,d.state=kf,a.trigger(new _.H(gg))}catch(e){7001===e.code?(a.g.info(`Preload aborted (index: ${b})`),d.state=hf):
328
+ (a.g.warn(`Preload failed (index: ${b})`,e),a.trigger(new _.H(_.Sd,{detail:e})),d.state=jf),a.trigger(new _.H(gg))}})};Cs=function(a){return _.v(function*(){const b=a.a+1;a.g.info(`Preload following item (index: ${b})`);yield Hs(a,b)})};Gs=function(a){return _.v(function*(){const b=a.a-1;a.g.info(`Preload preceding item (index: ${b})`);yield Hs(a,b)})};
329
+ _.Rs=function(a){if(Qs.has(a))return Qs.get(a);if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported(a);Qs.set(a,b);return b}return window.MediaSource?(b=MediaSource.isTypeSupported(a),Qs.set(a,b),b):!1};Ss=function(a,b){b=b.replace(/mp2t/i,"mp4");a===_.q&&(b=b.replace(_.t,_.q));if(a=/avc1\.(66|77|100)\.(\d+)/.exec(b)){let d="avc1.";var c=a[1];d="66"===c?d+"4200":"77"===c?d+"4d00":d+"6400";c=Number(a[2]);d+=(c>>4).toString(16);d+=(c&15).toString(16);b=b.replace(a[0],d)}return b};
330
+ _.Ts=function(a,b){return void 0===a?b:null===a?null:typeof a===_.Of?_.ln(a):a};
331
+ _.ok=function(a,b){const c={};var d=b?b.widevineVideoRobustness:void 0,e=b?b.widevineAudioRobustness:void 0;const f=b?b.serverCertificate:void 0;let g=a.h[_.td];g&&(c[_.td]={licenseUrl:a.f(_.td,g,b),videoRobustness:yj(d,g.videoRobustness),audioRobustness:yj(e,g.audioRobustness),modifiers:g.modifiers,distinctiveIdentifierRequired:xj(b?b.widevineDistinctiveIdentifierRequired:void 0,g.distinctiveIdentifierRequired,!1),persistentStateRequired:xj(b?b.widevinePersistentStateRequired:void 0,g.persistentStateRequired,
332
+ !1),serverCertificate:_.Ts(f,g.serverCertificate)});(g=a.h[_.pd])&&(c[_.pd]={licenseUrl:a.f(_.pd,g,b),certificateUrl:a.G(g,b),modifiers:g.modifiers});d=b?b.playReadyVideoRobustness:void 0;e=b?b.playReadyAudioRobustness:void 0;(g=a.h[_.rd])&&(c[_.rd]={licenseUrl:a.f(_.rd,g,b),videoRobustness:d||g.videoRobustness,audioRobustness:e||g.audioRobustness,individualizationServer:g.individualizationServer,useLegacySystem:g.useLegacySystem,modifiers:g.modifiers});return c};
333
+ Xs=function(a,b){b=bn(b);switch(a){case _.td:return b+Us;case _.rd:return b+Vs;case _.pd:return b+Ws;default:throw new _.wj(`Cannot infer DRMtoday license URL for key system: ${a}`);}};_.Ys=function(a,b,c){a=en(a,b);return(c&&c.customData?c.customData:{}).fpsContentId=a};
334
+ _.$s=function(a,b,c,d){d=void 0===d?!0:d;c=a.drm;c?c.customData&&(_.fn(b,a),a=a.drm,(void 0===d||d)&&a&&a.customData&&(c=a.customData.assetId))&&(d=b.uris[0],d+="?assetId\x3d"+encodeURIComponent(`${c}`),(a=a.customData.variantId)&&(d+="\x26variantId\x3d"+encodeURIComponent(`${a}`)),b.uris[0]=d):_.Zs.warn(Ta)};at=function(a,b,c){_.$s(a,b,c);a=a.drm;a=!(!a||!a.offlineId);c=new _.Ej(b.uris[0]);c.a.searchParams.set(_.Oe,a.toString());b.uris[0]=c.toString()};
335
+ bt=function(a,b,c){_.$s(a,b,c,!1);b.headers[_.ua]=_.Cc;a={spc:_.Nk(b.body)};b.body=_.Ci(_.Bj(a,!0))};_.ct=function(a,b){200===b.status&&(a=_.wi(b.data).trim(),a.startsWith("\x3cckc\x3e")&&a.endsWith("\x3c/ckc\x3e")&&(a=a.slice(5,-6)),a=_.Pk(a).buffer,b.data=a)};dt=function(a,b){a=a.drm;if(!a)_.Zs.warn(Ta);else if(a.customData&&a.customData.merchant){const c=new _.Ej(b.uris[0]);let d=c.a.pathname;d.endsWith("/")||(d+="/");d+=a.customData.merchant;c.a.pathname=d;b.uris[0]=c.toString()}};
336
+ _.et=function(a,b){try{const d=_.E(b.data),e=JSON.parse(String.fromCharCode.apply(null,d));_.dn.debug("Widevine License response",e);const f=atob(e.license),g=new Uint8Array(f.length);for(a=0;a<f.length;++a)g[a]=f.charCodeAt(a);var c=g.buffer}catch(d){_.dn.debug("Unable to parse DRMtoday response JSON, assuming the response contained raw data"),c=null}c&&(b.data=c)};ft=function(a){a=a&&(a.organizationId||a.merchant);if(null==a||!`${a}`)throw new _.J(_.C,6,7100,"DRMtoday organizationId missing");return`${a}`};
337
+ ht=function(a,b){(a=a.drm)&&a.customData&&gt(b,a.customData)};gt=function(a,b){var c=b.authToken;c=null!=c?`${c}`.trim():"";""!==c?a.headers.Authorization=`Bearer ${c.replace(/^Bearer\s+/i,"").trim()}`:(c={},null!=b.userId&&(c.userId=b.userId),null!=b.sessionId&&(c.sessionId=b.sessionId),0!==Object.keys(c).length&&(a.headers["x-dt-custom-data"]=btoa(JSON.stringify(c))))};it=function(a,b){ht(a,b);b.headers[_.ua]=zc};jt=function(a,b){(a=a.drm)&&a.customData&&gt(b,a.customData)};
338
+ kt=function(a,b){ht(a,b);a=a.drm;a=!(!a||!a.offlineId);const c=new _.Ej(b.uris[0]);c.a.searchParams.set(_.Oe,a.toString());b.uris[0]=c.toString()};lt=function(){};mt=function(a,b){return en(a,b)};rt=function(a){switch(a){case "DRMtoday":return nt;case "DRMtoday_STAGING":return ot;case "DRMtoday_DEMO":return pt;case "DRMtoday_TEST":return qt;default:return null}};st=function(a){switch(a){case nt:case ot:case pt:return _.ln("V2")}return null};
339
+ tt=function(a){const b=new Event(a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase(),a);a.target.dispatchEvent(b)};ut=function(a){a=a.target;if(a.webkitPresentationMode===Qe){document.pictureInPictureElement=a;var b=new Event("enterpictureinpicture");a.dispatchEvent(b)}else document.pictureInPictureElement===a&&(document.pictureInPictureElement=null),b=new Event("leavepictureinpicture"),a.dispatchEvent(b)};
340
+ vt=function(){return this.webkitSupportsPresentationMode(Qe)?(this.webkitSetPresentationMode(Qe),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))};wt=function(){const a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))};
341
+ xt=function(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}};yt=function(a,b,c){return new window.TextTrackCue(a,b,c)};zt=function(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)};_.At=function(a){const b=[];for(const c of a)for(const d of c.variants)b.push(d);return b};_.Ct=function(a,b){a=_.Kl(_.Ll(a),_.Ml(a));_.Bt[a]=b};
342
+ _.Dt=function(a){a=_.Kl(_.Ll(a),_.Ml(a));return _.Bt[a]||null};_.Et=function(a){a=_.Kl(_.Ll(a),_.Ml(a));delete _.Bt[a]};_.Jt=function(a){if(!a.w)return null;const b=a.H;switch(a.w){case Ft:return`-2px -2px 0 ${b}, -1px -1px 0 ${b}`;case Gt:return`2px 2px 0 ${b}, 1px 1px 0 ${b}`;case Ht:return`-1px 0 ${b}, 0 1px ${b}, 1px 0 ${b}, `+`0 -1px ${b}`;case It:return`2px 2px 3px ${b}, 2px 2px 4px ${b}, `+`2px 2px 5px ${b}`;default:return _.Be}};
343
+ _.Lt=function(a,b,c,d){return _.v(function*(){try{return new (yield Kt(a,b,c,d))}catch(e){throw e.a(_.C),e;}})};
344
+ Kt=function(a,b,c,d){return _.v(function*(){if(d){var e=_.Mt[d.toLowerCase()];if(e)return e;_.A("Could not determine manifest type using MIME type ",d)}if(e=_.Fj(a)){const f=_.Nt[e];if(f)return f;_.A("Could not determine manifest type for extension ",e)}else _.A("Could not find extension for ",a);if(!d&&(d=yield Ot(a,b,c))){if(e=_.Mt[d])return e;_.A("Could not determine manifest type using MIME type",d)}throw new _.J(_.C,4,4E3,{url:a});})};
345
+ Ot=function(a,b,c){return _.v(function*(){var d=_.fk(a);bk(d,c);d.type=1;d.method="HEAD";return(d=(yield b.fetch(d).V).headers["content-type"])?d.toLowerCase():""})};_.Ng=[];Rg="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this;Sg=typeof Object.defineProperties==_.Wd?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)};
346
346
  Tg("Promise",function(a){function b(g){this.f=0;this.l=void 0;this.a=[];var h=this.j();try{g(h.resolve,h.reject)}catch(k){h.reject(k)}}function c(){this.a=null}function d(g){return g instanceof b?g:new b(function(h){h(g)})}if(a)return a;c.prototype.f=function(g){if(null==this.a){this.a=[];var h=this;this.h(function(){h.l()})}this.a.push(g)};var e=Rg.setTimeout;c.prototype.h=function(g){e(g,0)};c.prototype.l=function(){for(;this.a&&this.a.length;){var g=this.a;this.a=[];for(var h=0;h<g.length;++h){var k=
347
347
  g[h];g[h]=null;try{k()}catch(l){this.j(l)}}}this.a=null};c.prototype.j=function(g){this.h(function(){throw g;})};b.prototype.j=function(){function g(l){return function(m){k||(k=!0,l.call(h,m))}}var h=this,k=!1;return{resolve:g(this.C),reject:g(this.h)}};b.prototype.C=function(g){if(g===this)this.h(new TypeError("A Promise cannot resolve to itself"));else if(g instanceof b)this.F(g);else{a:switch(typeof g){case _.Ce:var h=null!=g;break a;case _.Wd:h=!0;break a;default:h=!1}h?this.B(g):this.o(g)}};
348
348
  b.prototype.B=function(g){var h=void 0;try{h=g.then}catch(k){this.h(k);return}typeof h==_.Wd?this.G(h,g):this.o(g)};b.prototype.h=function(g){this.w(2,g)};b.prototype.o=function(g){this.w(1,g)};b.prototype.w=function(g,h){if(0!=this.f)throw Error("Cannot settle("+g+", "+h+"): Promise already settled in state"+this.f);this.f=g;this.l=h;this.A()};b.prototype.A=function(){if(null!=this.a){for(var g=0;g<this.a.length;++g)f.f(this.a[g]);this.a=null}};var f=new c;b.prototype.F=function(g){var h=this.j();
349
349
  g.he(h.resolve,h.reject)};b.prototype.G=function(g,h){var k=this.j();try{g.call(h,k.resolve,k.reject)}catch(l){k.reject(l)}};b.prototype.then=function(g,h){function k(p,u){return typeof p==_.Wd?function(x){try{l(p(x))}catch(y){m(y)}}:u}var l,m,n=new b(function(p,u){l=p;m=u});this.he(k(g,l),k(h,m));return n};b.prototype.catch=function(g){return this.then(void 0,g)};b.prototype.he=function(g,h){function k(){switch(l.f){case 1:g(l.l);break;case 2:h(l.l);break;default:throw Error("Unexpected state: "+
350
350
  l.f);}}var l=this;null==this.a?f.f(k):this.a.push(k)};b.resolve=d;b.reject=function(g){return new b(function(h,k){k(g)})};b.race=function(g){return new b(function(h,k){for(var l=Qg(g),m=l.next();!m.done;m=l.next())d(m.value).he(h,k)})};b.all=function(g){var h=Qg(g),k=h.next();return k.done?d([]):new b(function(l,m){function n(x){return function(y){p[x]=y;u--;0==u&&l(p)}}var p=[],u=0;do p.push(void 0),u++,d(k.value).he(n(p.length-1),m),k=h.next();while(!k.done)})};return b});var Vg=this||self;
351
- Vg.a=!0;_.w("clpp.utils.obj.cloneItem",_.Yg);_.w("clpp.utils.obj.merge",_.Xg);var nh={DEFAULT:-1,NONE:0,ERROR:1,WARNING:2,INFO:3,DEBUG:4};_.w("clpp.log.Level",nh);var lh=0,kh={},Ot=[];_.w("clpp.log.getLoggers",function(){return _.Yg(kh)});_.w("clpp.log.addInterceptor",function(a){a&&Ot.push(a)});_.w("clpp.log.removeInterceptor",function(a){a&&(a=Ot.indexOf(a),0<=a&&Ot.splice(a,1))});_.w("clpp.log.getTagLevel",mh);_.w("clpp.log.hasTagLevel",function(a){return void 0===a?!1:0<=kh[a]});_.w("clpp.log.setTagLevel",function(a,b){a&&(_.dh(b)&&(b=oh(b)),kh[a]=b)});
351
+ Vg.a=!0;_.w("clpp.utils.obj.cloneItem",_.Yg);_.w("clpp.utils.obj.merge",_.Xg);var nh={DEFAULT:-1,NONE:0,ERROR:1,WARNING:2,INFO:3,DEBUG:4};_.w("clpp.log.Level",nh);var lh=0,kh={},Pt=[];_.w("clpp.log.getLoggers",function(){return _.Yg(kh)});_.w("clpp.log.addInterceptor",function(a){a&&Pt.push(a)});_.w("clpp.log.removeInterceptor",function(a){a&&(a=Pt.indexOf(a),0<=a&&Pt.splice(a,1))});_.w("clpp.log.getTagLevel",mh);_.w("clpp.log.hasTagLevel",function(a){return void 0===a?!1:0<=kh[a]});_.w("clpp.log.setTagLevel",function(a,b){a&&(_.dh(b)&&(b=oh(b)),kh[a]=b)});
352
352
  _.w("clpp.log.setLogLevel",function(a){-1===a&&(a=3);_.dh(a)&&(a=oh(a));lh=a});_.w("clpp.log.getLogLevel",function(){return lh});
353
353
  _.S=class{constructor(a){(this.tag=a)&&void 0===kh[a]&&(kh[a]=-1)}log(a,b){if(window.console){if(1<arguments.length){var c=arguments[0];Array.prototype.shift.call(arguments)}else c=3;var d=mh(this.tag);if(0<=d){if(d<c)return}else if(lh<c)return;this.tag&&Array.prototype.unshift.call(arguments,"["+this.tag+"]");d=new Date;d.toISOString&&(d=d.toISOString().substring(11).replace("Z",""),Array.prototype.unshift.call(arguments,d));4===c?console.log.apply(console,arguments):3===c?console.info.apply(console,
354
- arguments):2===c?console.warn.apply(console,arguments):1===c?console.error.apply(console,arguments):console.log.apply(console,arguments);for(const e of Ot)e.call(e,c,arguments)}}info(a){Array.prototype.unshift.call(arguments,3);this.log.apply(this,arguments)}debug(a){Array.prototype.unshift.call(arguments,4);this.log.apply(this,arguments)}warn(a){Array.prototype.unshift.call(arguments,2);this.log.apply(this,arguments)}error(a){Array.prototype.unshift.call(arguments,1);this.log.apply(this,arguments)}Fh(a){return a?
355
- this.tag?new _.S(this.tag+"."+a):new _.S(a):this}};_.w("clpp.log.Logger",_.S);_.S.prototype.createChild=_.S.prototype.Fh;_.S.prototype.error=_.S.prototype.error;_.S.prototype.warn=_.S.prototype.warn;_.S.prototype.debug=_.S.prototype.debug;_.S.prototype.info=_.S.prototype.info;_.S.prototype.log=_.S.prototype.log;var ph=new _.S("clpp");_.w("clpp.log.info",_.qh);_.w("clpp.log.debug",_.rh);_.w("clpp.log.warn",_.A);_.w("clpp.log.error",_.sh);var ds;ds=class{constructor(a,b){this.nb=a;this.sourceIndex=b}};_.uh=new _.S("clpp.players");_.th={};_.Ri={IDLE:0,STOPPING:1,qj:2,ERROR:3,READY:4,SEEKING:5,BUFFERING:6,PLAY:7,PLAYING:8,rj:9,PAUSED:10,ENDED:11};_.w("clpp.events.ERROR",_.Sd);_.w("clpp.events.LOADEDMETADATA",_.le);_.w("clpp.events.BUFFERING_ENDED",_.Nc);_.w("clpp.events.BUFFERING_STARTED",_.Oc);_.w("clpp.events.STATE_CHANGED",Lf);_.w("clpp.events.AUDIO_TRACK_CHANGED",_.Jc);_.w("clpp.events.TEXT_TRACK_CHANGED",_.Vf);_.w("clpp.events.VIDEO_TRACK_CHANGED",_.sg);_.w("clpp.events.BITRATE_CHANGED",_.Lc);_.w("clpp.events.TRACKS_ADDED",_.ag);_.w("clpp.events.TRACKS_REMOVED","tracksremoved");_.w("clpp.events.LOAD_START",me);
354
+ arguments):2===c?console.warn.apply(console,arguments):1===c?console.error.apply(console,arguments):console.log.apply(console,arguments);for(const e of Pt)e.call(e,c,arguments)}}info(a){Array.prototype.unshift.call(arguments,3);this.log.apply(this,arguments)}debug(a){Array.prototype.unshift.call(arguments,4);this.log.apply(this,arguments)}warn(a){Array.prototype.unshift.call(arguments,2);this.log.apply(this,arguments)}error(a){Array.prototype.unshift.call(arguments,1);this.log.apply(this,arguments)}Fh(a){return a?
355
+ this.tag?new _.S(this.tag+"."+a):new _.S(a):this}};_.w("clpp.log.Logger",_.S);_.S.prototype.createChild=_.S.prototype.Fh;_.S.prototype.error=_.S.prototype.error;_.S.prototype.warn=_.S.prototype.warn;_.S.prototype.debug=_.S.prototype.debug;_.S.prototype.info=_.S.prototype.info;_.S.prototype.log=_.S.prototype.log;var ph=new _.S("clpp");_.w("clpp.log.info",_.qh);_.w("clpp.log.debug",_.rh);_.w("clpp.log.warn",_.A);_.w("clpp.log.error",_.sh);var es;es=class{constructor(a,b){this.ob=a;this.sourceIndex=b}};_.uh=new _.S("clpp.players");_.th={};_.Si={IDLE:0,STOPPING:1,qj:2,ERROR:3,READY:4,SEEKING:5,BUFFERING:6,PLAY:7,PLAYING:8,rj:9,PAUSED:10,ENDED:11};_.w("clpp.events.ERROR",_.Sd);_.w("clpp.events.LOADEDMETADATA",_.le);_.w("clpp.events.BUFFERING_ENDED",_.Nc);_.w("clpp.events.BUFFERING_STARTED",_.Oc);_.w("clpp.events.STATE_CHANGED",Lf);_.w("clpp.events.AUDIO_TRACK_CHANGED",_.Jc);_.w("clpp.events.TEXT_TRACK_CHANGED",_.Vf);_.w("clpp.events.VIDEO_TRACK_CHANGED",_.sg);_.w("clpp.events.BITRATE_CHANGED",_.Lc);_.w("clpp.events.TRACKS_ADDED",_.ag);_.w("clpp.events.TRACKS_REMOVED","tracksremoved");_.w("clpp.events.LOAD_START",me);
356
356
  _.w("clpp.events.RELEASING",_.tf);_.w("clpp.events.RELEASED",sf);_.w("clpp.events.DESTROYING","destroying");_.w("clpp.events.DESTROYED","destroyed");_.w("clpp.events.VIDEO_BUFFER_CHANGED",_.rg);_.w("clpp.events.AUDIO_BUFFER_CHANGED",_.Ic);_.w("clpp.events.DRM_SESSION_CREATED",Id);_.w("clpp.events.DRM_SESSION_UPDATE",_.Kd);_.w("clpp.events.DRM_SESSION_PERSISTED",_.Jd);_.w("clpp.events.DRM_RENEWAL_STARTED",Hd);_.w("clpp.events.DRM_EXPIRATION_UPDATE",_.Fd);_.w("clpp.events.DRM_LICENSE_REQUESTED",Gd);
357
- _.w("clpp.events.AUTOPLAY_NOT_ALLOWED",_.Kc);_.w("clpp.events.PLAY",_.Re);_.w("clpp.events.SEEKING",_.Df);_.w("clpp.events.SEEKED",_.Cf);_.w("clpp.events.USER_SEEKING",_.kg);_.w("clpp.events.USER_SEEKED",_.jg);var Oi={SEEKING:1,NO_DATA:2};_.w("clpp.events.BufferingReasons",Oi);_.w("clpp.events.ADS_TIMELINE_CHANGED",_.oc);_.w("clpp.events.AD_LOADED",_.bc);_.w("clpp.events.AD_BREAK_STARTED",_.Sb);_.w("clpp.events.AD_STARTED",_.kc);_.w("clpp.events.AD_BUFFERING",_.Ub);_.w("clpp.events.AD_PROGRESS",_.ec);
358
- _.w("clpp.events.AD_FIRST_QUARTILE",_.Xb);_.w("clpp.events.AD_MIDPOINT",_.cc);_.w("clpp.events.AD_THIRD_QUARTILE",_.mc);_.w("clpp.events.AD_PAUSED",_.dc);_.w("clpp.events.AD_RESUMED",_.fc);_.w("clpp.events.AD_SKIPPED",_.ic);_.w("clpp.events.AD_CLICKED",_.Vb);_.w("clpp.events.AD_IMPRESSION",_.ac);_.w("clpp.events.AD_COMPLETED",_.Wb);_.w("clpp.events.AD_STOPPED",_.lc);_.w("clpp.events.AD_BREAK_STOPPED",_.Tb);_.w("clpp.events.AD_HLS_ASSET_LIST_REQUEST",Yb);
357
+ _.w("clpp.events.AUTOPLAY_NOT_ALLOWED",_.Kc);_.w("clpp.events.PLAY",_.Re);_.w("clpp.events.SEEKING",_.Df);_.w("clpp.events.SEEKED",_.Cf);_.w("clpp.events.USER_SEEKING",_.kg);_.w("clpp.events.USER_SEEKED",_.jg);var Pi={SEEKING:1,NO_DATA:2};_.w("clpp.events.BufferingReasons",Pi);_.w("clpp.events.ADS_TIMELINE_CHANGED",_.oc);_.w("clpp.events.AD_LOADED",_.bc);_.w("clpp.events.AD_BREAK_STARTED",_.Sb);_.w("clpp.events.AD_STARTED",_.jc);_.w("clpp.events.AD_BUFFERING",_.Ub);_.w("clpp.events.AD_PROGRESS",_.ec);
358
+ _.w("clpp.events.AD_FIRST_QUARTILE",_.Xb);_.w("clpp.events.AD_MIDPOINT",_.cc);_.w("clpp.events.AD_THIRD_QUARTILE",_.mc);_.w("clpp.events.AD_PAUSED",_.dc);_.w("clpp.events.AD_RESUMED",_.fc);_.w("clpp.events.AD_SKIPPED",_.gc);_.w("clpp.events.AD_CLICKED",_.Vb);_.w("clpp.events.AD_IMPRESSION",_.ac);_.w("clpp.events.AD_COMPLETED",_.Wb);_.w("clpp.events.AD_STOPPED",_.lc);_.w("clpp.events.AD_BREAK_STOPPED",_.Tb);_.w("clpp.events.AD_HLS_ASSET_LIST_REQUEST",Yb);
359
359
  _.w("clpp.events.AD_HLS_ASSET_LIST_RESPONSE",Zb);_.w("clpp.events.AD_HLS_RESOLVED",$b);_.w("clpp.events.SIMID_CREATIVE_STARTED",_.Ff);_.w("clpp.events.SIMID_CREATIVE_STOPPED",_.Gf);_.w("clpp.events.CASTING_STARTED",_.Rc);_.w("clpp.events.CASTING_ENDED","castingended");_.w("clpp.events.CAST_STATUS_CHANGED",_.Sc);_.w("clpp.events.CAST_VISIBILITY_CHANGED",_.Tc);_.w("clpp.events.AIRPLAY_STATUS_CHANGED",_.rc);_.w("clpp.events.AIRPLAY_CASTING_STARTED",_.qc);_.w("clpp.events.AIRPLAY_CASTING_ENDED",_.pc);
360
360
  _.w("clpp.events.TIMELINE_CUE_ADDED",_.Wf);_.w("clpp.events.TIMELINE_CUE_ENTER",_.Xf);_.w("clpp.events.TIMELINE_CUE_EXIT",_.Yf);_.w("clpp.events.TIMELINE_CUES_CHANGED",_.Zf);_.w("clpp.events.MPD_TYPE_CHANGED",_.ve);_.w("clpp.events.LIVE_TURNED_STATIC",_.ie);_.w("clpp.events.VIMOND_RESPONSE",_.tg);_.w("clpp.events.PLAYLIST_ITEM_CHANGED",_.df);_.w("clpp.events.PLAYLIST_MODIFIED",_.ef);_.w("clpp.events.SC_PLAYLIST_TIMELINE_CHANGED",_.Bf);_.w("clpp.events.SC_PLAYLIST_ITEM_CHANGED",_.zf);
361
- _.w("clpp.events.SC_PLAYLIST_ENDED",_.yf);_.w("clpp.events.SC_PLAYLIST_LIVE_TURNED_STATIC",_.Af);_.w("clpp.events.CDN_SWITCH_SUCCESS",_.Uc);_.w("clpp.events.ONLINE_STATUS_CHANGED",Je);_.w("clpp.events.CMSD_EVENT","cmsd-event");_.w("clpp.events.YOSPACE_SESSION_STARTED",_.Lg);_.w("clpp.events.YOSPACE_SESSION_ENDED",_.Kg);_.Pt=class{constructor(a){this.f=a;this.a=null}la(a){return xh(this,a,!1)}Gb(a){return xh(this,a,!0)}stop(){this.a&&(this.a(),this.a=null)}};_.Jh=class{constructor(a){this.f=a;this.a=null}Ef(){this.stop();this.f();return this}la(a){this.stop();this.a=(new _.Pt(()=>{this.f()})).la(a);return this}Gb(a){this.stop();this.a=(new _.Pt(()=>{this.f()})).Gb(a);return this}stop(){this.a&&(this.a.stop(),this.a=null)}};_.w("clpp.utils.Timer",_.Jh);_.Jh.prototype.stop=_.Jh.prototype.stop;_.Jh.prototype.tickEvery=_.Jh.prototype.Gb;_.Jh.prototype.tickAfter=_.Jh.prototype.la;_.Jh.prototype.tickNow=_.Jh.prototype.Ef;var Qt=class{constructor(){this.Kc=null;this.f=[];this.h=[];this.Ya=new _.S(fd);this.a=null;this.j=!1}load(a){const b=this;return _.v(function*(){b.Kc?yield Bh(b,c=>_.v(function*(){yield c.open(a)})):b.Ya.warn("No main player, cannot load.")})}Wi(a){this.j=a;this.Ya.info("Looping set to",a)}sh(a){this.f.push(a)}rh(a){if(this.Kc)this.Ya.warn("Main player already set.");else{this.Kc=a;var b=this.o.bind(this),c=this.w.bind(this),d=this.l.bind(this);a.on(_.bf,b);a.on(_.$f,c);a.on(_.Rd,d);this.h.push(()=>
362
- {a.off(_.bf,b);a.off(_.$f,c);a.off(_.Rd,d)})}}clear(){this.Kc=null;this.f=[];this.h.forEach(a=>a());this.h=[]}l(){const a=this;return _.v(function*(){a.j&&(a.Ya.info("Looping playback."),yield Bh(a,b=>_.v(function*(){yield b.setPosition(0);yield b.play()})))})}o(a){this.a||(a=a.detail.currentState,8===a?(this.Ya.info("Mirroring playing."),Ch(this,b=>_.v(function*(){yield b.play()}))):[10,6,3].includes(a)&&(this.Ya.info("Mirroring paused/buffering/error."),Ch(this,b=>{const c=this;return _.v(function*(){var d=
363
- Math.round(c.Kc.getPosition())-.1;yield b.setPosition(d);yield yh(.2);d=b.getPlayerState();if(8===d||6===d)yield b.pause()})})))}w(){this.a||Ch(this,a=>{const b=this;return _.v(function*(){a.isPaused()&&(yield a.play());const c=b.Kc.getPosition();var d=a.getPosition();d=c-d;const e=Math.abs(d),f=a.lc();if(!(8!==a.getPlayerState()||.05>=e)){var g=Math.abs(d);g=Math.min(Math.max(1+(.05>=g?0:g/(1>g?6:3))*Math.sign(d),.2),5);5<=e?(a.qd(1),yield a.setPosition(c)):f===g?1!==g&&b.Ya.info(`Delta ${d.toFixed(1)} s.`):
364
- (1===g?b.Ya.info("Secondary caught up."):1>g?b.Ya.info("Secondary slowing down to catch up. "+`Rate: ${g.toFixed(1)}, delta: ${d.toFixed(1)} s`):1<g&&b.Ya.info("Secondary speeding up to catch up. "+`Rate: ${g.toFixed(1)}, delta: ${d.toFixed(1)} s`),a.qd(g))}})})}};_.w(fd,Qt);Qt.prototype.clear=Qt.prototype.clear;Qt.prototype.addMainPlayer=Qt.prototype.rh;Qt.prototype.addSecondaryPlayer=Qt.prototype.sh;Qt.prototype.setLoop=Qt.prototype.Wi;Qt.prototype.load=Qt.prototype.load;var Rt,T;_.J=class extends Error{constructor(a,b,c,d,e,f){super(Dh(a,b,c,d));this.severity=a;this.category=b;this.code=c;this.svtaCode=f||T.get(c)||Rt;this.data=!d||_.dh(d)?{}:d;this.cause=void 0===e?null:e;this.f=!1;Error.captureStackTrace&&Error.captureStackTrace(this,_.J)}a(a){this.severity!==a&&(this.severity=a,this.message=Dh(this.severity,this.category,this.code,this.data))}toString(){let a=this.message;this.cause&&(a+=`\n Caused by ${this.cause}`);return a}};_.w("clpp.Error",_.J);_.C=2;
361
+ _.w("clpp.events.SC_PLAYLIST_ENDED",_.yf);_.w("clpp.events.SC_PLAYLIST_LIVE_TURNED_STATIC",_.Af);_.w("clpp.events.CDN_SWITCH_SUCCESS",_.Uc);_.w("clpp.events.ONLINE_STATUS_CHANGED",Je);_.w("clpp.events.CMSD_EVENT","cmsd-event");_.w("clpp.events.YOSPACE_SESSION_STARTED",_.Lg);_.w("clpp.events.YOSPACE_SESSION_ENDED",_.Kg);var Qt=class{constructor(){this.Rb=null;this.f=[];this.h=[];this.Ea=new _.S(fd);this.a=null;this.j=!1}load(a){const b=this;return _.v(function*(){b.Rb?yield zh(b,c=>_.v(function*(){yield c.open(a)})):b.Ea.warn("No main player, cannot load.")})}Wi(a){this.j=a;this.Ea.info("Looping set to",a)}sh(a){this.f.push(a)}rh(a){if(this.Rb)this.Ea.warn("Main player already set.");else{this.Rb=a;var b=this.A.bind(this),c=this.o.bind(this),d=this.w.bind(this),e=this.B.bind(this),f=this.l.bind(this);a.on(_.bf,b);
362
+ a.on(_.dc,c);a.on(_.fc,d);a.on(_.$f,e);a.on(_.Rd,f);this.h.push(()=>{a.off(_.bf,b);a.off(_.dc,c);a.off(_.fc,d);a.off(_.$f,e);a.off(_.Rd,f)})}}clear(){this.Rb=null;this.f=[];this.h.forEach(a=>a());this.h=[]}l(){const a=this;return _.v(function*(){a.j&&(a.Ea.info("Looping playback."),yield zh(a,b=>_.v(function*(){yield b.setPosition(0);yield b.play()})))})}A(a){this.a||Ah(this.Rb)||(a=a.detail.currentState,8===a?(this.Ea.info("Mirroring playing."),Bh(this,b=>_.v(function*(){yield b.play()}))):[10,6,
363
+ 3].includes(a)&&(this.Ea.info("Mirroring paused/buffering/error."),Bh(this,b=>_.v(function*(){const c=b.getPlayerState();if(8===c||6===c)yield b.pause()}))))}o(){!this.a&&Ah(this.Rb)&&(this.Ea.info("Mirroring ad paused."),Bh(this,a=>_.v(function*(){yield a.pause()})))}w(){!this.a&&Ah(this.Rb)&&(this.Ea.info("Mirroring ad resumed."),Bh(this,a=>_.v(function*(){yield a.play()})))}B(){this.a||this.Rb.Ka()||Bh(this,a=>{const b=this;return _.v(function*(){if(!a.Ka()){a.isPaused()&&(yield a.play());var c=
364
+ b.Rb.getPosition(),d=a.getPosition();d=c-d;var e=Math.abs(d),f=a.mc();if(!(8!==a.getPlayerState()||.05>=e)){var g=Math.abs(d);g=Math.min(Math.max(1+(.05>=g?0:g/(1>g?6:3))*Math.sign(d),.2),5);5<=e?(a.qd(1),yield a.setPosition(c)):f===g?1!==g&&b.Ea.info(`Delta ${d.toFixed(1)} s.`):(1===g?b.Ea.info("Secondary caught up."):1>g?b.Ea.info("Secondary slowing down to catch up. "+`Rate: ${g.toFixed(1)}, delta: ${d.toFixed(1)} s`):1<g&&b.Ea.info("Secondary speeding up to catch up. "+`Rate: ${g.toFixed(1)}, delta: ${d.toFixed(1)} s`),
365
+ a.qd(g))}}})})}};_.w(fd,Qt);Qt.prototype.clear=Qt.prototype.clear;Qt.prototype.addMainPlayer=Qt.prototype.rh;Qt.prototype.addSecondaryPlayer=Qt.prototype.sh;Qt.prototype.setLoop=Qt.prototype.Wi;Qt.prototype.load=Qt.prototype.load;var Rt,T;_.J=class extends Error{constructor(a,b,c,d,e,f){super(Ch(a,b,c,d));this.severity=a;this.category=b;this.code=c;this.svtaCode=f||T.get(c)||Rt;this.data=!d||_.dh(d)?{}:d;this.cause=void 0===e?null:e;this.f=!1;Error.captureStackTrace&&Error.captureStackTrace(this,_.J)}a(a){this.severity!==a&&(this.severity=a,this.message=Ch(this.severity,this.category,this.code,this.data))}toString(){let a=this.message;this.cause&&(a+=`\n Caused by ${this.cause}`);return a}};_.w("clpp.Error",_.J);_.C=2;
365
366
  _.J.Severity={RECOVERABLE:1,FATAL:_.C};_.J.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,PLUGIN:9,ADS:10};
366
367
  _.J.Code={UNSUPPORTED_SCHEME:1E3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,REQUEST_MODIFIER_ERROR:1006,RESPONSE_MODIFIER_ERROR:1007,MALFORMED_TEST_URI:1008,MALFORMED_URL:1011,INVALID_TEXT_HEADER:2E3,INVALID_TEXT_CUE:2001,INVALID_XML:2005,INVALID_MP4_TTML:2007,INVALID_MP4_VTT:2008,FETCH_OR_APPEND_ERROR:2010,INVALID_MP4:2011,TEXT_PARSER_MISSING:2012,THUMBNAILS_FAILED_TO_LOAD:2013,THUMBNAIL_ERROR:2014,BUFFER_READ_OUT_OF_BOUNDS:3E3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,
367
368
  EBML_BAD_FLOATING_POINT_SIZE:3003,MP4_SIDX_WRONG_BOX_TYPE:3004,MP4_SIDX_INVALID_TIMESCALE:3005,MP4_SIDX_TYPE_NOT_SUPPORTED:3006,WEBM_CUES_ELEMENT_MISSING:3007,WEBM_EBML_HEADER_ELEMENT_MISSING:3008,WEBM_SEGMENT_ELEMENT_MISSING:3009,WEBM_INFO_ELEMENT_MISSING:3010,WEBM_DURATION_ELEMENT_MISSING:3011,WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING:3012,WEBM_CUE_TIME_ELEMENT_MISSING:3013,MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,TRANSMUXING_FAILED:3018,
@@ -371,58 +372,58 @@ SMOOTH_EMPTY_PRESENTATION:4034,SMOOTH_MEDIA_PROCESSING_ERROR:4035,SMOOTH_INVALID
371
372
  NO_RECOGNIZED_KEY_SYSTEMS:6E3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,FAILED_TO_CREATE_CDM:6002,FAILED_TO_ATTACH_TO_VIDEO:6003,INVALID_SERVER_CERTIFICATE:6004,FAILED_TO_CREATE_SESSION:6005,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,REQUESTED_DRM_ENVIRONMENT_UNAVAILABLE:6015,INIT_DATA_TRANSFORM_ERROR:6016,CERTIFICATE_REQUEST_FAILED:6100,
372
373
  NO_CONTENT_ID:6101,SERVER_CERTIFICATE_REQUIRED:6102,EXTRACT_CONTENT_ID_MODIFIER_ERROR:6103,FAILED_TO_PERSIST_SESSION:6200,FAILED_TO_REMOVE_SESSION:6201,INVALID_SESSION_STORAGE_IMPLEMENTATION:6202,LOAD_INTERRUPTED:7E3,OPERATION_ABORTED:7001,CANNOT_LOAD_SOURCE:7003,MEDIA_ELEMENT_NOT_FOUND:7004,INVALID_MEDIA_ELEMENT:7005,INVALID_CONTAINER_ELEMENT:7006,INVALID_ARGUMENT:7007,WRONG_ORDER_OF_OPERATIONS:7008,NOT_SUPPORTED:7009,INVALID_CONFIGURATION:7100,INVALID_LICENSE:7101,NO_ELEMENT:7102,USER_ID_NOT_PROVIDED:7103,
373
374
  KEY_LOAD_ERROR:7104,TIZEN_INTERNAL_ERROR:7200,CAF_INTERNAL_ERROR:7300,INTERNAL_CAST_ERROR:8E3,CAST_API_NOT_READY:8001,NO_RECEIVERS_AVAILABLE:8002,ALREADY_CASTING:8003,NO_CAST_SESSION:8004,CONVIVA_SDK_NOT_LOADED:9E3,CONVIVA_INVALID_CONFIGURATION:9001,CONVIVA_RUNTIME_ERROR:9002,GL_CONTEXT_ERROR:9003,GL_SHADER_ERROR:9004,YOUBORA_SDK_MISSING:9100,YOUBORA_INVALID_CONFIGURATION:9101,YOUBORA_SDK_VERSION_NOT_SUPPORTED:9102,VIMOND_INVALID_CONFIGURATION:9200,VIMOND_SESSION_ERROR:9201,MUXDATA_INVALID_CONFIGURATION:9300,
374
- MUX_SDK_MISSING:9301,MUXDATA_INIT_ERROR:9302,IMA_SDK_MISSING:1E4,IMA_INVALID_CONFIGURATION:10001,IMA_UNSUPPORTED_PLATFORM:10002,AD_ERROR:10003,SIMID_CONTAINER_MISSING:10100,BROADPEAK_SDK_MISSING:11E3,BROADPEAK_SESSION_ERROR:11001,FREEWHEEL_SDK_MISSING:12E3,FREEWHEEL_INVALID_CONFIGURATION:12001,CONTENT_TRANSFORMATION_FAILED:14E3,SESSIONS_INVALID_CONFIGURATION:15E3};_.vj=class extends Error{constructor(a,b){super(a);this.code=b}};Rt=999;T=new Map;T.set(1E3,3E3);T.set(1002,3E3);T.set(1003,3002);
375
+ MUX_SDK_MISSING:9301,MUXDATA_INIT_ERROR:9302,IMA_SDK_MISSING:1E4,IMA_INVALID_CONFIGURATION:10001,IMA_UNSUPPORTED_PLATFORM:10002,AD_ERROR:10003,SIMID_CONTAINER_MISSING:10100,BROADPEAK_SDK_MISSING:11E3,BROADPEAK_SESSION_ERROR:11001,FREEWHEEL_SDK_MISSING:12E3,FREEWHEEL_INVALID_CONFIGURATION:12001,CONTENT_TRANSFORMATION_FAILED:14E3,SESSIONS_INVALID_CONFIGURATION:15E3};_.wj=class extends Error{constructor(a,b){super(a);this.code=b}};Rt=999;T=new Map;T.set(1E3,3E3);T.set(1002,3E3);T.set(1003,3002);
375
376
  T.set(1004,3005);T.set(1006,9900);T.set(1007,9900);T.set(1011,3005);T.set(2E3,5001);T.set(2001,5001);T.set(2005,5001);T.set(2007,5001);T.set(2008,5001);T.set(2010,5001);T.set(2011,5001);T.set(2012,1006);T.set(2013,9900);T.set(2014,9900);T.set(3E3,2006);T.set(3001,2006);T.set(3002,2006);T.set(3003,2006);T.set(3004,2006);T.set(3005,2006);T.set(3006,2006);T.set(3007,2006);T.set(3008,2006);T.set(3009,2006);T.set(3010,2006);T.set(3011,2006);T.set(3012,2006);T.set(3013,2006);T.set(3014,2007);
376
377
  T.set(3015,9900);T.set(3016,2007);T.set(3017,2025);T.set(3018,2021);T.set(3019,2006);T.set(3100,1001);T.set(3101,9900);T.set(3103,4020);T.set(3201,9900);T.set(4E3,2005);T.set(4001,1002);T.set(4002,1002);T.set(4003,1002);T.set(4004,1002);T.set(4005,1002);T.set(4006,1E3);T.set(4007,1002);T.set(4008,1002);T.set(4009,1004);T.set(4010,1002);T.set(4011,2011);T.set(4012,4E3);T.set(4014,1002);T.set(4015,1002);T.set(4016,1002);T.set(4017,1002);T.set(4018,1002);T.set(4020,1002);T.set(4021,1002);
377
378
  T.set(4023,1002);T.set(4024,1002);T.set(4025,1002);T.set(4026,4008);T.set(4027,1004);T.set(4028,1002);T.set(4030,2006);T.set(4032,1004);T.set(4033,2005);T.set(4034,1002);T.set(4035,2006);T.set(4036,1002);T.set(4037,1002);T.set(4038,1002);T.set(4039,2006);T.set(4040,5E3);T.set(4041,1004);T.set(4042,2005);T.set(4043,1002);T.set(4044,1002);T.set(4045,2039);T.set(4047,2E3);T.set(4048,2E3);T.set(5005,1004);T.set(5006,2E3);T.set(6E3,4008);T.set(6001,4010);T.set(6002,4010);T.set(6003,4010);T.set(6004,4013);
378
379
  T.set(6005,4014);T.set(6006,4021);T.set(6007,4004);T.set(6008,4016);T.set(6010,4015);T.set(6012,4E3);T.set(6013,4017);T.set(6014,4003);T.set(6015,4015);T.set(6016,4E3);T.set(6100,4013);T.set(6101,4015);T.set(6102,4013);T.set(6103,4E3);T.set(6200,4017);T.set(6201,4017);T.set(6202,4017);T.set(7E3,9900);T.set(7001,9900);T.set(7003,1004);T.set(7004,9900);T.set(7005,9900);T.set(7006,9900);T.set(7007,9900);T.set(7008,9900);T.set(7009,9900);T.set(7100,9900);T.set(7101,9900);T.set(7102,9900);T.set(7103,9900);
379
- T.set(7200,9900);T.set(7300,6E3);T.set(8E3,6E3);T.set(8001,6E3);T.set(8002,6003);T.set(8003,6008);T.set(8004,6005);T.set(9E3,9900);T.set(9001,9900);T.set(9002,9900);T.set(9003,9900);T.set(9004,9900);T.set(9100,9900);T.set(9101,9900);T.set(9102,9900);T.set(9200,9900);T.set(9201,9900);T.set(9300,9900);T.set(9301,9900);T.set(9302,9900);T.set(1E4,7E3);T.set(10001,7E3);T.set(10002,7E3);T.set(10003,7E3);T.set(10100,7E3);T.set(11E3,9900);T.set(11001,9900);T.set(12E3,9900);T.set(12001,9900);T.set(14E3,4E3);_.H=class{constructor(a,b){if(b)for(const c in b)this[c]=b[c];this.defaultPrevented=this.cancelable=this.bubbles=!1;this.timeStamp=window.performance&&window.performance.now?window.performance.now():Date.now();this.type=a;this.isTrusted=!1;this.target=this.currentTarget=null;this.stopped=this.a=!1}preventDefault(){this.cancelable&&(this.defaultPrevented=!0)}stopImmediatePropagation(){this.stopped=!0}stopPropagation(){}};_.St=class{constructor(){this.a={}}push(a,b){a in this.a?this.a[a].push(b):this.a[a]=[b]}get(a){return(a=this.a[a])?a.slice():[]}remove(a,b){a=this.a[a];if(!a)return!1;let c=!1;for(let d=0;d<a.length;++d)a[d]===b&&(a.splice(d,1),--d,c=!0);return c}clear(){this.a={}}forEach(a){for(const b in this.a)a(b,this.a[b])}};var Tt;_.Ut=class{constructor(){this.a=new _.St}release(){_.Fh(this)}on(a,b,c,d=!1){a=new Tt(a,b,c,d);this.a.push(b,a)}one(a,b,c){const d=e=>{this.off(a,b,d);return c(e)};this.on(a,b,d)}off(a,b,c){const d=this.a.get(b)||[];for(let e=0;e<d.length;++e){const f=d[e];f.target!==a||c!==f.a&&c||(Eh(f),this.a.remove(b,f))}}};Tt=class{constructor(a,b,c,d){this.target=a;this.type=b;this.a=c;this.f=d;this.target.addEventListener(b,c,d)}};var Vt=class{};_.w(ld,Vt);Vt.getInfo=_.li;
380
- var Ih=null,Hh=null,ai=new _.S(ld),ei="android",di="ios",ji="linux",fi="osx",gi="windows",hi="tizen",ii="webos",ci=_.fg,ki=_.fg,Vh={windows:{os_version:/windows\s+?nt\s([\d.]+)/i,edge:/windows\s+?nt.+?edge?\/([\d.]+)/i,chrome:/windows\s+?nt.+?chrome\/([\d.]+)/i,firefox:/windows\s+?nt.+?firefox\/([\d.]+)/i,opera:/windows\s+?nt.+?opr\/([\d.]+)/i},osx:{os_version:/macintosh.+?([\d._]+)/i,safari:/macintosh.+?version\/([\d._]+).+?safari/i,edge:/macintosh.+?edge?\/([\d._]+)/i,chrome:/macintosh.+?chrome\/([\d._]+)/i,
380
+ T.set(7200,9900);T.set(7300,6E3);T.set(8E3,6E3);T.set(8001,6E3);T.set(8002,6003);T.set(8003,6008);T.set(8004,6005);T.set(9E3,9900);T.set(9001,9900);T.set(9002,9900);T.set(9003,9900);T.set(9004,9900);T.set(9100,9900);T.set(9101,9900);T.set(9102,9900);T.set(9200,9900);T.set(9201,9900);T.set(9300,9900);T.set(9301,9900);T.set(9302,9900);T.set(1E4,7E3);T.set(10001,7E3);T.set(10002,7E3);T.set(10003,7E3);T.set(10100,7E3);T.set(11E3,9900);T.set(11001,9900);T.set(12E3,9900);T.set(12001,9900);T.set(14E3,4E3);_.H=class{constructor(a,b){if(b)for(const c in b)this[c]=b[c];this.defaultPrevented=this.cancelable=this.bubbles=!1;this.timeStamp=window.performance&&window.performance.now?window.performance.now():Date.now();this.type=a;this.isTrusted=!1;this.target=this.currentTarget=null;this.stopped=this.a=!1}preventDefault(){this.cancelable&&(this.defaultPrevented=!0)}stopImmediatePropagation(){this.stopped=!0}stopPropagation(){}};_.St=class{constructor(){this.a={}}push(a,b){a in this.a?this.a[a].push(b):this.a[a]=[b]}get(a){return(a=this.a[a])?a.slice():[]}remove(a,b){a=this.a[a];if(!a)return!1;let c=!1;for(let d=0;d<a.length;++d)a[d]===b&&(a.splice(d,1),--d,c=!0);return c}clear(){this.a={}}forEach(a){for(const b in this.a)a(b,this.a[b])}};var Tt;_.Ut=class{constructor(){this.a=new _.St}release(){_.Eh(this)}on(a,b,c,d=!1){a=new Tt(a,b,c,d);this.a.push(b,a)}one(a,b,c){const d=e=>{this.off(a,b,d);return c(e)};this.on(a,b,d)}off(a,b,c){const d=this.a.get(b)||[];for(let e=0;e<d.length;++e){const f=d[e];f.target!==a||c!==f.a&&c||(Dh(f),this.a.remove(b,f))}}};Tt=class{constructor(a,b,c,d){this.target=a;this.type=b;this.a=c;this.f=d;this.target.addEventListener(b,c,d)}};_.Vt=class{constructor(a){this.f=a;this.a=null}la(a){return Gh(this,a,!1)}Hb(a){return Gh(this,a,!0)}stop(){this.a&&(this.a(),this.a=null)}};_.Kh=class{constructor(a){this.f=a;this.a=null}Ef(){this.stop();this.f();return this}la(a){this.stop();this.a=(new _.Vt(()=>{this.f()})).la(a);return this}Hb(a){this.stop();this.a=(new _.Vt(()=>{this.f()})).Hb(a);return this}stop(){this.a&&(this.a.stop(),this.a=null)}};_.w("clpp.utils.Timer",_.Kh);_.Kh.prototype.stop=_.Kh.prototype.stop;_.Kh.prototype.tickEvery=_.Kh.prototype.Hb;_.Kh.prototype.tickAfter=_.Kh.prototype.la;_.Kh.prototype.tickNow=_.Kh.prototype.Ef;var Wt=class{};_.w(ld,Wt);Wt.getInfo=_.mi;
381
+ var Jh=null,Ih=null,bi=new _.S(ld),fi="android",ei="ios",ki="linux",gi="osx",hi="windows",ii="tizen",ji="webos",di=_.fg,li=_.fg,Wh={windows:{os_version:/windows\s+?nt\s([\d.]+)/i,edge:/windows\s+?nt.+?edge?\/([\d.]+)/i,chrome:/windows\s+?nt.+?chrome\/([\d.]+)/i,firefox:/windows\s+?nt.+?firefox\/([\d.]+)/i,opera:/windows\s+?nt.+?opr\/([\d.]+)/i},osx:{os_version:/macintosh.+?([\d._]+)/i,safari:/macintosh.+?version\/([\d._]+).+?safari/i,edge:/macintosh.+?edge?\/([\d._]+)/i,chrome:/macintosh.+?chrome\/([\d._]+)/i,
381
382
  firefox:/macintosh.+?firefox\/([\d._]+)/i,opera:/macintosh.+?opr\/([\d._]+)/i},unknown:{edge:/.+?edge?\/([\d.]+)/i,safari:/.+?version\/([\d._]+).+?safari/i,chrome:/.+?chrome\/([\d._]+)/i,firefox:/.+?firefox\/([\d._]+)/i,opera:/.+?opr\/([\d._]+)/i},android:{os_version:/android.+?([\d._]+)/i,chrome:/android.+?chrome\/([\d._]+)/i,firefox:/android.+?firefox\/([\d._]+)/i,opera:/android.+?opr\/([\d._]+)/i},ios:{os_version:/(?:iPad|iPhone).+?([\d._]+)/i,chrome:/.+?CriOS\/([\d._]+)/i,firefox:/.+?FxiOS\/([\d._]+)/i,
382
383
  safari:/.+?version\/([\d._]+).+?safari/i,opera:/.+?opr\/([\d._]+)/i},linux:{os_version:/linux.+?([\d._]+)/i,safari:/linux.+?version\/([\d._]+).+?safari/i,chrome:/linux.+?chrome\/([\d._]+)/i,firefox:/linux.+?firefox\/([\d._]+)/i,opera:/linux.+?opr\/([\d._]+)/i},tizen:{os_version:/tizen.+?([\d._]+)/i,safari:/linux.+?version\/([\d._]+).+?safari/i,chrome:/linux.+?chrome\/([\d._]+)/i,firefox:/linux.+?firefox\/([\d._]+)/i,opera:/linux.+?opr\/([\d._]+)/i},webos:{os_version:/linux.+?([\d._]+)/i,safari:/linux.+?version\/([\d._]+).+?safari/i,
383
- chrome:/linux.+?chrome\/([\d._]+)/i,firefox:/linux.+?firefox\/([\d._]+)/i,opera:/linux.+?opr\/([\d._]+)/i}};var Wt=class{};_.w("clpp.utils.BufferUtils",Wt);Wt.toArrayBuffer=ti;Wt.toDataView=_.si;Wt.toInt32Array=_.ri;Wt.toUint32Array=qi;Wt.toUint16Array=pi;Wt.toUint8Array=_.E;Wt.equal=ni;var wi=new _.S("clpp.utils.strings");_.w("clpp.utils.strings.fromUtf8",_.vi);_.w("clpp.utils.strings.fromBytesAutoDetect",_.yi);_.w("clpp.utils.strings.toUtf8",_.zi);_.w("clpp.utils.strings.toUtf16",_.Ai);_.w("clpp.utils.strings.toByteArray",_.Bi);_.w("clpp.utils.strings.startsWith",_.Ci);_.w("clpp.utils.strings.endsWith",_.Di);_.w("clpp.utils.strings.bitrateToString",_.Gi);
384
+ chrome:/linux.+?chrome\/([\d._]+)/i,firefox:/linux.+?firefox\/([\d._]+)/i,opera:/linux.+?opr\/([\d._]+)/i}};var Xt=class{};_.w("clpp.utils.BufferUtils",Xt);Xt.toArrayBuffer=ui;Xt.toDataView=_.ti;Xt.toInt32Array=_.si;Xt.toUint32Array=ri;Xt.toUint16Array=qi;Xt.toUint8Array=_.E;Xt.equal=oi;var xi=new _.S("clpp.utils.strings");_.w("clpp.utils.strings.fromUtf8",_.wi);_.w("clpp.utils.strings.fromBytesAutoDetect",_.zi);_.w("clpp.utils.strings.toUtf8",_.Ai);_.w("clpp.utils.strings.toUtf16",_.Bi);_.w("clpp.utils.strings.toByteArray",_.Ci);_.w("clpp.utils.strings.startsWith",_.Di);_.w("clpp.utils.strings.endsWith",_.Ei);_.w("clpp.utils.strings.bitrateToString",_.Hi);
384
385
  _.w("clpp.utils.strings.durationToString",function(a,b="%h:%mm:%ss"){if(null===a||void 0===a)a=0;if(null===b||void 0===b)b="%h:%mm:%ss";const c=Math.floor(a/3600),d=Math.floor((a-3600*c)/60);a=Math.floor(a-3600*c-60*d);const e=(g,h)=>g.length<h?e("0"+g,h):g,f=g=>(h,k)=>e(g,k.length-1);return b.replace(/(%h+)/,f(String(c))).replace(/(%m+)/,f(String(d))).replace(/(%s+)/,f(String(a)))});
385
- _.w("clpp.utils.strings.hashCode",function(a){let b=0;if(0===a.length)return b;for(let c=0;c<a.length;c++)b=(b<<5)-b+a.charCodeAt(c),b|=0;return b});var Ii=document.createElement("span");var Xt=class{constructor(a){this.g=new _.S("clpp.native.StateManager");this.m=a;this.a=new _.Ut;this.I=this.w=this.f=0;this.o=2;this.J=this.l=this.G=this.C=0;this.h=this.ga=this.B=!1;this.F=0;this.j=null;this.H=0;this.K=_.Yh();this.A=!1;this.G=Date.now();Ni(this)}getState(){return this.f}destroy(){this.g.debug("Stop watching for video events for "+this.m.namespace());this.a.release()}};var Yt=class{constructor(a){this.m=a;this.l=a.getConfiguration().streaming.addMissingTimelineCues||!1;this.j=new _.Ut;this.f=new Set;this.a=new Set;this.h=null;this.g=new _.S("clpp.native.Metadata")}release(){this.j.release();this.a=new Set;this.f.clear();null!=this.h&&(clearInterval(this.h),this.h=null)}destroy(){const a=this;return _.v(function*(){a.release()})}getTimelineCues(){return Array.from(this.a.values()).sort((a,b)=>a.startTime-b.startTime)}};_.eu=class{constructor(a,b,c,d){d=void 0===d?_.Zt:d;this.startTime=a;this.endTime=b;this.payload=c;this.payloadType=d;this.positionAlign=this.position=null;this.size=100;this.textAlign=_.$t;this.writingMode=_.au;this.lineInterpretation=_.bu;this.line=null;this.lineAlign=_.cu;this.direction=du;this.region=null;this.cssClassList=[];this.id=this.backgroundImage="";this.containerRows=null}Xc(a){return this.payload===a.payload&&this.startTime===a.startTime&&this.endTime===a.endTime&&this.payloadType===
386
- a.payloadType}};_.w("clpp.text.Cue",_.eu);_.eu.positionAlign={LEFT:_.ge,RIGHT:_.he,CENTER:_.Wc,AUTO:"auto"};_.Zt=_.Sf;_.eu.payloadType={TEXT:_.Zt,VTT_XML:_.vg,TTML_XML:_.cg};_.$t=_.Wc;_.fu={LEFT:_.de,RIGHT:_.xf,CENTER:_.$t,START:_.Kf,END:_.Qd};_.eu.textAlign=_.fu;var du="ltr";_.eu.direction={HORIZONTAL_LEFT_TO_RIGHT:du,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};_.au="horizontal-tb";_.eu.writingMode={HORIZONTAL_TOP_TO_BOTTOM:_.au,VERTICAL_LEFT_TO_RIGHT:_.ng,VERTICAL_RIGHT_TO_LEFT:_.og};_.bu=0;
387
- _.eu.lineInterpretation={LINE_NUMBER:_.bu,PERCENTAGE:1};_.cu=_.Kf;_.gu={CENTER:_.Wc,START:_.cu,END:_.Qd};_.eu.lineAlign=_.gu;_.ju=class{constructor(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=_.hu;this.scroll=iu;this.cssClassList=[];this.writingMode=this.displayAlign=null}};_.w("clpp.text.CueRegion",_.ju);_.hu=1;_.ju.units={PX:0,PERCENTAGE:_.hu,LINES:2};var iu="";
388
- _.ju.scrollMode={NONE:iu,UP:"up"};_.ju.displayAlign={BEFORE:"flex-end",CENTER:_.Wc,AFTER:"flex-start"};_.ju.writingMode={HORIZONTAL_TOP_TO_BOTTOM:_.nd,VERTICAL_LEFT_TO_RIGHT:"row-reverse",VERTICAL_RIGHT_TO_LEFT:"row"};var ku=class{constructor(a){this.h=a;this.a=new _.Ut;this.f=!1}destroy(){this.a.release();this.f=!1;return Promise.resolve()}start(a){this.f||(this.f=!0,this.a.on(a.textTracks,_.nc,b=>sj(this,b)))}j(a){const b=new _.eu(a.startTime,a.endTime,a.text,_.vg);if(_.dh(a.vertical))switch(a.vertical){case "lr":b.writingMode=_.ng;break;case "rl":b.writingMode=_.og}_.eh(a.size)&&(b.size=a.size);if(_.dh(a.align))switch(a.align){case _.de:case _.Kf:b.textAlign=_.Kf;break;case _.Wc:b.textAlign=_.$t;break;case _.xf:case _.Qd:b.textAlign=
389
- _.Qd}_.eh(a.position)&&(b.position=a.position);if(_.dh(a.positionAlign))switch(a.positionAlign){case _.ge:b.positionAlign=_.ge;break;case _.Wc:b.positionAlign=_.Wc;break;case _.he:b.positionAlign=_.he}_.eh(a.line)&&(b.line=a.line);if(_.dh(a.lineAlign))switch(a.lineAlign){case _.Kf:b.lineAlign=_.cu;break;case _.Wc:b.lineAlign=_.Wc;break;case _.Qd:b.lineAlign=_.Qd}typeof a.snapToLines===_.Mc&&(b.lineInterpretation=a.snapToLines?_.bu:1);return b}};var lu;_.Dj=class{constructor(a,b){{var c=[a];let f=yj(...c);if(!f||f.protocol.includes("."))c=b?[a,b]:[a,location.href],c=(f=yj(...c))?c:null}if(!c)throw new _.J(_.C,1,1011,{message:"The provided URL is invalid.",url:a,base:b});const [d,e]=c;this.a=new URL(d,e);this.f=a.startsWith("//")}toString(){const a=this.a.toString();return this.f?a.replace(lu,""):a}};lu=/^[A-Za-z]+:/;_.Tm=class{constructor(a){this.j=a;this.scheme=null;const b=document.createElement("a"),c=a.match(/^(.*:)(\/\/(.*))$/);let d=!1;if(c){if(this.scheme=c[1],b.href=c[2],":"===b.protocol||""===b.host&&""===b.pathname)b.href="//dummy.com/"+c[3],d=!0}else{b.href=a;if(":"===b.protocol||""===b.host&&""===b.pathname)b.href="//dummy.com/"+a.match(/\/?\/?(.*)/)[1],d=!0;this.scheme=b.protocol}""===this.scheme&&(this.scheme=window.location.protocol);this.a=d?"":b.hostname;this.port=b.port;this.path=b.pathname;
390
- _.Ci(this.path,"/")||(this.path="/"+this.path);this.f=b.search;this.h=b.hash}};_.w("clpp.utils.url.queryString",_.Aj);var Fj;_.I=_.Sf;_.mu=1/15;Fj={audio:[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4/,/^dts[cex]$/,/^iamf/,/^mhm[12]/],video:[/^avc/,/^hev/,/^hvc/,/^vvc/,/^vvi/,/^vp0?[89]/,/^av01/,/^dvh/,/^dva/,/^dav/]};Fj[_.I]=[/^vtt$/,/^wvtt/,/^stpp/];var nu;nu={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av0?1/],text:[/^vtt$/,/^wvtt/,/^stpp/]};_.yl=(a,b)=>{const c=nu[a];for(let d=0;d<c.length;d++)for(let e=0;e<b.length;e++)if(c[d].test(b[e].trim()))return b[e].trim();return a===_.I?"":null};_.ou={text:{mp4:_.uc,m4s:_.uc,m4i:_.uc,cmft:_.uc,vtt:_.Tf,ttml:_.Ac},video:{mp4:_.qg,m4s:_.qg,m4f:_.qg,m4i:_.qg,m4v:_.qg,cmfv:_.qg,ts:_.pg},audio:{mp4:_.Gc,m4s:_.Gc,m4f:_.Gc,m4i:_.Gc,m4a:_.Gc,cmfa:_.Gc,ts:_.pg,aac:_.Dc,ec3:_.Fc,ac3:_.Ec},image:{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}};_.Bl=(a,b,c)=>a.map(d=>{d=_.Ej(d)||"";return d=(d=_.ou[b][d])?d:b===_.I?c&&"vtt"!==c?_.uc:_.Tf:null}).filter(Boolean)[0]||null;_.sk=class{constructor(a,b,c,d){this.id=a;this.name=b;this.attributes=c;this.value=void 0===d?null:d}toString(){function a(d){return d.name+"\x3d"+(isNaN(Number(d.value))?'"'+d.value+'"':d.value)}let b="#"+this.name;const c=this.attributes?this.attributes.map(a):[];this.value&&c.unshift(this.value);0<c.length&&(b+=":"+c.join(","));return b}getAttribute(a){const b=this.attributes.filter(c=>c.name===a);return b.length?b[0]:null}hasAttribute(a){return null!=this.getAttribute(a)}};
391
- _.rk=class{constructor(a,b){this.name=a;this.value=b}};var Sj=new Map([["aar","aa"],["abk","ab"],["afr","af"],["aka","ak"],["alb","sq"],["amh","am"],["ara","ar"],["arg","an"],["arm","hy"],["asm","as"],["ava","av"],["ave","ae"],["aym","ay"],["aze","az"],["bak","ba"],["bam","bm"],["baq","eu"],["bel","be"],["ben","bn"],["bih","bh"],["bis","bi"],["bod","bo"],["bos","bs"],["bre","br"],["bul","bg"],["bur","my"],["cat","ca"],["ces","cs"],["cha","ch"],["che","ce"],["chi","zh"],["chu","cu"],["chv","cv"],["cor","kw"],["cos","co"],["cre","cr"],["cym","cy"],["cze",
386
+ _.w("clpp.utils.strings.hashCode",function(a){let b=0;if(0===a.length)return b;for(let c=0;c<a.length;c++)b=(b<<5)-b+a.charCodeAt(c),b|=0;return b});var Ji=document.createElement("span");var Yt=class{constructor(a){this.g=new _.S("clpp.native.StateManager");this.m=a;this.a=new _.Ut;this.I=this.w=this.f=0;this.o=2;this.J=this.l=this.G=this.C=0;this.h=this.ga=this.B=!1;this.F=0;this.j=null;this.H=0;this.K=_.Zh();this.A=!1;this.G=Date.now();Oi(this)}getState(){return this.f}destroy(){this.g.debug("Stop watching for video events for "+this.m.namespace());this.a.release()}};var Zt=class{constructor(a){this.m=a;this.l=a.getConfiguration().streaming.addMissingTimelineCues||!1;this.j=new _.Ut;this.f=new Set;this.a=new Set;this.h=null;this.g=new _.S("clpp.native.Metadata")}release(){this.j.release();this.a=new Set;this.f.clear();null!=this.h&&(clearInterval(this.h),this.h=null)}destroy(){const a=this;return _.v(function*(){a.release()})}getTimelineCues(){return Array.from(this.a.values()).sort((a,b)=>a.startTime-b.startTime)}};_.fu=class{constructor(a,b,c,d){d=void 0===d?_.$t:d;this.startTime=a;this.endTime=b;this.payload=c;this.payloadType=d;this.positionAlign=this.position=null;this.size=100;this.textAlign=_.au;this.writingMode=_.bu;this.lineInterpretation=_.cu;this.line=null;this.lineAlign=_.du;this.direction=eu;this.region=null;this.cssClassList=[];this.id=this.backgroundImage="";this.containerRows=null}Xc(a){return this.payload===a.payload&&this.startTime===a.startTime&&this.endTime===a.endTime&&this.payloadType===
387
+ a.payloadType}};_.w("clpp.text.Cue",_.fu);_.fu.positionAlign={LEFT:_.ge,RIGHT:_.he,CENTER:_.Wc,AUTO:"auto"};_.$t=_.Sf;_.fu.payloadType={TEXT:_.$t,VTT_XML:_.vg,TTML_XML:_.cg};_.au=_.Wc;_.gu={LEFT:_.de,RIGHT:_.xf,CENTER:_.au,START:_.Kf,END:_.Qd};_.fu.textAlign=_.gu;var eu="ltr";_.fu.direction={HORIZONTAL_LEFT_TO_RIGHT:eu,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};_.bu="horizontal-tb";_.fu.writingMode={HORIZONTAL_TOP_TO_BOTTOM:_.bu,VERTICAL_LEFT_TO_RIGHT:_.ng,VERTICAL_RIGHT_TO_LEFT:_.og};_.cu=0;
388
+ _.fu.lineInterpretation={LINE_NUMBER:_.cu,PERCENTAGE:1};_.du=_.Kf;_.hu={CENTER:_.Wc,START:_.du,END:_.Qd};_.fu.lineAlign=_.hu;_.ku=class{constructor(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=_.iu;this.scroll=ju;this.cssClassList=[];this.writingMode=this.displayAlign=null}};_.w("clpp.text.CueRegion",_.ku);_.iu=1;_.ku.units={PX:0,PERCENTAGE:_.iu,LINES:2};var ju="";
389
+ _.ku.scrollMode={NONE:ju,UP:"up"};_.ku.displayAlign={BEFORE:"flex-end",CENTER:_.Wc,AFTER:"flex-start"};_.ku.writingMode={HORIZONTAL_TOP_TO_BOTTOM:_.nd,VERTICAL_LEFT_TO_RIGHT:"row-reverse",VERTICAL_RIGHT_TO_LEFT:"row"};var lu=class{constructor(a){this.h=a;this.a=new _.Ut;this.f=!1}destroy(){this.a.release();this.f=!1;return Promise.resolve()}start(a){this.f||(this.f=!0,this.a.on(a.textTracks,_.nc,b=>tj(this,b)))}j(a){const b=new _.fu(a.startTime,a.endTime,a.text,_.vg);if(_.dh(a.vertical))switch(a.vertical){case "lr":b.writingMode=_.ng;break;case "rl":b.writingMode=_.og}_.eh(a.size)&&(b.size=a.size);if(_.dh(a.align))switch(a.align){case _.de:case _.Kf:b.textAlign=_.Kf;break;case _.Wc:b.textAlign=_.au;break;case _.xf:case _.Qd:b.textAlign=
390
+ _.Qd}_.eh(a.position)&&(b.position=a.position);if(_.dh(a.positionAlign))switch(a.positionAlign){case _.ge:b.positionAlign=_.ge;break;case _.Wc:b.positionAlign=_.Wc;break;case _.he:b.positionAlign=_.he}_.eh(a.line)&&(b.line=a.line);if(_.dh(a.lineAlign))switch(a.lineAlign){case _.Kf:b.lineAlign=_.du;break;case _.Wc:b.lineAlign=_.Wc;break;case _.Qd:b.lineAlign=_.Qd}typeof a.snapToLines===_.Mc&&(b.lineInterpretation=a.snapToLines?_.cu:1);return b}};var mu;_.Ej=class{constructor(a,b){{var c=[a];let f=zj(...c);if(!f||f.protocol.includes("."))c=b?[a,b]:[a,location.href],c=(f=zj(...c))?c:null}if(!c)throw new _.J(_.C,1,1011,{message:"The provided URL is invalid.",url:a,base:b});const [d,e]=c;this.a=new URL(d,e);this.f=a.startsWith("//")}toString(){const a=this.a.toString();return this.f?a.replace(mu,""):a}};mu=/^[A-Za-z]+:/;_.Um=class{constructor(a){this.j=a;this.scheme=null;const b=document.createElement("a"),c=a.match(/^(.*:)(\/\/(.*))$/);let d=!1;if(c){if(this.scheme=c[1],b.href=c[2],":"===b.protocol||""===b.host&&""===b.pathname)b.href="//dummy.com/"+c[3],d=!0}else{b.href=a;if(":"===b.protocol||""===b.host&&""===b.pathname)b.href="//dummy.com/"+a.match(/\/?\/?(.*)/)[1],d=!0;this.scheme=b.protocol}""===this.scheme&&(this.scheme=window.location.protocol);this.a=d?"":b.hostname;this.port=b.port;this.path=b.pathname;
391
+ _.Di(this.path,"/")||(this.path="/"+this.path);this.f=b.search;this.h=b.hash}};_.w("clpp.utils.url.queryString",_.Bj);var Gj;_.I=_.Sf;_.nu=1/15;Gj={audio:[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4/,/^dts[cex]$/,/^iamf/,/^mhm[12]/],video:[/^avc/,/^hev/,/^hvc/,/^vvc/,/^vvi/,/^vp0?[89]/,/^av01/,/^dvh/,/^dva/,/^dav/]};Gj[_.I]=[/^vtt$/,/^wvtt/,/^stpp/];var ou;ou={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av0?1/],text:[/^vtt$/,/^wvtt/,/^stpp/]};_.zl=(a,b)=>{const c=ou[a];for(let d=0;d<c.length;d++)for(let e=0;e<b.length;e++)if(c[d].test(b[e].trim()))return b[e].trim();return a===_.I?"":null};_.pu={text:{mp4:_.uc,m4s:_.uc,m4i:_.uc,cmft:_.uc,vtt:_.Tf,ttml:_.Ac},video:{mp4:_.qg,m4s:_.qg,m4f:_.qg,m4i:_.qg,m4v:_.qg,cmfv:_.qg,ts:_.pg},audio:{mp4:_.Gc,m4s:_.Gc,m4f:_.Gc,m4i:_.Gc,m4a:_.Gc,cmfa:_.Gc,ts:_.pg,aac:_.Dc,ec3:_.Fc,ac3:_.Ec},image:{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}};_.Cl=(a,b,c)=>a.map(d=>{d=_.Fj(d)||"";return d=(d=_.pu[b][d])?d:b===_.I?c&&"vtt"!==c?_.uc:_.Tf:null}).filter(Boolean)[0]||null;_.tk=class{constructor(a,b,c,d){this.id=a;this.name=b;this.attributes=c;this.value=void 0===d?null:d}toString(){function a(d){return d.name+"\x3d"+(isNaN(Number(d.value))?'"'+d.value+'"':d.value)}let b="#"+this.name;const c=this.attributes?this.attributes.map(a):[];this.value&&c.unshift(this.value);0<c.length&&(b+=":"+c.join(","));return b}getAttribute(a){const b=this.attributes.filter(c=>c.name===a);return b.length?b[0]:null}hasAttribute(a){return null!=this.getAttribute(a)}};
392
+ _.sk=class{constructor(a,b){this.name=a;this.value=b}};var Tj=new Map([["aar","aa"],["abk","ab"],["afr","af"],["aka","ak"],["alb","sq"],["amh","am"],["ara","ar"],["arg","an"],["arm","hy"],["asm","as"],["ava","av"],["ave","ae"],["aym","ay"],["aze","az"],["bak","ba"],["bam","bm"],["baq","eu"],["bel","be"],["ben","bn"],["bih","bh"],["bis","bi"],["bod","bo"],["bos","bs"],["bre","br"],["bul","bg"],["bur","my"],["cat","ca"],["ces","cs"],["cha","ch"],["che","ce"],["chi","zh"],["chu","cu"],["chv","cv"],["cor","kw"],["cos","co"],["cre","cr"],["cym","cy"],["cze",
392
393
  "cs"],["dan","da"],["deu","de"],[_.Ad,"dv"],["dut","nl"],["dzo","dz"],["ell","el"],["eng","en"],["epo","eo"],["est","et"],["eus","eu"],["ewe","ee"],["fao","fo"],["fas","fa"],["fij","fj"],["fin","fi"],["fra","fr"],["fre","fr"],["fry","fy"],["ful","ff"],["geo","ka"],["ger","de"],["gla","gd"],["gle","ga"],["glg","gl"],["glv","gv"],["gre","el"],["grn","gn"],["guj","gu"],["hat","ht"],["hau","ha"],["heb","he"],["her","hz"],["hin","hi"],["hmo","ho"],["hrv","hr"],["hun","hu"],["hye","hy"],["ibo","ig"],["ice",
393
394
  "is"],["ido","io"],["iii","ii"],["iku","iu"],["ile","ie"],["ina","ia"],["ind","id"],["ipk","ik"],["isl","is"],["ita","it"],["jav","jv"],["jpn","ja"],["kal","kl"],["kan","kn"],["kas","ks"],["kat","ka"],["kau","kr"],["kaz","kk"],["khm","km"],["kik","ki"],["kin","rw"],["kir","ky"],["kom","kv"],["kon","kg"],["kor","ko"],["kua","kj"],["kur","ku"],["lao","lo"],["lat","la"],["lav","lv"],["lim","li"],["lin","ln"],["lit","lt"],["ltz","lb"],["lub","lu"],["lug","lg"],["mac","mk"],["mah","mh"],["mal","ml"],["mao",
394
395
  "mi"],["mar","mr"],["may","ms"],["mkd","mk"],["mlg","mg"],["mlt","mt"],["mon","mn"],["mri","mi"],["msa","ms"],["mya","my"],["nau","na"],["nav","nv"],["nbl","nr"],["nde","nd"],["ndo","ng"],["nep","ne"],["nld","nl"],["nno","nn"],["nob","nb"],["nor","no"],["nya","ny"],["oci","oc"],["oji","oj"],["ori","or"],["orm","om"],["oss","os"],["pan","pa"],["per","fa"],["pli","pi"],["pol","pl"],["por","pt"],["pus","ps"],["que","qu"],["roh","rm"],["ron","ro"],["rum","ro"],["run","rn"],["rus","ru"],["sag","sg"],["san",
395
396
  "sa"],["sin","si"],["slk","sk"],["slo","sk"],["slv","sl"],["sme","se"],["smo","sm"],["sna","sn"],["snd","sd"],["som","so"],["sot","st"],["spa","es"],["sqi","sq"],["srd","sc"],["srp","sr"],["ssw","ss"],["sun","su"],["swa","sw"],["swe","sv"],["tah","ty"],["tam","ta"],["tat","tt"],["tel","te"],["tgk","tg"],["tgl","tl"],["tha","th"],["tib","bo"],["tir","ti"],["ton","to"],["tsn","tn"],["tso","ts"],["tuk","tk"],["tur","tr"],["twi","tw"],["uig","ug"],["ukr","uk"],["urd","ur"],["uzb","uz"],["ven","ve"],["vie",
396
- "vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);var Yj=[403,401];_.w("clpp.net.DEFAULT_FATAL_STATUS_CODES",Yj);_.w("clpp.net.makeRequest",_.ek);_.dk=6;_.w("clpp.net.RequestType",{MANIFEST:1,SEGMENT:2,LICENSE:3,APP:4,TIMING:5,OTHER:_.dk,CONTENT_STEERING:7});_.w("clpp.drm.WidevineRobustnessLevel",{SW_SECURE_CRYPTO:_.mb,SW_SECURE_DECODE:_.nb,HW_SECURE_CRYPTO:Ga,HW_SECURE_DECODE:Ha,HW_SECURE_ALL:Fa});_.w("clpp.drm.PlayreadyRobustnessLevel",{SL150:"150",SL2000:"2000",SL3000:"3000"});_.w("clpp.drm.KeySystem",{NONE:_.Be,CLEAR_KEY:_.Le,WIDEVINE:_.td,PLAYREADY:_.rd,FAIRPLAY:_.pd,PRIMETIME:_.od});_.lk={};_.w("clpp.drm.registerDrmEnvironment",_.mk);_.pu=new _.S("clpp.hls.Utils");_.qk=class{constructor(a){this.f=a;this.a=0}};_.qu=class{constructor(){this.a=[]}destroy(){const a=[];for(const b of this.a)b.V.catch(()=>{}),a.push(b.abort());this.a=[];return Promise.all(a)}};_.wk.prototype.resolve=function(){};_.wk.prototype.reject=function(){};var ru=class{constructor(a){this.f=new Uint8Array(a);this.a=0}append(a){const b=this.a+a.byteLength;if(b>this.f.byteLength){const c=this.f;this.f=new Uint8Array(Math.max(2*this.f.byteLength,b));this.f.set(c)}this.f.set(a,this.a);this.a+=a.byteLength}get(){return this.a===this.f.byteLength?this.f.buffer:this.f.buffer.slice(0,this.a)}};var su=class{constructor(a){this.o=a;this.f=this.a=this.h=0;this.j=null;this.l=-1}};var Dk=class{constructor(){this.a=Bk()}};var Jk=class{constructor(a,b){b=void 0===b?!0:b;this.a=new ru(a||1048576);this.f=new su(this.a);this.j=b;this.h=a}};var tu=class{};_.w("clpp.utils.Uint8ArrayUtils",tu);tu.toStandardBase64=_.Mk;tu.concat=_.Sk;tu.equal=_.Rk;tu.toHex=_.Qk;tu.fromHex=_.Pk;tu.fromBase64=_.Ok;tu.toBase64Url=_.Nk;_.jp=class{constructor(a,b){this.V=a;this.B=b;this.a=!1}abort(){this.a=!0;return this.B()}};var dl=class extends _.jp{constructor(a,b){super(new _.wk,()=>Promise.resolve());this.C=a;this.j=null;this.w=this.V;this.h=-1;this.f=this.l=this.o=null;this.A=b||null;Xk(this)}then(a,b){this.V=this.V.then(a,b);return this}catch(a){this.V=this.V.catch(a);return this}abort(){if(this.a)return Promise.resolve();this.a=!0;return this.j.then(a=>{this.o&&clearTimeout(this.o);this.l&&this.l();return a.abort()}).catch(()=>{})}};_.Jr=class{constructor(){this.f=[];this.a=[];this.h=[];this.w=!1;this.o=new _.qu;this.l={};this.headers=new Map;this.j=0;this.A=null;this.l.data=Uk;Yk(this)}Yi(a){0<a?_.A("Rate limit set to "+a+"bps"):_.A("Rate limit disabled");this.j=a}release(){return this.o.destroy()}destroy(){this.w=!0;this.f=[];this.a=[];this.h=[];return this.o.destroy()}Pf(a){this.f.push(a)}td(a){this.h.push(a)}Sg(a){this.f=this.f.filter(b=>b!==a)}Fe(a){this.h=this.h.filter(b=>b!==a)}fetch(a){let b=void 0;1===a.type&&(b={objectType:uu});
397
- return _.gl(this,a,b)}};_.w("clpp.net.NetworkEngine",_.Jr);_.Jr.prototype.fetch=_.Jr.prototype.fetch;_.Jr.prototype.removeResponseModifier=_.Jr.prototype.Fe;_.Jr.prototype.removeRequestModifier=_.Jr.prototype.Sg;_.Jr.prototype.addResponseModifier=_.Jr.prototype.td;_.Jr.prototype.addRequestModifier=_.Jr.prototype.Pf;_.Jr.prototype.setRateLimit=_.Jr.prototype.Yi;var kl;
398
- _.ml=class{constructor(a,b){this.id=a;this.type=b;this.roles=[];this.frameRate=this.label=this.originalLanguage=this.language=this.kind=null;this.trickPlay=!1;this.channelsCount=this.src=this.mimeType=null;this.spatialAudio=!1;this.renditions=[];this.accessibility=[]}Xc(a){return this.type===a.type&&this.channelsCount===a.channelsCount&&this.frameRate===a.frameRate&&this.trickPlay===a.trickPlay&&this.kind===a.kind&&this.label===a.label&&this.language===a.language&&this.mimeType===a.mimeType&&nj(this.roles,
399
- a.roles)&&nj(this.accessibility,a.accessibility,il)}toString(){return`Track type: ${this.type} id: ${this.id}
400
- renditions size: ${this.renditions.length}`}};_.w("clpp.Track",_.ml);_.ml.prototype.toString=_.ml.prototype.toString;_.ql=class{constructor(a,b){this.track=b;this.id=a;this.originalId=this.codec=this.ud=this.bandwidth=this.height=this.width=null;this.a=!1}};_.w("clpp.Rendition",_.ql);_.vu=1;_.N=_.t;_.M=_.q;_.L=_.Sf;kl=_.re;_.wu={VIDEO:_.N,AUDIO:_.M,TEXT:_.L,METADATA:kl};_.ml.Type=_.wu;var xu=class{constructor(a){this.f=a;this.g=new _.S("clpp.native.hls.HlsMetadataParser");this.a=tj(this.h.bind(this),(b,c)=>b[0]===c[0]&&b[1].enableHlsVideoTrackInfo===c[1].enableHlsVideoTrackInfo&&b[1].enableMetadata===c[1].enableMetadata)}h(a,b){const c=this;return _.v(function*(){let d=null;try{d=yield ol(c,a)}catch(f){return c.g.warn("Failed to fetch playlist in order metadata from HLS playlist.",f.message),Promise.resolve({})}const e={};try{if(b.enableHlsVideoTrackInfo){const f=yield sl(c,d,
401
- a);e.renditions=f.renditions;e.mimeType=f.mimeType}}catch(f){c.g.warn("Failed to parse video metadata from HLS playlist.",f.message)}try{const f=yield ul(d);e.Mc=f}catch(f){c.g.warn("Failed to parse metadata from HLS playlist.",f.message)}return e})}};var Dl=new Map,Cl=1,Hl=2,Gl=3,Fl=4;var uu="m";_.Ml=[];_.U=class{detach(){}Qe(){return!0}Ph(a){return this.getVideoTracks().find(b=>_.fh(b,a,a&&Object.keys(a)))}Lh(a){return this.getAudioTracks().find(b=>_.fh(b,a,a&&Object.keys(a)))}Nh(a){return this.sa().find(b=>_.fh(b,a,a&&Object.keys(a)))}Oh(a){return this.getVideoTracks().flatMap(b=>b.renditions).find(b=>_.fh(b,a,a&&Object.keys(a)))}Kh(a){return this.getAudioTracks().flatMap(b=>b.renditions).find(b=>_.fh(b,a,a&&Object.keys(a)))}Mh(a){return this.sa().flatMap(b=>b.renditions).find(b=>_.fh(b,a,a&&Object.keys(a)))}};
402
- _.w("clpp.TrackManager",_.U);_.U.prototype.isAbrEnabled=_.U.prototype.va;_.U.prototype.addTextTrack=_.U.prototype.addTextTrack;_.U.prototype.findTextRendition=_.U.prototype.Mh;_.U.prototype.findAudioRendition=_.U.prototype.Kh;_.U.prototype.findVideoRendition=_.U.prototype.Oh;_.U.prototype.findTextTrack=_.U.prototype.Nh;_.U.prototype.findAudioTrack=_.U.prototype.Lh;_.U.prototype.findVideoTrack=_.U.prototype.Ph;_.U.prototype.setTextRendition=_.U.prototype.Eb;_.U.prototype.setAudioRendition=_.U.prototype.Db;
403
- _.U.prototype.setVideoRendition=_.U.prototype.rb;_.U.prototype.setTextTrack=_.U.prototype.ab;_.U.prototype.setAudioTrack=_.U.prototype.za;_.U.prototype.setVideoTrack=_.U.prototype.Fb;_.U.prototype.getTextTrack=_.U.prototype.ua;_.U.prototype.getAudioTrack=_.U.prototype.ra;_.U.prototype.getVideoTrack=_.U.prototype.Ia;_.U.prototype.getLoadingTextRendition=_.U.prototype.Ob;_.U.prototype.getLoadingAudioRendition=_.U.prototype.Nb;_.U.prototype.getLoadingVideoRendition=_.U.prototype.wb;
404
- _.U.prototype.getTextRendition=_.U.prototype.Xa;_.U.prototype.getAudioRendition=_.U.prototype.Qa;_.U.prototype.getVideoRendition=_.U.prototype.ta;_.U.prototype.getTextTracks=_.U.prototype.sa;_.U.prototype.getAudioTracks=_.U.prototype.getAudioTracks;_.U.prototype.getVideoTracks=_.U.prototype.getVideoTracks;_.U.prototype.canSelectVideoTracks=_.U.prototype.Qe;var yu=class extends _.U{constructor(){super();this.g=new _.S("clpp.native.TrackManager");this.m=null;this.f=new _.Ut;this.h=[];this.I=0;this.A={};this.C=new Set;this.a=new Map;this.w=null;this.o=new Map;this.B=!0;this.M=this.F.bind(this,_.L);this.R=this.H.bind(this,_.L);this.P=this.G.bind(this,_.L);this.S=this.F.bind(this,_.N);this.W=this.H.bind(this,_.N);this.U=this.G.bind(this,_.N);this.J=this.F.bind(this,_.M);this.L=this.H.bind(this,_.M);this.K=this.G.bind(this,_.M);this.l=null;this.j=new Map}Qe(){return!_.Yh()}detach(){this.j.clear();
405
- for(const a of this.a){const [b,c]=a;{const d=b;c?this.j.set(d,{language:c.language,kind:c.kind,label:c.label}):d===_.L&&this.j.set(d,null)}}Pl(this);this.m.trigger(new _.H("tracksremoved"))}F(a,b){const c=this;return _.v(function*(){const d=b.track,e=a===_.N;var f=a===_.L;const g=a===_.M||e;d.mode===_.Ef&&(d.mode=Sl(c));const h=d.id||String(_.vu++),k=nl(a,h,d),l=Vl(d);if(f){if(d.kind===_.re)return;k.kind&&"captions"===k.kind&&(k.mimeType=_.sc);if(f=c.A[d.id])k.src=f.url,k.mimeType=f.mimeType}else if(f=
406
- c.h.find(n=>n.type===a&&_.fh(n,k,["kind","label","language"]))){f.id=d.id;l&&(c.g.debug(`Setting native ${a} track active`),c.a.set(a,f));c.g.debug("Track from event seems to already exists, flipped native track to",d);return}try{k.renditions.push(new _.ql(k.id,k));c.h.push(k);c.h.sort((y,B)=>(y.label||"").localeCompare(B.label||"","en"));var m=c.m.getConfiguration().safari;Xl(c,a,m)?yield Yl(c,k,m):Zl(c,a,m)&&(yield $l(c,k,m));c.g.debug(a+" Track added",k);c.m.trigger(new _.H(_.ag));const n=am(c,
407
- a).length,p=b.target,u=!(!p||!p.length),x=p&&p.length||0;m=()=>{c.g.debug(`Setting native ${a} track active. `+`Native track active: ${l}. `+`Number of tracks: ${n}`,d);c.a.set(a,k)};l?m():1===n&&g&&(e?m():u&&1!==x||m())}catch(n){c.g.error("Error while converting track data",n)}})}H(a,b){const c=b.track;a===_.L&&c.kind!==_.re&&(b=this.h.find(d=>Rl(d,c,a)))&&(this.h.splice(this.h.indexOf(b),1),(this.a.get(a)||null)===b&&(this.a.set(a,null),bm(this)),this.g.debug(a+" Track removed, id: ",b.id))}G(a,
408
- b){this.g.debug(a+" Track changed",b);a===_.L&&bm(this);const c=Ql(this,a);if(c)for(let d=0;d<c.length;++d)if(Vl(c[d])){if(b=this.h.find(e=>Rl(e,c[d],a)))this.a.set(a,b),this.g.debug("Track change detected, id:",b.id),b===this.o.get(a)&&this.o.set(a,null),a===_.M?this.m.trigger(new _.H(_.Jc)):a===_.L&&this.m.trigger(new _.H(_.Vf));break}}initialize(a){this.m=a;this.l=new xu(a.getNetworkEngine())}load(){this.B=!1;dm(this);this.f.one(this.m,Qc,()=>{0===this.j.size?fm(this):Ul(this)})}release(){const a=
409
- this.m.getSurface().getMedia();if(a)for(const b of this.C)a.removeChild(b);this.C.clear();this.B=!0;Pl(this)}destroy(){this.release();this.j.clear();this.m=null}getVideoTracks(){return am(this,_.N)}getAudioTracks(){return am(this,_.M)}sa(){return am(this,_.L)}ta(){const a=this.a.get(_.N)||null;if(!a)return null;if(this.w){const b=a.renditions.find(c=>c.width===this.w.width&&c.height===this.w.height);if(b)return b}return a.renditions[0]||null}Qa(){return gm(this,_.M)}Xa(){return gm(this,_.L)}wb(){return hm(this,
410
- _.N)}Nb(){return hm(this,_.M)}Ob(){return hm(this,_.L)}Ia(){return this.a.get(_.N)||null}ra(){return this.a.get(_.M)||null}ua(){return this.a.get(_.L)||null}Fb(a){Tl(this,_.N,a)}za(a){Tl(this,_.M,a)}ab(a){Tl(this,_.L,a)}rb(a){Tl(this,_.N,a&&a.track)}Db(a){Tl(this,_.M,a&&a.track)}Eb(a){Tl(this,_.L,a&&a.track)}addTextTrack(a){const b=this;return _.v(function*(){if(b.m){var c=b.m.getSurface().getMedia();if(c)if(a.mimeType.match(/text\/vtt/)){const d="External_"+`${b.I++}`;b.A[d]=a;im(b,a,d,c)}else yield jm(b,
411
- a,c)}})}va(){return 1>=this.getVideoTracks().flatMap(a=>a.renditions).length}};yu.prototype.isAbrEnabled=yu.prototype.va;yu.prototype.addTextTrack=yu.prototype.addTextTrack;yu.prototype.setTextRendition=yu.prototype.Eb;yu.prototype.setAudioRendition=yu.prototype.Db;yu.prototype.setVideoRendition=yu.prototype.rb;yu.prototype.setTextTrack=yu.prototype.ab;yu.prototype.setAudioTrack=yu.prototype.za;yu.prototype.setVideoTrack=yu.prototype.Fb;yu.prototype.getTextTrack=yu.prototype.ua;
412
- yu.prototype.getAudioTrack=yu.prototype.ra;yu.prototype.getVideoTrack=yu.prototype.Ia;yu.prototype.getLoadingTextRendition=yu.prototype.Ob;yu.prototype.getLoadingAudioRendition=yu.prototype.Nb;yu.prototype.getLoadingVideoRendition=yu.prototype.wb;yu.prototype.getTextRendition=yu.prototype.Xa;yu.prototype.getAudioRendition=yu.prototype.Qa;yu.prototype.getVideoRendition=yu.prototype.ta;yu.prototype.getTextTracks=yu.prototype.sa;yu.prototype.getAudioTracks=yu.prototype.getAudioTracks;
413
- yu.prototype.getVideoTracks=yu.prototype.getVideoTracks;yu.prototype.canSelectVideoTracks=yu.prototype.Qe;_.zu=class{constructor(a,b="total"){this.length=(this.f=a)?a.length:0;this.a=[];this.type=b}start(a){if(this.f)return this.f.start(a);if(a<this.a.length)return this.a[a].start;throw Error(sb);}end(a){if(this.f)return this.f.end(a);if(a<this.a.length)return this.a[a].end;throw Error(sb);}Vb(){return!this.length||1===this.length&&1E-6>this.end(0)-this.start(0)?null:1===this.length&&0>this.start(0)?0:this.start(0)}Oa(){return!this.length||1===this.length&&1E-6>this.end(0)-this.start(0)?null:this.end(this.length-
414
- 1)}mc(a,b=!0,c=0){if(!this.length||1===this.length&&1E-6>this.end(0)-this.start(0)||a>this.end(this.length-1))return!1;if(b)return c+a>=this.start(0)&&a<=this.end(this.length-1);for(b=0;b<this.length;b++)if(c+a>=this.start(b)&&a<=this.end(b))return!0;return!1}Pa(a,b=!1){if(!this.length||1===this.length&&1E-6>this.end(0)-this.start(0))return 0;let c=0;if(b)b=this.Oa(),null!=b&&(c=Math.max(0,b-a));else for(b=this.length-1;0<=b&&this.end(b)>a;--b)c+=this.end(b)-Math.max(this.start(b),a);return c}toString(){let a=
415
- "";for(let b=0;b<this.length;b++)0<b&&(a+=" "),a+=`${this.start(b).toFixed(3)}-${this.end(b).toFixed(3)}`;return a}};_.w("clpp.BufferInfo",_.zu);_.zu.prototype.bufferedAheadOf=_.zu.prototype.Pa;_.zu.prototype.isBuffered=_.zu.prototype.mc;_.zu.prototype.bufferEnd=_.zu.prototype.Oa;_.zu.prototype.bufferStart=_.zu.prototype.Vb;_.zu.prototype.end=_.zu.prototype.end;_.zu.prototype.start=_.zu.prototype.start;var Au=class{constructor(a,b,c,d){this.h=a;this.a=b;this.f=c;this.j=!!d}trigger(a){try{this.a.handleEvent?this.a.handleEvent(a):this.a.call(this.f,a)}catch(b){_.sh("clpp","Uncaught exception in event handler for event '"+this.h+"'",b,b?b.message:null,b?b.stack:null)}}};var Bu=class{constructor(a){this.a=new _.St;this.f=a}trigger(a){const b=this.a.get(a.type);if(b)for(let c=0;c<b.length&&(a.target=this.f,a.currentTarget=this.f,b[c].trigger(a),b[c].j&&this.a.remove(a.type,b[c]),!a||!a.stopped);c++);}on(a,b,c){this.a.push(a,new Au(a,b,c||this.f));return b}one(a,b,c){this.a.push(a,new Au(a,b,c||this.f,!0));return b}off(a,b){const c=this.a.get(a);let d=!1;if(c)for(let e=0;e<c.length;e++)c[e].a===b&&(d=this.a.remove(a,c[e])||d);return d}clear(){this.a.clear()}};_.Cu=class{constructor(){this.Cd=new Bu(this);this.yd=[]}addEventListener(a,b){this.on(a,b)}removeEventListener(a,b){this.off(a,b)}on(a,b,c){return this.Cd.on(a,b,c)}one(a,b,c){return this.Cd.one(a,b,c)}off(a,b){return this.Cd.off(a,b)}forwardEventsTo(a){a&&(0<=this.yd.indexOf(a)||this.yd.push(a))}dispatchEvent(a){this.trigger(a);return a.defaultPrevented}stopForwardingEventsTo(a){a&&(a=this.yd.indexOf(a),0<=a&&this.yd.splice(a,1))}trigger(a){this.Cd.trigger(a);for(const b of this.yd)b.dispatchEvent(a)}};
416
- _.Cu.prototype.off=_.Cu.prototype.off;_.Cu.prototype.one=_.Cu.prototype.one;_.Cu.prototype.on=_.Cu.prototype.on;_.Cu.prototype.removeEventListener=_.Cu.prototype.removeEventListener;_.Cu.prototype.addEventListener=_.Cu.prototype.addEventListener;var mm=["play() failed because the user didn't interact","The play method is not allowed by the user agent","The request is not allowed by the user agent or the platform"];_.w("clpp.version",_.ea);_.w("clpp.name",_.sa);var Ir=null;_.w("clpp.configure",a=>{Ir=a});_.km="application/x-mpegurl";_.w("clpp.Type",{DASH:_.tc,HLS:_.km,SMOOTH_STREAMING:_.Bc,MP4:_.qg,MP3:"audio/mp3"});_.bj="scte35";_.cj="hls-daterange";_.w("clpp.TimelineCueType",{SCTE35:_.bj,DASH_CALLBACK:_.we,HLS_DATERANGE:_.cj,UNKNOWN:_.fg});_.w("clpp.SpeedUpMode",{DECODER:_.xd,SEEK:"seek"});_.w("clpp.CodecSwitchingStrategy",{PREVENT:_.mf,SMOOTH:_.If});var Du=class{};_.w("clpp.utils.PlayerConfiguration",Du);Du.create=function(...a){return _.tm(a,{Ri:!1})};Du.build=_.tm;var Eu=["abort",Pc,Qc,Nd,"emptied",Pd,_.Rd,_.Sd,"interruptbegin","interruptend",_.ke,_.le,me,"mozaudioavailable",_.Ne,_.Re,_.cf,_.of,_.rf,_.Cf,_.Df,Jf,"suspend",_.$f,"volumechange",_.zg,_.Ag,_.wf,Fg,Eg,Cg,Dg],Pi=2,Qi=2;_.Fu=class extends _.Cu{constructor(a){super();this.log=new _.S(a);this.configuration=this.ja=_.rm();this.ia=this.C=null;this.Jb=this.qf=!1;this.Of=new _.S("clpp.video.events");this.vc=null;this.fd=-1;this.ph=this.mh.bind(this);this.Ub=new _.Jr;this.setNetworkEngine(this.Ub);this.M=new _.Ut;this.pf=this.Rc=this.Wc=this.K=null}init(a,b){this.configuration=this.ja=b;this.C=a;this.log.info("Initializing Player surface");a=this.C.getMedia();this.log.info("Attaching media element listeners");for(const c of Eu)this.M.on(a,
417
- c,this.ph,c!==_.Sd);this.vc||(this.vc=this.dh());this.vc.initialize(this);this.C.showMediaElement()}release(){const a=this;return _.v(function*(){a.K&&(a.K.destroy(),a.K=null)})}destroy(){this.M.release();return this.Ub.release()}canPlay(a,b){return _.th[this.namespace()].canPlay(a,b)}getTimeline(){return null}setupPlaylist(){return _.v(function*(){throw new _.vj(_.Ya);})}appendLoad(){return _.v(function*(){throw new _.vj(_.Ya);})}seekWith(){return _.v(function*(){throw new _.vj(_.Ya);})}detach(){return _.v(function*(){})}setSeekInterceptor(){}setPlaybackSessionId(){}getBandwidthEstimate(){return null}play(){const a=
418
- this;return _.v(function*(){if(!a.ia)throw new _.J(_.C,7,7003,"No sources specified yet. You need to load content before calling play.");try{yield a.C.getMedia().play()}catch(b){a.log.info("Caught play promise exception",b);const c={name:b.name||"",message:b.message||"",stack:b.stack||""};nm(c)?(a.trigger(new _.H(_.Kc)),a.log.warn(_.la)):c.name===Za&&a.log.warn('Unrecognized "NotAllowedError" on play(). '+`${b.name}: ${b.message}`);throw b;}})}pause(){const a=this;return _.v(function*(){if(!a.ia)throw new _.J(_.C,
397
+ "vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);var Zj=[403,401];_.w("clpp.net.DEFAULT_FATAL_STATUS_CODES",Zj);_.w("clpp.net.makeRequest",_.fk);_.ek=6;_.w("clpp.net.RequestType",{MANIFEST:1,SEGMENT:2,LICENSE:3,APP:4,TIMING:5,OTHER:_.ek,CONTENT_STEERING:7});_.w("clpp.drm.WidevineRobustnessLevel",{SW_SECURE_CRYPTO:_.mb,SW_SECURE_DECODE:_.nb,HW_SECURE_CRYPTO:Ga,HW_SECURE_DECODE:Ha,HW_SECURE_ALL:Fa});_.w("clpp.drm.PlayreadyRobustnessLevel",{SL150:"150",SL2000:"2000",SL3000:"3000"});_.w("clpp.drm.KeySystem",{NONE:_.Be,CLEAR_KEY:_.Le,WIDEVINE:_.td,PLAYREADY:_.rd,FAIRPLAY:_.pd,PRIMETIME:_.od});_.mk={};_.w("clpp.drm.registerDrmEnvironment",_.nk);_.qu=new _.S("clpp.hls.Utils");_.rk=class{constructor(a){this.f=a;this.a=0}};_.ru=class{constructor(){this.a=[]}destroy(){const a=[];for(const b of this.a)b.V.catch(()=>{}),a.push(b.abort());this.a=[];return Promise.all(a)}};_.xk.prototype.resolve=function(){};_.xk.prototype.reject=function(){};var su=class{constructor(a){this.f=new Uint8Array(a);this.a=0}append(a){const b=this.a+a.byteLength;if(b>this.f.byteLength){const c=this.f;this.f=new Uint8Array(Math.max(2*this.f.byteLength,b));this.f.set(c)}this.f.set(a,this.a);this.a+=a.byteLength}get(){return this.a===this.f.byteLength?this.f.buffer:this.f.buffer.slice(0,this.a)}};var tu=class{constructor(a){this.o=a;this.f=this.a=this.h=0;this.j=null;this.l=-1}};var Ek=class{constructor(){this.a=Ck()}};var Kk=class{constructor(a,b){b=void 0===b?!0:b;this.a=new su(a||1048576);this.f=new tu(this.a);this.j=b;this.h=a}};var uu=class{};_.w("clpp.utils.Uint8ArrayUtils",uu);uu.toStandardBase64=_.Nk;uu.concat=_.Tk;uu.equal=_.Sk;uu.toHex=_.Rk;uu.fromHex=_.Qk;uu.fromBase64=_.Pk;uu.toBase64Url=_.Ok;_.kp=class{constructor(a,b){this.V=a;this.B=b;this.a=!1}abort(){this.a=!0;return this.B()}};var el=class extends _.kp{constructor(a,b){super(new _.xk,()=>Promise.resolve());this.C=a;this.j=null;this.w=this.V;this.h=-1;this.f=this.l=this.o=null;this.A=b||null;Yk(this)}then(a,b){this.V=this.V.then(a,b);return this}catch(a){this.V=this.V.catch(a);return this}abort(){if(this.a)return Promise.resolve();this.a=!0;return this.j.then(a=>{this.o&&clearTimeout(this.o);this.l&&this.l();return a.abort()}).catch(()=>{})}};_.Kr=class{constructor(){this.f=[];this.a=[];this.h=[];this.w=!1;this.o=new _.ru;this.l={};this.headers=new Map;this.j=0;this.A=null;this.l.data=Vk;Zk(this)}Yi(a){0<a?_.A("Rate limit set to "+a+"bps"):_.A("Rate limit disabled");this.j=a}release(){return this.o.destroy()}destroy(){this.w=!0;this.f=[];this.a=[];this.h=[];return this.o.destroy()}Pf(a){this.f.push(a)}td(a){this.h.push(a)}Sg(a){this.f=this.f.filter(b=>b!==a)}Fe(a){this.h=this.h.filter(b=>b!==a)}fetch(a){let b=void 0;1===a.type&&(b={objectType:vu});
398
+ return _.hl(this,a,b)}};_.w("clpp.net.NetworkEngine",_.Kr);_.Kr.prototype.fetch=_.Kr.prototype.fetch;_.Kr.prototype.removeResponseModifier=_.Kr.prototype.Fe;_.Kr.prototype.removeRequestModifier=_.Kr.prototype.Sg;_.Kr.prototype.addResponseModifier=_.Kr.prototype.td;_.Kr.prototype.addRequestModifier=_.Kr.prototype.Pf;_.Kr.prototype.setRateLimit=_.Kr.prototype.Yi;var ll;
399
+ _.nl=class{constructor(a,b){this.id=a;this.type=b;this.roles=[];this.frameRate=this.label=this.originalLanguage=this.language=this.kind=null;this.trickPlay=!1;this.channelsCount=this.src=this.mimeType=null;this.spatialAudio=!1;this.renditions=[];this.accessibility=[]}Xc(a){return this.type===a.type&&this.channelsCount===a.channelsCount&&this.frameRate===a.frameRate&&this.trickPlay===a.trickPlay&&this.kind===a.kind&&this.label===a.label&&this.language===a.language&&this.mimeType===a.mimeType&&oj(this.roles,
400
+ a.roles)&&oj(this.accessibility,a.accessibility,jl)}toString(){return`Track type: ${this.type} id: ${this.id}
401
+ renditions size: ${this.renditions.length}`}};_.w("clpp.Track",_.nl);_.nl.prototype.toString=_.nl.prototype.toString;_.rl=class{constructor(a,b){this.track=b;this.id=a;this.originalId=this.codec=this.ud=this.bandwidth=this.height=this.width=null;this.a=!1}};_.w("clpp.Rendition",_.rl);_.wu=1;_.N=_.t;_.M=_.q;_.L=_.Sf;ll=_.re;_.xu={VIDEO:_.N,AUDIO:_.M,TEXT:_.L,METADATA:ll};_.nl.Type=_.xu;var yu=class{constructor(a){this.f=a;this.g=new _.S("clpp.native.hls.HlsMetadataParser");this.a=uj(this.h.bind(this),(b,c)=>b[0]===c[0]&&b[1].enableHlsVideoTrackInfo===c[1].enableHlsVideoTrackInfo&&b[1].enableMetadata===c[1].enableMetadata)}h(a,b){const c=this;return _.v(function*(){let d=null;try{d=yield pl(c,a)}catch(f){return c.g.warn("Failed to fetch playlist in order metadata from HLS playlist.",f.message),Promise.resolve({})}const e={};try{if(b.enableHlsVideoTrackInfo){const f=yield tl(c,d,
402
+ a);e.renditions=f.renditions;e.mimeType=f.mimeType}}catch(f){c.g.warn("Failed to parse video metadata from HLS playlist.",f.message)}try{const f=yield vl(d);e.Mc=f}catch(f){c.g.warn("Failed to parse metadata from HLS playlist.",f.message)}return e})}};var El=new Map,Dl=1,Il=2,Hl=3,Gl=4;var vu="m";_.Nl=[];_.U=class{detach(){}Qe(){return!0}Ph(a){return this.getVideoTracks().find(b=>_.fh(b,a,a&&Object.keys(a)))}Lh(a){return this.getAudioTracks().find(b=>_.fh(b,a,a&&Object.keys(a)))}Nh(a){return this.sa().find(b=>_.fh(b,a,a&&Object.keys(a)))}Oh(a){return this.getVideoTracks().flatMap(b=>b.renditions).find(b=>_.fh(b,a,a&&Object.keys(a)))}Kh(a){return this.getAudioTracks().flatMap(b=>b.renditions).find(b=>_.fh(b,a,a&&Object.keys(a)))}Mh(a){return this.sa().flatMap(b=>b.renditions).find(b=>_.fh(b,a,a&&Object.keys(a)))}};
403
+ _.w("clpp.TrackManager",_.U);_.U.prototype.isAbrEnabled=_.U.prototype.va;_.U.prototype.addTextTrack=_.U.prototype.addTextTrack;_.U.prototype.findTextRendition=_.U.prototype.Mh;_.U.prototype.findAudioRendition=_.U.prototype.Kh;_.U.prototype.findVideoRendition=_.U.prototype.Oh;_.U.prototype.findTextTrack=_.U.prototype.Nh;_.U.prototype.findAudioTrack=_.U.prototype.Lh;_.U.prototype.findVideoTrack=_.U.prototype.Ph;_.U.prototype.setTextRendition=_.U.prototype.Fb;_.U.prototype.setAudioRendition=_.U.prototype.Eb;
404
+ _.U.prototype.setVideoRendition=_.U.prototype.rb;_.U.prototype.setTextTrack=_.U.prototype.bb;_.U.prototype.setAudioTrack=_.U.prototype.za;_.U.prototype.setVideoTrack=_.U.prototype.Gb;_.U.prototype.getTextTrack=_.U.prototype.ua;_.U.prototype.getAudioTrack=_.U.prototype.ra;_.U.prototype.getVideoTrack=_.U.prototype.Ja;_.U.prototype.getLoadingTextRendition=_.U.prototype.Pb;_.U.prototype.getLoadingAudioRendition=_.U.prototype.Ob;_.U.prototype.getLoadingVideoRendition=_.U.prototype.wb;
405
+ _.U.prototype.getTextRendition=_.U.prototype.Za;_.U.prototype.getAudioRendition=_.U.prototype.Sa;_.U.prototype.getVideoRendition=_.U.prototype.ta;_.U.prototype.getTextTracks=_.U.prototype.sa;_.U.prototype.getAudioTracks=_.U.prototype.getAudioTracks;_.U.prototype.getVideoTracks=_.U.prototype.getVideoTracks;_.U.prototype.canSelectVideoTracks=_.U.prototype.Qe;var zu=class extends _.U{constructor(){super();this.g=new _.S("clpp.native.TrackManager");this.m=null;this.f=new _.Ut;this.h=[];this.I=0;this.A={};this.C=new Set;this.a=new Map;this.w=null;this.o=new Map;this.B=!0;this.M=this.F.bind(this,_.L);this.R=this.H.bind(this,_.L);this.P=this.G.bind(this,_.L);this.S=this.F.bind(this,_.N);this.W=this.H.bind(this,_.N);this.U=this.G.bind(this,_.N);this.J=this.F.bind(this,_.M);this.L=this.H.bind(this,_.M);this.K=this.G.bind(this,_.M);this.l=null;this.j=new Map}Qe(){return!_.Zh()}detach(){this.j.clear();
406
+ for(const a of this.a){const [b,c]=a;{const d=b;c?this.j.set(d,{language:c.language,kind:c.kind,label:c.label}):d===_.L&&this.j.set(d,null)}}Ql(this);this.m.trigger(new _.H("tracksremoved"))}F(a,b){const c=this;return _.v(function*(){const d=b.track,e=a===_.N;var f=a===_.L;const g=a===_.M||e;d.mode===_.Ef&&(d.mode=Tl(c));const h=d.id||String(_.wu++),k=ol(a,h,d),l=Wl(d);if(f){if(d.kind===_.re)return;k.kind&&"captions"===k.kind&&(k.mimeType=_.sc);if(f=c.A[d.id])k.src=f.url,k.mimeType=f.mimeType}else if(f=
407
+ c.h.find(n=>n.type===a&&_.fh(n,k,["kind","label","language"]))){f.id=d.id;l&&(c.g.debug(`Setting native ${a} track active`),c.a.set(a,f));c.g.debug("Track from event seems to already exists, flipped native track to",d);return}try{k.renditions.push(new _.rl(k.id,k));c.h.push(k);c.h.sort((y,B)=>(y.label||"").localeCompare(B.label||"","en"));var m=c.m.getConfiguration().safari;Yl(c,a,m)?yield Zl(c,k,m):$l(c,a,m)&&(yield am(c,k,m));c.g.debug(a+" Track added",k);c.m.trigger(new _.H(_.ag));const n=bm(c,
408
+ a).length,p=b.target,u=!(!p||!p.length),x=p&&p.length||0;m=()=>{c.g.debug(`Setting native ${a} track active. `+`Native track active: ${l}. `+`Number of tracks: ${n}`,d);c.a.set(a,k)};l?m():1===n&&g&&(e?m():u&&1!==x||m())}catch(n){c.g.error("Error while converting track data",n)}})}H(a,b){const c=b.track;a===_.L&&c.kind!==_.re&&(b=this.h.find(d=>Sl(d,c,a)))&&(this.h.splice(this.h.indexOf(b),1),(this.a.get(a)||null)===b&&(this.a.set(a,null),cm(this)),this.g.debug(a+" Track removed, id: ",b.id))}G(a,
409
+ b){this.g.debug(a+" Track changed",b);a===_.L&&cm(this);const c=Rl(this,a);if(c)for(let d=0;d<c.length;++d)if(Wl(c[d])){if(b=this.h.find(e=>Sl(e,c[d],a)))this.a.set(a,b),this.g.debug("Track change detected, id:",b.id),b===this.o.get(a)&&this.o.set(a,null),a===_.M?this.m.trigger(new _.H(_.Jc)):a===_.L&&this.m.trigger(new _.H(_.Vf));break}}initialize(a){this.m=a;this.l=new yu(a.getNetworkEngine())}load(){this.B=!1;em(this);this.f.one(this.m,Qc,()=>{0===this.j.size?gm(this):Vl(this)})}release(){const a=
410
+ this.m.getSurface().getMedia();if(a)for(const b of this.C)a.removeChild(b);this.C.clear();this.B=!0;Ql(this)}destroy(){this.release();this.j.clear();this.m=null}getVideoTracks(){return bm(this,_.N)}getAudioTracks(){return bm(this,_.M)}sa(){return bm(this,_.L)}ta(){const a=this.a.get(_.N)||null;if(!a)return null;if(this.w){const b=a.renditions.find(c=>c.width===this.w.width&&c.height===this.w.height);if(b)return b}return a.renditions[0]||null}Sa(){return hm(this,_.M)}Za(){return hm(this,_.L)}wb(){return im(this,
411
+ _.N)}Ob(){return im(this,_.M)}Pb(){return im(this,_.L)}Ja(){return this.a.get(_.N)||null}ra(){return this.a.get(_.M)||null}ua(){return this.a.get(_.L)||null}Gb(a){Ul(this,_.N,a)}za(a){Ul(this,_.M,a)}bb(a){Ul(this,_.L,a)}rb(a){Ul(this,_.N,a&&a.track)}Eb(a){Ul(this,_.M,a&&a.track)}Fb(a){Ul(this,_.L,a&&a.track)}addTextTrack(a){const b=this;return _.v(function*(){if(b.m){var c=b.m.getSurface().getMedia();if(c)if(a.mimeType.match(/text\/vtt/)){const d="External_"+`${b.I++}`;b.A[d]=a;jm(b,a,d,c)}else yield km(b,
412
+ a,c)}})}va(){return 1>=this.getVideoTracks().flatMap(a=>a.renditions).length}};zu.prototype.isAbrEnabled=zu.prototype.va;zu.prototype.addTextTrack=zu.prototype.addTextTrack;zu.prototype.setTextRendition=zu.prototype.Fb;zu.prototype.setAudioRendition=zu.prototype.Eb;zu.prototype.setVideoRendition=zu.prototype.rb;zu.prototype.setTextTrack=zu.prototype.bb;zu.prototype.setAudioTrack=zu.prototype.za;zu.prototype.setVideoTrack=zu.prototype.Gb;zu.prototype.getTextTrack=zu.prototype.ua;
413
+ zu.prototype.getAudioTrack=zu.prototype.ra;zu.prototype.getVideoTrack=zu.prototype.Ja;zu.prototype.getLoadingTextRendition=zu.prototype.Pb;zu.prototype.getLoadingAudioRendition=zu.prototype.Ob;zu.prototype.getLoadingVideoRendition=zu.prototype.wb;zu.prototype.getTextRendition=zu.prototype.Za;zu.prototype.getAudioRendition=zu.prototype.Sa;zu.prototype.getVideoRendition=zu.prototype.ta;zu.prototype.getTextTracks=zu.prototype.sa;zu.prototype.getAudioTracks=zu.prototype.getAudioTracks;
414
+ zu.prototype.getVideoTracks=zu.prototype.getVideoTracks;zu.prototype.canSelectVideoTracks=zu.prototype.Qe;_.Au=class{constructor(a,b="total"){this.length=(this.f=a)?a.length:0;this.a=[];this.type=b}start(a){if(this.f)return this.f.start(a);if(a<this.a.length)return this.a[a].start;throw Error(tb);}end(a){if(this.f)return this.f.end(a);if(a<this.a.length)return this.a[a].end;throw Error(tb);}Wb(){return!this.length||1===this.length&&1E-6>this.end(0)-this.start(0)?null:1===this.length&&0>this.start(0)?0:this.start(0)}Qa(){return!this.length||1===this.length&&1E-6>this.end(0)-this.start(0)?null:this.end(this.length-
415
+ 1)}nc(a,b=!0,c=0){if(!this.length||1===this.length&&1E-6>this.end(0)-this.start(0)||a>this.end(this.length-1))return!1;if(b)return c+a>=this.start(0)&&a<=this.end(this.length-1);for(b=0;b<this.length;b++)if(c+a>=this.start(b)&&a<=this.end(b))return!0;return!1}Ra(a,b=!1){if(!this.length||1===this.length&&1E-6>this.end(0)-this.start(0))return 0;let c=0;if(b)b=this.Qa(),null!=b&&(c=Math.max(0,b-a));else for(b=this.length-1;0<=b&&this.end(b)>a;--b)c+=this.end(b)-Math.max(this.start(b),a);return c}toString(){let a=
416
+ "";for(let b=0;b<this.length;b++)0<b&&(a+=" "),a+=`${this.start(b).toFixed(3)}-${this.end(b).toFixed(3)}`;return a}};_.w("clpp.BufferInfo",_.Au);_.Au.prototype.bufferedAheadOf=_.Au.prototype.Ra;_.Au.prototype.isBuffered=_.Au.prototype.nc;_.Au.prototype.bufferEnd=_.Au.prototype.Qa;_.Au.prototype.bufferStart=_.Au.prototype.Wb;_.Au.prototype.end=_.Au.prototype.end;_.Au.prototype.start=_.Au.prototype.start;var Bu=class{constructor(a,b,c,d){this.h=a;this.a=b;this.f=c;this.j=!!d}trigger(a){try{this.a.handleEvent?this.a.handleEvent(a):this.a.call(this.f,a)}catch(b){_.sh("clpp","Uncaught exception in event handler for event '"+this.h+"'",b,b?b.message:null,b?b.stack:null)}}};var Cu=class{constructor(a){this.a=new _.St;this.f=a}trigger(a){const b=this.a.get(a.type);if(b)for(let c=0;c<b.length&&(a.target=this.f,a.currentTarget=this.f,b[c].trigger(a),b[c].j&&this.a.remove(a.type,b[c]),!a||!a.stopped);c++);}on(a,b,c){this.a.push(a,new Bu(a,b,c||this.f));return b}one(a,b,c){this.a.push(a,new Bu(a,b,c||this.f,!0));return b}off(a,b){const c=this.a.get(a);let d=!1;if(c)for(let e=0;e<c.length;e++)c[e].a===b&&(d=this.a.remove(a,c[e])||d);return d}clear(){this.a.clear()}};_.Du=class{constructor(){this.Cd=new Cu(this);this.yd=[]}addEventListener(a,b){this.on(a,b)}removeEventListener(a,b){this.off(a,b)}on(a,b,c){return this.Cd.on(a,b,c)}one(a,b,c){return this.Cd.one(a,b,c)}off(a,b){return this.Cd.off(a,b)}forwardEventsTo(a){a&&(0<=this.yd.indexOf(a)||this.yd.push(a))}dispatchEvent(a){this.trigger(a);return a.defaultPrevented}stopForwardingEventsTo(a){a&&(a=this.yd.indexOf(a),0<=a&&this.yd.splice(a,1))}trigger(a){this.Cd.trigger(a);for(const b of this.yd)b.dispatchEvent(a)}};
417
+ _.Du.prototype.off=_.Du.prototype.off;_.Du.prototype.one=_.Du.prototype.one;_.Du.prototype.on=_.Du.prototype.on;_.Du.prototype.removeEventListener=_.Du.prototype.removeEventListener;_.Du.prototype.addEventListener=_.Du.prototype.addEventListener;var nm=["play() failed because the user didn't interact","The play method is not allowed by the user agent","The request is not allowed by the user agent or the platform"];_.w("clpp.version",_.ea);_.w("clpp.name",_.sa);var Jr=null;_.w("clpp.configure",a=>{Jr=a});_.lm="application/x-mpegurl";_.w("clpp.Type",{DASH:_.tc,HLS:_.lm,SMOOTH_STREAMING:_.Bc,MP4:_.qg,MP3:"audio/mp3"});_.cj="scte35";_.dj="hls-daterange";_.w("clpp.TimelineCueType",{SCTE35:_.cj,DASH_CALLBACK:_.we,HLS_DATERANGE:_.dj,UNKNOWN:_.fg});_.w("clpp.SpeedUpMode",{DECODER:_.xd,SEEK:"seek"});_.w("clpp.CodecSwitchingStrategy",{PREVENT:_.mf,SMOOTH:_.If});var Eu=class{};_.w("clpp.utils.PlayerConfiguration",Eu);Eu.create=function(...a){return _.um(a,{Ri:!1})};Eu.build=_.um;var Fu=["abort",Pc,Qc,Nd,"emptied",Pd,_.Rd,_.Sd,"interruptbegin","interruptend",_.ke,_.le,me,"mozaudioavailable",_.Ne,_.Re,_.cf,_.of,_.rf,_.Cf,_.Df,Jf,"suspend",_.$f,"volumechange",_.zg,_.Ag,_.wf,Fg,Eg,Cg,Dg],Qi=2,Ri=2;_.Gu=class extends _.Du{constructor(a){super();this.log=new _.S(a);this.configuration=this.ja=_.sm();this.ia=this.C=null;this.Kb=this.qf=!1;this.Of=new _.S("clpp.video.events");this.wc=null;this.fd=-1;this.ph=this.mh.bind(this);this.Vb=new _.Kr;this.setNetworkEngine(this.Vb);this.M=new _.Ut;this.pf=this.Rc=this.Wc=this.K=null}init(a,b){this.configuration=this.ja=b;this.C=a;this.log.info("Initializing Player surface");a=this.C.getMedia();this.log.info("Attaching media element listeners");for(const c of Fu)this.M.on(a,
418
+ c,this.ph,c!==_.Sd);this.wc||(this.wc=this.dh());this.wc.initialize(this);this.C.showMediaElement()}release(){const a=this;return _.v(function*(){a.K&&(a.K.destroy(),a.K=null)})}destroy(){this.M.release();return this.Vb.release()}canPlay(a,b){return _.th[this.namespace()].canPlay(a,b)}getTimeline(){return null}setupPlaylist(){return _.v(function*(){throw new _.wj(_.Ya);})}appendLoad(){return _.v(function*(){throw new _.wj(_.Ya);})}seekWith(){return _.v(function*(){throw new _.wj(_.Ya);})}detach(){return _.v(function*(){})}setSeekInterceptor(){}setPlaybackSessionId(){}getBandwidthEstimate(){return null}play(){const a=
419
+ this;return _.v(function*(){if(!a.ia)throw new _.J(_.C,7,7003,"No sources specified yet. You need to load content before calling play.");try{yield a.C.getMedia().play()}catch(b){a.log.info("Caught play promise exception",b);const c={name:b.name||"",message:b.message||"",stack:b.stack||""};om(c)?(a.trigger(new _.H(_.Kc)),a.log.warn(_.la)):c.name===Za&&a.log.warn('Unrecognized "NotAllowedError" on play(). '+`${b.name}: ${b.message}`);throw b;}})}pause(){const a=this;return _.v(function*(){if(!a.ia)throw new _.J(_.C,
419
420
  7,3201,"No sources specified yet. You need to load content before calling pause.");const b=a.getState();if(6!==b&&11!==b&&8!==b&&10!==b)throw new _.J(_.C,7,3201,"The player state does not allow pause.");a.C.getMedia().pause();8===a.getState()&&(yield new Promise(c=>{a.M.one(a,_.bf,()=>{c()})}))})}isPaused(){return this.C.getMedia().paused}isEnded(){return this.C.getMedia().ended}getConfiguration(){return this.configuration}setDrmCustomDataModifier(a){this.Wc=a}setCdnErrorCallback(a){this.Rc=a}Zc(){return this.Wc}getSurface(){return this.C}getBufferInfo(a){const b=
420
- this.getSurface().getMedia();return new _.zu(b?b.buffered:void 0,a)}getPosition(){return this.getMediaPosition()}getMediaPosition(){const a=this.C.getMedia();if(a)return a.currentTime;this.log.warn("No media element available, can not report current time!");return 0}seek(a){const b=this;return _.v(function*(){const c=b.getMediaPosition();if(null!=a&&typeof a===_.r&&a!==c){var d=b.C.getMedia();if(!d)throw new _.vj("No media element available, can not set current time!");var e=a-c;.1>=Math.abs(e)?b.log.info(`Skip seek. Delta ${Math.abs(e)} < ${.1}`):
421
- (yield vm(b,d),yield wm(b,d,a,e,c))}})}getVolume(){const a=this.C.getMedia();if(a)return a.volume;this.log.warn("No media element available, can not report volume!");return null}setVolume(a){const b=this.C.getMedia();b?_.eh(a)?0>a||1<a?this.log.warn(`Can not set volume to ${a}.
422
- Value must be between 0 and 1.`):b.volume=a:this.log.warn("Can not set volume to "+a+". Volume must be a number"):this.log.warn("No media element available, can not set volume !")}isMuted(){return this.C.getMedia().muted}setMuted(a){const b=this.C.getMedia();typeof a===_.Mc&&(b.muted=a)}getDuration(){return this.getMediaDuration()}getMediaDuration(){return this.ia?this.C.getMedia().duration:-1}getTrackManager(){return this.vc}getPlaybackRate(){const a=this.C.getMedia();return a&&a.playbackRate||
423
- 1}setPlaybackRate(a){const b=this.C.getMedia();void 0!==a&&b&&(b.playbackRate=a)}setSourceIndex(a){this.fd=a}getSourceIndex(){return this.fd}getLoadedSource(){return this.ia&&-1!==this.fd?this.ia[this.fd]:null}getPeriods(){return[]}getNetworkEngine(){return this.Ub}setNetworkEngine(a){this.Ub=a;$k(this.Ub,b=>{this.onError(b)})}setCmsdManager(a){this.pf=a}getTextDisplayer(){return this.K}getTimelineCues(){return[]}getCueTimeline(){return null}resetAbr(){}mh(a){var b=this.getSurface().getMedia();const c=
424
- this.getPosition();let d="Received Video Element Event: '"+a.type+"' with playhead at: "+c;if(a.type===_.$f||a.type===_.of)this.Of.debug(d);else{let e="";switch(a.type){case _.rf:e=`Rate: ${this.getPlaybackRate()}`;break;case Nd:e=`Duration: ${this.getDuration()}`;break;case "volumechange":e=`Volume: ${this.getVolume()} Muted: ${this.isMuted()}`;break;case _.Re:case _.cf:case "suspend":case _.zg:case Jf:case _.Df:case _.Cf:case _.$f:case _.of:case Pc:case Qc:b=this.getBufferInfo().Pa(c);e=`State ${this.getSurface().getMedia().readyState} `+
425
- `Buffer: ${b}`;break;case _.wf:null!=b&&(e=`Size: ${b.videoWidth}x${b.videoHeight}`)}e&&(d+=". "+e);this.Of.info(d)}a.type!==_.Sd&&this.trigger(new _.H(a.type,{detail:a}))}Nf(){}};var Gu=class{constructor(){this.a=this.f=null;this.g=new _.S("clpp.drm.csl")}release(){this.a=this.f=null}};var jn={V1_STAGING:[10,191,2,8,3,18,16,40,112,52,84,192,8,246,54,24,173,231,68,61,182,196,200,24,139,231,249,144,5,34,142,2,48,130,1,10,2,130,1,1,0,181,33,18,184,208,93,2,63,204,93,149,226,194,81,193,198,73,180,23,124,216,210,190,239,53,91,176,103,67,222,102,30,61,42,188,49,130,183,153,70,213,95,220,8,223,233,84,7,129,94,154,98,116,179,34,162,199,245,224,103,187,95,10,192,122,137,212,90,234,148,178,81,111,7,91,102,239,129,29,13,38,225,185,166,184,148,242,185,133,121,98,170,23,28,79,102,99,13,62,76,
421
+ this.getSurface().getMedia();return new _.Au(b?b.buffered:void 0,a)}getPosition(){return this.getMediaPosition()}getMediaPosition(){const a=this.C.getMedia();if(a)return a.currentTime;this.log.warn("No media element available, can not report current time!");return 0}seek(a){const b=this;return _.v(function*(){const c=b.getMediaPosition();if(null!=a&&typeof a===_.r&&a!==c){var d=b.C.getMedia();if(!d)throw new _.wj("No media element available, can not set current time!");var e=a-c;.1>=Math.abs(e)?b.log.info(`Skip seek. Delta ${Math.abs(e)} < ${.1}`):
422
+ (yield wm(b,d),yield xm(b,d,a,e,c))}})}getVolume(){const a=this.C.getMedia();if(a)return a.volume;this.log.warn("No media element available, can not report volume!");return null}setVolume(a){const b=this.C.getMedia();b?_.eh(a)?0>a||1<a?this.log.warn(`Can not set volume to ${a}.
423
+ Value must be between 0 and 1.`):b.volume=a:this.log.warn("Can not set volume to "+a+". Volume must be a number"):this.log.warn("No media element available, can not set volume !")}isMuted(){return this.C.getMedia().muted}setMuted(a){const b=this.C.getMedia();typeof a===_.Mc&&(b.muted=a)}getDuration(){return this.getMediaDuration()}getMediaDuration(){return this.ia?this.C.getMedia().duration:-1}getTrackManager(){return this.wc}getPlaybackRate(){const a=this.C.getMedia();return a&&a.playbackRate||
424
+ 1}setPlaybackRate(a){const b=this.C.getMedia();void 0!==a&&b&&(b.playbackRate=a)}setSourceIndex(a){this.fd=a}getSourceIndex(){return this.fd}getLoadedSource(){return this.ia&&-1!==this.fd?this.ia[this.fd]:null}getPeriods(){return[]}getNetworkEngine(){return this.Vb}setNetworkEngine(a){this.Vb=a;al(this.Vb,b=>{this.onError(b)})}setCmsdManager(a){this.pf=a}getTextDisplayer(){return this.K}getTimelineCues(){return[]}getCueTimeline(){return null}resetAbr(){}mh(a){var b=this.getSurface().getMedia();const c=
425
+ this.getPosition();let d="Received Video Element Event: '"+a.type+"' with playhead at: "+c;if(a.type===_.$f||a.type===_.of)this.Of.debug(d);else{let e="";switch(a.type){case _.rf:e=`Rate: ${this.getPlaybackRate()}`;break;case Nd:e=`Duration: ${this.getDuration()}`;break;case "volumechange":e=`Volume: ${this.getVolume()} Muted: ${this.isMuted()}`;break;case _.Re:case _.cf:case "suspend":case _.zg:case Jf:case _.Df:case _.Cf:case _.$f:case _.of:case Pc:case Qc:b=this.getBufferInfo().Ra(c);e=`State ${this.getSurface().getMedia().readyState} `+
426
+ `Buffer: ${b}`;break;case _.wf:null!=b&&(e=`Size: ${b.videoWidth}x${b.videoHeight}`)}e&&(d+=". "+e);this.Of.info(d)}a.type!==_.Sd&&this.trigger(new _.H(a.type,{detail:a}))}Nf(){}};var Hu=class{constructor(){this.a=this.f=null;this.g=new _.S("clpp.drm.csl")}release(){this.a=this.f=null}};var kn={V1_STAGING:[10,191,2,8,3,18,16,40,112,52,84,192,8,246,54,24,173,231,68,61,182,196,200,24,139,231,249,144,5,34,142,2,48,130,1,10,2,130,1,1,0,181,33,18,184,208,93,2,63,204,93,149,226,194,81,193,198,73,180,23,124,216,210,190,239,53,91,176,103,67,222,102,30,61,42,188,49,130,183,153,70,213,95,220,8,223,233,84,7,129,94,154,98,116,179,34,162,199,245,224,103,187,95,10,192,122,137,212,90,234,148,178,81,111,7,91,102,239,129,29,13,38,225,185,166,184,148,242,185,133,121,98,170,23,28,79,102,99,13,62,76,
426
427
  96,39,24,137,127,94,30,249,182,170,245,173,77,186,42,126,20,23,109,241,52,161,211,24,91,90,33,138,192,90,76,65,240,129,239,255,128,163,160,64,197,11,9,187,199,64,238,220,216,241,77,103,90,145,152,15,146,202,125,220,100,106,6,173,173,81,1,247,74,14,73,140,192,31,0,83,43,172,33,120,80,189,144,94,144,146,54,86,183,223,239,239,66,72,103,103,243,62,246,40,61,79,66,84,171,114,88,147,144,190,229,88,8,241,214,104,8,13,69,216,147,194,188,162,247,77,96,160,192,208,160,153,60,239,1,96,71,3,51,76,54,56,19,148,
427
428
  134,188,157,175,36,253,103,160,127,154,217,67,2,3,1,0,1,58,18,115,116,97,103,105,110,103,46,103,111,111,103,108,101,46,99,111,109,18,128,3,152,62,48,53,38,117,244,11,167,21,252,36,155,218,229,212,172,114,73,162,102,101,33,228,54,85,115,149,41,114,31,248,128,224,170,239,197,226,123,201,128,218,234,218,191,63,195,134,208,132,160,44,130,83,120,72,204,117,63,244,151,176,17,167,218,151,120,138,0,226,170,107,132,205,125,113,192,122,72,235,246,22,2,204,165,163,243,32,48,167,41,92,48,218,145,91,145,220,24,
428
429
  185,188,149,147,184,222,139,181,15,13,237,193,41,56,184,233,224,57,205,222,24,250,130,232,27,176,50,99,15,233,85,216,90,86,108,225,84,48,11,246,212,193,189,18,105,102,53,107,40,125,101,123,24,206,99,208,239,212,95,197,38,158,151,234,177,28,181,99,229,86,67,178,111,244,159,16,156,33,1,175,202,243,91,131,47,40,143,13,157,69,150,14,37,158,133,251,93,36,219,210,207,130,118,76,93,217,191,114,126,251,233,200,97,248,105,50,31,106,222,24,144,95,77,146,249,166,218,101,54,219,132,117,135,29,22,142,135,11,178,
@@ -436,109 +437,109 @@ this.getPosition();let d="Received Video Element Event: '"+a.type+"' with playhe
436
437
  21,58,231,13,118,215,58,166,74,44,51,103,50,120,198,197,213,64,34,105,66,115,72,235,88,51,28,238,54,93,147,140,187,28,173,50,109,5,234,155,141,29,52,234,135,38,55,103,111,116,98,171,210,13,211,129,249,70,57,64,155,151,38,8,225,188,229,3,247,234,26,46,91,211,250,252,38,87,111,205,37,108,74,168,112,74,116,191,73,170,243,167,54,36,20,23,72,67,35,181,159,241,102,250,221,22,18,92,161,54,236,172,183,214,18,160,199,92,46,171,180,211,90,64,62,144,121,201,77,74,211,17,244,49,124,244,120,116,148,234,184,79,
437
438
  136,12,176,34,231,39,149,87,28,219,2,3,1,0,1,58,12,99,97,115,116,108,97,98,115,46,99,111,109,64,1,18,128,3,50,97,151,165,120,63,210,172,84,187,10,36,166,202,149,32,118,107,37,251,186,217,170,254,4,95,20,85,66,157,43,154,24,66,136,147,101,223,78,204,173,228,175,111,100,168,97,164,222,84,160,51,79,233,227,223,105,252,85,11,242,129,199,206,11,9,236,118,163,118,204,179,159,69,108,223,229,114,176,8,26,36,9,23,103,233,62,55,162,154,209,96,98,102,80,173,114,233,213,36,56,135,65,188,245,176,95,70,189,199,
438
439
  143,81,72,182,124,207,225,238,28,172,144,110,89,44,12,137,51,52,239,130,117,119,15,207,200,229,142,166,8,80,79,111,255,191,70,47,189,108,75,234,184,241,119,21,255,98,167,124,132,30,239,102,113,7,132,96,39,134,123,220,209,255,110,222,35,147,0,77,125,253,129,139,66,158,126,221,13,117,113,163,143,235,9,130,180,3,133,94,152,45,199,69,168,182,95,122,82,25,203,10,99,191,186,193,238,225,224,140,156,142,171,110,26,214,32,240,6,218,138,10,47,114,133,17,1,151,43,213,223,198,210,186,81,18,50,221,84,177,180,
439
- 26,58,164,235,113,177,235,207,22,230,8,119,76,167,166,176,173,209,214,53,116,116,231,227,221,238,174,87,249,19,166,195,81,47,210,172,15,75,251,202,192,80,85,213,23,17,178,104,181,193,115,239,91,72,230,167,55,143,10,250,26,54,8,60,13,213,206,235,3,215,179,205,232,1,144,158,35,48,196,149,117,219,63,196,130,117,40,165,193,65,215,122,44,201,218,67,216,6,131,178,5,168,229,21,137,112,215,254,127,48,160,181,68,49,255,64,46,247,236,85,155,146,208,5,219,252,37,174,31,218,136,135,55,119,112]};_.Xm=class{constructor(a,b){b=void 0===b?!1:b;this.f=_.eh(a)?new DataView(new ArrayBuffer(a),0,a):a;this.a=0;this.h=b;this.buffer=this.f.buffer}getPosition(){return this.a}Ta(){return this.f.byteLength}seek(a){(0>a||a>=this.f.byteLength)&&_.zm();this.a=a}};_.Cn=class{constructor(a,b){this.f=a;this.h=void 0===b?!0:b;this.a=0}getPosition(){return this.a}Ta(){return this.f.byteLength}skip(a){this.a+a>this.f.byteLength&&_.Cm();this.a+=a}seek(a){if(0>a||a>=this.f.byteLength)throw _.Cm();this.a=a}};
440
- _.w("clpp.utils.dataview.DataViewReader",_.Cn);_.Vm=class{constructor(){this.h=[];this.f=[];this.a=!1;this.g=new _.S("clpp.mp4")}N(a,b){a=Mm(a);this.h[a]=Hu;this.f[a]=b;return this}fa(a,b){a=Mm(a);this.h[a]=Iu;this.f[a]=b;return this}stop(){this.a=!0}parse(a,b){a=_.E(a);a=new _.Cn(new DataView(a.buffer,a.byteOffset,a.byteLength),!1);for(this.a=!1;_.Bm(a)&&!this.a;)this.Ce(0,a,b)}Ce(a,b,c){const d=b.getPosition();let e=_.P(b);var f=_.P(b);let g=!1;this.g.debug("Parsing MP4 box",_.Nm(f));switch(e){case 0:e=b.Ta()-d;break;case 1:e=_.Gm(b),g=!0}const h=
441
- this.f[f];if(h){let m=null;var k=null;this.h[f]===Iu&&(k=_.P(b),m=k>>>24,k&=16777215);f=b.getPosition()-d;var l=d+e;c&&l>b.Ta()&&(l=b.Ta());l-=b.getPosition();b=0<l?_.Lm(b,l):new Uint8Array(0);b=new _.Cn(new DataView(b.buffer,b.byteOffset,b.byteLength),!1);h({parser:this,partialOkay:c||!1,version:m,flags:k,reader:b,size:e,start:d+a,headerSize:f,has64BitSize:g})}else a=Math.min(d+e-b.getPosition(),b.Ta()-b.getPosition()),b.skip(a)}};_.w("clpp.utils.Mp4Parser",_.Vm);_.Vm.typeToString=_.Nm;
442
- _.Vm.allData=_.Qm;_.Vm.sampleDescription=_.Pm;_.Vm.children=_.Om;_.Vm.prototype.parseNext=_.Vm.prototype.Ce;_.Vm.prototype.parse=_.Vm.prototype.parse;_.Vm.prototype.stop=_.Vm.prototype.stop;_.Vm.prototype.fullBox=_.Vm.prototype.fa;_.Vm.prototype.box=_.Vm.prototype.N;_.Vm.headerSize=_.Rm;var Hu=0,Iu=1;var Ju=class{};_.w("clpp.utils.FairplayUtils",Ju);Ju.parseFairPlayResponse=_.$m;Ju.formatFairPlayRequest=_.Zm;Ju.createFairplayPayload=Ym;Ju.extractContentId=_.Um;Ju.extractExtXKeyUri=Sm;var Ku,Lu,Mu,Nu,fn;Ku=[Fa,Ha,Ga,_.nb,_.mb];Lu=[Fa,Ha,Ga,_.nb,_.mb];Mu=["3000","2000","150"];Nu=["2000","150"];
443
- fn={1001:"Internal Error",1002:"External Error",10001:"Bad request",10002:"Request read failed",10003:"Content keys not found",10101:"Request denied",10201:"Missing config",10202:"Feature disabled",20001:"Authtoken invalid",20002:"Authtoken expired",20003:"Auth callback failed",20101:"Auth denied",40001:"Device revoked (override possible)",40002:"Device permanently revoked",40003:"Invalid service certificate (unmapped)",40004:"Persistence forbidden",60001:"CSL Invalid",60100:"CSL Denied",70100:"GBL Denied"};
444
- _.cn=new _.S("clpp.drm.DrmTodayUtils");_.Ou=class{constructor(a){this.f=a;this.a=void 0}value(){void 0===this.a&&(this.a=this.f());return this.a}};var Qu=class{constructor(){this.size=0;this.a=void 0;this.g=new _.S("clpp.drm.eme.MediaKeyStatusMap")}getStatus(){return this.a}forEach(a){this.a&&a(this.a,Pu.value())}get(a){if(this.has(a))return this.a}has(a){const b=Pu.value();return this.a&&ni(a,b)?!0:!1}entries(){}keys(){}values(){}},Pu=new _.Ou(()=>ti(new Uint8Array([0])));var mn=new _.Ou(()=>new Map([[HTMLMediaElement.HAVE_METADATA,_.le],[HTMLMediaElement.HAVE_CURRENT_DATA,_.ke],[HTMLMediaElement.HAVE_FUTURE_DATA,Pc],[HTMLMediaElement.HAVE_ENOUGH_DATA,Qc]]));_.w("clpp.drm.eme.EmeFactory.Apis",{STANDARD:lb,APPLE:fa,WEBKIT:"WEBKIT",NOP:"NOP"});var Su=class{constructor(){this.j=this.w=null}l(a){this.w=a}h(a){const b=this.j;b&&b!==a&&on(b,null);return(this.j=a)?on(a,this.w):Promise.resolve()}o(){return this.j}a(a,b){_.rh("AppleEmeManager.requestMediaKeySystemAccess");try{const c=new Ru(a,b);return Promise.resolve(c)}catch(c){return Promise.reject(c)}}f(){return fa}},Ru=class{constructor(a,b){this.keySystem=a;if(a.startsWith(_.pd))for(var c of b){a:{a=c;if(a.persistentState===_.vf){a=null;break a}b={audioCapabilities:[],videoCapabilities:[],
440
+ 26,58,164,235,113,177,235,207,22,230,8,119,76,167,166,176,173,209,214,53,116,116,231,227,221,238,174,87,249,19,166,195,81,47,210,172,15,75,251,202,192,80,85,213,23,17,178,104,181,193,115,239,91,72,230,167,55,143,10,250,26,54,8,60,13,213,206,235,3,215,179,205,232,1,144,158,35,48,196,149,117,219,63,196,130,117,40,165,193,65,215,122,44,201,218,67,216,6,131,178,5,168,229,21,137,112,215,254,127,48,160,181,68,49,255,64,46,247,236,85,155,146,208,5,219,252,37,174,31,218,136,135,55,119,112]};_.Ym=class{constructor(a,b){b=void 0===b?!1:b;this.f=_.eh(a)?new DataView(new ArrayBuffer(a),0,a):a;this.a=0;this.h=b;this.buffer=this.f.buffer}getPosition(){return this.a}Va(){return this.f.byteLength}seek(a){(0>a||a>=this.f.byteLength)&&_.Am();this.a=a}};_.Dn=class{constructor(a,b){this.f=a;this.h=void 0===b?!0:b;this.a=0}getPosition(){return this.a}Va(){return this.f.byteLength}skip(a){this.a+a>this.f.byteLength&&_.Dm();this.a+=a}seek(a){if(0>a||a>=this.f.byteLength)throw _.Dm();this.a=a}};
441
+ _.w("clpp.utils.dataview.DataViewReader",_.Dn);_.Wm=class{constructor(){this.h=[];this.f=[];this.a=!1;this.g=new _.S("clpp.mp4")}N(a,b){a=Nm(a);this.h[a]=Iu;this.f[a]=b;return this}fa(a,b){a=Nm(a);this.h[a]=Ju;this.f[a]=b;return this}stop(){this.a=!0}parse(a,b){a=_.E(a);a=new _.Dn(new DataView(a.buffer,a.byteOffset,a.byteLength),!1);for(this.a=!1;_.Cm(a)&&!this.a;)this.Ce(0,a,b)}Ce(a,b,c){const d=b.getPosition();let e=_.P(b);var f=_.P(b);let g=!1;this.g.debug("Parsing MP4 box",_.Om(f));switch(e){case 0:e=b.Va()-d;break;case 1:e=_.Hm(b),g=!0}const h=
442
+ this.f[f];if(h){let m=null;var k=null;this.h[f]===Ju&&(k=_.P(b),m=k>>>24,k&=16777215);f=b.getPosition()-d;var l=d+e;c&&l>b.Va()&&(l=b.Va());l-=b.getPosition();b=0<l?_.Mm(b,l):new Uint8Array(0);b=new _.Dn(new DataView(b.buffer,b.byteOffset,b.byteLength),!1);h({parser:this,partialOkay:c||!1,version:m,flags:k,reader:b,size:e,start:d+a,headerSize:f,has64BitSize:g})}else a=Math.min(d+e-b.getPosition(),b.Va()-b.getPosition()),b.skip(a)}};_.w("clpp.utils.Mp4Parser",_.Wm);_.Wm.typeToString=_.Om;
443
+ _.Wm.allData=_.Rm;_.Wm.sampleDescription=_.Qm;_.Wm.children=_.Pm;_.Wm.prototype.parseNext=_.Wm.prototype.Ce;_.Wm.prototype.parse=_.Wm.prototype.parse;_.Wm.prototype.stop=_.Wm.prototype.stop;_.Wm.prototype.fullBox=_.Wm.prototype.fa;_.Wm.prototype.box=_.Wm.prototype.N;_.Wm.headerSize=_.Sm;var Iu=0,Ju=1;var Ku=class{};_.w("clpp.utils.FairplayUtils",Ku);Ku.parseFairPlayResponse=_.an;Ku.formatFairPlayRequest=_.$m;Ku.createFairplayPayload=Zm;Ku.extractContentId=_.Vm;Ku.extractExtXKeyUri=Tm;var Lu,Mu,Nu,Ou,gn;Lu=[Fa,Ha,Ga,_.nb,_.mb];Mu=[Fa,Ha,Ga,_.nb,_.mb];Nu=["3000","2000","150"];Ou=["2000","150"];
444
+ gn={1001:"Internal Error",1002:"External Error",10001:"Bad request",10002:"Request read failed",10003:"Content keys not found",10101:"Request denied",10201:"Missing config",10202:"Feature disabled",20001:"Authtoken invalid",20002:"Authtoken expired",20003:"Auth callback failed",20101:"Auth denied",40001:"Device revoked (override possible)",40002:"Device permanently revoked",40003:"Invalid service certificate (unmapped)",40004:"Persistence forbidden",60001:"CSL Invalid",60100:"CSL Denied",70100:"GBL Denied"};
445
+ _.dn=new _.S("clpp.drm.DrmTodayUtils");_.Pu=class{constructor(a){this.f=a;this.a=void 0}value(){void 0===this.a&&(this.a=this.f());return this.a}};var Ru=class{constructor(){this.size=0;this.a=void 0;this.g=new _.S("clpp.drm.eme.MediaKeyStatusMap")}getStatus(){return this.a}forEach(a){this.a&&a(this.a,Qu.value())}get(a){if(this.has(a))return this.a}has(a){const b=Qu.value();return this.a&&oi(a,b)?!0:!1}entries(){}keys(){}values(){}},Qu=new _.Pu(()=>ui(new Uint8Array([0])));var nn=new _.Pu(()=>new Map([[HTMLMediaElement.HAVE_METADATA,_.le],[HTMLMediaElement.HAVE_CURRENT_DATA,_.ke],[HTMLMediaElement.HAVE_FUTURE_DATA,Pc],[HTMLMediaElement.HAVE_ENOUGH_DATA,Qc]]));_.w("clpp.drm.eme.EmeFactory.Apis",{STANDARD:lb,APPLE:fa,WEBKIT:"WEBKIT",NOP:"NOP"});var Tu=class{constructor(){this.j=this.w=null}l(a){this.w=a}h(a){const b=this.j;b&&b!==a&&pn(b,null);return(this.j=a)?pn(a,this.w):Promise.resolve()}o(){return this.j}a(a,b){_.rh("AppleEmeManager.requestMediaKeySystemAccess");try{const c=new Su(a,b);return Promise.resolve(c)}catch(c){return Promise.reject(c)}}f(){return fa}},Su=class{constructor(a,b){this.keySystem=a;if(a.startsWith(_.pd))for(var c of b){a:{a=c;if(a.persistentState===_.vf){a=null;break a}b={audioCapabilities:[],videoCapabilities:[],
445
446
  persistentState:_.Ke,distinctiveIdentifier:_.Ke,initDataTypes:a.initDataTypes,sessionTypes:[Rf],label:a.label};let d=!1,e=!1;if(a.audioCapabilities)for(const f of a.audioCapabilities)f.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,f.contentType.split(";")[0])&&(b.audioCapabilities.push(f),e=!0));if(a.videoCapabilities)for(const f of a.videoCapabilities)f.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,f.contentType.split(";")[0])&&(b.videoCapabilities.push(f),
446
- e=!0));d||(e=WebKitMediaKeys.isTypeSupported(this.keySystem,_.qg));a=e?b:null}if(a){this.a=a;return}}c=Error(zb);c.name=$a;c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}createMediaKeys(){const a=new Tu(this.keySystem);return Promise.resolve(a)}getConfiguration(){_.rh("AppleEmeManager.MediaKeySystemAccess.getConfiguration");return this.a}},Tu=class{constructor(a){this.f=null;this.h=new WebKitMediaKeys(a);this.a=new _.Ut;this.j=0;this.g=new _.S(id);this.g.info("Created Media Keys for "+a)}createSession(a){a=
447
- void 0===a?Rf:a;this.g.debug("Creating Apple MediaKeys Session");if(a!==Rf)throw new TypeError("Session type "+a+ba);return new Uu(this.h,`__session_${this.j++}`)}setServerCertificate(){this.g.debug("AppleEmeManager.MediaKeys.setServerCertificate");return Promise.resolve(!1)}},Uu=class extends _.Cu{constructor(a,b){super();this.a=null;this.o=a;this.f=this.h=null;this.j=new _.Ut;this.sessionId=b;this.expiration=NaN;this.closed=new _.wk;this.l=!1;this.keyStatuses=new Qu;this.g=new _.S(id)}generateRequest(a,
448
- b){if(this.l)return Promise.reject(ob);this.g.debug("generateRequest");this.h=new _.wk;try{const c=this.o.createSession(_.qg,_.E(b));this.a=c;this.sessionId=c.sessionId||this.sessionId||"";this.j.on(c,Eg,d=>{{const e=this.keyStatuses.getStatus();this.g.debug(`Received Key Message in ${this.sessionId}`);this.h&&(this.h.resolve(),this.h=null);d=new _.H(_.qe,{messageType:void 0===e||e===Mf?fe:ee,message:ti(d.message.buffer)});this.dispatchEvent(d)}});this.j.on(c,Cg,d=>{this.g.debug("onWebkitKeyAdded_",
449
- d);this.f&&(pn(this,"usable"),this.f.resolve(),this.f=null)});this.j.on(c,Dg,()=>{var d=this.keyStatuses.getStatus();if(this.a&&this.a&&this.a.error&&this.a.error.code===WebKitMediaKeyError.MEDIA_KEYERR_DOMAIN&&d===Mf)this.g.warn(`Ignoring webkit key error for session ${this.sessionId}`);else if(this.g.error(`Received key error in session ${this.sessionId} `+`with code ${this.a.error.code}. `+`Session Status ${d}.`),d=Error("EME AppleEmeManager key error"),d.errorCode=this.a.error,null!==this.h)this.h.reject(d),
450
- this.h=null;else if(null!==this.f)this.f.reject(d),this.f=null;else switch(this.a.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:pn(this,"output-not-allowed");break;default:pn(this,_.be)}});pn(this,Mf)}catch(c){this.h.reject(c)}return this.h}load(){this.g.debug(_.je);return Promise.reject(Error("MediaKeySession.load not yet supported"))}update(a){if(this.l)return Promise.reject(ob);this.g.debug(gg);this.f=new _.wk;try{this.a.update(_.E(a))}catch(b){this.f.reject(b)}return this.f}close(){if(this.l)return this.closed;
451
- this.g.info(`Closing Key Session ${this.sessionId}`);this.l=!0;try{this.a.close(),this.closed.resolve(),_.Fh(this.j)}catch(a){this.closed.reject(a)}return this.closed}remove(){this.g.debug("remove");return Promise.reject(Error("MediaKeySession is only applicable for persistent licenses, which are not supported on this platform"))}},Vu=class{a(){return fa}f(){return!!window.WebKitMediaKeys}create(){return new Su}};var Wu=class{constructor(){this.j=null;this.g=new _.S("clpp.drm.eme.StandardEmeManager")}l(a){this.j=a}h(a){return this.j?this.j.setMediaKeys(a):Promise.reject(Ra)}o(){return this.j&&this.j.mediaKeys}a(a,b){this.g.info("Requesting media key system access for",a,b.map(c=>Object.assign({},c,{drmInfos:c.drmInfos.map(()=>"_anonymous_")})));return navigator.requestMediaKeySystemAccess(a,b).catch(c=>{this.g.info("Failed to request media key system access for "+`${a}.`,c);return Promise.reject(c)})}f(){return lb}},
452
- Xu=class{a(){return lb}f(){return!!(window.MediaKeys&&navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)}create(){return new Wu}};var Zu=class{constructor(){this.w=this.j=null;this.A="";HTMLMediaElement.prototype.webkitGenerateKeyRequest&&(this.A="webkit")}l(a){this.j=a}h(a){_.rh("WebkitEmeManager.setMediaKeys");if(!this.j)return Promise.reject(Ra);const b=this.w;b&&b!==a&&sn(b,null);(this.w=a)&&sn(a,this.j);return Promise.resolve()}o(){return this.w}a(a,b){_.rh("WebkitEmeManager.requestMediaKeySystemAccess");try{if(this.j)var c=this.j;else{var d=document.getElementsByTagName(_.t);c=d.length?d[0]:document.createElement(_.t)}const e=
453
- new Yu(this.A,c,a,b);return Promise.resolve(e)}catch(e){return Promise.reject(e)}}f(){return"WEBKIT"}},Yu=class{constructor(a,b,c,d){this.h=a;this.a=this.keySystem=c;a=!1;c===_.Le&&(this.a=Bg,a=!1);let e=!1;for(const g of d){d=[];var f=[];let h=!1;if(g.audioCapabilities)for(const k of g.audioCapabilities)k.contentType&&(h=!0,b.canPlayType(k.contentType.split(";")[0],this.a)&&(d.push(k),e=!0));if(g.videoCapabilities)for(const k of g.videoCapabilities)k.contentType&&(h=!0,b.canPlayType(k.contentType,
454
- this.a)&&(f.push(k),e=!0));h||(e=b.canPlayType(_.qg,this.a)||b.canPlayType("video/webm",this.a));g.persistentState!==_.vf||a||(e=!1);if(e){this.f=g;return}}b=zb;if(c===_.Le||c===_.td)b="None of the requested configurations were supported.";c=Error(b);c.name=$a;c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}createMediaKeys(){return Promise.resolve(new $u(this.h,this.a))}getConfiguration(){return this.f}},$u=class{constructor(a,b){this.h=a;this.o=b;this.a=null;this.f=new _.Ut;this.j=[];this.l=new Map}createSession(a=
455
- Rf){if(a!==Rf&&a!==_.Pe)throw new TypeError("Session type "+a+ba);if(!this.a)throw a=Error("Media element is missing."),a.name=Ja,a.code=DOMException.INVALID_STATE_ERR,a;this.a.src||(this.a.src="about:blank");a=new av(this.h,this.a,this.o,a);this.j.push(a);return a}setServerCertificate(){return Promise.resolve(!1)}},av=class extends _.Cu{constructor(a,b,c,d){super();this.w=a;this.j=b;this.o=!1;this.a=this.f=null;this.h=c;this.l=d;this.sessionId="";this.expiration=NaN;this.closed=new _.wk;this.keyStatuses=
456
- new Qu}ready(){_.rh("WebkitEmeManager.MediaKeySession.ready");rn(this,"usable");this.a&&this.a.resolve();this.a=null}generateRequest(a,b){_.rh("WebkitEmeManager.MediaKeySession.generateRequest");return un(this,b,null)}load(a){_.rh(Fb);return this.l===_.Pe?un(this,null,a):Promise.reject(Error(Wa))}update(a){_.rh(Fb);const b=new _.wk;vn(this,b,a);return b}close(){_.rh("WebkitEmeManager.MediaKeySession.close");if(this.l!==_.Pe){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),
457
- this.closed;const a=tn(this,"cancelKeyRequest");try{this.j[a](this.h,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed}remove(){_.rh("WebkitEmeManager.MediaKeySession.remove");return this.l!==_.Pe?Promise.reject(Error(Wa)):this.close()}},bv=class{a(){return"WEBKIT"}f(){return!(!HTMLMediaElement.prototype.webkitGenerateKeyRequest&&!HTMLMediaElement.prototype.generateKeyRequest)}create(){return new Zu}};var cv=class{l(){}h(a){_.rh("NopEmeManager.setMediaKeys");return null===a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}o(){return null}a(){_.rh("NopEmeManager.requestMediaKeySystemAccess");return Promise.reject(Error("The key system specified is not supported."))}f(){return"NOP"}},dv=class{a(){return"NOP"}f(){return!0}create(){return new cv}};var xn=new _.S("clpp.drm.EmeFactory"),wn=[];_.ev=class{h(a,b){a=this.a(a,b);return 1!==a.length?null:a[0]}a(a,b){return Array.from(a.childNodes).filter(c=>c instanceof Element&&c.tagName===b)}getAttributeNS(a,b,c){return a.hasAttributeNS(b,c)?a.getAttributeNS(b,c):null}f(a){return Array.from(a.childNodes).every(b=>b.nodeType===Node.TEXT_NODE||b.nodeType===Node.CDATA_SECTION_NODE)?a.textContent.trim():null}j(a,b){const c=new DOMParser;let d=null;try{d=c.parseFromString(a,_.Uf)}catch(e){}if(!d)return null;a=d.documentElement;return b&&a.tagName!==
458
- b||0<d.getElementsByTagName("parsererror").length?null:a}removeChild(a,b){a.removeChild(b)}};_.Mg=_.ev.prototype;_.Mg.Zd=_.Og(19);_.Mg.Ee=_.Og(17);_.Mg.te=_.Og(15);_.Mg.ue=_.Og(13);_.Mg.De=_.Og(11);_.Mg.Sc=_.Og(9);_.Mg.pe=_.Og(7);_.Mg.aa=_.Og(5);_.Mg.Cc=_.Og(3);_.Mg.Wb=_.Og(1);_.Fn=new _.ev;_.fv=new _.S("clpp.xml.Parser");_.qm="dom";var An,gv,zn;_.Jn=[154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149];An=[237,239,139,169,121,214,74,206,163,200,39,220,213,29,33,237];gv=class{constructor(a,b,c){this.j=new Uint8Array(a);this.a=b;this.f=c}};zn=class extends gv{};_.In=class extends gv{constructor(a,b,c,d,e,f){f=void 0===f?null:f;super(a,b,d);this.version=e;this.h=c;this.l=f}};var Ln=!!(performance&&performance.mark&&performance.measure),Nn=new _.S("clpp.perf");var qo=class{constructor(a){this.f=[];this.h=[];this.a=[];8<=a.byteLength&&(new _.Vm).fa("pssh",this.j.bind(this)).parse(a.buffer);0===this.a.length&&_.A("No pssh box found!")}j(a){if(1<a.version)_.A("Unrecognized PSSH version found!");else{var b=_.Qk(_.Lm(a.reader,16)),c=[];if(0<a.version){var d=_.P(a.reader);for(let e=0;e<d;++e){const f=_.Qk(_.Lm(a.reader,16));c.push(f)}}d=_.P(a.reader);a.reader.skip(d);this.h.push.apply(this.h,c);this.f.push(b);this.a.push({start:a.start,end:a.start+a.size-1});
459
- a.reader.getPosition()!==a.reader.Ta()&&_.A("Mismatch between box size and data size!")}}};var lo,hv;
460
- _.fp=class{constructor(a,b){this.D=a;this.lb=b;this.J=new Set;this.C=this.I=this.l=null;this.S=!1;this.a=null;this.K=hv;this.B=new _.Ut;this.M=new Gu;this.h=new Map;this.L=[];this.H=new _.wk;this.Aa=0;this.f=null;this.w=c=>{this.A=!0;this.F=!1;this.H.reject(c);a.onError(c)};this.o=new Map;this.Z=new Map;this.U=new _.Jh(()=>bo(this));this.j=!1;this.da=new _.wk;this.G=!1;this.W=[];this.ja=!1;this.R=0;this.g=new _.S("clpp.drm.DrmEngine");this.ca=(new _.Jh(()=>{co(this)})).Gb(1);this.H.catch(()=>{});
461
- this.A=this.F=!1;this.P=null}destroy(){const a=this;return _.v(function*(){a.j?yield a.da:(a.j=!0,yield eo(a),a.da.resolve())})}keySystem(){return this.a?_.Rn(this.a.keySystem):""}getDrmInfo(){return this.a}eb(a){const b=this;return _.v(function*(){b.G&&b.K===lo||(!b.f.delayLicenseRequestUntilPlayed||b.C&&!b.C.paused||b.ja?yield vo(b,a):b.W.push(a))})}cb(a){const b=a.target;this.g.info("Key status changed for session",b.sessionId);const c=this.h.get(b);let d=!1;b.keyStatuses.forEach((e,f)=>{if(typeof f===
462
- _.Of){var g=f;f=e;e=g}if(Qn(this.a.keySystem)&&16===f.byteLength&&_.Lh()){g=_.si(f);const k=g.getUint32(0,!0),l=g.getUint16(4,!0),m=g.getUint16(6,!0);g.setUint32(0,k,!1);g.setUint16(4,l,!1);g.setUint16(6,m,!1)}c&&e!==Mf&&(c.loaded=!0);c&&c.qb&&c.qb.resolve();"expired"===e&&(d=!0);f=_.E(f);let h=_.Qk(f);"00"===h&&c&&c.keyId?h=c.keyId:this.a.keySystem.startsWith(_.pd)&&16!==f.byteLength&&(h=ui(f));(f=h||"")?this.g.info(`Key status for Key ID '${h}': ${e}`):this.g.info(`Key status global keys: ${e}`);
463
- this.o.set(f,e);c&&!c.keyId&&this.h.forEach((k,l)=>{l===b||k.keyId!==h||k.loaded||(k.loaded=!0)})});c&&c.loaded&&c.ub.forEach(e=>{this.o.get(e)===Mf&&(this.g.warn(`Key status for Key ID '${e}': 'output-restricted'`),this.o.set(e,_.Me))});for(a=0;a<this.a.initData.length;a++){const e=this.a.initData[a];e.keyId&&this.o.get(e.keyId)===Mf&&_.Rk(e.initData,c.initData)&&(this.g.warn(`Key status for Key ID '${e.keyId}': 'output-restricted'`),this.o.set(e.keyId,_.Me))}a=b.expiration-Date.now();(0>a||d&&1E3>
464
- a)&&c&&!c.tc&&(this.g.debug("Session has expired",b.sessionId),(a=this.h.get(b))&&a.Uc&&a.Uc.stop(),this.h.delete(b),b.close().catch(()=>{}));Eo(this)&&(this.H.resolve(),1!==this.h.size||d?this.U.la(.5):bo(this))}};lo=0;hv=3;_.Qo=new Map;_.Ro=new _.S("clpp.text");var iv=class{constructor(){this.a=null;this.f=[]}};var jv=class{constructor(){this.h=this.f=this.j=null;this.a=[]}};_.kv=class{constructor(){this.h=this.w=this.B=this.C=this.l=this.o=this.j=this.A=NaN;this.a=new iv;this.f=new jv}getStats(){const a=[];for(const b of Xo(this.a))a.push({timestamp:b.timestamp,state:_.Uo(b.state),duration:b.duration});return{width:this.A,height:this.j,streamBandwidth:this.w,decodedFrames:this.l,droppedFrames:this.o,corruptedFrames:this.C,estimatedBandwidth:this.h,loadLatency:this.B,playTime:Wo(this.a,8),pauseTime:Wo(this.a,10),bufferingTime:Wo(this.a,6),stateHistory:a,switchHistory:Yo(this.f)}}};_.w("clpp.utils.media.detectType",$o);var cp=new _.S("clpp.sources");var lv=class extends _.Fu{constructor(){super(jd);this.w=this.G=!1;this.l=this.A=this.o=this.a=this.j=null;this.h=new _.Ut;this.F=this.B=this.f=this.H=null}init(a,b){super.init(a,b);this.j=new Xt(this);Mi(this.j,0)}namespace(){return jd}unload(){const a=this;return _.v(function*(){if(a.ia){a.log.debug("Releasing player with source",a.ia);a.B&&(a.B.stop(),a.B=null);var b=a.getTrackManager();b&&b.release();a.A&&(a.A.destroy(),a.A=null);a.K&&(a.K.destroy(),a.K=null);a.l&&a.l.release();a.o&&(a.o.destroy(),
465
- a.o=null);_.Fh(a.h);a.f&&(a.f=new _.kv);a.F=null;a.ia=null;a.G=!1;a.a&&(a.a.removeAttribute("src"),a.a.load());if(a.w)throw new _.J(_.C,7,7E3);a.a&&(b=a.a,a.h.off(b,_.Sd),a.h.off(b,_.wf),a.a=null)}})}release(){return super.release().then(()=>this.unload()).then(()=>{this.j&&Mi(this.j,0)})}destroy(){if(this.w)return this.log.warn("Player is already destroyed!"),Promise.resolve();this.w=!0;return super.destroy().then(()=>this.release()).then(()=>{this.log.debug(xa);const a=this.getTrackManager();a&&
466
- a.destroy();this.l&&(this.l.destroy().catch(b=>{this.log.warn("Error while disposing metadata handler",b)}),this.l=null);this.j&&(this.j.destroy(),this.j=null);this.f=null})}getDrmInfo(){return this.o?this.o.getDrmInfo():null}getTrackManager(){return this.vc}load(a){const b=this;return _.v(function*(){if(b.w)return Promise.reject(new _.J(_.C,7,7E3));if(!b.getSurface()||!b.getSurface().getMedia())return Promise.reject("No surface or no media element in surface");const c=b.C.getMedia();b.H=Date.now()/
467
- 1E3;b.f=new _.kv;b.h.on(b,_.bf,()=>{b.f&&_.Vo(b.f.a,b.getState())});Mi(b.j,2);b.ia=_.bp(a);b.configuration=_.tm([b.ja,a]);b.log.debug(_.Na,b.configuration);b.log.debug(_.eb,b.ia);const d=_.To(b.configuration,[_.Zd,_.xe]);b.K=d.create(b);b.K.setTextVisibility(!0);b.K.getClass()===_.Zd&&(b.A=new ku(b.K),b.A.start(c));b.l?b.l.release():b.l=new Yt(b);c.textTracks&&jj(b.l,c.textTracks);b.getTrackManager().load();c.loop=!!b.configuration.loop;_.z(b.configuration.volume)||b.setVolume(b.configuration.volume);
468
- _.z(b.configuration.muted)||b.setMuted(b.configuration.muted);null==b.configuration.startTime&&lp(b,c);_.Yh()&&mp(b,c);try{ep(b,c),yield hp(b),yield kp(b).V}catch(e){b.G=!1,b.onError(e)}})}onError(a){this.G||(a.severity===_.C&&null!==this.j&&Mi(this.j,3),this.trigger(new _.H(_.Sd,{detail:a})))}dh(){return new yu}getState(){return null!==this.j?this.j.getState():0}getPresentationStartTime(){if(this.a&&this.a.getStartDate&&this.isLive()){const a=this.a.getStartDate();return isNaN(a.getTime())?null:
469
- a.getTime()/1E3}return null}getSeekRange(){var a=this.getSurface().getMedia();if(a&&a.src){a=a.seekable;if(a.length)return this.F=a={start:a.start(0),end:a.end(a.length-1)};if(this.F)return this.F}return{start:0,end:0}}isLive(){return this.a&&this.a.src?Infinity===this.a.duration:!1}getStats(){if(!this.f||!this.a)return _.Zo();this.f&&_.Vo(this.f.a,this.getState());var a=this.a,b=this.f,c=a.videoHeight;b.A=a.videoWidth;b.j=c;a.getVideoPlaybackQuality&&(c=a.getVideoPlaybackQuality(),a=this.f,b=Number(c.totalVideoFrames),
470
- a.o=Number(c.droppedVideoFrames),a.l=b,this.f.C=Number(c.corruptedVideoFrames));if(a=this.getTrackManager())if(a=a.ta())a.bandwidth&&(this.f.w=a.bandwidth),a.ud&&(this.f.h=a.ud);return this.f.getStats()}getTimelineCues(){return this.l?this.l.getTimelineCues():[]}getCueTimeline(){return null}},mv=class{a(){return jd}canPlay(a,b){a=a.type||"";const c=a===_.tc,d=a===_.Bc,e=a===_.km;var f;_.Xh()||c||d||e&&!_.Yh()?f=0:f=""!==Kh().canPlayType(a)?e&&_.Yh()&&(window.ManagedMediaSource||window.MediaSource&&
471
- MediaSource.isTypeSupported)&&!b.streaming.preferNativeHlsOnSafari?1:2:0;return f}f(a){return a===_.oa}create(){return new lv}};_.Pj=1;_.Mj=2;_.w("clpp.ads.PodType",{PREROLL:0,MIDROLL:_.Pj,POSTROLL:_.Mj});_.w("clpp.ads.Technology",{CLIENT_SIDE:0,SERVER_SIDE:1,SERVER_GUIDED:2});_.w("clpp.ads.ErrorType",{LOAD:0,PLAY:1,OTHER:2});var op=new _.S("clpp.ads"),np=[];var tp;tp=new _.S("clpp.Components");_.rp=new Map;_.w("clpp.install",function(a){Bp(a)});_.w("clpp.uninstall",function(a){Cp(a)});var nv=class{load(){}j(){}A(){}resume(){}pause(){}Ja(){}isPaused(){}skip(){}getVolume(){}getAdVolume(){}setVolume(){}h(){}setMuted(){}isMuted(){}pb(){}getPosition(){}o(){}w(){}};_.w("clpp.ads.IAdsManager",nv);nv.prototype.getPosition=nv.prototype.getPosition;nv.prototype.setVolume=nv.prototype.setVolume;nv.prototype.getVolume=nv.prototype.getVolume;nv.prototype.skip=nv.prototype.skip;nv.prototype.pause=nv.prototype.pause;nv.prototype.resume=nv.prototype.resume;var V=class{fb(){}gb(){}ib(){}getId(){}getCreativeId(){}yb(){}getApiFramework(){}getAdSystem(){}getAdvertiserName(){}getTitle(){}getDuration(){}getPosition(){}getSkipTimeOffset(){}Ab(){}Ra(){}getMediaUrl(){}Va(){}Ua(){}Ba(){}Ca(){}getPodIndex(){}ob(){}hb(){}Wa(){}getWrapperAdIds(){}getWrapperAdSystems(){}getWrapperCreativeIds(){}zb(){}canSeek(){}};_.w("clpp.ads.IAd",V);V.prototype.canSeek=V.prototype.canSeek;V.prototype.getVideoElement=V.prototype.zb;V.prototype.getWrapperCreativeIds=V.prototype.getWrapperCreativeIds;
472
- V.prototype.getWrapperAdSystems=V.prototype.getWrapperAdSystems;V.prototype.getWrapperAdIds=V.prototype.getWrapperAdIds;V.prototype.getSequenceLength=V.prototype.Wa;V.prototype.getPositionInSequence=V.prototype.hb;V.prototype.getPodTimeOffset=V.prototype.ob;V.prototype.getPodIndex=V.prototype.getPodIndex;V.prototype.getPodType=V.prototype.Ca;V.prototype.getMediaBitrate=V.prototype.Ba;V.prototype.getMediaHeight=V.prototype.Ua;V.prototype.getMediaWidth=V.prototype.Va;V.prototype.getMediaUrl=V.prototype.getMediaUrl;
473
- V.prototype.getClickThroughUrl=V.prototype.Ra;V.prototype.isBumper=V.prototype.Ab;V.prototype.getSkipTimeOffset=V.prototype.getSkipTimeOffset;V.prototype.getPosition=V.prototype.getPosition;V.prototype.getDuration=V.prototype.getDuration;V.prototype.getTitle=V.prototype.getTitle;V.prototype.getAdvertiserName=V.prototype.getAdvertiserName;V.prototype.getAdSystem=V.prototype.getAdSystem;V.prototype.getApiFramework=V.prototype.getApiFramework;V.prototype.getSourceId=V.prototype.yb;
474
- V.prototype.getCreativeId=V.prototype.getCreativeId;V.prototype.getId=V.prototype.getId;V.prototype.getTechnology=V.prototype.ib;V.prototype.getAdManagerVersion=V.prototype.gb;V.prototype.getAdManagerName=V.prototype.fb;var Q=class{constructor(a,b,c,d,e,f,g){this.o=this.l=this.j=!1;this.F=a;this.f=b;this.a=c;this.h=d;this.w=0;this.B=`${e}:${b}`;this.G=e;this.videoEl=null;this.A=f;this.C=g||null}fb(){return""}gb(){return""}ib(){return 2}getId(){return this.B}getCreativeId(){return""}yb(){return this.G}getApiFramework(){return null}getAdSystem(){return""}getAdvertiserName(){return""}getTitle(){return""}getDuration(){return this.h}setPosition(a){this.w=a}getPosition(){return this.w}getSkipTimeOffset(){return-1}canSeek(){return this.A}Ab(){return!1}Ra(){return null}getMediaUrl(){return null}Va(){return 0}Ua(){return 0}Ba(){return 0}Ca(){return this.F}getPodIndex(){return 0}ob(){return 0}hb(){return this.f}Wa(){return this.a}getWrapperAdIds(){return[]}getWrapperAdSystems(){return[]}getWrapperCreativeIds(){return[]}zb(){return this.videoEl}Xh(){return this.C}};
475
- Q.prototype.getCustomAttributes=Q.prototype.Xh;Q.prototype.getVideoElement=Q.prototype.zb;Q.prototype.getWrapperCreativeIds=Q.prototype.getWrapperCreativeIds;Q.prototype.getWrapperAdSystems=Q.prototype.getWrapperAdSystems;Q.prototype.getWrapperAdIds=Q.prototype.getWrapperAdIds;Q.prototype.getSequenceLength=Q.prototype.Wa;Q.prototype.getPositionInSequence=Q.prototype.hb;Q.prototype.getPodTimeOffset=Q.prototype.ob;Q.prototype.getPodIndex=Q.prototype.getPodIndex;Q.prototype.getPodType=Q.prototype.Ca;
476
- Q.prototype.getMediaBitrate=Q.prototype.Ba;Q.prototype.getMediaHeight=Q.prototype.Ua;Q.prototype.getMediaWidth=Q.prototype.Va;Q.prototype.getMediaUrl=Q.prototype.getMediaUrl;Q.prototype.getClickThroughUrl=Q.prototype.Ra;Q.prototype.isBumper=Q.prototype.Ab;Q.prototype.canSeek=Q.prototype.canSeek;Q.prototype.getSkipTimeOffset=Q.prototype.getSkipTimeOffset;Q.prototype.getPosition=Q.prototype.getPosition;Q.prototype.getDuration=Q.prototype.getDuration;Q.prototype.getTitle=Q.prototype.getTitle;
477
- Q.prototype.getAdvertiserName=Q.prototype.getAdvertiserName;Q.prototype.getAdSystem=Q.prototype.getAdSystem;Q.prototype.getApiFramework=Q.prototype.getApiFramework;Q.prototype.getSourceId=Q.prototype.yb;Q.prototype.getCreativeId=Q.prototype.getCreativeId;Q.prototype.getId=Q.prototype.getId;Q.prototype.getTechnology=Q.prototype.ib;Q.prototype.getAdManagerVersion=Q.prototype.gb;Q.prototype.getAdManagerName=Q.prototype.fb;var ov=class{constructor(a){this.a=a.map(b=>({hc:b.getSurface().getMedia().id,player:b,ge:!0,ready:Promise.resolve()}));this.g=new _.S("clpp.playlist.PlayerPool")}has(){return this.a.some(a=>a.ge)}get(){const a=this;return _.v(function*(){const b=a.a.find(c=>c.ge);if(!b)throw Error("No available players in the pool");b.ge=!1;yield b.ready;return b.player})}release(a){const b=this.a.find(c=>c.player===a);if(!b)return Promise.resolve();b.ge=!0;b.ready=new Promise(c=>{a.release().catch(d=>{this.g.error("Failed to unload player",
478
- d)}).then(c)});return b.ready}destroy(){const a=this;return _.v(function*(){yield Promise.all(a.a.map(b=>b.player.destroy()))})}};_.w("clpp.utils.dom.createHTMLElement",_.Gp);var pv=class{constructor(a){this.a=null;this.h=new Set;this.f=null;this.set(a||null)}set(a){this.h.clear();this.f&&(this.f.disconnect(),this.f=null);if(this.a=a)this.f=Hp(this,a)}get(){return this.a}};var Mp=class{constructor(a,b){this.g=new _.S("clpp.PlayerSurface");this.w=_.Xg(qv,b);this.f=new pv;this.h=null;this.a=new pv;this.l=rv;rv+=1;this.o=`clpp-video-${this.l}`;this.j=new _.Ut;if(null==a)throw new _.J(_.C,7,7102,"No Media element was provided");if(!(a instanceof Element||(a=document.getElementById(a),a)))throw new _.J(_.C,7,7004,"Media element not found");b=this.w;this.g.debug("Initializing Player Surface on ",a);if("cast-media-player"===a.tagName.toLowerCase())this.h=a;else{if(!(a instanceof
447
+ e=!0));d||(e=WebKitMediaKeys.isTypeSupported(this.keySystem,_.qg));a=e?b:null}if(a){this.a=a;return}}c=Error(zb);c.name=$a;c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}createMediaKeys(){const a=new Uu(this.keySystem);return Promise.resolve(a)}getConfiguration(){_.rh("AppleEmeManager.MediaKeySystemAccess.getConfiguration");return this.a}},Uu=class{constructor(a){this.f=null;this.h=new WebKitMediaKeys(a);this.a=new _.Ut;this.j=0;this.g=new _.S(id);this.g.info("Created Media Keys for "+a)}createSession(a){a=
448
+ void 0===a?Rf:a;this.g.debug("Creating Apple MediaKeys Session");if(a!==Rf)throw new TypeError("Session type "+a+ba);return new Vu(this.h,`__session_${this.j++}`)}setServerCertificate(){this.g.debug("AppleEmeManager.MediaKeys.setServerCertificate");return Promise.resolve(!1)}},Vu=class extends _.Du{constructor(a,b){super();this.a=null;this.o=a;this.f=this.h=null;this.j=new _.Ut;this.sessionId=b;this.expiration=NaN;this.closed=new _.xk;this.l=!1;this.keyStatuses=new Ru;this.g=new _.S(id)}generateRequest(a,
449
+ b){if(this.l)return Promise.reject(ob);this.g.debug("generateRequest");this.h=new _.xk;try{const c=this.o.createSession(_.qg,_.E(b));this.a=c;this.sessionId=c.sessionId||this.sessionId||"";this.j.on(c,Eg,d=>{{const e=this.keyStatuses.getStatus();this.g.debug(`Received Key Message in ${this.sessionId}`);this.h&&(this.h.resolve(),this.h=null);d=new _.H(_.qe,{messageType:void 0===e||e===Mf?fe:ee,message:ui(d.message.buffer)});this.dispatchEvent(d)}});this.j.on(c,Cg,d=>{this.g.debug("onWebkitKeyAdded_",
450
+ d);this.f&&(qn(this,"usable"),this.f.resolve(),this.f=null)});this.j.on(c,Dg,()=>{var d=this.keyStatuses.getStatus();if(this.a&&this.a&&this.a.error&&this.a.error.code===WebKitMediaKeyError.MEDIA_KEYERR_DOMAIN&&d===Mf)this.g.warn(`Ignoring webkit key error for session ${this.sessionId}`);else if(this.g.error(`Received key error in session ${this.sessionId} `+`with code ${this.a.error.code}. `+`Session Status ${d}.`),d=Error("EME AppleEmeManager key error"),d.errorCode=this.a.error,null!==this.h)this.h.reject(d),
451
+ this.h=null;else if(null!==this.f)this.f.reject(d),this.f=null;else switch(this.a.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:qn(this,"output-not-allowed");break;default:qn(this,_.be)}});qn(this,Mf)}catch(c){this.h.reject(c)}return this.h}load(){this.g.debug(_.je);return Promise.reject(Error("MediaKeySession.load not yet supported"))}update(a){if(this.l)return Promise.reject(ob);this.g.debug(gg);this.f=new _.xk;try{this.a.update(_.E(a))}catch(b){this.f.reject(b)}return this.f}close(){if(this.l)return this.closed;
452
+ this.g.info(`Closing Key Session ${this.sessionId}`);this.l=!0;try{this.a.close(),this.closed.resolve(),_.Eh(this.j)}catch(a){this.closed.reject(a)}return this.closed}remove(){this.g.debug("remove");return Promise.reject(Error("MediaKeySession is only applicable for persistent licenses, which are not supported on this platform"))}},Wu=class{a(){return fa}f(){return!!window.WebKitMediaKeys}create(){return new Tu}};var Xu=class{constructor(){this.j=null;this.g=new _.S("clpp.drm.eme.StandardEmeManager")}l(a){this.j=a}h(a){return this.j?this.j.setMediaKeys(a):Promise.reject(Ra)}o(){return this.j&&this.j.mediaKeys}a(a,b){this.g.info("Requesting media key system access for",a,b.map(c=>Object.assign({},c,{drmInfos:c.drmInfos.map(()=>"_anonymous_")})));return navigator.requestMediaKeySystemAccess(a,b).catch(c=>{this.g.info("Failed to request media key system access for "+`${a}.`,c);return Promise.reject(c)})}f(){return lb}},
453
+ Yu=class{a(){return lb}f(){return!!(window.MediaKeys&&navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)}create(){return new Xu}};var $u=class{constructor(){this.w=this.j=null;this.A="";HTMLMediaElement.prototype.webkitGenerateKeyRequest&&(this.A="webkit")}l(a){this.j=a}h(a){_.rh("WebkitEmeManager.setMediaKeys");if(!this.j)return Promise.reject(Ra);const b=this.w;b&&b!==a&&tn(b,null);(this.w=a)&&tn(a,this.j);return Promise.resolve()}o(){return this.w}a(a,b){_.rh("WebkitEmeManager.requestMediaKeySystemAccess");try{if(this.j)var c=this.j;else{var d=document.getElementsByTagName(_.t);c=d.length?d[0]:document.createElement(_.t)}const e=
454
+ new Zu(this.A,c,a,b);return Promise.resolve(e)}catch(e){return Promise.reject(e)}}f(){return"WEBKIT"}},Zu=class{constructor(a,b,c,d){this.h=a;this.a=this.keySystem=c;a=!1;c===_.Le&&(this.a=Bg,a=!1);let e=!1;for(const g of d){d=[];var f=[];let h=!1;if(g.audioCapabilities)for(const k of g.audioCapabilities)k.contentType&&(h=!0,b.canPlayType(k.contentType.split(";")[0],this.a)&&(d.push(k),e=!0));if(g.videoCapabilities)for(const k of g.videoCapabilities)k.contentType&&(h=!0,b.canPlayType(k.contentType,
455
+ this.a)&&(f.push(k),e=!0));h||(e=b.canPlayType(_.qg,this.a)||b.canPlayType("video/webm",this.a));g.persistentState!==_.vf||a||(e=!1);if(e){this.f=g;return}}b=zb;if(c===_.Le||c===_.td)b="None of the requested configurations were supported.";c=Error(b);c.name=$a;c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}createMediaKeys(){return Promise.resolve(new av(this.h,this.a))}getConfiguration(){return this.f}},av=class{constructor(a,b){this.h=a;this.o=b;this.a=null;this.f=new _.Ut;this.j=[];this.l=new Map}createSession(a=
456
+ Rf){if(a!==Rf&&a!==_.Pe)throw new TypeError("Session type "+a+ba);if(!this.a)throw a=Error("Media element is missing."),a.name=Ja,a.code=DOMException.INVALID_STATE_ERR,a;this.a.src||(this.a.src="about:blank");a=new bv(this.h,this.a,this.o,a);this.j.push(a);return a}setServerCertificate(){return Promise.resolve(!1)}},bv=class extends _.Du{constructor(a,b,c,d){super();this.w=a;this.j=b;this.o=!1;this.a=this.f=null;this.h=c;this.l=d;this.sessionId="";this.expiration=NaN;this.closed=new _.xk;this.keyStatuses=
457
+ new Ru}ready(){_.rh("WebkitEmeManager.MediaKeySession.ready");sn(this,"usable");this.a&&this.a.resolve();this.a=null}generateRequest(a,b){_.rh("WebkitEmeManager.MediaKeySession.generateRequest");return vn(this,b,null)}load(a){_.rh(Fb);return this.l===_.Pe?vn(this,null,a):Promise.reject(Error(Wa))}update(a){_.rh(Fb);const b=new _.xk;wn(this,b,a);return b}close(){_.rh("WebkitEmeManager.MediaKeySession.close");if(this.l!==_.Pe){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),
458
+ this.closed;const a=un(this,"cancelKeyRequest");try{this.j[a](this.h,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed}remove(){_.rh("WebkitEmeManager.MediaKeySession.remove");return this.l!==_.Pe?Promise.reject(Error(Wa)):this.close()}},cv=class{a(){return"WEBKIT"}f(){return!(!HTMLMediaElement.prototype.webkitGenerateKeyRequest&&!HTMLMediaElement.prototype.generateKeyRequest)}create(){return new $u}};var dv=class{l(){}h(a){_.rh("NopEmeManager.setMediaKeys");return null===a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}o(){return null}a(){_.rh("NopEmeManager.requestMediaKeySystemAccess");return Promise.reject(Error("The key system specified is not supported."))}f(){return"NOP"}},ev=class{a(){return"NOP"}f(){return!0}create(){return new dv}};var yn=new _.S("clpp.drm.EmeFactory"),xn=[];_.fv=class{h(a,b){a=this.a(a,b);return 1!==a.length?null:a[0]}a(a,b){return Array.from(a.childNodes).filter(c=>c instanceof Element&&c.tagName===b)}getAttributeNS(a,b,c){return a.hasAttributeNS(b,c)?a.getAttributeNS(b,c):null}f(a){return Array.from(a.childNodes).every(b=>b.nodeType===Node.TEXT_NODE||b.nodeType===Node.CDATA_SECTION_NODE)?a.textContent.trim():null}j(a,b){const c=new DOMParser;let d=null;try{d=c.parseFromString(a,_.Uf)}catch(e){}if(!d)return null;a=d.documentElement;return b&&a.tagName!==
459
+ b||0<d.getElementsByTagName("parsererror").length?null:a}removeChild(a,b){a.removeChild(b)}};_.Mg=_.fv.prototype;_.Mg.Zd=_.Og(19);_.Mg.Ee=_.Og(17);_.Mg.te=_.Og(15);_.Mg.ue=_.Og(13);_.Mg.De=_.Og(11);_.Mg.Sc=_.Og(9);_.Mg.pe=_.Og(7);_.Mg.aa=_.Og(5);_.Mg.Dc=_.Og(3);_.Mg.Xb=_.Og(1);_.Gn=new _.fv;_.gv=new _.S("clpp.xml.Parser");_.rm="dom";var Bn,hv,An;_.Kn=[154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149];Bn=[237,239,139,169,121,214,74,206,163,200,39,220,213,29,33,237];hv=class{constructor(a,b,c){this.j=new Uint8Array(a);this.a=b;this.f=c}};An=class extends hv{};_.Jn=class extends hv{constructor(a,b,c,d,e,f){f=void 0===f?null:f;super(a,b,d);this.version=e;this.h=c;this.l=f}};var Mn=!!(performance&&performance.mark&&performance.measure),On=new _.S("clpp.perf");var ro=class{constructor(a){this.f=[];this.h=[];this.a=[];8<=a.byteLength&&(new _.Wm).fa("pssh",this.j.bind(this)).parse(a.buffer);0===this.a.length&&_.A("No pssh box found!")}j(a){if(1<a.version)_.A("Unrecognized PSSH version found!");else{var b=_.Rk(_.Mm(a.reader,16)),c=[];if(0<a.version){var d=_.P(a.reader);for(let e=0;e<d;++e){const f=_.Rk(_.Mm(a.reader,16));c.push(f)}}d=_.P(a.reader);a.reader.skip(d);this.h.push.apply(this.h,c);this.f.push(b);this.a.push({start:a.start,end:a.start+a.size-1});
460
+ a.reader.getPosition()!==a.reader.Va()&&_.A("Mismatch between box size and data size!")}}};var mo,iv;
461
+ _.gp=class{constructor(a,b){this.D=a;this.nb=b;this.J=new Set;this.C=this.I=this.l=null;this.S=!1;this.a=null;this.K=iv;this.B=new _.Ut;this.M=new Hu;this.h=new Map;this.L=[];this.H=new _.xk;this.Aa=0;this.f=null;this.w=c=>{this.A=!0;this.F=!1;this.H.reject(c);a.onError(c)};this.o=new Map;this.Z=new Map;this.U=new _.Kh(()=>co(this));this.j=!1;this.da=new _.xk;this.G=!1;this.W=[];this.ja=!1;this.R=0;this.g=new _.S("clpp.drm.DrmEngine");this.ca=(new _.Kh(()=>{eo(this)})).Hb(1);this.H.catch(()=>{});
462
+ this.A=this.F=!1;this.P=null}destroy(){const a=this;return _.v(function*(){a.j?yield a.da:(a.j=!0,yield fo(a),a.da.resolve())})}keySystem(){return this.a?_.Sn(this.a.keySystem):""}getDrmInfo(){return this.a}fb(a){const b=this;return _.v(function*(){b.G&&b.K===mo||(!b.f.delayLicenseRequestUntilPlayed||b.C&&!b.C.paused||b.ja?yield wo(b,a):b.W.push(a))})}eb(a){const b=a.target;this.g.info("Key status changed for session",b.sessionId);const c=this.h.get(b);let d=!1;b.keyStatuses.forEach((e,f)=>{if(typeof f===
463
+ _.Of){var g=f;f=e;e=g}if(Rn(this.a.keySystem)&&16===f.byteLength&&_.Oh()){g=_.ti(f);const k=g.getUint32(0,!0),l=g.getUint16(4,!0),m=g.getUint16(6,!0);g.setUint32(0,k,!1);g.setUint16(4,l,!1);g.setUint16(6,m,!1)}c&&e!==Mf&&(c.loaded=!0);c&&c.qb&&c.qb.resolve();"expired"===e&&(d=!0);f=_.E(f);let h=_.Rk(f);"00"===h&&c&&c.keyId?h=c.keyId:this.a.keySystem.startsWith(_.pd)&&16!==f.byteLength&&(h=vi(f));(f=h||"")?this.g.info(`Key status for Key ID '${h}': ${e}`):this.g.info(`Key status global keys: ${e}`);
464
+ this.o.set(f,e);c&&!c.keyId&&this.h.forEach((k,l)=>{l===b||k.keyId!==h||k.loaded||(k.loaded=!0)})});c&&c.loaded&&c.ub.forEach(e=>{this.o.get(e)===Mf&&(this.g.warn(`Key status for Key ID '${e}': 'output-restricted'`),this.o.set(e,_.Me))});for(a=0;a<this.a.initData.length;a++){const e=this.a.initData[a];e.keyId&&this.o.get(e.keyId)===Mf&&_.Sk(e.initData,c.initData)&&(this.g.warn(`Key status for Key ID '${e.keyId}': 'output-restricted'`),this.o.set(e.keyId,_.Me))}a=b.expiration-Date.now();(0>a||d&&1E3>
465
+ a)&&c&&!c.uc&&(this.g.debug("Session has expired",b.sessionId),(a=this.h.get(b))&&a.Uc&&a.Uc.stop(),this.h.delete(b),b.close().catch(()=>{}));Fo(this)&&(this.H.resolve(),1!==this.h.size||d?this.U.la(.5):co(this))}};mo=0;iv=3;_.Ro=new Map;_.So=new _.S("clpp.text");var jv=class{constructor(){this.a=null;this.f=[]}};var kv=class{constructor(){this.h=this.f=this.j=null;this.a=[]}};_.lv=class{constructor(){this.h=this.w=this.B=this.C=this.l=this.o=this.j=this.A=NaN;this.a=new jv;this.f=new kv}getStats(){const a=[];for(const b of Yo(this.a))a.push({timestamp:b.timestamp,state:_.Vo(b.state),duration:b.duration});return{width:this.A,height:this.j,streamBandwidth:this.w,decodedFrames:this.l,droppedFrames:this.o,corruptedFrames:this.C,estimatedBandwidth:this.h,loadLatency:this.B,playTime:Xo(this.a,8),pauseTime:Xo(this.a,10),bufferingTime:Xo(this.a,6),stateHistory:a,switchHistory:Zo(this.f)}}};_.w("clpp.utils.media.detectType",ap);var dp=new _.S("clpp.sources");var mv=class extends _.Gu{constructor(){super(jd);this.w=this.G=!1;this.l=this.A=this.o=this.a=this.j=null;this.h=new _.Ut;this.F=this.B=this.f=this.H=null}init(a,b){super.init(a,b);this.j=new Yt(this);Ni(this.j,0)}namespace(){return jd}unload(){const a=this;return _.v(function*(){if(a.ia){a.log.debug("Releasing player with source",a.ia);a.B&&(a.B.stop(),a.B=null);var b=a.getTrackManager();b&&b.release();a.A&&(a.A.destroy(),a.A=null);a.K&&(a.K.destroy(),a.K=null);a.l&&a.l.release();a.o&&(a.o.destroy(),
466
+ a.o=null);_.Eh(a.h);a.f&&(a.f=new _.lv);a.F=null;a.ia=null;a.G=!1;a.a&&(a.a.removeAttribute("src"),a.a.load());if(a.w)throw new _.J(_.C,7,7E3);a.a&&(b=a.a,a.h.off(b,_.Sd),a.h.off(b,_.wf),a.a=null)}})}release(){return super.release().then(()=>this.unload()).then(()=>{this.j&&Ni(this.j,0)})}destroy(){if(this.w)return this.log.warn("Player is already destroyed!"),Promise.resolve();this.w=!0;return super.destroy().then(()=>this.release()).then(()=>{this.log.debug(xa);const a=this.getTrackManager();a&&
467
+ a.destroy();this.l&&(this.l.destroy().catch(b=>{this.log.warn("Error while disposing metadata handler",b)}),this.l=null);this.j&&(this.j.destroy(),this.j=null);this.f=null})}getDrmInfo(){return this.o?this.o.getDrmInfo():null}getTrackManager(){return this.wc}load(a){const b=this;return _.v(function*(){if(b.w)return Promise.reject(new _.J(_.C,7,7E3));if(!b.getSurface()||!b.getSurface().getMedia())return Promise.reject("No surface or no media element in surface");const c=b.C.getMedia();b.H=Date.now()/
468
+ 1E3;b.f=new _.lv;b.h.on(b,_.bf,()=>{b.f&&_.Wo(b.f.a,b.getState())});Ni(b.j,2);b.ia=_.cp(a);b.configuration=_.um([b.ja,a]);b.log.debug(_.Na,b.configuration);b.log.debug(_.eb,b.ia);const d=_.Uo(b.configuration,[_.Zd,_.xe]);b.K=d.create(b);b.K.setTextVisibility(!0);b.K.getClass()===_.Zd&&(b.A=new lu(b.K),b.A.start(c));b.l?b.l.release():b.l=new Zt(b);c.textTracks&&kj(b.l,c.textTracks);b.getTrackManager().load();c.loop=!!b.configuration.loop;_.z(b.configuration.volume)||b.setVolume(b.configuration.volume);
469
+ _.z(b.configuration.muted)||b.setMuted(b.configuration.muted);null==b.configuration.startTime&&mp(b,c);_.Zh()&&np(b,c);try{fp(b,c),yield ip(b),yield lp(b).V}catch(e){b.G=!1,b.onError(e)}})}onError(a){this.G||(a.severity===_.C&&null!==this.j&&Ni(this.j,3),this.trigger(new _.H(_.Sd,{detail:a})))}dh(){return new zu}getState(){return null!==this.j?this.j.getState():0}getPresentationStartTime(){if(this.a&&this.a.getStartDate&&this.isLive()){const a=this.a.getStartDate();return isNaN(a.getTime())?null:
470
+ a.getTime()/1E3}return null}getSeekRange(){var a=this.getSurface().getMedia();if(a&&a.src){a=a.seekable;if(a.length)return this.F=a={start:a.start(0),end:a.end(a.length-1)};if(this.F)return this.F}return{start:0,end:0}}isLive(){return this.a&&this.a.src?Infinity===this.a.duration:!1}getStats(){if(!this.f||!this.a)return _.$o();this.f&&_.Wo(this.f.a,this.getState());var a=this.a,b=this.f,c=a.videoHeight;b.A=a.videoWidth;b.j=c;a.getVideoPlaybackQuality&&(c=a.getVideoPlaybackQuality(),a=this.f,b=Number(c.totalVideoFrames),
471
+ a.o=Number(c.droppedVideoFrames),a.l=b,this.f.C=Number(c.corruptedVideoFrames));if(a=this.getTrackManager())if(a=a.ta())a.bandwidth&&(this.f.w=a.bandwidth),a.ud&&(this.f.h=a.ud);return this.f.getStats()}getTimelineCues(){return this.l?this.l.getTimelineCues():[]}getCueTimeline(){return null}},nv=class{a(){return jd}canPlay(a,b){a=a.type||"";const c=a===_.tc,d=a===_.Bc,e=a===_.lm;var f;_.Yh()||c||d||e&&!_.Zh()?f=0:f=""!==Lh().canPlayType(a)?e&&_.Zh()&&(window.ManagedMediaSource||window.MediaSource&&
472
+ MediaSource.isTypeSupported)&&!b.streaming.preferNativeHlsOnSafari?1:2:0;return f}f(a){return a===_.oa}create(){return new mv}};_.Qj=1;_.Nj=2;_.w("clpp.ads.PodType",{PREROLL:0,MIDROLL:_.Qj,POSTROLL:_.Nj});_.w("clpp.ads.Technology",{CLIENT_SIDE:0,SERVER_SIDE:1,SERVER_GUIDED:2});_.w("clpp.ads.ErrorType",{LOAD:0,PLAY:1,OTHER:2});var pp=new _.S("clpp.ads"),op=[];var up;up=new _.S("clpp.Components");_.sp=new Map;_.w("clpp.install",function(a){Cp(a)});_.w("clpp.uninstall",function(a){Dp(a)});var ov=class{load(){}j(){}A(){}resume(){}pause(){}La(){}isPaused(){}skip(){}getVolume(){}getAdVolume(){}setVolume(){}h(){}setMuted(){}isMuted(){}Ka(){}getPosition(){}o(){}w(){}};_.w("clpp.ads.IAdsManager",ov);ov.prototype.getPosition=ov.prototype.getPosition;ov.prototype.setVolume=ov.prototype.setVolume;ov.prototype.getVolume=ov.prototype.getVolume;ov.prototype.skip=ov.prototype.skip;ov.prototype.pause=ov.prototype.pause;ov.prototype.resume=ov.prototype.resume;var V=class{gb(){}hb(){}jb(){}getId(){}getCreativeId(){}yb(){}getApiFramework(){}getAdSystem(){}getAdvertiserName(){}getTitle(){}getDuration(){}getPosition(){}getSkipTimeOffset(){}Bb(){}Ta(){}getMediaUrl(){}Xa(){}Wa(){}Ba(){}Ca(){}getPodIndex(){}pb(){}ib(){}Ya(){}getWrapperAdIds(){}getWrapperAdSystems(){}getWrapperCreativeIds(){}zb(){}canSeek(){}};_.w("clpp.ads.IAd",V);V.prototype.canSeek=V.prototype.canSeek;V.prototype.getVideoElement=V.prototype.zb;V.prototype.getWrapperCreativeIds=V.prototype.getWrapperCreativeIds;
473
+ V.prototype.getWrapperAdSystems=V.prototype.getWrapperAdSystems;V.prototype.getWrapperAdIds=V.prototype.getWrapperAdIds;V.prototype.getSequenceLength=V.prototype.Ya;V.prototype.getPositionInSequence=V.prototype.ib;V.prototype.getPodTimeOffset=V.prototype.pb;V.prototype.getPodIndex=V.prototype.getPodIndex;V.prototype.getPodType=V.prototype.Ca;V.prototype.getMediaBitrate=V.prototype.Ba;V.prototype.getMediaHeight=V.prototype.Wa;V.prototype.getMediaWidth=V.prototype.Xa;V.prototype.getMediaUrl=V.prototype.getMediaUrl;
474
+ V.prototype.getClickThroughUrl=V.prototype.Ta;V.prototype.isBumper=V.prototype.Bb;V.prototype.getSkipTimeOffset=V.prototype.getSkipTimeOffset;V.prototype.getPosition=V.prototype.getPosition;V.prototype.getDuration=V.prototype.getDuration;V.prototype.getTitle=V.prototype.getTitle;V.prototype.getAdvertiserName=V.prototype.getAdvertiserName;V.prototype.getAdSystem=V.prototype.getAdSystem;V.prototype.getApiFramework=V.prototype.getApiFramework;V.prototype.getSourceId=V.prototype.yb;
475
+ V.prototype.getCreativeId=V.prototype.getCreativeId;V.prototype.getId=V.prototype.getId;V.prototype.getTechnology=V.prototype.jb;V.prototype.getAdManagerVersion=V.prototype.hb;V.prototype.getAdManagerName=V.prototype.gb;var Q=class{constructor(a,b,c,d,e,f,g){this.o=this.l=this.j=!1;this.F=a;this.f=b;this.a=c;this.h=d;this.w=0;this.B=`${e}:${b}`;this.G=e;this.videoEl=null;this.A=f;this.C=g||null}gb(){return""}hb(){return""}jb(){return 2}getId(){return this.B}getCreativeId(){return""}yb(){return this.G}getApiFramework(){return null}getAdSystem(){return""}getAdvertiserName(){return""}getTitle(){return""}getDuration(){return this.h}setPosition(a){this.w=a}getPosition(){return this.w}getSkipTimeOffset(){return-1}canSeek(){return this.A}Bb(){return!1}Ta(){return null}getMediaUrl(){return null}Xa(){return 0}Wa(){return 0}Ba(){return 0}Ca(){return this.F}getPodIndex(){return 0}pb(){return 0}ib(){return this.f}Ya(){return this.a}getWrapperAdIds(){return[]}getWrapperAdSystems(){return[]}getWrapperCreativeIds(){return[]}zb(){return this.videoEl}Xh(){return this.C}};
476
+ Q.prototype.getCustomAttributes=Q.prototype.Xh;Q.prototype.getVideoElement=Q.prototype.zb;Q.prototype.getWrapperCreativeIds=Q.prototype.getWrapperCreativeIds;Q.prototype.getWrapperAdSystems=Q.prototype.getWrapperAdSystems;Q.prototype.getWrapperAdIds=Q.prototype.getWrapperAdIds;Q.prototype.getSequenceLength=Q.prototype.Ya;Q.prototype.getPositionInSequence=Q.prototype.ib;Q.prototype.getPodTimeOffset=Q.prototype.pb;Q.prototype.getPodIndex=Q.prototype.getPodIndex;Q.prototype.getPodType=Q.prototype.Ca;
477
+ Q.prototype.getMediaBitrate=Q.prototype.Ba;Q.prototype.getMediaHeight=Q.prototype.Wa;Q.prototype.getMediaWidth=Q.prototype.Xa;Q.prototype.getMediaUrl=Q.prototype.getMediaUrl;Q.prototype.getClickThroughUrl=Q.prototype.Ta;Q.prototype.isBumper=Q.prototype.Bb;Q.prototype.canSeek=Q.prototype.canSeek;Q.prototype.getSkipTimeOffset=Q.prototype.getSkipTimeOffset;Q.prototype.getPosition=Q.prototype.getPosition;Q.prototype.getDuration=Q.prototype.getDuration;Q.prototype.getTitle=Q.prototype.getTitle;
478
+ Q.prototype.getAdvertiserName=Q.prototype.getAdvertiserName;Q.prototype.getAdSystem=Q.prototype.getAdSystem;Q.prototype.getApiFramework=Q.prototype.getApiFramework;Q.prototype.getSourceId=Q.prototype.yb;Q.prototype.getCreativeId=Q.prototype.getCreativeId;Q.prototype.getId=Q.prototype.getId;Q.prototype.getTechnology=Q.prototype.jb;Q.prototype.getAdManagerVersion=Q.prototype.hb;Q.prototype.getAdManagerName=Q.prototype.gb;var pv=class{constructor(a){this.a=a.map(b=>({ic:b.getSurface().getMedia().id,player:b,ge:!0,ready:Promise.resolve()}));this.g=new _.S("clpp.playlist.PlayerPool")}has(){return this.a.some(a=>a.ge)}get(){const a=this;return _.v(function*(){const b=a.a.find(c=>c.ge);if(!b)throw Error("No available players in the pool");b.ge=!1;yield b.ready;return b.player})}release(a){const b=this.a.find(c=>c.player===a);if(!b)return Promise.resolve();b.ge=!0;b.ready=new Promise(c=>{a.release().catch(d=>{this.g.error("Failed to unload player",
479
+ d)}).then(c)});return b.ready}destroy(){const a=this;return _.v(function*(){yield Promise.all(a.a.map(b=>b.player.destroy()))})}};_.w("clpp.utils.dom.createHTMLElement",_.Hp);var qv=class{constructor(a){this.a=null;this.h=new Set;this.f=null;this.set(a||null)}set(a){this.h.clear();this.f&&(this.f.disconnect(),this.f=null);if(this.a=a)this.f=Ip(this,a)}get(){return this.a}};var Np=class{constructor(a,b){this.g=new _.S("clpp.PlayerSurface");this.w=_.Xg(rv,b);this.f=new qv;this.h=null;this.a=new qv;this.l=sv;sv+=1;this.o=`clpp-video-${this.l}`;this.j=new _.Ut;if(null==a)throw new _.J(_.C,7,7102,"No Media element was provided");if(!(a instanceof Element||(a=document.getElementById(a),a)))throw new _.J(_.C,7,7004,"Media element not found");b=this.w;this.g.debug("Initializing Player Surface on ",a);if("cast-media-player"===a.tagName.toLowerCase())this.h=a;else{if(!(a instanceof
479
480
  HTMLMediaElement))throw new _.J(_.C,7,7005,"Media element is not instance of HTMLMediaElement");if(!a.hasAttribute("crossorigin")){var c=b.crossorigin;this.g.info("Setting media elements crossorigin to "+c);a.setAttribute("crossorigin",c)}this.f.set(a);if(b.disableContainer)var d=null;else if(b.containerEl){if(a.parentNode!==b.containerEl)throw new _.J(_.C,7,7006,"Container element is not a direct parent of media element");d=b.containerEl}else{c=document.createElement(_.Ad);a.parentNode?a.parentNode.replaceChild(c,
480
- a):this.g.warn("Player Surface Element has no parent. Can not inject container. You have to manually add playerSurface.getContainer() to the DOM!");var e=[];for(let g=0;g<a.classList.length;g++)e.push(a.classList[g]);for(var f of e)a.classList.remove(f),_.Ep(c,f);c.style.cssText=a.style.cssText;a.removeAttribute(_.Qf);for(d of[_.Gg,_.Xd])f=a.getAttribute(d),f=parseInt(f,10),isNaN(f)||(c.style[d]=`${f}px`),_.Ph()||a.removeAttribute(d);c.appendChild(a);d=c}d&&(this.a.set(d),Ip(this.a,"clpp-container"),
481
- Ip(this.a,this.o),Ip(this.f,_.bd),Ip(this.f,"clpp-video"));b.webOSStartupPatch&&Jp(this,a,d)}}getMedia(){return this.f.get()}getContainer(){return this.a.get()}getSafeContainer(){return this.a}getId(){return this.l}getUniqueCssClass(){return this.o}getCastElement(){return this.h}isFullscreen(){return!!document.fullscreenElement}hideMediaElement(){const a=this.getMedia();a?_.Ep(a,cd):this.g.debug("No media element available that could be hidden")}showMediaElement(){const a=this.getMedia();a?a.classList.remove(cd):
482
- this.g.debug("No media element available that could be shown")}addElementToContainer(a,b,c){b=void 0===b?!1:b;c=void 0===c?!1:c;const d=this.getContainer();if(!d)throw Error("No container is available. Unable to add element");b&&_.Ep(a,_.bd);c?d.insertBefore(a,d.firstElementChild):d.appendChild(a)}removeElementFromContainer(a){const b=this.getContainer();if(!b)throw Error("No container is available. Unable to remove element");b.removeChild(a)}hide(a){_.Ep(a,cd)}show(a){a.classList.remove(cd)}release(){this.j.release()}};
483
- Mp.prototype.removeElementFromContainer=Mp.prototype.removeElementFromContainer;Mp.prototype.addElementToContainer=Mp.prototype.addElementToContainer;Mp.prototype.getCastElement=Mp.prototype.getCastElement;Mp.prototype.getContainer=Mp.prototype.getContainer;Mp.prototype.getMedia=Mp.prototype.getMedia;var qv={disableContainer:!1,webOSStartupPatch:!1,crossorigin:"anonymous",containerEl:null},rv=1;var sv=class{constructor(a){this.ha=a;this.l=!!a.sideAdContainer;this.h=[];this.a=a.Og;this.C=Lp(a);this.A=[];const b=Np(this,this.C,this.ha.Hh);this.o=new ov(b);this.f=null;this.w=!1;this.j=new Map;this.F=a.toggleVisible;this.g=new _.S("clpp.interstitial.MultiController");this.ga=this.B=!1;this.G=a.Bi||(()=>{});Op(this).forEach(c=>Pp(this,c,!1))}getCurrentItem(){return this.f}qe(){return this.f?this.f.player:null}pg(){return Array.from(this.j.values())}Kd(){return 0<this.j.size}play(a){return dq(this,
484
- a,_.Re)}load(a){return dq(this,a,_.je)}release(){const a=this;return _.v(function*(){yield Promise.all([yield kq(a),a.f?aq(a,a.f):Promise.resolve()]);a.f=null;a.w=!1})}destroy(){const a=this;return _.v(function*(){a.g.info("Destroy");yield a.release();yield a.o.destroy();xq(a)})}isMuted(){return this.B}},uq="preload",rq=_.ne,Up="primary",Tp="ad";var uv=class extends _.Cu{constructor(a){super();this.ha=_.Xg({Ji:.5},a);this.Me=this.ga=!1;this.g=new _.S("clpp.interstitial.Player");this.f=a.player;this.f.setSeekInterceptor((b,c)=>{if(c)return!0;if(this.ga)return!1;if(c=zq(this))return this.g.info("Seek ignored while binding interstitial",c.ea),!1;Aq(this,b);c=Bq(this);const d=Cq(this,b),e=Dq(this,b);if(c){if(d&&d!==c)return Gq(this,d,b),!1;if(e&&e!==c)return Hq(this,e,b),!1;if(b<c.startTime-this.ha.resolutionOffsetSec)return Eq(this,c),!0;if(b<
485
- c.startTime)return mq(this.X),this.g.info("Seek inside resolution area of",c.ea),!0;if(b<=c.endTime)return this.g.info("Seek into the scheduled interstitial",c.ea),pq(this.X),!1;if(c.ag)return this.g.info("Jump over a scheduled interstitial",c.ea),oq(this.X),c.state=0,!0;this.g.info("Jump over a scheduled interstitial triggering it",c.ea);pq(this.X);wq(this.X,b,!0);return!1}return d?(Gq(this,d,b),!1):e&&!e.Jh?(Hq(this,e,b),!1):!0});this.X=new sv({Hh:this.ha.config,Og:a.player,preloadMedia:!0,nb:a.nb,
486
- sideAdContainer:this.ha.sideAdContainer,onAudioDecision:this.ha.onAudioDecision,Bi:()=>{this.g.info("Resume primary content")}});this.h=[];this.a=[];this.j=!1;Pq(this,a.player)}destroy(){const a=this;return _.v(function*(){Qq(a);a.a=[];a.j=!1;a.f.setSeekInterceptor(null);yield a.X.destroy()})}Qb(){return this.j}setMuted(a){var b=this.X;b.B=a;b.l?a?(b.a.setMuted(!0),qq(b,!0)):(a=b.getCurrentItem(),Sp(b,a,a&&a.Yb?Tp:Up)):(b.a.setMuted(a),qq(b,a))}isMuted(){return this.X.isMuted()}setVolume(a){Op(this.X).forEach(b=>
487
- {b.setVolume(a)})}Ja(){const a=Rq(this);a&&(a.pause(),this.ha.sideAdContainer&&this.f.pause())}isLive(){const a=this.X.qe();return a?a.isLive():null}};var Tr=class{constructor(){this.a=null}load(){return Promise.resolve()}j(){{var a=this.a;const b=Rq(a);b?(b.play(),a.ha.sideAdContainer&&a.f.play(),a=!1):a=!0}return a}A(a,b,c){const d=a.getConfiguration();a=Object.assign({},{config:d,player:a,nb:b},d.ads.hls||{},{Ii:c});this.a=new uv(a);Zq(this.a)}setMuted(a){this.a&&this.a.setMuted(a)}isMuted(){return this.a?this.a.isMuted():!0}pb(){return null!==Rq(this.a)}Ja(){this.a.Ja()}isPaused(){const a=Rq(this.a);return a?a.isPaused():!1}skip(){}getAdVolume(){const a=
488
- Rq(this.a);return a?a.getVolume()||0:0}h(a){this.a.setVolume(a)}getPosition(){const a=Rq(this.a);return a?a.getPosition():-1}w(){return!this.a.Qb()}o(){return this.a.destroy()}setVolume(a){this.h(a)}getVolume(){return this.getAdVolume()}pause(){this.Ja()}resume(){this.j()}};Tr.prototype.resume=Tr.prototype.resume;Tr.prototype.pause=Tr.prototype.pause;Tr.prototype.getVolume=Tr.prototype.getVolume;Tr.prototype.setVolume=Tr.prototype.setVolume;Tr.prototype.getPosition=Tr.prototype.getPosition;
489
- Tr.prototype.skip=Tr.prototype.skip;var vv=class{constructor(a){this.m=a;this.j=this.m.getNetworkEngine();this.f=new _.Ut;this.h=null;this.a=!0;lr(this)}release(){this.f.release();mr(this);this.m=null}};var or=[];var ur=class{constructor(a,b,c){this.h=a;this.f=b;JSON.parse(_.vi(_.Ok(a)));this.a=JSON.parse(_.vi(_.Ok(b)));this.j=c}};var sr={n:"vXdoJIQCz6sZ9pbduNukEHOR0H2dHlwuuBUAR5Ot7WLEYvav5mn63yxr6F6TIl8RHTFw2siXQhHblZH2Y89o8vhcZRFkYXo6h0igEVafu-n0w52UEcH8Cqzlb8Q7x03Qb8OcKLngSzDkwe5Y2Aix6I66RRVNLLssqyjp2n5tXs4JQmYdqY6hhpGhmBN84naeCTdcPpAYhCw8jqbTSNrJp5hjU4GVvOiUtoYCvdESV9xrOR7fPCFXhWfLtC3i1k1zVoIM7YW5qD0F676jhqkF-GmDuCHpRY2I2Cxui-ytYEVIM6_pylSIlmYLjARmv2jXz9aV_WvHLh6B8Yx0slNGCQ",e:"AQAB"},om="eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJ1cmxzIjpbIjovL2Nhc3RsYWJzLmNvbSJdLCJ0eXBlIjoiV2ViIiwia2lkIjoxOTUwLCJpbHYiOmZhbHNlfQ.jzGGRcbFr_2QET-4tbMcpR5pSaj7eV7X2d1HWw_VKQpPg3zCwSZSDuqw225dIYyAYwLSiElbozbZPSArkBXOsoUm-KZRUPF4m7WG0T7Uza5G-QaQw57BbbfcSsooSpatC997kHKLMTjO71By9Olcu5ykN164nZpGQtZNzQjYag-bnUaMVI5vvhzjlvDihORQ9V_qRlEh0-mpoz6W0-36HGAbWIXWq0kxPh6inbovby-ZmFpqGrVjWOEFa55EARZXPNW9ERupW5xrrYHZdwwTpdRTY5IwEnobS85yTrLhK8Y2MV4jlQLTtQp372fKDsuU6q6_4XvmNq1SgAoKoaf41g";var Wr=class{constructor(a){this.f=a;this.a=null;this.g=new _.S("clpp.utils.LicenseKey")}},Hr="vod",Gr="live";var os,Mr,Pr,Nr;os=class{constructor(a){this.m=a;this.f=a.getNetworkEngine();this.h=Qr(this);this.f.td(this.h);this.a=null}release(){this.a=null;this.f.Fe(this.h)}};_.wv="maxSuggestedBitrateKbps";Mr={du:"duress",etp:_.Td,mb:_.wv,rd:"responseDelay",rtt:"roundTripTime"};Pr={at:"availabilityTime",br:"encodedBitrateKbps",ht:"heldTime",n:"intermediaryIdentifier",nor:"nextObjectResponse",nrr:"nextRangeResponse",d:"objectDuration",ot:"objectType",su:"startup",st:"streamType",sf:"streamingFormat",v:mg};
490
- Nr=new _.S("clpp.net.CmsdManager");_.R=class extends _.Cu{constructor(a,b,c){super();pr();this.g=new _.S("clpp.Player");this.g.info("SDK version: 6.34.0");if(!a)throw new _.J(_.C,7,7102);this.Z=new _.Ut;this.on(_.bf,d=>{if(d=d.detail){d={currentState:_.Uo(d.currentState),previousState:_.Uo(d.previousState),timeSinceLastStateChangeMS:d.timeSinceLastStateChangeMS,reason:d.reason};{const e=_.Hi(d.previousState,xv),f=_.Hi(d.currentState,xv),g=null==d.reason?"":` [${_.Hi(d.reason,Oi)}]`;this.g.info(`Player state change: ${e} -> ${f}${g}`)}this.trigger(new _.H(Lf,
491
- {detail:d}))}});this.f=this.F=b||_.rm();this.l=null;void 0===this.f.license&&(this.f.license=om,this.g.warn("You are using the embedded demo license!"));if(!this.f.license)throw this.g.error("You provided null or empty string as your license. Please check your license configuration."),new _.J(_.C,7,7101,"No license provided in configuration!");this.j=new Mp(a,c);this.G=this.B=this.a=this.J=null;this.A=new _.Jr;Zk(this.A,this.f);this.h=null;this.W=[];this.L={};this.ca=null;this.H=!0;this.S=this.R=
492
- !1;this.M=this.Wc=null;this.Ze=!1;this.ja=new vv(this);this.C=null;this.on(Lf,()=>{3===this.getPlayerState()&&(this.a?this.a.unload():Promise.resolve())});this.on(_.qc,()=>{this.Ze=!0});this.on(_.pc,()=>{this.Ze=!1});this.on(_.Zf,()=>Vr(this));Xr(this,this.f.license);(a=this.j.getMedia())&&a.hasAttribute("autoplay")&&(a.removeAttribute("autoplay"),this.g.warn("The autoplay attribute on the video element is not supported. Use the autoplay option in player configuration instead."));a=[];for(const d of Rr)try{const e=
493
- d.create(this.f);e&&a.push(e)}catch(e){this.g.error("Error while creating player plugin",e)}this.da(a);this.P=_.oa;xp(this)}on(a,b,c){return super.on(a,b,c)}one(a,b,c){return super.one(a,b,c)}off(a,b){return super.off(a,b)}onError(a){if(null!==this.a)this.a.onError(a);else a=new _.H(_.Sd,{detail:a}),this.trigger(a)}da(a){this.W=a;for(const b of this.W)(a=b.id())&&(this.L[a]=b);_.$r(this,"onPlayerCreated")}Ed(a){a=this.L[a];void 0===a&&(a=null);return a}getSurface(){return this.j}getConfiguration(){return _.Yg(this.f)}getDrmInfo(){return this.a?
494
- this.a.getDrmInfo():null}detach(){const a=this;return _.v(function*(){const b=a.getTrackManager();b&&b.detach();a.a&&(yield a.a.detach(),a.a.stopForwardingEventsTo(a))})}release(){if(null!=this.l)return this.g.info("Player release already in progress"),this.l;this.g.debug("Releasing player");this.l=as(this);return this.l.finally(()=>{bs(this);this.g.debug("Player released");this.l=null})}stop(){return this.release()}destroy(){const a=this;return _.v(function*(){a.R?a.g.debug("The player is already destroyed. No-op"):
495
- (a.R=!0,yield a.release(),a.g.debug(xa),a.trigger(new _.H("destroying")),yield _.$r(a,_.Ge),a.a&&a.a.stopForwardingEventsTo(a),a.Cd.clear(),a.ja.release(),a.a&&(yield a.a.destroy()),yield a.A.destroy(),a.a=null,a.B=null,a.trigger(new _.H("destroyed")),a.g.debug("Player destroyed"))})}open(a){const b=this;return _.v(function*(){try{_.Mn(Ze);b.P=_.oa;const c=_.bp(a),d=um(a)?a:{};if(d.license)throw new _.J(_.C,7,7100,"License cannot be passed into the open method.");yield _.js(b,d,c);yield _.ks(b);yield _.ms(b);
496
- _.Mn(Ye);_.On("player.open",Ze,Ye)}catch(c){bs(b);if(b.l)throw b.g.info(Ma),new _.J(_.C,7,7E3);throw c;}})}load(a){return this.open(a)}preload(a){const b=this;return _.v(function*(){yield _.js(b,a);if(b.a){var c=b.a;c.preload?yield c.preload(b.f):b.g.warn(gb)}else b.g.warn(db)})}use(a){(a=Bp(a))&&a.playerConstructed(this)}remove(a){return 0!==this.getPlayerState()&&!this.H||null===vp(a)?!1:(Cp(a),this.S=!0)}play(){return this.a?this.h&&!this.h.j()?Promise.resolve():this.a.play():Promise.reject("No player initialized. You need to load content before calling play.")}pause(){return this.a?
497
- this.h&&this.h.pb()?(this.h.Ja(),Promise.resolve()):this.a.pause():Promise.reject("No player initialized. You need to load content before calling pause.")}getTrackManager(){return this.a&&this.a.getTrackManager()}getBufferInfo(a){return this.a?this.a.getBufferInfo(a):new _.zu}getState(){return _.Uo(this.getPlayerState())}getPlayerState(){return this.a?this.a.getState():0}getPeriods(){return this.a?this.a.getPeriods():[]}isEnded(){return this.a&&this.a.isEnded()||!1}isPaused(){return this.h&&this.h.pb()?
498
- this.h.isPaused():this.a?this.a.isPaused():!1}getPosition(){return this.a?this.a.getPosition():0}setPosition(a){return 3===this.getPlayerState()?Promise.reject("Cannot seek in current state."):this.a?this.a.seek(a):Promise.reject("delegate does not exist")}seek(a){return this.setPosition(a)}getPresentationStartTime(){return this.a?this.a.getPresentationStartTime():null}getSeekRange(){return this.a?this.a.getSeekRange():{start:0,end:0}}Ec(){const a=this.a;return a&&a.Ec?a.Ec():null}getVolume(){return this.a?
499
- this.a.getVolume():null}setVolume(a){this.h&&this.h.h(a);this.a&&this.a.setVolume(a)}getDuration(){return this.a?this.a.getDuration():-1}getAdsManager(){return this.h}namespace(){return this.a&&this.a.namespace()||"Undefined"}pb(){return this.h?this.h.pb():!1}lc(){return this.a?this.a.getPlaybackRate():1}getPlaybackRate(){return this.lc()}qd(a,b){this.a&&this.a.setPlaybackRate(a,b)}setPlaybackRate(a,b){this.qd(a,b)}isMuted(){return this.a?!!this.a.isMuted():!1}setMuted(a){this.h&&this.h.setMuted(a);
500
- this.a&&this.a.setMuted(a)}getNetworkEngine(){return this.A}setNetworkEngine(a){this.A=a}getTextDisplayer(){return this.a&&this.a.getTextDisplayer()}isLive(){return!!this.a&&this.a.isLive()}getStats(){return this.a?this.a.getStats():null}sg(){return Object.freeze(this.ca)}Sa(){return this.a&&this.a.getLoadedSource()}getLoadedSource(){return this.Sa()}getTimelineCues(){return this.a?this.a.getTimelineCues():[]}getCueTimeline(){return this.a?this.a.getCueTimeline():null}resetAbr(){this.a&&this.a.resetAbr()}setDrmCustomDataModifier(a){this.Wc=
501
- a;gs(this)}setCdnErrorCallback(a){this.M=a;this.a&&this.a.setCdnErrorCallback(this.M)}};_.w("clpp.Player",_.R);_.R.registerPlugin=_.Sr;_.R.prototype.setCdnErrorCallback=_.R.prototype.setCdnErrorCallback;_.R.prototype.setDrmCustomDataModifier=_.R.prototype.setDrmCustomDataModifier;_.R.prototype.resetAbr=_.R.prototype.resetAbr;_.R.prototype.getTimelineCues=_.R.prototype.getTimelineCues;_.R.prototype.getLoadedSource=_.R.prototype.getLoadedSource;_.R.prototype.getCurrentSource=_.R.prototype.Sa;
481
+ a):this.g.warn("Player Surface Element has no parent. Can not inject container. You have to manually add playerSurface.getContainer() to the DOM!");var e=[];for(let g=0;g<a.classList.length;g++)e.push(a.classList[g]);for(var f of e)a.classList.remove(f),_.Fp(c,f);c.style.cssText=a.style.cssText;a.removeAttribute(_.Qf);for(d of[_.Gg,_.Xd])f=a.getAttribute(d),f=parseInt(f,10),isNaN(f)||(c.style[d]=`${f}px`),_.Qh()||a.removeAttribute(d);c.appendChild(a);d=c}d&&(this.a.set(d),Jp(this.a,"clpp-container"),
482
+ Jp(this.a,this.o),Jp(this.f,_.$c),Jp(this.f,"clpp-video"));b.webOSStartupPatch&&Kp(this,a,d)}}getMedia(){return this.f.get()}getContainer(){return this.a.get()}getSafeContainer(){return this.a}getId(){return this.l}getUniqueCssClass(){return this.o}getCastElement(){return this.h}isFullscreen(){return!!document.fullscreenElement}hideMediaElement(){const a=this.getMedia();a?_.Fp(a,cd):this.g.debug("No media element available that could be hidden")}showMediaElement(){const a=this.getMedia();a?a.classList.remove(cd):
483
+ this.g.debug("No media element available that could be shown")}addElementToContainer(a,b,c){b=void 0===b?!1:b;c=void 0===c?!1:c;const d=this.getContainer();if(!d)throw Error("No container is available. Unable to add element");b&&_.Fp(a,_.$c);c?d.insertBefore(a,d.firstElementChild):d.appendChild(a)}removeElementFromContainer(a){const b=this.getContainer();if(!b)throw Error("No container is available. Unable to remove element");b.removeChild(a)}hide(a){_.Fp(a,cd)}show(a){a.classList.remove(cd)}release(){this.j.release()}};
484
+ Np.prototype.removeElementFromContainer=Np.prototype.removeElementFromContainer;Np.prototype.addElementToContainer=Np.prototype.addElementToContainer;Np.prototype.getCastElement=Np.prototype.getCastElement;Np.prototype.getContainer=Np.prototype.getContainer;Np.prototype.getMedia=Np.prototype.getMedia;var rv={disableContainer:!1,webOSStartupPatch:!1,crossorigin:"anonymous",containerEl:null},sv=1;var uv=class{constructor(a){this.ha=a;this.l=!!a.sideAdContainer;this.h=[];this.a=a.Og;this.C=Mp(a);this.A=[];const b=Op(this,this.C,this.ha.Hh);this.o=new pv(b);this.f=null;this.w=!1;this.j=new Map;this.F=a.toggleVisible;this.g=new _.S("clpp.interstitial.MultiController");this.ga=this.B=!1;this.G=a.Bi||(()=>{});Pp(this).forEach(c=>Qp(this,c,!1))}getCurrentItem(){return this.f}qe(){return this.f?this.f.player:null}pg(){return Array.from(this.j.values())}Kd(){return 0<this.j.size}play(a){return eq(this,
485
+ a,_.Re)}load(a){return eq(this,a,_.je)}release(){const a=this;return _.v(function*(){yield Promise.all([yield lq(a),a.f?bq(a,a.f):Promise.resolve()]);a.f=null;a.w=!1})}destroy(){const a=this;return _.v(function*(){a.g.info("Destroy");yield a.release();yield a.o.destroy();yq(a)})}isMuted(){return this.B}},vq="preload",sq=_.ne,Vp="primary",Up="ad";var vv=class extends _.Du{constructor(a){super();this.ha=_.Xg({Ji:.5},a);this.Me=this.ga=!1;this.g=new _.S("clpp.interstitial.Player");this.f=a.player;this.f.setSeekInterceptor((b,c)=>{if(c)return!0;if(this.ga)return!1;if(c=Aq(this))return this.g.info("Seek ignored while binding interstitial",c.ea),!1;Bq(this,b);c=Cq(this);const d=Dq(this,b),e=Eq(this,b);if(c){if(d&&d!==c)return Hq(this,d,b),!1;if(e&&e!==c)return Iq(this,e,b),!1;if(b<c.startTime-this.ha.resolutionOffsetSec)return Fq(this,c),!0;if(b<
486
+ c.startTime)return nq(this.X),this.g.info("Seek inside resolution area of",c.ea),!0;if(b<=c.endTime)return this.g.info("Seek into the scheduled interstitial",c.ea),qq(this.X),!1;if(c.ag)return this.g.info("Jump over a scheduled interstitial",c.ea),pq(this.X),c.state=0,!0;this.g.info("Jump over a scheduled interstitial triggering it",c.ea);qq(this.X);xq(this.X,b,!0);return!1}return d?(Hq(this,d,b),!1):e&&!e.Jh?(Iq(this,e,b),!1):!0});this.X=new uv({Hh:this.ha.config,Og:a.player,preloadMedia:!0,ob:a.ob,
487
+ sideAdContainer:this.ha.sideAdContainer,onAudioDecision:this.ha.onAudioDecision,Bi:()=>{this.g.info("Resume primary content")}});this.h=[];this.a=[];this.j=!1;Qq(this,a.player)}destroy(){const a=this;return _.v(function*(){Rq(a);a.a=[];a.j=!1;a.f.setSeekInterceptor(null);yield a.X.destroy()})}Qb(){return this.j}setMuted(a){var b=this.X;b.B=a;b.l?a?(b.a.setMuted(!0),rq(b,!0)):(a=b.getCurrentItem(),Tp(b,a,a&&a.Zb?Up:Vp)):(b.a.setMuted(a),rq(b,a))}isMuted(){return this.X.isMuted()}setVolume(a){Pp(this.X).forEach(b=>
488
+ {b.setVolume(a)})}La(){const a=Sq(this);a&&(a.pause(),this.ha.sideAdContainer&&this.f.pause())}isLive(){const a=this.X.qe();return a?a.isLive():null}};var Ur=class{constructor(){this.a=null}load(){return Promise.resolve()}j(){{var a=this.a;const b=Sq(a);b?(b.play(),a.ha.sideAdContainer&&a.f.play(),a=!1):a=!0}return a}A(a,b,c){const d=a.getConfiguration();a=Object.assign({},{config:d,player:a,ob:b},d.ads.hls||{},{Ii:c});this.a=new vv(a);$q(this.a)}setMuted(a){this.a&&this.a.setMuted(a)}isMuted(){return this.a?this.a.isMuted():!0}Ka(){return null!==Sq(this.a)}La(){this.a.La()}isPaused(){const a=Sq(this.a);return a?a.isPaused():!1}skip(){}getAdVolume(){const a=
489
+ Sq(this.a);return a?a.getVolume()||0:0}h(a){this.a.setVolume(a)}getPosition(){const a=Sq(this.a);return a?a.getPosition():-1}w(){return!this.a.Qb()}o(){return this.a.destroy()}setVolume(a){this.h(a)}getVolume(){return this.getAdVolume()}pause(){this.La()}resume(){this.j()}};Ur.prototype.resume=Ur.prototype.resume;Ur.prototype.pause=Ur.prototype.pause;Ur.prototype.getVolume=Ur.prototype.getVolume;Ur.prototype.setVolume=Ur.prototype.setVolume;Ur.prototype.getPosition=Ur.prototype.getPosition;
490
+ Ur.prototype.skip=Ur.prototype.skip;var wv=class{constructor(a){this.m=a;this.j=this.m.getNetworkEngine();this.f=new _.Ut;this.h=null;this.a=!0;mr(this)}release(){this.f.release();nr(this);this.m=null}};var pr=[];var vr=class{constructor(a,b,c){this.h=a;this.f=b;JSON.parse(_.wi(_.Pk(a)));this.a=JSON.parse(_.wi(_.Pk(b)));this.j=c}};var tr={n:"vXdoJIQCz6sZ9pbduNukEHOR0H2dHlwuuBUAR5Ot7WLEYvav5mn63yxr6F6TIl8RHTFw2siXQhHblZH2Y89o8vhcZRFkYXo6h0igEVafu-n0w52UEcH8Cqzlb8Q7x03Qb8OcKLngSzDkwe5Y2Aix6I66RRVNLLssqyjp2n5tXs4JQmYdqY6hhpGhmBN84naeCTdcPpAYhCw8jqbTSNrJp5hjU4GVvOiUtoYCvdESV9xrOR7fPCFXhWfLtC3i1k1zVoIM7YW5qD0F676jhqkF-GmDuCHpRY2I2Cxui-ytYEVIM6_pylSIlmYLjARmv2jXz9aV_WvHLh6B8Yx0slNGCQ",e:"AQAB"},pm="eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJ1cmxzIjpbIjovL2Nhc3RsYWJzLmNvbSJdLCJ0eXBlIjoiV2ViIiwia2lkIjoxOTUwLCJpbHYiOmZhbHNlfQ.jzGGRcbFr_2QET-4tbMcpR5pSaj7eV7X2d1HWw_VKQpPg3zCwSZSDuqw225dIYyAYwLSiElbozbZPSArkBXOsoUm-KZRUPF4m7WG0T7Uza5G-QaQw57BbbfcSsooSpatC997kHKLMTjO71By9Olcu5ykN164nZpGQtZNzQjYag-bnUaMVI5vvhzjlvDihORQ9V_qRlEh0-mpoz6W0-36HGAbWIXWq0kxPh6inbovby-ZmFpqGrVjWOEFa55EARZXPNW9ERupW5xrrYHZdwwTpdRTY5IwEnobS85yTrLhK8Y2MV4jlQLTtQp372fKDsuU6q6_4XvmNq1SgAoKoaf41g";var Xr=class{constructor(a){this.f=a;this.a=null;this.g=new _.S("clpp.utils.LicenseKey")}},Ir="vod",Hr="live";var ps,Nr,Qr,Or;ps=class{constructor(a){this.m=a;this.f=a.getNetworkEngine();this.h=Rr(this);this.f.td(this.h);this.a=null}release(){this.a=null;this.f.Fe(this.h)}};_.xv="maxSuggestedBitrateKbps";Nr={du:"duress",etp:_.Td,mb:_.xv,rd:"responseDelay",rtt:"roundTripTime"};Qr={at:"availabilityTime",br:"encodedBitrateKbps",ht:"heldTime",n:"intermediaryIdentifier",nor:"nextObjectResponse",nrr:"nextRangeResponse",d:"objectDuration",ot:"objectType",su:"startup",st:"streamType",sf:"streamingFormat",v:mg};
491
+ Or=new _.S("clpp.net.CmsdManager");_.R=class extends _.Du{constructor(a,b,c){super();qr();this.g=new _.S("clpp.Player");this.g.info("SDK version: 6.35.0-beta.1");if(!a)throw new _.J(_.C,7,7102);this.Z=new _.Ut;this.on(_.bf,d=>{if(d=d.detail){d={currentState:_.Vo(d.currentState),previousState:_.Vo(d.previousState),timeSinceLastStateChangeMS:d.timeSinceLastStateChangeMS,reason:d.reason};{const e=_.Ii(d.previousState,yv),f=_.Ii(d.currentState,yv),g=null==d.reason?"":` [${_.Ii(d.reason,Pi)}]`;this.g.info(`Player state change: ${e} -> ${f}${g}`)}this.trigger(new _.H(Lf,
492
+ {detail:d}))}});this.f=this.F=b||_.sm();this.l=null;void 0===this.f.license&&(this.f.license=pm,this.g.warn("You are using the embedded demo license!"));if(!this.f.license)throw this.g.error("You provided null or empty string as your license. Please check your license configuration."),new _.J(_.C,7,7101,"No license provided in configuration!");this.j=new Np(a,c);this.G=this.B=this.a=this.J=null;this.A=new _.Kr;$k(this.A,this.f);this.h=null;this.W=[];this.L={};this.ca=null;this.H=!0;this.S=this.R=
493
+ !1;this.M=this.Wc=null;this.Ze=!1;this.ja=new wv(this);this.C=null;this.on(Lf,()=>{3===this.getPlayerState()&&(this.a?this.a.unload():Promise.resolve())});this.on(_.qc,()=>{this.Ze=!0});this.on(_.pc,()=>{this.Ze=!1});this.on(_.Zf,()=>Wr(this));Yr(this,this.f.license);(a=this.j.getMedia())&&a.hasAttribute("autoplay")&&(a.removeAttribute("autoplay"),this.g.warn("The autoplay attribute on the video element is not supported. Use the autoplay option in player configuration instead."));a=[];for(const d of Sr)try{const e=
494
+ d.create(this.f);e&&a.push(e)}catch(e){this.g.error("Error while creating player plugin",e)}this.da(a);this.P=_.oa;yp(this)}on(a,b,c){return super.on(a,b,c)}one(a,b,c){return super.one(a,b,c)}off(a,b){return super.off(a,b)}onError(a){if(null!==this.a)this.a.onError(a);else a=new _.H(_.Sd,{detail:a}),this.trigger(a)}da(a){this.W=a;for(const b of this.W)(a=b.id())&&(this.L[a]=b);_.as(this,"onPlayerCreated")}Ed(a){a=this.L[a];void 0===a&&(a=null);return a}getSurface(){return this.j}getConfiguration(){return _.Yg(this.f)}getDrmInfo(){return this.a?
495
+ this.a.getDrmInfo():null}detach(){const a=this;return _.v(function*(){const b=a.getTrackManager();b&&b.detach();a.a&&(yield a.a.detach(),a.a.stopForwardingEventsTo(a))})}release(){if(null!=this.l)return this.g.info("Player release already in progress"),this.l;this.g.debug("Releasing player");this.l=bs(this);return this.l.finally(()=>{cs(this);this.g.debug("Player released");this.l=null})}stop(){return this.release()}destroy(){const a=this;return _.v(function*(){a.R?a.g.debug("The player is already destroyed. No-op"):
496
+ (a.R=!0,yield a.release(),a.g.debug(xa),a.trigger(new _.H("destroying")),yield _.as(a,_.Ge),a.a&&a.a.stopForwardingEventsTo(a),a.Cd.clear(),a.ja.release(),a.a&&(yield a.a.destroy()),yield a.A.destroy(),a.a=null,a.B=null,a.trigger(new _.H("destroyed")),a.g.debug("Player destroyed"))})}open(a){const b=this;return _.v(function*(){try{_.Nn(Ze);b.P=_.oa;const c=_.cp(a),d=vm(a)?a:{};if(d.license)throw new _.J(_.C,7,7100,"License cannot be passed into the open method.");yield _.ks(b,d,c);yield _.ls(b);yield _.ns(b);
497
+ _.Nn(Ye);_.Pn("player.open",Ze,Ye)}catch(c){cs(b);if(b.l)throw b.g.info(Ma),new _.J(_.C,7,7E3);throw c;}})}load(a){return this.open(a)}preload(a){const b=this;return _.v(function*(){yield _.ks(b,a);if(b.a){var c=b.a;c.preload?yield c.preload(b.f):b.g.warn(gb)}else b.g.warn(db)})}use(a){(a=Cp(a))&&a.playerConstructed(this)}remove(a){return 0!==this.getPlayerState()&&!this.H||null===wp(a)?!1:(Dp(a),this.S=!0)}play(){return this.a?this.h&&!this.h.j()?Promise.resolve():this.a.play():Promise.reject("No player initialized. You need to load content before calling play.")}pause(){return this.a?
498
+ this.h&&this.h.Ka()?(this.h.La(),Promise.resolve()):this.a.pause():Promise.reject("No player initialized. You need to load content before calling pause.")}getTrackManager(){return this.a&&this.a.getTrackManager()}getBufferInfo(a){return this.a?this.a.getBufferInfo(a):new _.Au}getState(){return _.Vo(this.getPlayerState())}getPlayerState(){return this.a?this.a.getState():0}getPeriods(){return this.a?this.a.getPeriods():[]}isEnded(){return this.a&&this.a.isEnded()||!1}isPaused(){return this.h&&this.h.Ka()?
499
+ this.h.isPaused():this.a?this.a.isPaused():!1}getPosition(){return this.a?this.a.getPosition():0}setPosition(a){return 3===this.getPlayerState()?Promise.reject("Cannot seek in current state."):this.a?this.a.seek(a):Promise.reject("delegate does not exist")}seek(a){return this.setPosition(a)}getPresentationStartTime(){return this.a?this.a.getPresentationStartTime():null}getSeekRange(){return this.a?this.a.getSeekRange():{start:0,end:0}}Fc(){const a=this.a;return a&&a.Fc?a.Fc():null}getVolume(){return this.a?
500
+ this.a.getVolume():null}setVolume(a){this.h&&this.h.h(a);this.a&&this.a.setVolume(a)}getDuration(){return this.a?this.a.getDuration():-1}getAdsManager(){return this.h}namespace(){return this.a&&this.a.namespace()||"Undefined"}Ka(){return this.h?this.h.Ka():!1}mc(){return this.a?this.a.getPlaybackRate():1}getPlaybackRate(){return this.mc()}qd(a,b){this.a&&this.a.setPlaybackRate(a,b)}setPlaybackRate(a,b){this.qd(a,b)}isMuted(){return this.a?!!this.a.isMuted():!1}setMuted(a){this.h&&this.h.setMuted(a);
501
+ this.a&&this.a.setMuted(a)}getNetworkEngine(){return this.A}setNetworkEngine(a){this.A=a}getTextDisplayer(){return this.a&&this.a.getTextDisplayer()}isLive(){return!!this.a&&this.a.isLive()}getStats(){return this.a?this.a.getStats():null}sg(){return Object.freeze(this.ca)}Ua(){return this.a&&this.a.getLoadedSource()}getLoadedSource(){return this.Ua()}getTimelineCues(){return this.a?this.a.getTimelineCues():[]}getCueTimeline(){return this.a?this.a.getCueTimeline():null}resetAbr(){this.a&&this.a.resetAbr()}setDrmCustomDataModifier(a){this.Wc=
502
+ a;hs(this)}setCdnErrorCallback(a){this.M=a;this.a&&this.a.setCdnErrorCallback(this.M)}};_.w("clpp.Player",_.R);_.R.registerPlugin=_.Tr;_.R.prototype.setCdnErrorCallback=_.R.prototype.setCdnErrorCallback;_.R.prototype.setDrmCustomDataModifier=_.R.prototype.setDrmCustomDataModifier;_.R.prototype.resetAbr=_.R.prototype.resetAbr;_.R.prototype.getTimelineCues=_.R.prototype.getTimelineCues;_.R.prototype.getLoadedSource=_.R.prototype.getLoadedSource;_.R.prototype.getCurrentSource=_.R.prototype.Ua;
502
503
  _.R.prototype.getSources=_.R.prototype.sg;_.R.prototype.getStats=_.R.prototype.getStats;_.R.prototype.isLive=_.R.prototype.isLive;_.R.prototype.getTextDisplayer=_.R.prototype.getTextDisplayer;_.R.prototype.setNetworkEngine=_.R.prototype.setNetworkEngine;_.R.prototype.getNetworkEngine=_.R.prototype.getNetworkEngine;_.R.prototype.setMuted=_.R.prototype.setMuted;_.R.prototype.isMuted=_.R.prototype.isMuted;_.R.prototype.setPlaybackRate=_.R.prototype.setPlaybackRate;_.R.prototype.setRate=_.R.prototype.qd;
503
- _.R.prototype.getPlaybackRate=_.R.prototype.getPlaybackRate;_.R.prototype.getRate=_.R.prototype.lc;_.R.prototype.isPlayingAd=_.R.prototype.pb;_.R.prototype.namespace=_.R.prototype.namespace;_.R.prototype.getAdsManager=_.R.prototype.getAdsManager;_.R.prototype.getDuration=_.R.prototype.getDuration;_.R.prototype.setVolume=_.R.prototype.setVolume;_.R.prototype.getVolume=_.R.prototype.getVolume;_.R.prototype.getTimelineOffset=_.R.prototype.Ec;_.R.prototype.getSeekRange=_.R.prototype.getSeekRange;
504
+ _.R.prototype.getPlaybackRate=_.R.prototype.getPlaybackRate;_.R.prototype.getRate=_.R.prototype.mc;_.R.prototype.isPlayingAd=_.R.prototype.Ka;_.R.prototype.namespace=_.R.prototype.namespace;_.R.prototype.getAdsManager=_.R.prototype.getAdsManager;_.R.prototype.getDuration=_.R.prototype.getDuration;_.R.prototype.setVolume=_.R.prototype.setVolume;_.R.prototype.getVolume=_.R.prototype.getVolume;_.R.prototype.getTimelineOffset=_.R.prototype.Fc;_.R.prototype.getSeekRange=_.R.prototype.getSeekRange;
504
505
  _.R.prototype.getPresentationStartTime=_.R.prototype.getPresentationStartTime;_.R.prototype.seek=_.R.prototype.seek;_.R.prototype.setPosition=_.R.prototype.setPosition;_.R.prototype.getPosition=_.R.prototype.getPosition;_.R.prototype.isPaused=_.R.prototype.isPaused;_.R.prototype.isEnded=_.R.prototype.isEnded;_.R.prototype.getState=_.R.prototype.getState;_.R.prototype.getBufferInfo=_.R.prototype.getBufferInfo;_.R.prototype.getTrackManager=_.R.prototype.getTrackManager;_.R.prototype.pause=_.R.prototype.pause;
505
506
  _.R.prototype.play=_.R.prototype.play;_.R.prototype.remove=_.R.prototype.remove;_.R.prototype.use=_.R.prototype.use;_.R.prototype.load=_.R.prototype.load;_.R.prototype.open=_.R.prototype.open;_.R.prototype.destroy=_.R.prototype.destroy;_.R.prototype.stop=_.R.prototype.stop;_.R.prototype.release=_.R.prototype.release;_.R.prototype.getDrmInfo=_.R.prototype.getDrmInfo;_.R.prototype.getConfiguration=_.R.prototype.getConfiguration;_.R.prototype.getSurface=_.R.prototype.getSurface;
506
- _.R.prototype.getPlugin=_.R.prototype.Ed;_.R.prototype.off=_.R.prototype.off;_.R.prototype.one=_.R.prototype.one;_.R.prototype.on=_.R.prototype.on;var xv={IDLE:0,PREPARING:1,BUFFERING:2,PLAYING:3,PAUSED:4,ENDED:5,ERROR:6,UNSET:7};_.R.State=xv;var Rr=[];var yv=class extends _.R{constructor(a,b,c){super(a,b,c);a={manifest:{timeline:{version:2},keepTimelineLive:!0},streaming:{preferNativeHlsOnSafari:!1,enableLiveEdgeChasing:!1,startAtSegmentBoundary:!1}};this.F=_.Xg(this.F,a);this.f=_.Xg(this.f,a);this.I=0;this.o=[];this.U=!1;this.w=null;this.K=[]}Ei(a,b){const c=this;return _.v(function*(){if(c.w)throw new _.J(_.C,7,7008,`Cannot call openPlaylist() while ${c.w}() is ongoing!`);if(0!==a)throw new _.J(_.C,7,7007,"The index parameter only supports the value of 0.");
507
+ _.R.prototype.getPlugin=_.R.prototype.Ed;_.R.prototype.off=_.R.prototype.off;_.R.prototype.one=_.R.prototype.one;_.R.prototype.on=_.R.prototype.on;var yv={IDLE:0,PREPARING:1,BUFFERING:2,PLAYING:3,PAUSED:4,ENDED:5,ERROR:6,UNSET:7};_.R.State=yv;var Sr=[];var zv=class extends _.R{constructor(a,b,c){super(a,b,c);a={manifest:{timeline:{version:2},keepTimelineLive:!0},streaming:{preferNativeHlsOnSafari:!1,enableLiveEdgeChasing:!1,startAtSegmentBoundary:!1}};this.F=_.Xg(this.F,a);this.f=_.Xg(this.f,a);this.I=0;this.o=[];this.U=!1;this.w=null;this.K=[]}Ei(a,b){const c=this;return _.v(function*(){if(c.w)throw new _.J(_.C,7,7008,`Cannot call openPlaylist() while ${c.w}() is ongoing!`);if(0!==a)throw new _.J(_.C,7,7007,"The index parameter only supports the value of 0.");
507
508
  if(0===b.length)throw new _.J(_.C,7,7003,Va);if(b.some(g=>!g.id||!g.source))throw new _.J(_.C,7,7100,"Some config is missing required properties `id` or `source`!");if((new Set(b.map(g=>g.id))).size!==b.length)throw new _.J(_.C,7,7100,"Some config contains a non-unique property `id`!");const d=b[0].playlist;if(d){var e=d.timeline,f=["flat","basic"];if(e&&!f.includes(e))throw new _.J(_.C,7,7100,"Unsupported `playlist.timeline` config value!");e=d.startTime;if(null!=e&&(typeof e!==_.r||0>e))throw new _.J(_.C,
508
- 7,7100,"Invalid `playlist.startTime` config value!");f=d.endTime;if(null!=f&&(typeof f!==_.r||0>f||null!=e&&f<=e))throw new _.J(_.C,7,7100,"Invalid `playlist.endTime` config value!");if("DVR"===d.content&&!f)throw new _.J(_.C,7,7100,"`playlist.endTime` config value is required for DVR content!");}try{qs(c),c.w="openPlaylist",yield ts(c,b),c.I=0,c.o=b,c.U=!0,us(c,b[0].playlist||{})}finally{c.w=null}})}qh(a){const b=this;return _.v(function*(){if(b.w)throw new _.J(_.C,7,7008,`Cannot call addItem() while ${b.w}() is ongoing!`);
509
- if(!b.U)throw new _.J(_.C,7,7008,"openPlaylist() must be called before addItem()!");if(!a.id||!a.source)throw new _.J(_.C,7,7100,"The config is missing required properties `id` or `source`!");if((new Set(b.o.map(c=>c.id))).has(a.id))throw new _.J(_.C,7,7100,"A config with this `id` already exists in the playlist!");try{b.w="addItem",b.o.push(a),yield vs(b,a)}finally{b.w=null}})}getCurrentItem(){return this.o[this.I]||null}getCurrentItemIndex(){return this.I}$h(){return[...this.o]}Gd(){return this.o.length}getTimeline(){return this.a?
510
- this.a.getTimeline():null}seekWith(a){return this.a?this.a.seekWith(a):Promise.resolve()}release(){this.o=[];this.I=0;this.U=!1;return super.release()}destroy(){qs(this);return super.destroy()}setCdnErrorCallback(){throw new _.J(1,7,7009,"CDN switching is not supported!");}da(){}};_.w("clpp.playlist.ScPlaylist",yv);yv.prototype.setCdnErrorCallback=yv.prototype.setCdnErrorCallback;yv.prototype.destroy=yv.prototype.destroy;yv.prototype.release=yv.prototype.release;yv.prototype.seekWith=yv.prototype.seekWith;
511
- yv.prototype.getTimeline=yv.prototype.getTimeline;yv.prototype.getSize=yv.prototype.Gd;yv.prototype.getPlaylist=yv.prototype.$h;yv.prototype.getCurrentItemIndex=yv.prototype.getCurrentItemIndex;yv.prototype.getCurrentItem=yv.prototype.getCurrentItem;yv.prototype.addItem=yv.prototype.qh;yv.prototype.openPlaylist=yv.prototype.Ei;var zv=class extends _.Cu{constructor(a){super();this.ha=_.Xg({transition:_.Ne,preloadMedia:!1},a);this.h=[];this.a=0;const b=ws(a.anchorId,this.ha.config);this.o=new ov(b);this.f=null;this.j=!1;this.l=new Map;this.w=a.toggleVisible;this.g=new _.S(kd);this.o.a.forEach(c=>xs(this,c.player,!1))}Mb(){return this.f}qe(){return this.f?this.f.player:null}og(){return this.l.get(this.a+1)||null}qg(){return this.l.get(this.a-1)||null}pg(){return[this.qg(),this.og()].filter(Boolean)}Ui(a){if(0<this.h.length)throw Error("Cannot re-set items in the playlist");
509
+ 7,7100,"Invalid `playlist.startTime` config value!");f=d.endTime;if(null!=f&&(typeof f!==_.r||0>f||null!=e&&f<=e))throw new _.J(_.C,7,7100,"Invalid `playlist.endTime` config value!");if("DVR"===d.content&&!f)throw new _.J(_.C,7,7100,"`playlist.endTime` config value is required for DVR content!");}try{rs(c),c.w="openPlaylist",yield us(c,b),c.I=0,c.o=b,c.U=!0,vs(c,b[0].playlist||{})}finally{c.w=null}})}qh(a){const b=this;return _.v(function*(){if(b.w)throw new _.J(_.C,7,7008,`Cannot call addItem() while ${b.w}() is ongoing!`);
510
+ if(!b.U)throw new _.J(_.C,7,7008,"openPlaylist() must be called before addItem()!");if(!a.id||!a.source)throw new _.J(_.C,7,7100,"The config is missing required properties `id` or `source`!");if((new Set(b.o.map(c=>c.id))).has(a.id))throw new _.J(_.C,7,7100,"A config with this `id` already exists in the playlist!");try{b.w="addItem",b.o.push(a),yield ws(b,a)}finally{b.w=null}})}getCurrentItem(){return this.o[this.I]||null}getCurrentItemIndex(){return this.I}$h(){return[...this.o]}Gd(){return this.o.length}getTimeline(){return this.a?
511
+ this.a.getTimeline():null}seekWith(a){return this.a?this.a.seekWith(a):Promise.resolve()}release(){this.o=[];this.I=0;this.U=!1;return super.release()}destroy(){rs(this);return super.destroy()}setCdnErrorCallback(){throw new _.J(1,7,7009,"CDN switching is not supported!");}da(){}};_.w("clpp.playlist.ScPlaylist",zv);zv.prototype.setCdnErrorCallback=zv.prototype.setCdnErrorCallback;zv.prototype.destroy=zv.prototype.destroy;zv.prototype.release=zv.prototype.release;zv.prototype.seekWith=zv.prototype.seekWith;
512
+ zv.prototype.getTimeline=zv.prototype.getTimeline;zv.prototype.getSize=zv.prototype.Gd;zv.prototype.getPlaylist=zv.prototype.$h;zv.prototype.getCurrentItemIndex=zv.prototype.getCurrentItemIndex;zv.prototype.getCurrentItem=zv.prototype.getCurrentItem;zv.prototype.addItem=zv.prototype.qh;zv.prototype.openPlaylist=zv.prototype.Ei;var Av=class extends _.Du{constructor(a){super();this.ha=_.Xg({transition:_.Ne,preloadMedia:!1},a);this.h=[];this.a=0;const b=xs(a.anchorId,this.ha.config);this.o=new pv(b);this.f=null;this.j=!1;this.l=new Map;this.w=a.toggleVisible;this.g=new _.S(kd);this.o.a.forEach(c=>ys(this,c.player,!1))}Nb(){return this.f}qe(){return this.f?this.f.player:null}og(){return this.l.get(this.a+1)||null}qg(){return this.l.get(this.a-1)||null}pg(){return[this.qg(),this.og()].filter(Boolean)}Ui(a){if(0<this.h.length)throw Error("Cannot re-set items in the playlist");
512
513
  this.g.info("Set items",a);this.h=a.map((b,c)=>({config:b,index:c,preloadPromise:Promise.resolve(),disposers:[]}))}Ti(a){if(0===this.h.length)throw Error(Ua);if(0>a||a>this.h.length-1)throw Error("Index out of bounds");this.a=a}Kd(){return this.a<this.h.length-1}ug(){return 0<this.a}Gi(){const a=this;return _.v(function*(){if(a.j)a.g.warn("Cannot play first item while busy");else if(0===a.h.length)a.g.warn(Ua);else{a.j=!0;a.g.info(`First (index: ${a.a})`);var b=a.h[a.a];try{a.g.info(`First loading (index: ${a.a})`),
513
- yield As(a,b),a.g.info(`First playing (index: ${a.a})`)}catch(c){throw a.g.error(`First failed (index: ${a.a})`),c;}finally{a.j=!1,Hs(a)}}})}Lg(){const a=this;return _.v(function*(){if(a.j)a.g.warn("Cannot play next item while busy");else if(a.Kd()){a.j=!0;a.a+=1;a.g.info(`Next (index: ${a.a})`);var b=a.f;a.ha.transition===_.Ne&&b.player.pause();Ms(a,a.a+-2);a.l.delete(a.a);var c=a.h[a.a];try{a.g.info(`Next loading (index: ${a.a})`),yield Is(a,c),a.g.info(`Next playing (index: ${a.a})`)}catch(d){throw a.g.error(`Next failed (index: ${a.a})`),
514
- d;}finally{a.j=!1,b&&(yield Ls(a,b)),Hs(a)}}else a.g.warn("There are no more items in the playlist")})}Hi(){const a=this;return _.v(function*(){if(a.j)a.g.warn("Cannot play previous item while busy");else if(a.ug()){a.j=!0;--a.a;a.g.info(`Previous (index: ${a.a})`);var b=a.f;a.ha.transition===_.Ne&&b.player.pause();Ms(a,a.a+2);a.l.delete(a.a);var c=a.h[a.a];try{a.g.info(`Previous loading (index: ${a.a})`),yield Is(a,c),a.g.info(`Previous playing (index: ${a.a})`)}catch(d){throw a.g.error(`Previous failed (index: ${a.a})`),
515
- d;}finally{a.j=!1,b&&(yield Ls(a,b)),Hs(a)}}else a.g.warn("There are no more previous items in the playlist")})}destroy(){const a=this;return _.v(function*(){a.g.info("Destroy");yield Promise.all([Ns(a),a.f?Ls(a,a.f):Promise.resolve()]);yield Os(a)})}};_.w(kd,zv);zv.prototype.destroy=zv.prototype.destroy;zv.prototype.playPrev=zv.prototype.Hi;zv.prototype.playNext=zv.prototype.Lg;zv.prototype.playFirst=zv.prototype.Gi;zv.prototype.hasPrev=zv.prototype.ug;zv.prototype.hasNext=zv.prototype.Kd;
516
- zv.prototype.setIndex=zv.prototype.Ti;zv.prototype.setItems=zv.prototype.Ui;zv.prototype.getPreloading=zv.prototype.pg;zv.prototype.getPrev=zv.prototype.qg;zv.prototype.getNext=zv.prototype.og;zv.prototype.getCurrentPlayer=zv.prototype.qe;zv.prototype.getCurrent=zv.prototype.Mb;var Ks="preload",ys=_.ne;var Ps=new Map;var Cv=class{constructor(a){this.h=a;this.f={keepOriginalTimestamps:!0,remux:!1};this.a=new muxjs.mp4.Transmuxer(this.f)}destroy(){this.a.dispose();this.a=null}reset(){this.a=new muxjs.mp4.Transmuxer(this.f)}isSupported(a,b){const c="mp2t"===a.toLowerCase().split(";")[0].split("/")[1],d=a.toLowerCase().split(";")[0]===_.Dc;if(!window.muxjs||!c&&!d)return!1;if(d)return _.Qs(Hc);if(b)return _.Qs(Rs(b,a));b=Rs(_.q,a);a=Rs(_.t,a);return _.Qs(b)||_.Qs(a)}isMuxed(a,b){return 1<this.demuxMimeTypes(a,b).size}demuxMimeTypes(a,
517
- b){const c=new Map;c.set(a,b);try{const d=_.Kl(b),e=_.Ll(b).split(","),f=new Map,g=Gj(_.q,e),h=Gj(_.t,e);g&&f.set(_.q,this.convertCodecs(_.q,_.Jl(d,g)));h&&f.set(_.t,this.convertCodecs(_.t,_.Jl(d,h)));return f}catch(d){return c}}convertCodecs(a,b){return b.toLowerCase().split(";")[0]===_.Dc?Hc:"mp2t"===b.toLowerCase().split(";")[0].split("/")[1]?Rs(a,b):b}getOriginalMimeType(){return this.h}transmux(a){const b=[],c=[];let d=[],e=null;a=_.E(a);const f=h=>{d=h.captions;const k=new Uint8Array(h.data.byteLength+
518
- h.initSegment.byteLength);k.set(h.initSegment,0);k.set(h.data,h.initSegment.byteLength);h.type===Av?b.push(k):h.type===Bv&&c.push(k)},g=()=>{e={video:_.Sk(...b),captions:d,audio:_.Sk(...c)}};this.a.on("data",f);this.a.on("done",g);this.a.push(a);this.a.flush();this.a.off("data",f);this.a.off("done",g);if(!e)throw new _.J(_.C,3,3018);return e}},Bv=_.q,Av=_.t;var Dv=class{getCuePoints(){}Qb(){}Pb(){}};_.w("clpp.ads.IAdsTimeline",Dv);Dv.prototype.hasPostroll=Dv.prototype.Pb;Dv.prototype.hasPreroll=Dv.prototype.Qb;Dv.prototype.getCuePoints=Dv.prototype.getCuePoints;_.Ev=class{install(){}uninstall(){}beforeLoad(){}drmConfigurationResolved(){}afterLoad(){}playerConstructed(){}};_.Fv=class{constructor(a){this.K=a;this.h={}}Ga(a,b){this.h[a]=b}f(a,b){return b.licenseUrl}G(a){return a.certificateUrl}};_.w("clpp.drm.DrmEnvironment",_.Fv);_.Fv.prototype.setDrmSystem=_.Fv.prototype.Ga;var Ts,Us,Vs;Ts="/license-proxy-widevine/cenc/";Us="/license-proxy-headerauth/drmtoday/RightsManager.asmx";Vs="/license-server-fairplay/";_.Ys=new _.S("clpp.drm.DrmTodayLegacyEndpointHandler");var Gv=class extends _.Fv{constructor(a,b){super(a);this.a=b}f(a,b,c){c=et(c);a:switch(b=an(this.a),c=`/v4/${encodeURIComponent(c)}`,a){case _.td:a=b+c+"/wv";break a;case _.rd:a=b+c+"/pr";break a;case _.pd:a=b+c+"/fp";break a;default:throw new _.vj("Cannot infer DRMtoday V4 license URL for key system: "+a);}return a}G(a,b){b=et(b);a=an(this.a);b=`/v4/${encodeURIComponent(b)}`;return a=a+b+"/fp/cert"}};var Hv=class{};_.w("clpp.drm.DrmToday",Hv);var mt="PRODUCTION",nt="STAGING",ot="DEMO",pt="TEST";Hv.Environment={PRODUCTION:mt,STAGING:nt,DEMO:ot,TEST:pt};Hv.WidevineCertificates={V1_PROD:"V1_PROD",V1_STAGING:"V1_STAGING",V2:"V2"};var Iv=class extends _.Ev{drmConfigurationResolved(a){if(a){var b=a.env;if(b=!!b&&!!qt(b))if(b=(b=_.lk[a.env]||null)?!0===a.useDrmTodayV4Endpoints===b instanceof Gv:!1,!b){{b=!0===a.useDrmTodayV4Endpoints;a=a.env;const c=qt(a);if(!c)throw new _.vj(`env not recognized as DRMtoday environment: ${a}`);b?(a=new Gv(a,c),a.Ga(_.td,{licenseUrl:"",videoRobustness:Ku,audioRobustness:Lu,persistentStateRequired:!1,distinctiveIdentifierRequired:!1,serverCertificate:rt(c),modifiers:{licenseRequest:gt}}),a.Ga(_.pd,
519
- {licenseUrl:"",certificateUrl:"",modifiers:{licenseRequest:ht,licenseResponse:kt,extractContentId:lt,certificateRequest:it}}),a.Ga(_.rd,{licenseUrl:"",videoRobustness:Mu,audioRobustness:Nu,modifiers:{licenseRequest:jt}})):(b=c,a=new _.Fv(a),a.Ga(_.td,{licenseUrl:Ws(_.td,b),videoRobustness:Ku,audioRobustness:Lu,persistentStateRequired:!1,distinctiveIdentifierRequired:!1,serverCertificate:rt(b),modifiers:{licenseRequest:_.Zs,licenseResponse:_.dt}}),a.Ga(_.pd,{licenseUrl:Ws(_.pd,b),certificateUrl:an(b)+
520
- "/license-server-fairplay/cert/",modifiers:{licenseRequest:at,licenseResponse:_.bt,extractContentId:_.Xs,certificateRequest:ct}}),a.Ga(_.rd,{licenseUrl:Ws(_.rd,b),videoRobustness:Mu,audioRobustness:Nu,modifiers:{licenseRequest:$s}}));_.mk(a)}}}}id(){return Ld}};var Lv=class extends _.Fv{constructor(a,b,c,d,e){super(Ia);this.o=a;this.l=b;this.j=c;this.a=d;this.w=e;this.g=new _.S(hd);_.Fi(this.o)?this.g.warn(_.Gb):this.Ga(_.td,{licenseUrl:this.o,videoRobustness:[_.nb,void 0],audioRobustness:[_.mb,void 0],persistentStateRequired:!1,distinctiveIdentifierRequired:!1,serverCertificate:null,modifiers:{licenseRequest:this.Sd.bind(this)}});_.Fi(this.l)?this.g.warn(_.cb):this.Ga(_.rd,{licenseUrl:this.l,videoRobustness:["3000"],audioRobustness:["2000"],modifiers:{licenseRequest:this.Sd.bind(this)}});
521
- _.Fi(this.j)?this.g.warn(_.Ca):_.Fi(this.a)?this.g.warn(_.Ba):this.Ga(_.pd,{licenseUrl:this.j,certificateUrl:this.a,modifiers:{licenseRequest:this.Gg.bind(this),licenseResponse:this.Hg.bind(this),certificateRequest:this.Sd.bind(this),extractContentId:this.jg.bind(this)}})}Sd(a,b){a=a.drm.customData.headers||{};for(const c of Object.keys(a))b.headers[c]=a[c]}jg(a,b){a=Sm(b);switch(this.w){case Jv:return a;case Kv:return(new _.Tm(a)).a;default:throw Error("Unknown content ID strategy");}}Gg(a,b){b.headers[_.ua]=
522
- _.Cc;this.Sd(a,b);a={spc:_.Mk(b.body)};b.body=_.Bi(_.Aj(a,!0))}Hg(a,b){a=_.vi(b.data).trim();const c="\x3c/ckc\x3e"===a.substr(-6);"\x3cckc\x3e"===a.substr(0,5)&&c&&(a=a.slice(5,-6));b.data=_.Ok(a).buffer}};_.w(hd,Lv);Lv.prototype.onFairPlayLicenseResponse=Lv.prototype.Hg;Lv.prototype.onFairPlayLicenseRequest=Lv.prototype.Gg;Lv.prototype.extractFairPlayContentId=Lv.prototype.jg;Lv.prototype.onLicenseRequest=Lv.prototype.Sd;Lv.prototype.constructor=Lv.prototype.constructor;Lv.NAME=Ia;
523
- var Kv="hostname",Jv="full-skd";Lv.FairPlayContentIdStrategy={HOSTNAME:Kv,FULL_SKD:Jv};var Mv=class extends _.Ev{drmConfigurationResolved(a){if(a&&a.env===Ia){a=a.customData;if(!a)throw new _.J(_.C,7,7100,_.ud);a=new Lv(a.widevineLicenseUrl,a.playReadyLicenseUrl,a.fairPlayLicenseUrl,a.fairPlayCertificateUrl,a.fairPlayContentIdStrategy||Jv);_.mk(a)}}uninstall(){delete _.lk.HeaderDrm}id(){return"headerdrm"}};_.w("clpp.drm.HeaderDrmComponent",Mv);_.Nv=class{constructor(a,b,c){this.h=a;this.j=b;this.f=c||this.h.getMedia();this.a=null}start(){this.a=new ResizeObserver(a=>{a=a[0];this.j(a.contentRect.width,a.contentRect.height,this.h.isFullscreen())});this.f&&this.a.observe(this.f)}stop(){this.a&&(this.a.disconnect(),this.a=null)}};var Ov;_.Pv=class{constructor(){this.a=new Blob([Ov],{type:_.qg})}canPlay(a){var b=document.createElement(_.t);b.setAttribute("playsinline","playsinline");a&&(b.muted=!0,b.setAttribute("muted","muted"));b.src=URL.createObjectURL(this.a);const c=new _.wk;b=b.play();const d=(new _.Jh(()=>{d.stop();c.resolve(a)})).la(.25);void 0!==b?b.then(()=>{d.stop();c.resolve(!0)}).catch(e=>{e&&e.message&&e.message===$a?(d.stop(),c.resolve(!0)):(d.stop(),c.resolve(!1))}):(d.stop(),c.resolve(!0));return c}};
524
- Ov=new Uint8Array([0,0,0,28,102,116,121,112,105,115,111,109,0,0,2,0,105,115,111,109,105,115,111,50,109,112,52,49,0,0,0,8,102,114,101,101,0,0,2,239,109,100,97,116,33,16,5,32,164,27,255,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
514
+ yield Bs(a,b),a.g.info(`First playing (index: ${a.a})`)}catch(c){throw a.g.error(`First failed (index: ${a.a})`),c;}finally{a.j=!1,Is(a)}}})}Lg(){const a=this;return _.v(function*(){if(a.j)a.g.warn("Cannot play next item while busy");else if(a.Kd()){a.j=!0;a.a+=1;a.g.info(`Next (index: ${a.a})`);var b=a.f;a.ha.transition===_.Ne&&b.player.pause();Ns(a,a.a+-2);a.l.delete(a.a);var c=a.h[a.a];try{a.g.info(`Next loading (index: ${a.a})`),yield Js(a,c),a.g.info(`Next playing (index: ${a.a})`)}catch(d){throw a.g.error(`Next failed (index: ${a.a})`),
515
+ d;}finally{a.j=!1,b&&(yield Ms(a,b)),Is(a)}}else a.g.warn("There are no more items in the playlist")})}Hi(){const a=this;return _.v(function*(){if(a.j)a.g.warn("Cannot play previous item while busy");else if(a.ug()){a.j=!0;--a.a;a.g.info(`Previous (index: ${a.a})`);var b=a.f;a.ha.transition===_.Ne&&b.player.pause();Ns(a,a.a+2);a.l.delete(a.a);var c=a.h[a.a];try{a.g.info(`Previous loading (index: ${a.a})`),yield Js(a,c),a.g.info(`Previous playing (index: ${a.a})`)}catch(d){throw a.g.error(`Previous failed (index: ${a.a})`),
516
+ d;}finally{a.j=!1,b&&(yield Ms(a,b)),Is(a)}}else a.g.warn("There are no more previous items in the playlist")})}destroy(){const a=this;return _.v(function*(){a.g.info("Destroy");yield Promise.all([Os(a),a.f?Ms(a,a.f):Promise.resolve()]);yield Ps(a)})}};_.w(kd,Av);Av.prototype.destroy=Av.prototype.destroy;Av.prototype.playPrev=Av.prototype.Hi;Av.prototype.playNext=Av.prototype.Lg;Av.prototype.playFirst=Av.prototype.Gi;Av.prototype.hasPrev=Av.prototype.ug;Av.prototype.hasNext=Av.prototype.Kd;
517
+ Av.prototype.setIndex=Av.prototype.Ti;Av.prototype.setItems=Av.prototype.Ui;Av.prototype.getPreloading=Av.prototype.pg;Av.prototype.getPrev=Av.prototype.qg;Av.prototype.getNext=Av.prototype.og;Av.prototype.getCurrentPlayer=Av.prototype.qe;Av.prototype.getCurrent=Av.prototype.Nb;var Ls="preload",zs=_.ne;var Qs=new Map;var Dv=class{constructor(a){this.h=a;this.f={keepOriginalTimestamps:!0,remux:!1};this.a=new muxjs.mp4.Transmuxer(this.f)}destroy(){this.a.dispose();this.a=null}reset(){this.a=new muxjs.mp4.Transmuxer(this.f)}isSupported(a,b){const c="mp2t"===a.toLowerCase().split(";")[0].split("/")[1],d=a.toLowerCase().split(";")[0]===_.Dc;if(!window.muxjs||!c&&!d)return!1;if(d)return _.Rs(Hc);if(b)return _.Rs(Ss(b,a));b=Ss(_.q,a);a=Ss(_.t,a);return _.Rs(b)||_.Rs(a)}isMuxed(a,b){return 1<this.demuxMimeTypes(a,b).size}demuxMimeTypes(a,
518
+ b){const c=new Map;c.set(a,b);try{const d=_.Ll(b),e=_.Ml(b).split(","),f=new Map,g=Hj(_.q,e),h=Hj(_.t,e);g&&f.set(_.q,this.convertCodecs(_.q,_.Kl(d,g)));h&&f.set(_.t,this.convertCodecs(_.t,_.Kl(d,h)));return f}catch(d){return c}}convertCodecs(a,b){return b.toLowerCase().split(";")[0]===_.Dc?Hc:"mp2t"===b.toLowerCase().split(";")[0].split("/")[1]?Ss(a,b):b}getOriginalMimeType(){return this.h}transmux(a){const b=[],c=[];let d=[],e=null;a=_.E(a);const f=h=>{d=h.captions;const k=new Uint8Array(h.data.byteLength+
519
+ h.initSegment.byteLength);k.set(h.initSegment,0);k.set(h.data,h.initSegment.byteLength);h.type===Bv?b.push(k):h.type===Cv&&c.push(k)},g=()=>{e={video:_.Tk(...b),captions:d,audio:_.Tk(...c)}};this.a.on("data",f);this.a.on("done",g);this.a.push(a);this.a.flush();this.a.off("data",f);this.a.off("done",g);if(!e)throw new _.J(_.C,3,3018);return e}},Cv=_.q,Bv=_.t;var Ev=class{getCuePoints(){}Qb(){}Ab(){}};_.w("clpp.ads.IAdsTimeline",Ev);Ev.prototype.hasPostroll=Ev.prototype.Ab;Ev.prototype.hasPreroll=Ev.prototype.Qb;Ev.prototype.getCuePoints=Ev.prototype.getCuePoints;_.Fv=class{install(){}uninstall(){}beforeLoad(){}drmConfigurationResolved(){}afterLoad(){}playerConstructed(){}};_.Gv=class{constructor(a){this.K=a;this.h={}}Ha(a,b){this.h[a]=b}f(a,b){return b.licenseUrl}G(a){return a.certificateUrl}};_.w("clpp.drm.DrmEnvironment",_.Gv);_.Gv.prototype.setDrmSystem=_.Gv.prototype.Ha;var Us,Vs,Ws;Us="/license-proxy-widevine/cenc/";Vs="/license-proxy-headerauth/drmtoday/RightsManager.asmx";Ws="/license-server-fairplay/";_.Zs=new _.S("clpp.drm.DrmTodayLegacyEndpointHandler");var Hv=class extends _.Gv{constructor(a,b){super(a);this.a=b}f(a,b,c){c=ft(c);a:switch(b=bn(this.a),c=`/v4/${encodeURIComponent(c)}`,a){case _.td:a=b+c+"/wv";break a;case _.rd:a=b+c+"/pr";break a;case _.pd:a=b+c+"/fp";break a;default:throw new _.wj("Cannot infer DRMtoday V4 license URL for key system: "+a);}return a}G(a,b){b=ft(b);a=bn(this.a);b=`/v4/${encodeURIComponent(b)}`;return a=a+b+"/fp/cert"}};var Iv=class{};_.w("clpp.drm.DrmToday",Iv);var nt="PRODUCTION",ot="STAGING",pt="DEMO",qt="TEST";Iv.Environment={PRODUCTION:nt,STAGING:ot,DEMO:pt,TEST:qt};Iv.WidevineCertificates={V1_PROD:"V1_PROD",V1_STAGING:"V1_STAGING",V2:"V2"};var Jv=class extends _.Fv{drmConfigurationResolved(a){if(a){var b=a.env;if(b=!!b&&!!rt(b))if(b=(b=_.mk[a.env]||null)?!0===a.useDrmTodayV4Endpoints===b instanceof Hv:!1,!b){{b=!0===a.useDrmTodayV4Endpoints;a=a.env;const c=rt(a);if(!c)throw new _.wj(`env not recognized as DRMtoday environment: ${a}`);b?(a=new Hv(a,c),a.Ha(_.td,{licenseUrl:"",videoRobustness:Lu,audioRobustness:Mu,persistentStateRequired:!1,distinctiveIdentifierRequired:!1,serverCertificate:st(c),modifiers:{licenseRequest:ht}}),a.Ha(_.pd,
520
+ {licenseUrl:"",certificateUrl:"",modifiers:{licenseRequest:it,licenseResponse:lt,extractContentId:mt,certificateRequest:jt}}),a.Ha(_.rd,{licenseUrl:"",videoRobustness:Nu,audioRobustness:Ou,modifiers:{licenseRequest:kt}})):(b=c,a=new _.Gv(a),a.Ha(_.td,{licenseUrl:Xs(_.td,b),videoRobustness:Lu,audioRobustness:Mu,persistentStateRequired:!1,distinctiveIdentifierRequired:!1,serverCertificate:st(b),modifiers:{licenseRequest:_.$s,licenseResponse:_.et}}),a.Ha(_.pd,{licenseUrl:Xs(_.pd,b),certificateUrl:bn(b)+
521
+ "/license-server-fairplay/cert/",modifiers:{licenseRequest:bt,licenseResponse:_.ct,extractContentId:_.Ys,certificateRequest:dt}}),a.Ha(_.rd,{licenseUrl:Xs(_.rd,b),videoRobustness:Nu,audioRobustness:Ou,modifiers:{licenseRequest:at}}));_.nk(a)}}}}id(){return Ld}};var Mv=class extends _.Gv{constructor(a,b,c,d,e){super(Ia);this.o=a;this.l=b;this.j=c;this.a=d;this.w=e;this.g=new _.S(hd);_.Gi(this.o)?this.g.warn(_.Gb):this.Ha(_.td,{licenseUrl:this.o,videoRobustness:[_.nb,void 0],audioRobustness:[_.mb,void 0],persistentStateRequired:!1,distinctiveIdentifierRequired:!1,serverCertificate:null,modifiers:{licenseRequest:this.Sd.bind(this)}});_.Gi(this.l)?this.g.warn(_.cb):this.Ha(_.rd,{licenseUrl:this.l,videoRobustness:["3000"],audioRobustness:["2000"],modifiers:{licenseRequest:this.Sd.bind(this)}});
522
+ _.Gi(this.j)?this.g.warn(_.Ca):_.Gi(this.a)?this.g.warn(_.Ba):this.Ha(_.pd,{licenseUrl:this.j,certificateUrl:this.a,modifiers:{licenseRequest:this.Gg.bind(this),licenseResponse:this.Hg.bind(this),certificateRequest:this.Sd.bind(this),extractContentId:this.jg.bind(this)}})}Sd(a,b){a=a.drm.customData.headers||{};for(const c of Object.keys(a))b.headers[c]=a[c]}jg(a,b){a=Tm(b);switch(this.w){case Kv:return a;case Lv:return(new _.Um(a)).a;default:throw Error("Unknown content ID strategy");}}Gg(a,b){b.headers[_.ua]=
523
+ _.Cc;this.Sd(a,b);a={spc:_.Nk(b.body)};b.body=_.Ci(_.Bj(a,!0))}Hg(a,b){a=_.wi(b.data).trim();const c="\x3c/ckc\x3e"===a.substr(-6);"\x3cckc\x3e"===a.substr(0,5)&&c&&(a=a.slice(5,-6));b.data=_.Pk(a).buffer}};_.w(hd,Mv);Mv.prototype.onFairPlayLicenseResponse=Mv.prototype.Hg;Mv.prototype.onFairPlayLicenseRequest=Mv.prototype.Gg;Mv.prototype.extractFairPlayContentId=Mv.prototype.jg;Mv.prototype.onLicenseRequest=Mv.prototype.Sd;Mv.prototype.constructor=Mv.prototype.constructor;Mv.NAME=Ia;
524
+ var Lv="hostname",Kv="full-skd";Mv.FairPlayContentIdStrategy={HOSTNAME:Lv,FULL_SKD:Kv};var Nv=class extends _.Fv{drmConfigurationResolved(a){if(a&&a.env===Ia){a=a.customData;if(!a)throw new _.J(_.C,7,7100,_.ud);a=new Mv(a.widevineLicenseUrl,a.playReadyLicenseUrl,a.fairPlayLicenseUrl,a.fairPlayCertificateUrl,a.fairPlayContentIdStrategy||Kv);_.nk(a)}}uninstall(){delete _.mk.HeaderDrm}id(){return"headerdrm"}};_.w("clpp.drm.HeaderDrmComponent",Nv);_.Ov=class{constructor(a,b,c){this.h=a;this.j=b;this.f=c||this.h.getMedia();this.a=null}start(){this.a=new ResizeObserver(a=>{a=a[0];this.j(a.contentRect.width,a.contentRect.height,this.h.isFullscreen())});this.f&&this.a.observe(this.f)}stop(){this.a&&(this.a.disconnect(),this.a=null)}};var Pv;_.Qv=class{constructor(){this.a=new Blob([Pv],{type:_.qg})}canPlay(a){var b=document.createElement(_.t);b.setAttribute("playsinline","playsinline");a&&(b.muted=!0,b.setAttribute("muted","muted"));b.src=URL.createObjectURL(this.a);const c=new _.xk;b=b.play();const d=(new _.Kh(()=>{d.stop();c.resolve(a)})).la(.25);void 0!==b?b.then(()=>{d.stop();c.resolve(!0)}).catch(e=>{e&&e.message&&e.message===$a?(d.stop(),c.resolve(!0)):(d.stop(),c.resolve(!1))}):(d.stop(),c.resolve(!0));return c}};
525
+ Pv=new Uint8Array([0,0,0,28,102,116,121,112,105,115,111,109,0,0,2,0,105,115,111,109,105,115,111,50,109,112,52,49,0,0,0,8,102,114,101,101,0,0,2,239,109,100,97,116,33,16,5,32,164,27,255,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
525
526
  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,55,167,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,112,33,16,5,32,164,27,255,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
526
527
  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,55,167,128,0,0,0,0,0,0,
527
528
  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,112,0,0,2,194,109,111,111,118,0,0,0,108,109,118,104,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,232,0,0,0,47,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,1,236,116,114,97,107,0,0,0,92,116,107,104,100,0,0,0,3,0,0,0,0,0,0,
528
529
  0,0,0,0,0,2,0,0,0,0,0,0,0,47,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36,101,100,116,115,0,0,0,28,101,108,115,116,0,0,0,0,0,0,0,1,0,0,0,47,0,0,0,0,0,1,0,0,0,0,1,100,109,100,105,97,0,0,0,32,109,100,104,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,172,68,0,0,8,0,85,196,0,0,0,0,0,45,104,100,108,114,0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0,0,0,1,15,109,105,110,102,0,0,
529
530
  0,16,115,109,104,100,0,0,0,0,0,0,0,0,0,0,0,36,100,105,110,102,0,0,0,28,100,114,101,102,0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1,0,0,0,211,115,116,98,108,0,0,0,103,115,116,115,100,0,0,0,0,0,0,0,1,0,0,0,87,109,112,52,97,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,2,0,16,0,0,0,0,172,68,0,0,0,0,0,51,101,115,100,115,0,0,0,0,3,128,128,128,34,0,2,0,4,128,128,128,20,64,21,0,0,0,0,1,244,0,0,1,243,249,5,128,128,128,2,18,16,6,128,128,128,1,2,0,0,0,24,115,116,116,115,0,0,0,0,0,0,0,1,0,0,0,2,0,0,4,0,0,0,0,28,115,
530
- 116,115,99,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,2,0,0,0,1,0,0,0,28,115,116,115,122,0,0,0,0,0,0,0,0,0,0,0,2,0,0,1,115,0,0,1,116,0,0,0,20,115,116,99,111,0,0,0,0,0,0,0,1,0,0,0,44,0,0,0,98,117,100,116,97,0,0,0,90,109,101,116,97,0,0,0,0,0,0,0,33,104,100,108,114,0,0,0,0,0,0,0,0,109,100,105,114,97,112,112,108,0,0,0,0,0,0,0,0,0,0,0,0,45,105,108,115,116,0,0,0,37,169,116,111,111,0,0,0,29,100,97,116,97,0,0,0,1,0,0,0,0,76,97,118,102,53,54,46,52,48,46,49,48,49]);_.At={};_.Rv=class{constructor(a){a=a.getConfiguration();a=_.Yg(a.textStyle||a.textstyle||{});this.K=typeof a.backgroundColor===_.Of?a.backgroundColor:null;this.R=typeof a.windowColor===_.Of?a.windowColor:null;this.M=typeof a.fontColor===_.Of?a.fontColor:null;this.P=typeof a.fontFamily===_.Of?a.fontFamily:null;this.I=typeof a.fontSize===_.Of?a.fontSize:null;this.C=typeof a.fontSizePercent===_.r?a.fontSizePercent:null;this.H=typeof a.edgeColor===_.Of?a.edgeColor:"rgba(0, 0, 0, 1)";this.w=null;typeof a.edgeType===
531
- _.Of&&(this.w=a.edgeType)}getBackgroundColor(){return this.K}setBackgroundColor(a){this.K=a;this.h()}getWindowColor(){return this.R}setWindowColor(a){this.R=a;this.h()}getFontFamily(){return this.P}setFontFamily(a){this.P=a;this.h()}getFontColor(){return this.M}setFontColor(a){this.M=a;this.h()}getFontSize(){return this.I}setFontSize(a){this.I=a;this.h()}getFontSizePercent(){return null===this.C?Qv:this.C}setFontSizePercent(a){this.C=a;this.h()}getEdgeColor(){return this.H}setEdgeColor(a){this.H=
532
- a;this.h()}getEdgeType(){return this.w}setEdgeType(a){this.w=a;this.h()}};_.Rv.prototype.setEdgeType=_.Rv.prototype.setEdgeType;_.Rv.prototype.getEdgeType=_.Rv.prototype.getEdgeType;_.Rv.prototype.setEdgeColor=_.Rv.prototype.setEdgeColor;_.Rv.prototype.getEdgeColor=_.Rv.prototype.getEdgeColor;_.Rv.prototype.setFontSizePercent=_.Rv.prototype.setFontSizePercent;_.Rv.prototype.getFontSizePercent=_.Rv.prototype.getFontSizePercent;_.Rv.prototype.setFontSize=_.Rv.prototype.setFontSize;
533
- _.Rv.prototype.getFontSize=_.Rv.prototype.getFontSize;_.Rv.prototype.setFontColor=_.Rv.prototype.setFontColor;_.Rv.prototype.getFontColor=_.Rv.prototype.getFontColor;_.Rv.prototype.setFontFamily=_.Rv.prototype.setFontFamily;_.Rv.prototype.getFontFamily=_.Rv.prototype.getFontFamily;_.Rv.prototype.setWindowColor=_.Rv.prototype.setWindowColor;_.Rv.prototype.getWindowColor=_.Rv.prototype.getWindowColor;_.Rv.prototype.setBackgroundColor=_.Rv.prototype.setBackgroundColor;
534
- _.Rv.prototype.getBackgroundColor=_.Rv.prototype.getBackgroundColor;var Qv=1/15;var Sv;
535
- _.Tv=class extends _.Rv{constructor(a){super(a);this.o=a.getSurface().getMedia();this.f=`clpp-video-${Sv++}`;this.j=document.createElement(_.Qf);this.l=this.A=!1;_.Ep(this.o,this.f);document.head.appendChild(this.j);this.h()}getClass(){return _.xe}isRenderer(){return!1}append(){}remove(){return!0}isTextVisible(){return this.A}setTextVisibility(a){this.A=a}h(){if(!this.l){var a={"background-color":this.getBackgroundColor(),color:this.getFontColor(),"font-family":this.getFontFamily(),"font-size":this.getFontSize(),"text-shadow":_.It(this)},
536
- b=Object.keys(a).map(c=>null!==a[c]?`${c}:${a[c]};`:"").join("");this.j.textContent=`.${this.f}::cue {${b}}`}}destroy(){this.o.classList.remove(this.f);document.head.removeChild(this.j);this.l=!0;return Promise.resolve()}};Sv=0;var Uv=class{a(){return!0}create(a){return new _.Tv(a)}};var Vv=class{constructor(a){this.f=a;this.a=null;this.g=new _.S("clpp.text.Mp4TextParser")}parseInit(a){let b;try{const c=_.Ct(_.xc);c?(b=new c(this.f),b.parseInit(a)):this.g.warn("The clpp.ttml.Mp4TtmlParser class is not available. Please register the ttml component first.")}catch(c){b=null}if(b)this.a=b;else{try{const c=_.Ct(_.yc);c?(b=new c(this.f),b.parseInit(a)):this.g.warn("The clpp.vtt.Mp4VttParser class is not available. Please register the vtt component first.")}catch(c){b=null}if(b)this.a=
537
- b;else throw new _.J(_.C,2,2011);}}parseMedia(a,b){if(!this.a)throw new _.J(_.C,2,2011);return this.a.parseMedia(a,b)}};_.qr(function(){ArrayBuffer.prototype.slice||(ArrayBuffer.prototype.slice=function(a,b){b=void 0!==b?b:this.byteLength;a=Math.floor(a);b=Math.floor(b);0>a&&(a+=this.byteLength);0>b&&(b+=this.byteLength);a=Math.min(Math.max(0,a),this.byteLength);b=Math.min(Math.max(0,b),this.byteLength);if(0>=b-a)return new ArrayBuffer(0);const c=new ArrayBuffer(b-a),d=_.E(c);a=new Uint8Array(this,a,b-a);d.set(a);return c})});
538
- _.qr(function(){if(window.Document){var a=Element.prototype;a.requestFullscreen=a.requestFullscreen||a.mozRequestFullScreen||a.msRequestFullscreen||a.webkitRequestFullscreen;a=Document.prototype;a.exitFullscreen=a.exitFullscreen||a.mozCancelFullScreen||a.msExitFullscreen||a.webkitExitFullscreen;Vd in document||(Object.defineProperty(document,Vd,{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement}}),Object.defineProperty(document,"fullscreenEnabled",
539
- {get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitSupportsFullscreen||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",st);document.addEventListener("webkitfullscreenerror",st);document.addEventListener("mozfullscreenchange",st);document.addEventListener("mozfullscreenerror",st);document.addEventListener("MSFullscreenChange",st);document.addEventListener("MSFullscreenError",st)}});
540
- _.qr(function(){navigator.languages||Object.defineProperty(navigator,"languages",{get:()=>navigator.language?[navigator.language]:["en"]})});_.qr(function(){_.rh("mathRound.install")});
541
- _.qr(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(_.rh("PiPWebkit.install"),document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=ut,document.exitPictureInPicture=vt,document.addEventListener("webkitpresentationmodechanged",tt,!0))}});
542
- _.qr(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in a&&(a.getVideoPlaybackQuality=wt)}});_.qr(function(){_.rh("VideoPlayPromise.install");if(window.HTMLMediaElement){const a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){const b=a.apply(this);b&&b.catch(()=>{});return b}}});
543
- _.qr(function(){if(window.VTTCue)_.qh("Using native VTTCue.");else if(window.TextTrackCue){var a=TextTrackCue.length;if(3===a)_.qh(Bb),window.VTTCue=xt;else if(6===a)_.qh("Using VTTCue polyfill from 6 argument TextTrackCue."),window.VTTCue=yt;else{try{var b=!!xt(1,2,"")}catch(c){b=!1}b&&(_.qh(Bb),window.VTTCue=xt)}}else _.sh("VTTCue not available.")});_.vh(new mv);_.Bt(_.uc,Vv);_.So(_.xe,new Uv);El(_.Dc,()=>new Cv(_.Dc));El(_.pg,()=>new Cv(_.pg));Bp(Iv);Bp(Mv);
544
- wn=[new Xu,new Vu,new bv,new dv].filter(a=>a.f());_.Wv=class{constructor(a,b,c,d){this.id=a;this.f=b;this.a=c;this.h=d}getDuration(){return this.a}getId(){return this.id}Xb(){return this.f}Nd(){return this.h}Xc(a){return this.getId()===a.getId()&&this.Xb()===a.Xb()&&this.getDuration()===a.getDuration()&&this.Nd()===a.Nd()}};_.w("clpp.media.TimelineWindow",_.Wv);_.Wv.prototype.isDynamic=_.Wv.prototype.Nd;_.Wv.prototype.getStart=_.Wv.prototype.Xb;_.Wv.prototype.getId=_.Wv.prototype.getId;_.Wv.prototype.getDuration=_.Wv.prototype.getDuration;_.Xv=new _.S("clpp.media.TimestampParser");_.Yv=class{constructor(){this.a=[];this.f=-1;this.h=null}bi(a){return this.a[a]||null}ci(){return this.a.length}di(){return this.a}ng(){return this.a[this.f]||null}Wh(){return this.f}};_.w("clpp.media.Timeline",_.Yv);_.Yv.prototype.getCurrentWindowIndex=_.Yv.prototype.Wh;_.Yv.prototype.getCurrentWindow=_.Yv.prototype.ng;_.Yv.prototype.getWindows=_.Yv.prototype.di;_.Yv.prototype.getWindowCount=_.Yv.prototype.ci;_.Yv.prototype.getWindow=_.Yv.prototype.bi;_.Lt={};_.Mt={};var Et="raised",Ft="depressed",Ht="dropshadow",Gt="uniform";_.w("clpp.text.EdgeType",{NONE:_.Be,RAISED:Et,DEPRESSED:Ft,DROP_SHADOW:Ht,UNIFORM:Gt});_.Zv=class{onPlayerCreated(){}onContentWillLoad(){return Promise.resolve()}onContentLoaded(){return Promise.resolve()}onPlayerWillDestroy(){}onPlayerWillRelease(){}};};f.call(g,window);g.clpp._ = _;delete window.clpp; export let clpp = g.clpp; export default clpp;
531
+ 116,115,99,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,2,0,0,0,1,0,0,0,28,115,116,115,122,0,0,0,0,0,0,0,0,0,0,0,2,0,0,1,115,0,0,1,116,0,0,0,20,115,116,99,111,0,0,0,0,0,0,0,1,0,0,0,44,0,0,0,98,117,100,116,97,0,0,0,90,109,101,116,97,0,0,0,0,0,0,0,33,104,100,108,114,0,0,0,0,0,0,0,0,109,100,105,114,97,112,112,108,0,0,0,0,0,0,0,0,0,0,0,0,45,105,108,115,116,0,0,0,37,169,116,111,111,0,0,0,29,100,97,116,97,0,0,0,1,0,0,0,0,76,97,118,102,53,54,46,52,48,46,49,48,49]);_.Bt={};_.Sv=class{constructor(a){a=a.getConfiguration();a=_.Yg(a.textStyle||a.textstyle||{});this.K=typeof a.backgroundColor===_.Of?a.backgroundColor:null;this.R=typeof a.windowColor===_.Of?a.windowColor:null;this.M=typeof a.fontColor===_.Of?a.fontColor:null;this.P=typeof a.fontFamily===_.Of?a.fontFamily:null;this.I=typeof a.fontSize===_.Of?a.fontSize:null;this.C=typeof a.fontSizePercent===_.r?a.fontSizePercent:null;this.H=typeof a.edgeColor===_.Of?a.edgeColor:"rgba(0, 0, 0, 1)";this.w=null;typeof a.edgeType===
532
+ _.Of&&(this.w=a.edgeType)}getBackgroundColor(){return this.K}setBackgroundColor(a){this.K=a;this.h()}getWindowColor(){return this.R}setWindowColor(a){this.R=a;this.h()}getFontFamily(){return this.P}setFontFamily(a){this.P=a;this.h()}getFontColor(){return this.M}setFontColor(a){this.M=a;this.h()}getFontSize(){return this.I}setFontSize(a){this.I=a;this.h()}getFontSizePercent(){return null===this.C?Rv:this.C}setFontSizePercent(a){this.C=a;this.h()}getEdgeColor(){return this.H}setEdgeColor(a){this.H=
533
+ a;this.h()}getEdgeType(){return this.w}setEdgeType(a){this.w=a;this.h()}};_.Sv.prototype.setEdgeType=_.Sv.prototype.setEdgeType;_.Sv.prototype.getEdgeType=_.Sv.prototype.getEdgeType;_.Sv.prototype.setEdgeColor=_.Sv.prototype.setEdgeColor;_.Sv.prototype.getEdgeColor=_.Sv.prototype.getEdgeColor;_.Sv.prototype.setFontSizePercent=_.Sv.prototype.setFontSizePercent;_.Sv.prototype.getFontSizePercent=_.Sv.prototype.getFontSizePercent;_.Sv.prototype.setFontSize=_.Sv.prototype.setFontSize;
534
+ _.Sv.prototype.getFontSize=_.Sv.prototype.getFontSize;_.Sv.prototype.setFontColor=_.Sv.prototype.setFontColor;_.Sv.prototype.getFontColor=_.Sv.prototype.getFontColor;_.Sv.prototype.setFontFamily=_.Sv.prototype.setFontFamily;_.Sv.prototype.getFontFamily=_.Sv.prototype.getFontFamily;_.Sv.prototype.setWindowColor=_.Sv.prototype.setWindowColor;_.Sv.prototype.getWindowColor=_.Sv.prototype.getWindowColor;_.Sv.prototype.setBackgroundColor=_.Sv.prototype.setBackgroundColor;
535
+ _.Sv.prototype.getBackgroundColor=_.Sv.prototype.getBackgroundColor;var Rv=1/15;var Tv;
536
+ _.Uv=class extends _.Sv{constructor(a){super(a);this.o=a.getSurface().getMedia();this.f=`clpp-video-${Tv++}`;this.j=document.createElement(_.Qf);this.l=this.A=!1;_.Fp(this.o,this.f);document.head.appendChild(this.j);this.h()}getClass(){return _.xe}isRenderer(){return!1}append(){}remove(){return!0}isTextVisible(){return this.A}setTextVisibility(a){this.A=a}h(){if(!this.l){var a={"background-color":this.getBackgroundColor(),color:this.getFontColor(),"font-family":this.getFontFamily(),"font-size":this.getFontSize(),"text-shadow":_.Jt(this)},
537
+ b=Object.keys(a).map(c=>null!==a[c]?`${c}:${a[c]};`:"").join("");this.j.textContent=`.${this.f}::cue {${b}}`}}destroy(){this.o.classList.remove(this.f);document.head.removeChild(this.j);this.l=!0;return Promise.resolve()}};Tv=0;var Vv=class{a(){return!0}create(a){return new _.Uv(a)}};var Wv=class{constructor(a){this.f=a;this.a=null;this.g=new _.S("clpp.text.Mp4TextParser")}parseInit(a){let b;try{const c=_.Dt(_.vc);c?(b=new c(this.f),b.parseInit(a)):this.g.warn("The clpp.ttml.Mp4TtmlParser class is not available. Please register the ttml component first.")}catch(c){b=null}if(b)this.a=b;else{try{const c=_.Dt(_.wc);c?(b=new c(this.f),b.parseInit(a)):this.g.warn("The clpp.vtt.Mp4VttParser class is not available. Please register the vtt component first.")}catch(c){b=null}if(b)this.a=
538
+ b;else throw new _.J(_.C,2,2011);}}parseMedia(a,b){if(!this.a)throw new _.J(_.C,2,2011);return this.a.parseMedia(a,b)}};_.rr(function(){ArrayBuffer.prototype.slice||(ArrayBuffer.prototype.slice=function(a,b){b=void 0!==b?b:this.byteLength;a=Math.floor(a);b=Math.floor(b);0>a&&(a+=this.byteLength);0>b&&(b+=this.byteLength);a=Math.min(Math.max(0,a),this.byteLength);b=Math.min(Math.max(0,b),this.byteLength);if(0>=b-a)return new ArrayBuffer(0);const c=new ArrayBuffer(b-a),d=_.E(c);a=new Uint8Array(this,a,b-a);d.set(a);return c})});
539
+ _.rr(function(){if(window.Document){var a=Element.prototype;a.requestFullscreen=a.requestFullscreen||a.mozRequestFullScreen||a.msRequestFullscreen||a.webkitRequestFullscreen;a=Document.prototype;a.exitFullscreen=a.exitFullscreen||a.mozCancelFullScreen||a.msExitFullscreen||a.webkitExitFullscreen;Vd in document||(Object.defineProperty(document,Vd,{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement}}),Object.defineProperty(document,"fullscreenEnabled",
540
+ {get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitSupportsFullscreen||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",tt);document.addEventListener("webkitfullscreenerror",tt);document.addEventListener("mozfullscreenchange",tt);document.addEventListener("mozfullscreenerror",tt);document.addEventListener("MSFullscreenChange",tt);document.addEventListener("MSFullscreenError",tt)}});
541
+ _.rr(function(){navigator.languages||Object.defineProperty(navigator,"languages",{get:()=>navigator.language?[navigator.language]:["en"]})});_.rr(function(){_.rh("mathRound.install")});
542
+ _.rr(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(_.rh("PiPWebkit.install"),document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=vt,document.exitPictureInPicture=wt,document.addEventListener("webkitpresentationmodechanged",ut,!0))}});
543
+ _.rr(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in a&&(a.getVideoPlaybackQuality=xt)}});_.rr(function(){_.rh("VideoPlayPromise.install");if(window.HTMLMediaElement){const a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){const b=a.apply(this);b&&b.catch(()=>{});return b}}});
544
+ _.rr(function(){if(window.VTTCue)_.qh("Using native VTTCue.");else if(window.TextTrackCue){var a=TextTrackCue.length;if(3===a)_.qh(Bb),window.VTTCue=yt;else if(6===a)_.qh("Using VTTCue polyfill from 6 argument TextTrackCue."),window.VTTCue=zt;else{try{var b=!!yt(1,2,"")}catch(c){b=!1}b&&(_.qh(Bb),window.VTTCue=yt)}}else _.sh("VTTCue not available.")});_.vh(new nv);_.Ct(_.uc,Wv);_.To(_.xe,new Vv);Fl(_.Dc,()=>new Dv(_.Dc));Fl(_.pg,()=>new Dv(_.pg));Cp(Jv);Cp(Nv);
545
+ xn=[new Yu,new Wu,new cv,new ev].filter(a=>a.f());_.Xv=class{constructor(a,b,c,d){this.id=a;this.f=b;this.a=c;this.h=d}getDuration(){return this.a}getId(){return this.id}Yb(){return this.f}Nd(){return this.h}Xc(a){return this.getId()===a.getId()&&this.Yb()===a.Yb()&&this.getDuration()===a.getDuration()&&this.Nd()===a.Nd()}};_.w("clpp.media.TimelineWindow",_.Xv);_.Xv.prototype.isDynamic=_.Xv.prototype.Nd;_.Xv.prototype.getStart=_.Xv.prototype.Yb;_.Xv.prototype.getId=_.Xv.prototype.getId;_.Xv.prototype.getDuration=_.Xv.prototype.getDuration;_.Yv=new _.S("clpp.media.TimestampParser");_.Zv=class{constructor(){this.a=[];this.f=-1;this.h=null}bi(a){return this.a[a]||null}ci(){return this.a.length}di(){return this.a}ng(){return this.a[this.f]||null}Wh(){return this.f}};_.w("clpp.media.Timeline",_.Zv);_.Zv.prototype.getCurrentWindowIndex=_.Zv.prototype.Wh;_.Zv.prototype.getCurrentWindow=_.Zv.prototype.ng;_.Zv.prototype.getWindows=_.Zv.prototype.di;_.Zv.prototype.getWindowCount=_.Zv.prototype.ci;_.Zv.prototype.getWindow=_.Zv.prototype.bi;_.Mt={};_.Nt={};var Ft="raised",Gt="depressed",It="dropshadow",Ht="uniform";_.w("clpp.text.EdgeType",{NONE:_.Be,RAISED:Ft,DEPRESSED:Gt,DROP_SHADOW:It,UNIFORM:Ht});_.$v=class{onPlayerCreated(){}onContentWillLoad(){return Promise.resolve()}onContentLoaded(){return Promise.resolve()}onPlayerWillDestroy(){}onPlayerWillRelease(){}};};f.call(g,window);g.clpp._ = _;delete window.clpp; export let clpp = g.clpp; export default clpp;