@castlabs/prestoplay 6.26.0 → 6.27.0

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 (68) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/cjs/cl.adobe.js +3 -3
  3. package/cjs/cl.airplay.js +3 -3
  4. package/cjs/cl.broadpeak.js +7 -7
  5. package/cjs/cl.cast.js +114 -113
  6. package/cjs/cl.conviva.js +29 -29
  7. package/cjs/cl.core.js +620 -621
  8. package/cjs/cl.crypto.js +7 -7
  9. package/cjs/cl.dash.js +84 -84
  10. package/cjs/cl.externs.js +83 -51
  11. package/cjs/cl.freewheel.js +25 -25
  12. package/cjs/cl.hls.js +79 -77
  13. package/cjs/cl.hlssmpte.js +6 -6
  14. package/cjs/cl.htmlcue.js +23 -23
  15. package/cjs/cl.ima.js +24 -24
  16. package/cjs/cl.mediatailor.js +3 -3
  17. package/cjs/cl.mse.js +350 -342
  18. package/cjs/cl.muxdata.js +15 -15
  19. package/cjs/cl.onboard.js +3 -3
  20. package/cjs/cl.persistent.js +15 -15
  21. package/cjs/cl.playlist.js +6 -6
  22. package/cjs/cl.sessions.js +16 -16
  23. package/cjs/cl.simid.js +17 -17
  24. package/cjs/cl.smooth.js +67 -67
  25. package/cjs/cl.thumbnails.js +26 -26
  26. package/cjs/cl.tizen.js +69 -68
  27. package/cjs/cl.ttml.js +29 -29
  28. package/cjs/cl.verimatrix.js +5 -5
  29. package/cjs/cl.vimond.js +12 -12
  30. package/cjs/cl.vr.js +19 -19
  31. package/cjs/cl.vtt.js +14 -14
  32. package/cjs/cl.yospace.js +4 -4
  33. package/cjs/cl.youbora.js +37 -37
  34. package/cjs/polyfill.min.js +15 -3
  35. package/cl.adobe.js +3 -3
  36. package/cl.airplay.js +3 -3
  37. package/cl.broadpeak.js +5 -5
  38. package/cl.cast.js +92 -90
  39. package/cl.conviva.js +27 -27
  40. package/cl.core.js +498 -503
  41. package/cl.crypto.js +9 -9
  42. package/cl.dash.js +82 -82
  43. package/cl.externs.js +83 -51
  44. package/cl.freewheel.js +19 -19
  45. package/cl.hls.js +80 -79
  46. package/cl.hlssmpte.js +5 -5
  47. package/cl.htmlcue.js +26 -26
  48. package/cl.ima.js +17 -17
  49. package/cl.mediatailor.js +3 -3
  50. package/cl.mse.js +305 -301
  51. package/cl.muxdata.js +13 -13
  52. package/cl.onboard.js +4 -4
  53. package/cl.persistent.js +11 -11
  54. package/cl.playlist.js +5 -5
  55. package/cl.sessions.js +10 -10
  56. package/cl.simid.js +14 -14
  57. package/cl.smooth.js +60 -60
  58. package/cl.thumbnails.js +19 -19
  59. package/cl.tizen.js +57 -57
  60. package/cl.ttml.js +22 -22
  61. package/cl.verimatrix.js +4 -4
  62. package/cl.vimond.js +8 -8
  63. package/cl.vr.js +15 -15
  64. package/cl.vtt.js +12 -12
  65. package/cl.yospace.js +3 -3
  66. package/cl.youbora.js +29 -29
  67. package/package.json +1 -1
  68. package/typings.d.ts +83 -0
package/cl.core.js CHANGED
@@ -1,422 +1,417 @@
1
- let g={}; let _ = {};let f=function(window){'use strict';var ba,ca,ka,na,ta,va,xa,ya,za,Aa,Ba,Ca,Ga,Ha,Ia,Ja,Ka,Ma,Na,Sa,Ua,Va,Wa,Xa,Ya,Za,ab,bb,fb,jb,pb,qb,tb,vb,yb,Ab,Bb,Eb,Fb,Ib,Jb,Rb,Yb,Zb,$b,vc,Ac,Hc,Pc,Qc,Wc,Xc,Yc,$c,ad,bd,cd,ed,hd,id,jd,kd,ld,qd,sd,xd,Dd,Ed,Fd,Gd,Id,Jd,Kd,Nd,Od,Qd,Vd,ee,ge,he,oe,Le,Se,Ue,Ve,We,Xe,Ye,Ze,$e,af,bf,cf,gf,hf,jf,kf,lf,mf,of,tf,vf,Kf,Nf,Tf,eg,hg,ng,yg,Cg,Dg,Eg,Fg,Gg,Ig,Jg,Kg,Qg,Rg,Ug,Vg,$g,Xg,hh,ih,kh,nh,ph,xh,yh,zh,Ch,Dh,Bh,Ah,Gh,Eh,Ih,Jh,Nh,Hh,Oh,Mh,Ph,Qh,Kh,Lh,Th,$h,ai,Uh,Zh,Yh,Xh,ci,ei,di,gi,hi,ii,ji,mi,
2
- ni,pi,qi,ui,wi,yi,si,Ai,Fi,Ii,Ki,Ji,Li,Mi,Ni,Qi,Ri,Ui,pj,qj,tj,uj,vj,xj,yj,zj,Aj,Cj,Dj,Kj,Hj,Jj,Lj,Mj,Pj,Sj,Tj,Xj,Zj,Uj,Wj,Yj,ak,bk,ck,ek,fk,mk,xk,Ck,Bk,Ok,Hk,Gk,Zk,$k,bl,dl,el,fl,gl,hl,jl,il,kl,ll,ml,nl,ol,al,ql,sl,ul,xl,zl,El,Fl,Gl,Hl,Il,Jl,Kl,Ll,Tl,Ul,$l,im,km,qm,um,wm,Dm,Qm,zm,Im,Wm,Xm,Ym,$m,an,bn,en,cn,dn,fn,gn,hn,ln,sn,tn,Bn,En,Fn,Hn,Jn,Kn,Mn,Cn,In,Nn,On,Pn,Qn,Zn,Sn,$n,Rn,Tn,Un,ao,go,io,ko,jo,mo,eo,uo,ro,to,so,ho,vo,wo,xo,yo,zo,Ao,Bo,Co,Io,Jo,Ko,Qo,Ro,To,No,Mo,$o,ap,ep,gp,hp,ip,dp,kp,lp,mp,
3
- qp,vp,wp,xp,yp,zp,Ap,Cp,Dp,Ep,Fp,Tp,Op,Vp,Wp,Xp,Zp,$p,Yp,cq,dq,eq,bq,Gp,Hp,Kp,Lp,Mp,Np,Pp,Qp,Rp,Sp,kq,lq,Up,aq,mq,hq,jq,fq,pq,qq,rq,tq,uq,wq,xq,yq,Bq,Cq,zq,Kq,Lq,Mq,Jq,Tq,Aq,Nq,Oq,Pq,Qq,Rq,Sq,Vq,Eq,Uq,Fq,Dq,Gq,Wq,Zq,Hq,Iq,$q,br,fr,gr,er,hr,dr,cr,jr,lr,nr,pr,qr,rr,sr,tr,ur,vr,wr,xr,yr,zr,Er,Ir,Fr,Kr,Or,Qr,Sr,Ur,Vr,Wr,Xr,Zr,hs,$r,as,bs,cs,js,fs,ks,ns,os,ps,ls,ms,qs,rs,us,ys,zs,Cs,Es,Is,Ds,As,ts,xs,vs,ws,Ls,Ms,Ns,Os,Ps,Qs,Rs,Ss,Us,Vs,Ws,Ys,$s,et,ft,gt,it,jt,kt,mt,nt,lt,ot,rt,qt,pt,vt,ut,At,Sg,Tg;
4
- _.aa=" is registered.";ba=" is unsupported on this platform.";ca=" to a log level. Falling back to default!";_.da="#text";_.ea="6.26.0";_.fa="AdaptationSet";_.ha="Already destroyed. No-op";_.ia="Already released. No-op";_.ja="Autoplay is not allowed due to browser policy.";ka="Autoplay should not be used for preloaded streams. ";_.la="BANDWIDTH";_.ma="BASIC";na="CHECKSUM";_.pa="CODECS";_.qa="Cannot retrieve buffer information due to platform limitations";_.ra="CastlabsPlayer";_.sa="Configuration is valid";
5
- ta="Content-Length";va="Content-Type";_.wa="Could not find configured DRM environment.";xa="DRM licenses loaded";ya="DRMtoday";za="DRMtodayOnboard";Aa="Destroying player";Ba="Error while decoding string!";Ca="Error while fetching certificate!";_.Da="FairPlay Certificate URL is not defined";_.Ea="FairPlay License URL is not defined";_.Fa="GROUP-ID";Ga="HW_SECURE_ALL";Ha="HW_SECURE_CRYPTO";Ia="HW_SECURE_DECODE";Ja="HeaderDrm";Ka="InvalidStateError";_.La="LANGUAGE";Ma="License verification failed: ";
6
- Na="Load interrupted while a player release is pending";_.Pa="Loading player with configuration";_.Qa="MaxHeight";_.Ra="MaxWidth";Sa="Missing media element";_.Ta="NAME";Ua="No drmtoday configuration found in player configuration. Unable to modify the DRM license request!";Va="No event provided!";Wa="No items in the playlist";Xa="No sources provided!";Ya="No track data attached to the event, unable to add track!";Za="Not a persistent session.";_.$a="Not supported";ab="NotAllowedError";bb="NotSupportedError";
7
- _.cb="PLAYLIST";_.db="POST";_.eb="PlayReady License URL is not defined";fb="Player not ready yet.";_.gb="Player sources";_.ib="Please make sure ";jb="Preloading is not supported by this player.";_.kb="QualityLevel";_.lb="RESOLUTION";_.mb="Representation";_.nb="SW_SECURE_CRYPTO";_.ob="SW_SECURE_DECODE";pb="Session is closed";qb="Skipping Session creation. License for init data was already requested in ";_.rb="SmoothStreamingMedia";_.sb="TYPE";tb="The index is not in the allowed range.";_.ub="URI";
8
- vb="Unable to translate ";_.wb="Unhandled/ignored event";_.xb="Unregistering listeners";yb="Unsupported keySystem";Ab="Updating playout limit for interstitial";Bb="Using VTTCue polyfill from 3 argument TextTrackCue.";_.Cb="VIDEO";_.Db="VOD";Eb="Wait for preloading to finish";Fb="WebkitEmeManager.MediaKeySession.load";_.Hb="Widevine License URL is not defined";Ib="Will create EME Manager: ";Jb="X-AD-CREATIVE-SIGNALING";_.Kb="X-ASSET-LIST";_.Lb="X-ASSET-URI";_.Mb="X-PLAYOUT-LIMIT";_.Nb="X-RESTRICT";
9
- _.Qb="X-RESUME-OFFSET";Rb="X-TIMELINE-OCCUPIES";_.Sb="ad-break-started";_.Tb="ad-break-stopped";_.Ub="ad-buffering";_.Vb="ad-clicked";_.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";_.hc="ad-started";_.lc="ad-stopped";_.nc="ad-third-quartile";_.oc="addtrack";_.pc="ads-timeline-changed";
10
- _.qc="airplay-casting-ended";_.rc="airplay-casting-started";_.sc="airplay-status-changed";_.tc="application/cea-608";_.uc="application/dash+xml";vc="application/mp4";_.wc='application/mp4; codecs\x3d"stpp"';_.xc='application/mp4; codecs\x3d"wvtt"';_.yc="application/ttml+xml";_.zc="application/vnd.ms-sstr+xml";Ac="application/x-www-form-urlencoded";_.p="audio";_.Bc="audio/aac";_.Ec="audio/ac3";_.Fc="audio/eac3";_.Gc="audio/mp4";Hc='audio/mp4;codecs\x3d"mp4a.40.2"';_.Ic="audiobufferchanged";_.Jc="audiotrackchanged";
11
- _.Kc="autoplaynotallowed";_.Lc="bitratechanged";_.Mc="boolean";_.Nc="bufferingended";_.Oc="bufferingstarted";Pc="canplay";Qc="canplaythrough";_.Rc="castingstarted";_.Sc="caststatuschanged";_.Tc="cdn-switch-success";_.Uc="cenc";_.Vc="center";Wc="certificate-request";Xc="change";Yc="chrome";_.Zc="clpp-fill";$c="clpp-hidden";ad="clpp-mc-playlist";bd="clpp-visible";cd="clpp.PlayerFleet";_.dd="clpp.cast.CastSender";ed="clpp.drm.HeaderDrm";hd="clpp.drm.eme.AppleEmeManager";id="clpp.drm.eme.EmeFactory";
12
- jd="clpp.native.Player";kd="clpp.plist.McPlaylist";ld="clpp.utils.Platform";_.md="codecs";_.nd="column-reverse";_.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="content-steering-change";_.wd="content-steering-location-ban-update";xd="controls";_.yd="cuechange";_.zd="decoder";_.Ad="destroy()";_.Bd="disabled";_.Cd="div";
13
- Dd="drm.mediaKeys.end";Ed="drm.mediaKeys.start";Fd="drm.onPlay.end";Gd="drm.onPlay.start";_.Hd="drmexpirationupdate";Id="drmlicenserequested";Jd="drmrenewalstarted";Kd="drmsessioncreated";_.Ld="drmsessionpersisted";_.Md="drmsessionupdate";Nd="drmtoday";Od="durationchange";_.Pd="ec-3";Qd="encrypted";_.Rd="end";_.Sd="ended";_.r="error";_.Td="estimatedThroughputKbps";_.Ud="forced";Vd="fullscreenElement";_.Wd="function";_.Zd="height";_.$d="hidden";_.ae="html";_.be="https://";_.ce="image";_.de="internal-error";
14
- ee="keystatuseschange";_.fe="left";ge="license-renewal";he="license-request";_.ie="line-left";_.je="line-right";_.ke="live-turned-static";_.le="load";_.me="loadeddata";_.ne="loadedmetadata";oe="loadstart";_.pe="main";_.qe="mdat";_.re="mdia";_.se="message";_.ue="metadata";_.ve="mimeType";_.ze="minf";_.Ae="moov";_.Be="mpd-type-changed";_.Ce="mpeg-dash-callback-event";_.De="none";_.t="number";_.Ee="object";_.Fe="onBitrateChanged()";_.Ge="onContentLoaded";_.He="onPlayerError()";_.Ie="onPlayerWillDestroy";
15
- _.Je="onPlayerWillRelease";_.Ke="onStateChanged()";Le="online-status-changed";_.Me="optional";_.Ne="org.w3.clearkey";_.Oe="output-restricted";_.Pe="pause";_.Qe="persistent";_.Re="persistent-license";Se="picture-in-picture";_.Te="play";Ue="player.afterLoad.end";Ve="player.afterLoad.start";We="player.appendLoad.end";Xe="player.appendLoad.start";Ye="player.beforeLoad.end";Ze="player.beforeLoad.start";$e="player.load.end";af="player.load.start";bf="player.setupPlaylist.end";cf="player.setupPlaylist.start";
16
- _.df="playing";_.ef="playlist-item-changed";_.ff="playlist-modified";gf="playlist.next.end";hf="playlist.next.start";jf="preload-aborted";kf="preload-failed";lf="preloaded";mf="preloading";_.nf="prevent";of="primary-content";_.pf="progress";_.qf="px";_.rf="ratechange";tf="released";_.uf="releasing";vf="removetrack";_.wf="required";_.xf="resize";_.yf="right";_.zf="sc-playlist-ended";_.Af="sc-playlist-item-changed";_.Bf="sc-playlist-live-turned-static";_.Cf="sc-playlist-timeline-changed";_.Df="seeked";
17
- _.Ef="seeking";_.Ff="showing";_.Gf="simid-creative-started";_.Hf="simid-creative-stopped";_.If="sinf";_.Jf="smooth";Kf="stalled";_.Lf="start";_.Mf="statechanged";Nf="status-pending";_.Of="stbl";_.Pf="string";_.Qf="stsd";_.Rf="style";_.Sf="subtitles-htmlcue";Tf="temporary";_.Uf="text/vtt";_.Vf="text/xml";_.Wf="texttrackchanged";_.Xf="timeline-cue-added";_.Yf="timeline-cue-enter";_.Zf="timeline-cue-exit";_.$f="timeline-cues-changed";_.ag="timeupdate";_.bg="tracksadded";_.cg="trak";_.dg="ttml-xml";
18
- eg="unauthenticated";_.fg="und";_.gg="unknown";hg="update";_.ig="urn:scte:scte35";_.jg="urn:scte:scte35:2014";_.kg="user-seeked";_.lg="user-seeking";_.mg="value";ng="version";_.og="vertical-lr";_.pg="vertical-rl";_.w="video";_.qg="video/mp2t";_.rg="video/mp4";_.sg="videobufferchanged";_.tg="videotrackchanged";_.ug="vimond-response";yg="visibilitychange";_.zg="vtt-xml";_.Ag="waiting";_.Bg="waitingforkey";Cg="webkit-org.w3.clearkey";Dg="webkitkeyadded";Eg="webkitkeyerror";Fg="webkitkeymessage";Gg="webkitneedkey";
19
- _.Hg="width";Ig="x-dt-csl-tracking-token";Jg="x-dt-follow-up-token";Kg="x-dt-resp-code";_.Lg="yospace-session-ended";_.Mg="yospace-session-started";_.Pg=function(a){return function(){return _.Og[a].apply(this,arguments)}};Qg=function(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}};Rg=function(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:Qg(a)}};
20
- Ug=function(a,b){if(b){var c=Sg;a=a.split(".");for(var d=0;d<a.length-1;d++){var e=a[d];e in c||(c[e]={});c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&Tg(c,a,{configurable:!0,writable:!0,value:b})}};Vg=function(a){function b(d){return a.next(d)}function c(d){return a.throw(d)}return new Promise(function(d,e){function f(g){g.done?d(g.value):Promise.resolve(g.value).then(b,c).then(f,e)}f(a.next())})};_.x=function(a){return Vg(a())};
21
- _.z=function(a,b){a=a.split(".");var c=Wg;a[0]in c||"undefined"==typeof c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)a.length||void 0===b?c[d]&&c[d]!==Object.prototype[d]?c=c[d]:c=c[d]={}:c[d]=b};_.Zg=function(a){return _.B(a)||Xg(a)?a:_.Yg(a)};_.Yg=function(...a){let b={};for(let c=0;c<a.length;c++)null!=a[c]&&(b=$g(b,{merging:a[c]},1));return b.merging||null};_.ah=function(a){for(const b in a)if(void 0!==a[b])return!0;return!1};
22
- $g=function(a,b,c){const d=c+1;if(_.B(a)||!_.bh(a))a={};for(const e in b)c=b[e],Xg(c)||_.B(c)||_.ch(c)||c instanceof Element?a[e]=c:_.bh(c)&&c.buffer&&c.buffer instanceof ArrayBuffer&&_.ch(c.subarray)?a[e]=c.subarray(0):c instanceof Array?a[e]=$g([],c,d):!_.B(c)&&_.dh(c)&&20>d&&(a[e]=$g(a[e],c,d));return a};Xg=function(a){a=typeof a;return a===_.Pf||a===_.t||a===_.Mc};_.B=function(a){return null===a||"undefined"===typeof a};_.bh=function(a){return typeof a===_.Ee};
23
- _.ch=function(a){return typeof a===_.Wd};_.eh=function(a){return typeof a===_.Pf};_.fh=function(a){return typeof a===_.t};_.dh=function(a){if(_.B(a)||!_.bh(a))return!1;a=Object.getPrototypeOf(a);return a===Object.prototype||null===a};
24
- _.gh=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||!_.bh(a)||!_.bh(b))return!1;const e=c||Object.keys(a),f={};for(let g=0;g<e.length;g++){const h=e[g];if(_.B(d)||0>d.indexOf(h))if(f[h]=!0,a[h]!==b[h])return!1}if(_.B(c))for(a=Object.keys(b),b=0;b<a.length;b++)if(c=a[b],(_.B(d)||0>d.indexOf(c))&&!f[c])return!1;return!0};
25
- hh=function(a){return(Number.hasOwnProperty("isNaN")?Number.isNaN:b=>b!==b)(a)};ih=function(a){const b=new Map;for(const c of Object.keys(a))b.set(c,a[c]);return b};_.jh=function(a){const b={};a.forEach((c,d)=>{b[d]=c});return b};kh=function(a,b){b=b.toLowerCase();for(const [c,d]of Object.entries(a))if(c.toLowerCase()===b)return d;return null};nh=function(a){return a&&0<=lh[a]?lh[a]:mh};
26
- ph=function(a){if(!a)return _.C("clpp.log",vb+a+ca),-1;const b=oh[a.toUpperCase()];return void 0===b?(_.C("clpp.log",vb+a+ca),-1):b};_.rh=function(a){qh.info.apply(qh,arguments)};_.sh=function(a){qh.debug.apply(qh,arguments)};_.C=function(a){qh.warn.apply(qh,arguments)};_.th=function(a){qh.error.apply(qh,arguments)};_.wh=function(a){if(a){var b=a.a();b in _.uh?_.vh.warn("Player-Factory '"+b+"' already registered"):(_.uh[b]=a,_.vh.info("Registered Player-Factory: '"+b+"'"))}};
27
- xh=function(a){return Object.values(_.uh).find(a)||null};yh=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};zh=function(a){return 0>=a?Promise.resolve():new Promise(b=>{setTimeout(()=>{b()},1E3*a)})};Ch=function(a,b){return _.x(function*(){yield Ah(a,()=>Promise.all(Bh(a).map(b)))})};Dh=function(a,b){_.x(function*(){yield Ah(a,()=>Promise.all(a.f.filter(c=>null!=c.getLoadedSource()).map(b)))})};
28
- Bh=function(a){return[a.zc,...a.f].filter(b=>null!=b)};Ah=function(a,b){return _.x(function*(){a.a&&(yield a.a);a.a=b().then(()=>{a.a=null})})};_.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=[Qd,"msneedkey",Gg,"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};
29
- Ih=function(a){return Hh(a).filter(b=>b.type===qd&&!b.We)};Jh=function(a){a.forEach(b=>{b.We=!0})};Nh=function(a,b){a=a.map(c=>({startTime:c.startTime,endTime:c.endTime,key:c.value.key,value:c.value.data,ig:!1}));a=Kh(a);b&&(a=Lh(a));return new Set(Mh(a))};Hh=function(a){const b=[];for(const c of a)b.push(c);return b};
30
- Oh=function(a,b){const c=a.endTime-a.startTime,d=b.endTime-b.startTime,e=a.Rf||a.startTime,f=b.Rf||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};Mh=function(a){const b=[];for(const c of a)(a=b.find(d=>d.startTime===c.startTime&&d.endTime===c.endTime))?Ph(c,a):(a=Qh(c),b.push(a));return b};
31
- Ph=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=_.jg,b.type=_.Rh};Qh=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:_.Sh,eventElement:null};Ph(a,b);return b};
32
- Kh=function(a){const b=new Set(a),c=new Set(a.filter(d=>"SCTE35-OUT"===d.key).map(Th));a.filter(d=>"SCTE35-IN"===d.key).forEach(d=>{c.has(Th(d))||(d.ig=!0)});return Array.from(b.values())};Lh=function(a){a.forEach(b=>{b.ig&&(b.endTime=b.startTime,b.startTime=0)});return a};Th=function(a){return`${a.startTime}-${a.endTime}`};
33
- $h=function(a,b){a.g.debug("onMetadataTrackAdded_()");b.mode=_.$d;var c=!b.cues||0===b.cues.length;if(a.m.isLive()||!c){var d=b.cues;c=Ih(d);Jh(c);a.a=Nh(c,a.l);0<a.a.size&&(Uh(a,a.a),a.m.trigger(new _.F(_.$f)));a.j.on(b,_.yd,()=>{{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)){e=g.startTime;var k=e+.5;e=e<=h&&h<=k}e&&(f.f.add(g),f.m.trigger(new _.F(_.Yf,{detail:g})))}else h=g.startTime<=h&&h<=g.endTime,!h&&f.f.has(g)?(f.f.delete(g),f.m.trigger(new _.F(_.Zf,
34
- {detail:g}))):h&&!f.f.has(g)&&(f.f.add(g),f.m.trigger(new _.F(_.Yf,{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);Xh(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;Yh(a,b);f=Ih(d);var k=Nh(f,a.l);g=new Set;h=!1;for(l of k)(k=Zh(a,l))?(l.customAttributes&&(k.customAttributes=_.Yg(k.customAttributes||{},l.customAttributes)||
35
- void 0),h=!0):(a.a.add(l),g.add(l));var l={ai:g,$g:0<g.size||h};const {ai:m,$g:n}=l;Jh(f);(e||n)&&a.m.trigger(new _.F(_.$f));Uh(a,m)},6E3))}};ai=function(a,b){a.j.on(b,_.oc,c=>{c=c.track;c.kind===_.ue&&$h(a,c)})};Uh=function(a,b){for(const c of b)a.m.trigger(new _.F(_.Xf,{detail:c}))};Zh=function(a,b){return Array.from(a.a.values()).find(c=>b.startTime===c.startTime&&b.endTime===c.endTime)||null};
36
- Yh=function(a,b){if(b.cues){var c=Hh(b.cues).filter(f=>f.type===qd),d=c.filter(f=>f.We);c=c.filter(f=>!f.We);var e=[];for(const f of c)for(const g of d)Oh(f,g)&&(e.push(f),g.Rf=f.startTime);Xh(a,b,e);0<e.length&&a.g.debug(`Removed ${e.length} duplicated cues.`)}};Xh=function(a,b,c){for(const d of c)try{b.removeCue(d)}catch(e){a.g.debug("Failed to remove cue",d,e)}};_.bi=function(a){return Array.isArray(a)?a:[a]};ci=function(a,b){return a===b?!0:a.length===b.length&&a.every((c,d)=>c===b[d])};
37
- ei=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 di(a,b)&&di(b,a)};di=function(a,b){const c=new Set(a);return b.every(d=>c.has(d))};_.fi=function(a,b={}){if(b.Pf){const c=[];for(const d of a)c.some(e=>b.Pf(d,e))||c.push(d);return c}return Array.from((new Set(a)).values())};gi=function(a,b){const c=new Set(a),d=new Set(b);return{oi:a.filter(e=>!d.has(e)),lj:a.filter(e=>d.has(e)),Xg:b.filter(e=>!c.has(e))}};
38
- hi=function(a,b){b=b.track;b.kind!==_.ue&&(b.mode===_.Ff&&(b.mode=_.$d),a.a.on(b,_.yd,c=>{c=c.target||c.srcElement;c.mode=_.$d;c.activeCues&&(c=Array.from(c.activeCues).map(a.o),a.l.append(c,[]))}))};ii=function(a,b,c,d){a=`${a===_.G?"FATAL":"RECOVERABLE"} Clpp-Error [Category ${b} - Code ${c}]`;if(_.eh(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};
39
- ji=function(a,b){const c=b||ci;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)}};_.ki=function(a){return null!=a};mi=function(...a){for(let b=0;b<a.length;b++){const c=a[b];if(null!==c&&void 0!==c)return c}throw new _.li("No non-null, non-undefined value found");};ni=function(...a){for(let b=0;b<a.length;b++){const c=a[b];if(null!==c&&void 0!==c)return c}};
40
- _.oi=function(a){var b;a instanceof _.oi?(pi(this,a.xb),this.Dc=a.Dc,this.Ya=a.Ya,qi(this,a.Yc),this.Ga=a.Ga,_.ri(this,si(a.a)),this.tc=a.tc):a&&(b=String(a).match(ti))?(pi(this,b[1]||"",!0),this.Dc=ui(b[2]||""),this.Ya=ui(b[3]||"",!0),qi(this,b[4]),this.Ga=ui(b[5]||"",!0),_.ri(this,b[6]||"",!0),this.tc=ui(b[7]||"")):this.a=new _.vi(null)};pi=function(a,b,c){a.xb=c?ui(b,!0):b;a.xb&&(a.xb=a.xb.replace(/:$/,""))};
41
- qi=function(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.Yc=b}else a.Yc=null};_.ri=function(a,b,c){b instanceof _.vi?a.a=b:(c||(b=wi(b,xi)),a.a=new _.vi(b))};ui=function(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""};wi=function(a,b,c){return typeof a===_.Pf?(a=encodeURI(a).replace(b,yi),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null};yi=function(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)};_.vi=function(a){this.f=a||null};
42
- si=function(a){var b=new _.vi;b.f=a.f;if(a.a){var c={},d;for(d in a.a)c[d]=a.a[d].concat();b.a=c;b.h=a.h}return b};Ai=function(a,b){const c=zi[a];for(const d of c)for(const e of b)if(d.test(e.trim()))return e.trim();return a===_.H?"":null};_.J=function(a,b,c,d){d=void 0===d?{}:d;a=a.getAttribute(b);if(!a&&d.required)throw new _.I(_.G,4,4023,`Required attribute missing: ${b}`);return a?a.value:c||null};_.Bi=function(a){return"com.apple.hls.interstitial"===a||"com.apple.hls.overlay"===a};
43
- _.Di=function(a){var b=(a||"").split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=Ci.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a};_.Ei=function(a,b){a=_.Di(a);b=_.Di(b);return a.split("-")[0]===b.split("-")[0]};Fi=function(a){return a.reduce((b,c)=>b+c,0)};_.Gi=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};
44
- _.Hi=function(a,b){for(const c of a)if(!b(c))return!1;return!0};Ii=function*(a){for(let b=0;b<a;b++)yield b};Ki=function(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!==b.byteLength)return!1;if(Ji(a)===Ji(b)&&(a.byteOffset||0)===(b.byteOffset||0))return!0;const c=_.K(a);b=_.K(b);for(const d of Ii(a.byteLength))if(c[d]!==b[d])return!1;return!0};Ji=function(a){return a instanceof ArrayBuffer?a:a.buffer};_.K=function(a,b=0,c=Infinity){return Li(a,b,c,Uint8Array)};
45
- Li=function(a,b,c,d){const e=d.BYTES_PER_ELEMENT||1,f=Ji(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)};Mi=function(a,b=0,c=Infinity){return Li(a,b,c,Uint16Array)};Ni=function(a,b=0,c=Infinity){return Li(a,b,c,Uint32Array)};_.Oi=function(a,b=0,c=Infinity){return Li(a,b,c,Int32Array)};_.Pi=function(a,b=0,c=Infinity){return Li(a,b,c,DataView)};
46
- Qi=function(a){return a instanceof ArrayBuffer?a:0===a.byteOffset&&a.byteLength===a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer};Ri=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};
47
- _.Si=function(a){if(!a)return"";a=_.K(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(Ba);return a}a=escape(Ri(a));try{return decodeURIComponent(a)}catch(b){throw Error(Ba);}};
48
- Ui=function(a,b,c){if(!a)return"";if(!c&&0!==a.byteLength%2)throw Ti.error("Data has an incorrect length, must be even."),Error("Data does not seem to be UTF-16 encoded!");c=_.K(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(_.K(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 Ri(c)};
49
- _.Vi=function(a,b){if(_.eh(a))return a;let c="";b=!!b;const d=_.K(a);239===d[0]&&187===d[1]&&191===d[2]?c=_.Si(d):254===d[0]&&255===d[1]?c=Ui(d.subarray(2),!1):255===d[0]&&254===d[1]&&(c=Ui(d.subarray(2),!0));const e=function(f,g){return f.byteLength<=g||32<=f[g]&&126>=f[g]}.bind(null,d);Ti.debug("Unable to find byte-order-mark, making an educated guess.");0===d[0]&&0===d[2]?c=Ui(a,!1):0===d[1]&&0===d[3]?c=Ui(a,!0):e(0)&&e(1)&&e(2)&&e(3)&&(c=_.Si(a));if(c)return b&&(c=escape(c)),c;throw Error("Unable to detect text encoding");
50
- };_.Wi=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};_.Xi=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};
51
- _.Yi=function(a,b){var c=b||1;b=a.length;const d=new ArrayBuffer(b*c);let e;4===c?e=Ni(d):2===c?e=Mi(d):e=_.K(d);for(c=0;c<b;c++)e[c]=a.charCodeAt(c);return d};_.Zi=function(a,b){return String.prototype.startsWith?a.startsWith(b):0===a.indexOf(b)};_.$i=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};_.aj=function(a){return!!(a&&0<a.length)};_.bj=function(a){return!a||0===a.length};
52
- _.cj=function(a){if(void 0===a||null===a||""===a)return"";try{let b=Number(a);if(hh(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""}};_.ej=function(a){a=a.replace(/<[^>]+>/gi,"");dj.innerHTML=a;a=dj.textContent;return a=a.replace(/<[^>]+>/gi,"")};_.fj=function(a){return`${a.scheme}//`+`${a.a}${a.port?":"+a.port:""}${a.path}${a.h}${a.f}`};
53
- _.gj=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)},""):""};_.hj=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};
54
- _.ij=function(a,b){if(a.startsWith("http://")||a.startsWith(_.be))return a;b=new URL(b);b.search="";return(new URL(a,b)).toString()};_.mj=function(a,b){var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new _.I(_.G,4,4016,{invalidTag:b});b=c[1];var d=c[2];c=[];let e;if(d){d=new _.jj(d);var f;(f=_.Gi(d,/^([^,=]+)(?:,|$)/g))&&f[1]&&(e=f[1].trim());const g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;for(;f=_.Gi(d,g);)c.push(new _.kj(f[1],f[2]||f[3]||""))}return new _.lj(a,b,c,e)};
55
- _.oj=function(){return{maxAttempts:1,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:0,fatalStatusCodes:[...nj]}};pj=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||[...nj]};qj=function(a){const b={};a.forEach((c,d)=>{b[d.trim()]=c});return b};
56
- _.sj=function(a,b){_.eh(a)&&(a={uris:[a]});Array.isArray(a)&&(a={uris:a});const c={uris:a.uris||[],type:a.type||_.rj,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||
57
- [],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:[...nj],requestStartTimestamp:null};a.keyInfo&&(c.keyInfo=a.keyInfo);b&&pj(c,b);return c};
58
- _.wj=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(tj(c))return uj(a);throw vj(a);};tj=function(a){return 200<=a&&299>=a&&202!==a};uj=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}};
59
- vj=function(a){a=uj(a);try{var b=_.Vi(a.data,!0)}catch(d){b=null}_.sh("HTTP error text:",b);const c=a.request;return new _.I(0<=(c?c.fatalStatusCodes||[]:[]).indexOf(a.status)?_.G:1,1,1001,{url:a.uri,status:a.status,responseText:b,headers:a.headers,request:a.request,response:a})};xj=function(a,b){b=parseInt(b,10);Number.isNaN(b)&&(b=-1);a.bytesTotal=b;a.bytesLoaded=0;a.bytesRemaining=b};yj=function(a,b,c){0<a.bytesRemaining&&(a.bytesRemaining-=b);a.bytesLoaded+=b;if(a.onProgress)a.onProgress(b,c)};
60
- zj=function(a,b,c){if(0>=a)return Promise.resolve();const d=8*c/a-b/1E3;return 0<d?new Promise(e=>{setTimeout(e,1E3*d)}):Promise.resolve()};Aj=function(a,b){a.T.then(()=>b(!0),()=>b(!1));return a};_.Bj=function(a,b){a.a.push(Aj(b,()=>{{var c=a.a;const d=c.indexOf(b);-1<d&&c.splice(d,1)}}))};Cj=function(a,b){return _.x(function*(){const c=yield a.fetch(b);return _.Si(c.data).replace(/\r\n|\r(?=[^\n]|$)/gm,"\n")})};
61
- Dj=function(a,b){return _.x(function*(){const c=yield Cj(a,b);if(!c)return null;try{const d=JSON.parse(c);if(null==d||typeof d!==_.Ee)throw Error("Not an object");return d}catch(d){throw new _.li("Failed to parse JSON response","json-failed");}})};
62
- Kj=function(a,b){if(a.A)return new Gj(Promise.reject(new _.I(1,1,7001,{url:b.uris[b.uriIndex],request:b})));a.o&&0<a.o&&(b.rateLimitBps=a.o);var c=[];for(const g of a.h)c.push(g);if(b.requestModifiers)for(const g of b.requestModifiers)c.push(g);b.requestModifiers=c;Hj(a,b);c=[];for(var d of a.j)c.push(d);if(b.responseModifiers)for(var e of b.responseModifiers)c.push(e);b.responseModifiers=c;let f;e=d=new _.Ij;try{const g=[{type:"public",modifiers:b.requestModifiers},{type:"internal",modifiers:a.f}];
63
- for(const h of g)for(const k of h.modifiers)e=e.then(l=>{if(f.a)throw new _.I(_.G,1,7001,l?{url:l.uris[l.uriIndex],request:l}:null);return"internal"===h.type?k(l,void 0)||l:k(l)||l}).catch(l=>{if(l instanceof _.I)throw l;throw new _.I(_.G,1,1006,null,l);});e=e.then(h=>({request:h,plugin:Jj(a,h)}));f=new Gj(e);for(const h of b.responseModifiers)f.then(k=>{const l=()=>{if(f.a)throw new _.I(_.G,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=>
64
- {if(k instanceof _.I&&k.data&&k.data.response){const l=h(k.data.response);if(l&&l.then)return l.then(()=>Promise.reject(k))}return Promise.reject(k)}).catch(k=>{if(k instanceof _.I)throw k;throw new _.I(_.G,1,1007,null,k);});for(const h of a.l)f.catch(k=>{k instanceof _.I&&k.data&&k.data.response||h({uri:b.uris[b.uriIndex],data:(new Uint8Array(0)).buffer,status:-1,timeMs:0,headers:{},request:b});return Promise.reject(k)}).catch(k=>{if(k instanceof _.I)throw k;throw new _.I(_.G,1,1007,null,k);});_.Bj(a.w,
65
- f);d.resolve(b);return f}catch(g){return new Gj(Promise.reject(g))}};Hj=function(a,b){for(const c of a.headers){const [d,e]=c;b.headers[d]||(b.headers[d]=e)}};Jj=function(a,b){const c=new _.oi(b.uris[b.uriIndex]);let d=c.xb;d||(d=location.protocol,d=d.slice(0,-1),pi(c,d),b.uris[b.uriIndex]=c.toString());const e=a.a[d];if(!e)throw new _.I(_.G,1,1E3,{url:c.toString()});return f=>e(f)};
66
- Lj=function(a,b,c,d){d=void 0===d?"HEAD":d;return _.x(function*(){if(!navigator.onLine)return!1;if(b){const e=_.sj(b,c);e.method=d;c||(e.timeout=5E3);e.headers["cache-control"]="no-cache";try{yield a.fetch(e).T}catch(f){if(1002===f.code||1003===f.code)return!1}}return!0})};Mj=function(a){return`@@scheme:${a.scheme||""}`+`@@value:${a.value}`+`@@id:${a.id||""}@@type:${a.type||""}`+`@@protocol:${a.protocol||""}`};_.Nj=function(a){return a&&a!==_.fg?a:null};
67
- Pj=function(a){if(!a)throw new _.I(_.G,3,3101,`Invalid track type: ${a}`);if(!_.eh(a))throw new _.I(_.G,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 Oj:return Oj}throw new _.I(_.G,3,3101,`Unknown track type: ${a}.`);};
68
- Sj=function(a,b){a=Pj(a);const c=_.Nj(b.kind);let d=b.id;d||(d=String(_.Qj++));a=new _.Rj(d,c===_.ue?Oj:a);a.kind=c;a.label=_.Nj(b.label);a.language=_.Nj(b.language);a.originalLanguage=b.originalLanguage||a.language;return a};Tj=function(a,b){return _.x(function*(){const c=_.sj(b);return yield Cj(a.f,c)})};
69
- Xj=function(a,b,c){return _.x(function*(){const {mimeType:d,renditions:e}=yield Uj(a,b,c),f=new _.Rj("dummy",_.N),g=e.map((h,k)=>{k=new _.Vj(`R${k}`,f);k.bandwidth=h.bandwidth;k.$c=h.$c;k.codec=h.codec;k.width=h.width;k.height=h.height;return k});Wj(g);return{renditions:g,mimeType:d||void 0}})};
70
- Zj=function(a){a=a.split("\n").filter(c=>c.trim().startsWith("#EXT-X-MEDIA:")).map(c=>Yj(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};Uj=function(a,b,c){return _.x(function*(){const d=ak(b),e=bk(b,c);return{mimeType:yield ck(a,e,d[0]?d[0].codec:null),renditions:d}})};
71
- Wj=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.");};Yj=function(a){const b=_.mj(0,a);a=d=>(d=b.getAttribute(d))?d.value:void 0;var c=a(_.sb);c=null!=c?{AUDIO:_.M,VIDEO:_.N,SUBTITLES:_.L}[c]:void 0;return{type:c,groupId:a(_.Fa),name:a(_.Ta),language:a(_.La),Wi:a("AUTOSELECT"),default:a("DEFAULT"),dj:a("FORCED"),Of:a("CHARACTERISTICS"),uri:a(_.ub)}};
72
- ak=function(a){return a.split("\n").filter(b=>b.trim().startsWith("#EXT-X-STREAM-INF:")).map(b=>{var c=_.mj(0,b);if(c.getAttribute(_.Cb))throw Error("Playlist contains alternative video streams.");var d=_.J(c,_.lb);b=d?Number(d.split("x")[0]):null;d=d?Number(d.split("x")[1]):null;var e=_.J(c,_.la);e=e?Number(e):null;var f=_.J(c,"AVERAGE-BANDWIDTH");f=f?Number(f):null;c=_.J(c,_.pa);c=_.dk(_.w,c?c.split(","):[]);return b={bandwidth:e,$c:f,codec:c,width:b,height:d,mimeType:null}})};
73
- bk=function(a,b){return(a=a.split("\n").filter(c=>c.trim().endsWith(".m3u8"))[0])?_.ij(a,b):null};ck=function(a,b,c){return _.x(function*(){if(!b||!c)return null;var d=yield Tj(a,b);d=[ek(d,b),fk(d,b)].filter(Boolean);return _.gk(d,_.w,c)})};ek=function(a,b){return(a=a.split("\n").find(c=>!c.startsWith("#")&&0<c.trim().length))?_.ij(a,b):null};fk=function(a,b){a=a.split("\n").find(c=>c.startsWith("#EXT-X-MAP:"));return a?(a=_.J(_.mj(0,a),_.ub))?_.ij(a,b):null:null};
74
- _.ik=function(a,b,c){for(const d of _.hk)if(d.probe(b,c))return d.create(a);return null};_.jk=function(a){a=_.hk.indexOf(a);0<=a&&_.hk.splice(a,1)};mk=function(a,b){var c=kk;lk.set(`${a.toLowerCase().split(";")[0]}-${c}`,{priority:c,plugin:b})};_.qk=function(a,b){var c=[nk,ok,pk,kk];for(const d of c)if(c=lk.get(`${a.toLowerCase().split(";")[0]}-${d}`)){const e=c.plugin(),f=e.isSupported(a,b);e.destroy();if(f)return c.plugin}return null};
75
- _.rk=function(a,b){b&&(a+=';codecs\x3d"'+b+'"');return a.replace(/\s/g,"")};_.sk=function(a){return a.split(";")[0]};_.tk=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(","):""};xk=function(){if(uk)return uk;vk||(vk=new _.wk(()=>{uk=null}));(uk=document.querySelector(_.w)||document.querySelector(_.p))||(uk=document.createElement(_.w));vk.la(1);return uk};_.yk=function(){return!!navigator.userAgent.match(/Edge?\//)};
76
- _.zk=function(a){return(navigator.userAgent||"").includes(a)};_.Ak=function(a){return _.zk("Tizen"+(a?" "+String(a):""))};Ck=function(a){const b={major:-1,name:_.gg};if(!a)return b;var c=a.replace(/_/g,".");b.name=c;c=c.split(".");1<=c.length&&(b.major=Bk(a,c[0]));2<=c.length&&(b.minor=Bk(a,c[1]));3<=c.length&&(b.patch=Bk(a,c[2]));4<=c.length&&(b.build=Bk(a,c[3]));return b};_.Dk=function(){return _.zk("Web0S")};_.Fk=function(){return _.Dk()&&79===_.Ek().major};
77
- _.Ek=function(){const a=Gk();const b=["ie","edge","opera","firefox","safari",Yc];var c=Hk();const d=Ik[c];for(let e=0,f=b.length;e<f;e++)if(c=d[b[e]]&&a.match(d[b[e]]))return Ck(c[1]);return Ck("")};_.Jk=function(){return _.zk("CrKey")};_.Kk=function(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!_.Ak()};_.Lk=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:_.Kk()&&1<navigator.maxTouchPoints};_.Mk=function(){return/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)};
78
- Bk=function(a,b){try{return parseInt(b,10)}catch(c){Nk.warn("Unable to parse version number for '"+b+"' from '"+a+"'")}return-1};Ok=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};
79
- Hk=function(){const a=Gk();if(!a)return Pk;var b=a.match(/^.+?(?=\))/);if(!b)return Pk;b=b[0];if(Ok(b,["iphone","ipad"]))return Qk;if(Ok(b,["android"]))return Rk;if(Ok(b,["macintosh"]))return Sk;if(Ok(b,["windows nt"]))return Tk;if(Ok(b,["tizen"]))return Uk;if(Ok(b,["web0s"]))return Vk;if(Ok(b,["linux"]))return Wk;Nk.warn("Unable to identify OS from user agent: "+a);return Pk};Gk=function(){let a=window.navigator.userAgent;return a=a.toLowerCase()};
80
- _.Yk=function(){var a=Hk();var b=Hk();var c=Ik[b];if(c){c=Gk().match(c.os_version)[1];c=Ck(c);if(b===Tk)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=Ck("");a:{c=Gk();const e=["ie","edge","opera","firefox","safari",Yc];var d=Hk();d=Ik[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=Xk}return{os:a,osVersion:b,browser:c,browserVersion:_.Ek()}};
81
- Zk=function(a,b,c){return a.type!==c?!1:void 0!==b.id&&null!==b.id&&""!==b.id?a.id===b.id:_.gh(a,{kind:_.Nj(b.kind),language:_.Nj(b.language),label:_.Nj(b.label)},["kind","language","label"])};$k=function(a){return a.enabled||a.selected||a.mode===_.Ff||a.mode===_.$d};bl=function(a,b,c){return al(a)&&b===_.N&&!!c.enableHlsVideoTrackInfo};
82
- dl=function(a,b,c){return _.x(function*(){var d=a.m.getLoadedSource();d&&a.j&&(d=yield a.j.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})))})};el=function(a,b,c){return al(a)&&(b===_.M||b===_.L)&&!!c.enableMetadata};
83
- fl=function(a,b,c){return _.x(function*(){var d=a.m.getLoadedSource();d&&a.j&&(d=yield a.j.a(d.url,c),d.Bc&&(d=d.Bc.get(`${b.type}:${b.label}`))&&d.Of&&(b.accessibility=d.Of.split(",").map(e=>e.trim()).map(e=>({value:e,type:b.type,protocol:"HLS"}))))})};gl=function(a,b){return a.h.filter(c=>c.type===b)};hl=function(a){(a=a.m.getTextDisplayer())&&a.remove(0,Infinity)};jl=function(a,b){if(a=il(a,b))a=Array.from(a),b===_.L&&(a=a.filter(c=>c.kind!==_.ue));return a};
84
- il=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}};kl=function(a,b){return(a=a.a.get(b)||null)&&a.renditions[0]};ll=function(a,b){return(a=a.l.get(b))&&a.renditions[0]};
85
- ml=function(a,b,c){const d=jl(a,b);if(c){if(void 0===a.h.find(f=>f.id===c.id))throw Error(`Unknown track with ID ${c.id} and type ${b}`);if(c.type!==b)throw Error(`Types mismatch for track ${c.type} and arg ${b}`);a.g.debug("Activate track type "+b+" with ID: "+c.id);if(d){a.l.set(b,c);let f;var e=!0;let g=!1;switch(b){case _.L:f="mode";e=_.Ff;g=_.Bd;break;case _.M:f="enabled";break;case _.N:f="selected"}if(f)for(const h of d)h[f]=Zk(c,h,c.type)?e:g}}else if(a.g.debug("Disable track type "+b),a.a.get(b)&&
86
- d&&b===_.L){for(e of d)e.mode=_.Bd;a.a.set(b,null)}b===_.M?a.m.trigger(new _.F(_.Jc)):b===_.L&&a.m.trigger(new _.F(_.Wf))};nl=function(a,b,c){if(a.m){var d=a.m.getSurface().getMedia();if(d){var e=document.createElement("track");e.id=c;e.kind=b.kind;e.srclang=b.language;b.label&&(e.label=b.label);e.src=_.bj(b.url)?URL.createObjectURL(new Blob([])):b.url;d.appendChild(e);a.I.push(e)}}};
87
- ol=function(a,b){return _.x(function*(){var c=a.m.getConfiguration(),d=_.ik(c,b.mimeType,_.Uf);if(d){c=_.sj(b.url);var e=yield a.m.getNetworkEngine().fetch(c).T;e&&e.data&&(c="External_"+`${a.G++}`,a.o[c]=b,d=d.a(_.K(e.data)),d={url:URL.createObjectURL(new Blob([d])),kind:b.kind,language:b.language,label:b.label,mimeType:_.Uf},nl(a,d,c))}else a.g.warn("Track MIME type is not supported",b)})};al=function(a){a=a.m.getLoadedSource();return!(!a||a.type!==_.pl&&!a.url.endsWith(".m3u8"))&&_.Kk()};
88
- ql=function(a,b,c){c=_.bi(c).filter(e=>e);a.g.info("Find preferred tracks for",b,c);const d=gl(a,b);c.some(e=>{const f=_.Di(e);return(e=d.find(g=>{g=_.Di(g.language||"");return _.Ei(f,g)}))?(a.g.info("Will select track with id",e.id),ml(a,b,e),!0):!1})};sl=function(a){return a.name===ab&&rl.some(b=>a.message.startsWith(b))};
89
- _.wl=function(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&_.Lk()&&(a=360);const b=_.oj();b.maxAttempts=3;a={source:"",license:tl,viewerId:void 0,autoplay:void 0,pauseWhenInBackground:!1,ads:{hls:{enable:!0,resolutionOffsetSec:35}},manifest:{attemptParameters:_.oj(),availabilityWindowOverride:NaN,clockSyncUri:"",ignoreDrmInfo:!1,xlinkFailGracefully:!1,autoCorrectDrift:!0,timeline:{version:1,type:void 0}},abr:{enabled:!0,defaultBandwidthEstimate:1E3,switchInterval:8,bandwidthUpgradeTarget:.85,
90
- bandwidthDowngradeTarget:.95,useSwitchIntervalForInitialSwitch:!1,restrictions:ul(a),useCmsd:!0},contentSteering:{enabled:!0,attemptParameters:_.oj()},drm:null,cmcd:{enabled:!1,version:1,rtpSafetyFactor:5},enableHtmlCue:!0,preferredAudioLanguage:"",preferredTextLanguage:"",preferredAudioRole:_.pe,preferredTextRole:"",preferredAudioChannelCount:2,preferredAudioCodec:[],preferredVideoCodec:[],preferSpatialAudio:!1,preferForcedSubtitles:!1,volume:null,startTime:null,loop:!1,lowLatencyMode:!1,suggestedPresentationDelay:void 0,
91
- muted:void 0,forceWaitForTracks:!1,xmlParser:_.vl,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,stallThreshold:3,stallSkip:.5,
92
- 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},mediaSource:{codecSwitchingStrategy:_.nf},restrictions:ul(),tizen:{sideStreamText:_.Ak(2)},safari:{enableHlsVideoTrackInfo:!1,enableMetadata:!1},mse:{sendPlaybackSessionIdHeader:!1},trickPlay:{speedUpMode:_.zd,preferTrickPlayTracks:!0},
93
- playlist:{timeline:"basic",content:_.Db,cropTimeline:!1},yospace:{enabled:!1},cmsd:{enabled:!0},mediatailor:{enabled:!1,sessionConfig:{}},disableRestrictions:!1};if(_.Ak()||_.Dk())a.ads.hls.enable=!1;if(_.zk("Edge/")||_.Ak())a.streaming.gapDetectionThreshold=.5;_.Dk()&&(a.streaming.stallEnabled=!1);_.Fk()&&(a.streaming.stallEnabled=!0,a.streaming.stallThreshold=1,a.streaming.stallSkip=1,a.streaming.gapDetectionThreshold=.02);_.Ak()&&(a.streaming.stallEnabled=!0,a.streaming.stallThreshold=1,a.streaming.stallSkip=
94
- 0);a.vr={enable:!1,attachMouseListener:!0,fieldOfView:70,sensitivity:1,invertHorizontalControl:!1,invertVerticalControl:!1};return a};ul=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}};
95
- _.yl=function(...a){if(!a)return _.wl();var b=[_.wl()];let c=!1;for(let d of a)null!==d&&void 0!==d&&(_.eh(d)&&(d={source:d}),d.lowLatencyMode&&!c&&(b.push({streaming:{rebufferingGoal:.1,bufferLimitUpdateInterval:.01,attemptParameters:{maxAttempts:3,baseDelay:250,backoffFactor:1}},abr:{bandwidthUpgradeTarget:.6,bandwidthDowngradeTarget:.95},manifest:{lowLatencyMode:!0}}),c=!0),b.push(d),null!=d.suggestedPresentationDelay&&b.push({manifest:{suggestedPresentationDelay:d.suggestedPresentationDelay}}));
96
- a=_.Yg.apply(null,b);_.eh(a.volume)&&(""===""+a.volume?a.volume=null:a.volume=Number(a.volume));if(!_.B(a.volume)&&(!_.fh(a.volume)||hh(a.volume)))throw new _.I(_.G,7,7100,"config.volume is not a number");if(!_.B(a.preferredTextLanguage)&&!_.eh(a.preferredTextLanguage)&&!Array.isArray(a.preferredTextLanguage))throw new _.I(_.G,7,7100,"config.preferredTextLanguage is not a string or an array");if(!_.B(a.preferredAudioLanguage)&&!_.eh(a.preferredAudioLanguage)&&!Array.isArray(a.preferredAudioLanguage))throw new _.I(_.G,
97
- 7,7100,"config.preferredAudioLanguage is not a string or an array");if(!_.B(a.preferredAudioCodec)&&!_.eh(a.preferredAudioCodec)&&!Array.isArray(a.preferredAudioCodec))throw new _.I(_.G,7,7100,"config.preferredAudioCodec is not a string or an array");if(!_.B(a.preferredVideoCodec)&&!_.eh(a.preferredVideoCodec)&&!Array.isArray(a.preferredVideoCodec))throw new _.I(_.G,7,7100,"config.preferredVideoCodec is not a string or an array");if(!_.B(a.drm)){if(a.drm.env&&!_.eh(a.drm.env))throw new _.I(_.G,7,
98
- 7100,"config.drm.env is not a string");if(a.drm.offlineId&&!_.eh(a.drm.offlineId))throw new _.I(_.G,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(!_.fh(b.bufferingGoal)||hh(b.bufferingGoal))throw new _.I(_.G,7,7100,"config.streaming.bufferingGoal is not a number");if(!_.fh(b.rebufferingGoal)||
99
- hh(b.rebufferingGoal))throw new _.I(_.G,7,7100,"config.streaming.rebufferingGoal is not a number");if(b.rebufferingGoal>b.bufferingGoal)throw new _.I(_.G,7,7100,"config.streaming.rebufferingGoal must be \x3e\x3d bufferingGoal");if(!_.fh(b.bufferBehind)||hh(b.bufferBehind))throw new _.I(_.G,7,7100,"config.streaming.bufferBehind is not a number");if(!_.fh(b.smallGapLimit)||hh(b.smallGapLimit))throw new _.I(_.G,7,7100,"config.streaming.smallGapLimit is not a number");if(!_.fh(b.durationBackoff)||hh(b.durationBackoff))throw new _.I(_.G,
100
- 7,7100,"config.streaming.durationBackoff is not a number");b=a.manifest;if(_.B(b.availabilityWindowOverride))b.availabilityWindowOverride=NaN;else if(typeof b.availabilityWindowOverride!==_.t)throw new _.I(_.G,7,7100,"Invalid value for |manifest.availabilityWindowOverride|");xl(a.restrictions);xl(a.abr.restrictions);a.abr.initialRestrictions&&xl(a.abr.initialRestrictions)}return a};
101
- xl=function(a){_.B(a.maxPixels)&&(a.maxPixels=Infinity);_.B(a.maxBandwidth)&&(a.maxBandwidth=Infinity);_.B(a.maxHeight)&&(a.maxHeight=Infinity);_.B(a.maxWidth)&&(a.maxWidth=Infinity);_.B(a.minPixels)&&(a.minPixels=0);_.B(a.minBandwidth)&&(a.minBandwidth=0);_.B(a.minHeight)&&(a.minHeight=0);_.B(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);
102
- 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 _.I(_.G,7,7100,"Restrictions contain NaN");};zl=function(a){return typeof a===_.Ee&&!Array.isArray(a)&&"source"in a};_.Bl=function(a){return _.Al.get(a)||null};
103
- _.Dl=function(a){_.Al.get(a.id())?Cl.warn("Component already in use."):_.Al.set(a.id(),a)};El=function(a){return Array.from(_.Al.values()).find(b=>b instanceof a)||null};Fl=function(a){for(const b of _.Al.values())a(b)};Gl=function(a){Fl(b=>{b.o(a)})};Hl=function(a){Fl(b=>{b.h(a)})};Il=function(){Fl(()=>{})};Jl=function(){Fl(()=>{})};Kl=function(a){if(null!==El(a))return null;a=new a;a.f();_.Dl(a);Cl.info("Installed component:",a.id());return a};
104
- Ll=function(a){if(a=El(a))a.a(),_.Al.delete(a.id()),Cl.info("Uninstalled component:",a.id())};_.Nl=function(a,b=!0){a=_.Ml(a).replace(/\+/g,"-").replace(/\//g,"_");return b?a:a.replace(/[=]*$/,"")};_.Ml=function(a){a=Ri(_.K(a));return btoa(a)};_.Ol=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};
105
- _.Pl=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};_.Ql=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};_.Rl=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};
106
- _.Sl=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};Tl=function(a,b){3===b.type&&(a.f&&(a.g.debug("Attaching tracking token"),b.headers[Ig]=a.f),a.a&&(b.headers[Jg]=a.a))};
107
- Ul=function(a,b){return b.request&&3===b.request.type&&(a.f=b.headers[Ig],a.a=b.headers[Jg],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(_.Si(_.Ol(b))),{delay:a.renewalPeriod,Si:{maxAttempts:a.retryCount,baseDelay:1E3*a.retryPeriod,backoffFactor:1,fuzzFactor:0,timeout:0}}):null};_.Wl=function(a){_.Vl[a.I]=a};
108
- _.Yl=function(a){const b={attemptParameters:_.oj(),enforceSingleSession:!1,delayLicenseRequestUntilPlayed:!1,enableSessionCacheForSkd:!1,ignoreUnrecognizedInitData:!0,Ja:{},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!==
109
- a.ignoreUnrecognizedInitData&&(b.ignoreUnrecognizedInitData=!!a.ignoreUnrecognizedInitData),typeof a.widevineVersion===_.Pf&&0<a.widevineVersion.length&&(b.widevineVersion=a.widevineVersion),a.env)){const c=_.Vl[a.env]||null;if(!c)throw _.sh(_.wa,_.ib+a.env+_.aa),new _.I(_.G,6,6015,`DRM environment '${a.env}' is missing.`);b.Ja=_.Xl(c,a.customData)||{};_.Zi(a.env.toLowerCase(),Nd)&&(b.enforceSingleSession=!0)}return b};
110
- $l=function(a){a=Zl[a];if(!a)return null;const b=_.Yk();return b.os===Rk&&4===b.osVersion.major&&4===b.osVersion.minor?null:new Uint8Array(a)};
111
- _.Xl=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;var g=a.f[_.td];if(g){var h=g.licenseUrl;d=ni(d,g.videoRobustness);e=ni(e,g.audioRobustness);var k=g.modifiers,l=mi(b?b.widevineDistinctiveIdentifierRequired:void 0,g.distinctiveIdentifierRequired,!1),m=mi(b?b.widevinePersistentStateRequired:void 0,g.persistentStateRequired,!1);g=void 0===f?g.serverCertificate:null===f?null:typeof f===_.Pf?$l(f):f;c[_.td]=
112
- {licenseUrl:h,videoRobustness:d,audioRobustness:e,modifiers:k,distinctiveIdentifierRequired:l,persistentStateRequired:m,serverCertificate:g}}(g=a.f[_.pd])&&(c[_.pd]={licenseUrl:g.licenseUrl,certificateUrl:g.certificateUrl,modifiers:g.modifiers});h=b?b.playReadyVideoRobustness:void 0;b=b?b.playReadyAudioRobustness:void 0;(g=a.f[_.rd])&&(c[_.rd]={licenseUrl:g.licenseUrl,videoRobustness:h||g.videoRobustness,audioRobustness:b||g.audioRobustness,individualizationServer:g.individualizationServer,useLegacySystem:g.useLegacySystem,
113
- modifiers:g.modifiers});return c};_.am=function(){throw new _.I(_.G,3,3E3);};_.bm=function(a,b,c){const d=c||0;c=b.byteLength-d;const e=_.K(a.f.buffer);b=_.K(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 _.I(_.G,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()}};
114
- _.fm=function(a){try{const b=a.f.getUint16(a.a,a.h);a.a+=2;return b}catch(b){_.dm()}};_.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 _.I(_.G,3,3001);a.a+=8;return c*Math.pow(2,32)+b};
115
- im=function(a,b){const c=new Uint8Array(b);for(let d=0;d<b;d++)c[d]=_.em(a);return c};_.jm=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 _.K(c)};km=function(a){let b=0;for(let c=0;c<a.length;c++)b=b<<8|a.charCodeAt(c);return b};_.lm=function(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)};_.mm=function(a){for(;_.cm(a.reader)&&!a.parser.a;)a.parser.le(a.start+a.headerSize,a.reader,a.partialOkay)};
116
- _.nm=function(a){for(let b=_.P(a.reader);0<b&&!a.parser.a;--b)a.parser.le(a.start+a.headerSize,a.reader,a.partialOkay)};_.om=function(a){return b=>{const c=b.reader.Pa()-b.reader.getPosition();a(_.jm(b.reader,c))}};_.pm=function(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)};qm=function(a){let b="";try{b=_.Vi(a)}catch(c){}return b};_.sm=function(a){a=qm(a);let b="";a.length&&(b=(new _.rm(a)).a);return b};
117
- um=function(a){if(!a)return null;let b=null;try{const c=JSON.parse(_.Si(a)),d=_.Ol(c.sinf[0]);(new _.tm).N(_.If,_.mm).N("schi",_.mm).N("tenc",e=>{e.reader.skip(6);_.em(e.reader)&&(e.reader.skip(1),b=_.Ql(_.jm(e.reader,16)));e.parser.stop()}).parse(d)}catch(c){}return b};
118
- wm=function(a,b,c){if(!c||!c.byteLength)throw new _.I(_.G,6,6102);let d;typeof b===_.Pf?d=_.Xi(b,!0):d=b;a=_.Xi(qm(a),!0);b=new _.vm(12+a.byteLength+d.byteLength+c.byteLength,!0);_.O(b,a.byteLength);_.bm(b,_.K(a));_.O(b,d.byteLength);_.bm(b,_.K(d));_.O(b,c.byteLength);_.bm(b,_.K(c));return _.K(b.buffer)};_.xm=function(a){var b=_.K(a.body);b=_.Nl(b);a.headers[va]=Ac;a.body=_.Wi("spc\x3d"+b).buffer};
119
- _.ym=function(a){let b;try{b=_.Si(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=Qi(_.Ol(b))};Dm=function(a,b){b=zm(b);if(a===_.td)return b+Am;if(a===_.rd)return b+Bm;if(a===_.pd)return b+Cm;throw Error("Unknown DRM Key-System '"+a+"'. Can not infer license URL!");};
120
- _.Gm=function(a,b,c,d){d=void 0===d?!0:d;c=a.drm;c&&c.env.startsWith(ya)?c.customData&&(_.Fm(b,a),a=b.uris[0],d&&c.customData.assetId&&(a+="?assetId\x3d"+encodeURI(`${c.customData.assetId}`),c.customData.variantId&&(a+="\x26variantId\x3d"+encodeURI(`${c.customData.variantId}`)),b.uris[0]=a)):Em.warn(Ua)};
121
- _.Hm=function(a,b){try{const c=_.K(b.data),d=JSON.parse(String.fromCharCode.apply(null,c));Em.debug("Widevine License response",d);const e=atob(d.license),f=new Uint8Array(e.length);for(a=0;a<e.length;++a)f[a]=e.charCodeAt(a);b.data=f.buffer}catch(c){Em.debug("Unable to parse DRMtoday response JSON, assuming the response contained raw data")}};
122
- _.Jm=function(a,b,c){var d=c&&c.customData&&c.customData.fpsContentId;_.Gm(a,b,c,!1);b.headers[va]=Ac;c={spc:_.Ml(b.body)};if((a=a.drm)&&a.env.startsWith(za)&&d){a={};var e=_.hj((new _.rm(Im(d))).f);d=e.keyId;if(e=e.assetId)Em.info("Applying assetId from HLS manifest."),a.assetId=e;d&&(Em.info("Applying keyId from HLS manifest."),a.keyId=d);d=a;d.keyId&&(Em.info("Adding keyID to FPS payload:",d.keyId),c.keyId=d.keyId);d.assetId&&(Em.info("Adding assetID to FPS payload:",d.assetId),c.assetId=d.assetId)}b.body=
123
- _.Yi(_.gj(c,!0))};_.Km=function(a,b){Em.debug("Clearing response data");200===b.status&&(a=_.Si(b.data).trim(),"\x3cckc\x3e"===a.substr(0,5)&&"\x3c/ckc\x3e"===a.substr(-6)&&(a=a.slice(5,-6)),b.data=_.Ol(a).buffer)};
124
- _.Lm=function(a,b,c){b=qm(b);c=c&&c.customData?c.customData:{};b=new _.rm(Im(b));const d=_.hj(b.f);if(a&&a.drm&&a.drm.customData){var e=a.drm.customData;a=e.assetId;e=e.variantId;a&&_.aj(`${a}`)&&(d.assetId=a,Em.debug("Using assetId from the configuration instead of the value from the HLS manifest."));e&&_.aj(`${e}`)&&(d.variantId=e,Em.info("Using variantId from the configuration instead of the value from the HLS manifest."))}d.keyId?(a=["keyId"],Em.debug("KeyId found in FPS SKD. Removing other parameters")):
125
- a=["assetId","variantId"];b.f=_.gj(d,!1,a);"/"!==b.path||b.j.includes(`${b.a}/`)||(b.path="");b=_.fj(b);return c.fpsContentId=b};_.Pm=function(a,b){a=a.drm;if(!a||!a.env.startsWith(ya))Em.warn(Ua);else if(a.customData&&a.customData.merchant&&!a.env.startsWith(za)){const c=new _.oi(b.uris[0]);let d=c.Ga;d.endsWith("/")||(d+="/");d+=a.customData.merchant;c.Ga=d;b.uris[0]=c.toString()}};Qm=function(a,b,c){_.Gm(a,b,c);a=a.drm;a=!(!a||!a.offlineId);c=new _.oi(b.uris[0]);c.a.add(_.Qe,a);b.uris[0]=c.toString()};
126
- zm=function(a){if(a===Rm)return"https://lic.drmtoday.com";if(a===Sm)return"https://lic.staging.drmtoday.com";if(a===Tm)return"https://lic-demo.staging.drmtoday.com";if(a===Um)return"https://lic.test.drmtoday.com";throw Error("Unknown DRMtoday environment '"+a+"'. Can not infer DRMtoday base URL!");};Im=function(a){a=a.replace(/assetid/gi,"assetId");a=a.replace(/variantid/gi,"variantId");return a=a.replace(/keyid/gi,"keyId")};
127
- _.Fm=function(a,b){if((b=b.drm)&&b.customData){var c={userId:b.customData.userId,sessionId:b.customData.sessionId,merchant:b.customData.merchant};_.ah(c)&&(a.headers["dt-custom-data"]=btoa(JSON.stringify(c)));(b=b.customData.authToken)&&(a.headers["x-dt-auth-token"]=b)}};Wm=function(a){const b={},c=a?a[Kg]:void 0;a=Vm[a?a[Kg]:void 0];c&&(b.drmTodayErrorCode=c);a&&(b.drmTodayErrorMessage=a);return b};
128
- Xm=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 Em.warn("Unable to parse DRMtoday License Info header (x-dt-li)",b),null}};Ym=function(a,b){a.size=void 0===b?0:1;a.g.debug("Setting key status to",b);a.a=b};$m=function(a,b,c,d){b===HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=Zm.value().get(b),c.one(a,b,d))};
129
- an=function(a,b){a.f=b;_.Fh(a.a);if(!b)return Promise.resolve();a.a.on(b,Qd,c=>{_.sh("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,Gg,c=>{{a.g.debug("Handle webkitNeedKey event");c=_.K(c.initData);if(_.Pi(c).getUint32(0,!0)+4!==c.byteLength)throw new RangeError("Malformed FairPlay init data");c=Ui(c.subarray(4),
130
- !0);c=_.Wi(c);const d=new Event(Qd);d.initDataType="skd";d.initData=Qi(c);a.f.dispatchEvent(d)}});$m(b,HTMLMediaElement.HAVE_METADATA,a.a,()=>b.webkitSetMediaKeys(a.h));return Promise.resolve()};bn=function(a,b){Ym(a.keyStatuses,b);b=new _.F(ee);a.dispatchEvent(b)};
131
- en=function(a,b){a.a=b;_.Fh(a.f);b&&(a.f.on(b,a.h+"needkey",c=>{{const d=new Event(Qd);d.initDataType=_.Uc;d.initData=Qi(c.initData);a.a.dispatchEvent(d)}}),a.f.on(b,a.h+"keymessage",c=>{{const e=cn(a,c.sessionId);if(e){var d=void 0===e.keyStatuses.getStatus();c=new _.F(_.se,{messageType:d?he:ge,message:c.message});d=e;_.sh("WebkitEmeManager.MediaKeySession.generated");d.f&&(d.f.resolve(),d.f=null);e.dispatchEvent(c)}else _.th("Session not found",c.sessionId)}}),a.f.on(b,a.h+"keyadded",c=>{(c=cn(a,
132
- c.sessionId))&&c.ready()}),a.f.on(b,a.h+"keyerror",c=>{var d=cn(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?dn(d,_.Oe):1===e?dn(d,"expired"):dn(d,_.de))}}}))};
133
- cn=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};dn=function(a,b){Ym(a.keyStatuses,b);b=new _.F(ee);a.dispatchEvent(b)};fn=function(a,b){return a.w?a.w+b.charAt(0).toUpperCase()+b.slice(1):b};
134
- gn=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===_.Re)if(c)d=_.K(_.Wi("LOAD_SESSION|"+c));else{const f=_.Wi("PERSISTENT|"),g=new Uint8Array(f.byteLength+b.byteLength);g.set(f,0);g.set(_.K(b),f.byteLength);d=g}else d=_.K(b)}catch(f){return Promise.reject(f)}a.f=new _.Ij;const e=fn(a,"generateKeyRequest");try{a.j[e](a.h,d)}catch(f){if(f.name!==Ka)return a.f=null,Promise.reject(f);(new _.wk(()=>{try{a.j[e](a.h,d)}catch(g){a.f.reject(g),
135
- a.f=null}})).la(.01)}return a.f};hn=function(a,b,c){if(a.a)a.a.then(()=>hn(a,b,c)).catch(()=>hn(a,b,c));else{a.a=b;if(a.h===Cg){var d=_.Si(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=_.Ol(e.keys[0].k);e=_.Ol(e.keys[0].kid)}else d=_.K(c),e=null;var f=fn(a,"addKey");try{a.j[f](a.h,d,e,a.sessionId)}catch(g){a.a.reject(g),a.a=null}}};
136
- ln=function(a,b){var c=jn;if(a){var d=c.find(e=>e.a()===a);if(d)return kn.info(Ib+d.a()),d.create();kn.info("Cannot create selected EME manager, falling back to the default.")}if(b&&(d=c.find(e=>e.a()===b)))return kn.info(Ib+d.a()),d.create();c=c[0];if(!c)throw Error("Missing EME managers.");kn.info(Ib+c.a());return c.create()};_.on=function(a){var b=_.Pl(a);b=parseInt(b.byteLength,10).toString(16);b=_.Pl("12"+b+a);return new mn(nn,a,b)};
137
- _.qn=function(a){const b=new _.pn(new DataView(a.buffer,a.byteOffset,a.byteLength),!1);a=_.P(b);var c=_.P(b);c=_.lm(c);var d=_.P(b);const e=d>>>24;d&=16777215;var f=_.jm(b,16);f=_.Ql(f);if(0<e){var g=_.P(b);b.skip(16*g)}g=_.P(b);const h=()=>{let u=_.em(b),v=(u&127)>>>0,y=7;for(;128<=u&&28>=y;)u=_.em(b),v=(v|(u&(28>y?127:15))<<y)>>>0,y+=7;return 28<y?-1:v},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());
138
- 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(),q=n&7;n>>>=3;if(2===q){q=h();if(0>q)throw Error(`unable to read length of field ${n}`);q=im(b,q);2===n?l.push(q):4===n&&(m=q)}else k(q)}_.sh("Parsed WV PSSH Box","size",a,"name",c,ng,e,"flags",d,"size",g,"systemId",f,"contentId (base64)",m?_.Ml(m):"","keyIds",l.map(u=>_.Ql(u)));return 0<l.length?_.on(_.Ql(l[0])):null};
139
- _.rn=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=_.K(a);a.set(b,0);return a};
140
- _.wn=function(a){var b=_.Q;a:{var c=new _.pn(new DataView(a.buffer),!0);_.P(c);for(_.fm(c);_.cm(c);)if(1===_.fm(c)){var d=_.fm(c);c=_.jm(c,d);break a}c=null}c||(c=a);a=Ui(c,!0);d=b.j(a,"WRMHEADER");a=d.getAttribute(ng)||"";d=b.h(d,"DATA");var e=b.h(d,"LA_URL");b=e?b.f(e):"";var f=_.Q;if(e=f.h(d,"KID"))if(e=f.f(e)){var g=f.h(d,na);f=g?f.f(g):null;e={value:e,Ae:f}}else e=null;else e=null;d=e?[e]:(e=sn(d))?[e]:(d=tn(d))?d:null;const {value:h="",Ae:k}=d&&d[0]||{};d=_.Ol(h);d=_.rn(d);d=_.Ql(d);return new _.un(_.vn,
141
- d,b,c,a,k)};sn=function(a){var b=_.Q;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(na);c=c.getAttribute("ALGID");return{value:b,Ae:a,Yg:c}};
142
- tn=function(a){var b=_.Q;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(na),e=c.getAttribute("ALGID");b.push({value:a,Ae:d,Yg:e})}return b.length?b:null};_.yn=function(a){xn&&performance.mark(a)};_.An=function(a,b,c){xn&&(b=performance.measure(a,b,c),null!=b&&zn.info(`Step: "${a}" took ${b.duration.toFixed(0)} ms.`))};
143
- Bn=function(a){return _.x(function*(){const b=new Promise(c=>{(new _.wk(c)).la(1)});(yield Promise.race([a.close().then(()=>!0),b.then(()=>!1)]))||_.C("Timeout waiting for session close")})};_.Dn=function(a){return Cn(a)?_.rd:a};En=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};
144
- Fn=function(a,b){b=b[_.Dn(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))};
145
- _.Gn=function(a,b){b=_.rk(a.mimeType,b||a.codecs);if(_.qk(b,a.type)){a=a.type;var c=_.qk(b,a);c&&(c=c(),b=c.convertCodecs(a,b),c.destroy())}return b};Hn=function(a){for(const b of a.audioCapabilities||[])delete b.robustness;for(const b of a.videoCapabilities||[])delete b.robustness};Jn=function(a){return(a.audioCapabilities||[]).some(In)||(a.videoCapabilities||[]).some(In)};
146
- Kn=function(a,b){a=_.sm(b);_.sh("Using default Content ID extractor. The hostname part from HLS #EXT-X-KEY:URI skd:// will be used.","Extracted Content ID: "+a);return a};
147
- Mn=function(a){var {playerConfig:b,initData:c,initDataType:d,drmInfo:e,drmSystemConfig:f,sessionContext:g,emeApi:h}=a;if("skd"===d&&h===Ln){a=e.serverCertificate;let k=f&&f.modifiers&&f.modifiers.extractContentId;_.ch(k)||(k=Kn);let l="";try{l=k(b,c,g)}catch(m){throw new _.I(_.G,6,6103);}if(!l.length)throw new _.I(_.G,6,6101,"Content ID is an empty string");c=wm(c,l,a)}return c};Cn=function(a){return!!a.match(/^com\.(microsoft|chromecast)\.playready/)};
148
- In=function(a){return null!=a.robustness&&""!==a.robustness};Nn=function(a,b,c,d,e){for(const f of a){b.includes(f.licenseServerUri)||b.push(f.licenseServerUri);f.serverCertificate&&(c.some(g=>_.Rl(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])}};
149
- On=function(a){var b=a.o;const c=a.ba;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 _.I(_.G,6,6014));a.D.Te(_.jh(c));a.A||a.g.info(xa);a.A=!0;a.F=!1};Pn=function(a){a.h.forEach((b,c)=>{const d=b.Oe;let e=c.expiration;isNaN(e)&&(e=Infinity);e!==d&&(a.D.Se(c.sessionId,e),b.Oe=e)})};
150
- Qn=function(a){return _.x(function*(){a.B.release();a.B=null;a.M.release();a.M=null;a.A=!1;a.F=!1;a.H.reject();a.da.stop();a.da=null;a.V.stop();a.V=null;const b=Array.from(a.h.keys());for(const c of a.h.values())c.Lc&&c.Lc.stop();a.h.clear();yield Promise.all(b.map(c=>Promise.resolve().then(()=>_.x(function*(){a.g.debug("Closing session",c.sessionId);try{yield Bn(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",
151
- 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})};_.Wn=function(a,b){const c=Rn(a,b),d=Sn(b);for(const e of d)Tn(a,e,a.f.Ja);b=Un(a,b);if(!b.size)return a.S=!0,Promise.resolve();_.yn(Ed);a=_.Vn(a,b);return(c?a:a.catch(()=>{})).then(()=>{_.yn(Dd);_.An("DRM queryMediaKeys_()",Ed,Dd)})};
152
- _.Yn=function(a,b,c){c=void 0===c?[]:c;a.K=Xn;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 _.Wn(a,b)};
153
- _.Vn=function(a,b){if(1===b.size&&b.has(""))return Promise.reject(new _.I(_.G,6,6E3));null===a.l&&(a.l=ln(a.f.emeApi,a.bb));for(var c of b.values())0===c.audioCapabilities.length&&delete c.audioCapabilities,0===c.videoCapabilities.length&&delete c.videoCapabilities;let d=c=new _.Ij;const e=_.Yk(),f=(k,l,m)=>{l.drmInfos.some(n=>!!n.licenseServerUri)===k&&(d=d.catch(()=>{if(a.j)return null;if(m===_.rd){if((_.yk()||e.os===Tk&&_.zk("Chrome")&&!_.yk())&&!a.f.Ja[m].useLegacySystem)return l.label=sd,a.l.a(sd,
154
- [l]).catch(()=>{a.g.warn("Unable to create com.microsoft.playready.recommendation. Falling back to com.microsoft.playready.");l.label=_.rd;Hn(l);return a.l.a(m,[l])});Hn(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 q=Object.assign({},l,{label:n,distinctiveIdentifier:_.Me,persistentState:_.Me});return a.l.a(n,[q]).catch(()=>a.l.a(m,[l]))}return a.l.a(m,[l]).catch(n=>
155
- {a:{if(m===_.td&&Jn(l)){const q=_.Yk();if(Jn(l)&&q.os===Rk&&q.browser===Yc){a.g.warn("requestMediaKeySystemAccess() failed",n);a.g.warn("Will try to recover by removing the robustness attribute of videoCapabilities and audioCapabilities.");Hn(l);n=a.l.a(m,[l]);break a}}throw n;}return n})}))};let g=a.f.preferredDrmSystem;if(!g){var h=_.Yk();if(h.os===Tk&&10<=h.osVersion.major&&"edge"===h.browser)g=_.rd;else if("safari"===h.browser)g=_.pd;else if(h.browser===Yc||"firefox"===h.browser)g=_.td}g&&(h=
156
- 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 _.I(_.G,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 q of l)a.J.add(q.contentType.toLowerCase());{m=k.keySystem;n=b.get(_.Dn(k.keySystem));
157
- q=[];l=[];const u=[],v=[];Nn(n.drmInfos,q,l,u,v);1<l.length&&_.C("Multiple unique server certificates found! Only the first will be used.");1<q.length&&_.C("Multiple unique license server URIs found! Only the first will be used.");m={keySystem:m,licenseServerUri:q[0],distinctiveIdentifierRequired:n.distinctiveIdentifier===_.wf,persistentStateRequired:n.persistentState===_.wf,audioRobustness:n.audioCapabilities?n.audioCapabilities[0].robustness:"",videoRobustness:n.videoCapabilities?n.videoCapabilities[0].robustness:
158
- "",serverCertificate:l[0],initData:u,keyIds:v,periodId:null}}a.a=m;if(!a.a.licenseServerUri)throw new _.I(_.G,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 _.I)throw k;throw new _.I(_.G,6,6002,{browserError:k.message});}});c.reject();return d};
159
- Zn=function(a){a=ih(a.f.Ja[_.Ne]||{});if(0===a.size)return null;const b=[],c=[];a.forEach((e,f)=>{f=_.Pl(f);e=_.Pl(e);e={kty:"oct",kid:_.Nl(f,!1),k:_.Nl(e,!1)};b.push(e);c.push(e.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:_.Wi(d),initDataType:"keyids"}];return{keySystem:_.Ne,licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:d,
160
- keyIds:[],periodId:null}};Sn=function(a){const b=[];for(const c of a)for(const d of c.drmInfos)b.push(d);return b};$n=function(a,b){for(const c of b)""===c.licenseServerUri||a.f.Ja[c.keySystem]||(a.f.Ja[c.keySystem]={licenseUrl:""})};
161
- Rn=function(a,b){const c=b.some(g=>0<g.drmInfos.length);if(!c){var d=ih(a.f.Ja);En(b,d)}d=a.f.Ja[_.pd];const e=b.some(g=>g.drmInfos.some(h=>h.keySystem===_.pd));if(!1!==a.f.Vi&&_.Kk()&&!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=Zn(a))for(const g of b)g.drmInfos=[f];b=Sn(b);$n(a,b);for(const g of b)Fn(g,
162
- a.f.Ja);return c};Tn=function(a,b,c){const d=_.Dn(b.keySystem);c=c[d];d===_.Ne&&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)};
163
- Un=function(a,b){var c=new Set(Sn(b));const d=a.G?_.wf:_.Me,e=a.G?[_.Re]:[Tf];a=new Map;for(const f of c)a.set(f.keySystem,{initDataTypes:[_.Uc],audioCapabilities:[],videoCapabilities:[],distinctiveIdentifier:_.Me,persistentState:d,sessionTypes:e,label:f.keySystem,drmInfos:[]});for(const f of b){b=f.audio;c=f.video;const g=b?_.Gn(b):"";let h=null;b&&"ac-3"===b.codecs.toLowerCase()&&_.Ak()&&(h=_.Gn(b,_.Pd));const k=c?_.Gn(c):"";let l=null;c&&"ac-3"===c.codecs.toLowerCase()&&_.Ak()&&(l=_.Gn(c,_.Pd));
164
- 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(q=>q.initDataType))]);m.distinctiveIdentifierRequired&&(n.distinctiveIdentifier=_.wf);m.persistentStateRequired&&(n.persistentState=_.wf);b&&_.bi(m.audioRobustness).forEach(q=>{const u={robustness:q||"",contentType:g};n.audioCapabilities.find(v=>v.robustness===u.robustness&&v.contentType===u.contentType)||n.audioCapabilities.push(u);h&&n.audioCapabilities.push({robustness:q||
165
- "",contentType:h})});c&&_.bi(m.videoRobustness).forEach(q=>{const u={robustness:q||"",contentType:k};n.videoCapabilities.find(v=>v.robustness===u.robustness&&v.contentType===u.contentType)||n.videoCapabilities.push(u);l&&n.videoCapabilities.push({robustness:q||"",contentType:l})})}}return a};ao=function(a){return _.x(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 _.I(_.G,6,6003,b.message,b))}})};
166
- _.fo=function(a,b,c,d){d=void 0===d?"":d;if(c.length&&(!a.G||a.K!==Xn)){var e=a.keySystem();if(!e.startsWith(_.pd)&&b===_.Uc){const f=new bo(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||
167
- _.Ak(2)||a.keySystem().startsWith(_.pd)||!_.co(a,d,c,!0))&&eo(a,d,null,b,c)}};go=function(a,b){return _.x(function*(){a.g.info(`Handle encrypted event for type ${b.initDataType}`);yield ao(a);b.initData&&_.fo(a,b.initDataType,_.K(b.initData))})};io=function(a){return _.x(function*(){_.yn(Gd);const b=a.X.map(c=>ho(a,c));a.ia=!0;a.X=[];yield Promise.all(b);_.yn(Fd);_.An("drm.onPlay",Gd,Fd)})};
168
- ko=function(a){const b=a.keySystem(),c=a.f.Ja[b],d=c.certificateUrl||"";if(""===d)return Promise.resolve();const e=a.D.getConfiguration();return jo(a,e).then(()=>{var f=c.modifiers;const g=f&&f.certificateRequest,h=f&&f.certificateResponse;f=_.sj([d],a.f.attemptParameters);f.type=3;f.licenseRequestType=Wc;g&&f.requestModifiers.push(k=>g(e,k));h&&f.responseModifiers.push(k=>h(e,k));a.g.debug("Fetching certificate");return a.D.vb.fetch(f).T}).then(f=>{a.a.serverCertificate=_.K(f.data)}).catch(f=>{var g=
169
- f.data.headers;g=Object.assign({message:Ca,url:f.data.url,status:f.data.status,response:f.data.response},g?{headers:g}:{},Wm(g));throw new _.I(_.G,6,6100,g,f);})};
170
- _.lo=function(a){return _.x(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 _.I(_.G,6,6004,{browserError:b.message});}})};
171
- _.oo=function(a){const b=a.a?a.a.initData||[]:[];for(const c of b){let d=!_.Ak(2);if(a.f.enforceSingleSession&&!a.keySystem().startsWith(_.pd)){const e=a.h.values();for(const f of e)_.Rl(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}.`),mo(c.initData,f)||(f.Sd.push(c.initData),c.keyId&&!f.lb.includes(c.keyId)&&
172
- f.lb.push(c.keyId),a.o.get(c.keyId)||a.o.set(c.keyId,Nf)),d=!1)}!d||a.G&&a.K===Xn||(_.co(a,c.keyId,c.initData)&&(d=!1),d&&(a.g.info("Request new media key session on create"),eo(a,c.keyId,c.periodId,c.initDataType,c.initData)))}for(const c of a.L)_.no(a,c);b.length||a.L.length||(a.A||a.g.info(xa),a.A=!0,a.F=!1,a.H.resolve());return a.H};
173
- _.qo=function(a,b){if(!a.I)return Gh(a.B,b,()=>{a.w(new _.I(_.G,6,6010))}),Promise.resolve();a.C=b;a.l.l(b);a.B.one(a.C,_.Te,()=>io(a));a.B.on(a.C,_.Bg,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()!==po||a.L.length)d=ao(a);c=Promise.resolve();_.Dk()&&38===_.Ek().major||(a.a&&a.a.keySystem!==_.Ne&&!a.a.serverCertificate&&(c=ko(a)),c=c.then(()=>_.lo(a)));return Promise.all([d,
174
- c]).then(()=>{a.j||(_.oo(a),a.B.on(a.C,Qd,e=>go(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 _.I(1,6,6004)),a.a.serverCertificate=null,a.R++,_.qo(a,b);1<=a.R&&a.g.info("Could not get valid widevine server certificate. Giving up");throw e;}})};
175
- jo=function(a,b){return _.x(function*(){const c=a.D.Qc();if(c){var d=b&&b.drm&&b.drm.customData;d&&(yield c(d))}})};
176
- _.no=function(a,b){let c;try{a.g.debug("Attempting to load an offline session",b),c=a.I.createSession(_.Re)}catch(e){const f=new _.I(_.G,6,6005,{browserError:e.message});a.w(f);return Promise.reject(f)}a.B.on(c,_.se,a.Wa.bind(a));a.B.on(c,ee,a.Ka.bind(a));const d={initData:null,loaded:!1,Oe:Infinity,jc:null,hb:new _.Ij,periodId:null,Sd:[],keyId:null,lb:[],initDataType:null,qc:null,sessionContext:{ldlDelay:0,customData:{}}};d.hb.catch(()=>{});a.h.set(c,d);return c.load(b).then(e=>{if(a.j)return null;
177
- a.g.debug("Loaded offline session",b,e);if(!e)return a.h.delete(c),a.w(new _.I(_.G,6,6013)),null;d.loaded=!0;ro(a)&&(a.A||a.g.info(xa),a.A=!0,a.F=!1,a.H.resolve());return c},e=>{a.j||(a.h.delete(c),a.w(new _.I(_.G,6,6005,{browserError:e.message})))})};mo=function(a,b){if(!a)return!1;for(let c=0;c<b.Sd.length;c++)if(_.Rl(a,b.Sd[c]))return!0;return!1};
178
- _.co=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(_.Rl(c,f.initData))return b?f.lb.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.lb.push(b),a.o.get(b)||a.o.set(b,Nf),d&&a.g.info(qb+`Session: '${e.sessionId}'`+`Adding Key ID ${b} to session meta-data.`)):d&&a.g.info(qb+`Session: '${e.sessionId}'`),!0;if(mo(c,f))return d&&a.g.info("Skipping Session creation. License for init data was already requested [extra]"),
1
+ let g={}; let _ = {};let f=function(window){'use strict';var ba,ca,la,oa,ta,ua,xa,ya,za,Aa,Ba,Ca,Ga,Ha,Ia,Ja,Ka,Ma,Oa,Sa,Ua,Va,Wa,Xa,Ya,Za,ab,bb,fb,jb,pb,qb,tb,vb,zb,Ab,Bb,Eb,Gb,Ib,Jb,Pb,Yb,Zb,$b,Cc,Hc,Pc,Qc,Wc,Xc,Yc,$c,bd,cd,dd,hd,id,jd,kd,ld,md,rd,td,yd,Ed,Fd,Gd,Hd,Jd,Kd,Ld,Od,Pd,Rd,Zd,ge,ie,je,qe,Me,Te,Ve,We,Xe,Ye,Ze,$e,af,bf,cf,df,hf,jf,kf,lf,mf,nf,pf,uf,wf,Lf,Of,Uf,gg,jg,pg,Ag,Eg,Fg,Gg,Hg,Ig,Kg,Lg,Mg,Sg,Tg,Wg,Xg,bh,Zg,jh,kh,mh,ph,rh,zh,Ah,Bh,Eh,Fh,Dh,Ch,Ih,Gh,Kh,Lh,Ph,Jh,Qh,Oh,Rh,Sh,Mh,Nh,Xh,bi,ci,Yh,ai,$h,Zh,ei,gi,fi,ii,ji,ki,li,oi,pi,
2
+ ri,ti,si,ui,vi,wi,zi,Ai,Di,Pi,Si,Xi,bj,jj,kj,nj,oj,pj,rj,sj,tj,uj,wj,xj,zj,Aj,Dj,Ej,Fj,Hj,Ij,Gj,Jj,Nj,Sj,Rj,ek,Xj,Wj,sk,rk,yk,Hk,Kk,Jk,Ik,Lk,Mk,Ok,Pk,Rk,Sk,Vk,Yk,Zk,dl,fl,$k,bl,el,gl,hl,il,kl,ll,pl,Al,Bl,Dl,El,Fl,Gl,Hl,Il,Kl,Jl,Ll,Ml,Nl,Ol,Pl,Cl,Rl,Tl,Vl,Yl,$l,em,fm,gm,hm,im,jm,km,lm,mm,nm,tm,Cm,Em,Km,Rm,Tm,$m,kn,Wm,en,qn,rn,sn,un,vn,wn,zn,xn,yn,An,Bn,Cn,Fn,Mn,Nn,Vn,Yn,Zn,ao,co,eo,go,Wn,bo,ho,io,jo,ko,to,mo,uo,lo,no,oo,vo,Ao,Co,Eo,Do,Go,yo,Oo,Lo,No,Mo,Bo,Po,Qo,Ro,So,To,Uo,Vo,Wo,bp,cp,dp,jp,kp,mp,
3
+ gp,fp,tp,up,yp,Ap,Bp,Cp,xp,Ep,Fp,Gp,Kp,Pp,Qp,Rp,Sp,Tp,Up,Wp,Xp,Yp,Zp,mq,hq,oq,pq,qq,sq,tq,rq,wq,xq,yq,vq,$p,aq,dq,eq,fq,gq,iq,jq,kq,lq,Eq,Fq,nq,uq,Gq,Bq,Dq,zq,Jq,Kq,Lq,Nq,Oq,Qq,Rq,Sq,Vq,Wq,Tq,dr,er,fr,cr,mr,Uq,gr,hr,ir,jr,kr,lr,or,Yq,nr,Zq,Xq,$q,pr,sr,ar,br,tr,vr,zr,Ar,yr,Br,xr,wr,Dr,Fr,Hr,Jr,Kr,Lr,Mr,Nr,Or,Pr,Qr,Rr,Sr,Tr,Yr,bs,Zr,ds,hs,js,ls,ns,os,ps,qs,ss,Bs,ts,us,vs,ws,Ds,zs,Es,Ks,Ls,Ms,Fs,Js,Ns,Os,Rs,Vs,Ws,Zs,at,bt,$s,Xs,Qs,Us,Ss,Ts,et,ft,gt,ht,it,jt,kt,lt,nt,pt,tt,Ug,Vg;_.aa=" is registered.";
4
+ ba=" is unsupported on this platform.";ca=" to a log level. Falling back to default!";_.da="#text";_.ea="6.27.0";_.fa="AdaptationSet";_.ia="Already destroyed. No-op";_.ja="Already released. No-op";_.ka="Autoplay is not allowed due to browser policy.";la="Autoplay should not be used for preloaded streams. ";_.ma="BANDWIDTH";_.na="BASIC";oa="CHECKSUM";_.pa="CODECS";_.qa="Cannot retrieve buffer information due to platform limitations";_.ra="CastlabsPlayer";_.sa="Configuration is valid";ta="Content-Length";
5
+ ua="Content-Type";_.wa="Could not find configured DRM environment.";xa="DRM licenses loaded";ya="DRMtoday";za="DRMtodayOnboard";Aa="Destroying player";Ba="Error while decoding string!";Ca="Error while fetching certificate!";_.Da="FairPlay Certificate URL is not defined";_.Ea="FairPlay License URL is not defined";_.Fa="GROUP-ID";Ga="HW_SECURE_ALL";Ha="HW_SECURE_CRYPTO";Ia="HW_SECURE_DECODE";Ja="HeaderDrm";Ka="InvalidStateError";_.La="LANGUAGE";Ma="License verification failed: ";Oa="Load interrupted while a player release is pending";
6
+ _.Pa="Loading player with configuration";_.Qa="MaxHeight";_.Ra="MaxWidth";Sa="Missing media element";_.Ta="NAME";Ua="No drmtoday configuration found in player configuration. Unable to modify the DRM license request!";Va="No event provided!";Wa="No items in the playlist";Xa="No sources provided!";Ya="No track data attached to the event, unable to add track!";Za="Not a persistent session.";_.$a="Not supported";ab="NotAllowedError";bb="NotSupportedError";_.cb="PLAYLIST";_.db="POST";_.eb="PlayReady License URL is not defined";
7
+ fb="Player not ready yet.";_.gb="Player sources";_.ib="Please make sure ";jb="Preloading is not supported by this player.";_.kb="QualityLevel";_.lb="RESOLUTION";_.mb="Representation";_.nb="SW_SECURE_CRYPTO";_.ob="SW_SECURE_DECODE";pb="Session is closed";qb="Skipping Session creation. License for init data was already requested in ";_.rb="SmoothStreamingMedia";_.sb="TYPE";tb="The index is not in the allowed range.";_.ub="URI";vb="Unable to translate ";_.wb="Unhandled/ignored event";_.xb="Unregistering listeners";
8
+ zb="Unsupported keySystem";Ab="Updating playout limit for interstitial";Bb="Using VTTCue polyfill from 3 argument TextTrackCue.";_.Cb="VIDEO";_.Db="VOD";Eb="Wait for preloading to finish";Gb="WebkitEmeManager.MediaKeySession.load";_.Hb="Widevine License URL is not defined";Ib="Will create EME Manager: ";Jb="X-AD-CREATIVE-SIGNALING";_.Kb="X-ASSET-LIST";_.Lb="X-ASSET-URI";_.Mb="X-PLAYOUT-LIMIT";_.Nb="X-RESTRICT";_.Ob="X-RESUME-OFFSET";Pb="X-TIMELINE-OCCUPIES";_.Sb="ad-break-started";_.Tb="ad-break-stopped";
9
+ _.Ub="ad-buffering";_.Vb="ad-clicked";_.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";_.kc="ad-started";_.mc="ad-stopped";_.nc="ad-third-quartile";_.oc="addtrack";_.pc="ads-timeline-changed";_.qc="airplay-casting-ended";_.rc="airplay-casting-started";_.sc="airplay-status-changed";_.tc="application/cea-608";
10
+ _.uc="application/dash+xml";_.vc="application/mp4";_.wc='application/mp4; codecs\x3d"stpp"';_.xc='application/mp4; codecs\x3d"wvtt"';_.yc="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="cdn-switch-success";_.Uc="cenc";_.Vc="center";Wc="certificate-request";Xc="change";Yc="chrome";_.Zc="clpp-fill";$c="clpp-hidden";bd="clpp-mc-playlist";cd="clpp-visible";dd="clpp.PlayerFleet";_.ed="clpp.cast.CastSender";hd="clpp.drm.HeaderDrm";id="clpp.drm.eme.AppleEmeManager";jd="clpp.drm.eme.EmeFactory";kd="clpp.native.Player";ld="clpp.plist.McPlaylist";md="clpp.utils.Platform";_.nd="codecs";_.od="column-reverse";
12
+ _.pd="com.adobe.primetime";_.qd="com.apple.fps";rd="com.apple.quicktime.HLS";_.sd="com.microsoft.playready";td="com.microsoft.playready.recommendation";_.ud="com.widevine.alpha";_.vd="config.drm.customData is not defined";_.wd="content-steering-change";_.xd="content-steering-location-ban-update";yd="controls";_.zd="cuechange";_.Ad="decoder";_.Bd="destroy()";_.Cd="disabled";_.Dd="div";Ed="drm.mediaKeys.end";Fd="drm.mediaKeys.start";Gd="drm.onPlay.end";Hd="drm.onPlay.start";_.Id="drmexpirationupdate";
13
+ Jd="drmlicenserequested";Kd="drmrenewalstarted";Ld="drmsessioncreated";_.Md="drmsessionpersisted";_.Nd="drmsessionupdate";Od="drmtoday";Pd="durationchange";_.Qd="ec-3";Rd="encrypted";_.Sd="end";_.Td="ended";_.Ud="error";_.Vd="estimatedThroughputKbps";_.Wd="forced";Zd="fullscreenElement";_.$d="function";_.ae="height";_.be="hidden";_.ce="html";_.de="https://";_.ee="image";_.fe="internal-error";ge="keystatuseschange";_.he="left";ie="license-renewal";je="license-request";_.ke="line-left";_.le="line-right";
14
+ _.me="live-turned-static";_.ne="load";_.oe="loadeddata";_.pe="loadedmetadata";qe="loadstart";_.re="main";_.se="mdat";_.te="mdia";_.ue="message";_.ye="metadata";_.ze="mimeType";_.Ae="minf";_.Be="moov";_.Ce="mpd-type-changed";_.De="mpeg-dash-callback-event";_.Ee="none";_.r="number";_.Fe="object";_.Ge="onBitrateChanged()";_.He="onContentLoaded";_.Ie="onPlayerError()";_.Je="onPlayerWillDestroy";_.Ke="onPlayerWillRelease";_.Le="onStateChanged()";Me="online-status-changed";_.Ne="optional";_.Oe="org.w3.clearkey";
15
+ _.Pe="output-restricted";_.Qe="pause";_.Re="persistent";_.Se="persistent-license";Te="picture-in-picture";_.Ue="play";Ve="player.afterLoad.end";We="player.afterLoad.start";Xe="player.appendLoad.end";Ye="player.appendLoad.start";Ze="player.beforeLoad.end";$e="player.beforeLoad.start";af="player.load.end";bf="player.load.start";cf="player.setupPlaylist.end";df="player.setupPlaylist.start";_.ef="playing";_.ff="playlist-item-changed";_.gf="playlist-modified";hf="playlist.next.end";jf="playlist.next.start";
16
+ kf="preload-aborted";lf="preload-failed";mf="preloaded";nf="preloading";_.of="prevent";pf="primary-content";_.qf="progress";_.sf="px";_.tf="ratechange";uf="released";_.vf="releasing";wf="removetrack";_.xf="required";_.yf="resize";_.zf="right";_.Af="sc-playlist-ended";_.Bf="sc-playlist-item-changed";_.Cf="sc-playlist-live-turned-static";_.Df="sc-playlist-timeline-changed";_.Ef="seeked";_.Ff="seeking";_.Gf="showing";_.Hf="simid-creative-started";_.If="simid-creative-stopped";_.Jf="sinf";_.Kf="smooth";
17
+ Lf="stalled";_.Mf="start";_.Nf="statechanged";Of="status-pending";_.Pf="stbl";_.Qf="string";_.Rf="stsd";_.Sf="style";_.Tf="subtitles-htmlcue";Uf="temporary";_.Vf="text";_.Wf="text/vtt";_.Xf="text/xml";_.Yf="texttrackchanged";_.Zf="timeline-cue-added";_.$f="timeline-cue-enter";_.ag="timeline-cue-exit";_.bg="timeline-cues-changed";_.cg="timeupdate";_.dg="tracksadded";_.eg="trak";_.fg="ttml-xml";gg="unauthenticated";_.hg="und";_.ig="unknown";jg="update";_.kg="urn:scte:scte35";_.lg="urn:scte:scte35:2014";
18
+ _.mg="user-seeked";_.ng="user-seeking";_.og="value";pg="version";_.qg="vertical-lr";_.rg="vertical-rl";_.t="video";_.sg="video/mp2t";_.tg="video/mp4";_.xg="videobufferchanged";_.yg="videotrackchanged";_.zg="vimond-response";Ag="visibilitychange";_.Bg="vtt-xml";_.Cg="waiting";_.Dg="waitingforkey";Eg="webkit-org.w3.clearkey";Fg="webkitkeyadded";Gg="webkitkeyerror";Hg="webkitkeymessage";Ig="webkitneedkey";_.Jg="width";Kg="x-dt-csl-tracking-token";Lg="x-dt-follow-up-token";Mg="x-dt-resp-code";_.Ng="yospace-session-ended";
19
+ _.Og="yospace-session-started";_.Rg=function(a){return function(){return _.Qg[a].apply(this,arguments)}};Sg=function(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}};Tg=function(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:Sg(a)}};
20
+ Wg=function(a,b){if(b){var c=Ug;a=a.split(".");for(var d=0;d<a.length-1;d++){var e=a[d];e in c||(c[e]={});c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&Vg(c,a,{configurable:!0,writable:!0,value:b})}};Xg=function(a){function b(d){return a.next(d)}function c(d){return a.throw(d)}return new Promise(function(d,e){function f(g){g.done?d(g.value):Promise.resolve(g.value).then(b,c).then(f,e)}f(a.next())})};_.w=function(a){return Xg(a())};
21
+ _.x=function(a,b){a=a.split(".");var c=Yg;a[0]in c||"undefined"==typeof c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)a.length||void 0===b?c[d]&&c[d]!==Object.prototype[d]?c=c[d]:c=c[d]={}:c[d]=b};_.ah=function(a){return _.z(a)||Zg(a)?a:_.$g(a)};_.$g=function(...a){let b={};for(let c=0;c<a.length;c++)null!=a[c]&&(b=bh(b,{merging:a[c]},1));return b.merging||null};_.ch=function(a){for(const b in a)if(void 0!==a[b])return!0;return!1};
22
+ bh=function(a,b,c){const d=c+1;if(_.z(a)||!_.dh(a))a={};for(const e in b)c=b[e],Zg(c)||_.z(c)||_.eh(c)||c instanceof Element?a[e]=c:_.dh(c)&&c.buffer&&c.buffer instanceof ArrayBuffer&&_.eh(c.subarray)?a[e]=c.subarray(0):c instanceof Array?a[e]=bh([],c,d):!_.z(c)&&_.fh(c)&&20>d&&(a[e]=bh(a[e],c,d));return a};Zg=function(a){a=typeof a;return a===_.Qf||a===_.r||a===_.Mc};_.z=function(a){return null===a||"undefined"===typeof a};_.dh=function(a){return typeof a===_.Fe};
23
+ _.eh=function(a){return typeof a===_.$d};_.gh=function(a){return typeof a===_.Qf};_.hh=function(a){return typeof a===_.r};_.fh=function(a){if(_.z(a)||!_.dh(a))return!1;a=Object.getPrototypeOf(a);return a===Object.prototype||null===a};
24
+ _.ih=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||!_.dh(a)||!_.dh(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
+ jh=function(a){return(Number.hasOwnProperty("isNaN")?Number.isNaN:b=>b!==b)(a)};kh=function(a){const b=new Map;for(const c of Object.keys(a))b.set(c,a[c]);return b};_.lh=function(a){const b={};a.forEach((c,d)=>{b[d]=c});return b};mh=function(a,b){b=b.toLowerCase();for(const [c,d]of Object.entries(a))if(c.toLowerCase()===b)return d;return null};ph=function(a){return a&&0<=nh[a]?nh[a]:oh};
26
+ rh=function(a){if(!a)return _.B("clpp.log",vb+a+ca),-1;const b=qh[a.toUpperCase()];return void 0===b?(_.B("clpp.log",vb+a+ca),-1):b};_.th=function(a){sh.info.apply(sh,arguments)};_.uh=function(a){sh.debug.apply(sh,arguments)};_.B=function(a){sh.warn.apply(sh,arguments)};_.vh=function(a){sh.error.apply(sh,arguments)};_.yh=function(a){if(a){var b=a.a();b in _.wh?_.xh.warn("Player-Factory '"+b+"' already registered"):(_.wh[b]=a,_.xh.info("Registered Player-Factory: '"+b+"'"))}};
27
+ zh=function(a){return Object.values(_.wh).find(a)||null};Ah=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};Bh=function(a){return 0>=a?Promise.resolve():new Promise(b=>{setTimeout(()=>{b()},1E3*a)})};Eh=function(a,b){return _.w(function*(){yield Ch(a,()=>Promise.all(Dh(a).map(b)))})};Fh=function(a,b){_.w(function*(){yield Ch(a,()=>Promise.all(a.f.filter(c=>null!=c.getLoadedSource()).map(b)))})};
28
+ Dh=function(a){return[a.uc,...a.f].filter(b=>null!=b)};Ch=function(a,b){return _.w(function*(){a.a&&(yield a.a);a.a=b().then(()=>{a.a=null})})};_.Hh=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)Gh(b[c]);a.a.clear()};Ih=function(a,b,c){var d=[Rd,"msneedkey",Ig,"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)};Gh=function(a){a.target.removeEventListener(a.type,a.a,a.f);a.target=null;a.a=null};
29
+ Kh=function(a){return Jh(a).filter(b=>b.type===rd&&!b.Ne)};Lh=function(a){a.forEach(b=>{b.Ne=!0})};Ph=function(a,b){a=a.map(c=>({startTime:c.startTime,endTime:c.endTime,key:c.value.key,value:c.value.data,Zf:!1}));a=Mh(a);b&&(a=Nh(a));return new Set(Oh(a))};Jh=function(a){const b=[];for(const c of a)b.push(c);return b};
30
+ Qh=function(a,b){const c=a.endTime-a.startTime,d=b.endTime-b.startTime,e=a.Hf||a.startTime,f=b.Hf||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};Oh=function(a){const b=[];for(const c of a)(a=b.find(d=>d.startTime===c.startTime&&d.endTime===c.endTime))?Rh(c,a):(a=Sh(c),b.push(a));return b};
31
+ Rh=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=_.lg,b.type=_.Th};Sh=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:_.Uh,eventElement:null};Rh(a,b);return b};
32
+ Mh=function(a){const b=new Set(a),c=new Set(a.filter(d=>"SCTE35-OUT"===d.key).map(Xh));a.filter(d=>"SCTE35-IN"===d.key).forEach(d=>{c.has(Xh(d))||(d.Zf=!0)});return Array.from(b.values())};Nh=function(a){a.forEach(b=>{b.Zf&&(b.endTime=b.startTime,b.startTime=0)});return a};Xh=function(a){return`${a.startTime}-${a.endTime}`};
33
+ bi=function(a,b){a.g.debug("onMetadataTrackAdded_()");b.mode=_.be;var c=!b.cues||0===b.cues.length;if(a.m.isLive()||!c){var d=b.cues;c=Kh(d);Lh(c);a.a=Ph(c,a.l);0<a.a.size&&(Yh(a,a.a),a.m.trigger(new _.C(_.bg)));a.j.on(b,_.zd,()=>{{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)){e=g.startTime;var k=e+.5;e=e<=h&&h<=k}e&&(f.f.add(g),f.m.trigger(new _.C(_.$f,{detail:g})))}else h=g.startTime<=h&&h<=g.endTime,!h&&f.f.has(g)?(f.f.delete(g),f.m.trigger(new _.C(_.ag,
34
+ {detail:g}))):h&&!f.f.has(g)&&(f.f.add(g),f.m.trigger(new _.C(_.$f,{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);Zh(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;$h(a,b);f=Kh(d);var k=Ph(f,a.l);g=new Set;h=!1;for(l of k)(k=ai(a,l))?(l.customAttributes&&(k.customAttributes=_.$g(k.customAttributes||{},l.customAttributes)||
35
+ void 0),h=!0):(a.a.add(l),g.add(l));var l={Qh:g,Sg:0<g.size||h};const {Qh:m,Sg:n}=l;Lh(f);(e||n)&&a.m.trigger(new _.C(_.bg));Yh(a,m)},6E3))}};ci=function(a,b){a.j.on(b,_.oc,c=>{c=c.track;c.kind===_.ye&&bi(a,c)})};Yh=function(a,b){for(const c of b)a.m.trigger(new _.C(_.Zf,{detail:c}))};ai=function(a,b){return Array.from(a.a.values()).find(c=>b.startTime===c.startTime&&b.endTime===c.endTime)||null};
36
+ $h=function(a,b){if(b.cues){var c=Jh(b.cues).filter(f=>f.type===rd),d=c.filter(f=>f.Ne);c=c.filter(f=>!f.Ne);var e=[];for(const f of c)for(const g of d)Qh(f,g)&&(e.push(f),g.Hf=f.startTime);Zh(a,b,e);0<e.length&&a.g.debug(`Removed ${e.length} duplicated cues.`)}};Zh=function(a,b,c){for(const d of c)try{b.removeCue(d)}catch(e){a.g.debug("Failed to remove cue",d,e)}};_.di=function(a){return Array.isArray(a)?a:[a]};ei=function(a,b){return a===b?!0:a.length===b.length&&a.every((c,d)=>c===b[d])};
37
+ gi=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 fi(a,b)&&fi(b,a)};fi=function(a,b){const c=new Set(a);return b.every(d=>c.has(d))};_.hi=function(a,b={}){if(b.Ef){const c=[];for(const d of a)c.some(e=>b.Ef(d,e))||c.push(d);return c}return Array.from((new Set(a)).values())};ii=function(a,b){const c=new Set(a),d=new Set(b);return{gi:a.filter(e=>!d.has(e)),dj:a.filter(e=>d.has(e)),Pg:b.filter(e=>!c.has(e))}};
38
+ ji=function(a,b){b=b.track;b.kind!==_.ye&&(b.mode===_.Gf&&(b.mode=_.be),a.a.on(b,_.zd,c=>{c=c.target||c.srcElement;c.mode=_.be;c.activeCues&&(c=Array.from(c.activeCues).map(a.o),a.l.append(c,[]))}))};ki=function(a,b,c,d){a=`${a===_.F?"FATAL":"RECOVERABLE"} Clpp-Error [Category ${b} - Code ${c}]`;if(_.gh(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};
39
+ li=function(a,b){const c=b||ei;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)}};_.mi=function(a){return null!=a};oi=function(...a){for(let b=0;b<a.length;b++){const c=a[b];if(null!==c&&void 0!==c)return c}throw new _.ni("No non-null, non-undefined value found");};pi=function(...a){for(let b=0;b<a.length;b++){const c=a[b];if(null!==c&&void 0!==c)return c}};_.qi=function(a,b){for(const c of a)if(!b(c))return!1;return!0};ri=function*(a){for(let b=0;b<a;b++)yield b};
40
+ ti=function(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!==b.byteLength)return!1;if(si(a)===si(b)&&(a.byteOffset||0)===(b.byteOffset||0))return!0;const c=_.G(a);b=_.G(b);for(const d of ri(a.byteLength))if(c[d]!==b[d])return!1;return!0};si=function(a){return a instanceof ArrayBuffer?a:a.buffer};_.G=function(a,b=0,c=Infinity){return ui(a,b,c,Uint8Array)};
41
+ ui=function(a,b,c,d){const e=d.BYTES_PER_ELEMENT||1,f=si(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)};vi=function(a,b=0,c=Infinity){return ui(a,b,c,Uint16Array)};wi=function(a,b=0,c=Infinity){return ui(a,b,c,Uint32Array)};_.xi=function(a,b=0,c=Infinity){return ui(a,b,c,Int32Array)};_.yi=function(a,b=0,c=Infinity){return ui(a,b,c,DataView)};
42
+ zi=function(a){return a instanceof ArrayBuffer?a:0===a.byteOffset&&a.byteLength===a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer};Ai=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};
43
+ _.Bi=function(a){if(!a)return"";a=_.G(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(Ba);return a}a=escape(Ai(a));try{return decodeURIComponent(a)}catch(b){throw Error(Ba);}};
44
+ Di=function(a,b,c){if(!a)return"";if(!c&&0!==a.byteLength%2)throw Ci.error("Data has an incorrect length, must be even."),Error("Data does not seem to be UTF-16 encoded!");c=_.G(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(_.G(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 Ai(c)};
45
+ _.Ei=function(a,b){if(_.gh(a))return a;let c="";b=!!b;const d=_.G(a);239===d[0]&&187===d[1]&&191===d[2]?c=_.Bi(d):254===d[0]&&255===d[1]?c=Di(d.subarray(2),!1):255===d[0]&&254===d[1]&&(c=Di(d.subarray(2),!0));const e=function(f,g){return f.byteLength<=g||32<=f[g]&&126>=f[g]}.bind(null,d);Ci.debug("Unable to find byte-order-mark, making an educated guess.");0===d[0]&&0===d[2]?c=Di(a,!1):0===d[1]&&0===d[3]?c=Di(a,!0):e(0)&&e(1)&&e(2)&&e(3)&&(c=_.Bi(a));if(c)return b&&(c=escape(c)),c;throw Error("Unable to detect text encoding");
46
+ };_.Fi=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};_.Gi=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};
47
+ _.Hi=function(a,b){var c=b||1;b=a.length;const d=new ArrayBuffer(b*c);let e;4===c?e=wi(d):2===c?e=vi(d):e=_.G(d);for(c=0;c<b;c++)e[c]=a.charCodeAt(c);return d};_.Ii=function(a,b){return String.prototype.startsWith?a.startsWith(b):0===a.indexOf(b)};_.Ji=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};_.Ki=function(a){return!!(a&&0<a.length)};_.Li=function(a){return!a||0===a.length};
48
+ _.Mi=function(a){if(void 0===a||null===a||""===a)return"";try{let b=Number(a);if(jh(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""}};_.Oi=function(a){a=a.replace(/<[^>]+>/gi,"");Ni.innerHTML=a;a=Ni.textContent;return a=a.replace(/<[^>]+>/gi,"")};Pi=function(a,b){try{return new URL(a,b)}catch(c){return null}};_.Qi=function(a){return`${a.scheme}//`+`${a.a}${a.port?":"+a.port:""}${a.path}${a.h}${a.f}`};
49
+ _.Ri=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)},""):""};Si=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};
50
+ _.Ti=function(a,b){if(a.startsWith("http://")||a.startsWith(_.de))return a;let c=b;b.startsWith("//")&&(c=`${location.protocol}${c}`);b=new URL(c);b.search="";return(new URL(a,b)).toString()};_.Vi=function(a){if(!a)return null;a=(new _.Ui(a)).a.pathname.split("/");if(1>a.length)return null;a=a.pop().split(".");return 1>=a.length?null:a.pop().toLowerCase()};Xi=function(a,b){const c=Wi[a];for(const d of c)for(const e of b)if(d.test(e.trim()))return e.trim();return a===_.H?"":null};
51
+ _.J=function(a,b,c,d){d=void 0===d?{}:d;a=a.getAttribute(b);if(!a&&d.required)throw new _.I(_.F,4,4023,`Required attribute missing: ${b}`);return a?a.value:c||null};_.Yi=function(a){return"com.apple.hls.interstitial"===a||"com.apple.hls.overlay"===a};_.$i=function(a){var b=(a||"").split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=Zi.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a};_.aj=function(a,b){a=_.$i(a);b=_.$i(b);return a.split("-")[0]===b.split("-")[0]};
52
+ bj=function(a){return a.reduce((b,c)=>b+c,0)};_.cj=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};
53
+ _.gj=function(a,b){var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new _.I(_.F,4,4016,{invalidTag:b});b=c[1];var d=c[2];c=[];let e;if(d){d=new _.dj(d);var f;(f=_.cj(d,/^([^,=]+)(?:,|$)/g))&&f[1]&&(e=f[1].trim());const g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;for(;f=_.cj(d,g);)c.push(new _.ej(f[1],f[2]||f[3]||""))}return new _.fj(a,b,c,e)};_.ij=function(){return{maxAttempts:1,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:0,fatalStatusCodes:[...hj]}};
54
+ jj=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||[...hj]};kj=function(a){const b={};a.forEach((c,d)=>{b[d.trim()]=c});return b};
55
+ _.mj=function(a,b){_.gh(a)&&(a={uris:[a]});Array.isArray(a)&&(a={uris:a});const c={uris:a.uris||[],type:a.type||_.lj,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||
56
+ [],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:[...hj],requestStartTimestamp:null};a.keyInfo&&(c.keyInfo=a.keyInfo);b&&jj(c,b);return c};
57
+ _.qj=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(nj(c))return oj(a);throw pj(a);};nj=function(a){return 200<=a&&299>=a&&202!==a};oj=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}};
58
+ pj=function(a){a=oj(a);try{var b=_.Ei(a.data,!0)}catch(d){b=null}_.uh("HTTP error text:",b);const c=a.request;return new _.I(0<=(c?c.fatalStatusCodes||[]:[]).indexOf(a.status)?_.F:1,1,1001,{url:a.uri,status:a.status,responseText:b,headers:a.headers,request:a.request,response:a})};rj=function(a,b){b=parseInt(b,10);Number.isNaN(b)&&(b=-1);a.bytesTotal=b;a.bytesLoaded=0;a.bytesRemaining=b};sj=function(a,b,c){0<a.bytesRemaining&&(a.bytesRemaining-=b);a.bytesLoaded+=b;if(a.onProgress)a.onProgress(b,c)};
59
+ tj=function(a,b,c){if(0>=a)return Promise.resolve();const d=8*c/a-b/1E3;return 0<d?new Promise(e=>{setTimeout(e,1E3*d)}):Promise.resolve()};uj=function(a,b){a.U.then(()=>b(!0),()=>b(!1));return a};_.vj=function(a,b){a.a.push(uj(b,()=>{{var c=a.a;const d=c.indexOf(b);-1<d&&c.splice(d,1)}}))};wj=function(){return window.performance&&window.performance.now?window.performance.now():Date.now()};xj=function(a){return wj()-a.a};zj=function(a){const b=new yj;b.a=a.a;return b};
60
+ Aj=function(a,b){var c=a.f+b.byteLength;if(a.a.byteLength<c){let d=a.a.byteLength;for(;d<c;)d*=2;c=new Uint8Array(d);c.set(a.a);a.a=c}a.a.set(b,a.f);a.f+=b.byteLength};Dj=function(a,b,c){return b.read().then(({done:d,value:e})=>{null!=e&&(Aj(a,e),sj(c,e.byteLength,xj(a.h)),a.h.a=wj());return d?(d=a.a.buffer,a.a.byteLength!==a.f&&(d=d.slice(0,a.f)),Promise.resolve(d)):Promise.resolve().then(()=>Dj(a,b,c))})};
61
+ Ej=function(a){let b=null;a.h!==a.f&&(b={start:a.h,end:a.f,length:a.f-a.h,data:new DataView(a.j.a.buffer,a.h,a.f-a.h),count:-1});return b};Fj=function(a,b){{var c=a.j;const d=c.f+b.byteLength;if(d>c.a.byteLength){const e=c.a;c.a=new Uint8Array(Math.max(Math.ceil(c.a.buffer.byteLength*c.h),d));c.a.set(e)}c.a.set(b,c.f);c.f+=b.byteLength}a.a=a.h;a.f=a.j.f;a.l=new DataView(a.j.a.buffer,0,a.j.f)};
62
+ Hj=function(a){if(0<=a.o&&a.f<a.o)return null;let b=Gj(a);for(;null!==b;){if(b.name===_.se){const c={start:a.h,end:b.end,length:b.end-a.h,data:new DataView(a.j.a.buffer,a.h,b.end-a.h),count:1};a.h=b.end;return c}b=Gj(a)}return null};
63
+ Ij=function(a,b,c,d){return b.read().then(e=>{var {done:f,value:g}=e;d&&g&&(d(g.byteLength,xj(a.w)),a.w.a=wj());if(f)return e=Ej(a),(e=c(!0,e))?e.then(()=>a.j.a.buffer):Promise.resolve(a.j.a.buffer);let h=Promise.resolve();if(null!=g){Fj(a,g);var k=Hj(a);for(e=[];k;)e.push(k),k=Hj(a);if(!a.A)e.forEach(l=>{h=h.then(()=>c(!1,l))});else if(0<e.length){k=e[0];if(1<e.length){k=e[0];const l=e[e.length-1],m=l.end-k.start;k={start:k.start,end:l.end,length:m,data:new DataView(a.j.a.buffer,k.start,m),count:e.length}}(e=
64
+ c(!1,k))&&(h=e)}}return h.then(()=>Ij(a,b,c,d))})};
65
+ Gj=function(a){const b=a.a;if(a.a+4>=a.f)return a.a=a.f,null;var c=Jj(a);if(a.a+4>=a.f)return a.a=a.f,null;var d=Jj(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.l.getUint32(a.a,!1),e=a.l.getUint32(a.a+4,!1)}catch(g){throw new _.I(_.F,3,3E3);}if(2097151<f)throw new _.I(_.F,3,3E3);a.a+=8;c=f*Math.pow(2,32)+e}}c=b+c;a.o=c;return a.f>=c?(a.a=c,{name:d,start:b,end:c}):null};
66
+ Jj=function(a){const b=a.l.getUint32(a.a,!1);a.a+=4;return b};Nj=function(){if(Kj)return Kj;Lj||(Lj=new _.Mj(()=>{Kj=null}));(Kj=document.querySelector(_.t)||document.querySelector(_.q))||(Kj=document.createElement(_.t));Lj.la(1);return Kj};_.Oj=function(){return!!navigator.userAgent.match(/Edge?\//)};_.Pj=function(a){return(navigator.userAgent||"").includes(a)};_.Qj=function(a){return _.Pj("Tizen"+(a?" "+String(a):""))};
67
+ Sj=function(a){const b={major:-1,name:_.ig};if(!a)return b;var c=a.replace(/_/g,".");b.name=c;c=c.split(".");1<=c.length&&(b.major=Rj(a,c[0]));2<=c.length&&(b.minor=Rj(a,c[1]));3<=c.length&&(b.patch=Rj(a,c[2]));4<=c.length&&(b.build=Rj(a,c[3]));return b};_.Tj=function(){return _.Pj("Web0S")};_.Vj=function(){return _.Tj()&&79===_.Uj().major};
68
+ _.Uj=function(){const a=Wj();const b=["ie","edge","opera","firefox","safari",Yc];var c=Xj();const d=Yj[c];for(let e=0,f=b.length;e<f;e++)if(c=d[b[e]]&&a.match(d[b[e]]))return Sj(c[1]);return Sj("")};_.Zj=function(){return _.Pj("CrKey")};_.ak=function(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!_.Qj()};_.bk=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:_.ak()&&1<navigator.maxTouchPoints};_.ck=function(){return/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)};
69
+ Rj=function(a,b){try{return parseInt(b,10)}catch(c){dk.warn("Unable to parse version number for '"+b+"' from '"+a+"'")}return-1};ek=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};
70
+ Xj=function(){const a=Wj();if(!a)return fk;var b=a.match(/^.+?(?=\))/);if(!b)return fk;b=b[0];if(ek(b,["iphone","ipad"]))return gk;if(ek(b,["android"]))return hk;if(ek(b,["macintosh"]))return ik;if(ek(b,["windows nt"]))return jk;if(ek(b,["tizen"]))return kk;if(ek(b,["web0s"]))return lk;if(ek(b,["linux"]))return mk;dk.warn("Unable to identify OS from user agent: "+a);return fk};Wj=function(){let a=window.navigator.userAgent;return a=a.toLowerCase()};
71
+ _.ok=function(){var a=Xj();var b=Xj();var c=Yj[b];if(c){c=Wj().match(c.os_version)[1];c=Sj(c);if(b===jk)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=Sj("");a:{c=Wj();const e=["ie","edge","opera","firefox","safari",Yc];var d=Xj();d=Yj[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=nk}return{os:a,osVersion:b,browser:c,browserVersion:_.Uj()}};
72
+ sk=function(a){var b=new pk;for(const e in a.headers)b.append(e.toLowerCase(),a.headers[e]);const c=new qk,d={Uc:!1,yg:!1};b={U:rk(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.Uc||(d.Uc=!0,c.abort());return Promise.resolve()}};if(a=a.timeout){const e=window.setTimeout(()=>{d.yg=!0;c.abort()},a);b.U=b.U.finally(()=>{window.clearTimeout(e)})}return b};
73
+ rk=function(a,b,c,d){return _.w(function*(){const e=new yj,f=zj(e);try{const g=yield tk(a,c),h=kj(g.headers),k={uri:g.url,data:null,headers:h,status:g.status,timeMs:0,responseStartMs:xj(f),request:b};if(!nj(g.status))throw k.data=yield g.arrayBuffer(),k.timeMs=xj(e),pj(k);const l=g.headers.get(ta);rj(b,l);const m=l?parseInt(l,10):0;if(b.onFragment&&!b.disableFragmentSupport&&2===b.type){const n=g.body.getReader(),p=new uk(m,!b.disableMergedFragments);k.data=yield Ij(p,n,(u,v)=>{if(d.Uc)return null;
74
+ v&&v.data&&(sj(b,v.data.byteLength,xj(f)),f.a=wj());return b.onFragment&&v?b.rateLimitBps?tj(b.rateLimitBps,xj(e),b.bytesLoaded).then(()=>b.onFragment(v)):b.onFragment(v):null},b.onProgress)}else{const n=g.body.getReader(),p=yield Dj(new vk(m),n,b);b.rateLimitBps&&(yield tj(b.rateLimitBps,xj(e),p.byteLength));k.data=p}if(d.Uc)throw Error("Request was aborted");k.timeMs=xj(e);return oj(k)}catch(g){if(d.Uc)throw new _.I(1,1,7001,{url:a,request:b});if(d.yg)throw new _.I(1,1,1003,{url:a,request:b});if(g&&
75
+ 1001===g.code)throw g;_.vh("Error while fetching data:",g);throw new _.I(1,1,1002,{url:a,error:g,request:b,status:-1},g);}})};
76
+ yk=function(a){const b=a.uris[a.uriIndex],c=new wk,d=new yj,e=zj(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(m){m=m.target;m.readyState>=XMLHttpRequest.LOADING&&0===f&&(g=xj(e));m.readyState>=XMLHttpRequest.HEADERS_RECEIVED&&!k&&(m=m.getResponseHeader(ta),rj(a,m),k=!0)};c.onload=function(m){m=m.target;var n=(m.getAllResponseHeaders()||"").trim().split("\r\n");
77
+ const p={};for(const u of n)n=u.split(": "),p[n[0].toLowerCase()]=n.slice(1).join(": ");try{const u=xj(e);l||sj(a,m.response?m.response.length:0,u);const v=_.qj(p,m.response,m.status,b,m.responseURL,a,u,g);a.rateLimitBps?tj(a.rateLimitBps,xj(e),a.bytesLoaded).then(()=>{h.resolve(v)}):h.resolve(v)}catch(u){h.reject(u)}};c.onerror=function(m){m=m.target;if(0>=m.status)h.reject(new _.I(1,1,1002,{url:b,request:a,status:m.status}));else{var n=m.getAllResponseHeaders();const u={};if(n){n=n.trim().split("\r\n");
78
+ for(var p of n)n=p.split(": "),u[n[0].toLowerCase()]=n.slice(1).join(": ")}p=_.qj(u,m.response,m.status,b,m.responseURL,a,xj(e),g);h.resolve(p)}};c.ontimeout=function(){h.reject(new _.I(1,1,1003,{url:b,request:a}))};c.onprogress=function(m){const n=xj(d);d.a=wj();if(100<n||m.lengthComputable&&m.loaded===m.total)sj(a,m.loaded-f,n),f=m.loaded,l=!0};for(const m in a.headers)c.setRequestHeader(m.toLowerCase(),a.headers[m]);c.send(a.body);return{U:h,request:a,abort:()=>{c.abort();h.reject(new _.I(1,1,
79
+ 7001,{url:b,request:a}));return Promise.resolve()}}};_.Ak=function(a,b=!0){a=_.zk(a).replace(/\+/g,"-").replace(/\//g,"_");return b?a:a.replace(/[=]*$/,"")};_.zk=function(a){a=Ai(_.G(a));return btoa(a)};_.Bk=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};_.Ck=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};
80
+ _.Dk=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};_.Ek=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};_.Fk=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};
81
+ Hk=function(a){try{const b=a.uris[a.uriIndex],c=_.Gk(b);return{U:Promise.resolve({uri:b,data:c.data,request:a,headers:{"content-type":c.contentType}}),request:a,abort:()=>Promise.resolve()}}catch(b){return{U:Promise.reject(b),request:a,abort:()=>Promise.resolve()}}};
82
+ _.Gk=function(a){var b=a.split(":");if(2>b.length||"data"!==b[0])throw _.vh("Bad data URI, failed to parse scheme"),new _.I(_.F,1,1004,{uri:a});b=b.slice(1).join(":").split(",");if(2>b.length)throw _.vh("Bad data URI, failed to extract encoding and MIME type"),new _.I(_.F,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?_.Bk(a).buffer:_.Fi(a).buffer,contentType:c}};
83
+ Kk=function(a){a.h=a.B.then(e=>{a.j=e.request;e.request.uriIndex=e.request.currentAttempt%e.request.uris.length;if(0<e.request.currentAttempt){-1===a.f&&(a.f=Ik(e.request.baseDelay,1E3));const f=a.f*(1+(2*Math.random()-1)*Ik(e.request.fuzzFactor,.5));a.f*=Ik(e.request.backoffFactor,2);if(0<f)return(new Promise((g,h)=>{a.l=h;Jk(a,()=>{g(e.plugin(e.request))},f)})).catch(g=>{if(!a.a)throw g;})}if(a.a)throw new _.I(1,1,7001,{url:e.request.uris[e.request.uriIndex],request:e.request});return e.plugin(e.request)});
84
+ let b=0,c=0,d=0;return a.h.then(e=>{const f=e.request;f.currentAttempt+=1;b=f.currentAttempt;c=f.maxAttempts;d=f.uris.length;return e.U}).then(e=>{a.w.resolve(e)}).catch(e=>{if(e instanceof _.I){const f=b<d,g=7001!==e.code,h=b<c;if((1===e.severity||f)&&g&&h)return Kk(a);g&&e.a(_.F);a.w.reject(e)}else a.w.reject(e)})};Jk=function(a,b,c){a.o=setTimeout(b,c)};Ik=function(a,b){return null===a||void 0===a?b:a};
85
+ Lk=function(a,b){return _.w(function*(){const c=yield a.fetch(b);return _.Bi(c.data).replace(/\r\n|\r(?=[^\n]|$)/gm,"\n")})};Mk=function(a,b){return _.w(function*(){const c=yield Lk(a,b);if(!c)return null;try{const d=JSON.parse(c);if(null==d||typeof d!==_.Fe)throw Error("Not an object");return d}catch(d){throw new _.ni("Failed to parse JSON response","json-failed");}})};
86
+ _.Qk=function(a,b,c){if(a.A)return new Nk(Promise.reject(new _.I(1,1,7001,{url:b.uris[b.uriIndex],request:b})));a.o&&0<a.o&&(b.rateLimitBps=a.o);var d=[];for(const h of a.h)d.push(h);if(b.requestModifiers)for(const h of b.requestModifiers)d.push(h);b.requestModifiers=d;Ok(a,b);d=[];for(var e of a.j)d.push(e);if(b.responseModifiers)for(var f of b.responseModifiers)d.push(f);b.responseModifiers=d;let g;f=e=new _.xk;try{const h=[{type:"public",modifiers:b.requestModifiers},{type:"internal",modifiers:a.f}];
87
+ for(const k of h)for(const l of k.modifiers)f=f.then(m=>{if(g.a)throw new _.I(_.F,1,7001,m?{url:m.uris[m.uriIndex],request:m}:null);return"internal"===k.type?l(m,c)||m:l(m)||m}).catch(m=>{if(m instanceof _.I)throw m;throw new _.I(_.F,1,1006,null,m);});f=f.then(k=>({request:k,plugin:Pk(a,k)}));g=new Nk(f);for(const k of b.responseModifiers)g.then(l=>{const m=()=>{if(g.a)throw new _.I(_.F,1,7001,l?{url:l.request.uris[l.request.uriIndex],request:l.request}:null);};m();const n=k(l)||l;m();return n}).catch(l=>
88
+ {if(l instanceof _.I&&l.data&&l.data.response){const m=k(l.data.response);if(m&&m.then)return m.then(()=>Promise.reject(l))}return Promise.reject(l)}).catch(l=>{if(l instanceof _.I)throw l;throw new _.I(_.F,1,1007,null,l);});for(const k of a.l)g.catch(l=>{l instanceof _.I&&l.data&&l.data.response||k({uri:b.uris[b.uriIndex],data:(new Uint8Array(0)).buffer,status:-1,timeMs:0,headers:{},request:b});return Promise.reject(l)}).catch(l=>{if(l instanceof _.I)throw l;throw new _.I(_.F,1,1007,null,l);});_.vj(a.w,
89
+ g);e.resolve(b);return g}catch(h){return new Nk(Promise.reject(h))}};Ok=function(a,b){for(const c of a.headers){const [d,e]=c;b.headers[d]||(b.headers[d]=e)}};Pk=function(a,b){b=b.uris[b.uriIndex];var c=new _.Ui(b,location.href);c=c?c.a.protocol.slice(0,-1):"";const d=a.a[c];if(!d)throw new _.I(_.F,1,1E3,{url:b});return e=>d(e)};
90
+ Rk=function(a,b,c,d){d=void 0===d?"HEAD":d;return _.w(function*(){if(!navigator.onLine)return!1;if(b){const e=_.mj(b,c);e.method=d;c||(e.timeout=5E3);e.headers["cache-control"]="no-cache";try{yield a.fetch(e).U}catch(f){if(1002===f.code||1003===f.code)return!1}}return!0})};Sk=function(a){return`@@scheme:${a.scheme||""}`+`@@value:${a.value}`+`@@id:${a.id||""}@@type:${a.type||""}`+`@@protocol:${a.protocol||""}`};_.Tk=function(a){return a&&a!==_.hg?a:null};
91
+ Vk=function(a){if(!a)throw new _.I(_.F,3,3101,`Invalid track type: ${a}`);if(!_.gh(a))throw new _.I(_.F,3,3101,`Invalid track type: ${a}. Track type must be a string!`);switch(a.toLowerCase()){case _.K:return _.K;case _.L:return _.L;case _.M:return _.M;case Uk:return Uk}throw new _.I(_.F,3,3101,`Unknown track type: ${a}.`);};
92
+ Yk=function(a,b){a=Vk(a);const c=_.Tk(b.kind);let d=b.id;d||(d=String(_.Wk++));a=new _.Xk(d,c===_.ye?Uk:a);a.kind=c;a.label=_.Tk(b.label);a.language=_.Tk(b.language);a.originalLanguage=b.originalLanguage||a.language;return a};Zk=function(a,b){return _.w(function*(){const c=_.mj(b);return yield Lk(a.f,c)})};
93
+ dl=function(a,b,c){return _.w(function*(){const {mimeType:d,renditions:e}=yield $k(a,b,c),f=new _.Xk("dummy",_.M),g=e.map((h,k)=>{k=new _.al(`R${k}`,f);k.bandwidth=h.bandwidth;k.Sc=h.Sc;k.codec=h.codec;k.width=h.width;k.height=h.height;return k});bl(g);return{renditions:g,mimeType:d||void 0}})};
94
+ fl=function(a){a=a.split("\n").filter(c=>c.trim().startsWith("#EXT-X-MEDIA:")).map(c=>el(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};$k=function(a,b,c){return _.w(function*(){const d=gl(b),e=hl(b,c);return{mimeType:yield il(a,e,d[0]?d[0].codec:null),renditions:d}})};
95
+ bl=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.");};el=function(a){const b=_.gj(0,a);a=d=>(d=b.getAttribute(d))?d.value:void 0;var c=a(_.sb);c=null!=c?{AUDIO:_.L,VIDEO:_.M,SUBTITLES:_.K}[c]:void 0;return{type:c,groupId:a(_.Fa),name:a(_.Ta),language:a(_.La),Oi:a("AUTOSELECT"),default:a("DEFAULT"),Wi:a("FORCED"),Df:a("CHARACTERISTICS"),uri:a(_.ub)}};
96
+ gl=function(a){return a.split("\n").filter(b=>b.trim().startsWith("#EXT-X-STREAM-INF:")).map(b=>{var c=_.gj(0,b);if(c.getAttribute(_.Cb))throw Error("Playlist contains alternative video streams.");var d=_.J(c,_.lb);b=d?Number(d.split("x")[0]):null;d=d?Number(d.split("x")[1]):null;var e=_.J(c,_.ma);e=e?Number(e):null;var f=_.J(c,"AVERAGE-BANDWIDTH");f=f?Number(f):null;c=_.J(c,_.pa);c=_.jl(_.t,c?c.split(","):[]);return b={bandwidth:e,Sc:f,codec:c,width:b,height:d,mimeType:null}})};
97
+ hl=function(a,b){return(a=a.split("\n").filter(c=>c.trim().endsWith(".m3u8"))[0])?_.Ti(a,b):null};il=function(a,b,c){return _.w(function*(){if(!b||!c)return null;var d=yield Zk(a,b);d=[kl(d,b),ll(d,b)].filter(Boolean);return _.ml(d,_.t,c)})};kl=function(a,b){return(a=a.split("\n").find(c=>!c.startsWith("#")&&0<c.trim().length))?_.Ti(a,b):null};ll=function(a,b){a=a.split("\n").find(c=>c.startsWith("#EXT-X-MAP:"));return a?(a=_.J(_.gj(0,a),_.ub))?_.Ti(a,b):null:null};
98
+ pl=function(a,b){var c=nl;ol.set(`${a.toLowerCase().split(";")[0]}-${c}`,{priority:c,plugin:b})};_.tl=function(a,b){var c=[ql,rl,sl,nl];for(const d of c)if(c=ol.get(`${a.toLowerCase().split(";")[0]}-${d}`)){const e=c.plugin(),f=e.isSupported(a,b);e.destroy();if(f)return c.plugin}return null};_.ul=function(a,b){b&&(a+=';codecs\x3d"'+b+'"');return a.replace(/\s/g,"")};_.vl=function(a){return a.split(";")[0]};
99
+ _.wl=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(","):""};_.yl=function(a,b,c){for(const d of _.xl)if(d.probe(b,c))return d.create(a);return null};_.zl=function(a){a=_.xl.indexOf(a);0<=a&&_.xl.splice(a,1)};Al=function(a,b,c){return a.type!==c?!1:void 0!==b.id&&null!==b.id&&""!==b.id?a.id===b.id:_.ih(a,{kind:_.Tk(b.kind),language:_.Tk(b.language),label:_.Tk(b.label)},["kind","language","label"])};
100
+ Bl=function(a){return a.enabled||a.selected||a.mode===_.Gf||a.mode===_.be};Dl=function(a,b,c){return Cl(a)&&b===_.M&&!!c.enableHlsVideoTrackInfo};El=function(a,b,c){return _.w(function*(){var d=a.m.getLoadedSource();d&&a.j&&(d=yield a.j.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})))})};Fl=function(a,b,c){return Cl(a)&&(b===_.L||b===_.K)&&!!c.enableMetadata};
101
+ Gl=function(a,b,c){return _.w(function*(){var d=a.m.getLoadedSource();d&&a.j&&(d=yield a.j.a(d.url,c),d.wc&&(d=d.wc.get(`${b.type}:${b.label}`))&&d.Df&&(b.accessibility=d.Df.split(",").map(e=>e.trim()).map(e=>({value:e,type:b.type,protocol:"HLS"}))))})};Hl=function(a,b){return a.h.filter(c=>c.type===b)};Il=function(a){(a=a.m.getTextDisplayer())&&a.remove(0,Infinity)};Kl=function(a,b){if(a=Jl(a,b))a=Array.from(a),b===_.K&&(a=a.filter(c=>c.kind!==_.ye));return a};
102
+ Jl=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 _.L:return a.audioTracks;case _.M:return a.videoTracks;case _.K:return a.textTracks;default:return null}};Ll=function(a,b){return(a=a.a.get(b)||null)&&a.renditions[0]};Ml=function(a,b){return(a=a.l.get(b))&&a.renditions[0]};
103
+ Nl=function(a,b,c){const d=Kl(a,b);if(c){if(void 0===a.h.find(f=>f.id===c.id))throw Error(`Unknown track with ID ${c.id} and type ${b}`);if(c.type!==b)throw Error(`Types mismatch for track ${c.type} and arg ${b}`);a.g.debug("Activate track type "+b+" with ID: "+c.id);if(d){a.l.set(b,c);let f;var e=!0;let g=!1;switch(b){case _.K:f="mode";e=_.Gf;g=_.Cd;break;case _.L:f="enabled";break;case _.M:f="selected"}if(f)for(const h of d)h[f]=Al(c,h,c.type)?e:g}}else if(a.g.debug("Disable track type "+b),a.a.get(b)&&
104
+ d&&b===_.K){for(e of d)e.mode=_.Cd;a.a.set(b,null)}b===_.L?a.m.trigger(new _.C(_.Jc)):b===_.K&&a.m.trigger(new _.C(_.Yf))};Ol=function(a,b,c){if(a.m){var d=a.m.getSurface().getMedia();if(d){var e=document.createElement("track");e.id=c;e.kind=b.kind;e.srclang=b.language;b.label&&(e.label=b.label);e.src=_.Li(b.url)?URL.createObjectURL(new Blob([])):b.url;d.appendChild(e);a.I.push(e)}}};
105
+ Pl=function(a,b){return _.w(function*(){var c=a.m.getConfiguration();if(c=_.yl(c,b.mimeType,_.Wf)){var d=_.mj(b.url),e={objectType:b.mimeType===_.vc?"tt":"c"};(e=yield _.Qk(a.m.getNetworkEngine(),d,e).U)&&e.data&&(d="External_"+`${a.G++}`,a.o[d]=b,c=c.a(_.G(e.data)),c={url:URL.createObjectURL(new Blob([c])),kind:b.kind,language:b.language,label:b.label,mimeType:_.Wf},Ol(a,c,d))}else a.g.warn("Track MIME type is not supported",b)})};
106
+ Cl=function(a){a=a.m.getLoadedSource();return!(!a||a.type!==_.Ql&&!a.url.endsWith(".m3u8"))&&_.ak()};Rl=function(a,b,c){c=_.di(c).filter(e=>e);a.g.info("Find preferred tracks for",b,c);const d=Hl(a,b);c.some(e=>{const f=_.$i(e);return(e=d.find(g=>{g=_.$i(g.language||"");return _.aj(f,g)}))?(a.g.info("Will select track with id",e.id),Nl(a,b,e),!0):!1})};Tl=function(a){return a.name===ab&&Sl.some(b=>a.message.startsWith(b))};
107
+ _.Xl=function(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&_.bk()&&(a=360);const b=_.ij();b.maxAttempts=3;a={source:"",license:Ul,viewerId:void 0,autoplay:void 0,pauseWhenInBackground:!1,ads:{hls:{enable:!0,resolutionOffsetSec:35}},manifest:{attemptParameters:_.ij(),availabilityWindowOverride:NaN,clockSyncUri:"",ignoreDrmInfo:!1,xlinkFailGracefully:!1,autoCorrectDrift:!0,timeline:{version:1,type:void 0}},abr:{enabled:!0,defaultBandwidthEstimate:1E3,switchInterval:8,bandwidthUpgradeTarget:.85,
108
+ bandwidthDowngradeTarget:.95,useSwitchIntervalForInitialSwitch:!1,restrictions:Vl(a),useCmsd:!0},contentSteering:{enabled:!0,attemptParameters:_.ij()},drm:null,cmcd:{enabled:!1,version:1,rtpMultiplier:5,deliveryMode:"headers"},enableHtmlCue:!0,preferredAudioLanguage:"",preferredTextLanguage:"",preferredAudioRole:_.re,preferredTextRole:"",preferredAudioChannelCount:2,preferredAudioCodec:[],preferredVideoCodec:[],preferSpatialAudio:!1,preferForcedSubtitles:!1,volume:null,startTime:null,loop:!1,lowLatencyMode:!1,
109
+ suggestedPresentationDelay:void 0,muted:void 0,forceWaitForTracks:!1,xmlParser:_.Wl,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,
110
+ 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},mediaSource:{codecSwitchingStrategy:_.of},restrictions:Vl(),tizen:{sideStreamText:_.Qj(2)},safari:{enableHlsVideoTrackInfo:!1,enableMetadata:!1},mse:{sendPlaybackSessionIdHeader:!1},trickPlay:{speedUpMode:_.Ad,
111
+ preferTrickPlayTracks:!0},playlist:{timeline:"basic",content:_.Db,cropTimeline:!1},yospace:{enabled:!1},cmsd:{enabled:!0},mediatailor:{enabled:!1,sessionConfig:{}},disableRestrictions:!1};if(_.Qj()||_.Tj())a.ads.hls.enable=!1;if(_.Pj("Edge/")||_.Qj())a.streaming.gapDetectionThreshold=.5;_.Tj()&&(a.streaming.stallEnabled=!1);_.Vj()&&(a.streaming.stallEnabled=!0,a.streaming.stallThreshold=1,a.streaming.stallSkip=1,a.streaming.gapDetectionThreshold=.02);_.Qj()&&(a.streaming.stallEnabled=!0,a.streaming.stallThreshold=
112
+ 1,a.streaming.stallSkip=0);a.vr={enable:!1,attachMouseListener:!0,fieldOfView:70,sensitivity:1,invertHorizontalControl:!1,invertVerticalControl:!1};return a};Vl=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}};
113
+ _.Zl=function(...a){if(!a)return _.Xl();var b=[_.Xl()];let c=!1;for(let d of a)null!==d&&void 0!==d&&(_.gh(d)&&(d={source:d}),d.lowLatencyMode&&!c&&(b.push({streaming:{rebufferingGoal:.1,bufferLimitUpdateInterval:.01,attemptParameters:{maxAttempts:3,baseDelay:250,backoffFactor:1}},abr:{bandwidthUpgradeTarget:.6,bandwidthDowngradeTarget:.95},manifest:{lowLatencyMode:!0}}),c=!0),b.push(d),null!=d.suggestedPresentationDelay&&b.push({manifest:{suggestedPresentationDelay:d.suggestedPresentationDelay}}));
114
+ a=_.$g.apply(null,b);_.gh(a.volume)&&(""===""+a.volume?a.volume=null:a.volume=Number(a.volume));if(!_.z(a.volume)&&(!_.hh(a.volume)||jh(a.volume)))throw new _.I(_.F,7,7100,"config.volume is not a number");if(!_.z(a.preferredTextLanguage)&&!_.gh(a.preferredTextLanguage)&&!Array.isArray(a.preferredTextLanguage))throw new _.I(_.F,7,7100,"config.preferredTextLanguage is not a string or an array");if(!_.z(a.preferredAudioLanguage)&&!_.gh(a.preferredAudioLanguage)&&!Array.isArray(a.preferredAudioLanguage))throw new _.I(_.F,
115
+ 7,7100,"config.preferredAudioLanguage is not a string or an array");if(!_.z(a.preferredAudioCodec)&&!_.gh(a.preferredAudioCodec)&&!Array.isArray(a.preferredAudioCodec))throw new _.I(_.F,7,7100,"config.preferredAudioCodec is not a string or an array");if(!_.z(a.preferredVideoCodec)&&!_.gh(a.preferredVideoCodec)&&!Array.isArray(a.preferredVideoCodec))throw new _.I(_.F,7,7100,"config.preferredVideoCodec is not a string or an array");if(!_.z(a.drm)){if(a.drm.env&&!_.gh(a.drm.env))throw new _.I(_.F,7,
116
+ 7100,"config.drm.env is not a string");if(a.drm.offlineId&&!_.gh(a.drm.offlineId))throw new _.I(_.F,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(!_.hh(b.bufferingGoal)||jh(b.bufferingGoal))throw new _.I(_.F,7,7100,"config.streaming.bufferingGoal is not a number");if(!_.hh(b.rebufferingGoal)||
117
+ jh(b.rebufferingGoal))throw new _.I(_.F,7,7100,"config.streaming.rebufferingGoal is not a number");if(b.rebufferingGoal>b.bufferingGoal)throw new _.I(_.F,7,7100,"config.streaming.rebufferingGoal must be \x3e\x3d bufferingGoal");if(!_.hh(b.bufferBehind)||jh(b.bufferBehind))throw new _.I(_.F,7,7100,"config.streaming.bufferBehind is not a number");if(!_.hh(b.smallGapLimit)||jh(b.smallGapLimit))throw new _.I(_.F,7,7100,"config.streaming.smallGapLimit is not a number");if(!_.hh(b.durationBackoff)||jh(b.durationBackoff))throw new _.I(_.F,
118
+ 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 _.I(_.F,7,7100,"Invalid value for |manifest.availabilityWindowOverride|");Yl(a.restrictions);Yl(a.abr.restrictions);a.abr.initialRestrictions&&Yl(a.abr.initialRestrictions)}return a};
119
+ Yl=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);
120
+ 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 _.I(_.F,7,7100,"Restrictions contain NaN");};$l=function(a){return typeof a===_.Fe&&!Array.isArray(a)&&"source"in a};_.bm=function(a){return _.am.get(a)||null};
121
+ _.dm=function(a){_.am.get(a.id())?cm.warn("Component already in use."):_.am.set(a.id(),a)};em=function(a){return Array.from(_.am.values()).find(b=>b instanceof a)||null};fm=function(a){for(const b of _.am.values())a(b)};gm=function(a){fm(b=>{b.o(a)})};hm=function(a){fm(b=>{b.h(a)})};im=function(){fm(()=>{})};jm=function(){fm(()=>{})};km=function(a){if(null!==em(a))return null;a=new a;a.f();_.dm(a);cm.info("Installed component:",a.id());return a};
122
+ lm=function(a){if(a=em(a))a.a(),_.am.delete(a.id()),cm.info("Uninstalled component:",a.id())};mm=function(a,b){3===b.type&&(a.f&&(a.g.debug("Attaching tracking token"),b.headers[Kg]=a.f),a.a&&(b.headers[Lg]=a.a))};
123
+ nm=function(a,b){return b.request&&3===b.request.type&&(a.f=b.headers[Kg],a.a=b.headers[Lg],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(_.Bi(_.Bk(b))),{delay:a.renewalPeriod,Ki:{maxAttempts:a.retryCount,baseDelay:1E3*a.retryPeriod,backoffFactor:1,fuzzFactor:0,timeout:0}}):null};_.pm=function(a){_.om[a.I]=a};
124
+ _.rm=function(a){const b={attemptParameters:_.ij(),enforceSingleSession:!1,delayLicenseRequestUntilPlayed:!1,enableSessionCacheForSkd:!1,ignoreUnrecognizedInitData:!0,Ha:{},widevineVersion:_.ud};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!==
125
+ a.ignoreUnrecognizedInitData&&(b.ignoreUnrecognizedInitData=!!a.ignoreUnrecognizedInitData),typeof a.widevineVersion===_.Qf&&0<a.widevineVersion.length&&(b.widevineVersion=a.widevineVersion),a.env)){const c=_.om[a.env]||null;if(!c)throw _.uh(_.wa,_.ib+a.env+_.aa),new _.I(_.F,6,6015,`DRM environment '${a.env}' is missing.`);b.Ha=_.qm(c,a.customData)||{};_.Ii(a.env.toLowerCase(),Od)&&(b.enforceSingleSession=!0)}return b};
126
+ tm=function(a){a=sm[a];if(!a)return null;const b=_.ok();return b.os===hk&&4===b.osVersion.major&&4===b.osVersion.minor?null:new Uint8Array(a)};
127
+ _.qm=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;var g=a.f[_.ud];if(g){var h=g.licenseUrl;d=pi(d,g.videoRobustness);e=pi(e,g.audioRobustness);var k=g.modifiers,l=oi(b?b.widevineDistinctiveIdentifierRequired:void 0,g.distinctiveIdentifierRequired,!1),m=oi(b?b.widevinePersistentStateRequired:void 0,g.persistentStateRequired,!1);g=void 0===f?g.serverCertificate:null===f?null:typeof f===_.Qf?tm(f):f;c[_.ud]=
128
+ {licenseUrl:h,videoRobustness:d,audioRobustness:e,modifiers:k,distinctiveIdentifierRequired:l,persistentStateRequired:m,serverCertificate:g}}(g=a.f[_.qd])&&(c[_.qd]={licenseUrl:g.licenseUrl,certificateUrl:g.certificateUrl,modifiers:g.modifiers});h=b?b.playReadyVideoRobustness:void 0;b=b?b.playReadyAudioRobustness:void 0;(g=a.f[_.sd])&&(c[_.sd]={licenseUrl:g.licenseUrl,videoRobustness:h||g.videoRobustness,audioRobustness:b||g.audioRobustness,individualizationServer:g.individualizationServer,useLegacySystem:g.useLegacySystem,
129
+ modifiers:g.modifiers});return c};_.um=function(){throw new _.I(_.F,3,3E3);};_.vm=function(a,b,c){const d=c||0;c=b.byteLength-d;const e=_.G(a.f.buffer);b=_.G(b.buffer,d,c);try{e.set(b,a.a),a.a+=c}catch(f){_.um()}};_.N=function(a,b){try{a.f.setUint32(a.a,b,a.h),a.a+=4}catch(c){_.um()}};_.wm=function(a){return a.a<a.f.byteLength};_.xm=function(){throw new _.I(_.F,3,3E3,"Buffer read out of bounds.");};_.ym=function(a){try{const b=a.f.getUint8(a.a);a.a+=1;return b}catch(b){_.xm()}};
130
+ _.zm=function(a){try{const b=a.f.getUint16(a.a,a.h);a.a+=2;return b}catch(b){_.xm()}};_.O=function(a){try{const b=a.f.getUint32(a.a,a.h);a.a+=4;return b}catch(b){_.xm()}};_.Am=function(a){try{const b=a.f.getInt32(a.a,a.h);a.a+=4;return b}catch(b){_.xm()}};_.Bm=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){_.xm()}if(2097151<c)throw new _.I(_.F,3,3001);a.a+=8;return c*Math.pow(2,32)+b};
131
+ Cm=function(a,b){const c=new Uint8Array(b);for(let d=0;d<b;d++)c[d]=_.ym(a);return c};_.Dm=function(a,b){a.a+b>a.f.byteLength&&_.xm();var c=a.a+a.f.byteOffset;c=a.f.buffer.slice(c,c+b);a.a+=b;return _.G(c)};Em=function(a){let b=0;for(let c=0;c<a.length;c++)b=b<<8|a.charCodeAt(c);return b};_.Fm=function(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)};_.Gm=function(a){for(;_.wm(a.reader)&&!a.parser.a;)a.parser.ce(a.start+a.headerSize,a.reader,a.partialOkay)};
132
+ _.Hm=function(a){for(let b=_.O(a.reader);0<b&&!a.parser.a;--b)a.parser.ce(a.start+a.headerSize,a.reader,a.partialOkay)};_.Im=function(a){return b=>{const c=b.reader.Ma()-b.reader.getPosition();a(_.Dm(b.reader,c))}};_.Jm=function(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)};Km=function(a){let b="";try{b=_.Ei(a)}catch(c){}return b};_.Mm=function(a){a=Km(a);let b="";a.length&&(b=(new _.Lm(a)).a);return b};
133
+ Rm=function(a){if(!a)return null;let b=null;try{const c=JSON.parse(_.Bi(a)),d=_.Bk(c.sinf[0]);(new _.Nm).N(_.Jf,_.Gm).N("schi",_.Gm).N("tenc",e=>{e.reader.skip(6);_.ym(e.reader)&&(e.reader.skip(1),b=_.Dk(_.Dm(e.reader,16)));e.parser.stop()}).parse(d)}catch(c){}return b};
134
+ Tm=function(a,b,c){if(!c||!c.byteLength)throw new _.I(_.F,6,6102);let d;typeof b===_.Qf?d=_.Gi(b,!0):d=b;a=_.Gi(Km(a),!0);b=new _.Sm(12+a.byteLength+d.byteLength+c.byteLength,!0);_.N(b,a.byteLength);_.vm(b,_.G(a));_.N(b,d.byteLength);_.vm(b,_.G(d));_.N(b,c.byteLength);_.vm(b,_.G(c));return _.G(b.buffer)};_.Um=function(a){var b=_.G(a.body);b=_.Ak(b);a.headers[ua]=Cc;a.body=_.Fi("spc\x3d"+b).buffer};
135
+ _.Vm=function(a){let b;try{b=_.Bi(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=zi(_.Bk(b))};$m=function(a,b){b=Wm(b);if(a===_.ud)return b+Xm;if(a===_.sd)return b+Ym;if(a===_.qd)return b+Zm;throw Error("Unknown DRM Key-System '"+a+"'. Can not infer license URL!");};
136
+ _.cn=function(a,b,c,d){d=void 0===d?!0:d;c=a.drm;c&&c.env.startsWith(ya)?c.customData&&(_.bn(b,a),a=b.uris[0],d&&c.customData.assetId&&(a+="?assetId\x3d"+encodeURI(`${c.customData.assetId}`),c.customData.variantId&&(a+="\x26variantId\x3d"+encodeURI(`${c.customData.variantId}`)),b.uris[0]=a)):an.warn(Ua)};
137
+ _.dn=function(a,b){try{const c=_.G(b.data),d=JSON.parse(String.fromCharCode.apply(null,c));an.debug("Widevine License response",d);const e=atob(d.license),f=new Uint8Array(e.length);for(a=0;a<e.length;++a)f[a]=e.charCodeAt(a);b.data=f.buffer}catch(c){an.debug("Unable to parse DRMtoday response JSON, assuming the response contained raw data")}};
138
+ _.fn=function(a,b,c){var d=c&&c.customData&&c.customData.fpsContentId;_.cn(a,b,c,!1);b.headers[ua]=Cc;c={spc:_.zk(b.body)};if((a=a.drm)&&a.env.startsWith(za)&&d){a={};var e=Si((new _.Lm(en(d))).f);d=e.keyId;if(e=e.assetId)an.info("Applying assetId from HLS manifest."),a.assetId=e;d&&(an.info("Applying keyId from HLS manifest."),a.keyId=d);d=a;d.keyId&&(an.info("Adding keyID to FPS payload:",d.keyId),c.keyId=d.keyId);d.assetId&&(an.info("Adding assetID to FPS payload:",d.assetId),c.assetId=d.assetId)}b.body=
139
+ _.Hi(_.Ri(c,!0))};_.gn=function(a,b){an.debug("Clearing response data");200===b.status&&(a=_.Bi(b.data).trim(),"\x3cckc\x3e"===a.substr(0,5)&&"\x3c/ckc\x3e"===a.substr(-6)&&(a=a.slice(5,-6)),b.data=_.Bk(a).buffer)};
140
+ _.hn=function(a,b,c){b=Km(b);c=c&&c.customData?c.customData:{};b=new _.Lm(en(b));const d=Si(b.f);if(a&&a.drm&&a.drm.customData){var e=a.drm.customData;a=e.assetId;e=e.variantId;a&&_.Ki(`${a}`)&&(d.assetId=a,an.debug("Using assetId from the configuration instead of the value from the HLS manifest."));e&&_.Ki(`${e}`)&&(d.variantId=e,an.info("Using variantId from the configuration instead of the value from the HLS manifest."))}d.keyId?(a=["keyId"],an.debug("KeyId found in FPS SKD. Removing other parameters")):
141
+ a=["assetId","variantId"];b.f=_.Ri(d,!1,a);"/"!==b.path||b.j.includes(`${b.a}/`)||(b.path="");b=_.Qi(b);return c.fpsContentId=b};_.jn=function(a,b){a=a.drm;if(!a||!a.env.startsWith(ya))an.warn(Ua);else if(a.customData&&a.customData.merchant&&!a.env.startsWith(za)){const c=new _.Ui(b.uris[0]);let d=c.a.pathname;d.endsWith("/")||(d+="/");d+=a.customData.merchant;c.a.pathname=d;b.uris[0]=c.toString()}};
142
+ kn=function(a,b,c){_.cn(a,b,c);a=a.drm;a=!(!a||!a.offlineId);c=new _.Ui(b.uris[0]);c.a.searchParams.set(_.Re,a.toString());b.uris[0]=c.toString()};Wm=function(a){if(a===ln)return"https://lic.drmtoday.com";if(a===mn)return"https://lic.staging.drmtoday.com";if(a===nn)return"https://lic-demo.staging.drmtoday.com";if(a===on)return"https://lic.test.drmtoday.com";throw Error("Unknown DRMtoday environment '"+a+"'. Can not infer DRMtoday base URL!");};
143
+ en=function(a){a=a.replace(/assetid/gi,"assetId");a=a.replace(/variantid/gi,"variantId");return a=a.replace(/keyid/gi,"keyId")};_.bn=function(a,b){if((b=b.drm)&&b.customData){var c={userId:b.customData.userId,sessionId:b.customData.sessionId,merchant:b.customData.merchant};_.ch(c)&&(a.headers["dt-custom-data"]=btoa(JSON.stringify(c)));(b=b.customData.authToken)&&(a.headers["x-dt-auth-token"]=b)}};
144
+ qn=function(a){const b={},c=a?a[Mg]:void 0;a=pn[a?a[Mg]:void 0];c&&(b.drmTodayErrorCode=c);a&&(b.drmTodayErrorMessage=a);return b};rn=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 an.warn("Unable to parse DRMtoday License Info header (x-dt-li)",b),null}};sn=function(a,b){a.size=void 0===b?0:1;a.g.debug("Setting key status to",b);a.a=b};
145
+ un=function(a,b,c,d){b===HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=tn.value().get(b),c.one(a,b,d))};
146
+ vn=function(a,b){a.f=b;_.Hh(a.a);if(!b)return Promise.resolve();a.a.on(b,Rd,c=>{_.uh("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,Ig,c=>{{a.g.debug("Handle webkitNeedKey event");c=_.G(c.initData);if(_.yi(c).getUint32(0,!0)+4!==c.byteLength)throw new RangeError("Malformed FairPlay init data");c=Di(c.subarray(4),
147
+ !0);c=_.Fi(c);const d=new Event(Rd);d.initDataType="skd";d.initData=zi(c);a.f.dispatchEvent(d)}});un(b,HTMLMediaElement.HAVE_METADATA,a.a,()=>b.webkitSetMediaKeys(a.h));return Promise.resolve()};wn=function(a,b){sn(a.keyStatuses,b);b=new _.C(ge);a.dispatchEvent(b)};
148
+ zn=function(a,b){a.a=b;_.Hh(a.f);b&&(a.f.on(b,a.h+"needkey",c=>{{const d=new Event(Rd);d.initDataType=_.Uc;d.initData=zi(c.initData);a.a.dispatchEvent(d)}}),a.f.on(b,a.h+"keymessage",c=>{{const e=xn(a,c.sessionId);if(e){var d=void 0===e.keyStatuses.getStatus();c=new _.C(_.ue,{messageType:d?je:ie,message:c.message});d=e;_.uh("WebkitEmeManager.MediaKeySession.generated");d.f&&(d.f.resolve(),d.f=null);e.dispatchEvent(c)}else _.vh("Session not found",c.sessionId)}}),a.f.on(b,a.h+"keyadded",c=>{(c=xn(a,
149
+ c.sessionId))&&c.ready()}),a.f.on(b,a.h+"keyerror",c=>{var d=xn(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?yn(d,_.Pe):1===e?yn(d,"expired"):yn(d,_.fe))}}}))};
150
+ xn=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};yn=function(a,b){sn(a.keyStatuses,b);b=new _.C(ge);a.dispatchEvent(b)};An=function(a,b){return a.w?a.w+b.charAt(0).toUpperCase()+b.slice(1):b};
151
+ Bn=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===_.Se)if(c)d=_.G(_.Fi("LOAD_SESSION|"+c));else{const f=_.Fi("PERSISTENT|"),g=new Uint8Array(f.byteLength+b.byteLength);g.set(f,0);g.set(_.G(b),f.byteLength);d=g}else d=_.G(b)}catch(f){return Promise.reject(f)}a.f=new _.xk;const e=An(a,"generateKeyRequest");try{a.j[e](a.h,d)}catch(f){if(f.name!==Ka)return a.f=null,Promise.reject(f);(new _.Mj(()=>{try{a.j[e](a.h,d)}catch(g){a.f.reject(g),
152
+ a.f=null}})).la(.01)}return a.f};Cn=function(a,b,c){if(a.a)a.a.then(()=>Cn(a,b,c)).catch(()=>Cn(a,b,c));else{a.a=b;if(a.h===Eg){var d=_.Bi(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=_.Bk(e.keys[0].k);e=_.Bk(e.keys[0].kid)}else d=_.G(c),e=null;var f=An(a,"addKey");try{a.j[f](a.h,d,e,a.sessionId)}catch(g){a.a.reject(g),a.a=null}}};
153
+ Fn=function(a,b){var c=Dn;if(a){var d=c.find(e=>e.a()===a);if(d)return En.info(Ib+d.a()),d.create();En.info("Cannot create selected EME manager, falling back to the default.")}if(b&&(d=c.find(e=>e.a()===b)))return En.info(Ib+d.a()),d.create();c=c[0];if(!c)throw Error("Missing EME managers.");En.info(Ib+c.a());return c.create()};_.In=function(a){var b=_.Ck(a);b=parseInt(b.byteLength,10).toString(16);b=_.Ck("12"+b+a);return new Gn(Hn,a,b)};
154
+ _.Kn=function(a){const b=new _.Jn(new DataView(a.buffer,a.byteOffset,a.byteLength),!1);a=_.O(b);var c=_.O(b);c=_.Fm(c);var d=_.O(b);const e=d>>>24;d&=16777215;var f=_.Dm(b,16);f=_.Dk(f);if(0<e){var g=_.O(b);b.skip(16*g)}g=_.O(b);const h=()=>{let u=_.ym(b),v=(u&127)>>>0,y=7;for(;128<=u&&28>=y;)u=_.ym(b),v=(v|(u&(28>y?127:15))<<y)>>>0,y+=7;return 28<y?-1:v},k=u=>{switch(u){case 0:do if(!_.wm(b))throw Error("not enough data to skip!");while(_.ym(b)&128);break;case 1:b.skip(8);break;case 2:b.skip(h());
155
+ 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(;_.wm(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=Cm(b,p);2===n?l.push(p):4===n&&(m=p)}else k(p)}_.uh("Parsed WV PSSH Box","size",a,"name",c,pg,e,"flags",d,"size",g,"systemId",f,"contentId (base64)",m?_.zk(m):"","keyIds",l.map(u=>_.Dk(u)));return 0<l.length?_.In(_.Dk(l[0])):null};
156
+ _.Ln=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=_.G(a);a.set(b,0);return a};
157
+ _.Qn=function(a){var b=_.P;a:{var c=new _.Jn(new DataView(a.buffer),!0);_.O(c);for(_.zm(c);_.wm(c);)if(1===_.zm(c)){var d=_.zm(c);c=_.Dm(c,d);break a}c=null}c||(c=a);a=Di(c,!0);d=b.j(a,"WRMHEADER");a=d.getAttribute(pg)||"";d=b.h(d,"DATA");var e=b.h(d,"LA_URL");b=e?b.f(e):"";var f=_.P;if(e=f.h(d,"KID"))if(e=f.f(e)){var g=f.h(d,oa);f=g?f.f(g):null;e={value:e,se:f}}else e=null;else e=null;d=e?[e]:(e=Mn(d))?[e]:(d=Nn(d))?d:null;const {value:h="",se:k}=d&&d[0]||{};d=_.Bk(h);d=_.Ln(d);d=_.Dk(d);return new _.On(_.Pn,
158
+ d,b,c,a,k)};Mn=function(a){var b=_.P;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(oa);c=c.getAttribute("ALGID");return{value:b,se:a,Qg:c}};
159
+ Nn=function(a){var b=_.P;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(oa),e=c.getAttribute("ALGID");b.push({value:a,se:d,Qg:e})}return b.length?b:null};_.Sn=function(a){Rn&&performance.mark(a)};_.Un=function(a,b,c){Rn&&(b=performance.measure(a,b,c),null!=b&&Tn.info(`Step: "${a}" took ${b.duration.toFixed(0)} ms.`))};
160
+ Vn=function(a){return _.w(function*(){const b=new Promise(c=>{(new _.Mj(c)).la(1)});(yield Promise.race([a.close().then(()=>!0),b.then(()=>!1)]))||_.B("Timeout waiting for session close")})};_.Xn=function(a){return Wn(a)?_.sd:a};Yn=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};
161
+ Zn=function(a,b){b=b[_.Xn(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))};
162
+ _.$n=function(a,b){b=_.ul(a.mimeType,b||a.codecs);if(_.tl(b,a.type)){a=a.type;var c=_.tl(b,a);c&&(c=c(),b=c.convertCodecs(a,b),c.destroy())}return b};ao=function(a){for(const b of a.audioCapabilities||[])delete b.robustness;for(const b of a.videoCapabilities||[])delete b.robustness};co=function(a){return(a.audioCapabilities||[]).some(bo)||(a.videoCapabilities||[]).some(bo)};
163
+ eo=function(a,b){a=_.Mm(b);_.uh("Using default Content ID extractor. The hostname part from HLS #EXT-X-KEY:URI skd:// will be used.","Extracted Content ID: "+a);return a};
164
+ go=function(a){var {playerConfig:b,initData:c,initDataType:d,drmInfo:e,drmSystemConfig:f,sessionContext:g,emeApi:h}=a;if("skd"===d&&h===fo){a=e.serverCertificate;let k=f&&f.modifiers&&f.modifiers.extractContentId;_.eh(k)||(k=eo);let l="";try{l=k(b,c,g)}catch(m){throw new _.I(_.F,6,6103);}if(!l.length)throw new _.I(_.F,6,6101,"Content ID is an empty string");c=Tm(c,l,a)}return c};Wn=function(a){return!!a.match(/^com\.(microsoft|chromecast)\.playready/)};
165
+ bo=function(a){return null!=a.robustness&&""!==a.robustness};ho=function(a,b,c,d,e){for(const f of a){b.includes(f.licenseServerUri)||b.push(f.licenseServerUri);f.serverCertificate&&(c.some(g=>_.Ek(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])}};
166
+ io=function(a){var b=a.o;const c=a.ca;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 _.I(_.F,6,6014));a.D.Je(_.lh(c));a.A||a.g.info(xa);a.A=!0;a.F=!1};jo=function(a){a.h.forEach((b,c)=>{const d=b.Fe;let e=c.expiration;isNaN(e)&&(e=Infinity);e!==d&&(a.D.Ie(c.sessionId,e),b.Fe=e)})};
167
+ ko=function(a){return _.w(function*(){a.B.release();a.B=null;a.M.release();a.M=null;a.A=!1;a.F=!1;a.H.reject();a.ea.stop();a.ea=null;a.V.stop();a.V=null;const b=Array.from(a.h.keys());for(const c of a.h.values())c.Fc&&c.Fc.stop();a.h.clear();yield Promise.all(b.map(c=>Promise.resolve().then(()=>_.w(function*(){a.g.debug("Closing session",c.sessionId);try{yield Vn(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",
168
+ 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})};_.qo=function(a,b){const c=lo(a,b),d=mo(b);for(const e of d)no(a,e,a.f.Ha);b=oo(a,b);if(!b.size)return a.T=!0,Promise.resolve();_.Sn(Fd);a=_.po(a,b);return(c?a:a.catch(()=>{})).then(()=>{_.Sn(Ed);_.Un("DRM queryMediaKeys_()",Fd,Ed)})};
169
+ _.so=function(a,b,c){c=void 0===c?[]:c;a.K=ro;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 _.qo(a,b)};
170
+ _.po=function(a,b){if(1===b.size&&b.has(""))return Promise.reject(new _.I(_.F,6,6E3));null===a.l&&(a.l=Fn(a.f.emeApi,a.Za));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=_.ok(),f=(k,l,m)=>{l.drmInfos.some(n=>!!n.licenseServerUri)===k&&(d=d.catch(()=>{if(a.j)return null;if(m===_.sd){if((_.Oj()||e.os===jk&&_.Pj("Chrome")&&!_.Oj())&&!a.f.Ha[m].useLegacySystem)return l.label=td,a.l.a(td,
171
+ [l]).catch(()=>{a.g.warn("Unable to create com.microsoft.playready.recommendation. Falling back to com.microsoft.playready.");l.label=_.sd;ao(l);return a.l.a(m,[l])});ao(l)}if(m===_.ud&&a.f.widevineVersion!==_.ud){const n=a.f.widevineVersion;if(!n.startsWith(_.ud))return a.g.error(`Invalid "widevineVersion" value "${n}".`),Promise.reject();const p=Object.assign({},l,{label:n,distinctiveIdentifier:_.Ne,persistentState:_.Ne});return a.l.a(n,[p]).catch(()=>a.l.a(m,[l]))}return a.l.a(m,[l]).catch(n=>
172
+ {a:{if(m===_.ud&&co(l)){const p=_.ok();if(co(l)&&p.os===hk&&p.browser===Yc){a.g.warn("requestMediaKeySystemAccess() failed",n);a.g.warn("Will try to recover by removing the robustness attribute of videoCapabilities and audioCapabilities.");ao(l);n=a.l.a(m,[l]);break a}}throw n;}return n})}))};let g=a.f.preferredDrmSystem;if(!g){var h=_.ok();if(h.os===jk&&10<=h.osVersion.major&&"edge"===h.browser)g=_.sd;else if("safari"===h.browser)g=_.qd;else if(h.browser===Yc||"firefox"===h.browser)g=_.ud}g&&(h=
173
+ 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 _.I(_.F,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(_.Xn(k.keySystem));
174
+ p=[];l=[];const u=[],v=[];ho(n.drmInfos,p,l,u,v);1<l.length&&_.B("Multiple unique server certificates found! Only the first will be used.");1<p.length&&_.B("Multiple unique license server URIs found! Only the first will be used.");m={keySystem:m,licenseServerUri:p[0],distinctiveIdentifierRequired:n.distinctiveIdentifier===_.xf,persistentStateRequired:n.persistentState===_.xf,audioRobustness:n.audioCapabilities?n.audioCapabilities[0].robustness:"",videoRobustness:n.videoCapabilities?n.videoCapabilities[0].robustness:
175
+ "",serverCertificate:l[0],initData:u,keyIds:v,periodId:null}}a.a=m;if(!a.a.licenseServerUri)throw new _.I(_.F,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.T=!0)}).catch(k=>{if(!a.j){a.a=null;a.J.clear();if(k instanceof _.I)throw k;throw new _.I(_.F,6,6002,{browserError:k.message});}});c.reject();return d};
176
+ to=function(a){a=kh(a.f.Ha[_.Oe]||{});if(0===a.size)return null;const b=[],c=[];a.forEach((e,f)=>{f=_.Ck(f);e=_.Ck(e);e={kty:"oct",kid:_.Ak(f,!1),k:_.Ak(e,!1)};b.push(e);c.push(e.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:_.Fi(d),initDataType:"keyids"}];return{keySystem:_.Oe,licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:d,
177
+ keyIds:[],periodId:null}};mo=function(a){const b=[];for(const c of a)for(const d of c.drmInfos)b.push(d);return b};uo=function(a,b){for(const c of b)""===c.licenseServerUri||a.f.Ha[c.keySystem]||(a.f.Ha[c.keySystem]={licenseUrl:""})};
178
+ lo=function(a,b){const c=b.some(g=>0<g.drmInfos.length);if(!c){var d=kh(a.f.Ha);Yn(b,d)}d=a.f.Ha[_.qd];const e=b.some(g=>g.drmInfos.some(h=>h.keySystem===_.qd));if(!1!==a.f.Ni&&_.ak()&&!e&&d)for(var f of b)f.drmInfos.push({keySystem:_.qd,licenseServerUri:d.licenseUrl,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:[],keyIds:[],periodId:null});if(f=to(a))for(const g of b)g.drmInfos=[f];b=mo(b);uo(a,b);for(const g of b)Zn(g,
179
+ a.f.Ha);return c};no=function(a,b,c){const d=_.Xn(b.keySystem);c=c[d];d===_.Oe&&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)};
180
+ oo=function(a,b){var c=new Set(mo(b));const d=a.G?_.xf:_.Ne,e=a.G?[_.Se]:[Uf];a=new Map;for(const f of c)a.set(f.keySystem,{initDataTypes:[_.Uc],audioCapabilities:[],videoCapabilities:[],distinctiveIdentifier:_.Ne,persistentState:d,sessionTypes:e,label:f.keySystem,drmInfos:[]});for(const f of b){b=f.audio;c=f.video;const g=b?_.$n(b):"";let h=null;b&&"ac-3"===b.codecs.toLowerCase()&&_.Qj()&&(h=_.$n(b,_.Qd));const k=c?_.$n(c):"";let l=null;c&&"ac-3"===c.codecs.toLowerCase()&&_.Qj()&&(l=_.$n(c,_.Qd));
181
+ 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=_.xf);m.persistentStateRequired&&(n.persistentState=_.xf);b&&_.di(m.audioRobustness).forEach(p=>{const u={robustness:p||"",contentType:g};n.audioCapabilities.find(v=>v.robustness===u.robustness&&v.contentType===u.contentType)||n.audioCapabilities.push(u);h&&n.audioCapabilities.push({robustness:p||
182
+ "",contentType:h})});c&&_.di(m.videoRobustness).forEach(p=>{const u={robustness:p||"",contentType:k};n.videoCapabilities.find(v=>v.robustness===u.robustness&&v.contentType===u.contentType)||n.videoCapabilities.push(u);l&&n.videoCapabilities.push({robustness:p||"",contentType:l})})}}return a};vo=function(a){return _.w(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 _.I(_.F,6,6003,b.message,b))}})};
183
+ _.zo=function(a,b,c,d){d=void 0===d?"":d;if(c.length&&(!a.G||a.K!==ro)){var e=a.keySystem();if(!e.startsWith(_.qd)&&b===_.Uc){const f=new wo(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||
184
+ _.Qj(2)||a.keySystem().startsWith(_.qd)||!_.xo(a,d,c,!0))&&yo(a,d,null,b,c)}};Ao=function(a,b){return _.w(function*(){a.g.info(`Handle encrypted event for type ${b.initDataType}`);yield vo(a);b.initData&&_.zo(a,b.initDataType,_.G(b.initData))})};Co=function(a){return _.w(function*(){_.Sn(Hd);const b=a.Z.map(c=>Bo(a,c));a.ia=!0;a.Z=[];yield Promise.all(b);_.Sn(Gd);_.Un("drm.onPlay",Hd,Gd)})};
185
+ Eo=function(a){const b=a.keySystem(),c=a.f.Ha[b],d=c.certificateUrl||"";if(""===d)return Promise.resolve();const e=a.D.getConfiguration();return Do(a,e).then(()=>{var f=c.modifiers;const g=f&&f.certificateRequest,h=f&&f.certificateResponse;f=_.mj([d],a.f.attemptParameters);f.type=3;f.licenseRequestType=Wc;g&&f.requestModifiers.push(k=>g(e,k));h&&f.responseModifiers.push(k=>h(e,k));a.g.debug("Fetching certificate");return a.D.sb.fetch(f).U}).then(f=>{a.a.serverCertificate=_.G(f.data)}).catch(f=>{var g=
186
+ f.data.headers;g=Object.assign({message:Ca,url:f.data.url,status:f.data.status,response:f.data.response},g?{headers:g}:{},qn(g));throw new _.I(_.F,6,6100,g,f);})};
187
+ _.Fo=function(a){return _.w(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 _.I(_.F,6,6004,{browserError:b.message});}})};
188
+ _.Io=function(a){const b=a.a?a.a.initData||[]:[];for(const c of b){let d=!_.Qj(2);if(a.f.enforceSingleSession&&!a.keySystem().startsWith(_.qd)){const e=a.h.values();for(const f of e)_.Ek(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}.`),Go(c.initData,f)||(f.Kd.push(c.initData),c.keyId&&!f.ib.includes(c.keyId)&&
189
+ f.ib.push(c.keyId),a.o.get(c.keyId)||a.o.set(c.keyId,Of)),d=!1)}!d||a.G&&a.K===ro||(_.xo(a,c.keyId,c.initData)&&(d=!1),d&&(a.g.info("Request new media key session on create"),yo(a,c.keyId,c.periodId,c.initDataType,c.initData)))}for(const c of a.L)_.Ho(a,c);b.length||a.L.length||(a.A||a.g.info(xa),a.A=!0,a.F=!1,a.H.resolve());return a.H};
190
+ _.Ko=function(a,b){if(!a.I)return Ih(a.B,b,()=>{a.w(new _.I(_.F,6,6010))}),Promise.resolve();a.C=b;a.l.l(b);a.B.one(a.C,_.Ue,()=>Co(a));a.B.on(a.C,_.Dg,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()!==Jo||a.L.length)d=vo(a);c=Promise.resolve();_.Tj()&&38===_.Uj().major||(a.a&&a.a.keySystem!==_.Oe&&!a.a.serverCertificate&&(c=Eo(a)),c=c.then(()=>_.Fo(a)));return Promise.all([d,
191
+ c]).then(()=>{a.j||(_.Io(a),a.B.on(a.C,Rd,e=>Ao(a,e)))}).catch(e=>{if(!a.j){if(6004===e.code&&a.a&&a.a.keySystem===_.ud&&1>a.R&&a.a.serverCertificate&&a.a.serverCertificate.length)return a.g.warn("Detected invalid widevine server certificate!. Retrying"),a.w(new _.I(1,6,6004)),a.a.serverCertificate=null,a.R++,_.Ko(a,b);1<=a.R&&a.g.info("Could not get valid widevine server certificate. Giving up");throw e;}})};
192
+ Do=function(a,b){return _.w(function*(){const c=a.D.Jc();if(c){var d=b&&b.drm&&b.drm.customData;d&&(yield c(d))}})};
193
+ _.Ho=function(a,b){let c;try{a.g.debug("Attempting to load an offline session",b),c=a.I.createSession(_.Se)}catch(e){const f=new _.I(_.F,6,6005,{browserError:e.message});a.w(f);return Promise.reject(f)}a.B.on(c,_.ue,a.Ua.bind(a));a.B.on(c,ge,a.Ta.bind(a));const d={initData:null,loaded:!1,Fe:Infinity,ec:null,eb:new _.xk,periodId:null,Kd:[],keyId:null,ib:[],initDataType:null,mc:null,sessionContext:{ldlDelay:0,customData:{}}};d.eb.catch(()=>{});a.h.set(c,d);return c.load(b).then(e=>{if(a.j)return null;
194
+ a.g.debug("Loaded offline session",b,e);if(!e)return a.h.delete(c),a.w(new _.I(_.F,6,6013)),null;d.loaded=!0;Lo(a)&&(a.A||a.g.info(xa),a.A=!0,a.F=!1,a.H.resolve());return c},e=>{a.j||(a.h.delete(c),a.w(new _.I(_.F,6,6005,{browserError:e.message})))})};Go=function(a,b){if(!a)return!1;for(let c=0;c<b.Kd.length;c++)if(_.Ek(a,b.Kd[c]))return!0;return!1};
195
+ _.xo=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(_.Ek(c,f.initData))return b?f.ib.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.ib.push(b),a.o.get(b)||a.o.set(b,Of),d&&a.g.info(qb+`Session: '${e.sessionId}'`+`Adding Key ID ${b} to session meta-data.`)):d&&a.g.info(qb+`Session: '${e.sessionId}'`),!0;if(Go(c,f))return d&&a.g.info("Skipping Session creation. License for init data was already requested [extra]"),
179
196
  !0}return!1};
180
- eo=function(a,b,c,d,e,f,g){f=void 0===f?null:f;g=void 0===g?!1:g;_.x(function*(){if(e.length){var h=b;if(!h)try{h=so(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&&to(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);
181
- 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?_.Re:Tf;var q=a.I.createSession(n);a.D.onEvent(new _.F(Kd,{keySystem:a.keySystem()}));a.g.info(`Created new ${n} session for Key ID: '${h}'. `+`Init data type: ${d}.`)}catch(u){a.w(new _.I(_.G,6,6005,{browserError:u.message}));return}a.B.on(q,_.se,a.Wa.bind(a));a.B.on(q,ee,a.Ka.bind(a));
182
- k={qc:f,Sd:[],initData:e,initDataType:d,keyId:h,lb:h?[h]:[],loaded:!1,Oe:Infinity,periodId:c,jc:null,hb:new _.Ij,sessionContext:{ldlDelay:0,customData:{}}};k.hb.catch(()=>{});f&&(l=a.h.get(f),k.sessionContext=l.sessionContext);a.h.set(q,k);h&&!a.o.get(h)&&a.o.set(h,Nf);if(e)for(l=0;l<a.a.initData.length;l++)m=a.a.initData[l],m.keyId&&!k.lb.includes(m.keyId)&&_.Rl(m.initData,e)&&(k.keyId||(k.keyId=m.keyId),k.lb.push(m.keyId),a.o.get(m.keyId)||a.o.set(m.keyId,Nf));l=a.D.getConfiguration();m=a.keySystem();
183
- m=a.f.Ja[m];n=(n=m.modifiers)&&n.transformInitData;_.ch(n)||(n=Mn);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 _.I||(h=new _.I(_.G,6,6016,u));k.hb&&k.hb.reject(u);a.w(h);return}a.g.info(`Generate License Request for key ID: '${h}'`);q.generateRequest(d,e.buffer).catch(u=>{if(!a.j){var v=null;u.errorCode&&u.errorCode.systemCode&&(v=u.errorCode.systemCode,0>v&&(v+=Math.pow(2,32)),v="0x"+v.toString(16));
184
- a.w(new _.I(_.G,6,6006,{browserError:u.message,error:u,extended:v},u))}})}else a.g.warn("Empty init data")})};uo=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};ro=function(a){a=a.h.values();return _.Hi(a,b=>b.loaded)};to=function(a,b,c,d){if(!b&&c!==_.If)return!1;d=b||um(d);for(const e of a.h.values())if(b&&e.keyId===b||b&&e.lb.includes(b)||c===_.If&&(e.keyId||um(e.initData))===d)return!0;return!1};
185
- so=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.Ja[f];f=a.D.getConfiguration();g=g&&g.modifiers&&g.modifiers.extractContentId;_.ch(g)||(g=Kn);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===_.If)return um(c)||"";if(b===_.Uc){l=a.keySystem();try{if(l.match(/^com\.widevine\.alpha/)){const m=
186
- _.qn(c);if(m)return m.a}else if(Cn(l)){{f=new _.pn(new DataView(c.buffer,c.byteOffset,c.byteLength),!1);g=_.P(f);const m=_.P(f);h=_.lm(m);const n=_.P(f);c=n>>>24;k=n&16777215;const q=_.jm(f,16),u=_.Ql(q);if(0<c){const D=_.P(f);f.skip(16*D)}const v=_.P(f),y=_.jm(f,v),A=_.wn(y);_.sh("Parsed PR PSSH Box","size",g,"name",h,ng,c,"flags",k,"size",v,"systemId",u,"keyId",A.a);e=A}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""};
187
- ho=function(a,b){return _.x(function*(){const c=b.target,d=a.h.get(c);if(d){var e=a.a.licenseServerUri;if(vo(a,b))yield wo(a,e,b,c,d);else{var f=a.za;if(0<f&&(a.g.info(`Delaying license request by ${f} s.`),yield zh(f),a.j))return;var g=a.keySystem(),h=a.f.Ja[g];"individualization-request"===b.messageType&&h&&h.individualizationServer&&(e=h.individualizationServer);var k=_.sj([e],a.f.attemptParameters);k.type=3;k.body=b.message;k.method=_.db;k.licenseRequestType=b.messageType===he&&d.qc?ge:b.messageType;
188
- k.sessionId=c.sessionId;if(k.licenseRequestType===ge)a.D.onEvent(new _.F(Jd));Cn(a.a.keySystem)&&xo(a,k);Tl(a.M,k);h=String(Math.floor(b.timeStamp));if(f=yield yo(a,k,d,h,e,c.sessionId,b.messageType,f))if(e=Ul(a.M,f),yield zo(a,c,f.data,d,h))h=uo(a),a.D.onEvent(new _.F(_.Md,{keySystem:g,expirationTime:h,expectedRenewalTime:e?Date.now()+1E3*e.delay:Number.NaN})),d.jc&&d.jc.resolve(),d.qc&&(h=d.qc,a.g.info(`Closing expired session '${h.sessionId}'`),Bn(h).catch(()=>{a.g.warn("Unable to close expired session in time")}),
189
- (h=a.h.get(d.qc))&&h.Lc&&h.Lc.stop(),a.h.delete(d.qc),d.qc=null),(new _.wk(()=>{a.j||(d.loaded=!0,d.hb&&d.hb.resolve(),ro(a)&&(a.A||a.g.info(xa),a.A=!0,a.F=!1,a.H.resolve()))})).la(5),null!==d.initData&&(0<d.sessionContext.ldlDelay||e&&(_.Zi(g,_.pd)||_.Zi(g,_.rd)))&&(h=new _.wk(()=>{!a.j&&a.M&&(a.g.info("Updating CSL Sessions"),Cn(g)?eo(a,d.keyId,d.periodId,d.initDataType,d.initData,c,!0):g.startsWith(_.pd)&&c.update(_.Wi("renew")))}),d.Lc=h,h.la(e?e.delay:d.sessionContext.ldlDelay))}}else a.g.error(`Session metadata not found for ${c.sessionId}.`)})};
190
- vo=function(a,b){return!!a.keySystem().match(/^com\.widevine\.alpha/)&&b.message&&2===b.message.byteLength};wo=function(a,b,c,d,e){return _.x(function*(){var f=_.sj([b],a.f.attemptParameters);f.type=3;f.body=c.message;f.method=_.db;f.licenseRequestType=Wc;f.sessionId=d.sessionId;(f=yield Ao(a,f,e,b,d.sessionId,c.messageType))&&(yield zo(a,d,f.data,e,String(Math.floor(c.timeStamp))))})};
191
- xo=function(a,b){var c=Ui(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(_.mg).textContent;b.body=_.Ol(a.querySelector("Challenge").textContent).buffer}else a.g.debug("PlayReady request is already unwrapped."),b.headers[va]="text/xml; charset\x3dutf-8"};
192
- yo=function(a,b,c,d,e,f,g,h){return _.x(function*(){a.g.info("License request for "+`SID:'${f}'/KID:'${c.keyId}' `+`from msg '${g}'.`);yield Bo(a,b,c.sessionContext);a.g.debug("Sending DRM license request to",e,b);a.D.onEvent(new _.F(Id,{delay:h}));var k=Date.now();_.yn(`drm.license.req.${d}.start`);var l=null;try{l=yield a.D.vb.fetch(b).T}catch(q){if(a.j)return null;l=q.data.headers;l=Object.assign({message:"Error while fetching DRM license!",url:q.data.url,status:q.data.status,response:q.data.response},
193
- l?{headers:l}:{},Wm(l));l=new _.I(_.G,6,6007,l,q);Co(a,l,c);return null}_.yn(`drm.license.req.${d}.end`);_.An(`drm.license.req.${d}`,`drm.license.req.${d}.start`,`drm.license.req.${d}.end`);k=Date.now()-k;const m=Xm(l.headers);m&&(a.za=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})};
194
- zo=function(a,b,c,d,e){return _.x(function*(){_.yn(`drm.sess.update.${e}.start`);try{yield b.update(c)}catch(f){if(a.j)return!1;if(f===pb)return a.g.info("Ignore update for closed sessions"),!1;const g=new _.I(_.G,6,6008,{browserError:f.message});Co(a,g,d);return!1}_.yn(`drm.sess.update.${e}.end`);_.An(`drm.sess.update.${e}`,`drm.sess.update.${e}.start`,`drm.sess.update.${e}.end`);return a.j?!1:!0})};
195
- Ao=function(a,b,c,d,e,f){return _.x(function*(){a.g.info("WV Server certificate request for "+`SID:'${e} from msg '${f}'.`);yield Bo(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.vb.fetch(b).T}catch(m){if(a.j)return null;h=m.data.headers;h=Object.assign({message:Ca,url:m.data.url,status:m.data.status,response:m.data.response},h?{headers:h}:{},Wm(h));h=new _.I(_.G,6,6100,h,m);Co(a,h,c);return null}g=Date.now()-g;const k=Xm(h.headers);
197
+ yo=function(a,b,c,d,e,f,g){f=void 0===f?null:f;g=void 0===g?!1:g;_.w(function*(){if(e.length){var h=b;if(!h)try{h=Mo(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&&No(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);
198
+ 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?_.Se:Uf;var p=a.I.createSession(n);a.D.onEvent(new _.C(Ld,{keySystem:a.keySystem()}));a.g.info(`Created new ${n} session for Key ID: '${h}'. `+`Init data type: ${d}.`)}catch(u){a.w(new _.I(_.F,6,6005,{browserError:u.message}));return}a.B.on(p,_.ue,a.Ua.bind(a));a.B.on(p,ge,a.Ta.bind(a));
199
+ k={mc:f,Kd:[],initData:e,initDataType:d,keyId:h,ib:h?[h]:[],loaded:!1,Fe:Infinity,periodId:c,ec:null,eb:new _.xk,sessionContext:{ldlDelay:0,customData:{}}};k.eb.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,Of);if(e)for(l=0;l<a.a.initData.length;l++)m=a.a.initData[l],m.keyId&&!k.ib.includes(m.keyId)&&_.Ek(m.initData,e)&&(k.keyId||(k.keyId=m.keyId),k.ib.push(m.keyId),a.o.get(m.keyId)||a.o.set(m.keyId,Of));l=a.D.getConfiguration();m=a.keySystem();
200
+ m=a.f.Ha[m];n=(n=m.modifiers)&&n.transformInitData;_.eh(n)||(n=go);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 _.I||(h=new _.I(_.F,6,6016,u));k.eb&&k.eb.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 v=null;u.errorCode&&u.errorCode.systemCode&&(v=u.errorCode.systemCode,0>v&&(v+=Math.pow(2,32)),v="0x"+v.toString(16));
201
+ a.w(new _.I(_.F,6,6006,{browserError:u.message,error:u,extended:v},u))}})}else a.g.warn("Empty init data")})};Oo=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};Lo=function(a){a=a.h.values();return _.qi(a,b=>b.loaded)};No=function(a,b,c,d){if(!b&&c!==_.Jf)return!1;d=b||Rm(d);for(const e of a.h.values())if(b&&e.keyId===b||b&&e.ib.includes(b)||c===_.Jf&&(e.keyId||Rm(e.initData))===d)return!0;return!1};
202
+ Mo=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.Ha[f];f=a.D.getConfiguration();g=g&&g.modifiers&&g.modifiers.extractContentId;_.eh(g)||(g=eo);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===_.Jf)return Rm(c)||"";if(b===_.Uc){l=a.keySystem();try{if(l.match(/^com\.widevine\.alpha/)){const m=
203
+ _.Kn(c);if(m)return m.a}else if(Wn(l)){{f=new _.Jn(new DataView(c.buffer,c.byteOffset,c.byteLength),!1);g=_.O(f);const m=_.O(f);h=_.Fm(m);const n=_.O(f);c=n>>>24;k=n&16777215;const p=_.Dm(f,16),u=_.Dk(p);if(0<c){const D=_.O(f);f.skip(16*D)}const v=_.O(f),y=_.Dm(f,v),A=_.Qn(y);_.uh("Parsed PR PSSH Box","size",g,"name",h,pg,c,"flags",k,"size",v,"systemId",u,"keyId",A.a);e=A}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""};
204
+ Bo=function(a,b){return _.w(function*(){const c=b.target,d=a.h.get(c);if(d){var e=a.a.licenseServerUri;if(Po(a,b))yield Qo(a,e,b,c,d);else{var f=a.ya;if(0<f&&(a.g.info(`Delaying license request by ${f} s.`),yield Bh(f),a.j))return;var g=a.keySystem(),h=a.f.Ha[g];"individualization-request"===b.messageType&&h&&h.individualizationServer&&(e=h.individualizationServer);var k=_.mj([e],a.f.attemptParameters);k.type=3;k.body=b.message;k.method=_.db;k.licenseRequestType=b.messageType===je&&d.mc?ie:b.messageType;
205
+ k.sessionId=c.sessionId;if(k.licenseRequestType===ie)a.D.onEvent(new _.C(Kd));Wn(a.a.keySystem)&&Ro(a,k);mm(a.M,k);h=String(Math.floor(b.timeStamp));if(f=yield So(a,k,d,h,e,c.sessionId,b.messageType,f))if(e=nm(a.M,f),yield To(a,c,f.data,d,h))h=Oo(a),a.D.onEvent(new _.C(_.Nd,{keySystem:g,expirationTime:h,expectedRenewalTime:e?Date.now()+1E3*e.delay:Number.NaN})),d.ec&&d.ec.resolve(),d.mc&&(h=d.mc,a.g.info(`Closing expired session '${h.sessionId}'`),Vn(h).catch(()=>{a.g.warn("Unable to close expired session in time")}),
206
+ (h=a.h.get(d.mc))&&h.Fc&&h.Fc.stop(),a.h.delete(d.mc),d.mc=null),(new _.Mj(()=>{a.j||(d.loaded=!0,d.eb&&d.eb.resolve(),Lo(a)&&(a.A||a.g.info(xa),a.A=!0,a.F=!1,a.H.resolve()))})).la(5),null!==d.initData&&(0<d.sessionContext.ldlDelay||e&&(_.Ii(g,_.qd)||_.Ii(g,_.sd)))&&(h=new _.Mj(()=>{!a.j&&a.M&&(a.g.info("Updating CSL Sessions"),Wn(g)?yo(a,d.keyId,d.periodId,d.initDataType,d.initData,c,!0):g.startsWith(_.qd)&&c.update(_.Fi("renew")))}),d.Fc=h,h.la(e?e.delay:d.sessionContext.ldlDelay))}}else a.g.error(`Session metadata not found for ${c.sessionId}.`)})};
207
+ Po=function(a,b){return!!a.keySystem().match(/^com\.widevine\.alpha/)&&b.message&&2===b.message.byteLength};Qo=function(a,b,c,d,e){return _.w(function*(){var f=_.mj([b],a.f.attemptParameters);f.type=3;f.body=c.message;f.method=_.db;f.licenseRequestType=Wc;f.sessionId=d.sessionId;(f=yield Uo(a,f,e,b,d.sessionId,c.messageType))&&(yield To(a,d,f.data,e,String(Math.floor(c.timeStamp))))})};
208
+ Ro=function(a,b){var c=Di(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(_.og).textContent;b.body=_.Bk(a.querySelector("Challenge").textContent).buffer}else a.g.debug("PlayReady request is already unwrapped."),b.headers[ua]="text/xml; charset\x3dutf-8"};
209
+ So=function(a,b,c,d,e,f,g,h){return _.w(function*(){a.g.info("License request for "+`SID:'${f}'/KID:'${c.keyId}' `+`from msg '${g}'.`);yield Vo(a,b,c.sessionContext);a.g.debug("Sending DRM license request to",e,b);a.D.onEvent(new _.C(Jd,{delay:h}));var k=Date.now();_.Sn(`drm.license.req.${d}.start`);var l=null;try{l=yield a.D.sb.fetch(b).U}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},
210
+ l?{headers:l}:{},qn(l));l=new _.I(_.F,6,6007,l,p);Wo(a,l,c);return null}_.Sn(`drm.license.req.${d}.end`);_.Un(`drm.license.req.${d}`,`drm.license.req.${d}.start`,`drm.license.req.${d}.end`);k=Date.now()-k;const m=rn(l.headers);m&&(a.ya=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})};
211
+ To=function(a,b,c,d,e){return _.w(function*(){_.Sn(`drm.sess.update.${e}.start`);try{yield b.update(c)}catch(f){if(a.j)return!1;if(f===pb)return a.g.info("Ignore update for closed sessions"),!1;const g=new _.I(_.F,6,6008,{browserError:f.message});Wo(a,g,d);return!1}_.Sn(`drm.sess.update.${e}.end`);_.Un(`drm.sess.update.${e}`,`drm.sess.update.${e}.start`,`drm.sess.update.${e}.end`);return a.j?!1:!0})};
212
+ Uo=function(a,b,c,d,e,f){return _.w(function*(){a.g.info("WV Server certificate request for "+`SID:'${e} from msg '${f}'.`);yield Vo(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.sb.fetch(b).U}catch(m){if(a.j)return null;h=m.data.headers;h=Object.assign({message:Ca,url:m.data.url,status:m.data.status,response:m.data.response},h?{headers:h}:{},qn(h));h=new _.I(_.F,6,6100,h,m);Wo(a,h,c);return null}g=Date.now()-g;const k=rn(h.headers);
196
213
  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})};
197
- Bo=function(a,b,c){return _.x(function*(){const d=a.D.getConfiguration();yield jo(a,d);const e=a.keySystem();var f=a.f.Ja[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=>_.xm(k));h?b.responseModifiers.push(k=>h(d,k,c)):e.startsWith(_.pd)&&b.responseModifiers.push(k=>_.ym(k))})};Co=function(a,b,c){a.j||(a.w(b),c.jc&&c.jc.reject(b),c.hb&&c.hb.reject(b))};
198
- _.Fo=function(a,b){a&&b&&(_.Do.set(a,b),_.Eo.info(`Registered TextDisplayerFactory: '${a}'`))};_.Go=function(a,b){b=b.find(c=>(c=_.Do.get(c))?c.a(a):!1);if(null==b)return _.Eo.warn("Subtitles may not work as expected. No compatible text displayer found for this platform."),null;_.Eo.info(`Chosen the text displayer: ${b}`);return _.Do.get(b)};
199
- _.Ho=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})}}};Io=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};Jo=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};
200
- Ko=function(a){return a.a.map(b=>_.Zg(b))};_.Lo=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:[]}};
201
- Qo=function(a){a.g.debug("Start watching for video events for "+a.m.namespace());const b=a.m,c=d=>Mo(a,d.type);a.a.on(b,_.Sd,()=>{a.Z||(a.h=!1,No(a,_.Oo))});a.a.on(b,Pc,c);a.a.on(b,_.df,()=>{a.C=!0;a.h=!1;Mo(a,_.df)});a.a.on(b,_.Pe,()=>{a.C=!1;a.h=!1;Mo(a,_.Pe)});a.a.on(b,_.ag,c);a.a.on(b,_.rf,c);a.a.on(b,_.Df,d=>{a.Z=!1;a.h=!1;Mo(a,d.type)});a.a.on(b,_.Ef,d=>{a.Z=!0;Mo(a,d.type)});a.a.on(b,Kf,c);a.a.on(b,_.Ag,()=>{a.h=!0;Mo(a,_.Ag)});a.a.on(b,_.r,d=>{(d=d&&d.detail)&&d.severity&&d.severity===_.G&&
202
- No(a,_.Po)});a.a.on(b,_.ne,c);a.a.on(b,Qc,()=>{a.B=!0;Mo(a,Qc)});a.a.on(b,_.lg,d=>{a.Z=!0;Mo(a,d.type)});a.a.on(b,_.kg,d=>{a.Z=!1;a.h=!1;Mo(a,d.type)})};Ro=function(a,b){return Object.keys(b)[a]};To=function(a,b){const c={type:_.Mf};b===_.Oc||b===_.Nc?(c.reason=a.o,b===_.Oc?c.timeSinceLastStateChangeMS=a.G:c.bufferedTimeMS=a.A):(a.f===_.So&&(c.reason=a.o),a.w===_.So&&(c.reason=a.o,c.bufferedTimeMS=a.A),c.currentState=a.f,c.previousState=a.w,c.timeSinceLastStateChangeMS=a.G);return c};
203
- No=function(a,b){if(a.f===b)return!1;var c=Date.now();const d=a.f===_.So;a.w=a.f;a.f=b;a.w===_.Oo&&(a.H=c,a.l=0);a.l||(a.l=a.H||c);a.G=c-a.l;a.l=c;b===_.So?(a.J=a.l,a.o=a.Z?1:2,a.g.info("Buffering started. Reason: "+Ro(a.o-1,_.Uo)),b=To(a,_.Oc),a.Va(_.Oc,b)):d&&(a.A=a.l-a.J,a.g.info("Buffering finished. Reason: "+Ro(a.o-1,_.Uo)+". Buffering time: "+a.A+" ms"),b=To(a,_.Nc),a.Va(_.Nc,b));b=Ro(a.w,_.Vo);c=Ro(a.f,_.Vo);a.g.info(`Player state change: ${b} -> ${c}`);a.Va(_.Mf,To(a,""));return!0};
204
- Mo=function(a,b){if(a.f===_.Po)a.g.warn("Player is in error state, aborting any further state checks");else{var c=a.m.isPaused(),d=a.m?a.m.isEnded():!1;if(d)a.Z||(a.h=!1,No(a,_.Oo));else if(b!==_.ag){var e=a.m.getPosition();e=null!==e&&void 0!==e&&0<=e?a.m.getBufferInfo().Na(e,!0):-1;a.F=e;e=a.m.getSurface().getMedia();a.j=e?e.readyState:null;a.I=a.m.getPlaybackRate()||1;e=typeof a.j===_.t&&2>a.j&&2===e.networkState;var f=typeof a.j===_.t&&0>=a.F&&a.f===_.Wo,g=typeof a.j===_.t&&2>=a.j&&a.h;e=a.Z||
205
- f||e||g;!a.K||a.m.isLive()||a.f!==_.So||e||(f=b===_.Df&&4===a.j,(g=a.w===_.Xo)&&!a.B?e=!0:g||a.B||f||(e=!0));f=!1;e?f=No(a,_.So):c?f=No(a,_.Yo):a.C&&(f=No(a,_.Zo));f&&(a.B=!1);a.g.debug("Video state check for event "+b+":: seeking: "+a.Z+", waiting: "+a.h+", playing: "+a.C+", paused: "+c+", readyState: "+a.j+", rate: "+a.I+", buffer: "+a.F+", ended: "+d+". Changed state: "+f+", Current state: "+Ro(a.f,_.Vo))}}};
206
- $o=function(a){a=(new _.oi(a)).Ga;if(!a)return null;a=a.toUpperCase();return _.$i(a,".MPD")?_.uc:_.$i(a,".M3U8")?_.pl:_.$i(a,".MP4")?_.rg:_.$i(a,".MP3")?"audio/mp3":_.$i(a,"MANIFEST")||_.$i(a,".ISM")?_.zc:null};_.bp=function(a){let b;zl(a)?b=a.source:b=a;Array.isArray(b)||(b=[b]);b=b.filter(c=>typeof c===_.Pf||"url"in c);a=[];for(let c=0;c<b.length;c++){const d=ap(b[c]);d&&a.push(d)}return a};
207
- ap=function(a){let b=null;_.eh(a)&&(a={url:a});typeof a===_.Ee&&!Array.isArray(a)&&"url"in a&&(b={url:a.url,type:a.type?a.type:null},_.B(a.drmProtected)||typeof a.drmProtected!==_.Mc||(b.drmProtected=a.drmProtected),_.B(a.isLive)||typeof a.isLive!==_.Mc||(b.isLive=a.isLive),_.B(a.name)||typeof a.name!==_.Pf||(b.name=a.name),_.B(a.Zb)||typeof a.Zb!==_.Pf||(b.Zb=a.Zb),_.B(a.audioMimeType)||typeof a.audioMimeType!==_.Pf||(b.audioMimeType=a.audioMimeType));b&&!b.type&&(b.type=$o(a.url),b.type?cp.debug("Detect media type "+
208
- 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 _.I(_.G,7,7E3);a.a||(a.h.on(b,_.r,()=>{{const c=dp(a);if(c)a.onError(c)}}),a.h.on(b,_.xf,()=>{const c=b.videoWidth,d=b.videoHeight,e=a.getTrackManager();e&&0<c&&0<d&&(e.w={width:c,height:d});a.trigger(new _.F(_.Lc,{detail:{width:c,height:d}}))}),a.a=b)};gp=function(a){const b=_.Kk()?Ln:void 0;return new _.fp(a,b)};
209
- hp=function(a){return _.x(function*(){if(a.w)return Promise.reject(new _.I(_.G,7,7E3));var b=a.ga[a.getSourceIndex()];if(!a.configuration.drm||!1===b.drmProtected)return a.log.debug("No DRM configuration present.","Skipping DRM engine initialization"),Promise.resolve();b=_.Yl(a.configuration.drm);a.log.debug("Drm configuration: ",b);const c=a.getNetworkEngine();a.o=gp({vb:c,onError:d=>a.onError(d),Te:()=>{},Se:(d,e)=>{a.trigger(new _.F(_.Hd,{expirationTime:e}))},onEvent:d=>{d instanceof _.F?a.dispatchEvent(d):
210
- a.log.debug(_.wb,d.type)},getConfiguration:()=>a.getConfiguration(),Qc:()=>a.Qc()});a.o.f=b;yield _.Yn(a.o,[{id:0,language:_.fg,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,Ca:0,mimeType:_.rg,codecs:"",encrypted:!0,keyId:null,language:_.fg,originalLanguage:_.fg,label:null,type:_.w,primary:!1,frameRate:void 0,
211
- hj:void 0,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,spatialAudio:!1,Ti:null,closedCaptions:null},bandwidth:100,drmInfos:[],allowedByApplication:!0,allowedByKeySystem:!0}]);yield _.qo(a.o,a.a)})};ip=function(a,b){$m(a.a,HTMLMediaElement.HAVE_CURRENT_DATA,a.h,()=>{a.getState()!==_.Po&&a.seek(b).catch(c=>{a.log.warn("Error while seeking to start position.",c)})})};
212
- dp=function(a){if(null===a.ga||!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 _.I(_.G,3,3016,{code:b,cj:c,message:a.a.error.message})};
213
- kp=function(a){if(a.w)return new _.jp(Promise.reject(new _.I(_.G,7,7E3)),()=>{});const b=a.ga[a.getSourceIndex()],c=a.configuration.startTime||null,d=a.a,e=a.H;c&&ip(a,c);if(d.preload!==_.De)a.h.one(d,_.ne,()=>{const g=Date.now()/1E3-e;a.f.B=g;a.log.debug("Time to load: ",g)});d.src=b.url;(_.Ak()||_.Dk())&&d.load();const f=new _.Ij;a.h.one(d,Kf,()=>{const g=a.getConfiguration().manifest.attemptParameters.timeout||30;a.B||(a.B=(new _.wk(()=>{f.reject(new _.I(_.G,3,3100,{message:`Unable to load media source successfully from ${b.url}`,
214
- uri:b.url},d.error))})).la(g))});$m(d,a.configuration.forceWaitForTracks?HTMLMediaElement.HAVE_CURRENT_DATA:HTMLMediaElement.HAVE_METADATA,a.h,()=>f.resolve());d.error?f.reject(dp(a)):d.preload===_.De&&(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,_.r,()=>{f.reject(dp(a))});return new _.jp(f,
215
- ()=>{const g=new _.I(_.G,7,7001);f.reject(g);return Promise.resolve()})};lp=function(a,b){$m(b,HTMLMediaElement.HAVE_CURRENT_DATA,a.h,()=>{if(a.isLive()&&a.getState()!==_.Po){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)}))}})};
216
- mp=function(a,b){let c=!1;a.h.on(b,_.Ef,()=>{c=b.paused});a.h.on(b,_.Df,()=>{.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};
217
- _.rp=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};_.sp=function(a,b){a.classList.add(b)};_.tp=function(a,b){if(a&&typeof b===_.Ee)for(const c in b)a.style[c]=b[c]};_.up=function(a){return document.createElement(a)};
218
- vp=function(a,b){const c=new MutationObserver(()=>{const d=Array.from(a.h.values());di(Array.from(b.classList),Array.from(d))||b.classList.add(...d)});c.observe(b,{attributes:!0,attributeFilter:["class"]});return c};wp=function(a,b){a.a&&0!==b.length&&(a.a.classList.add(b),a.h.add(b))};
219
- xp=function(a,b,c){(_.Dk()&&53===_.Ek().major||_.Dk()&&68===_.Ek().major||_.Fk())&&!b.hasAttribute(xd)&&(b.style.opacity="0",b.setAttribute(xd,""),a.j.one(b,Od,()=>{b.removeAttribute(xd);b.style.opacity="1";c&&(c.style.opacity="1")}))};yp=function(a){if(a.Xa){let b=a.player.getDuration();a.maxDuration&&(b=Math.min(b,a.maxDuration));a.Xa.h=b}a.je&&a.je()};zp=function(a,b){return _.x(function*(){yield a.release();yield a.load(b)})};
220
- Ap=function(a){if(a.sideAdContainer)a=a.sideAdContainer;else if(a=a.yg.getSurface().getContainer(),!a)throw Error("Primary player does not have a container");return a};
221
- Cp=function(a,b,c){return Array.from({length:2}).map((d,e)=>{var f=document.createElement(_.w);b.appendChild(f);d=a.ka.cb.create();f=new Bp(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})};Dp=function(a){return[a.a,...a.l.a.map(b=>b.player)]};
222
- Ep=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(bd),d.classList.remove("clpp-hide")):(a.g.debug(`Hide video element .${b}`),d.classList.remove(bd),d.classList.add("clpp-hide")),a.F&&a.F(d,c))};Fp=function(a){return a.h.find(b=>!!b.primary)||null};
223
- Tp=function(a,b,c){return _.x(function*(){if(a.w)a.g.warn(`Cannot ${c} item while busy (ID: ${b})`);else{var d=Gp(a,b);if(d){a.g.info(`${c} item (ID: ${b})`);a.w=!0;var e=a.f;e&&(e.player.isPaused()||(a.o?e.primary?Hp(a,e,Ip):e.player.pause():e.player.pause()),e.primary?Hp(a,e,Ip):Hp(a,e,Jp));var f=a.j.has(b);f&&a.j.delete(b);try{c===_.Te?(e&&d.primary?yield Kp(a,d):f?yield Lp(a,d):yield Mp(a,d),yp(d)):f?a.g.error("Loading preloaded items is not supported"):yield Np(a,d);Op(a,d);d.primary?Hp(a,d,
224
- Jp):Hp(a,d,Ip);d.Xa&&Pp(a,d,d.Xa);if(d.Aa)d.player.one(_.Sd,d.Aa);d.sg&&d.sg(d.player.getDuration());e&&Qp(a,e)}catch(g){a.g.error(`Item failed to ${c} (ID: ${b})`,g);if(d.primary)throw g;const h=Fp(a);h&&(a.g.warn("Ad failed, resuming primary item"),yield Kp(a,h))}finally{a.w=!1,Rp(a),Sp(a,d.next)}}else a.g.warn(`Item not found (ID: ${b})`)}})};
225
- Op=function(a,b){const c=b.transition;if(c&&!c.Cg){if(c.Aa){const d=c.Aa,e=()=>{a.g.info(`Transition onEnded to (ID: ${d})`);a.play(d)};b.player.one(_.Sd,e);b.disposers.push(()=>{b.player.off(_.Sd,e)})}c.ge&&Up(a,b,()=>{const d=a.f.Xa;d&&(b.disposers.forEach(e=>e()),b.disposers=[],a.a.trigger(new _.F(_.lc,{ad:d})),a.a.trigger(new _.F(_.Wb,{ad:d})),a.a.trigger(new _.F(_.Tb,{id:b.Lb})))});c.Cg=!0}};
226
- Vp=function(a,b){return _.x(function*(){a.g.info("Crop ads by playout limit",b);var c=Fp(a),d=a.getCurrentItem();if(c&&d&&d.Xa&&null!=c.W){var e=a.h.filter(l=>!l.primary),f=Math.max(...e.map(l=>l.nb));if(b>f)a.g.info("Playout limit is greater than ad pod duration, ignored.");else{var g=d.player.getPosition()+(d.nb-d.duration),h=e.sort((l,m)=>m.nb-l.nb)[0],k=c.W;b<=g?(c.W-=f-g,a.g.warn("Playout limit exceeded, immediately returning "+`to primary at ${c.W.toFixed(1)} instead of `+`${k.toFixed(1)}`),
227
- yield Tp(a,c.id,_.Te),h.Aa&&h.Aa(),c=d.Xa,a.a.trigger(new _.F(_.lc,{ad:c})),a.a.trigger(new _.F(_.Wb,{ad:c})),a.a.trigger(new _.F(_.Tb,{id:d.Lb}))):(a.g.warn("Limiting playout of ads to",b),(d=e.find(l=>b<=l.nb&&b>=l.nb-l.duration))?(e=b-(d.nb-d.duration),d.Xa.h=e,c.W-=f-b,a.g.info("Last ad is now ",d.Xa.sb(),"with cropped duration",e,"and primary will resume at",c.W.toFixed(1),"instead of",k.toFixed(1)),h.Aa&&(d.Aa=h.Aa),d.transition={ge:{position:e,itemId:c.id,W:c.W}},Op(a,d)):a.g.warn("Cannot find ad hit by limit"))}}})};
228
- Wp=function(a){return _.x(function*(){const b=a.f;b&&("loaded"!==b.state&&(yield b.Uc),yield b.player.play(),b.state=_.df,yp(b))})};Xp=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(),Uc:Promise.resolve()})))};
229
- Zp=function(a,b){return _.x(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 Yp(a,e.id)}))})};$p=function(a){return _.x(function*(){yield Zp(a,a.h.map(b=>b.id))})};Yp=function(a,b){return _.x(function*(){const c=a.j.get(b);c&&(a.g.info(`Stop preloading item (ID: ${b})`),c.player&&(yield aq(a,c.player)),a.j.delete(b))})};
230
- cq=function(a){const b=Fp(a);b&&(b.transition=void 0,b.next=[],bq(a))};dq=function(a){return _.x(function*(){const b=a.h.filter(c=>!c.primary).map(c=>c.id);cq(a);yield Zp(a,b)})};eq=function(a){_.x(function*(){const b=a.getCurrentItem(),c=b.next[0];b&&b.primary&&c&&(cq(a),yield a.play(c))})};bq=function(a){a.f&&(a.f.disposers.forEach(b=>b()),a.f.disposers=[],a.f.transition&&(a.f.transition.Cg=!1),Op(a,a.f))};Gp=function(a,b){return a.h.find(c=>c.id===b)||null};
231
- Hp=function(a,b,c){const d=b?b.Lb||null:null;a.a.getConfiguration().muted||a.B?(a.a.setMuted(!0),fq(a,!0)):(b.audio&&(c=b.audio),a.ka.onAudioDecision&&(c=a.ka.onAudioDecision(d)),c===Jp?(a.a.setMuted(!1),fq(a,!0)):c===Ip?(a.a.setMuted(!0),fq(a,!1)):a.g.warn("Audio decision not supported",c))};
232
- Kp=function(a,b){return _.x(function*(){if(b.player){a.G();if(b.state===mf){a.g.info("Wait for seek to finish");try{yield b.preloadPromise}catch(c){}}a.Z=!1;b.W&&(yield b.player.seek(b.W,!0));a.f=b;b.role=gq;Ep(a,b.player,!0);b.state="loading";a.o?(Hp(a,b,Jp),b.player.isPaused()&&(yield b.player.play())):yield b.player.play();b.state=_.df}})};
233
- Lp=function(a,b){return _.x(function*(){const c=b.player;if(c){if(b.state===mf){a.g.info(Eb);try{yield b.preloadPromise}catch(d){}}a.f=b;b.role=gq;Ep(a,c,!0);b.state===lf?yield c.play():b.state===kf&&(yield zp(c,b.config));b.state=_.df}})};Mp=function(a,b){return _.x(function*(){yield Np(a,b);yield b.player.play();b.state=_.df})};
234
- Np=function(a,b){return _.x(function*(){const c=yield hq(a,!!b.primary);a.f=b;b.role=gq;a.f.player=c;a.f.videoEl=c.getSurface().getMedia();Ep(a,c,!0);b.state="loading";b.Uc=zp(c,b.config);yield b.Uc;b.state="loaded"})};
235
- Pp=function(a,b,c){const d=b.player,e=()=>{const l=d.getPosition(),m=c.getDuration();c.j=l;a.a.trigger(new _.F(_.ec,{ad:c}));!c.l&&l>=m/4&&(c.l=!0,a.a.trigger(new _.F(_.Xb,{ad:c})));!c.o&&l>=m/2&&(c.o=!0,a.a.trigger(new _.F(_.cc,{ad:c})));!c.w&&l>=3*m/4&&(c.w=!0,a.a.trigger(new _.F(_.nc,{ad:c})))},f=()=>{d.isEnded()||a.a.trigger(new _.F(_.dc,{ad:c}))},g=()=>{a.a.trigger(new _.F(_.fc,{ad:c}))},h=()=>{a.a.trigger(new _.F(_.Ub,{ad:c}))},k=()=>{a.a.trigger(new _.F(_.lc,{ad:c}));a.a.trigger(new _.F(_.Wb,
236
- {ad:c}));c.f===c.a&&a.a.trigger(new _.F(_.Tb,{id:b.Lb}))};d.on(_.ag,e);d.on(_.Pe,f);d.on(_.df,g);d.on(_.Oc,h);d.one(_.Sd,k);b.disposers.push(()=>{d.off(_.ag,e);d.off(_.Pe,f);d.off(_.df,g);d.off(_.Oc,h);d.off(_.Sd,k)});1===c.f&&a.a.trigger(new _.F(_.Sb,{id:b.Lb}));c.videoEl=d.getSurface().getMedia();a.a.trigger(new _.F(_.ac,{ad:c}));a.a.trigger(new _.F(_.hc,{ad:c}))};
237
- Qp=function(a,b){return _.x(function*(){const c=b.player;b.primary?(a.g.info("Pause primary playback"),a.o||Ep(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=iq,b.$e?(a.g.info(`Release player (ID: ${b.id}) `+`after delay ${b.$e} ms.`),yield new Promise(d=>{setTimeout(()=>_.x(function*(){yield aq(a,c);Ep(a,c,!1);a.a.trigger(new _.F("ad-hls-released"));d()}),b.$e)})):(yield aq(a,c),Ep(a,c,!1)))})};
238
- Rp=function(a){Promise.all(Array.from(a.j.keys()).map(b=>Yp(a,b)))};Sp=function(a,b){_.x(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=>jq(a,d)))}})};kq=function(a,b,c){c=void 0===c?!1:c;if(!a.Z){var d=Fp(a);d?(d.W=b,c&&(a.Z=!0)):a.g.error("Failed to get primary item. Cannot configure resume position.")}};lq=function(a){a.A.forEach(b=>a.C.removeChild(b));a.A=[];Ep(a,a.a,!0)};
239
- Up=function(a,b,c){const d=b.transition.ge;let e=null;d.W&&kq(a,d.W);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(_.ag,f)};
240
- a.g.info("Start timeupdate polling");b.player.on(_.ag,f);b.disposers.push(()=>{null!=e&&(a.g.info("Stop RAF polling"),cancelAnimationFrame(e),e=null)});b.disposers.push(h)};aq=function(a,b){return _.x(function*(){b!==a.a&&(yield a.l.release(b))})};mq=function(a){return _.x(function*(){a.f&&(yield Qp(a,a.f),Ep(a,a.a,!0))})};hq=function(a,b){return _.x(function*(){if(b)return a.a;const c=yield a.l.get();if(!c)throw Error("No player available");return c})};
241
- jq=function(a,b){return _.x(function*(){if(b.primary){b.state=mf;a.j.set(b.id,b);if(b.W&&!a.o){var c=b.player;a.g.info("Preparing to resume at",b.W);Hp(a,b,Ip);yield c.seek(b.W,!0)}b.state=lf}else{c=b.id;var d=yield hq(a,!1);b.player=d;b.videoEl=d.getSurface().getMedia();b.role=iq;b.state=mf;try{a.j.set(c,b);b.config.autoplay&&(a.g.warn(ka+`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=
242
- e);b.preloadPromise=zp(d,b.config);yield b.preloadPromise;b.state=lf}catch(e){7001===e.code?(a.g.info(`Preload aborted (ID: ${c})`),b.state=jf):(a.g.warn(`Preload failed (ID: ${c})`,e),b.state=kf)}}})};fq=function(a,b){a.h.filter(c=>!c.primary&&c.player).forEach(c=>c.player.setMuted(b))};pq=function(a){return a.uf&&!(a.once&&a.Dg)&&[nq,oq].includes(a.state)};qq=function(a){const b={URI:a.xa[0].URI,DURATION:a.xa[0].DURATION};a.Eg&&(b[Jb]=a.Eg);return{ASSETS:[b]}};
243
- rq=function(a){return a&&a.ASSETS&&Array.isArray(a.ASSETS)?a.ASSETS.every(b=>typeof b.URI===_.Pf&&typeof b.DURATION===_.t):!1};tq=function(a){return a.a.find(b=>b.state===sq)||null};uq=function(a,b){const c=a.f.getPosition();b>=c||a.a.filter(d=>1===d.Xc&&!d.once&&d.og&&d.startTime>b).forEach(d=>{d.uf=!0})};wq=function(a){return a.a.find(b=>b.state===vq)||null};xq=function(a,b){return a.a.find(c=>pq(c)&&!c.Rh&&1===c.Xc&&b>c.startTime&&b<c.endTime)||null};
244
- yq=function(a,b){const c=a.f.getPosition();return a.a.filter(d=>1===d.Xc&&!d.Mf).sort((d,e)=>e.startTime-d.startTime).find(d=>d.startTime>c&&d.startTime<b)||null};Bq=function(a,b,c){_.x(function*(){a.Z=!0;try{const d=wq(a);d&&(yield zq(a,d));a.g.info("Seek into interstitial",b.ca);yield Aq(a,b)}catch(d){yield a.f.seek(c)}finally{a.Z=!1}})};
245
- Cq=function(a,b,c){_.x(function*(){a.Z=!0;try{const d=wq(a);d&&(yield zq(a,d));a.g.info("Play jumped interstitial",b.ca,"resume at",c.toFixed(2));yield Aq(a,b,c)}catch(d){a.g.warn("Failed to play jumped interstitial",b.ca,d),b.oh=new Date,yield a.f.seek(c)}finally{a.Z=!1}})};zq=function(a,b){return _.x(function*(){a.g.info("Unschedule interstitial",b.ca);yield dq(a.Y);b.state=nq})};
246
- Kq=function(a,b){const c=()=>_.x(function*(){if(!a.Z&&!a.te){var g=b.getPosition(),h=Dq(a,g);h&&(yield Eq(a,h))&&Fq(a,h,b);if((h=Gq(a))&&h.state===nq&&b.getDuration()-g<a.ka.resolutionOffsetSec&&(yield Eq(a,h)))if(h.xa&&0!==h.xa.length){if(g=a.Y.getCurrentItem()){var k=Hq(a,h,2);if(0!==k.length){var l=k[0].id;g.next=[l];g.transition={Aa:l};a.g.info(`Schedule postroll interstitial ${h.ca}`);Iq(a,h,k)}}}else a.g.warn("Postroll interstitial has no assets, ignoring.")}});b.on(_.ag,c);a.h.push(()=>{b.off(_.ag,
247
- c)});const d=()=>{Jq(a,!1,!0,!0)};b.on(_.$f,d);a.h.push(()=>{b.off(_.$f,d)});const e=()=>{a.te=!0};b.on(_.Sb,e);a.h.push(()=>{b.off(_.Sb,e)});const f=()=>{a.te=!1};b.on(_.Tb,f);a.h.push(()=>{b.off(_.Tb,f)})};Lq=function(a){a.h.forEach(b=>b());a.h=[]};Mq=function(a){return(a=a.Y.getCurrentItem())&&!a.primary?a.player:null};
248
- Jq=function(a,b,c,d){const e=Nq(a);a.g.info("Interstitial cues changed",e);var f=e;if(d){f=gi(a.a.map(m=>m.ca),e.map(m=>m.id));Oq(a,f.oi);const l=new Set(f.Xg);f=e.filter(m=>l.has(m.id))}if(!Pq(a,f))return!1;const g=[],h=[],k=[];f.forEach(l=>{const m=l.customAttributes.CUE||[];m.includes(_.db)?h.push(l):!d&&m.includes("PRE")?g.push(l):!c&&l.startTime<a.ka.ii?g.push(l):k.push(l)});1<g.length?a.g.warn("Multiple preroll interstitials not supported. Will display only the 1st one."):g[0]&&Qq(a,g[0],b);
249
- k.forEach(l=>Rq(a,l,1));1<h.length?a.g.warn("Multiple postroll interstitials not supported. Will display only the 1st one."):h[0]&&Rq(a,h[0],2);Sq(a,e);return 0<g.length};
250
- Tq=function(a){_.x(function*(){var b=a.Y;Xp(b,[{id:of,primary:!0,config:b.a.getConfiguration(),next:[],nb:0,duration:0,Lb:null}]);var c=Fp(b);if(!c)throw Error("Failed to find primary item");b.f=c;c.role=gq;c.player=b.a;c.videoEl=c.player.getSurface().getMedia();Ep(b,c.player,!0);b=a.f;c=b.getConfiguration();a.j=Jq(a,!c.autoplay,b.isLive(),!1);if(a.j){if(b=a.Y,c=b.l,c=c.a[0]?c.a[0].player:null)b.o||Ep(b,b.a,!1),Ep(b,c,!0)}else c.autoplay&&(yield Wp(a.Y))})};
251
- Aq=function(a,b,c){return _.x(function*(){if(!(yield Eq(a,b)))throw Error("Failed to bind");yield Uq(a,b,1,!1,c)})};Nq=function(a){return a.f.getTimelineCues().filter(b=>_.Bi(b.schemeIdUri)&&b.customAttributes)};Oq=function(a,b){const c=new Set(b);a.a.forEach(d=>{c.has(d.ca)&&!pq(d)&&a.g.warn("Removing an interstitial in active state",d)});a.a=a.a.filter(d=>!c.has(d.ca))};
252
- Pq=function(a,b){var c=b.sort((h,k)=>h.startTime-k.startTime);const d=a.ka.resolutionOffsetSec;let e=Infinity;const f=[];for(let h=0;h<c.length-1;h++){const k=c[h],l=c[h+1];l&&(e=Math.min(e,l.startTime-k.endTime));l&&l.startTime<=k.endTime&&f.push(`Interstitials ${k.id} and ${l.id} `+"overlap.")}e<d&&(c=e/2,a.ka.resolutionOffsetSec=c,a.g.info("Interstitials are closer than configured "+`resolutionOffsetSec (${d} s) auto-reconfiguring to `+`${c} s.`));const g=[];b.forEach(h=>{const k=h.customAttributes[_.Lb];
214
+ Vo=function(a,b,c){return _.w(function*(){const d=a.D.getConfiguration();yield Do(a,d);const e=a.keySystem();var f=a.f.Ha[e];const g=(f=f&&f.modifiers)&&f.licenseRequest,h=f&&f.licenseResponse;g?b.requestModifiers.push(k=>g(d,k,c)):e.startsWith(_.qd)&&b.requestModifiers.push(k=>_.Um(k));h?b.responseModifiers.push(k=>h(d,k,c)):e.startsWith(_.qd)&&b.responseModifiers.push(k=>_.Vm(k))})};Wo=function(a,b,c){a.j||(a.w(b),c.ec&&c.ec.reject(b),c.eb&&c.eb.reject(b))};
215
+ _.Zo=function(a,b){a&&b&&(_.Xo.set(a,b),_.Yo.info(`Registered TextDisplayerFactory: '${a}'`))};_.$o=function(a,b){b=b.find(c=>(c=_.Xo.get(c))?c.a(a):!1);if(null==b)return _.Yo.warn("Subtitles may not work as expected. No compatible text displayer found for this platform."),null;_.Yo.info(`Chosen the text displayer: ${b}`);return _.Xo.get(b)};
216
+ _.ap=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})}}};bp=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};cp=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};
217
+ dp=function(a){return a.a.map(b=>_.ah(b))};_.ep=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:[]}};
218
+ jp=function(a){a.g.debug("Start watching for video events for "+a.m.namespace());const b=a.m,c=d=>fp(a,d.type);a.a.on(b,_.Td,()=>{a.Y||(a.h=!1,gp(a,_.hp))});a.a.on(b,Pc,c);a.a.on(b,_.ef,()=>{a.C=!0;a.h=!1;fp(a,_.ef)});a.a.on(b,_.Qe,()=>{a.C=!1;a.h=!1;fp(a,_.Qe)});a.a.on(b,_.cg,c);a.a.on(b,_.tf,c);a.a.on(b,_.Ef,d=>{a.Y=!1;a.h=!1;fp(a,d.type)});a.a.on(b,_.Ff,d=>{a.Y=!0;fp(a,d.type)});a.a.on(b,Lf,c);a.a.on(b,_.Cg,()=>{a.h=!0;fp(a,_.Cg)});a.a.on(b,_.Ud,d=>{(d=d&&d.detail)&&d.severity&&d.severity===_.F&&
219
+ gp(a,_.ip)});a.a.on(b,_.pe,c);a.a.on(b,Qc,()=>{a.B=!0;fp(a,Qc)});a.a.on(b,_.ng,d=>{a.Y=!0;fp(a,d.type)});a.a.on(b,_.mg,d=>{a.Y=!1;a.h=!1;fp(a,d.type)})};kp=function(a,b){return Object.keys(b)[a]};mp=function(a,b){const c={type:_.Nf};b===_.Oc||b===_.Nc?(c.reason=a.o,b===_.Oc?c.timeSinceLastStateChangeMS=a.G:c.bufferedTimeMS=a.A):(a.f===_.lp&&(c.reason=a.o),a.w===_.lp&&(c.reason=a.o,c.bufferedTimeMS=a.A),c.currentState=a.f,c.previousState=a.w,c.timeSinceLastStateChangeMS=a.G);return c};
220
+ gp=function(a,b){if(a.f===b)return!1;var c=Date.now();const d=a.f===_.lp;a.w=a.f;a.f=b;a.w===_.hp&&(a.H=c,a.l=0);a.l||(a.l=a.H||c);a.G=c-a.l;a.l=c;b===_.lp?(a.J=a.l,a.o=a.Y?1:2,a.g.info("Buffering started. Reason: "+kp(a.o-1,_.np)),b=mp(a,_.Oc),a.Sa(_.Oc,b)):d&&(a.A=a.l-a.J,a.g.info("Buffering finished. Reason: "+kp(a.o-1,_.np)+". Buffering time: "+a.A+" ms"),b=mp(a,_.Nc),a.Sa(_.Nc,b));b=kp(a.w,_.op);c=kp(a.f,_.op);a.g.info(`Player state change: ${b} -> ${c}`);a.Sa(_.Nf,mp(a,""));return!0};
221
+ fp=function(a,b){if(a.f===_.ip)a.g.warn("Player is in error state, aborting any further state checks");else{var c=a.m.isPaused(),d=a.m?a.m.isEnded():!1;if(d)a.Y||(a.h=!1,gp(a,_.hp));else if(b!==_.cg){var e=a.m.getPosition();e=null!==e&&void 0!==e&&0<=e?a.m.getBufferInfo().Ka(e,!0):-1;a.F=e;e=a.m.getSurface().getMedia();a.j=e?e.readyState:null;a.I=a.m.getPlaybackRate()||1;e=typeof a.j===_.r&&2>a.j&&2===e.networkState;var f=typeof a.j===_.r&&0>=a.F&&a.f===_.pp,g=typeof a.j===_.r&&2>=a.j&&a.h;e=a.Y||
222
+ f||e||g;!a.K||a.m.isLive()||a.f!==_.lp||e||(f=b===_.Ef&&4===a.j,(g=a.w===_.qp)&&!a.B?e=!0:g||a.B||f||(e=!0));f=!1;e?f=gp(a,_.lp):c?f=gp(a,_.rp):a.C&&(f=gp(a,_.sp));f&&(a.B=!1);a.g.debug("Video state check for event "+b+":: seeking: "+a.Y+", waiting: "+a.h+", playing: "+a.C+", paused: "+c+", readyState: "+a.j+", rate: "+a.I+", buffer: "+a.F+", ended: "+d+". Changed state: "+f+", Current state: "+kp(a.f,_.op))}}};
223
+ tp=function(a){if(!a)return null;a=(new _.Ui(a)).a.pathname.toUpperCase();return a.endsWith(".MPD")?_.uc:a.endsWith(".M3U8")?_.Ql:a.endsWith(".MP4")?_.tg:a.endsWith(".MP3")?"audio/mp3":a.endsWith("MANIFEST")||a.endsWith(".ISM")?_.Bc:null};_.vp=function(a){let b;$l(a)?b=a.source:b=a;Array.isArray(b)||(b=[b]);b=b.filter(c=>typeof c===_.Qf||"url"in c);a=[];for(let c=0;c<b.length;c++){const d=up(b[c]);d&&a.push(d)}return a};
224
+ up=function(a){let b=null;_.gh(a)&&(a={url:a});typeof a===_.Fe&&!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!==_.Qf||(b.name=a.name),_.z(a.Vb)||typeof a.Vb!==_.Qf||(b.Vb=a.Vb),_.z(a.audioMimeType)||typeof a.audioMimeType!==_.Qf||(b.audioMimeType=a.audioMimeType));b&&!b.type&&(b.type=tp(a.url),b.type?wp.debug("Detect media type "+
225
+ b.type+" for "+a.url):wp.warn("Unable to detect media type for "+a.url));return b};yp=function(a,b){if(a.w)throw new _.I(_.F,7,7E3);a.a||(a.h.on(b,_.Ud,()=>{{const c=xp(a);if(c)a.onError(c)}}),a.h.on(b,_.yf,()=>{const c=b.videoWidth,d=b.videoHeight,e=a.getTrackManager();e&&0<c&&0<d&&(e.w={width:c,height:d});a.trigger(new _.C(_.Lc,{detail:{width:c,height:d}}))}),a.a=b)};Ap=function(a){const b=_.ak()?fo:void 0;return new _.zp(a,b)};
226
+ Bp=function(a){return _.w(function*(){if(a.w)return Promise.reject(new _.I(_.F,7,7E3));var b=a.ga[a.getSourceIndex()];if(!a.configuration.drm||!1===b.drmProtected)return a.log.debug("No DRM configuration present.","Skipping DRM engine initialization"),Promise.resolve();b=_.rm(a.configuration.drm);a.log.debug("Drm configuration: ",b);const c=a.getNetworkEngine();a.o=Ap({sb:c,onError:d=>a.onError(d),Je:()=>{},Ie:(d,e)=>{a.trigger(new _.C(_.Id,{expirationTime:e}))},onEvent:d=>{d instanceof _.C?a.dispatchEvent(d):
227
+ a.log.debug(_.wb,d.type)},getConfiguration:()=>a.getConfiguration(),Jc:()=>a.Jc()});a.o.f=b;yield _.so(a.o,[{id:0,language:_.hg,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,Ba:0,mimeType:_.tg,codecs:"",encrypted:!0,keyId:null,language:_.hg,originalLanguage:_.hg,label:null,type:_.t,primary:!1,frameRate:void 0,
228
+ $i:void 0,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,spatialAudio:!1,Li:null,closedCaptions:null},bandwidth:100,drmInfos:[],allowedByApplication:!0,allowedByKeySystem:!0}]);yield _.Ko(a.o,a.a)})};Cp=function(a,b){un(a.a,HTMLMediaElement.HAVE_CURRENT_DATA,a.h,()=>{a.getState()!==_.ip&&a.seek(b).catch(c=>{a.log.warn("Error while seeking to start position.",c)})})};
229
+ xp=function(a){if(null===a.ga||!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 _.I(_.F,3,3016,{code:b,Vi:c,message:a.a.error.message})};
230
+ Ep=function(a){if(a.w)return new _.Dp(Promise.reject(new _.I(_.F,7,7E3)),()=>{});const b=a.ga[a.getSourceIndex()],c=a.configuration.startTime||null,d=a.a,e=a.H;c&&Cp(a,c);if(d.preload!==_.Ee)a.h.one(d,_.pe,()=>{const g=Date.now()/1E3-e;a.f.B=g;a.log.debug("Time to load: ",g)});d.src=b.url;(_.Qj()||_.Tj())&&d.load();const f=new _.xk;a.h.one(d,Lf,()=>{const g=a.getConfiguration().manifest.attemptParameters.timeout||30;a.B||(a.B=(new _.Mj(()=>{f.reject(new _.I(_.F,3,3100,{message:`Unable to load media source successfully from ${b.url}`,
231
+ uri:b.url},d.error))})).la(g))});un(d,a.configuration.forceWaitForTracks?HTMLMediaElement.HAVE_CURRENT_DATA:HTMLMediaElement.HAVE_METADATA,a.h,()=>f.resolve());d.error?f.reject(xp(a)):d.preload===_.Ee&&(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,_.Ud,()=>{f.reject(xp(a))});return new _.Dp(f,
232
+ ()=>{const g=new _.I(_.F,7,7001);f.reject(g);return Promise.resolve()})};Fp=function(a,b){un(b,HTMLMediaElement.HAVE_CURRENT_DATA,a.h,()=>{if(a.isLive()&&a.getState()!==_.ip){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)}))}})};
233
+ Gp=function(a,b){let c=!1;a.h.on(b,_.Ff,()=>{c=b.paused});a.h.on(b,_.Ef,()=>{.2>b.duration-b.currentTime&&b.paused&&!c&&(a.log.warn("Player was auto-paused during seek to the end, auto-resuming."),b.play())})};_.Jp=function(a){0<=Hp.indexOf(a)?Ip.warn(`Factory '${a.name()}' is already registered`):(Hp.push(a),Ip.info(`Factory '${a.name()}' has been registered.`))};Kp=function(a,b){const c=Hp.find(d=>d.a(a,b))||null;c&&Ip.info(`Chosen ads manager: ${c.name()}`);return c};
234
+ _.Lp=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};_.Mp=function(a,b){a.classList.add(b)};_.Np=function(a,b){if(a&&typeof b===_.Fe)for(const c in b)a.style[c]=b[c]};_.Op=function(a){return document.createElement(a)};
235
+ Pp=function(a,b){const c=new MutationObserver(()=>{const d=Array.from(a.h.values());fi(Array.from(b.classList),Array.from(d))||b.classList.add(...d)});c.observe(b,{attributes:!0,attributeFilter:["class"]});return c};Qp=function(a,b){a.a&&0!==b.length&&(a.a.classList.add(b),a.h.add(b))};
236
+ Rp=function(a,b,c){(_.Tj()&&53===_.Uj().major||_.Tj()&&68===_.Uj().major||_.Vj())&&!b.hasAttribute(yd)&&(b.style.opacity="0",b.setAttribute(yd,""),a.j.one(b,Pd,()=>{b.removeAttribute(yd);b.style.opacity="1";c&&(c.style.opacity="1")}))};Sp=function(a){if(a.Va){let b=a.player.getDuration();a.maxDuration&&(b=Math.min(b,a.maxDuration));a.Va.h=b}a.be&&a.be()};Tp=function(a,b){return _.w(function*(){yield a.release();yield a.load(b)})};
237
+ Up=function(a){if(a.sideAdContainer)a=a.sideAdContainer;else if(a=a.pg.getSurface().getContainer(),!a)throw Error("Primary player does not have a container");return a};
238
+ Wp=function(a,b,c){return Array.from({length:2}).map((d,e)=>{var f=document.createElement(_.t);b.appendChild(f);d=a.ka.$a.create();f=new Vp(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})};Xp=function(a){return[a.a,...a.l.a.map(b=>b.player)]};
239
+ Yp=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(cd),d.classList.remove("clpp-hide")):(a.g.debug(`Hide video element .${b}`),d.classList.remove(cd),d.classList.add("clpp-hide")),a.F&&a.F(d,c))};Zp=function(a){return a.h.find(b=>!!b.primary)||null};
240
+ mq=function(a,b,c){return _.w(function*(){if(a.w)a.g.warn(`Cannot ${c} item while busy (ID: ${b})`);else{var d=$p(a,b);if(d){a.g.info(`${c} item (ID: ${b})`);a.w=!0;var e=a.f;e&&(e.player.isPaused()||(a.o?e.primary?aq(a,e,bq):e.player.pause():e.player.pause()),e.primary?aq(a,e,bq):aq(a,e,cq));var f=a.j.has(b);f&&a.j.delete(b);try{c===_.Ue?(e&&d.primary?yield dq(a,d):f?yield eq(a,d):yield fq(a,d),Sp(d)):f?a.g.error("Loading preloaded items is not supported"):yield gq(a,d);hq(a,d);d.primary?aq(a,d,
241
+ cq):aq(a,d,bq);d.Va&&iq(a,d,d.Va);if(d.za)d.player.one(_.Td,d.za);d.jg&&d.jg(d.player.getDuration());e&&jq(a,e)}catch(g){a.g.error(`Item failed to ${c} (ID: ${b})`,g);if(d.primary)throw g;const h=Zp(a);h&&(a.g.warn("Ad failed, resuming primary item"),yield dq(a,h))}finally{a.w=!1,kq(a),lq(a,d.next)}}else a.g.warn(`Item not found (ID: ${b})`)}})};
242
+ hq=function(a,b){const c=b.transition;if(c&&!c.tg){if(c.za){const d=c.za,e=()=>{a.g.info(`Transition onEnded to (ID: ${d})`);a.play(d)};b.player.one(_.Td,e);b.disposers.push(()=>{b.player.off(_.Td,e)})}c.$d&&nq(a,b,()=>{const d=a.f.Va;d&&(b.disposers.forEach(e=>e()),b.disposers=[],a.a.trigger(new _.C(_.mc,{ad:d})),a.a.trigger(new _.C(_.Wb,{ad:d})),a.a.trigger(new _.C(_.Tb,{id:b.Hb})))});c.tg=!0}};
243
+ oq=function(a,b){return _.w(function*(){a.g.info("Crop ads by playout limit",b);var c=Zp(a),d=a.getCurrentItem();if(c&&d&&d.Va&&null!=c.W){var e=a.h.filter(l=>!l.primary),f=Math.max(...e.map(l=>l.jb));if(b>f)a.g.info("Playout limit is greater than ad pod duration, ignored.");else{var g=d.player.getPosition()+(d.jb-d.duration),h=e.sort((l,m)=>m.jb-l.jb)[0],k=c.W;b<=g?(c.W-=f-g,a.g.warn("Playout limit exceeded, immediately returning "+`to primary at ${c.W.toFixed(1)} instead of `+`${k.toFixed(1)}`),
244
+ yield mq(a,c.id,_.Ue),h.za&&h.za(),c=d.Va,a.a.trigger(new _.C(_.mc,{ad:c})),a.a.trigger(new _.C(_.Wb,{ad:c})),a.a.trigger(new _.C(_.Tb,{id:d.Hb}))):(a.g.warn("Limiting playout of ads to",b),(d=e.find(l=>b<=l.jb&&b>=l.jb-l.duration))?(e=b-(d.jb-d.duration),d.Va.h=e,c.W-=f-b,a.g.info("Last ad is now ",d.Va.pb(),"with cropped duration",e,"and primary will resume at",c.W.toFixed(1),"instead of",k.toFixed(1)),h.za&&(d.za=h.za),d.transition={$d:{position:e,itemId:c.id,W:c.W}},hq(a,d)):a.g.warn("Cannot find ad hit by limit"))}}})};
245
+ pq=function(a){return _.w(function*(){const b=a.f;b&&("loaded"!==b.state&&(yield b.Nc),yield b.player.play(),b.state=_.ef,Sp(b))})};qq=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(),Nc:Promise.resolve()})))};
246
+ sq=function(a,b){return _.w(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 rq(a,e.id)}))})};tq=function(a){return _.w(function*(){yield sq(a,a.h.map(b=>b.id))})};rq=function(a,b){return _.w(function*(){const c=a.j.get(b);c&&(a.g.info(`Stop preloading item (ID: ${b})`),c.player&&(yield uq(a,c.player)),a.j.delete(b))})};
247
+ wq=function(a){const b=Zp(a);b&&(b.transition=void 0,b.next=[],vq(a))};xq=function(a){return _.w(function*(){const b=a.h.filter(c=>!c.primary).map(c=>c.id);wq(a);yield sq(a,b)})};yq=function(a){_.w(function*(){const b=a.getCurrentItem(),c=b.next[0];b&&b.primary&&c&&(wq(a),yield a.play(c))})};vq=function(a){a.f&&(a.f.disposers.forEach(b=>b()),a.f.disposers=[],a.f.transition&&(a.f.transition.tg=!1),hq(a,a.f))};$p=function(a,b){return a.h.find(c=>c.id===b)||null};
248
+ aq=function(a,b,c){const d=b?b.Hb||null:null;a.a.getConfiguration().muted||a.B?(a.a.setMuted(!0),zq(a,!0)):(b.audio&&(c=b.audio),a.ka.onAudioDecision&&(c=a.ka.onAudioDecision(d)),c===cq?(a.a.setMuted(!1),zq(a,!0)):c===bq?(a.a.setMuted(!0),zq(a,!1)):a.g.warn("Audio decision not supported",c))};
249
+ dq=function(a,b){return _.w(function*(){if(b.player){a.G();if(b.state===nf){a.g.info("Wait for seek to finish");try{yield b.preloadPromise}catch(c){}}a.Y=!1;b.W&&(yield b.player.seek(b.W,!0));a.f=b;b.role=Aq;Yp(a,b.player,!0);b.state="loading";a.o?(aq(a,b,cq),b.player.isPaused()&&(yield b.player.play())):yield b.player.play();b.state=_.ef}})};
250
+ eq=function(a,b){return _.w(function*(){const c=b.player;if(c){if(b.state===nf){a.g.info(Eb);try{yield b.preloadPromise}catch(d){}}a.f=b;b.role=Aq;Yp(a,c,!0);b.state===mf?yield c.play():b.state===lf&&(yield Tp(c,b.config));b.state=_.ef}})};fq=function(a,b){return _.w(function*(){yield gq(a,b);yield b.player.play();b.state=_.ef})};
251
+ gq=function(a,b){return _.w(function*(){const c=yield Bq(a,!!b.primary);a.f=b;b.role=Aq;a.f.player=c;a.f.videoEl=c.getSurface().getMedia();Yp(a,c,!0);b.state="loading";b.Nc=Tp(c,b.config);yield b.Nc;b.state="loaded"})};
252
+ iq=function(a,b,c){const d=b.player,e=()=>{const l=d.getPosition(),m=c.getDuration();c.j=l;a.a.trigger(new _.C(_.ec,{ad:c}));!c.l&&l>=m/4&&(c.l=!0,a.a.trigger(new _.C(_.Xb,{ad:c})));!c.o&&l>=m/2&&(c.o=!0,a.a.trigger(new _.C(_.cc,{ad:c})));!c.w&&l>=3*m/4&&(c.w=!0,a.a.trigger(new _.C(_.nc,{ad:c})))},f=()=>{d.isEnded()||a.a.trigger(new _.C(_.dc,{ad:c}))},g=()=>{a.a.trigger(new _.C(_.fc,{ad:c}))},h=()=>{a.a.trigger(new _.C(_.Ub,{ad:c}))},k=()=>{a.a.trigger(new _.C(_.mc,{ad:c}));a.a.trigger(new _.C(_.Wb,
253
+ {ad:c}));c.f===c.a&&a.a.trigger(new _.C(_.Tb,{id:b.Hb}))};d.on(_.cg,e);d.on(_.Qe,f);d.on(_.ef,g);d.on(_.Oc,h);d.one(_.Td,k);b.disposers.push(()=>{d.off(_.cg,e);d.off(_.Qe,f);d.off(_.ef,g);d.off(_.Oc,h);d.off(_.Td,k)});1===c.f&&a.a.trigger(new _.C(_.Sb,{id:b.Hb}));c.videoEl=d.getSurface().getMedia();a.a.trigger(new _.C(_.ac,{ad:c}));a.a.trigger(new _.C(_.kc,{ad:c}))};
254
+ jq=function(a,b){return _.w(function*(){const c=b.player;b.primary?(a.g.info("Pause primary playback"),a.o||Yp(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=Cq,b.Re?(a.g.info(`Release player (ID: ${b.id}) `+`after delay ${b.Re} ms.`),yield new Promise(d=>{setTimeout(()=>_.w(function*(){yield uq(a,c);Yp(a,c,!1);a.a.trigger(new _.C("ad-hls-released"));d()}),b.Re)})):(yield uq(a,c),Yp(a,c,!1)))})};
255
+ kq=function(a){Promise.all(Array.from(a.j.keys()).map(b=>rq(a,b)))};lq=function(a,b){_.w(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=>Dq(a,d)))}})};Eq=function(a,b,c){c=void 0===c?!1:c;if(!a.Y){var d=Zp(a);d?(d.W=b,c&&(a.Y=!0)):a.g.error("Failed to get primary item. Cannot configure resume position.")}};Fq=function(a){a.A.forEach(b=>a.C.removeChild(b));a.A=[];Yp(a,a.a,!0)};
256
+ nq=function(a,b,c){const d=b.transition.$d;let e=null;d.W&&Eq(a,d.W);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(_.cg,f)};
257
+ a.g.info("Start timeupdate polling");b.player.on(_.cg,f);b.disposers.push(()=>{null!=e&&(a.g.info("Stop RAF polling"),cancelAnimationFrame(e),e=null)});b.disposers.push(h)};uq=function(a,b){return _.w(function*(){b!==a.a&&(yield a.l.release(b))})};Gq=function(a){return _.w(function*(){a.f&&(yield jq(a,a.f),Yp(a,a.a,!0))})};Bq=function(a,b){return _.w(function*(){if(b)return a.a;const c=yield a.l.get();if(!c)throw Error("No player available");return c})};
258
+ Dq=function(a,b){return _.w(function*(){if(b.primary){b.state=nf;a.j.set(b.id,b);if(b.W&&!a.o){var c=b.player;a.g.info("Preparing to resume at",b.W);aq(a,b,bq);yield c.seek(b.W,!0)}b.state=mf}else{c=b.id;var d=yield Bq(a,!1);b.player=d;b.videoEl=d.getSurface().getMedia();b.role=Cq;b.state=nf;try{a.j.set(c,b);b.config.autoplay&&(a.g.warn(la+`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=
259
+ e);b.preloadPromise=Tp(d,b.config);yield b.preloadPromise;b.state=mf}catch(e){7001===e.code?(a.g.info(`Preload aborted (ID: ${c})`),b.state=kf):(a.g.warn(`Preload failed (ID: ${c})`,e),b.state=lf)}}})};zq=function(a,b){a.h.filter(c=>!c.primary&&c.player).forEach(c=>c.player.setMuted(b))};Jq=function(a){return a.jf&&!(a.once&&a.ug)&&[Hq,Iq].includes(a.state)};Kq=function(a){const b={URI:a.wa[0].URI,DURATION:a.wa[0].DURATION};a.vg&&(b[Jb]=a.vg);return{ASSETS:[b]}};
260
+ Lq=function(a){return a&&a.ASSETS&&Array.isArray(a.ASSETS)?a.ASSETS.every(b=>typeof b.URI===_.Qf&&typeof b.DURATION===_.r):!1};Nq=function(a){return a.a.find(b=>b.state===Mq)||null};Oq=function(a,b){const c=a.f.getPosition();b>=c||a.a.filter(d=>1===d.Qc&&!d.once&&d.eg&&d.startTime>b).forEach(d=>{d.jf=!0})};Qq=function(a){return a.a.find(b=>b.state===Pq)||null};Rq=function(a,b){return a.a.find(c=>Jq(c)&&!c.Gh&&1===c.Qc&&b>c.startTime&&b<c.endTime)||null};
261
+ Sq=function(a,b){const c=a.f.getPosition();return a.a.filter(d=>1===d.Qc&&!d.Bf).sort((d,e)=>e.startTime-d.startTime).find(d=>d.startTime>c&&d.startTime<b)||null};Vq=function(a,b,c){_.w(function*(){a.Y=!0;try{const d=Qq(a);d&&(yield Tq(a,d));a.g.info("Seek into interstitial",b.da);yield Uq(a,b)}catch(d){yield a.f.seek(c)}finally{a.Y=!1}})};
262
+ Wq=function(a,b,c){_.w(function*(){a.Y=!0;try{const d=Qq(a);d&&(yield Tq(a,d));a.g.info("Play jumped interstitial",b.da,"resume at",c.toFixed(2));yield Uq(a,b,c)}catch(d){a.g.warn("Failed to play jumped interstitial",b.da,d),b.fh=new Date,yield a.f.seek(c)}finally{a.Y=!1}})};Tq=function(a,b){return _.w(function*(){a.g.info("Unschedule interstitial",b.da);yield xq(a.X);b.state=Hq})};
263
+ dr=function(a,b){const c=()=>_.w(function*(){if(!a.Y&&!a.le){var g=b.getPosition(),h=Xq(a,g);h&&(yield Yq(a,h))&&Zq(a,h,b);if((h=$q(a))&&h.state===Hq&&b.getDuration()-g<a.ka.resolutionOffsetSec&&(yield Yq(a,h)))if(h.wa&&0!==h.wa.length){if(g=a.X.getCurrentItem()){var k=ar(a,h,2);if(0!==k.length){var l=k[0].id;g.next=[l];g.transition={za:l};a.g.info(`Schedule postroll interstitial ${h.da}`);br(a,h,k)}}}else a.g.warn("Postroll interstitial has no assets, ignoring.")}});b.on(_.cg,c);a.h.push(()=>{b.off(_.cg,
264
+ c)});const d=()=>{cr(a,!1,!0,!0)};b.on(_.bg,d);a.h.push(()=>{b.off(_.bg,d)});const e=()=>{a.le=!0};b.on(_.Sb,e);a.h.push(()=>{b.off(_.Sb,e)});const f=()=>{a.le=!1};b.on(_.Tb,f);a.h.push(()=>{b.off(_.Tb,f)})};er=function(a){a.h.forEach(b=>b());a.h=[]};fr=function(a){return(a=a.X.getCurrentItem())&&!a.primary?a.player:null};
265
+ cr=function(a,b,c,d){const e=gr(a);a.g.info("Interstitial cues changed",e);var f=e;if(d){f=ii(a.a.map(m=>m.da),e.map(m=>m.id));hr(a,f.gi);const l=new Set(f.Pg);f=e.filter(m=>l.has(m.id))}if(!ir(a,f))return!1;const g=[],h=[],k=[];f.forEach(l=>{const m=l.customAttributes.CUE||[];m.includes(_.db)?h.push(l):!d&&m.includes("PRE")?g.push(l):!c&&l.startTime<a.ka.Yh?g.push(l):k.push(l)});1<g.length?a.g.warn("Multiple preroll interstitials not supported. Will display only the 1st one."):g[0]&&jr(a,g[0],b);
266
+ k.forEach(l=>kr(a,l,1));1<h.length?a.g.warn("Multiple postroll interstitials not supported. Will display only the 1st one."):h[0]&&kr(a,h[0],2);lr(a,e);return 0<g.length};
267
+ mr=function(a){_.w(function*(){var b=a.X;qq(b,[{id:pf,primary:!0,config:b.a.getConfiguration(),next:[],jb:0,duration:0,Hb:null}]);var c=Zp(b);if(!c)throw Error("Failed to find primary item");b.f=c;c.role=Aq;c.player=b.a;c.videoEl=c.player.getSurface().getMedia();Yp(b,c.player,!0);b=a.f;c=b.getConfiguration();a.j=cr(a,!c.autoplay,b.isLive(),!1);if(a.j){if(b=a.X,c=b.l,c=c.a[0]?c.a[0].player:null)b.o||Yp(b,b.a,!1),Yp(b,c,!0)}else c.autoplay&&(yield pq(a.X))})};
268
+ Uq=function(a,b,c){return _.w(function*(){if(!(yield Yq(a,b)))throw Error("Failed to bind");yield nr(a,b,1,!1,c)})};gr=function(a){return a.f.getTimelineCues().filter(b=>_.Yi(b.schemeIdUri)&&b.customAttributes)};hr=function(a,b){const c=new Set(b);a.a.forEach(d=>{c.has(d.da)&&!Jq(d)&&a.g.warn("Removing an interstitial in active state",d)});a.a=a.a.filter(d=>!c.has(d.da))};
269
+ ir=function(a,b){var c=b.sort((h,k)=>h.startTime-k.startTime);const d=a.ka.resolutionOffsetSec;let e=Infinity;const f=[];for(let h=0;h<c.length-1;h++){const k=c[h],l=c[h+1];l&&(e=Math.min(e,l.startTime-k.endTime));l&&l.startTime<=k.endTime&&f.push(`Interstitials ${k.id} and ${l.id} `+"overlap.")}e<d&&(c=e/2,a.ka.resolutionOffsetSec=c,a.g.info("Interstitials are closer than configured "+`resolutionOffsetSec (${d} s) auto-reconfiguring to `+`${c} s.`));const g=[];b.forEach(h=>{const k=h.customAttributes[_.Lb];
253
270
  h.customAttributes[_.Kb]||k||g.push(`Interstitial cue ${h.id} is invalid `+"it contains neither X-ASSET-LIST nor X-ASSET-URI.")});0<g.length?a.g.error("Invalid interstitials, all interstitials will "+`be skipped. ${g.join(" ")}`):0<f.length&&a.g.warn("Unsupported format of interstitials, playback may not "+`behave correctly. ${f.join(" ")}`);return 0===g.length};
254
- Qq=function(a,b,c){_.x(function*(){var d=Rq(a,b,0);const e=yield Eq(a,d),f=d.xa?d.xa.length:0;if(e&&0<f)try{a.g.info(`Player preroll interstitial ${d.ca}`),yield Uq(a,d,0,c)}catch(g){a.g.error("Preroll interstitial failed.",g),(d=Fp(a.Y))&&(yield a.Y.play(d.id))}else e?a.g.warn("Preroll interstitial has no assets, skipping"):a.g.error("Preroll interstitial failed, skipping"),yield mq(a.Y),c||(yield Wp(a.Y))})};
255
- Rq=function(a,b,c){{const u=b.customAttributes[_.Lb],v=b.customAttributes[_.Kb],y=b.customAttributes[_.Qb],A=b.customAttributes[_.Mb];var d=b.customAttributes[_.Nb]||[];b.customAttributes[Rb]||(b.customAttributes[Rb]=null==y||0<y?"RANGE":"POINT");var e=b.customAttributes["X-YOSPACE-AUDIO-PRIORITY"];e="CONTENT"===e?Jp:"AD"===e?Ip:void 0;var f=b.id,g=b.startTime,h=b.endTime,k=nq,l=null==y?null:Math.max(0,b.startTime+y),m="POINT"===b.customAttributes[Rb],n=!d.includes("SKIP");d=!d.includes("JUMP");{const D=
256
- b.customAttributes[Jb];if(D)try{var q=JSON.parse(atob(D))}catch(E){q=null}else q=null}b={ca:f,startTime:g,endTime:h,state:k,Cf:v,Df:u,xa:null,W:l,ri:y,dc:A,Xc:c,Rh:m,fh:n,Mf:d,Eg:q,og:null!=y&&0>y,once:(b.customAttributes.CUE||[]).includes("ONCE"),Dg:!1,uf:!0,customAttributes:b.customAttributes,audio:e}}a.a.push(b);return b};
257
- Sq=function(a,b){_.x(function*(){const c=a.Y.getCurrentItem();if(c)if(c.primary)a.a.forEach(g=>{const h=b.find(k=>k.id===g.ca);if(h){const k=h.customAttributes[_.Mb];null==g.dc&&null!=k&&(a.g.info(Ab,h.id,"Playout limit",k),g.dc=k,1===g.Xc&&g.state===vq&&Vq(a,g))}});else{var d=b.find(g=>g.id===c.Lb);if(d){var e=d.customAttributes[_.Mb];if(null!=e){var f=a.a.find(g=>g.ca===d.id);f&&null==f.dc&&(a.g.info(Ab,d.id,"Playout limit",e),f.dc=e,yield Vp(a.Y,e))}}}})};
258
- Vq=function(a,b){_.x(function*(){yield zq(a,b);yield Fq(a,b,a.f)})};
259
- Eq=function(a,b){return _.x(function*(){b.state=sq;if(b.Cf)try{a.g.info(`Load X-ASSET-LIST for ${b.ca}`);a.Va(new _.F(Yb));const c=yield Wq(a,b.Cf);b.xa=c.ASSETS;b.xa&&0!==b.xa.length||a.g.info(`Interstitial ${b.ca} has no assets, `+"will be smoothly skipped");if(null==b.W){const d=Fi(b.xa.map(e=>e.DURATION));b.W=b.startTime+(null==b.dc?d:Math.min(b.dc,d))}b.state=Xq;a.Va(new _.F(Zb));a.Va(new _.F($b,{id:b.ca,detail:c}))}catch(c){a.g.error("Failed to load X-ASSET-LIST",c),b.state=Yq}else b.Df?(b.xa=
260
- [{URI:b.Df,DURATION:b.endTime-b.startTime}],a.Va(new _.F($b,{id:b.ca,detail:qq(b)})),b.state=Xq):b.state=Yq;return b.state===Xq})};Uq=function(a,b,c,d,e){return _.x(function*(){if(0!==b.xa.length&&a.Y.getCurrentItem()){var f=Hq(a,b,c);0!==f.length&&(Iq(a,b,f),0===c&&a.f.isLive()||(null!=e?kq(a.Y,e,!0):null!=b.W&&kq(a.Y,b.W)),d?yield a.Y.load(f[0].id):yield a.Y.play(f[0].id))}})};
261
- Fq=function(a,b,c){if(b.xa)if(0===b.xa.length){const g=()=>{c.isLive()?a.g.info("Skipping empty "+`live interstitial ${b.ca}`):null!=b.W&&0!==b.ri?c.seek(b.W):a.g.info(`Empty VOD interstitial ${b.ca}, `+"continuing to next segment")};c.one(_.Yf,g);a.h.push(()=>{c.off(_.Yf,g)});a.g.info(`Schedule interstitial ${b.ca} to `+"be skipped")}else{var d=a.Y.getCurrentItem();if(d){var e=Hq(a,b,1);if(0!==e.length){var f=e[0].id;null!=b.W&&kq(a.Y,b.W);d.next=[f];d.transition={ge:{position:b.startTime,itemId:f,
262
- W:b.W}};a.g.info(`Schedule interstitial ${b.ca} for `+`${b.startTime} s`);Iq(a,b,e)}}}};Dq=function(a,b){return a.a.find(c=>{const d=c.startTime-b;return 1===c.Xc&&pq(c)&&0<d&&d<=a.ka.resolutionOffsetSec})||null};Gq=function(a){return a.a.find(b=>2===b.Xc)||null};
263
- Wq=function(a,b){return _.x(function*(){var c=a.Y.Ud();if(!c)throw Error("No player found");c=c.getNetworkEngine();const d=_.sj(Zq(a,b));c=yield Dj(c,d);if(null===c)return a.g.warn(`X-ASSET-LIST ${b} returned no content`),{ASSETS:[]};if(!rq(c))throw new _.li("Invalid X-ASSET-LIST list response");return c})};Zq=function(a,b){return(a=a.ka.hi)?(b=new URL(b),b.searchParams.set("_HLS_primary_id",a),b.toString()):b};
264
- Hq=function(a,b,c){let d=0,e=b.xa.map((h,k)=>{const l=`${b.ca}-${k}`;d+=h.DURATION;return{id:l,config:{source:{url:Zq(a,h.URI),type:_.pl}},duration:h.DURATION,nb:d,Lb:b.ca,next:[],Xa:new R(c,k+1,b.xa.length,h.DURATION,b.ca,b.fh,b.customAttributes||null),audio:b.audio}});e.forEach((h,k)=>{const l=k===e.length-1;l&&2===c||(l?(h.next=[of],h.transition={Aa:of}):(k=l?of:`${h.Lb}-${k+1}`,h.next=[k],h.transition={Aa:k}))});e.forEach(h=>{h.je=()=>{var k=h.Xa;a.g.info(`Playing ad ${`${k.f}/${k.a}`} of interstitial `+
265
- h.Lb)}});if(null!=b.dc&&(e=$q(a,b,e),0===e.length))return[];const f=e[0].je;e[0].je=()=>{b.Dg=!0;b.og&&(b.uf=!1);a.g.info(`Playing interstitial ${b.ca} with `+`${b.xa.length} assets and will resume primary `+`content ${b.W?`at ${b.W.toFixed(1)} s`:"after interstitial ended"}.`);f()};e[0].sg=h=>{null==b.W&&(b.W=b.startTime+h,kq(a.Y,b.W),a.g.info("Primary content will resume at",b.W.toFixed(1),"s"));b.state=ar};const g=e[e.length-1];g.Aa=()=>{b.state=oq;Zp(a.Y,e.map(h=>h.id));2===c&&mq(a.Y)};g.$e=a.ka.adReleaseDelayMs;
266
- return e};Iq=function(a,b,c){Xp(a.Y,c);c=a.Y;bq(c);c.f&&(c.f.Xa&&Pp(c,c.f,c.f.Xa),Rp(c),Sp(c,c.f.next));b.state=vq;a.Va(new _.F(_.bc,{detail:null}))};
267
- $q=function(a,b,c){const d=b.dc;a.g.info(`Playout limit for ${b.ca} is `+`${d} s`);b=c[c.length-1].nb;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.nb-f.duration<=d);e.forEach(f=>{f.Xa.a=e.length});a=e[e.length-1];c=d-(a.nb-a.duration);.1>Math.abs(c-a.duration)?a.transition.Aa=of:a.transition.ge={position:c,itemId:of,W:null};a.maxDuration=c;return e};
268
- br=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)})}};
269
- fr=function(a){a.a.on(window,"offline",()=>{cr(a,!1)});a.a.on(window,"online",()=>{a.f||dr(a)});a.a.on(a.m,Kf,()=>er(a));a.a.on(a.m,"suspend",()=>er(a));a.a.on(a.m,_.Ag,()=>er(a));a.a.on(a.m,_.df,()=>{a.f||dr(a)});a.a.on(a.m,_.pf,()=>{a.f||dr(a)});a.a.on(a.m,_.Mf,()=>{switch(a.m.getState()){case _.So:er(a);break;default:er(a)}})};gr=function(a){a.h&&(a.h.stop(),a.h=null)};er=function(a){a.f&&dr(a)};
270
- hr=function(a){return _.x(function*(){var b=a.m.getConfiguration().connectivityCheck;b&&a.m&&(b=yield Lj(a.j,b.url,b.attemptParameters,b.method),cr(a,b))})};dr=function(a){a.m.getConfiguration().connectivityCheck&&(gr(a),a.h=(new _.wk(()=>hr(a))).la(5))};cr=function(a,b){gr(a);a.f!==b&&(a.f=b,a.m&&a.m.getConfiguration().connectivityCheck&&a.m.trigger(new _.F(Le,{online:a.f})))};jr=function(){for(let a=0;a<ir.length;++a)ir[a].Hc()};
271
- _.kr=function(a){var b=b||0;a={priority:b,Hc:a};for(let c=0;c<ir.length;c++)if(ir[c].priority<b){ir.splice(c,0,a);return}ir.push(a)};lr=function(a,b){a.onError(b);a.release().then(()=>a.destroy())};
272
- nr=function(a){var b=mr;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=_.Wi(d),n=_.Ol(e);return h.verify(k,l,n.buffer,m.buffer)}).then(function(l){l?f():g(new _.li("Signature Verification failed",eg))}).catch(g)}else f()})};
273
- pr=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 or(b[0],b[1],b[2]);a.a=b}return a.a};qr=function(a){return _.x(function*(){var b=pr(a);try{yield nr(b)}catch(c){if(c&&c.code===eg)throw c;{b=window.location.href;const d=new _.oi(b);b=d.xb||d.Ya?d:new _.oi("//"+b)}if(!/(^127\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^192\.168\.)|(^localhost)/.test(b.Ya))throw c;}})};
274
- rr=function(a){switch((a.ga[0]||{src:"",type:""}).type){case _.uc:a="dash";break;case _.zc:a="ss";break;case _.pl:a="hls";break;case _.rg:a="mp4";break;default:a=""}return a};sr=function(a){return a.viewerId?a.viewerId:(a=a.drm||null)&&a.customData&&a.customData.userId?`${a.customData.userId}`:""};tr=function(a){return(a=a.drm||null)&&a.customData&&a.customData.assetId?`${a.customData.assetId}`:""};
275
- ur=function(a){return(a=a.drm||null)&&a.customData&&a.customData.sessionId?`${a.customData.sessionId}`:""};vr=function(a){a=a.drmInfo;return(new _.oi(a&&a.licenseServerUri||"")).Ya};wr=function(a){const b=a.configuration;let c="no";b.drm&&!_.gh(b.drm,{})&&(c="custom",b.drm.env&&b.drm.env.toLowerCase().startsWith(Nd)||vr(a).endsWith("drmtoday.com"))&&(c=Nd);return c};xr=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};
276
- yr=function(a){a=a.drmInfo;let b=!1;a&&(b=a.persistentStateRequired);return b.toString()};zr=function(a){a=a.drmInfo;let b="";if(a)switch(a.videoRobustness){case Ia:case Ga:b="L1";break;case Ha:b="L2";break;case _.ob:case _.nb:b="L3"}return b};
277
- Er=function(a,b){const c="ie"===_.Yk().browser;var d=b.configuration;const e=[...Array.from(_.Al.keys()),...b.xg];b={"CL-KEY":a.f,"CL-LOCATION":window.location.href,"CL-SDK-VERSION":_.ea,"CL-USER-ID":sr(d),"CL-ASSET-ID":tr(d),"CL-SESSION-ID":ur(d),"CL-PLAYBACK-TYPE":b.isLive?Ar:Br,"CL-CONTENT-TYPE":rr(b),"CL-PLUGINS":e.join(" "),"CL-DRM":wr(b),"CL-DRM-CDM":xr(b),"CL-DRM-SEC-LEVEL":zr(b),"CL-DRM-OFFLINE":yr(b),"CL-DRM-IP":vr(b)};Cr&&Cr.companionSdk&&(Cr.companionSdk.name&&(b["CL-COMPANION-SDK"]=Cr.companionSdk.name),
278
- Cr.companionSdk.version&&(b["CL-COMPANION-SDK-VERSION"]=Cr.companionSdk.version));c&&(d=window.localStorage.getItem("cl_et"))&&(b["CL-ETAG"]=d);d=_.sj(["https://downloads.castlabs.com/r/register/"]);d.method="GET";d.headers=b;return(new _.Dr).fetch(d).T.then(f=>{200===f.status&&c&&window.localStorage.setItem("cl_et",f.headers.etag);return Promise.resolve()}).catch(f=>{a:{var g=pr(a);f=f.data;var h=f.status;if(g.a&&g.a.ilv)g=Promise.resolve();else{switch(h){case 403:case 404:g=7101;var k="Castlabs Player license is invalid";
279
- if(403===h){h=k;k="";try{k=JSON.parse(decodeURIComponent(f.responseText)).message}catch(l){}f=k;f=h+(": "+f)}else f=k+"!";k=f;break;case 412:g=7103;k="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:g=Promise.resolve();break a}a.g.error(Ma+k);g=Promise.reject(new _.I(_.G,7,g,k))}}return g})};
280
- Ir=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}=Fr(c[e]);Object.keys(Gr).includes(f)&&(d[Gr[f]]=g)}return d}).filter(c=>_.ah(c));return 0<b.length?b:null}catch(b){return Hr.error("CmsdManager parseCmsdDynamicHeader_ failed:",b),null}};
281
- Fr=function(a){var b=a.split("\x3d");const c=b[0];b=b[1];if(!c)throw new _.li("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 _.li(`Parsing CMSD, not recognized value type of ${a}`);};
282
- Kr=function(a){return b=>{{var c=b.headers;let e=b=null;var d=kh(c,"cmsd-dynamic");c=kh(c,"cmsd-static");d&&(b=Ir(d),a.a=b);if(c)try{d={};const f=c.split(",");for(c=0;c<f.length;c++){const {key:g,value:h}=Fr(f[c]);Object.keys(Jr).includes(g)&&(d[Jr[g]]=h)}e=_.ah(d)?d:null}catch(f){Hr.error("CmsdManager parseCmsdStaticHeader_ failed:",f),e=null}(b||e)&&a.m.trigger(new _.F("cmsd-event",{bj:b,nj:e}))}}};_.Mr=function(a){a&&(0<=Lr.indexOf(a)||Lr.push(a))};
283
- Or=function(a){if(!a.h&&a.A&&a.a&&a.f.ads.hls.enable&&a.getTimelineCues().some(b=>_.Bi(b.schemeIdUri))){const b=a.f.mse.sendPlaybackSessionIdHeader?a.G:null;a.h=new Nr;a.h.o(a.a,a.A,b)}};Qr=function(a,b){a.F=new Pr(b);qr(a.F).catch(c=>{setTimeout(()=>{a.g.error(Ma+c);a.trigger(new _.F(_.r,{detail:new _.I(_.G,7,7101)}));a.destroy()},1E3)})};Sr=function(a,b){a.X=b;for(const c of a.X)(b=c.id())&&(a.K[b]=c);_.Rr(a,"onPlayerCreated")};
284
- _.Tr=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.A=null),b&&(b.init(a.j,a.C),b.setNetworkEngine(a.getNetworkEngine()),b.forwardEventsTo(a),a.a=b,a.A=c))};
285
- Ur=function(a,b){_.x(function*(){a.j.getMedia()||a.j.getCastElement();a.F||(a.F=new Pr(a.f.license));try{a.g.debug("Verifying license remotely"),yield Er(a.F,b),a.g.debug("License verified remotely")}catch(c){a.g.debug("License rejected by remote",c),setTimeout(lr,1E3,{release:a.release.bind(a),destroy:a.destroy.bind(a),onError:a.onError.bind(a)},c)}})};_.Rr=function(a,b,...c){if(!a.ba)return Promise.resolve();const d=a.X.map(e=>e[b].call(e,a,...c)).filter(e=>e instanceof Promise);return Promise.all(d)};
286
- Vr=function(a){return _.x(function*(){if(a.R)return a.g.debug("The player is already released. No-op"),new Promise(b=>b());a.da.off(document,yg);a.trigger(new _.F(_.uf));a.j&&a.j.release();a.h&&(yield a.h.h(),a.h=null);a.B&&(yield a.B.release(),a.B=null);if(a.a){let b=null;const c=a.a.on(_.Mf,d=>{b=d});return _.Rr(a,_.Je).then(()=>{a.a.stopForwardingEventsTo(a);return Promise.all([a.a.release(),a.I.release()])}).then(()=>{a.g.debug("Releasing player completed");b&&(a.g.debug("Re-post state change event after release"),
287
- a.trigger(b))}).finally(()=>{a.a.off(_.Mf,c);a.trigger(new _.F(tf))})}a.trigger(new _.F(tf));return new Promise(b=>b())})};Wr=function(a){a.G&&(a.g.info("Playback session ended, ID:",a.G),a.G=null,a.a&&a.a.setPlaybackSessionId(null))};Xr=function(a,b){const c=xh(d=>d.f(_.cb)&&a.every(e=>2===d.canPlay(e,b)));if(!c)throw new _.I(_.G,7,7003,"No compatible player implementing playlist mode found!");return{cb:c,player:c.create(),sourceIndex:0}};
288
- Zr=function(a,b,c){if(a.M===_.cb)b=Xr(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(_.uh);for(let f=0;f<b.length;f++)for(let g=0;g<e.length;g++){const h={cb:e[g],confidence:e[g].canPlay(b[f],c)};if(null===a||a.confidence<h.confidence)a=h,d=f}a&&typeof d===_.t&&0<a.confidence?(_.vh.debug("Player Factory '"+a.cb.a()+"' can play",b[d]),b=new Yr(a.cb,d)):(_.vh.debug("No compatible Player Factory found for sources:",b),b=null)}else b=
289
- null;if(!b)throw new _.I(_.G,7,7003,"No player factory compatible with given sources found!");c=b.cb;a=c.create();b={cb:c,player:a,sourceIndex:b.sourceIndex}}else b={cb:a.A,player:a.a,sourceIndex:0};return b};
290
- _.ds=function(a,b,c){return _.x(function*(){if(a.P)throw new _.I(_.G,7,7E3,"Player is already destroyed.");if(!a.j)throw new _.I(_.G,7,7E3,"No surface associated with this player!");_.yn(Ze);yield a.release();var d=c||_.bp(b);if(!b||0===d.length)throw new _.I(_.G,7,7003,Xa);a.fa=d;a.f=_.yl(a.C,b,{source:d});a.R=!1;d=Zr(a,d,a.f);_.Tr(a,d.player,d.cb);$r(a,a.a);a.a&&a.a.setSourceIndex(d.sourceIndex);as(a);a.a&&a.a.setCdnErrorCallback(a.L);bs(a,a.f);cs(a);if(a.f.pauseWhenInBackground)a.da.on(document,
291
- yg,()=>{document.hidden?(a.g.debug("Player is hidden: pausing..."),a.pause()):(a.g.debug("Player is visible: resuming..."),a.play())});Hl(a);yield _.Rr(a,"onContentWillLoad",a.f.source[d.sourceIndex]);_.yn(Ye);_.An("player.beforeLoad",Ze,Ye)})};_.es=function(a){return _.x(function*(){a.j.getMedia()||a.j.getCastElement();a.trigger(new _.F(oe));yield Promise.all([a.a.load(a.f),a.h?a.h.load():Promise.resolve()])})};
292
- _.gs=function(a){return _.x(function*(){_.yn(Ve);Ur(a,{configuration:a.getConfiguration(),ga:a.dg(),drmInfo:a.getDrmInfo(),xg:Object.keys(a.K),isLive:a.isLive()});fs(a);Il();yield _.Rr(a,_.Ge);a.f.autoplay&&(a.h?a.h.l():1)&&(yield a.play());_.yn(Ue);_.An("player.afterLoad",Ve,Ue)})};hs=function(a){return _.x(function*(){if(a.a){var b=a.a;b.Jg?(a.trigger(new _.F(oe)),yield b.Jg(),yield _.gs(a)):a.g.warn(jb)}else a.g.warn(fb)})};
293
- $r=function(a,b){try{var c=crypto.randomUUID()}catch(d){c=br()}a.g.info("Playback session started, ID:",c);b.setPlaybackSessionId(c);a.G=c};as=function(a){a.a&&a.a.setDrmCustomDataModifier(b=>_.x(function*(){a.Je&&a.Nc&&(yield a.Nc(b))}))};bs=function(a,b){if(b=qp(a,b))a.h=b.create(a)};cs=function(a){a.f.cmsd.enabled&&(a.B=new is(a),a.a.setCmsdManager(a.B))};
294
- js=function(a){const b=_.bi(a.f.preferredTextLanguage).filter(f=>f),c=a.f.preferForcedSubtitles,d=a.getTrackManager().pa().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().oa();e&&e.language?(e=_.Di(e.language||""),b.push(e)):(e=a.getTrackManager().Fa())&&e.language&&(e=_.Di(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=>
295
- {const g=_.Di(f);if(f=d.find(h=>{h=_.Di(h.language||"");return _.Ei(h,g)}))return a.getTrackManager().Ua(f),!0;c&&a.g.warn("Forced subtitles are configured to be preferred, but no forced subtitles match the preferred languages: ",b);return!1})}};fs=function(a){_.x(function*(){const b=[];if(a.f.remoteTextTracks)for(const c of a.f.remoteTextTracks)b.push(a.getTrackManager().addTextTrack(c));yield Promise.all(b);js(a)})};ks=function(a){a.J.forEach(b=>b());a.J=[]};
296
- ns=function(a,b){return _.x(function*(){try{_.yn(cf);a.M=_.cb;a.ba=!1;const c=b.slice(1).map(d=>({config:d,ga:_.bp(d)}));yield _.ds(a,b[0]);c.forEach(d=>{ls(a,d.config,d.ga)});a.trigger(new _.F(oe));yield a.a.setupPlaylist(b);yield _.gs(a);c.forEach(d=>{ms(a,d.config,d.ga)});_.yn(bf);_.An("player.setupPlaylist",cf,bf)}catch(c){if(a.l)throw a.g.info(Na),new _.I(_.G,7,7E3);throw c;}})};
297
- os=function(a,b){const c=d=>{a.H=a.o.findIndex(e=>e.id===d.id)};a.addEventListener(_.Af,c);a.J.push(()=>{a.removeEventListener(_.Af,c)});if(b.endTime){const d=b.endTime,e=()=>{a.getPosition()>=d&&(a.removeEventListener(_.ag,e),a.g.info("Playlist end time reached. Stopping playback."),a.trigger(new _.F(_.zf)),a.pause())};a.addEventListener(_.ag,e);a.J.push(()=>{a.removeEventListener(_.ag,e)})}};
298
- ps=function(a,b){return _.x(function*(){try{_.yn(Xe);const c=_.bp(b);ls(a,b,c);yield a.a.appendLoad(b);ms(a,b,c);_.yn(We);_.An("player.appendLoad",Xe,We)}catch(c){if(a.l)throw a.g.info(Na),new _.I(_.G,7,7E3,{id:b.id});throw c;}})};
299
- ls=function(a,b,c){if(0===c.length)throw new _.I(_.G,7,7003,{message:Xa,id:b.id});if(1<c.length)throw new _.I(_.G,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 _.I(_.G,7,7003,{message:"Source not supported by the current player!",id:b.id,source:c[0]});};ms=function(a,b,c){Ur(a,{configuration:b,ga:c,drmInfo:a.getDrmInfo(),xg:Object.keys(a.K),isLive:c[0].isLive})};
300
- qs=function(a,b){const c=document.getElementById(a);if(!c)throw Error("Anchor element not found");c.classList.add(ad);return Array.from({length:3}).map(()=>{const d=document.createElement(_.w);d.classList.add("clpp-mc-playlist-video-el");const e=document.createElement(_.Cd);e.classList.add("clpp-mc-playlist-item");e.appendChild(d);c.appendChild(e);return new S(d,b)})};
301
- rs=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(bd)):(a.g.info(`Hide video element .${b}`),d.classList.remove(bd)),a.w&&a.w(d,c))};us=function(a,b){return _.x(function*(){const c=yield a.o.get();a.f=b;b.role=ss;a.f.player=c;a.f.videoEl=c.getSurface().getMedia();rs(a,c,!0);yield c.load(b.config);ts(a,b);b.config.autoplay||(yield c.play())})};
302
- ys=function(a){_.x(function*(){if(0===a.a)yield vs(a);else if(a.a===a.h.length-1)yield ws(a);else{const b=[a.a-1,a.a+1];a.g.info(`Preload items (indices: ${b})`);yield Promise.all(b.map(c=>xs(a,c)))}})};
303
- zs=function(a,b){return _.x(function*(){if(b.player){if(b.state===mf){a.g.info(Eb);try{yield b.preloadPromise}catch(c){}}a.f=b;b.role=ss;rs(a,b.player,!0);b.state===lf?(_.yn(hf),a.ka.preloadMedia?yield b.player.play():yield hs(b.player),_.yn(gf),_.An("playlist.next",hf,gf)):b.state===kf&&(yield b.player.load(b.config));ts(a,b);b.config.autoplay||(yield b.player.play())}})};
304
- Cs=function(a,b){return _.x(function*(){a.g.info(`Stop current playback (index: ${b.index})`);b.player.pause();rs(a,b.player,!1);yield As(a,b);b.player=null;b.videoEl=null;b.role=Bs})};Es=function(a){return Promise.all(Array.from(a.l.keys()).map(b=>Ds(a,b)))};Is=function(a){return _.x(function*(){yield a.o.destroy();const b=document.getElementById(a.ka.anchorId);b&&(b.classList.remove(ad),b.innerHTML="")})};
305
- Ds=function(a,b){return _.x(function*(){const c=a.l.get(b);c&&(a.g.info(`Stop preloading item (index: ${b})`),c.player&&(yield As(a,c)),a.l.delete(b))})};As=function(a,b){return _.x(function*(){b.disposers.forEach(c=>c());b.disposers=[];b.player&&(yield a.o.release(b.player))})};ts=function(a,b){if(a.ka.autoplayNext){const c=()=>{a.g.info("Automatically transition to next item");a.vg()};b.player.on(_.Sd,c);const d=b.player;b.disposers.push(()=>{d.off(_.Sd,c)})}};
306
- xs=function(a,b){return _.x(function*(){const c=yield a.o.get(),d=a.h[b];d.player=c;d.videoEl=c.getSurface().getMedia();d.role=Bs;d.state=mf;a.trigger(new _.F(hg));try{a.l.set(b,d),a.ka.preloadMedia?(d.config.autoplay&&(a.g.warn(ka+`Force disabling autoplay (index: ${b})`),d.config.autoplay=!1),d.preloadPromise=c.load(d.config)):d.preloadPromise=c.preload(d.config),yield d.preloadPromise,d.state=lf,a.trigger(new _.F(hg))}catch(e){7001===e.code?(a.g.info(`Preload aborted (index: ${b})`),d.state=jf):
307
- (a.g.warn(`Preload failed (index: ${b})`,e),a.trigger(new _.F(_.r,{detail:e})),d.state=kf),a.trigger(new _.F(hg))}})};vs=function(a){return _.x(function*(){const b=a.a+1;a.g.info(`Preload following item (index: ${b})`);yield xs(a,b)})};ws=function(a){return _.x(function*(){const b=a.a-1;a.g.info(`Preload preceding item (index: ${b})`);yield xs(a,b)})};
308
- _.Ks=function(a){if(Js.has(a))return Js.get(a);if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported(a);Js.set(a,b);return b}return window.MediaSource?(b=MediaSource.isTypeSupported(a),Js.set(a,b),b):!1};Ls=function(a,b){b=b.replace(/mp2t/i,"mp4");a===_.p&&(b=b.replace(_.w,_.p));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};
309
- Ms=function(a){const b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase();let c;typeof Event===_.Wd?c=new Event(b,a):(c=document.createEvent("Event"),c.initEvent(b,a.bubbles,a.cancelable));a.target.dispatchEvent(c)};Ns=function(a){a=a.target;if(a.webkitPresentationMode===Se){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)};
310
- Os=function(){return this.webkitSupportsPresentationMode(Se)?(this.webkitSetPresentationMode(Se),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))};Ps=function(){const a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))};
311
- Qs=function(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}};Rs=function(a,b,c){return new window.TextTrackCue(a,b,c)};Ss=function(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)};Us=function(a,b,c){if("input"===a)switch(this.type){case "range":a=Xc}Ts.call(this,a,b,c)};Vs=function(){return window.performance&&window.performance.now?window.performance.now():Date.now()};
312
- Ws=function(a){return Vs()-a.a};Ys=function(a){const b=new Xs;b.a=a.a;return b};_.Zs=function(a){const b=[];for(const c of a)for(const d of c.variants)b.push(d);return b};_.at=function(a,b,c,d){return _.x(function*(){try{return new (yield $s(a,b,c,d))}catch(e){throw e.a(_.G),e;}})};
313
- $s=function(a,b,c,d){return _.x(function*(){if(d){var e=_.bt[d.toLowerCase()];if(e)return e;_.C("Could not determine manifest type using MIME type ",d)}if(e=_.ct(a)){const f=_.dt[e];if(f)return f;_.C("Could not determine manifest type for extension ",e)}else _.C("Could not find extension for ",a);if(!d&&(d=yield et(a,b,c))){if(e=_.bt[d])return e;_.C("Could not determine manifest type using MIME type",d)}throw new _.I(_.G,4,4E3,{url:a});})};
314
- _.ct=function(a){a=(new _.oi(a)).Ga.split("/").pop().split(".");return 1===a.length?"":a.pop().toLowerCase()};et=function(a,b,c){return _.x(function*(){var d=_.sj(a);pj(d,c);d.type=1;d.method="HEAD";return(d=(yield b.fetch(d).T).headers["content-type"])?d.toLowerCase():""})};ft=function(a,b){var c=a.f+b.byteLength;if(a.a.byteLength<c){let d=a.a.byteLength;for(;d<c;)d*=2;c=new Uint8Array(d);c.set(a.a);a.a=c}a.a.set(b,a.f);a.f+=b.byteLength};
315
- gt=function(a,b,c){return b.read().then(({done:d,value:e})=>{null!=e&&(ft(a,e),yj(c,e.byteLength,Ws(a.h)),a.h.a=Vs());return d?(d=a.a.buffer,a.a.byteLength!==a.f&&(d=d.slice(0,a.f)),Promise.resolve(d)):Promise.resolve().then(()=>gt(a,b,c))})};
316
- it=function(a){const b=a.uris[a.uriIndex],c=new ht,d=new Xs,e=Ys(d);let f=0,g;const h=new _.Ij;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(m){m=m.target;m.readyState>=XMLHttpRequest.LOADING&&0===f&&(g=Ws(e));m.readyState>=XMLHttpRequest.HEADERS_RECEIVED&&!k&&(m=m.getResponseHeader(ta),xj(a,m),k=!0)};c.onload=function(m){m=m.target;var n=(m.getAllResponseHeaders()||"").trim().split("\r\n");
317
- const q={};for(const u of n)n=u.split(": "),q[n[0].toLowerCase()]=n.slice(1).join(": ");try{const u=Ws(e);l||yj(a,m.response?m.response.length:0,u);const v=_.wj(q,m.response,m.status,b,m.responseURL,a,u,g);a.rateLimitBps?zj(a.rateLimitBps,Ws(e),a.bytesLoaded).then(()=>{h.resolve(v)}):h.resolve(v)}catch(u){h.reject(u)}};c.onerror=function(m){m=m.target;if(0>=m.status)h.reject(new _.I(1,1,1002,{url:b,request:a,status:m.status}));else{var n=m.getAllResponseHeaders();const u={};if(n){n=n.trim().split("\r\n");
318
- for(var q of n)n=q.split(": "),u[n[0].toLowerCase()]=n.slice(1).join(": ")}q=_.wj(u,m.response,m.status,b,m.responseURL,a,Ws(e),g);h.resolve(q)}};c.ontimeout=function(){h.reject(new _.I(1,1,1003,{url:b,request:a}))};c.onprogress=function(m){const n=Ws(d);d.a=Vs();if(100<n||m.lengthComputable&&m.loaded===m.total)yj(a,m.loaded-f,n),f=m.loaded,l=!0};for(const m in a.headers)c.setRequestHeader(m.toLowerCase(),a.headers[m]);c.send(a.body);return{T:h,request:a,abort:()=>{c.abort();h.reject(new _.I(1,1,
319
- 7001,{url:b,request:a}));return Promise.resolve()}}};jt=function(a){let b=null;a.h!==a.f&&(b={start:a.h,end:a.f,length:a.f-a.h,data:new DataView(a.j.a.buffer,a.h,a.f-a.h),count:-1});return b};kt=function(a,b){{var c=a.j;const d=c.f+b.byteLength;if(d>c.a.byteLength){const e=c.a;c.a=new Uint8Array(Math.max(Math.ceil(c.a.buffer.byteLength*c.h),d));c.a.set(e)}c.a.set(b,c.f);c.f+=b.byteLength}a.a=a.h;a.f=a.j.f;a.l=new DataView(a.j.a.buffer,0,a.j.f)};
320
- mt=function(a){if(0<=a.o&&a.f<a.o)return null;let b=lt(a);for(;null!==b;){if(b.name===_.qe){const c={start:a.h,end:b.end,length:b.end-a.h,data:new DataView(a.j.a.buffer,a.h,b.end-a.h),count:1};a.h=b.end;return c}b=lt(a)}return null};
321
- nt=function(a,b,c,d){return b.read().then(e=>{var {done:f,value:g}=e;d&&g&&(d(g.byteLength,Ws(a.w)),a.w.a=Vs());if(f)return e=jt(a),(e=c(!0,e))?e.then(()=>a.j.a.buffer):Promise.resolve(a.j.a.buffer);let h=Promise.resolve();if(null!=g){kt(a,g);var k=mt(a);for(e=[];k;)e.push(k),k=mt(a);if(!a.A)e.forEach(l=>{h=h.then(()=>c(!1,l))});else if(0<e.length){k=e[0];if(1<e.length){k=e[0];const l=e[e.length-1],m=l.end-k.start;k={start:k.start,end:l.end,length:m,data:new DataView(a.j.a.buffer,k.start,m),count:e.length}}(e=
322
- c(!1,k))&&(h=e)}}return h.then(()=>nt(a,b,c,d))})};
323
- lt=function(a){const b=a.a;if(a.a+4>=a.f)return a.a=a.f,null;var c=ot(a);if(a.a+4>=a.f)return a.a=a.f,null;var d=ot(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.l.getUint32(a.a,!1),e=a.l.getUint32(a.a+4,!1)}catch(g){throw new _.I(_.G,3,3E3);}if(2097151<f)throw new _.I(_.G,3,3E3);a.a+=8;c=f*Math.pow(2,32)+e}}c=b+c;a.o=c;return a.f>=c?(a.a=c,{name:d,start:b,end:c}):null};
324
- ot=function(a){const b=a.l.getUint32(a.a,!1);a.a+=4;return b};
325
- rt=function(a){a.h=a.B.then(e=>{a.j=e.request;e.request.uriIndex=e.request.currentAttempt%e.request.uris.length;if(0<e.request.currentAttempt){-1===a.f&&(a.f=pt(e.request.baseDelay,1E3));const f=a.f*(1+(2*Math.random()-1)*pt(e.request.fuzzFactor,.5));a.f*=pt(e.request.backoffFactor,2);if(0<f)return(new Promise((g,h)=>{a.l=h;qt(a,()=>{g(e.plugin(e.request))},f)})).catch(g=>{if(!a.a)throw g;})}if(a.a)throw new _.I(1,1,7001,{url:e.request.uris[e.request.uriIndex],request:e.request});return e.plugin(e.request)});
326
- let b=0,c=0,d=0;return a.h.then(e=>{const f=e.request;f.currentAttempt+=1;b=f.currentAttempt;c=f.maxAttempts;d=f.uris.length;return e.T}).then(e=>{a.w.resolve(e)}).catch(e=>{if(e instanceof _.I){const f=b<d,g=7001!==e.code,h=b<c;if((1===e.severity||f)&&g&&h)return rt(a);g&&e.a(_.G);a.w.reject(e)}else a.w.reject(e)})};qt=function(a,b,c){a.o=setTimeout(b,c)};pt=function(a,b){return null===a||void 0===a?b:a};
327
- vt=function(a){var b=new st;for(const e in a.headers)b.append(e.toLowerCase(),a.headers[e]);const c=new tt,d={cd:!1,Hg:!1};b={T:ut(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.cd||(d.cd=!0,c.abort());return Promise.resolve()}};if(a=a.timeout){const e=window.setTimeout(()=>{d.Hg=!0;c.abort()},a);b.T=b.T.finally(()=>{window.clearTimeout(e)})}return b};
328
- ut=function(a,b,c,d){return _.x(function*(){const e=new Xs,f=Ys(e);try{const g=yield wt(a,c),h=qj(g.headers),k={uri:g.url,data:null,headers:h,status:g.status,timeMs:0,responseStartMs:Ws(f),request:b};if(!tj(g.status))throw k.data=yield g.arrayBuffer(),k.timeMs=Ws(e),vj(k);const l=g.headers.get(ta);xj(b,l);const m=l?parseInt(l,10):0;if(b.onFragment&&!b.disableFragmentSupport&&2===b.type){const n=g.body.getReader(),q=new xt(m,!b.disableMergedFragments);k.data=yield nt(q,n,(u,v)=>{if(d.cd)return null;
329
- v&&v.data&&(yj(b,v.data.byteLength,Ws(f)),f.a=Vs());return b.onFragment&&v?b.rateLimitBps?zj(b.rateLimitBps,Ws(e),b.bytesLoaded).then(()=>b.onFragment(v)):b.onFragment(v):null},b.onProgress)}else{const n=g.body.getReader(),q=yield gt(new yt(m),n,b);b.rateLimitBps&&(yield zj(b.rateLimitBps,Ws(e),q.byteLength));k.data=q}if(d.cd)throw Error("Request was aborted");k.timeMs=Ws(e);return uj(k)}catch(g){if(d.cd)throw new _.I(1,1,7001,{url:a,request:b});if(d.Hg)throw new _.I(1,1,1003,{url:a,request:b});if(g&&
330
- 1001===g.code)throw g;_.th("Error while fetching data:",g);throw new _.I(1,1,1002,{url:a,error:g,request:b,status:-1},g);}})};At=function(a){try{const b=a.uris[a.uriIndex],c=_.zt(b);return{T:Promise.resolve({uri:b,data:c.data,request:a,headers:{"content-type":c.contentType}}),request:a,abort:()=>Promise.resolve()}}catch(b){return{T:Promise.reject(b),request:a,abort:()=>Promise.resolve()}}};
331
- _.zt=function(a){var b=a.split(":");if(2>b.length||"data"!==b[0])throw _.th("Bad data URI, failed to parse scheme"),new _.I(_.G,1,1004,{uri:a});b=b.slice(1).join(":").split(",");if(2>b.length)throw _.th("Bad data URI, failed to extract encoding and MIME type"),new _.I(_.G,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?_.Ol(a).buffer:_.Wi(a).buffer,contentType:c}};
332
- _.Ct=function(a,b){a=_.rk(_.sk(a),_.tk(a));_.Bt[a]=b};_.Dt=function(a){a=_.rk(_.sk(a),_.tk(a));return _.Bt[a]||null};_.Et=function(a){a=_.rk(_.sk(a),_.tk(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 _.De}};_.Og=[];
333
- Sg="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this;Tg=typeof Object.defineProperties==_.Wd?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)};
334
- Ug("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=Sg.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=
335
- 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 _.Ee:var h=null!=g;break a;case _.Wd:h=!0;break a;default:h=!1}h?this.B(g):this.o(g)}};
336
- 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();
337
- g.Od(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(q,u){return typeof q==_.Wd?function(v){try{l(q(v))}catch(y){m(y)}}:u}var l,m,n=new b(function(q,u){l=q;m=u});this.Od(k(g,l),k(h,m));return n};b.prototype.catch=function(g){return this.then(void 0,g)};b.prototype.Od=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: "+
338
- 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=Rg(g),m=l.next();!m.done;m=l.next())d(m.value).Od(h,k)})};b.all=function(g){var h=Rg(g),k=h.next();return k.done?d([]):new b(function(l,m){function n(v){return function(y){q[v]=y;u--;0==u&&l(q)}}var q=[],u=0;do q.push(void 0),u++,d(k.value).Od(n(q.length-1),m),k=h.next();while(!k.done)})};return b});var Wg=this||self;
339
- Wg.a=!0;_.z("clpp.utils.obj.cloneItem",_.Zg);_.z("clpp.utils.obj.merge",_.Yg);var oh={DEFAULT:-1,NONE:0,ERROR:1,WARNING:2,INFO:3,DEBUG:4};_.z("clpp.log.Level",oh);var mh=0,lh={},Kt=[];_.z("clpp.log.getLoggers",function(){return _.Zg(lh)});_.z("clpp.log.addInterceptor",function(a){a&&Kt.push(a)});_.z("clpp.log.removeInterceptor",function(a){a&&(a=Kt.indexOf(a),0<=a&&Kt.splice(a,1))});_.z("clpp.log.getTagLevel",nh);_.z("clpp.log.hasTagLevel",function(a){return void 0===a?!1:0<=lh[a]});_.z("clpp.log.setTagLevel",function(a,b){a&&(_.eh(b)&&(b=ph(b)),lh[a]=b)});
340
- _.z("clpp.log.setLogLevel",function(a){-1===a&&(a=3);_.eh(a)&&(a=ph(a));mh=a});_.z("clpp.log.getLogLevel",function(){return mh});
341
- _.T=class{constructor(a){(this.tag=a)&&void 0===lh[a]&&(lh[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=nh(this.tag);if(0<=d){if(d<c)return}else if(mh<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,
342
- arguments):2===c?console.warn.apply(console,arguments):1===c?console.error.apply(console,arguments):console.log.apply(console,arguments);for(const e of Kt)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)}kh(a){return a?
343
- this.tag?new _.T(this.tag+"."+a):new _.T(a):this}};_.z("clpp.log.Logger",_.T);_.T.prototype.createChild=_.T.prototype.kh;_.T.prototype.error=_.T.prototype.error;_.T.prototype.warn=_.T.prototype.warn;_.T.prototype.debug=_.T.prototype.debug;_.T.prototype.info=_.T.prototype.info;_.T.prototype.log=_.T.prototype.log;var qh=new _.T("clpp");_.z("clpp.log.info",_.rh);_.z("clpp.log.debug",_.sh);_.z("clpp.log.warn",_.C);_.z("clpp.log.error",_.th);(function(){const a=console.assert;a?a.bind||(console.assert=function(){a.apply(console,arguments)}):console.assert=function(){}})();var Yr;Yr=class{constructor(a,b){this.cb=a;this.sourceIndex=b}};_.vh=new _.T("clpp.players");_.uh={};_.z("clpp.events.ERROR",_.r);_.z("clpp.events.LOADEDMETADATA",_.ne);_.z("clpp.events.BUFFERING_ENDED",_.Nc);_.z("clpp.events.BUFFERING_STARTED",_.Oc);_.z("clpp.events.STATE_CHANGED",_.Mf);_.z("clpp.events.AUDIO_TRACK_CHANGED",_.Jc);_.z("clpp.events.TEXT_TRACK_CHANGED",_.Wf);_.z("clpp.events.VIDEO_TRACK_CHANGED",_.tg);_.z("clpp.events.BITRATE_CHANGED",_.Lc);_.z("clpp.events.TRACKS_ADDED",_.bg);_.z("clpp.events.LOAD_START",oe);_.z("clpp.events.RELEASING",_.uf);_.z("clpp.events.RELEASED",tf);
344
- _.z("clpp.events.DESTROYING","destroying");_.z("clpp.events.DESTROYED","destroyed");_.z("clpp.events.VIDEO_BUFFER_CHANGED",_.sg);_.z("clpp.events.AUDIO_BUFFER_CHANGED",_.Ic);_.z("clpp.events.DOWNLOAD_TRACE","downloadtrace");_.z("clpp.events.DRM_SESSION_CREATED",Kd);_.z("clpp.events.DRM_SESSION_UPDATE",_.Md);_.z("clpp.events.DRM_SESSION_PERSISTED",_.Ld);_.z("clpp.events.DRM_RENEWAL_STARTED",Jd);_.z("clpp.events.DRM_EXPIRATION_UPDATE",_.Hd);_.z("clpp.events.DRM_LICENSE_REQUESTED",Id);
345
- _.z("clpp.events.AUTOPLAY_NOT_ALLOWED",_.Kc);_.z("clpp.events.PLAY",_.Te);_.z("clpp.events.SEEKING",_.Ef);_.z("clpp.events.SEEKED",_.Df);_.z("clpp.events.USER_SEEKING",_.lg);_.z("clpp.events.USER_SEEKED",_.kg);_.Uo={SEEKING:1,NO_DATA:2};_.z("clpp.events.BufferingReasons",_.Uo);_.z("clpp.events.ADS_TIMELINE_CHANGED",_.pc);_.z("clpp.events.AD_LOADED",_.bc);_.z("clpp.events.AD_BREAK_STARTED",_.Sb);_.z("clpp.events.AD_STARTED",_.hc);_.z("clpp.events.AD_BUFFERING",_.Ub);_.z("clpp.events.AD_PROGRESS",_.ec);
346
- _.z("clpp.events.AD_FIRST_QUARTILE",_.Xb);_.z("clpp.events.AD_MIDPOINT",_.cc);_.z("clpp.events.AD_THIRD_QUARTILE",_.nc);_.z("clpp.events.AD_PAUSED",_.dc);_.z("clpp.events.AD_RESUMED",_.fc);_.z("clpp.events.AD_SKIPPED",_.gc);_.z("clpp.events.AD_CLICKED",_.Vb);_.z("clpp.events.AD_IMPRESSION",_.ac);_.z("clpp.events.AD_COMPLETED",_.Wb);_.z("clpp.events.AD_STOPPED",_.lc);_.z("clpp.events.AD_BREAK_STOPPED",_.Tb);_.z("clpp.events.AD_HLS_ASSET_LIST_REQUEST",Yb);
347
- _.z("clpp.events.AD_HLS_ASSET_LIST_RESPONSE",Zb);_.z("clpp.events.AD_HLS_RESOLVED",$b);_.z("clpp.events.SIMID_CREATIVE_STARTED",_.Gf);_.z("clpp.events.SIMID_CREATIVE_STOPPED",_.Hf);_.z("clpp.events.CASTING_STARTED",_.Rc);_.z("clpp.events.CASTING_ENDED","castingended");_.z("clpp.events.CAST_STATUS_CHANGED",_.Sc);_.z("clpp.events.AIRPLAY_STATUS_CHANGED",_.sc);_.z("clpp.events.AIRPLAY_CASTING_STARTED",_.rc);_.z("clpp.events.AIRPLAY_CASTING_ENDED",_.qc);_.z("clpp.events.TIMELINE_CUE_ADDED",_.Xf);
348
- _.z("clpp.events.TIMELINE_CUE_ENTER",_.Yf);_.z("clpp.events.TIMELINE_CUE_EXIT",_.Zf);_.z("clpp.events.TIMELINE_CUES_CHANGED",_.$f);_.z("clpp.events.MPD_TYPE_CHANGED",_.Be);_.z("clpp.events.LIVE_TURNED_STATIC",_.ke);_.z("clpp.events.VIMOND_RESPONSE",_.ug);_.z("clpp.events.PLAYLIST_ITEM_CHANGED",_.ef);_.z("clpp.events.PLAYLIST_MODIFIED",_.ff);_.z("clpp.events.SC_PLAYLIST_TIMELINE_CHANGED",_.Cf);_.z("clpp.events.SC_PLAYLIST_ITEM_CHANGED",_.Af);_.z("clpp.events.SC_PLAYLIST_ENDED",_.zf);
349
- _.z("clpp.events.SC_PLAYLIST_LIVE_TURNED_STATIC",_.Bf);_.z("clpp.events.CDN_SWITCH_SUCCESS",_.Tc);_.z("clpp.events.ONLINE_STATUS_CHANGED",Le);_.z("clpp.events.CMSD_EVENT","cmsd-event");_.z("clpp.events.YOSPACE_SESSION_STARTED",_.Mg);_.z("clpp.events.YOSPACE_SESSION_ENDED",_.Lg);_.z("clpp.events.CONTENT_STEERING_CHANGE",_.vd);_.z("clpp.events.CONTENT_STEERING_LOCATION_BAN_UPDATE",_.wd);_.Lt=class{constructor(a){this.f=a;this.a=null}la(a){return yh(this,a,!1)}Bb(a){return yh(this,a,!0)}stop(){this.a&&(this.a(),this.a=null)}};_.wk=class{constructor(a){this.f=a;this.a=null}lf(){this.stop();this.f();return this}la(a){this.stop();this.a=(new _.Lt(()=>{this.f()})).la(a);return this}Bb(a){this.stop();this.a=(new _.Lt(()=>{this.f()})).Bb(a);return this}stop(){this.a&&(this.a.stop(),this.a=null)}};_.z("clpp.utils.Timer",_.wk);_.wk.prototype.stop=_.wk.prototype.stop;_.wk.prototype.tickEvery=_.wk.prototype.Bb;_.wk.prototype.tickAfter=_.wk.prototype.la;_.wk.prototype.tickNow=_.wk.prototype.lf;var Mt=class{constructor(){this.zc=null;this.f=[];this.h=[];this.Ta=new _.T(cd);this.a=null;this.j=!1}load(a){const b=this;return _.x(function*(){b.zc?yield Ch(b,c=>_.x(function*(){yield c.load(a)})):b.Ta.warn("No main player, cannot load.")})}Ai(a){this.j=a;this.Ta.info("Looping set to",a)}Wg(a){this.f.push(a)}Vg(a){if(this.zc)this.Ta.warn("Main player already set.");else{this.zc=a;var b=this.o.bind(this),c=this.w.bind(this),d=this.l.bind(this);a.on(_.Mf,b);a.on(_.ag,c);a.on(_.Sd,d);this.h.push(()=>
350
- {a.off(_.Mf,b);a.off(_.ag,c);a.on(_.Sd,d)})}}clear(){this.zc=null;this.f=[];this.h.forEach(a=>a());this.h=[]}l(){const a=this;return _.x(function*(){a.j&&(a.Ta.info("Looping playback."),yield Ch(a,b=>_.x(function*(){yield b.seek(0);yield b.play()})))})}o(a){this.a||(a=a.detail.currentState,a===_.Zo?(this.Ta.info("Mirroring playing."),Dh(this,b=>_.x(function*(){yield b.play()}))):[_.Yo,_.So,_.Po].includes(a)&&(this.Ta.info("Mirroring paused/buffering/error."),Dh(this,b=>{const c=this;return _.x(function*(){var d=
351
- Math.round(c.zc.getPosition())-.1;yield b.seek(d);yield zh(.2);d=b.getState();if(d===_.Zo||d===_.So)yield b.pause()})})))}w(){this.a||Dh(this,a=>{const b=this;return _.x(function*(){a.isPaused()&&(yield a.play());const c=b.zc.getPosition();var d=a.getPosition();d=c-d;const e=Math.abs(d),f=a.getPlaybackRate();if(!(a.getState()!==_.Zo||.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.setPlaybackRate(1),yield a.seek(c)):f===g?1!==g&&b.Ta.info(`Delta ${d.toFixed(1)} s.`):
352
- (1===g?b.Ta.info("Secondary caught up."):1>g?b.Ta.info("Secondary slowing down to catch up. "+`Rate: ${g.toFixed(1)}, delta: ${d.toFixed(1)} s`):1<g&&b.Ta.info("Secondary speeding up to catch up. "+`Rate: ${g.toFixed(1)}, delta: ${d.toFixed(1)} s`),a.setPlaybackRate(g))}})})}};_.z(cd,Mt);Mt.prototype.clear=Mt.prototype.clear;Mt.prototype.addMainPlayer=Mt.prototype.Vg;Mt.prototype.addSecondaryPlayer=Mt.prototype.Wg;Mt.prototype.setLoop=Mt.prototype.Ai;Mt.prototype.load=Mt.prototype.load;_.Nt=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 Ot,Pt;Ot=class{constructor(a,b,c,d){this.f=a;this.Hc=b;this.a=c;this.ni=!!d}Va(a){try{this.Hc.handleEvent?this.Hc.handleEvent(a):this.Hc.call(this.a,a)}catch(b){_.th("clpp","Uncaught exception in event handler for event '"+this.f+"'",b,b?b.message:null,b?b.stack:null)}}};
353
- _.F=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.f=this.a=!1}preventDefault(){this.cancelable&&(this.defaultPrevented=!0)}stopImmediatePropagation(){this.f=!0}stopPropagation(){}};
354
- Pt=class{constructor(a){this.a=new _.Nt;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].Va(a),b[c].ni&&this.a.remove(a.type,b[c]),!a||!a.f);c++);}on(a,b,c){this.a.push(a,new Ot(a,b,c||this.f));return b}one(a,b,c){this.a.push(a,new Ot(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].Hc===b&&(d=this.a.remove(a,c[e])||d);return d}clear(){this.a.clear()}};var Qt;_.Rt=class{constructor(){this.a=new _.Nt}release(){_.Fh(this)}on(a,b,c,d=!1){a=new Qt(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))}}};Qt=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 St=class{constructor(a){this.m=a;this.l=a.getConfiguration().streaming.addMissingTimelineCues||!1;this.j=new _.Rt;this.f=new Set;this.a=new Set;this.h=null;this.g=new _.T("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 _.x(function*(){a.release()})}getTimelineCues(){return Array.from(this.a.values()).sort((a,b)=>a.startTime-b.startTime)}};_.Zt=class{constructor(a,b,c,d){d=void 0===d?_.Tt:d;this.startTime=a;this.endTime=b;this.payload=c;this.payloadType=d;this.positionAlign=this.position=null;this.size=100;this.textAlign=_.Ut;this.writingMode=_.Vt;this.lineInterpretation=_.Wt;this.line=null;this.lineAlign=_.Xt;this.direction=Yt;this.region=null;this.cssClassList=[];this.id=this.backgroundImage="";this.containerRows=null}Oc(a){return this.payload===a.payload&&this.startTime===a.startTime&&this.endTime===a.endTime&&this.payloadType===
355
- a.payloadType}};_.z("clpp.text.Cue",_.Zt);_.Zt.positionAlign={LEFT:_.ie,RIGHT:_.je,CENTER:_.Vc,AUTO:"auto"};_.Tt="text";_.Zt.payloadType={TEXT:_.Tt,VTT_XML:_.zg,TTML_XML:_.dg};_.Ut=_.Vc;_.$t={LEFT:_.fe,RIGHT:_.yf,CENTER:_.Ut,START:_.Lf,END:_.Rd};_.Zt.textAlign=_.$t;var Yt="ltr";_.Zt.direction={HORIZONTAL_LEFT_TO_RIGHT:Yt,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};_.Vt="horizontal-tb";_.Zt.writingMode={HORIZONTAL_TOP_TO_BOTTOM:_.Vt,VERTICAL_LEFT_TO_RIGHT:_.og,VERTICAL_RIGHT_TO_LEFT:_.pg};_.Wt=0;
356
- _.Zt.lineInterpretation={LINE_NUMBER:_.Wt,PERCENTAGE:1};_.Xt=_.Lf;_.au={CENTER:_.Vc,START:_.Xt,END:_.Rd};_.Zt.lineAlign=_.au;_.du=class{constructor(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=_.bu;this.scroll=cu;this.cssClassList=[];this.writingMode=this.displayAlign=null}};_.z("clpp.text.CueRegion",_.du);_.bu=1;_.du.units={PX:0,PERCENTAGE:_.bu,LINES:2};var cu="";
357
- _.du.scrollMode={NONE:cu,UP:"up"};_.du.displayAlign={BEFORE:"flex-end",CENTER:_.Vc,AFTER:"flex-start"};_.du.writingMode={HORIZONTAL_TOP_TO_BOTTOM:_.nd,VERTICAL_LEFT_TO_RIGHT:"row-reverse",VERTICAL_RIGHT_TO_LEFT:"row"};var eu=class{constructor(a){this.m=a;this.l=a.getTextDisplayer();this.f=this.h=null;this.a=new _.Rt;this.j=!1;this.g=new _.T("clpp.native.CueHandler")}destroy(){this.a.release();this.j=!1;this.l=this.a=this.h=this.f=null;return Promise.resolve()}start(a){this.j?this.g.warn("Already started. Ignoring request..."):(this.j=!0,this.h=a,this.f=this.h.textTracks,this.a.on(this.f,_.oc,b=>hi(this,b)),this.a.on(this.f,Xc,()=>{{const b=this.f;for(let c=0;c<b.length;c++){const d=b[c];d.mode===_.Ff&&(d.mode=
358
- _.$d)}}}))}o(a){const b=new _.Zt(a.startTime,a.endTime,a.text,_.zg);if(_.eh(a.vertical))switch(a.vertical){case "lr":b.writingMode=_.og;break;case "rl":b.writingMode=_.pg}_.fh(a.size)&&(b.size=a.size);if(_.eh(a.align))switch(a.align){case _.fe:case _.Lf:b.textAlign=_.Lf;break;case _.Vc:b.textAlign=_.Ut;break;case _.yf:case _.Rd:b.textAlign=_.Rd}_.fh(a.position)&&(b.position=a.position);if(_.eh(a.positionAlign))switch(a.positionAlign){case _.ie:b.positionAlign=_.ie;break;case _.Vc:b.positionAlign=
359
- _.Vc;break;case _.je:b.positionAlign=_.je}_.fh(a.line)&&(b.line=a.line);if(_.eh(a.lineAlign))switch(a.lineAlign){case _.Lf:b.lineAlign=_.Xt;break;case _.Vc:b.lineAlign=_.Vc;break;case _.Rd:b.lineAlign=_.Rd}typeof a.snapToLines===_.Mc&&(b.lineInterpretation=a.snapToLines?_.Wt:1);return b}};_.I=class extends Error{constructor(a,b,c,d,e){super(ii(a,b,c,d));this.severity=a;this.category=b;this.code=c;this.data=!d||_.eh(d)?{}:d;this.cause=void 0===e?null:e;this.f=!1;Error.captureStackTrace&&Error.captureStackTrace(this,_.I)}a(a){this.severity!==a&&(this.severity=a,this.message=ii(this.severity,this.category,this.code,this.data))}toString(){let a=this.message;this.cause&&(a+=`\n Caused by ${this.cause}`);return a}};_.z("clpp.Error",_.I);_.G=2;_.I.Severity={RECOVERABLE:1,FATAL:_.G};
271
+ jr=function(a,b,c){_.w(function*(){var d=kr(a,b,0);const e=yield Yq(a,d),f=d.wa?d.wa.length:0;if(e&&0<f)try{a.g.info(`Player preroll interstitial ${d.da}`),yield nr(a,d,0,c)}catch(g){a.g.error("Preroll interstitial failed.",g),(d=Zp(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 Gq(a.X),c||(yield pq(a.X))})};
272
+ kr=function(a,b,c){{const u=b.customAttributes[_.Lb],v=b.customAttributes[_.Kb],y=b.customAttributes[_.Ob],A=b.customAttributes[_.Mb];var d=b.customAttributes[_.Nb]||[];b.customAttributes[Pb]||(b.customAttributes[Pb]=null==y||0<y?"RANGE":"POINT");var e=b.customAttributes["X-YOSPACE-AUDIO-PRIORITY"];e="CONTENT"===e?cq:"AD"===e?bq:void 0;var f=b.id,g=b.startTime,h=b.endTime,k=Hq,l=null==y?null:Math.max(0,b.startTime+y),m="POINT"===b.customAttributes[Pb],n=!d.includes("SKIP");d=!d.includes("JUMP");{const D=
273
+ b.customAttributes[Jb];if(D)try{var p=JSON.parse(atob(D))}catch(E){p=null}else p=null}b={da:f,startTime:g,endTime:h,state:k,qf:v,rf:u,wa:null,W:l,ii:y,Zb:A,Qc:c,Gh:m,Xg:n,Bf:d,vg:p,eg:null!=y&&0>y,once:(b.customAttributes.CUE||[]).includes("ONCE"),ug:!1,jf:!0,customAttributes:b.customAttributes,audio:e}}a.a.push(b);return b};
274
+ lr=function(a,b){_.w(function*(){const c=a.X.getCurrentItem();if(c)if(c.primary)a.a.forEach(g=>{const h=b.find(k=>k.id===g.da);if(h){const k=h.customAttributes[_.Mb];null==g.Zb&&null!=k&&(a.g.info(Ab,h.id,"Playout limit",k),g.Zb=k,1===g.Qc&&g.state===Pq&&or(a,g))}});else{var d=b.find(g=>g.id===c.Hb);if(d){var e=d.customAttributes[_.Mb];if(null!=e){var f=a.a.find(g=>g.da===d.id);f&&null==f.Zb&&(a.g.info(Ab,d.id,"Playout limit",e),f.Zb=e,yield oq(a.X,e))}}}})};
275
+ or=function(a,b){_.w(function*(){yield Tq(a,b);yield Zq(a,b,a.f)})};
276
+ Yq=function(a,b){return _.w(function*(){b.state=Mq;if(b.qf)try{a.g.info(`Load X-ASSET-LIST for ${b.da}`);a.Sa(new _.C(Yb));const c=yield pr(a,b.qf);b.wa=c.ASSETS;b.wa&&0!==b.wa.length||a.g.info(`Interstitial ${b.da} has no assets, `+"will be smoothly skipped");if(null==b.W){const d=bj(b.wa.map(e=>e.DURATION));b.W=b.startTime+(null==b.Zb?d:Math.min(b.Zb,d))}b.state=qr;a.Sa(new _.C(Zb));a.Sa(new _.C($b,{id:b.da,detail:c}))}catch(c){a.g.error("Failed to load X-ASSET-LIST",c),b.state=rr}else b.rf?(b.wa=
277
+ [{URI:b.rf,DURATION:b.endTime-b.startTime}],a.Sa(new _.C($b,{id:b.da,detail:Kq(b)})),b.state=qr):b.state=rr;return b.state===qr})};nr=function(a,b,c,d,e){return _.w(function*(){if(0!==b.wa.length&&a.X.getCurrentItem()){var f=ar(a,b,c);0!==f.length&&(br(a,b,f),0===c&&a.f.isLive()||(null!=e?Eq(a.X,e,!0):null!=b.W&&Eq(a.X,b.W)),d?yield a.X.load(f[0].id):yield a.X.play(f[0].id))}})};
278
+ Zq=function(a,b,c){if(b.wa)if(0===b.wa.length){const g=()=>{c.isLive()?a.g.info("Skipping empty "+`live interstitial ${b.da}`):null!=b.W&&0!==b.ii?c.seek(b.W):a.g.info(`Empty VOD interstitial ${b.da}, `+"continuing to next segment")};c.one(_.$f,g);a.h.push(()=>{c.off(_.$f,g)});a.g.info(`Schedule interstitial ${b.da} to `+"be skipped")}else{var d=a.X.getCurrentItem();if(d){var e=ar(a,b,1);if(0!==e.length){var f=e[0].id;null!=b.W&&Eq(a.X,b.W);d.next=[f];d.transition={$d:{position:b.startTime,itemId:f,
279
+ W:b.W}};a.g.info(`Schedule interstitial ${b.da} for `+`${b.startTime} s`);br(a,b,e)}}}};Xq=function(a,b){return a.a.find(c=>{const d=c.startTime-b;return 1===c.Qc&&Jq(c)&&0<d&&d<=a.ka.resolutionOffsetSec})||null};$q=function(a){return a.a.find(b=>2===b.Qc)||null};
280
+ pr=function(a,b){return _.w(function*(){var c=a.X.Md();if(!c)throw Error("No player found");c=c.getNetworkEngine();const d=_.mj(sr(a,b));c=yield Mk(c,d);if(null===c)return a.g.warn(`X-ASSET-LIST ${b} returned no content`),{ASSETS:[]};if(!Lq(c))throw new _.ni("Invalid X-ASSET-LIST list response");return c})};sr=function(a,b){return(a=a.ka.Xh)?(b=new URL(b),b.searchParams.set("_HLS_primary_id",a),b.toString()):b};
281
+ ar=function(a,b,c){let d=0,e=b.wa.map((h,k)=>{const l=`${b.da}-${k}`;d+=h.DURATION;return{id:l,config:{source:{url:sr(a,h.URI),type:_.Ql}},duration:h.DURATION,jb:d,Hb:b.da,next:[],Va:new Q(c,k+1,b.wa.length,h.DURATION,b.da,b.Xg,b.customAttributes||null),audio:b.audio}});e.forEach((h,k)=>{const l=k===e.length-1;l&&2===c||(l?(h.next=[pf],h.transition={za:pf}):(k=l?pf:`${h.Hb}-${k+1}`,h.next=[k],h.transition={za:k}))});e.forEach(h=>{h.be=()=>{var k=h.Va;a.g.info(`Playing ad ${`${k.f}/${k.a}`} of interstitial `+
282
+ h.Hb)}});if(null!=b.Zb&&(e=tr(a,b,e),0===e.length))return[];const f=e[0].be;e[0].be=()=>{b.ug=!0;b.eg&&(b.jf=!1);a.g.info(`Playing interstitial ${b.da} with `+`${b.wa.length} assets and will resume primary `+`content ${b.W?`at ${b.W.toFixed(1)} s`:"after interstitial ended"}.`);f()};e[0].jg=h=>{null==b.W&&(b.W=b.startTime+h,Eq(a.X,b.W),a.g.info("Primary content will resume at",b.W.toFixed(1),"s"));b.state=ur};const g=e[e.length-1];g.za=()=>{b.state=Iq;sq(a.X,e.map(h=>h.id));2===c&&Gq(a.X)};g.Re=a.ka.adReleaseDelayMs;
283
+ return e};br=function(a,b,c){qq(a.X,c);c=a.X;vq(c);c.f&&(c.f.Va&&iq(c,c.f,c.f.Va),kq(c),lq(c,c.f.next));b.state=Pq;a.Sa(new _.C(_.bc,{detail:null}))};
284
+ tr=function(a,b,c){const d=b.Zb;a.g.info(`Playout limit for ${b.da} is `+`${d} s`);b=c[c.length-1].jb;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.jb-f.duration<=d);e.forEach(f=>{f.Va.a=e.length});a=e[e.length-1];c=d-(a.jb-a.duration);.1>Math.abs(c-a.duration)?a.transition.za=pf:a.transition.$d={position:c,itemId:pf,W:null};a.maxDuration=c;return e};
285
+ vr=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)})}};
286
+ zr=function(a){a.a.on(window,"offline",()=>{wr(a,!1)});a.a.on(window,"online",()=>{a.f||xr(a)});a.a.on(a.m,Lf,()=>yr(a));a.a.on(a.m,"suspend",()=>yr(a));a.a.on(a.m,_.Cg,()=>yr(a));a.a.on(a.m,_.ef,()=>{a.f||xr(a)});a.a.on(a.m,_.qf,()=>{a.f||xr(a)});a.a.on(a.m,_.Nf,()=>{switch(a.m.getState()){case _.lp:yr(a);break;default:yr(a)}})};Ar=function(a){a.h&&(a.h.stop(),a.h=null)};yr=function(a){a.f&&xr(a)};
287
+ Br=function(a){return _.w(function*(){var b=a.m.getConfiguration().connectivityCheck;b&&a.m&&(b=yield Rk(a.j,b.url,b.attemptParameters,b.method),wr(a,b))})};xr=function(a){a.m.getConfiguration().connectivityCheck&&(Ar(a),a.h=(new _.Mj(()=>Br(a))).la(5))};wr=function(a,b){Ar(a);a.f!==b&&(a.f=b,a.m&&a.m.getConfiguration().connectivityCheck&&a.m.trigger(new _.C(Me,{online:a.f})))};Dr=function(){for(let a=0;a<Cr.length;++a)Cr[a].Bc()};
288
+ _.Er=function(a){var b=b||0;a={priority:b,Bc:a};for(let c=0;c<Cr.length;c++)if(Cr[c].priority<b){Cr.splice(c,0,a);return}Cr.push(a)};Fr=function(a,b){a.onError(b);a.release().then(()=>a.destroy())};
289
+ Hr=function(a){var b=Gr;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=_.Fi(d),n=_.Bk(e);return h.verify(k,l,n.buffer,m.buffer)}).then(function(l){l?f():g(new _.ni("Signature Verification failed",gg))}).catch(g)}else f()})};
290
+ Jr=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 Ir(b[0],b[1],b[2]);a.a=b}return a.a};Kr=function(a){return _.w(function*(){var b=Jr(a);try{yield Hr(b)}catch(c){if(c&&c.code===gg)throw c;b=new _.Ui(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;}})};
291
+ Lr=function(a){switch((a.ga[0]||{src:"",type:""}).type){case _.uc:a="dash";break;case _.Bc:a="ss";break;case _.Ql:a="hls";break;case _.tg:a="mp4";break;default:a=""}return a};Mr=function(a){return a.viewerId?a.viewerId:(a=a.drm||null)&&a.customData&&a.customData.userId?`${a.customData.userId}`:""};Nr=function(a){return(a=a.drm||null)&&a.customData&&a.customData.assetId?`${a.customData.assetId}`:""};
292
+ Or=function(a){return(a=a.drm||null)&&a.customData&&a.customData.sessionId?`${a.customData.sessionId}`:""};Pr=function(a){return(a=(a=a.drmInfo)&&a.licenseServerUri||"")?(new _.Ui(a)).a.hostname:""};Qr=function(a){const b=a.configuration;let c="no";b.drm&&!_.ih(b.drm,{})&&(c="custom",b.drm.env&&b.drm.env.toLowerCase().startsWith(Od)||Pr(a).endsWith("drmtoday.com"))&&(c=Od);return c};
293
+ Rr=function(a){a=a.drmInfo;let b="";if(a)switch(a.keySystem){case _.ud:b="wv";break;case _.sd:b="pr";break;case _.qd:b="fps"}return b};Sr=function(a){a=a.drmInfo;let b=!1;a&&(b=a.persistentStateRequired);return b.toString()};Tr=function(a){a=a.drmInfo;let b="";if(a)switch(a.videoRobustness){case Ia:case Ga:b="L1";break;case Ha:b="L2";break;case _.ob:case _.nb:b="L3"}return b};
294
+ Yr=function(a,b){const c="ie"===_.ok().browser;var d=b.configuration;const e=[...Array.from(_.am.keys()),...b.og];b={"CL-KEY":a.f,"CL-LOCATION":window.location.href,"CL-SDK-VERSION":_.ea,"CL-USER-ID":Mr(d),"CL-ASSET-ID":Nr(d),"CL-SESSION-ID":Or(d),"CL-PLAYBACK-TYPE":b.isLive?Ur:Vr,"CL-CONTENT-TYPE":Lr(b),"CL-PLUGINS":e.join(" "),"CL-DRM":Qr(b),"CL-DRM-CDM":Rr(b),"CL-DRM-SEC-LEVEL":Tr(b),"CL-DRM-OFFLINE":Sr(b),"CL-DRM-IP":Pr(b)};Wr&&Wr.companionSdk&&(Wr.companionSdk.name&&(b["CL-COMPANION-SDK"]=Wr.companionSdk.name),
295
+ Wr.companionSdk.version&&(b["CL-COMPANION-SDK-VERSION"]=Wr.companionSdk.version));c&&(d=window.localStorage.getItem("cl_et"))&&(b["CL-ETAG"]=d);d=_.mj(["https://downloads.castlabs.com/r/register/"]);d.method="GET";d.headers=b;return(new _.Xr).fetch(d).U.then(f=>{200===f.status&&c&&window.localStorage.setItem("cl_et",f.headers.etag);return Promise.resolve()}).catch(f=>{a:{var g=Jr(a);f=f.data;var h=f.status;if(g.a&&g.a.ilv)g=Promise.resolve();else{switch(h){case 403:case 404:g=7101;var k="Castlabs Player license is invalid";
296
+ if(403===h){h=k;k="";try{k=JSON.parse(decodeURIComponent(f.responseText)).message}catch(l){}f=k;f=h+(": "+f)}else f=k+"!";k=f;break;case 412:g=7103;k="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:g=Promise.resolve();break a}a.g.error(Ma+k);g=Promise.reject(new _.I(_.F,7,g,k))}}return g})};
297
+ bs=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}=Zr(c[e]);Object.keys($r).includes(f)&&(d[$r[f]]=g)}return d}).filter(c=>_.ch(c));return 0<b.length?b:null}catch(b){return as.error("CmsdManager parseCmsdDynamicHeader_ failed:",b),null}};
298
+ Zr=function(a){var b=a.split("\x3d");const c=b[0];b=b[1];if(!c)throw new _.ni("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 _.ni(`Parsing CMSD, not recognized value type of ${a}`);};
299
+ ds=function(a){return b=>{{var c=b.headers;let e=b=null;var d=mh(c,"cmsd-dynamic");c=mh(c,"cmsd-static");d&&(b=bs(d),a.a=b);if(c)try{d={};const f=c.split(",");for(c=0;c<f.length;c++){const {key:g,value:h}=Zr(f[c]);Object.keys(cs).includes(g)&&(d[cs[g]]=h)}e=_.ch(d)?d:null}catch(f){as.error("CmsdManager parseCmsdStaticHeader_ failed:",f),e=null}(b||e)&&a.m.trigger(new _.C("cmsd-event",{Ui:b,fj:e}))}}};_.fs=function(a){a&&(0<=es.indexOf(a)||es.push(a))};
300
+ hs=function(a){if(!a.h&&a.A&&a.a&&a.f.ads.hls.enable&&a.getTimelineCues().some(b=>_.Yi(b.schemeIdUri))){const b=a.f.mse.sendPlaybackSessionIdHeader?a.G:null;a.h=new gs;a.h.o(a.a,a.A,b)}};js=function(a,b){a.F=new is(b);Kr(a.F).catch(c=>{setTimeout(()=>{a.g.error(Ma+c);a.trigger(new _.C(_.Ud,{detail:new _.I(_.F,7,7101)}));a.destroy()},1E3)})};ls=function(a,b){a.Z=b;for(const c of a.Z)(b=c.id())&&(a.K[b]=c);_.ks(a,"onPlayerCreated")};
301
+ _.ms=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.A=null),b&&(b.init(a.j,a.C),b.setNetworkEngine(a.getNetworkEngine()),b.forwardEventsTo(a),a.a=b,a.A=c))};
302
+ ns=function(a,b){_.w(function*(){a.j.getMedia()||a.j.getCastElement();a.F||(a.F=new is(a.f.license));try{a.g.debug("Verifying license remotely"),yield Yr(a.F,b),a.g.debug("License verified remotely")}catch(c){a.g.debug("License rejected by remote",c),setTimeout(Fr,1E3,{release:a.release.bind(a),destroy:a.destroy.bind(a),onError:a.onError.bind(a)},c)}})};_.ks=function(a,b,...c){if(!a.ca)return Promise.resolve();const d=a.Z.map(e=>e[b].call(e,a,...c)).filter(e=>e instanceof Promise);return Promise.all(d)};
303
+ os=function(a){return _.w(function*(){if(a.R)return a.g.debug("The player is already released. No-op"),new Promise(b=>b());a.ea.off(document,Ag);a.trigger(new _.C(_.vf));a.j&&a.j.release();a.h&&(yield a.h.h(),a.h=null);a.B&&(yield a.B.release(),a.B=null);if(a.a){let b=null;const c=a.a.on(_.Nf,d=>{b=d});return _.ks(a,_.Ke).then(()=>{a.a.stopForwardingEventsTo(a);return Promise.all([a.a.release(),a.I.release()])}).then(()=>{a.g.debug("Releasing player completed");b&&(a.g.debug("Re-post state change event after release"),
304
+ a.trigger(b))}).finally(()=>{a.a.off(_.Nf,c);a.trigger(new _.C(uf))})}a.trigger(new _.C(uf));return new Promise(b=>b())})};ps=function(a){a.G&&(a.g.info("Playback session ended, ID:",a.G),a.G=null,a.a&&a.a.setPlaybackSessionId(null))};qs=function(a,b){const c=zh(d=>d.f(_.cb)&&a.every(e=>2===d.canPlay(e,b)));if(!c)throw new _.I(_.F,7,7003,"No compatible player implementing playlist mode found!");return{$a:c,player:c.create(),sourceIndex:0}};
305
+ ss=function(a,b,c){if(a.M===_.cb)b=qs(b,c);else if(2!==(a.a?a.a.canPlay(b[0],c):0)||a.T){a.T=!1;if(b){var d=a=null;for(var e=0;e<b.length;e++);e=Object.values(_.wh);for(let f=0;f<b.length;f++)for(let g=0;g<e.length;g++){const h={$a: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?(_.xh.debug("Player Factory '"+a.$a.a()+"' can play",b[d]),b=new rs(a.$a,d)):(_.xh.debug("No compatible Player Factory found for sources:",b),b=null)}else b=
306
+ null;if(!b)throw new _.I(_.F,7,7003,"No player factory compatible with given sources found!");c=b.$a;a=c.create();b={$a:c,player:a,sourceIndex:b.sourceIndex}}else b={$a:a.A,player:a.a,sourceIndex:0};return b};
307
+ _.xs=function(a,b,c){return _.w(function*(){if(a.P)throw new _.I(_.F,7,7E3,"Player is already destroyed.");if(!a.j)throw new _.I(_.F,7,7E3,"No surface associated with this player!");_.Sn($e);yield a.release();var d=c||_.vp(b);if(!b||0===d.length)throw new _.I(_.F,7,7003,Xa);a.ha=d;a.f=_.Zl(a.C,b,{source:d});a.R=!1;d=ss(a,d,a.f);_.ms(a,d.player,d.$a);ts(a,a.a);a.a&&a.a.setSourceIndex(d.sourceIndex);us(a);a.a&&a.a.setCdnErrorCallback(a.L);vs(a,a.f);ws(a);if(a.f.pauseWhenInBackground)a.ea.on(document,
308
+ Ag,()=>{document.hidden?(a.g.debug("Player is hidden: pausing..."),a.pause()):(a.g.debug("Player is visible: resuming..."),a.play())});hm(a);yield _.ks(a,"onContentWillLoad",a.f.source[d.sourceIndex]);_.Sn(Ze);_.Un("player.beforeLoad",$e,Ze)})};_.ys=function(a){return _.w(function*(){a.j.getMedia()||a.j.getCastElement();a.trigger(new _.C(qe));yield Promise.all([a.a.load(a.f),a.h?a.h.load():Promise.resolve()])})};
309
+ _.As=function(a){return _.w(function*(){_.Sn(We);ns(a,{configuration:a.getConfiguration(),ga:a.Uf(),drmInfo:a.getDrmInfo(),og:Object.keys(a.K),isLive:a.isLive()});zs(a);im();yield _.ks(a,_.He);a.f.autoplay&&(a.h?a.h.l():1)&&(yield a.play());_.Sn(Ve);_.Un("player.afterLoad",We,Ve)})};Bs=function(a){return _.w(function*(){if(a.a){var b=a.a;b.Ag?(a.trigger(new _.C(qe)),yield b.Ag(),yield _.As(a)):a.g.warn(jb)}else a.g.warn(fb)})};
310
+ ts=function(a,b){try{var c=crypto.randomUUID()}catch(d){c=vr()}a.g.info("Playback session started, ID:",c);b.setPlaybackSessionId(c);a.G=c};us=function(a){a.a&&a.a.setDrmCustomDataModifier(b=>_.w(function*(){a.Be&&a.Gc&&(yield a.Gc(b))}))};vs=function(a,b){if(b=Kp(a,b))a.h=b.create(a)};ws=function(a){a.f.cmsd.enabled&&(a.B=new Cs(a),a.a.setCmsdManager(a.B))};
311
+ Ds=function(a){const b=_.di(a.f.preferredTextLanguage).filter(f=>f),c=a.f.preferForcedSubtitles,d=a.getTrackManager().pa().filter(f=>c?f.kind===_.Wd:f.kind!==_.Wd);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().oa();e&&e.language?(e=_.$i(e.language||""),b.push(e)):(e=a.getTrackManager().Ea())&&e.language&&(e=_.$i(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=>
312
+ {const g=_.$i(f);if(f=d.find(h=>{h=_.$i(h.language||"");return _.aj(h,g)}))return a.getTrackManager().Ra(f),!0;c&&a.g.warn("Forced subtitles are configured to be preferred, but no forced subtitles match the preferred languages: ",b);return!1})}};zs=function(a){_.w(function*(){const b=[];if(a.f.remoteTextTracks)for(const c of a.f.remoteTextTracks)b.push(a.getTrackManager().addTextTrack(c));yield Promise.all(b);Ds(a)})};Es=function(a){a.J.forEach(b=>b());a.J=[]};
313
+ Ks=function(a,b){return _.w(function*(){try{_.Sn(df);a.M=_.cb;a.ca=!1;const c=b.slice(1).map(d=>({config:d,ga:_.vp(d)}));yield _.xs(a,b[0]);c.forEach(d=>{Fs(a,d.config,d.ga)});a.trigger(new _.C(qe));yield a.a.setupPlaylist(b);yield _.As(a);c.forEach(d=>{Js(a,d.config,d.ga)});_.Sn(cf);_.Un("player.setupPlaylist",df,cf)}catch(c){if(a.l)throw a.g.info(Oa),new _.I(_.F,7,7E3);throw c;}})};
314
+ Ls=function(a,b){const c=d=>{a.H=a.o.findIndex(e=>e.id===d.id)};a.addEventListener(_.Bf,c);a.J.push(()=>{a.removeEventListener(_.Bf,c)});if(b.endTime){const d=b.endTime,e=()=>{a.getPosition()>=d&&(a.removeEventListener(_.cg,e),a.g.info("Playlist end time reached. Stopping playback."),a.trigger(new _.C(_.Af)),a.pause())};a.addEventListener(_.cg,e);a.J.push(()=>{a.removeEventListener(_.cg,e)})}};
315
+ Ms=function(a,b){return _.w(function*(){try{_.Sn(Ye);const c=_.vp(b);Fs(a,b,c);yield a.a.appendLoad(b);Js(a,b,c);_.Sn(Xe);_.Un("player.appendLoad",Ye,Xe)}catch(c){if(a.l)throw a.g.info(Oa),new _.I(_.F,7,7E3,{id:b.id});throw c;}})};
316
+ Fs=function(a,b,c){if(0===c.length)throw new _.I(_.F,7,7003,{message:Xa,id:b.id});if(1<c.length)throw new _.I(_.F,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 _.I(_.F,7,7003,{message:"Source not supported by the current player!",id:b.id,source:c[0]});};Js=function(a,b,c){ns(a,{configuration:b,ga:c,drmInfo:a.getDrmInfo(),og:Object.keys(a.K),isLive:c[0].isLive})};
317
+ Ns=function(a,b){const c=document.getElementById(a);if(!c)throw Error("Anchor element not found");c.classList.add(bd);return Array.from({length:3}).map(()=>{const d=document.createElement(_.t);d.classList.add("clpp-mc-playlist-video-el");const e=document.createElement(_.Dd);e.classList.add("clpp-mc-playlist-item");e.appendChild(d);c.appendChild(e);return new R(d,b)})};
318
+ Os=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(cd)):(a.g.info(`Hide video element .${b}`),d.classList.remove(cd)),a.w&&a.w(d,c))};Rs=function(a,b){return _.w(function*(){const c=yield a.o.get();a.f=b;b.role=Ps;a.f.player=c;a.f.videoEl=c.getSurface().getMedia();Os(a,c,!0);yield c.load(b.config);Qs(a,b);b.config.autoplay||(yield c.play())})};
319
+ Vs=function(a){_.w(function*(){if(0===a.a)yield Ss(a);else if(a.a===a.h.length-1)yield Ts(a);else{const b=[a.a-1,a.a+1];a.g.info(`Preload items (indices: ${b})`);yield Promise.all(b.map(c=>Us(a,c)))}})};
320
+ Ws=function(a,b){return _.w(function*(){if(b.player){if(b.state===nf){a.g.info(Eb);try{yield b.preloadPromise}catch(c){}}a.f=b;b.role=Ps;Os(a,b.player,!0);b.state===mf?(_.Sn(jf),a.ka.preloadMedia?yield b.player.play():yield Bs(b.player),_.Sn(hf),_.Un("playlist.next",jf,hf)):b.state===lf&&(yield b.player.load(b.config));Qs(a,b);b.config.autoplay||(yield b.player.play())}})};
321
+ Zs=function(a,b){return _.w(function*(){a.g.info(`Stop current playback (index: ${b.index})`);b.player.pause();Os(a,b.player,!1);yield Xs(a,b);b.player=null;b.videoEl=null;b.role=Ys})};at=function(a){return Promise.all(Array.from(a.l.keys()).map(b=>$s(a,b)))};bt=function(a){return _.w(function*(){yield a.o.destroy();const b=document.getElementById(a.ka.anchorId);b&&(b.classList.remove(bd),b.innerHTML="")})};
322
+ $s=function(a,b){return _.w(function*(){const c=a.l.get(b);c&&(a.g.info(`Stop preloading item (index: ${b})`),c.player&&(yield Xs(a,c)),a.l.delete(b))})};Xs=function(a,b){return _.w(function*(){b.disposers.forEach(c=>c());b.disposers=[];b.player&&(yield a.o.release(b.player))})};Qs=function(a,b){if(a.ka.autoplayNext){const c=()=>{a.g.info("Automatically transition to next item");a.mg()};b.player.on(_.Td,c);const d=b.player;b.disposers.push(()=>{d.off(_.Td,c)})}};
323
+ Us=function(a,b){return _.w(function*(){const c=yield a.o.get(),d=a.h[b];d.player=c;d.videoEl=c.getSurface().getMedia();d.role=Ys;d.state=nf;a.trigger(new _.C(jg));try{a.l.set(b,d),a.ka.preloadMedia?(d.config.autoplay&&(a.g.warn(la+`Force disabling autoplay (index: ${b})`),d.config.autoplay=!1),d.preloadPromise=c.load(d.config)):d.preloadPromise=c.preload(d.config),yield d.preloadPromise,d.state=mf,a.trigger(new _.C(jg))}catch(e){7001===e.code?(a.g.info(`Preload aborted (index: ${b})`),d.state=kf):
324
+ (a.g.warn(`Preload failed (index: ${b})`,e),a.trigger(new _.C(_.Ud,{detail:e})),d.state=lf),a.trigger(new _.C(jg))}})};Ss=function(a){return _.w(function*(){const b=a.a+1;a.g.info(`Preload following item (index: ${b})`);yield Us(a,b)})};Ts=function(a){return _.w(function*(){const b=a.a-1;a.g.info(`Preload preceding item (index: ${b})`);yield Us(a,b)})};
325
+ _.dt=function(a){if(ct.has(a))return ct.get(a);if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported(a);ct.set(a,b);return b}return window.MediaSource?(b=MediaSource.isTypeSupported(a),ct.set(a,b),b):!1};et=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};
326
+ ft=function(a){const b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase();let c;typeof Event===_.$d?c=new Event(b,a):(c=document.createEvent("Event"),c.initEvent(b,a.bubbles,a.cancelable));a.target.dispatchEvent(c)};gt=function(a){a=a.target;if(a.webkitPresentationMode===Te){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)};
327
+ ht=function(){return this.webkitSupportsPresentationMode(Te)?(this.webkitSetPresentationMode(Te),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))};it=function(){const a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))};
328
+ jt=function(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}};kt=function(a,b,c){return new window.TextTrackCue(a,b,c)};lt=function(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)};nt=function(a,b,c){if("input"===a)switch(this.type){case "range":a=Xc}mt.call(this,a,b,c)};_.ot=function(a){const b=[];for(const c of a)for(const d of c.variants)b.push(d);return b};
329
+ _.qt=function(a,b,c,d){return _.w(function*(){try{return new (yield pt(a,b,c,d))}catch(e){throw e.a(_.F),e;}})};
330
+ pt=function(a,b,c,d){return _.w(function*(){if(d){var e=_.rt[d.toLowerCase()];if(e)return e;_.B("Could not determine manifest type using MIME type ",d)}if(e=_.Vi(a)){const f=_.st[e];if(f)return f;_.B("Could not determine manifest type for extension ",e)}else _.B("Could not find extension for ",a);if(!d&&(d=yield tt(a,b,c))){if(e=_.rt[d])return e;_.B("Could not determine manifest type using MIME type",d)}throw new _.I(_.F,4,4E3,{url:a});})};
331
+ tt=function(a,b,c){return _.w(function*(){var d=_.mj(a);jj(d,c);d.type=1;d.method="HEAD";return(d=(yield b.fetch(d).U).headers["content-type"])?d.toLowerCase():""})};_.vt=function(a,b){a=_.ul(_.vl(a),_.wl(a));_.ut[a]=b};_.wt=function(a){a=_.ul(_.vl(a),_.wl(a));return _.ut[a]||null};_.xt=function(a){a=_.ul(_.vl(a),_.wl(a));delete _.ut[a]};
332
+ _.Ct=function(a){if(!a.w)return null;const b=a.H;switch(a.w){case yt:return`-2px -2px 0 ${b}, -1px -1px 0 ${b}`;case zt:return`2px 2px 0 ${b}, 1px 1px 0 ${b}`;case At:return`-1px 0 ${b}, 0 1px ${b}, 1px 0 ${b}, `+`0 -1px ${b}`;case Bt:return`2px 2px 3px ${b}, 2px 2px 4px ${b}, `+`2px 2px 5px ${b}`;default:return _.Ee}};_.Qg=[];Ug="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this;
333
+ Vg=typeof Object.defineProperties==_.$d?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)};
334
+ Wg("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=Ug.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=
335
+ 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 _.Fe:var h=null!=g;break a;case _.$d:h=!0;break a;default:h=!1}h?this.B(g):this.o(g)}};
336
+ b.prototype.B=function(g){var h=void 0;try{h=g.then}catch(k){this.h(k);return}typeof h==_.$d?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();
337
+ g.Fd(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==_.$d?function(v){try{l(p(v))}catch(y){m(y)}}:u}var l,m,n=new b(function(p,u){l=p;m=u});this.Fd(k(g,l),k(h,m));return n};b.prototype.catch=function(g){return this.then(void 0,g)};b.prototype.Fd=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: "+
338
+ 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=Tg(g),m=l.next();!m.done;m=l.next())d(m.value).Fd(h,k)})};b.all=function(g){var h=Tg(g),k=h.next();return k.done?d([]):new b(function(l,m){function n(v){return function(y){p[v]=y;u--;0==u&&l(p)}}var p=[],u=0;do p.push(void 0),u++,d(k.value).Fd(n(p.length-1),m),k=h.next();while(!k.done)})};return b});var Yg=this||self;
339
+ Yg.a=!0;_.x("clpp.utils.obj.cloneItem",_.ah);_.x("clpp.utils.obj.merge",_.$g);var qh={DEFAULT:-1,NONE:0,ERROR:1,WARNING:2,INFO:3,DEBUG:4};_.x("clpp.log.Level",qh);var oh=0,nh={},Dt=[];_.x("clpp.log.getLoggers",function(){return _.ah(nh)});_.x("clpp.log.addInterceptor",function(a){a&&Dt.push(a)});_.x("clpp.log.removeInterceptor",function(a){a&&(a=Dt.indexOf(a),0<=a&&Dt.splice(a,1))});_.x("clpp.log.getTagLevel",ph);_.x("clpp.log.hasTagLevel",function(a){return void 0===a?!1:0<=nh[a]});_.x("clpp.log.setTagLevel",function(a,b){a&&(_.gh(b)&&(b=rh(b)),nh[a]=b)});
340
+ _.x("clpp.log.setLogLevel",function(a){-1===a&&(a=3);_.gh(a)&&(a=rh(a));oh=a});_.x("clpp.log.getLogLevel",function(){return oh});
341
+ _.S=class{constructor(a){(this.tag=a)&&void 0===nh[a]&&(nh[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=ph(this.tag);if(0<=d){if(d<c)return}else if(oh<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,
342
+ arguments):2===c?console.warn.apply(console,arguments):1===c?console.error.apply(console,arguments):console.log.apply(console,arguments);for(const e of Dt)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)}ah(a){return a?
343
+ this.tag?new _.S(this.tag+"."+a):new _.S(a):this}};_.x("clpp.log.Logger",_.S);_.S.prototype.createChild=_.S.prototype.ah;_.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 sh=new _.S("clpp");_.x("clpp.log.info",_.th);_.x("clpp.log.debug",_.uh);_.x("clpp.log.warn",_.B);_.x("clpp.log.error",_.vh);(function(){const a=console.assert;a?a.bind||(console.assert=function(){a.apply(console,arguments)}):console.assert=function(){}})();var rs;rs=class{constructor(a,b){this.$a=a;this.sourceIndex=b}};_.xh=new _.S("clpp.players");_.wh={};_.x("clpp.events.ERROR",_.Ud);_.x("clpp.events.LOADEDMETADATA",_.pe);_.x("clpp.events.BUFFERING_ENDED",_.Nc);_.x("clpp.events.BUFFERING_STARTED",_.Oc);_.x("clpp.events.STATE_CHANGED",_.Nf);_.x("clpp.events.AUDIO_TRACK_CHANGED",_.Jc);_.x("clpp.events.TEXT_TRACK_CHANGED",_.Yf);_.x("clpp.events.VIDEO_TRACK_CHANGED",_.yg);_.x("clpp.events.BITRATE_CHANGED",_.Lc);_.x("clpp.events.TRACKS_ADDED",_.dg);_.x("clpp.events.LOAD_START",qe);_.x("clpp.events.RELEASING",_.vf);_.x("clpp.events.RELEASED",uf);
344
+ _.x("clpp.events.DESTROYING","destroying");_.x("clpp.events.DESTROYED","destroyed");_.x("clpp.events.VIDEO_BUFFER_CHANGED",_.xg);_.x("clpp.events.AUDIO_BUFFER_CHANGED",_.Ic);_.x("clpp.events.DOWNLOAD_TRACE","downloadtrace");_.x("clpp.events.DRM_SESSION_CREATED",Ld);_.x("clpp.events.DRM_SESSION_UPDATE",_.Nd);_.x("clpp.events.DRM_SESSION_PERSISTED",_.Md);_.x("clpp.events.DRM_RENEWAL_STARTED",Kd);_.x("clpp.events.DRM_EXPIRATION_UPDATE",_.Id);_.x("clpp.events.DRM_LICENSE_REQUESTED",Jd);
345
+ _.x("clpp.events.AUTOPLAY_NOT_ALLOWED",_.Kc);_.x("clpp.events.PLAY",_.Ue);_.x("clpp.events.SEEKING",_.Ff);_.x("clpp.events.SEEKED",_.Ef);_.x("clpp.events.USER_SEEKING",_.ng);_.x("clpp.events.USER_SEEKED",_.mg);_.np={SEEKING:1,NO_DATA:2};_.x("clpp.events.BufferingReasons",_.np);_.x("clpp.events.ADS_TIMELINE_CHANGED",_.pc);_.x("clpp.events.AD_LOADED",_.bc);_.x("clpp.events.AD_BREAK_STARTED",_.Sb);_.x("clpp.events.AD_STARTED",_.kc);_.x("clpp.events.AD_BUFFERING",_.Ub);_.x("clpp.events.AD_PROGRESS",_.ec);
346
+ _.x("clpp.events.AD_FIRST_QUARTILE",_.Xb);_.x("clpp.events.AD_MIDPOINT",_.cc);_.x("clpp.events.AD_THIRD_QUARTILE",_.nc);_.x("clpp.events.AD_PAUSED",_.dc);_.x("clpp.events.AD_RESUMED",_.fc);_.x("clpp.events.AD_SKIPPED",_.gc);_.x("clpp.events.AD_CLICKED",_.Vb);_.x("clpp.events.AD_IMPRESSION",_.ac);_.x("clpp.events.AD_COMPLETED",_.Wb);_.x("clpp.events.AD_STOPPED",_.mc);_.x("clpp.events.AD_BREAK_STOPPED",_.Tb);_.x("clpp.events.AD_HLS_ASSET_LIST_REQUEST",Yb);
347
+ _.x("clpp.events.AD_HLS_ASSET_LIST_RESPONSE",Zb);_.x("clpp.events.AD_HLS_RESOLVED",$b);_.x("clpp.events.SIMID_CREATIVE_STARTED",_.Hf);_.x("clpp.events.SIMID_CREATIVE_STOPPED",_.If);_.x("clpp.events.CASTING_STARTED",_.Rc);_.x("clpp.events.CASTING_ENDED","castingended");_.x("clpp.events.CAST_STATUS_CHANGED",_.Sc);_.x("clpp.events.AIRPLAY_STATUS_CHANGED",_.sc);_.x("clpp.events.AIRPLAY_CASTING_STARTED",_.rc);_.x("clpp.events.AIRPLAY_CASTING_ENDED",_.qc);_.x("clpp.events.TIMELINE_CUE_ADDED",_.Zf);
348
+ _.x("clpp.events.TIMELINE_CUE_ENTER",_.$f);_.x("clpp.events.TIMELINE_CUE_EXIT",_.ag);_.x("clpp.events.TIMELINE_CUES_CHANGED",_.bg);_.x("clpp.events.MPD_TYPE_CHANGED",_.Ce);_.x("clpp.events.LIVE_TURNED_STATIC",_.me);_.x("clpp.events.VIMOND_RESPONSE",_.zg);_.x("clpp.events.PLAYLIST_ITEM_CHANGED",_.ff);_.x("clpp.events.PLAYLIST_MODIFIED",_.gf);_.x("clpp.events.SC_PLAYLIST_TIMELINE_CHANGED",_.Df);_.x("clpp.events.SC_PLAYLIST_ITEM_CHANGED",_.Bf);_.x("clpp.events.SC_PLAYLIST_ENDED",_.Af);
349
+ _.x("clpp.events.SC_PLAYLIST_LIVE_TURNED_STATIC",_.Cf);_.x("clpp.events.CDN_SWITCH_SUCCESS",_.Tc);_.x("clpp.events.ONLINE_STATUS_CHANGED",Me);_.x("clpp.events.CMSD_EVENT","cmsd-event");_.x("clpp.events.YOSPACE_SESSION_STARTED",_.Og);_.x("clpp.events.YOSPACE_SESSION_ENDED",_.Ng);_.x("clpp.events.CONTENT_STEERING_CHANGE",_.wd);_.x("clpp.events.CONTENT_STEERING_LOCATION_BAN_UPDATE",_.xd);_.Et=class{constructor(a){this.f=a;this.a=null}la(a){return Ah(this,a,!1)}yb(a){return Ah(this,a,!0)}stop(){this.a&&(this.a(),this.a=null)}};_.Mj=class{constructor(a){this.f=a;this.a=null}bf(){this.stop();this.f();return this}la(a){this.stop();this.a=(new _.Et(()=>{this.f()})).la(a);return this}yb(a){this.stop();this.a=(new _.Et(()=>{this.f()})).yb(a);return this}stop(){this.a&&(this.a.stop(),this.a=null)}};_.x("clpp.utils.Timer",_.Mj);_.Mj.prototype.stop=_.Mj.prototype.stop;_.Mj.prototype.tickEvery=_.Mj.prototype.yb;_.Mj.prototype.tickAfter=_.Mj.prototype.la;_.Mj.prototype.tickNow=_.Mj.prototype.bf;var Ft=class{constructor(){this.uc=null;this.f=[];this.h=[];this.Qa=new _.S(dd);this.a=null;this.j=!1}load(a){const b=this;return _.w(function*(){b.uc?yield Eh(b,c=>_.w(function*(){yield c.load(a)})):b.Qa.warn("No main player, cannot load.")})}oi(a){this.j=a;this.Qa.info("Looping set to",a)}Og(a){this.f.push(a)}Ng(a){if(this.uc)this.Qa.warn("Main player already set.");else{this.uc=a;var b=this.o.bind(this),c=this.w.bind(this),d=this.l.bind(this);a.on(_.Nf,b);a.on(_.cg,c);a.on(_.Td,d);this.h.push(()=>
350
+ {a.off(_.Nf,b);a.off(_.cg,c);a.on(_.Td,d)})}}clear(){this.uc=null;this.f=[];this.h.forEach(a=>a());this.h=[]}l(){const a=this;return _.w(function*(){a.j&&(a.Qa.info("Looping playback."),yield Eh(a,b=>_.w(function*(){yield b.seek(0);yield b.play()})))})}o(a){this.a||(a=a.detail.currentState,a===_.sp?(this.Qa.info("Mirroring playing."),Fh(this,b=>_.w(function*(){yield b.play()}))):[_.rp,_.lp,_.ip].includes(a)&&(this.Qa.info("Mirroring paused/buffering/error."),Fh(this,b=>{const c=this;return _.w(function*(){var d=
351
+ Math.round(c.uc.getPosition())-.1;yield b.seek(d);yield Bh(.2);d=b.getState();if(d===_.sp||d===_.lp)yield b.pause()})})))}w(){this.a||Fh(this,a=>{const b=this;return _.w(function*(){a.isPaused()&&(yield a.play());const c=b.uc.getPosition();var d=a.getPosition();d=c-d;const e=Math.abs(d),f=a.getPlaybackRate();if(!(a.getState()!==_.sp||.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.setPlaybackRate(1),yield a.seek(c)):f===g?1!==g&&b.Qa.info(`Delta ${d.toFixed(1)} s.`):
352
+ (1===g?b.Qa.info("Secondary caught up."):1>g?b.Qa.info("Secondary slowing down to catch up. "+`Rate: ${g.toFixed(1)}, delta: ${d.toFixed(1)} s`):1<g&&b.Qa.info("Secondary speeding up to catch up. "+`Rate: ${g.toFixed(1)}, delta: ${d.toFixed(1)} s`),a.setPlaybackRate(g))}})})}};_.x(dd,Ft);Ft.prototype.clear=Ft.prototype.clear;Ft.prototype.addMainPlayer=Ft.prototype.Ng;Ft.prototype.addSecondaryPlayer=Ft.prototype.Og;Ft.prototype.setLoop=Ft.prototype.oi;Ft.prototype.load=Ft.prototype.load;_.Gt=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 Ht,It;Ht=class{constructor(a,b,c,d){this.f=a;this.Bc=b;this.a=c;this.fi=!!d}Sa(a){try{this.Bc.handleEvent?this.Bc.handleEvent(a):this.Bc.call(this.a,a)}catch(b){_.vh("clpp","Uncaught exception in event handler for event '"+this.f+"'",b,b?b.message:null,b?b.stack:null)}}};
353
+ _.C=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.f=this.a=!1}preventDefault(){this.cancelable&&(this.defaultPrevented=!0)}stopImmediatePropagation(){this.f=!0}stopPropagation(){}};
354
+ It=class{constructor(a){this.a=new _.Gt;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].Sa(a),b[c].fi&&this.a.remove(a.type,b[c]),!a||!a.f);c++);}on(a,b,c){this.a.push(a,new Ht(a,b,c||this.f));return b}one(a,b,c){this.a.push(a,new Ht(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].Bc===b&&(d=this.a.remove(a,c[e])||d);return d}clear(){this.a.clear()}};var Jt;_.Kt=class{constructor(){this.a=new _.Gt}release(){_.Hh(this)}on(a,b,c,d=!1){a=new Jt(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||(Gh(f),this.a.remove(b,f))}}};Jt=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 Lt=class{constructor(a){this.m=a;this.l=a.getConfiguration().streaming.addMissingTimelineCues||!1;this.j=new _.Kt;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 _.w(function*(){a.release()})}getTimelineCues(){return Array.from(this.a.values()).sort((a,b)=>a.startTime-b.startTime)}};_.St=class{constructor(a,b,c,d){d=void 0===d?_.Mt:d;this.startTime=a;this.endTime=b;this.payload=c;this.payloadType=d;this.positionAlign=this.position=null;this.size=100;this.textAlign=_.Nt;this.writingMode=_.Ot;this.lineInterpretation=_.Pt;this.line=null;this.lineAlign=_.Qt;this.direction=Rt;this.region=null;this.cssClassList=[];this.id=this.backgroundImage="";this.containerRows=null}Hc(a){return this.payload===a.payload&&this.startTime===a.startTime&&this.endTime===a.endTime&&this.payloadType===
355
+ a.payloadType}};_.x("clpp.text.Cue",_.St);_.St.positionAlign={LEFT:_.ke,RIGHT:_.le,CENTER:_.Vc,AUTO:"auto"};_.Mt=_.Vf;_.St.payloadType={TEXT:_.Mt,VTT_XML:_.Bg,TTML_XML:_.fg};_.Nt=_.Vc;_.Tt={LEFT:_.he,RIGHT:_.zf,CENTER:_.Nt,START:_.Mf,END:_.Sd};_.St.textAlign=_.Tt;var Rt="ltr";_.St.direction={HORIZONTAL_LEFT_TO_RIGHT:Rt,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};_.Ot="horizontal-tb";_.St.writingMode={HORIZONTAL_TOP_TO_BOTTOM:_.Ot,VERTICAL_LEFT_TO_RIGHT:_.qg,VERTICAL_RIGHT_TO_LEFT:_.rg};_.Pt=0;
356
+ _.St.lineInterpretation={LINE_NUMBER:_.Pt,PERCENTAGE:1};_.Qt=_.Mf;_.Ut={CENTER:_.Vc,START:_.Qt,END:_.Sd};_.St.lineAlign=_.Ut;_.Xt=class{constructor(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=_.Vt;this.scroll=Wt;this.cssClassList=[];this.writingMode=this.displayAlign=null}};_.x("clpp.text.CueRegion",_.Xt);_.Vt=1;_.Xt.units={PX:0,PERCENTAGE:_.Vt,LINES:2};var Wt="";
357
+ _.Xt.scrollMode={NONE:Wt,UP:"up"};_.Xt.displayAlign={BEFORE:"flex-end",CENTER:_.Vc,AFTER:"flex-start"};_.Xt.writingMode={HORIZONTAL_TOP_TO_BOTTOM:_.od,VERTICAL_LEFT_TO_RIGHT:"row-reverse",VERTICAL_RIGHT_TO_LEFT:"row"};var Yt=class{constructor(a){this.m=a;this.l=a.getTextDisplayer();this.f=this.h=null;this.a=new _.Kt;this.j=!1;this.g=new _.S("clpp.native.CueHandler")}destroy(){this.a.release();this.j=!1;this.l=this.a=this.h=this.f=null;return Promise.resolve()}start(a){this.j?this.g.warn("Already started. Ignoring request..."):(this.j=!0,this.h=a,this.f=this.h.textTracks,this.a.on(this.f,_.oc,b=>ji(this,b)),this.a.on(this.f,Xc,()=>{{const b=this.f;for(let c=0;c<b.length;c++){const d=b[c];d.mode===_.Gf&&(d.mode=
358
+ _.be)}}}))}o(a){const b=new _.St(a.startTime,a.endTime,a.text,_.Bg);if(_.gh(a.vertical))switch(a.vertical){case "lr":b.writingMode=_.qg;break;case "rl":b.writingMode=_.rg}_.hh(a.size)&&(b.size=a.size);if(_.gh(a.align))switch(a.align){case _.he:case _.Mf:b.textAlign=_.Mf;break;case _.Vc:b.textAlign=_.Nt;break;case _.zf:case _.Sd:b.textAlign=_.Sd}_.hh(a.position)&&(b.position=a.position);if(_.gh(a.positionAlign))switch(a.positionAlign){case _.ke:b.positionAlign=_.ke;break;case _.Vc:b.positionAlign=
359
+ _.Vc;break;case _.le:b.positionAlign=_.le}_.hh(a.line)&&(b.line=a.line);if(_.gh(a.lineAlign))switch(a.lineAlign){case _.Mf:b.lineAlign=_.Qt;break;case _.Vc:b.lineAlign=_.Vc;break;case _.Sd:b.lineAlign=_.Sd}typeof a.snapToLines===_.Mc&&(b.lineInterpretation=a.snapToLines?_.Pt:1);return b}};_.I=class extends Error{constructor(a,b,c,d,e){super(ki(a,b,c,d));this.severity=a;this.category=b;this.code=c;this.data=!d||_.gh(d)?{}:d;this.cause=void 0===e?null:e;this.f=!1;Error.captureStackTrace&&Error.captureStackTrace(this,_.I)}a(a){this.severity!==a&&(this.severity=a,this.message=ki(this.severity,this.category,this.code,this.data))}toString(){let a=this.message;this.cause&&(a+=`\n Caused by ${this.cause}`);return a}};_.x("clpp.Error",_.I);_.F=2;_.I.Severity={RECOVERABLE:1,FATAL:_.F};
360
360
  _.I.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,PLUGIN:9,ADS:10};
361
- _.I.Code={UNSUPPORTED_SCHEME:1E3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,UNKNOWN_DATA_URI_ENCODING:1005,REQUEST_MODIFIER_ERROR:1006,RESPONSE_MODIFIER_ERROR:1007,MALFORMED_TEST_URI:1008,UNEXPECTED_TEST_REQUEST:1009,ATTEMPTS_EXHAUSTED:1010,INVALID_TEXT_HEADER:2E3,INVALID_TEXT_CUE:2001,UNABLE_TO_DETECT_ENCODING:2003,BAD_ENCODING:2004,INVALID_XML:2005,INVALID_MP4_TTML:2007,INVALID_MP4_VTT:2008,UNABLE_TO_EXTRACT_CUE_START_TIME:2009,FETCH_OR_APPEND_ERROR:2010,INVALID_MP4:2011,
362
- 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,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,
363
- MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,TRANSMUXING_FAILED:3018,MP4_PARSER_ERROR:3019,MEDIA_LOAD_ERROR:3100,INVALID_TRACK_TYPE:3101,UNKNOWN_TRACK:3102,MEDIA_DECRYPTION_ERROR:3103,PLAY_NOT_ALLOWED:3200,PAUSE_FAILED:3201,UNABLE_TO_GUESS_MANIFEST_TYPE:4E3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,DASH_EMPTY_ADAPTATION_SET:4003,DASH_EMPTY_PERIOD:4004,DASH_WEBM_MISSING_INIT:4005,DASH_UNSUPPORTED_CONTAINER:4006,DASH_PSSH_BAD_ENCODING:4007,
364
- DASH_NO_COMMON_KEY_SYSTEM:4008,DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED:4009,DASH_CONFLICTING_KEY_IDS:4010,UNPLAYABLE_PERIOD:4011,RESTRICTIONS_CANNOT_BE_MET:4012,NO_PERIODS:4014,HLS_PLAYLIST_HEADER_MISSING:4015,INVALID_HLS_TAG:4016,HLS_INVALID_PLAYLIST_HIERARCHY:4017,DASH_DUPLICATE_REPRESENTATION_ID:4018,HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND:4020,HLS_COULD_NOT_GUESS_MIME_TYPE:4021,HLS_REQUIRED_ATTRIBUTE_MISSING:4023,HLS_REQUIRED_TAG_MISSING:4024,HLS_COULD_NOT_GUESS_CODECS:4025,HLS_KEYFORMATS_NOT_SUPPORTED:4026,
365
- DASH_UNSUPPORTED_XLINK_ACTUATE:4027,DASH_XLINK_DEPTH_LIMIT:4028,HLS_COULD_NOT_PARSE_SEGMENT_START_TIME:4030,CONTENT_UNSUPPORTED_BY_BROWSER:4032,SMOOTH_INVALID_MANIFEST_XML:4033,SMOOTH_EMPTY_PRESENTATION:4034,SMOOTH_MEDIA_PROCESSING_ERROR:4035,SMOOTH_INVALID_VERSION:4036,SMOOTH_INVALID_FRAGMENT_METADATA:4037,SMOOTH_REQUIRED_ATTRIBUTE_MISSING:4038,SMOOTH_TRUNCATED_MEDIA_FILE:4039,CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM:4040,HLS_MSE_ENCRYPTED_TS_NOT_SUPPORTED:4041,HLS_PLAYLIST_NOT_UTF8:4042,HLS_PLAYLIST_EMPTY:4043,
366
- HLS_INVALID_VALUE:4044,HLS_DISCONTINUITY_NOT_SUPPORTED:4045,HLS_UNSUPPORTED_FEATURE:4046,HLS_INCOMPATIBLE_PLAYLIST_UPDATE:4047,INVALID_STREAMS_CHOSEN:5005,STREAMING_ERROR:5006,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,
367
- 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,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,NO_VIDEO_ELEMENT:7002,CANNOT_LOAD_SOURCE:7003,MEDIA_ELEMENT_NOT_FOUND:7004,INVALID_MEDIA_ELEMENT:7005,
368
- 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,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,
369
- 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,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,
370
- SESSIONS_INVALID_CONFIGURATION:15E3};_.li=class extends Error{constructor(a,b){super(a);this.code=b}};var ti=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;_.Ng=_.oi.prototype;_.Ng.xb="";_.Ng.Dc="";_.Ng.Ya="";_.Ng.Yc=null;_.Ng.Ga="";_.Ng.tc="";_.Ng.toString=function(){var a=[],b=this.xb;b&&a.push(wi(b,fu,!0),":");if(b=this.Ya){a.push("//");var c=this.Dc;c&&a.push(wi(c,fu,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Yc;null!=b&&a.push(":",String(b))}if(b=this.Ga)this.Ya&&"/"!=b.charAt(0)&&a.push("/"),a.push(wi(b,"/"==b.charAt(0)?gu:hu,!0));(b=this.a.toString())&&a.push("?",b);(b=this.tc)&&a.push("#",wi(b,iu));return a.join("")};
371
- _.Ng.resolve=function(a){var b=new _.oi(this);"data"===b.xb&&(b=new _.oi);var c=!!a.xb;c?pi(b,a.xb):c=!!a.Dc;c?b.Dc=a.Dc:c=!!a.Ya;c?b.Ya=a.Ya:c=null!=a.Yc;var d=a.Ga;if(c)qi(b,a.Yc);else if(c=!!a.Ga){if("/"!=d.charAt(0))if(this.Ya&&!this.Ga)d="/"+d;else{var e=b.Ga.lastIndexOf("/");-1!=e&&(d=b.Ga.substr(0,e+1)+d)}if(".."==d||"."==d)d="";else if(-1!=d.indexOf("./")||-1!=d.indexOf("/.")){e=0==d.lastIndexOf("/",0);d=d.split("/");for(var f=[],g=0;g<d.length;){var h=d[g++];"."==h?e&&g==d.length&&f.push(""):
372
- ".."==h?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),e&&g==d.length&&f.push("")):(f.push(h),e=!0)}d=f.join("/")}}c?b.Ga=d:c=""!==a.a.toString();c?_.ri(b,si(a.a)):c=!!a.tc;c&&(b.tc=a.tc);return b};var fu=/[#\/\?@]/g,hu=/[#\?:]/g,gu=/[#\?]/g,xi=/[#\?@]/g,iu=/#/g;_.vi.prototype.a=null;_.vi.prototype.h=null;
373
- _.vi.prototype.add=function(a,b){if(!this.a&&(this.a={},this.h=0,this.f))for(var c=this.f.split("\x26"),d=0;d<c.length;d++){var e=c[d].indexOf("\x3d"),f=null;if(0<=e){var g=c[d].substring(0,e);f=c[d].substring(e+1)}else g=c[d];g=decodeURIComponent(g.replace(/\+/g," "));f=f||"";this.add(g,decodeURIComponent(f.replace(/\+/g," ")))}this.f=null;(c=this.a.hasOwnProperty(a)&&this.a[a])||(this.a[a]=c=[]);c.push(b);null!==this.h&&this.h++;return this};
374
- _.vi.prototype.toString=function(){if(this.f)return this.f;if(!this.a)return"";var a=[],b;for(b in this.a)for(var c=encodeURIComponent(b),d=this.a[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="\x3d"+encodeURIComponent(d[e]));a.push(f)}return this.f=a.join("\x26")};var zi;_.H="text";_.ju=1/15;zi={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/]};zi[_.H]=[/^vtt$/,/^wvtt/,/^stpp/];var ku;ku={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av0?1/],text:[/^vtt$/,/^wvtt/,/^stpp/]};_.dk=(a,b)=>{const c=ku[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===_.H?"":null};_.lu={text:{mp4:vc,m4s:vc,m4i:vc,cmft:vc,vtt:_.Uf,ttml:_.yc},video:{mp4:_.rg,m4s:_.rg,m4f:_.rg,m4i:_.rg,m4v:_.rg,cmfv:_.rg,ts:_.qg},audio:{mp4:_.Gc,m4s:_.Gc,m4f:_.Gc,m4i:_.Gc,m4a:_.Gc,cmfa:_.Gc,ts:_.qg,aac:_.Bc,ec3:_.Fc,ac3:_.Ec},image:{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}};_.gk=(a,b,c)=>a.map(d=>{d=_.mu(d)||"";return d=(d=_.lu[b][d])?d:b===_.H?c&&"vtt"!==c?vc:_.Uf:null}).filter(Boolean)[0]||null;
375
- _.mu=a=>{a=(new _.oi(a)).Ga.split(".");return 1>=a.length?null:a.pop()};_.lj=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)}};
376
- _.kj=class{constructor(a,b){this.name=a;this.value=b}};var Ci=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",
377
- "cs"],["dan","da"],["deu","de"],[_.Cd,"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",
361
+ _.I.Code={UNSUPPORTED_SCHEME:1E3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,UNKNOWN_DATA_URI_ENCODING:1005,REQUEST_MODIFIER_ERROR:1006,RESPONSE_MODIFIER_ERROR:1007,MALFORMED_TEST_URI:1008,UNEXPECTED_TEST_REQUEST:1009,ATTEMPTS_EXHAUSTED:1010,MALFORMED_URL:1011,INVALID_TEXT_HEADER:2E3,INVALID_TEXT_CUE:2001,UNABLE_TO_DETECT_ENCODING:2003,BAD_ENCODING:2004,INVALID_XML:2005,INVALID_MP4_TTML:2007,INVALID_MP4_VTT:2008,UNABLE_TO_EXTRACT_CUE_START_TIME:2009,FETCH_OR_APPEND_ERROR:2010,
362
+ 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,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,
363
+ 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,MP4_PARSER_ERROR:3019,MEDIA_LOAD_ERROR:3100,INVALID_TRACK_TYPE:3101,UNKNOWN_TRACK:3102,MEDIA_DECRYPTION_ERROR:3103,PLAY_NOT_ALLOWED:3200,PAUSE_FAILED:3201,UNABLE_TO_GUESS_MANIFEST_TYPE:4E3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,DASH_EMPTY_ADAPTATION_SET:4003,DASH_EMPTY_PERIOD:4004,DASH_WEBM_MISSING_INIT:4005,DASH_UNSUPPORTED_CONTAINER:4006,
364
+ DASH_PSSH_BAD_ENCODING:4007,DASH_NO_COMMON_KEY_SYSTEM:4008,DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED:4009,DASH_CONFLICTING_KEY_IDS:4010,UNPLAYABLE_PERIOD:4011,RESTRICTIONS_CANNOT_BE_MET:4012,NO_PERIODS:4014,HLS_PLAYLIST_HEADER_MISSING:4015,INVALID_HLS_TAG:4016,HLS_INVALID_PLAYLIST_HIERARCHY:4017,DASH_DUPLICATE_REPRESENTATION_ID:4018,HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND:4020,HLS_COULD_NOT_GUESS_MIME_TYPE:4021,HLS_REQUIRED_ATTRIBUTE_MISSING:4023,HLS_REQUIRED_TAG_MISSING:4024,HLS_COULD_NOT_GUESS_CODECS:4025,
365
+ HLS_KEYFORMATS_NOT_SUPPORTED:4026,DASH_UNSUPPORTED_XLINK_ACTUATE:4027,DASH_XLINK_DEPTH_LIMIT:4028,HLS_COULD_NOT_PARSE_SEGMENT_START_TIME:4030,CONTENT_UNSUPPORTED_BY_BROWSER:4032,SMOOTH_INVALID_MANIFEST_XML:4033,SMOOTH_EMPTY_PRESENTATION:4034,SMOOTH_MEDIA_PROCESSING_ERROR:4035,SMOOTH_INVALID_VERSION:4036,SMOOTH_INVALID_FRAGMENT_METADATA:4037,SMOOTH_REQUIRED_ATTRIBUTE_MISSING:4038,SMOOTH_TRUNCATED_MEDIA_FILE:4039,CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM:4040,HLS_MSE_ENCRYPTED_TS_NOT_SUPPORTED:4041,HLS_PLAYLIST_NOT_UTF8:4042,
366
+ HLS_PLAYLIST_EMPTY:4043,HLS_INVALID_VALUE:4044,HLS_DISCONTINUITY_NOT_SUPPORTED:4045,HLS_UNSUPPORTED_FEATURE:4046,HLS_INCOMPATIBLE_PLAYLIST_UPDATE:4047,HLS_DISJOINT_PLAYLISTS:4048,INVALID_STREAMS_CHOSEN:5005,STREAMING_ERROR:5006,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,
367
+ 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,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,NO_VIDEO_ELEMENT:7002,CANNOT_LOAD_SOURCE:7003,
368
+ 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,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,
369
+ 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,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,
370
+ CONTENT_TRANSFORMATION_FAILED:14E3,SESSIONS_INVALID_CONFIGURATION:15E3};_.ni=class extends Error{constructor(a,b){super(a);this.code=b}};var Zt=class{};_.x("clpp.utils.BufferUtils",Zt);Zt.toArrayBuffer=zi;Zt.toDataView=_.yi;Zt.toInt32Array=_.xi;Zt.toUint32Array=wi;Zt.toUint16Array=vi;Zt.toUint8Array=_.G;Zt.equal=ti;var Ci=new _.S("clpp.utils.strings");_.x("clpp.utils.strings.fromUtf8",_.Bi);_.x("clpp.utils.strings.fromBytesAutoDetect",_.Ei);_.x("clpp.utils.strings.toUtf8",_.Fi);_.x("clpp.utils.strings.toUtf16",_.Gi);_.x("clpp.utils.strings.toByteArray",_.Hi);_.x("clpp.utils.strings.startsWith",_.Ii);_.x("clpp.utils.strings.endsWith",_.Ji);_.x("clpp.utils.strings.bitrateToString",_.Mi);
371
+ _.x("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)))});
372
+ _.x("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 Ni=document.createElement("span");var $t;_.Ui=class{constructor(a,b){{var c=[a];let f=Pi(...c);if(!f||f.protocol.includes("."))c=b?[a,b]:[a,location.href],c=(f=Pi(...c))?c:null}if(!c)throw new _.I(_.F,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($t,""):a}};$t=/^[A-Za-z]+:/;_.Lm=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;
373
+ _.Ii(this.path,"/")||(this.path="/"+this.path);this.f=b.search;this.h=b.hash}};_.x("clpp.utils.url.queryString",_.Ri);var Wi;_.H=_.Vf;_.au=1/15;Wi={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/]};Wi[_.H]=[/^vtt$/,/^wvtt/,/^stpp/];var bu;bu={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av0?1/],text:[/^vtt$/,/^wvtt/,/^stpp/]};_.jl=(a,b)=>{const c=bu[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===_.H?"":null};_.cu={text:{mp4:_.vc,m4s:_.vc,m4i:_.vc,cmft:_.vc,vtt:_.Wf,ttml:_.yc},video:{mp4:_.tg,m4s:_.tg,m4f:_.tg,m4i:_.tg,m4v:_.tg,cmfv:_.tg,ts:_.sg},audio:{mp4:_.Gc,m4s:_.Gc,m4f:_.Gc,m4i:_.Gc,m4a:_.Gc,cmfa:_.Gc,ts:_.sg,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"}};_.ml=(a,b,c)=>a.map(d=>{d=_.Vi(d)||"";return d=(d=_.cu[b][d])?d:b===_.H?c&&"vtt"!==c?_.vc:_.Wf:null}).filter(Boolean)[0]||null;_.fj=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)}};
374
+ _.ej=class{constructor(a,b){this.name=a;this.value=b}};var Zi=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",
375
+ "cs"],["dan","da"],["deu","de"],[_.Dd,"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",
378
376
  "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",
379
377
  "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",
380
378
  "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",
381
- "vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);_.nu=new _.T("clpp.hls.Utils");_.jj=class{constructor(a){this.f=a;this.a=0}};var ou=class{};_.z("clpp.utils.BufferUtils",ou);ou.toArrayBuffer=Qi;ou.toDataView=_.Pi;ou.toInt32Array=_.Oi;ou.toUint32Array=Ni;ou.toUint16Array=Mi;ou.toUint8Array=_.K;ou.equal=Ki;var Ti=new _.T("clpp.utils.strings");_.z("clpp.utils.strings.fromUtf8",_.Si);_.z("clpp.utils.strings.fromBytesAutoDetect",_.Vi);_.z("clpp.utils.strings.toUtf8",_.Wi);_.z("clpp.utils.strings.toUtf16",_.Xi);_.z("clpp.utils.strings.toByteArray",_.Yi);_.z("clpp.utils.strings.startsWith",_.Zi);_.z("clpp.utils.strings.endsWith",_.$i);_.z("clpp.utils.strings.bitrateToString",_.cj);
382
- _.z("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)))});
383
- _.z("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 dj=document.createElement("span");_.rm=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;
384
- _.Zi(this.path,"/")||(this.path="/"+this.path);this.f=b.search;this.h=b.hash}};_.z("clpp.utils.url.queryString",_.gj);var nj=[403,401];_.z("clpp.net.DEFAULT_FATAL_STATUS_CODES",nj);_.z("clpp.net.makeRequest",_.sj);_.rj=6;_.z("clpp.net.RequestType",{MANIFEST:1,SEGMENT:2,LICENSE:3,APP:4,TIMING:5,OTHER:_.rj,CONTENT_STEERING:7});_.Ij=class{constructor(){this.zg=this.oe=this.done=!1;this.error=this.value=null;let a,b;const c=new Promise((d,e)=>{a=function(f){this.done=this.oe=!0;this.value=f;d(f)};b=function(f){this.done=this.zg=!0;this.error=f;e(f)}});c.oe=!1;c.done=!1;c.zg=!1;c.value=null;c.error=null;c.resolve=a;c.reject=b;return c}resolve(){}reject(){}};_.jp=class{constructor(a,b){this.T=a;this.A=b;this.a=!1}abort(){this.a=!0;return this.A()}};_.pu=class{constructor(){this.a=[]}destroy(){const a=[];for(const b of this.a)b.T.catch(()=>{}),a.push(b.abort());this.a=[];return Promise.all(a)}};_.Dr=class{constructor(){this.h=[];this.f=[];this.j=[];this.l=[];this.A=!1;this.w=new _.pu;this.a={};this.headers=new Map;this.o=0;this.a.data=At;!window.fetch||!window.AbortController||_.Ak(6)||_.Dk()&&68<_.Yk().browserVersion.major?(this.a.http=it,this.a.https=it):(this.a.http=vt,this.a.https=vt)}Ci(a){0<a?_.C("Rate limit set to "+a+"bps"):_.C("Rate limit disabled");this.o=a}release(){return this.w.destroy()}destroy(){this.A=!0;this.h=[];this.f=[];this.j=[];return this.w.destroy()}ue(a){this.h.push(a)}Gc(a){this.j.push(a)}af(a){this.h=
385
- this.h.filter(b=>b!==a)}Cd(a){this.j=this.j.filter(b=>b!==a)}fetch(a){return Kj(this,a)}};_.z("clpp.net.NetworkEngine",_.Dr);_.Dr.prototype.fetch=_.Dr.prototype.fetch;_.Dr.prototype.removeResponseModifier=_.Dr.prototype.Cd;_.Dr.prototype.removeRequestModifier=_.Dr.prototype.af;_.Dr.prototype.addResponseModifier=_.Dr.prototype.Gc;_.Dr.prototype.addRequestModifier=_.Dr.prototype.ue;_.Dr.prototype.setRateLimit=_.Dr.prototype.Ci;var Oj;
386
- _.Rj=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=[]}Oc(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&&ei(this.roles,
387
- a.roles)&&ei(this.accessibility,a.accessibility,Mj)}toString(){return`Track type: ${this.type} id: ${this.id}
388
- renditions size: ${this.renditions.length}`}};_.z("clpp.Track",_.Rj);_.Rj.prototype.toString=_.Rj.prototype.toString;_.Vj=class{constructor(a,b){this.track=b;this.id=a;this.originalId=this.codec=this.$c=this.bandwidth=this.height=this.width=null;this.a=!1}};_.z("clpp.Rendition",_.Vj);_.Qj=1;_.N=_.w;_.M=_.p;_.L="text";Oj=_.ue;_.qu={VIDEO:_.N,AUDIO:_.M,TEXT:_.L,METADATA:Oj};_.Rj.Type=_.qu;var ru=class{constructor(a){this.f=a;this.g=new _.T("clpp.native.hls.HlsMetadataParser");this.a=ji(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 _.x(function*(){let d=null;try{d=yield Tj(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 Xj(c,d,
389
- 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 Zj(d);e.Bc=f}catch(f){c.g.warn("Failed to parse metadata from HLS playlist.",f.message)}return e})}};_.hk=[];_.U=class{ze(){return!0}uh(a){return this.getVideoTracks().find(b=>_.gh(b,a,a&&Object.keys(a)))}qh(a){return this.getAudioTracks().find(b=>_.gh(b,a,a&&Object.keys(a)))}sh(a){return this.pa().find(b=>_.gh(b,a,a&&Object.keys(a)))}th(a){return this.getVideoTracks().flatMap(b=>b.renditions).find(b=>_.gh(b,a,a&&Object.keys(a)))}ph(a){return this.getAudioTracks().flatMap(b=>b.renditions).find(b=>_.gh(b,a,a&&Object.keys(a)))}rh(a){return this.pa().flatMap(b=>b.renditions).find(b=>_.gh(b,a,a&&Object.keys(a)))}};
390
- _.z("clpp.TrackManager",_.U);_.U.prototype.isAbrEnabled=_.U.prototype.va;_.U.prototype.addTextTrack=_.U.prototype.addTextTrack;_.U.prototype.findTextRendition=_.U.prototype.rh;_.U.prototype.findAudioRendition=_.U.prototype.ph;_.U.prototype.findVideoRendition=_.U.prototype.th;_.U.prototype.findTextTrack=_.U.prototype.sh;_.U.prototype.findAudioTrack=_.U.prototype.qh;_.U.prototype.findVideoTrack=_.U.prototype.uh;_.U.prototype.setTextRendition=_.U.prototype.zb;_.U.prototype.setAudioRendition=_.U.prototype.yb;
391
- _.U.prototype.setVideoRendition=_.U.prototype.jb;_.U.prototype.setTextTrack=_.U.prototype.Ua;_.U.prototype.setAudioTrack=_.U.prototype.ya;_.U.prototype.setVideoTrack=_.U.prototype.Ab;_.U.prototype.getTextTrack=_.U.prototype.ta;_.U.prototype.getAudioTrack=_.U.prototype.oa;_.U.prototype.getVideoTrack=_.U.prototype.Fa;_.U.prototype.getLoadingTextRendition=_.U.prototype.Gb;_.U.prototype.getLoadingAudioRendition=_.U.prototype.Fb;_.U.prototype.getLoadingVideoRendition=_.U.prototype.rb;
392
- _.U.prototype.getTextRendition=_.U.prototype.Sa;_.U.prototype.getAudioRendition=_.U.prototype.Oa;_.U.prototype.getVideoRendition=_.U.prototype.qa;_.U.prototype.getTextTracks=_.U.prototype.pa;_.U.prototype.getAudioTracks=_.U.prototype.getAudioTracks;_.U.prototype.getVideoTracks=_.U.prototype.getVideoTracks;_.U.prototype.canSelectVideoTracks=_.U.prototype.ze;var lk=new Map,kk=1,pk=2,ok=3,nk=4;_.su=(new Map).set(_.md,_.md).set("frameRate","framerate").set("bandwidth","bitrate").set(_.Hg,_.Hg).set(_.Zd,_.Zd).set("channelsCount","channels");var tu=class{};_.z(ld,tu);tu.getInfo=_.Yk;
393
- var vk=null,uk=null,Nk=new _.T(ld),Rk="android",Qk="ios",Wk="linux",Sk="osx",Tk="windows",Uk="tizen",Vk="webos",Pk=_.gg,Xk=_.gg,Ik={windows:{os_version:/windows\s+?nt\s([\d.]+)/i,ie:/windows\s+?nt.+?trident\/[\d.]+.*rv:([\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,
379
+ "vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);_.du=new _.S("clpp.hls.Utils");_.dj=class{constructor(a){this.f=a;this.a=0}};var hj=[403,401];_.x("clpp.net.DEFAULT_FATAL_STATUS_CODES",hj);_.x("clpp.net.makeRequest",_.mj);_.lj=6;_.x("clpp.net.RequestType",{MANIFEST:1,SEGMENT:2,LICENSE:3,APP:4,TIMING:5,OTHER:_.lj,CONTENT_STEERING:7});_.xk=class{constructor(){this.qg=this.fe=this.done=!1;this.error=this.value=null;let a,b;const c=new Promise((d,e)=>{a=function(f){this.done=this.fe=!0;this.value=f;d(f)};b=function(f){this.done=this.qg=!0;this.error=f;e(f)}});c.fe=!1;c.done=!1;c.qg=!1;c.value=null;c.error=null;c.resolve=a;c.reject=b;return c}resolve(){}reject(){}};_.Dp=class{constructor(a,b){this.U=a;this.A=b;this.a=!1}abort(){this.a=!0;return this.A()}};_.eu=class{constructor(){this.a=[]}destroy(){const a=[];for(const b of this.a)b.U.catch(()=>{}),a.push(b.abort());this.a=[];return Promise.all(a)}};var yj=class{constructor(){this.a=wj()}};var vk=class{constructor(a){this.a=new Uint8Array(a||65536);this.f=0;this.h=new yj}};var fu=class{constructor(a,b){b=void 0===b?2:b;this.a=new Uint8Array(a);this.h=b;this.f=0}};var uk=class{constructor(a,b){a=void 0===a?1E6:a;b=void 0===b?!0:b;this.j=new fu(a);this.length=a;this.A=b;this.f=this.a=this.h=0;this.l=null;this.o=-1;this.w=new yj}};var gu=class{};_.x(md,gu);gu.getInfo=_.ok;
380
+ var Lj=null,Kj=null,dk=new _.S(md),hk="android",gk="ios",mk="linux",ik="osx",jk="windows",kk="tizen",lk="webos",fk=_.ig,nk=_.ig,Yj={windows:{os_version:/windows\s+?nt\s([\d.]+)/i,ie:/windows\s+?nt.+?trident\/[\d.]+.*rv:([\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,
394
381
  chrome:/macintosh.+?chrome\/([\d._]+)/i,firefox:/macintosh.+?firefox\/([\d._]+)/i,opera:/macintosh.+?opr\/([\d._]+)/i},unknown:{ie:/.+?trident\/([\d.]+)/i,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,
395
382
  chrome:/.+?CriOS\/([\d._]+)/i,firefox:/.+?FxiOS\/([\d._]+)/i,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},
396
- webos:{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}};var V=class extends _.U{constructor(){super();this.g=new _.T("clpp.native.TrackManager");this.m=null;this.f=new _.Rt;this.h=[];this.G=0;this.o={};this.I=[];this.a=new Map;this.w=null;this.l=new Map;this.A=!0;this.M=this.B.bind(this,_.L);this.R=this.F.bind(this,_.L);this.P=this.C.bind(this,_.L);this.S=this.B.bind(this,_.N);this.X=this.F.bind(this,_.N);this.V=this.C.bind(this,_.N);this.J=this.B.bind(this,_.M);this.L=this.F.bind(this,_.M);this.K=this.C.bind(this,_.M);this.j=null}ze(){return!_.Kk()}B(a,
397
- b){const c=this;return _.x(function*(){if(b){var d=b.track;if(d){var e=a===_.N,f=a===_.L,g=a===_.M||e,h=b.target,k=c.h.find(n=>Zk(n,d,a));if(k)c.g.warn("Track from event already exists",d,k);else{var l=Sj(a,d),m=$k(d);if(f){if(d.kind===_.ue)return;let n;void 0!==d.id?n=c.o[d.id]:n=Object.values(c.o).find(q=>Zk(l,q,a));l.kind&&"captions"===l.kind&&(l.mimeType=_.tc);n&&(l.src=n.url,l.mimeType=n.mimeType)}else if(k=c.h.find(n=>n.type===a&&_.gh(n,l,["kind","label","language"]))){k.id=d.id;m&&(c.g.debug(`Setting native ${a} track active`),
398
- c.a.set(a,k));c.g.debug("Track from event seems to already exists, flipped native track to",d);return}try{l.renditions.push(new _.Vj(l.id,l));c.h.push(l);const n=c.m.getConfiguration().safari;bl(c,a,n)?yield dl(c,l,n):el(c,a,n)&&(yield fl(c,l,n));c.g.debug(a+" Track added",l);c.m.trigger(new _.F(_.bg));const q=gl(c,a).length,u=!(!h||!h.length),v=h&&h.length||0;f=()=>{c.g.debug(`Setting native ${a} track active. `+`Native track active: ${m}. `+`Number of tracks: ${q}`,d);c.a.set(a,l)};m?f():1===q&&
399
- g&&(e?f():u&&1!==v||f())}catch(n){c.g.error("Error while converting track data",n)}}}else c.g.warn(Ya)}else c.g.warn(Va)})}F(a,b){if(b){var c=b.track;c?a===_.L&&c.kind!==_.ue&&(b=this.h.find(d=>Zk(d,c,a)))&&(this.h.splice(this.h.indexOf(b),1),(this.a.get(a)||null)===b&&(this.a.set(a,null),hl(this)),this.g.debug(a+" Track removed, id: ",b.id)):this.g.warn(Ya)}else this.g.warn(Va)}C(a,b){this.g.debug(a+" Track changed",b);a===_.L&&hl(this);const c=jl(this,a);if(c)for(let d=0;d<c.length;++d)if($k(c[d])){if(b=
400
- this.h.find(e=>Zk(e,c[d],a)))this.a.set(a,b),this.g.debug("Track change detected, id:",b.id),b===this.l.get(a)&&this.l.set(a,null),a===_.M?this.m.trigger(new _.F(_.Jc)):a===_.L&&this.m.trigger(new _.F(_.Wf));break}}initialize(a){this.m=a;this.j=new ru(a.getNetworkEngine())}load(){this.A=!1;var a=il(this,_.L);a&&(this.f.on(a,_.oc,this.M),this.f.on(a,vf,this.R),this.f.on(a,Xc,this.P));if(a=il(this,_.M))this.f.on(a,_.oc,this.J),this.f.on(a,vf,this.L),this.f.on(a,Xc,this.K);if(a=il(this,_.N))this.f.on(a,
401
- _.oc,this.S),this.f.on(a,vf,this.X),this.f.on(a,Xc,this.V);this.f.one(this.m,Qc,this.H.bind(this))}release(){this.A=!0;this.h=[];this.o={};this.a.clear();this.l.clear();this.f.release()}destroy(){this.release();this.m=null}getVideoTracks(){return gl(this,_.N)}getAudioTracks(){return gl(this,_.M)}pa(){return gl(this,_.L)}qa(){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]||
402
- null}Oa(){return kl(this,_.M)}Sa(){return kl(this,_.L)}rb(){return ll(this,_.N)}Fb(){return ll(this,_.M)}Gb(){return ll(this,_.L)}Fa(){return this.a.get(_.N)||null}oa(){return this.a.get(_.M)||null}ta(){return this.a.get(_.L)||null}Ab(a){ml(this,_.N,a)}ya(a){ml(this,_.M,a)}Ua(a){ml(this,_.L,a)}jb(a){ml(this,_.N,a&&a.track)}yb(a){ml(this,_.M,a&&a.track)}zb(a){ml(this,_.L,a&&a.track)}addTextTrack(a){const b=this;return _.x(function*(){if(a.mimeType.match(/text\/vtt/)){const c="External_"+`${b.G++}`;
403
- b.o[c]=a;nl(b,a,c)}else yield ol(b,a)})}va(){return 1>=this.getVideoTracks().flatMap(a=>a.renditions).length}H(){const a=this;return _.x(function*(){const b=a.m.getConfiguration();ql(a,_.M,b.preferredAudioLanguage);if(!jl(a,_.L).some(c=>$k(c))){const c=il(a,_.L);yield new Promise(d=>{a.f.one(c,Xc,d);(new _.wk(d)).la(1)})}a.A||ql(a,_.L,b.preferredTextLanguage)})}};V.prototype.isAbrEnabled=V.prototype.va;V.prototype.addTextTrack=V.prototype.addTextTrack;V.prototype.setTextRendition=V.prototype.zb;
404
- V.prototype.setAudioRendition=V.prototype.yb;V.prototype.setVideoRendition=V.prototype.jb;V.prototype.setTextTrack=V.prototype.Ua;V.prototype.setAudioTrack=V.prototype.ya;V.prototype.setVideoTrack=V.prototype.Ab;V.prototype.getTextTrack=V.prototype.ta;V.prototype.getAudioTrack=V.prototype.oa;V.prototype.getVideoTrack=V.prototype.Fa;V.prototype.getLoadingTextRendition=V.prototype.Gb;V.prototype.getLoadingAudioRendition=V.prototype.Fb;V.prototype.getLoadingVideoRendition=V.prototype.rb;
405
- V.prototype.getTextRendition=V.prototype.Sa;V.prototype.getAudioRendition=V.prototype.Oa;V.prototype.getVideoRendition=V.prototype.qa;V.prototype.getTextTracks=V.prototype.pa;V.prototype.getAudioTracks=V.prototype.getAudioTracks;V.prototype.getVideoTracks=V.prototype.getVideoTracks;V.prototype.canSelectVideoTracks=V.prototype.ze;_.uu=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);}Ob(){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)}Ma(){return!this.length||1===this.length&&1E-6>this.end(0)-this.start(0)?null:this.end(this.length-
406
- 1)}yc(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}Na(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.Ma(),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=
407
- "";for(let b=0;b<this.length;b++)0<b&&(a+=" "),a+=`${this.start(b).toFixed(3)}-${this.end(b).toFixed(3)}`;return a}};_.z("clpp.BufferInfo",_.uu);_.uu.prototype.bufferedAheadOf=_.uu.prototype.Na;_.uu.prototype.isBuffered=_.uu.prototype.yc;_.uu.prototype.bufferEnd=_.uu.prototype.Ma;_.uu.prototype.bufferStart=_.uu.prototype.Ob;_.uu.prototype.end=_.uu.prototype.end;_.uu.prototype.start=_.uu.prototype.start;_.vu=class{constructor(){this.gd=new Pt(this);this.ed=[]}addEventListener(a,b){this.on(a,b)}removeEventListener(a,b){this.off(a,b)}on(a,b,c){return this.gd.on(a,b,c)}one(a,b,c){return this.gd.one(a,b,c)}off(a,b){return this.gd.off(a,b)}forwardEventsTo(a){a&&(0<=this.ed.indexOf(a)||this.ed.push(a))}dispatchEvent(a){this.trigger(a);return a.defaultPrevented}stopForwardingEventsTo(a){a&&(a=this.ed.indexOf(a),0<=a&&this.ed.splice(a,1))}trigger(a){this.gd.trigger(a);for(const b of this.ed)b.dispatchEvent(a)}};
408
- _.vu.prototype.off=_.vu.prototype.off;_.vu.prototype.one=_.vu.prototype.one;_.vu.prototype.on=_.vu.prototype.on;_.vu.prototype.removeEventListener=_.vu.prototype.removeEventListener;_.vu.prototype.addEventListener=_.vu.prototype.addEventListener;var rl=["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"];_.z("clpp.version",_.ea);_.z("clpp.name",_.ra);var Cr=null;_.z("clpp.configure",a=>{Cr=a});_.pl="application/x-mpegurl";_.z("clpp.Type",{DASH:_.uc,HLS:_.pl,SMOOTH_STREAMING:_.zc,MP4:_.rg,MP3:"audio/mp3"});_.Rh="scte35";_.Sh="hls-daterange";_.z("clpp.TimelineCueType",{SCTE35:_.Rh,DASH_CALLBACK:_.Ce,HLS_DATERANGE:_.Sh,UNKNOWN:_.gg});_.z("clpp.SpeedUpMode",{DECODER:_.zd,SEEK:"seek"});_.z("clpp.CodecSwitchingStrategy",{PREVENT:_.nf,SMOOTH:_.Jf});var wu=class{};_.z("clpp.utils.PlayerConfiguration",wu);wu.create=_.yl;var xu=["abort",Pc,Qc,Od,"emptied",Qd,_.Sd,_.r,"interruptbegin","interruptend",_.me,_.ne,oe,"mozaudioavailable",_.Pe,_.Te,_.df,_.pf,_.rf,_.Df,_.Ef,Kf,"suspend",_.ag,"volumechange",_.Ag,_.Bg,_.xf,Gg,Fg,Dg,Eg];_.yu=class extends _.vu{constructor(a){super();this.log=new _.T(a);this.configuration=this.ia=_.wl();this.ga=this.C=null;this.vd=this.bf=!1;this.Bf=new _.T("clpp.video.events");this.kc=null;this.Yd=-1;this.Tg=this.Qg.bind(this);this.Ye=new _.Dr;this.L=new _.Rt;this.Xe=this.Ic=this.Nc=this.M=null}init(a,b){this.configuration=this.ia=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 xu)this.L.on(a,c,this.Tg,
409
- c!==_.r);this.kc||(this.kc=this.Kg());this.kc.initialize(this);this.C.showMediaElement()}release(){this.M&&(this.M.destroy(),this.M=null);return Promise.resolve()}destroy(){this.L.release();return this.Ye.release()}canPlay(a,b){return _.uh[this.namespace()].canPlay(a,b)}getTimeline(){return null}setupPlaylist(){return Promise.reject(_.$a)}appendLoad(){return Promise.reject(_.$a)}seekWith(){return Promise.reject(_.$a)}detach(){return Promise.resolve()}setSeekInterceptor(){}setPlaybackSessionId(){}getBandwidthEstimate(){return null}play(){if(!this.ga)return Promise.reject("No sources specified yet. You need to load content before calling play.");
410
- const a=this.C.getMedia().play();return Promise.resolve(a).catch(b=>{this.log.info("Caught play promise exception",b);const c={name:b.name||"",message:b.message||"",stack:b.stack||""};sl(c)?(this.trigger(new _.F(_.Kc)),this.log.warn(_.ja)):c.name===ab&&this.log.warn('Unrecognized "NotAllowedError" on play(). '+`${b.name}: ${b.message}`);throw b;})}pause(){return this.ga?new Promise((a,b)=>{const c=this.getState();if(c!==_.So&&c!==_.Oo&&c!==_.Zo&&c!==_.Yo)b(new _.I(_.G,7,3201,"The player state does not allow pause."));
411
- else if(this.C.getMedia().pause(),this.getState()===_.Zo)this.L.one(this,_.Mf,()=>{a()});else a()}):Promise.reject(new _.I(_.G,7,3201,"No sources specified yet. You need to load content before calling pause."))}isPaused(){return this.C.getMedia().paused}isEnded(){return this.C.getMedia().ended}getConfiguration(){return this.configuration}setDrmCustomDataModifier(a){this.Nc=a}setCdnErrorCallback(a){this.Ic=a}Qc(){return this.Nc}getSurface(){return this.C}getBufferInfo(a){const b=this.getSurface().getMedia();
412
- return new _.uu(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.getMediaPosition();if(void 0===a||null===a||typeof a!==_.t||a===b)return Promise.resolve();const c=this.C.getMedia();if(!c)return this.log.warn("No media element available, can not set current time!"),Promise.reject();const d=a-b;return.1>=Math.abs(d)?
413
- (this.log.info("Skip seek. Delta "+Math.abs(d)+" \x3c 0.1"),Promise.resolve()):new Promise((e,f)=>{const g=()=>{this.trigger(new _.F(_.lg));this.L.on(c,_.Df,h);this.L.on(c,_.ag,h);this.L.on(c,_.pf,h);this.log.info("Seeking to "+a+". Delta "+d);this.vd=this.bf=!0;c.currentTime=a},h=l=>{const m=this.getMediaPosition(),n=.1>=Math.abs(a-m);var q=.25<m-a;const u=c.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA,v=l.type===_.Df,y=l.type===_.pf,A=l.type===_.ag,D=y&&u;q=v||n&&D||A&&q;this.log.debug("Checking seeking state after "+
414
- l.type+" event. Seek completed:",q,"Current Time:",m,"Target Time:",a,"Native Event:",v,"Time reached",n,"Timeupdate:",A,"Progress:",y,"ReadyState:",u,"Progress Ready:",D);q?(this.vd=this.bf=!1,this.L.off(c,_.Df,h),this.L.off(c,_.ag,h),this.L.off(c,_.pf,h),this.Af(),this.trigger(new _.F(_.kg)),e()):y&&b===m&&(this.log.debug("Seek seemed to have been ignored. Trying again"),c.currentTime=a)},k=()=>{if(c.readyState>HTMLMediaElement.HAVE_NOTHING)g();else this.L.one(c,_.ne,g)};this.getState()===_.Wo?
415
- (this.log.debug("Player is in IDLE state. Postpone seek."),this.L.one(this,_.Mf,()=>{switch(this.getState()){case _.So:case _.Zo:case _.Yo:this.log.debug("Valid seek state reached.");k();break;default:this.log.warn("Invalid seek target state. Aborting seek"),f()}})):k()})}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?_.fh(a)?0>a||1<a?this.log.warn(`Can not set volume to ${a}.
416
- 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.ga?this.C.getMedia().duration:-1}getTrackManager(){return this.kc}getPlaybackRate(){const a=this.C.getMedia();return a&&a.playbackRate||
417
- 1}setPlaybackRate(a){const b=this.C.getMedia();void 0!==a&&b&&(b.playbackRate=a)}setSourceIndex(a){this.Yd=a}getSourceIndex(){return this.Yd}getLoadedSource(){return this.ga&&-1!==this.Yd?this.ga[this.Yd]:null}getPeriods(){return[]}getNetworkEngine(){return this.Ye}setNetworkEngine(a){this.Ye=a}setCmsdManager(a){this.Xe=a}getTextDisplayer(){return this.M}getTimelineCues(){return[]}getCueTimeline(){return null}resetAbr(){}Qg(a){var b=this.getSurface().getMedia();const c=this.getPosition();let d="Received Video Element Event: '"+
418
- a.type+"' with playhead at: "+c;if(a.type===_.ag||a.type===_.pf)this.Bf.debug(d);else{let e="";switch(a.type){case _.rf:e=`Rate: ${this.getPlaybackRate()}`;break;case Od:e=`Duration: ${this.getDuration()}`;break;case "volumechange":e=`Volume: ${this.getVolume()} Muted: ${this.isMuted()}`;break;case _.Te:case _.df:case "suspend":case _.Ag:case Kf:case _.Ef:case _.Df:case _.ag:case _.pf:case Pc:case Qc:b=this.getBufferInfo().Na(c);e=`State ${this.getSurface().getMedia().readyState} `+`Buffer: ${b}`;
419
- break;case _.xf:null!=b&&(e=`Size: ${b.videoWidth}x${b.videoHeight}`)}e&&(d+=". "+e);this.Bf.info(d)}a.type!==_.r&&this.trigger(new _.F(a.type,{detail:a}))}Af(){}};var Cl;Cl=new _.T("clpp.Components");_.Al=new Map;_.z("clpp.install",function(a){Kl(a)});_.z("clpp.uninstall",function(a){Ll(a)});var zu=class{};_.z("clpp.utils.Uint8ArrayUtils",zu);zu.toStandardBase64=_.Ml;zu.concat=_.Sl;zu.equal=_.Rl;zu.toHex=_.Ql;zu.fromHex=_.Pl;zu.fromBase64=_.Ol;zu.toBase64Url=_.Nl;var Au=class{constructor(){this.a=this.f=null;this.g=new _.T("clpp.drm.csl")}release(){this.a=this.f=null}};_.z("clpp.drm.WidevineRobustnessLevel",{SW_SECURE_CRYPTO:_.nb,SW_SECURE_DECODE:_.ob,HW_SECURE_CRYPTO:Ha,HW_SECURE_DECODE:Ia,HW_SECURE_ALL:Ga});_.z("clpp.drm.PlayreadyRobustnessLevel",{SL150:"150",SL2000:"2000",SL3000:"3000"});_.z("clpp.drm.KeySystem",{NONE:_.De,CLEAR_KEY:_.Ne,WIDEVINE:_.td,PLAYREADY:_.rd,FAIRPLAY:_.pd,PRIMETIME:_.od});_.Vl={};_.z("clpp.drm.registerDrmEnvironment",_.Wl);var Zl={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,
383
+ webos:{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}};var tk=window.fetch,qk=window.AbortController,pk=window.Headers;var wk=window.XMLHttpRequest;var hu=class{};_.x("clpp.utils.Uint8ArrayUtils",hu);hu.toStandardBase64=_.zk;hu.concat=_.Fk;hu.equal=_.Ek;hu.toHex=_.Dk;hu.fromHex=_.Ck;hu.fromBase64=_.Bk;hu.toBase64Url=_.Ak;var Nk=class extends _.Dp{constructor(a){super(new _.xk,()=>Promise.resolve());this.B=a;this.h=null;this.w=this.U;this.f=-1;this.j=this.l=this.o=null;Kk(this)}then(a,b){this.U=this.U.then(a,b);return this}catch(a){this.U=this.U.catch(a);return this}abort(){if(this.a)return Promise.resolve();this.a=!0;return this.h.then(a=>{this.o&&clearTimeout(this.o);this.l&&this.l();return a.abort()}).catch(()=>{})}};_.Xr=class{constructor(){this.h=[];this.f=[];this.j=[];this.l=[];this.A=!1;this.w=new _.eu;this.a={};this.headers=new Map;this.o=0;this.a.data=Hk;!window.fetch||!window.AbortController||_.Qj(6)||_.Tj()&&68<_.ok().browserVersion.major?(this.a.http=yk,this.a.https=yk):(this.a.http=sk,this.a.https=sk)}si(a){0<a?_.B("Rate limit set to "+a+"bps"):_.B("Rate limit disabled");this.o=a}release(){return this.w.destroy()}destroy(){this.A=!0;this.h=[];this.f=[];this.j=[];return this.w.destroy()}me(a){this.h.push(a)}Ac(a){this.j.push(a)}Se(a){this.h=
384
+ this.h.filter(b=>b!==a)}td(a){this.j=this.j.filter(b=>b!==a)}fetch(a){let b=void 0;1===a.type&&(b={objectType:iu});return _.Qk(this,a,b)}};_.x("clpp.net.NetworkEngine",_.Xr);_.Xr.prototype.fetch=_.Xr.prototype.fetch;_.Xr.prototype.removeResponseModifier=_.Xr.prototype.td;_.Xr.prototype.removeRequestModifier=_.Xr.prototype.Se;_.Xr.prototype.addResponseModifier=_.Xr.prototype.Ac;_.Xr.prototype.addRequestModifier=_.Xr.prototype.me;_.Xr.prototype.setRateLimit=_.Xr.prototype.si;var Uk;
385
+ _.Xk=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=[]}Hc(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&&gi(this.roles,
386
+ a.roles)&&gi(this.accessibility,a.accessibility,Sk)}toString(){return`Track type: ${this.type} id: ${this.id}
387
+ renditions size: ${this.renditions.length}`}};_.x("clpp.Track",_.Xk);_.Xk.prototype.toString=_.Xk.prototype.toString;_.al=class{constructor(a,b){this.track=b;this.id=a;this.originalId=this.codec=this.Sc=this.bandwidth=this.height=this.width=null;this.a=!1}};_.x("clpp.Rendition",_.al);_.Wk=1;_.M=_.t;_.L=_.q;_.K=_.Vf;Uk=_.ye;_.ju={VIDEO:_.M,AUDIO:_.L,TEXT:_.K,METADATA:Uk};_.Xk.Type=_.ju;var ku=class{constructor(a){this.f=a;this.g=new _.S("clpp.native.hls.HlsMetadataParser");this.a=li(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 _.w(function*(){let d=null;try{d=yield Zk(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 dl(c,d,
388
+ 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 fl(d);e.wc=f}catch(f){c.g.warn("Failed to parse metadata from HLS playlist.",f.message)}return e})}};var ol=new Map,nl=1,sl=2,rl=3,ql=4;_.lu=(new Map).set(_.nd,_.nd).set("frameRate","framerate").set("bandwidth","bitrate").set(_.Jg,_.Jg).set(_.ae,_.ae).set("channelsCount","channels");var iu="m";_.xl=[];_.T=class{re(){return!0}lh(a){return this.getVideoTracks().find(b=>_.ih(b,a,a&&Object.keys(a)))}hh(a){return this.getAudioTracks().find(b=>_.ih(b,a,a&&Object.keys(a)))}jh(a){return this.pa().find(b=>_.ih(b,a,a&&Object.keys(a)))}kh(a){return this.getVideoTracks().flatMap(b=>b.renditions).find(b=>_.ih(b,a,a&&Object.keys(a)))}gh(a){return this.getAudioTracks().flatMap(b=>b.renditions).find(b=>_.ih(b,a,a&&Object.keys(a)))}ih(a){return this.pa().flatMap(b=>b.renditions).find(b=>_.ih(b,a,a&&Object.keys(a)))}};
389
+ _.x("clpp.TrackManager",_.T);_.T.prototype.isAbrEnabled=_.T.prototype.ua;_.T.prototype.addTextTrack=_.T.prototype.addTextTrack;_.T.prototype.findTextRendition=_.T.prototype.ih;_.T.prototype.findAudioRendition=_.T.prototype.gh;_.T.prototype.findVideoRendition=_.T.prototype.kh;_.T.prototype.findTextTrack=_.T.prototype.jh;_.T.prototype.findAudioTrack=_.T.prototype.hh;_.T.prototype.findVideoTrack=_.T.prototype.lh;_.T.prototype.setTextRendition=_.T.prototype.wb;_.T.prototype.setAudioRendition=_.T.prototype.vb;
390
+ _.T.prototype.setVideoRendition=_.T.prototype.gb;_.T.prototype.setTextTrack=_.T.prototype.Ra;_.T.prototype.setAudioTrack=_.T.prototype.xa;_.T.prototype.setVideoTrack=_.T.prototype.xb;_.T.prototype.getTextTrack=_.T.prototype.ta;_.T.prototype.getAudioTrack=_.T.prototype.oa;_.T.prototype.getVideoTrack=_.T.prototype.Ea;_.T.prototype.getLoadingTextRendition=_.T.prototype.Db;_.T.prototype.getLoadingAudioRendition=_.T.prototype.Cb;_.T.prototype.getLoadingVideoRendition=_.T.prototype.ob;
391
+ _.T.prototype.getTextRendition=_.T.prototype.Pa;_.T.prototype.getAudioRendition=_.T.prototype.La;_.T.prototype.getVideoRendition=_.T.prototype.qa;_.T.prototype.getTextTracks=_.T.prototype.pa;_.T.prototype.getAudioTracks=_.T.prototype.getAudioTracks;_.T.prototype.getVideoTracks=_.T.prototype.getVideoTracks;_.T.prototype.canSelectVideoTracks=_.T.prototype.re;var U=class extends _.T{constructor(){super();this.g=new _.S("clpp.native.TrackManager");this.m=null;this.f=new _.Kt;this.h=[];this.G=0;this.o={};this.I=[];this.a=new Map;this.w=null;this.l=new Map;this.A=!0;this.M=this.B.bind(this,_.K);this.R=this.F.bind(this,_.K);this.P=this.C.bind(this,_.K);this.T=this.B.bind(this,_.M);this.Z=this.F.bind(this,_.M);this.V=this.C.bind(this,_.M);this.J=this.B.bind(this,_.L);this.L=this.F.bind(this,_.L);this.K=this.C.bind(this,_.L);this.j=null}re(){return!_.ak()}B(a,
392
+ b){const c=this;return _.w(function*(){if(b){var d=b.track;if(d){var e=a===_.M,f=a===_.K,g=a===_.L||e,h=b.target,k=c.h.find(n=>Al(n,d,a));if(k)c.g.warn("Track from event already exists",d,k);else{var l=Yk(a,d),m=Bl(d);if(f){if(d.kind===_.ye)return;let n;void 0!==d.id?n=c.o[d.id]:n=Object.values(c.o).find(p=>Al(l,p,a));l.kind&&"captions"===l.kind&&(l.mimeType=_.tc);n&&(l.src=n.url,l.mimeType=n.mimeType)}else if(k=c.h.find(n=>n.type===a&&_.ih(n,l,["kind","label","language"]))){k.id=d.id;m&&(c.g.debug(`Setting native ${a} track active`),
393
+ c.a.set(a,k));c.g.debug("Track from event seems to already exists, flipped native track to",d);return}try{l.renditions.push(new _.al(l.id,l));c.h.push(l);const n=c.m.getConfiguration().safari;Dl(c,a,n)?yield El(c,l,n):Fl(c,a,n)&&(yield Gl(c,l,n));c.g.debug(a+" Track added",l);c.m.trigger(new _.C(_.dg));const p=Hl(c,a).length,u=!(!h||!h.length),v=h&&h.length||0;f=()=>{c.g.debug(`Setting native ${a} track active. `+`Native track active: ${m}. `+`Number of tracks: ${p}`,d);c.a.set(a,l)};m?f():1===p&&
394
+ g&&(e?f():u&&1!==v||f())}catch(n){c.g.error("Error while converting track data",n)}}}else c.g.warn(Ya)}else c.g.warn(Va)})}F(a,b){if(b){var c=b.track;c?a===_.K&&c.kind!==_.ye&&(b=this.h.find(d=>Al(d,c,a)))&&(this.h.splice(this.h.indexOf(b),1),(this.a.get(a)||null)===b&&(this.a.set(a,null),Il(this)),this.g.debug(a+" Track removed, id: ",b.id)):this.g.warn(Ya)}else this.g.warn(Va)}C(a,b){this.g.debug(a+" Track changed",b);a===_.K&&Il(this);const c=Kl(this,a);if(c)for(let d=0;d<c.length;++d)if(Bl(c[d])){if(b=
395
+ this.h.find(e=>Al(e,c[d],a)))this.a.set(a,b),this.g.debug("Track change detected, id:",b.id),b===this.l.get(a)&&this.l.set(a,null),a===_.L?this.m.trigger(new _.C(_.Jc)):a===_.K&&this.m.trigger(new _.C(_.Yf));break}}initialize(a){this.m=a;this.j=new ku(a.getNetworkEngine())}load(){this.A=!1;var a=Jl(this,_.K);a&&(this.f.on(a,_.oc,this.M),this.f.on(a,wf,this.R),this.f.on(a,Xc,this.P));if(a=Jl(this,_.L))this.f.on(a,_.oc,this.J),this.f.on(a,wf,this.L),this.f.on(a,Xc,this.K);if(a=Jl(this,_.M))this.f.on(a,
396
+ _.oc,this.T),this.f.on(a,wf,this.Z),this.f.on(a,Xc,this.V);this.f.one(this.m,Qc,this.H.bind(this))}release(){this.A=!0;this.h=[];this.o={};this.a.clear();this.l.clear();this.f.release()}destroy(){this.release();this.m=null}getVideoTracks(){return Hl(this,_.M)}getAudioTracks(){return Hl(this,_.L)}pa(){return Hl(this,_.K)}qa(){const a=this.a.get(_.M)||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]||
397
+ null}La(){return Ll(this,_.L)}Pa(){return Ll(this,_.K)}ob(){return Ml(this,_.M)}Cb(){return Ml(this,_.L)}Db(){return Ml(this,_.K)}Ea(){return this.a.get(_.M)||null}oa(){return this.a.get(_.L)||null}ta(){return this.a.get(_.K)||null}xb(a){Nl(this,_.M,a)}xa(a){Nl(this,_.L,a)}Ra(a){Nl(this,_.K,a)}gb(a){Nl(this,_.M,a&&a.track)}vb(a){Nl(this,_.L,a&&a.track)}wb(a){Nl(this,_.K,a&&a.track)}addTextTrack(a){const b=this;return _.w(function*(){if(a.mimeType.match(/text\/vtt/)){const c="External_"+`${b.G++}`;
398
+ b.o[c]=a;Ol(b,a,c)}else yield Pl(b,a)})}ua(){return 1>=this.getVideoTracks().flatMap(a=>a.renditions).length}H(){const a=this;return _.w(function*(){const b=a.m.getConfiguration();Rl(a,_.L,b.preferredAudioLanguage);if(!Kl(a,_.K).some(c=>Bl(c))){const c=Jl(a,_.K);yield new Promise(d=>{a.f.one(c,Xc,d);(new _.Mj(d)).la(1)})}a.A||Rl(a,_.K,b.preferredTextLanguage)})}};U.prototype.isAbrEnabled=U.prototype.ua;U.prototype.addTextTrack=U.prototype.addTextTrack;U.prototype.setTextRendition=U.prototype.wb;
399
+ U.prototype.setAudioRendition=U.prototype.vb;U.prototype.setVideoRendition=U.prototype.gb;U.prototype.setTextTrack=U.prototype.Ra;U.prototype.setAudioTrack=U.prototype.xa;U.prototype.setVideoTrack=U.prototype.xb;U.prototype.getTextTrack=U.prototype.ta;U.prototype.getAudioTrack=U.prototype.oa;U.prototype.getVideoTrack=U.prototype.Ea;U.prototype.getLoadingTextRendition=U.prototype.Db;U.prototype.getLoadingAudioRendition=U.prototype.Cb;U.prototype.getLoadingVideoRendition=U.prototype.ob;
400
+ U.prototype.getTextRendition=U.prototype.Pa;U.prototype.getAudioRendition=U.prototype.La;U.prototype.getVideoRendition=U.prototype.qa;U.prototype.getTextTracks=U.prototype.pa;U.prototype.getAudioTracks=U.prototype.getAudioTracks;U.prototype.getVideoTracks=U.prototype.getVideoTracks;U.prototype.canSelectVideoTracks=U.prototype.re;_.mu=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);}Kb(){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)}Ja(){return!this.length||1===this.length&&1E-6>this.end(0)-this.start(0)?null:this.end(this.length-
401
+ 1)}tc(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}Ka(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.Ja(),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=
402
+ "";for(let b=0;b<this.length;b++)0<b&&(a+=" "),a+=`${this.start(b).toFixed(3)}-${this.end(b).toFixed(3)}`;return a}};_.x("clpp.BufferInfo",_.mu);_.mu.prototype.bufferedAheadOf=_.mu.prototype.Ka;_.mu.prototype.isBuffered=_.mu.prototype.tc;_.mu.prototype.bufferEnd=_.mu.prototype.Ja;_.mu.prototype.bufferStart=_.mu.prototype.Kb;_.mu.prototype.end=_.mu.prototype.end;_.mu.prototype.start=_.mu.prototype.start;_.nu=class{constructor(){this.Zc=new It(this);this.Wc=[]}addEventListener(a,b){this.on(a,b)}removeEventListener(a,b){this.off(a,b)}on(a,b,c){return this.Zc.on(a,b,c)}one(a,b,c){return this.Zc.one(a,b,c)}off(a,b){return this.Zc.off(a,b)}forwardEventsTo(a){a&&(0<=this.Wc.indexOf(a)||this.Wc.push(a))}dispatchEvent(a){this.trigger(a);return a.defaultPrevented}stopForwardingEventsTo(a){a&&(a=this.Wc.indexOf(a),0<=a&&this.Wc.splice(a,1))}trigger(a){this.Zc.trigger(a);for(const b of this.Wc)b.dispatchEvent(a)}};
403
+ _.nu.prototype.off=_.nu.prototype.off;_.nu.prototype.one=_.nu.prototype.one;_.nu.prototype.on=_.nu.prototype.on;_.nu.prototype.removeEventListener=_.nu.prototype.removeEventListener;_.nu.prototype.addEventListener=_.nu.prototype.addEventListener;var Sl=["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"];_.x("clpp.version",_.ea);_.x("clpp.name",_.ra);var Wr=null;_.x("clpp.configure",a=>{Wr=a});_.Ql="application/x-mpegurl";_.x("clpp.Type",{DASH:_.uc,HLS:_.Ql,SMOOTH_STREAMING:_.Bc,MP4:_.tg,MP3:"audio/mp3"});_.Th="scte35";_.Uh="hls-daterange";_.x("clpp.TimelineCueType",{SCTE35:_.Th,DASH_CALLBACK:_.De,HLS_DATERANGE:_.Uh,UNKNOWN:_.ig});_.x("clpp.SpeedUpMode",{DECODER:_.Ad,SEEK:"seek"});_.x("clpp.CodecSwitchingStrategy",{PREVENT:_.of,SMOOTH:_.Kf});var ou=class{};_.x("clpp.utils.PlayerConfiguration",ou);ou.create=_.Zl;var pu=["abort",Pc,Qc,Pd,"emptied",Rd,_.Td,_.Ud,"interruptbegin","interruptend",_.oe,_.pe,qe,"mozaudioavailable",_.Qe,_.Ue,_.ef,_.qf,_.tf,_.Ef,_.Ff,Lf,"suspend",_.cg,"volumechange",_.Cg,_.Dg,_.yf,Ig,Hg,Fg,Gg];_.qu=class extends _.nu{constructor(a){super();this.log=new _.S(a);this.configuration=this.ha=_.Xl();this.ga=this.C=null;this.kd=this.Pe=!1;this.pf=new _.S("clpp.video.events");this.fc=null;this.Qd=-1;this.Lg=this.Ig.bind(this);this.Oe=new _.Xr;this.L=new _.Kt;this.Ke=this.Cc=this.Gc=this.M=null}init(a,b){this.configuration=this.ha=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 pu)this.L.on(a,c,this.Lg,
404
+ c!==_.Ud);this.fc||(this.fc=this.Bg());this.fc.initialize(this);this.C.showMediaElement()}release(){this.M&&(this.M.destroy(),this.M=null);return Promise.resolve()}destroy(){this.L.release();return this.Oe.release()}canPlay(a,b){return _.wh[this.namespace()].canPlay(a,b)}getTimeline(){return null}setupPlaylist(){return Promise.reject(_.$a)}appendLoad(){return Promise.reject(_.$a)}seekWith(){return Promise.reject(_.$a)}detach(){return Promise.resolve()}setSeekInterceptor(){}setPlaybackSessionId(){}getBandwidthEstimate(){return null}play(){if(!this.ga)return Promise.reject("No sources specified yet. You need to load content before calling play.");
405
+ const a=this.C.getMedia().play();return Promise.resolve(a).catch(b=>{this.log.info("Caught play promise exception",b);const c={name:b.name||"",message:b.message||"",stack:b.stack||""};Tl(c)?(this.trigger(new _.C(_.Kc)),this.log.warn(_.ka)):c.name===ab&&this.log.warn('Unrecognized "NotAllowedError" on play(). '+`${b.name}: ${b.message}`);throw b;})}pause(){return this.ga?new Promise((a,b)=>{const c=this.getState();if(c!==_.lp&&c!==_.hp&&c!==_.sp&&c!==_.rp)b(new _.I(_.F,7,3201,"The player state does not allow pause."));
406
+ else if(this.C.getMedia().pause(),this.getState()===_.sp)this.L.one(this,_.Nf,()=>{a()});else a()}):Promise.reject(new _.I(_.F,7,3201,"No sources specified yet. You need to load content before calling pause."))}isPaused(){return this.C.getMedia().paused}isEnded(){return this.C.getMedia().ended}getConfiguration(){return this.configuration}setDrmCustomDataModifier(a){this.Gc=a}setCdnErrorCallback(a){this.Cc=a}Jc(){return this.Gc}getSurface(){return this.C}getBufferInfo(a){const b=this.getSurface().getMedia();
407
+ return new _.mu(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.getMediaPosition();if(void 0===a||null===a||typeof a!==_.r||a===b)return Promise.resolve();const c=this.C.getMedia();if(!c)return this.log.warn("No media element available, can not set current time!"),Promise.reject();const d=a-b;return.1>=Math.abs(d)?
408
+ (this.log.info("Skip seek. Delta "+Math.abs(d)+" \x3c 0.1"),Promise.resolve()):new Promise((e,f)=>{const g=()=>{this.trigger(new _.C(_.ng));this.L.on(c,_.Ef,h);this.L.on(c,_.cg,h);this.L.on(c,_.qf,h);this.log.info("Seeking to "+a+". Delta "+d);this.kd=this.Pe=!0;c.currentTime=a},h=l=>{const m=this.getMediaPosition(),n=.1>=Math.abs(a-m);var p=.25<m-a;const u=c.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA,v=l.type===_.Ef,y=l.type===_.qf,A=l.type===_.cg,D=y&&u;p=v||n&&D||A&&p;this.log.debug("Checking seeking state after "+
409
+ l.type+" event. Seek completed:",p,"Current Time:",m,"Target Time:",a,"Native Event:",v,"Time reached",n,"Timeupdate:",A,"Progress:",y,"ReadyState:",u,"Progress Ready:",D);p?(this.kd=this.Pe=!1,this.L.off(c,_.Ef,h),this.L.off(c,_.cg,h),this.L.off(c,_.qf,h),this.nf(),this.trigger(new _.C(_.mg)),e()):y&&b===m&&(this.log.debug("Seek seemed to have been ignored. Trying again"),c.currentTime=a)},k=()=>{if(c.readyState>HTMLMediaElement.HAVE_NOTHING)g();else this.L.one(c,_.pe,g)};this.getState()===_.pp?
410
+ (this.log.debug("Player is in IDLE state. Postpone seek."),this.L.one(this,_.Nf,()=>{switch(this.getState()){case _.lp:case _.sp:case _.rp:this.log.debug("Valid seek state reached.");k();break;default:this.log.warn("Invalid seek target state. Aborting seek"),f()}})):k()})}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?_.hh(a)?0>a||1<a?this.log.warn(`Can not set volume to ${a}.
411
+ 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.ga?this.C.getMedia().duration:-1}getTrackManager(){return this.fc}getPlaybackRate(){const a=this.C.getMedia();return a&&a.playbackRate||
412
+ 1}setPlaybackRate(a){const b=this.C.getMedia();void 0!==a&&b&&(b.playbackRate=a)}setSourceIndex(a){this.Qd=a}getSourceIndex(){return this.Qd}getLoadedSource(){return this.ga&&-1!==this.Qd?this.ga[this.Qd]:null}getPeriods(){return[]}getNetworkEngine(){return this.Oe}setNetworkEngine(a){this.Oe=a}setCmsdManager(a){this.Ke=a}getTextDisplayer(){return this.M}getTimelineCues(){return[]}getCueTimeline(){return null}resetAbr(){}Ig(a){var b=this.getSurface().getMedia();const c=this.getPosition();let d="Received Video Element Event: '"+
413
+ a.type+"' with playhead at: "+c;if(a.type===_.cg||a.type===_.qf)this.pf.debug(d);else{let e="";switch(a.type){case _.tf:e=`Rate: ${this.getPlaybackRate()}`;break;case Pd:e=`Duration: ${this.getDuration()}`;break;case "volumechange":e=`Volume: ${this.getVolume()} Muted: ${this.isMuted()}`;break;case _.Ue:case _.ef:case "suspend":case _.Cg:case Lf:case _.Ff:case _.Ef:case _.cg:case _.qf:case Pc:case Qc:b=this.getBufferInfo().Ka(c);e=`State ${this.getSurface().getMedia().readyState} `+`Buffer: ${b}`;
414
+ break;case _.yf:null!=b&&(e=`Size: ${b.videoWidth}x${b.videoHeight}`)}e&&(d+=". "+e);this.pf.info(d)}a.type!==_.Ud&&this.trigger(new _.C(a.type,{detail:a}))}nf(){}};var cm;cm=new _.S("clpp.Components");_.am=new Map;_.x("clpp.install",function(a){km(a)});_.x("clpp.uninstall",function(a){lm(a)});var ru=class{constructor(){this.a=this.f=null;this.g=new _.S("clpp.drm.csl")}release(){this.a=this.f=null}};_.x("clpp.drm.WidevineRobustnessLevel",{SW_SECURE_CRYPTO:_.nb,SW_SECURE_DECODE:_.ob,HW_SECURE_CRYPTO:Ha,HW_SECURE_DECODE:Ia,HW_SECURE_ALL:Ga});_.x("clpp.drm.PlayreadyRobustnessLevel",{SL150:"150",SL2000:"2000",SL3000:"3000"});_.x("clpp.drm.KeySystem",{NONE:_.Ee,CLEAR_KEY:_.Oe,WIDEVINE:_.ud,PLAYREADY:_.sd,FAIRPLAY:_.qd,PRIMETIME:_.pd});_.om={};_.x("clpp.drm.registerDrmEnvironment",_.pm);var sm={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,
420
415
  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,
421
416
  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,
422
417
  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,
@@ -430,101 +425,101 @@ break;case _.xf:null!=b&&(e=`Size: ${b.videoWidth}x${b.videoHeight}`)}e&&(d+=".
430
425
  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,
431
426
  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,
432
427
  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,
433
- 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]};_.Bu=class{constructor(a){this.I=a;this.f={}}$a(a,b){this.f[a]=b}};_.z("clpp.drm.DrmEnvironment",_.Bu);_.Bu.prototype.setDrmSystem=_.Bu.prototype.$a;_.vm=class{constructor(a,b){b=void 0===b?!1:b;this.f=_.fh(a)?new DataView(new ArrayBuffer(a),0,a):a;this.a=0;this.h=b;this.buffer=this.f.buffer}getPosition(){return this.a}Pa(){return this.f.byteLength}seek(a){(0>a||a>=this.f.byteLength)&&_.am();this.a=a}};_.pn=class{constructor(a,b){this.f=a;this.h=void 0===b?!0:b;this.a=0}getPosition(){return this.a}Pa(){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}};
434
- _.z("clpp.utils.dataview.DataViewReader",_.pn);_.tm=class{constructor(){this.h=[];this.f=[];this.a=!1;this.g=new _.T("clpp.mp4")}N(a,b){a=km(a);this.h[a]=Cu;this.f[a]=b;return this}ea(a,b){a=km(a);this.h[a]=Du;this.f[a]=b;return this}stop(){this.a=!0}parse(a,b){a=_.K(a);a=new _.pn(new DataView(a.buffer,a.byteOffset,a.byteLength),!1);for(this.a=!1;_.cm(a)&&!this.a;)this.le(0,a,b)}le(a,b,c){const d=b.getPosition();let e=_.P(b);var f=_.P(b);let g=!1;this.g.debug("Parsing MP4 box",_.lm(f));switch(e){case 0:e=b.Pa()-d;break;case 1:e=_.hm(b),g=!0}const h=
435
- this.f[f];if(h){let m=null;var k=null;this.h[f]===Du&&(k=_.P(b),m=k>>>24,k&=16777215);f=b.getPosition()-d;var l=d+e;c&&l>b.Pa()&&(l=b.Pa());l-=b.getPosition();b=0<l?_.jm(b,l):new Uint8Array(0);b=new _.pn(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.Pa()-b.getPosition()),b.skip(a)}};_.z("clpp.utils.Mp4Parser",_.tm);_.tm.typeToString=_.lm;
436
- _.tm.allData=_.om;_.tm.sampleDescription=_.nm;_.tm.children=_.mm;_.tm.prototype.parseNext=_.tm.prototype.le;_.tm.prototype.parse=_.tm.prototype.parse;_.tm.prototype.stop=_.tm.prototype.stop;_.tm.prototype.fullBox=_.tm.prototype.ea;_.tm.prototype.box=_.tm.prototype.N;_.tm.headerSize=_.pm;var Cu=0,Du=1;var Eu=class{};_.z("clpp.utils.FairplayUtils",Eu);Eu.parseFairPlayResponse=_.ym;Eu.formatFairPlayRequest=_.xm;Eu.createFairplayPayload=wm;Eu.extractContentId=_.sm;Eu.extractExtXKeyUri=qm;var Em=new _.T("clpp.drm.DrmToday"),Rm="PRODUCTION",Sm="STAGING",Tm="DEMO",Um="TEST",Fu={PRODUCTION:Rm,STAGING:Sm,DEMO:Tm,TEST:Um};_.z("clpp.drm.DrmToday.Environment",Fu);_.z("clpp.drm.DrmToday.WidevineCertificates",{V1_PROD:"V1_PROD",V1_STAGING:"V1_STAGING",V2:"V2"});
437
- var Am="/license-proxy-widevine/cenc/",Bm="/license-proxy-headerauth/drmtoday/RightsManager.asmx",Cm="/license-server-fairplay/",Vm={"00000":"Success","01000":"General Internal Error","02000":"General Request Error","03000":"General Request Authentication Error",10001:"Bad Request",3E4:"General DRM error",4E4:"General Widevine Modular error",40001:"Widevine Device Certificate Revocation (wv 127)",40002:"Widevine Device Certificate Revocation - Permanently (wv 175)",41E3:"General Widevine Classic error",
438
- 42E3:"General Playready error",43E3:"General Fairplay error",44E3:"General OMA error",44001:"OMA Device registration failed",45E3:"General CDRM error",45001:"CDRM Device registration failed",6E4:"CSL",60001:"CSL - INVALID",60100:"CSL - Denied by Stream Limiting",7E4:"General Output Protection",70001:"All keys filtered by EOP settings",8E4:"TAKE DOWN",80001:"TAKE DOWN - Denied by Take Down",9E4:"General GBL error",90001:"License delivery prohibited in your region"},Gu=[Ga,Ia,Ha,_.ob,_.nb],Hu=[Ga,Ia,
439
- Ha,_.ob,_.nb],Iu=["3000","2000","150"],Ju=["2000","150"];
440
- for(const a of Object.keys(Fu)){let b=ya;a!==Rm&&(b+=`_${a}`);const c=new _.Bu(b);let d=null;switch(a){case Rm:case Sm:case Tm:d=$l("V2");break;case Um:d=null}c.$a(_.td,{licenseUrl:Dm(_.td,a),videoRobustness:Gu,audioRobustness:Hu,persistentStateRequired:!1,distinctiveIdentifierRequired:!1,serverCertificate:d,modifiers:{licenseRequest:_.Gm,licenseResponse:_.Hm}});c.$a(_.pd,{licenseUrl:Dm(_.pd,a),certificateUrl:zm(a)+"/license-server-fairplay/cert/",modifiers:{licenseRequest:_.Jm,licenseResponse:_.Km,
441
- extractContentId:_.Lm,certificateRequest:_.Pm}});c.$a(_.rd,{licenseUrl:Dm(_.rd,a),videoRobustness:Iu,audioRobustness:Ju,modifiers:{licenseRequest:Qm}});_.Wl(c)};_.Ku=class{constructor(a){this.f=a;this.a=void 0}value(){void 0===this.a&&(this.a=this.f());return this.a}};var Mu=class{constructor(){this.size=0;this.a=void 0;this.g=new _.T("clpp.drm.eme.MediaKeyStatusMap")}getStatus(){return this.a}forEach(a){this.a&&a(this.a,Lu.value())}get(a){if(this.has(a))return this.a}has(a){const b=Lu.value();return this.a&&Ki(a,b)?!0:!1}entries(){}keys(){}values(){}},Lu=new _.Ku(()=>Qi(new Uint8Array([0])));var Zm=new _.Ku(()=>new Map([[HTMLMediaElement.HAVE_METADATA,_.ne],[HTMLMediaElement.HAVE_CURRENT_DATA,_.me],[HTMLMediaElement.HAVE_FUTURE_DATA,Pc],[HTMLMediaElement.HAVE_ENOUGH_DATA,Qc]]));var Ou=class{constructor(){this.j=this.w=null}l(a){this.w=a}h(a){const b=this.j;b&&b!==a&&an(b,null);return(this.j=a)?an(a,this.w):Promise.resolve()}o(){return this.j}a(a,b){_.sh("AppleEmeManager.requestMediaKeySystemAccess");try{const c=new Nu(a,b);return Promise.resolve(c)}catch(c){return Promise.reject(c)}}f(){return Ln}},Nu=class{constructor(a,b){this.keySystem=a;if(a.startsWith(_.pd))for(var c of b){a:{a=c;if(a.persistentState===_.wf){a=null;break a}b={audioCapabilities:[],videoCapabilities:[],
442
- persistentState:_.Me,distinctiveIdentifier:_.Me,initDataTypes:a.initDataTypes,sessionTypes:[Tf],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),
443
- e=!0));d||(e=WebKitMediaKeys.isTypeSupported(this.keySystem,_.rg));a=e?b:null}if(a){this.a=a;return}}c=Error(yb);c.name=bb;c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}createMediaKeys(){const a=new Pu(this.keySystem);return Promise.resolve(a)}getConfiguration(){_.sh("AppleEmeManager.MediaKeySystemAccess.getConfiguration");return this.a}},Pu=class{constructor(a){this.f=null;this.h=new WebKitMediaKeys(a);this.a=new _.Rt;this.j=0;this.g=new _.T(hd);this.g.info("Created Media Keys for "+a)}createSession(a){a=
444
- void 0===a?Tf:a;this.g.debug("Creating Apple MediaKeys Session");if(a!==Tf)throw new TypeError("Session type "+a+ba);return new Qu(this.h,`__session_${this.j++}`)}setServerCertificate(){this.g.debug("AppleEmeManager.MediaKeys.setServerCertificate");return Promise.resolve(!1)}},Qu=class extends _.vu{constructor(a,b){super();this.a=null;this.o=a;this.f=this.h=null;this.j=new _.Rt;this.sessionId=b;this.expiration=NaN;this.closed=new _.Ij;this.l=!1;this.keyStatuses=new Mu;this.g=new _.T(hd)}generateRequest(a,
445
- b){if(this.l)return Promise.reject(pb);this.g.debug("generateRequest");this.h=new _.Ij;try{const c=this.o.createSession(_.rg,_.K(b));this.a=c;this.sessionId=c.sessionId||this.sessionId||"";this.j.on(c,Fg,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 _.F(_.se,{messageType:void 0===e||e===Nf?he:ge,message:Qi(d.message.buffer)});this.dispatchEvent(d)}});this.j.on(c,Dg,d=>{this.g.debug("onWebkitKeyAdded_",
446
- d);this.f&&(bn(this,"usable"),this.f.resolve(),this.f=null)});this.j.on(c,Eg,()=>{var d=this.keyStatuses.getStatus();if(this.a&&this.a&&this.a.error&&this.a.error.code===WebKitMediaKeyError.MEDIA_KEYERR_DOMAIN&&d===Nf)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),
447
- 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:bn(this,"output-not-allowed");break;default:bn(this,_.de)}});bn(this,Nf)}catch(c){this.h.reject(c)}return this.h}load(){this.g.debug(_.le);return Promise.reject(Error("MediaKeySession.load not yet supported"))}update(a){if(this.l)return Promise.reject(pb);this.g.debug(hg);this.f=new _.Ij;try{this.a.update(_.K(a))}catch(b){this.f.reject(b)}return this.f}close(){if(this.l)return this.closed;
448
- 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"))}},Ru=class{a(){return Ln}f(){return!!window.WebKitMediaKeys}create(){return new Ou}};var Su=class{constructor(){this.j=null;this.g=new _.T("clpp.drm.eme.StandardEmeManager")}l(a){this.j=a}h(a){return this.j?this.j.setMediaKeys(a):Promise.reject(Sa)}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 po}},
449
- Tu=class{a(){return po}f(){return!!(window.MediaKeys&&navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)}create(){return new Su}};var Wu=class{constructor(){this.w=this.j=null;this.A="";HTMLMediaElement.prototype.webkitGenerateKeyRequest&&(this.A="webkit")}l(a){this.j=a}h(a){_.sh("WebkitEmeManager.setMediaKeys");if(!this.j)return Promise.reject(Sa);const b=this.w;b&&b!==a&&en(b,null);(this.w=a)&&en(a,this.j);return Promise.resolve()}o(){return this.w}a(a,b){_.sh("WebkitEmeManager.requestMediaKeySystemAccess");try{if(this.j)var c=this.j;else{var d=document.getElementsByTagName(_.w);c=d.length?d[0]:document.createElement(_.w)}const e=
450
- new Uu(this.A,c,a,b);return Promise.resolve(e)}catch(e){return Promise.reject(e)}}f(){return Vu}},Uu=class{constructor(a,b,c,d){this.h=a;this.a=this.keySystem=c;a=!1;c===_.Ne&&(this.a=Cg,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,this.a)&&
451
- (f.push(k),e=!0));h||(e=b.canPlayType(_.rg,this.a)||b.canPlayType("video/webm",this.a));g.persistentState!==_.wf||a||(e=!1);if(e){this.f=g;return}}b=yb;if(c===_.Ne||c===_.td)b="None of the requested configurations were supported.";c=Error(b);c.name=bb;c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}createMediaKeys(){return Promise.resolve(new Xu(this.h,this.a))}getConfiguration(){return this.f}},Xu=class{constructor(a,b){this.h=a;this.o=b;this.a=null;this.f=new _.Rt;this.j=[];this.l=new Map}createSession(a=
452
- Tf){if(a!==Tf&&a!==_.Re)throw new TypeError("Session type "+a+ba);if(!this.a)throw a=Error("Media element is missing."),a.name=Ka,a.code=DOMException.INVALID_STATE_ERR,a;this.a.src||(this.a.src="about:blank");a=new Yu(this.h,this.a,this.o,a);this.j.push(a);return a}setServerCertificate(){return Promise.resolve(!1)}},Yu=class extends _.vu{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 _.Ij;this.keyStatuses=
453
- new Mu}ready(){_.sh("WebkitEmeManager.MediaKeySession.ready");dn(this,"usable");this.a&&this.a.resolve();this.a=null}generateRequest(a,b){_.sh("WebkitEmeManager.MediaKeySession.generateRequest");return gn(this,b,null)}load(a){_.sh(Fb);return this.l===_.Re?gn(this,null,a):Promise.reject(Error(Za))}update(a){_.sh(Fb);const b=new _.Ij;hn(this,b,a);return b}close(){_.sh("WebkitEmeManager.MediaKeySession.close");if(this.l!==_.Re){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),
454
- this.closed;const a=fn(this,"cancelKeyRequest");try{this.j[a](this.h,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed}remove(){_.sh("WebkitEmeManager.MediaKeySession.remove");return this.l!==_.Re?Promise.reject(Error(Za)):this.close()}},Zu=class{a(){return Vu}f(){return!(!HTMLMediaElement.prototype.webkitGenerateKeyRequest&&!HTMLMediaElement.prototype.generateKeyRequest)}create(){return new Wu}};var av=class{l(){}h(a){_.sh("NopEmeManager.setMediaKeys");return null===a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}o(){return null}a(){_.sh("NopEmeManager.requestMediaKeySystemAccess");return Promise.reject(Error("The key system specified is not supported."))}f(){return $u}},bv=class{a(){return $u}f(){return!0}create(){return new av}};var cv=class{};_.z(id,cv);var kn=new _.T(id),jn=[];jn=[new Tu,new Ru,new Zu,new bv].filter(a=>a.f());var po="STANDARD",Ln="APPLE",Vu="WEBKIT",$u="NOP";cv.Apis={STANDARD:po,APPLE:Ln,WEBKIT:Vu,NOP:$u};_.dv=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,_.Vf)}catch(e){}if(!d)return null;a=d.documentElement;return b&&a.tagName!==
455
- b||0<d.getElementsByTagName("parsererror").length?null:a}removeChild(a,b){a.removeChild(b)}};_.Ng=_.dv.prototype;_.Ng.Hd=_.Pg(19);_.Ng.ne=_.Pg(17);_.Ng.ae=_.Pg(15);_.Ng.be=_.Pg(13);_.Ng.me=_.Pg(11);_.Ng.Jc=_.Pg(9);_.Ng.Td=_.Pg(7);_.Ng.$=_.Pg(5);_.Ng.sc=_.Pg(3);_.Ng.Pb=_.Pg(1);_.Q=new _.dv;_.ev=new _.T("clpp.xml.Parser");_.vl="dom";var nn,fv,mn;_.vn=[154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149];nn=[237,239,139,169,121,214,74,206,163,200,39,220,213,29,33,237];fv=class{constructor(a,b,c){this.j=new Uint8Array(a);this.a=b;this.f=c}};mn=class extends fv{};_.un=class extends fv{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 xn=!!(performance&&performance.mark&&performance.measure),zn=new _.T("clpp.perf");var bo=class{constructor(a){this.f=[];this.h=[];this.a=[];8<=a.byteLength&&(new _.tm).ea("pssh",this.j.bind(this)).parse(a.buffer);0===this.a.length&&_.C("No pssh box found!")}j(a){if(1<a.version)_.C("Unrecognized PSSH version found!");else{var b=_.Ql(_.jm(a.reader,16)),c=[];if(0<a.version){var d=_.P(a.reader);for(let e=0;e<d;++e){const f=_.Ql(_.jm(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});
456
- a.reader.getPosition()!==a.reader.Pa()&&_.C("Mismatch between box size and data size!")}}};var Xn,gv;
457
- _.fp=class{constructor(a,b){this.D=a;this.bb=b;this.J=new Set;this.C=this.I=this.l=null;this.S=!1;this.a=null;this.K=gv;this.B=new _.Rt;this.M=new Au;this.h=new Map;this.L=[];this.H=new _.Ij;this.za=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.ba=new Map;this.V=new _.wk(()=>On(this));this.j=!1;this.fa=new _.Ij;this.G=!1;this.X=[];this.ia=!1;this.R=0;this.g=new _.T("clpp.drm.DrmEngine");this.da=(new _.wk(()=>{Pn(this)})).Bb(1);this.H.catch(()=>{});
458
- this.A=this.F=!1;this.P=null}destroy(){const a=this;return _.x(function*(){a.j?yield a.fa:(a.j=!0,yield Qn(a),a.fa.resolve())})}keySystem(){return this.a?_.Dn(this.a.keySystem):""}getDrmInfo(){return this.a}Wa(a){const b=this;return _.x(function*(){b.G&&b.K===Xn||(!b.f.delayLicenseRequestUntilPlayed||b.C&&!b.C.paused||b.ia?yield ho(b,a):b.X.push(a))})}Ka(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===
459
- _.Pf){var g=f;f=e;e=g}if(Cn(this.a.keySystem)&&16===f.byteLength&&_.yk()){g=_.Pi(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!==Nf&&(c.loaded=!0);c&&c.hb&&c.hb.resolve();"expired"===e&&(d=!0);f=_.K(f);let h=_.Ql(f);"00"===h&&c&&c.keyId?h=c.keyId:this.a.keySystem.startsWith(_.pd)&&16!==f.byteLength&&(h=Ri(f));(f=h||"")?this.g.info(`Key status for Key ID '${h}': ${e}`):this.g.info(`Key status global keys: ${e}`);
460
- 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.lb.forEach(e=>{this.o.get(e)===Nf&&(this.g.warn(`Key status for Key ID '${e}': 'output-restricted'`),this.o.set(e,_.Oe))});for(a=0;a<this.a.initData.length;a++){const e=this.a.initData[a];e.keyId&&this.o.get(e.keyId)===Nf&&_.Rl(e.initData,c.initData)&&(this.g.warn(`Key status for Key ID '${e.keyId}': 'output-restricted'`),this.o.set(e.keyId,_.Oe))}a=b.expiration-Date.now();(0>a||d&&1E3>
461
- a)&&c&&!c.jc&&(this.g.debug("Session has expired",b.sessionId),(a=this.h.get(b))&&a.Lc&&a.Lc.stop(),this.h.delete(b),b.close().catch(()=>{}));ro(this)&&(this.H.resolve(),1!==this.h.size||d?this.V.la(.5):On(this))}};Xn=0;gv=3;_.Do=new Map;_.Eo=new _.T("clpp.text");var hv=class{constructor(){this.a=null;this.f=[]}};var iv=class{constructor(){this.h=this.f=this.j=null;this.a=[]}};_.jv=class{constructor(){this.h=this.w=this.B=this.C=this.l=this.o=this.j=this.A=NaN;this.a=new hv;this.f=new iv}getStats(){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:Io(this.a,_.Zo),pauseTime:Io(this.a,_.Yo),bufferingTime:Io(this.a,_.So),stateHistory:Jo(this.a),switchHistory:Ko(this.f)}}};var lv=class{constructor(a){this.g=new _.T("clpp.StateManager");this.m=a;this.a=new _.Rt;this.f=_.Wo;this.w=_.kv;this.G=0;this.o=-1;this.J=this.l=this.H=this.A=0;this.h=this.Z=this.C=!1;this.F=0;this.j=null;this.I=0;this.K=_.Kk();this.B=!1;this.H=Date.now();Qo(this)}Va(a,b){this.m&&this.m.trigger(new _.F(a,{detail:b}))}getState(){return To(this,"")}destroy(){this.g.debug("Stop watching for video events for "+this.m.namespace());this.a.release()}};_.z("clpp.utils.media.detectType",$o);var cp=new _.T("clpp.sources");var mv=class extends _.yu{constructor(){super(jd);this.w=this.G=!1;this.l=this.A=this.o=this.a=this.j=null;this.h=new _.Rt;this.F=this.B=this.f=this.H=null}init(a,b){super.init(a,b);this.j=new lv(this);No(this.j,_.Wo)}namespace(){return jd}unload(){const a=this;return _.x(function*(){if(a.ga){a.log.debug("Releasing player with source",a.ga);a.B&&(a.B.stop(),a.B=null);var b=a.getTrackManager();b&&b.release();a.A&&(a.A.destroy(),a.A=null);a.M&&(a.M.destroy(),a.M=null);a.l&&a.l.release();a.o&&(a.o.destroy(),
462
- a.o=null);_.Fh(a.h);a.f&&(a.f=new _.jv);a.F=null;a.ga=null;a.G=!1;a.a&&(a.a.removeAttribute("src"),a.a.load());if(a.w)throw new _.I(_.G,7,7E3);a.a&&(b=a.a,a.h.off(b,_.r),a.h.off(b,_.xf),a.a=null)}})}release(){return super.release().then(()=>this.unload()).then(()=>{this.j&&No(this.j,_.Wo)})}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(Aa);const a=this.getTrackManager();
463
- a&&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.kc}load(a){const b=this;return _.x(function*(){if(b.w)return Promise.reject(new _.I(_.G,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()/
464
- 1E3;b.f=new _.jv;b.h.on(b,_.Mf,()=>{b.f&&_.Ho(b.f.a,b.getState())});No(b.j,_.Xo);b.ga=_.bp(a);b.configuration=_.yl(b.ia,a);b.log.debug(_.Pa,b.configuration);b.log.debug(_.gb,b.ga);const d=_.Go(b.configuration,[_.ae,"native"]);b.M=d.create(b);b.M.setTextVisibility(!0);b.configuration.enableHtmlCue&&_.Bl(_.Sf)&&!_.Mk()&&(b.A=new eu(b),b.A.start(c));b.l?b.l.release():b.l=new St(b);c.textTracks&&ai(b.l,c.textTracks);b.getTrackManager().load();c.loop=!!b.configuration.loop;_.B(b.configuration.volume)||
465
- b.setVolume(b.configuration.volume);_.B(b.configuration.muted)||b.setMuted(b.configuration.muted);b.h.one(c,Pc,()=>{b.trigger(new _.F(_.bg))});null==b.configuration.startTime&&lp(b,c);_.Kk()&&mp(b,c);try{ep(b,c),yield hp(b),yield kp(b).T}catch(e){b.G=!1,b.onError(e)}})}onError(a){this.G||(a.severity===_.G&&null!==this.j&&No(this.j,_.Po),this.trigger(new _.F(_.r,{detail:a})))}Kg(){return new V}getState(){return null!==this.j?this.j.getState().currentState:_.kv}getPresentationStartTime(){if(this.a&&
466
- this.a.getStartDate&&this.isLive()){const a=this.a.getStartDate();return isNaN(a.getTime())?null: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 _.Lo();this.f&&_.Ho(this.f.a,this.getState());var a=this.a,b=this.f,c=a.videoHeight;
467
- b.A=a.videoWidth;b.j=c;a.getVideoPlaybackQuality&&(c=a.getVideoPlaybackQuality(),a=this.f,b=Number(c.totalVideoFrames),a.o=Number(c.droppedVideoFrames),a.l=b,this.f.C=Number(c.corruptedVideoFrames));if(a=this.getTrackManager())if(a=a.qa())a.bandwidth&&(this.f.w=a.bandwidth),a.$c&&(this.f.h=a.$c);return this.f.getStats()}getTimelineCues(){return this.l?this.l.getTimelineCues():[]}getCueTimeline(){return null}};
468
- _.wh(new class{a(){return jd}canPlay(a,b){a=a.type||"";const c=a===_.uc,d=a===_.zc,e=a===_.pl;var f;_.Jk()||c||d||e&&!_.Kk()?f=0:f=""!==xk().canPlayType(a)?e&&_.Kk()&&(window.ManagedMediaSource||window.MediaSource&&MediaSource.isTypeSupported)&&!b.streaming.preferNativeHlsOnSafari?1:2:0;return f}f(a){return a===_.ma}create(){return new mv}});_.z("clpp.ads.PodType",{PREROLL:0,MIDROLL:1,POSTROLL:2});_.z("clpp.ads.Technology",{CLIENT_SIDE:0,SERVER_SIDE:1,SERVER_GUIDED:2});_.z("clpp.ads.ErrorType",{LOAD:0,PLAY:1,OTHER:2});var op=new _.T("clpp.ads"),np=[];var nv=class{load(){}start(){}o(){}resume(){}pause(){}skip(){}getVolume(){}setVolume(){}getPosition(){}h(){}l(){}};_.z("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 W=class{ob(){}pb(){}ub(){}getId(){}getCreativeId(){}Qb(){}getApiFramework(){}getAdSystem(){}getAdvertiserName(){}getTitle(){}getDuration(){}getPosition(){}getSkipTimeOffset(){}Tb(){}qb(){}getMediaUrl(){}fb(){}eb(){}Qa(){}Ra(){}getPodIndex(){}Hb(){}sb(){}gb(){}getWrapperAdIds(){}getWrapperAdSystems(){}getWrapperCreativeIds(){}Sb(){}canSeek(){}};_.z("clpp.ads.IAd",W);W.prototype.canSeek=W.prototype.canSeek;W.prototype.getVideoElement=W.prototype.Sb;W.prototype.getWrapperCreativeIds=W.prototype.getWrapperCreativeIds;
469
- W.prototype.getWrapperAdSystems=W.prototype.getWrapperAdSystems;W.prototype.getWrapperAdIds=W.prototype.getWrapperAdIds;W.prototype.getSequenceLength=W.prototype.gb;W.prototype.getPositionInSequence=W.prototype.sb;W.prototype.getPodTimeOffset=W.prototype.Hb;W.prototype.getPodIndex=W.prototype.getPodIndex;W.prototype.getPodType=W.prototype.Ra;W.prototype.getMediaBitrate=W.prototype.Qa;W.prototype.getMediaHeight=W.prototype.eb;W.prototype.getMediaWidth=W.prototype.fb;W.prototype.getMediaUrl=W.prototype.getMediaUrl;
470
- W.prototype.getClickThroughUrl=W.prototype.qb;W.prototype.isBumper=W.prototype.Tb;W.prototype.getSkipTimeOffset=W.prototype.getSkipTimeOffset;W.prototype.getPosition=W.prototype.getPosition;W.prototype.getDuration=W.prototype.getDuration;W.prototype.getTitle=W.prototype.getTitle;W.prototype.getAdvertiserName=W.prototype.getAdvertiserName;W.prototype.getAdSystem=W.prototype.getAdSystem;W.prototype.getApiFramework=W.prototype.getApiFramework;W.prototype.getSourceId=W.prototype.Qb;
471
- W.prototype.getCreativeId=W.prototype.getCreativeId;W.prototype.getId=W.prototype.getId;W.prototype.getTechnology=W.prototype.ub;W.prototype.getAdManagerVersion=W.prototype.pb;W.prototype.getAdManagerName=W.prototype.ob;var R=class{constructor(a,b,c,d,e,f,g){this.w=this.o=this.l=!1;this.F=a;this.f=b;this.a=c;this.h=d;this.j=0;this.B=`${e}:${b}`;this.G=e;this.videoEl=null;this.A=f;this.C=g||null}ob(){return""}pb(){return""}ub(){return 2}getId(){return this.B}getCreativeId(){return""}Qb(){return this.G}getApiFramework(){return null}getAdSystem(){return""}getAdvertiserName(){return""}getTitle(){return""}getDuration(){return this.h}getPosition(){return this.j}getSkipTimeOffset(){return-1}canSeek(){return this.A}Tb(){return!1}qb(){return null}getMediaUrl(){return null}fb(){return 0}eb(){return 0}Qa(){return 0}Ra(){return this.F}getPodIndex(){return 0}Hb(){return 0}sb(){return this.f}gb(){return this.a}getWrapperAdIds(){return[]}getWrapperAdSystems(){return[]}getWrapperCreativeIds(){return[]}Sb(){return this.videoEl}Bh(){return this.C}};
472
- R.prototype.getCustomAttributes=R.prototype.Bh;R.prototype.getVideoElement=R.prototype.Sb;R.prototype.getWrapperCreativeIds=R.prototype.getWrapperCreativeIds;R.prototype.getWrapperAdSystems=R.prototype.getWrapperAdSystems;R.prototype.getWrapperAdIds=R.prototype.getWrapperAdIds;R.prototype.getSequenceLength=R.prototype.gb;R.prototype.getPositionInSequence=R.prototype.sb;R.prototype.getPodTimeOffset=R.prototype.Hb;R.prototype.getPodIndex=R.prototype.getPodIndex;R.prototype.getPodType=R.prototype.Ra;
473
- R.prototype.getMediaBitrate=R.prototype.Qa;R.prototype.getMediaHeight=R.prototype.eb;R.prototype.getMediaWidth=R.prototype.fb;R.prototype.getMediaUrl=R.prototype.getMediaUrl;R.prototype.getClickThroughUrl=R.prototype.qb;R.prototype.isBumper=R.prototype.Tb;R.prototype.canSeek=R.prototype.canSeek;R.prototype.getSkipTimeOffset=R.prototype.getSkipTimeOffset;R.prototype.getPosition=R.prototype.getPosition;R.prototype.getDuration=R.prototype.getDuration;R.prototype.getTitle=R.prototype.getTitle;
474
- R.prototype.getAdvertiserName=R.prototype.getAdvertiserName;R.prototype.getAdSystem=R.prototype.getAdSystem;R.prototype.getApiFramework=R.prototype.getApiFramework;R.prototype.getSourceId=R.prototype.Qb;R.prototype.getCreativeId=R.prototype.getCreativeId;R.prototype.getId=R.prototype.getId;R.prototype.getTechnology=R.prototype.ub;R.prototype.getAdManagerVersion=R.prototype.pb;R.prototype.getAdManagerName=R.prototype.ob;var ov=class{constructor(a){this.a=a.map(b=>({videoId:b.getSurface().getMedia().id,player:b,Nd:!0,ready:Promise.resolve()}));this.g=new _.T("clpp.plist.PlayerPool")}has(){return this.a.some(a=>a.Nd)}get(){const a=this;return _.x(function*(){const b=a.a.find(c=>c.Nd);if(!b)throw Error("No available players in the pool");b.Nd=!1;yield b.ready;return b.player})}release(a){const b=this.a.find(c=>c.player===a);if(!b)return Promise.resolve();b.Nd=!0;b.ready=new Promise(c=>{a.release().catch(d=>{this.g.error("Failed to unload player",
475
- d)}).then(c)});return b.ready}destroy(){const a=this;return _.x(function*(){yield Promise.all(a.a.map(b=>b.player.destroy()))})}};_.z("clpp.utils.dom.createHTMLElement",_.up);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=vp(this,a)}get(){return this.a}};var Bp=class{constructor(a,b){this.g=new _.T("clpp.PlayerSurface");this.w=_.Yg(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 _.Rt;if(null==a)throw new _.I(_.G,7,7102,"No Media element was provided");if(!(a instanceof Element||(a=document.getElementById(a),a)))throw new _.I(_.G,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
476
- HTMLMediaElement))throw new _.I(_.G,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 _.I(_.G,7,7006,"Container element is not a direct parent of media element");d=b.containerEl}else{c=document.createElement(_.Cd);a.parentNode?a.parentNode.replaceChild(c,
477
- 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),_.sp(c,f);c.style.cssText=a.style.cssText;a.removeAttribute(_.Rf);for(d of[_.Hg,_.Zd])f=a.getAttribute(d),f=parseInt(f,10),isNaN(f)||(c.style[d]=`${f}px`),_.Ak()||a.removeAttribute(d);c.appendChild(a);d=c}d&&(this.a.set(d),wp(this.a,"clpp-container"),
478
- wp(this.a,this.o),wp(this.f,_.Zc),wp(this.f,"clpp-video"));b.webOSStartupPatch&&xp(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?_.sp(a,$c):this.g.debug("No media element available that could be hidden")}showMediaElement(){const a=this.getMedia();a?a.classList.remove($c):
479
- 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&&_.sp(a,_.Zc);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){_.sp(a,$c)}show(a){a.classList.remove($c)}release(){this.j.release()}};
480
- Bp.prototype.removeElementFromContainer=Bp.prototype.removeElementFromContainer;Bp.prototype.addElementToContainer=Bp.prototype.addElementToContainer;Bp.prototype.getCastElement=Bp.prototype.getCastElement;Bp.prototype.getContainer=Bp.prototype.getContainer;Bp.prototype.getMedia=Bp.prototype.getMedia;var qv={disableContainer:!1,webOSStartupPatch:!0,crossorigin:"anonymous",containerEl:null},rv=1;var sv=class{constructor(a){this.ka=a;this.o=!!a.sideAdContainer;this.h=[];this.a=a.yg;this.C=Ap(a);this.A=[];const b=Cp(this,this.C,this.ka.mh);this.l=new ov(b);this.f=null;this.w=!1;this.j=new Map;this.F=a.toggleVisible;this.g=new _.T("clpp.interstitial.MultiController");this.Z=this.B=!1;this.G=a.ci||(()=>{});Dp(this).forEach(c=>Ep(this,c,!1))}getCurrentItem(){return this.f}Ud(){return this.f?this.f.player:null}$f(){return Array.from(this.j.values())}pd(){return 0<this.j.size}play(a){return Tp(this,
481
- a,_.Te)}load(a){return Tp(this,a,_.le)}release(){const a=this;return _.x(function*(){yield Promise.all([yield $p(a),a.f?Qp(a,a.f):Promise.resolve()]);a.f=null;a.w=!1})}destroy(){const a=this;return _.x(function*(){a.g.info("Destroy");yield a.release();yield a.l.destroy();lq(a)})}isMuted(){return this.B}},iq="preload",gq=_.pe,Jp="primary",Ip="ad";var uv=class extends _.vu{constructor(a){super();this.ka=_.Yg({ii:.5},a);this.te=this.Z=!1;this.g=new _.T("clpp.interstitial.Player");this.f=a.player;this.f.setSeekInterceptor((b,c)=>{if(c)return!0;if(this.Z)return!1;if(c=tq(this))return this.g.info("Seek ignored while binding interstitial",c.ca),!1;uq(this,b);c=wq(this);const d=xq(this,b),e=yq(this,b);if(c){if(d&&d!==c)return Bq(this,d,b),!1;if(e&&e!==c)return Cq(this,e,b),!1;if(b<c.startTime-this.ka.resolutionOffsetSec)return zq(this,c),!0;if(b<
482
- c.startTime)return bq(this.Y),this.g.info("Seek inside resolution area of",c.ca),!0;if(b<=c.endTime)return this.g.info("Seek into the scheduled interstitial",c.ca),eq(this.Y),!1;if(c.Mf)return this.g.info("Jump over a scheduled interstitial",c.ca),dq(this.Y),c.state=nq,!0;this.g.info("Jump over a scheduled interstitial triggering it",c.ca);eq(this.Y);kq(this.Y,b,!0);return!1}return d?(Bq(this,d,b),!1):e&&!e.oh?(Cq(this,e,b),!1):!0});this.Y=new sv({mh:this.ka.config,yg:a.player,preloadMedia:!0,cb:a.cb,
483
- sideAdContainer:this.ka.sideAdContainer,onAudioDecision:this.ka.onAudioDecision,ci:()=>{this.g.info("Resume primary content")}});this.h=[];this.a=[];this.j=!1;Kq(this,a.player)}destroy(){const a=this;return _.x(function*(){Lq(a);a.a=[];a.j=!1;a.f.setSeekInterceptor(null);yield a.Y.destroy()})}Kb(){return this.j}setMuted(a){var b=this.Y;(b.B=a)?(b.a.setMuted(!0),fq(b,!0)):(a=b.getCurrentItem(),Hp(b,a,a&&a.Lb?Ip:Jp))}isMuted(){return this.Y.isMuted()}isLive(){const a=this.Y.Ud();return a?a.isLive():
484
- null}Va(a){this.f.trigger(a)}},nq=0,sq=1,Xq=2,Yq=3,vq=4,ar=5,oq=6;var Nr=class{constructor(){this.a=null}load(){return Promise.resolve()}start(){return Promise.resolve()}o(a,b,c){const d=a.getConfiguration();a=Object.assign({},{config:d,player:a,cb:b},d.ads.hls||{},{hi:c});this.a=new uv(a);Tq(this.a)}setMuted(a){this.a&&this.a.setMuted(a)}isMuted(){return this.a?this.a.isMuted():!0}resume(){const a=Mq(this.a);a&&a.play()}pause(){const a=Mq(this.a);a&&a.pause()}skip(){}getVolume(){const a=Mq(this.a);return a?a.getVolume()||0:0}setVolume(a){const b=Mq(this.a);if(b)return b.setVolume(a)}getPosition(){const a=
485
- Mq(this.a);return a?a.getPosition():-1}l(){return!this.a.Kb()}h(){return this.a.destroy()}};Nr.prototype.getPosition=Nr.prototype.getPosition;Nr.prototype.setVolume=Nr.prototype.setVolume;Nr.prototype.getVolume=Nr.prototype.getVolume;Nr.prototype.skip=Nr.prototype.skip;Nr.prototype.pause=Nr.prototype.pause;Nr.prototype.resume=Nr.prototype.resume;var vv=class{constructor(a){this.m=a;this.j=this.m.getNetworkEngine();this.a=new _.Rt;this.h=null;this.f=!0;fr(this)}release(){this.a.release();gr(this);this.m=null}};var ir=[];var or=class{constructor(a,b,c){this.h=a;this.f=b;JSON.parse(_.Si(_.Ol(a)));this.a=JSON.parse(_.Si(_.Ol(b)));this.j=c}};var mr={n:"vXdoJIQCz6sZ9pbduNukEHOR0H2dHlwuuBUAR5Ot7WLEYvav5mn63yxr6F6TIl8RHTFw2siXQhHblZH2Y89o8vhcZRFkYXo6h0igEVafu-n0w52UEcH8Cqzlb8Q7x03Qb8OcKLngSzDkwe5Y2Aix6I66RRVNLLssqyjp2n5tXs4JQmYdqY6hhpGhmBN84naeCTdcPpAYhCw8jqbTSNrJp5hjU4GVvOiUtoYCvdESV9xrOR7fPCFXhWfLtC3i1k1zVoIM7YW5qD0F676jhqkF-GmDuCHpRY2I2Cxui-ytYEVIM6_pylSIlmYLjARmv2jXz9aV_WvHLh6B8Yx0slNGCQ",e:"AQAB"},tl="eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJ1cmxzIjpbIjovL2Nhc3RsYWJzLmNvbSJdLCJ0eXBlIjoiV2ViIiwia2lkIjoxOTUwLCJpbHYiOmZhbHNlfQ.jzGGRcbFr_2QET-4tbMcpR5pSaj7eV7X2d1HWw_VKQpPg3zCwSZSDuqw225dIYyAYwLSiElbozbZPSArkBXOsoUm-KZRUPF4m7WG0T7Uza5G-QaQw57BbbfcSsooSpatC997kHKLMTjO71By9Olcu5ykN164nZpGQtZNzQjYag-bnUaMVI5vvhzjlvDihORQ9V_qRlEh0-mpoz6W0-36HGAbWIXWq0kxPh6inbovby-ZmFpqGrVjWOEFa55EARZXPNW9ERupW5xrrYHZdwwTpdRTY5IwEnobS85yTrLhK8Y2MV4jlQLTtQp372fKDsuU6q6_4XvmNq1SgAoKoaf41g";var Pr=class{constructor(a){this.f=a;this.a=null;this.g=new _.T("clpp.utils.LicenseKey")}},Br="vod",Ar="live";var is,Gr,Jr,Hr;is=class{constructor(a){this.m=a;this.f=a.getNetworkEngine();this.h=Kr(this);this.f.Gc(this.h);this.a=null}release(){this.a=null;this.f.Cd(this.h)}};_.wv="maxSuggestedBitrateKbps";Gr={du:"duress",etp:_.Td,mb:_.wv,rd:"responseDelay",rtt:"roundTripTime"};Jr={at:"availabilityTime",br:"encodedBitrateKbps",ht:"heldTime",n:"intermediaryIdentifier",nor:"nextObjectResponse",nrr:"nextRangeResponse",d:"objectDuration",ot:"objectType",su:"startup",st:"streamType",sf:"streamingFormat",v:ng};
486
- Hr=new _.T("clpp.net.CmsdManager");var S=class extends _.vu{constructor(a,b,c){super();jr();this.g=new _.T("clpp.Player");if(!a)throw new _.I(_.G,7,7102);this.da=new _.Rt;this.f=this.C=b||_.wl();this.l=null;void 0===this.f.license&&(this.f.license=tl,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 _.I(_.G,7,7101,"No license provided in configuration!");this.j=new Bp(a,c);this.G=this.A=this.a=
487
- this.F=null;this.I=new _.Dr;this.h=null;this.X=[];this.ba=!0;this.K={};this.fa=null;this.R=!0;this.S=this.P=!1;this.L=this.Nc=null;this.Je=!1;this.ia=new vv(this);this.B=null;this.on(_.Mf,()=>{this.getState()===_.Po&&(this.a?this.a.unload():Promise.resolve())});this.on(_.rc,()=>{this.Je=!0});this.on(_.qc,()=>{this.Je=!1});this.on(_.$f,()=>Or(this));Qr(this,this.f.license);this.j.getMedia()&&(a=this.j.getMedia(),a.hasAttribute("autoplay")&&(a.removeAttribute("autoplay"),this.g.debug("Removed autoplay attribute from video element. Auto play will be handled by configuration."),
488
- void 0===this.f.autoplay&&(this.f.autoplay=!0,this.g.debug("Setting autoplay in configuration since it was specified in the video element"))));a=[];for(const d of Lr)try{const e=d.create(this.f);e&&a.push(e)}catch(e){this.g.error("Error while creating player plugin",e)}Sr(this,a);this.M=_.ma;Gl(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 _.F(_.r,{detail:a}),this.trigger(a)}kd(a){a=
489
- this.K[a];void 0===a&&(a=null);return a}getSurface(){return this.j}getConfiguration(){return _.Zg(this.f)}getDrmInfo(){return this.a?this.a.getDrmInfo():null}detach(){return this.a?this.a.detach():Promise.resolve()}release(){if(null!=this.l)return this.g.info("Player release already in progress"),this.l;this.g.debug("Releasing player");this.l=Vr(this);return this.l.finally(()=>{Wr(this);this.g.debug("Player released");this.l=null})}destroy(){if(this.P)return this.g.debug("The player is already destroyed. No-op"),
490
- new Promise(a=>a());this.P=!0;return this.release().then(()=>{this.g.debug(Aa);this.trigger(new _.F("destroying"));return _.Rr(this,_.Ie)}).then(()=>{this.a&&this.a.stopForwardingEventsTo(this);this.gd.clear();this.ia.release();if(this.a)return this.a.destroy()}).then(()=>this.I.destroy()).then(()=>{Jl();this.A=this.a=null;this.trigger(new _.F("destroyed"))})}load(a){const b=this;return _.x(function*(){try{_.yn(af);b.M=_.ma;b.ba=!0;const c=_.bp(a),d=zl(a)?a:{};if(d.license)throw new _.I(_.G,7,7100,
491
- "License cannot be passed into the load method.");yield _.ds(b,d,c);yield _.es(b);yield _.gs(b);_.yn($e);_.An("player.load",af,$e)}catch(c){Wr(b);if(b.l)throw b.g.info(Na),new _.I(_.G,7,7E3);throw c;}})}preload(a){const b=this;return _.x(function*(){yield _.ds(b,a);if(b.a){var c=b.a;c.preload?yield c.preload(b.f):b.g.warn(jb)}else b.g.warn(fb)})}use(a){(a=Kl(a))&&a.o(this)}remove(a){return(this.getState()<=_.Wo||this.R)&&null!==El(a)?(Ll(a),this.S=!0):!1}play(){return this.a?!this.h||this.h instanceof
492
- Nr||this.a.namespace()===_.dd?this.a.play():this.h.start(this.a):Promise.reject("No player initialized. You need to load content before calling play.")}pause(){return this.a?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 _.uu}getState(){return this.a?this.a.getState():_.Wo}getPeriods(){return this.a?this.a.getPeriods():[]}isEnded(){return this.a&&
493
- this.a.isEnded()||!1}isPaused(){return this.a&&this.a.isPaused()||!1}getPosition(){return this.a?this.a.getPosition():0}seek(a){return this.getState()===_.Po?Promise.reject("Cannot seek in current state."):this.a?this.a.seek(a):Promise.reject("delegate does not exist")}getPresentationStartTime(){return this.a?this.a.getPresentationStartTime():null}getSeekRange(){return this.a?this.a.getSeekRange():{start:0,end:0}}vc(){const a=this.a;return a&&a.vc?a.vc():null}getVolume(){return this.a?this.a.getVolume():
494
- null}setVolume(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"}getPlaybackRate(){return this.a?this.a.getPlaybackRate():1}setPlaybackRate(a,b){this.a&&this.a.setPlaybackRate(a,b)}isMuted(){return this.h&&this.h instanceof Nr?this.h.isMuted():this.a&&this.a.isMuted()||!1}setMuted(a){this.a&&this.a.setMuted(a);this.h&&this.h instanceof Nr&&this.h.setMuted(a)}getNetworkEngine(){return this.I}setNetworkEngine(a){this.I=
495
- a}getTextDisplayer(){return this.a&&this.a.getTextDisplayer()}isLive(){return!!this.a&&this.a.isLive()}getStats(){return this.a?this.a.getStats():null}dg(){return Object.freeze(this.fa)}getLoadedSource(){return this.a&&this.a.getLoadedSource()}getTimelineCues(){return this.a?this.a.getTimelineCues():[]}getCueTimeline(){return this.a?this.a.getCueTimeline():null}resetAbr(){this.a&&this.a.resetAbr()}setDrmCustomDataModifier(a){this.Nc=a;as(this)}setCdnErrorCallback(a){this.L=a;this.a&&this.a.setCdnErrorCallback(this.L)}};
496
- _.z("clpp.Player",S);S.registerPlugin=_.Mr;S.prototype.setCdnErrorCallback=S.prototype.setCdnErrorCallback;S.prototype.setDrmCustomDataModifier=S.prototype.setDrmCustomDataModifier;S.prototype.resetAbr=S.prototype.resetAbr;S.prototype.getTimelineCues=S.prototype.getTimelineCues;S.prototype.getLoadedSource=S.prototype.getLoadedSource;S.prototype.getSources=S.prototype.dg;S.prototype.getStats=S.prototype.getStats;S.prototype.isLive=S.prototype.isLive;S.prototype.getTextDisplayer=S.prototype.getTextDisplayer;
497
- S.prototype.setNetworkEngine=S.prototype.setNetworkEngine;S.prototype.getNetworkEngine=S.prototype.getNetworkEngine;S.prototype.setMuted=S.prototype.setMuted;S.prototype.isMuted=S.prototype.isMuted;S.prototype.setPlaybackRate=S.prototype.setPlaybackRate;S.prototype.getPlaybackRate=S.prototype.getPlaybackRate;S.prototype.namespace=S.prototype.namespace;S.prototype.getAdsManager=S.prototype.getAdsManager;S.prototype.getDuration=S.prototype.getDuration;S.prototype.setVolume=S.prototype.setVolume;
498
- S.prototype.getVolume=S.prototype.getVolume;S.prototype.getTimelineOffset=S.prototype.vc;S.prototype.getSeekRange=S.prototype.getSeekRange;S.prototype.getPresentationStartTime=S.prototype.getPresentationStartTime;S.prototype.seek=S.prototype.seek;S.prototype.getPosition=S.prototype.getPosition;S.prototype.isPaused=S.prototype.isPaused;S.prototype.isEnded=S.prototype.isEnded;S.prototype.getState=S.prototype.getState;S.prototype.getBufferInfo=S.prototype.getBufferInfo;S.prototype.getTrackManager=S.prototype.getTrackManager;
499
- S.prototype.pause=S.prototype.pause;S.prototype.play=S.prototype.play;S.prototype.remove=S.prototype.remove;S.prototype.use=S.prototype.use;S.prototype.load=S.prototype.load;S.prototype.destroy=S.prototype.destroy;S.prototype.release=S.prototype.release;S.prototype.getDrmInfo=S.prototype.getDrmInfo;S.prototype.getConfiguration=S.prototype.getConfiguration;S.prototype.getSurface=S.prototype.getSurface;S.prototype.getPlugin=S.prototype.kd;S.prototype.off=S.prototype.off;S.prototype.one=S.prototype.one;
500
- S.prototype.on=S.prototype.on;_.Wo=0;_.Xo=1;_.So=2;_.Zo=3;_.Yo=4;_.Oo=5;_.Po=6;_.kv=7;_.Vo={IDLE:_.Wo,PREPARING:_.Xo,BUFFERING:_.So,PLAYING:_.Zo,PAUSED:_.Yo,ENDED:_.Oo,ERROR:_.Po,UNSET:_.kv};S.State=_.Vo;var Lr=[];var xv=class extends S{constructor(a,b,c){super(a,b,c);a={manifest:{timeline:{version:2},keepTimelineLive:!0},streaming:{preferNativeHlsOnSafari:!1,enableLiveEdgeChasing:!1,startAtSegmentBoundary:!1}};this.C=_.Yg(this.C,a);this.f=_.Yg(this.f,a);this.H=0;this.o=[];this.V=!1;this.w=null;this.J=[]}open(a,b){const c=this;return _.x(function*(){if(c.w)throw new _.I(_.G,7,7008,`Cannot call open() while ${c.w}() is ongoing!`);if(0!==a)throw new _.I(_.G,7,7007,"The index parameter only supports the value of 0.");
501
- if(0===b.length)throw new _.I(_.G,7,7003,Xa);if(b.some(g=>!g.id||!g.source))throw new _.I(_.G,7,7100,"Some config is missing required properties `id` or `source`!");if((new Set(b.map(g=>g.id))).size!==b.length)throw new _.I(_.G,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 _.I(_.G,7,7100,"Unsupported `playlist.timeline` config value!");e=d.startTime;if(null!=e&&(typeof e!==_.t||0>e))throw new _.I(_.G,
502
- 7,7100,"Invalid `playlist.startTime` config value!");f=d.endTime;if(null!=f&&(typeof f!==_.t||0>f||null!=e&&f<=e))throw new _.I(_.G,7,7100,"Invalid `playlist.endTime` config value!");if("DVR"===d.content&&!f)throw new _.I(_.G,7,7100,"`playlist.endTime` config value is required for DVR content!");}try{ks(c),c.w="open",yield ns(c,b),c.H=0,c.o=b,c.V=!0,os(c,b[0].playlist||{})}finally{c.w=null}})}Ug(a){const b=this;return _.x(function*(){if(b.w)throw new _.I(_.G,7,7008,`Cannot call addItem() while ${b.w}() is ongoing!`);
503
- if(!b.V)throw new _.I(_.G,7,7008,"open() must be called before addItem()!");if(!a.id||!a.source)throw new _.I(_.G,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 _.I(_.G,7,7100,"A config with this `id` already exists in the playlist!");try{b.w="addItem",b.o.push(a),yield ps(b,a)}finally{b.w=null}})}getCurrentItem(){return this.o[this.H]||null}getCurrentItemIndex(){return this.H}Eh(){return[...this.o]}md(){return this.o.length}getTimeline(){return this.a?
504
- this.a.getTimeline():null}seekWith(a){return this.a?this.a.seekWith(a):Promise.resolve()}release(){this.o=[];this.H=0;this.V=!1;return super.release()}destroy(){ks(this);return super.destroy()}setCdnErrorCallback(){throw new _.I(1,7,7009,"CDN switching is not supported!");}};_.z("clpp.plist.ScPlaylist",xv);xv.prototype.setCdnErrorCallback=xv.prototype.setCdnErrorCallback;xv.prototype.destroy=xv.prototype.destroy;xv.prototype.release=xv.prototype.release;xv.prototype.seekWith=xv.prototype.seekWith;
505
- xv.prototype.getTimeline=xv.prototype.getTimeline;xv.prototype.getSize=xv.prototype.md;xv.prototype.getPlaylist=xv.prototype.Eh;xv.prototype.getCurrentItemIndex=xv.prototype.getCurrentItemIndex;xv.prototype.getCurrentItem=xv.prototype.getCurrentItem;xv.prototype.addItem=xv.prototype.Ug;xv.prototype.open=xv.prototype.open;var yv=class extends _.vu{constructor(a){super();this.ka=_.Yg({transition:_.Pe,preloadMedia:!1},a);this.h=[];this.a=0;const b=qs(a.anchorId,this.ka.config);this.o=new ov(b);this.f=null;this.j=!1;this.l=new Map;this.w=a.toggleVisible;this.g=new _.T(kd);this.o.a.forEach(c=>rs(this,c.player,!1))}jd(){return this.f}Ud(){return this.f?this.f.player:null}Zf(){return this.l.get(this.a+1)||null}ag(){return this.l.get(this.a-1)||null}$f(){return[this.ag(),this.Zf()].filter(Boolean)}yi(a){if(0<this.h.length)throw Error("Cannot re-set items in the playlist");
506
- this.g.info("Set items",a);this.h=a.map((b,c)=>({config:b,index:c,preloadPromise:Promise.resolve(),disposers:[]}))}xi(a){if(0===this.h.length)throw Error(Wa);if(0>a||a>this.h.length-1)throw Error("Index out of bounds");this.a=a}pd(){return this.a<this.h.length-1}eg(){return 0<this.a}fi(){const a=this;return _.x(function*(){if(a.j)a.g.warn("Cannot play first item while busy");else if(0===a.h.length)a.g.warn(Wa);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})`),
507
- yield us(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,ys(a)}}})}vg(){const a=this;return _.x(function*(){if(a.j)a.g.warn("Cannot play next item while busy");else if(a.pd()){a.j=!0;a.a+=1;a.g.info(`Next (index: ${a.a})`);var b=a.f;a.ka.transition===_.Pe&&b.player.pause();Ds(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 zs(a,c),a.g.info(`Next playing (index: ${a.a})`)}catch(d){throw a.g.error(`Next failed (index: ${a.a})`),
508
- d;}finally{a.j=!1,b&&Cs(a,b),ys(a)}}else a.g.warn("There are no more items in the playlist")})}gi(){const a=this;return _.x(function*(){if(a.j)a.g.warn("Cannot play previous item while busy");else if(a.eg()){a.j=!0;--a.a;a.g.info(`Previous (index: ${a.a})`);var b=a.f;a.ka.transition===_.Pe&&b.player.pause();Ds(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 zs(a,c),a.g.info(`Previous playing (index: ${a.a})`)}catch(d){throw a.g.error(`Previous failed (index: ${a.a})`),
509
- d;}finally{a.j=!1,b&&Cs(a,b),ys(a)}}else a.g.warn("There are no more previous items in the playlist")})}destroy(){const a=this;return _.x(function*(){a.g.info("Destroy");yield Promise.all([Es(a),a.f?Cs(a,a.f):Promise.resolve()]);yield Is(a)})}};_.z(kd,yv);yv.prototype.destroy=yv.prototype.destroy;yv.prototype.playPrev=yv.prototype.gi;yv.prototype.playNext=yv.prototype.vg;yv.prototype.playFirst=yv.prototype.fi;yv.prototype.hasPrev=yv.prototype.eg;yv.prototype.hasNext=yv.prototype.pd;
510
- yv.prototype.setIndex=yv.prototype.xi;yv.prototype.setItems=yv.prototype.yi;yv.prototype.getPreloading=yv.prototype.$f;yv.prototype.getPrev=yv.prototype.ag;yv.prototype.getNext=yv.prototype.Zf;yv.prototype.getCurrentPlayer=yv.prototype.Ud;yv.prototype.getCurrent=yv.prototype.jd;var Bs="preload",ss=_.pe;var Js=new Map;var Bv=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]===_.Bc;if(!window.muxjs||!c&&!d)return!1;if(d)return _.Ks(Hc);if(b)return _.Ks(Ls(b,a));b=Ls(_.p,a);a=Ls(_.w,a);return _.Ks(b)||_.Ks(a)}isMuxed(a,b){return 1<this.demuxMimeTypes(a,b).size}demuxMimeTypes(a,
511
- b){const c=new Map;c.set(a,b);try{const d=_.sk(b),e=_.tk(b).split(","),f=new Map,g=Ai(_.p,e),h=Ai(_.w,e);g&&f.set(_.p,this.convertCodecs(_.p,_.rk(d,g)));h&&f.set(_.w,this.convertCodecs(_.w,_.rk(d,h)));return f}catch(d){return c}}convertCodecs(a,b){return b.toLowerCase().split(";")[0]===_.Bc?Hc:"mp2t"===b.toLowerCase().split(";")[0].split("/")[1]?Ls(a,b):b}getOriginalMimeType(){return this.h}transmux(a){const b=[],c=[];let d=[],e=null;a=_.K(a);const f=h=>{d=h.captions;const k=new Uint8Array(h.data.byteLength+
512
- h.initSegment.byteLength);k.set(h.initSegment,0);k.set(h.data,h.initSegment.byteLength);h.type===zv?b.push(k):h.type===Av&&c.push(k)},g=()=>{e={video:_.Sl(...b),captions:d,audio:_.Sl(...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 _.I(_.G,3,3018);return e}};mk(_.Bc,()=>new Bv(_.Bc));mk(_.qg,()=>new Bv(_.qg));var Av=_.p,zv=_.w;var Cv=class{getCuePoints(){}Kb(){}Jb(){}};_.z("clpp.ads.IAdsTimeline",Cv);Cv.prototype.hasPostroll=Cv.prototype.Jb;Cv.prototype.hasPreroll=Cv.prototype.Kb;Cv.prototype.getCuePoints=Cv.prototype.getCuePoints;_.Dv=class{f(){}a(){}h(){}o(){}};var Gv=class extends _.Bu{constructor(a,b,c,d,e){super(Ja);this.l=a;this.j=b;this.h=c;this.a=d;this.o=e;this.g=new _.T(ed);_.bj(this.l)?this.g.warn(_.Hb):this.$a(_.td,{licenseUrl:this.l,videoRobustness:[_.ob,void 0],audioRobustness:[_.nb,void 0],persistentStateRequired:!1,distinctiveIdentifierRequired:!1,serverCertificate:null,modifiers:{licenseRequest:this.Bd.bind(this)}});_.bj(this.j)?this.g.warn(_.eb):this.$a(_.rd,{licenseUrl:this.j,videoRobustness:["3000"],audioRobustness:["2000"],modifiers:{licenseRequest:this.Bd.bind(this)}});
513
- _.bj(this.h)?this.g.warn(_.Ea):_.bj(this.a)?this.g.warn(_.Da):this.$a(_.pd,{licenseUrl:this.h,certificateUrl:this.a,modifiers:{licenseRequest:this.qg.bind(this),licenseResponse:this.rg.bind(this),certificateRequest:this.Bd.bind(this),extractContentId:this.Uf.bind(this)}})}Bd(a,b){a=a.drm.customData.headers||{};for(const c of Object.keys(a))b.headers[c]=a[c]}Uf(a,b){a=qm(b);switch(this.o){case Ev:return a;case Fv:return(new _.rm(a)).a;default:throw Error("Unknown content ID strategy");}}qg(a,b){b.headers[va]=
514
- Ac;this.Bd(a,b);a={spc:_.Ml(b.body)};b.body=_.Yi(_.gj(a,!0))}rg(a,b){a=_.Si(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=_.Ol(a).buffer}};_.z(ed,Gv);Gv.prototype.onFairPlayLicenseResponse=Gv.prototype.rg;Gv.prototype.onFairPlayLicenseRequest=Gv.prototype.qg;Gv.prototype.extractFairPlayContentId=Gv.prototype.Uf;Gv.prototype.onLicenseRequest=Gv.prototype.Bd;Gv.prototype.constructor=Gv.prototype.constructor;Gv.NAME=Ja;
515
- var Fv="hostname",Ev="full-skd";Gv.FairPlayContentIdStrategy={HOSTNAME:Fv,FULL_SKD:Ev};_.z("clpp.drm.HeaderDrmComponent",class extends _.Dv{h(a){a=a.getConfiguration();if(a.drm&&a.drm&&a.drm.env===Ja){a=a.drm.customData;if(!a)throw new _.I(_.G,7,7100,_.ud);a=new Gv(a.widevineLicenseUrl,a.playReadyLicenseUrl,a.fairPlayLicenseUrl,a.fairPlayCertificateUrl,a.fairPlayContentIdStrategy||Ev);_.Wl(a)}}a(){delete _.Vl.HeaderDrm}id(){return"headerdrm"}});_.kr(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=_.K(c);a=new Uint8Array(this,a,b-a);d.set(a);return c})});_.kr(function(){_.sh("mathRound.install")});_.kr(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",
516
- {get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitSupportsFullscreen||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",Ms);document.addEventListener("webkitfullscreenerror",Ms);document.addEventListener("mozfullscreenchange",Ms);document.addEventListener("mozfullscreenerror",Ms);document.addEventListener("MSFullscreenChange",Ms);document.addEventListener("MSFullscreenError",Ms)}});_.kr(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(_.sh("PiPWebkit.install"),document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=Os,document.exitPictureInPicture=Ps,document.addEventListener("webkitpresentationmodechanged",Ns,!0))}});_.kr(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in a&&(a.getVideoPlaybackQuality=Qs)}});_.kr(function(){if(window.VTTCue)_.rh("Using native VTTCue.");else if(window.TextTrackCue){var a=TextTrackCue.length;if(3===a)_.rh(Bb),window.VTTCue=Rs;else if(6===a)_.rh("Using VTTCue polyfill from 6 argument TextTrackCue."),window.VTTCue=Ss;else{try{var b=!!Rs(1,2,"")}catch(c){b=!1}b&&(_.rh(Bb),window.VTTCue=Rs)}}else _.th("VTTCue not available.")});var Ts;_.kr(function(){_.sh("InputEvent.install");_.zk("Trident/")&&HTMLInputElement.prototype.addEventListener!==Us&&(_.rh("Patching input event support on IE."),Ts=HTMLInputElement.prototype.addEventListener,HTMLInputElement.prototype.addEventListener=Us)});_.kr(function(){navigator.languages||Object.defineProperty(navigator,"languages",{get:()=>navigator.language?[navigator.language]:["en"]})});_.kr(function(){_.sh("VideoPlayPromise.install");if(window.HTMLMediaElement){const a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){const b=a.apply(this);b&&b.catch(()=>{});return b}}});var Xs=class{constructor(){this.a=Vs()}};var Hv=class{constructor(a,b){b=void 0===b?2:b;this.a=new Uint8Array(a);this.h=b;this.f=0}};_.Iv=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 Jv;_.Kv=class{constructor(){this.a=new Blob([Jv],{type:_.rg})}canPlay(a){var b=document.createElement(_.w);b.setAttribute("playsinline","playsinline");a&&(b.muted=!0,b.setAttribute("muted","muted"));b.src=URL.createObjectURL(this.a);const c=new _.Ij;b=b.play();const d=(new _.wk(()=>{d.stop();c.resolve(a)})).la(.25);void 0!==b?b.then(()=>{d.stop();c.resolve(!0)}).catch(e=>{e&&e.message&&e.message===bb?(d.stop(),c.resolve(!0)):(d.stop(),c.resolve(!1))}):(d.stop(),c.resolve(!0));return c}};
517
- Jv=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,
428
+ 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]};_.su=class{constructor(a){this.I=a;this.f={}}Xa(a,b){this.f[a]=b}};_.x("clpp.drm.DrmEnvironment",_.su);_.su.prototype.setDrmSystem=_.su.prototype.Xa;_.Sm=class{constructor(a,b){b=void 0===b?!1:b;this.f=_.hh(a)?new DataView(new ArrayBuffer(a),0,a):a;this.a=0;this.h=b;this.buffer=this.f.buffer}getPosition(){return this.a}Ma(){return this.f.byteLength}seek(a){(0>a||a>=this.f.byteLength)&&_.um();this.a=a}};_.Jn=class{constructor(a,b){this.f=a;this.h=void 0===b?!0:b;this.a=0}getPosition(){return this.a}Ma(){return this.f.byteLength}skip(a){this.a+a>this.f.byteLength&&_.xm();this.a+=a}seek(a){if(0>a||a>=this.f.byteLength)throw _.xm();this.a=a}};
429
+ _.x("clpp.utils.dataview.DataViewReader",_.Jn);_.Nm=class{constructor(){this.h=[];this.f=[];this.a=!1;this.g=new _.S("clpp.mp4")}N(a,b){a=Em(a);this.h[a]=tu;this.f[a]=b;return this}fa(a,b){a=Em(a);this.h[a]=uu;this.f[a]=b;return this}stop(){this.a=!0}parse(a,b){a=_.G(a);a=new _.Jn(new DataView(a.buffer,a.byteOffset,a.byteLength),!1);for(this.a=!1;_.wm(a)&&!this.a;)this.ce(0,a,b)}ce(a,b,c){const d=b.getPosition();let e=_.O(b);var f=_.O(b);let g=!1;this.g.debug("Parsing MP4 box",_.Fm(f));switch(e){case 0:e=b.Ma()-d;break;case 1:e=_.Bm(b),g=!0}const h=
430
+ this.f[f];if(h){let m=null;var k=null;this.h[f]===uu&&(k=_.O(b),m=k>>>24,k&=16777215);f=b.getPosition()-d;var l=d+e;c&&l>b.Ma()&&(l=b.Ma());l-=b.getPosition();b=0<l?_.Dm(b,l):new Uint8Array(0);b=new _.Jn(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.Ma()-b.getPosition()),b.skip(a)}};_.x("clpp.utils.Mp4Parser",_.Nm);_.Nm.typeToString=_.Fm;
431
+ _.Nm.allData=_.Im;_.Nm.sampleDescription=_.Hm;_.Nm.children=_.Gm;_.Nm.prototype.parseNext=_.Nm.prototype.ce;_.Nm.prototype.parse=_.Nm.prototype.parse;_.Nm.prototype.stop=_.Nm.prototype.stop;_.Nm.prototype.fullBox=_.Nm.prototype.fa;_.Nm.prototype.box=_.Nm.prototype.N;_.Nm.headerSize=_.Jm;var tu=0,uu=1;var vu=class{};_.x("clpp.utils.FairplayUtils",vu);vu.parseFairPlayResponse=_.Vm;vu.formatFairPlayRequest=_.Um;vu.createFairplayPayload=Tm;vu.extractContentId=_.Mm;vu.extractExtXKeyUri=Km;var an=new _.S("clpp.drm.DrmToday"),ln="PRODUCTION",mn="STAGING",nn="DEMO",on="TEST",wu={PRODUCTION:ln,STAGING:mn,DEMO:nn,TEST:on};_.x("clpp.drm.DrmToday.Environment",wu);_.x("clpp.drm.DrmToday.WidevineCertificates",{V1_PROD:"V1_PROD",V1_STAGING:"V1_STAGING",V2:"V2"});
432
+ var Xm="/license-proxy-widevine/cenc/",Ym="/license-proxy-headerauth/drmtoday/RightsManager.asmx",Zm="/license-server-fairplay/",pn={"00000":"Success","01000":"General Internal Error","02000":"General Request Error","03000":"General Request Authentication Error",10001:"Bad Request",3E4:"General DRM error",4E4:"General Widevine Modular error",40001:"Widevine Device Certificate Revocation (wv 127)",40002:"Widevine Device Certificate Revocation - Permanently (wv 175)",41E3:"General Widevine Classic error",
433
+ 42E3:"General Playready error",43E3:"General Fairplay error",44E3:"General OMA error",44001:"OMA Device registration failed",45E3:"General CDRM error",45001:"CDRM Device registration failed",6E4:"CSL",60001:"CSL - INVALID",60100:"CSL - Denied by Stream Limiting",7E4:"General Output Protection",70001:"All keys filtered by EOP settings",8E4:"TAKE DOWN",80001:"TAKE DOWN - Denied by Take Down",9E4:"General GBL error",90001:"License delivery prohibited in your region"},xu=[Ga,Ia,Ha,_.ob,_.nb],yu=[Ga,Ia,
434
+ Ha,_.ob,_.nb],zu=["3000","2000","150"],Au=["2000","150"];
435
+ for(const a of Object.keys(wu)){let b=ya;a!==ln&&(b+=`_${a}`);const c=new _.su(b);let d=null;switch(a){case ln:case mn:case nn:d=tm("V2");break;case on:d=null}c.Xa(_.ud,{licenseUrl:$m(_.ud,a),videoRobustness:xu,audioRobustness:yu,persistentStateRequired:!1,distinctiveIdentifierRequired:!1,serverCertificate:d,modifiers:{licenseRequest:_.cn,licenseResponse:_.dn}});c.Xa(_.qd,{licenseUrl:$m(_.qd,a),certificateUrl:Wm(a)+"/license-server-fairplay/cert/",modifiers:{licenseRequest:_.fn,licenseResponse:_.gn,
436
+ extractContentId:_.hn,certificateRequest:_.jn}});c.Xa(_.sd,{licenseUrl:$m(_.sd,a),videoRobustness:zu,audioRobustness:Au,modifiers:{licenseRequest:kn}});_.pm(c)};_.Bu=class{constructor(a){this.f=a;this.a=void 0}value(){void 0===this.a&&(this.a=this.f());return this.a}};var Du=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,Cu.value())}get(a){if(this.has(a))return this.a}has(a){const b=Cu.value();return this.a&&ti(a,b)?!0:!1}entries(){}keys(){}values(){}},Cu=new _.Bu(()=>zi(new Uint8Array([0])));var tn=new _.Bu(()=>new Map([[HTMLMediaElement.HAVE_METADATA,_.pe],[HTMLMediaElement.HAVE_CURRENT_DATA,_.oe],[HTMLMediaElement.HAVE_FUTURE_DATA,Pc],[HTMLMediaElement.HAVE_ENOUGH_DATA,Qc]]));var Fu=class{constructor(){this.j=this.w=null}l(a){this.w=a}h(a){const b=this.j;b&&b!==a&&vn(b,null);return(this.j=a)?vn(a,this.w):Promise.resolve()}o(){return this.j}a(a,b){_.uh("AppleEmeManager.requestMediaKeySystemAccess");try{const c=new Eu(a,b);return Promise.resolve(c)}catch(c){return Promise.reject(c)}}f(){return fo}},Eu=class{constructor(a,b){this.keySystem=a;if(a.startsWith(_.qd))for(var c of b){a:{a=c;if(a.persistentState===_.xf){a=null;break a}b={audioCapabilities:[],videoCapabilities:[],
437
+ persistentState:_.Ne,distinctiveIdentifier:_.Ne,initDataTypes:a.initDataTypes,sessionTypes:[Uf],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),
438
+ e=!0));d||(e=WebKitMediaKeys.isTypeSupported(this.keySystem,_.tg));a=e?b:null}if(a){this.a=a;return}}c=Error(zb);c.name=bb;c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}createMediaKeys(){const a=new Gu(this.keySystem);return Promise.resolve(a)}getConfiguration(){_.uh("AppleEmeManager.MediaKeySystemAccess.getConfiguration");return this.a}},Gu=class{constructor(a){this.f=null;this.h=new WebKitMediaKeys(a);this.a=new _.Kt;this.j=0;this.g=new _.S(id);this.g.info("Created Media Keys for "+a)}createSession(a){a=
439
+ void 0===a?Uf:a;this.g.debug("Creating Apple MediaKeys Session");if(a!==Uf)throw new TypeError("Session type "+a+ba);return new Hu(this.h,`__session_${this.j++}`)}setServerCertificate(){this.g.debug("AppleEmeManager.MediaKeys.setServerCertificate");return Promise.resolve(!1)}},Hu=class extends _.nu{constructor(a,b){super();this.a=null;this.o=a;this.f=this.h=null;this.j=new _.Kt;this.sessionId=b;this.expiration=NaN;this.closed=new _.xk;this.l=!1;this.keyStatuses=new Du;this.g=new _.S(id)}generateRequest(a,
440
+ b){if(this.l)return Promise.reject(pb);this.g.debug("generateRequest");this.h=new _.xk;try{const c=this.o.createSession(_.tg,_.G(b));this.a=c;this.sessionId=c.sessionId||this.sessionId||"";this.j.on(c,Hg,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 _.C(_.ue,{messageType:void 0===e||e===Of?je:ie,message:zi(d.message.buffer)});this.dispatchEvent(d)}});this.j.on(c,Fg,d=>{this.g.debug("onWebkitKeyAdded_",
441
+ d);this.f&&(wn(this,"usable"),this.f.resolve(),this.f=null)});this.j.on(c,Gg,()=>{var d=this.keyStatuses.getStatus();if(this.a&&this.a&&this.a.error&&this.a.error.code===WebKitMediaKeyError.MEDIA_KEYERR_DOMAIN&&d===Of)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),
442
+ 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:wn(this,"output-not-allowed");break;default:wn(this,_.fe)}});wn(this,Of)}catch(c){this.h.reject(c)}return this.h}load(){this.g.debug(_.ne);return Promise.reject(Error("MediaKeySession.load not yet supported"))}update(a){if(this.l)return Promise.reject(pb);this.g.debug(jg);this.f=new _.xk;try{this.a.update(_.G(a))}catch(b){this.f.reject(b)}return this.f}close(){if(this.l)return this.closed;
443
+ this.g.info(`Closing Key Session ${this.sessionId}`);this.l=!0;try{this.a.close(),this.closed.resolve(),_.Hh(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"))}},Iu=class{a(){return fo}f(){return!!window.WebKitMediaKeys}create(){return new Fu}};var Ju=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(Sa)}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 Jo}},
444
+ Ku=class{a(){return Jo}f(){return!!(window.MediaKeys&&navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)}create(){return new Ju}};var Nu=class{constructor(){this.w=this.j=null;this.A="";HTMLMediaElement.prototype.webkitGenerateKeyRequest&&(this.A="webkit")}l(a){this.j=a}h(a){_.uh("WebkitEmeManager.setMediaKeys");if(!this.j)return Promise.reject(Sa);const b=this.w;b&&b!==a&&zn(b,null);(this.w=a)&&zn(a,this.j);return Promise.resolve()}o(){return this.w}a(a,b){_.uh("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=
445
+ new Lu(this.A,c,a,b);return Promise.resolve(e)}catch(e){return Promise.reject(e)}}f(){return Mu}},Lu=class{constructor(a,b,c,d){this.h=a;this.a=this.keySystem=c;a=!1;c===_.Oe&&(this.a=Eg,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,this.a)&&
446
+ (f.push(k),e=!0));h||(e=b.canPlayType(_.tg,this.a)||b.canPlayType("video/webm",this.a));g.persistentState!==_.xf||a||(e=!1);if(e){this.f=g;return}}b=zb;if(c===_.Oe||c===_.ud)b="None of the requested configurations were supported.";c=Error(b);c.name=bb;c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}createMediaKeys(){return Promise.resolve(new Ou(this.h,this.a))}getConfiguration(){return this.f}},Ou=class{constructor(a,b){this.h=a;this.o=b;this.a=null;this.f=new _.Kt;this.j=[];this.l=new Map}createSession(a=
447
+ Uf){if(a!==Uf&&a!==_.Se)throw new TypeError("Session type "+a+ba);if(!this.a)throw a=Error("Media element is missing."),a.name=Ka,a.code=DOMException.INVALID_STATE_ERR,a;this.a.src||(this.a.src="about:blank");a=new Pu(this.h,this.a,this.o,a);this.j.push(a);return a}setServerCertificate(){return Promise.resolve(!1)}},Pu=class extends _.nu{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=
448
+ new Du}ready(){_.uh("WebkitEmeManager.MediaKeySession.ready");yn(this,"usable");this.a&&this.a.resolve();this.a=null}generateRequest(a,b){_.uh("WebkitEmeManager.MediaKeySession.generateRequest");return Bn(this,b,null)}load(a){_.uh(Gb);return this.l===_.Se?Bn(this,null,a):Promise.reject(Error(Za))}update(a){_.uh(Gb);const b=new _.xk;Cn(this,b,a);return b}close(){_.uh("WebkitEmeManager.MediaKeySession.close");if(this.l!==_.Se){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),
449
+ this.closed;const a=An(this,"cancelKeyRequest");try{this.j[a](this.h,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed}remove(){_.uh("WebkitEmeManager.MediaKeySession.remove");return this.l!==_.Se?Promise.reject(Error(Za)):this.close()}},Qu=class{a(){return Mu}f(){return!(!HTMLMediaElement.prototype.webkitGenerateKeyRequest&&!HTMLMediaElement.prototype.generateKeyRequest)}create(){return new Nu}};var Su=class{l(){}h(a){_.uh("NopEmeManager.setMediaKeys");return null===a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}o(){return null}a(){_.uh("NopEmeManager.requestMediaKeySystemAccess");return Promise.reject(Error("The key system specified is not supported."))}f(){return Ru}},Tu=class{a(){return Ru}f(){return!0}create(){return new Su}};var Uu=class{};_.x(jd,Uu);var En=new _.S(jd),Dn=[];Dn=[new Ku,new Iu,new Qu,new Tu].filter(a=>a.f());var Jo="STANDARD",fo="APPLE",Mu="WEBKIT",Ru="NOP";Uu.Apis={STANDARD:Jo,APPLE:fo,WEBKIT:Mu,NOP:Ru};_.Vu=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,_.Xf)}catch(e){}if(!d)return null;a=d.documentElement;return b&&a.tagName!==
450
+ b||0<d.getElementsByTagName("parsererror").length?null:a}removeChild(a,b){a.removeChild(b)}};_.Pg=_.Vu.prototype;_.Pg.yd=_.Rg(19);_.Pg.ee=_.Rg(17);_.Pg.Ud=_.Rg(15);_.Pg.Vd=_.Rg(13);_.Pg.de=_.Rg(11);_.Pg.Dc=_.Rg(9);_.Pg.Ld=_.Rg(7);_.Pg.$=_.Rg(5);_.Pg.oc=_.Rg(3);_.Pg.Lb=_.Rg(1);_.P=new _.Vu;_.Wu=new _.S("clpp.xml.Parser");_.Wl="dom";var Hn,Xu,Gn;_.Pn=[154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149];Hn=[237,239,139,169,121,214,74,206,163,200,39,220,213,29,33,237];Xu=class{constructor(a,b,c){this.j=new Uint8Array(a);this.a=b;this.f=c}};Gn=class extends Xu{};_.On=class extends Xu{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 Rn=!!(performance&&performance.mark&&performance.measure),Tn=new _.S("clpp.perf");var wo=class{constructor(a){this.f=[];this.h=[];this.a=[];8<=a.byteLength&&(new _.Nm).fa("pssh",this.j.bind(this)).parse(a.buffer);0===this.a.length&&_.B("No pssh box found!")}j(a){if(1<a.version)_.B("Unrecognized PSSH version found!");else{var b=_.Dk(_.Dm(a.reader,16)),c=[];if(0<a.version){var d=_.O(a.reader);for(let e=0;e<d;++e){const f=_.Dk(_.Dm(a.reader,16));c.push(f)}}d=_.O(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});
451
+ a.reader.getPosition()!==a.reader.Ma()&&_.B("Mismatch between box size and data size!")}}};var ro,Yu;
452
+ _.zp=class{constructor(a,b){this.D=a;this.Za=b;this.J=new Set;this.C=this.I=this.l=null;this.T=!1;this.a=null;this.K=Yu;this.B=new _.Kt;this.M=new ru;this.h=new Map;this.L=[];this.H=new _.xk;this.ya=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.ca=new Map;this.V=new _.Mj(()=>io(this));this.j=!1;this.ha=new _.xk;this.G=!1;this.Z=[];this.ia=!1;this.R=0;this.g=new _.S("clpp.drm.DrmEngine");this.ea=(new _.Mj(()=>{jo(this)})).yb(1);this.H.catch(()=>{});
453
+ this.A=this.F=!1;this.P=null}destroy(){const a=this;return _.w(function*(){a.j?yield a.ha:(a.j=!0,yield ko(a),a.ha.resolve())})}keySystem(){return this.a?_.Xn(this.a.keySystem):""}getDrmInfo(){return this.a}Ua(a){const b=this;return _.w(function*(){b.G&&b.K===ro||(!b.f.delayLicenseRequestUntilPlayed||b.C&&!b.C.paused||b.ia?yield Bo(b,a):b.Z.push(a))})}Ta(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===
454
+ _.Qf){var g=f;f=e;e=g}if(Wn(this.a.keySystem)&&16===f.byteLength&&_.Oj()){g=_.yi(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!==Of&&(c.loaded=!0);c&&c.eb&&c.eb.resolve();"expired"===e&&(d=!0);f=_.G(f);let h=_.Dk(f);"00"===h&&c&&c.keyId?h=c.keyId:this.a.keySystem.startsWith(_.qd)&&16!==f.byteLength&&(h=Ai(f));(f=h||"")?this.g.info(`Key status for Key ID '${h}': ${e}`):this.g.info(`Key status global keys: ${e}`);
455
+ 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.ib.forEach(e=>{this.o.get(e)===Of&&(this.g.warn(`Key status for Key ID '${e}': 'output-restricted'`),this.o.set(e,_.Pe))});for(a=0;a<this.a.initData.length;a++){const e=this.a.initData[a];e.keyId&&this.o.get(e.keyId)===Of&&_.Ek(e.initData,c.initData)&&(this.g.warn(`Key status for Key ID '${e.keyId}': 'output-restricted'`),this.o.set(e.keyId,_.Pe))}a=b.expiration-Date.now();(0>a||d&&1E3>
456
+ a)&&c&&!c.ec&&(this.g.debug("Session has expired",b.sessionId),(a=this.h.get(b))&&a.Fc&&a.Fc.stop(),this.h.delete(b),b.close().catch(()=>{}));Lo(this)&&(this.H.resolve(),1!==this.h.size||d?this.V.la(.5):io(this))}};ro=0;Yu=3;_.Xo=new Map;_.Yo=new _.S("clpp.text");var Zu=class{constructor(){this.a=null;this.f=[]}};var $u=class{constructor(){this.h=this.f=this.j=null;this.a=[]}};_.av=class{constructor(){this.h=this.w=this.B=this.C=this.l=this.o=this.j=this.A=NaN;this.a=new Zu;this.f=new $u}getStats(){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:bp(this.a,_.sp),pauseTime:bp(this.a,_.rp),bufferingTime:bp(this.a,_.lp),stateHistory:cp(this.a),switchHistory:dp(this.f)}}};var cv=class{constructor(a){this.g=new _.S("clpp.StateManager");this.m=a;this.a=new _.Kt;this.f=_.pp;this.w=_.bv;this.G=0;this.o=-1;this.J=this.l=this.H=this.A=0;this.h=this.Y=this.C=!1;this.F=0;this.j=null;this.I=0;this.K=_.ak();this.B=!1;this.H=Date.now();jp(this)}Sa(a,b){this.m&&this.m.trigger(new _.C(a,{detail:b}))}getState(){return mp(this,"")}destroy(){this.g.debug("Stop watching for video events for "+this.m.namespace());this.a.release()}};_.x("clpp.utils.media.detectType",tp);var wp=new _.S("clpp.sources");var dv=class extends _.qu{constructor(){super(kd);this.w=this.G=!1;this.l=this.A=this.o=this.a=this.j=null;this.h=new _.Kt;this.F=this.B=this.f=this.H=null}init(a,b){super.init(a,b);this.j=new cv(this);gp(this.j,_.pp)}namespace(){return kd}unload(){const a=this;return _.w(function*(){if(a.ga){a.log.debug("Releasing player with source",a.ga);a.B&&(a.B.stop(),a.B=null);var b=a.getTrackManager();b&&b.release();a.A&&(a.A.destroy(),a.A=null);a.M&&(a.M.destroy(),a.M=null);a.l&&a.l.release();a.o&&(a.o.destroy(),
457
+ a.o=null);_.Hh(a.h);a.f&&(a.f=new _.av);a.F=null;a.ga=null;a.G=!1;a.a&&(a.a.removeAttribute("src"),a.a.load());if(a.w)throw new _.I(_.F,7,7E3);a.a&&(b=a.a,a.h.off(b,_.Ud),a.h.off(b,_.yf),a.a=null)}})}release(){return super.release().then(()=>this.unload()).then(()=>{this.j&&gp(this.j,_.pp)})}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(Aa);const a=this.getTrackManager();
458
+ a&&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.fc}load(a){const b=this;return _.w(function*(){if(b.w)return Promise.reject(new _.I(_.F,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()/
459
+ 1E3;b.f=new _.av;b.h.on(b,_.Nf,()=>{b.f&&_.ap(b.f.a,b.getState())});gp(b.j,_.qp);b.ga=_.vp(a);b.configuration=_.Zl(b.ha,a);b.log.debug(_.Pa,b.configuration);b.log.debug(_.gb,b.ga);const d=_.$o(b.configuration,[_.ce,"native"]);b.M=d.create(b);b.M.setTextVisibility(!0);b.configuration.enableHtmlCue&&_.bm(_.Tf)&&!_.ck()&&(b.A=new Yt(b),b.A.start(c));b.l?b.l.release():b.l=new Lt(b);c.textTracks&&ci(b.l,c.textTracks);b.getTrackManager().load();c.loop=!!b.configuration.loop;_.z(b.configuration.volume)||
460
+ b.setVolume(b.configuration.volume);_.z(b.configuration.muted)||b.setMuted(b.configuration.muted);b.h.one(c,Pc,()=>{b.trigger(new _.C(_.dg))});null==b.configuration.startTime&&Fp(b,c);_.ak()&&Gp(b,c);try{yp(b,c),yield Bp(b),yield Ep(b).U}catch(e){b.G=!1,b.onError(e)}})}onError(a){this.G||(a.severity===_.F&&null!==this.j&&gp(this.j,_.ip),this.trigger(new _.C(_.Ud,{detail:a})))}Bg(){return new U}getState(){return null!==this.j?this.j.getState().currentState:_.bv}getPresentationStartTime(){if(this.a&&
461
+ this.a.getStartDate&&this.isLive()){const a=this.a.getStartDate();return isNaN(a.getTime())?null: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 _.ep();this.f&&_.ap(this.f.a,this.getState());var a=this.a,b=this.f,c=a.videoHeight;
462
+ b.A=a.videoWidth;b.j=c;a.getVideoPlaybackQuality&&(c=a.getVideoPlaybackQuality(),a=this.f,b=Number(c.totalVideoFrames),a.o=Number(c.droppedVideoFrames),a.l=b,this.f.C=Number(c.corruptedVideoFrames));if(a=this.getTrackManager())if(a=a.qa())a.bandwidth&&(this.f.w=a.bandwidth),a.Sc&&(this.f.h=a.Sc);return this.f.getStats()}getTimelineCues(){return this.l?this.l.getTimelineCues():[]}getCueTimeline(){return null}};
463
+ _.yh(new class{a(){return kd}canPlay(a,b){a=a.type||"";const c=a===_.uc,d=a===_.Bc,e=a===_.Ql;var f;_.Zj()||c||d||e&&!_.ak()?f=0:f=""!==Nj().canPlayType(a)?e&&_.ak()&&(window.ManagedMediaSource||window.MediaSource&&MediaSource.isTypeSupported)&&!b.streaming.preferNativeHlsOnSafari?1:2:0;return f}f(a){return a===_.na}create(){return new dv}});_.x("clpp.ads.PodType",{PREROLL:0,MIDROLL:1,POSTROLL:2});_.x("clpp.ads.Technology",{CLIENT_SIDE:0,SERVER_SIDE:1,SERVER_GUIDED:2});_.x("clpp.ads.ErrorType",{LOAD:0,PLAY:1,OTHER:2});var Ip=new _.S("clpp.ads"),Hp=[];var ev=class{load(){}start(){}o(){}resume(){}pause(){}skip(){}getVolume(){}setVolume(){}getPosition(){}h(){}l(){}};_.x("clpp.ads.IAdsManager",ev);ev.prototype.getPosition=ev.prototype.getPosition;ev.prototype.setVolume=ev.prototype.setVolume;ev.prototype.getVolume=ev.prototype.getVolume;ev.prototype.skip=ev.prototype.skip;ev.prototype.pause=ev.prototype.pause;ev.prototype.resume=ev.prototype.resume;var V=class{kb(){}lb(){}rb(){}getId(){}getCreativeId(){}Mb(){}getApiFramework(){}getAdSystem(){}getAdvertiserName(){}getTitle(){}getDuration(){}getPosition(){}getSkipTimeOffset(){}Pb(){}nb(){}getMediaUrl(){}bb(){}ab(){}Na(){}Oa(){}getPodIndex(){}Eb(){}pb(){}cb(){}getWrapperAdIds(){}getWrapperAdSystems(){}getWrapperCreativeIds(){}Ob(){}canSeek(){}};_.x("clpp.ads.IAd",V);V.prototype.canSeek=V.prototype.canSeek;V.prototype.getVideoElement=V.prototype.Ob;V.prototype.getWrapperCreativeIds=V.prototype.getWrapperCreativeIds;
464
+ V.prototype.getWrapperAdSystems=V.prototype.getWrapperAdSystems;V.prototype.getWrapperAdIds=V.prototype.getWrapperAdIds;V.prototype.getSequenceLength=V.prototype.cb;V.prototype.getPositionInSequence=V.prototype.pb;V.prototype.getPodTimeOffset=V.prototype.Eb;V.prototype.getPodIndex=V.prototype.getPodIndex;V.prototype.getPodType=V.prototype.Oa;V.prototype.getMediaBitrate=V.prototype.Na;V.prototype.getMediaHeight=V.prototype.ab;V.prototype.getMediaWidth=V.prototype.bb;V.prototype.getMediaUrl=V.prototype.getMediaUrl;
465
+ V.prototype.getClickThroughUrl=V.prototype.nb;V.prototype.isBumper=V.prototype.Pb;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.Mb;
466
+ V.prototype.getCreativeId=V.prototype.getCreativeId;V.prototype.getId=V.prototype.getId;V.prototype.getTechnology=V.prototype.rb;V.prototype.getAdManagerVersion=V.prototype.lb;V.prototype.getAdManagerName=V.prototype.kb;var Q=class{constructor(a,b,c,d,e,f,g){this.w=this.o=this.l=!1;this.F=a;this.f=b;this.a=c;this.h=d;this.j=0;this.B=`${e}:${b}`;this.G=e;this.videoEl=null;this.A=f;this.C=g||null}kb(){return""}lb(){return""}rb(){return 2}getId(){return this.B}getCreativeId(){return""}Mb(){return this.G}getApiFramework(){return null}getAdSystem(){return""}getAdvertiserName(){return""}getTitle(){return""}getDuration(){return this.h}getPosition(){return this.j}getSkipTimeOffset(){return-1}canSeek(){return this.A}Pb(){return!1}nb(){return null}getMediaUrl(){return null}bb(){return 0}ab(){return 0}Na(){return 0}Oa(){return this.F}getPodIndex(){return 0}Eb(){return 0}pb(){return this.f}cb(){return this.a}getWrapperAdIds(){return[]}getWrapperAdSystems(){return[]}getWrapperCreativeIds(){return[]}Ob(){return this.videoEl}sh(){return this.C}};
467
+ Q.prototype.getCustomAttributes=Q.prototype.sh;Q.prototype.getVideoElement=Q.prototype.Ob;Q.prototype.getWrapperCreativeIds=Q.prototype.getWrapperCreativeIds;Q.prototype.getWrapperAdSystems=Q.prototype.getWrapperAdSystems;Q.prototype.getWrapperAdIds=Q.prototype.getWrapperAdIds;Q.prototype.getSequenceLength=Q.prototype.cb;Q.prototype.getPositionInSequence=Q.prototype.pb;Q.prototype.getPodTimeOffset=Q.prototype.Eb;Q.prototype.getPodIndex=Q.prototype.getPodIndex;Q.prototype.getPodType=Q.prototype.Oa;
468
+ Q.prototype.getMediaBitrate=Q.prototype.Na;Q.prototype.getMediaHeight=Q.prototype.ab;Q.prototype.getMediaWidth=Q.prototype.bb;Q.prototype.getMediaUrl=Q.prototype.getMediaUrl;Q.prototype.getClickThroughUrl=Q.prototype.nb;Q.prototype.isBumper=Q.prototype.Pb;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;
469
+ Q.prototype.getAdvertiserName=Q.prototype.getAdvertiserName;Q.prototype.getAdSystem=Q.prototype.getAdSystem;Q.prototype.getApiFramework=Q.prototype.getApiFramework;Q.prototype.getSourceId=Q.prototype.Mb;Q.prototype.getCreativeId=Q.prototype.getCreativeId;Q.prototype.getId=Q.prototype.getId;Q.prototype.getTechnology=Q.prototype.rb;Q.prototype.getAdManagerVersion=Q.prototype.lb;Q.prototype.getAdManagerName=Q.prototype.kb;var fv=class{constructor(a){this.a=a.map(b=>({videoId:b.getSurface().getMedia().id,player:b,Ed:!0,ready:Promise.resolve()}));this.g=new _.S("clpp.plist.PlayerPool")}has(){return this.a.some(a=>a.Ed)}get(){const a=this;return _.w(function*(){const b=a.a.find(c=>c.Ed);if(!b)throw Error("No available players in the pool");b.Ed=!1;yield b.ready;return b.player})}release(a){const b=this.a.find(c=>c.player===a);if(!b)return Promise.resolve();b.Ed=!0;b.ready=new Promise(c=>{a.release().catch(d=>{this.g.error("Failed to unload player",
470
+ d)}).then(c)});return b.ready}destroy(){const a=this;return _.w(function*(){yield Promise.all(a.a.map(b=>b.player.destroy()))})}};_.x("clpp.utils.dom.createHTMLElement",_.Op);var gv=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=Pp(this,a)}get(){return this.a}};var Vp=class{constructor(a,b){this.g=new _.S("clpp.PlayerSurface");this.w=_.$g(hv,b);this.f=new gv;this.h=null;this.a=new gv;this.l=iv;iv+=1;this.o=`clpp-video-${this.l}`;this.j=new _.Kt;if(null==a)throw new _.I(_.F,7,7102,"No Media element was provided");if(!(a instanceof Element||(a=document.getElementById(a),a)))throw new _.I(_.F,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
471
+ HTMLMediaElement))throw new _.I(_.F,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 _.I(_.F,7,7006,"Container element is not a direct parent of media element");d=b.containerEl}else{c=document.createElement(_.Dd);a.parentNode?a.parentNode.replaceChild(c,
472
+ 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),_.Mp(c,f);c.style.cssText=a.style.cssText;a.removeAttribute(_.Sf);for(d of[_.Jg,_.ae])f=a.getAttribute(d),f=parseInt(f,10),isNaN(f)||(c.style[d]=`${f}px`),_.Qj()||a.removeAttribute(d);c.appendChild(a);d=c}d&&(this.a.set(d),Qp(this.a,"clpp-container"),
473
+ Qp(this.a,this.o),Qp(this.f,_.Zc),Qp(this.f,"clpp-video"));b.webOSStartupPatch&&Rp(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?_.Mp(a,$c):this.g.debug("No media element available that could be hidden")}showMediaElement(){const a=this.getMedia();a?a.classList.remove($c):
474
+ 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&&_.Mp(a,_.Zc);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){_.Mp(a,$c)}show(a){a.classList.remove($c)}release(){this.j.release()}};
475
+ Vp.prototype.removeElementFromContainer=Vp.prototype.removeElementFromContainer;Vp.prototype.addElementToContainer=Vp.prototype.addElementToContainer;Vp.prototype.getCastElement=Vp.prototype.getCastElement;Vp.prototype.getContainer=Vp.prototype.getContainer;Vp.prototype.getMedia=Vp.prototype.getMedia;var hv={disableContainer:!1,webOSStartupPatch:!0,crossorigin:"anonymous",containerEl:null},iv=1;var jv=class{constructor(a){this.ka=a;this.o=!!a.sideAdContainer;this.h=[];this.a=a.pg;this.C=Up(a);this.A=[];const b=Wp(this,this.C,this.ka.dh);this.l=new fv(b);this.f=null;this.w=!1;this.j=new Map;this.F=a.toggleVisible;this.g=new _.S("clpp.interstitial.MultiController");this.Y=this.B=!1;this.G=a.Sh||(()=>{});Xp(this).forEach(c=>Yp(this,c,!1))}getCurrentItem(){return this.f}Md(){return this.f?this.f.player:null}Qf(){return Array.from(this.j.values())}hd(){return 0<this.j.size}play(a){return mq(this,
476
+ a,_.Ue)}load(a){return mq(this,a,_.ne)}release(){const a=this;return _.w(function*(){yield Promise.all([yield tq(a),a.f?jq(a,a.f):Promise.resolve()]);a.f=null;a.w=!1})}destroy(){const a=this;return _.w(function*(){a.g.info("Destroy");yield a.release();yield a.l.destroy();Fq(a)})}isMuted(){return this.B}},Cq="preload",Aq=_.re,cq="primary",bq="ad";var kv=class extends _.nu{constructor(a){super();this.ka=_.$g({Yh:.5},a);this.le=this.Y=!1;this.g=new _.S("clpp.interstitial.Player");this.f=a.player;this.f.setSeekInterceptor((b,c)=>{if(c)return!0;if(this.Y)return!1;if(c=Nq(this))return this.g.info("Seek ignored while binding interstitial",c.da),!1;Oq(this,b);c=Qq(this);const d=Rq(this,b),e=Sq(this,b);if(c){if(d&&d!==c)return Vq(this,d,b),!1;if(e&&e!==c)return Wq(this,e,b),!1;if(b<c.startTime-this.ka.resolutionOffsetSec)return Tq(this,c),!0;if(b<
477
+ c.startTime)return vq(this.X),this.g.info("Seek inside resolution area of",c.da),!0;if(b<=c.endTime)return this.g.info("Seek into the scheduled interstitial",c.da),yq(this.X),!1;if(c.Bf)return this.g.info("Jump over a scheduled interstitial",c.da),xq(this.X),c.state=Hq,!0;this.g.info("Jump over a scheduled interstitial triggering it",c.da);yq(this.X);Eq(this.X,b,!0);return!1}return d?(Vq(this,d,b),!1):e&&!e.fh?(Wq(this,e,b),!1):!0});this.X=new jv({dh:this.ka.config,pg:a.player,preloadMedia:!0,$a:a.$a,
478
+ sideAdContainer:this.ka.sideAdContainer,onAudioDecision:this.ka.onAudioDecision,Sh:()=>{this.g.info("Resume primary content")}});this.h=[];this.a=[];this.j=!1;dr(this,a.player)}destroy(){const a=this;return _.w(function*(){er(a);a.a=[];a.j=!1;a.f.setSeekInterceptor(null);yield a.X.destroy()})}Gb(){return this.j}setMuted(a){var b=this.X;(b.B=a)?(b.a.setMuted(!0),zq(b,!0)):(a=b.getCurrentItem(),aq(b,a,a&&a.Hb?bq:cq))}isMuted(){return this.X.isMuted()}isLive(){const a=this.X.Md();return a?a.isLive():
479
+ null}Sa(a){this.f.trigger(a)}},Hq=0,Mq=1,qr=2,rr=3,Pq=4,ur=5,Iq=6;var gs=class{constructor(){this.a=null}load(){return Promise.resolve()}start(){return Promise.resolve()}o(a,b,c){const d=a.getConfiguration();a=Object.assign({},{config:d,player:a,$a:b},d.ads.hls||{},{Xh:c});this.a=new kv(a);mr(this.a)}setMuted(a){this.a&&this.a.setMuted(a)}isMuted(){return this.a?this.a.isMuted():!0}resume(){const a=fr(this.a);a&&a.play()}pause(){const a=fr(this.a);a&&a.pause()}skip(){}getVolume(){const a=fr(this.a);return a?a.getVolume()||0:0}setVolume(a){const b=fr(this.a);if(b)return b.setVolume(a)}getPosition(){const a=
480
+ fr(this.a);return a?a.getPosition():-1}l(){return!this.a.Gb()}h(){return this.a.destroy()}};gs.prototype.getPosition=gs.prototype.getPosition;gs.prototype.setVolume=gs.prototype.setVolume;gs.prototype.getVolume=gs.prototype.getVolume;gs.prototype.skip=gs.prototype.skip;gs.prototype.pause=gs.prototype.pause;gs.prototype.resume=gs.prototype.resume;var lv=class{constructor(a){this.m=a;this.j=this.m.getNetworkEngine();this.a=new _.Kt;this.h=null;this.f=!0;zr(this)}release(){this.a.release();Ar(this);this.m=null}};var Cr=[];var Ir=class{constructor(a,b,c){this.h=a;this.f=b;JSON.parse(_.Bi(_.Bk(a)));this.a=JSON.parse(_.Bi(_.Bk(b)));this.j=c}};var Gr={n:"vXdoJIQCz6sZ9pbduNukEHOR0H2dHlwuuBUAR5Ot7WLEYvav5mn63yxr6F6TIl8RHTFw2siXQhHblZH2Y89o8vhcZRFkYXo6h0igEVafu-n0w52UEcH8Cqzlb8Q7x03Qb8OcKLngSzDkwe5Y2Aix6I66RRVNLLssqyjp2n5tXs4JQmYdqY6hhpGhmBN84naeCTdcPpAYhCw8jqbTSNrJp5hjU4GVvOiUtoYCvdESV9xrOR7fPCFXhWfLtC3i1k1zVoIM7YW5qD0F676jhqkF-GmDuCHpRY2I2Cxui-ytYEVIM6_pylSIlmYLjARmv2jXz9aV_WvHLh6B8Yx0slNGCQ",e:"AQAB"},Ul="eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJ1cmxzIjpbIjovL2Nhc3RsYWJzLmNvbSJdLCJ0eXBlIjoiV2ViIiwia2lkIjoxOTUwLCJpbHYiOmZhbHNlfQ.jzGGRcbFr_2QET-4tbMcpR5pSaj7eV7X2d1HWw_VKQpPg3zCwSZSDuqw225dIYyAYwLSiElbozbZPSArkBXOsoUm-KZRUPF4m7WG0T7Uza5G-QaQw57BbbfcSsooSpatC997kHKLMTjO71By9Olcu5ykN164nZpGQtZNzQjYag-bnUaMVI5vvhzjlvDihORQ9V_qRlEh0-mpoz6W0-36HGAbWIXWq0kxPh6inbovby-ZmFpqGrVjWOEFa55EARZXPNW9ERupW5xrrYHZdwwTpdRTY5IwEnobS85yTrLhK8Y2MV4jlQLTtQp372fKDsuU6q6_4XvmNq1SgAoKoaf41g";var is=class{constructor(a){this.f=a;this.a=null;this.g=new _.S("clpp.utils.LicenseKey")}},Vr="vod",Ur="live";var Cs,$r,cs,as;Cs=class{constructor(a){this.m=a;this.f=a.getNetworkEngine();this.h=ds(this);this.f.Ac(this.h);this.a=null}release(){this.a=null;this.f.td(this.h)}};_.mv="maxSuggestedBitrateKbps";$r={du:"duress",etp:_.Vd,mb:_.mv,rd:"responseDelay",rtt:"roundTripTime"};cs={at:"availabilityTime",br:"encodedBitrateKbps",ht:"heldTime",n:"intermediaryIdentifier",nor:"nextObjectResponse",nrr:"nextRangeResponse",d:"objectDuration",ot:"objectType",su:"startup",st:"streamType",sf:"streamingFormat",v:pg};
481
+ as=new _.S("clpp.net.CmsdManager");var R=class extends _.nu{constructor(a,b,c){super();Dr();this.g=new _.S("clpp.Player");this.g.info("SDK version: 6.27.0");if(!a)throw new _.I(_.F,7,7102);this.ea=new _.Kt;this.f=this.C=b||_.Xl();this.l=null;void 0===this.f.license&&(this.f.license=Ul,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 _.I(_.F,7,7101,"No license provided in configuration!");
482
+ this.j=new Vp(a,c);this.G=this.A=this.a=this.F=null;this.I=new _.Xr;this.h=null;this.Z=[];this.ca=!0;this.K={};this.ha=null;this.R=!0;this.T=this.P=!1;this.L=this.Gc=null;this.Be=!1;this.ia=new lv(this);this.B=null;this.on(_.Nf,()=>{this.getState()===_.ip&&(this.a?this.a.unload():Promise.resolve())});this.on(_.rc,()=>{this.Be=!0});this.on(_.qc,()=>{this.Be=!1});this.on(_.bg,()=>hs(this));js(this,this.f.license);this.j.getMedia()&&(a=this.j.getMedia(),a.hasAttribute("autoplay")&&(a.removeAttribute("autoplay"),
483
+ this.g.debug("Removed autoplay attribute from video element. Auto play will be handled by configuration."),void 0===this.f.autoplay&&(this.f.autoplay=!0,this.g.debug("Setting autoplay in configuration since it was specified in the video element"))));a=[];for(const d of es)try{const e=d.create(this.f);e&&a.push(e)}catch(e){this.g.error("Error while creating player plugin",e)}ls(this,a);this.M=_.na;gm(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,
484
+ b)}onError(a){if(null!==this.a)this.a.onError(a);else a=new _.C(_.Ud,{detail:a}),this.trigger(a)}cd(a){a=this.K[a];void 0===a&&(a=null);return a}getSurface(){return this.j}getConfiguration(){return _.ah(this.f)}getDrmInfo(){return this.a?this.a.getDrmInfo():null}detach(){return this.a?this.a.detach():Promise.resolve()}release(){if(null!=this.l)return this.g.info("Player release already in progress"),this.l;this.g.debug("Releasing player");this.l=os(this);return this.l.finally(()=>{ps(this);this.g.debug("Player released");
485
+ this.l=null})}destroy(){if(this.P)return this.g.debug("The player is already destroyed. No-op"),new Promise(a=>a());this.P=!0;return this.release().then(()=>{this.g.debug(Aa);this.trigger(new _.C("destroying"));return _.ks(this,_.Je)}).then(()=>{this.a&&this.a.stopForwardingEventsTo(this);this.Zc.clear();this.ia.release();if(this.a)return this.a.destroy()}).then(()=>this.I.destroy()).then(()=>{jm();this.A=this.a=null;this.trigger(new _.C("destroyed"))})}load(a){const b=this;return _.w(function*(){try{_.Sn(bf);
486
+ b.M=_.na;b.ca=!0;const c=_.vp(a),d=$l(a)?a:{};if(d.license)throw new _.I(_.F,7,7100,"License cannot be passed into the load method.");yield _.xs(b,d,c);yield _.ys(b);yield _.As(b);_.Sn(af);_.Un("player.load",bf,af)}catch(c){ps(b);if(b.l)throw b.g.info(Oa),new _.I(_.F,7,7E3);throw c;}})}preload(a){const b=this;return _.w(function*(){yield _.xs(b,a);if(b.a){var c=b.a;c.preload?yield c.preload(b.f):b.g.warn(jb)}else b.g.warn(fb)})}use(a){(a=km(a))&&a.o(this)}remove(a){return(this.getState()<=_.pp||this.R)&&
487
+ null!==em(a)?(lm(a),this.T=!0):!1}play(){return this.a?!this.h||this.h instanceof gs||this.a.namespace()===_.ed?this.a.play():this.h.start(this.a):Promise.reject("No player initialized. You need to load content before calling play.")}pause(){return this.a?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 _.mu}getState(){return this.a?
488
+ this.a.getState():_.pp}getPeriods(){return this.a?this.a.getPeriods():[]}isEnded(){return this.a&&this.a.isEnded()||!1}isPaused(){return this.a&&this.a.isPaused()||!1}getPosition(){return this.a?this.a.getPosition():0}seek(a){return this.getState()===_.ip?Promise.reject("Cannot seek in current state."):this.a?this.a.seek(a):Promise.reject("delegate does not exist")}getPresentationStartTime(){return this.a?this.a.getPresentationStartTime():null}getSeekRange(){return this.a?this.a.getSeekRange():{start:0,
489
+ end:0}}qc(){const a=this.a;return a&&a.qc?a.qc():null}getVolume(){return this.a?this.a.getVolume():null}setVolume(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"}getPlaybackRate(){return this.a?this.a.getPlaybackRate():1}setPlaybackRate(a,b){this.a&&this.a.setPlaybackRate(a,b)}isMuted(){return this.h&&this.h instanceof gs?this.h.isMuted():this.a&&this.a.isMuted()||!1}setMuted(a){this.a&&
490
+ this.a.setMuted(a);this.h&&this.h instanceof gs&&this.h.setMuted(a)}getNetworkEngine(){return this.I}setNetworkEngine(a){this.I=a}getTextDisplayer(){return this.a&&this.a.getTextDisplayer()}isLive(){return!!this.a&&this.a.isLive()}getStats(){return this.a?this.a.getStats():null}Uf(){return Object.freeze(this.ha)}getLoadedSource(){return this.a&&this.a.getLoadedSource()}getTimelineCues(){return this.a?this.a.getTimelineCues():[]}getCueTimeline(){return this.a?this.a.getCueTimeline():null}resetAbr(){this.a&&
491
+ this.a.resetAbr()}setDrmCustomDataModifier(a){this.Gc=a;us(this)}setCdnErrorCallback(a){this.L=a;this.a&&this.a.setCdnErrorCallback(this.L)}};_.x("clpp.Player",R);R.registerPlugin=_.fs;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.getSources=R.prototype.Uf;
492
+ 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.getPlaybackRate=R.prototype.getPlaybackRate;R.prototype.namespace=R.prototype.namespace;
493
+ 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.qc;R.prototype.getSeekRange=R.prototype.getSeekRange;R.prototype.getPresentationStartTime=R.prototype.getPresentationStartTime;R.prototype.seek=R.prototype.seek;R.prototype.getPosition=R.prototype.getPosition;R.prototype.isPaused=R.prototype.isPaused;
494
+ 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;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.destroy=R.prototype.destroy;R.prototype.release=R.prototype.release;R.prototype.getDrmInfo=R.prototype.getDrmInfo;
495
+ R.prototype.getConfiguration=R.prototype.getConfiguration;R.prototype.getSurface=R.prototype.getSurface;R.prototype.getPlugin=R.prototype.cd;R.prototype.off=R.prototype.off;R.prototype.one=R.prototype.one;R.prototype.on=R.prototype.on;_.pp=0;_.qp=1;_.lp=2;_.sp=3;_.rp=4;_.hp=5;_.ip=6;_.bv=7;_.op={IDLE:_.pp,PREPARING:_.qp,BUFFERING:_.lp,PLAYING:_.sp,PAUSED:_.rp,ENDED:_.hp,ERROR:_.ip,UNSET:_.bv};R.State=_.op;var es=[];var nv=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.C=_.$g(this.C,a);this.f=_.$g(this.f,a);this.H=0;this.o=[];this.V=!1;this.w=null;this.J=[]}open(a,b){const c=this;return _.w(function*(){if(c.w)throw new _.I(_.F,7,7008,`Cannot call open() while ${c.w}() is ongoing!`);if(0!==a)throw new _.I(_.F,7,7007,"The index parameter only supports the value of 0.");
496
+ if(0===b.length)throw new _.I(_.F,7,7003,Xa);if(b.some(g=>!g.id||!g.source))throw new _.I(_.F,7,7100,"Some config is missing required properties `id` or `source`!");if((new Set(b.map(g=>g.id))).size!==b.length)throw new _.I(_.F,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 _.I(_.F,7,7100,"Unsupported `playlist.timeline` config value!");e=d.startTime;if(null!=e&&(typeof e!==_.r||0>e))throw new _.I(_.F,
497
+ 7,7100,"Invalid `playlist.startTime` config value!");f=d.endTime;if(null!=f&&(typeof f!==_.r||0>f||null!=e&&f<=e))throw new _.I(_.F,7,7100,"Invalid `playlist.endTime` config value!");if("DVR"===d.content&&!f)throw new _.I(_.F,7,7100,"`playlist.endTime` config value is required for DVR content!");}try{Es(c),c.w="open",yield Ks(c,b),c.H=0,c.o=b,c.V=!0,Ls(c,b[0].playlist||{})}finally{c.w=null}})}Mg(a){const b=this;return _.w(function*(){if(b.w)throw new _.I(_.F,7,7008,`Cannot call addItem() while ${b.w}() is ongoing!`);
498
+ if(!b.V)throw new _.I(_.F,7,7008,"open() must be called before addItem()!");if(!a.id||!a.source)throw new _.I(_.F,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 _.I(_.F,7,7100,"A config with this `id` already exists in the playlist!");try{b.w="addItem",b.o.push(a),yield Ms(b,a)}finally{b.w=null}})}getCurrentItem(){return this.o[this.H]||null}getCurrentItemIndex(){return this.H}vh(){return[...this.o]}ed(){return this.o.length}getTimeline(){return this.a?
499
+ this.a.getTimeline():null}seekWith(a){return this.a?this.a.seekWith(a):Promise.resolve()}release(){this.o=[];this.H=0;this.V=!1;return super.release()}destroy(){Es(this);return super.destroy()}setCdnErrorCallback(){throw new _.I(1,7,7009,"CDN switching is not supported!");}};_.x("clpp.plist.ScPlaylist",nv);nv.prototype.setCdnErrorCallback=nv.prototype.setCdnErrorCallback;nv.prototype.destroy=nv.prototype.destroy;nv.prototype.release=nv.prototype.release;nv.prototype.seekWith=nv.prototype.seekWith;
500
+ nv.prototype.getTimeline=nv.prototype.getTimeline;nv.prototype.getSize=nv.prototype.ed;nv.prototype.getPlaylist=nv.prototype.vh;nv.prototype.getCurrentItemIndex=nv.prototype.getCurrentItemIndex;nv.prototype.getCurrentItem=nv.prototype.getCurrentItem;nv.prototype.addItem=nv.prototype.Mg;nv.prototype.open=nv.prototype.open;var ov=class extends _.nu{constructor(a){super();this.ka=_.$g({transition:_.Qe,preloadMedia:!1},a);this.h=[];this.a=0;const b=Ns(a.anchorId,this.ka.config);this.o=new fv(b);this.f=null;this.j=!1;this.l=new Map;this.w=a.toggleVisible;this.g=new _.S(ld);this.o.a.forEach(c=>Os(this,c.player,!1))}bd(){return this.f}Md(){return this.f?this.f.player:null}Pf(){return this.l.get(this.a+1)||null}Rf(){return this.l.get(this.a-1)||null}Qf(){return[this.Rf(),this.Pf()].filter(Boolean)}mi(a){if(0<this.h.length)throw Error("Cannot re-set items in the playlist");
501
+ this.g.info("Set items",a);this.h=a.map((b,c)=>({config:b,index:c,preloadPromise:Promise.resolve(),disposers:[]}))}li(a){if(0===this.h.length)throw Error(Wa);if(0>a||a>this.h.length-1)throw Error("Index out of bounds");this.a=a}hd(){return this.a<this.h.length-1}Vf(){return 0<this.a}Vh(){const a=this;return _.w(function*(){if(a.j)a.g.warn("Cannot play first item while busy");else if(0===a.h.length)a.g.warn(Wa);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})`),
502
+ yield Rs(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,Vs(a)}}})}mg(){const a=this;return _.w(function*(){if(a.j)a.g.warn("Cannot play next item while busy");else if(a.hd()){a.j=!0;a.a+=1;a.g.info(`Next (index: ${a.a})`);var b=a.f;a.ka.transition===_.Qe&&b.player.pause();$s(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 Ws(a,c),a.g.info(`Next playing (index: ${a.a})`)}catch(d){throw a.g.error(`Next failed (index: ${a.a})`),
503
+ d;}finally{a.j=!1,b&&Zs(a,b),Vs(a)}}else a.g.warn("There are no more items in the playlist")})}Wh(){const a=this;return _.w(function*(){if(a.j)a.g.warn("Cannot play previous item while busy");else if(a.Vf()){a.j=!0;--a.a;a.g.info(`Previous (index: ${a.a})`);var b=a.f;a.ka.transition===_.Qe&&b.player.pause();$s(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 Ws(a,c),a.g.info(`Previous playing (index: ${a.a})`)}catch(d){throw a.g.error(`Previous failed (index: ${a.a})`),
504
+ d;}finally{a.j=!1,b&&Zs(a,b),Vs(a)}}else a.g.warn("There are no more previous items in the playlist")})}destroy(){const a=this;return _.w(function*(){a.g.info("Destroy");yield Promise.all([at(a),a.f?Zs(a,a.f):Promise.resolve()]);yield bt(a)})}};_.x(ld,ov);ov.prototype.destroy=ov.prototype.destroy;ov.prototype.playPrev=ov.prototype.Wh;ov.prototype.playNext=ov.prototype.mg;ov.prototype.playFirst=ov.prototype.Vh;ov.prototype.hasPrev=ov.prototype.Vf;ov.prototype.hasNext=ov.prototype.hd;
505
+ ov.prototype.setIndex=ov.prototype.li;ov.prototype.setItems=ov.prototype.mi;ov.prototype.getPreloading=ov.prototype.Qf;ov.prototype.getPrev=ov.prototype.Rf;ov.prototype.getNext=ov.prototype.Pf;ov.prototype.getCurrentPlayer=ov.prototype.Md;ov.prototype.getCurrent=ov.prototype.bd;var Ys="preload",Ps=_.re;var ct=new Map;var rv=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 _.dt(Hc);if(b)return _.dt(et(b,a));b=et(_.q,a);a=et(_.t,a);return _.dt(b)||_.dt(a)}isMuxed(a,b){return 1<this.demuxMimeTypes(a,b).size}demuxMimeTypes(a,
506
+ b){const c=new Map;c.set(a,b);try{const d=_.vl(b),e=_.wl(b).split(","),f=new Map,g=Xi(_.q,e),h=Xi(_.t,e);g&&f.set(_.q,this.convertCodecs(_.q,_.ul(d,g)));h&&f.set(_.t,this.convertCodecs(_.t,_.ul(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]?et(a,b):b}getOriginalMimeType(){return this.h}transmux(a){const b=[],c=[];let d=[],e=null;a=_.G(a);const f=h=>{d=h.captions;const k=new Uint8Array(h.data.byteLength+
507
+ h.initSegment.byteLength);k.set(h.initSegment,0);k.set(h.data,h.initSegment.byteLength);h.type===pv?b.push(k):h.type===qv&&c.push(k)},g=()=>{e={video:_.Fk(...b),captions:d,audio:_.Fk(...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 _.I(_.F,3,3018);return e}};pl(_.Dc,()=>new rv(_.Dc));pl(_.sg,()=>new rv(_.sg));var qv=_.q,pv=_.t;var sv=class{getCuePoints(){}Gb(){}Fb(){}};_.x("clpp.ads.IAdsTimeline",sv);sv.prototype.hasPostroll=sv.prototype.Fb;sv.prototype.hasPreroll=sv.prototype.Gb;sv.prototype.getCuePoints=sv.prototype.getCuePoints;_.uv=class{f(){}a(){}h(){}o(){}};var xv=class extends _.su{constructor(a,b,c,d,e){super(Ja);this.l=a;this.j=b;this.h=c;this.a=d;this.o=e;this.g=new _.S(hd);_.Li(this.l)?this.g.warn(_.Hb):this.Xa(_.ud,{licenseUrl:this.l,videoRobustness:[_.ob,void 0],audioRobustness:[_.nb,void 0],persistentStateRequired:!1,distinctiveIdentifierRequired:!1,serverCertificate:null,modifiers:{licenseRequest:this.sd.bind(this)}});_.Li(this.j)?this.g.warn(_.eb):this.Xa(_.sd,{licenseUrl:this.j,videoRobustness:["3000"],audioRobustness:["2000"],modifiers:{licenseRequest:this.sd.bind(this)}});
508
+ _.Li(this.h)?this.g.warn(_.Ea):_.Li(this.a)?this.g.warn(_.Da):this.Xa(_.qd,{licenseUrl:this.h,certificateUrl:this.a,modifiers:{licenseRequest:this.hg.bind(this),licenseResponse:this.ig.bind(this),certificateRequest:this.sd.bind(this),extractContentId:this.Kf.bind(this)}})}sd(a,b){a=a.drm.customData.headers||{};for(const c of Object.keys(a))b.headers[c]=a[c]}Kf(a,b){a=Km(b);switch(this.o){case vv:return a;case wv:return(new _.Lm(a)).a;default:throw Error("Unknown content ID strategy");}}hg(a,b){b.headers[ua]=
509
+ Cc;this.sd(a,b);a={spc:_.zk(b.body)};b.body=_.Hi(_.Ri(a,!0))}ig(a,b){a=_.Bi(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=_.Bk(a).buffer}};_.x(hd,xv);xv.prototype.onFairPlayLicenseResponse=xv.prototype.ig;xv.prototype.onFairPlayLicenseRequest=xv.prototype.hg;xv.prototype.extractFairPlayContentId=xv.prototype.Kf;xv.prototype.onLicenseRequest=xv.prototype.sd;xv.prototype.constructor=xv.prototype.constructor;xv.NAME=Ja;
510
+ var wv="hostname",vv="full-skd";xv.FairPlayContentIdStrategy={HOSTNAME:wv,FULL_SKD:vv};_.x("clpp.drm.HeaderDrmComponent",class extends _.uv{h(a){a=a.getConfiguration();if(a.drm&&a.drm&&a.drm.env===Ja){a=a.drm.customData;if(!a)throw new _.I(_.F,7,7100,_.vd);a=new xv(a.widevineLicenseUrl,a.playReadyLicenseUrl,a.fairPlayLicenseUrl,a.fairPlayCertificateUrl,a.fairPlayContentIdStrategy||vv);_.pm(a)}}a(){delete _.om.HeaderDrm}id(){return"headerdrm"}});_.Er(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=_.G(c);a=new Uint8Array(this,a,b-a);d.set(a);return c})});_.Er(function(){_.uh("mathRound.install")});_.Er(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;Zd in document||(Object.defineProperty(document,Zd,{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement}}),Object.defineProperty(document,"fullscreenEnabled",
511
+ {get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitSupportsFullscreen||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",ft);document.addEventListener("webkitfullscreenerror",ft);document.addEventListener("mozfullscreenchange",ft);document.addEventListener("mozfullscreenerror",ft);document.addEventListener("MSFullscreenChange",ft);document.addEventListener("MSFullscreenError",ft)}});_.Er(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(_.uh("PiPWebkit.install"),document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=ht,document.exitPictureInPicture=it,document.addEventListener("webkitpresentationmodechanged",gt,!0))}});_.Er(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in a&&(a.getVideoPlaybackQuality=jt)}});_.Er(function(){if(window.VTTCue)_.th("Using native VTTCue.");else if(window.TextTrackCue){var a=TextTrackCue.length;if(3===a)_.th(Bb),window.VTTCue=kt;else if(6===a)_.th("Using VTTCue polyfill from 6 argument TextTrackCue."),window.VTTCue=lt;else{try{var b=!!kt(1,2,"")}catch(c){b=!1}b&&(_.th(Bb),window.VTTCue=kt)}}else _.vh("VTTCue not available.")});var mt;_.Er(function(){_.uh("InputEvent.install");_.Pj("Trident/")&&HTMLInputElement.prototype.addEventListener!==nt&&(_.th("Patching input event support on IE."),mt=HTMLInputElement.prototype.addEventListener,HTMLInputElement.prototype.addEventListener=nt)});_.Er(function(){navigator.languages||Object.defineProperty(navigator,"languages",{get:()=>navigator.language?[navigator.language]:["en"]})});_.Er(function(){_.uh("VideoPlayPromise.install");if(window.HTMLMediaElement){const a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){const b=a.apply(this);b&&b.catch(()=>{});return b}}});_.yv=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 zv;_.Av=class{constructor(){this.a=new Blob([zv],{type:_.tg})}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 _.Mj(()=>{d.stop();c.resolve(a)})).la(.25);void 0!==b?b.then(()=>{d.stop();c.resolve(!0)}).catch(e=>{e&&e.message&&e.message===bb?(d.stop(),c.resolve(!0)):(d.stop(),c.resolve(!1))}):(d.stop(),c.resolve(!0));return c}};
512
+ zv=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,
518
513
  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,
519
514
  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,
520
515
  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,
521
516
  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,
522
517
  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,
523
- 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]);_.Lv=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}Rb(){return this.f}ud(){return this.h}Oc(a){return this.getId()===a.getId()&&this.Rb()===a.Rb()&&this.getDuration()===a.getDuration()&&this.ud()===a.ud()}};_.z("clpp.media.TimelineWindow",_.Lv);_.Lv.prototype.isDynamic=_.Lv.prototype.ud;_.Lv.prototype.getStart=_.Lv.prototype.Rb;_.Lv.prototype.getId=_.Lv.prototype.getId;_.Lv.prototype.getDuration=_.Lv.prototype.getDuration;_.Mv=new _.T("clpp.media.TimestampParser");_.Nv=class{constructor(){this.a=[];this.f=-1;this.h=null}Hh(a){return this.a[a]||null}Ih(){return this.a.length}Jh(){return this.a}Yf(){return this.a[this.f]||null}Ah(){return this.f}};_.z("clpp.media.Timeline",_.Nv);_.Nv.prototype.getCurrentWindowIndex=_.Nv.prototype.Ah;_.Nv.prototype.getCurrentWindow=_.Nv.prototype.Yf;_.Nv.prototype.getWindows=_.Nv.prototype.Jh;_.Nv.prototype.getWindowCount=_.Nv.prototype.Ih;_.Nv.prototype.getWindow=_.Nv.prototype.Hh;_.bt={};_.dt={};var yt=class{constructor(a){this.a=new Uint8Array(a||65536);this.f=0;this.h=new Xs}};var ht=window.XMLHttpRequest;var xt=class{constructor(a,b){a=void 0===a?1E6:a;b=void 0===b?!0:b;this.j=new Hv(a);this.length=a;this.A=b;this.f=this.a=this.h=0;this.l=null;this.o=-1;this.w=new Xs}};var Gj=class extends _.jp{constructor(a){super(new _.Ij,()=>Promise.resolve());this.B=a;this.h=null;this.w=this.T;this.f=-1;this.j=this.l=this.o=null;rt(this)}then(a,b){this.T=this.T.then(a,b);return this}catch(a){this.T=this.T.catch(a);return this}abort(){if(this.a)return Promise.resolve();this.a=!0;return this.h.then(a=>{this.o&&clearTimeout(this.o);this.l&&this.l();return a.abort()}).catch(()=>{})}};var wt=window.fetch,tt=window.AbortController,st=window.Headers;_.Bt={};_.Pv=class{constructor(a){a=a.getConfiguration();a=_.Zg(a.textStyle||a.textstyle||{});this.K=typeof a.backgroundColor===_.Pf?a.backgroundColor:null;this.R=typeof a.windowColor===_.Pf?a.windowColor:null;this.M=typeof a.fontColor===_.Pf?a.fontColor:null;this.P=typeof a.fontFamily===_.Pf?a.fontFamily:null;this.I=typeof a.fontSize===_.Pf?a.fontSize:null;this.C=typeof a.fontSizePercent===_.t?a.fontSizePercent:null;this.H=typeof a.edgeColor===_.Pf?a.edgeColor:"rgba(0, 0, 0, 1)";this.w=null;typeof a.edgeType===
524
- _.Pf&&(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?Ov:this.C}setFontSizePercent(a){this.C=a;this.h()}getEdgeColor(){return this.H}setEdgeColor(a){this.H=
525
- a;this.h()}getEdgeType(){return this.w}setEdgeType(a){this.w=a;this.h()}};_.Pv.prototype.setEdgeType=_.Pv.prototype.setEdgeType;_.Pv.prototype.getEdgeType=_.Pv.prototype.getEdgeType;_.Pv.prototype.setEdgeColor=_.Pv.prototype.setEdgeColor;_.Pv.prototype.getEdgeColor=_.Pv.prototype.getEdgeColor;_.Pv.prototype.setFontSizePercent=_.Pv.prototype.setFontSizePercent;_.Pv.prototype.getFontSizePercent=_.Pv.prototype.getFontSizePercent;_.Pv.prototype.setFontSize=_.Pv.prototype.setFontSize;
526
- _.Pv.prototype.getFontSize=_.Pv.prototype.getFontSize;_.Pv.prototype.setFontColor=_.Pv.prototype.setFontColor;_.Pv.prototype.getFontColor=_.Pv.prototype.getFontColor;_.Pv.prototype.setFontFamily=_.Pv.prototype.setFontFamily;_.Pv.prototype.getFontFamily=_.Pv.prototype.getFontFamily;_.Pv.prototype.setWindowColor=_.Pv.prototype.setWindowColor;_.Pv.prototype.getWindowColor=_.Pv.prototype.getWindowColor;_.Pv.prototype.setBackgroundColor=_.Pv.prototype.setBackgroundColor;
527
- _.Pv.prototype.getBackgroundColor=_.Pv.prototype.getBackgroundColor;var Ov=1/15;var Ft="raised",Gt="depressed",It="dropshadow",Ht="uniform";_.z("clpp.text.EdgeType",{NONE:_.De,RAISED:Ft,DEPRESSED:Gt,DROP_SHADOW:It,UNIFORM:Ht});_.Ct(vc,class{constructor(a){this.f=a;this.a=null;this.g=new _.T("clpp.text.Mp4TextParser")}parseInit(a){let b;try{const c=_.Dt(_.wc);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(_.xc);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=
528
- b;else throw new _.I(_.G,2,2011);}}parseMedia(a,b){if(!this.a)throw new _.I(_.G,2,2011);return this.a.parseMedia(a,b)}});var Qv;
529
- _.Rv=class extends _.Pv{constructor(a){super(a);this.o=a.getSurface().getMedia();this.f=`clpp-video-${Qv++}`;this.j=document.createElement(_.Rf);this.l=this.A=!1;_.sp(this.o,this.f);document.head.appendChild(this.j);this.h()}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)},b=
530
- 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()}};Qv=0;_.Fo("native",new class{a(){return!0}create(a){return new _.Rv(a)}});_.Sv=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;
518
+ 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]);_.Bv=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}Nb(){return this.f}md(){return this.h}Hc(a){return this.getId()===a.getId()&&this.Nb()===a.Nb()&&this.getDuration()===a.getDuration()&&this.md()===a.md()}};_.x("clpp.media.TimelineWindow",_.Bv);_.Bv.prototype.isDynamic=_.Bv.prototype.md;_.Bv.prototype.getStart=_.Bv.prototype.Nb;_.Bv.prototype.getId=_.Bv.prototype.getId;_.Bv.prototype.getDuration=_.Bv.prototype.getDuration;_.Cv=new _.S("clpp.media.TimestampParser");_.Dv=class{constructor(){this.a=[];this.f=-1;this.h=null}yh(a){return this.a[a]||null}zh(){return this.a.length}Ah(){return this.a}Of(){return this.a[this.f]||null}rh(){return this.f}};_.x("clpp.media.Timeline",_.Dv);_.Dv.prototype.getCurrentWindowIndex=_.Dv.prototype.rh;_.Dv.prototype.getCurrentWindow=_.Dv.prototype.Of;_.Dv.prototype.getWindows=_.Dv.prototype.Ah;_.Dv.prototype.getWindowCount=_.Dv.prototype.zh;_.Dv.prototype.getWindow=_.Dv.prototype.yh;_.rt={};_.st={};_.ut={};_.Fv=class{constructor(a){a=a.getConfiguration();a=_.ah(a.textStyle||a.textstyle||{});this.K=typeof a.backgroundColor===_.Qf?a.backgroundColor:null;this.R=typeof a.windowColor===_.Qf?a.windowColor:null;this.M=typeof a.fontColor===_.Qf?a.fontColor:null;this.P=typeof a.fontFamily===_.Qf?a.fontFamily:null;this.I=typeof a.fontSize===_.Qf?a.fontSize:null;this.C=typeof a.fontSizePercent===_.r?a.fontSizePercent:null;this.H=typeof a.edgeColor===_.Qf?a.edgeColor:"rgba(0, 0, 0, 1)";this.w=null;typeof a.edgeType===
519
+ _.Qf&&(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?Ev:this.C}setFontSizePercent(a){this.C=a;this.h()}getEdgeColor(){return this.H}setEdgeColor(a){this.H=
520
+ a;this.h()}getEdgeType(){return this.w}setEdgeType(a){this.w=a;this.h()}};_.Fv.prototype.setEdgeType=_.Fv.prototype.setEdgeType;_.Fv.prototype.getEdgeType=_.Fv.prototype.getEdgeType;_.Fv.prototype.setEdgeColor=_.Fv.prototype.setEdgeColor;_.Fv.prototype.getEdgeColor=_.Fv.prototype.getEdgeColor;_.Fv.prototype.setFontSizePercent=_.Fv.prototype.setFontSizePercent;_.Fv.prototype.getFontSizePercent=_.Fv.prototype.getFontSizePercent;_.Fv.prototype.setFontSize=_.Fv.prototype.setFontSize;
521
+ _.Fv.prototype.getFontSize=_.Fv.prototype.getFontSize;_.Fv.prototype.setFontColor=_.Fv.prototype.setFontColor;_.Fv.prototype.getFontColor=_.Fv.prototype.getFontColor;_.Fv.prototype.setFontFamily=_.Fv.prototype.setFontFamily;_.Fv.prototype.getFontFamily=_.Fv.prototype.getFontFamily;_.Fv.prototype.setWindowColor=_.Fv.prototype.setWindowColor;_.Fv.prototype.getWindowColor=_.Fv.prototype.getWindowColor;_.Fv.prototype.setBackgroundColor=_.Fv.prototype.setBackgroundColor;
522
+ _.Fv.prototype.getBackgroundColor=_.Fv.prototype.getBackgroundColor;var Ev=1/15;var yt="raised",zt="depressed",Bt="dropshadow",At="uniform";_.x("clpp.text.EdgeType",{NONE:_.Ee,RAISED:yt,DEPRESSED:zt,DROP_SHADOW:Bt,UNIFORM:At});_.vt(_.vc,class{constructor(a){this.f=a;this.a=null;this.g=new _.S("clpp.text.Mp4TextParser")}parseInit(a){let b;try{const c=_.wt(_.wc);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=_.wt(_.xc);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=
523
+ b;else throw new _.I(_.F,2,2011);}}parseMedia(a,b){if(!this.a)throw new _.I(_.F,2,2011);return this.a.parseMedia(a,b)}});var Gv;
524
+ _.Hv=class extends _.Fv{constructor(a){super(a);this.o=a.getSurface().getMedia();this.f=`clpp-video-${Gv++}`;this.j=document.createElement(_.Sf);this.l=this.A=!1;_.Mp(this.o,this.f);document.head.appendChild(this.j);this.h()}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":_.Ct(this)},b=
525
+ 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()}};Gv=0;_.Zo("native",new class{a(){return!0}create(a){return new _.Hv(a)}});_.Iv=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;