@castlabs/prestoplay 6.20.0 → 6.21.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 (65) hide show
  1. package/CHANGELOG.md +35 -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 +109 -110
  6. package/cjs/cl.conviva.js +33 -33
  7. package/cjs/cl.core.js +553 -550
  8. package/cjs/cl.crypto.js +9 -9
  9. package/cjs/cl.dash.js +78 -77
  10. package/cjs/cl.externs.js +81 -97
  11. package/cjs/cl.freewheel.js +24 -24
  12. package/cjs/cl.hls.js +69 -69
  13. package/cjs/cl.hlssmpte.js +6 -6
  14. package/cjs/cl.htmlcue.js +29 -29
  15. package/cjs/cl.ima.js +22 -24
  16. package/cjs/cl.mse.js +305 -305
  17. package/cjs/cl.muxdata.js +15 -15
  18. package/cjs/cl.onboard.js +3 -3
  19. package/cjs/cl.persistent.js +13 -13
  20. package/cjs/cl.playlist.js +6 -6
  21. package/cjs/cl.sessions.js +16 -16
  22. package/cjs/cl.simid.js +15 -15
  23. package/cjs/cl.smooth.js +72 -72
  24. package/cjs/cl.thumbnails.js +25 -25
  25. package/cjs/cl.tizen.js +70 -69
  26. package/cjs/cl.ttml.js +29 -29
  27. package/cjs/cl.verimatrix.js +5 -5
  28. package/cjs/cl.vimond.js +13 -13
  29. package/cjs/cl.vr.js +18 -18
  30. package/cjs/cl.vtt.js +14 -14
  31. package/cjs/cl.yospace.js +9 -0
  32. package/cjs/cl.youbora.js +38 -20
  33. package/cl.adobe.js +3 -3
  34. package/cl.airplay.js +3 -3
  35. package/cl.broadpeak.js +5 -5
  36. package/cl.cast.js +88 -89
  37. package/cl.conviva.js +27 -27
  38. package/cl.core.js +471 -468
  39. package/cl.crypto.js +8 -8
  40. package/cl.dash.js +74 -72
  41. package/cl.externs.js +71 -99
  42. package/cl.freewheel.js +19 -19
  43. package/cl.hls.js +74 -74
  44. package/cl.hlssmpte.js +5 -5
  45. package/cl.htmlcue.js +26 -26
  46. package/cl.ima.js +16 -17
  47. package/cl.mse.js +276 -276
  48. package/cl.muxdata.js +13 -13
  49. package/cl.onboard.js +4 -4
  50. package/cl.persistent.js +11 -11
  51. package/cl.playlist.js +5 -5
  52. package/cl.sessions.js +10 -10
  53. package/cl.simid.js +13 -13
  54. package/cl.smooth.js +59 -59
  55. package/cl.thumbnails.js +19 -19
  56. package/cl.tizen.js +57 -57
  57. package/cl.ttml.js +22 -22
  58. package/cl.verimatrix.js +4 -4
  59. package/cl.vimond.js +8 -8
  60. package/cl.vr.js +14 -14
  61. package/cl.vtt.js +12 -12
  62. package/cl.yospace.js +3 -0
  63. package/cl.youbora.js +27 -15
  64. package/package.json +3 -1
  65. package/typings.d.ts +123 -24
package/cl.core.js CHANGED
@@ -1,333 +1,337 @@
1
- let g={}; let _ = {};let f=function(window){'use strict';var ba,ca,ja,ma,ra,sa,ua,va,wa,xa,Qa,Va,Wa,Xa,Za,$a,bb,cb,ib,jb,kb,lb,mb,nb,ob,qb,rb,wb,zb,Eb,Hb,Ib,Lb,Nb,Qb,Rb,Ub,Vb,Xb,hc,ic,Bc,Gc,Lc,Wc,Xc,cd,dd,ed,gd,hd,id,kd,ld,md,nd,od,ud,wd,zd,Fd,Gd,Id,Jd,Ld,Od,Pd,Rd,Xd,de,fe,ge,re,Je,Qe,Se,Te,Ue,Ve,We,Xe,Ye,Ze,$e,af,ef,hf,kf,lf,mf,nf,pf,tf,vf,Kf,Nf,Tf,Zf,bg,hg,sg,wg,xg,yg,zg,Ag,Cg,Dg,Eg,Fg,Gg,Hg,Kg,Lg,Qg,Ng,Yg,Zg,ah,dh,fh,nh,oh,sh,th,xh,rh,yh,wh,zh,Ah,uh,vh,Dh,Nh,Oh,Eh,Mh,Lh,Ih,Rh,Th,Sh,Vh,Wh,Xh,Yh,ai,bi,di,ei,ii,ki,mi,gi,oi,si,ui,wi,vi,xi,yi,
2
- zi,Ci,Di,Gi,fj,gj,jj,kj,lj,nj,oj,pj,sj,uj,vj,wj,xj,Aj,Dj,Hj,Ij,Mj,Oj,Jj,Lj,Nj,Pj,Qj,Rj,Tj,Uj,bk,jk,nk,sk,rk,Ek,xk,wk,Pk,Qk,Sk,Tk,Uk,Vk,Wk,Xk,Zk,Yk,$k,al,el,fl,gl,Rk,il,kl,ml,ol,ql,vl,wl,xl,yl,zl,Al,Bl,Cl,Dl,El,Fl,Ll,Ul,Wl,bm,fm,hm,rm,Bm,nm,wm,Gm,Im,Jm,Um,Vm,bn,en,fn,hn,kn,ln,mn,cn,jn,nn,on,pn,qn,rn,sn,yn,Dn,Fn,Hn,Gn,Jn,Bn,Qn,Nn,Pn,On,En,Rn,Sn,Tn,Zn,$n,ao,eo,io,jo,lo,go,fo,to,uo,yo,xo,Ao,Co,Do,zo,Fo,Go,Ho,Lo,Qo,Ro,So,To,Uo,Wo,Xo,Yo,Zo,$o,ap,lp,bp,cp,dp,ep,fp,gp,hp,ip,jp,kp,tp,up,vp,op,wp,rp,qp,np,
3
- sp,xp,yp,Bp,Jp,Kp,Lp,Ip,Rp,Mp,Np,Op,Pp,Qp,zp,Ap,Cp,Dp,Ep,Up,Gp,Hp,bq,cq,aq,dq,$p,Zp,fq,hq,jq,lq,mq,nq,oq,pq,qq,rq,sq,tq,uq,vq,zq,Dq,Aq,Fq,Jq,Lq,Nq,Pq,Qq,Rq,Tq,ar,Uq,Vq,Wq,cr,Zq,dr,gr,hr,ir,er,fr,jr,kr,nr,rr,sr,vr,xr,yr,wr,tr,mr,qr,or,pr,Br,Cr,Dr,Er,Hr,Fr,Gr,Ir,Jr,Kr,Lr,Pr,Qr,Rr,Sr,Tr,Ur,Wr,Xr,Yr,$r,bs,gs,hs,is,ks,ls,ms,os,ps,ns,qs,ts,ss,rs,xs,ws,Cs,Ig,Jg;_.aa=" is registered.";ba=" is unsupported on this platform.";ca=" to a log level. Falling back to default!";_.da="6.20.0";_.ea="AdaptationSet";
4
- _.fa="Already destroyed. No-op";_.ha="Already released. No-op";_.ia="Autoplay is not allowed due to browser policy.";ja="Autoplay should not be used for preloaded streams. ";_.ka="BANDWIDTH";_.la="BASIC";ma="CHECKSUM";_.na="CODECS";_.oa="Cannot retrieve buffer information due to platform limitations";_.pa="CastlabsPlayer";_.qa="Configuration is valid";ra="Content-Length";sa="Content-Type";_.ta="Could not find configured DRM environment.";ua="DRM licenses loaded";va="DRMtoday";wa="DRMtodayOnboard";
5
- xa="Destroying player";_.ya="Disable track type ";_.za="EXT-X-BYTERANGE";_.Ba="EXT-X-DATERANGE";_.Ca="EXT-X-DISCONTINUITY";_.Da="EXT-X-DISCONTINUITY-SEQUENCE";_.Ea="EXT-X-ENDLIST";_.Fa="EXT-X-KEY";_.Ga="EXT-X-MAP";_.Ha="EXT-X-MEDIA-SEQUENCE";_.Ia="EXT-X-PART-INF";_.Ja="EXT-X-PLAYLIST-TYPE";_.La="EXT-X-PRELOAD-HINT";_.Ma="EXT-X-PROGRAM-DATE-TIME";_.Na="EXT-X-SERVER-CONTROL";_.Oa="EXT-X-TARGETDURATION";Qa="Error while decoding string!";_.Ra="Error while fetching license!";_.Sa="FairPlay Certificate URL is not defined";
6
- _.Ta="FairPlay License URL is not defined";_.Ua="GROUP-ID";Va="HW_SECURE_ALL";Wa="HW_SECURE_CRYPTO";Xa="HW_SECURE_DECODE";Za="HeaderDrm";$a="InvalidStateError";_.ab="LANGUAGE";bb="License verification failed: ";cb="Load interrupted while a player release is pending";_.db="Loading player with configuration";_.eb="MaxHeight";_.fb="MaxWidth";ib="Missing media element";jb="No drmtoday configuration found in player configuration. Unable to modify the DRM license request!";kb="No event provided!";lb="No items in the playlist";
7
- mb="No sources provided!";nb="No track data attached to the event, unable to add track!";ob="Not a persistent session.";_.pb="Not supported";qb="NotAllowedError";rb="NotSupportedError";_.sb="PLAYLIST";_.tb="POST";_.ub="PlayReady License URL is not defined";wb="Player not ready yet.";_.xb="Player sources";_.yb="Please make sure ";zb="Preloading is not supported by this player.";_.Ab="QualityLevel";_.Cb="RESOLUTION";_.Db="Representation";Eb="STANDARD";_.Fb="SW_SECURE_CRYPTO";_.Gb="SW_SECURE_DECODE";
8
- Hb="Session is closed";Ib="Skipping Session creation. License for init data was already requested in ";_.Jb="SmoothStreamingMedia";_.Kb="TYPE";Lb="The index is not in the allowed range.";_.Mb="URI";Nb="Unable to translate ";_.Ob="Unhandled/ignored event";_.Pb="Unregistering listeners";Qb="Unsupported keySystem";Rb="Using VTTCue polyfill from 3 argument TextTrackCue.";_.Sb="VIDEO";_.Tb="VOD";Ub="Wait for preloading to finish";Vb="WebkitEmeManager.MediaKeySession.load";_.Wb="Widevine License URL is not defined";
9
- Xb="Will create EME Manager: ";_.Yb="X-ASSET-LIST";_.Zb="X-ASSET-URI";_.$b="X-PLAYOUT-LIMIT";_.ac="X-RESUME-OFFSET";_.bc="ad-break-started";_.cc="ad-break-stopped";_.dc="ad-buffering";_.ec="ad-clicked";_.fc="ad-completed";_.gc="ad-first-quartile";hc="ad-hls-asset-list-request";ic="ad-hls-asset-list-response";_.kc="ad-impression";_.lc="ad-loaded";_.mc="ad-midpoint";_.nc="ad-paused";_.oc="ad-progress";_.pc="ad-resumed";_.qc="ad-skipped";_.rc="ad-started";_.sc="ad-stopped";_.tc="ad-third-quartile";
10
- _.uc="addtrack";_.vc="ads-timeline-changed";_.wc="airplay-casting-ended";_.xc="airplay-casting-started";_.yc="airplay-status-changed";_.zc="application/cea-608";_.Ac="application/dash+xml";Bc="application/mp4";_.Cc='application/mp4; codecs\x3d"stpp"';_.Dc='application/mp4; codecs\x3d"wvtt"';_.Ec="application/ttml+xml";_.Fc="application/vnd.ms-sstr+xml";Gc="application/x-www-form-urlencoded";_.p="audio";_.Hc="audio/aac";_.Ic="audio/ac3";_.Jc="audio/eac3";_.Kc="audio/mp4";Lc='audio/mp4;codecs\x3d"mp4a.40.2"';
11
- _.Mc="audiobufferchanged";_.Nc="autoplaynotallowed";_.Oc="bitratechanged";_.Pc="boolean";_.Rc="bufferingended";_.Sc="bufferingstarted";Wc="canplay";Xc="canplaythrough";_.Yc="castingstarted";_.Zc="caststatuschanged";_.$c="cdn-switch-success";_.ad="cenc";_.bd="center";cd="certificate-request";dd="change";ed="chrome";_.fd="clpp-fill";gd="clpp-hidden";hd="clpp-mc-playlist";id="clpp-visible";_.jd="clpp.cast.CastSender";kd="clpp.drm.HeaderDrm";ld="clpp.drm.eme.AppleEmeManager";md="clpp.native.Player";
12
- nd="clpp.plist.McPlaylist";od="clpp.utils.Platform";_.pd="codecs";_.qd="column-reverse";_.rd="com.adobe.primetime";_.sd="com.apple.fps";_.td="com.apple.hls.interstitial";ud="com.apple.quicktime.HLS";_.vd="com.microsoft.playready";wd="com.microsoft.playready.recommendation";_.xd="com.widevine.alpha";_.yd="config.drm.customData is not defined";zd="controls";_.Ad="cuechange";_.Bd="decoder";_.Cd="destroy()";_.Dd="disabled";_.Ed="div";Fd="drm.mediaKeys.end";Gd="drm.mediaKeys.start";Id="drm.onPlay.end";
13
- Jd="drm.onPlay.start";_.Kd="drmexpirationupdate";Ld="drmrenewalstarted";_.Md="drmsessionpersisted";_.Nd="drmsessionupdate";Od="drmtoday";Pd="durationchange";_.Qd="ec-3";Rd="encrypted";_.Sd="end";_.Td="ended";_.Ud="error";_.Vd="estimatedThroughputKbps";_.Wd="forced";Xd="fullscreenElement";_.Yd="function";_.Zd="height";_.$d="hidden";_.ae="html";_.be="image";_.ce="internal-error";de="keystatuseschange";_.ee="left";fe="license-renewal";ge="license-request";_.he="line-left";_.ie="line-right";_.ke="live-turned-static";
14
- _.le="load";_.pe="loadeddata";_.qe="loadedmetadata";re="loadstart";_.se="main";_.te="mdat";_.ue="mdia";_.ve="message";_.we="metadata";_.xe="mimeType";_.ye="minf";_.ze="moov";_.Ae="mpd-type-changed";_.Be="mpeg-dash-callback-event";_.Ce="none";_.r="number";_.De="object";_.Ee="onBitrateChanged()";_.Fe="onPlayerError()";_.Ge="onPlayerWillDestroy";_.He="onPlayerWillRelease";_.Ie="onStateChanged()";Je="online-status-changed";_.Ke="optional";_.Le="org.w3.clearkey";_.Me="output-restricted";_.Ne="pause";
15
- _.Oe="persistent";_.Pe="persistent-license";Qe="picture-in-picture";_.Re="play";Se="player.afterLoad.end";Te="player.afterLoad.start";Ue="player.appendLoad.end";Ve="player.appendLoad.start";We="player.beforeLoad.end";Xe="player.beforeLoad.start";Ye="player.load.end";Ze="player.load.start";$e="player.setupPlaylist.end";af="player.setupPlaylist.start";_.bf="playing";_.cf="playlist-item-changed";_.df="playlist-modified";ef="playlist.next.end";hf="playlist.next.start";kf="preload-aborted";lf="preload-failed";
16
- mf="preloaded";nf="preloading";_.of="prevent";pf="primary-content";_.qf="progress";_.rf="px";_.sf="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";_.Ef="seeking";_.Ff="showing";_.Gf="simid-creative-started";_.Hf="simid-creative-stopped";_.If="sinf";_.Jf="smooth";Kf="stalled";_.Lf="start";_.Mf="statechanged";
17
- Nf="status-pending";_.Of="stbl";_.Pf="string";_.Qf="stsd";_.Rf="style";_.Sf="subtitles-htmlcue";Tf="temporary";_.Uf="text/vtt";_.Vf="text/xml";_.Wf="timeupdate";_.Xf="trak";_.Yf="ttml-xml";Zf="unauthenticated";_.$f="und";_.ag="unknown";bg="update";_.cg="urn:scte:scte35";_.dg="urn:scte:scte35:2014";_.eg="user-seeked";_.fg="user-seeking";_.gg="value";hg="version";_.ig="vertical-lr";_.jg="vertical-rl";_.t="video";_.kg="video/mp2t";_.lg="video/mp4";_.mg="videobufferchanged";_.ng="videotrackchanged";
18
- _.rg="vimond-response";sg="visibilitychange";_.tg="vtt-xml";_.ug="waiting";_.vg="waitingforkey";wg="webkit-org.w3.clearkey";xg="webkitkeyadded";yg="webkitkeyerror";zg="webkitkeymessage";Ag="webkitneedkey";_.Bg="width";Cg="x-dt-csl-tracking-token";Dg="x-dt-follow-up-token";Eg="x-dt-resp-code";Gg=function(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}};Hg=function(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:Gg(a)}};
19
- Kg=function(a,b){if(b){var c=Ig;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&&Jg(c,a,{configurable:!0,writable:!0,value:b})}};Lg=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 Lg(a())};
20
- _.x=function(a,b){a=a.split(".");var c=Mg;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};_.Pg=function(a){return _.z(a)||Ng(a)?a:_.Og(a)};_.Og=function(...a){let b={};for(let c=0;c<a.length;c++)null!=a[c]&&(b=Qg(b,{merging:a[c]},1));return b.merging||null};_.Rg=function(a){for(const b in a)if(void 0!==a[b])return!0;return!1};
21
- Qg=function(a,b,c){const d=c+1;if(_.z(a)||!_.Sg(a))a={};for(const e in b)c=b[e],Ng(c)||_.z(c)||_.Tg(c)||c instanceof Element?a[e]=c:_.Sg(c)&&c.buffer&&c.buffer instanceof ArrayBuffer&&_.Tg(c.subarray)?a[e]=c.subarray(0):c instanceof Array?a[e]=Qg([],c,d):!_.z(c)&&_.Ug(c)&&20>d&&(a[e]=Qg(a[e],c,d));return a};Ng=function(a){a=typeof a;return a===_.Pf||a===_.r||a===_.Pc};_.z=function(a){return null===a||"undefined"===typeof a};_.Sg=function(a){return typeof a===_.De};
22
- _.Tg=function(a){return typeof a===_.Yd};_.Vg=function(a){return typeof a===_.Pf};_.Wg=function(a){return typeof a===_.r};_.Ug=function(a){if(_.z(a)||!_.Sg(a))return!1;a=Object.getPrototypeOf(a);return a===Object.prototype||null===a};
23
- _.Xg=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||!_.Sg(a)||!_.Sg(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};
24
- Yg=function(a){return(Number.hasOwnProperty("isNaN")?Number.isNaN:b=>b!==b)(a)};Zg=function(a){const b=new Map;for(const c of Object.keys(a))b.set(c,a[c]);return b};_.$g=function(a){const b={};a.forEach((c,d)=>{b[d]=c});return b};ah=function(a,b){b=b.toLowerCase();for(const [c,d]of Object.entries(a))if(c.toLowerCase()===b)return d;return null};dh=function(a){return a&&0<=bh[a]?bh[a]:ch};
25
- fh=function(a){if(!a)return _.B("clpp.log",Nb+a+ca),-1;const b=eh[a.toUpperCase()];return void 0===b?(_.B("clpp.log",Nb+a+ca),-1):b};_.hh=function(a){gh.info.apply(gh,arguments)};_.ih=function(a){gh.debug.apply(gh,arguments)};_.B=function(a){gh.warn.apply(gh,arguments)};_.jh=function(a){gh.error.apply(gh,arguments)};_.mh=function(a){if(a){var b=a.a();b in _.kh?_.lh.warn("Player-Factory '"+b+"' already registered"):(_.kh[b]=a,_.lh.info("Registered Player-Factory: '"+b+"'"))}};
26
- nh=function(a){return Object.values(_.kh).find(a)||null};_.ph=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)oh(b[c]);a.a.clear()};_.qh=function(a,b,c,d){const e=f=>{for(const g of c)a.off(b,g,e);d(f)};for(const f of c)a.on(b,f,e)};oh=function(a){a.target.removeEventListener(a.type,a.a,a.f);a.target=null;a.a=null};sh=function(a){return rh(a).filter(b=>b.type===ud&&!b.ve)};th=function(a){a.forEach(b=>{b.ve=!0})};
27
- xh=function(a,b){a=a.map(c=>({startTime:c.startTime,endTime:c.endTime,key:c.value.key,value:c.value.data,wf:!1}));a=uh(a);b&&(a=vh(a));return new Set(wh(a))};rh=function(a){const b=[];for(const c of a)b.push(c);return b};yh=function(a,b){const c=a.endTime-a.startTime,d=b.endTime-b.startTime,e=a.cf||a.startTime,f=b.cf||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};
28
- wh=function(a){const b=[];for(const c of a)(a=b.find(d=>d.startTime===c.startTime&&d.endTime===c.endTime))?zh(c,a):(a=Ah(c),b.push(a));return b};zh=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=_.dg,b.type=_.Bh};
29
- Ah=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:_.Ch,eventElement:null};zh(a,b);return b};uh=function(a){const b=new Set(a),c=new Set(a.filter(d=>"SCTE35-OUT"===d.key).map(Dh));a.filter(d=>"SCTE35-IN"===d.key).forEach(d=>{c.has(Dh(d))||(d.wf=!0)});return Array.from(b.values())};vh=function(a){a.forEach(b=>{b.wf&&(b.endTime=b.startTime,b.startTime=0)});return a};Dh=function(a){return`${a.startTime}-${a.endTime}`};
30
- Nh=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=sh(d);th(c);a.a=xh(c,a.l);0<a.a.size&&(Eh(a,a.a),a.m.trigger(new _.C(_.Fh)));a.j.on(b,_.Ad,()=>{{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(_.Gh,{detail:g})))}else h=g.startTime<=h&&h<=g.endTime,!h&&f.f.has(g)?(f.f.delete(g),f.m.trigger(new _.C(_.Hh,
31
- {detail:g}))):h&&!f.f.has(g)&&(f.f.add(g),f.m.trigger(new _.C(_.Gh,{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);Ih(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;Lh(a,b);f=sh(d);var k=xh(f,a.l);g=new Set;h=!1;for(l of k)(k=Mh(a,l))?(l.customAttributes&&(k.customAttributes=_.Og(k.customAttributes||{},l.customAttributes)||
32
- void 0),h=!0):(a.a.add(l),g.add(l));var l={eh:g,ig:0<g.size||h};const {eh:m,ig:n}=l;th(f);(e||n)&&a.m.trigger(new _.C(_.Fh));Eh(a,m)},6E3))}};Oh=function(a,b){a.j.on(b,_.uc,c=>{c=c.track;c.kind===_.we&&Nh(a,c)})};Eh=function(a,b){for(const c of b)a.m.trigger(new _.C(_.Ph,{detail:c}))};Mh=function(a,b){return Array.from(a.a.values()).find(c=>b.startTime===c.startTime&&b.endTime===c.endTime)||null};
33
- Lh=function(a,b){if(b.cues){var c=rh(b.cues).filter(f=>f.type===ud),d=c.filter(f=>f.ve);c=c.filter(f=>!f.ve);var e=[];for(const f of c)for(const g of d)yh(f,g)&&(e.push(f),g.cf=f.startTime);Ih(a,b,e);0<e.length&&a.g.debug(`Removed ${e.length} duplicated cues.`)}};Ih=function(a,b,c){for(const d of c)try{b.removeCue(d)}catch(e){a.g.debug("Failed to remove cue",d,e)}};_.Qh=function(a){return Array.isArray(a)?a:[a]};Rh=function(a,b){return a===b?!0:a.length===b.length&&a.every((c,d)=>c===b[d])};
34
- Th=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 Sh(a,b)&&Sh(b,a)};Sh=function(a,b){const c=new Set(a);return b.every(d=>c.has(d))};_.Uh=function(a,b={}){if(b.bf){const c=[];for(const d of a)c.some(e=>b.bf(d,e))||c.push(d);return c}return Array.from((new Set(a)).values())};Vh=function(a,b){const c=new Set(a),d=new Set(b);return{qh:a.filter(e=>!d.has(e)),hi:a.filter(e=>d.has(e)),gg:b.filter(e=>!c.has(e))}};
35
- Wh=function(a,b){b=b.track;b.kind!==_.we&&(b.mode===_.Ff&&(b.mode=_.$d),a.a.on(b,_.Ad,c=>{c=c.target||c.srcElement;c.mode=_.$d;c.activeCues&&(c=Array.from(c.activeCues).map(a.o),a.l.append(c,[]))}))};Xh=function(a,b,c,d){a=`${a===_.E?"FATAL":"RECOVERABLE"} Clpp-Error [Category ${b} - Code ${c}]`;if(_.Vg(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};
36
- Yh=function(a,b){const c=b||Rh;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)}};_.Zh=function(a){return null!=a};ai=function(...a){for(let b=0;b<a.length;b++){const c=a[b];if(null!==c&&void 0!==c)return c}throw new _.$h("No non-null, non-undefined value found");};bi=function(...a){for(let b=0;b<a.length;b++){const c=a[b];if(null!==c&&void 0!==c)return c}};
37
- _.ci=function(a){var b;a instanceof _.ci?(di(this,a.rb),this.pc=a.pc,this.Ta=a.Ta,ei(this,a.Ic),this.Da=a.Da,_.fi(this,gi(a.a)),this.ic=a.ic):a&&(b=String(a).match(hi))?(di(this,b[1]||"",!0),this.pc=ii(b[2]||""),this.Ta=ii(b[3]||"",!0),ei(this,b[4]),this.Da=ii(b[5]||"",!0),_.fi(this,b[6]||"",!0),this.ic=ii(b[7]||"")):this.a=new _.ji(null)};di=function(a,b,c){a.rb=c?ii(b,!0):b;a.rb&&(a.rb=a.rb.replace(/:$/,""))};
38
- ei=function(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.Ic=b}else a.Ic=null};_.fi=function(a,b,c){b instanceof _.ji?a.a=b:(c||(b=ki(b,li)),a.a=new _.ji(b))};ii=function(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""};ki=function(a,b,c){return typeof a===_.Pf?(a=encodeURI(a).replace(b,mi),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null};mi=function(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)};_.ji=function(a){this.f=a||null};
39
- gi=function(a){var b=new _.ji;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};oi=function(a,b){const c=ni[a];for(const d of c)for(const e of b)if(d.test(e.trim()))return e.trim();return a===_.F?"":null};_.I=function(a,b,c,d){d=void 0===d?{}:d;a=a.getAttribute(b);if(!a&&d.required)throw new _.G(_.E,4,4023,`Required attribute missing: ${b}`);return a?a.value:c||null};
40
- _.qi=function(a){var b=(a||"").split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=pi.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a};_.ri=function(a,b){a=_.qi(a);b=_.qi(b);return a.split("-")[0]===b.split("-")[0]};si=function(a){return a.reduce((b,c)=>b+c,0)};_.ti=function(a,b){for(const c of a)if(!b(c))return!1;return!0};ui=function*(a){for(let b=0;b<a;b++)yield b};
41
- wi=function(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!==b.byteLength)return!1;if(vi(a)===vi(b)&&(a.byteOffset||0)===(b.byteOffset||0))return!0;const c=_.J(a);b=_.J(b);for(const d of ui(a.byteLength))if(c[d]!==b[d])return!1;return!0};vi=function(a){return a instanceof ArrayBuffer?a:a.buffer};_.J=function(a,b=0,c=Infinity){return xi(a,b,c,Uint8Array)};
42
- xi=function(a,b,c,d){const e=d.BYTES_PER_ELEMENT||1,f=vi(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)};yi=function(a,b=0,c=Infinity){return xi(a,b,c,Uint16Array)};zi=function(a,b=0,c=Infinity){return xi(a,b,c,Uint32Array)};_.Ai=function(a,b=0,c=Infinity){return xi(a,b,c,Int32Array)};_.Bi=function(a,b=0,c=Infinity){return xi(a,b,c,DataView)};
43
- Ci=function(a){return a instanceof ArrayBuffer?a:0===a.byteOffset&&a.byteLength===a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer};Di=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};
44
- _.Ei=function(a){if(!a)return"";a=_.J(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(Qa);return a}a=escape(Di(a));try{return decodeURIComponent(a)}catch(b){throw Error(Qa);}};
45
- Gi=function(a,b,c){if(!a)return"";if(!c&&0!==a.byteLength%2)throw Fi.error("Data has an incorrect length, must be even."),Error("Data does not seem to be UTF-16 encoded!");c=_.J(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(_.J(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 Di(c)};
46
- _.Hi=function(a,b){if(_.Vg(a))return a;let c="";b=!!b;const d=_.J(a);239===d[0]&&187===d[1]&&191===d[2]?c=_.Ei(d):254===d[0]&&255===d[1]?c=Gi(d.subarray(2),!1):255===d[0]&&254===d[1]&&(c=Gi(d.subarray(2),!0));const e=function(f,g){return f.byteLength<=g||32<=f[g]&&126>=f[g]}.bind(null,d);Fi.debug("Unable to find byte-order-mark, making an educated guess.");0===d[0]&&0===d[2]?c=Gi(a,!1):0===d[1]&&0===d[3]?c=Gi(a,!0):e(0)&&e(1)&&e(2)&&e(3)&&(c=_.Ei(a));if(c)return b&&(c=escape(c)),c;throw Error("Unable to detect text encoding");
47
- };_.Ii=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};_.Ji=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};
48
- _.Ki=function(a,b){var c=b||1;b=a.length;const d=new ArrayBuffer(b*c);let e;4===c?e=zi(d):2===c?e=yi(d):e=_.J(d);for(c=0;c<b;c++)e[c]=a.charCodeAt(c);return d};_.Li=function(a,b){return String.prototype.startsWith?a.startsWith(b):0===a.indexOf(b)};_.Mi=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};_.Ni=function(a){return!!(a&&0<a.length)};_.Oi=function(a){return!a||0===a.length};
49
- _.Pi=function(a){if(void 0===a||null===a||""===a)return"";try{let b=Number(a);if(Yg(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""}};_.Ri=function(a){a=a.replace(/<[^>]+>/gi,"");Qi.innerHTML=a;a=Qi.textContent;return a=a.replace(/<[^>]+>/gi,"")};_.Ti=function(a,b=!0){a=_.Si(a).replace(/\+/g,"-").replace(/\//g,"_");return b?a:a.replace(/[=]*$/,"")};_.Si=function(a){a=Di(_.J(a));return btoa(a)};
50
- _.Ui=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};_.Vi=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};_.Wi=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};
51
- _.Xi=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};_.Yi=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};
52
- _.Zi=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
- _.cj=function(a,b){var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new _.G(_.E,4,4016,{invalidTag:b});b=c[1];var d=c[2];c=[];let e;if(d){d=new _.$i(d);var f;(f=_.Zi(d,/^([^,=]+)(?:,|$)/g))&&f[1]&&(e=f[1].trim());const g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;for(;f=_.Zi(d,g);)c.push(new _.aj(f[1],f[2]||f[3]||""))}return new _.bj(a,b,c,e)};_.ej=function(){return{maxAttempts:1,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:0,fatalStatusCodes:[...dj]}};
54
- fj=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||[...dj]};gj=function(a){const b={};a.forEach((c,d)=>{b[d.trim()]=c});return b};
55
- _.ij=function(a,b){_.Vg(a)&&(a={uris:[a]});Array.isArray(a)&&(a={uris:a});const c={uris:a.uris||[],type:a.type||_.hj,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:[...dj],requestStartTimestamp:null};a.keyInfo&&(c.keyInfo=a.keyInfo);b&&fj(c,b);return c};
57
- _.mj=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(jj(c))return kj(a);throw lj(a);};jj=function(a){return 200<=a&&299>=a&&202!==a};kj=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
- lj=function(a){a=kj(a);try{var b=_.Hi(a.data,!0)}catch(d){b=null}_.ih("HTTP error text:",b);const c=a.request;return new _.G(0<=(c?c.fatalStatusCodes||[]:[]).indexOf(a.status)?_.E:1,1,1001,{url:a.uri,status:a.status,responseText:b,headers:a.headers,request:a.request,response:a})};nj=function(a,b){b=parseInt(b,10);Number.isNaN(b)&&(b=-1);a.bytesTotal=b;a.bytesLoaded=0;a.bytesRemaining=b};oj=function(a,b,c){0<a.bytesRemaining&&(a.bytesRemaining-=b);a.bytesLoaded+=b;if(a.onProgress)a.onProgress(b,c)};
59
- pj=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()};sj=function(a,b){a.W.then(()=>b(!0),()=>b(!1));return a};_.tj=function(a,b){a.a.push(sj(b,()=>{{var c=a.a;const d=c.indexOf(b);-1<d&&c.splice(d,1)}}))};uj=function(a,b){return _.w(function*(){const c=yield a.fetch(b);return _.Ei(c.data).replace(/\r\n|\r(?=[^\n]|$)/gm,"\n")})};
60
- vj=function(a,b){return _.w(function*(){const c=yield uj(a,b);try{const d=JSON.parse(c);if(null==d||typeof d!==_.De)throw Error("Not an object");return d}catch(d){throw new _.$h("Failed to parse JSON response","json-failed");}})};wj=function(a,b,c,d){d=void 0===d?"HEAD":d;return _.w(function*(){if(!navigator.onLine)return!1;if(b){const e=_.ij(b,c);e.method=d;c||(e.timeout=5E3);e.headers["cache-control"]="no-cache";try{yield a.fetch(e).W}catch(f){if(1002===f.code||1003===f.code)return!1}}return!0})};
61
- xj=function(a){return`@@scheme:${a.scheme||""}`+`@@value:${a.value}`+`@@id:${a.id||""}@@type:${a.type||""}`+`@@protocol:${a.protocol||""}`};_.yj=function(a){return a&&a!==_.$f?a:null};
62
- Aj=function(a){if(!a)throw new _.G(_.E,3,3101,`Invalid track type: ${a}`);if(!_.Vg(a))throw new _.G(_.E,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 zj:return zj}throw new _.G(_.E,3,3101,`Unknown track type: ${a}.`);};
63
- Dj=function(a,b){a=Aj(a);const c=_.yj(b.kind);let d=b.id;d||(d=String(_.Bj++));a=new _.Cj(d,c===_.we?zj:a);a.kind=c;a.label=_.yj(b.label);a.language=_.yj(b.language);a.originalLanguage=b.originalLanguage||a.language;return a};_.Ej=function(a){return`${a.scheme}//`+`${a.a}${a.port?":"+a.port:""}${a.path}${a.h}${a.f}`};
64
- _.Fj=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)},""):""};_.Gj=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};
65
- Hj=function(a,b){return a.startsWith("http:://")||a.startsWith("https:://")?a:(new URL(a,b)).toString()};Ij=function(a,b){return _.w(function*(){const c=_.ij(b);return yield uj(a.f,c)})};Mj=function(a,b,c){return _.w(function*(){const {mimeType:d,renditions:e}=yield Jj(a,b,c),f=new _.Cj("dummy",_.M),g=e.map((h,k)=>{k=new _.Kj(`R${k}`,f);k.bandwidth=h.bandwidth;k.Kc=h.Kc;k.codec=h.codec;k.width=h.width;k.height=h.height;return k});Lj(g);return{renditions:g,mimeType:d||void 0}})};
66
- Oj=function(a){a=a.split("\n").filter(c=>c.trim().startsWith("#EXT-X-MEDIA:")).map(c=>Nj(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};Jj=function(a,b,c){return _.w(function*(){const d=Pj(b),e=Qj(b,c);return{mimeType:yield Rj(a,e,d[0]?d[0].codec:null),renditions:d}})};
67
- Lj=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.");};Nj=function(a){const b=_.cj(0,a);a=d=>(d=b.getAttribute(d))?d.value:void 0;var c=a(_.Kb);c=null!=c?{AUDIO:_.L,VIDEO:_.M,SUBTITLES:_.K}[c]:void 0;return{type:c,groupId:a(_.Ua),name:a("NAME"),language:a(_.ab),Th:a("AUTOSELECT"),default:a("DEFAULT"),ai:a("FORCED"),af:a("CHARACTERISTICS"),uri:a(_.Mb)}};
68
- Pj=function(a){return a.split("\n").filter(b=>b.trim().startsWith("#EXT-X-STREAM-INF:")).map(b=>{var c=_.cj(0,b);if(c.getAttribute(_.Sb))throw Error("Playlist contains alternative video streams.");var d=_.I(c,_.Cb);b=d?Number(d.split("x")[0]):null;d=d?Number(d.split("x")[1]):null;var e=_.I(c,_.ka);e=e?Number(e):null;var f=_.I(c,"AVERAGE-BANDWIDTH");f=f?Number(f):null;c=_.I(c,_.na);c=_.Sj(_.t,c?c.split(","):[]);return b={bandwidth:e,Kc:f,codec:c,width:b,height:d,mimeType:null}})};
69
- Qj=function(a,b){return(a=a.split("\n").filter(c=>c.trim().endsWith(".m3u8"))[0])?Hj(a,b):null};Rj=function(a,b,c){return _.w(function*(){if(!b||!c)return null;var d=yield Ij(a,b);d=[Tj(d,b),Uj(d,b)].filter(Boolean);return _.Vj(d,_.t,c)})};Tj=function(a,b){return(a=a.split("\n").find(c=>!c.startsWith("#")&&0<c.trim().length))?Hj(a,b):null};Uj=function(a,b){a=a.split("\n").find(c=>c.startsWith("#EXT-X-MAP:"));return a?(a=_.I(_.cj(0,a),_.Mb))?Hj(a,b):null:null};
70
- _.Xj=function(a,b,c){for(const d of _.Wj)if(d.probe(b,c))return d.create(a);return null};_.Yj=function(a){a=_.Wj.indexOf(a);0<=a&&_.Wj.splice(a,1)};bk=function(a,b){var c=Zj;ak.set(`${a.toLowerCase().split(";")[0]}-${c}`,{priority:c,plugin:b})};_.fk=function(a,b){var c=[ck,dk,ek,Zj];for(const d of c)if(c=ak.get(`${a.toLowerCase().split(";")[0]}-${d}`)){const e=c.plugin(),f=e.isSupported(a,b);e.destroy();if(f)return c.plugin}return null};
71
- _.gk=function(a,b){b&&(a+=';codecs\x3d"'+b+'"');return a.replace(/\s/g,"")};_.hk=function(a){return a.split(";")[0]};_.ik=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(","):""};jk=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};
72
- nk=function(){if(kk)return kk;lk||(lk=new _.mk(()=>{kk=null}));(kk=document.querySelector(_.t)||document.querySelector(_.p))||(kk=document.createElement(_.t));lk.fa(1);return kk};_.ok=function(){return!!navigator.userAgent.match(/Edge?\//)};_.pk=function(a){return(navigator.userAgent||"").includes(a)};_.qk=function(a){return _.pk("Tizen"+(a?" "+String(a):""))};
73
- sk=function(a){const b={major:-1,name:_.ag};if(!a)return b;var c=a.replace(/_/g,".");b.name=c;c=c.split(".");1<=c.length&&(b.major=rk(a,c[0]));2<=c.length&&(b.minor=rk(a,c[1]));3<=c.length&&(b.patch=rk(a,c[2]));4<=c.length&&(b.build=rk(a,c[3]));return b};_.tk=function(){return _.pk("Web0S")};_.vk=function(){return _.tk()&&79===_.uk().major};
74
- _.uk=function(){const a=wk();const b=["ie","edge","opera","firefox","safari",ed];var c=xk();const d=yk[c];for(let e=0,f=b.length;e<f;e++)if(c=d[b[e]]&&a.match(d[b[e]]))return sk(c[1]);return sk("")};_.zk=function(){return _.pk("CrKey")};_.Ak=function(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!_.qk()};_.Bk=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:_.Ak()&&1<navigator.maxTouchPoints};_.Ck=function(){return/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)};
75
- rk=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};
76
- xk=function(){const a=wk();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};wk=function(){let a=window.navigator.userAgent;return a=a.toLowerCase()};
77
- _.Ok=function(){var a=xk();var b=xk();var c=yk[b];if(c){c=wk().match(c.os_version)[1];c=sk(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=sk("");a:{c=wk();const e=["ie","edge","opera","firefox","safari",ed];var d=xk();d=yk[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:_.uk()}};
78
- Pk=function(a,b,c){return a.type!==c?!1:void 0!==b.id&&null!==b.id&&""!==b.id?a.id===b.id:_.Xg(a,{kind:_.yj(b.kind),language:_.yj(b.language),label:_.yj(b.label)},["kind","language","label"])};Qk=function(a){return a.enabled||a.selected||a.mode===_.Ff||a.mode===_.$d};Sk=function(a,b,c){return Rk(a)&&b===_.M&&!!c.enableHlsVideoTrackInfo};
79
- Tk=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})))})};Uk=function(a,b,c){return Rk(a)&&(b===_.L||b===_.K)&&!!c.enableMetadata};
80
- Vk=function(a,b,c){return _.w(function*(){var d=a.m.getLoadedSource();d&&a.j&&(d=yield a.j.a(d.url,c),d.Fc&&(d=d.Fc.get(`${b.type}:${b.label}`))&&d.af&&(b.accessibility=d.af.split(",").map(e=>e.trim()).map(e=>({value:e,type:b.type,protocol:"HLS"}))))})};Wk=function(a,b){return a.h.filter(c=>c.type===b)};Xk=function(a){(a=a.m.getTextDisplayer())&&a.remove(0,Infinity)};Zk=function(a,b){if(a=Yk(a,b))a=Array.from(a),b===_.K&&(a=a.filter(c=>c.kind!==_.we));return a};
81
- Yk=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}};$k=function(a,b){return(a=a.a.get(b)||null)&&a.renditions[0]};al=function(a,b){return(a=a.l.get(b))&&a.renditions[0]};
82
- el=function(a,b,c){const d=Zk(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=_.Ff;g=_.Dd;break;case _.L:f="enabled";break;case _.M:f="selected"}if(f)for(const h of d)h[f]=Pk(c,h,c.type)?e:g}}else if(a.g.debug(_.ya+b),a.a.get(b)&&d&&b===_.K){for(e of d)e.mode=
83
- _.Dd;a.a.set(b,null)}b===_.L?a.m.trigger(new _.C(_.bl)):b===_.K&&a.m.trigger(new _.C(_.dl))};fl=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=_.Oi(b.url)?URL.createObjectURL(new Blob([])):b.url;d.appendChild(e);a.I.push(e)}}};
84
- gl=function(a,b){return _.w(function*(){var c=a.m.getConfiguration(),d=_.Xj(c,b.mimeType,_.Uf);if(d){c=_.ij(b.url);var e=yield a.m.getNetworkEngine().fetch(c).W;e&&e.data&&(c="External_"+`${a.G++}`,a.o[c]=b,d=d.a(_.J(e.data)),d={url:URL.createObjectURL(new Blob([d])),kind:b.kind,language:b.language,label:b.label,mimeType:_.Uf},fl(a,d,c))}else a.g.warn("Track MIME type is not supported",b)})};Rk=function(a){a=a.m.getLoadedSource();return!(!a||a.type!==_.hl&&!a.url.endsWith(".m3u8"))&&_.Ak()};
85
- il=function(a,b,c){c=_.Qh(c).filter(e=>e);a.g.info("Find preferred tracks for",b,c);const d=Wk(a,b);c.some(e=>{const f=_.qi(e);return(e=d.find(g=>{g=_.qi(g.language||"");return _.ri(f,g)}))?(a.g.info("Will select track with id",e.id),el(a,b,e),!0):!1})};kl=function(a){return a.name===qb&&jl.some(b=>a.message.startsWith(b))};
86
- _.nl=function(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&_.Bk()&&(a=360);const b=_.ej();b.maxAttempts=3;a={source:"",license:ll,viewerId:void 0,autoplay:void 0,pauseWhenInBackground:!1,ads:{hls:{enable:!0,resolutionOffsetSec:35}},manifest:{attemptParameters:_.ej(),availabilityWindowOverride:NaN,clockSyncUri:"",ignoreDrmInfo:!1,xlinkFailGracefully:!1,autoCorrectDrift:!0,timeline:{version:1,type:void 0}},abr:{enabled:!0,defaultBandwidthEstimate:1E3,switchInterval:8,bandwidthUpgradeTarget:.85,
87
- bandwidthDowngradeTarget:.95,useSwitchIntervalForInitialSwitch:!1,restrictions:ml(a),useCmsd:!0},drm:null,enableHtmlCue:!0,preferredAudioLanguage:"",preferredTextLanguage:"",preferredAudioRole:_.se,preferredTextRole:"",preferredAudioChannelCount:2,preferredAudioCodec:[],preferredVideoCodec:[],preferSpatialAudio:!1,preferForcedSubtitles:!1,volume:null,startTime:null,loop:!1,lowLatencyMode:!1,suggestedPresentationDelay:void 0,muted:void 0,forceWaitForTracks:!1,streaming:{attemptParameters:b,bufferingGoal:10,
1
+ let g={}; let _ = {};let f=function(window){'use strict';var ba,ca,ja,ma,ra,sa,ua,va,wa,xa,Pa,Va,Wa,Xa,Ya,Za,bb,cb,ib,jb,kb,lb,mb,nb,ob,qb,rb,vb,zb,Eb,Hb,Ib,Lb,Nb,Qb,Rb,Ub,Vb,Xb,hc,ic,Bc,Gc,Lc,Sc,Uc,cd,dd,ed,gd,hd,id,kd,ld,md,nd,od,ud,wd,zd,Fd,Gd,Hd,Id,Kd,Od,Pd,Rd,Wd,ce,ee,fe,ne,Ie,Pe,Re,Se,Te,Ue,Ve,We,Xe,Ye,Ze,$e,df,ef,ff,gf,hf,jf,lf,sf,uf,Jf,Mf,Sf,Yf,ag,gg,og,vg,wg,xg,yg,zg,Bg,Cg,Dg,Gg,Hg,Ig,Lg,Mg,Rg,Og,Zg,$g,bh,eh,gh,oh,rh,ph,th,uh,yh,sh,zh,xh,Ah,Bh,vh,wh,Eh,Oh,Ph,Fh,Nh,Mh,Jh,Sh,Uh,Th,Wh,Xh,Yh,Zh,bi,ci,ei,fi,ji,li,ni,hi,pi,ti,vi,xi,wi,yi,
2
+ zi,Ai,Di,Ei,Hi,gj,hj,kj,lj,mj,oj,pj,qj,tj,vj,wj,xj,yj,zj,Aj,Dj,Gj,Kj,Lj,Pj,Rj,Mj,Oj,Qj,Sj,Tj,Uj,Wj,Xj,ek,mk,qk,vk,uk,Hk,Ak,zk,Sk,Tk,Vk,Wk,Xk,Yk,Zk,$k,bl,al,dl,el,hl,il,jl,Uk,ll,nl,pl,rl,tl,yl,zl,Al,Bl,Cl,Dl,El,Fl,Gl,Hl,Il,Ol,Xl,Zl,em,im,km,um,Em,nm,zm,Jm,Lm,Mm,Xm,Ym,en,hn,jn,ln,nn,on,pn,fn,mn,qn,rn,sn,tn,Dn,vn,En,un,wn,xn,Fn,Kn,Mn,On,Nn,Qn,In,Xn,Un,Wn,Vn,Ln,Yn,Zn,$n,go,ho,io,lo,po,qo,so,no,mo,Ao,Bo,Fo,Eo,Ho,Jo,Ko,Go,Mo,No,Oo,So,Xo,Yo,Zo,$o,ap,cp,dp,ep,fp,gp,hp,sp,ip,jp,kp,lp,mp,np,op,pp,qp,rp,Ap,
3
+ Bp,Cp,vp,Dp,yp,xp,up,zp,Ep,Fp,Ip,Qp,Rp,Sp,Pp,Yp,Tp,Up,Vp,Wp,Xp,Gp,Hp,Jp,Kp,Lp,aq,dq,Np,Op,gq,kq,lq,jq,mq,iq,hq,oq,qq,sq,uq,vq,wq,xq,yq,zq,Aq,Bq,Cq,Dq,Eq,Iq,Mq,Jq,Oq,Sq,Uq,Wq,Yq,Zq,$q,ar,cr,lr,dr,er,fr,gr,nr,jr,or,rr,sr,tr,pr,qr,ur,vr,yr,Cr,Dr,Gr,Ir,Jr,Hr,Er,xr,Br,zr,Ar,Mr,Nr,Or,Pr,Sr,Qr,Rr,Tr,Xr,Yr,Zr,$r,as,bs,cs,ds,es,gs,hs,is,ks,ms,rs,ss,ts,vs,ws,xs,zs,As,ys,Bs,Es,Ds,Cs,Is,Hs,Ns,Jg,Kg;_.aa=" is registered.";ba=" is unsupported on this platform.";ca=" to a log level. Falling back to default!";
4
+ _.da="6.21.0";_.ea="AdaptationSet";_.fa="Already destroyed. No-op";_.ha="Already released. No-op";_.ia="Autoplay is not allowed due to browser policy.";ja="Autoplay should not be used for preloaded streams. ";_.ka="BANDWIDTH";_.la="BASIC";ma="CHECKSUM";_.na="CODECS";_.oa="Cannot retrieve buffer information due to platform limitations";_.pa="CastlabsPlayer";_.qa="Configuration is valid";ra="Content-Length";sa="Content-Type";_.ta="Could not find configured DRM environment.";ua="DRM licenses loaded";
5
+ va="DRMtoday";wa="DRMtodayOnboard";xa="Destroying player";_.ya="Disable track type ";_.za="EXT-X-BYTERANGE";_.Ba="EXT-X-DATERANGE";_.Ca="EXT-X-DISCONTINUITY";_.Da="EXT-X-DISCONTINUITY-SEQUENCE";_.Ea="EXT-X-ENDLIST";_.Fa="EXT-X-KEY";_.Ga="EXT-X-MAP";_.Ha="EXT-X-MEDIA-SEQUENCE";_.Ia="EXT-X-PART-INF";_.Ja="EXT-X-PLAYLIST-TYPE";_.Ka="EXT-X-PRELOAD-HINT";_.La="EXT-X-PROGRAM-DATE-TIME";_.Ma="EXT-X-SERVER-CONTROL";_.Oa="EXT-X-TARGETDURATION";Pa="Error while decoding string!";_.Ra="Error while fetching license!";
6
+ _.Sa="FairPlay Certificate URL is not defined";_.Ta="FairPlay License URL is not defined";_.Ua="GROUP-ID";Va="HW_SECURE_ALL";Wa="HW_SECURE_CRYPTO";Xa="HW_SECURE_DECODE";Ya="HeaderDrm";Za="InvalidStateError";_.ab="LANGUAGE";bb="License verification failed: ";cb="Load interrupted while a player release is pending";_.db="Loading player with configuration";_.eb="MaxHeight";_.fb="MaxWidth";ib="Missing media element";jb="No drmtoday configuration found in player configuration. Unable to modify the DRM license request!";
7
+ kb="No event provided!";lb="No items in the playlist";mb="No sources provided!";nb="No track data attached to the event, unable to add track!";ob="Not a persistent session.";_.pb="Not supported";qb="NotAllowedError";rb="NotSupportedError";_.sb="PLAYLIST";_.tb="POST";_.ub="PlayReady License URL is not defined";vb="Player not ready yet.";_.xb="Player sources";_.yb="Please make sure ";zb="Preloading is not supported by this player.";_.Ab="QualityLevel";_.Bb="RESOLUTION";_.Cb="Representation";Eb="STANDARD";
8
+ _.Fb="SW_SECURE_CRYPTO";_.Gb="SW_SECURE_DECODE";Hb="Session is closed";Ib="Skipping Session creation. License for init data was already requested in ";_.Jb="SmoothStreamingMedia";_.Kb="TYPE";Lb="The index is not in the allowed range.";_.Mb="URI";Nb="Unable to translate ";_.Ob="Unhandled/ignored event";_.Pb="Unregistering listeners";Qb="Unsupported keySystem";Rb="Using VTTCue polyfill from 3 argument TextTrackCue.";_.Sb="VIDEO";_.Tb="VOD";Ub="Wait for preloading to finish";Vb="WebkitEmeManager.MediaKeySession.load";
9
+ _.Wb="Widevine License URL is not defined";Xb="Will create EME Manager: ";_.Yb="X-ASSET-LIST";_.Zb="X-ASSET-URI";_.$b="X-PLAYOUT-LIMIT";_.ac="X-RESUME-OFFSET";_.bc="ad-break-started";_.cc="ad-break-stopped";_.dc="ad-buffering";_.ec="ad-clicked";_.fc="ad-completed";_.gc="ad-first-quartile";hc="ad-hls-asset-list-request";ic="ad-hls-asset-list-response";_.jc="ad-impression";_.kc="ad-loaded";_.lc="ad-midpoint";_.mc="ad-paused";_.nc="ad-progress";_.oc="ad-resumed";_.qc="ad-skipped";_.rc="ad-started";
10
+ _.sc="ad-stopped";_.tc="ad-third-quartile";_.uc="addtrack";_.vc="ads-timeline-changed";_.wc="airplay-casting-ended";_.xc="airplay-casting-started";_.yc="airplay-status-changed";_.zc="application/cea-608";_.Ac="application/dash+xml";Bc="application/mp4";_.Cc='application/mp4; codecs\x3d"stpp"';_.Dc='application/mp4; codecs\x3d"wvtt"';_.Ec="application/ttml+xml";_.Fc="application/vnd.ms-sstr+xml";Gc="application/x-www-form-urlencoded";_.p="audio";_.Hc="audio/aac";_.Ic="audio/ac3";_.Jc="audio/eac3";
11
+ _.Kc="audio/mp4";Lc='audio/mp4;codecs\x3d"mp4a.40.2"';_.Mc="audiobufferchanged";_.Nc="autoplaynotallowed";_.Oc="bitratechanged";_.Pc="boolean";_.Qc="bufferingended";_.Rc="bufferingstarted";Sc="canplay";Uc="canplaythrough";_.Vc="castingstarted";_.Zc="caststatuschanged";_.$c="cdn-switch-success";_.ad="cenc";_.bd="center";cd="certificate-request";dd="change";ed="chrome";_.fd="clpp-fill";gd="clpp-hidden";hd="clpp-mc-playlist";id="clpp-visible";_.jd="clpp.cast.CastSender";kd="clpp.drm.HeaderDrm";ld="clpp.drm.eme.AppleEmeManager";
12
+ md="clpp.native.Player";nd="clpp.plist.McPlaylist";od="clpp.utils.Platform";_.pd="codecs";_.qd="column-reverse";_.rd="com.adobe.primetime";_.sd="com.apple.fps";_.td="com.apple.hls.interstitial";ud="com.apple.quicktime.HLS";_.vd="com.microsoft.playready";wd="com.microsoft.playready.recommendation";_.xd="com.widevine.alpha";_.yd="config.drm.customData is not defined";zd="controls";_.Ad="cuechange";_.Bd="decoder";_.Cd="destroy()";_.Dd="disabled";_.Ed="div";Fd="drm.mediaKeys.end";Gd="drm.mediaKeys.start";
13
+ Hd="drm.onPlay.end";Id="drm.onPlay.start";_.Jd="drmexpirationupdate";Kd="drmrenewalstarted";_.Md="drmsessionpersisted";_.Nd="drmsessionupdate";Od="drmtoday";Pd="durationchange";_.Qd="ec-3";Rd="encrypted";_.Sd="end";_.Td="ended";_.r="error";_.Ud="estimatedThroughputKbps";_.Vd="forced";Wd="fullscreenElement";_.Xd="function";_.Yd="height";_.Zd="hidden";_.$d="html";_.ae="image";_.be="internal-error";ce="keystatuseschange";_.de="left";ee="license-renewal";fe="license-request";_.ge="line-left";_.he="line-right";
14
+ _.ie="live-turned-static";_.je="load";_.ke="loadeddata";_.le="loadedmetadata";ne="loadstart";_.oe="main";_.se="mdat";_.te="mdia";_.ue="message";_.ve="metadata";_.we="mimeType";_.xe="minf";_.ye="moov";_.ze="mpd-type-changed";_.Ae="mpeg-dash-callback-event";_.Be="none";_.t="number";_.Ce="object";_.De="onBitrateChanged()";_.Ee="onPlayerError()";_.Fe="onPlayerWillDestroy";_.Ge="onPlayerWillRelease";_.He="onStateChanged()";Ie="online-status-changed";_.Je="optional";_.Ke="org.w3.clearkey";_.Le="output-restricted";
15
+ _.Me="pause";_.Ne="persistent";_.Oe="persistent-license";Pe="picture-in-picture";_.Qe="play";Re="player.afterLoad.end";Se="player.afterLoad.start";Te="player.appendLoad.end";Ue="player.appendLoad.start";Ve="player.beforeLoad.end";We="player.beforeLoad.start";Xe="player.load.end";Ye="player.load.start";Ze="player.setupPlaylist.end";$e="player.setupPlaylist.start";_.af="playing";_.bf="playlist-item-changed";_.cf="playlist-modified";df="playlist.next.end";ef="playlist.next.start";ff="preload-aborted";
16
+ gf="preload-failed";hf="preloaded";jf="preloading";_.kf="prevent";lf="primary-content";_.of="progress";_.qf="px";_.rf="ratechange";sf="released";_.tf="releasing";uf="removetrack";_.vf="required";_.wf="resize";_.xf="right";_.yf="sc-playlist-ended";_.zf="sc-playlist-item-changed";_.Af="sc-playlist-live-turned-static";_.Bf="sc-playlist-timeline-changed";_.Cf="seeked";_.Df="seeking";_.Ef="showing";_.Ff="simid-creative-started";_.Gf="simid-creative-stopped";_.Hf="sinf";_.If="smooth";Jf="stalled";
17
+ _.Kf="start";_.Lf="statechanged";Mf="status-pending";_.Nf="stbl";_.Of="string";_.Pf="stsd";_.Qf="style";_.Rf="subtitles-htmlcue";Sf="temporary";_.Tf="text/vtt";_.Uf="text/xml";_.Vf="timeupdate";_.Wf="trak";_.Xf="ttml-xml";Yf="unauthenticated";_.Zf="und";_.$f="unknown";ag="update";_.bg="urn:scte:scte35";_.cg="urn:scte:scte35:2014";_.dg="user-seeked";_.eg="user-seeking";_.fg="value";gg="version";_.hg="vertical-lr";_.ig="vertical-rl";_.w="video";_.jg="video/mp2t";_.kg="video/mp4";_.lg="videobufferchanged";
18
+ _.mg="videotrackchanged";_.ng="vimond-response";og="visibilitychange";_.pg="vtt-xml";_.tg="waiting";_.ug="waitingforkey";vg="webkit-org.w3.clearkey";wg="webkitkeyadded";xg="webkitkeyerror";yg="webkitkeymessage";zg="webkitneedkey";_.Ag="width";Bg="x-dt-csl-tracking-token";Cg="x-dt-follow-up-token";Dg="x-dt-resp-code";_.Eg="yospace-session-ended";_.Fg="yospace-session-started";Hg=function(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}};
19
+ Ig=function(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:Hg(a)}};Lg=function(a,b){if(b){var c=Jg;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&&Kg(c,a,{configurable:!0,writable:!0,value:b})}};
20
+ Mg=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 Mg(a())};_.z=function(a,b){a=a.split(".");var c=Ng;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};
21
+ _.Qg=function(a){return _.B(a)||Og(a)?a:_.Pg(a)};_.Pg=function(...a){let b={};for(let c=0;c<a.length;c++)null!=a[c]&&(b=Rg(b,{merging:a[c]},1));return b.merging||null};_.Sg=function(a){for(const b in a)if(void 0!==a[b])return!0;return!1};
22
+ Rg=function(a,b,c){const d=c+1;if(_.B(a)||!_.Tg(a))a={};for(const e in b)c=b[e],Og(c)||_.B(c)||_.Ug(c)||c instanceof Element?a[e]=c:_.Tg(c)&&c.buffer&&c.buffer instanceof ArrayBuffer&&_.Ug(c.subarray)?a[e]=c.subarray(0):c instanceof Array?a[e]=Rg([],c,d):!_.B(c)&&_.Vg(c)&&20>d&&(a[e]=Rg(a[e],c,d));return a};Og=function(a){a=typeof a;return a===_.Of||a===_.t||a===_.Pc};_.B=function(a){return null===a||"undefined"===typeof a};_.Tg=function(a){return typeof a===_.Ce};
23
+ _.Ug=function(a){return typeof a===_.Xd};_.Wg=function(a){return typeof a===_.Of};_.Xg=function(a){return typeof a===_.t};_.Vg=function(a){if(_.B(a)||!_.Tg(a))return!1;a=Object.getPrototypeOf(a);return a===Object.prototype||null===a};
24
+ _.Yg=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||!_.Tg(a)||!_.Tg(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
+ Zg=function(a){return(Number.hasOwnProperty("isNaN")?Number.isNaN:b=>b!==b)(a)};$g=function(a){const b=new Map;for(const c of Object.keys(a))b.set(c,a[c]);return b};_.ah=function(a){const b={};a.forEach((c,d)=>{b[d]=c});return b};bh=function(a,b){b=b.toLowerCase();for(const [c,d]of Object.entries(a))if(c.toLowerCase()===b)return d;return null};eh=function(a){return a&&0<=ch[a]?ch[a]:dh};
26
+ gh=function(a){if(!a)return _.C("clpp.log",Nb+a+ca),-1;const b=fh[a.toUpperCase()];return void 0===b?(_.C("clpp.log",Nb+a+ca),-1):b};_.ih=function(a){hh.info.apply(hh,arguments)};_.jh=function(a){hh.debug.apply(hh,arguments)};_.C=function(a){hh.warn.apply(hh,arguments)};_.kh=function(a){hh.error.apply(hh,arguments)};_.nh=function(a){if(a){var b=a.a();b in _.lh?_.mh.warn("Player-Factory '"+b+"' already registered"):(_.lh[b]=a,_.mh.info("Registered Player-Factory: '"+b+"'"))}};
27
+ oh=function(a){return Object.values(_.lh).find(a)||null};_.qh=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)ph(b[c]);a.a.clear()};rh=function(a,b,c){var d=[Rd,"msneedkey",zg,"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)};ph=function(a){a.target.removeEventListener(a.type,a.a,a.f);a.target=null;a.a=null};th=function(a){return sh(a).filter(b=>b.type===ud&&!b.ve)};uh=function(a){a.forEach(b=>{b.ve=!0})};
28
+ yh=function(a,b){a=a.map(c=>({startTime:c.startTime,endTime:c.endTime,key:c.value.key,value:c.value.data,Af:!1}));a=vh(a);b&&(a=wh(a));return new Set(xh(a))};sh=function(a){const b=[];for(const c of a)b.push(c);return b};zh=function(a,b){const c=a.endTime-a.startTime,d=b.endTime-b.startTime,e=a.ff||a.startTime,f=b.ff||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};
29
+ xh=function(a){const b=[];for(const c of a)(a=b.find(d=>d.startTime===c.startTime&&d.endTime===c.endTime))?Ah(c,a):(a=Bh(c),b.push(a));return b};Ah=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=_.cg,b.type=_.Ch};
30
+ Bh=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:_.Dh,eventElement:null};Ah(a,b);return b};vh=function(a){const b=new Set(a),c=new Set(a.filter(d=>"SCTE35-OUT"===d.key).map(Eh));a.filter(d=>"SCTE35-IN"===d.key).forEach(d=>{c.has(Eh(d))||(d.Af=!0)});return Array.from(b.values())};wh=function(a){a.forEach(b=>{b.Af&&(b.endTime=b.startTime,b.startTime=0)});return a};Eh=function(a){return`${a.startTime}-${a.endTime}`};
31
+ Oh=function(a,b){a.g.debug("onMetadataTrackAdded_()");b.mode=_.Zd;var c=!b.cues||0===b.cues.length;if(a.m.isLive()||!c){var d=b.cues;c=th(d);uh(c);a.a=yh(c,a.l);0<a.a.size&&(Fh(a,a.a),a.m.trigger(new _.E(_.Gh)));a.j.on(b,_.Ad,()=>{{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 _.E(_.Hh,{detail:g})))}else h=g.startTime<=h&&h<=g.endTime,!h&&f.f.has(g)?(f.f.delete(g),f.m.trigger(new _.E(_.Ih,
32
+ {detail:g}))):h&&!f.f.has(g)&&(f.f.add(g),f.m.trigger(new _.E(_.Hh,{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);Jh(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;Mh(a,b);f=th(d);var k=yh(f,a.l);g=new Set;h=!1;for(l of k)(k=Nh(a,l))?(l.customAttributes&&(k.customAttributes=_.Pg(k.customAttributes||{},l.customAttributes)||
33
+ void 0),h=!0):(a.a.add(l),g.add(l));var l={hh:g,lg:0<g.size||h};const {hh:m,lg:n}=l;uh(f);(e||n)&&a.m.trigger(new _.E(_.Gh));Fh(a,m)},6E3))}};Ph=function(a,b){a.j.on(b,_.uc,c=>{c=c.track;c.kind===_.ve&&Oh(a,c)})};Fh=function(a,b){for(const c of b)a.m.trigger(new _.E(_.Qh,{detail:c}))};Nh=function(a,b){return Array.from(a.a.values()).find(c=>b.startTime===c.startTime&&b.endTime===c.endTime)||null};
34
+ Mh=function(a,b){if(b.cues){var c=sh(b.cues).filter(f=>f.type===ud),d=c.filter(f=>f.ve);c=c.filter(f=>!f.ve);var e=[];for(const f of c)for(const g of d)zh(f,g)&&(e.push(f),g.ff=f.startTime);Jh(a,b,e);0<e.length&&a.g.debug(`Removed ${e.length} duplicated cues.`)}};Jh=function(a,b,c){for(const d of c)try{b.removeCue(d)}catch(e){a.g.debug("Failed to remove cue",d,e)}};_.Rh=function(a){return Array.isArray(a)?a:[a]};Sh=function(a,b){return a===b?!0:a.length===b.length&&a.every((c,d)=>c===b[d])};
35
+ Uh=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 Th(a,b)&&Th(b,a)};Th=function(a,b){const c=new Set(a);return b.every(d=>c.has(d))};_.Vh=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())};Wh=function(a,b){const c=new Set(a),d=new Set(b);return{uh:a.filter(e=>!d.has(e)),mi:a.filter(e=>d.has(e)),jg:b.filter(e=>!c.has(e))}};
36
+ Xh=function(a,b){b=b.track;b.kind!==_.ve&&(b.mode===_.Ef&&(b.mode=_.Zd),a.a.on(b,_.Ad,c=>{c=c.target||c.srcElement;c.mode=_.Zd;c.activeCues&&(c=Array.from(c.activeCues).map(a.o),a.l.append(c,[]))}))};Yh=function(a,b,c,d){a=`${a===_.F?"FATAL":"RECOVERABLE"} Clpp-Error [Category ${b} - Code ${c}]`;if(_.Wg(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};
37
+ Zh=function(a,b){const c=b||Sh;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)}};_.$h=function(a){return null!=a};bi=function(...a){for(let b=0;b<a.length;b++){const c=a[b];if(null!==c&&void 0!==c)return c}throw new _.ai("No non-null, non-undefined value found");};ci=function(...a){for(let b=0;b<a.length;b++){const c=a[b];if(null!==c&&void 0!==c)return c}};
38
+ _.di=function(a){var b;a instanceof _.di?(ei(this,a.sb),this.pc=a.pc,this.Wa=a.Wa,fi(this,a.Gc),this.Ea=a.Ea,_.gi(this,hi(a.a)),this.ic=a.ic):a&&(b=String(a).match(ii))?(ei(this,b[1]||"",!0),this.pc=ji(b[2]||""),this.Wa=ji(b[3]||"",!0),fi(this,b[4]),this.Ea=ji(b[5]||"",!0),_.gi(this,b[6]||"",!0),this.ic=ji(b[7]||"")):this.a=new _.ki(null)};ei=function(a,b,c){a.sb=c?ji(b,!0):b;a.sb&&(a.sb=a.sb.replace(/:$/,""))};
39
+ fi=function(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.Gc=b}else a.Gc=null};_.gi=function(a,b,c){b instanceof _.ki?a.a=b:(c||(b=li(b,mi)),a.a=new _.ki(b))};ji=function(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""};li=function(a,b,c){return typeof a===_.Of?(a=encodeURI(a).replace(b,ni),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null};ni=function(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)};_.ki=function(a){this.f=a||null};
40
+ hi=function(a){var b=new _.ki;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};pi=function(a,b){const c=oi[a];for(const d of c)for(const e of b)if(d.test(e.trim()))return e.trim();return a===_.G?"":null};_.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};
41
+ _.ri=function(a){var b=(a||"").split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=qi.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a};_.si=function(a,b){a=_.ri(a);b=_.ri(b);return a.split("-")[0]===b.split("-")[0]};ti=function(a){return a.reduce((b,c)=>b+c,0)};_.ui=function(a,b){for(const c of a)if(!b(c))return!1;return!0};vi=function*(a){for(let b=0;b<a;b++)yield b};
42
+ xi=function(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!==b.byteLength)return!1;if(wi(a)===wi(b)&&(a.byteOffset||0)===(b.byteOffset||0))return!0;const c=_.K(a);b=_.K(b);for(const d of vi(a.byteLength))if(c[d]!==b[d])return!1;return!0};wi=function(a){return a instanceof ArrayBuffer?a:a.buffer};_.K=function(a,b=0,c=Infinity){return yi(a,b,c,Uint8Array)};
43
+ yi=function(a,b,c,d){const e=d.BYTES_PER_ELEMENT||1,f=wi(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)};zi=function(a,b=0,c=Infinity){return yi(a,b,c,Uint16Array)};Ai=function(a,b=0,c=Infinity){return yi(a,b,c,Uint32Array)};_.Bi=function(a,b=0,c=Infinity){return yi(a,b,c,Int32Array)};_.Ci=function(a,b=0,c=Infinity){return yi(a,b,c,DataView)};
44
+ Di=function(a){return a instanceof ArrayBuffer?a:0===a.byteOffset&&a.byteLength===a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer};Ei=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};
45
+ _.Fi=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(Pa);return a}a=escape(Ei(a));try{return decodeURIComponent(a)}catch(b){throw Error(Pa);}};
46
+ Hi=function(a,b,c){if(!a)return"";if(!c&&0!==a.byteLength%2)throw Gi.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 Ei(c)};
47
+ _.Ii=function(a,b){if(_.Wg(a))return a;let c="";b=!!b;const d=_.K(a);239===d[0]&&187===d[1]&&191===d[2]?c=_.Fi(d):254===d[0]&&255===d[1]?c=Hi(d.subarray(2),!1):255===d[0]&&254===d[1]&&(c=Hi(d.subarray(2),!0));const e=function(f,g){return f.byteLength<=g||32<=f[g]&&126>=f[g]}.bind(null,d);Gi.debug("Unable to find byte-order-mark, making an educated guess.");0===d[0]&&0===d[2]?c=Hi(a,!1):0===d[1]&&0===d[3]?c=Hi(a,!0):e(0)&&e(1)&&e(2)&&e(3)&&(c=_.Fi(a));if(c)return b&&(c=escape(c)),c;throw Error("Unable to detect text encoding");
48
+ };_.Ji=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};_.Ki=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};
49
+ _.Li=function(a,b){var c=b||1;b=a.length;const d=new ArrayBuffer(b*c);let e;4===c?e=Ai(d):2===c?e=zi(d):e=_.K(d);for(c=0;c<b;c++)e[c]=a.charCodeAt(c);return d};_.Mi=function(a,b){return String.prototype.startsWith?a.startsWith(b):0===a.indexOf(b)};_.Ni=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};_.Oi=function(a){return!!(a&&0<a.length)};_.Pi=function(a){return!a||0===a.length};
50
+ _.Qi=function(a){if(void 0===a||null===a||""===a)return"";try{let b=Number(a);if(Zg(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""}};_.Si=function(a){a=a.replace(/<[^>]+>/gi,"");Ri.innerHTML=a;a=Ri.textContent;return a=a.replace(/<[^>]+>/gi,"")};_.Ui=function(a,b=!0){a=_.Ti(a).replace(/\+/g,"-").replace(/\//g,"_");return b?a:a.replace(/[=]*$/,"")};_.Ti=function(a){a=Ei(_.K(a));return btoa(a)};
51
+ _.Vi=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};_.Wi=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};_.Xi=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};
52
+ _.Yi=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};_.Zi=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};
53
+ _.$i=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};
54
+ _.dj=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 _.aj(d);var f;(f=_.$i(d,/^([^,=]+)(?:,|$)/g))&&f[1]&&(e=f[1].trim());const g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;for(;f=_.$i(d,g);)c.push(new _.bj(f[1],f[2]||f[3]||""))}return new _.cj(a,b,c,e)};_.fj=function(){return{maxAttempts:1,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:0,fatalStatusCodes:[...ej]}};
55
+ gj=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||[...ej]};hj=function(a){const b={};a.forEach((c,d)=>{b[d.trim()]=c});return b};
56
+ _.jj=function(a,b){_.Wg(a)&&(a={uris:[a]});Array.isArray(a)&&(a={uris:a});const c={uris:a.uris||[],type:a.type||_.ij,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:[...ej],requestStartTimestamp:null};a.keyInfo&&(c.keyInfo=a.keyInfo);b&&gj(c,b);return c};
58
+ _.nj=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(kj(c))return lj(a);throw mj(a);};kj=function(a){return 200<=a&&299>=a&&202!==a};lj=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
+ mj=function(a){a=lj(a);try{var b=_.Ii(a.data,!0)}catch(d){b=null}_.jh("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})};oj=function(a,b){b=parseInt(b,10);Number.isNaN(b)&&(b=-1);a.bytesTotal=b;a.bytesLoaded=0;a.bytesRemaining=b};pj=function(a,b,c){0<a.bytesRemaining&&(a.bytesRemaining-=b);a.bytesLoaded+=b;if(a.onProgress)a.onProgress(b,c)};
60
+ qj=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()};tj=function(a,b){a.W.then(()=>b(!0),()=>b(!1));return a};_.uj=function(a,b){a.a.push(tj(b,()=>{{var c=a.a;const d=c.indexOf(b);-1<d&&c.splice(d,1)}}))};vj=function(a,b){return _.x(function*(){const c=yield a.fetch(b);return _.Fi(c.data).replace(/\r\n|\r(?=[^\n]|$)/gm,"\n")})};
61
+ wj=function(a,b){return _.x(function*(){const c=yield vj(a,b);try{const d=JSON.parse(c);if(null==d||typeof d!==_.Ce)throw Error("Not an object");return d}catch(d){throw new _.ai("Failed to parse JSON response","json-failed");}})};xj=function(a,b){for(const c of a.headers){const [d,e]=c;b.headers[d]||(b.headers[d]=e)}};
62
+ yj=function(a,b){const c=new _.di(b.uris[b.uriIndex]);let d=c.sb;d||(d=location.protocol,d=d.slice(0,-1),ei(c,d),b.uris[b.uriIndex]=c.toString());const e=a.a[d];if(!e)throw new _.I(_.F,1,1E3,{url:c.toString()});return f=>e(f)};zj=function(a,b,c,d){d=void 0===d?"HEAD":d;return _.x(function*(){if(!navigator.onLine)return!1;if(b){const e=_.jj(b,c);e.method=d;c||(e.timeout=5E3);e.headers["cache-control"]="no-cache";try{yield a.fetch(e).W}catch(f){if(1002===f.code||1003===f.code)return!1}}return!0})};
63
+ Aj=function(a){return`@@scheme:${a.scheme||""}`+`@@value:${a.value}`+`@@id:${a.id||""}@@type:${a.type||""}`+`@@protocol:${a.protocol||""}`};_.Bj=function(a){return a&&a!==_.Zf?a:null};
64
+ Dj=function(a){if(!a)throw new _.I(_.F,3,3101,`Invalid track type: ${a}`);if(!_.Wg(a))throw new _.I(_.F,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 Cj:return Cj}throw new _.I(_.F,3,3101,`Unknown track type: ${a}.`);};
65
+ Gj=function(a,b){a=Dj(a);const c=_.Bj(b.kind);let d=b.id;d||(d=String(_.Ej++));a=new _.Fj(d,c===_.ve?Cj:a);a.kind=c;a.label=_.Bj(b.label);a.language=_.Bj(b.language);a.originalLanguage=b.originalLanguage||a.language;return a};_.Hj=function(a){return`${a.scheme}//`+`${a.a}${a.port?":"+a.port:""}${a.path}${a.h}${a.f}`};
66
+ _.Ij=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)},""):""};_.Jj=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};
67
+ Kj=function(a,b){return a.startsWith("http:://")||a.startsWith("https:://")?a:(new URL(a,b)).toString()};Lj=function(a,b){return _.x(function*(){const c=_.jj(b);return yield vj(a.f,c)})};Pj=function(a,b,c){return _.x(function*(){const {mimeType:d,renditions:e}=yield Mj(a,b,c),f=new _.Fj("dummy",_.N),g=e.map((h,k)=>{k=new _.Nj(`R${k}`,f);k.bandwidth=h.bandwidth;k.Ic=h.Ic;k.codec=h.codec;k.width=h.width;k.height=h.height;return k});Oj(g);return{renditions:g,mimeType:d||void 0}})};
68
+ Rj=function(a){a=a.split("\n").filter(c=>c.trim().startsWith("#EXT-X-MEDIA:")).map(c=>Qj(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};Mj=function(a,b,c){return _.x(function*(){const d=Sj(b),e=Tj(b,c);return{mimeType:yield Uj(a,e,d[0]?d[0].codec:null),renditions:d}})};
69
+ Oj=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.");};Qj=function(a){const b=_.dj(0,a);a=d=>(d=b.getAttribute(d))?d.value:void 0;var c=a(_.Kb);c=null!=c?{AUDIO:_.M,VIDEO:_.N,SUBTITLES:_.L}[c]:void 0;return{type:c,groupId:a(_.Ua),name:a("NAME"),language:a(_.ab),Yh:a("AUTOSELECT"),default:a("DEFAULT"),fi:a("FORCED"),df:a("CHARACTERISTICS"),uri:a(_.Mb)}};
70
+ Sj=function(a){return a.split("\n").filter(b=>b.trim().startsWith("#EXT-X-STREAM-INF:")).map(b=>{var c=_.dj(0,b);if(c.getAttribute(_.Sb))throw Error("Playlist contains alternative video streams.");var d=_.J(c,_.Bb);b=d?Number(d.split("x")[0]):null;d=d?Number(d.split("x")[1]):null;var e=_.J(c,_.ka);e=e?Number(e):null;var f=_.J(c,"AVERAGE-BANDWIDTH");f=f?Number(f):null;c=_.J(c,_.na);c=_.Vj(_.w,c?c.split(","):[]);return b={bandwidth:e,Ic:f,codec:c,width:b,height:d,mimeType:null}})};
71
+ Tj=function(a,b){return(a=a.split("\n").filter(c=>c.trim().endsWith(".m3u8"))[0])?Kj(a,b):null};Uj=function(a,b,c){return _.x(function*(){if(!b||!c)return null;var d=yield Lj(a,b);d=[Wj(d,b),Xj(d,b)].filter(Boolean);return _.Yj(d,_.w,c)})};Wj=function(a,b){return(a=a.split("\n").find(c=>!c.startsWith("#")&&0<c.trim().length))?Kj(a,b):null};Xj=function(a,b){a=a.split("\n").find(c=>c.startsWith("#EXT-X-MAP:"));return a?(a=_.J(_.dj(0,a),_.Mb))?Kj(a,b):null:null};
72
+ _.ak=function(a,b,c){for(const d of _.Zj)if(d.probe(b,c))return d.create(a);return null};_.bk=function(a){a=_.Zj.indexOf(a);0<=a&&_.Zj.splice(a,1)};ek=function(a,b){var c=ck;dk.set(`${a.toLowerCase().split(";")[0]}-${c}`,{priority:c,plugin:b})};_.ik=function(a,b){var c=[fk,gk,hk,ck];for(const d of c)if(c=dk.get(`${a.toLowerCase().split(";")[0]}-${d}`)){const e=c.plugin(),f=e.isSupported(a,b);e.destroy();if(f)return c.plugin}return null};
73
+ _.jk=function(a,b){b&&(a+=';codecs\x3d"'+b+'"');return a.replace(/\s/g,"")};_.kk=function(a){return a.split(";")[0]};_.lk=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(","):""};mk=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};
74
+ qk=function(){if(nk)return nk;ok||(ok=new _.pk(()=>{nk=null}));(nk=document.querySelector(_.w)||document.querySelector(_.p))||(nk=document.createElement(_.w));ok.fa(1);return nk};_.rk=function(){return!!navigator.userAgent.match(/Edge?\//)};_.sk=function(a){return(navigator.userAgent||"").includes(a)};_.tk=function(a){return _.sk("Tizen"+(a?" "+String(a):""))};
75
+ vk=function(a){const b={major:-1,name:_.$f};if(!a)return b;var c=a.replace(/_/g,".");b.name=c;c=c.split(".");1<=c.length&&(b.major=uk(a,c[0]));2<=c.length&&(b.minor=uk(a,c[1]));3<=c.length&&(b.patch=uk(a,c[2]));4<=c.length&&(b.build=uk(a,c[3]));return b};_.wk=function(){return _.sk("Web0S")};_.yk=function(){return _.wk()&&79===_.xk().major};
76
+ _.xk=function(){const a=zk();const b=["ie","edge","opera","firefox","safari",ed];var c=Ak();const d=Bk[c];for(let e=0,f=b.length;e<f;e++)if(c=d[b[e]]&&a.match(d[b[e]]))return vk(c[1]);return vk("")};_.Ck=function(){return _.sk("CrKey")};_.Dk=function(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!_.tk()};_.Ek=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:_.Dk()&&1<navigator.maxTouchPoints};_.Fk=function(){return/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)};
77
+ uk=function(a,b){try{return parseInt(b,10)}catch(c){Gk.warn("Unable to parse version number for '"+b+"' from '"+a+"'")}return-1};Hk=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};
78
+ Ak=function(){const a=zk();if(!a)return Ik;var b=a.match(/^.+?(?=\))/);if(!b)return Ik;b=b[0];if(Hk(b,["iphone","ipad"]))return Jk;if(Hk(b,["android"]))return Kk;if(Hk(b,["macintosh"]))return Lk;if(Hk(b,["windows nt"]))return Mk;if(Hk(b,["tizen"]))return Nk;if(Hk(b,["web0s"]))return Ok;if(Hk(b,["linux"]))return Pk;Gk.warn("Unable to identify OS from user agent: "+a);return Ik};zk=function(){let a=window.navigator.userAgent;return a=a.toLowerCase()};
79
+ _.Rk=function(){var a=Ak();var b=Ak();var c=Bk[b];if(c){c=zk().match(c.os_version)[1];c=vk(c);if(b===Mk)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=vk("");a:{c=zk();const e=["ie","edge","opera","firefox","safari",ed];var d=Ak();d=Bk[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=Qk}return{os:a,osVersion:b,browser:c,browserVersion:_.xk()}};
80
+ Sk=function(a,b,c){return a.type!==c?!1:void 0!==b.id&&null!==b.id&&""!==b.id?a.id===b.id:_.Yg(a,{kind:_.Bj(b.kind),language:_.Bj(b.language),label:_.Bj(b.label)},["kind","language","label"])};Tk=function(a){return a.enabled||a.selected||a.mode===_.Ef||a.mode===_.Zd};Vk=function(a,b,c){return Uk(a)&&b===_.N&&!!c.enableHlsVideoTrackInfo};
81
+ Wk=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})))})};Xk=function(a,b,c){return Uk(a)&&(b===_.M||b===_.L)&&!!c.enableMetadata};
82
+ Yk=function(a,b,c){return _.x(function*(){var d=a.m.getLoadedSource();d&&a.j&&(d=yield a.j.a(d.url,c),d.Dc&&(d=d.Dc.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"}))))})};Zk=function(a,b){return a.h.filter(c=>c.type===b)};$k=function(a){(a=a.m.getTextDisplayer())&&a.remove(0,Infinity)};bl=function(a,b){if(a=al(a,b))a=Array.from(a),b===_.L&&(a=a.filter(c=>c.kind!==_.ve));return a};
83
+ al=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}};dl=function(a,b){return(a=a.a.get(b)||null)&&a.renditions[0]};el=function(a,b){return(a=a.l.get(b))&&a.renditions[0]};
84
+ hl=function(a,b,c){const d=bl(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=_.Ef;g=_.Dd;break;case _.M:f="enabled";break;case _.N:f="selected"}if(f)for(const h of d)h[f]=Sk(c,h,c.type)?e:g}}else if(a.g.debug(_.ya+b),a.a.get(b)&&d&&b===_.L){for(e of d)e.mode=
85
+ _.Dd;a.a.set(b,null)}b===_.M?a.m.trigger(new _.E(_.fl)):b===_.L&&a.m.trigger(new _.E(_.gl))};il=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=_.Pi(b.url)?URL.createObjectURL(new Blob([])):b.url;d.appendChild(e);a.I.push(e)}}};
86
+ jl=function(a,b){return _.x(function*(){var c=a.m.getConfiguration(),d=_.ak(c,b.mimeType,_.Tf);if(d){c=_.jj(b.url);var e=yield a.m.getNetworkEngine().fetch(c).W;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:_.Tf},il(a,d,c))}else a.g.warn("Track MIME type is not supported",b)})};Uk=function(a){a=a.m.getLoadedSource();return!(!a||a.type!==_.kl&&!a.url.endsWith(".m3u8"))&&_.Dk()};
87
+ ll=function(a,b,c){c=_.Rh(c).filter(e=>e);a.g.info("Find preferred tracks for",b,c);const d=Zk(a,b);c.some(e=>{const f=_.ri(e);return(e=d.find(g=>{g=_.ri(g.language||"");return _.si(f,g)}))?(a.g.info("Will select track with id",e.id),hl(a,b,e),!0):!1})};nl=function(a){return a.name===qb&&ml.some(b=>a.message.startsWith(b))};
88
+ _.ql=function(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&_.Ek()&&(a=360);const b=_.fj();b.maxAttempts=3;a={source:"",license:ol,viewerId:void 0,autoplay:void 0,pauseWhenInBackground:!1,ads:{hls:{enable:!0,resolutionOffsetSec:35}},manifest:{attemptParameters:_.fj(),availabilityWindowOverride:NaN,clockSyncUri:"",ignoreDrmInfo:!1,xlinkFailGracefully:!1,autoCorrectDrift:!0,timeline:{version:1,type:void 0}},abr:{enabled:!0,defaultBandwidthEstimate:1E3,switchInterval:8,bandwidthUpgradeTarget:.85,
89
+ bandwidthDowngradeTarget:.95,useSwitchIntervalForInitialSwitch:!1,restrictions:pl(a),useCmsd:!0},drm:null,enableHtmlCue:!0,preferredAudioLanguage:"",preferredTextLanguage:"",preferredAudioRole:_.oe,preferredTextRole:"",preferredAudioChannelCount:2,preferredAudioCodec:[],preferredVideoCodec:[],preferSpatialAudio:!1,preferForcedSubtitles:!1,volume:null,startTime:null,loop:!1,lowLatencyMode:!1,suggestedPresentationDelay:void 0,muted:void 0,forceWaitForTracks:!1,streaming:{attemptParameters:b,bufferingGoal:10,
88
90
  rebufferingGoal:2,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,relativeTextTimestamp:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.1,disableAudioTracks:!1,disableVideoTracks:!1,smallGapLimit:.5,jumpLargeGaps:!0,durationBackoff:1,maxSegmentToMediaOffset:1,forceNativeTS:!1,preferNativeHlsOnSafari:!0,safeSeekOffset:5,stallEnabled:!0,stallThreshold:3,stallSkip:.5,bufferLimitUpdateInterval:.5,overridePasp:!1,enableLiveEdgeChasing:!1,chasingRate:1.15,startChasingAt:5,stopChasingAt:2,
89
- chaseJumpDistance:10,patchEdgeWhenMixedContent:!1,ignoreDrift:!1,disableFragmentSupport:!1,disableMergedFragments:!1,ignoreManagedMediaSourceStreamingHints:!1},mediaSource:{codecSwitchingStrategy:_.of},restrictions:ml(),tizen:{sideStreamText:_.qk(2)},safari:{enableHlsVideoTrackInfo:!1,enableMetadata:!1},trickPlay:{speedUpMode:_.Bd,preferTrickPlayTracks:!0},playlist:{timeline:"basic",content:_.Tb,cropTimeline:!1}};if(_.qk()||_.tk())a.ads.hls.enable=!1;if(_.pk("Edge/")||_.qk())a.streaming.gapDetectionThreshold=
90
- .5;_.tk()&&(a.streaming.stallEnabled=!1);_.vk()&&(a.streaming.stallEnabled=!0,a.streaming.stallThreshold=1,a.streaming.stallSkip=1,a.streaming.gapDetectionThreshold=.02);_.qk()&&(a.streaming.stallEnabled=!0,a.streaming.stallThreshold=1,a.streaming.stallSkip=0);a.vr={enable:!1,attachMouseListener:!0,fieldOfView:70,sensitivity:1,invertHorizontalControl:!1,invertVerticalControl:!1};return a};
91
- ml=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}};
92
- _.pl=function(...a){if(!a)return _.nl();var b=[_.nl()];let c=!1;for(let d of a)null!==d&&void 0!==d&&(_.Vg(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}}));
93
- a=_.Og.apply(null,b);_.Vg(a.volume)&&(""===""+a.volume?a.volume=null:a.volume=Number(a.volume));if(!_.z(a.volume)&&(!_.Wg(a.volume)||Yg(a.volume)))throw new _.G(_.E,7,7100,"config.volume is not a number");if(!_.z(a.preferredTextLanguage)&&!_.Vg(a.preferredTextLanguage)&&!Array.isArray(a.preferredTextLanguage))throw new _.G(_.E,7,7100,"config.preferredTextLanguage is not a string or an array");if(!_.z(a.preferredAudioLanguage)&&!_.Vg(a.preferredAudioLanguage)&&!Array.isArray(a.preferredAudioLanguage))throw new _.G(_.E,
94
- 7,7100,"config.preferredAudioLanguage is not a string or an array");if(!_.z(a.preferredAudioCodec)&&!_.Vg(a.preferredAudioCodec)&&!Array.isArray(a.preferredAudioCodec))throw new _.G(_.E,7,7100,"config.preferredAudioCodec is not a string or an array");if(!_.z(a.preferredVideoCodec)&&!_.Vg(a.preferredVideoCodec)&&!Array.isArray(a.preferredVideoCodec))throw new _.G(_.E,7,7100,"config.preferredVideoCodec is not a string or an array");if(!_.z(a.drm)){if(a.drm.env&&!_.Vg(a.drm.env))throw new _.G(_.E,7,
95
- 7100,"config.drm.env is not a string");if(a.drm.offlineId&&!_.Vg(a.drm.offlineId))throw new _.G(_.E,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(!_.Wg(b.bufferingGoal)||Yg(b.bufferingGoal))throw new _.G(_.E,7,7100,"config.streaming.bufferingGoal is not a number");if(!_.Wg(b.rebufferingGoal)||
96
- Yg(b.rebufferingGoal))throw new _.G(_.E,7,7100,"config.streaming.rebufferingGoal is not a number");if(b.rebufferingGoal>b.bufferingGoal)throw new _.G(_.E,7,7100,"config.streaming.rebufferingGoal must be \x3e\x3d bufferingGoal");if(!_.Wg(b.bufferBehind)||Yg(b.bufferBehind))throw new _.G(_.E,7,7100,"config.streaming.bufferBehind is not a number");if(!_.Wg(b.smallGapLimit)||Yg(b.smallGapLimit))throw new _.G(_.E,7,7100,"config.streaming.smallGapLimit is not a number");if(!_.Wg(b.durationBackoff)||Yg(b.durationBackoff))throw new _.G(_.E,
97
- 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 _.G(_.E,7,7100,"Invalid value for |manifest.availabilityWindowOverride|");ol(a.restrictions);ol(a.abr.restrictions);a.abr.initialRestrictions&&ol(a.abr.initialRestrictions)}return a};
98
- ol=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);
99
- 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 _.G(_.E,7,7100,"Restrictions contain NaN");};ql=function(a){return typeof a===_.De&&!Array.isArray(a)&&"source"in a};_.sl=function(a){return _.rl.get(a)||null};
100
- _.ul=function(a){_.rl.get(a.id())?tl.warn("Component already in use."):_.rl.set(a.id(),a)};vl=function(a){return Array.from(_.rl.values()).find(b=>b instanceof a)||null};wl=function(a){for(const b of _.rl.values())a(b)};xl=function(a){wl(b=>{b.o(a)})};yl=function(a){wl(b=>{b.h(a)})};zl=function(){wl(()=>{})};Al=function(){wl(()=>{})};Bl=function(a){if(null!==vl(a))return null;a=new a;a.f();_.ul(a);tl.info("Installed component:",a.id());return a};
101
- Cl=function(a){if(a=vl(a))a.a(),_.rl.delete(a.id()),tl.info("Uninstalled component:",a.id())};Dl=function(a){return _.Li(a,_.sd)||_.Li(a,_.vd)};El=function(a,b){3===b.type&&(a.f&&(a.g.debug("Attaching tracking token"),b.headers[Cg]=a.f),a.a&&(b.headers[Dg]=a.a))};
102
- Fl=function(a,b){return b.request&&3===b.request.type&&(a.f=b.headers[Cg],a.a=b.headers[Dg],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(_.Ei(_.Ui(b))),{delay:a.renewalPeriod,Qh:{maxAttempts:a.retryCount,baseDelay:1E3*a.retryPeriod,backoffFactor:1,fuzzFactor:0,timeout:0}}):null};_.Hl=function(a){_.Gl[a.I]=a};
103
- _.Jl=function(a){const b={attemptParameters:_.ej(),enforceSingleSession:!1,delayLicenseRequestUntilPlayed:!1,enableSessionCacheForSkd:!1,ignoreUnrecognizedInitData:!0,bb:{},widevineVersion:_.xd};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!==
104
- a.ignoreUnrecognizedInitData&&(b.ignoreUnrecognizedInitData=!!a.ignoreUnrecognizedInitData),typeof a.widevineVersion===_.Pf&&0<a.widevineVersion.length&&(b.widevineVersion=a.widevineVersion),a.env)){const c=_.Gl[a.env]||null;if(!c)throw _.ih(_.ta,_.yb+a.env+_.aa),new _.G(_.E,6,6015,`DRM environment '${a.env}' is missing.`);b.bb=_.Il(c,a.customData)||{};_.Li(a.env.toLowerCase(),Od)&&(b.enforceSingleSession=!0)}return b};
105
- Ll=function(a){a=Kl[a];if(!a)return null;const b=_.Ok();return b.os===Hk&&4===b.osVersion.major&&4===b.osVersion.minor?null:new Uint8Array(a)};
106
- _.Il=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[_.xd];if(g){var h=g.licenseUrl;d=bi(d,g.videoRobustness);e=bi(e,g.audioRobustness);var k=g.modifiers,l=ai(b?b.widevineDistinctiveIdentifierRequired:void 0,g.distinctiveIdentifierRequired,!1),m=ai(b?b.widevinePersistentStateRequired:void 0,g.persistentStateRequired,!1);g=void 0===f?g.serverCertificate:null===f?null:typeof f===_.Pf?Ll(f):f;c[_.xd]=
91
+ chaseJumpDistance:10,patchEdgeWhenMixedContent:!1,ignoreDrift:!1,disableFragmentSupport:!1,disableMergedFragments:!1,ignoreManagedMediaSourceStreamingHints:!1},mediaSource:{codecSwitchingStrategy:_.kf},restrictions:pl(),tizen:{sideStreamText:_.tk(2)},safari:{enableHlsVideoTrackInfo:!1,enableMetadata:!1},mse:{sendPlaybackSessionIdHeader:!1},trickPlay:{speedUpMode:_.Bd,preferTrickPlayTracks:!0},playlist:{timeline:"basic",content:_.Tb,cropTimeline:!1},yospace:{enabled:!1}};if(_.tk()||_.wk())a.ads.hls.enable=
92
+ !1;if(_.sk("Edge/")||_.tk())a.streaming.gapDetectionThreshold=.5;_.wk()&&(a.streaming.stallEnabled=!1);_.yk()&&(a.streaming.stallEnabled=!0,a.streaming.stallThreshold=1,a.streaming.stallSkip=1,a.streaming.gapDetectionThreshold=.02);_.tk()&&(a.streaming.stallEnabled=!0,a.streaming.stallThreshold=1,a.streaming.stallSkip=0);a.vr={enable:!1,attachMouseListener:!0,fieldOfView:70,sensitivity:1,invertHorizontalControl:!1,invertVerticalControl:!1};return a};
93
+ pl=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}};
94
+ _.sl=function(...a){if(!a)return _.ql();var b=[_.ql()];let c=!1;for(let d of a)null!==d&&void 0!==d&&(_.Wg(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}}));
95
+ a=_.Pg.apply(null,b);_.Wg(a.volume)&&(""===""+a.volume?a.volume=null:a.volume=Number(a.volume));if(!_.B(a.volume)&&(!_.Xg(a.volume)||Zg(a.volume)))throw new _.I(_.F,7,7100,"config.volume is not a number");if(!_.B(a.preferredTextLanguage)&&!_.Wg(a.preferredTextLanguage)&&!Array.isArray(a.preferredTextLanguage))throw new _.I(_.F,7,7100,"config.preferredTextLanguage is not a string or an array");if(!_.B(a.preferredAudioLanguage)&&!_.Wg(a.preferredAudioLanguage)&&!Array.isArray(a.preferredAudioLanguage))throw new _.I(_.F,
96
+ 7,7100,"config.preferredAudioLanguage is not a string or an array");if(!_.B(a.preferredAudioCodec)&&!_.Wg(a.preferredAudioCodec)&&!Array.isArray(a.preferredAudioCodec))throw new _.I(_.F,7,7100,"config.preferredAudioCodec is not a string or an array");if(!_.B(a.preferredVideoCodec)&&!_.Wg(a.preferredVideoCodec)&&!Array.isArray(a.preferredVideoCodec))throw new _.I(_.F,7,7100,"config.preferredVideoCodec is not a string or an array");if(!_.B(a.drm)){if(a.drm.env&&!_.Wg(a.drm.env))throw new _.I(_.F,7,
97
+ 7100,"config.drm.env is not a string");if(a.drm.offlineId&&!_.Wg(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(!_.Xg(b.bufferingGoal)||Zg(b.bufferingGoal))throw new _.I(_.F,7,7100,"config.streaming.bufferingGoal is not a number");if(!_.Xg(b.rebufferingGoal)||
98
+ Zg(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(!_.Xg(b.bufferBehind)||Zg(b.bufferBehind))throw new _.I(_.F,7,7100,"config.streaming.bufferBehind is not a number");if(!_.Xg(b.smallGapLimit)||Zg(b.smallGapLimit))throw new _.I(_.F,7,7100,"config.streaming.smallGapLimit is not a number");if(!_.Xg(b.durationBackoff)||Zg(b.durationBackoff))throw new _.I(_.F,
99
+ 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(_.F,7,7100,"Invalid value for |manifest.availabilityWindowOverride|");rl(a.restrictions);rl(a.abr.restrictions);a.abr.initialRestrictions&&rl(a.abr.initialRestrictions)}return a};
100
+ rl=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);
101
+ 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");};tl=function(a){return typeof a===_.Ce&&!Array.isArray(a)&&"source"in a};_.vl=function(a){return _.ul.get(a)||null};
102
+ _.xl=function(a){_.ul.get(a.id())?wl.warn("Component already in use."):_.ul.set(a.id(),a)};yl=function(a){return Array.from(_.ul.values()).find(b=>b instanceof a)||null};zl=function(a){for(const b of _.ul.values())a(b)};Al=function(a){zl(b=>{b.o(a)})};Bl=function(a){zl(b=>{b.h(a)})};Cl=function(){zl(()=>{})};Dl=function(){zl(()=>{})};El=function(a){if(null!==yl(a))return null;a=new a;a.f();_.xl(a);wl.info("Installed component:",a.id());return a};
103
+ Fl=function(a){if(a=yl(a))a.a(),_.ul.delete(a.id()),wl.info("Uninstalled component:",a.id())};Gl=function(a){return _.Mi(a,_.sd)||_.Mi(a,_.vd)};Hl=function(a,b){3===b.type&&(a.f&&(a.g.debug("Attaching tracking token"),b.headers[Bg]=a.f),a.a&&(b.headers[Cg]=a.a))};
104
+ Il=function(a,b){return b.request&&3===b.request.type&&(a.f=b.headers[Bg],a.a=b.headers[Cg],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(_.Fi(_.Vi(b))),{delay:a.renewalPeriod,Uh:{maxAttempts:a.retryCount,baseDelay:1E3*a.retryPeriod,backoffFactor:1,fuzzFactor:0,timeout:0}}):null};_.Kl=function(a){_.Jl[a.I]=a};
105
+ _.Ml=function(a){const b={attemptParameters:_.fj(),enforceSingleSession:!1,delayLicenseRequestUntilPlayed:!1,enableSessionCacheForSkd:!1,ignoreUnrecognizedInitData:!0,Ia:{},widevineVersion:_.xd};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!==
106
+ a.ignoreUnrecognizedInitData&&(b.ignoreUnrecognizedInitData=!!a.ignoreUnrecognizedInitData),typeof a.widevineVersion===_.Of&&0<a.widevineVersion.length&&(b.widevineVersion=a.widevineVersion),a.env)){const c=_.Jl[a.env]||null;if(!c)throw _.jh(_.ta,_.yb+a.env+_.aa),new _.I(_.F,6,6015,`DRM environment '${a.env}' is missing.`);b.Ia=_.Ll(c,a.customData)||{};_.Mi(a.env.toLowerCase(),Od)&&(b.enforceSingleSession=!0)}return b};
107
+ Ol=function(a){a=Nl[a];if(!a)return null;const b=_.Rk();return b.os===Kk&&4===b.osVersion.major&&4===b.osVersion.minor?null:new Uint8Array(a)};
108
+ _.Ll=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[_.xd];if(g){var h=g.licenseUrl;d=ci(d,g.videoRobustness);e=ci(e,g.audioRobustness);var k=g.modifiers,l=bi(b?b.widevineDistinctiveIdentifierRequired:void 0,g.distinctiveIdentifierRequired,!1),m=bi(b?b.widevinePersistentStateRequired:void 0,g.persistentStateRequired,!1);g=void 0===f?g.serverCertificate:null===f?null:typeof f===_.Of?Ol(f):f;c[_.xd]=
107
109
  {licenseUrl:h,videoRobustness:d,audioRobustness:e,modifiers:k,distinctiveIdentifierRequired:l,persistentStateRequired:m,serverCertificate:g}}(g=a.f[_.sd])&&(c[_.sd]={licenseUrl:g.licenseUrl,certificateUrl:g.certificateUrl,modifiers:g.modifiers});h=b?b.playReadyVideoRobustness:void 0;b=b?b.playReadyAudioRobustness:void 0;(g=a.f[_.vd])&&(c[_.vd]={licenseUrl:g.licenseUrl,videoRobustness:h||g.videoRobustness,audioRobustness:b||g.audioRobustness,individualizationServer:g.individualizationServer,useLegacySystem:g.useLegacySystem,
108
- modifiers:g.modifiers});return c};_.Ml=function(){throw new _.G(_.E,3,3E3);};_.Nl=function(a,b,c){const d=c||0;c=b.byteLength-d;const e=_.J(a.f.buffer);b=_.J(b.buffer,d,c);try{e.set(b,a.a),a.a+=c}catch(f){_.Ml()}};_.N=function(a,b){try{a.f.setUint32(a.a,b,a.h),a.a+=4}catch(c){_.Ml()}};_.Ol=function(a){return a.a<a.f.byteLength};_.Pl=function(){throw new _.G(_.E,3,3E3,"Buffer read out of bounds.");};_.Ql=function(a){try{const b=a.f.getUint8(a.a);a.a+=1;return b}catch(b){_.Pl()}};
109
- _.Rl=function(a){try{const b=a.f.getUint16(a.a,a.h);a.a+=2;return b}catch(b){_.Pl()}};_.O=function(a){try{const b=a.f.getUint32(a.a,a.h);a.a+=4;return b}catch(b){_.Pl()}};_.Sl=function(a){try{const b=a.f.getInt32(a.a,a.h);a.a+=4;return b}catch(b){_.Pl()}};_.Tl=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){_.Pl()}if(2097151<c)throw new _.G(_.E,3,3001);a.a+=8;return c*Math.pow(2,32)+b};
110
- Ul=function(a,b){const c=new Uint8Array(b);for(let d=0;d<b;d++)c[d]=_.Ql(a);return c};_.Vl=function(a,b){a.a+b>a.f.byteLength&&_.Pl();var c=a.a+a.f.byteOffset;c=a.f.buffer.slice(c,c+b);a.a+=b;return _.J(c)};Wl=function(a){let b=0;for(let c=0;c<a.length;c++)b=b<<8|a.charCodeAt(c);return b};_.Xl=function(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)};_.Yl=function(a){for(;_.Ol(a.reader)&&!a.parser.a;)a.parser.Hd(a.start+a.headerSize,a.reader,a.partialOkay)};
111
- _.Zl=function(a){for(let b=_.O(a.reader);0<b&&!a.parser.a;--b)a.parser.Hd(a.start+a.headerSize,a.reader,a.partialOkay)};_.$l=function(a){return b=>{const c=b.reader.Ka()-b.reader.getPosition();a(_.Vl(b.reader,c))}};_.am=function(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)};bm=function(a){let b="";try{b=_.Hi(a)}catch(c){}return b};_.dm=function(a){a=bm(a);let b="";a.length&&(b=(new _.cm(a)).a);return b};
112
- fm=function(a){if(!a)return null;let b=null;try{const c=JSON.parse(_.Ei(a)),d=_.Ui(c.sinf[0]);(new _.em).N(_.If,_.Yl).N("schi",_.Yl).N("tenc",e=>{e.reader.skip(6);_.Ql(e.reader)&&(e.reader.skip(1),b=_.Wi(_.Vl(e.reader,16)));e.parser.stop()}).parse(d)}catch(c){}return b};
113
- hm=function(a,b,c){if(!c||!c.byteLength)throw new _.G(_.E,6,6102);let d;typeof b===_.Pf?d=_.Ji(b,!0):d=b;a=_.Ji(bm(a),!0);b=new _.gm(12+a.byteLength+d.byteLength+c.byteLength,!0);_.N(b,a.byteLength);_.Nl(b,_.J(a));_.N(b,d.byteLength);_.Nl(b,_.J(d));_.N(b,c.byteLength);_.Nl(b,_.J(c));return _.J(b.buffer)};_.im=function(a){var b=_.J(a.body);b=_.Ti(b);a.headers[sa]=Gc;a.body=_.Ii("spc\x3d"+b).buffer};
114
- _.mm=function(a){let b;try{b=_.Ei(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=Ci(_.Ui(b))};rm=function(a,b){b=nm(b);if(a===_.xd)return b+om;if(a===_.vd)return b+pm;if(a===_.sd)return b+qm;throw Error("Unknown DRM Key-System '"+a+"'. Can not infer license URL!");};
115
- _.um=function(a,b,c,d){d=void 0===d?!0:d;c=a.drm;c&&c.env.startsWith(va)?c.customData&&(_.tm(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)):sm.warn(jb)};
116
- _.vm=function(a,b){try{const c=_.J(b.data),d=JSON.parse(String.fromCharCode.apply(null,c));sm.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){sm.debug("Unable to parse DRMtoday response JSON, assuming the response contained raw data")}};
117
- _.xm=function(a,b,c){var d=c&&c.customData&&c.customData.fpsContentId;_.um(a,b,c,!1);b.headers[sa]=Gc;c={spc:_.Si(b.body)};if((a=a.drm)&&a.env.startsWith(wa)&&d){a={};var e=_.Gj((new _.cm(wm(d))).f);d=e.keyId;if(e=e.assetId)sm.info("Applying assetId from HLS manifest."),a.assetId=e;d&&(sm.info("Applying keyId from HLS manifest."),a.keyId=d);d=a;d.keyId&&(sm.info("Adding keyID to FPS payload:",d.keyId),c.keyId=d.keyId);d.assetId&&(sm.info("Adding assetID to FPS payload:",d.assetId),c.assetId=d.assetId)}b.body=
118
- _.Ki(_.Fj(c,!0))};_.ym=function(a,b){sm.debug("Clearing response data");200===b.status&&(a=_.Ei(b.data).trim(),"\x3cckc\x3e"===a.substr(0,5)&&"\x3c/ckc\x3e"===a.substr(-6)&&(a=a.slice(5,-6)),b.data=_.Ui(a).buffer)};
119
- _.zm=function(a,b,c){b=bm(b);c=c&&c.customData?c.customData:{};b=new _.cm(wm(b));const d=_.Gj(b.f);if(a&&a.drm&&a.drm.customData){var e=a.drm.customData;a=e.assetId;e=e.variantId;a&&_.Ni(`${a}`)&&(d.assetId=a,sm.debug("Using assetId from the configuration instead of the value from the HLS manifest."));e&&_.Ni(`${e}`)&&(d.variantId=e,sm.info("Using variantId from the configuration instead of the value from the HLS manifest."))}d.keyId?(a=["keyId"],sm.debug("KeyId found in FPS SKD. Removing other parameters")):
120
- a=["assetId","variantId"];b.f=_.Fj(d,!1,a);"/"!==b.path||b.j.includes(`${b.a}/`)||(b.path="");b=_.Ej(b);return c.fpsContentId=b};_.Am=function(a,b){a=a.drm;if(!a||!a.env.startsWith(va))sm.warn(jb);else if(a.customData&&a.customData.merchant&&!a.env.startsWith(wa)){const c=new _.ci(b.uris[0]);let d=c.Da;d.endsWith("/")||(d+="/");d+=a.customData.merchant;c.Da=d;b.uris[0]=c.toString()}};Bm=function(a,b,c){_.um(a,b,c);a=a.drm;a=!(!a||!a.offlineId);c=new _.ci(b.uris[0]);c.a.add(_.Oe,a);b.uris[0]=c.toString()};
121
- nm=function(a){if(a===Cm)return"https://lic.drmtoday.com";if(a===Dm)return"https://lic.staging.drmtoday.com";if(a===Em)return"https://lic.test.drmtoday.com";throw Error("Unknown DRMtoday environment '"+a+"'. Can not infer DRMtoday base URL!");};wm=function(a){a=a.replace(/assetid/gi,"assetId");a=a.replace(/variantid/gi,"variantId");return a=a.replace(/keyid/gi,"keyId")};
122
- _.tm=function(a,b){if((b=b.drm)&&b.customData){var c={userId:b.customData.userId,sessionId:b.customData.sessionId,merchant:b.customData.merchant};_.Rg(c)&&(a.headers["dt-custom-data"]=btoa(JSON.stringify(c)));(b=b.customData.authToken)&&(a.headers["x-dt-auth-token"]=b)}};Gm=function(a){const b={},c=a?a[Eg]:void 0;a=Fm[a?a[Eg]:void 0];c&&(b.drmTodayErrorCode=c);a&&(b.drmTodayErrorMessage=a);return b};
123
- Im=function(a,b=0){_.hh("Registering EME Factory: "+a.a());a={priority:b,ya:a};for(let c=0;c<Hm.length;++c)if(Hm[c].priority<b){Hm.splice(c,0,a);return}Hm.push(a)};Jm=function(a){if(a){const {ya:b}=Hm.find(({ya:c})=>c.a()===a);if(b&&b.f())return _.hh(Xb+b.a()),b.create();_.hh("Cannot create selected EME manager. Choosing by priority list.")}for(const {ya:b}of Hm)if(b.f())return _.hh(Xb+b.a()),b.create();throw Error("Missing EME managers");};
124
- _.Lm=function(a,b){a=_.Km(a,b);return 1!==a.length?null:a[0]};_.Km=function(a,b){return Array.prototype.filter.call(a.childNodes,c=>c instanceof Element&&c.tagName===b)};_.Mm=function(a){return Array.prototype.every.call(a.childNodes,b=>b.nodeType===Node.TEXT_NODE||b.nodeType===Node.CDATA_SECTION_NODE)?a.textContent.trim():null};
125
- _.Nm=function(a,b){const c=new DOMParser;let d=null,e=null;try{e=c.parseFromString(a,_.Vf)}catch(f){}e&&e.documentElement.tagName===b&&(d=e.documentElement);return d&&0<d.getElementsByTagName("parsererror").length?null:d};_.Qm=function(a){var b=_.Vi(a);b=parseInt(b.byteLength,10).toString(16);b=_.Vi("12"+b+a);return new Om(Pm,a,b)};
126
- _.Sm=function(a){const b=new _.Rm(new DataView(a.buffer,a.byteOffset,a.byteLength),!1);a=_.O(b);var c=_.O(b);c=_.Xl(c);var d=_.O(b);const e=d>>>24;d&=16777215;var f=_.Vl(b,16);f=_.Wi(f);if(0<e){var g=_.O(b);b.skip(16*g)}g=_.O(b);const h=()=>{let u=_.Ql(b),v=(u&127)>>>0,y=7;for(;128<=u&&28>=y;)u=_.Ql(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(!_.Ol(b))throw Error("not enough data to skip!");while(_.Ql(b)&128);break;case 1:b.skip(8);break;case 2:b.skip(h());
127
- 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(;_.Ol(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=Ul(b,q);2===n?l.push(q):4===n&&(m=q)}else k(q)}_.ih("Parsed WV PSSH Box","size",a,"name",c,hg,e,"flags",d,"size",g,"systemId",f,"contentId (base64)",m?_.Si(m):"","keyIds",l.map(u=>_.Wi(u)));return 0<l.length?_.Qm(_.Wi(l[0])):null};
128
- _.Tm=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=_.J(a);a.set(b,0);return a};
129
- _.Ym=function(a){a:{var b=new _.Rm(new DataView(a.buffer),!0);_.O(b);for(_.Rl(b);_.Ol(b);)if(1===_.Rl(b)){var c=_.Rl(b);b=_.Vl(b,c);break a}b=null}b||(b=a);a=Gi(b,!0);c=_.Nm(a,"WRMHEADER");a=c.getAttribute(hg);var d=_.Lm(c,"DATA");c=(c=_.Lm(d,"LA_URL"))?_.Mm(c):"";var e;if(e=_.Lm(d,"KID"))if(e=_.Mm(e)){var f=_.Lm(d,ma);e={value:e,Td:f?f.textContent.trim():null}}else e=null;else e=null;d=e?[e]:(e=Um(d))?[e]:(d=Vm(d))?d:null;const {value:g="",Td:h}=d&&d[0]||{};d=_.Ui(g);d=_.Tm(d);d=_.Wi(d);return new _.Wm(_.Xm,
130
- d,c,b,a,h)};Um=function(a){a=_.Lm(a,"PROTECTINFO");if(!a)return null;var b=_.Lm(a,"KID");if(!b)return null;a=b.getAttribute("VALUE");if(!a)return null;const c=b.getAttribute(ma);b=b.getAttribute("ALGID");return{value:a,Td:c,hg:b}};
131
- Vm=function(a){a=_.Lm(a,"PROTECTINFO");if(!a)return null;a=_.Lm(a,"KIDS");if(!a)return null;var b=_.Km(a,"KID");if(!b.length)return null;a=[];for(const c of b)if(b=c.getAttribute("VALUE")){const d=c.getAttribute(ma),e=c.getAttribute("ALGID");a.push({value:b,Td:d,hg:e})}return a.length?a:null};_.$m=function(a){Zm&&performance.mark(a)};_.an=function(a,b,c){Zm&&performance.measure(a,b,c)};
132
- bn=function(a){return _.w(function*(){const b=new Promise(c=>{(new _.mk(c)).fa(1)});(yield Promise.race([a.close().then(()=>!0),b.then(()=>!1)]))||_.B("Timeout waiting for session close")})};_.dn=function(a){return cn(a)?_.vd: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};
133
- fn=function(a,b){if(a.keySystem){var c=_.dn(a.keySystem);b=b[c];c===_.Le&&a.licenseServerUri||(b&&(a.licenseServerUri=b.licenseUrl||""),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=
134
- b.serverCertificate||null)))}};_.gn=function(a,b){b=_.gk(a.mimeType,b||a.codecs);if(_.fk(b,a.type)){a=a.type;var c=_.fk(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};kn=function(a){return(a.audioCapabilities||[]).some(jn)||(a.videoCapabilities||[]).some(jn)};
135
- ln=function(a,b){a=_.dm(b);_.ih("Using default Content ID extractor. The hostname part from HLS #EXT-X-KEY:URI skd:// will be used.","Extracted Content ID: "+a);return a};
136
- mn=function(a){var {playerConfig:b,initData:c,initDataType:d,drmInfo:e,drmSystemConfig:f,sessionContext:g,emeApi:h}=a;if("skd"===d&&"APPLE"===h){a=e.serverCertificate;let k=f&&f.modifiers&&f.modifiers.extractContentId;_.Tg(k)||(k=ln);let l="";try{l=k(b,c,g)}catch(m){throw new _.G(_.E,6,6103);}if(!l.length)throw new _.G(_.E,6,6101,"Content ID is an empty string");c=hm(c,l,a)}return c};cn=function(a){return!!a.match(/^com\.(microsoft|chromecast)\.playready/)};
137
- jn=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=>_.Xi(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])}};
138
- on=function(a){var b=a.l;const c=a.V;c.clear();b.forEach((d,e)=>c.set(e,d));b=Array.from(c.values());b.length&&b.every(d=>"expired"===d)&&a.T(new _.G(_.E,6,6014));a.D.pe(_.$g(c));a.o||a.g.info(ua);a.o=!0;a.B=!1};pn=function(a){a.f.forEach((b,c)=>{const d=b.ke;let e=c.expiration;isNaN(e)&&(e=Infinity);e!==d&&(a.D.oe(c.sessionId,e),b.ke=e)})};
139
- qn=function(a){return _.w(function*(){a.w.release();a.w=null;a.K.release();a.K=null;a.o=!1;a.B=!1;a.F.reject();a.X.stop();a.X=null;a.R.stop();a.R=null;const b=Array.from(a.f.keys());for(const c of a.f.values())c.vc&&c.vc.stop();a.f.clear();yield Promise.all(b.map(c=>Promise.resolve().then(()=>_.w(function*(){a.g.debug("Closing session",c.sessionId);try{yield bn(c)}catch(d){a.g.warn("Error while closing session",d)}}))));if(a.A){try{yield a.j.h(null)}catch(c){a.g.warn("Error while resetting media keys",
140
- c)}a.A=null}a.j=null;a.a=null;a.H.clear();a.G=null;a.J=[];a.h=null;a.T=null;a.D=null;a.M=0;a.L=null})};_.un=function(a,b){const c=b.some(e=>0<e.drmInfos.length);if(!c){var d=Zg(a.h.bb);en(b,d)}if(d=rn(a))for(const e of b)e.drmInfos=[d];for(const e of b)for(const f of e.drmInfos)fn(f,a.h.bb);b=sn(a,b);if(!b.size)return a.O=!0,Promise.resolve();_.$m(Gd);a=_.tn(a,b);return(c?a:a.catch(()=>{})).then(()=>{_.$m(Fd);_.an("DRM queryMediaKeys_()",Gd,Fd)})};
141
- _.wn=function(a,b,c){c=void 0===c?[]:c;a.I=vn;a.J=c;a.C=0<c.length;a.g.debug("Using Persisted Licenses: "+a.C);a.h&&a.h.enableSessionCacheForSkd&&a.g.info("Enabled session cache for SKD license requests");return _.un(a,b)};
142
- _.tn=function(a,b){if(1===b.size&&b.has(""))return Promise.reject(new _.G(_.E,6,6E3));null===a.j&&(a.j=Jm(a.h.emeApi));for(var c of b.values())0===c.audioCapabilities.length&&delete c.audioCapabilities,0===c.videoCapabilities.length&&delete c.videoCapabilities;let d=c=new _.xn;const e=(h,k,l)=>{k.drmInfos.some(m=>!!m.licenseServerUri)===h&&(d=d.catch(()=>{if(a.ua)return null;if(l===_.vd){if(_.ok()&&!a.h.bb[l].useLegacySystem)return k.label=wd,a.j.a(wd,[k]).catch(()=>{a.g.warn("Unable to create com.microsoft.playready.recommendation. Falling back to com.microsoft.playready.");
143
- k.label=_.vd;hn(k);return a.j.a(l,[k])});hn(k)}if(l===_.xd&&a.h.widevineVersion!==_.xd){const m=a.h.widevineVersion;if(!m.startsWith(_.xd))return a.g.error(`Invalid "widevineVersion" value "${m}".`),Promise.reject();const n=Object.assign({},k,{label:m,distinctiveIdentifier:_.Ke,persistentState:_.Ke});return a.j.a(m,[n]).catch(()=>a.j.a(l,[k]))}return a.j.a(l,[k]).catch(m=>{a:{if(l===_.xd&&kn(k)){const n=_.Ok();if(kn(k)&&n.os===Hk&&n.browser===ed){a.g.warn("requestMediaKeySystemAccess() failed",m);
144
- a.g.warn("Will try to recover by removing the robustness attribute of videoCapabilities and audioCapabilities.");hn(k);m=a.j.a(l,[k]);break a}}throw m;}return m})}))};let f=a.h.preferredDrmSystem;if(!f){var g=_.Ok();if(g.os===Jk&&10<=g.osVersion.major&&"edge"===g.browser)f=_.vd;else if("safari"===g.browser)f=_.sd;else if(g.browser===ed||"firefox"===g.browser)f=_.xd}f&&(g=b.get(f))&&(e(!0,g,f),e(!1,g,f));for(const h of[!0,!1])b.forEach((k,l)=>{l!==f&&e(h,k,l)});d=d.catch(()=>{throw new _.G(_.E,6,6001,
145
- "Failed to get MediaKeySystemAccess.");});d=d.then(h=>{if(a.ua)return null;a.H.clear();var k=h.getConfiguration();a.g.info("Got MediaKeySystemAccess with configuration",k);var l=k.audioCapabilities||[];k=k.videoCapabilities||[];for(var m of l)a.H.add(m.contentType.toLowerCase());for(var n of k)a.H.add(n.contentType.toLowerCase());{l=h.keySystem;m=b.get(_.dn(h.keySystem));n=[];k=[];const q=[],u=[];nn(m.drmInfos,n,k,q,u);1<k.length&&_.B("Multiple unique server certificates found! Only the first will be used.");
146
- 1<n.length&&_.B("Multiple unique license server URIs found! Only the first will be used.");l={keySystem:l,licenseServerUri:n[0],distinctiveIdentifierRequired:m.distinctiveIdentifier===_.wf,persistentStateRequired:m.persistentState===_.wf,audioRobustness:m.audioCapabilities?m.audioCapabilities[0].robustness:"",videoRobustness:m.videoCapabilities?m.videoCapabilities[0].robustness:"",serverCertificate:k[0],initData:q,keyIds:u,periodId:null}}a.a=l;if(!a.a.licenseServerUri)throw new _.G(_.E,6,6012,a.a.keySystem);
147
- return h.createMediaKeys()}).then(h=>{a.ua||(a.g.info("Created MediaKeys for key system",a.a.keySystem),a.G=h,a.O=!0)}).catch(h=>{if(!a.ua){a.a=null;a.H.clear();if(h instanceof _.G)throw h;throw new _.G(_.E,6,6002,{browserError:h.message});}});c.reject();return d};
148
- rn=function(a){a=Zg(a.h.bb[_.Le]||{});if(0===a.size)return null;const b=[],c=[];a.forEach((e,f)=>{f=_.Vi(f);e=_.Vi(e);e={kty:"oct",kid:_.Ti(f,!1),k:_.Ti(e,!1)};b.push(e);c.push(e.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:_.Ii(d),initDataType:"keyids"}];return{keySystem:_.Le,licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:d,
149
- keyIds:[],periodId:null}};
150
- sn=function(a,b){var c=new Set;for(var d of b)for(var e of d.drmInfos)fn(e,a.h.bb),c.add(e);d=a.C?_.wf:_.Ke;e=a.C?[_.Pe]:[Tf];a=new Map;for(const f of c)a.set(f.keySystem,{initDataTypes:[_.ad],audioCapabilities:[],videoCapabilities:[],distinctiveIdentifier:_.Ke,persistentState:d,sessionTypes:e,label:f.keySystem,drmInfos:[]});for(const f of b){b=f.audio;c=f.video;const g=b?_.gn(b):"";let h=null;b&&"ac-3"===b.codecs.toLowerCase()&&_.qk()&&(h=_.gn(b,_.Qd));const k=c?_.gn(c):"";let l=null;c&&"ac-3"===
151
- c.codecs.toLowerCase()&&_.qk()&&(l=_.gn(c,_.Qd));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&&_.Qh(m.audioRobustness).forEach(q=>{const u={robustness:q||"",contentType:g};n.audioCapabilities.find(v=>v.robustness===u.robustness&&v.contentType===u.contentType)||
152
- n.audioCapabilities.push(u);h&&n.audioCapabilities.push({robustness:q||"",contentType:h})});c&&_.Qh(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};
153
- yn=function(a){return _.w(function*(){if(!a.j.o())if(a.L)yield a.L;else try{a.L=a.j.h(a.G),yield a.L}catch(b){a.ua||a.T(new _.G(_.E,6,6003,b.message,b))}})};
154
- _.Cn=function(a,b,c,d){d=void 0===d?"":d;if(c.length&&(!a.C||a.I!==vn)){var e=a.keySystem();if(!e.startsWith(_.sd)&&b===_.ad){const f=new zn(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.A.webkitCurrentPlaybackTargetIsWireless||
155
- _.qk(2)||a.keySystem().startsWith(_.sd)||!_.An(a,d,c,!0))&&Bn(a,d,null,b,c)}};Dn=function(a,b){return _.w(function*(){a.g.info(`Handle encrypted event for type ${b.initDataType}`);yield yn(a);b.initData&&_.Cn(a,b.initDataType,_.J(b.initData))})};Fn=function(a){return _.w(function*(){_.$m(Jd);const b=a.S.map(c=>En(a,c));a.Z=!0;a.S=[];yield Promise.all(b);_.$m(Id);_.an("drm.onPlay",Jd,Id)})};
156
- Hn=function(a){const b=a.keySystem(),c=a.h.bb[b],d=c.certificateUrl||"";if(""===d)return Promise.resolve();const e=a.D.getConfiguration();return Gn(a,e).then(()=>{var f=c.modifiers;const g=f&&f.certificateRequest,h=f&&f.certificateResponse;f=_.ij([d],a.h.attemptParameters);f.type=3;f.licenseRequestType=cd;g&&f.requestModifiers.push(k=>g(e,k));h&&f.responseModifiers.push(k=>h(e,k));a.g.debug("Fetching certificate");return a.D.Hb.fetch(f).W}).then(f=>{a.a.serverCertificate=_.J(f.data)}).catch(f=>{var g=
157
- f.data.headers;g=Object.assign({message:"Error while fetching certificate!",url:f.data.url,status:f.data.status,response:f.data.response},g?{headers:g}:{},Gm(g));throw new _.G(_.E,6,6100,g,f);})};
158
- _.In=function(a){return _.w(function*(){if(a.G&&a.a&&a.a.serverCertificate&&a.a.serverCertificate.length)try{const b=yield a.G.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 _.G(_.E,6,6004,{browserError:b.message});}})};
159
- _.Ln=function(a){const b=a.a?a.a.initData||[]:[];for(const c of b){let d=!_.qk(2);if(a.h.enforceSingleSession&&!a.keySystem().startsWith(_.sd)){const e=a.f.values();for(const f of e)_.Xi(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}.`),Jn(c.initData,f)||(f.sd.push(c.initData),c.keyId&&!f.fb.includes(c.keyId)&&
160
- f.fb.push(c.keyId),a.l.get(c.keyId)||a.l.set(c.keyId,Nf)),d=!1)}!d||a.C&&a.I===vn||(_.An(a,c.keyId,c.initData)&&(d=!1),d&&(a.g.info("Request new media key session on create"),Bn(a,c.keyId,c.periodId,c.initDataType,c.initData)))}for(const c of a.J)_.Kn(a,c);b.length||a.J.length||(a.o||a.g.info(ua),a.o=!0,a.B=!1,a.F.resolve());return a.F};
161
- _.Mn=function(a,b){if(!a.G)return _.qh(a.w,b,[Rd,"msneedkey",Ag,"needkey"],()=>{a.T(new _.G(_.E,6,6010))}),Promise.resolve();a.A=b;a.j.l(b);a.w.one(a.A,_.Re,()=>Fn(a));a.w.on(a.A,_.vg,e=>{const f=a.B;a.B=!a.o;!f&&a.B&&(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.j.f()!==Eb||a.J.length)d=yn(a);c=Promise.resolve();_.tk()&&38===_.uk().major||(a.a&&a.a.keySystem!==_.Le&&!a.a.serverCertificate&&(c=Hn(a)),
162
- c=c.then(()=>_.In(a)));return Promise.all([d,c]).then(()=>{a.ua||(_.Ln(a),a.w.on(a.A,Rd,e=>Dn(a,e)))}).catch(e=>{if(!a.ua){if(6004===e.code&&a.a&&a.a.keySystem===_.xd&&1>a.M&&a.a.serverCertificate&&a.a.serverCertificate.length)return a.g.warn("Detected invalid widevine server certificate!. Retrying"),a.T(new _.G(1,6,6004)),a.a.serverCertificate=null,a.M++,_.Mn(a,b);1<=a.M&&a.g.info("Could not get valid widevine server certificate. Giving up");throw e;}})};
163
- Gn=function(a,b){return _.w(function*(){const c=a.D.Ac();if(c){var d=b&&b.drm&&b.drm.customData;d&&(yield c(d))}})};
164
- _.Kn=function(a,b){let c;try{a.g.debug("Attempting to load an offline session",b),c=a.G.createSession(_.Pe)}catch(e){const f=new _.G(_.E,6,6005,{browserError:e.message});a.T(f);return Promise.reject(f)}a.w.on(c,_.ve,a.da.bind(a));a.w.on(c,de,a.ba.bind(a));const d={initData:null,loaded:!1,ke:Infinity,Jb:null,Na:new _.xn,periodId:null,sd:[],keyId:null,fb:[],initDataType:null,gc:null,sessionContext:{ldlDelay:0,customData:{}}};d.Na.catch(()=>{});a.f.set(c,d);return c.load(b).then(e=>{if(a.ua)return null;
165
- a.g.debug("Loaded offline session",b,e);if(!e)return a.f.delete(c),a.T(new _.G(_.E,6,6013)),null;d.loaded=!0;Nn(a)&&(a.o||a.g.info(ua),a.o=!0,a.B=!1,a.F.resolve());return c},e=>{a.ua||(a.f.delete(c),a.T(new _.G(_.E,6,6005,{browserError:e.message})))})};Jn=function(a,b){if(!a)return!1;for(let c=0;c<b.sd.length;c++)if(_.Xi(a,b.sd[c]))return!0;return!1};
166
- _.An=function(a,b,c,d){d=void 0===d?!1:d;for(const e of a.f.keys()){const f=a.f.get(e);if(_.Xi(c,f.initData))return b?f.fb.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.fb.push(b),a.l.get(b)||a.l.set(b,Nf),d&&a.g.info(Ib+`Session: '${e.sessionId}'`+`Adding Key ID ${b} to session meta-data.`)):d&&a.g.info(Ib+`Session: '${e.sessionId}'`),!0;if(Jn(c,f))return d&&a.g.info("Skipping Session creation. License for init data was already requested [extra]"),
110
+ modifiers:g.modifiers});return c};_.Pl=function(){throw new _.I(_.F,3,3E3);};_.Ql=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){_.Pl()}};_.O=function(a,b){try{a.f.setUint32(a.a,b,a.h),a.a+=4}catch(c){_.Pl()}};_.Rl=function(a){return a.a<a.f.byteLength};_.Sl=function(){throw new _.I(_.F,3,3E3,"Buffer read out of bounds.");};_.Tl=function(a){try{const b=a.f.getUint8(a.a);a.a+=1;return b}catch(b){_.Sl()}};
111
+ _.Ul=function(a){try{const b=a.f.getUint16(a.a,a.h);a.a+=2;return b}catch(b){_.Sl()}};_.P=function(a){try{const b=a.f.getUint32(a.a,a.h);a.a+=4;return b}catch(b){_.Sl()}};_.Vl=function(a){try{const b=a.f.getInt32(a.a,a.h);a.a+=4;return b}catch(b){_.Sl()}};_.Wl=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){_.Sl()}if(2097151<c)throw new _.I(_.F,3,3001);a.a+=8;return c*Math.pow(2,32)+b};
112
+ Xl=function(a,b){const c=new Uint8Array(b);for(let d=0;d<b;d++)c[d]=_.Tl(a);return c};_.Yl=function(a,b){a.a+b>a.f.byteLength&&_.Sl();var c=a.a+a.f.byteOffset;c=a.f.buffer.slice(c,c+b);a.a+=b;return _.K(c)};Zl=function(a){let b=0;for(let c=0;c<a.length;c++)b=b<<8|a.charCodeAt(c);return b};_.$l=function(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)};_.am=function(a){for(;_.Rl(a.reader)&&!a.parser.a;)a.parser.Hd(a.start+a.headerSize,a.reader,a.partialOkay)};
113
+ _.bm=function(a){for(let b=_.P(a.reader);0<b&&!a.parser.a;--b)a.parser.Hd(a.start+a.headerSize,a.reader,a.partialOkay)};_.cm=function(a){return b=>{const c=b.reader.Ma()-b.reader.getPosition();a(_.Yl(b.reader,c))}};_.dm=function(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)};em=function(a){let b="";try{b=_.Ii(a)}catch(c){}return b};_.gm=function(a){a=em(a);let b="";a.length&&(b=(new _.fm(a)).a);return b};
114
+ im=function(a){if(!a)return null;let b=null;try{const c=JSON.parse(_.Fi(a)),d=_.Vi(c.sinf[0]);(new _.hm).N(_.Hf,_.am).N("schi",_.am).N("tenc",e=>{e.reader.skip(6);_.Tl(e.reader)&&(e.reader.skip(1),b=_.Xi(_.Yl(e.reader,16)));e.parser.stop()}).parse(d)}catch(c){}return b};
115
+ km=function(a,b,c){if(!c||!c.byteLength)throw new _.I(_.F,6,6102);let d;typeof b===_.Of?d=_.Ki(b,!0):d=b;a=_.Ki(em(a),!0);b=new _.jm(12+a.byteLength+d.byteLength+c.byteLength,!0);_.O(b,a.byteLength);_.Ql(b,_.K(a));_.O(b,d.byteLength);_.Ql(b,_.K(d));_.O(b,c.byteLength);_.Ql(b,_.K(c));return _.K(b.buffer)};_.lm=function(a){var b=_.K(a.body);b=_.Ui(b);a.headers[sa]=Gc;a.body=_.Ji("spc\x3d"+b).buffer};
116
+ _.mm=function(a){let b;try{b=_.Fi(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=Di(_.Vi(b))};um=function(a,b){b=nm(b);if(a===_.xd)return b+om;if(a===_.vd)return b+sm;if(a===_.sd)return b+tm;throw Error("Unknown DRM Key-System '"+a+"'. Can not infer license URL!");};
117
+ _.xm=function(a,b,c,d){d=void 0===d?!0:d;c=a.drm;c&&c.env.startsWith(va)?c.customData&&(_.wm(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)):vm.warn(jb)};
118
+ _.ym=function(a,b){try{const c=_.K(b.data),d=JSON.parse(String.fromCharCode.apply(null,c));vm.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){vm.debug("Unable to parse DRMtoday response JSON, assuming the response contained raw data")}};
119
+ _.Am=function(a,b,c){var d=c&&c.customData&&c.customData.fpsContentId;_.xm(a,b,c,!1);b.headers[sa]=Gc;c={spc:_.Ti(b.body)};if((a=a.drm)&&a.env.startsWith(wa)&&d){a={};var e=_.Jj((new _.fm(zm(d))).f);d=e.keyId;if(e=e.assetId)vm.info("Applying assetId from HLS manifest."),a.assetId=e;d&&(vm.info("Applying keyId from HLS manifest."),a.keyId=d);d=a;d.keyId&&(vm.info("Adding keyID to FPS payload:",d.keyId),c.keyId=d.keyId);d.assetId&&(vm.info("Adding assetID to FPS payload:",d.assetId),c.assetId=d.assetId)}b.body=
120
+ _.Li(_.Ij(c,!0))};_.Bm=function(a,b){vm.debug("Clearing response data");200===b.status&&(a=_.Fi(b.data).trim(),"\x3cckc\x3e"===a.substr(0,5)&&"\x3c/ckc\x3e"===a.substr(-6)&&(a=a.slice(5,-6)),b.data=_.Vi(a).buffer)};
121
+ _.Cm=function(a,b,c){b=em(b);c=c&&c.customData?c.customData:{};b=new _.fm(zm(b));const d=_.Jj(b.f);if(a&&a.drm&&a.drm.customData){var e=a.drm.customData;a=e.assetId;e=e.variantId;a&&_.Oi(`${a}`)&&(d.assetId=a,vm.debug("Using assetId from the configuration instead of the value from the HLS manifest."));e&&_.Oi(`${e}`)&&(d.variantId=e,vm.info("Using variantId from the configuration instead of the value from the HLS manifest."))}d.keyId?(a=["keyId"],vm.debug("KeyId found in FPS SKD. Removing other parameters")):
122
+ a=["assetId","variantId"];b.f=_.Ij(d,!1,a);"/"!==b.path||b.j.includes(`${b.a}/`)||(b.path="");b=_.Hj(b);return c.fpsContentId=b};_.Dm=function(a,b){a=a.drm;if(!a||!a.env.startsWith(va))vm.warn(jb);else if(a.customData&&a.customData.merchant&&!a.env.startsWith(wa)){const c=new _.di(b.uris[0]);let d=c.Ea;d.endsWith("/")||(d+="/");d+=a.customData.merchant;c.Ea=d;b.uris[0]=c.toString()}};Em=function(a,b,c){_.xm(a,b,c);a=a.drm;a=!(!a||!a.offlineId);c=new _.di(b.uris[0]);c.a.add(_.Ne,a);b.uris[0]=c.toString()};
123
+ nm=function(a){if(a===Fm)return"https://lic.drmtoday.com";if(a===Gm)return"https://lic.staging.drmtoday.com";if(a===Hm)return"https://lic.test.drmtoday.com";throw Error("Unknown DRMtoday environment '"+a+"'. Can not infer DRMtoday base URL!");};zm=function(a){a=a.replace(/assetid/gi,"assetId");a=a.replace(/variantid/gi,"variantId");return a=a.replace(/keyid/gi,"keyId")};
124
+ _.wm=function(a,b){if((b=b.drm)&&b.customData){var c={userId:b.customData.userId,sessionId:b.customData.sessionId,merchant:b.customData.merchant};_.Sg(c)&&(a.headers["dt-custom-data"]=btoa(JSON.stringify(c)));(b=b.customData.authToken)&&(a.headers["x-dt-auth-token"]=b)}};Jm=function(a){const b={},c=a?a[Dg]:void 0;a=Im[a?a[Dg]:void 0];c&&(b.drmTodayErrorCode=c);a&&(b.drmTodayErrorMessage=a);return b};
125
+ Lm=function(a,b){_.ih("Registering EME Factory: "+a.a());a={priority:b,za:a};for(let c=0;c<Km.length;++c)if(Km[c].priority<b){Km.splice(c,0,a);return}Km.push(a)};Mm=function(a){if(a){const {za:b}=Km.find(({za:c})=>c.a()===a);if(b&&b.f())return _.ih(Xb+b.a()),b.create();_.ih("Cannot create selected EME manager. Choosing by priority list.")}for(const {za:b}of Km)if(b.f())return _.ih(Xb+b.a()),b.create();throw Error("Missing EME managers");};_.Om=function(a,b){a=_.Nm(a,b);return 1!==a.length?null:a[0]};
126
+ _.Nm=function(a,b){return Array.prototype.filter.call(a.childNodes,c=>c instanceof Element&&c.tagName===b)};_.Pm=function(a){return Array.prototype.every.call(a.childNodes,b=>b.nodeType===Node.TEXT_NODE||b.nodeType===Node.CDATA_SECTION_NODE)?a.textContent.trim():null};_.Qm=function(a,b){const c=new DOMParser;let d=null,e=null;try{e=c.parseFromString(a,_.Uf)}catch(f){}e&&e.documentElement.tagName===b&&(d=e.documentElement);return d&&0<d.getElementsByTagName("parsererror").length?null:d};
127
+ _.Tm=function(a){var b=_.Wi(a);b=parseInt(b.byteLength,10).toString(16);b=_.Wi("12"+b+a);return new Rm(Sm,a,b)};
128
+ _.Vm=function(a){const b=new _.Um(new DataView(a.buffer,a.byteOffset,a.byteLength),!1);a=_.P(b);var c=_.P(b);c=_.$l(c);var d=_.P(b);const e=d>>>24;d&=16777215;var f=_.Yl(b,16);f=_.Xi(f);if(0<e){var g=_.P(b);b.skip(16*g)}g=_.P(b);const h=()=>{let u=_.Tl(b),v=(u&127)>>>0,y=7;for(;128<=u&&28>=y;)u=_.Tl(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(!_.Rl(b))throw Error("not enough data to skip!");while(_.Tl(b)&128);break;case 1:b.skip(8);break;case 2:b.skip(h());
129
+ 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(;_.Rl(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=Xl(b,q);2===n?l.push(q):4===n&&(m=q)}else k(q)}_.jh("Parsed WV PSSH Box","size",a,"name",c,gg,e,"flags",d,"size",g,"systemId",f,"contentId (base64)",m?_.Ti(m):"","keyIds",l.map(u=>_.Xi(u)));return 0<l.length?_.Tm(_.Xi(l[0])):null};
130
+ _.Wm=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};
131
+ _.an=function(a){a:{var b=new _.Um(new DataView(a.buffer),!0);_.P(b);for(_.Ul(b);_.Rl(b);)if(1===_.Ul(b)){var c=_.Ul(b);b=_.Yl(b,c);break a}b=null}b||(b=a);a=Hi(b,!0);c=_.Qm(a,"WRMHEADER");a=c.getAttribute(gg);var d=_.Om(c,"DATA");c=(c=_.Om(d,"LA_URL"))?_.Pm(c):"";var e;if(e=_.Om(d,"KID"))if(e=_.Pm(e)){var f=_.Om(d,ma);e={value:e,Td:f?f.textContent.trim():null}}else e=null;else e=null;d=e?[e]:(e=Xm(d))?[e]:(d=Ym(d))?d:null;const {value:g="",Td:h}=d&&d[0]||{};d=_.Vi(g);d=_.Wm(d);d=_.Xi(d);return new _.Zm(_.$m,
132
+ d,c,b,a,h)};Xm=function(a){a=_.Om(a,"PROTECTINFO");if(!a)return null;var b=_.Om(a,"KID");if(!b)return null;a=b.getAttribute("VALUE");if(!a)return null;const c=b.getAttribute(ma);b=b.getAttribute("ALGID");return{value:a,Td:c,kg:b}};
133
+ Ym=function(a){a=_.Om(a,"PROTECTINFO");if(!a)return null;a=_.Om(a,"KIDS");if(!a)return null;var b=_.Nm(a,"KID");if(!b.length)return null;a=[];for(const c of b)if(b=c.getAttribute("VALUE")){const d=c.getAttribute(ma),e=c.getAttribute("ALGID");a.push({value:b,Td:d,kg:e})}return a.length?a:null};_.cn=function(a){bn&&performance.mark(a)};_.dn=function(a,b,c){bn&&performance.measure(a,b,c)};
134
+ en=function(a){return _.x(function*(){const b=new Promise(c=>{(new _.pk(c)).fa(1)});(yield Promise.race([a.close().then(()=>!0),b.then(()=>!1)]))||_.C("Timeout waiting for session close")})};_.gn=function(a){return fn(a)?_.vd:a};hn=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};
135
+ jn=function(a,b){b=b[_.gn(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))};
136
+ _.kn=function(a,b){b=_.jk(a.mimeType,b||a.codecs);if(_.ik(b,a.type)){a=a.type;var c=_.ik(b,a);c&&(c=c(),b=c.convertCodecs(a,b),c.destroy())}return b};ln=function(a){for(const b of a.audioCapabilities||[])delete b.robustness;for(const b of a.videoCapabilities||[])delete b.robustness};nn=function(a){return(a.audioCapabilities||[]).some(mn)||(a.videoCapabilities||[]).some(mn)};
137
+ on=function(a,b){a=_.gm(b);_.jh("Using default Content ID extractor. The hostname part from HLS #EXT-X-KEY:URI skd:// will be used.","Extracted Content ID: "+a);return a};
138
+ pn=function(a){var {playerConfig:b,initData:c,initDataType:d,drmInfo:e,drmSystemConfig:f,sessionContext:g,emeApi:h}=a;if("skd"===d&&"APPLE"===h){a=e.serverCertificate;let k=f&&f.modifiers&&f.modifiers.extractContentId;_.Ug(k)||(k=on);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=km(c,l,a)}return c};fn=function(a){return!!a.match(/^com\.(microsoft|chromecast)\.playready/)};
139
+ mn=function(a){return null!=a.robustness&&""!==a.robustness};qn=function(a,b,c,d,e){for(const f of a){b.includes(f.licenseServerUri)||b.push(f.licenseServerUri);f.serverCertificate&&(c.some(g=>_.Yi(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])}};
140
+ rn=function(a){var b=a.l;const c=a.V;c.clear();b.forEach((d,e)=>c.set(e,d));b=Array.from(c.values());b.length&&b.every(d=>"expired"===d)&&a.T(new _.I(_.F,6,6014));a.D.pe(_.ah(c));a.o||a.g.info(ua);a.o=!0;a.B=!1};sn=function(a){a.f.forEach((b,c)=>{const d=b.ke;let e=c.expiration;isNaN(e)&&(e=Infinity);e!==d&&(a.D.oe(c.sessionId,e),b.ke=e)})};
141
+ tn=function(a){return _.x(function*(){a.w.release();a.w=null;a.K.release();a.K=null;a.o=!1;a.B=!1;a.F.reject();a.X.stop();a.X=null;a.R.stop();a.R=null;const b=Array.from(a.f.keys());for(const c of a.f.values())c.vc&&c.vc.stop();a.f.clear();yield Promise.all(b.map(c=>Promise.resolve().then(()=>_.x(function*(){a.g.debug("Closing session",c.sessionId);try{yield en(c)}catch(d){a.g.warn("Error while closing session",d)}}))));if(a.A){try{yield a.j.h(null)}catch(c){a.g.warn("Error while resetting media keys",
142
+ c)}a.A=null}a.j=null;a.a=null;a.H.clear();a.G=null;a.J=[];a.h=null;a.T=null;a.D=null;a.M=0;a.L=null})};_.zn=function(a,b){const c=un(a,b),d=vn(b);for(const e of d)wn(a,e,a.h.Ia);b=xn(a,b);if(!b.size)return a.O=!0,Promise.resolve();_.cn(Gd);a=_.yn(a,b);return(c?a:a.catch(()=>{})).then(()=>{_.cn(Fd);_.dn("DRM queryMediaKeys_()",Gd,Fd)})};
143
+ _.Bn=function(a,b,c){c=void 0===c?[]:c;a.I=An;a.J=c;a.C=0<c.length;a.g.debug("Using Persisted Licenses: "+a.C);a.h&&a.h.enableSessionCacheForSkd&&a.g.info("Enabled session cache for SKD license requests");return _.zn(a,b)};
144
+ _.yn=function(a,b){if(1===b.size&&b.has(""))return Promise.reject(new _.I(_.F,6,6E3));null===a.j&&(a.j=Mm(a.h.emeApi));for(var c of b.values())0===c.audioCapabilities.length&&delete c.audioCapabilities,0===c.videoCapabilities.length&&delete c.videoCapabilities;let d=c=new _.Cn;const e=(h,k,l)=>{k.drmInfos.some(m=>!!m.licenseServerUri)===h&&(d=d.catch(()=>{if(a.ua)return null;if(l===_.vd){if(_.rk()&&!a.h.Ia[l].useLegacySystem)return k.label=wd,a.j.a(wd,[k]).catch(()=>{a.g.warn("Unable to create com.microsoft.playready.recommendation. Falling back to com.microsoft.playready.");
145
+ k.label=_.vd;ln(k);return a.j.a(l,[k])});ln(k)}if(l===_.xd&&a.h.widevineVersion!==_.xd){const m=a.h.widevineVersion;if(!m.startsWith(_.xd))return a.g.error(`Invalid "widevineVersion" value "${m}".`),Promise.reject();const n=Object.assign({},k,{label:m,distinctiveIdentifier:_.Je,persistentState:_.Je});return a.j.a(m,[n]).catch(()=>a.j.a(l,[k]))}return a.j.a(l,[k]).catch(m=>{a:{if(l===_.xd&&nn(k)){const n=_.Rk();if(nn(k)&&n.os===Kk&&n.browser===ed){a.g.warn("requestMediaKeySystemAccess() failed",m);
146
+ a.g.warn("Will try to recover by removing the robustness attribute of videoCapabilities and audioCapabilities.");ln(k);m=a.j.a(l,[k]);break a}}throw m;}return m})}))};let f=a.h.preferredDrmSystem;if(!f){var g=_.Rk();if(g.os===Mk&&10<=g.osVersion.major&&"edge"===g.browser)f=_.vd;else if("safari"===g.browser)f=_.sd;else if(g.browser===ed||"firefox"===g.browser)f=_.xd}f&&(g=b.get(f))&&(e(!0,g,f),e(!1,g,f));for(const h of[!0,!1])b.forEach((k,l)=>{l!==f&&e(h,k,l)});d=d.catch(()=>{throw new _.I(_.F,6,6001,
147
+ "Failed to get MediaKeySystemAccess.");});d=d.then(h=>{if(a.ua)return null;a.H.clear();var k=h.getConfiguration();a.g.info("Got MediaKeySystemAccess with configuration",k);var l=k.audioCapabilities||[];k=k.videoCapabilities||[];for(var m of l)a.H.add(m.contentType.toLowerCase());for(var n of k)a.H.add(n.contentType.toLowerCase());{l=h.keySystem;m=b.get(_.gn(h.keySystem));n=[];k=[];const q=[],u=[];qn(m.drmInfos,n,k,q,u);1<k.length&&_.C("Multiple unique server certificates found! Only the first will be used.");
148
+ 1<n.length&&_.C("Multiple unique license server URIs found! Only the first will be used.");l={keySystem:l,licenseServerUri:n[0],distinctiveIdentifierRequired:m.distinctiveIdentifier===_.vf,persistentStateRequired:m.persistentState===_.vf,audioRobustness:m.audioCapabilities?m.audioCapabilities[0].robustness:"",videoRobustness:m.videoCapabilities?m.videoCapabilities[0].robustness:"",serverCertificate:k[0],initData:q,keyIds:u,periodId:null}}a.a=l;if(!a.a.licenseServerUri)throw new _.I(_.F,6,6012,a.a.keySystem);
149
+ return h.createMediaKeys()}).then(h=>{a.ua||(a.g.info("Created MediaKeys for key system",a.a.keySystem),a.G=h,a.O=!0)}).catch(h=>{if(!a.ua){a.a=null;a.H.clear();if(h instanceof _.I)throw h;throw new _.I(_.F,6,6002,{browserError:h.message});}});c.reject();return d};
150
+ Dn=function(a){a=$g(a.h.Ia[_.Ke]||{});if(0===a.size)return null;const b=[],c=[];a.forEach((e,f)=>{f=_.Wi(f);e=_.Wi(e);e={kty:"oct",kid:_.Ui(f,!1),k:_.Ui(e,!1)};b.push(e);c.push(e.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:_.Ji(d),initDataType:"keyids"}];return{keySystem:_.Ke,licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:d,
151
+ keyIds:[],periodId:null}};vn=function(a){const b=[];for(const c of a)for(const d of c.drmInfos)b.push(d);return b};En=function(a,b){for(const c of b)""===c.licenseServerUri||a.h.Ia[c.keySystem]||(a.h.Ia[c.keySystem]={licenseUrl:""})};
152
+ un=function(a,b){const c=b.some(g=>0<g.drmInfos.length);if(!c){var d=$g(a.h.Ia);hn(b,d)}d=a.h.Ia[_.sd];const e=b.some(g=>g.drmInfos.some(h=>h.keySystem===_.sd));if(!1!==a.h.Xh&&_.Dk()&&!e&&d)for(var f of b)f.drmInfos.push({keySystem:_.sd,licenseServerUri:d.licenseUrl,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:[],keyIds:[],periodId:null});if(f=Dn(a))for(const g of b)g.drmInfos=[f];b=vn(b);En(a,b);for(const g of b)jn(g,
153
+ a.h.Ia);return c};wn=function(a,b,c){const d=_.gn(b.keySystem);c=c[d];d===_.Ke&&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)};
154
+ xn=function(a,b){var c=new Set(vn(b));const d=a.C?_.vf:_.Je,e=a.C?[_.Oe]:[Sf];a=new Map;for(const f of c)a.set(f.keySystem,{initDataTypes:[_.ad],audioCapabilities:[],videoCapabilities:[],distinctiveIdentifier:_.Je,persistentState:d,sessionTypes:e,label:f.keySystem,drmInfos:[]});for(const f of b){b=f.audio;c=f.video;const g=b?_.kn(b):"";let h=null;b&&"ac-3"===b.codecs.toLowerCase()&&_.tk()&&(h=_.kn(b,_.Qd));const k=c?_.kn(c):"";let l=null;c&&"ac-3"===c.codecs.toLowerCase()&&_.tk()&&(l=_.kn(c,_.Qd));
155
+ 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=_.vf);m.persistentStateRequired&&(n.persistentState=_.vf);b&&_.Rh(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||
156
+ "",contentType:h})});c&&_.Rh(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};Fn=function(a){return _.x(function*(){if(!a.j.o())if(a.L)yield a.L;else try{a.L=a.j.h(a.G),yield a.L}catch(b){a.ua||a.T(new _.I(_.F,6,6003,b.message,b))}})};
157
+ _.Jn=function(a,b,c,d){d=void 0===d?"":d;if(c.length&&(!a.C||a.I!==An)){var e=a.keySystem();if(!e.startsWith(_.sd)&&b===_.ad){const f=new Gn(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.A.webkitCurrentPlaybackTargetIsWireless||
158
+ _.tk(2)||a.keySystem().startsWith(_.sd)||!_.Hn(a,d,c,!0))&&In(a,d,null,b,c)}};Kn=function(a,b){return _.x(function*(){a.g.info(`Handle encrypted event for type ${b.initDataType}`);yield Fn(a);b.initData&&_.Jn(a,b.initDataType,_.K(b.initData))})};Mn=function(a){return _.x(function*(){_.cn(Id);const b=a.S.map(c=>Ln(a,c));a.Z=!0;a.S=[];yield Promise.all(b);_.cn(Hd);_.dn("drm.onPlay",Id,Hd)})};
159
+ On=function(a){const b=a.keySystem(),c=a.h.Ia[b],d=c.certificateUrl||"";if(""===d)return Promise.resolve();const e=a.D.getConfiguration();return Nn(a,e).then(()=>{var f=c.modifiers;const g=f&&f.certificateRequest,h=f&&f.certificateResponse;f=_.jj([d],a.h.attemptParameters);f.type=3;f.licenseRequestType=cd;g&&f.requestModifiers.push(k=>g(e,k));h&&f.responseModifiers.push(k=>h(e,k));a.g.debug("Fetching certificate");return a.D.Hb.fetch(f).W}).then(f=>{a.a.serverCertificate=_.K(f.data)}).catch(f=>{var g=
160
+ f.data.headers;g=Object.assign({message:"Error while fetching certificate!",url:f.data.url,status:f.data.status,response:f.data.response},g?{headers:g}:{},Jm(g));throw new _.I(_.F,6,6100,g,f);})};
161
+ _.Pn=function(a){return _.x(function*(){if(a.G&&a.a&&a.a.serverCertificate&&a.a.serverCertificate.length)try{const b=yield a.G.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});}})};
162
+ _.Sn=function(a){const b=a.a?a.a.initData||[]:[];for(const c of b){let d=!_.tk(2);if(a.h.enforceSingleSession&&!a.keySystem().startsWith(_.sd)){const e=a.f.values();for(const f of e)_.Yi(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}.`),Qn(c.initData,f)||(f.pd.push(c.initData),c.keyId&&!f.ib.includes(c.keyId)&&
163
+ f.ib.push(c.keyId),a.l.get(c.keyId)||a.l.set(c.keyId,Mf)),d=!1)}!d||a.C&&a.I===An||(_.Hn(a,c.keyId,c.initData)&&(d=!1),d&&(a.g.info("Request new media key session on create"),In(a,c.keyId,c.periodId,c.initDataType,c.initData)))}for(const c of a.J)_.Rn(a,c);b.length||a.J.length||(a.o||a.g.info(ua),a.o=!0,a.B=!1,a.F.resolve());return a.F};
164
+ _.Tn=function(a,b){if(!a.G)return rh(a.w,b,()=>{a.T(new _.I(_.F,6,6010))}),Promise.resolve();a.A=b;a.j.l(b);a.w.one(a.A,_.Qe,()=>Mn(a));a.w.on(a.A,_.ug,e=>{const f=a.B;a.B=!a.o;!f&&a.B&&(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.j.f()!==Eb||a.J.length)d=Fn(a);c=Promise.resolve();_.wk()&&38===_.xk().major||(a.a&&a.a.keySystem!==_.Ke&&!a.a.serverCertificate&&(c=On(a)),c=c.then(()=>_.Pn(a)));return Promise.all([d,
165
+ c]).then(()=>{a.ua||(_.Sn(a),a.w.on(a.A,Rd,e=>Kn(a,e)))}).catch(e=>{if(!a.ua){if(6004===e.code&&a.a&&a.a.keySystem===_.xd&&1>a.M&&a.a.serverCertificate&&a.a.serverCertificate.length)return a.g.warn("Detected invalid widevine server certificate!. Retrying"),a.T(new _.I(1,6,6004)),a.a.serverCertificate=null,a.M++,_.Tn(a,b);1<=a.M&&a.g.info("Could not get valid widevine server certificate. Giving up");throw e;}})};
166
+ Nn=function(a,b){return _.x(function*(){const c=a.D.Ac();if(c){var d=b&&b.drm&&b.drm.customData;d&&(yield c(d))}})};
167
+ _.Rn=function(a,b){let c;try{a.g.debug("Attempting to load an offline session",b),c=a.G.createSession(_.Oe)}catch(e){const f=new _.I(_.F,6,6005,{browserError:e.message});a.T(f);return Promise.reject(f)}a.w.on(c,_.ue,a.ca.bind(a));a.w.on(c,ce,a.ba.bind(a));const d={initData:null,loaded:!1,ke:Infinity,Jb:null,Qa:new _.Cn,periodId:null,pd:[],keyId:null,ib:[],initDataType:null,gc:null,sessionContext:{ldlDelay:0,customData:{}}};d.Qa.catch(()=>{});a.f.set(c,d);return c.load(b).then(e=>{if(a.ua)return null;
168
+ a.g.debug("Loaded offline session",b,e);if(!e)return a.f.delete(c),a.T(new _.I(_.F,6,6013)),null;d.loaded=!0;Un(a)&&(a.o||a.g.info(ua),a.o=!0,a.B=!1,a.F.resolve());return c},e=>{a.ua||(a.f.delete(c),a.T(new _.I(_.F,6,6005,{browserError:e.message})))})};Qn=function(a,b){if(!a)return!1;for(let c=0;c<b.pd.length;c++)if(_.Yi(a,b.pd[c]))return!0;return!1};
169
+ _.Hn=function(a,b,c,d){d=void 0===d?!1:d;for(const e of a.f.keys()){const f=a.f.get(e);if(_.Yi(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.l.get(b)||a.l.set(b,Mf),d&&a.g.info(Ib+`Session: '${e.sessionId}'`+`Adding Key ID ${b} to session meta-data.`)):d&&a.g.info(Ib+`Session: '${e.sessionId}'`),!0;if(Qn(c,f))return d&&a.g.info("Skipping Session creation. License for init data was already requested [extra]"),
167
170
  !0}return!1};
168
- Bn=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=On(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.h.ignoreUnrecognizedInitData)return}if(!g&&Pn(a,h,d,e)){var k=!0;if("skd"===d&&!a.h.enableSessionCacheForSkd)for(var l of a.f.keys()){var m=a.f.get(l);
169
- 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.C?_.Pe:Tf;var q=a.G.createSession(n);a.g.info(`Created new ${n} session for Key ID: '${h}'. `+`Init data type: ${d}.`)}catch(u){a.T(new _.G(_.E,6,6005,{browserError:u.message}));return}a.w.on(q,_.ve,a.da.bind(a));a.w.on(q,de,a.ba.bind(a));k={gc:f,sd:[],initData:e,initDataType:d,keyId:h,
170
- fb:h?[h]:[],loaded:!1,ke:Infinity,periodId:c,Jb:null,Na:new _.xn,sessionContext:{ldlDelay:0,customData:{}}};k.Na.catch(()=>{});f&&(l=a.f.get(f),k.sessionContext=l.sessionContext);a.f.set(q,k);h&&!a.l.get(h)&&a.l.set(h,Nf);if(e)for(l=0;l<a.a.initData.length;l++)m=a.a.initData[l],m.keyId&&!k.fb.includes(m.keyId)&&_.Xi(m.initData,e)&&(k.keyId||(k.keyId=m.keyId),k.fb.push(m.keyId),a.l.get(m.keyId)||a.l.set(m.keyId,Nf));l=a.D.getConfiguration();m=a.keySystem();m=a.h.bb[m];n=(n=m.modifiers)&&n.transformInitData;
171
- _.Tg(n)||(n=mn);try{e=n({playerConfig:l,initData:e,initDataType:d,drmInfo:a.a,drmSystemConfig:m,sessionContext:k.sessionContext,emeApi:a.j.f()})}catch(u){h=u;u instanceof _.G||(h=new _.G(_.E,6,6016,u));k.Na&&k.Na.reject(u);a.T(h);return}a.g.info(`Generate License Request for key ID: '${h}'`);q.generateRequest(d,e.buffer).catch(u=>{if(!a.ua){var v=null;u.errorCode&&u.errorCode.systemCode&&(v=u.errorCode.systemCode,0>v&&(v+=Math.pow(2,32)),v="0x"+v.toString(16));a.T(new _.G(_.E,6,6006,{browserError:u.message,
172
- error:u,extended:v},u))}})}else a.g.warn("Empty init data")})};Qn=function(a){let b=Infinity;a=a.f.keys();for(const c of a)isNaN(c.expiration)||(b=Math.min(b,c.expiration));return b};Nn=function(a){a=a.f.values();return _.ti(a,b=>b.loaded)};Pn=function(a,b,c,d){if(!b&&c!==_.If)return!1;d=b||fm(d);for(const e of a.f.values())if(b&&e.keyId===b||b&&e.fb.includes(b)||c===_.If&&(e.keyId||fm(e.initData))===d)return!0;return!1};
173
- On=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.h.bb[f];f=a.D.getConfiguration();g=g&&g.modifiers&&g.modifiers.extractContentId;_.Tg(g)||(g=ln);try{var h={ldlDelay:0,customData:{}};e&&(h=a.f.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 fm(c)||"";if(b===_.ad){l=a.keySystem();try{if(l.match(/^com\.widevine\.alpha/)){const m=
174
- _.Sm(c);if(m)return m.a}else if(cn(l)){{f=new _.Rm(new DataView(c.buffer,c.byteOffset,c.byteLength),!1);g=_.O(f);const m=_.O(f);h=_.Xl(m);const n=_.O(f);c=n>>>24;k=n&16777215;const q=_.Vl(f,16),u=_.Wi(q);if(0<c){const D=_.O(f);f.skip(16*D)}const v=_.O(f),y=_.Vl(f,v),A=_.Ym(y);_.ih("Parsed PR PSSH Box","size",g,"name",h,hg,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""};
175
- En=function(a,b){const c=b.target,d=a.f.get(c);var e=a.keySystem();let f=!1;e.match(/^com\.widevine\.alpha/)&&b.message&&2===b.message.byteLength?(f=!0,a.g.info("WV Server certificate request for "+`SID:'${c.sessionId} `+`from msg '${b.messageType}'`)):a.g.info("License request for "+`SID:'${c.sessionId}'/KID:'${d.keyId}' `+`from msg '${b.messageType}'`);let g=a.a.licenseServerUri;e=a.h.bb[e];"individualization-request"===b.messageType&&e&&e.individualizationServer&&(g=e.individualizationServer);
176
- const h=_.ij([g],a.h.attemptParameters);h.type=3;h.body=b.message;h.method=_.tb;h.licenseRequestType=b.messageType===ge&&d.gc?fe:f?cd:b.messageType;h.sessionId=c.sessionId;if(h.licenseRequestType===fe)a.D.onEvent(new _.C(Ld));cn(a.a.keySystem)&&Rn(a,h);El(a.K,h);const k=Math.floor(b.timeStamp),l=Date.now();return Sn(a,h,d.sessionContext).then(()=>{_.$m(`drm.license.req.${k}.start`);a.g.debug("Sending DRM license request to",g,h);return a.D.Hb.fetch(h).W}).then(m=>{_.$m(`drm.license.req.${k}.end`);
177
- _.an(`drm.license.req.${k}`,`drm.license.req.${k}.start`,`drm.license.req.${k}.end`);if(a.ua)return Promise.reject();const n=Date.now()-l;var q=Tn(a,m);let u="";q&&(u=` RID:${q}`);q=m&&m.data?m.data.byteLength:-1;f?a.g.info("WV Server certificate response for "+`SID:'${c.sessionId}' `+`${q} bytes `+`in ${n}ms${u}`):a.g.info("License response for "+`SID:'${c.sessionId}'/`+`KID:'${d.keyId}' `+`${q} bytes `+`in ${n}ms${u}`);const v=Fl(a.K,m);_.$m(`drm.sess.update.${k}.start`);return c.update(m.data).then(()=>
178
- {_.$m(`drm.sess.update.${k}.end`);_.an(`drm.sess.update.${k}`,`drm.sess.update.${k}.start`,`drm.sess.update.${k}.end`);if(!f){var y=Qn(a),A=v?Date.now()+1E3*v.delay:Number.NaN;y=new _.C(_.Nd,{keySystem:a.keySystem(),expirationTime:y,expectedRenewalTime:A});a.D.onEvent(y);d&&(d.Jb&&d.Jb.resolve(),d.gc&&(y=d.gc,a.g.info(`Closing expired session '${y.sessionId}'`),bn(y).catch(()=>{a.g.warn("Unable to close expired session in time")}),(y=a.f.get(d.gc))&&y.vc&&y.vc.stop(),a.f.delete(d.gc),d.gc=null),(new _.mk(()=>
179
- {a.ua||(d.loaded=!0,d.Na&&d.Na.resolve(),Nn(a)&&(a.o||a.g.info(ua),a.o=!0,a.B=!1,a.F.resolve()))})).fa(5),null!==d.initData&&(0<d.sessionContext.ldlDelay||v&&Dl(a.keySystem()))&&(y=new _.mk(()=>{!a.ua&&a.K&&(a.g.info("Updating CSL Sessions"),cn(a.keySystem())?Bn(a,d.keyId,d.periodId,d.initDataType,d.initData,c,!0):a.keySystem().startsWith(_.sd)&&c.update(_.Ii("renew")))}),d.vc=y,y.fa(v?v.delay:d.sessionContext.ldlDelay)))}})},m=>_.w(function*(){if(!a.ua){var n=m.data.headers;n=Object.assign({message:_.Ra,
180
- url:m.data.url,status:m.data.status,response:m.data.response},n?{headers:n}:{},Gm(n));n=new _.G(_.E,6,6007,n,m);a.T(n);d&&d.Jb&&d.Jb.reject(n);d&&d.Na&&d.Na.reject(n)}})).catch(m=>{a.ua||(m===Hb?a.g.info("Ignore update for closed sessions"):(m=new _.G(_.E,6,6008,{browserError:m.message}),a.T(m),d&&d.Jb&&d.Jb.reject(m),d&&d.Na&&d.Na.reject(m)))})};
181
- Rn=function(a,b){var c=Gi(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(_.gg).textContent;b.body=_.Ui(a.querySelector("Challenge").textContent).buffer}else a.g.debug("PlayReady request is already unwrapped."),b.headers[sa]="text/xml; charset\x3dutf-8"};
182
- Sn=function(a,b,c){return _.w(function*(){const d=a.D.getConfiguration();yield Gn(a,d);const e=a.keySystem();var f=a.h.bb[e];const g=(f=f&&f.modifiers)&&f.licenseRequest,h=f&&f.licenseResponse;g?b.requestModifiers.push(k=>g(d,k,c)):e.startsWith(_.sd)&&b.requestModifiers.push(k=>_.im(k));h?b.responseModifiers.push(k=>h(d,k,c)):e.startsWith(_.sd)&&b.responseModifiers.push(k=>_.mm(k))})};
183
- Tn=function(a,b){if(!b||!b.headers)return"";if(b=b.headers["x-dt-li"])try{return JSON.parse(_.Ei(_.Ui(b))).ti}catch(c){a.g.warn("Unable to parse DRMtoday Request ID",c)}return""};_.Wn=function(a,b){a&&b&&(_.Un.set(a,b),_.Vn.info(`Registered TextDisplayerFactory: '${a}'`))};
184
- _.Xn=function(a,b){b=b.find(c=>(c=_.Un.get(c))?c.a(a):!1);if(null==b)return _.Vn.warn("Subtitles may not work as expected. No compatible text displayer found for this platform."),null;_.Vn.info(`Chosen the text displayer: ${b}`);return _.Un.get(b)};_.Yn=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})}}};
185
- Zn=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};$n=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};ao=function(a){return a.a.map(b=>_.Pg(b))};
186
- _.bo=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:[]}};eo=function(a,b,c,d){b===HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=co.value().get(b),c.one(a,b,d))};
187
- io=function(a){a.g.debug("Start watching for video events for "+a.m.namespace());const b=a.m,c=d=>fo(a,d.type);a.a.on(b,_.Td,()=>{a.h||(a.j=!1,go(a,_.ho))});a.a.on(b,Wc,c);a.a.on(b,_.bf,()=>{a.F=!0;a.j=!1;fo(a,_.bf)});a.a.on(b,_.Ne,()=>{a.F=!1;a.j=!1;fo(a,_.Ne)});a.a.on(b,_.Wf,c);a.a.on(b,_.sf,c);a.a.on(b,_.Df,d=>{a.h=!1;a.j=!1;fo(a,d.type)});a.a.on(b,_.Ef,d=>{a.h=!0;fo(a,d.type)});a.a.on(b,Kf,c);a.a.on(b,_.ug,()=>{a.j=!0;fo(a,_.ug)});a.a.on(b,_.Ud,d=>a.T(d));a.a.on(b,_.qe,c);a.a.on(b,Xc,()=>{a.C=
188
- !0;fo(a,Xc)});a.a.on(b,_.fg,d=>{a.h=!0;fo(a,d.type)});a.a.on(b,_.eg,d=>{a.h=!1;a.j=!1;fo(a,d.type)})};jo=function(a,b){return Object.keys(b)[a]};lo=function(a,b){const c={type:_.Mf};b===_.Sc||b===_.Rc?(c.reason=a.w,b===_.Sc?c.timeSinceLastStateChangeMS=a.H:c.bufferedTimeMS=a.B):(a.f===_.ko&&(c.reason=a.w),a.A===_.ko&&(c.reason=a.w,c.bufferedTimeMS=a.B),c.currentState=a.f,c.previousState=a.A,c.timeSinceLastStateChangeMS=a.H);return c};
189
- go=function(a,b){if(a.f===b)return!1;var c=Date.now();const d=a.f===_.ko;a.A=a.f;a.f=b;a.A===_.ho&&(a.I=c,a.o=0);a.o||(a.o=a.I||c);a.H=c-a.o;a.o=c;b===_.ko?(a.K=a.o,a.w=a.h?1:2,a.g.info("Buffering started. Reason: "+jo(a.w-1,_.mo)),b=lo(a,_.Sc),a.cb(_.Sc,b)):d&&(a.B=a.o-a.K,a.g.info("Buffering finished. Reason: "+jo(a.w-1,_.mo)+". Buffering time: "+a.B+" ms"),b=lo(a,_.Rc),a.cb(_.Rc,b));b=jo(a.A,_.no);c=jo(a.f,_.no);a.g.info(`Player state change: ${b} -> ${c}`);a.cb(_.Mf,lo(a,""));return!0};
190
- fo=function(a,b){if(a.f===_.oo)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.h||(a.j=!1,go(a,_.ho));else if(b!==_.Wf){var e=a.m.getPosition();e=null!==e&&void 0!==e&&0<=e?a.m.getBufferInfo().xa(e,!0):-1;a.G=e;e=a.m.getSurface().getMedia();a.l=e?e.readyState:null;a.J=a.m.getPlaybackRate()||1;e=typeof a.l===_.r&&2>a.l&&2===e.networkState;var f=typeof a.l===_.r&&0>=a.G&&a.f===_.po,g=typeof a.l===_.r&&2>=a.l&&a.j;e=a.h||
191
- f||e||g;!a.L||a.m.isLive()||a.f!==_.ko||e||(f=b===_.Df&&4===a.l,(g=a.A===_.qo)&&!a.C?e=!0:g||a.C||f||(e=!0));f=!1;e?f=go(a,_.ko):c?f=go(a,_.ro):a.F&&(f=go(a,_.so));f&&(a.C=!1);a.g.debug("Video state check for event "+b+":: seeking: "+a.h+", waiting: "+a.j+", playing: "+a.F+", paused: "+c+", readyState: "+a.l+", rate: "+a.J+", buffer: "+a.G+", ended: "+d+". Changed state: "+f+", Current state: "+jo(a.f,_.no))}}};
192
- to=function(a){a=(new _.ci(a)).Da;if(!a)return null;a=a.toUpperCase();return _.Mi(a,".MPD")?_.Ac:_.Mi(a,".M3U8")?_.hl:_.Mi(a,".MP4")?_.lg:_.Mi(a,".MP3")?"audio/mp3":_.Mi(a,"MANIFEST")||_.Mi(a,".ISM")?_.Fc:null};_.vo=function(a){let b;ql(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=uo(b[c]);d&&a.push(d)}return a};
193
- uo=function(a){let b=null;_.Vg(a)&&(a={url:a});typeof a===_.De&&!Array.isArray(a)&&"url"in a&&(b={url:a.url,type:a.type?a.type:null},_.z(a.drmProtected)||typeof a.drmProtected!==_.Pc||(b.drmProtected=a.drmProtected),_.z(a.isLive)||typeof a.isLive!==_.Pc||(b.isLive=a.isLive),_.z(a.name)||typeof a.name!==_.Pf||(b.name=a.name),_.z(a.Tb)||typeof a.Tb!==_.Pf||(b.Tb=a.Tb),_.z(a.audioMimeType)||typeof a.audioMimeType!==_.Pf||(b.audioMimeType=a.audioMimeType));b&&!b.type&&(b.type=to(a.url),b.type?wo.debug("Detect media type "+
194
- b.type+" for "+a.url):wo.warn("Unable to detect media type for "+a.url));return b};yo=function(a){return a.w?xo():new Promise(b=>{if(a.a){const c=a.a;a.h.off(c,_.Ud);a.h.off(c,_.xf);a.a=null}b()})};xo=function(){return Promise.reject(new _.G(_.E,7,7E3))};
195
- Ao=function(a,b){return a.w?xo():new Promise(c=>{a.a||(a.h.on(b,_.Ud,()=>{{const d=zo(a);if(d)a.onError(d)}}),a.h.on(b,_.xf,()=>{const d=b.videoWidth,e=b.videoHeight,f=a.getTrackManager();f&&0<d&&0<e&&(f.w={width:d,height:e});a.trigger(new _.C(_.Oc,{detail:{width:d,height:e}}))}),a.a=b);c()})};
196
- Co=function(a){return _.w(function*(){if(a.w)return xo();var b=a.ea[a.getSourceIndex()];if(!a.configuration.drm||!1===b.drmProtected)return a.log.debug("No DRM configuration present.","Skipping DRM engine initialization"),Promise.resolve();b=_.Jl(a.configuration.drm);a.log.debug("Drm configuration: ",b);const c=a.getNetworkEngine();a.o=new _.Bo({Hb:c,onError:d=>a.onError(d),pe:()=>{},oe:(d,e)=>{a.trigger(new _.C(_.Kd,{expirationTime:e}))},onEvent:d=>{d instanceof _.C?a.dispatchEvent(d):a.log.debug(_.Ob,
197
- d.type)},getConfiguration:()=>a.getConfiguration(),Ac:()=>a.Ac()});a.o.h=b;yield _.wn(a.o,[{id:0,language:_.$f,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:_.lg,codecs:"",encrypted:!0,keyId:null,language:_.$f,originalLanguage:_.$f,label:null,type:_.t,primary:!1,frameRate:void 0,ei:void 0,
198
- trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,spatialAudio:!1,Rh:null,closedCaptions:null},bandwidth:100,drmInfos:[],allowedByApplication:!0,allowedByKeySystem:!0}]);yield _.Mn(a.o,a.a);return Promise.resolve()})};Do=function(a,b){eo(a.a,HTMLMediaElement.HAVE_CURRENT_DATA,a.h,()=>{a.getState()!==_.oo&&a.seek(b).catch(c=>{a.log.warn("Error while seeking to start position.",c)})})};
199
- zo=function(a){if(null===a.ea||!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 _.G(_.E,3,3016,{code:b,$h:c,message:a.a.error.message})};
200
- Fo=function(a){if(a.w)return new _.Eo(xo(),()=>{});const b=a.ea[a.getSourceIndex()],c=a.configuration.startTime||null,d=a.a,e=a.H;c&&Do(a,c);if(d.preload!==_.Ce)a.h.one(d,_.qe,()=>{const g=Date.now()/1E3-e;a.f.A=g;a.log.debug("Time to load: ",g)});d.src=b.url;(_.qk()||_.tk())&&d.load();const f=new _.xn;a.h.one(d,Kf,()=>{const g=a.getConfiguration().manifest.attemptParameters.timeout||30;a.B||(a.B=(new _.mk(()=>{f.reject(new _.G(_.E,3,3100,{message:`Unable to load media source successfully from ${b.url}`,
201
- uri:b.url},d.error))})).fa(g))});eo(d,a.configuration.forceWaitForTracks?HTMLMediaElement.HAVE_CURRENT_DATA:HTMLMediaElement.HAVE_METADATA,a.h,()=>f.resolve());d.error?f.reject(zo(a)):d.preload===_.Ce&&(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(zo(a))});return new _.Eo(f,
202
- ()=>{const g=new _.G(_.E,7,7001);f.reject(g);return Promise.resolve()})};Go=function(a,b){eo(b,HTMLMediaElement.HAVE_CURRENT_DATA,a.h,()=>{if(a.isLive()&&a.getState()!==_.oo){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)}))}})};
203
- Ho=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())})};_.Ko=function(a){0<=Io.indexOf(a)?Jo.warn(`Factory '${a.name()}' is already registered`):(Io.push(a),Jo.info(`Factory '${a.name()}' has been registered.`))};Lo=function(a,b){const c=Io.find(d=>d.a(a,b))||null;c&&Jo.info(`Chosen ads manager: ${c.name()}`);return c};
204
- _.Mo=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};_.No=function(a,b){a.classList.add(b)};_.Oo=function(a,b){if(a&&typeof b===_.De)for(const c in b)a.style[c]=b[c]};_.Po=function(a){return document.createElement(a)};
205
- Qo=function(a,b){const c=new MutationObserver(()=>{const d=Array.from(a.h.values());Sh(Array.from(b.classList),Array.from(d))||b.classList.add(...d)});c.observe(b,{attributes:!0,attributeFilter:["class"]});return c};Ro=function(a,b){a.a&&0!==b.length&&(a.a.classList.add(b),a.h.add(b))};
206
- So=function(a,b,c){(_.tk()&&53===_.uk().major||_.tk()&&68===_.uk().major||_.vk())&&!b.hasAttribute(zd)&&(b.style.opacity="0",b.setAttribute(zd,""),a.j.one(b,Pd,()=>{b.removeAttribute(zd);b.style.opacity="1";c&&(c.style.opacity="1")}))};To=function(a){if(a.Vb&&0===a.Vb.getDuration()){var b=a.player.getDuration();a.Vb.h=b}a.Gd&&a.Gd()};Uo=function(a,b){return _.w(function*(){yield a.release();yield a.load(b)})};
207
- Wo=function(a,b,c){return Array.from({length:2}).map(()=>{var d=document.createElement(_.t);b.appendChild(d);const e=a.za.ya.create();d=new Vo(d);e.init(d,c);e.setSourceIndex(0);d=d.getContainer();if(!d)throw Error("Failed to create player surface container element");d.classList.add("secondary");a.A.push(d);return e})};Xo=function(a){return[a.f,...a.l.a.map(b=>b.player)]};
208
- Yo=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(id),d.classList.remove("clpp-hide")):(a.g.debug(`Hide video element .${b}`),d.classList.remove(id),d.classList.add("clpp-hide")),a.B&&a.B(d,c))};Zo=function(a){return _.w(function*(){const b=a.a;b&&("loaded"!==b.state&&(yield b.Ec),yield b.player.play(),b.state=_.bf,To(b))})};
209
- $o=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(),Ec:Promise.resolve()})))};ap=function(a,b){0!==a.h.length&&(b?(a.g.info("Remove items",b),a.h=a.h.filter(c=>!b.includes(c.id))):(a.g.info("Remove all items"),a.h=[]))};
210
- lp=function(a,b,c){return _.w(function*(){if(a.o)a.g.warn(`Cannot ${c} item while busy (ID: ${b})`);else{var d=bp(a,b);if(d){a.g.info(`${c} item (ID: ${b})`);a.o=!0;var e=a.a;e&&(e.player.isPaused()||e.player.pause(),e.player.setMuted(!0));var f=a.j.has(b);f&&a.j.delete(b);try{c===_.Re?(e&&d.primary?yield cp(a,d):f?yield dp(a,d):yield ep(a,d),To(d)):f?a.g.error("Loading preloaded items is not supported"):yield fp(a,d);gp(a,d);d.player.setMuted(!1);d.Vb&&hp(a,d,d.Vb);if(d.pb)d.player.one(_.Td,d.pb);
211
- d.Ef&&d.Ef()}catch(g){throw a.g.error(`Item failed to ${c} (ID: ${b})`),g;}finally{a.o=!1,e&&ip(a,e),jp(a),kp(a,d.next)}}else a.g.warn(`Item not found (ID: ${b})`)}})};bp=function(a,b){return a.h.find(c=>c.id===b)||null};cp=function(a,b){return _.w(function*(){if(b.player){if(b.state===nf){a.g.info("Wait for seek to finish");try{yield b.preloadPromise}catch(c){}}a.a=b;b.role=mp;Yo(a,b.player,!0);b.state="loading";yield b.player.play();b.state=_.bf}})};
212
- dp=function(a,b){return _.w(function*(){const c=b.player;if(c){if(b.state===nf){a.g.info(Ub);try{yield b.preloadPromise}catch(d){}}a.a=b;b.role=mp;Yo(a,c,!0);b.state===mf?yield c.play():b.state===lf&&(yield Uo(c,b.config));b.state=_.bf}})};ep=function(a,b){return _.w(function*(){yield fp(a,b);yield b.player.play();b.state=_.bf})};
213
- fp=function(a,b){return _.w(function*(){const c=yield np(a,!!b.primary);a.a=b;b.role=mp;a.a.player=c;a.a.videoEl=c.getSurface().getMedia();Yo(a,c,!0);b.state="loading";b.Ec=Uo(c,b.config);yield b.Ec;b.state="loaded"})};
214
- gp=function(a,b){const c=b.transition;if(c&&!c.uh){if(c.pb){const d=c.pb,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.qe&&op(a,b,()=>{const d=a.a.Vb;d&&(a.f.trigger(new _.C(_.sc,{ad:d})),a.f.trigger(new _.C(_.fc,{ad:d})),d.a===d.f&&a.f.trigger(new _.C(_.cc)))});c.uh=!0}};
215
- hp=function(a,b,c){const d=b.player,e=()=>{const l=d.getPosition(),m=c.getDuration();c.j=l;a.f.trigger(new _.C(_.oc,{ad:c}));!c.l&&l>=m/4&&(c.l=!0,a.f.trigger(new _.C(_.gc,{ad:c})));!c.o&&l>=m/2&&(c.o=!0,a.f.trigger(new _.C(_.mc,{ad:c})));!c.w&&l>=3*m/4&&(c.w=!0,a.f.trigger(new _.C(_.tc,{ad:c})))},f=()=>{d.isEnded()||a.f.trigger(new _.C(_.nc,{ad:c}))},g=()=>{a.f.trigger(new _.C(_.pc,{ad:c}))},h=()=>{a.f.trigger(new _.C(_.dc,{ad:c}))},k=()=>{a.f.trigger(new _.C(_.sc,{ad:c}));a.f.trigger(new _.C(_.fc,
216
- {ad:c}));c.a===c.f&&a.f.trigger(new _.C(_.cc))};d.on(_.Wf,e);d.on(_.Ne,f);d.on(_.bf,g);d.on(_.Sc,h);d.one(_.Td,k);b.disposers.push(()=>{d.off(_.Wf,e);d.off(_.Ne,f);d.off(_.bf,g);d.off(_.Sc,h);d.off(_.Td,k)});1===c.a&&a.f.trigger(new _.C(_.bc));a.f.trigger(new _.C(_.kc,{ad:c}));a.f.trigger(new _.C(_.rc,{ad:c}))};
217
- ip=function(a,b){return _.w(function*(){const c=b.player;b.primary?a.g.info("Pause primary playback"):(a.g.info(`Stop previous playback (ID: ${b.id})`),b.disposers.forEach(d=>d()),b.disposers=[],b.player=null,b.videoEl=null,b.role=pp,yield qp(a,c));Yo(a,c,!1)})};jp=function(a){return Promise.all(Array.from(a.j.keys()).map(b=>rp(a,b)))};kp=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=>sp(a,d)))}})};
218
- tp=function(a){return a.h.find(b=>!!b.primary)||null};up=function(a,b){const c=tp(a);c?c.Fa=b:a.g.error("Failed to get primary item. Cannot configure resume position.")};vp=function(a){a.A.forEach(b=>a.w.removeChild(b));a.A=[];Yo(a,a.f,!0)};
219
- op=function(a,b,c){const d=b.transition.qe;let e=null;d.Fa&&up(a,d.Fa);const f=()=>{const k=b.player.getPosition();.5>=d.position-k&&(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=()=>{b.player.off(_.Wf,f)};b.player.on(_.Wf,f);b.disposers.push(()=>{null!=e&&(cancelAnimationFrame(e),
220
- e=null)});b.disposers.push(h)};wp=function(a){a.a&&(a.a.disposers.forEach(b=>b()),a.a.disposers=[],a.a.Vb&&hp(a,a.a,a.a.Vb),gp(a,a.a),jp(a),kp(a,a.a.next))};rp=function(a,b){return _.w(function*(){const c=a.j.get(b);c&&(a.g.info(`Stop preloading item (ID: ${b})`),c.player&&(yield qp(a,c.player)),a.j.delete(b))})};qp=function(a,b){return _.w(function*(){b!==a.f&&(yield a.l.release(b))})};
221
- np=function(a,b){return _.w(function*(){if(b)return a.f;const c=yield a.l.get();if(!c)throw Error("No player available");return c})};
222
- sp=function(a,b){return _.w(function*(){if(b.primary){b.state=nf;a.j.set(b.id,b);var c=b.player;b.Fa&&(a.g.info("Preparing to resume at",b.Fa),c.setMuted(!0),yield c.seek(b.Fa));b.state=mf}else{c=b.id;var d=yield np(a,!1);b.player=d;b.videoEl=d.getSurface().getMedia();b.role=pp;b.state=nf;try{a.j.set(c,b),b.config.autoplay&&(a.g.warn(ja+`Force disabling autoplay (ID: ${c})`),b.config.autoplay=!1),b.preloadPromise=Uo(d,b.config),yield b.preloadPromise,b.state=mf}catch(e){7001===e.code?(a.g.info(`Preload aborted (ID: ${c})`),
223
- b.state=kf):(a.g.warn(`Preload failed (ID: ${c})`,e),b.state=lf)}}})};xp=function(a){return a&&a.ASSETS&&Array.isArray(a.ASSETS)?a.ASSETS.every(b=>typeof b.URI===_.Pf&&typeof b.DURATION===_.r):!1};yp=function(a,b){return a.a.find(c=>1===c.te&&b>c.startTime&&b<c.endTime)||null};Bp=function(a,b){return _.w(function*(){if(!(yield zp(a,b)))throw Error("Failed to bind");yield Ap(a,b,1,!1)})};
224
- Jp=function(a,b){const c=()=>_.w(function*(){var e=b.getPosition(),f=Cp(a,e);f&&(a.g.info(`Interstitial ${f.sa} coming up `+`at ${f.startTime} s`),(yield zp(a,f))&&Dp(a,f,b));if((f=Ep(a))&&f.state===Fp&&b.getDuration()-e<a.za.resolutionOffsetSec&&(yield zp(a,f)))if(f.Ia&&0!==f.Ia.length){if(e=a.qa.getCurrentItem()){var g=Gp(a,f,2),h=g[0].id;e.next=[h];e.transition={pb:h};Hp(a,f,g);a.g.info(`Postroll interstitial ${f.sa} scheduled`)}}else a.g.warn("Postroll interstitial has no assets, ignoring.")});
225
- b.addEventListener(_.Wf,c);a.h.push(()=>{b.removeEventListener(_.Wf,c)});const d=()=>{Ip(a,!1,!0,!0)};b.addEventListener(_.Fh,d);a.h.push(()=>{b.removeEventListener(_.Fh,d)})};Kp=function(a){a.h.forEach(b=>b());a.h=[]};Lp=function(a){return(a=a.qa.getCurrentItem())&&!a.primary?a.player:null};
226
- Ip=function(a,b,c,d){const e=Mp(a);a.g.info("Interstitial cues found",e);var f=e;if(d){f=Vh(a.a.map(m=>m.sa),e.map(m=>m.id));Np(a,f.qh);const l=new Set(f.gg);f=e.filter(m=>l.has(m.id))}if(!Op(a,f))return!1;const g=[],h=[],k=[];f.forEach(l=>{const m=l.customAttributes.CUE||[];m.includes(_.tb)?h.push(l):!d&&m.includes("PRE")?g.push(l):!c&&l.startTime<a.za.kh?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]&&Pp(a,g[0],b);k.forEach(l=>
227
- Qp(a,l,1));1<h.length?a.g.warn("Multiple postroll interstitials not supported. Will display only the 1st one."):h[0]&&Qp(a,h[0],2);a.g.info("Interstitials changed",a.a);return 0<g.length};
228
- Rp=function(a){_.w(function*(){var b=a.qa;$o(b,[{id:pf,primary:!0,config:b.f.getConfiguration(),next:[]}]);var c=tp(b);if(!c)throw Error("Failed to find primary item");b.a=c;c.role=mp;c.player=b.f;c.videoEl=c.player.getSurface().getMedia();Yo(b,c.player,!0);b=a.f;c=b.getConfiguration();a.j=Ip(a,!c.autoplay,b.isLive(),!1);if(a.j){if(b=a.qa,c=b.l,c=c.a[0]?c.a[0].player:null)Yo(b,b.f,!1),Yo(b,c,!0)}else c.autoplay&&(yield Zo(a.qa))})};
229
- Mp=function(a){return a.f.getTimelineCues().filter(b=>b.schemeIdUri===_.td&&b.customAttributes)};Np=function(a,b){const c=new Set(b);a.a.forEach(d=>{c.has(d.sa)&&![Fp,Sp].includes(d.state)&&a.g.warn("Removing an interstitial in active state",d)});a.a=a.a.filter(d=>!c.has(d.sa))};
230
- Op=function(a,b){const c=b.sort((g,h)=>g.startTime-h.startTime),d=a.za.resolutionOffsetSec,e=[];for(let g=0;g<c.length-1;g++){const h=c[g],k=c[g+1];k&&k.startTime-h.endTime<d&&e.push(`Interstitials ${h.id} and ${k.id} `+`are too close to each other (less than ${d} s).`);k&&k.startTime<=h.endTime&&e.push(`Interstitials ${h.id} and ${k.id} `+"overlap.")}const f=[];b.forEach(g=>{const h=g.customAttributes[_.Zb],k=g.customAttributes[_.$b];g.customAttributes[_.Yb]||h?null!=k&&1>k&&a.g.warn(`Interstitial cue ${g.id} is invalid `+
171
+ In=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=Vn(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.h.ignoreUnrecognizedInitData)return}if(!g&&Wn(a,h,d,e)){var k=!0;if("skd"===d&&!a.h.enableSessionCacheForSkd)for(var l of a.f.keys()){var m=a.f.get(l);
172
+ 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.C?_.Oe:Sf;var q=a.G.createSession(n);a.g.info(`Created new ${n} session for Key ID: '${h}'. `+`Init data type: ${d}.`)}catch(u){a.T(new _.I(_.F,6,6005,{browserError:u.message}));return}a.w.on(q,_.ue,a.ca.bind(a));a.w.on(q,ce,a.ba.bind(a));k={gc:f,pd:[],initData:e,initDataType:d,keyId:h,
173
+ ib:h?[h]:[],loaded:!1,ke:Infinity,periodId:c,Jb:null,Qa:new _.Cn,sessionContext:{ldlDelay:0,customData:{}}};k.Qa.catch(()=>{});f&&(l=a.f.get(f),k.sessionContext=l.sessionContext);a.f.set(q,k);h&&!a.l.get(h)&&a.l.set(h,Mf);if(e)for(l=0;l<a.a.initData.length;l++)m=a.a.initData[l],m.keyId&&!k.ib.includes(m.keyId)&&_.Yi(m.initData,e)&&(k.keyId||(k.keyId=m.keyId),k.ib.push(m.keyId),a.l.get(m.keyId)||a.l.set(m.keyId,Mf));l=a.D.getConfiguration();m=a.keySystem();m=a.h.Ia[m];n=(n=m.modifiers)&&n.transformInitData;
174
+ _.Ug(n)||(n=pn);try{e=n({playerConfig:l,initData:e,initDataType:d,drmInfo:a.a,drmSystemConfig:m,sessionContext:k.sessionContext,emeApi:a.j.f()})}catch(u){h=u;u instanceof _.I||(h=new _.I(_.F,6,6016,u));k.Qa&&k.Qa.reject(u);a.T(h);return}a.g.info(`Generate License Request for key ID: '${h}'`);q.generateRequest(d,e.buffer).catch(u=>{if(!a.ua){var v=null;u.errorCode&&u.errorCode.systemCode&&(v=u.errorCode.systemCode,0>v&&(v+=Math.pow(2,32)),v="0x"+v.toString(16));a.T(new _.I(_.F,6,6006,{browserError:u.message,
175
+ error:u,extended:v},u))}})}else a.g.warn("Empty init data")})};Xn=function(a){let b=Infinity;a=a.f.keys();for(const c of a)isNaN(c.expiration)||(b=Math.min(b,c.expiration));return b};Un=function(a){a=a.f.values();return _.ui(a,b=>b.loaded)};Wn=function(a,b,c,d){if(!b&&c!==_.Hf)return!1;d=b||im(d);for(const e of a.f.values())if(b&&e.keyId===b||b&&e.ib.includes(b)||c===_.Hf&&(e.keyId||im(e.initData))===d)return!0;return!1};
176
+ Vn=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.h.Ia[f];f=a.D.getConfiguration();g=g&&g.modifiers&&g.modifiers.extractContentId;_.Ug(g)||(g=on);try{var h={ldlDelay:0,customData:{}};e&&(h=a.f.get(e).sessionContext);var k=g(f,c,h);a.g.debug(`Extracted Content ID '${k}' from SKD`);var l=k;break a}catch(m){a.g.warn("Unable to extract Content ID from SKD",m)}l=""}return l}if(b===_.Hf)return im(c)||"";if(b===_.ad){l=a.keySystem();try{if(l.match(/^com\.widevine\.alpha/)){const m=
177
+ _.Vm(c);if(m)return m.a}else if(fn(l)){{f=new _.Um(new DataView(c.buffer,c.byteOffset,c.byteLength),!1);g=_.P(f);const m=_.P(f);h=_.$l(m);const n=_.P(f);c=n>>>24;k=n&16777215;const q=_.Yl(f,16),u=_.Xi(q);if(0<c){const D=_.P(f);f.skip(16*D)}const v=_.P(f),y=_.Yl(f,v),A=_.an(y);_.jh("Parsed PR PSSH Box","size",g,"name",h,gg,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""};
178
+ Ln=function(a,b){const c=b.target,d=a.f.get(c);var e=a.keySystem();let f=!1;e.match(/^com\.widevine\.alpha/)&&b.message&&2===b.message.byteLength?(f=!0,a.g.info("WV Server certificate request for "+`SID:'${c.sessionId} `+`from msg '${b.messageType}'`)):a.g.info("License request for "+`SID:'${c.sessionId}'/KID:'${d.keyId}' `+`from msg '${b.messageType}'`);let g=a.a.licenseServerUri;e=a.h.Ia[e];"individualization-request"===b.messageType&&e&&e.individualizationServer&&(g=e.individualizationServer);
179
+ const h=_.jj([g],a.h.attemptParameters);h.type=3;h.body=b.message;h.method=_.tb;h.licenseRequestType=b.messageType===fe&&d.gc?ee:f?cd:b.messageType;h.sessionId=c.sessionId;if(h.licenseRequestType===ee)a.D.onEvent(new _.E(Kd));fn(a.a.keySystem)&&Yn(a,h);Hl(a.K,h);const k=Math.floor(b.timeStamp),l=Date.now();return Zn(a,h,d.sessionContext).then(()=>{_.cn(`drm.license.req.${k}.start`);a.g.debug("Sending DRM license request to",g,h);return a.D.Hb.fetch(h).W}).then(m=>{_.cn(`drm.license.req.${k}.end`);
180
+ _.dn(`drm.license.req.${k}`,`drm.license.req.${k}.start`,`drm.license.req.${k}.end`);if(a.ua)return Promise.reject();const n=Date.now()-l;var q=$n(a,m);let u="";q&&(u=` RID:${q}`);q=m&&m.data?m.data.byteLength:-1;f?a.g.info("WV Server certificate response for "+`SID:'${c.sessionId}' `+`${q} bytes `+`in ${n}ms${u}`):a.g.info("License response for "+`SID:'${c.sessionId}'/`+`KID:'${d.keyId}' `+`${q} bytes `+`in ${n}ms${u}`);const v=Il(a.K,m);_.cn(`drm.sess.update.${k}.start`);return c.update(m.data).then(()=>
181
+ {_.cn(`drm.sess.update.${k}.end`);_.dn(`drm.sess.update.${k}`,`drm.sess.update.${k}.start`,`drm.sess.update.${k}.end`);if(!f){var y=Xn(a),A=v?Date.now()+1E3*v.delay:Number.NaN;y=new _.E(_.Nd,{keySystem:a.keySystem(),expirationTime:y,expectedRenewalTime:A});a.D.onEvent(y);d&&(d.Jb&&d.Jb.resolve(),d.gc&&(y=d.gc,a.g.info(`Closing expired session '${y.sessionId}'`),en(y).catch(()=>{a.g.warn("Unable to close expired session in time")}),(y=a.f.get(d.gc))&&y.vc&&y.vc.stop(),a.f.delete(d.gc),d.gc=null),(new _.pk(()=>
182
+ {a.ua||(d.loaded=!0,d.Qa&&d.Qa.resolve(),Un(a)&&(a.o||a.g.info(ua),a.o=!0,a.B=!1,a.F.resolve()))})).fa(5),null!==d.initData&&(0<d.sessionContext.ldlDelay||v&&Gl(a.keySystem()))&&(y=new _.pk(()=>{!a.ua&&a.K&&(a.g.info("Updating CSL Sessions"),fn(a.keySystem())?In(a,d.keyId,d.periodId,d.initDataType,d.initData,c,!0):a.keySystem().startsWith(_.sd)&&c.update(_.Ji("renew")))}),d.vc=y,y.fa(v?v.delay:d.sessionContext.ldlDelay)))}})},m=>_.x(function*(){if(!a.ua){var n=m.data.headers;n=Object.assign({message:_.Ra,
183
+ url:m.data.url,status:m.data.status,response:m.data.response},n?{headers:n}:{},Jm(n));n=new _.I(_.F,6,6007,n,m);a.T(n);d&&d.Jb&&d.Jb.reject(n);d&&d.Qa&&d.Qa.reject(n)}})).catch(m=>{a.ua||(m===Hb?a.g.info("Ignore update for closed sessions"):(m=new _.I(_.F,6,6008,{browserError:m.message}),a.T(m),d&&d.Jb&&d.Jb.reject(m),d&&d.Qa&&d.Qa.reject(m)))})};
184
+ Yn=function(a,b){var c=Hi(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(_.fg).textContent;b.body=_.Vi(a.querySelector("Challenge").textContent).buffer}else a.g.debug("PlayReady request is already unwrapped."),b.headers[sa]="text/xml; charset\x3dutf-8"};
185
+ Zn=function(a,b,c){return _.x(function*(){const d=a.D.getConfiguration();yield Nn(a,d);const e=a.keySystem();var f=a.h.Ia[e];const g=(f=f&&f.modifiers)&&f.licenseRequest,h=f&&f.licenseResponse;g?b.requestModifiers.push(k=>g(d,k,c)):e.startsWith(_.sd)&&b.requestModifiers.push(k=>_.lm(k));h?b.responseModifiers.push(k=>h(d,k,c)):e.startsWith(_.sd)&&b.responseModifiers.push(k=>_.mm(k))})};
186
+ $n=function(a,b){if(!b||!b.headers)return"";if(b=b.headers["x-dt-li"])try{return JSON.parse(_.Fi(_.Vi(b))).ti}catch(c){a.g.warn("Unable to parse DRMtoday Request ID",c)}return""};_.co=function(a,b){a&&b&&(_.ao.set(a,b),_.bo.info(`Registered TextDisplayerFactory: '${a}'`))};
187
+ _.eo=function(a,b){b=b.find(c=>(c=_.ao.get(c))?c.a(a):!1);if(null==b)return _.bo.warn("Subtitles may not work as expected. No compatible text displayer found for this platform."),null;_.bo.info(`Chosen the text displayer: ${b}`);return _.ao.get(b)};_.fo=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})}}};
188
+ go=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};ho=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};io=function(a){return a.a.map(b=>_.Qg(b))};
189
+ _.jo=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:[]}};lo=function(a,b,c,d){b===HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=ko.value().get(b),c.one(a,b,d))};
190
+ po=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,_.Td,()=>{a.h||(a.j=!1,no(a,_.oo))});a.a.on(b,Sc,c);a.a.on(b,_.af,()=>{a.F=!0;a.j=!1;mo(a,_.af)});a.a.on(b,_.Me,()=>{a.F=!1;a.j=!1;mo(a,_.Me)});a.a.on(b,_.Vf,c);a.a.on(b,_.rf,c);a.a.on(b,_.Cf,d=>{a.h=!1;a.j=!1;mo(a,d.type)});a.a.on(b,_.Df,d=>{a.h=!0;mo(a,d.type)});a.a.on(b,Jf,c);a.a.on(b,_.tg,()=>{a.j=!0;mo(a,_.tg)});a.a.on(b,_.r,d=>a.T(d));a.a.on(b,_.le,c);a.a.on(b,Uc,()=>{a.C=
191
+ !0;mo(a,Uc)});a.a.on(b,_.eg,d=>{a.h=!0;mo(a,d.type)});a.a.on(b,_.dg,d=>{a.h=!1;a.j=!1;mo(a,d.type)})};qo=function(a,b){return Object.keys(b)[a]};so=function(a,b){const c={type:_.Lf};b===_.Rc||b===_.Qc?(c.reason=a.w,b===_.Rc?c.timeSinceLastStateChangeMS=a.H:c.bufferedTimeMS=a.B):(a.f===_.ro&&(c.reason=a.w),a.A===_.ro&&(c.reason=a.w,c.bufferedTimeMS=a.B),c.currentState=a.f,c.previousState=a.A,c.timeSinceLastStateChangeMS=a.H);return c};
192
+ no=function(a,b){if(a.f===b)return!1;var c=Date.now();const d=a.f===_.ro;a.A=a.f;a.f=b;a.A===_.oo&&(a.I=c,a.o=0);a.o||(a.o=a.I||c);a.H=c-a.o;a.o=c;b===_.ro?(a.K=a.o,a.w=a.h?1:2,a.g.info("Buffering started. Reason: "+qo(a.w-1,_.to)),b=so(a,_.Rc),a.gb(_.Rc,b)):d&&(a.B=a.o-a.K,a.g.info("Buffering finished. Reason: "+qo(a.w-1,_.to)+". Buffering time: "+a.B+" ms"),b=so(a,_.Qc),a.gb(_.Qc,b));b=qo(a.A,_.uo);c=qo(a.f,_.uo);a.g.info(`Player state change: ${b} -> ${c}`);a.gb(_.Lf,so(a,""));return!0};
193
+ mo=function(a,b){if(a.f===_.vo)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.h||(a.j=!1,no(a,_.oo));else if(b!==_.Vf){var e=a.m.getPosition();e=null!==e&&void 0!==e&&0<=e?a.m.getBufferInfo().ya(e,!0):-1;a.G=e;e=a.m.getSurface().getMedia();a.l=e?e.readyState:null;a.J=a.m.getPlaybackRate()||1;e=typeof a.l===_.t&&2>a.l&&2===e.networkState;var f=typeof a.l===_.t&&0>=a.G&&a.f===_.wo,g=typeof a.l===_.t&&2>=a.l&&a.j;e=a.h||
194
+ f||e||g;!a.L||a.m.isLive()||a.f!==_.ro||e||(f=b===_.Cf&&4===a.l,(g=a.A===_.xo)&&!a.C?e=!0:g||a.C||f||(e=!0));f=!1;e?f=no(a,_.ro):c?f=no(a,_.yo):a.F&&(f=no(a,_.zo));f&&(a.C=!1);a.g.debug("Video state check for event "+b+":: seeking: "+a.h+", waiting: "+a.j+", playing: "+a.F+", paused: "+c+", readyState: "+a.l+", rate: "+a.J+", buffer: "+a.G+", ended: "+d+". Changed state: "+f+", Current state: "+qo(a.f,_.uo))}}};
195
+ Ao=function(a){a=(new _.di(a)).Ea;if(!a)return null;a=a.toUpperCase();return _.Ni(a,".MPD")?_.Ac:_.Ni(a,".M3U8")?_.kl:_.Ni(a,".MP4")?_.kg:_.Ni(a,".MP3")?"audio/mp3":_.Ni(a,"MANIFEST")||_.Ni(a,".ISM")?_.Fc:null};_.Co=function(a){let b;tl(a)?b=a.source:b=a;Array.isArray(b)||(b=[b]);b=b.filter(c=>typeof c===_.Of||"url"in c);a=[];for(let c=0;c<b.length;c++){const d=Bo(b[c]);d&&a.push(d)}return a};
196
+ Bo=function(a){let b=null;_.Wg(a)&&(a={url:a});typeof a===_.Ce&&!Array.isArray(a)&&"url"in a&&(b={url:a.url,type:a.type?a.type:null},_.B(a.drmProtected)||typeof a.drmProtected!==_.Pc||(b.drmProtected=a.drmProtected),_.B(a.isLive)||typeof a.isLive!==_.Pc||(b.isLive=a.isLive),_.B(a.name)||typeof a.name!==_.Of||(b.name=a.name),_.B(a.Tb)||typeof a.Tb!==_.Of||(b.Tb=a.Tb),_.B(a.audioMimeType)||typeof a.audioMimeType!==_.Of||(b.audioMimeType=a.audioMimeType));b&&!b.type&&(b.type=Ao(a.url),b.type?Do.debug("Detect media type "+
197
+ b.type+" for "+a.url):Do.warn("Unable to detect media type for "+a.url));return b};Fo=function(a){return a.w?Eo():new Promise(b=>{if(a.a){const c=a.a;a.h.off(c,_.r);a.h.off(c,_.wf);a.a=null}b()})};Eo=function(){return Promise.reject(new _.I(_.F,7,7E3))};
198
+ Ho=function(a,b){return a.w?Eo():new Promise(c=>{a.a||(a.h.on(b,_.r,()=>{{const d=Go(a);if(d)a.onError(d)}}),a.h.on(b,_.wf,()=>{const d=b.videoWidth,e=b.videoHeight,f=a.getTrackManager();f&&0<d&&0<e&&(f.w={width:d,height:e});a.trigger(new _.E(_.Oc,{detail:{width:d,height:e}}))}),a.a=b);c()})};
199
+ Jo=function(a){return _.x(function*(){if(a.w)return Eo();var b=a.ea[a.getSourceIndex()];if(!a.configuration.drm||!1===b.drmProtected)return a.log.debug("No DRM configuration present.","Skipping DRM engine initialization"),Promise.resolve();b=_.Ml(a.configuration.drm);a.log.debug("Drm configuration: ",b);const c=a.getNetworkEngine();a.o=new _.Io({Hb:c,onError:d=>a.onError(d),pe:()=>{},oe:(d,e)=>{a.trigger(new _.E(_.Jd,{expirationTime:e}))},onEvent:d=>{d instanceof _.E?a.dispatchEvent(d):a.log.debug(_.Ob,
200
+ d.type)},getConfiguration:()=>a.getConfiguration(),Ac:()=>a.Ac()});a.o.h=b;yield _.Bn(a.o,[{id:0,language:_.Zf,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:_.kg,codecs:"",encrypted:!0,keyId:null,language:_.Zf,originalLanguage:_.Zf,label:null,type:_.w,primary:!1,frameRate:void 0,ji:void 0,
201
+ trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,spatialAudio:!1,Vh:null,closedCaptions:null},bandwidth:100,drmInfos:[],allowedByApplication:!0,allowedByKeySystem:!0}]);yield _.Tn(a.o,a.a);return Promise.resolve()})};Ko=function(a,b){lo(a.a,HTMLMediaElement.HAVE_CURRENT_DATA,a.h,()=>{a.getState()!==_.vo&&a.seek(b).catch(c=>{a.log.warn("Error while seeking to start position.",c)})})};
202
+ Go=function(a){if(null===a.ea||!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,ei:c,message:a.a.error.message})};
203
+ Mo=function(a){if(a.w)return new _.Lo(Eo(),()=>{});const b=a.ea[a.getSourceIndex()],c=a.configuration.startTime||null,d=a.a,e=a.H;c&&Ko(a,c);if(d.preload!==_.Be)a.h.one(d,_.le,()=>{const g=Date.now()/1E3-e;a.f.A=g;a.log.debug("Time to load: ",g)});d.src=b.url;(_.tk()||_.wk())&&d.load();const f=new _.Cn;a.h.one(d,Jf,()=>{const g=a.getConfiguration().manifest.attemptParameters.timeout||30;a.B||(a.B=(new _.pk(()=>{f.reject(new _.I(_.F,3,3100,{message:`Unable to load media source successfully from ${b.url}`,
204
+ uri:b.url},d.error))})).fa(g))});lo(d,a.configuration.forceWaitForTracks?HTMLMediaElement.HAVE_CURRENT_DATA:HTMLMediaElement.HAVE_METADATA,a.h,()=>f.resolve());d.error?f.reject(Go(a)):d.preload===_.Be&&(a.log.warn('With \x3cvideo preload\x3d"none"\x3e, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way. Please do not use preload\x3d"none" with PRESTOplay for Web Apps.'),f.resolve());a.h.one(d,_.r,()=>{f.reject(Go(a))});return new _.Lo(f,
205
+ ()=>{const g=new _.I(_.F,7,7001);f.reject(g);return Promise.resolve()})};No=function(a,b){lo(b,HTMLMediaElement.HAVE_CURRENT_DATA,a.h,()=>{if(a.isLive()&&a.getState()!==_.vo){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)}))}})};
206
+ Oo=function(a,b){let c=!1;a.h.on(b,_.Df,()=>{c=b.paused});a.h.on(b,_.Cf,()=>{.2>b.duration-b.currentTime&&b.paused&&!c&&(a.log.warn("Player was auto-paused during seek to the end, auto-resuming."),b.play())})};_.Ro=function(a){0<=Po.indexOf(a)?Qo.warn(`Factory '${a.name()}' is already registered`):(Po.push(a),Qo.info(`Factory '${a.name()}' has been registered.`))};So=function(a,b){const c=Po.find(d=>d.a(a,b))||null;c&&Qo.info(`Chosen ads manager: ${c.name()}`);return c};
207
+ _.To=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};_.Uo=function(a,b){a.classList.add(b)};_.Vo=function(a,b){if(a&&typeof b===_.Ce)for(const c in b)a.style[c]=b[c]};_.Wo=function(a){return document.createElement(a)};
208
+ Xo=function(a,b){const c=new MutationObserver(()=>{const d=Array.from(a.h.values());Th(Array.from(b.classList),Array.from(d))||b.classList.add(...d)});c.observe(b,{attributes:!0,attributeFilter:["class"]});return c};Yo=function(a,b){a.a&&0!==b.length&&(a.a.classList.add(b),a.h.add(b))};
209
+ Zo=function(a,b,c){(_.wk()&&53===_.xk().major||_.wk()&&68===_.xk().major||_.yk())&&!b.hasAttribute(zd)&&(b.style.opacity="0",b.setAttribute(zd,""),a.j.one(b,Pd,()=>{b.removeAttribute(zd);b.style.opacity="1";c&&(c.style.opacity="1")}))};$o=function(a){if(a.Vb&&0===a.Vb.getDuration()){var b=a.player.getDuration();a.Vb.h=b}a.Gd&&a.Gd()};ap=function(a,b){return _.x(function*(){yield a.release();yield a.load(b)})};
210
+ cp=function(a,b,c){return Array.from({length:2}).map(()=>{var d=document.createElement(_.w);b.appendChild(d);const e=a.va.za.create();d=new bp(d);e.init(d,c);e.setSourceIndex(0);d=d.getContainer();if(!d)throw Error("Failed to create player surface container element");d.classList.add("secondary");a.A.push(d);return e})};dp=function(a){return[a.f,...a.l.a.map(b=>b.player)]};
211
+ 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(id),d.classList.remove("clpp-hide")):(a.g.debug(`Hide video element .${b}`),d.classList.remove(id),d.classList.add("clpp-hide")),a.B&&a.B(d,c))};fp=function(a){return _.x(function*(){const b=a.a;b&&("loaded"!==b.state&&(yield b.Cc),yield b.player.play(),b.state=_.af,$o(b))})};
212
+ gp=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(),Cc:Promise.resolve()})))};hp=function(a,b){0!==a.h.length&&(b?(a.g.info("Remove items",b),a.h=a.h.filter(c=>!b.includes(c.id))):(a.g.info("Remove all items"),a.h=[]))};
213
+ sp=function(a,b,c){return _.x(function*(){if(a.o)a.g.warn(`Cannot ${c} item while busy (ID: ${b})`);else{var d=ip(a,b);if(d){a.g.info(`${c} item (ID: ${b})`);a.o=!0;var e=a.a;e&&(e.player.isPaused()||e.player.pause(),e.player.setMuted(!0));var f=a.j.has(b);f&&a.j.delete(b);try{c===_.Qe?(e&&d.primary?yield jp(a,d):f?yield kp(a,d):yield lp(a,d),$o(d)):f?a.g.error("Loading preloaded items is not supported"):yield mp(a,d);np(a,d);d.player.setMuted(!1);d.Vb&&op(a,d,d.Vb);if(d.qb)d.player.one(_.Td,d.qb);
214
+ d.If&&d.If()}catch(g){throw a.g.error(`Item failed to ${c} (ID: ${b})`),g;}finally{a.o=!1,e&&pp(a,e),qp(a),rp(a,d.next)}}else a.g.warn(`Item not found (ID: ${b})`)}})};ip=function(a,b){return a.h.find(c=>c.id===b)||null};jp=function(a,b){return _.x(function*(){if(b.player){if(b.state===jf){a.g.info("Wait for seek to finish");try{yield b.preloadPromise}catch(c){}}a.a=b;b.role=tp;ep(a,b.player,!0);b.state="loading";yield b.player.play();b.state=_.af}})};
215
+ kp=function(a,b){return _.x(function*(){const c=b.player;if(c){if(b.state===jf){a.g.info(Ub);try{yield b.preloadPromise}catch(d){}}a.a=b;b.role=tp;ep(a,c,!0);b.state===hf?yield c.play():b.state===gf&&(yield ap(c,b.config));b.state=_.af}})};lp=function(a,b){return _.x(function*(){yield mp(a,b);yield b.player.play();b.state=_.af})};
216
+ mp=function(a,b){return _.x(function*(){const c=yield up(a,!!b.primary);a.a=b;b.role=tp;a.a.player=c;a.a.videoEl=c.getSurface().getMedia();ep(a,c,!0);b.state="loading";b.Cc=ap(c,b.config);yield b.Cc;b.state="loaded"})};
217
+ np=function(a,b){const c=b.transition;if(c&&!c.yh){if(c.qb){const d=c.qb,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.qe&&vp(a,b,()=>{const d=a.a.Vb;d&&(a.f.trigger(new _.E(_.sc,{ad:d})),a.f.trigger(new _.E(_.fc,{ad:d})),d.a===d.f&&a.f.trigger(new _.E(_.cc)))});c.yh=!0}};
218
+ op=function(a,b,c){const d=b.player,e=()=>{const l=d.getPosition(),m=c.getDuration();c.j=l;a.f.trigger(new _.E(_.nc,{ad:c}));!c.l&&l>=m/4&&(c.l=!0,a.f.trigger(new _.E(_.gc,{ad:c})));!c.o&&l>=m/2&&(c.o=!0,a.f.trigger(new _.E(_.lc,{ad:c})));!c.w&&l>=3*m/4&&(c.w=!0,a.f.trigger(new _.E(_.tc,{ad:c})))},f=()=>{d.isEnded()||a.f.trigger(new _.E(_.mc,{ad:c}))},g=()=>{a.f.trigger(new _.E(_.oc,{ad:c}))},h=()=>{a.f.trigger(new _.E(_.dc,{ad:c}))},k=()=>{a.f.trigger(new _.E(_.sc,{ad:c}));a.f.trigger(new _.E(_.fc,
219
+ {ad:c}));c.a===c.f&&a.f.trigger(new _.E(_.cc))};d.on(_.Vf,e);d.on(_.Me,f);d.on(_.af,g);d.on(_.Rc,h);d.one(_.Td,k);b.disposers.push(()=>{d.off(_.Vf,e);d.off(_.Me,f);d.off(_.af,g);d.off(_.Rc,h);d.off(_.Td,k)});1===c.a&&a.f.trigger(new _.E(_.bc));a.f.trigger(new _.E(_.jc,{ad:c}));a.f.trigger(new _.E(_.rc,{ad:c}))};
220
+ pp=function(a,b){return _.x(function*(){const c=b.player;b.primary?a.g.info("Pause primary playback"):(a.g.info(`Stop previous playback (ID: ${b.id})`),b.disposers.forEach(d=>d()),b.disposers=[],b.player=null,b.videoEl=null,b.role=wp,yield xp(a,c));ep(a,c,!1)})};qp=function(a){return Promise.all(Array.from(a.j.keys()).map(b=>yp(a,b)))};rp=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=>zp(a,d)))}})};
221
+ Ap=function(a){return a.h.find(b=>!!b.primary)||null};Bp=function(a,b){const c=Ap(a);c?c.Ga=b:a.g.error("Failed to get primary item. Cannot configure resume position.")};Cp=function(a){a.A.forEach(b=>a.w.removeChild(b));a.A=[];ep(a,a.f,!0)};
222
+ vp=function(a,b,c){const d=b.transition.qe;let e=null;d.Ga&&Bp(a,d.Ga);const f=()=>{const k=b.player.getPosition();.5>=d.position-k&&(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=()=>{b.player.off(_.Vf,f)};b.player.on(_.Vf,f);b.disposers.push(()=>{null!=e&&(cancelAnimationFrame(e),
223
+ e=null)});b.disposers.push(h)};Dp=function(a){a.a&&(a.a.disposers.forEach(b=>b()),a.a.disposers=[],a.a.Vb&&op(a,a.a,a.a.Vb),np(a,a.a),qp(a),rp(a,a.a.next))};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 xp(a,c.player)),a.j.delete(b))})};xp=function(a,b){return _.x(function*(){b!==a.f&&(yield a.l.release(b))})};
224
+ up=function(a,b){return _.x(function*(){if(b)return a.f;const c=yield a.l.get();if(!c)throw Error("No player available");return c})};
225
+ zp=function(a,b){return _.x(function*(){if(b.primary){b.state=jf;a.j.set(b.id,b);var c=b.player;b.Ga&&(a.g.info("Preparing to resume at",b.Ga),c.setMuted(!0),yield c.seek(b.Ga));b.state=hf}else{c=b.id;var d=yield up(a,!1);b.player=d;b.videoEl=d.getSurface().getMedia();b.role=wp;b.state=jf;try{a.j.set(c,b),b.config.autoplay&&(a.g.warn(ja+`Force disabling autoplay (ID: ${c})`),b.config.autoplay=!1),b.preloadPromise=ap(d,b.config),yield b.preloadPromise,b.state=hf}catch(e){7001===e.code?(a.g.info(`Preload aborted (ID: ${c})`),
226
+ b.state=ff):(a.g.warn(`Preload failed (ID: ${c})`,e),b.state=gf)}}})};Ep=function(a){return a&&a.ASSETS&&Array.isArray(a.ASSETS)?a.ASSETS.every(b=>typeof b.URI===_.Of&&typeof b.DURATION===_.t):!1};Fp=function(a,b){return a.a.find(c=>1===c.te&&b>c.startTime&&b<c.endTime)||null};Ip=function(a,b){return _.x(function*(){if(!(yield Gp(a,b)))throw Error("Failed to bind");yield Hp(a,b,1,!1)})};
227
+ Qp=function(a,b){const c=()=>_.x(function*(){var e=b.getPosition(),f=Jp(a,e);f&&(a.g.info(`Interstitial ${f.sa} coming up `+`at ${f.startTime} s`),(yield Gp(a,f))&&Kp(a,f,b));if((f=Lp(a))&&f.state===Mp&&b.getDuration()-e<a.va.resolutionOffsetSec&&(yield Gp(a,f)))if(f.Ka&&0!==f.Ka.length){if(e=a.qa.getCurrentItem()){var g=Np(a,f,2),h=g[0].id;e.next=[h];e.transition={qb:h};Op(a,f,g);a.g.info(`Postroll interstitial ${f.sa} scheduled`)}}else a.g.warn("Postroll interstitial has no assets, ignoring.")});
228
+ b.addEventListener(_.Vf,c);a.h.push(()=>{b.removeEventListener(_.Vf,c)});const d=()=>{Pp(a,!1,!0,!0)};b.addEventListener(_.Gh,d);a.h.push(()=>{b.removeEventListener(_.Gh,d)})};Rp=function(a){a.h.forEach(b=>b());a.h=[]};Sp=function(a){return(a=a.qa.getCurrentItem())&&!a.primary?a.player:null};
229
+ Pp=function(a,b,c,d){const e=Tp(a);a.g.info("Interstitial cues found",e);var f=e;if(d){f=Wh(a.a.map(m=>m.sa),e.map(m=>m.id));Up(a,f.uh);const l=new Set(f.jg);f=e.filter(m=>l.has(m.id))}if(!Vp(a,f))return!1;const g=[],h=[],k=[];f.forEach(l=>{const m=l.customAttributes.CUE||[];m.includes(_.tb)?h.push(l):!d&&m.includes("PRE")?g.push(l):!c&&l.startTime<a.va.oh?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]&&Wp(a,g[0],b);k.forEach(l=>
230
+ Xp(a,l,1));1<h.length?a.g.warn("Multiple postroll interstitials not supported. Will display only the 1st one."):h[0]&&Xp(a,h[0],2);a.g.info("Interstitials changed",a.a);return 0<g.length};
231
+ Yp=function(a){_.x(function*(){var b=a.qa;gp(b,[{id:lf,primary:!0,config:b.f.getConfiguration(),next:[]}]);var c=Ap(b);if(!c)throw Error("Failed to find primary item");b.a=c;c.role=tp;c.player=b.f;c.videoEl=c.player.getSurface().getMedia();ep(b,c.player,!0);b=a.f;c=b.getConfiguration();a.j=Pp(a,!c.autoplay,b.isLive(),!1);if(a.j){if(b=a.qa,c=b.l,c=c.a[0]?c.a[0].player:null)ep(b,b.f,!1),ep(b,c,!0)}else c.autoplay&&(yield fp(a.qa))})};
232
+ Tp=function(a){return a.f.getTimelineCues().filter(b=>b.schemeIdUri===_.td&&b.customAttributes)};Up=function(a,b){const c=new Set(b);a.a.forEach(d=>{c.has(d.sa)&&![Mp,Zp].includes(d.state)&&a.g.warn("Removing an interstitial in active state",d)});a.a=a.a.filter(d=>!c.has(d.sa))};
233
+ Vp=function(a,b){const c=b.sort((g,h)=>g.startTime-h.startTime),d=a.va.resolutionOffsetSec,e=[];for(let g=0;g<c.length-1;g++){const h=c[g],k=c[g+1];k&&k.startTime-h.endTime<d&&e.push(`Interstitials ${h.id} and ${k.id} `+`are too close to each other (less than ${d} s).`);k&&k.startTime<=h.endTime&&e.push(`Interstitials ${h.id} and ${k.id} `+"overlap.")}const f=[];b.forEach(g=>{const h=g.customAttributes[_.Zb],k=g.customAttributes[_.$b];g.customAttributes[_.Yb]||h?null!=k&&1>k&&a.g.warn(`Interstitial cue ${g.id} is invalid `+
231
234
  "X-PLAYOUT-LIMIT is less than 1 s.",g):f.push(`Interstitial cue ${g.id} is invalid `+"it contains neither X-ASSET-LIST nor X-ASSET-URI.")});0<f.length?a.g.error("Invalid interstitials, all interstitials will "+`be skipped. ${f.join(" ")}`):0<e.length&&a.g.warn("Unsupported format of interstitials, playback may not "+`behave correctly. ${e.join(" ")}`);return 0===f.length};
232
- Pp=function(a,b,c){_.w(function*(){const d=Qp(a,b,0),e=yield zp(a,d),f=d.Ia?d.Ia.length:0;e&&0<f?(Ap(a,d,0,c),a.g.info(`Preroll interstitial ${d.sa} scheduled`)):(e?a.g.warn("Preroll interstitial has no assets, skipping"):a.g.error("Preroll interstitial failed, skipping"),c||(yield Zo(a.qa)))})};
233
- Qp=function(a,b,c){{const d=b.customAttributes[_.ac];b={sa:b.id,startTime:b.startTime,endTime:b.endTime,state:Fp,Re:b.customAttributes[_.Yb],Se:b.customAttributes[_.Zb],Ia:null,Fa:null==d?null:b.startTime+d,sh:d,If:b.customAttributes[_.$b],te:c}}a.a.push(b);return b};
234
- zp=function(a,b){return _.w(function*(){b.state=Tp;if(b.Re)try{a.g.info(`Load X-ASSET-LIST for ${b.sa}`);a.cb(new _.C(hc));b.Ia=yield Up(a,b.Re);b.Ia&&0!==b.Ia.length||a.g.info(`Interstitial ${b.sa} has no assets, `+"will be smoothly skipped");if(null==b.Fa){const c=si(b.Ia.map(d=>d.DURATION));b.Fa=b.startTime+c}b.state=Vp;a.cb(new _.C(ic))}catch(c){a.g.error("Failed to load X-ASSET-LIST",c),b.state=Wp}else b.Se?(b.Ia=[{URI:b.Se,DURATION:b.endTime-b.startTime}],b.state=Vp):b.state=Wp;return b.state===
235
- Vp})};Ap=function(a,b,c,d){return _.w(function*(){if(a.qa.getCurrentItem()){var e=Gp(a,b,c);Hp(a,b,e);up(a.qa,b.Fa);d?yield a.qa.load(e[0].id):yield a.qa.play(e[0].id)}})};Cp=function(a,b){return a.a.find(c=>{const d=c.startTime-b;return 1===c.te&&[Fp,Sp].includes(c.state)&&0<d&&d<=a.za.resolutionOffsetSec})||null};
236
- Dp=function(a,b,c){if(b.Ia)if(0===b.Ia.length){const g=()=>{c.isLive()?a.g.info("Skipping empty "+`live interstitial ${b.sa}`):null!=b.Fa&&0!==b.sh?c.seek(b.Fa):a.g.info(`Empty VOD interstitial ${b.sa}, `+"continuing to next segment")};c.one(_.Gh,g);a.h.push(()=>{c.off(_.Gh,g)});a.g.info(`Interstitial ${b.sa} scheduled to `+"be skipped")}else{var d=a.qa.getCurrentItem();if(d){var e=Gp(a,b,1),f=e[0].id;up(a.qa,b.Fa);d.next=[f];d.transition={qe:{position:b.startTime,itemId:f,Fa:b.Fa}};Hp(a,b,e);a.g.info(`Interstitial ${b.sa} scheduled for `+
237
- `${b.startTime} s`)}}};Ep=function(a){return a.a.find(b=>2===b.te)||null};Up=function(a,b){return _.w(function*(){var c=a.qa.ud();if(!c)throw Error("No player found");c=c.getNetworkEngine();const d=_.ij(b);c=yield vj(c,d);if(!xp(c))throw new _.$h("Invalid X-ASSET-LIST list response");return Promise.resolve(c.ASSETS)})};
238
- Gp=function(a,b,c){let d=0,e=b.Ia.map((g,h)=>{const k=`${b.sa}-${h}`;d+=g.DURATION;return{id:k,config:{source:{url:g.URI,type:_.hl}},duration:g.DURATION,Mc:d,Ug:b.sa,next:[],Vb:new P(c,h+1,b.Ia.length,g.DURATION)}});e.forEach((g,h)=>{const k=h===e.length-1;k&&2===c||(k?(g.next=[pf],g.transition={pb:pf}):(h=k?pf:`${g.Ug}-${h+1}`,g.next=[h],g.transition={pb:h}))});e.forEach(g=>{g.Gd=()=>{a.g.info(`Playing interstitial asset ${g.id}`,g)}});if(null!=b.If){const g=b.If;a.g.info(`Playout limit for ${b.sa} is `+
239
- `${g} s`);const h=e[e.length-1],k=g-(h.Mc-h.duration);0>=g?e=[]:g<h.Mc?(e=e.filter(l=>l.Mc-l.duration<=g),.1>Math.abs(k-h.duration)?h.transition.pb=pf:h.transition.qe={position:k,itemId:pf}):g>h.Mc&&a.g.info(`Playout limit (${g}) is`+`larger than total duration: (${h.Mc})`)}const f=e[0].Gd;e[0].Gd=()=>{a.g.info(`Playing interstitial ${c} ${b.sa} with `+`${b.Ia.length} assets and will resume primary `+`content at ${b.Fa.toFixed(1)} s.`,e);f()};e[0].Ef=()=>{b.state=Xp};e[e.length-1].pb=()=>{b.state=
240
- Sp;ap(a.qa,e.map(g=>g.id))};return e};Hp=function(a,b,c){$o(a.qa,c);wp(a.qa);b.state=Yp;a.cb(new _.C(_.lc,{detail:null}))};bq=function(a){a.a.on(window,"offline",()=>{Zp(a,!1)});a.a.on(window,"online",()=>{a.f||$p(a)});a.a.on(a.m,Kf,()=>aq(a));a.a.on(a.m,"suspend",()=>aq(a));a.a.on(a.m,_.ug,()=>aq(a));a.a.on(a.m,_.bf,()=>{a.f||$p(a)});a.a.on(a.m,_.qf,()=>{a.f||$p(a)});a.a.on(a.m,_.Mf,()=>{switch(a.m.getState()){case _.ko:aq(a);break;default:aq(a)}})};cq=function(a){a.h&&(a.h.stop(),a.h=null)};
241
- aq=function(a){a.f&&$p(a)};dq=function(a){return _.w(function*(){var b=a.m.getConfiguration().connectivityCheck;b&&a.m&&(b=yield wj(a.j,b.url,b.attemptParameters,b.method),Zp(a,b))})};$p=function(a){a.m.getConfiguration().connectivityCheck&&(cq(a),a.h=(new _.mk(()=>dq(a))).fa(5))};Zp=function(a,b){cq(a);a.f!==b&&(a.f=b,a.m&&a.m.getConfiguration().connectivityCheck&&a.m.trigger(new _.C(Je,{online:a.f})))};fq=function(){for(let a=0;a<eq.length;++a)eq[a].tc()};
242
- _.gq=function(a,b){b=b||0;a={priority:b,tc:a};for(let c=0;c<eq.length;c++)if(eq[c].priority<b){eq.splice(c,0,a);return}eq.push(a)};hq=function(a,b){a.onError(b);a.release().then(()=>a.destroy())};
243
- jq=function(a){var b=iq;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=_.Ii(d),n=_.Ui(e);return h.verify(k,l,n.buffer,m.buffer)}).then(function(l){l?f():g(new _.$h("Signature Verification failed",Zf))}).catch(g)}else f()})};
244
- lq=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 kq(b[0],b[1],b[2]);a.a=b}return a.a};mq=function(a){return _.w(function*(){var b=lq(a);try{yield jq(b)}catch(c){if(c&&c.code===Zf)throw c;{b=window.location.href;const d=new _.ci(b);b=d.rb||d.Ta?d:new _.ci("//"+b)}if(!/(^127\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^192\.168\.)|(^localhost)/.test(b.Ta))throw c;}})};
245
- nq=function(a){switch((a.ea[0]||{src:"",type:""}).type){case _.Ac:a="dash";break;case _.Fc:a="ss";break;case _.hl:a="hls";break;case _.lg:a="mp4";break;default:a=""}return a};oq=function(a){return a.viewerId?a.viewerId:(a=a.drm||null)&&a.customData&&a.customData.userId?`${a.customData.userId}`:""};pq=function(a){return(a=a.drm||null)&&a.customData&&a.customData.assetId?`${a.customData.assetId}`:""};
246
- qq=function(a){return(a=a.drm||null)&&a.customData&&a.customData.sessionId?`${a.customData.sessionId}`:""};rq=function(a){a=a.drmInfo;return(new _.ci(a&&a.licenseServerUri||"")).Ta};sq=function(a){const b=a.configuration;let c="no";b.drm&&!_.Xg(b.drm,{})&&(c="custom",b.drm.env&&b.drm.env.toLowerCase().startsWith(Od)||rq(a).endsWith("drmtoday.com"))&&(c=Od);return c};tq=function(a){a=a.drmInfo;let b="";if(a)switch(a.keySystem){case _.xd:b="wv";break;case _.vd:b="pr";break;case _.sd:b="fps"}return b};
247
- uq=function(a){a=a.drmInfo;let b=!1;a&&(b=a.persistentStateRequired);return b.toString()};vq=function(a){a=a.drmInfo;let b="";if(a)switch(a.videoRobustness){case Xa:case Va:b="L1";break;case Wa:b="L2";break;case _.Gb:case _.Fb:b="L3"}return b};
248
- zq=function(a,b){const c="ie"===_.Ok().browser;var d=b.configuration;const e=[...Array.from(_.rl.keys()),...b.Jf];b={"CL-KEY":a.f,"CL-LOCATION":window.location.href,"CL-SDK-VERSION":_.da,"CL-USER-ID":oq(d),"CL-ASSET-ID":pq(d),"CL-SESSION-ID":qq(d),"CL-PLAYBACK-TYPE":b.isLive?wq:xq,"CL-CONTENT-TYPE":nq(b),"CL-PLUGINS":e.join(" "),"CL-DRM":sq(b),"CL-DRM-CDM":tq(b),"CL-DRM-SEC-LEVEL":vq(b),"CL-DRM-OFFLINE":uq(b),"CL-DRM-IP":rq(b)};c&&(d=window.localStorage.getItem("cl_et"))&&(b["CL-ETAG"]=d);d=_.ij(["https://downloads.castlabs.com/r/register/"]);
249
- d.method="GET";d.headers=b;return(new _.yq).fetch(d).W.then(f=>{200===f.status&&c&&window.localStorage.setItem("cl_et",f.headers.etag);return Promise.resolve()}).catch(f=>{a:{var g=lq(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";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.";
250
- break;default:g=Promise.resolve();break a}a.g.error(bb+k);g=Promise.reject(new _.G(_.E,7,g,k))}}return g})};Dq=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}=Aq(c[e]);Object.keys(Bq).includes(f)&&(d[Bq[f]]=g)}return d}).filter(c=>_.Rg(c));return 0<b.length?b:null}catch(b){return Cq.error("CmsdManager parseCmsdDynamicHeader_ failed:",b),null}};
251
- Aq=function(a){var b=a.split("\x3d");const c=b[0];b=b[1];if(!c)throw new _.$h("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 _.$h(`Parsing CMSD, not recognized value type of ${a}`);};
252
- Fq=function(a){return b=>{{var c=b.headers;let e=b=null;var d=ah(c,"cmsd-dynamic");c=ah(c,"cmsd-static");d&&(b=Dq(d),a.a=b);if(c)try{d={};const f=c.split(",");for(c=0;c<f.length;c++){const {key:g,value:h}=Aq(f[c]);Object.keys(Eq).includes(g)&&(d[Eq[g]]=h)}e=_.Rg(d)?d:null}catch(f){Cq.error("CmsdManager parseCmsdStaticHeader_ failed:",f),e=null}(b||e)&&a.m.trigger(new _.C("cmsd-event",{Zh:b,ji:e}))}}};_.Hq=function(a){a&&(0<=Gq.indexOf(a)||Gq.push(a))};
253
- Jq=function(a){!a.h&&a.A&&a.a&&a.f.ads.hls.enable&&a.getTimelineCues().some(b=>b.schemeIdUri===_.td)&&(a.h=new Iq,a.h.w(a.a,a.A))};Lq=function(a,b){a.F=new Kq(b);mq(a.F).catch(c=>{setTimeout(()=>{a.g.error(bb+c);a.trigger(new _.C(_.Ud,{detail:new _.G(_.E,7,7101)}));a.destroy()},1E3)})};Nq=function(a,b){a.V=b;for(const c of a.V)(b=c.id())&&(a.J[b]=c);_.Mq(a,"onPlayerCreated")};
254
- _.Oq=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))};
255
- Pq=function(a,b){_.w(function*(){a.j.getMedia()||a.j.getCastElement();a.F||(a.F=new Kq(a.f.license));try{a.g.debug("Verifying license remotely"),yield zq(a.F,b),a.g.debug("License verified remotely")}catch(c){a.g.debug("License rejected by remote",c),setTimeout(hq,1E3,{release:a.release.bind(a),destroy:a.destroy.bind(a),onError:a.onError.bind(a)},c)}})};_.Mq=function(a,b,...c){if(!a.X)return Promise.resolve();const d=a.V.map(e=>e[b].call(e,a,...c)).filter(e=>e instanceof Promise);return Promise.all(d)};
256
- Qq=function(a){return _.w(function*(){if(a.O)return a.g.debug("The player is already released. No-op"),new Promise(b=>b());a.Y.off(document,sg);a.trigger(new _.C(_.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 _.Mq(a,_.He).then(()=>{a.a.stopForwardingEventsTo(a);return Promise.all([a.a.release(),a.H.release()])}).then(()=>{a.g.debug("Releasing player completed");b&&(a.g.debug("Re-post state change event after release"),
257
- a.trigger(b))}).finally(()=>{a.a.off(_.Mf,c);a.trigger(new _.C(tf))})}a.trigger(new _.C(tf));return new Promise(b=>b())})};Rq=function(a,b){const c=nh(d=>d.f(_.sb)&&a.every(e=>2===d.canPlay(e,b)));if(!c)throw new _.G(_.E,7,7003,"No compatible player implementing playlist mode found!");return{ya:c,player:c.create(),sourceIndex:0}};
258
- Tq=function(a,b,c){if(a.L===_.sb)b=Rq(b,c);else if(2!==(a.a?a.a.canPlay(b[0],c):0)||a.R){a.R=!1;if(b){var d=a=null;for(var e=0;e<b.length;e++);e=Object.values(_.kh);for(let f=0;f<b.length;f++)for(let g=0;g<e.length;g++){const h={ya: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?(_.lh.debug("Player Factory '"+a.ya.a()+"' can play",b[d]),b=new Sq(a.ya,d)):(_.lh.debug("No compatible Player Factory found for sources:",b),b=null)}else b=
259
- null;if(!b)throw new _.G(_.E,7,7003,"No player factory compatible with given sources found!");c=b.ya;a=c.create();b={ya:c,player:a,sourceIndex:b.sourceIndex}}else b={ya:a.A,player:a.a,sourceIndex:0};return b};
260
- _.Xq=function(a,b,c){return _.w(function*(){if(a.M)throw new _.G(_.E,7,7E3,"Player is already destroyed.");if(!a.j)throw new _.G(_.E,7,7E3,"No surface associated with this player!");_.$m(Xe);yield a.release();var d=c||_.vo(b);if(!b||0===d.length)throw new _.G(_.E,7,7003,mb);a.Z=d;a.f=_.pl(a.C,b,{source:d});a.O=!1;d=Tq(a,d,a.f);_.Oq(a,d.player,d.ya);a.a&&a.a.setSourceIndex(d.sourceIndex);Uq(a);a.a&&a.a.setCdnErrorCallback(a.K);Vq(a,a.f);Wq(a);if(a.f.pauseWhenInBackground)a.Y.on(document,sg,()=>{document.hidden?
261
- (a.g.debug("Player is hidden: pausing..."),a.pause()):(a.g.debug("Player is visible: resuming..."),a.play())});yl(a);yield _.Mq(a,"onContentWillLoad",a.f.source[d.sourceIndex]);_.$m(We);_.an("player.beforeLoad",Xe,We)})};_.Yq=function(a){return _.w(function*(){a.j.getMedia()||a.j.getCastElement();a.trigger(new _.C(re));yield Promise.all([a.a.load(a.f),a.h?a.h.load():Promise.resolve()])})};
262
- _.$q=function(a){return _.w(function*(){_.$m(Te);Pq(a,{configuration:a.getConfiguration(),ea:a.qf(),drmInfo:a.getDrmInfo(),Jf:Object.keys(a.J),isLive:a.isLive()});Zq(a);zl();yield _.Mq(a,"onContentLoaded");a.f.autoplay&&(a.h?a.h.o():1)&&(yield a.play());_.$m(Se);_.an("player.afterLoad",Te,Se)})};ar=function(a){return _.w(function*(){if(a.a){var b=a.a;b.Sf?(a.trigger(new _.C(re)),yield b.Sf(),yield _.$q(a)):a.g.warn(zb)}else a.g.warn(wb)})};
263
- Uq=function(a){a.a&&a.a.setDrmCustomDataModifier(b=>_.w(function*(){a.xc&&a.Vd&&(a.Vd=!1,yield a.xc(b))}))};Vq=function(a,b){if(b=Lo(a,b))a.h=b.create(a)};Wq=function(a){a.B=new br(a);a.a.setCmsdManager(a.B)};
264
- cr=function(a){const b=_.Qh(a.f.preferredTextLanguage).filter(f=>f),c=a.f.preferForcedSubtitles,d=a.getTrackManager().ha().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().la();e&&e.language?(e=_.qi(e.language||""),b.push(e)):(e=a.getTrackManager().Ma())&&e.language&&(e=_.qi(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=>
265
- {const g=_.qi(f);if(f=d.find(h=>{h=_.qi(h.language||"");return _.ri(h,g)}))return a.getTrackManager().Oa(f),!0;c&&a.g.warn("Forced subtitles are configured to be preferred, but no forced subtitles match the preferred languages: ",b);return!1})}};Zq=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);cr(a)})};dr=function(a){a.I.forEach(b=>b());a.I=[]};
266
- gr=function(a,b){return _.w(function*(){try{_.$m(af);a.L=_.sb;a.X=!1;const c=b.slice(1).map(d=>({config:d,ea:_.vo(d)}));yield _.Xq(a,b[0]);c.forEach(d=>{er(a,d.config,d.ea)});a.trigger(new _.C(re));yield a.a.setupPlaylist(b);yield _.$q(a);c.forEach(d=>{fr(a,d.config,d.ea)});_.$m($e);_.an("player.setupPlaylist",af,$e)}catch(c){if(a.l)throw a.g.info(cb),new _.G(_.E,7,7E3);throw c;}})};
267
- hr=function(a,b){const c=d=>{a.G=a.o.findIndex(e=>e.id===d.id)};a.addEventListener(_.Af,c);a.I.push(()=>{a.removeEventListener(_.Af,c)});if(b.endTime){const d=b.endTime,e=()=>{a.getPosition()>=d&&(a.removeEventListener(_.Wf,e),a.g.info("Playlist end time reached. Stopping playback."),a.trigger(new _.C(_.zf)),a.pause())};a.addEventListener(_.Wf,e);a.I.push(()=>{a.removeEventListener(_.Wf,e)})}};
268
- ir=function(a,b){return _.w(function*(){try{_.$m(Ve);const c=_.vo(b);er(a,b,c);yield a.a.appendLoad(b);fr(a,b,c);_.$m(Ue);_.an("player.appendLoad",Ve,Ue)}catch(c){if(a.l)throw a.g.info(cb),new _.G(_.E,7,7E3,{id:b.id});throw c;}})};
269
- er=function(a,b,c){if(0===c.length)throw new _.G(_.E,7,7003,{message:mb,id:b.id});if(1<c.length)throw new _.G(_.E,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 _.G(_.E,7,7003,{message:"Source not supported by the current player!",id:b.id,source:c[0]});};fr=function(a,b,c){Pq(a,{configuration:b,ea:c,drmInfo:a.getDrmInfo(),Jf:Object.keys(a.J),isLive:c[0].isLive})};
270
- jr=function(a,b){const c=document.getElementById(a);if(!c)throw Error("Anchor element not found");c.classList.add(hd);return Array.from({length:3}).map(()=>{const d=document.createElement(_.t);d.classList.add("clpp-mc-playlist-video-el");const e=document.createElement(_.Ed);e.classList.add("clpp-mc-playlist-item");e.appendChild(d);c.appendChild(e);return new Q(d,b)})};
271
- kr=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(id)):(a.g.info(`Hide video element .${b}`),d.classList.remove(id)),a.w&&a.w(d,c))};nr=function(a,b){return _.w(function*(){const c=yield a.o.get();a.f=b;b.role=lr;a.f.player=c;a.f.videoEl=c.getSurface().getMedia();kr(a,c,!0);yield c.load(b.config);mr(a,b);b.config.autoplay||(yield c.play())})};
272
- rr=function(a){_.w(function*(){if(0===a.a)yield or(a);else if(a.a===a.h.length-1)yield pr(a);else{const b=[a.a-1,a.a+1];a.g.info(`Preload items (indices: ${b})`);yield Promise.all(b.map(c=>qr(a,c)))}})};
273
- sr=function(a,b){return _.w(function*(){if(b.player){if(b.state===nf){a.g.info(Ub);try{yield b.preloadPromise}catch(c){}}a.f=b;b.role=lr;kr(a,b.player,!0);b.state===mf?(_.$m(hf),a.za.preloadMedia?yield b.player.play():yield ar(b.player),_.$m(ef),_.an("playlist.next",hf,ef)):b.state===lf&&(yield b.player.load(b.config));mr(a,b);b.config.autoplay||(yield b.player.play())}})};
274
- vr=function(a,b){return _.w(function*(){a.g.info(`Stop current playback (index: ${b.index})`);b.player.pause();kr(a,b.player,!1);yield tr(a,b);b.player=null;b.videoEl=null;b.role=ur})};xr=function(a){return Promise.all(Array.from(a.l.keys()).map(b=>wr(a,b)))};yr=function(a){return _.w(function*(){yield a.o.destroy();const b=document.getElementById(a.za.anchorId);b&&(b.classList.remove(hd),b.innerHTML="")})};
275
- wr=function(a,b){return _.w(function*(){const c=a.l.get(b);c&&(a.g.info(`Stop preloading item (index: ${b})`),c.player&&(yield tr(a,c)),a.l.delete(b))})};tr=function(a,b){return _.w(function*(){b.disposers.forEach(c=>c());b.disposers=[];b.player&&(yield a.o.release(b.player))})};mr=function(a,b){if(a.za.autoplayNext){const c=()=>{a.g.info("Automatically transition to next item");a.Hf()};b.player.on(_.Td,c);const d=b.player;b.disposers.push(()=>{d.off(_.Td,c)})}};
276
- qr=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=ur;d.state=nf;a.trigger(new _.C(bg));try{a.l.set(b,d),a.za.preloadMedia?(d.config.autoplay&&(a.g.warn(ja+`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(bg))}catch(e){7001===e.code?(a.g.info(`Preload aborted (index: ${b})`),d.state=kf):
277
- (a.g.warn(`Preload failed (index: ${b})`,e),a.trigger(new _.C(_.Ud,{detail:e})),d.state=lf),a.trigger(new _.C(bg))}})};or=function(a){return _.w(function*(){const b=a.a+1;a.g.info(`Preload following item (index: ${b})`);yield qr(a,b)})};pr=function(a){return _.w(function*(){const b=a.a-1;a.g.info(`Preload preceding item (index: ${b})`);yield qr(a,b)})};
278
- _.Ar=function(a){if(zr.has(a))return zr.get(a);if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported(a);zr.set(a,b);return b}return window.MediaSource?(b=MediaSource.isTypeSupported(a),zr.set(a,b),b):!1};Br=function(a,b){b=b.replace(/mp2t/i,"mp4");a===_.p&&(b=b.replace(_.t,_.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};
279
- Cr=function(a,b){a.size=void 0===b?0:1;a.g.debug("Setting key status to",b);a.a=b};
280
- Dr=function(a,b){a.f=b;_.ph(a.a);if(!b)return Promise.resolve();a.a.on(b,Rd,c=>{_.ih("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,Ag,c=>{{a.g.debug("Handle webkitNeedKey event");c=_.J(c.initData);if(_.Bi(c).getUint32(0,!0)+4!==c.byteLength)throw new RangeError("Malformed FairPlay init data");c=Gi(c.subarray(4),
281
- !0);c=_.Ii(c);const d=new Event(Rd);d.initDataType="skd";d.initData=Ci(c);a.f.dispatchEvent(d)}});eo(b,HTMLMediaElement.HAVE_METADATA,a.a,()=>b.webkitSetMediaKeys(a.h));return Promise.resolve()};Er=function(a,b){Cr(a.keyStatuses,b);b=new _.C(de);a.dispatchEvent(b)};
282
- Hr=function(a,b){a.a=b;_.ph(a.f);b&&(a.f.on(b,a.h+"needkey",c=>{{const d=new Event(Rd);d.initDataType=_.ad;d.initData=Ci(c.initData);a.a.dispatchEvent(d)}}),a.f.on(b,a.h+"keymessage",c=>{{const e=Fr(a,c.sessionId);if(e){var d=void 0===e.keyStatuses.getStatus();c=new _.C(_.ve,{messageType:d?ge:fe,message:c.message});d=e;_.ih("WebkitEmeManager.MediaKeySession.generated");d.f&&(d.f.resolve(),d.f=null);e.dispatchEvent(c)}else _.jh("Session not found",c.sessionId)}}),a.f.on(b,a.h+"keyadded",c=>{(c=Fr(a,
283
- c.sessionId))&&c.ready()}),a.f.on(b,a.h+"keyerror",c=>{var d=Fr(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?Gr(d,_.Me):1===e?Gr(d,"expired"):Gr(d,_.ce))}}}))};
284
- Fr=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};Gr=function(a,b){Cr(a.keyStatuses,b);b=new _.C(de);a.dispatchEvent(b)};Ir=function(a,b){return a.w?a.w+b.charAt(0).toUpperCase()+b.slice(1):b};
285
- Jr=function(a,b,c){if(a.o)return Promise.reject(Error("The session is already initialized."));a.o=!0;let d;try{if(a.l===_.Pe)if(c)d=_.J(_.Ii("LOAD_SESSION|"+c));else{const f=_.Ii("PERSISTENT|"),g=new Uint8Array(f.byteLength+b.byteLength);g.set(f,0);g.set(_.J(b),f.byteLength);d=g}else d=_.J(b)}catch(f){return Promise.reject(f)}a.f=new _.xn;const e=Ir(a,"generateKeyRequest");try{a.j[e](a.h,d)}catch(f){if(f.name!==$a)return a.f=null,Promise.reject(f);(new _.mk(()=>{try{a.j[e](a.h,d)}catch(g){a.f.reject(g),
286
- a.f=null}})).fa(.01)}return a.f};Kr=function(a,b,c){if(a.a)a.a.then(()=>Kr(a,b,c)).catch(()=>Kr(a,b,c));else{a.a=b;if(a.h===wg){var d=_.Ei(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=_.Ui(e.keys[0].k);e=_.Ui(e.keys[0].kid)}else d=_.J(c),e=null;var f=Ir(a,"addKey");try{a.j[f](a.h,d,e,a.sessionId)}catch(g){a.a.reject(g),a.a=null}}};
287
- Lr=function(a){const b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase();let c;typeof Event===_.Yd?c=new Event(b,a):(c=document.createEvent("Event"),c.initEvent(b,a.bubbles,a.cancelable));a.target.dispatchEvent(c)};Pr=function(a){a=a.target;if(a.webkitPresentationMode===Qe){document.pictureInPictureElement=a;var b=new Event("enterpictureinpicture");a.dispatchEvent(b)}else document.pictureInPictureElement===a&&(document.pictureInPictureElement=null),b=new Event("leavepictureinpicture"),a.dispatchEvent(b)};
288
- Qr=function(){return this.webkitSupportsPresentationMode(Qe)?(this.webkitSetPresentationMode(Qe),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))};Rr=function(){const a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))};
289
- Sr=function(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}};Tr=function(a,b,c){return new window.TextTrackCue(a,b,c)};Ur=function(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)};Wr=function(a,b,c){if("input"===a)switch(this.type){case "range":a=dd}Vr.call(this,a,b,c)};Xr=function(){return window.performance&&window.performance.now?window.performance.now():Date.now()};
290
- Yr=function(a){return Xr()-a.a};$r=function(a){const b=new Zr;b.a=a.a;return b};_.as=function(a){const b=[];for(const c of a)for(const d of c.variants)b.push(d);return b};_.cs=function(a,b,c,d){return _.w(function*(){try{return new (yield bs(a,b,c,d))}catch(e){throw e.a(_.E),e;}})};
291
- bs=function(a,b,c,d){return _.w(function*(){if(d){var e=_.ds[d.toLowerCase()];if(e)return e;_.B("Could not determine manifest type using MIME type ",d)}if(e=_.es(a)){const f=_.fs[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 gs(a,b,c))){if(e=_.ds[d])return e;_.B("Could not determine manifest type using MIME type",d)}throw new _.G(_.E,4,4E3,{url:a});})};
292
- _.es=function(a){a=(new _.ci(a)).Da.split("/").pop().split(".");return 1===a.length?"":a.pop().toLowerCase()};gs=function(a,b,c){return _.w(function*(){var d=_.ij(a);fj(d,c);d.type=1;d.method="HEAD";return(d=(yield b.fetch(d).W).headers["content-type"])?d.toLowerCase():""})};hs=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};
293
- is=function(a,b,c){return b.read().then(({done:d,value:e})=>{null!=e&&(hs(a,e),oj(c,e.byteLength,Yr(a.h)),a.h.a=Xr());return d?(d=a.a.buffer,a.a.byteLength!==a.f&&(d=d.slice(0,a.f)),Promise.resolve(d)):Promise.resolve().then(()=>is(a,b,c))})};
294
- ks=function(a){const b=a.uris[a.uriIndex],c=new js,d=new Zr,e=$r(d);let f=0,g;const h=new _.xn;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=Yr(e));m.readyState>=XMLHttpRequest.HEADERS_RECEIVED&&!k&&(m=m.getResponseHeader(ra),nj(a,m),k=!0)};c.onload=function(m){m=m.target;var n=(m.getAllResponseHeaders()||"").trim().split("\r\n");
295
- const q={};for(const u of n)n=u.split(": "),q[n[0].toLowerCase()]=n.slice(1).join(": ");try{const u=Yr(e);l||oj(a,m.response?m.response.length:0,u);const v=_.mj(q,m.response,m.status,b,m.responseURL,a,u,g);a.rateLimitBps?pj(a.rateLimitBps,Yr(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 _.G(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");
296
- for(var q of n)n=q.split(": "),u[n[0].toLowerCase()]=n.slice(1).join(": ")}q=_.mj(u,m.response,m.status,b,m.responseURL,a,Yr(e),g);h.resolve(q)}};c.ontimeout=function(){h.reject(new _.G(1,1,1003,{url:b,request:a}))};c.onprogress=function(m){const n=Yr(d);d.a=Xr();if(100<n||m.lengthComputable&&m.loaded===m.total)oj(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{W:h,request:a,abort:()=>{c.abort();h.reject(new _.G(1,1,
297
- 7001,{url:b,request:a}));return Promise.resolve()}}};ls=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};ms=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)};
298
- os=function(a){if(0<=a.o&&a.f<a.o)return null;let b=ns(a);for(;null!==b;){if(b.name===_.te){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=ns(a)}return null};
299
- ps=function(a,b,c,d){return b.read().then(e=>{var {done:f,value:g}=e;d&&g&&(d(g.byteLength,Yr(a.w)),a.w.a=Xr());if(f)return e=ls(a),(e=c(!0,e))?e.then(()=>a.j.a.buffer):Promise.resolve(a.j.a.buffer);let h=Promise.resolve();if(null!=g){ms(a,g);var k=os(a);for(e=[];k;)e.push(k),k=os(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=
300
- c(!1,k))&&(h=e)}}return h.then(()=>ps(a,b,c,d))})};
301
- ns=function(a){const b=a.a;if(a.a+4>=a.f)return a.a=a.f,null;var c=qs(a);if(a.a+4>=a.f)return a.a=a.f,null;var d=qs(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 _.G(_.E,3,3E3);}if(2097151<f)throw new _.G(_.E,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};
302
- qs=function(a){const b=a.l.getUint32(a.a,!1);a.a+=4;return b};
303
- ts=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=rs(e.request.baseDelay,1E3));const f=a.f*(1+(2*Math.random()-1)*rs(e.request.fuzzFactor,.5));a.f*=rs(e.request.backoffFactor,2);if(0<f)return(new Promise((g,h)=>{a.l=h;ss(a,()=>{g(e.plugin(e.request))},f)})).catch(g=>{if(!a.a)throw g;})}if(a.a)throw new _.G(1,1,7001,{url:e.request.uris[e.request.uriIndex],request:e.request});return e.plugin(e.request)});
304
- 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.W}).then(e=>{a.w.resolve(e)}).catch(e=>{if(e instanceof _.G){const f=b<d,g=7001!==e.code,h=b<c;if((1===e.severity||f)&&g&&h)return ts(a);g&&e.a(_.E);a.w.reject(e)}else a.w.reject(e)})};ss=function(a,b,c){a.o=setTimeout(b,c)};rs=function(a,b){return null===a||void 0===a?b:a};
305
- xs=function(a){var b=new us;for(const e in a.headers)b.append(e.toLowerCase(),a.headers[e]);const c=new vs,d={Lc:!1,Qf:!1};b={W:ws(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.Lc||(d.Lc=!0,c.abort());return Promise.resolve()}};if(a=a.timeout){const e=window.setTimeout(()=>{d.Qf=!0;c.abort()},a);b.W=b.W.finally(()=>{window.clearTimeout(e)})}return b};
306
- ws=function(a,b,c,d){return _.w(function*(){const e=new Zr,f=$r(e);try{const g=yield ys(a,c),h=gj(g.headers),k={uri:g.url,data:null,headers:h,status:g.status,timeMs:Yr(f),responseStartMs:Yr(e),request:b};if(!jj(g.status))throw k.data=yield g.arrayBuffer(),lj(k);const l=g.headers.get(ra);nj(b,l);const m=l?parseInt(l,10):0;if(b.onFragment&&!b.disableFragmentSupport&&2===b.type){const n=g.body.getReader(),q=new zs(m,!b.disableMergedFragments);k.data=yield ps(q,n,(u,v)=>{if(d.Lc)return null;v&&v.data&&
307
- (oj(b,v.data.byteLength,Yr(e)),e.a=Xr());return b.onFragment&&v?b.rateLimitBps?pj(b.rateLimitBps,Yr(f),b.bytesLoaded).then(()=>b.onFragment(v)):b.onFragment(v):null},b.onProgress)}else{const n=g.body.getReader(),q=yield is(new As(m),n,b);b.rateLimitBps&&(yield pj(b.rateLimitBps,Yr(f),q.byteLength));k.data=q}if(d.Lc)throw Error("Request was aborted");return kj(k)}catch(g){if(d.Lc)throw new _.G(1,1,7001,{url:a,request:b});if(d.Qf)throw new _.G(1,1,1003,{url:a,request:b});if(g&&1001===g.code)throw g;
308
- _.jh("Error while fetching data:",g);throw new _.G(1,1,1002,{url:a,error:g,request:b,status:-1},g);}})};Cs=function(a){try{const b=a.uris[a.uriIndex],c=_.Bs(b);return{W:Promise.resolve({uri:b,data:c.data,request:a,headers:{"content-type":c.contentType}}),request:a,abort:()=>Promise.resolve()}}catch(b){return{W:Promise.reject(b),request:a,abort:()=>Promise.resolve()}}};
309
- _.Bs=function(a){var b=a.split(":");if(2>b.length||"data"!==b[0])throw _.jh("Bad data URI, failed to parse scheme"),new _.G(_.E,1,1004,{uri:a});b=b.slice(1).join(":").split(",");if(2>b.length)throw _.jh("Bad data URI, failed to extract encoding and MIME type"),new _.G(_.E,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?_.Ui(a).buffer:_.Ii(a).buffer,contentType:c}};
310
- _.Es=function(a,b){a=_.gk(_.hk(a),_.ik(a));_.Ds[a]=b};_.Fs=function(a){a=_.gk(_.hk(a),_.ik(a));return _.Ds[a]||null};_.Gs=function(a){a=_.gk(_.hk(a),_.ik(a));delete _.Ds[a]};_.Ls=function(a){if(!a.w)return null;const b=a.H;switch(a.w){case Hs:return`-2px -2px 0 ${b}, -1px -1px 0 ${b}`;case Is:return`2px 2px 0 ${b}, 1px 1px 0 ${b}`;case Js:return`-1px 0 ${b}, 0 1px ${b}, 1px 0 ${b}, `+`0 -1px ${b}`;case Ks:return`2px 2px 3px ${b}, 2px 2px 4px ${b}, `+`2px 2px 5px ${b}`;default:return _.Ce}};
311
- Ig="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this;Jg=typeof Object.defineProperties==_.Yd?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)};
312
- Kg("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=Ig.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=
313
- 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 _.De:var h=null!=g;break a;case _.Yd:h=!0;break a;default:h=!1}h?this.B(g):this.o(g)}};
314
- b.prototype.B=function(g){var h=void 0;try{h=g.then}catch(k){this.h(k);return}typeof h==_.Yd?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();
315
- g.nd(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==_.Yd?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.nd(k(g,l),k(h,m));return n};b.prototype.catch=function(g){return this.then(void 0,g)};b.prototype.nd=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: "+
316
- 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=Hg(g),m=l.next();!m.done;m=l.next())d(m.value).nd(h,k)})};b.all=function(g){var h=Hg(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).nd(n(q.length-1),m),k=h.next();while(!k.done)})};return b});var Mg=this||self;
317
- Mg.a=!0;_.x("clpp.utils.obj.cloneItem",_.Pg);_.x("clpp.utils.obj.merge",_.Og);var eh={DEFAULT:-1,NONE:0,ERROR:1,WARNING:2,INFO:3,DEBUG:4};_.x("clpp.log.Level",eh);var ch=3,bh={},Ms=[];_.x("clpp.log.getLoggers",function(){return _.Pg(bh)});_.x("clpp.log.addInterceptor",function(a){a&&Ms.push(a)});_.x("clpp.log.removeInterceptor",function(a){a&&(a=Ms.indexOf(a),0<=a&&Ms.splice(a,1))});_.x("clpp.log.getTagLevel",dh);_.x("clpp.log.hasTagLevel",function(a){return void 0===a?!1:0<=bh[a]});_.x("clpp.log.setTagLevel",function(a,b){a&&(_.Vg(b)&&(b=fh(b)),bh[a]=b)});
318
- _.x("clpp.log.setLogLevel",function(a){-1===a&&(a=3);_.Vg(a)&&(a=fh(a));ch=a});_.x("clpp.log.getLogLevel",function(){return ch});
319
- _.R=class{constructor(a){(this.tag=a)&&void 0===bh[a]&&(bh[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=dh(this.tag);if(0<=d){if(d<c)return}else if(ch<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,
320
- arguments):2===c?console.warn.apply(console,arguments):1===c?console.error.apply(console,arguments):console.log.apply(console,arguments);for(const e of Ms)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)}sg(a){return a?
321
- this.tag?new _.R(this.tag+"."+a):new _.R(a):this}};_.x("clpp.log.Logger",_.R);_.R.prototype.createChild=_.R.prototype.sg;_.R.prototype.error=_.R.prototype.error;_.R.prototype.warn=_.R.prototype.warn;_.R.prototype.debug=_.R.prototype.debug;_.R.prototype.info=_.R.prototype.info;_.R.prototype.log=_.R.prototype.log;var gh=new _.R("clpp");_.x("clpp.log.info",_.hh);_.x("clpp.log.debug",_.ih);_.x("clpp.log.warn",_.B);_.x("clpp.log.error",_.jh);(function(){const a=console.assert;a?a.bind||(console.assert=function(){a.apply(console,arguments)}):console.assert=function(){}})();var Sq;Sq=class{constructor(a,b){this.ya=a;this.sourceIndex=b}};_.lh=new _.R("clpp.players");_.kh={};_.Ns=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={}}};var Os,Ps;Os=class{constructor(a,b,c,d){this.f=a;this.tc=b;this.a=c;this.ph=!!d}cb(a){try{this.tc.handleEvent?this.tc.handleEvent(a):this.tc.call(this.a,a)}catch(b){_.jh("clpp","Uncaught exception in event handler for event '"+this.f+"'",b,b?b.message:null,b?b.stack:null)}}};
322
- _.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(){}};
323
- Ps=class{constructor(a){this.a=new _.Ns;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].cb(a),b[c].ph&&this.a.remove(a.type,b[c]),!a||!a.f);c++);}on(a,b,c){this.a.push(a,new Os(a,b,c||this.f));return b}one(a,b,c){this.a.push(a,new Os(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].tc===b&&(d=this.a.remove(a,c[e])||d);return d}clear(){this.a.clear()}};var Qs;_.Rs=class{constructor(){this.a=new _.Ns}release(){_.ph(this)}on(a,b,c,d=!1){a=new Qs(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||(oh(f),this.a.remove(b,f))}}};Qs=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 Ss=class{constructor(a){this.m=a;this.l=a.getConfiguration().streaming.addMissingTimelineCues||!1;this.j=new _.Rs;this.f=new Set;this.a=new Set;this.h=null;this.g=new _.R("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)}};_.Zs=class{constructor(a,b,c,d){d=void 0===d?_.Ts:d;this.startTime=a;this.endTime=b;this.payload=c;this.payloadType=d;this.positionAlign=this.position=null;this.size=100;this.textAlign=_.Us;this.writingMode=_.Vs;this.lineInterpretation=_.Ws;this.line=null;this.lineAlign=_.Xs;this.direction=Ys;this.region=null;this.cssClassList=[];this.id=this.backgroundImage="";this.containerRows=null}yc(a){return this.payload===a.payload&&this.startTime===a.startTime&&this.endTime===a.endTime&&this.payloadType===
324
- a.payloadType}};_.x("clpp.text.Cue",_.Zs);_.Zs.positionAlign={LEFT:_.he,RIGHT:_.ie,CENTER:_.bd,AUTO:"auto"};_.Ts="text";_.Zs.payloadType={TEXT:_.Ts,VTT_XML:_.tg,TTML_XML:_.Yf};_.Us=_.bd;_.$s={LEFT:_.ee,RIGHT:_.yf,CENTER:_.Us,START:_.ee,END:_.yf};_.Zs.textAlign=_.$s;var Ys="ltr";_.Zs.direction={HORIZONTAL_LEFT_TO_RIGHT:Ys,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};_.Vs="horizontal-tb";_.Zs.writingMode={HORIZONTAL_TOP_TO_BOTTOM:_.Vs,VERTICAL_LEFT_TO_RIGHT:_.ig,VERTICAL_RIGHT_TO_LEFT:_.jg};_.Ws=0;
325
- _.Zs.lineInterpretation={LINE_NUMBER:_.Ws,PERCENTAGE:1};_.Xs=_.Lf;_.at={CENTER:_.bd,START:_.Xs,END:_.Sd};_.Zs.lineAlign=_.at;_.dt=class{constructor(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=_.bt;this.scroll=ct;this.cssClassList=[];this.writingMode=this.displayAlign=null}};_.x("clpp.text.CueRegion",_.dt);_.bt=1;_.dt.units={PX:0,PERCENTAGE:_.bt,LINES:2};var ct="";
326
- _.dt.scrollMode={NONE:ct,UP:"up"};_.dt.displayAlign={BEFORE:"flex-end",CENTER:_.bd,AFTER:"flex-start"};_.dt.writingMode={HORIZONTAL_TOP_TO_BOTTOM:_.qd,VERTICAL_LEFT_TO_RIGHT:"row-reverse",VERTICAL_RIGHT_TO_LEFT:"row"};var et=class{constructor(a){this.m=a;this.l=a.getTextDisplayer();this.f=this.h=null;this.a=new _.Rs;this.j=!1;this.g=new _.R("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,_.uc,b=>Wh(this,b)),this.a.on(this.f,dd,()=>{{const b=this.f;for(let c=0;c<b.length;c++){const d=b[c];d.mode===_.Ff&&(d.mode=
327
- _.$d)}}}))}o(a){const b=new _.Zs(a.startTime,a.endTime,a.text,_.tg);if(_.Vg(a.vertical))switch(a.vertical){case "lr":b.writingMode=_.ig;break;case "rl":b.writingMode=_.jg}_.Wg(a.size)&&(b.size=a.size);if(_.Vg(a.align))switch(a.align){case _.ee:case _.Lf:b.textAlign=_.ee;break;case _.bd:b.textAlign=_.Us;break;case _.yf:case _.Sd:b.textAlign=_.yf}_.Wg(a.position)&&(b.position=a.position);if(_.Vg(a.positionAlign))switch(a.positionAlign){case _.he:b.positionAlign=_.he;break;case _.bd:b.positionAlign=
328
- _.bd;break;case _.ie:b.positionAlign=_.ie}_.Wg(a.line)&&(b.line=a.line);if(_.Vg(a.lineAlign))switch(a.lineAlign){case _.Lf:b.lineAlign=_.Xs;break;case _.bd:b.lineAlign=_.bd;break;case _.Sd:b.lineAlign=_.Sd}typeof a.snapToLines===_.Pc&&(b.lineInterpretation=a.snapToLines?_.Ws:1);return b}};_.G=class extends Error{constructor(a,b,c,d,e){super(Xh(a,b,c,d));this.severity=a;this.category=b;this.code=c;this.data=!d||_.Vg(d)?{}:d;this.cause=void 0===e?null:e;this.f=!1;Error.captureStackTrace&&Error.captureStackTrace(this,_.G)}a(a){this.severity!==a&&(this.severity=a,this.message=Xh(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",_.G);_.E=2;_.G.Severity={RECOVERABLE:1,FATAL:_.E};
329
- _.G.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,PLUGIN:9,ADS:10};
330
- _.G.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,
235
+ Wp=function(a,b,c){_.x(function*(){const d=Xp(a,b,0),e=yield Gp(a,d),f=d.Ka?d.Ka.length:0;e&&0<f?(Hp(a,d,0,c),a.g.info(`Preroll interstitial ${d.sa} scheduled`)):(e?a.g.warn("Preroll interstitial has no assets, skipping"):a.g.error("Preroll interstitial failed, skipping"),c||(yield fp(a.qa)))})};
236
+ Xp=function(a,b,c){{const d=b.customAttributes[_.ac];b={sa:b.id,startTime:b.startTime,endTime:b.endTime,state:Mp,Ue:b.customAttributes[_.Yb],Ve:b.customAttributes[_.Zb],Ka:null,Ga:null==d?null:b.startTime+d,wh:d,Mf:b.customAttributes[_.$b],te:c}}a.a.push(b);return b};
237
+ Gp=function(a,b){return _.x(function*(){b.state=$p;if(b.Ue)try{a.g.info(`Load X-ASSET-LIST for ${b.sa}`);a.gb(new _.E(hc));b.Ka=yield aq(a,b.Ue);b.Ka&&0!==b.Ka.length||a.g.info(`Interstitial ${b.sa} has no assets, `+"will be smoothly skipped");if(null==b.Ga){const c=ti(b.Ka.map(d=>d.DURATION));b.Ga=b.startTime+c}b.state=bq;a.gb(new _.E(ic))}catch(c){a.g.error("Failed to load X-ASSET-LIST",c),b.state=cq}else b.Ve?(b.Ka=[{URI:b.Ve,DURATION:b.endTime-b.startTime}],b.state=bq):b.state=cq;return b.state===
238
+ bq})};Hp=function(a,b,c,d){return _.x(function*(){if(a.qa.getCurrentItem()){var e=Np(a,b,c);Op(a,b,e);Bp(a.qa,b.Ga);d?yield a.qa.load(e[0].id):yield a.qa.play(e[0].id)}})};Jp=function(a,b){return a.a.find(c=>{const d=c.startTime-b;return 1===c.te&&[Mp,Zp].includes(c.state)&&0<d&&d<=a.va.resolutionOffsetSec})||null};
239
+ Kp=function(a,b,c){if(b.Ka)if(0===b.Ka.length){const g=()=>{c.isLive()?a.g.info("Skipping empty "+`live interstitial ${b.sa}`):null!=b.Ga&&0!==b.wh?c.seek(b.Ga):a.g.info(`Empty VOD interstitial ${b.sa}, `+"continuing to next segment")};c.one(_.Hh,g);a.h.push(()=>{c.off(_.Hh,g)});a.g.info(`Interstitial ${b.sa} scheduled to `+"be skipped")}else{var d=a.qa.getCurrentItem();if(d){var e=Np(a,b,1),f=e[0].id;Bp(a.qa,b.Ga);d.next=[f];d.transition={qe:{position:b.startTime,itemId:f,Ga:b.Ga}};Op(a,b,e);a.g.info(`Interstitial ${b.sa} scheduled for `+
240
+ `${b.startTime} s`)}}};Lp=function(a){return a.a.find(b=>2===b.te)||null};aq=function(a,b){return _.x(function*(){var c=a.qa.sd();if(!c)throw Error("No player found");c=c.getNetworkEngine();const d=_.jj(dq(a,b));c=yield wj(c,d);if(!Ep(c))throw new _.ai("Invalid X-ASSET-LIST list response");return Promise.resolve(c.ASSETS)})};dq=function(a,b){return(a=a.va.nh)?(b=new URL(b),b.searchParams.set("_HLS_primary_id",a),b.toString()):b};
241
+ Np=function(a,b,c){let d=0,e=b.Ka.map((g,h)=>{const k=`${b.sa}-${h}`;d+=g.DURATION;return{id:k,config:{source:{url:dq(a,g.URI),type:_.kl}},duration:g.DURATION,Kc:d,Xg:b.sa,next:[],Vb:new Q(c,h+1,b.Ka.length,g.DURATION)}});e.forEach((g,h)=>{const k=h===e.length-1;k&&2===c||(k?(g.next=[lf],g.transition={qb:lf}):(h=k?lf:`${g.Xg}-${h+1}`,g.next=[h],g.transition={qb:h}))});e.forEach(g=>{g.Gd=()=>{a.g.info(`Playing interstitial asset ${g.id}`,g)}});if(null!=b.Mf){const g=b.Mf;a.g.info(`Playout limit for ${b.sa} is `+
242
+ `${g} s`);const h=e[e.length-1],k=g-(h.Kc-h.duration);0>=g?e=[]:g<h.Kc?(e=e.filter(l=>l.Kc-l.duration<=g),.1>Math.abs(k-h.duration)?h.transition.qb=lf:h.transition.qe={position:k,itemId:lf}):g>h.Kc&&a.g.info(`Playout limit (${g}) is`+`larger than total duration: (${h.Kc})`)}const f=e[0].Gd;e[0].Gd=()=>{a.g.info(`Playing interstitial ${c} ${b.sa} with `+`${b.Ka.length} assets and will resume primary `+`content at ${b.Ga.toFixed(1)} s.`,e);f()};e[0].If=()=>{b.state=eq};e[e.length-1].qb=()=>{b.state=
243
+ Zp;hp(a.qa,e.map(g=>g.id))};return e};Op=function(a,b,c){gp(a.qa,c);Dp(a.qa);b.state=fq;a.gb(new _.E(_.kc,{detail:null}))};gq=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)})}};
244
+ kq=function(a){a.a.on(window,"offline",()=>{hq(a,!1)});a.a.on(window,"online",()=>{a.f||iq(a)});a.a.on(a.m,Jf,()=>jq(a));a.a.on(a.m,"suspend",()=>jq(a));a.a.on(a.m,_.tg,()=>jq(a));a.a.on(a.m,_.af,()=>{a.f||iq(a)});a.a.on(a.m,_.of,()=>{a.f||iq(a)});a.a.on(a.m,_.Lf,()=>{switch(a.m.getState()){case _.ro:jq(a);break;default:jq(a)}})};lq=function(a){a.h&&(a.h.stop(),a.h=null)};jq=function(a){a.f&&iq(a)};
245
+ mq=function(a){return _.x(function*(){var b=a.m.getConfiguration().connectivityCheck;b&&a.m&&(b=yield zj(a.j,b.url,b.attemptParameters,b.method),hq(a,b))})};iq=function(a){a.m.getConfiguration().connectivityCheck&&(lq(a),a.h=(new _.pk(()=>mq(a))).fa(5))};hq=function(a,b){lq(a);a.f!==b&&(a.f=b,a.m&&a.m.getConfiguration().connectivityCheck&&a.m.trigger(new _.E(Ie,{online:a.f})))};oq=function(){for(let a=0;a<nq.length;++a)nq[a].tc()};
246
+ _.pq=function(a,b){b=b||0;a={priority:b,tc:a};for(let c=0;c<nq.length;c++)if(nq[c].priority<b){nq.splice(c,0,a);return}nq.push(a)};qq=function(a,b){a.onError(b);a.release().then(()=>a.destroy())};
247
+ sq=function(a){var b=rq;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=_.Ji(d),n=_.Vi(e);return h.verify(k,l,n.buffer,m.buffer)}).then(function(l){l?f():g(new _.ai("Signature Verification failed",Yf))}).catch(g)}else f()})};
248
+ uq=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 tq(b[0],b[1],b[2]);a.a=b}return a.a};vq=function(a){return _.x(function*(){var b=uq(a);try{yield sq(b)}catch(c){if(c&&c.code===Yf)throw c;{b=window.location.href;const d=new _.di(b);b=d.sb||d.Wa?d:new _.di("//"+b)}if(!/(^127\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^192\.168\.)|(^localhost)/.test(b.Wa))throw c;}})};
249
+ wq=function(a){switch((a.ea[0]||{src:"",type:""}).type){case _.Ac:a="dash";break;case _.Fc:a="ss";break;case _.kl:a="hls";break;case _.kg:a="mp4";break;default:a=""}return a};xq=function(a){return a.viewerId?a.viewerId:(a=a.drm||null)&&a.customData&&a.customData.userId?`${a.customData.userId}`:""};yq=function(a){return(a=a.drm||null)&&a.customData&&a.customData.assetId?`${a.customData.assetId}`:""};
250
+ zq=function(a){return(a=a.drm||null)&&a.customData&&a.customData.sessionId?`${a.customData.sessionId}`:""};Aq=function(a){a=a.drmInfo;return(new _.di(a&&a.licenseServerUri||"")).Wa};Bq=function(a){const b=a.configuration;let c="no";b.drm&&!_.Yg(b.drm,{})&&(c="custom",b.drm.env&&b.drm.env.toLowerCase().startsWith(Od)||Aq(a).endsWith("drmtoday.com"))&&(c=Od);return c};Cq=function(a){a=a.drmInfo;let b="";if(a)switch(a.keySystem){case _.xd:b="wv";break;case _.vd:b="pr";break;case _.sd:b="fps"}return b};
251
+ Dq=function(a){a=a.drmInfo;let b=!1;a&&(b=a.persistentStateRequired);return b.toString()};Eq=function(a){a=a.drmInfo;let b="";if(a)switch(a.videoRobustness){case Xa:case Va:b="L1";break;case Wa:b="L2";break;case _.Gb:case _.Fb:b="L3"}return b};
252
+ Iq=function(a,b){const c="ie"===_.Rk().browser;var d=b.configuration;const e=[...Array.from(_.ul.keys()),...b.Nf];b={"CL-KEY":a.f,"CL-LOCATION":window.location.href,"CL-SDK-VERSION":_.da,"CL-USER-ID":xq(d),"CL-ASSET-ID":yq(d),"CL-SESSION-ID":zq(d),"CL-PLAYBACK-TYPE":b.isLive?Fq:Gq,"CL-CONTENT-TYPE":wq(b),"CL-PLUGINS":e.join(" "),"CL-DRM":Bq(b),"CL-DRM-CDM":Cq(b),"CL-DRM-SEC-LEVEL":Eq(b),"CL-DRM-OFFLINE":Dq(b),"CL-DRM-IP":Aq(b)};c&&(d=window.localStorage.getItem("cl_et"))&&(b["CL-ETAG"]=d);d=_.jj(["https://downloads.castlabs.com/r/register/"]);
253
+ d.method="GET";d.headers=b;return(new _.Hq).fetch(d).W.then(f=>{200===f.status&&c&&window.localStorage.setItem("cl_et",f.headers.etag);return Promise.resolve()}).catch(f=>{a:{var g=uq(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";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.";
254
+ break;default:g=Promise.resolve();break a}a.g.error(bb+k);g=Promise.reject(new _.I(_.F,7,g,k))}}return g})};Mq=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}=Jq(c[e]);Object.keys(Kq).includes(f)&&(d[Kq[f]]=g)}return d}).filter(c=>_.Sg(c));return 0<b.length?b:null}catch(b){return Lq.error("CmsdManager parseCmsdDynamicHeader_ failed:",b),null}};
255
+ Jq=function(a){var b=a.split("\x3d");const c=b[0];b=b[1];if(!c)throw new _.ai("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 _.ai(`Parsing CMSD, not recognized value type of ${a}`);};
256
+ Oq=function(a){return b=>{{var c=b.headers;let e=b=null;var d=bh(c,"cmsd-dynamic");c=bh(c,"cmsd-static");d&&(b=Mq(d),a.a=b);if(c)try{d={};const f=c.split(",");for(c=0;c<f.length;c++){const {key:g,value:h}=Jq(f[c]);Object.keys(Nq).includes(g)&&(d[Nq[g]]=h)}e=_.Sg(d)?d:null}catch(f){Lq.error("CmsdManager parseCmsdStaticHeader_ failed:",f),e=null}(b||e)&&a.m.trigger(new _.E("cmsd-event",{di:b,oi:e}))}}};_.Qq=function(a){a&&(0<=Pq.indexOf(a)||Pq.push(a))};
257
+ Sq=function(a){if(!a.h&&a.A&&a.a&&a.f.ads.hls.enable&&a.getTimelineCues().some(b=>b.schemeIdUri===_.td)){const b=a.f.mse.sendPlaybackSessionIdHeader?a.G:null;a.h=new Rq;a.h.o(a.a,a.A,b)}};Uq=function(a,b){a.F=new Tq(b);vq(a.F).catch(c=>{setTimeout(()=>{a.g.error(bb+c);a.trigger(new _.E(_.r,{detail:new _.I(_.F,7,7101)}));a.destroy()},1E3)})};Wq=function(a,b){a.X=b;for(const c of a.X)(b=c.id())&&(a.K[b]=c);_.Vq(a,"onPlayerCreated")};
258
+ _.Xq=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))};
259
+ Yq=function(a,b){_.x(function*(){a.j.getMedia()||a.j.getCastElement();a.F||(a.F=new Tq(a.f.license));try{a.g.debug("Verifying license remotely"),yield Iq(a.F,b),a.g.debug("License verified remotely")}catch(c){a.g.debug("License rejected by remote",c),setTimeout(qq,1E3,{release:a.release.bind(a),destroy:a.destroy.bind(a),onError:a.onError.bind(a)},c)}})};_.Vq=function(a,b,...c){if(!a.Y)return Promise.resolve();const d=a.X.map(e=>e[b].call(e,a,...c)).filter(e=>e instanceof Promise);return Promise.all(d)};
260
+ Zq=function(a){return _.x(function*(){if(a.R)return a.g.debug("The player is already released. No-op"),new Promise(b=>b());a.Z.off(document,og);a.trigger(new _.E(_.tf));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(_.Lf,d=>{b=d});return _.Vq(a,_.Ge).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"),
261
+ a.trigger(b))}).finally(()=>{a.a.off(_.Lf,c);a.trigger(new _.E(sf))})}a.trigger(new _.E(sf));return new Promise(b=>b())})};$q=function(a){a.G&&(a.g.info("Playback session ended, ID:",a.G),a.G=null,a.a&&a.a.setPlaybackSessionId(null))};ar=function(a,b){const c=oh(d=>d.f(_.sb)&&a.every(e=>2===d.canPlay(e,b)));if(!c)throw new _.I(_.F,7,7003,"No compatible player implementing playlist mode found!");return{za:c,player:c.create(),sourceIndex:0}};
262
+ cr=function(a,b,c){if(a.M===_.sb)b=ar(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(_.lh);for(let f=0;f<b.length;f++)for(let g=0;g<e.length;g++){const h={za: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?(_.mh.debug("Player Factory '"+a.za.a()+"' can play",b[d]),b=new br(a.za,d)):(_.mh.debug("No compatible Player Factory found for sources:",b),b=null)}else b=
263
+ null;if(!b)throw new _.I(_.F,7,7003,"No player factory compatible with given sources found!");c=b.za;a=c.create();b={za:c,player:a,sourceIndex:b.sourceIndex}}else b={za:a.A,player:a.a,sourceIndex:0};return b};
264
+ _.hr=function(a,b,c){return _.x(function*(){if(a.O)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!");_.cn(We);yield a.release();var d=c||_.Co(b);if(!b||0===d.length)throw new _.I(_.F,7,7003,mb);a.ba=d;a.f=_.sl(a.C,b,{source:d});a.R=!1;d=cr(a,d,a.f);_.Xq(a,d.player,d.za);dr(a,a.a);a.a&&a.a.setSourceIndex(d.sourceIndex);er(a);a.a&&a.a.setCdnErrorCallback(a.L);fr(a,a.f);gr(a);if(a.f.pauseWhenInBackground)a.Z.on(document,
265
+ og,()=>{document.hidden?(a.g.debug("Player is hidden: pausing..."),a.pause()):(a.g.debug("Player is visible: resuming..."),a.play())});Bl(a);yield _.Vq(a,"onContentWillLoad",a.f.source[d.sourceIndex]);_.cn(Ve);_.dn("player.beforeLoad",We,Ve)})};_.ir=function(a){return _.x(function*(){a.j.getMedia()||a.j.getCastElement();a.trigger(new _.E(ne));yield Promise.all([a.a.load(a.f),a.h?a.h.load():Promise.resolve()])})};
266
+ _.kr=function(a){return _.x(function*(){_.cn(Se);Yq(a,{configuration:a.getConfiguration(),ea:a.vf(),drmInfo:a.getDrmInfo(),Nf:Object.keys(a.K),isLive:a.isLive()});jr(a);Cl();yield _.Vq(a,"onContentLoaded");a.f.autoplay&&(a.h?a.h.l():1)&&(yield a.play());_.cn(Re);_.dn("player.afterLoad",Se,Re)})};lr=function(a){return _.x(function*(){if(a.a){var b=a.a;b.Wf?(a.trigger(new _.E(ne)),yield b.Wf(),yield _.kr(a)):a.g.warn(zb)}else a.g.warn(vb)})};
267
+ dr=function(a,b){try{var c=crypto.randomUUID()}catch(d){c=gq()}a.g.info("Playback session started, ID:",c);b.setPlaybackSessionId(c);a.G=c};er=function(a){a.a&&a.a.setDrmCustomDataModifier(b=>_.x(function*(){a.xc&&a.Vd&&(a.Vd=!1,yield a.xc(b))}))};fr=function(a,b){if(b=So(a,b))a.h=b.create(a)};gr=function(a){a.B=new mr(a);a.a.setCmsdManager(a.B)};
268
+ nr=function(a){const b=_.Rh(a.f.preferredTextLanguage).filter(f=>f),c=a.f.preferForcedSubtitles,d=a.getTrackManager().ia().filter(f=>c?f.kind===_.Vd:f.kind!==_.Vd);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().ma();e&&e.language?(e=_.ri(e.language||""),b.push(e)):(e=a.getTrackManager().Da())&&e.language&&(e=_.ri(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=>
269
+ {const g=_.ri(f);if(f=d.find(h=>{h=_.ri(h.language||"");return _.si(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})}};jr=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);nr(a)})};or=function(a){a.J.forEach(b=>b());a.J=[]};
270
+ rr=function(a,b){return _.x(function*(){try{_.cn($e);a.M=_.sb;a.Y=!1;const c=b.slice(1).map(d=>({config:d,ea:_.Co(d)}));yield _.hr(a,b[0]);c.forEach(d=>{pr(a,d.config,d.ea)});a.trigger(new _.E(ne));yield a.a.setupPlaylist(b);yield _.kr(a);c.forEach(d=>{qr(a,d.config,d.ea)});_.cn(Ze);_.dn("player.setupPlaylist",$e,Ze)}catch(c){if(a.l)throw a.g.info(cb),new _.I(_.F,7,7E3);throw c;}})};
271
+ sr=function(a,b){const c=d=>{a.H=a.o.findIndex(e=>e.id===d.id)};a.addEventListener(_.zf,c);a.J.push(()=>{a.removeEventListener(_.zf,c)});if(b.endTime){const d=b.endTime,e=()=>{a.getPosition()>=d&&(a.removeEventListener(_.Vf,e),a.g.info("Playlist end time reached. Stopping playback."),a.trigger(new _.E(_.yf)),a.pause())};a.addEventListener(_.Vf,e);a.J.push(()=>{a.removeEventListener(_.Vf,e)})}};
272
+ tr=function(a,b){return _.x(function*(){try{_.cn(Ue);const c=_.Co(b);pr(a,b,c);yield a.a.appendLoad(b);qr(a,b,c);_.cn(Te);_.dn("player.appendLoad",Ue,Te)}catch(c){if(a.l)throw a.g.info(cb),new _.I(_.F,7,7E3,{id:b.id});throw c;}})};
273
+ pr=function(a,b,c){if(0===c.length)throw new _.I(_.F,7,7003,{message:mb,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]});};qr=function(a,b,c){Yq(a,{configuration:b,ea:c,drmInfo:a.getDrmInfo(),Nf:Object.keys(a.K),isLive:c[0].isLive})};
274
+ ur=function(a,b){const c=document.getElementById(a);if(!c)throw Error("Anchor element not found");c.classList.add(hd);return Array.from({length:3}).map(()=>{const d=document.createElement(_.w);d.classList.add("clpp-mc-playlist-video-el");const e=document.createElement(_.Ed);e.classList.add("clpp-mc-playlist-item");e.appendChild(d);c.appendChild(e);return new R(d,b)})};
275
+ vr=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(id)):(a.g.info(`Hide video element .${b}`),d.classList.remove(id)),a.w&&a.w(d,c))};yr=function(a,b){return _.x(function*(){const c=yield a.o.get();a.f=b;b.role=wr;a.f.player=c;a.f.videoEl=c.getSurface().getMedia();vr(a,c,!0);yield c.load(b.config);xr(a,b);b.config.autoplay||(yield c.play())})};
276
+ Cr=function(a){_.x(function*(){if(0===a.a)yield zr(a);else if(a.a===a.h.length-1)yield Ar(a);else{const b=[a.a-1,a.a+1];a.g.info(`Preload items (indices: ${b})`);yield Promise.all(b.map(c=>Br(a,c)))}})};
277
+ Dr=function(a,b){return _.x(function*(){if(b.player){if(b.state===jf){a.g.info(Ub);try{yield b.preloadPromise}catch(c){}}a.f=b;b.role=wr;vr(a,b.player,!0);b.state===hf?(_.cn(ef),a.va.preloadMedia?yield b.player.play():yield lr(b.player),_.cn(df),_.dn("playlist.next",ef,df)):b.state===gf&&(yield b.player.load(b.config));xr(a,b);b.config.autoplay||(yield b.player.play())}})};
278
+ Gr=function(a,b){return _.x(function*(){a.g.info(`Stop current playback (index: ${b.index})`);b.player.pause();vr(a,b.player,!1);yield Er(a,b);b.player=null;b.videoEl=null;b.role=Fr})};Ir=function(a){return Promise.all(Array.from(a.l.keys()).map(b=>Hr(a,b)))};Jr=function(a){return _.x(function*(){yield a.o.destroy();const b=document.getElementById(a.va.anchorId);b&&(b.classList.remove(hd),b.innerHTML="")})};
279
+ Hr=function(a,b){return _.x(function*(){const c=a.l.get(b);c&&(a.g.info(`Stop preloading item (index: ${b})`),c.player&&(yield Er(a,c)),a.l.delete(b))})};Er=function(a,b){return _.x(function*(){b.disposers.forEach(c=>c());b.disposers=[];b.player&&(yield a.o.release(b.player))})};xr=function(a,b){if(a.va.autoplayNext){const c=()=>{a.g.info("Automatically transition to next item");a.Lf()};b.player.on(_.Td,c);const d=b.player;b.disposers.push(()=>{d.off(_.Td,c)})}};
280
+ Br=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=Fr;d.state=jf;a.trigger(new _.E(ag));try{a.l.set(b,d),a.va.preloadMedia?(d.config.autoplay&&(a.g.warn(ja+`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=hf,a.trigger(new _.E(ag))}catch(e){7001===e.code?(a.g.info(`Preload aborted (index: ${b})`),d.state=ff):
281
+ (a.g.warn(`Preload failed (index: ${b})`,e),a.trigger(new _.E(_.r,{detail:e})),d.state=gf),a.trigger(new _.E(ag))}})};zr=function(a){return _.x(function*(){const b=a.a+1;a.g.info(`Preload following item (index: ${b})`);yield Br(a,b)})};Ar=function(a){return _.x(function*(){const b=a.a-1;a.g.info(`Preload preceding item (index: ${b})`);yield Br(a,b)})};
282
+ _.Lr=function(a){if(Kr.has(a))return Kr.get(a);if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported(a);Kr.set(a,b);return b}return window.MediaSource?(b=MediaSource.isTypeSupported(a),Kr.set(a,b),b):!1};Mr=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};
283
+ Nr=function(a,b){a.size=void 0===b?0:1;a.g.debug("Setting key status to",b);a.a=b};
284
+ Or=function(a,b){a.f=b;_.qh(a.a);if(!b)return Promise.resolve();a.a.on(b,Rd,c=>{_.jh("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,zg,c=>{{a.g.debug("Handle webkitNeedKey event");c=_.K(c.initData);if(_.Ci(c).getUint32(0,!0)+4!==c.byteLength)throw new RangeError("Malformed FairPlay init data");c=Hi(c.subarray(4),
285
+ !0);c=_.Ji(c);const d=new Event(Rd);d.initDataType="skd";d.initData=Di(c);a.f.dispatchEvent(d)}});lo(b,HTMLMediaElement.HAVE_METADATA,a.a,()=>b.webkitSetMediaKeys(a.h));return Promise.resolve()};Pr=function(a,b){Nr(a.keyStatuses,b);b=new _.E(ce);a.dispatchEvent(b)};
286
+ Sr=function(a,b){a.a=b;_.qh(a.f);b&&(a.f.on(b,a.h+"needkey",c=>{{const d=new Event(Rd);d.initDataType=_.ad;d.initData=Di(c.initData);a.a.dispatchEvent(d)}}),a.f.on(b,a.h+"keymessage",c=>{{const e=Qr(a,c.sessionId);if(e){var d=void 0===e.keyStatuses.getStatus();c=new _.E(_.ue,{messageType:d?fe:ee,message:c.message});d=e;_.jh("WebkitEmeManager.MediaKeySession.generated");d.f&&(d.f.resolve(),d.f=null);e.dispatchEvent(c)}else _.kh("Session not found",c.sessionId)}}),a.f.on(b,a.h+"keyadded",c=>{(c=Qr(a,
287
+ c.sessionId))&&c.ready()}),a.f.on(b,a.h+"keyerror",c=>{var d=Qr(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?Rr(d,_.Le):1===e?Rr(d,"expired"):Rr(d,_.be))}}}))};
288
+ Qr=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};Rr=function(a,b){Nr(a.keyStatuses,b);b=new _.E(ce);a.dispatchEvent(b)};Tr=function(a,b){return a.w?a.w+b.charAt(0).toUpperCase()+b.slice(1):b};
289
+ Xr=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===_.Oe)if(c)d=_.K(_.Ji("LOAD_SESSION|"+c));else{const f=_.Ji("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 _.Cn;const e=Tr(a,"generateKeyRequest");try{a.j[e](a.h,d)}catch(f){if(f.name!==Za)return a.f=null,Promise.reject(f);(new _.pk(()=>{try{a.j[e](a.h,d)}catch(g){a.f.reject(g),
290
+ a.f=null}})).fa(.01)}return a.f};Yr=function(a,b,c){if(a.a)a.a.then(()=>Yr(a,b,c)).catch(()=>Yr(a,b,c));else{a.a=b;if(a.h===vg){var d=_.Fi(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=_.Vi(e.keys[0].k);e=_.Vi(e.keys[0].kid)}else d=_.K(c),e=null;var f=Tr(a,"addKey");try{a.j[f](a.h,d,e,a.sessionId)}catch(g){a.a.reject(g),a.a=null}}};
291
+ Zr=function(a){const b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase();let c;typeof Event===_.Xd?c=new Event(b,a):(c=document.createEvent("Event"),c.initEvent(b,a.bubbles,a.cancelable));a.target.dispatchEvent(c)};$r=function(a){a=a.target;if(a.webkitPresentationMode===Pe){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)};
292
+ as=function(){return this.webkitSupportsPresentationMode(Pe)?(this.webkitSetPresentationMode(Pe),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))};bs=function(){const a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))};
293
+ cs=function(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}};ds=function(a,b,c){return new window.TextTrackCue(a,b,c)};es=function(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)};gs=function(a,b,c){if("input"===a)switch(this.type){case "range":a=dd}fs.call(this,a,b,c)};hs=function(){return window.performance&&window.performance.now?window.performance.now():Date.now()};
294
+ is=function(a){return hs()-a.a};ks=function(a){const b=new js;b.a=a.a;return b};_.ls=function(a){const b=[];for(const c of a)for(const d of c.variants)b.push(d);return b};_.ns=function(a,b,c,d){return _.x(function*(){try{return new (yield ms(a,b,c,d))}catch(e){throw e.a(_.F),e;}})};
295
+ ms=function(a,b,c,d){return _.x(function*(){if(d){var e=_.os[d.toLowerCase()];if(e)return e;_.C("Could not determine manifest type using MIME type ",d)}if(e=_.ps(a)){const f=_.qs[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 rs(a,b,c))){if(e=_.os[d])return e;_.C("Could not determine manifest type using MIME type",d)}throw new _.I(_.F,4,4E3,{url:a});})};
296
+ _.ps=function(a){a=(new _.di(a)).Ea.split("/").pop().split(".");return 1===a.length?"":a.pop().toLowerCase()};rs=function(a,b,c){return _.x(function*(){var d=_.jj(a);gj(d,c);d.type=1;d.method="HEAD";return(d=(yield b.fetch(d).W).headers["content-type"])?d.toLowerCase():""})};ss=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};
297
+ ts=function(a,b,c){return b.read().then(({done:d,value:e})=>{null!=e&&(ss(a,e),pj(c,e.byteLength,is(a.h)),a.h.a=hs());return d?(d=a.a.buffer,a.a.byteLength!==a.f&&(d=d.slice(0,a.f)),Promise.resolve(d)):Promise.resolve().then(()=>ts(a,b,c))})};
298
+ vs=function(a){const b=a.uris[a.uriIndex],c=new us,d=new js,e=ks(d);let f=0,g;const h=new _.Cn;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=is(e));m.readyState>=XMLHttpRequest.HEADERS_RECEIVED&&!k&&(m=m.getResponseHeader(ra),oj(a,m),k=!0)};c.onload=function(m){m=m.target;var n=(m.getAllResponseHeaders()||"").trim().split("\r\n");
299
+ const q={};for(const u of n)n=u.split(": "),q[n[0].toLowerCase()]=n.slice(1).join(": ");try{const u=is(e);l||pj(a,m.response?m.response.length:0,u);const v=_.nj(q,m.response,m.status,b,m.responseURL,a,u,g);a.rateLimitBps?qj(a.rateLimitBps,is(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");
300
+ for(var q of n)n=q.split(": "),u[n[0].toLowerCase()]=n.slice(1).join(": ")}q=_.nj(u,m.response,m.status,b,m.responseURL,a,is(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=is(d);d.a=hs();if(100<n||m.lengthComputable&&m.loaded===m.total)pj(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{W:h,request:a,abort:()=>{c.abort();h.reject(new _.I(1,1,
301
+ 7001,{url:b,request:a}));return Promise.resolve()}}};ws=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};xs=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)};
302
+ zs=function(a){if(0<=a.o&&a.f<a.o)return null;let b=ys(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=ys(a)}return null};
303
+ As=function(a,b,c,d){return b.read().then(e=>{var {done:f,value:g}=e;d&&g&&(d(g.byteLength,is(a.w)),a.w.a=hs());if(f)return e=ws(a),(e=c(!0,e))?e.then(()=>a.j.a.buffer):Promise.resolve(a.j.a.buffer);let h=Promise.resolve();if(null!=g){xs(a,g);var k=zs(a);for(e=[];k;)e.push(k),k=zs(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=
304
+ c(!1,k))&&(h=e)}}return h.then(()=>As(a,b,c,d))})};
305
+ ys=function(a){const b=a.a;if(a.a+4>=a.f)return a.a=a.f,null;var c=Bs(a);if(a.a+4>=a.f)return a.a=a.f,null;var d=Bs(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};
306
+ Bs=function(a){const b=a.l.getUint32(a.a,!1);a.a+=4;return b};
307
+ Es=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=Cs(e.request.baseDelay,1E3));const f=a.f*(1+(2*Math.random()-1)*Cs(e.request.fuzzFactor,.5));a.f*=Cs(e.request.backoffFactor,2);if(0<f)return(new Promise((g,h)=>{a.l=h;Ds(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)});
308
+ 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.W}).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 Es(a);g&&e.a(_.F);a.w.reject(e)}else a.w.reject(e)})};Ds=function(a,b,c){a.o=setTimeout(b,c)};Cs=function(a,b){return null===a||void 0===a?b:a};
309
+ Is=function(a){var b=new Fs;for(const e in a.headers)b.append(e.toLowerCase(),a.headers[e]);const c=new Gs,d={Jc:!1,Uf:!1};b={W:Hs(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.Jc||(d.Jc=!0,c.abort());return Promise.resolve()}};if(a=a.timeout){const e=window.setTimeout(()=>{d.Uf=!0;c.abort()},a);b.W=b.W.finally(()=>{window.clearTimeout(e)})}return b};
310
+ Hs=function(a,b,c,d){return _.x(function*(){const e=new js,f=ks(e);try{const g=yield Js(a,c),h=hj(g.headers),k={uri:g.url,data:null,headers:h,status:g.status,timeMs:0,responseStartMs:is(f),request:b};if(!kj(g.status))throw k.data=yield g.arrayBuffer(),k.timeMs=is(e),mj(k);const l=g.headers.get(ra);oj(b,l);const m=l?parseInt(l,10):0;if(b.onFragment&&!b.disableFragmentSupport&&2===b.type){const n=g.body.getReader(),q=new Ks(m,!b.disableMergedFragments);k.data=yield As(q,n,(u,v)=>{if(d.Jc)return null;
311
+ v&&v.data&&(pj(b,v.data.byteLength,is(f)),f.a=hs());return b.onFragment&&v?b.rateLimitBps?qj(b.rateLimitBps,is(e),b.bytesLoaded).then(()=>b.onFragment(v)):b.onFragment(v):null},b.onProgress)}else{const n=g.body.getReader(),q=yield ts(new Ls(m),n,b);b.rateLimitBps&&(yield qj(b.rateLimitBps,is(e),q.byteLength));k.data=q}if(d.Jc)throw Error("Request was aborted");k.timeMs=is(e);return lj(k)}catch(g){if(d.Jc)throw new _.I(1,1,7001,{url:a,request:b});if(d.Uf)throw new _.I(1,1,1003,{url:a,request:b});if(g&&
312
+ 1001===g.code)throw g;_.kh("Error while fetching data:",g);throw new _.I(1,1,1002,{url:a,error:g,request:b,status:-1},g);}})};Ns=function(a){try{const b=a.uris[a.uriIndex],c=_.Ms(b);return{W:Promise.resolve({uri:b,data:c.data,request:a,headers:{"content-type":c.contentType}}),request:a,abort:()=>Promise.resolve()}}catch(b){return{W:Promise.reject(b),request:a,abort:()=>Promise.resolve()}}};
313
+ _.Ms=function(a){var b=a.split(":");if(2>b.length||"data"!==b[0])throw _.kh("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 _.kh("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?_.Vi(a).buffer:_.Ji(a).buffer,contentType:c}};
314
+ _.Ps=function(a,b){a=_.jk(_.kk(a),_.lk(a));_.Os[a]=b};_.Qs=function(a){a=_.jk(_.kk(a),_.lk(a));return _.Os[a]||null};_.Rs=function(a){a=_.jk(_.kk(a),_.lk(a));delete _.Os[a]};_.Ws=function(a){if(!a.w)return null;const b=a.H;switch(a.w){case Ss:return`-2px -2px 0 ${b}, -1px -1px 0 ${b}`;case Ts:return`2px 2px 0 ${b}, 1px 1px 0 ${b}`;case Us:return`-1px 0 ${b}, 0 1px ${b}, 1px 0 ${b}, `+`0 -1px ${b}`;case Vs:return`2px 2px 3px ${b}, 2px 2px 4px ${b}, `+`2px 2px 5px ${b}`;default:return _.Be}};
315
+ Jg="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this;Kg=typeof Object.defineProperties==_.Xd?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)};
316
+ Lg("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=Jg.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=
317
+ g[h];g[h]=null;try{k()}catch(l){this.j(l)}}}this.a=null};c.prototype.j=function(g){this.h(function(){throw g;})};b.prototype.j=function(){function g(l){return function(m){k||(k=!0,l.call(h,m))}}var h=this,k=!1;return{resolve:g(this.C),reject:g(this.h)}};b.prototype.C=function(g){if(g===this)this.h(new TypeError("A Promise cannot resolve to itself"));else if(g instanceof b)this.F(g);else{a:switch(typeof g){case _.Ce:var h=null!=g;break a;case _.Xd:h=!0;break a;default:h=!1}h?this.B(g):this.o(g)}};
318
+ b.prototype.B=function(g){var h=void 0;try{h=g.then}catch(k){this.h(k);return}typeof h==_.Xd?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();
319
+ g.ld(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==_.Xd?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.ld(k(g,l),k(h,m));return n};b.prototype.catch=function(g){return this.then(void 0,g)};b.prototype.ld=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: "+
320
+ 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=Ig(g),m=l.next();!m.done;m=l.next())d(m.value).ld(h,k)})};b.all=function(g){var h=Ig(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).ld(n(q.length-1),m),k=h.next();while(!k.done)})};return b});var Ng=this||self;
321
+ Ng.a=!0;_.z("clpp.utils.obj.cloneItem",_.Qg);_.z("clpp.utils.obj.merge",_.Pg);var fh={DEFAULT:-1,NONE:0,ERROR:1,WARNING:2,INFO:3,DEBUG:4};_.z("clpp.log.Level",fh);var dh=3,ch={},Xs=[];_.z("clpp.log.getLoggers",function(){return _.Qg(ch)});_.z("clpp.log.addInterceptor",function(a){a&&Xs.push(a)});_.z("clpp.log.removeInterceptor",function(a){a&&(a=Xs.indexOf(a),0<=a&&Xs.splice(a,1))});_.z("clpp.log.getTagLevel",eh);_.z("clpp.log.hasTagLevel",function(a){return void 0===a?!1:0<=ch[a]});_.z("clpp.log.setTagLevel",function(a,b){a&&(_.Wg(b)&&(b=gh(b)),ch[a]=b)});
322
+ _.z("clpp.log.setLogLevel",function(a){-1===a&&(a=3);_.Wg(a)&&(a=gh(a));dh=a});_.z("clpp.log.getLogLevel",function(){return dh});
323
+ _.S=class{constructor(a){(this.tag=a)&&void 0===ch[a]&&(ch[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=eh(this.tag);if(0<=d){if(d<c)return}else if(dh<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,
324
+ arguments):2===c?console.warn.apply(console,arguments):1===c?console.error.apply(console,arguments):console.log.apply(console,arguments);for(const e of Xs)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)}vg(a){return a?
325
+ this.tag?new _.S(this.tag+"."+a):new _.S(a):this}};_.z("clpp.log.Logger",_.S);_.S.prototype.createChild=_.S.prototype.vg;_.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 hh=new _.S("clpp");_.z("clpp.log.info",_.ih);_.z("clpp.log.debug",_.jh);_.z("clpp.log.warn",_.C);_.z("clpp.log.error",_.kh);(function(){const a=console.assert;a?a.bind||(console.assert=function(){a.apply(console,arguments)}):console.assert=function(){}})();var br;br=class{constructor(a,b){this.za=a;this.sourceIndex=b}};_.mh=new _.S("clpp.players");_.lh={};_.Ys=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={}}};var Zs,$s;Zs=class{constructor(a,b,c,d){this.f=a;this.tc=b;this.a=c;this.th=!!d}gb(a){try{this.tc.handleEvent?this.tc.handleEvent(a):this.tc.call(this.a,a)}catch(b){_.kh("clpp","Uncaught exception in event handler for event '"+this.f+"'",b,b?b.message:null,b?b.stack:null)}}};
326
+ _.E=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(){}};
327
+ $s=class{constructor(a){this.a=new _.Ys;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].gb(a),b[c].th&&this.a.remove(a.type,b[c]),!a||!a.f);c++);}on(a,b,c){this.a.push(a,new Zs(a,b,c||this.f));return b}one(a,b,c){this.a.push(a,new Zs(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].tc===b&&(d=this.a.remove(a,c[e])||d);return d}clear(){this.a.clear()}};var at;_.bt=class{constructor(){this.a=new _.Ys}release(){_.qh(this)}on(a,b,c,d=!1){a=new at(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||(ph(f),this.a.remove(b,f))}}};at=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 ct=class{constructor(a){this.m=a;this.l=a.getConfiguration().streaming.addMissingTimelineCues||!1;this.j=new _.bt;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 _.x(function*(){a.release()})}getTimelineCues(){return Array.from(this.a.values()).sort((a,b)=>a.startTime-b.startTime)}};_.jt=class{constructor(a,b,c,d){d=void 0===d?_.dt:d;this.startTime=a;this.endTime=b;this.payload=c;this.payloadType=d;this.positionAlign=this.position=null;this.size=100;this.textAlign=_.et;this.writingMode=_.ft;this.lineInterpretation=_.gt;this.line=null;this.lineAlign=_.ht;this.direction=it;this.region=null;this.cssClassList=[];this.id=this.backgroundImage="";this.containerRows=null}yc(a){return this.payload===a.payload&&this.startTime===a.startTime&&this.endTime===a.endTime&&this.payloadType===
328
+ a.payloadType}};_.z("clpp.text.Cue",_.jt);_.jt.positionAlign={LEFT:_.ge,RIGHT:_.he,CENTER:_.bd,AUTO:"auto"};_.dt="text";_.jt.payloadType={TEXT:_.dt,VTT_XML:_.pg,TTML_XML:_.Xf};_.et=_.bd;_.kt={LEFT:_.de,RIGHT:_.xf,CENTER:_.et,START:_.de,END:_.xf};_.jt.textAlign=_.kt;var it="ltr";_.jt.direction={HORIZONTAL_LEFT_TO_RIGHT:it,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};_.ft="horizontal-tb";_.jt.writingMode={HORIZONTAL_TOP_TO_BOTTOM:_.ft,VERTICAL_LEFT_TO_RIGHT:_.hg,VERTICAL_RIGHT_TO_LEFT:_.ig};_.gt=0;
329
+ _.jt.lineInterpretation={LINE_NUMBER:_.gt,PERCENTAGE:1};_.ht=_.Kf;_.lt={CENTER:_.bd,START:_.ht,END:_.Sd};_.jt.lineAlign=_.lt;_.ot=class{constructor(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=_.mt;this.scroll=nt;this.cssClassList=[];this.writingMode=this.displayAlign=null}};_.z("clpp.text.CueRegion",_.ot);_.mt=1;_.ot.units={PX:0,PERCENTAGE:_.mt,LINES:2};var nt="";
330
+ _.ot.scrollMode={NONE:nt,UP:"up"};_.ot.displayAlign={BEFORE:"flex-end",CENTER:_.bd,AFTER:"flex-start"};_.ot.writingMode={HORIZONTAL_TOP_TO_BOTTOM:_.qd,VERTICAL_LEFT_TO_RIGHT:"row-reverse",VERTICAL_RIGHT_TO_LEFT:"row"};var pt=class{constructor(a){this.m=a;this.l=a.getTextDisplayer();this.f=this.h=null;this.a=new _.bt;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,_.uc,b=>Xh(this,b)),this.a.on(this.f,dd,()=>{{const b=this.f;for(let c=0;c<b.length;c++){const d=b[c];d.mode===_.Ef&&(d.mode=
331
+ _.Zd)}}}))}o(a){const b=new _.jt(a.startTime,a.endTime,a.text,_.pg);if(_.Wg(a.vertical))switch(a.vertical){case "lr":b.writingMode=_.hg;break;case "rl":b.writingMode=_.ig}_.Xg(a.size)&&(b.size=a.size);if(_.Wg(a.align))switch(a.align){case _.de:case _.Kf:b.textAlign=_.de;break;case _.bd:b.textAlign=_.et;break;case _.xf:case _.Sd:b.textAlign=_.xf}_.Xg(a.position)&&(b.position=a.position);if(_.Wg(a.positionAlign))switch(a.positionAlign){case _.ge:b.positionAlign=_.ge;break;case _.bd:b.positionAlign=
332
+ _.bd;break;case _.he:b.positionAlign=_.he}_.Xg(a.line)&&(b.line=a.line);if(_.Wg(a.lineAlign))switch(a.lineAlign){case _.Kf:b.lineAlign=_.ht;break;case _.bd:b.lineAlign=_.bd;break;case _.Sd:b.lineAlign=_.Sd}typeof a.snapToLines===_.Pc&&(b.lineInterpretation=a.snapToLines?_.gt:1);return b}};_.I=class extends Error{constructor(a,b,c,d,e){super(Yh(a,b,c,d));this.severity=a;this.category=b;this.code=c;this.data=!d||_.Wg(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=Yh(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);_.F=2;_.I.Severity={RECOVERABLE:1,FATAL:_.F};
333
+ _.I.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,PLUGIN:9,ADS:10};
334
+ _.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,
331
335
  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,
332
336
  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,
333
337
  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,
@@ -336,65 +340,64 @@ HLS_INVALID_VALUE:4044,HLS_DISCONTINUITY_NOT_SUPPORTED:4045,HLS_UNSUPPORTED_FEAT
336
340
  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,
337
341
  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,
338
342
  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,
339
- SESSIONS_INVALID_CONFIGURATION:15E3};_.$h=class extends Error{constructor(a,b){super(a);this.code=b}};var hi=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;Fg=_.ci.prototype;Fg.rb="";Fg.pc="";Fg.Ta="";Fg.Ic=null;Fg.Da="";Fg.ic="";Fg.toString=function(){var a=[],b=this.rb;b&&a.push(ki(b,ft,!0),":");if(b=this.Ta){a.push("//");var c=this.pc;c&&a.push(ki(c,ft,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Ic;null!=b&&a.push(":",String(b))}if(b=this.Da)this.Ta&&"/"!=b.charAt(0)&&a.push("/"),a.push(ki(b,"/"==b.charAt(0)?gt:ht,!0));(b=this.a.toString())&&a.push("?",b);(b=this.ic)&&a.push("#",ki(b,it));return a.join("")};
340
- Fg.resolve=function(a){var b=new _.ci(this);"data"===b.rb&&(b=new _.ci);var c=!!a.rb;c?di(b,a.rb):c=!!a.pc;c?b.pc=a.pc:c=!!a.Ta;c?b.Ta=a.Ta:c=null!=a.Ic;var d=a.Da;if(c)ei(b,a.Ic);else if(c=!!a.Da){if("/"!=d.charAt(0))if(this.Ta&&!this.Da)d="/"+d;else{var e=b.Da.lastIndexOf("/");-1!=e&&(d=b.Da.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(""):
341
- ".."==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.Da=d:c=""!==a.a.toString();c?_.fi(b,gi(a.a)):c=!!a.ic;c&&(b.ic=a.ic);return b};var ft=/[#\/\?@]/g,ht=/[#\?:]/g,gt=/[#\?]/g,li=/[#\?@]/g,it=/#/g;_.ji.prototype.a=null;_.ji.prototype.h=null;
342
- _.ji.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};
343
- _.ji.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 ni;_.F="text";_.jt=1/15;ni={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/]};ni[_.F]=[/^vtt$/,/^wvtt/,/^stpp/];var kt;kt={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av0?1/],text:[/^vtt$/,/^wvtt/,/^stpp/]};_.Sj=(a,b)=>{const c=kt[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===_.F?"":null};_.lt={text:{mp4:Bc,m4s:Bc,m4i:Bc,cmft:Bc,vtt:_.Uf,ttml:_.Ec},video:{mp4:_.lg,m4s:_.lg,m4i:_.lg,m4v:_.lg,cmfv:_.lg,ts:_.kg},audio:{mp4:_.Kc,m4s:_.Kc,m4i:_.Kc,m4a:_.Kc,cmfa:_.Kc,ts:_.kg,aac:_.Hc,ec3:_.Jc,ac3:_.Ic},image:{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}};_.Vj=(a,b,c)=>a.map(d=>{d=_.mt(d)||"";return d=(d=_.lt[b][d])?d:b===_.F?c&&"vtt"!==c?Bc:_.Uf:null}).filter(Boolean)[0]||null;
344
- _.mt=a=>{a=(new _.ci(a)).Da.split(".");return 1>=a.length?null:a.pop()};_.bj=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}};_.aj=class{constructor(a,b){this.name=a;this.value=b}};var pi=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",
343
+ SESSIONS_INVALID_CONFIGURATION:15E3};_.ai=class extends Error{constructor(a,b){super(a);this.code=b}};var ii=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;Gg=_.di.prototype;Gg.sb="";Gg.pc="";Gg.Wa="";Gg.Gc=null;Gg.Ea="";Gg.ic="";Gg.toString=function(){var a=[],b=this.sb;b&&a.push(li(b,qt,!0),":");if(b=this.Wa){a.push("//");var c=this.pc;c&&a.push(li(c,qt,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Gc;null!=b&&a.push(":",String(b))}if(b=this.Ea)this.Wa&&"/"!=b.charAt(0)&&a.push("/"),a.push(li(b,"/"==b.charAt(0)?rt:st,!0));(b=this.a.toString())&&a.push("?",b);(b=this.ic)&&a.push("#",li(b,tt));return a.join("")};
344
+ Gg.resolve=function(a){var b=new _.di(this);"data"===b.sb&&(b=new _.di);var c=!!a.sb;c?ei(b,a.sb):c=!!a.pc;c?b.pc=a.pc:c=!!a.Wa;c?b.Wa=a.Wa:c=null!=a.Gc;var d=a.Ea;if(c)fi(b,a.Gc);else if(c=!!a.Ea){if("/"!=d.charAt(0))if(this.Wa&&!this.Ea)d="/"+d;else{var e=b.Ea.lastIndexOf("/");-1!=e&&(d=b.Ea.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(""):
345
+ ".."==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.Ea=d:c=""!==a.a.toString();c?_.gi(b,hi(a.a)):c=!!a.ic;c&&(b.ic=a.ic);return b};var qt=/[#\/\?@]/g,st=/[#\?:]/g,rt=/[#\?]/g,mi=/[#\?@]/g,tt=/#/g;_.ki.prototype.a=null;_.ki.prototype.h=null;
346
+ _.ki.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};
347
+ _.ki.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 oi;_.G="text";_.ut=1/15;oi={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/]};oi[_.G]=[/^vtt$/,/^wvtt/,/^stpp/];var vt;vt={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av0?1/],text:[/^vtt$/,/^wvtt/,/^stpp/]};_.Vj=(a,b)=>{const c=vt[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===_.G?"":null};_.wt={text:{mp4:Bc,m4s:Bc,m4i:Bc,cmft:Bc,vtt:_.Tf,ttml:_.Ec},video:{mp4:_.kg,m4s:_.kg,m4i:_.kg,m4v:_.kg,cmfv:_.kg,ts:_.jg},audio:{mp4:_.Kc,m4s:_.Kc,m4i:_.Kc,m4a:_.Kc,cmfa:_.Kc,ts:_.jg,aac:_.Hc,ec3:_.Jc,ac3:_.Ic},image:{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}};_.Yj=(a,b,c)=>a.map(d=>{d=_.xt(d)||"";return d=(d=_.wt[b][d])?d:b===_.G?c&&"vtt"!==c?Bc:_.Tf:null}).filter(Boolean)[0]||null;
348
+ _.xt=a=>{a=(new _.di(a)).Ea.split(".");return 1>=a.length?null:a.pop()};_.cj=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}};_.bj=class{constructor(a,b){this.name=a;this.value=b}};var qi=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",
345
349
  "cs"],["dan","da"],["deu","de"],[_.Ed,"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",
346
350
  "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",
347
351
  "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",
348
352
  "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",
349
- "vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);var nt=class{};_.x("clpp.utils.BufferUtils",nt);nt.toArrayBuffer=Ci;nt.toDataView=_.Bi;nt.toInt32Array=_.Ai;nt.toUint32Array=zi;nt.toUint16Array=yi;nt.toUint8Array=_.J;nt.equal=wi;var Fi=new _.R("clpp.utils.strings");_.x("clpp.utils.strings.fromUtf8",_.Ei);_.x("clpp.utils.strings.fromBytesAutoDetect",_.Hi);_.x("clpp.utils.strings.toUtf8",_.Ii);_.x("clpp.utils.strings.toUtf16",_.Ji);_.x("clpp.utils.strings.toByteArray",_.Ki);_.x("clpp.utils.strings.startsWith",_.Li);_.x("clpp.utils.strings.endsWith",_.Mi);_.x("clpp.utils.strings.bitrateToString",_.Pi);
350
- _.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)))});
351
- _.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 Qi=document.createElement("span");var ot=class{};_.x("clpp.utils.Uint8ArrayUtils",ot);ot.toStandardBase64=_.Si;ot.concat=_.Yi;ot.equal=_.Xi;ot.toHex=_.Wi;ot.fromHex=_.Vi;ot.fromBase64=_.Ui;ot.toBase64Url=_.Ti;_.pt=new _.R("clpp.hls.Utils");_.$i=class{constructor(a){this.f=a;this.a=0}};_.qt=new Set([_.Da,_.Ea,"EXT-X-I-FRAMES-ONLY",_.Ha,_.Ia,_.Ja,_.Na,_.Oa]);_.rt=new Set(["EXTINF",_.za,_.Ca,_.Fa,_.Ga,_.Ma]);_.st=new Set(["EXT-X-PART",_.La]);_.tt=new Set([_.Ba]);var dj=[403,401];_.x("clpp.net.DEFAULT_FATAL_STATUS_CODES",dj);_.x("clpp.net.makeRequest",_.ij);_.hj=6;_.x("clpp.net.RequestType",{MANIFEST:1,SEGMENT:2,LICENSE:3,APP:4,TIMING:5,OTHER:_.hj});_.xn=class{constructor(){this.Lf=this.Jd=this.done=!1;this.error=this.value=null;let a,b;const c=new Promise((d,e)=>{a=function(f){this.done=this.Jd=!0;this.value=f;d(f)};b=function(f){this.done=this.Lf=!0;this.error=f;e(f)}});c.Jd=!1;c.done=!1;c.Lf=!1;c.value=null;c.error=null;c.resolve=a;c.reject=b;return c}resolve(){}reject(){}};_.Eo=class{constructor(a,b){this.W=a;this.A=b;this.a=!1}abort(){this.a=!0;return this.A()}};_.ut=class{constructor(){this.a=[]}destroy(){const a=[];for(const b of this.a)b.W.catch(()=>{}),a.push(b.abort());this.a=[];return Promise.all(a)}};_.yq=class{constructor(){this.f=[];this.h=[];this.j=[];this.w=!1;this.o=new _.ut;this.a={};this.l=0;this.a.data=Cs;!window.fetch||!window.AbortController||_.qk(6)||_.tk()&&68<_.Ok().browserVersion.major?(this.a.http=ks,this.a.https=ks):(this.a.http=xs,this.a.https=xs)}Ah(a){0<a?_.B("Rate limit set to "+a+"bps"):_.B("Rate limit disabled");this.l=a}release(){return this.o.destroy()}destroy(){this.w=!0;this.f=[];this.h=[];return this.o.destroy()}Od(a){this.f.push(a)}sc(a){this.h.push(a)}ze(a){this.f=
352
- this.f.filter(b=>b!==a)}ed(a){this.h=this.h.filter(b=>b!==a)}fetch(a){if(this.w)return new vt(Promise.reject(new _.G(1,1,7001,{url:a.uris[a.uriIndex],request:a})));this.l&&0<this.l&&(a.rateLimitBps=this.l);var b=[];for(const f of this.f)b.push(f);if(a.requestModifiers)for(const f of a.requestModifiers)b.push(f);a.requestModifiers=b;b=[];for(var c of this.h)b.push(c);if(a.responseModifiers)for(var d of a.responseModifiers)b.push(d);a.responseModifiers=b;let e;d=c=new _.xn;try{for(const f of a.requestModifiers)d=
353
- d.then(g=>{if(e.a)throw new _.G(_.E,1,7001,g?{url:g.uris[g.uriIndex],request:g}:null);return f(g)||g}).catch(g=>{if(g instanceof _.G)throw g;throw new _.G(_.E,1,1006,null,g);});d=d.then(f=>{var g=new _.ci(f.uris[f.uriIndex]);var h=g.rb;h||(h=location.protocol,h=h.slice(0,-1),di(g,h),f.uris[f.uriIndex]=g.toString());h=this.a[h];if(!h)throw new _.G(_.E,1,1E3,{url:g.toString()});g=h;return{request:f,plugin:g}});e=new vt(d);for(const f of a.responseModifiers)e.then(g=>{const h=()=>{if(e.a)throw new _.G(_.E,
354
- 1,7001,g?{url:g.request.uris[g.request.uriIndex],request:g.request}:null);};h();const k=f(g)||g;h();return k}).catch(g=>{if(g instanceof _.G&&g.data&&g.data.response){const h=f(g.data.response);if(h&&h.then)return h.then(()=>Promise.reject(g))}return Promise.reject(g)}).catch(g=>{if(g instanceof _.G)throw g;throw new _.G(_.E,1,1007,null,g);});for(const f of this.j)e.catch(g=>{g instanceof _.G&&g.data&&g.data.response||f({uri:a.uris[a.uriIndex],data:(new Uint8Array(0)).buffer,status:-1,timeMs:0,headers:{},
355
- request:a});return Promise.reject(g)}).catch(g=>{if(g instanceof _.G)throw g;throw new _.G(_.E,1,1007,null,g);});_.tj(this.o,e);c.resolve(a);return e}catch(f){return new vt(Promise.reject(f))}}};_.x("clpp.net.NetworkEngine",_.yq);_.yq.prototype.fetch=_.yq.prototype.fetch;_.yq.prototype.removeResponseModifier=_.yq.prototype.ed;_.yq.prototype.removeRequestModifier=_.yq.prototype.ze;_.yq.prototype.addResponseModifier=_.yq.prototype.sc;_.yq.prototype.addRequestModifier=_.yq.prototype.Od;
356
- _.yq.prototype.setRateLimit=_.yq.prototype.Ah;var zj;
357
- _.Cj=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=[]}yc(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&&Th(this.roles,
358
- a.roles)&&Th(this.accessibility,a.accessibility,xj)}toString(){return`Track type: ${this.type} id: ${this.id}
359
- renditions size: ${this.renditions.length}`}};_.x("clpp.Track",_.Cj);_.Cj.prototype.toString=_.Cj.prototype.toString;_.Kj=class{constructor(a,b){this.track=b;this.id=a;this.originalId=this.codec=this.Kc=this.bandwidth=this.height=this.width=null}};_.x("clpp.Rendition",_.Kj);_.Bj=1;_.M=_.t;_.L=_.p;_.K="text";zj=_.we;_.wt={VIDEO:_.M,AUDIO:_.L,TEXT:_.K,METADATA:zj};_.Cj.Type=_.wt;_.cm=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;
360
- _.Li(this.path,"/")||(this.path="/"+this.path);this.f=b.search;this.h=b.hash}};_.x("clpp.utils.url.queryString",_.Fj);var xt=class{constructor(a){this.f=a;this.g=new _.R("clpp.native.hls.HlsMetadataParser");this.a=Yh(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 Ij(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 Mj(c,d,
361
- 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 Oj(d);e.Fc=f}catch(f){c.g.warn("Failed to parse metadata from HLS playlist.",f.message)}return e})}};_.Wj=[];_.S=class{Sd(){return!0}Bg(a){return this.getVideoTracks().find(b=>_.Xg(b,a,a&&Object.keys(a)))}xg(a){return this.getAudioTracks().find(b=>_.Xg(b,a,a&&Object.keys(a)))}zg(a){return this.ha().find(b=>_.Xg(b,a,a&&Object.keys(a)))}Ag(a){return this.getVideoTracks().flatMap(b=>b.renditions).find(b=>_.Xg(b,a,a&&Object.keys(a)))}wg(a){return this.getAudioTracks().flatMap(b=>b.renditions).find(b=>_.Xg(b,a,a&&Object.keys(a)))}yg(a){return this.ha().flatMap(b=>b.renditions).find(b=>_.Xg(b,a,a&&Object.keys(a)))}};
362
- _.x("clpp.TrackManager",_.S);_.S.prototype.isAbrEnabled=_.S.prototype.pa;_.S.prototype.addTextTrack=_.S.prototype.addTextTrack;_.S.prototype.findTextRendition=_.S.prototype.yg;_.S.prototype.findAudioRendition=_.S.prototype.wg;_.S.prototype.findVideoRendition=_.S.prototype.Ag;_.S.prototype.findTextTrack=_.S.prototype.zg;_.S.prototype.findAudioTrack=_.S.prototype.xg;_.S.prototype.findVideoTrack=_.S.prototype.Bg;_.S.prototype.setTextRendition=_.S.prototype.tb;_.S.prototype.setAudioRendition=_.S.prototype.sb;
363
- _.S.prototype.setVideoRendition=_.S.prototype.ab;_.S.prototype.setTextTrack=_.S.prototype.Oa;_.S.prototype.setAudioTrack=_.S.prototype.va;_.S.prototype.setVideoTrack=_.S.prototype.ub;_.S.prototype.getTextTrack=_.S.prototype.ta;_.S.prototype.getAudioTrack=_.S.prototype.la;_.S.prototype.getVideoTrack=_.S.prototype.Ma;_.S.prototype.getLoadingTextRendition=_.S.prototype.Ab;_.S.prototype.getLoadingAudioRendition=_.S.prototype.zb;_.S.prototype.getLoadingVideoRendition=_.S.prototype.jb;
364
- _.S.prototype.getTextRendition=_.S.prototype.La;_.S.prototype.getAudioRendition=_.S.prototype.Ua;_.S.prototype.getVideoRendition=_.S.prototype.ma;_.S.prototype.getTextTracks=_.S.prototype.ha;_.S.prototype.getAudioTracks=_.S.prototype.getAudioTracks;_.S.prototype.getVideoTracks=_.S.prototype.getVideoTracks;_.S.prototype.canSelectVideoTracks=_.S.prototype.Sd;var ak=new Map,Zj=1,ek=2,dk=3,ck=4;_.yt=(new Map).set(_.pd,_.pd).set("frameRate","framerate").set("bandwidth","bitrate").set(_.Bg,_.Bg).set(_.Zd,_.Zd).set("channelsCount","channels");_.zt=class{constructor(a){this.f=a;this.a=null}fa(a){return jk(this,a,!1)}vb(a){return jk(this,a,!0)}stop(){this.a&&(this.a(),this.a=null)}};_.mk=class{constructor(a){this.f=a;this.a=null}Je(){this.stop();this.f();return this}fa(a){this.stop();this.a=(new _.zt(()=>{this.f()})).fa(a);return this}vb(a){this.stop();this.a=(new _.zt(()=>{this.f()})).vb(a);return this}stop(){this.a&&(this.a.stop(),this.a=null)}};_.x("clpp.utils.Timer",_.mk);_.mk.prototype.stop=_.mk.prototype.stop;_.mk.prototype.tickEvery=_.mk.prototype.vb;_.mk.prototype.tickAfter=_.mk.prototype.fa;_.mk.prototype.tickNow=_.mk.prototype.Je;var At=class{};_.x(od,At);At.getInfo=_.Ok;
365
- var lk=null,kk=null,Dk=new _.R(od),Hk="android",Gk="ios",Mk="linux",Ik="osx",Jk="windows",Kk="tizen",Lk="webos",Fk=_.ag,Nk=_.ag,yk={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,
353
+ "vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);var yt=class{};_.z("clpp.utils.BufferUtils",yt);yt.toArrayBuffer=Di;yt.toDataView=_.Ci;yt.toInt32Array=_.Bi;yt.toUint32Array=Ai;yt.toUint16Array=zi;yt.toUint8Array=_.K;yt.equal=xi;var Gi=new _.S("clpp.utils.strings");_.z("clpp.utils.strings.fromUtf8",_.Fi);_.z("clpp.utils.strings.fromBytesAutoDetect",_.Ii);_.z("clpp.utils.strings.toUtf8",_.Ji);_.z("clpp.utils.strings.toUtf16",_.Ki);_.z("clpp.utils.strings.toByteArray",_.Li);_.z("clpp.utils.strings.startsWith",_.Mi);_.z("clpp.utils.strings.endsWith",_.Ni);_.z("clpp.utils.strings.bitrateToString",_.Qi);
354
+ _.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)))});
355
+ _.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 Ri=document.createElement("span");var zt=class{};_.z("clpp.utils.Uint8ArrayUtils",zt);zt.toStandardBase64=_.Ti;zt.concat=_.Zi;zt.equal=_.Yi;zt.toHex=_.Xi;zt.fromHex=_.Wi;zt.fromBase64=_.Vi;zt.toBase64Url=_.Ui;_.At=new _.S("clpp.hls.Utils");_.aj=class{constructor(a){this.f=a;this.a=0}};_.Bt=new Set([_.Da,_.Ea,"EXT-X-I-FRAMES-ONLY",_.Ha,_.Ia,_.Ja,_.Ma,_.Oa]);_.Ct=new Set(["EXTINF",_.za,_.Ca,_.Fa,_.Ga,_.La]);_.Dt=new Set(["EXT-X-PART",_.Ka]);_.Et=new Set([_.Ba]);var ej=[403,401];_.z("clpp.net.DEFAULT_FATAL_STATUS_CODES",ej);_.z("clpp.net.makeRequest",_.jj);_.ij=6;_.z("clpp.net.RequestType",{MANIFEST:1,SEGMENT:2,LICENSE:3,APP:4,TIMING:5,OTHER:_.ij});_.Cn=class{constructor(){this.Pf=this.Jd=this.done=!1;this.error=this.value=null;let a,b;const c=new Promise((d,e)=>{a=function(f){this.done=this.Jd=!0;this.value=f;d(f)};b=function(f){this.done=this.Pf=!0;this.error=f;e(f)}});c.Jd=!1;c.done=!1;c.Pf=!1;c.value=null;c.error=null;c.resolve=a;c.reject=b;return c}resolve(){}reject(){}};_.Lo=class{constructor(a,b){this.W=a;this.A=b;this.a=!1}abort(){this.a=!0;return this.A()}};_.Ft=class{constructor(){this.a=[]}destroy(){const a=[];for(const b of this.a)b.W.catch(()=>{}),a.push(b.abort());this.a=[];return Promise.all(a)}};_.Hq=class{constructor(){this.f=[];this.h=[];this.j=[];this.w=!1;this.o=new _.Ft;this.a={};this.headers=new Map;this.l=0;this.a.data=Ns;!window.fetch||!window.AbortController||_.tk(6)||_.wk()&&68<_.Rk().browserVersion.major?(this.a.http=vs,this.a.https=vs):(this.a.http=Is,this.a.https=Is)}Eh(a){0<a?_.C("Rate limit set to "+a+"bps"):_.C("Rate limit disabled");this.l=a}release(){return this.o.destroy()}destroy(){this.w=!0;this.f=[];this.h=[];return this.o.destroy()}Od(a){this.f.push(a)}sc(a){this.h.push(a)}ze(a){this.f=
356
+ this.f.filter(b=>b!==a)}cd(a){this.h=this.h.filter(b=>b!==a)}fetch(a){if(this.w)return new Gt(Promise.reject(new _.I(1,1,7001,{url:a.uris[a.uriIndex],request:a})));this.l&&0<this.l&&(a.rateLimitBps=this.l);var b=[];for(const f of this.f)b.push(f);if(a.requestModifiers)for(const f of a.requestModifiers)b.push(f);a.requestModifiers=b;xj(this,a);b=[];for(var c of this.h)b.push(c);if(a.responseModifiers)for(var d of a.responseModifiers)b.push(d);a.responseModifiers=b;let e;d=c=new _.Cn;try{for(const f of a.requestModifiers)d=
357
+ d.then(g=>{if(e.a)throw new _.I(_.F,1,7001,g?{url:g.uris[g.uriIndex],request:g}:null);return f(g)||g}).catch(g=>{if(g instanceof _.I)throw g;throw new _.I(_.F,1,1006,null,g);});d=d.then(f=>({request:f,plugin:yj(this,f)}));e=new Gt(d);for(const f of a.responseModifiers)e.then(g=>{const h=()=>{if(e.a)throw new _.I(_.F,1,7001,g?{url:g.request.uris[g.request.uriIndex],request:g.request}:null);};h();const k=f(g)||g;h();return k}).catch(g=>{if(g instanceof _.I&&g.data&&g.data.response){const h=f(g.data.response);
358
+ if(h&&h.then)return h.then(()=>Promise.reject(g))}return Promise.reject(g)}).catch(g=>{if(g instanceof _.I)throw g;throw new _.I(_.F,1,1007,null,g);});for(const f of this.j)e.catch(g=>{g instanceof _.I&&g.data&&g.data.response||f({uri:a.uris[a.uriIndex],data:(new Uint8Array(0)).buffer,status:-1,timeMs:0,headers:{},request:a});return Promise.reject(g)}).catch(g=>{if(g instanceof _.I)throw g;throw new _.I(_.F,1,1007,null,g);});_.uj(this.o,e);c.resolve(a);return e}catch(f){return new Gt(Promise.reject(f))}}};
359
+ _.z("clpp.net.NetworkEngine",_.Hq);_.Hq.prototype.fetch=_.Hq.prototype.fetch;_.Hq.prototype.removeResponseModifier=_.Hq.prototype.cd;_.Hq.prototype.removeRequestModifier=_.Hq.prototype.ze;_.Hq.prototype.addResponseModifier=_.Hq.prototype.sc;_.Hq.prototype.addRequestModifier=_.Hq.prototype.Od;_.Hq.prototype.setRateLimit=_.Hq.prototype.Eh;var Cj;
360
+ _.Fj=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=[]}yc(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&&Uh(this.roles,
361
+ a.roles)&&Uh(this.accessibility,a.accessibility,Aj)}toString(){return`Track type: ${this.type} id: ${this.id}
362
+ renditions size: ${this.renditions.length}`}};_.z("clpp.Track",_.Fj);_.Fj.prototype.toString=_.Fj.prototype.toString;_.Nj=class{constructor(a,b){this.track=b;this.id=a;this.originalId=this.codec=this.Ic=this.bandwidth=this.height=this.width=null}};_.z("clpp.Rendition",_.Nj);_.Ej=1;_.N=_.w;_.M=_.p;_.L="text";Cj=_.ve;_.Ht={VIDEO:_.N,AUDIO:_.M,TEXT:_.L,METADATA:Cj};_.Fj.Type=_.Ht;_.fm=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;
363
+ _.Mi(this.path,"/")||(this.path="/"+this.path);this.f=b.search;this.h=b.hash}};_.z("clpp.utils.url.queryString",_.Ij);var It=class{constructor(a){this.f=a;this.g=new _.S("clpp.native.hls.HlsMetadataParser");this.a=Zh(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 Lj(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 Pj(c,d,
364
+ 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 Rj(d);e.Dc=f}catch(f){c.g.warn("Failed to parse metadata from HLS playlist.",f.message)}return e})}};_.Zj=[];_.T=class{Sd(){return!0}Eg(a){return this.getVideoTracks().find(b=>_.Yg(b,a,a&&Object.keys(a)))}Ag(a){return this.getAudioTracks().find(b=>_.Yg(b,a,a&&Object.keys(a)))}Cg(a){return this.ia().find(b=>_.Yg(b,a,a&&Object.keys(a)))}Dg(a){return this.getVideoTracks().flatMap(b=>b.renditions).find(b=>_.Yg(b,a,a&&Object.keys(a)))}zg(a){return this.getAudioTracks().flatMap(b=>b.renditions).find(b=>_.Yg(b,a,a&&Object.keys(a)))}Bg(a){return this.ia().flatMap(b=>b.renditions).find(b=>_.Yg(b,a,a&&Object.keys(a)))}};
365
+ _.z("clpp.TrackManager",_.T);_.T.prototype.isAbrEnabled=_.T.prototype.pa;_.T.prototype.addTextTrack=_.T.prototype.addTextTrack;_.T.prototype.findTextRendition=_.T.prototype.Bg;_.T.prototype.findAudioRendition=_.T.prototype.zg;_.T.prototype.findVideoRendition=_.T.prototype.Dg;_.T.prototype.findTextTrack=_.T.prototype.Cg;_.T.prototype.findAudioTrack=_.T.prototype.Ag;_.T.prototype.findVideoTrack=_.T.prototype.Eg;_.T.prototype.setTextRendition=_.T.prototype.ub;_.T.prototype.setAudioRendition=_.T.prototype.tb;
366
+ _.T.prototype.setVideoRendition=_.T.prototype.fb;_.T.prototype.setTextTrack=_.T.prototype.Ra;_.T.prototype.setAudioTrack=_.T.prototype.wa;_.T.prototype.setVideoTrack=_.T.prototype.vb;_.T.prototype.getTextTrack=_.T.prototype.ta;_.T.prototype.getAudioTrack=_.T.prototype.ma;_.T.prototype.getVideoTrack=_.T.prototype.Da;_.T.prototype.getLoadingTextRendition=_.T.prototype.Ab;_.T.prototype.getLoadingAudioRendition=_.T.prototype.zb;_.T.prototype.getLoadingVideoRendition=_.T.prototype.ob;
367
+ _.T.prototype.getTextRendition=_.T.prototype.Pa;_.T.prototype.getAudioRendition=_.T.prototype.Xa;_.T.prototype.getVideoRendition=_.T.prototype.ja;_.T.prototype.getTextTracks=_.T.prototype.ia;_.T.prototype.getAudioTracks=_.T.prototype.getAudioTracks;_.T.prototype.getVideoTracks=_.T.prototype.getVideoTracks;_.T.prototype.canSelectVideoTracks=_.T.prototype.Sd;var dk=new Map,ck=1,hk=2,gk=3,fk=4;_.Jt=(new Map).set(_.pd,_.pd).set("frameRate","framerate").set("bandwidth","bitrate").set(_.Ag,_.Ag).set(_.Yd,_.Yd).set("channelsCount","channels");_.Kt=class{constructor(a){this.f=a;this.a=null}fa(a){return mk(this,a,!1)}wb(a){return mk(this,a,!0)}stop(){this.a&&(this.a(),this.a=null)}};_.pk=class{constructor(a){this.f=a;this.a=null}Ke(){this.stop();this.f();return this}fa(a){this.stop();this.a=(new _.Kt(()=>{this.f()})).fa(a);return this}wb(a){this.stop();this.a=(new _.Kt(()=>{this.f()})).wb(a);return this}stop(){this.a&&(this.a.stop(),this.a=null)}};_.z("clpp.utils.Timer",_.pk);_.pk.prototype.stop=_.pk.prototype.stop;_.pk.prototype.tickEvery=_.pk.prototype.wb;_.pk.prototype.tickAfter=_.pk.prototype.fa;_.pk.prototype.tickNow=_.pk.prototype.Ke;var Lt=class{};_.z(od,Lt);Lt.getInfo=_.Rk;
368
+ var ok=null,nk=null,Gk=new _.S(od),Kk="android",Jk="ios",Pk="linux",Lk="osx",Mk="windows",Nk="tizen",Ok="webos",Ik=_.$f,Qk=_.$f,Bk={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,
366
369
  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,
367
370
  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},
368
- 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 T=class extends _.S{constructor(){super();this.g=new _.R("clpp.native.TrackManager");this.m=null;this.f=new _.Rs;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.O=this.C.bind(this,_.K);this.S=this.B.bind(this,_.M);this.X=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}Sd(){return!_.Ak()}B(a,
369
- 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=>Pk(n,d,a));if(k)c.g.warn("Track from event already exists",d,k);else{var l=Dj(a,d),m=Qk(d);if(f){if(d.kind===_.we)return;let n;void 0!==d.id?n=c.o[d.id]:n=Object.values(c.o).find(q=>Pk(l,q,a));l.kind&&"captions"===l.kind&&(l.mimeType=_.zc);n&&(l.src=n.url,l.mimeType=n.mimeType)}else if(k=c.h.find(n=>n.type===a&&_.Xg(n,l,["kind","label","language"]))){k.id=d.id;m&&(c.g.debug(`Setting native ${a} track active`),
370
- 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 _.Kj(l.id,l));c.h.push(l);const n=c.m.getConfiguration().safari;Sk(c,a,n)?yield Tk(c,l,n):Uk(c,a,n)&&(yield Vk(c,l,n));c.g.debug(a+" Track added",l);c.m.trigger(new _.C(_.Bt));const q=Wk(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&&
371
- g&&(e?f():u&&1!==v||f())}catch(n){c.g.error("Error while converting track data",n)}}}else c.g.warn(nb)}else c.g.warn(kb)})}F(a,b){if(b){var c=b.track;c?a===_.K&&c.kind!==_.we&&(b=this.h.find(d=>Pk(d,c,a)))&&(this.h.splice(this.h.indexOf(b),1),(this.a.get(a)||null)===b&&(this.a.set(a,null),Xk(this)),this.g.debug(a+" Track removed, id: ",b.id)):this.g.warn(nb)}else this.g.warn(kb)}C(a,b){this.g.debug(a+" Track changed",b);a===_.K&&Xk(this);const c=Zk(this,a);if(c)for(let d=0;d<c.length;++d)if(Qk(c[d])){if(b=
372
- this.h.find(e=>Pk(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(_.bl)):a===_.K&&this.m.trigger(new _.C(_.dl));break}}initialize(a){this.m=a;this.j=new xt(a.getNetworkEngine())}load(){this.A=!1;var a=Yk(this,_.K);a&&(this.f.on(a,_.uc,this.M),this.f.on(a,vf,this.R),this.f.on(a,dd,this.O));if(a=Yk(this,_.L))this.f.on(a,_.uc,this.J),this.f.on(a,vf,this.L),this.f.on(a,dd,this.K);if(a=Yk(this,_.M))this.f.on(a,
373
- _.uc,this.S),this.f.on(a,vf,this.X),this.f.on(a,dd,this.V);this.f.one(this.m,Xc,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 Wk(this,_.M)}getAudioTracks(){return Wk(this,_.L)}ha(){return Wk(this,_.K)}ma(){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]||
374
- null}Ua(){return $k(this,_.L)}La(){return $k(this,_.K)}jb(){return al(this,_.M)}zb(){return al(this,_.L)}Ab(){return al(this,_.K)}Ma(){return this.a.get(_.M)||null}la(){return this.a.get(_.L)||null}ta(){return this.a.get(_.K)||null}ub(a){el(this,_.M,a)}va(a){el(this,_.L,a)}Oa(a){el(this,_.K,a)}ab(a){el(this,_.M,a&&a.track)}sb(a){el(this,_.L,a&&a.track)}tb(a){el(this,_.K,a&&a.track)}addTextTrack(a){const b=this;return _.w(function*(){if(a.mimeType.match(/text\/vtt/)){const c="External_"+`${b.G++}`;
375
- b.o[c]=a;fl(b,a,c)}else yield gl(b,a)})}pa(){return 1>=this.getVideoTracks().flatMap(a=>a.renditions).length}H(){const a=this;return _.w(function*(){const b=a.m.getConfiguration();il(a,_.L,b.preferredAudioLanguage);if(!Zk(a,_.K).some(c=>Qk(c))){const c=Yk(a,_.K);yield new Promise(d=>{a.f.one(c,dd,d);(new _.mk(d)).fa(1)})}a.A||il(a,_.K,b.preferredTextLanguage)})}};T.prototype.isAbrEnabled=T.prototype.pa;T.prototype.addTextTrack=T.prototype.addTextTrack;T.prototype.setTextRendition=T.prototype.tb;
376
- T.prototype.setAudioRendition=T.prototype.sb;T.prototype.setVideoRendition=T.prototype.ab;T.prototype.setTextTrack=T.prototype.Oa;T.prototype.setAudioTrack=T.prototype.va;T.prototype.setVideoTrack=T.prototype.ub;T.prototype.getTextTrack=T.prototype.ta;T.prototype.getAudioTrack=T.prototype.la;T.prototype.getVideoTrack=T.prototype.Ma;T.prototype.getLoadingTextRendition=T.prototype.Ab;T.prototype.getLoadingAudioRendition=T.prototype.zb;T.prototype.getLoadingVideoRendition=T.prototype.jb;
377
- T.prototype.getTextRendition=T.prototype.La;T.prototype.getAudioRendition=T.prototype.Ua;T.prototype.getVideoRendition=T.prototype.ma;T.prototype.getTextTracks=T.prototype.ha;T.prototype.getAudioTracks=T.prototype.getAudioTracks;T.prototype.getVideoTracks=T.prototype.getVideoTracks;T.prototype.canSelectVideoTracks=T.prototype.Sd;_.Ct=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(Lb);}end(a){if(this.f)return this.f.end(a);if(a<this.a.length)return this.a[a].end;throw Error(Lb);}Ja(){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)}ga(){return!this.length||1===this.length&&1E-6>this.end(0)-this.start(0)?null:this.end(this.length-
378
- 1)}Fb(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}xa(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.ga(),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=
379
- "";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",_.Ct);_.Ct.prototype.bufferedAheadOf=_.Ct.prototype.xa;_.Ct.prototype.isBuffered=_.Ct.prototype.Fb;_.Ct.prototype.bufferEnd=_.Ct.prototype.ga;_.Ct.prototype.bufferStart=_.Ct.prototype.Ja;_.Ct.prototype.end=_.Ct.prototype.end;_.Ct.prototype.start=_.Ct.prototype.start;_.Dt=class{constructor(){this.Qc=new Ps(this);this.Oc=[]}addEventListener(a,b){this.on(a,b)}removeEventListener(a,b){this.off(a,b)}on(a,b,c){return this.Qc.on(a,b,c)}one(a,b,c){return this.Qc.one(a,b,c)}off(a,b){return this.Qc.off(a,b)}forwardEventsTo(a){a&&(0<=this.Oc.indexOf(a)||this.Oc.push(a))}dispatchEvent(a){this.trigger(a);return a.defaultPrevented}stopForwardingEventsTo(a){a&&(a=this.Oc.indexOf(a),0<=a&&this.Oc.splice(a,1))}trigger(a){this.Qc.trigger(a);for(const b of this.Oc)b.dispatchEvent(a)}};
380
- _.Dt.prototype.off=_.Dt.prototype.off;_.Dt.prototype.one=_.Dt.prototype.one;_.Dt.prototype.on=_.Dt.prototype.on;_.Dt.prototype.removeEventListener=_.Dt.prototype.removeEventListener;_.Dt.prototype.addEventListener=_.Dt.prototype.addEventListener;_.x("clpp.events.ERROR",_.Ud);_.x("clpp.events.LOADEDMETADATA",_.qe);_.x("clpp.events.BUFFERING_ENDED",_.Rc);_.x("clpp.events.BUFFERING_STARTED",_.Sc);_.x("clpp.events.STATE_CHANGED",_.Mf);_.bl="audiotrackchanged";_.x("clpp.events.AUDIO_TRACK_CHANGED",_.bl);_.dl="texttrackchanged";_.x("clpp.events.TEXT_TRACK_CHANGED",_.dl);_.x("clpp.events.VIDEO_TRACK_CHANGED",_.ng);_.x("clpp.events.BITRATE_CHANGED",_.Oc);_.Bt="tracksadded";_.x("clpp.events.TRACKS_ADDED",_.Bt);_.x("clpp.events.LOAD_START",re);
381
- _.x("clpp.events.RELEASING",_.uf);_.x("clpp.events.RELEASED",tf);_.x("clpp.events.DESTROYING","destroying");_.x("clpp.events.DESTROYED","destroyed");_.x("clpp.events.VIDEO_BUFFER_CHANGED",_.mg);_.x("clpp.events.AUDIO_BUFFER_CHANGED",_.Mc);_.x("clpp.events.DOWNLOAD_TRACE","downloadtrace");_.x("clpp.events.DRM_SESSION_UPDATE",_.Nd);_.x("clpp.events.DRM_SESSION_PERSISTED",_.Md);_.x("clpp.events.DRM_RENEWAL_STARTED",Ld);_.x("clpp.events.DRM_EXPIRATION_UPDATE",_.Kd);
382
- _.x("clpp.events.AUTOPLAY_NOT_ALLOWED",_.Nc);_.x("clpp.events.PLAY",_.Re);_.x("clpp.events.SEEKING",_.Ef);_.x("clpp.events.SEEKED",_.Df);_.x("clpp.events.USER_SEEKING",_.fg);_.x("clpp.events.USER_SEEKED",_.eg);_.mo={SEEKING:1,NO_DATA:2};_.x("clpp.events.BufferingReasons",_.mo);_.x("clpp.events.ADS_TIMELINE_CHANGED",_.vc);_.x("clpp.events.AD_LOADED",_.lc);_.x("clpp.events.AD_BREAK_STARTED",_.bc);_.x("clpp.events.AD_STARTED",_.rc);_.x("clpp.events.AD_BUFFERING",_.dc);_.x("clpp.events.AD_PROGRESS",_.oc);
383
- _.x("clpp.events.AD_FIRST_QUARTILE",_.gc);_.x("clpp.events.AD_MIDPOINT",_.mc);_.x("clpp.events.AD_THIRD_QUARTILE",_.tc);_.x("clpp.events.AD_PAUSED",_.nc);_.x("clpp.events.AD_RESUMED",_.pc);_.x("clpp.events.AD_SKIPPED",_.qc);_.x("clpp.events.AD_CLICKED",_.ec);_.x("clpp.events.AD_IMPRESSION",_.kc);_.x("clpp.events.AD_COMPLETED",_.fc);_.x("clpp.events.AD_STOPPED",_.sc);_.x("clpp.events.AD_BREAK_STOPPED",_.cc);_.x("clpp.events.AD_HLS_ASSET_LIST_REQUEST",hc);
384
- _.x("clpp.events.AD_HLS_ASSET_LIST_RESPONSE",ic);_.x("clpp.events.SIMID_CREATIVE_STARTED",_.Gf);_.x("clpp.events.SIMID_CREATIVE_STOPPED",_.Hf);_.x("clpp.events.CASTING_STARTED",_.Yc);_.x("clpp.events.CASTING_ENDED","castingended");_.x("clpp.events.CAST_STATUS_CHANGED",_.Zc);_.x("clpp.events.AIRPLAY_STATUS_CHANGED",_.yc);_.x("clpp.events.AIRPLAY_CASTING_STARTED",_.xc);_.x("clpp.events.AIRPLAY_CASTING_ENDED",_.wc);_.Ph="timeline-cue-added";_.x("clpp.events.TIMELINE_CUE_ADDED",_.Ph);_.Gh="timeline-cue-enter";
385
- _.x("clpp.events.TIMELINE_CUE_ENTER",_.Gh);_.Hh="timeline-cue-exit";_.x("clpp.events.TIMELINE_CUE_EXIT",_.Hh);_.Fh="timeline-cues-changed";_.x("clpp.events.TIMELINE_CUES_CHANGED",_.Fh);_.x("clpp.events.MPD_TYPE_CHANGED",_.Ae);_.x("clpp.events.LIVE_TURNED_STATIC",_.ke);_.x("clpp.events.VIMOND_RESPONSE",_.rg);_.x("clpp.events.PLAYLIST_ITEM_CHANGED",_.cf);_.x("clpp.events.PLAYLIST_MODIFIED",_.df);_.x("clpp.events.SC_PLAYLIST_TIMELINE_CHANGED",_.Cf);_.x("clpp.events.SC_PLAYLIST_ITEM_CHANGED",_.Af);
386
- _.x("clpp.events.SC_PLAYLIST_ENDED",_.zf);_.x("clpp.events.SC_PLAYLIST_LIVE_TURNED_STATIC",_.Bf);_.x("clpp.events.CDN_SWITCH_SUCCESS",_.$c);_.x("clpp.events.ONLINE_STATUS_CHANGED",Je);_.x("clpp.events.CMSD_EVENT","cmsd-event");var jl=["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",_.da);_.x("clpp.name",_.pa);_.hl="application/x-mpegurl";_.x("clpp.Type",{DASH:_.Ac,HLS:_.hl,SMOOTH_STREAMING:_.Fc,MP4:_.lg,MP3:"audio/mp3"});_.Bh="scte35";_.Ch="hls-daterange";_.x("clpp.TimelineCueType",{SCTE35:_.Bh,DASH_CALLBACK:_.Be,HLS_DATERANGE:_.Ch,UNKNOWN:_.ag});_.x("clpp.SpeedUpMode",{DECODER:_.Bd,SEEK:"seek"});_.x("clpp.CodecSwitchingStrategy",{PREVENT:_.of,SMOOTH:_.Jf});var Et=class{};_.x("clpp.utils.PlayerConfiguration",Et);Et.create=_.pl;var Ft=["abort",Wc,Xc,Pd,"emptied",Rd,_.Td,_.Ud,"interruptbegin","interruptend",_.pe,_.qe,re,"mozaudioavailable",_.Ne,_.Re,_.bf,_.qf,_.sf,_.Df,_.Ef,Kf,"suspend",_.Wf,"volumechange",_.ug,_.vg,_.xf,Ag,zg,xg,yg];_.Gt=class extends _.Dt{constructor(a){super();this.log=new _.R(a);this.configuration=this.da=_.nl();this.ea=this.C=null;this.jc=this.re=!1;this.Qe=new _.R("clpp.video.events");this.Kb=null;this.Bc=-1;this.eg=this.bg.bind(this);this.je=new _.yq;this.L=new _.Rs;this.ge=this.uc=this.xc=this.O=null}init(a,b){this.configuration=this.da=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 Ft)this.L.on(a,c,this.eg,
387
- c!==_.Ud);this.Kb||(this.Kb=this.Tf());this.Kb.initialize(this);this.C.showMediaElement()}release(){this.O&&(this.O.destroy(),this.O=null);return Promise.resolve()}destroy(){this.L.release();return this.je.release()}canPlay(a,b){return _.kh[this.namespace()].canPlay(a,b)}getTimeline(){return null}setupPlaylist(){return Promise.reject(_.pb)}appendLoad(){return Promise.reject(_.pb)}seekWith(){return Promise.reject(_.pb)}setSeekInterceptor(){}play(){if(!this.ea)return Promise.reject("No sources specified yet. You need to load content before calling play.");
388
- 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||""};kl(c)?(this.trigger(new _.C(_.Nc)),this.log.warn(_.ia)):c.name===qb&&this.log.warn('Unrecognized "NotAllowedError" on play(). '+`${b.name}: ${b.message}`);throw b;})}pause(){return this.ea?new Promise((a,b)=>{const c=this.getState();if(c!==_.ko&&c!==_.ho&&c!==_.so&&c!==_.ro)b(new _.G(_.E,7,3201,"The player state does not allow pause."));
389
- else if(this.C.getMedia().pause(),this.getState()===_.so)this.L.one(this,_.Mf,()=>{a()});else a()}):Promise.reject(new _.G(_.E,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.xc=a}setCdnErrorCallback(a){this.uc=a}Ac(){return this.xc}getSurface(){return this.C}getBufferInfo(a){const b=this.getSurface().getMedia();
390
- return new _.Ct(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)?
391
- (this.log.info("Skip seek. Delta "+Math.abs(d)+" \x3c 0.1"),Promise.resolve()):new Promise((e,f)=>{const g=()=>{this.trigger(new _.C(_.fg));this.L.on(c,_.Df,h);this.L.on(c,_.Wf,h);this.L.on(c,_.qf,h);this.log.info("Seeking to "+a+". Delta "+d);this.jc=this.re=!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===_.qf,A=l.type===_.Wf,D=y&&u;q=v||n&&D||A&&q;this.log.debug("Checking seeking state after "+
392
- 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.jc=this.re=!1,this.L.off(c,_.Df,h),this.L.off(c,_.Wf,h),this.L.off(c,_.qf,h),this.Pe(),this.trigger(new _.C(_.eg)),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,_.qe,g)};this.getState()===_.po?
393
- (this.log.debug("Player is in IDLE state. Postpone seek."),this.L.one(this,_.Mf,()=>{switch(this.getState()){case _.ko:case _.so:case _.ro: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?_.Wg(a)?0>a||1<a?this.log.warn(`Can not set volume to ${a}.
371
+ 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 U=class extends _.T{constructor(){super();this.g=new _.S("clpp.native.TrackManager");this.m=null;this.f=new _.bt;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.O=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}Sd(){return!_.Dk()}B(a,
372
+ 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=>Sk(n,d,a));if(k)c.g.warn("Track from event already exists",d,k);else{var l=Gj(a,d),m=Tk(d);if(f){if(d.kind===_.ve)return;let n;void 0!==d.id?n=c.o[d.id]:n=Object.values(c.o).find(q=>Sk(l,q,a));l.kind&&"captions"===l.kind&&(l.mimeType=_.zc);n&&(l.src=n.url,l.mimeType=n.mimeType)}else if(k=c.h.find(n=>n.type===a&&_.Yg(n,l,["kind","label","language"]))){k.id=d.id;m&&(c.g.debug(`Setting native ${a} track active`),
373
+ 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 _.Nj(l.id,l));c.h.push(l);const n=c.m.getConfiguration().safari;Vk(c,a,n)?yield Wk(c,l,n):Xk(c,a,n)&&(yield Yk(c,l,n));c.g.debug(a+" Track added",l);c.m.trigger(new _.E(_.Mt));const q=Zk(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&&
374
+ g&&(e?f():u&&1!==v||f())}catch(n){c.g.error("Error while converting track data",n)}}}else c.g.warn(nb)}else c.g.warn(kb)})}F(a,b){if(b){var c=b.track;c?a===_.L&&c.kind!==_.ve&&(b=this.h.find(d=>Sk(d,c,a)))&&(this.h.splice(this.h.indexOf(b),1),(this.a.get(a)||null)===b&&(this.a.set(a,null),$k(this)),this.g.debug(a+" Track removed, id: ",b.id)):this.g.warn(nb)}else this.g.warn(kb)}C(a,b){this.g.debug(a+" Track changed",b);a===_.L&&$k(this);const c=bl(this,a);if(c)for(let d=0;d<c.length;++d)if(Tk(c[d])){if(b=
375
+ this.h.find(e=>Sk(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 _.E(_.fl)):a===_.L&&this.m.trigger(new _.E(_.gl));break}}initialize(a){this.m=a;this.j=new It(a.getNetworkEngine())}load(){this.A=!1;var a=al(this,_.L);a&&(this.f.on(a,_.uc,this.M),this.f.on(a,uf,this.R),this.f.on(a,dd,this.O));if(a=al(this,_.M))this.f.on(a,_.uc,this.J),this.f.on(a,uf,this.L),this.f.on(a,dd,this.K);if(a=al(this,_.N))this.f.on(a,
376
+ _.uc,this.S),this.f.on(a,uf,this.X),this.f.on(a,dd,this.V);this.f.one(this.m,Uc,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 Zk(this,_.N)}getAudioTracks(){return Zk(this,_.M)}ia(){return Zk(this,_.L)}ja(){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]||
377
+ null}Xa(){return dl(this,_.M)}Pa(){return dl(this,_.L)}ob(){return el(this,_.N)}zb(){return el(this,_.M)}Ab(){return el(this,_.L)}Da(){return this.a.get(_.N)||null}ma(){return this.a.get(_.M)||null}ta(){return this.a.get(_.L)||null}vb(a){hl(this,_.N,a)}wa(a){hl(this,_.M,a)}Ra(a){hl(this,_.L,a)}fb(a){hl(this,_.N,a&&a.track)}tb(a){hl(this,_.M,a&&a.track)}ub(a){hl(this,_.L,a&&a.track)}addTextTrack(a){const b=this;return _.x(function*(){if(a.mimeType.match(/text\/vtt/)){const c="External_"+`${b.G++}`;
378
+ b.o[c]=a;il(b,a,c)}else yield jl(b,a)})}pa(){return 1>=this.getVideoTracks().flatMap(a=>a.renditions).length}H(){const a=this;return _.x(function*(){const b=a.m.getConfiguration();ll(a,_.M,b.preferredAudioLanguage);if(!bl(a,_.L).some(c=>Tk(c))){const c=al(a,_.L);yield new Promise(d=>{a.f.one(c,dd,d);(new _.pk(d)).fa(1)})}a.A||ll(a,_.L,b.preferredTextLanguage)})}};U.prototype.isAbrEnabled=U.prototype.pa;U.prototype.addTextTrack=U.prototype.addTextTrack;U.prototype.setTextRendition=U.prototype.ub;
379
+ U.prototype.setAudioRendition=U.prototype.tb;U.prototype.setVideoRendition=U.prototype.fb;U.prototype.setTextTrack=U.prototype.Ra;U.prototype.setAudioTrack=U.prototype.wa;U.prototype.setVideoTrack=U.prototype.vb;U.prototype.getTextTrack=U.prototype.ta;U.prototype.getAudioTrack=U.prototype.ma;U.prototype.getVideoTrack=U.prototype.Da;U.prototype.getLoadingTextRendition=U.prototype.Ab;U.prototype.getLoadingAudioRendition=U.prototype.zb;U.prototype.getLoadingVideoRendition=U.prototype.ob;
380
+ U.prototype.getTextRendition=U.prototype.Pa;U.prototype.getAudioRendition=U.prototype.Xa;U.prototype.getVideoRendition=U.prototype.ja;U.prototype.getTextTracks=U.prototype.ia;U.prototype.getAudioTracks=U.prototype.getAudioTracks;U.prototype.getVideoTracks=U.prototype.getVideoTracks;U.prototype.canSelectVideoTracks=U.prototype.Sd;_.Nt=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(Lb);}end(a){if(this.f)return this.f.end(a);if(a<this.a.length)return this.a[a].end;throw Error(Lb);}La(){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)}ha(){return!this.length||1===this.length&&1E-6>this.end(0)-this.start(0)?null:this.end(this.length-
381
+ 1)}Fb(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}ya(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.ha(),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=
382
+ "";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",_.Nt);_.Nt.prototype.bufferedAheadOf=_.Nt.prototype.ya;_.Nt.prototype.isBuffered=_.Nt.prototype.Fb;_.Nt.prototype.bufferEnd=_.Nt.prototype.ha;_.Nt.prototype.bufferStart=_.Nt.prototype.La;_.Nt.prototype.end=_.Nt.prototype.end;_.Nt.prototype.start=_.Nt.prototype.start;_.Ot=class{constructor(){this.Oc=new $s(this);this.Mc=[]}addEventListener(a,b){this.on(a,b)}removeEventListener(a,b){this.off(a,b)}on(a,b,c){return this.Oc.on(a,b,c)}one(a,b,c){return this.Oc.one(a,b,c)}off(a,b){return this.Oc.off(a,b)}forwardEventsTo(a){a&&(0<=this.Mc.indexOf(a)||this.Mc.push(a))}dispatchEvent(a){this.trigger(a);return a.defaultPrevented}stopForwardingEventsTo(a){a&&(a=this.Mc.indexOf(a),0<=a&&this.Mc.splice(a,1))}trigger(a){this.Oc.trigger(a);for(const b of this.Mc)b.dispatchEvent(a)}};
383
+ _.Ot.prototype.off=_.Ot.prototype.off;_.Ot.prototype.one=_.Ot.prototype.one;_.Ot.prototype.on=_.Ot.prototype.on;_.Ot.prototype.removeEventListener=_.Ot.prototype.removeEventListener;_.Ot.prototype.addEventListener=_.Ot.prototype.addEventListener;_.z("clpp.events.ERROR",_.r);_.z("clpp.events.LOADEDMETADATA",_.le);_.z("clpp.events.BUFFERING_ENDED",_.Qc);_.z("clpp.events.BUFFERING_STARTED",_.Rc);_.z("clpp.events.STATE_CHANGED",_.Lf);_.fl="audiotrackchanged";_.z("clpp.events.AUDIO_TRACK_CHANGED",_.fl);_.gl="texttrackchanged";_.z("clpp.events.TEXT_TRACK_CHANGED",_.gl);_.z("clpp.events.VIDEO_TRACK_CHANGED",_.mg);_.z("clpp.events.BITRATE_CHANGED",_.Oc);_.Mt="tracksadded";_.z("clpp.events.TRACKS_ADDED",_.Mt);_.z("clpp.events.LOAD_START",ne);
384
+ _.z("clpp.events.RELEASING",_.tf);_.z("clpp.events.RELEASED",sf);_.z("clpp.events.DESTROYING","destroying");_.z("clpp.events.DESTROYED","destroyed");_.z("clpp.events.VIDEO_BUFFER_CHANGED",_.lg);_.z("clpp.events.AUDIO_BUFFER_CHANGED",_.Mc);_.z("clpp.events.DOWNLOAD_TRACE","downloadtrace");_.z("clpp.events.DRM_SESSION_UPDATE",_.Nd);_.z("clpp.events.DRM_SESSION_PERSISTED",_.Md);_.z("clpp.events.DRM_RENEWAL_STARTED",Kd);_.z("clpp.events.DRM_EXPIRATION_UPDATE",_.Jd);
385
+ _.z("clpp.events.AUTOPLAY_NOT_ALLOWED",_.Nc);_.z("clpp.events.PLAY",_.Qe);_.z("clpp.events.SEEKING",_.Df);_.z("clpp.events.SEEKED",_.Cf);_.z("clpp.events.USER_SEEKING",_.eg);_.z("clpp.events.USER_SEEKED",_.dg);_.to={SEEKING:1,NO_DATA:2};_.z("clpp.events.BufferingReasons",_.to);_.z("clpp.events.ADS_TIMELINE_CHANGED",_.vc);_.z("clpp.events.AD_LOADED",_.kc);_.z("clpp.events.AD_BREAK_STARTED",_.bc);_.z("clpp.events.AD_STARTED",_.rc);_.z("clpp.events.AD_BUFFERING",_.dc);_.z("clpp.events.AD_PROGRESS",_.nc);
386
+ _.z("clpp.events.AD_FIRST_QUARTILE",_.gc);_.z("clpp.events.AD_MIDPOINT",_.lc);_.z("clpp.events.AD_THIRD_QUARTILE",_.tc);_.z("clpp.events.AD_PAUSED",_.mc);_.z("clpp.events.AD_RESUMED",_.oc);_.z("clpp.events.AD_SKIPPED",_.qc);_.z("clpp.events.AD_CLICKED",_.ec);_.z("clpp.events.AD_IMPRESSION",_.jc);_.z("clpp.events.AD_COMPLETED",_.fc);_.z("clpp.events.AD_STOPPED",_.sc);_.z("clpp.events.AD_BREAK_STOPPED",_.cc);_.z("clpp.events.AD_HLS_ASSET_LIST_REQUEST",hc);
387
+ _.z("clpp.events.AD_HLS_ASSET_LIST_RESPONSE",ic);_.z("clpp.events.SIMID_CREATIVE_STARTED",_.Ff);_.z("clpp.events.SIMID_CREATIVE_STOPPED",_.Gf);_.z("clpp.events.CASTING_STARTED",_.Vc);_.z("clpp.events.CASTING_ENDED","castingended");_.z("clpp.events.CAST_STATUS_CHANGED",_.Zc);_.z("clpp.events.AIRPLAY_STATUS_CHANGED",_.yc);_.z("clpp.events.AIRPLAY_CASTING_STARTED",_.xc);_.z("clpp.events.AIRPLAY_CASTING_ENDED",_.wc);_.Qh="timeline-cue-added";_.z("clpp.events.TIMELINE_CUE_ADDED",_.Qh);_.Hh="timeline-cue-enter";
388
+ _.z("clpp.events.TIMELINE_CUE_ENTER",_.Hh);_.Ih="timeline-cue-exit";_.z("clpp.events.TIMELINE_CUE_EXIT",_.Ih);_.Gh="timeline-cues-changed";_.z("clpp.events.TIMELINE_CUES_CHANGED",_.Gh);_.z("clpp.events.MPD_TYPE_CHANGED",_.ze);_.z("clpp.events.LIVE_TURNED_STATIC",_.ie);_.z("clpp.events.VIMOND_RESPONSE",_.ng);_.z("clpp.events.PLAYLIST_ITEM_CHANGED",_.bf);_.z("clpp.events.PLAYLIST_MODIFIED",_.cf);_.z("clpp.events.SC_PLAYLIST_TIMELINE_CHANGED",_.Bf);_.z("clpp.events.SC_PLAYLIST_ITEM_CHANGED",_.zf);
389
+ _.z("clpp.events.SC_PLAYLIST_ENDED",_.yf);_.z("clpp.events.SC_PLAYLIST_LIVE_TURNED_STATIC",_.Af);_.z("clpp.events.CDN_SWITCH_SUCCESS",_.$c);_.z("clpp.events.ONLINE_STATUS_CHANGED",Ie);_.z("clpp.events.CMSD_EVENT","cmsd-event");_.z("clpp.events.YOSPACE_SESSION_STARTED",_.Fg);_.z("clpp.events.YOSPACE_SESSION_ENDED",_.Eg);var ml=["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",_.da);_.z("clpp.name",_.pa);_.kl="application/x-mpegurl";_.z("clpp.Type",{DASH:_.Ac,HLS:_.kl,SMOOTH_STREAMING:_.Fc,MP4:_.kg,MP3:"audio/mp3"});_.Ch="scte35";_.Dh="hls-daterange";_.z("clpp.TimelineCueType",{SCTE35:_.Ch,DASH_CALLBACK:_.Ae,HLS_DATERANGE:_.Dh,UNKNOWN:_.$f});_.z("clpp.SpeedUpMode",{DECODER:_.Bd,SEEK:"seek"});_.z("clpp.CodecSwitchingStrategy",{PREVENT:_.kf,SMOOTH:_.If});var Pt=class{};_.z("clpp.utils.PlayerConfiguration",Pt);Pt.create=_.sl;var Qt=["abort",Sc,Uc,Pd,"emptied",Rd,_.Td,_.r,"interruptbegin","interruptend",_.ke,_.le,ne,"mozaudioavailable",_.Me,_.Qe,_.af,_.of,_.rf,_.Cf,_.Df,Jf,"suspend",_.Vf,"volumechange",_.tg,_.ug,_.wf,zg,yg,wg,xg];_.Rt=class extends _.Ot{constructor(a){super();this.log=new _.S(a);this.configuration=this.ca=_.ql();this.ea=this.C=null;this.jc=this.re=!1;this.Te=new _.S("clpp.video.events");this.Kb=null;this.vd=-1;this.hg=this.eg.bind(this);this.je=new _.Hq;this.L=new _.bt;this.ge=this.uc=this.xc=this.O=null}init(a,b){this.configuration=this.ca=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 Qt)this.L.on(a,c,this.hg,
390
+ c!==_.r);this.Kb||(this.Kb=this.Xf());this.Kb.initialize(this);this.C.showMediaElement()}release(){this.O&&(this.O.destroy(),this.O=null);return Promise.resolve()}destroy(){this.L.release();return this.je.release()}canPlay(a,b){return _.lh[this.namespace()].canPlay(a,b)}getTimeline(){return null}setupPlaylist(){return Promise.reject(_.pb)}appendLoad(){return Promise.reject(_.pb)}seekWith(){return Promise.reject(_.pb)}detach(){return Promise.resolve()}setSeekInterceptor(){}setPlaybackSessionId(){}play(){if(!this.ea)return Promise.reject("No sources specified yet. You need to load content before calling play.");
391
+ 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||""};nl(c)?(this.trigger(new _.E(_.Nc)),this.log.warn(_.ia)):c.name===qb&&this.log.warn('Unrecognized "NotAllowedError" on play(). '+`${b.name}: ${b.message}`);throw b;})}pause(){return this.ea?new Promise((a,b)=>{const c=this.getState();if(c!==_.ro&&c!==_.oo&&c!==_.zo&&c!==_.yo)b(new _.I(_.F,7,3201,"The player state does not allow pause."));
392
+ else if(this.C.getMedia().pause(),this.getState()===_.zo)this.L.one(this,_.Lf,()=>{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.xc=a}setCdnErrorCallback(a){this.uc=a}Ac(){return this.xc}getSurface(){return this.C}getBufferInfo(a){const b=this.getSurface().getMedia();
393
+ return new _.Nt(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)?
394
+ (this.log.info("Skip seek. Delta "+Math.abs(d)+" \x3c 0.1"),Promise.resolve()):new Promise((e,f)=>{const g=()=>{this.trigger(new _.E(_.eg));this.L.on(c,_.Cf,h);this.L.on(c,_.Vf,h);this.L.on(c,_.of,h);this.log.info("Seeking to "+a+". Delta "+d);this.jc=this.re=!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===_.Cf,y=l.type===_.of,A=l.type===_.Vf,D=y&&u;q=v||n&&D||A&&q;this.log.debug("Checking seeking state after "+
395
+ 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.jc=this.re=!1,this.L.off(c,_.Cf,h),this.L.off(c,_.Vf,h),this.L.off(c,_.of,h),this.Se(),this.trigger(new _.E(_.dg)),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,_.le,g)};this.getState()===_.wo?
396
+ (this.log.debug("Player is in IDLE state. Postpone seek."),this.L.one(this,_.Lf,()=>{switch(this.getState()){case _.ro: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?_.Xg(a)?0>a||1<a?this.log.warn(`Can not set volume to ${a}.
394
397
  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===_.Pc&&(b.muted=a)}getDuration(){return this.getMediaDuration()}getMediaDuration(){return this.ea?this.C.getMedia().duration:-1}getTrackManager(){return this.Kb}getPlaybackRate(){const a=this.C.getMedia();return a&&a.playbackRate||
395
- 1}setPlaybackRate(a){const b=this.C.getMedia();void 0!==a&&b&&(b.playbackRate=a)}setSourceIndex(a){this.Bc=a}getSourceIndex(){return this.Bc}getLoadedSource(){return this.ea&&-1!==this.Bc?this.ea[this.Bc]:null}getPeriods(){return[]}getNetworkEngine(){return this.je}setNetworkEngine(a){this.je=a}setCmsdManager(a){this.ge=a}getTextDisplayer(){return this.O}getTimelineCues(){return[]}getCueTimeline(){return null}resetAbr(){}bg(a){var b=this.getSurface().getMedia();const c=this.getPosition();let d="Received Video Element Event: '"+
396
- a.type+"' with playhead at: "+c;if(a.type===_.Wf||a.type===_.qf)this.Qe.debug(d);else{let e="";switch(a.type){case _.sf:e=`Rate: ${this.getPlaybackRate()}`;break;case Pd:e=`Duration: ${this.getDuration()}`;break;case "volumechange":e=`Volume: ${this.getVolume()} Muted: ${this.isMuted()}`;break;case _.Re:case _.bf:case "suspend":case _.ug:case Kf:case _.Ef:case _.Df:case _.Wf:case _.qf:case Wc:case Xc:b=this.getBufferInfo().xa(c);e=`State ${this.getSurface().getMedia().readyState} `+`Buffer: ${b}`;
397
- break;case _.xf:null!=b&&(e=`Size: ${b.videoWidth}x${b.videoHeight}`)}e&&(d+=". "+e);this.Qe.info(d)}a.type!==_.Ud&&this.trigger(new _.C(a.type,{detail:a}))}Pe(){}};_.Gt.prototype.getTextDisplayer=_.Gt.prototype.getTextDisplayer;_.Gt.prototype.setNetworkEngine=_.Gt.prototype.setNetworkEngine;_.Gt.prototype.getNetworkEngine=_.Gt.prototype.getNetworkEngine;var tl;tl=new _.R("clpp.Components");_.rl=new Map;_.x("clpp.install",function(a){Bl(a)});_.x("clpp.uninstall",function(a){Cl(a)});var Ht=class{constructor(){this.a=this.f=null;this.g=new _.R("clpp.drm.csl")}release(){this.a=this.f=null}};_.x("clpp.drm.WidevineRobustnessLevel",{SW_SECURE_CRYPTO:_.Fb,SW_SECURE_DECODE:_.Gb,HW_SECURE_CRYPTO:Wa,HW_SECURE_DECODE:Xa,HW_SECURE_ALL:Va});_.x("clpp.drm.PlayreadyRobustnessLevel",{SL150:"150",SL2000:"2000",SL3000:"3000"});_.x("clpp.drm.KeySystem",{NONE:_.Ce,CLEAR_KEY:_.Le,WIDEVINE:_.xd,PLAYREADY:_.vd,FAIRPLAY:_.sd,PRIMETIME:_.rd});_.Gl={};_.x("clpp.drm.registerDrmEnvironment",_.Hl);var Kl={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,
398
+ 1}setPlaybackRate(a){const b=this.C.getMedia();void 0!==a&&b&&(b.playbackRate=a)}setSourceIndex(a){this.vd=a}getSourceIndex(){return this.vd}getLoadedSource(){return this.ea&&-1!==this.vd?this.ea[this.vd]:null}getPeriods(){return[]}getNetworkEngine(){return this.je}setNetworkEngine(a){this.je=a}setCmsdManager(a){this.ge=a}getTextDisplayer(){return this.O}getTimelineCues(){return[]}getCueTimeline(){return null}resetAbr(){}eg(a){var b=this.getSurface().getMedia();const c=this.getPosition();let d="Received Video Element Event: '"+
399
+ a.type+"' with playhead at: "+c;if(a.type===_.Vf||a.type===_.of)this.Te.debug(d);else{let e="";switch(a.type){case _.rf:e=`Rate: ${this.getPlaybackRate()}`;break;case Pd:e=`Duration: ${this.getDuration()}`;break;case "volumechange":e=`Volume: ${this.getVolume()} Muted: ${this.isMuted()}`;break;case _.Qe:case _.af:case "suspend":case _.tg:case Jf:case _.Df:case _.Cf:case _.Vf:case _.of:case Sc:case Uc:b=this.getBufferInfo().ya(c);e=`State ${this.getSurface().getMedia().readyState} `+`Buffer: ${b}`;
400
+ break;case _.wf:null!=b&&(e=`Size: ${b.videoWidth}x${b.videoHeight}`)}e&&(d+=". "+e);this.Te.info(d)}a.type!==_.r&&this.trigger(new _.E(a.type,{detail:a}))}Se(){}};var wl;wl=new _.S("clpp.Components");_.ul=new Map;_.z("clpp.install",function(a){El(a)});_.z("clpp.uninstall",function(a){Fl(a)});var St=class{constructor(){this.a=this.f=null;this.g=new _.S("clpp.drm.csl")}release(){this.a=this.f=null}};_.z("clpp.drm.WidevineRobustnessLevel",{SW_SECURE_CRYPTO:_.Fb,SW_SECURE_DECODE:_.Gb,HW_SECURE_CRYPTO:Wa,HW_SECURE_DECODE:Xa,HW_SECURE_ALL:Va});_.z("clpp.drm.PlayreadyRobustnessLevel",{SL150:"150",SL2000:"2000",SL3000:"3000"});_.z("clpp.drm.KeySystem",{NONE:_.Be,CLEAR_KEY:_.Ke,WIDEVINE:_.xd,PLAYREADY:_.vd,FAIRPLAY:_.sd,PRIMETIME:_.rd});_.Jl={};_.z("clpp.drm.registerDrmEnvironment",_.Kl);var Nl={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,
398
401
  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,
399
402
  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,
400
403
  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,
@@ -408,98 +411,98 @@ break;case _.xf:null!=b&&(e=`Size: ${b.videoWidth}x${b.videoHeight}`)}e&&(d+=".
408
411
  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,
409
412
  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,
410
413
  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,
411
- 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]};_.It=class{constructor(a){this.I=a;this.f={}}Xa(a,b){this.f[a]=b}};_.x("clpp.drm.DrmEnvironment",_.It);_.It.prototype.setDrmSystem=_.It.prototype.Xa;_.gm=class{constructor(a,b){b=void 0===b?!1:b;this.f=_.Wg(a)?new DataView(new ArrayBuffer(a),0,a):a;this.a=0;this.h=b;this.buffer=this.f.buffer}getPosition(){return this.a}Ka(){return this.f.byteLength}seek(a){(0>a||a>=this.f.byteLength)&&_.Ml();this.a=a}};_.Rm=class{constructor(a,b){this.f=a;this.h=void 0===b?!0:b;this.a=0}getPosition(){return this.a}Ka(){return this.f.byteLength}skip(a){this.a+a>this.f.byteLength&&_.Pl();this.a+=a}seek(a){if(0>a||a>=this.f.byteLength)throw _.Pl();this.a=a}};
412
- _.x("clpp.utils.dataview.DataViewReader",_.Rm);_.em=class{constructor(){this.h=[];this.f=[];this.a=!1;this.g=new _.R("clpp.mp4")}N(a,b){a=Wl(a);this.h[a]=Jt;this.f[a]=b;return this}ca(a,b){a=Wl(a);this.h[a]=Kt;this.f[a]=b;return this}stop(){this.a=!0}parse(a,b){a=_.J(a);a=new _.Rm(new DataView(a.buffer,a.byteOffset,a.byteLength),!1);for(this.a=!1;_.Ol(a)&&!this.a;)this.Hd(0,a,b)}Hd(a,b,c){const d=b.getPosition();let e=_.O(b);var f=_.O(b);let g=!1;this.g.debug("Parsing MP4 box",_.Xl(f));switch(e){case 0:e=b.Ka()-d;break;case 1:e=_.Tl(b),g=!0}const h=
413
- this.f[f];if(h){let m=null;var k=null;this.h[f]===Kt&&(k=_.O(b),m=k>>>24,k&=16777215);f=b.getPosition()-d;var l=d+e;c&&l>b.Ka()&&(l=b.Ka());l-=b.getPosition();b=0<l?_.Vl(b,l):new Uint8Array(0);b=new _.Rm(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.Ka()-b.getPosition()),b.skip(a)}};_.x("clpp.utils.Mp4Parser",_.em);_.em.typeToString=_.Xl;
414
- _.em.allData=_.$l;_.em.sampleDescription=_.Zl;_.em.children=_.Yl;_.em.prototype.parseNext=_.em.prototype.Hd;_.em.prototype.parse=_.em.prototype.parse;_.em.prototype.stop=_.em.prototype.stop;_.em.prototype.fullBox=_.em.prototype.ca;_.em.prototype.box=_.em.prototype.N;_.em.headerSize=_.am;var Jt=0,Kt=1;var Lt=class{};_.x("clpp.utils.FairplayUtils",Lt);Lt.parseFairPlayResponse=_.mm;Lt.formatFairPlayRequest=_.im;Lt.createFairplayPayload=hm;Lt.extractContentId=_.dm;Lt.extractExtXKeyUri=bm;var sm=new _.R("clpp.drm.DrmToday"),Cm="PRODUCTION",Dm="STAGING",Em="TEST",Mt={PRODUCTION:Cm,STAGING:Dm,TEST:Em};_.x("clpp.drm.DrmToday.Environment",Mt);_.x("clpp.drm.DrmToday.WidevineCertificates",{V1_PROD:"V1_PROD",V1_STAGING:"V1_STAGING",V2:"V2"});
415
- var om="/license-proxy-widevine/cenc/",pm="/license-proxy-headerauth/drmtoday/RightsManager.asmx",qm="/license-server-fairplay/",Fm={"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",
416
- 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"},Nt=[Va,Xa,Wa,_.Gb,_.Fb],Ot=[Va,Xa,
417
- Wa,_.Gb,_.Fb],Pt=["3000","2000","150"],Qt=["2000","150"];
418
- for(const a of Object.keys(Mt)){let b=va;a!==Cm&&(b+=`_${a}`);const c=new _.It(b);let d=null;switch(a){case Cm:case Dm:d=Ll("V2");break;case Em:d=null}c.Xa(_.xd,{licenseUrl:rm(_.xd,a),videoRobustness:Nt,audioRobustness:Ot,persistentStateRequired:!1,distinctiveIdentifierRequired:!1,serverCertificate:d,modifiers:{licenseRequest:_.um,licenseResponse:_.vm}});c.Xa(_.sd,{licenseUrl:rm(_.sd,a),certificateUrl:nm(a)+"/license-server-fairplay/cert/",modifiers:{licenseRequest:_.xm,licenseResponse:_.ym,extractContentId:_.zm,
419
- certificateRequest:_.Am}});c.Xa(_.vd,{licenseUrl:rm(_.vd,a),videoRobustness:Pt,audioRobustness:Qt,modifiers:{licenseRequest:Bm}});_.Hl(c)};var Rt=class{};_.x("clpp.drm.eme.EmeFactory",Rt);var Hm=[];Rt.Apis={STANDARD:Eb,APPLE:"APPLE",WEBKIT:"WEBKIT",NOP:"NOP"};var Pm,St,Om;_.Xm=[154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149];Pm=[237,239,139,169,121,214,74,206,163,200,39,220,213,29,33,237];St=class{constructor(a,b,c){this.j=new Uint8Array(a);this.a=b;this.f=c}};Om=class extends St{};_.Wm=class extends St{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 Zm=!!(performance&&performance.mark&&performance.measure);var zn=class{constructor(a){this.f=[];this.h=[];this.a=[];8<=a.byteLength&&(new _.em).ca("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=_.Wi(_.Vl(a.reader,16)),c=[];if(0<a.version){var d=_.O(a.reader);for(let e=0;e<d;++e){const f=_.Wi(_.Vl(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});
420
- a.reader.getPosition()!==a.reader.Ka()&&_.B("Mismatch between box size and data size!")}}};var vn,Tt;
421
- _.Bo=class{constructor(a){this.D=a;this.H=new Set;this.A=this.G=this.j=null;this.O=!1;this.a=null;this.I=Tt;this.w=new _.Rs;this.K=new Ht;this.f=new Map;this.J=[];this.F=new _.xn;this.h=null;this.T=b=>{this.o=!0;this.B=!1;this.F.reject(b);a.onError(b)};this.l=new Map;this.V=new Map;this.R=new _.mk(()=>on(this));this.ua=!1;this.Y=new _.xn;this.C=!1;this.S=[];this.Z=!1;this.M=0;this.g=new _.R("clpp.drm.DrmEngine");this.X=(new _.mk(()=>{pn(this)})).vb(1);this.F.catch(()=>{});this.o=this.B=!1;this.L=
422
- null}destroy(){const a=this;return _.w(function*(){a.ua?yield a.Y:(a.ua=!0,yield qn(a),a.Y.resolve())})}keySystem(){return this.a?_.dn(this.a.keySystem):""}getDrmInfo(){return this.a}da(a){const b=this;return _.w(function*(){if(!b.C||b.I!==vn){var c=Math.floor(a.timeStamp),d=`drm.msg.${c}.start`,e=`drm.msg.${c}.end`;_.$m(d);!b.h.delayLicenseRequestUntilPlayed||b.A&&!b.A.paused||b.Z?yield En(b,a):b.S.push(a);_.$m(e);_.an(`drm.sess.msg.${c}`,d,e)}})}ba(a){const b=a.target;this.g.info("Key status changed for session",
423
- b.sessionId);const c=this.f.get(b);let d=!1;b.keyStatuses.forEach((e,f)=>{if(typeof f===_.Pf){var g=f;f=e;e=g}if(cn(this.a.keySystem)&&16===f.byteLength&&_.ok()){g=_.Bi(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.Na&&c.Na.resolve();"expired"===e&&(d=!0);f=_.J(f);let h=_.Wi(f);"00"===h&&c&&c.keyId?h=c.keyId:this.a.keySystem.startsWith(_.sd)&&16!==f.byteLength&&(h=Di(f));(f=h||"")?this.g.info(`Key status for Key ID '${h}': ${e}`):
424
- this.g.info(`Key status global keys: ${e}`);this.l.set(f,e);c&&!c.keyId&&this.f.forEach((k,l)=>{l===b||k.keyId!==h||k.loaded||(k.loaded=!0)})});c&&c.loaded&&c.fb.forEach(e=>{this.l.get(e)===Nf&&(this.g.warn(`Key status for Key ID '${e}': 'output-restricted'`),this.l.set(e,_.Me))});for(a=0;a<this.a.initData.length;a++){const e=this.a.initData[a];e.keyId&&this.l.get(e.keyId)===Nf&&_.Xi(e.initData,c.initData)&&(this.g.warn(`Key status for Key ID '${e.keyId}': 'output-restricted'`),this.l.set(e.keyId,
425
- _.Me))}a=b.expiration-Date.now();(0>a||d&&1E3>a)&&c&&!c.Jb&&(this.g.debug("Session has expired",b.sessionId),(a=this.f.get(b))&&a.vc&&a.vc.stop(),this.f.delete(b),b.close().catch(()=>{}));Nn(this)&&(this.F.resolve(),1!==this.f.size||d?this.R.fa(.5):on(this))}};vn=0;Tt=3;_.Un=new Map;_.Vn=new _.R("clpp.text");var Ut=class{constructor(){this.a=null;this.f=[]}};var Vt=class{constructor(){this.h=this.f=this.j=null;this.a=[]}};_.Wt=class{constructor(){this.f=this.o=this.A=this.C=this.j=this.l=this.h=this.w=NaN;this.a=new Ut;this.B=new Vt}getStats(){return{width:this.w,height:this.h,streamBandwidth:this.o,decodedFrames:this.j,droppedFrames:this.l,corruptedFrames:this.C,estimatedBandwidth:this.f,loadLatency:this.A,playTime:Zn(this.a,_.so),pauseTime:Zn(this.a,_.ro),bufferingTime:Zn(this.a,_.ko),stateHistory:$n(this.a),switchHistory:ao(this.B)}}};_.Xt=class{constructor(a){this.f=a;this.a=void 0}value(){void 0===this.a&&(this.a=this.f());return this.a}};var co=new _.Xt(()=>new Map([[HTMLMediaElement.HAVE_METADATA,_.qe],[HTMLMediaElement.HAVE_CURRENT_DATA,_.pe],[HTMLMediaElement.HAVE_FUTURE_DATA,Wc],[HTMLMediaElement.HAVE_ENOUGH_DATA,Xc]]));var Zt=class{constructor(a){this.g=new _.R("clpp.StateManager");this.m=a;this.a=new _.Rs;this.f=_.po;this.A=_.Yt;this.H=0;this.w=-1;this.K=this.o=this.I=this.B=0;this.j=this.h=this.F=!1;this.G=0;this.l=null;this.J=0;this.L=_.Ak();this.C=!1;this.I=Date.now();io(this)}cb(a,b){this.m&&this.m.trigger(new _.C(a,{detail:b}))}getState(){return lo(this,"")}T(a){(a=a&&a.detail)&&a.severity&&a.severity===_.E&&go(this,_.oo)}destroy(){this.g.debug("Stop watching for video events for "+this.m.namespace());this.a.release()}};_.x("clpp.utils.media.detectType",to);var wo=new _.R("clpp.sources");var $t=class extends _.Gt{constructor(){super(md);this.w=this.G=!1;this.l=this.A=this.o=this.a=this.j=null;this.h=new _.Rs;this.F=this.B=this.f=this.H=null}init(a,b){super.init(a,b);this.j=new Zt(this);go(this.j,_.po)}namespace(){return md}unload(){const a=this;return _.w(function*(){if(a.ea){a.log.debug("Releasing player with source",a.ea);a.B&&(a.B.stop(),a.B=null);const b=a.getTrackManager();b&&b.release();a.A&&(a.A.destroy(),a.A=null);a.O&&(a.O.destroy(),a.O=null);a.l&&a.l.release();a.o&&(a.o.destroy(),
426
- a.o=null);_.ph(a.h);a.f&&(a.f=new _.Wt);a.F=null;a.ea=null;a.G=!1;a.a&&(a.a.removeAttribute("src"),a.a.load());yield yo(a)}})}release(){return super.release().then(()=>this.unload()).then(()=>{this.j&&go(this.j,_.po)})}destroy(){if(this.w)return this.log.warn("Player is already destroyed!"),Promise.resolve();this.w=!0;return super.destroy().then(()=>this.release()).then(()=>{this.log.debug(xa);const a=this.getTrackManager();a&&a.destroy();this.l&&(this.l.destroy().catch(b=>{this.log.warn("Error while disposing metadata handler",
427
- b)}),this.l=null);this.j&&(this.j.destroy(),this.j=null);this.f=null})}getDrmInfo(){return this.o?this.o.getDrmInfo():null}detach(){}setSeekInterceptor(){}getTrackManager(){return this.Kb}load(a){const b=this;return _.w(function*(){if(b.w)return xo();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()/1E3;b.f=new _.Wt;b.h.on(b,_.Mf,()=>{b.f&&_.Yn(b.f.a,b.getState())});go(b.j,_.qo);b.ea=_.vo(a);b.configuration=
428
- _.pl(b.da,a);b.log.debug(_.db,b.configuration);b.log.debug(_.xb,b.ea);const d=_.Xn(b.configuration,[_.ae,"native"]);b.O=d.create(b);b.O.setTextVisibility(!0);b.configuration.enableHtmlCue&&_.sl(_.Sf)&&!_.Ck()&&(b.A=new et(b),b.A.start(c));b.l?b.l.release():b.l=new Ss(b);c.textTracks&&Oh(b.l,c.textTracks);b.getTrackManager().load();c.loop=!!b.configuration.loop;_.z(b.configuration.volume)||b.setVolume(b.configuration.volume);_.z(b.configuration.muted)||b.setMuted(b.configuration.muted);b.h.one(c,Wc,
429
- ()=>{b.trigger(new _.C(_.Bt))});null==b.configuration.startTime&&Go(b,c);_.Ak()&&Ho(b,c);try{yield Ao(b,c),yield Co(b),yield Fo(b).W}catch(e){b.G=!1,b.onError(e)}})}onError(a){this.G||(a.severity===_.E&&null!==this.j&&go(this.j,_.oo),this.trigger(new _.C(_.Ud,{detail:a})))}Tf(){return new T}getState(){return null!==this.j?this.j.getState().currentState:_.Yt}getPresentationStartTime(){if(this.a&&this.a.getStartDate&&this.isLive()){const a=this.a.getStartDate();return isNaN(a.getTime())?null:a.getTime()/
430
- 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 _.bo();this.f&&_.Yn(this.f.a,this.getState());var a=this.a,b=this.f,c=a.videoHeight;b.w=a.videoWidth;b.h=c;a.getVideoPlaybackQuality&&(c=a.getVideoPlaybackQuality(),a=this.f,b=Number(c.totalVideoFrames),
431
- a.l=Number(c.droppedVideoFrames),a.j=b,this.f.C=Number(c.corruptedVideoFrames));if(a=this.getTrackManager())if(a=a.ma())a.bandwidth&&(this.f.o=a.bandwidth),a.Kc&&(this.f.f=a.Kc);return this.f.getStats()}getTimelineCues(){return this.l?this.l.getTimelineCues():[]}getCueTimeline(){return null}};
432
- _.mh(new class{a(){return md}canPlay(a,b){a=a.type||"";const c=a===_.Ac,d=a===_.Fc,e=a===_.hl;var f;_.zk()||c||d||e&&!_.Ak()?f=0:f=""!==nk().canPlayType(a)?e&&_.Ak()&&(window.ManagedMediaSource||window.MediaSource&&MediaSource.isTypeSupported)&&!b.streaming.preferNativeHlsOnSafari?1:2:0;return f}f(a){return a===_.la}create(){return new $t}});_.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 Jo=new _.R("clpp.ads"),Io=[];var au=class{load(){}start(){}w(){}resume(){}pause(){}skip(){}getVolume(){}setVolume(){}getPosition(){}h(){}o(){}};_.x("clpp.ads.IAdsManager",au);au.prototype.getPosition=au.prototype.getPosition;au.prototype.setVolume=au.prototype.setVolume;au.prototype.getVolume=au.prototype.getVolume;au.prototype.skip=au.prototype.skip;au.prototype.pause=au.prototype.pause;au.prototype.resume=au.prototype.resume;var U=class{hb(){}ib(){}ob(){}getId(){}getCreativeId(){}getApiFramework(){}getAdSystem(){}getAdvertiserName(){}getTitle(){}getDuration(){}getPosition(){}getSkipTimeOffset(){}Nb(){}xb(){}getMediaUrl(){}lb(){}kb(){}Za(){}Va(){}getPodIndex(){}Bb(){}Cb(){}nb(){}getWrapperAdIds(){}getWrapperAdSystems(){}getWrapperCreativeIds(){}};_.x("clpp.ads.IAd",U);U.prototype.getWrapperCreativeIds=U.prototype.getWrapperCreativeIds;U.prototype.getWrapperAdSystems=U.prototype.getWrapperAdSystems;
433
- U.prototype.getWrapperAdIds=U.prototype.getWrapperAdIds;U.prototype.getSequenceLength=U.prototype.nb;U.prototype.getPositionInSequence=U.prototype.Cb;U.prototype.getPodTimeOffset=U.prototype.Bb;U.prototype.getPodIndex=U.prototype.getPodIndex;U.prototype.getPodType=U.prototype.Va;U.prototype.getMediaBitrate=U.prototype.Za;U.prototype.getMediaHeight=U.prototype.kb;U.prototype.getMediaWidth=U.prototype.lb;U.prototype.getMediaUrl=U.prototype.getMediaUrl;U.prototype.getClickThroughUrl=U.prototype.xb;
434
- U.prototype.isBumper=U.prototype.Nb;U.prototype.getSkipTimeOffset=U.prototype.getSkipTimeOffset;U.prototype.getPosition=U.prototype.getPosition;U.prototype.getDuration=U.prototype.getDuration;U.prototype.getTitle=U.prototype.getTitle;U.prototype.getAdvertiserName=U.prototype.getAdvertiserName;U.prototype.getAdSystem=U.prototype.getAdSystem;U.prototype.getApiFramework=U.prototype.getApiFramework;U.prototype.getCreativeId=U.prototype.getCreativeId;U.prototype.getId=U.prototype.getId;
435
- U.prototype.getTechnology=U.prototype.ob;U.prototype.getAdManagerVersion=U.prototype.ib;U.prototype.getAdManagerName=U.prototype.hb;var P=class{constructor(a,b,c,d){this.w=this.o=this.l=!1;this.A=a;this.a=b;this.f=c;this.h=d;this.j=0}hb(){return""}ib(){return""}ob(){return 2}getId(){return""}getCreativeId(){return""}getApiFramework(){return null}getAdSystem(){return""}getAdvertiserName(){return""}getTitle(){return""}getDuration(){return this.h}getPosition(){return this.j}getSkipTimeOffset(){return-1}Nb(){return!1}xb(){return null}getMediaUrl(){return null}lb(){return 0}kb(){return 0}Za(){return 0}Va(){return this.A}getPodIndex(){return 0}Bb(){return 0}Cb(){return this.a}nb(){return this.f}getWrapperAdIds(){return[]}getWrapperAdSystems(){return[]}getWrapperCreativeIds(){return[]}};
436
- P.prototype.getWrapperCreativeIds=P.prototype.getWrapperCreativeIds;P.prototype.getWrapperAdSystems=P.prototype.getWrapperAdSystems;P.prototype.getWrapperAdIds=P.prototype.getWrapperAdIds;P.prototype.getSequenceLength=P.prototype.nb;P.prototype.getPositionInSequence=P.prototype.Cb;P.prototype.getPodTimeOffset=P.prototype.Bb;P.prototype.getPodIndex=P.prototype.getPodIndex;P.prototype.getPodType=P.prototype.Va;P.prototype.getMediaBitrate=P.prototype.Za;P.prototype.getMediaHeight=P.prototype.kb;
437
- P.prototype.getMediaWidth=P.prototype.lb;P.prototype.getMediaUrl=P.prototype.getMediaUrl;P.prototype.getClickThroughUrl=P.prototype.xb;P.prototype.isBumper=P.prototype.Nb;P.prototype.getSkipTimeOffset=P.prototype.getSkipTimeOffset;P.prototype.getPosition=P.prototype.getPosition;P.prototype.getDuration=P.prototype.getDuration;P.prototype.getTitle=P.prototype.getTitle;P.prototype.getAdvertiserName=P.prototype.getAdvertiserName;P.prototype.getAdSystem=P.prototype.getAdSystem;
438
- P.prototype.getApiFramework=P.prototype.getApiFramework;P.prototype.getCreativeId=P.prototype.getCreativeId;P.prototype.getId=P.prototype.getId;P.prototype.getTechnology=P.prototype.ob;P.prototype.getAdManagerVersion=P.prototype.ib;P.prototype.getAdManagerName=P.prototype.hb;var bu=class{constructor(a){this.a=a.map(b=>({videoId:b.getSurface().getMedia().id,player:b,md:!0,ready:Promise.resolve()}));this.g=new _.R("clpp.plist.PlayerPool")}has(){return this.a.some(a=>a.md)}get(){const a=this;return _.w(function*(){const b=a.a.find(c=>c.md);if(!b)throw Error("No available players in the pool");b.md=!1;yield b.ready;return b.player})}release(a){const b=this.a.find(c=>c.player===a);if(!b)return Promise.resolve();b.md=!0;b.ready=new Promise(c=>{a.release().catch(d=>{this.g.error("Failed to unload player",
439
- 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",_.Po);var cu=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=Qo(this,a)}get(){return this.a}};var Vo=class{constructor(a,b){this.g=new _.R("clpp.PlayerSurface");this.w=_.Og(du,b);this.f=new cu;this.h=null;this.a=new cu;this.l=eu;eu+=1;this.o=`clpp-video-${this.l}`;this.j=new _.Rs;if(null==a)throw new _.G(_.E,7,7102,"No Media element was provided");if(!(a instanceof Element||(a=document.getElementById(a),a)))throw new _.G(_.E,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
440
- HTMLMediaElement))throw new _.G(_.E,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 _.G(_.E,7,7006,"Container element is not a direct parent of media element");d=b.containerEl}else{c=document.createElement(_.Ed);a.parentNode?a.parentNode.replaceChild(c,
441
- 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),_.No(c,f);c.style.cssText=a.style.cssText;a.removeAttribute(_.Rf);for(d of[_.Bg,_.Zd])f=a.getAttribute(d),f=parseInt(f,10),isNaN(f)||(c.style[d]=`${f}px`),_.qk()||a.removeAttribute(d);c.appendChild(a);d=c}d&&(this.a.set(d),Ro(this.a,"clpp-container"),
442
- Ro(this.a,this.o),Ro(this.f,_.fd),Ro(this.f,"clpp-video"));b.webOSStartupPatch&&So(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?_.No(a,gd):this.g.debug("No media element available that could be hidden")}showMediaElement(){const a=this.getMedia();a?a.classList.remove(gd):
443
- 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&&_.No(a,_.fd);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){_.No(a,gd)}show(a){a.classList.remove(gd)}release(){this.j.release()}};
444
- Vo.prototype.removeElementFromContainer=Vo.prototype.removeElementFromContainer;Vo.prototype.addElementToContainer=Vo.prototype.addElementToContainer;Vo.prototype.getCastElement=Vo.prototype.getCastElement;Vo.prototype.getContainer=Vo.prototype.getContainer;Vo.prototype.getMedia=Vo.prototype.getMedia;var du={disableContainer:!1,webOSStartupPatch:!0,crossorigin:"anonymous",containerEl:null},eu=1;var fu=class{constructor(a){this.za=a;this.h=[];this.f=a.Kf;this.w=a.Kf.getSurface().getContainer();if(!this.w)throw Error("Primary player does not have a container");this.A=[];const b=Wo(this,this.w,this.za.ug);this.l=new bu(b);this.a=null;this.o=!1;this.j=new Map;this.B=a.toggleVisible;this.g=new _.R("clpp.interstitial.MultiController");Xo(this).forEach(c=>Yo(this,c,!1))}getCurrentItem(){return this.a}ud(){return this.a?this.a.player:null}mf(){return Array.from(this.j.values())}Vc(){return 0<this.j.size}play(a){return lp(this,
445
- a,_.Re)}load(a){return lp(this,a,_.le)}release(){const a=this;return _.w(function*(){yield Promise.all([jp(a),a.a?ip(a,a.a):Promise.resolve()]);a.a=null;a.o=!1;ap(a)})}destroy(){const a=this;return _.w(function*(){a.g.info("Destroy");yield a.release();yield a.l.destroy();vp(a)})}},pp="preload",mp=_.se;var hu=class extends _.Dt{constructor(a){super();this.l=new gu;this.za=_.Og({kh:.5,li:{enabled:!1}},a);this.g=new _.R("clpp.interstitial.Player");this.f=a.player;this.f.setSeekInterceptor(b=>{const c=yp(this,b);return c&&[Fp,Sp].includes(c.state)?(this.g.info("Seeking into an interstitial",c.sa),Bp(this,c).catch(()=>{this.f.seek(b)}),!1):!0});this.qa=new fu({ug:this.za.config,Kf:a.player,preloadMedia:!0,ya:a.ya});this.h=[];this.a=[];this.j=!1;Jp(this,a.player)}destroy(){const a=this;return _.w(function*(){Kp(a);
446
- a.a=[];a.j=!1;a.f.setSeekInterceptor(null);a.l.release();yield a.qa.destroy()})}Eb(){return this.j}isLive(){const a=this.qa.ud();return a?a.isLive():null}cb(a){this.f.trigger(a)}},Fp=0,Tp=1,Vp=2,Wp=3,Yp=4,Xp=5,Sp=6,gu=class{constructor(){this.a=null}release(){this.a&&(this.a.shutdown(),this.a=null)}};var Iq=class{constructor(){this.a=null}load(){return Promise.resolve()}start(){return Promise.resolve()}w(a,b){const c=a.getConfiguration();a=Object.assign({},{config:c,player:a,ya:b},c.ads.hls||{});this.a=new hu(a);Rp(this.a)}resume(){const a=Lp(this.a);a&&a.play()}pause(){const a=Lp(this.a);a&&a.pause()}skip(){}getVolume(){const a=Lp(this.a);return a?a.getVolume()||0:0}setVolume(a){const b=Lp(this.a);if(b)return b.setVolume(a)}getPosition(){const a=Lp(this.a);return a?a.getPosition():-1}o(){return!this.a.Eb()}h(){return this.a.destroy()}};
447
- Iq.prototype.getPosition=Iq.prototype.getPosition;Iq.prototype.setVolume=Iq.prototype.setVolume;Iq.prototype.getVolume=Iq.prototype.getVolume;Iq.prototype.skip=Iq.prototype.skip;Iq.prototype.pause=Iq.prototype.pause;Iq.prototype.resume=Iq.prototype.resume;var iu=class{constructor(a){this.m=a;this.j=this.m.getNetworkEngine();this.a=new _.Rs;this.h=null;this.f=!0;bq(this)}release(){this.a.release();cq(this);this.m=null}};_.x("clpp.polyfill.installAll",fq);var eq=[];_.x("clpp.polyfill.register",_.gq);var kq=class{constructor(a,b,c){this.h=a;this.f=b;JSON.parse(_.Ei(_.Ui(a)));this.a=JSON.parse(_.Ei(_.Ui(b)));this.j=c}};var iq={n:"vXdoJIQCz6sZ9pbduNukEHOR0H2dHlwuuBUAR5Ot7WLEYvav5mn63yxr6F6TIl8RHTFw2siXQhHblZH2Y89o8vhcZRFkYXo6h0igEVafu-n0w52UEcH8Cqzlb8Q7x03Qb8OcKLngSzDkwe5Y2Aix6I66RRVNLLssqyjp2n5tXs4JQmYdqY6hhpGhmBN84naeCTdcPpAYhCw8jqbTSNrJp5hjU4GVvOiUtoYCvdESV9xrOR7fPCFXhWfLtC3i1k1zVoIM7YW5qD0F676jhqkF-GmDuCHpRY2I2Cxui-ytYEVIM6_pylSIlmYLjARmv2jXz9aV_WvHLh6B8Yx0slNGCQ",e:"AQAB"},ll="eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJ1cmxzIjpbIjovL2Nhc3RsYWJzLmNvbSJdLCJ0eXBlIjoiV2ViIiwia2lkIjoxOTUwLCJpbHYiOmZhbHNlfQ.jzGGRcbFr_2QET-4tbMcpR5pSaj7eV7X2d1HWw_VKQpPg3zCwSZSDuqw225dIYyAYwLSiElbozbZPSArkBXOsoUm-KZRUPF4m7WG0T7Uza5G-QaQw57BbbfcSsooSpatC997kHKLMTjO71By9Olcu5ykN164nZpGQtZNzQjYag-bnUaMVI5vvhzjlvDihORQ9V_qRlEh0-mpoz6W0-36HGAbWIXWq0kxPh6inbovby-ZmFpqGrVjWOEFa55EARZXPNW9ERupW5xrrYHZdwwTpdRTY5IwEnobS85yTrLhK8Y2MV4jlQLTtQp372fKDsuU6q6_4XvmNq1SgAoKoaf41g";var Kq=class{constructor(a){this.f=a;this.a=null;this.g=new _.R("clpp.utils.LicenseKey")}},xq="vod",wq="live";var br,Bq,Eq,Cq;br=class{constructor(a){this.m=a;this.f=a.getNetworkEngine();this.h=Fq(this);this.f.sc(this.h);this.a=null}release(){this.a=null;this.f.ed(this.h)}};_.ju="maxSuggestedBitrateKbps";Bq={du:"duress",etp:_.Vd,mb:_.ju,rd:"responseDelay",rtt:"roundTripTime"};Eq={at:"availabilityTime",br:"encodedBitrateKbps",ht:"heldTime",n:"intermediaryIdentifier",nor:"nextObjectResponse",nrr:"nextRangeResponse",d:"objectDuration",ot:"objectType",su:"startup",st:"streamType",sf:"streamingFormat",v:hg};
448
- Cq=new _.R("clpp.net.CmsdManager");var Q=class extends _.Dt{constructor(a,b,c){super();fq();this.g=new _.R("clpp.Player");if(!a)throw new _.G(_.E,7,7102);this.Y=new _.Rs;this.f=this.C=b||_.nl();this.l=null;void 0===this.f.license&&(this.f.license=ll,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 _.G(_.E,7,7101,"No license provided in configuration!");this.j=new Vo(a,c);this.A=this.a=this.F=
449
- null;this.H=new _.yq;this.h=null;this.V=[];this.X=!0;this.J={};this.Z=null;this.O=!0;this.R=this.M=!1;this.K=this.xc=null;this.Vd=!1;this.da=new iu(this);this.B=null;this.on(_.Mf,()=>{this.getState()===_.oo&&(this.a?this.a.unload():Promise.resolve())});this.on(_.xc,this.ba.bind(this));this.on(_.wc,this.ba.bind(this));this.on(_.Fh,()=>Jq(this));Lq(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."),
450
- 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 Gq)try{const e=d.create(this.f);e&&a.push(e)}catch(e){this.g.error("Error while creating player plugin",e)}Nq(this,a);this.L=_.la;xl(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 _.C(_.Ud,{detail:a}),this.trigger(a)}Sc(a){a=
451
- this.J[a];void 0===a&&(a=null);return a}getSurface(){return this.j}getConfiguration(){return _.Pg(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=Qq(this);return this.l.finally(()=>{this.g.debug("Player released");this.l=null})}destroy(){if(this.M)return this.g.debug("The player is already destroyed. No-op"),
452
- new Promise(a=>a());this.M=!0;return this.release().then(()=>{this.g.debug(xa);this.trigger(new _.C("destroying"));return _.Mq(this,_.Ge)}).then(()=>{this.a&&this.a.stopForwardingEventsTo(this);this.Qc.clear();this.da.release();if(this.a)return this.a.destroy()}).then(()=>this.H.destroy()).then(()=>{Al();this.A=this.a=null;this.trigger(new _.C("destroyed"))})}load(a){const b=this;return _.w(function*(){try{_.$m(Ze);b.L=_.la;b.X=!0;const c=_.vo(a),d=ql(a)?a:{};if(d.license)throw new _.G(_.E,7,7100,
453
- "License cannot be passed into the load method.");yield _.Xq(b,d,c);yield _.Yq(b);yield _.$q(b);_.$m(Ye);_.an("player.load",Ze,Ye)}catch(c){if(b.l)throw b.g.info(cb),new _.G(_.E,7,7E3);throw c;}})}preload(a){const b=this;return _.w(function*(){yield _.Xq(b,a);if(b.a){var c=b.a;c.preload?yield c.preload(b.f):b.g.warn(zb)}else b.g.warn(wb)})}use(a){(a=Bl(a))&&a.o(this)}remove(a){return(this.getState()<=_.po||this.O)&&null!==vl(a)?(Cl(a),this.R=!0):!1}play(){return this.a?!this.h||this.h instanceof Iq||
454
- this.a.namespace()===_.jd?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 _.Ct}getState(){return this.a?this.a.getState():_.po}getPeriods(){return this.a?this.a.getPeriods():[]}isEnded(){return this.a&&
455
- 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()===_.oo?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}}kc(){const a=this.a;return a&&a.kc?a.kc():null}getVolume(){return this.a?this.a.getVolume():
456
- 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.a&&this.a.isMuted()||!1}setMuted(a){this.a&&this.a.setMuted(a)}getNetworkEngine(){return this.H}setNetworkEngine(a){this.H=a}getTextDisplayer(){return this.a&&this.a.getTextDisplayer()}isLive(){return!!this.a&&
457
- this.a.isLive()}getStats(){return this.a?this.a.getStats():null}qf(){return Object.freeze(this.Z)}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.xc=a;Uq(this)}setCdnErrorCallback(a){this.K=a;this.a&&this.a.setCdnErrorCallback(this.K)}ba(){this.Vd=!0}};_.x("clpp.Player",Q);Q.registerPlugin=_.Hq;
458
- Q.prototype.setCdnErrorCallback=Q.prototype.setCdnErrorCallback;Q.prototype.setDrmCustomDataModifier=Q.prototype.setDrmCustomDataModifier;Q.prototype.resetAbr=Q.prototype.resetAbr;Q.prototype.getTimelineCues=Q.prototype.getTimelineCues;Q.prototype.getLoadedSource=Q.prototype.getLoadedSource;Q.prototype.getSources=Q.prototype.qf;Q.prototype.getStats=Q.prototype.getStats;Q.prototype.isLive=Q.prototype.isLive;Q.prototype.getTextDisplayer=Q.prototype.getTextDisplayer;Q.prototype.setNetworkEngine=Q.prototype.setNetworkEngine;
459
- Q.prototype.getNetworkEngine=Q.prototype.getNetworkEngine;Q.prototype.setMuted=Q.prototype.setMuted;Q.prototype.isMuted=Q.prototype.isMuted;Q.prototype.setPlaybackRate=Q.prototype.setPlaybackRate;Q.prototype.getPlaybackRate=Q.prototype.getPlaybackRate;Q.prototype.namespace=Q.prototype.namespace;Q.prototype.getAdsManager=Q.prototype.getAdsManager;Q.prototype.getDuration=Q.prototype.getDuration;Q.prototype.setVolume=Q.prototype.setVolume;Q.prototype.getVolume=Q.prototype.getVolume;
460
- Q.prototype.getTimelineOffset=Q.prototype.kc;Q.prototype.getSeekRange=Q.prototype.getSeekRange;Q.prototype.getPresentationStartTime=Q.prototype.getPresentationStartTime;Q.prototype.seek=Q.prototype.seek;Q.prototype.getPosition=Q.prototype.getPosition;Q.prototype.isPaused=Q.prototype.isPaused;Q.prototype.isEnded=Q.prototype.isEnded;Q.prototype.getState=Q.prototype.getState;Q.prototype.getBufferInfo=Q.prototype.getBufferInfo;Q.prototype.getTrackManager=Q.prototype.getTrackManager;
461
- Q.prototype.pause=Q.prototype.pause;Q.prototype.play=Q.prototype.play;Q.prototype.remove=Q.prototype.remove;Q.prototype.use=Q.prototype.use;Q.prototype.load=Q.prototype.load;Q.prototype.destroy=Q.prototype.destroy;Q.prototype.release=Q.prototype.release;Q.prototype.getDrmInfo=Q.prototype.getDrmInfo;Q.prototype.getConfiguration=Q.prototype.getConfiguration;Q.prototype.getSurface=Q.prototype.getSurface;Q.prototype.getPlugin=Q.prototype.Sc;Q.prototype.off=Q.prototype.off;Q.prototype.one=Q.prototype.one;
462
- Q.prototype.on=Q.prototype.on;_.po=0;_.qo=1;_.ko=2;_.so=3;_.ro=4;_.ho=5;_.oo=6;_.Yt=7;_.no={IDLE:_.po,PREPARING:_.qo,BUFFERING:_.ko,PLAYING:_.so,PAUSED:_.ro,ENDED:_.ho,ERROR:_.oo,UNSET:_.Yt};Q.State=_.no;var Gq=[];var ku=class extends Q{constructor(a,b,c){super(a,b,c);a={manifest:{timeline:{version:2},keepTimelineLive:!0},streaming:{preferNativeHlsOnSafari:!1,enableLiveEdgeChasing:!1,startAtSegmentBoundary:!1}};this.C=_.Og(this.C,a);this.f=_.Og(this.f,a);this.G=0;this.o=[];this.S=!1;this.w=null;this.I=[]}open(a,b){const c=this;return _.w(function*(){if(c.w)throw new _.G(_.E,7,7008,`Cannot call open() while ${c.w}() is ongoing!`);if(0!==a)throw new _.G(_.E,7,7007,"The index parameter only supports the value of 0.");
463
- if(0===b.length)throw new _.G(_.E,7,7003,mb);if(b.some(g=>!g.id||!g.source))throw new _.G(_.E,7,7100,"Some config is missing required properties `id` or `source`!");if((new Set(b.map(g=>g.id))).size!==b.length)throw new _.G(_.E,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 _.G(_.E,7,7100,"Unsupported `playlist.timeline` config value!");e=d.startTime;if(null!=e&&(typeof e!==_.r||0>e))throw new _.G(_.E,
464
- 7,7100,"Invalid `playlist.startTime` config value!");f=d.endTime;if(null!=f&&(typeof f!==_.r||0>f||null!=e&&f<=e))throw new _.G(_.E,7,7100,"Invalid `playlist.endTime` config value!");if("DVR"===d.content&&!f)throw new _.G(_.E,7,7100,"`playlist.endTime` config value is required for DVR content!");}try{dr(c),c.w="open",yield gr(c,b),c.G=0,c.o=b,c.S=!0,hr(c,b[0].playlist||{})}finally{c.w=null}})}fg(a){const b=this;return _.w(function*(){if(b.w)throw new _.G(_.E,7,7008,`Cannot call addItem() while ${b.w}() is ongoing!`);
465
- if(!b.S)throw new _.G(_.E,7,7008,"open() must be called before addItem()!");if(!a.id||!a.source)throw new _.G(_.E,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 _.G(_.E,7,7100,"A config with this `id` already exists in the playlist!");try{b.w="addItem",b.o.push(a),yield ir(b,a)}finally{b.w=null}})}getCurrentItem(){return this.o[this.G]||null}getCurrentItemIndex(){return this.G}Jg(){return[...this.o]}Tc(){return this.o.length}getTimeline(){return this.a?
466
- this.a.getTimeline():null}seekWith(a){return this.a?this.a.seekWith(a):Promise.resolve()}release(){this.o=[];this.G=0;this.S=!1;return super.release()}destroy(){dr(this);return super.destroy()}setCdnErrorCallback(){throw new _.G(1,7,7009,"CDN switching is not supported!");}};_.x("clpp.plist.ScPlaylist",ku);ku.prototype.setCdnErrorCallback=ku.prototype.setCdnErrorCallback;ku.prototype.destroy=ku.prototype.destroy;ku.prototype.release=ku.prototype.release;ku.prototype.seekWith=ku.prototype.seekWith;
467
- ku.prototype.getTimeline=ku.prototype.getTimeline;ku.prototype.getSize=ku.prototype.Tc;ku.prototype.getPlaylist=ku.prototype.Jg;ku.prototype.getCurrentItemIndex=ku.prototype.getCurrentItemIndex;ku.prototype.getCurrentItem=ku.prototype.getCurrentItem;ku.prototype.addItem=ku.prototype.fg;ku.prototype.open=ku.prototype.open;var lu=class extends _.Dt{constructor(a){super();this.za=_.Og({transition:_.Ne,preloadMedia:!1},a);this.h=[];this.a=0;const b=jr(a.anchorId,this.za.config);this.o=new bu(b);this.f=null;this.j=!1;this.l=new Map;this.w=a.toggleVisible;this.g=new _.R(nd);this.o.a.forEach(c=>kr(this,c.player,!1))}Rc(){return this.f}ud(){return this.f?this.f.player:null}lf(){return this.l.get(this.a+1)||null}nf(){return this.l.get(this.a-1)||null}mf(){return[this.nf(),this.lf()].filter(Boolean)}xh(a){if(0<this.h.length)throw Error("Cannot re-set items in the playlist");
468
- this.g.info("Set items",a);this.h=a.map((b,c)=>({config:b,index:c,preloadPromise:Promise.resolve(),disposers:[]}))}wh(a){if(0===this.h.length)throw Error(lb);if(0>a||a>this.h.length-1)throw Error("Index out of bounds");this.a=a}Vc(){return this.a<this.h.length-1}rf(){return 0<this.a}ih(){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(lb);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})`),
469
- yield nr(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,rr(a)}}})}Hf(){const a=this;return _.w(function*(){if(a.j)a.g.warn("Cannot play next item while busy");else if(a.Vc()){a.j=!0;a.a+=1;a.g.info(`Next (index: ${a.a})`);var b=a.f;a.za.transition===_.Ne&&b.player.pause();wr(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 sr(a,c),a.g.info(`Next playing (index: ${a.a})`)}catch(d){throw a.g.error(`Next failed (index: ${a.a})`),
470
- d;}finally{a.j=!1,b&&vr(a,b),rr(a)}}else a.g.warn("There are no more items in the playlist")})}jh(){const a=this;return _.w(function*(){if(a.j)a.g.warn("Cannot play previous item while busy");else if(a.rf()){a.j=!0;--a.a;a.g.info(`Previous (index: ${a.a})`);var b=a.f;a.za.transition===_.Ne&&b.player.pause();wr(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 sr(a,c),a.g.info(`Previous playing (index: ${a.a})`)}catch(d){throw a.g.error(`Previous failed (index: ${a.a})`),
471
- d;}finally{a.j=!1,b&&vr(a,b),rr(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([xr(a),a.f?vr(a,a.f):Promise.resolve()]);yield yr(a)})}};_.x(nd,lu);lu.prototype.destroy=lu.prototype.destroy;lu.prototype.playPrev=lu.prototype.jh;lu.prototype.playNext=lu.prototype.Hf;lu.prototype.playFirst=lu.prototype.ih;lu.prototype.hasPrev=lu.prototype.rf;lu.prototype.hasNext=lu.prototype.Vc;
472
- lu.prototype.setIndex=lu.prototype.wh;lu.prototype.setItems=lu.prototype.xh;lu.prototype.getPreloading=lu.prototype.mf;lu.prototype.getPrev=lu.prototype.nf;lu.prototype.getNext=lu.prototype.lf;lu.prototype.getCurrentPlayer=lu.prototype.ud;lu.prototype.getCurrent=lu.prototype.Rc;var ur="preload",lr=_.se;var zr=new Map;var ou=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]===_.Hc;if(!window.muxjs||!c&&!d)return!1;if(d)return _.Ar(Lc);if(b)return _.Ar(Br(b,a));b=Br(_.p,a);a=Br(_.t,a);return _.Ar(b)||_.Ar(a)}isMuxed(a,b){return 1<this.demuxMimeTypes(a,b).size}demuxMimeTypes(a,
473
- b){const c=new Map;c.set(a,b);try{const d=_.hk(b),e=_.ik(b).split(","),f=new Map,g=oi(_.p,e),h=oi(_.t,e);g&&f.set(_.p,this.convertCodecs(_.p,_.gk(d,g)));h&&f.set(_.t,this.convertCodecs(_.t,_.gk(d,h)));return f}catch(d){return c}}convertCodecs(a,b){return b.toLowerCase().split(";")[0]===_.Hc?Lc:"mp2t"===b.toLowerCase().split(";")[0].split("/")[1]?Br(a,b):b}getOriginalMimeType(){return this.h}transmux(a){const b=[],c=[];let d=[],e=null;a=_.J(a);const f=h=>{d=h.captions;const k=new Uint8Array(h.data.byteLength+
474
- h.initSegment.byteLength);k.set(h.initSegment,0);k.set(h.data,h.initSegment.byteLength);h.type===mu?b.push(k):h.type===nu&&c.push(k)},g=()=>{e={video:_.Yi(...b),captions:d,audio:_.Yi(...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 _.G(_.E,3,3018);return e}};bk(_.Hc,()=>new ou(_.Hc));bk(_.kg,()=>new ou(_.kg));var nu=_.p,mu=_.t;var pu=class{getCuePoints(){}Eb(){}Db(){}};_.x("clpp.ads.IAdsTimeline",pu);pu.prototype.hasPostroll=pu.prototype.Db;pu.prototype.hasPreroll=pu.prototype.Eb;pu.prototype.getCuePoints=pu.prototype.getCuePoints;_.qu=class{f(){}a(){}h(){}o(){}};var ru=class{constructor(){this.j=null;this.g=new _.R("clpp.drm.eme.StandardEmeManager")}l(a){this.j=a}h(a){return this.j?this.j.setMediaKeys(a):Promise.reject(ib)}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 Eb}};
475
- Im(new class{a(){return Eb}f(){return!!(window.MediaKeys&&navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)}create(){return new ru}},1E3);var tu=class{constructor(){this.size=0;this.a=void 0;this.g=new _.R("clpp.drm.eme.MediaKeyStatusMap")}getStatus(){return this.a}forEach(a){this.a&&a(this.a,su.value())}get(a){if(this.has(a))return this.a}has(a){const b=su.value();return this.a&&wi(a,b)?!0:!1}entries(){}keys(){}values(){}},su=new _.Xt(()=>Ci(new Uint8Array([0])));var uu=class{l(){}h(a){_.ih("NopEmeManager.setMediaKeys");return null===a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}o(){return null}a(){_.ih("NopEmeManager.requestMediaKeySystemAccess");return Promise.reject(Error("The key system specified is not supported."))}f(){return"NOP"}};Im(new class{a(){return"NOP"}f(){return!0}create(){return new uu}},-1);var wu=class{constructor(){this.j=this.w=null}l(a){this.w=a}h(a){const b=this.j;b&&b!==a&&Dr(b,null);return(this.j=a)?Dr(a,this.w):Promise.resolve()}o(){return this.j}a(a,b){_.ih("AppleEmeManager.requestMediaKeySystemAccess");try{const c=new vu(a,b);return Promise.resolve(c)}catch(c){return Promise.reject(c)}}f(){return"APPLE"}},vu=class{constructor(a,b){this.keySystem=a;if(a.startsWith(_.sd))for(var c of b){a:{a=c;if(a.persistentState===_.wf){a=null;break a}b={audioCapabilities:[],videoCapabilities:[],
476
- persistentState:_.Ke,distinctiveIdentifier:_.Ke,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),
477
- e=!0));d||(e=WebKitMediaKeys.isTypeSupported(this.keySystem,_.lg));a=e?b:null}if(a){this.a=a;return}}c=Error(Qb);c.name=rb;c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}createMediaKeys(){const a=new xu(this.keySystem);return Promise.resolve(a)}getConfiguration(){_.ih("AppleEmeManager.MediaKeySystemAccess.getConfiguration");return this.a}},xu=class{constructor(a){this.f=null;this.h=new WebKitMediaKeys(a);this.a=new _.Rs;this.j=0;this.g=new _.R(ld);this.g.info("Created Media Keys for "+a)}createSession(a){a=
478
- void 0===a?Tf:a;this.g.debug("Creating Apple MediaKeys Session");if(a!==Tf)throw new TypeError("Session type "+a+ba);return new yu(this.h,`__session_${this.j++}`)}setServerCertificate(){this.g.debug("AppleEmeManager.MediaKeys.setServerCertificate");return Promise.resolve(!1)}},yu=class extends _.Dt{constructor(a,b){super();this.a=null;this.o=a;this.f=this.h=null;this.j=new _.Rs;this.sessionId=b;this.expiration=NaN;this.closed=new _.xn;this.l=!1;this.keyStatuses=new tu;this.g=new _.R(ld)}generateRequest(a,
479
- b){if(this.l)return Promise.reject(Hb);this.g.debug("generateRequest");this.h=new _.xn;try{const c=this.o.createSession(_.lg,_.J(b));this.a=c;this.sessionId=c.sessionId||this.sessionId||"";this.j.on(c,zg,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(_.ve,{messageType:void 0===e||e===Nf?ge:fe,message:Ci(d.message.buffer)});this.dispatchEvent(d)}});this.j.on(c,xg,d=>{this.g.debug("onWebkitKeyAdded_",
480
- d);this.f&&(Er(this,"usable"),this.f.resolve(),this.f=null)});this.j.on(c,yg,()=>{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),
481
- 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:Er(this,"output-not-allowed");break;default:Er(this,_.ce)}});Er(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(Hb);this.g.debug(bg);this.f=new _.xn;try{this.a.update(_.J(a))}catch(b){this.f.reject(b)}return this.f}close(){if(this.l)return this.closed;
482
- this.g.info(`Closing Key Session ${this.sessionId}`);this.l=!0;try{this.a.close(),this.closed.resolve(),_.ph(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"))}};Im(new class{a(){return"APPLE"}f(){return!!window.WebKitMediaKeys}create(){return new wu}},1100);var Au=class{constructor(){this.w=this.j=null;this.A="";HTMLMediaElement.prototype.webkitGenerateKeyRequest&&(this.A="webkit")}l(a){this.j=a}h(a){_.ih("WebkitEmeManager.setMediaKeys");if(!this.j)return Promise.reject(ib);const b=this.w;b&&b!==a&&Hr(b,null);(this.w=a)&&Hr(a,this.j);return Promise.resolve()}o(){return this.w}a(a,b){_.ih("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=
483
- new zu(this.A,c,a,b);return Promise.resolve(e)}catch(e){return Promise.reject(e)}}f(){return"WEBKIT"}},zu=class{constructor(a,b,c,d){this.h=a;this.a=this.keySystem=c;a=!1;c===_.Le&&(this.a=wg,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,
484
- this.a)&&(f.push(k),e=!0));h||(e=b.canPlayType(_.lg,this.a)||b.canPlayType("video/webm",this.a));g.persistentState!==_.wf||a||(e=!1);if(e){this.f=g;return}}b=Qb;if(c===_.Le||c===_.xd)b="None of the requested configurations were supported.";c=Error(b);c.name=rb;c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}createMediaKeys(){return Promise.resolve(new Bu(this.h,this.a))}getConfiguration(){return this.f}},Bu=class{constructor(a,b){this.h=a;this.o=b;this.a=null;this.f=new _.Rs;this.j=[];this.l=new Map}createSession(a=
485
- Tf){if(a!==Tf&&a!==_.Pe)throw new TypeError("Session type "+a+ba);if(!this.a)throw a=Error("Media element is missing."),a.name=$a,a.code=DOMException.INVALID_STATE_ERR,a;this.a.src||(this.a.src="about:blank");a=new Cu(this.h,this.a,this.o,a);this.j.push(a);return a}setServerCertificate(){return Promise.resolve(!1)}},Cu=class extends _.Dt{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 _.xn;this.keyStatuses=
486
- new tu}ready(){_.ih("WebkitEmeManager.MediaKeySession.ready");Gr(this,"usable");this.a&&this.a.resolve();this.a=null}generateRequest(a,b){_.ih("WebkitEmeManager.MediaKeySession.generateRequest");return Jr(this,b,null)}load(a){_.ih(Vb);return this.l===_.Pe?Jr(this,null,a):Promise.reject(Error(ob))}update(a){_.ih(Vb);const b=new _.xn;Kr(this,b,a);return b}close(){_.ih("WebkitEmeManager.MediaKeySession.close");if(this.l!==_.Pe){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),
487
- this.closed;const a=Ir(this,"cancelKeyRequest");try{this.j[a](this.h,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed}remove(){_.ih("WebkitEmeManager.MediaKeySession.remove");return this.l!==_.Pe?Promise.reject(Error(ob)):this.close()}};Im(new class{a(){return"WEBKIT"}f(){return!(!HTMLMediaElement.prototype.webkitGenerateKeyRequest&&!HTMLMediaElement.prototype.generateKeyRequest)}create(){return new Au}});var Fu=class extends _.It{constructor(a,b,c,d,e){super(Za);this.l=a;this.j=b;this.h=c;this.a=d;this.o=e;this.g=new _.R(kd);_.Oi(this.l)?this.g.warn(_.Wb):this.Xa(_.xd,{licenseUrl:this.l,videoRobustness:[_.Gb,void 0],audioRobustness:[_.Fb,void 0],persistentStateRequired:!1,distinctiveIdentifierRequired:!1,serverCertificate:null,modifiers:{licenseRequest:this.dd.bind(this)}});_.Oi(this.j)?this.g.warn(_.ub):this.Xa(_.vd,{licenseUrl:this.j,videoRobustness:["3000"],audioRobustness:["2000"],modifiers:{licenseRequest:this.dd.bind(this)}});
488
- _.Oi(this.h)?this.g.warn(_.Ta):_.Oi(this.a)?this.g.warn(_.Sa):this.Xa(_.sd,{licenseUrl:this.h,certificateUrl:this.a,modifiers:{licenseRequest:this.Cf.bind(this),licenseResponse:this.Df.bind(this),certificateRequest:this.dd.bind(this),extractContentId:this.ff.bind(this)}})}dd(a,b){a=a.drm.customData.headers||{};for(const c of Object.keys(a))b.headers[c]=a[c]}ff(a,b){a=bm(b);switch(this.o){case Du:return a;case Eu:return(new _.cm(a)).a;default:throw Error("Unknown content ID strategy");}}Cf(a,b){b.headers[sa]=
489
- Gc;this.dd(a,b);a={spc:_.Si(b.body)};b.body=_.Ki(_.Fj(a,!0))}Df(a,b){a=_.Ei(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=_.Ui(a).buffer}};_.x(kd,Fu);Fu.prototype.onFairPlayLicenseResponse=Fu.prototype.Df;Fu.prototype.onFairPlayLicenseRequest=Fu.prototype.Cf;Fu.prototype.extractFairPlayContentId=Fu.prototype.ff;Fu.prototype.onLicenseRequest=Fu.prototype.dd;Fu.prototype.constructor=Fu.prototype.constructor;Fu.NAME=Za;
490
- var Eu="hostname",Du="full-skd";Fu.FairPlayContentIdStrategy={HOSTNAME:Eu,FULL_SKD:Du};_.x("clpp.drm.HeaderDrmComponent",class extends _.qu{h(a){a=a.getConfiguration();if(a.drm&&a.drm&&a.drm.env===Za){a=a.drm.customData;if(!a)throw new _.G(_.E,7,7100,_.yd);a=new Fu(a.widevineLicenseUrl,a.playReadyLicenseUrl,a.fairPlayLicenseUrl,a.fairPlayCertificateUrl,a.fairPlayContentIdStrategy||Du);_.Hl(a)}}a(){delete _.Gl.HeaderDrm}id(){return"headerdrm"}});_.gq(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=_.J(c);a=new Uint8Array(this,a,b-a);d.set(a);return c})});_.gq(function(){_.ih("mathRound.install")});_.gq(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;Xd in document||(Object.defineProperty(document,Xd,{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement}}),Object.defineProperty(document,"fullscreenEnabled",
491
- {get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitSupportsFullscreen||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",Lr);document.addEventListener("webkitfullscreenerror",Lr);document.addEventListener("mozfullscreenchange",Lr);document.addEventListener("mozfullscreenerror",Lr);document.addEventListener("MSFullscreenChange",Lr);document.addEventListener("MSFullscreenError",Lr)}});_.gq(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(_.ih("PiPWebkit.install"),document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=Qr,document.exitPictureInPicture=Rr,document.addEventListener("webkitpresentationmodechanged",Pr,!0))}});_.gq(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in a&&(a.getVideoPlaybackQuality=Sr)}});_.gq(function(){if(window.VTTCue)_.hh("Using native VTTCue.");else if(window.TextTrackCue){var a=TextTrackCue.length;if(3===a)_.hh(Rb),window.VTTCue=Tr;else if(6===a)_.hh("Using VTTCue polyfill from 6 argument TextTrackCue."),window.VTTCue=Ur;else{try{var b=!!Tr(1,2,"")}catch(c){b=!1}b&&(_.hh(Rb),window.VTTCue=Tr)}}else _.jh("VTTCue not available.")});var Vr;_.gq(function(){_.ih("InputEvent.install");_.pk("Trident/")&&HTMLInputElement.prototype.addEventListener!==Wr&&(_.hh("Patching input event support on IE."),Vr=HTMLInputElement.prototype.addEventListener,HTMLInputElement.prototype.addEventListener=Wr)});_.gq(function(){navigator.languages||Object.defineProperty(navigator,"languages",{get:()=>navigator.language?[navigator.language]:["en"]})});_.gq(function(){_.ih("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 Zr=class{constructor(){this.a=Xr()}};var Gu=class{constructor(a,b){b=void 0===b?2:b;this.a=new Uint8Array(a);this.h=b;this.f=0}};_.Hu=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 Iu;_.Ju=class{constructor(){this.a=new Blob([Iu],{type:_.lg})}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 _.xn;b=b.play();const d=(new _.mk(()=>{d.stop();c.resolve(a)})).fa(.25);void 0!==b?b.then(()=>{d.stop();c.resolve(!0)}).catch(e=>{e&&e.message&&e.message===rb?(d.stop(),c.resolve(!0)):(d.stop(),c.resolve(!1))}):(d.stop(),c.resolve(!0));return c}};
492
- Iu=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,
414
+ 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]};_.Tt=class{constructor(a){this.I=a;this.f={}}Za(a,b){this.f[a]=b}};_.z("clpp.drm.DrmEnvironment",_.Tt);_.Tt.prototype.setDrmSystem=_.Tt.prototype.Za;_.jm=class{constructor(a,b){b=void 0===b?!1:b;this.f=_.Xg(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)&&_.Pl();this.a=a}};_.Um=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&&_.Sl();this.a+=a}seek(a){if(0>a||a>=this.f.byteLength)throw _.Sl();this.a=a}};
415
+ _.z("clpp.utils.dataview.DataViewReader",_.Um);_.hm=class{constructor(){this.h=[];this.f=[];this.a=!1;this.g=new _.S("clpp.mp4")}N(a,b){a=Zl(a);this.h[a]=Ut;this.f[a]=b;return this}da(a,b){a=Zl(a);this.h[a]=Vt;this.f[a]=b;return this}stop(){this.a=!0}parse(a,b){a=_.K(a);a=new _.Um(new DataView(a.buffer,a.byteOffset,a.byteLength),!1);for(this.a=!1;_.Rl(a)&&!this.a;)this.Hd(0,a,b)}Hd(a,b,c){const d=b.getPosition();let e=_.P(b);var f=_.P(b);let g=!1;this.g.debug("Parsing MP4 box",_.$l(f));switch(e){case 0:e=b.Ma()-d;break;case 1:e=_.Wl(b),g=!0}const h=
416
+ this.f[f];if(h){let m=null;var k=null;this.h[f]===Vt&&(k=_.P(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?_.Yl(b,l):new Uint8Array(0);b=new _.Um(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)}};_.z("clpp.utils.Mp4Parser",_.hm);_.hm.typeToString=_.$l;
417
+ _.hm.allData=_.cm;_.hm.sampleDescription=_.bm;_.hm.children=_.am;_.hm.prototype.parseNext=_.hm.prototype.Hd;_.hm.prototype.parse=_.hm.prototype.parse;_.hm.prototype.stop=_.hm.prototype.stop;_.hm.prototype.fullBox=_.hm.prototype.da;_.hm.prototype.box=_.hm.prototype.N;_.hm.headerSize=_.dm;var Ut=0,Vt=1;var Wt=class{};_.z("clpp.utils.FairplayUtils",Wt);Wt.parseFairPlayResponse=_.mm;Wt.formatFairPlayRequest=_.lm;Wt.createFairplayPayload=km;Wt.extractContentId=_.gm;Wt.extractExtXKeyUri=em;var vm=new _.S("clpp.drm.DrmToday"),Fm="PRODUCTION",Gm="STAGING",Hm="TEST",Xt={PRODUCTION:Fm,STAGING:Gm,TEST:Hm};_.z("clpp.drm.DrmToday.Environment",Xt);_.z("clpp.drm.DrmToday.WidevineCertificates",{V1_PROD:"V1_PROD",V1_STAGING:"V1_STAGING",V2:"V2"});
418
+ var om="/license-proxy-widevine/cenc/",sm="/license-proxy-headerauth/drmtoday/RightsManager.asmx",tm="/license-server-fairplay/",Im={"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",
419
+ 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"},Yt=[Va,Xa,Wa,_.Gb,_.Fb],Zt=[Va,Xa,
420
+ Wa,_.Gb,_.Fb],$t=["3000","2000","150"],au=["2000","150"];
421
+ for(const a of Object.keys(Xt)){let b=va;a!==Fm&&(b+=`_${a}`);const c=new _.Tt(b);let d=null;switch(a){case Fm:case Gm:d=Ol("V2");break;case Hm:d=null}c.Za(_.xd,{licenseUrl:um(_.xd,a),videoRobustness:Yt,audioRobustness:Zt,persistentStateRequired:!1,distinctiveIdentifierRequired:!1,serverCertificate:d,modifiers:{licenseRequest:_.xm,licenseResponse:_.ym}});c.Za(_.sd,{licenseUrl:um(_.sd,a),certificateUrl:nm(a)+"/license-server-fairplay/cert/",modifiers:{licenseRequest:_.Am,licenseResponse:_.Bm,extractContentId:_.Cm,
422
+ certificateRequest:_.Dm}});c.Za(_.vd,{licenseUrl:um(_.vd,a),videoRobustness:$t,audioRobustness:au,modifiers:{licenseRequest:Em}});_.Kl(c)};var bu=class{};_.z("clpp.drm.eme.EmeFactory",bu);var Km=[];bu.Apis={STANDARD:Eb,APPLE:"APPLE",WEBKIT:"WEBKIT",NOP:"NOP"};var Sm,cu,Rm;_.$m=[154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149];Sm=[237,239,139,169,121,214,74,206,163,200,39,220,213,29,33,237];cu=class{constructor(a,b,c){this.j=new Uint8Array(a);this.a=b;this.f=c}};Rm=class extends cu{};_.Zm=class extends cu{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 bn=!!(performance&&performance.mark&&performance.measure);var Gn=class{constructor(a){this.f=[];this.h=[];this.a=[];8<=a.byteLength&&(new _.hm).da("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=_.Xi(_.Yl(a.reader,16)),c=[];if(0<a.version){var d=_.P(a.reader);for(let e=0;e<d;++e){const f=_.Xi(_.Yl(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});
423
+ a.reader.getPosition()!==a.reader.Ma()&&_.C("Mismatch between box size and data size!")}}};var An,du;
424
+ _.Io=class{constructor(a){this.D=a;this.H=new Set;this.A=this.G=this.j=null;this.O=!1;this.a=null;this.I=du;this.w=new _.bt;this.K=new St;this.f=new Map;this.J=[];this.F=new _.Cn;this.h=null;this.T=b=>{this.o=!0;this.B=!1;this.F.reject(b);a.onError(b)};this.l=new Map;this.V=new Map;this.R=new _.pk(()=>rn(this));this.ua=!1;this.Y=new _.Cn;this.C=!1;this.S=[];this.Z=!1;this.M=0;this.g=new _.S("clpp.drm.DrmEngine");this.X=(new _.pk(()=>{sn(this)})).wb(1);this.F.catch(()=>{});this.o=this.B=!1;this.L=
425
+ null}destroy(){const a=this;return _.x(function*(){a.ua?yield a.Y:(a.ua=!0,yield tn(a),a.Y.resolve())})}keySystem(){return this.a?_.gn(this.a.keySystem):""}getDrmInfo(){return this.a}ca(a){const b=this;return _.x(function*(){if(!b.C||b.I!==An){var c=Math.floor(a.timeStamp),d=`drm.msg.${c}.start`,e=`drm.msg.${c}.end`;_.cn(d);!b.h.delayLicenseRequestUntilPlayed||b.A&&!b.A.paused||b.Z?yield Ln(b,a):b.S.push(a);_.cn(e);_.dn(`drm.sess.msg.${c}`,d,e)}})}ba(a){const b=a.target;this.g.info("Key status changed for session",
426
+ b.sessionId);const c=this.f.get(b);let d=!1;b.keyStatuses.forEach((e,f)=>{if(typeof f===_.Of){var g=f;f=e;e=g}if(fn(this.a.keySystem)&&16===f.byteLength&&_.rk()){g=_.Ci(f);const k=g.getUint32(0,!0),l=g.getUint16(4,!0),m=g.getUint16(6,!0);g.setUint32(0,k,!1);g.setUint16(4,l,!1);g.setUint16(6,m,!1)}c&&e!==Mf&&(c.loaded=!0);c&&c.Qa&&c.Qa.resolve();"expired"===e&&(d=!0);f=_.K(f);let h=_.Xi(f);"00"===h&&c&&c.keyId?h=c.keyId:this.a.keySystem.startsWith(_.sd)&&16!==f.byteLength&&(h=Ei(f));(f=h||"")?this.g.info(`Key status for Key ID '${h}': ${e}`):
427
+ this.g.info(`Key status global keys: ${e}`);this.l.set(f,e);c&&!c.keyId&&this.f.forEach((k,l)=>{l===b||k.keyId!==h||k.loaded||(k.loaded=!0)})});c&&c.loaded&&c.ib.forEach(e=>{this.l.get(e)===Mf&&(this.g.warn(`Key status for Key ID '${e}': 'output-restricted'`),this.l.set(e,_.Le))});for(a=0;a<this.a.initData.length;a++){const e=this.a.initData[a];e.keyId&&this.l.get(e.keyId)===Mf&&_.Yi(e.initData,c.initData)&&(this.g.warn(`Key status for Key ID '${e.keyId}': 'output-restricted'`),this.l.set(e.keyId,
428
+ _.Le))}a=b.expiration-Date.now();(0>a||d&&1E3>a)&&c&&!c.Jb&&(this.g.debug("Session has expired",b.sessionId),(a=this.f.get(b))&&a.vc&&a.vc.stop(),this.f.delete(b),b.close().catch(()=>{}));Un(this)&&(this.F.resolve(),1!==this.f.size||d?this.R.fa(.5):rn(this))}};An=0;du=3;_.ao=new Map;_.bo=new _.S("clpp.text");var eu=class{constructor(){this.a=null;this.f=[]}};var fu=class{constructor(){this.h=this.f=this.j=null;this.a=[]}};_.gu=class{constructor(){this.f=this.o=this.A=this.C=this.j=this.l=this.h=this.w=NaN;this.a=new eu;this.B=new fu}getStats(){return{width:this.w,height:this.h,streamBandwidth:this.o,decodedFrames:this.j,droppedFrames:this.l,corruptedFrames:this.C,estimatedBandwidth:this.f,loadLatency:this.A,playTime:go(this.a,_.zo),pauseTime:go(this.a,_.yo),bufferingTime:go(this.a,_.ro),stateHistory:ho(this.a),switchHistory:io(this.B)}}};_.hu=class{constructor(a){this.f=a;this.a=void 0}value(){void 0===this.a&&(this.a=this.f());return this.a}};var ko=new _.hu(()=>new Map([[HTMLMediaElement.HAVE_METADATA,_.le],[HTMLMediaElement.HAVE_CURRENT_DATA,_.ke],[HTMLMediaElement.HAVE_FUTURE_DATA,Sc],[HTMLMediaElement.HAVE_ENOUGH_DATA,Uc]]));var ju=class{constructor(a){this.g=new _.S("clpp.StateManager");this.m=a;this.a=new _.bt;this.f=_.wo;this.A=_.iu;this.H=0;this.w=-1;this.K=this.o=this.I=this.B=0;this.j=this.h=this.F=!1;this.G=0;this.l=null;this.J=0;this.L=_.Dk();this.C=!1;this.I=Date.now();po(this)}gb(a,b){this.m&&this.m.trigger(new _.E(a,{detail:b}))}getState(){return so(this,"")}T(a){(a=a&&a.detail)&&a.severity&&a.severity===_.F&&no(this,_.vo)}destroy(){this.g.debug("Stop watching for video events for "+this.m.namespace());this.a.release()}};_.z("clpp.utils.media.detectType",Ao);var Do=new _.S("clpp.sources");var ku=class extends _.Rt{constructor(){super(md);this.w=this.G=!1;this.l=this.A=this.o=this.a=this.j=null;this.h=new _.bt;this.F=this.B=this.f=this.H=null}init(a,b){super.init(a,b);this.j=new ju(this);no(this.j,_.wo)}namespace(){return md}unload(){const a=this;return _.x(function*(){if(a.ea){a.log.debug("Releasing player with source",a.ea);a.B&&(a.B.stop(),a.B=null);const b=a.getTrackManager();b&&b.release();a.A&&(a.A.destroy(),a.A=null);a.O&&(a.O.destroy(),a.O=null);a.l&&a.l.release();a.o&&(a.o.destroy(),
429
+ a.o=null);_.qh(a.h);a.f&&(a.f=new _.gu);a.F=null;a.ea=null;a.G=!1;a.a&&(a.a.removeAttribute("src"),a.a.load());yield Fo(a)}})}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(xa);const a=this.getTrackManager();a&&a.destroy();this.l&&(this.l.destroy().catch(b=>{this.log.warn("Error while disposing metadata handler",
430
+ 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.Kb}load(a){const b=this;return _.x(function*(){if(b.w)return Eo();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()/1E3;b.f=new _.gu;b.h.on(b,_.Lf,()=>{b.f&&_.fo(b.f.a,b.getState())});no(b.j,_.xo);b.ea=_.Co(a);b.configuration=_.sl(b.ca,a);b.log.debug(_.db,
431
+ b.configuration);b.log.debug(_.xb,b.ea);const d=_.eo(b.configuration,[_.$d,"native"]);b.O=d.create(b);b.O.setTextVisibility(!0);b.configuration.enableHtmlCue&&_.vl(_.Rf)&&!_.Fk()&&(b.A=new pt(b),b.A.start(c));b.l?b.l.release():b.l=new ct(b);c.textTracks&&Ph(b.l,c.textTracks);b.getTrackManager().load();c.loop=!!b.configuration.loop;_.B(b.configuration.volume)||b.setVolume(b.configuration.volume);_.B(b.configuration.muted)||b.setMuted(b.configuration.muted);b.h.one(c,Sc,()=>{b.trigger(new _.E(_.Mt))});
432
+ null==b.configuration.startTime&&No(b,c);_.Dk()&&Oo(b,c);try{yield Ho(b,c),yield Jo(b),yield Mo(b).W}catch(e){b.G=!1,b.onError(e)}})}onError(a){this.G||(a.severity===_.F&&null!==this.j&&no(this.j,_.vo),this.trigger(new _.E(_.r,{detail:a})))}Xf(){return new U}getState(){return null!==this.j?this.j.getState().currentState:_.iu}getPresentationStartTime(){if(this.a&&this.a.getStartDate&&this.isLive()){const a=this.a.getStartDate();return isNaN(a.getTime())?null:a.getTime()/1E3}return null}getSeekRange(){var a=
433
+ 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 _.jo();this.f&&_.fo(this.f.a,this.getState());var a=this.a,b=this.f,c=a.videoHeight;b.w=a.videoWidth;b.h=c;a.getVideoPlaybackQuality&&(c=a.getVideoPlaybackQuality(),a=this.f,b=Number(c.totalVideoFrames),a.l=Number(c.droppedVideoFrames),
434
+ a.j=b,this.f.C=Number(c.corruptedVideoFrames));if(a=this.getTrackManager())if(a=a.ja())a.bandwidth&&(this.f.o=a.bandwidth),a.Ic&&(this.f.f=a.Ic);return this.f.getStats()}getTimelineCues(){return this.l?this.l.getTimelineCues():[]}getCueTimeline(){return null}};
435
+ _.nh(new class{a(){return md}canPlay(a,b){a=a.type||"";const c=a===_.Ac,d=a===_.Fc,e=a===_.kl;var f;_.Ck()||c||d||e&&!_.Dk()?f=0:f=""!==qk().canPlayType(a)?e&&_.Dk()&&(window.ManagedMediaSource||window.MediaSource&&MediaSource.isTypeSupported)&&!b.streaming.preferNativeHlsOnSafari?1:2:0;return f}f(a){return a===_.la}create(){return new ku}});_.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 Qo=new _.S("clpp.ads"),Po=[];var lu=class{load(){}start(){}o(){}resume(){}pause(){}skip(){}getVolume(){}setVolume(){}getPosition(){}h(){}l(){}};_.z("clpp.ads.IAdsManager",lu);lu.prototype.getPosition=lu.prototype.getPosition;lu.prototype.setVolume=lu.prototype.setVolume;lu.prototype.getVolume=lu.prototype.getVolume;lu.prototype.skip=lu.prototype.skip;lu.prototype.pause=lu.prototype.pause;lu.prototype.resume=lu.prototype.resume;var V=class{kb(){}lb(){}pb(){}getId(){}getCreativeId(){}getApiFramework(){}getAdSystem(){}getAdvertiserName(){}getTitle(){}getDuration(){}getPosition(){}getSkipTimeOffset(){}Nb(){}nb(){}getMediaUrl(){}bb(){}ab(){}Na(){}Oa(){}getPodIndex(){}Bb(){}Cb(){}cb(){}getWrapperAdIds(){}getWrapperAdSystems(){}getWrapperCreativeIds(){}};_.z("clpp.ads.IAd",V);V.prototype.getWrapperCreativeIds=V.prototype.getWrapperCreativeIds;V.prototype.getWrapperAdSystems=V.prototype.getWrapperAdSystems;
436
+ V.prototype.getWrapperAdIds=V.prototype.getWrapperAdIds;V.prototype.getSequenceLength=V.prototype.cb;V.prototype.getPositionInSequence=V.prototype.Cb;V.prototype.getPodTimeOffset=V.prototype.Bb;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;V.prototype.getClickThroughUrl=V.prototype.nb;
437
+ V.prototype.isBumper=V.prototype.Nb;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.getCreativeId=V.prototype.getCreativeId;V.prototype.getId=V.prototype.getId;
438
+ V.prototype.getTechnology=V.prototype.pb;V.prototype.getAdManagerVersion=V.prototype.lb;V.prototype.getAdManagerName=V.prototype.kb;var Q=class{constructor(a,b,c,d){this.w=this.o=this.l=!1;this.A=a;this.a=b;this.f=c;this.h=d;this.j=0}kb(){return""}lb(){return""}pb(){return 2}getId(){return""}getCreativeId(){return""}getApiFramework(){return null}getAdSystem(){return""}getAdvertiserName(){return""}getTitle(){return""}getDuration(){return this.h}getPosition(){return this.j}getSkipTimeOffset(){return-1}Nb(){return!1}nb(){return null}getMediaUrl(){return null}bb(){return 0}ab(){return 0}Na(){return 0}Oa(){return this.A}getPodIndex(){return 0}Bb(){return 0}Cb(){return this.a}cb(){return this.f}getWrapperAdIds(){return[]}getWrapperAdSystems(){return[]}getWrapperCreativeIds(){return[]}};
439
+ 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.Cb;Q.prototype.getPodTimeOffset=Q.prototype.Bb;Q.prototype.getPodIndex=Q.prototype.getPodIndex;Q.prototype.getPodType=Q.prototype.Oa;Q.prototype.getMediaBitrate=Q.prototype.Na;Q.prototype.getMediaHeight=Q.prototype.ab;
440
+ Q.prototype.getMediaWidth=Q.prototype.bb;Q.prototype.getMediaUrl=Q.prototype.getMediaUrl;Q.prototype.getClickThroughUrl=Q.prototype.nb;Q.prototype.isBumper=Q.prototype.Nb;Q.prototype.getSkipTimeOffset=Q.prototype.getSkipTimeOffset;Q.prototype.getPosition=Q.prototype.getPosition;Q.prototype.getDuration=Q.prototype.getDuration;Q.prototype.getTitle=Q.prototype.getTitle;Q.prototype.getAdvertiserName=Q.prototype.getAdvertiserName;Q.prototype.getAdSystem=Q.prototype.getAdSystem;
441
+ Q.prototype.getApiFramework=Q.prototype.getApiFramework;Q.prototype.getCreativeId=Q.prototype.getCreativeId;Q.prototype.getId=Q.prototype.getId;Q.prototype.getTechnology=Q.prototype.pb;Q.prototype.getAdManagerVersion=Q.prototype.lb;Q.prototype.getAdManagerName=Q.prototype.kb;var mu=class{constructor(a){this.a=a.map(b=>({videoId:b.getSurface().getMedia().id,player:b,kd:!0,ready:Promise.resolve()}));this.g=new _.S("clpp.plist.PlayerPool")}has(){return this.a.some(a=>a.kd)}get(){const a=this;return _.x(function*(){const b=a.a.find(c=>c.kd);if(!b)throw Error("No available players in the pool");b.kd=!1;yield b.ready;return b.player})}release(a){const b=this.a.find(c=>c.player===a);if(!b)return Promise.resolve();b.kd=!0;b.ready=new Promise(c=>{a.release().catch(d=>{this.g.error("Failed to unload player",
442
+ 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",_.Wo);var nu=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=Xo(this,a)}get(){return this.a}};var bp=class{constructor(a,b){this.g=new _.S("clpp.PlayerSurface");this.w=_.Pg(ou,b);this.f=new nu;this.h=null;this.a=new nu;this.l=pu;pu+=1;this.o=`clpp-video-${this.l}`;this.j=new _.bt;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
443
+ 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(_.Ed);a.parentNode?a.parentNode.replaceChild(c,
444
+ 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),_.Uo(c,f);c.style.cssText=a.style.cssText;a.removeAttribute(_.Qf);for(d of[_.Ag,_.Yd])f=a.getAttribute(d),f=parseInt(f,10),isNaN(f)||(c.style[d]=`${f}px`),_.tk()||a.removeAttribute(d);c.appendChild(a);d=c}d&&(this.a.set(d),Yo(this.a,"clpp-container"),
445
+ Yo(this.a,this.o),Yo(this.f,_.fd),Yo(this.f,"clpp-video"));b.webOSStartupPatch&&Zo(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?_.Uo(a,gd):this.g.debug("No media element available that could be hidden")}showMediaElement(){const a=this.getMedia();a?a.classList.remove(gd):
446
+ 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&&_.Uo(a,_.fd);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){_.Uo(a,gd)}show(a){a.classList.remove(gd)}release(){this.j.release()}};
447
+ 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 ou={disableContainer:!1,webOSStartupPatch:!0,crossorigin:"anonymous",containerEl:null},pu=1;var qu=class{constructor(a){this.va=a;this.h=[];this.f=a.Of;this.w=a.Of.getSurface().getContainer();if(!this.w)throw Error("Primary player does not have a container");this.A=[];const b=cp(this,this.w,this.va.xg);this.l=new mu(b);this.a=null;this.o=!1;this.j=new Map;this.B=a.toggleVisible;this.g=new _.S("clpp.interstitial.MultiController");dp(this).forEach(c=>ep(this,c,!1))}getCurrentItem(){return this.a}sd(){return this.a?this.a.player:null}qf(){return Array.from(this.j.values())}Tc(){return 0<this.j.size}play(a){return sp(this,
448
+ a,_.Qe)}load(a){return sp(this,a,_.je)}release(){const a=this;return _.x(function*(){yield Promise.all([qp(a),a.a?pp(a,a.a):Promise.resolve()]);a.a=null;a.o=!1;hp(a)})}destroy(){const a=this;return _.x(function*(){a.g.info("Destroy");yield a.release();yield a.l.destroy();Cp(a)})}},wp="preload",tp=_.oe;var ru=class extends _.Ot{constructor(a){super();this.va=_.Pg({oh:.5},a);this.g=new _.S("clpp.interstitial.Player");this.f=a.player;this.f.setSeekInterceptor(b=>{const c=Fp(this,b);return c&&[Mp,Zp].includes(c.state)?(this.g.info("Seeking into an interstitial",c.sa),Ip(this,c).catch(()=>{this.f.seek(b)}),!1):!0});this.qa=new qu({xg:this.va.config,Of:a.player,preloadMedia:!0,za:a.za});this.h=[];this.a=[];this.j=!1;Qp(this,a.player)}destroy(){const a=this;return _.x(function*(){Rp(a);a.a=[];a.j=!1;
449
+ a.f.setSeekInterceptor(null);yield a.qa.destroy()})}Eb(){return this.j}isLive(){const a=this.qa.sd();return a?a.isLive():null}gb(a){this.f.trigger(a)}},Mp=0,$p=1,bq=2,cq=3,fq=4,eq=5,Zp=6;var Rq=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,za:b},d.ads.hls||{},{nh:c});this.a=new ru(a);Yp(this.a)}resume(){const a=Sp(this.a);a&&a.play()}pause(){const a=Sp(this.a);a&&a.pause()}skip(){}getVolume(){const a=Sp(this.a);return a?a.getVolume()||0:0}setVolume(a){const b=Sp(this.a);if(b)return b.setVolume(a)}getPosition(){const a=Sp(this.a);return a?a.getPosition():-1}l(){return!this.a.Eb()}h(){return this.a.destroy()}};
450
+ Rq.prototype.getPosition=Rq.prototype.getPosition;Rq.prototype.setVolume=Rq.prototype.setVolume;Rq.prototype.getVolume=Rq.prototype.getVolume;Rq.prototype.skip=Rq.prototype.skip;Rq.prototype.pause=Rq.prototype.pause;Rq.prototype.resume=Rq.prototype.resume;var su=class{constructor(a){this.m=a;this.j=this.m.getNetworkEngine();this.a=new _.bt;this.h=null;this.f=!0;kq(this)}release(){this.a.release();lq(this);this.m=null}};_.z("clpp.polyfill.installAll",oq);var nq=[];_.z("clpp.polyfill.register",_.pq);var tq=class{constructor(a,b,c){this.h=a;this.f=b;JSON.parse(_.Fi(_.Vi(a)));this.a=JSON.parse(_.Fi(_.Vi(b)));this.j=c}};var rq={n:"vXdoJIQCz6sZ9pbduNukEHOR0H2dHlwuuBUAR5Ot7WLEYvav5mn63yxr6F6TIl8RHTFw2siXQhHblZH2Y89o8vhcZRFkYXo6h0igEVafu-n0w52UEcH8Cqzlb8Q7x03Qb8OcKLngSzDkwe5Y2Aix6I66RRVNLLssqyjp2n5tXs4JQmYdqY6hhpGhmBN84naeCTdcPpAYhCw8jqbTSNrJp5hjU4GVvOiUtoYCvdESV9xrOR7fPCFXhWfLtC3i1k1zVoIM7YW5qD0F676jhqkF-GmDuCHpRY2I2Cxui-ytYEVIM6_pylSIlmYLjARmv2jXz9aV_WvHLh6B8Yx0slNGCQ",e:"AQAB"},ol="eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJ1cmxzIjpbIjovL2Nhc3RsYWJzLmNvbSJdLCJ0eXBlIjoiV2ViIiwia2lkIjoxOTUwLCJpbHYiOmZhbHNlfQ.jzGGRcbFr_2QET-4tbMcpR5pSaj7eV7X2d1HWw_VKQpPg3zCwSZSDuqw225dIYyAYwLSiElbozbZPSArkBXOsoUm-KZRUPF4m7WG0T7Uza5G-QaQw57BbbfcSsooSpatC997kHKLMTjO71By9Olcu5ykN164nZpGQtZNzQjYag-bnUaMVI5vvhzjlvDihORQ9V_qRlEh0-mpoz6W0-36HGAbWIXWq0kxPh6inbovby-ZmFpqGrVjWOEFa55EARZXPNW9ERupW5xrrYHZdwwTpdRTY5IwEnobS85yTrLhK8Y2MV4jlQLTtQp372fKDsuU6q6_4XvmNq1SgAoKoaf41g";var Tq=class{constructor(a){this.f=a;this.a=null;this.g=new _.S("clpp.utils.LicenseKey")}},Gq="vod",Fq="live";var mr,Kq,Nq,Lq;mr=class{constructor(a){this.m=a;this.f=a.getNetworkEngine();this.h=Oq(this);this.f.sc(this.h);this.a=null}release(){this.a=null;this.f.cd(this.h)}};_.tu="maxSuggestedBitrateKbps";Kq={du:"duress",etp:_.Ud,mb:_.tu,rd:"responseDelay",rtt:"roundTripTime"};Nq={at:"availabilityTime",br:"encodedBitrateKbps",ht:"heldTime",n:"intermediaryIdentifier",nor:"nextObjectResponse",nrr:"nextRangeResponse",d:"objectDuration",ot:"objectType",su:"startup",st:"streamType",sf:"streamingFormat",v:gg};
451
+ Lq=new _.S("clpp.net.CmsdManager");var R=class extends _.Ot{constructor(a,b,c){super();oq();this.g=new _.S("clpp.Player");if(!a)throw new _.I(_.F,7,7102);this.Z=new _.bt;this.f=this.C=b||_.ql();this.l=null;void 0===this.f.license&&(this.f.license=ol,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!");this.j=new bp(a,c);this.G=this.A=this.a=
452
+ this.F=null;this.I=new _.Hq;this.h=null;this.X=[];this.Y=!0;this.K={};this.ba=null;this.R=!0;this.S=this.O=!1;this.L=this.xc=null;this.Vd=!1;this.ga=new su(this);this.B=null;this.on(_.Lf,()=>{this.getState()===_.vo&&(this.a?this.a.unload():Promise.resolve())});this.on(_.xc,this.ca.bind(this));this.on(_.wc,this.ca.bind(this));this.on(_.Gh,()=>Sq(this));Uq(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."),
453
+ 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 Pq)try{const e=d.create(this.f);e&&a.push(e)}catch(e){this.g.error("Error while creating player plugin",e)}Wq(this,a);this.M=_.la;Al(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 _.E(_.r,{detail:a}),this.trigger(a)}Qc(a){a=
454
+ this.K[a];void 0===a&&(a=null);return a}getSurface(){return this.j}getConfiguration(){return _.Qg(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=Zq(this);return this.l.finally(()=>{$q(this);this.g.debug("Player released");this.l=null})}destroy(){if(this.O)return this.g.debug("The player is already destroyed. No-op"),
455
+ new Promise(a=>a());this.O=!0;return this.release().then(()=>{this.g.debug(xa);this.trigger(new _.E("destroying"));return _.Vq(this,_.Fe)}).then(()=>{this.a&&this.a.stopForwardingEventsTo(this);this.Oc.clear();this.ga.release();if(this.a)return this.a.destroy()}).then(()=>this.I.destroy()).then(()=>{Dl();this.A=this.a=null;this.trigger(new _.E("destroyed"))})}load(a){const b=this;return _.x(function*(){try{_.cn(Ye);b.M=_.la;b.Y=!0;const c=_.Co(a),d=tl(a)?a:{};if(d.license)throw new _.I(_.F,7,7100,
456
+ "License cannot be passed into the load method.");yield _.hr(b,d,c);yield _.ir(b);yield _.kr(b);_.cn(Xe);_.dn("player.load",Ye,Xe)}catch(c){$q(b);if(b.l)throw b.g.info(cb),new _.I(_.F,7,7E3);throw c;}})}preload(a){const b=this;return _.x(function*(){yield _.hr(b,a);if(b.a){var c=b.a;c.preload?yield c.preload(b.f):b.g.warn(zb)}else b.g.warn(vb)})}use(a){(a=El(a))&&a.o(this)}remove(a){return(this.getState()<=_.wo||this.R)&&null!==yl(a)?(Fl(a),this.S=!0):!1}play(){return this.a?!this.h||this.h instanceof
457
+ Rq||this.a.namespace()===_.jd?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 _.Nt}getState(){return this.a?this.a.getState():_.wo}getPeriods(){return this.a?this.a.getPeriods():[]}isEnded(){return this.a&&
458
+ 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()===_.vo?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}}kc(){const a=this.a;return a&&a.kc?a.kc():null}getVolume(){return this.a?this.a.getVolume():
459
+ 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.a&&this.a.isMuted()||!1}setMuted(a){this.a&&this.a.setMuted(a)}getNetworkEngine(){return this.I}setNetworkEngine(a){this.I=a}getTextDisplayer(){return this.a&&this.a.getTextDisplayer()}isLive(){return!!this.a&&
460
+ this.a.isLive()}getStats(){return this.a?this.a.getStats():null}vf(){return Object.freeze(this.ba)}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.xc=a;er(this)}setCdnErrorCallback(a){this.L=a;this.a&&this.a.setCdnErrorCallback(this.L)}ca(){this.Vd=!0}};_.z("clpp.Player",R);R.registerPlugin=_.Qq;
461
+ 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.vf;R.prototype.getStats=R.prototype.getStats;R.prototype.isLive=R.prototype.isLive;R.prototype.getTextDisplayer=R.prototype.getTextDisplayer;R.prototype.setNetworkEngine=R.prototype.setNetworkEngine;
462
+ 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;R.prototype.getAdsManager=R.prototype.getAdsManager;R.prototype.getDuration=R.prototype.getDuration;R.prototype.setVolume=R.prototype.setVolume;R.prototype.getVolume=R.prototype.getVolume;
463
+ R.prototype.getTimelineOffset=R.prototype.kc;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;R.prototype.isEnded=R.prototype.isEnded;R.prototype.getState=R.prototype.getState;R.prototype.getBufferInfo=R.prototype.getBufferInfo;R.prototype.getTrackManager=R.prototype.getTrackManager;
464
+ 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;R.prototype.getConfiguration=R.prototype.getConfiguration;R.prototype.getSurface=R.prototype.getSurface;R.prototype.getPlugin=R.prototype.Qc;R.prototype.off=R.prototype.off;R.prototype.one=R.prototype.one;
465
+ R.prototype.on=R.prototype.on;_.wo=0;_.xo=1;_.ro=2;_.zo=3;_.yo=4;_.oo=5;_.vo=6;_.iu=7;_.uo={IDLE:_.wo,PREPARING:_.xo,BUFFERING:_.ro,PLAYING:_.zo,PAUSED:_.yo,ENDED:_.oo,ERROR:_.vo,UNSET:_.iu};R.State=_.uo;var Pq=[];var uu=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=_.Pg(this.C,a);this.f=_.Pg(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(_.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.");
466
+ if(0===b.length)throw new _.I(_.F,7,7003,mb);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!==_.t||0>e))throw new _.I(_.F,
467
+ 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(_.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{or(c),c.w="open",yield rr(c,b),c.H=0,c.o=b,c.V=!0,sr(c,b[0].playlist||{})}finally{c.w=null}})}ig(a){const b=this;return _.x(function*(){if(b.w)throw new _.I(_.F,7,7008,`Cannot call addItem() while ${b.w}() is ongoing!`);
468
+ 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 tr(b,a)}finally{b.w=null}})}getCurrentItem(){return this.o[this.H]||null}getCurrentItemIndex(){return this.H}Mg(){return[...this.o]}Rc(){return this.o.length}getTimeline(){return this.a?
469
+ 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(){or(this);return super.destroy()}setCdnErrorCallback(){throw new _.I(1,7,7009,"CDN switching is not supported!");}};_.z("clpp.plist.ScPlaylist",uu);uu.prototype.setCdnErrorCallback=uu.prototype.setCdnErrorCallback;uu.prototype.destroy=uu.prototype.destroy;uu.prototype.release=uu.prototype.release;uu.prototype.seekWith=uu.prototype.seekWith;
470
+ uu.prototype.getTimeline=uu.prototype.getTimeline;uu.prototype.getSize=uu.prototype.Rc;uu.prototype.getPlaylist=uu.prototype.Mg;uu.prototype.getCurrentItemIndex=uu.prototype.getCurrentItemIndex;uu.prototype.getCurrentItem=uu.prototype.getCurrentItem;uu.prototype.addItem=uu.prototype.ig;uu.prototype.open=uu.prototype.open;var vu=class extends _.Ot{constructor(a){super();this.va=_.Pg({transition:_.Me,preloadMedia:!1},a);this.h=[];this.a=0;const b=ur(a.anchorId,this.va.config);this.o=new mu(b);this.f=null;this.j=!1;this.l=new Map;this.w=a.toggleVisible;this.g=new _.S(nd);this.o.a.forEach(c=>vr(this,c.player,!1))}Pc(){return this.f}sd(){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)}Bh(a){if(0<this.h.length)throw Error("Cannot re-set items in the playlist");
471
+ this.g.info("Set items",a);this.h=a.map((b,c)=>({config:b,index:c,preloadPromise:Promise.resolve(),disposers:[]}))}Ah(a){if(0===this.h.length)throw Error(lb);if(0>a||a>this.h.length-1)throw Error("Index out of bounds");this.a=a}Tc(){return this.a<this.h.length-1}wf(){return 0<this.a}lh(){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(lb);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})`),
472
+ yield yr(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,Cr(a)}}})}Lf(){const a=this;return _.x(function*(){if(a.j)a.g.warn("Cannot play next item while busy");else if(a.Tc()){a.j=!0;a.a+=1;a.g.info(`Next (index: ${a.a})`);var b=a.f;a.va.transition===_.Me&&b.player.pause();Hr(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 Dr(a,c),a.g.info(`Next playing (index: ${a.a})`)}catch(d){throw a.g.error(`Next failed (index: ${a.a})`),
473
+ d;}finally{a.j=!1,b&&Gr(a,b),Cr(a)}}else a.g.warn("There are no more items in the playlist")})}mh(){const a=this;return _.x(function*(){if(a.j)a.g.warn("Cannot play previous item while busy");else if(a.wf()){a.j=!0;--a.a;a.g.info(`Previous (index: ${a.a})`);var b=a.f;a.va.transition===_.Me&&b.player.pause();Hr(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 Dr(a,c),a.g.info(`Previous playing (index: ${a.a})`)}catch(d){throw a.g.error(`Previous failed (index: ${a.a})`),
474
+ d;}finally{a.j=!1,b&&Gr(a,b),Cr(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([Ir(a),a.f?Gr(a,a.f):Promise.resolve()]);yield Jr(a)})}};_.z(nd,vu);vu.prototype.destroy=vu.prototype.destroy;vu.prototype.playPrev=vu.prototype.mh;vu.prototype.playNext=vu.prototype.Lf;vu.prototype.playFirst=vu.prototype.lh;vu.prototype.hasPrev=vu.prototype.wf;vu.prototype.hasNext=vu.prototype.Tc;
475
+ vu.prototype.setIndex=vu.prototype.Ah;vu.prototype.setItems=vu.prototype.Bh;vu.prototype.getPreloading=vu.prototype.qf;vu.prototype.getPrev=vu.prototype.rf;vu.prototype.getNext=vu.prototype.pf;vu.prototype.getCurrentPlayer=vu.prototype.sd;vu.prototype.getCurrent=vu.prototype.Pc;var Fr="preload",wr=_.oe;var Kr=new Map;var yu=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]===_.Hc;if(!window.muxjs||!c&&!d)return!1;if(d)return _.Lr(Lc);if(b)return _.Lr(Mr(b,a));b=Mr(_.p,a);a=Mr(_.w,a);return _.Lr(b)||_.Lr(a)}isMuxed(a,b){return 1<this.demuxMimeTypes(a,b).size}demuxMimeTypes(a,
476
+ b){const c=new Map;c.set(a,b);try{const d=_.kk(b),e=_.lk(b).split(","),f=new Map,g=pi(_.p,e),h=pi(_.w,e);g&&f.set(_.p,this.convertCodecs(_.p,_.jk(d,g)));h&&f.set(_.w,this.convertCodecs(_.w,_.jk(d,h)));return f}catch(d){return c}}convertCodecs(a,b){return b.toLowerCase().split(";")[0]===_.Hc?Lc:"mp2t"===b.toLowerCase().split(";")[0].split("/")[1]?Mr(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+
477
+ h.initSegment.byteLength);k.set(h.initSegment,0);k.set(h.data,h.initSegment.byteLength);h.type===wu?b.push(k):h.type===xu&&c.push(k)},g=()=>{e={video:_.Zi(...b),captions:d,audio:_.Zi(...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}};ek(_.Hc,()=>new yu(_.Hc));ek(_.jg,()=>new yu(_.jg));var xu=_.p,wu=_.w;var zu=class{getCuePoints(){}Eb(){}Db(){}};_.z("clpp.ads.IAdsTimeline",zu);zu.prototype.hasPostroll=zu.prototype.Db;zu.prototype.hasPreroll=zu.prototype.Eb;zu.prototype.getCuePoints=zu.prototype.getCuePoints;_.Au=class{f(){}a(){}h(){}o(){}};var Bu=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(ib)}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 Eb}};
478
+ Lm(new class{a(){return Eb}f(){return!!(window.MediaKeys&&navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)}create(){return new Bu}},3);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&&xi(a,b)?!0:!1}entries(){}keys(){}values(){}},Cu=new _.hu(()=>Di(new Uint8Array([0])));var Eu=class{l(){}h(a){_.jh("NopEmeManager.setMediaKeys");return null===a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}o(){return null}a(){_.jh("NopEmeManager.requestMediaKeySystemAccess");return Promise.reject(Error("The key system specified is not supported."))}f(){return"NOP"}};Lm(new class{a(){return"NOP"}f(){return!0}create(){return new Eu}},0);var Gu=class{constructor(){this.j=this.w=null}l(a){this.w=a}h(a){const b=this.j;b&&b!==a&&Or(b,null);return(this.j=a)?Or(a,this.w):Promise.resolve()}o(){return this.j}a(a,b){_.jh("AppleEmeManager.requestMediaKeySystemAccess");try{const c=new Fu(a,b);return Promise.resolve(c)}catch(c){return Promise.reject(c)}}f(){return"APPLE"}},Fu=class{constructor(a,b){this.keySystem=a;if(a.startsWith(_.sd))for(var c of b){a:{a=c;if(a.persistentState===_.vf){a=null;break a}b={audioCapabilities:[],videoCapabilities:[],
479
+ persistentState:_.Je,distinctiveIdentifier:_.Je,initDataTypes:a.initDataTypes,sessionTypes:[Sf],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),
480
+ e=!0));d||(e=WebKitMediaKeys.isTypeSupported(this.keySystem,_.kg));a=e?b:null}if(a){this.a=a;return}}c=Error(Qb);c.name=rb;c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}createMediaKeys(){const a=new Hu(this.keySystem);return Promise.resolve(a)}getConfiguration(){_.jh("AppleEmeManager.MediaKeySystemAccess.getConfiguration");return this.a}},Hu=class{constructor(a){this.f=null;this.h=new WebKitMediaKeys(a);this.a=new _.bt;this.j=0;this.g=new _.S(ld);this.g.info("Created Media Keys for "+a)}createSession(a){a=
481
+ void 0===a?Sf:a;this.g.debug("Creating Apple MediaKeys Session");if(a!==Sf)throw new TypeError("Session type "+a+ba);return new Iu(this.h,`__session_${this.j++}`)}setServerCertificate(){this.g.debug("AppleEmeManager.MediaKeys.setServerCertificate");return Promise.resolve(!1)}},Iu=class extends _.Ot{constructor(a,b){super();this.a=null;this.o=a;this.f=this.h=null;this.j=new _.bt;this.sessionId=b;this.expiration=NaN;this.closed=new _.Cn;this.l=!1;this.keyStatuses=new Du;this.g=new _.S(ld)}generateRequest(a,
482
+ b){if(this.l)return Promise.reject(Hb);this.g.debug("generateRequest");this.h=new _.Cn;try{const c=this.o.createSession(_.kg,_.K(b));this.a=c;this.sessionId=c.sessionId||this.sessionId||"";this.j.on(c,yg,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 _.E(_.ue,{messageType:void 0===e||e===Mf?fe:ee,message:Di(d.message.buffer)});this.dispatchEvent(d)}});this.j.on(c,wg,d=>{this.g.debug("onWebkitKeyAdded_",
483
+ d);this.f&&(Pr(this,"usable"),this.f.resolve(),this.f=null)});this.j.on(c,xg,()=>{var d=this.keyStatuses.getStatus();if(this.a&&this.a&&this.a.error&&this.a.error.code===WebKitMediaKeyError.MEDIA_KEYERR_DOMAIN&&d===Mf)this.g.warn(`Ignoring webkit key error for session ${this.sessionId}`);else if(this.g.error(`Received key error in session ${this.sessionId} `+`with code ${this.a.error.code}. `+`Session Status ${d}.`),d=Error("EME AppleEmeManager key error"),d.errorCode=this.a.error,null!==this.h)this.h.reject(d),
484
+ 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:Pr(this,"output-not-allowed");break;default:Pr(this,_.be)}});Pr(this,Mf)}catch(c){this.h.reject(c)}return this.h}load(){this.g.debug(_.je);return Promise.reject(Error("MediaKeySession.load not yet supported"))}update(a){if(this.l)return Promise.reject(Hb);this.g.debug(ag);this.f=new _.Cn;try{this.a.update(_.K(a))}catch(b){this.f.reject(b)}return this.f}close(){if(this.l)return this.closed;
485
+ this.g.info(`Closing Key Session ${this.sessionId}`);this.l=!0;try{this.a.close(),this.closed.resolve(),_.qh(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"))}};Lm(new class{a(){return"APPLE"}f(){return!!window.WebKitMediaKeys}create(){return new Gu}},2);var Ku=class{constructor(){this.w=this.j=null;this.A="";HTMLMediaElement.prototype.webkitGenerateKeyRequest&&(this.A="webkit")}l(a){this.j=a}h(a){_.jh("WebkitEmeManager.setMediaKeys");if(!this.j)return Promise.reject(ib);const b=this.w;b&&b!==a&&Sr(b,null);(this.w=a)&&Sr(a,this.j);return Promise.resolve()}o(){return this.w}a(a,b){_.jh("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=
486
+ new Ju(this.A,c,a,b);return Promise.resolve(e)}catch(e){return Promise.reject(e)}}f(){return"WEBKIT"}},Ju=class{constructor(a,b,c,d){this.h=a;this.a=this.keySystem=c;a=!1;c===_.Ke&&(this.a=vg,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,
487
+ this.a)&&(f.push(k),e=!0));h||(e=b.canPlayType(_.kg,this.a)||b.canPlayType("video/webm",this.a));g.persistentState!==_.vf||a||(e=!1);if(e){this.f=g;return}}b=Qb;if(c===_.Ke||c===_.xd)b="None of the requested configurations were supported.";c=Error(b);c.name=rb;c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}createMediaKeys(){return Promise.resolve(new Lu(this.h,this.a))}getConfiguration(){return this.f}},Lu=class{constructor(a,b){this.h=a;this.o=b;this.a=null;this.f=new _.bt;this.j=[];this.l=new Map}createSession(a=
488
+ Sf){if(a!==Sf&&a!==_.Oe)throw new TypeError("Session type "+a+ba);if(!this.a)throw a=Error("Media element is missing."),a.name=Za,a.code=DOMException.INVALID_STATE_ERR,a;this.a.src||(this.a.src="about:blank");a=new Mu(this.h,this.a,this.o,a);this.j.push(a);return a}setServerCertificate(){return Promise.resolve(!1)}},Mu=class extends _.Ot{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 _.Cn;this.keyStatuses=
489
+ new Du}ready(){_.jh("WebkitEmeManager.MediaKeySession.ready");Rr(this,"usable");this.a&&this.a.resolve();this.a=null}generateRequest(a,b){_.jh("WebkitEmeManager.MediaKeySession.generateRequest");return Xr(this,b,null)}load(a){_.jh(Vb);return this.l===_.Oe?Xr(this,null,a):Promise.reject(Error(ob))}update(a){_.jh(Vb);const b=new _.Cn;Yr(this,b,a);return b}close(){_.jh("WebkitEmeManager.MediaKeySession.close");if(this.l!==_.Oe){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),
490
+ this.closed;const a=Tr(this,"cancelKeyRequest");try{this.j[a](this.h,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed}remove(){_.jh("WebkitEmeManager.MediaKeySession.remove");return this.l!==_.Oe?Promise.reject(Error(ob)):this.close()}};Lm(new class{a(){return"WEBKIT"}f(){return!(!HTMLMediaElement.prototype.webkitGenerateKeyRequest&&!HTMLMediaElement.prototype.generateKeyRequest)}create(){return new Ku}},1);var Pu=class extends _.Tt{constructor(a,b,c,d,e){super(Ya);this.l=a;this.j=b;this.h=c;this.a=d;this.o=e;this.g=new _.S(kd);_.Pi(this.l)?this.g.warn(_.Wb):this.Za(_.xd,{licenseUrl:this.l,videoRobustness:[_.Gb,void 0],audioRobustness:[_.Fb,void 0],persistentStateRequired:!1,distinctiveIdentifierRequired:!1,serverCertificate:null,modifiers:{licenseRequest:this.bd.bind(this)}});_.Pi(this.j)?this.g.warn(_.ub):this.Za(_.vd,{licenseUrl:this.j,videoRobustness:["3000"],audioRobustness:["2000"],modifiers:{licenseRequest:this.bd.bind(this)}});
491
+ _.Pi(this.h)?this.g.warn(_.Ta):_.Pi(this.a)?this.g.warn(_.Sa):this.Za(_.sd,{licenseUrl:this.h,certificateUrl:this.a,modifiers:{licenseRequest:this.Gf.bind(this),licenseResponse:this.Hf.bind(this),certificateRequest:this.bd.bind(this),extractContentId:this.jf.bind(this)}})}bd(a,b){a=a.drm.customData.headers||{};for(const c of Object.keys(a))b.headers[c]=a[c]}jf(a,b){a=em(b);switch(this.o){case Nu:return a;case Ou:return(new _.fm(a)).a;default:throw Error("Unknown content ID strategy");}}Gf(a,b){b.headers[sa]=
492
+ Gc;this.bd(a,b);a={spc:_.Ti(b.body)};b.body=_.Li(_.Ij(a,!0))}Hf(a,b){a=_.Fi(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=_.Vi(a).buffer}};_.z(kd,Pu);Pu.prototype.onFairPlayLicenseResponse=Pu.prototype.Hf;Pu.prototype.onFairPlayLicenseRequest=Pu.prototype.Gf;Pu.prototype.extractFairPlayContentId=Pu.prototype.jf;Pu.prototype.onLicenseRequest=Pu.prototype.bd;Pu.prototype.constructor=Pu.prototype.constructor;Pu.NAME=Ya;
493
+ var Ou="hostname",Nu="full-skd";Pu.FairPlayContentIdStrategy={HOSTNAME:Ou,FULL_SKD:Nu};_.z("clpp.drm.HeaderDrmComponent",class extends _.Au{h(a){a=a.getConfiguration();if(a.drm&&a.drm&&a.drm.env===Ya){a=a.drm.customData;if(!a)throw new _.I(_.F,7,7100,_.yd);a=new Pu(a.widevineLicenseUrl,a.playReadyLicenseUrl,a.fairPlayLicenseUrl,a.fairPlayCertificateUrl,a.fairPlayContentIdStrategy||Nu);_.Kl(a)}}a(){delete _.Jl.HeaderDrm}id(){return"headerdrm"}});_.pq(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})});_.pq(function(){_.jh("mathRound.install")});_.pq(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;Wd in document||(Object.defineProperty(document,Wd,{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement}}),Object.defineProperty(document,"fullscreenEnabled",
494
+ {get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitSupportsFullscreen||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",Zr);document.addEventListener("webkitfullscreenerror",Zr);document.addEventListener("mozfullscreenchange",Zr);document.addEventListener("mozfullscreenerror",Zr);document.addEventListener("MSFullscreenChange",Zr);document.addEventListener("MSFullscreenError",Zr)}});_.pq(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(_.jh("PiPWebkit.install"),document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=as,document.exitPictureInPicture=bs,document.addEventListener("webkitpresentationmodechanged",$r,!0))}});_.pq(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in a&&(a.getVideoPlaybackQuality=cs)}});_.pq(function(){if(window.VTTCue)_.ih("Using native VTTCue.");else if(window.TextTrackCue){var a=TextTrackCue.length;if(3===a)_.ih(Rb),window.VTTCue=ds;else if(6===a)_.ih("Using VTTCue polyfill from 6 argument TextTrackCue."),window.VTTCue=es;else{try{var b=!!ds(1,2,"")}catch(c){b=!1}b&&(_.ih(Rb),window.VTTCue=ds)}}else _.kh("VTTCue not available.")});var fs;_.pq(function(){_.jh("InputEvent.install");_.sk("Trident/")&&HTMLInputElement.prototype.addEventListener!==gs&&(_.ih("Patching input event support on IE."),fs=HTMLInputElement.prototype.addEventListener,HTMLInputElement.prototype.addEventListener=gs)});_.pq(function(){navigator.languages||Object.defineProperty(navigator,"languages",{get:()=>navigator.language?[navigator.language]:["en"]})});_.pq(function(){_.jh("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 js=class{constructor(){this.a=hs()}};var Qu=class{constructor(a,b){b=void 0===b?2:b;this.a=new Uint8Array(a);this.h=b;this.f=0}};_.Ru=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 Su;_.Tu=class{constructor(){this.a=new Blob([Su],{type:_.kg})}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 _.Cn;b=b.play();const d=(new _.pk(()=>{d.stop();c.resolve(a)})).fa(.25);void 0!==b?b.then(()=>{d.stop();c.resolve(!0)}).catch(e=>{e&&e.message&&e.message===rb?(d.stop(),c.resolve(!0)):(d.stop(),c.resolve(!1))}):(d.stop(),c.resolve(!0));return c}};
495
+ Su=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,
493
496
  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,
494
497
  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,
495
498
  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,
496
499
  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,
497
500
  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,
498
- 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]);_.Ku=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}Mb(){return this.f}Yc(){return this.h}yc(a){return this.getId()===a.getId()&&this.Mb()===a.Mb()&&this.getDuration()===a.getDuration()&&this.Yc()===a.Yc()}};_.x("clpp.media.TimelineWindow",_.Ku);_.Ku.prototype.isDynamic=_.Ku.prototype.Yc;_.Ku.prototype.getStart=_.Ku.prototype.Mb;_.Ku.prototype.getId=_.Ku.prototype.getId;_.Ku.prototype.getDuration=_.Ku.prototype.getDuration;_.Lu=new _.R("clpp.media.TimestampParser");_.Mu=class{constructor(){this.a=[];this.f=-1;this.h=null}Mg(a){return this.a[a]||null}Ng(){return this.a.length}Og(){return this.a}kf(){return this.a[this.f]||null}Hg(){return this.f}};_.x("clpp.media.Timeline",_.Mu);_.Mu.prototype.getCurrentWindowIndex=_.Mu.prototype.Hg;_.Mu.prototype.getCurrentWindow=_.Mu.prototype.kf;_.Mu.prototype.getWindows=_.Mu.prototype.Og;_.Mu.prototype.getWindowCount=_.Mu.prototype.Ng;_.Mu.prototype.getWindow=_.Mu.prototype.Mg;_.ds={};_.fs={};var As=class{constructor(a){this.a=new Uint8Array(a||65536);this.f=0;this.h=new Zr}};var js=window.XMLHttpRequest;var zs=class{constructor(a,b){a=void 0===a?1E6:a;b=void 0===b?!0:b;this.j=new Gu(a);this.length=a;this.A=b;this.f=this.a=this.h=0;this.l=null;this.o=-1;this.w=new Zr}};var vt=class extends _.Eo{constructor(a){super(new _.xn,()=>Promise.resolve());this.B=a;this.h=null;this.w=this.W;this.f=-1;this.j=this.l=this.o=null;ts(this)}then(a,b){this.W=this.W.then(a,b);return this}catch(a){this.W=this.W.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 ys=window.fetch,vs=window.AbortController,us=window.Headers;_.Ds={};_.Ou=class{constructor(a){a=a.getConfiguration();a=_.Pg(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.O=typeof a.fontFamily===_.Pf?a.fontFamily:null;this.I=typeof a.fontSize===_.Pf?a.fontSize:null;this.C=typeof a.fontSizePercent===_.r?a.fontSizePercent:null;this.H=typeof a.edgeColor===_.Pf?a.edgeColor:"rgba(0, 0, 0, 1)";this.w=null;typeof a.edgeType===
499
- _.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.O}setFontFamily(a){this.O=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?Nu:this.C}setFontSizePercent(a){this.C=a;this.h()}getEdgeColor(){return this.H}setEdgeColor(a){this.H=
500
- a;this.h()}getEdgeType(){return this.w}setEdgeType(a){this.w=a;this.h()}};_.Ou.prototype.setEdgeType=_.Ou.prototype.setEdgeType;_.Ou.prototype.getEdgeType=_.Ou.prototype.getEdgeType;_.Ou.prototype.setEdgeColor=_.Ou.prototype.setEdgeColor;_.Ou.prototype.getEdgeColor=_.Ou.prototype.getEdgeColor;_.Ou.prototype.setFontSizePercent=_.Ou.prototype.setFontSizePercent;_.Ou.prototype.getFontSizePercent=_.Ou.prototype.getFontSizePercent;_.Ou.prototype.setFontSize=_.Ou.prototype.setFontSize;
501
- _.Ou.prototype.getFontSize=_.Ou.prototype.getFontSize;_.Ou.prototype.setFontColor=_.Ou.prototype.setFontColor;_.Ou.prototype.getFontColor=_.Ou.prototype.getFontColor;_.Ou.prototype.setFontFamily=_.Ou.prototype.setFontFamily;_.Ou.prototype.getFontFamily=_.Ou.prototype.getFontFamily;_.Ou.prototype.setWindowColor=_.Ou.prototype.setWindowColor;_.Ou.prototype.getWindowColor=_.Ou.prototype.getWindowColor;_.Ou.prototype.setBackgroundColor=_.Ou.prototype.setBackgroundColor;
502
- _.Ou.prototype.getBackgroundColor=_.Ou.prototype.getBackgroundColor;var Nu=1/15;var Hs="raised",Is="depressed",Ks="dropshadow",Js="uniform";_.x("clpp.text.EdgeType",{NONE:_.Ce,RAISED:Hs,DEPRESSED:Is,DROP_SHADOW:Ks,UNIFORM:Js});_.Es(Bc,class{constructor(a){this.f=a;this.a=null;this.g=new _.R("clpp.text.Mp4TextParser")}parseInit(a){let b;try{const c=_.Fs(_.Cc);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=_.Fs(_.Dc);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=
503
- b;else throw new _.G(_.E,2,2011);}}parseMedia(a,b){if(!this.a)throw new _.G(_.E,2,2011);return this.a.parseMedia(a,b)}});var Pu;
504
- _.Qu=class extends _.Ou{constructor(a){super(a);this.o=a.getSurface().getMedia();this.f=`clpp-video-${Pu++}`;this.j=document.createElement(_.Rf);this.l=this.A=!1;_.No(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":_.Ls(this)},b=
505
- 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()}};Pu=0;_.Wn("native",new class{a(){return!0}create(a){return new _.Qu(a)}});_.Ru=class{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;
501
+ 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]);_.Uu=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}Mb(){return this.f}Wc(){return this.h}yc(a){return this.getId()===a.getId()&&this.Mb()===a.Mb()&&this.getDuration()===a.getDuration()&&this.Wc()===a.Wc()}};_.z("clpp.media.TimelineWindow",_.Uu);_.Uu.prototype.isDynamic=_.Uu.prototype.Wc;_.Uu.prototype.getStart=_.Uu.prototype.Mb;_.Uu.prototype.getId=_.Uu.prototype.getId;_.Uu.prototype.getDuration=_.Uu.prototype.getDuration;_.Vu=new _.S("clpp.media.TimestampParser");_.Wu=class{constructor(){this.a=[];this.f=-1;this.h=null}Pg(a){return this.a[a]||null}Qg(){return this.a.length}Rg(){return this.a}nf(){return this.a[this.f]||null}Kg(){return this.f}};_.z("clpp.media.Timeline",_.Wu);_.Wu.prototype.getCurrentWindowIndex=_.Wu.prototype.Kg;_.Wu.prototype.getCurrentWindow=_.Wu.prototype.nf;_.Wu.prototype.getWindows=_.Wu.prototype.Rg;_.Wu.prototype.getWindowCount=_.Wu.prototype.Qg;_.Wu.prototype.getWindow=_.Wu.prototype.Pg;_.os={};_.qs={};var Ls=class{constructor(a){this.a=new Uint8Array(a||65536);this.f=0;this.h=new js}};var us=window.XMLHttpRequest;var Ks=class{constructor(a,b){a=void 0===a?1E6:a;b=void 0===b?!0:b;this.j=new Qu(a);this.length=a;this.A=b;this.f=this.a=this.h=0;this.l=null;this.o=-1;this.w=new js}};var Gt=class extends _.Lo{constructor(a){super(new _.Cn,()=>Promise.resolve());this.B=a;this.h=null;this.w=this.W;this.f=-1;this.j=this.l=this.o=null;Es(this)}then(a,b){this.W=this.W.then(a,b);return this}catch(a){this.W=this.W.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 Js=window.fetch,Gs=window.AbortController,Fs=window.Headers;_.Os={};_.Yu=class{constructor(a){a=a.getConfiguration();a=_.Qg(a.textStyle||a.textstyle||{});this.K=typeof a.backgroundColor===_.Of?a.backgroundColor:null;this.R=typeof a.windowColor===_.Of?a.windowColor:null;this.M=typeof a.fontColor===_.Of?a.fontColor:null;this.O=typeof a.fontFamily===_.Of?a.fontFamily:null;this.I=typeof a.fontSize===_.Of?a.fontSize:null;this.C=typeof a.fontSizePercent===_.t?a.fontSizePercent:null;this.H=typeof a.edgeColor===_.Of?a.edgeColor:"rgba(0, 0, 0, 1)";this.w=null;typeof a.edgeType===
502
+ _.Of&&(this.w=a.edgeType)}getBackgroundColor(){return this.K}setBackgroundColor(a){this.K=a;this.h()}getWindowColor(){return this.R}setWindowColor(a){this.R=a;this.h()}getFontFamily(){return this.O}setFontFamily(a){this.O=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?Xu:this.C}setFontSizePercent(a){this.C=a;this.h()}getEdgeColor(){return this.H}setEdgeColor(a){this.H=
503
+ a;this.h()}getEdgeType(){return this.w}setEdgeType(a){this.w=a;this.h()}};_.Yu.prototype.setEdgeType=_.Yu.prototype.setEdgeType;_.Yu.prototype.getEdgeType=_.Yu.prototype.getEdgeType;_.Yu.prototype.setEdgeColor=_.Yu.prototype.setEdgeColor;_.Yu.prototype.getEdgeColor=_.Yu.prototype.getEdgeColor;_.Yu.prototype.setFontSizePercent=_.Yu.prototype.setFontSizePercent;_.Yu.prototype.getFontSizePercent=_.Yu.prototype.getFontSizePercent;_.Yu.prototype.setFontSize=_.Yu.prototype.setFontSize;
504
+ _.Yu.prototype.getFontSize=_.Yu.prototype.getFontSize;_.Yu.prototype.setFontColor=_.Yu.prototype.setFontColor;_.Yu.prototype.getFontColor=_.Yu.prototype.getFontColor;_.Yu.prototype.setFontFamily=_.Yu.prototype.setFontFamily;_.Yu.prototype.getFontFamily=_.Yu.prototype.getFontFamily;_.Yu.prototype.setWindowColor=_.Yu.prototype.setWindowColor;_.Yu.prototype.getWindowColor=_.Yu.prototype.getWindowColor;_.Yu.prototype.setBackgroundColor=_.Yu.prototype.setBackgroundColor;
505
+ _.Yu.prototype.getBackgroundColor=_.Yu.prototype.getBackgroundColor;var Xu=1/15;var Ss="raised",Ts="depressed",Vs="dropshadow",Us="uniform";_.z("clpp.text.EdgeType",{NONE:_.Be,RAISED:Ss,DEPRESSED:Ts,DROP_SHADOW:Vs,UNIFORM:Us});_.Ps(Bc,class{constructor(a){this.f=a;this.a=null;this.g=new _.S("clpp.text.Mp4TextParser")}parseInit(a){let b;try{const c=_.Qs(_.Cc);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=_.Qs(_.Dc);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=
506
+ 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 Zu;
507
+ _.$u=class extends _.Yu{constructor(a){super(a);this.o=a.getSurface().getMedia();this.f=`clpp-video-${Zu++}`;this.j=document.createElement(_.Qf);this.l=this.A=!1;_.Uo(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":_.Ws(this)},b=
508
+ 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()}};Zu=0;_.co("native",new class{a(){return!0}create(a){return new _.$u(a)}});_.av=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;