@castlabs/prestoplay 1.1.1-beta.2

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 (64) hide show
  1. package/CHANGELOG.md +768 -0
  2. package/README.md +52 -0
  3. package/cjs/cl.adobe.js +8 -0
  4. package/cjs/cl.airplay.js +8 -0
  5. package/cjs/cl.broadpeak.js +11 -0
  6. package/cjs/cl.cast.js +117 -0
  7. package/cjs/cl.conviva.js +38 -0
  8. package/cjs/cl.core.js +565 -0
  9. package/cjs/cl.crypto.js +15 -0
  10. package/cjs/cl.dash.js +78 -0
  11. package/cjs/cl.externs.js +4112 -0
  12. package/cjs/cl.freewheel.js +29 -0
  13. package/cjs/cl.hls.js +72 -0
  14. package/cjs/cl.hlssmpte.js +11 -0
  15. package/cjs/cl.htmlcue.js +35 -0
  16. package/cjs/cl.ima.js +29 -0
  17. package/cjs/cl.mse.js +279 -0
  18. package/cjs/cl.muxdata.js +19 -0
  19. package/cjs/cl.onboard.js +8 -0
  20. package/cjs/cl.persistent.js +19 -0
  21. package/cjs/cl.playlist.js +11 -0
  22. package/cjs/cl.simid.js +21 -0
  23. package/cjs/cl.smooth.js +76 -0
  24. package/cjs/cl.thumbnails.js +29 -0
  25. package/cjs/cl.tizen.js +76 -0
  26. package/cjs/cl.ttml.js +33 -0
  27. package/cjs/cl.verimatrix.js +10 -0
  28. package/cjs/cl.vimond.js +18 -0
  29. package/cjs/cl.vr.js +25 -0
  30. package/cjs/cl.vtt.js +19 -0
  31. package/cjs/cl.youbora.js +25 -0
  32. package/cjs/polyfill.min.js +47 -0
  33. package/cl.adobe.js +3 -0
  34. package/cl.airplay.js +3 -0
  35. package/cl.broadpeak.js +5 -0
  36. package/cl.cast.js +88 -0
  37. package/cl.conviva.js +27 -0
  38. package/cl.core.js +466 -0
  39. package/cl.crypto.js +9 -0
  40. package/cl.dash.js +68 -0
  41. package/cl.externs.js +4028 -0
  42. package/cl.freewheel.js +19 -0
  43. package/cl.hls.js +69 -0
  44. package/cl.hlssmpte.js +5 -0
  45. package/cl.htmlcue.js +26 -0
  46. package/cl.ima.js +17 -0
  47. package/cl.mse.js +241 -0
  48. package/cl.muxdata.js +12 -0
  49. package/cl.onboard.js +4 -0
  50. package/cl.persistent.js +11 -0
  51. package/cl.playlist.js +5 -0
  52. package/cl.simid.js +13 -0
  53. package/cl.smooth.js +59 -0
  54. package/cl.thumbnails.js +17 -0
  55. package/cl.tizen.js +57 -0
  56. package/cl.ttml.js +22 -0
  57. package/cl.verimatrix.js +4 -0
  58. package/cl.vimond.js +8 -0
  59. package/cl.vr.js +15 -0
  60. package/cl.vtt.js +12 -0
  61. package/cl.youbora.js +15 -0
  62. package/clpp.styles.css +166 -0
  63. package/package.json +63 -0
  64. package/typings.d.ts +8255 -0
package/cl.core.js ADDED
@@ -0,0 +1,466 @@
1
+ let g={}; let _ = {};let f=function(window){'use strict';var ba,ca,ka,ma,qa,ra,ta,ua,va,wa,Na,Ta,Ua,Wa,Xa,Ya,$a,eb,fb,hb,ib,jb,kb,lb,mb,ob,rb,xb,Ab,Bb,Cb,Fb,Hb,Kb,Lb,Ob,Pb,Rb,uc,Cc,Nc,Oc,Uc,Vc,Wc,Zc,$c,ad,bd,cd,ed,fd,gd,hd,id,jd,qd,ud,zd,Ad,Bd,Cd,Ed,Hd,Id,Jd,Nd,Ud,Vd,Yd,Zd,ge,ze,Ge,Ie,Je,Ke,Le,Me,Ne,Re,Se,Te,Ue,Ve,We,Xe,Ye,bf,df,of,rf,xf,Ef,Ff,Xf,ag,bg,cg,dg,eg,gg,hg,ig,jg,kg,lg,og,pg,ug,rg,Cg,Dg,Hg,Jg,Rg,ah,bh,Vg,Yg,dh,fh,eh,hh,ih,jh,oh,ph,rh,sh,wh,yh,Ah,uh,Fh,Hh,Gh,Ih,Jh,Kh,Nh,Oh,Rh,qi,ui,vi,wi,xi,yi,Ai,Bi,Ci,Di,Gi,Ji,Ni,Oi,Ui,Wi,Ri,Ti,Vi,
2
+ Xi,Yi,Zi,aj,bj,hj,lj,qj,sj,pj,Cj,vj,uj,Nj,Oj,Qj,Rj,Sj,Tj,Uj,Vj,Xj,Wj,Yj,Zj,ck,dk,ek,Pj,gk,ik,kk,mk,tk,uk,vk,wk,xk,yk,zk,Ak,Bk,Ck,Dk,Jk,Sk,Uk,$k,el,gl,nl,Al,jl,sl,Fl,Hl,Il,Tl,Ul,Zl,bm,cm,dm,fm,gm,hm,$l,em,im,jm,km,lm,mm,nm,tm,ym,Am,Cm,Bm,Em,wm,Lm,Im,Km,Jm,zm,Mm,Nm,Om,Um,Vm,Wm,Zm,cn,dn,fn,an,$m,on,pn,tn,sn,vn,xn,yn,un,An,Bn,Gn,Ln,Mn,Nn,Rn,Sn,Qn,Tn,Pn,On,Vn,Xn,Zn,$n,ao,bo,co,eo,fo,go,ho,io,mo,qo,ro,to,vo,yo,Fo,zo,Ao,Do,Go,Ho,Jo,No,Oo,Qo,So,To,Ro,Mo,Ko,Lo,Uo,Vo,Wo,Xo,Zo,ap,bp,dp,fp,hp,$o,ip,jp,ep,gp,
3
+ kp,lp,qp,sp,rp,tp,up,vp,wp,np,yp,op,mp,Bp,Ep,Fp,Kp,Lp,Mp,Pp,Np,Op,Qp,Rp,Sp,Tp,Up,Vp,Wp,Xp,Yp,Zp,aq,bq,cq,eq,gq,lq,mq,nq,pq,qq,rq,tq,uq,sq,vq,yq,xq,wq,zq,Dq,Cq,Iq,mg,ng;_.aa=" is registered.";ba=" is unsupported on this platform.";ca=" to a log level. Falling back to default!";_.da="1.1.1-beta.2";_.fa="AdaptationSet";_.ha="Already destroyed. No-op";_.ia="Already released. No-op";_.ja="Autoplay is not allowed due to browser policy.";ka="Autoplay should not be used for preloaded streams. ";_.la="BANDWIDTH";
4
+ ma="CHECKSUM";_.na="CODECS";_.oa="Cannot retrieve buffer information due to platform limitations";_.pa="CastlabsPlayer";qa="Content-Length";ra="Content-Type";_.sa="Could not find configured DRM environment.";ta="DRM licenses loaded";ua="DRMtoday";va="DRMtodayOnboard";wa="Destroying player";_.xa="Disable track type ";_.ya="EXT-X-BYTERANGE";_.za="EXT-X-DATERANGE";_.Aa="EXT-X-DISCONTINUITY";_.Ba="EXT-X-DISCONTINUITY-SEQUENCE";_.Ca="EXT-X-ENDLIST";_.Da="EXT-X-KEY";_.Ea="EXT-X-MAP";_.Fa="EXT-X-MEDIA-SEQUENCE";
5
+ _.Ga="EXT-X-PART-INF";_.Ha="EXT-X-PLAYLIST-TYPE";_.Ia="EXT-X-PRELOAD-HINT";_.Ja="EXT-X-PROGRAM-DATE-TIME";_.Ka="EXT-X-SERVER-CONTROL";_.Ma="EXT-X-TARGETDURATION";Na="Error while decoding string!";_.Pa="Error while fetching license!";_.Qa="FairPlay Certificate URL is not defined";_.Ra="FairPlay License URL is not defined";_.Sa="GROUP-ID";Ta="HW_SECURE_ALL";Ua="HW_SECURE_CRYPTO";Wa="HW_SECURE_DECODE";Xa="HeaderDrm";Ya="InvalidStateError";_.Za="LANGUAGE";$a="License verification failed: ";_.ab="Loading player with configuration";
6
+ _.cb="MaxHeight";_.db="MaxWidth";eb="Missing media element";fb="No drmtoday configuration found in player configuration. Unable to modify the DRM license request!";hb="No event provided!";ib="No items in the playlist";jb="No track data attached to the event, unable to add track!";kb="Not a persistent session.";lb="NotAllowedError";mb="NotSupportedError";_.nb="PlayReady License URL is not defined";ob="Player not ready yet.";_.pb="Player sources";_.qb="Please make sure ";rb="Preloading is not supported by this player.";
7
+ _.sb="QualityLevel";_.ub="RESOLUTION";_.vb="Releasing player with source";_.wb="Representation";xb="STANDARD";_.yb="SW_SECURE_CRYPTO";_.zb="SW_SECURE_DECODE";Ab="Session is closed";Bb="Signature Verification failed";Cb="Skipping Session creation. License for init data was already requested in ";_.Db="SmoothStreamingMedia";_.Eb="TYPE";Fb="The index is not in the allowed range.";_.Gb="URI";Hb="Unable to translate ";_.Ib="Unhandled/ignored event";_.Jb="Unregistering listeners";Kb="Unsupported keySystem";
8
+ Lb="Using VTTCue polyfill from 3 argument TextTrackCue.";_.Mb="VIDEO";Ob="Wait for preloading to finish";Pb="WebkitEmeManager.MediaKeySession.load";_.Qb="Widevine License URL is not defined";Rb="Will create EME Manager: ";_.Sb="X-ASSET-LIST";_.Tb="X-ASSET-URI";_.Ub="X-PLAYOUT-LIMIT";_.Vb="X-RESUME-OFFSET";_.Wb="ad-break-started";_.Xb="ad-break-stopped";_.Zb="ad-buffering";_.$b="ad-clicked";_.ac="ad-completed";_.bc="ad-first-quartile";_.cc="ad-impression";_.dc="ad-loaded";_.ec="ad-midpoint";_.fc="ad-paused";
9
+ _.gc="ad-progress";_.hc="ad-resumed";_.ic="ad-skipped";_.jc="ad-started";_.kc="ad-stopped";_.lc="ad-third-quartile";_.mc="addtrack";_.nc="ads-timeline-changed";_.oc="airplay-casting-ended";_.pc="airplay-casting-started";_.qc="airplay-status-changed";_.rc="application/cea-608";_.sc="application/dash+xml";uc="application/mp4";_.vc='application/mp4; codecs\x3d"stpp"';_.zc='application/mp4; codecs\x3d"wvtt"';_.Ac="application/ttml+xml";_.Bc="application/vnd.ms-sstr+xml";Cc="application/x-www-form-urlencoded";
10
+ _.p="audio";_.Dc="audio/aac";_.Ec="audio/ac3";_.Fc="audio/eac3";_.Gc="audio/mp4";_.Hc="audiobufferchanged";_.Ic="autoplaynotallowed";_.Jc="bitratechanged";_.Kc="boolean";_.Lc="bufferingended";_.Mc="bufferingstarted";Nc="canplay";Oc="canplaythrough";_.Pc="castingstarted";_.Qc="caststatuschanged";_.Rc="cdn-switch-success";_.Sc="cenc";_.Tc="center";Uc="certificate-request";Vc="change";Wc="chrome";_.Xc="clpp-fill";Zc="clpp-hidden";$c="clpp-mc-playlist";ad="clpp-mc-playlist-item";bd="clpp-mc-playlist-video-el";
11
+ cd="clpp-visible";_.dd="clpp.cast.CastSender";ed="clpp.drm.HeaderDrm";fd="clpp.drm.eme.AppleEmeManager";gd="clpp.interstitial.Player";hd="clpp.native.Player";id="clpp.plist.McPlaylist";jd="clpp.utils.Platform";_.kd="codecs";_.ld="column-reverse";_.md="com.adobe.primetime";_.nd="com.apple.fps";_.od="com.apple.hls.interstitial";_.pd="com.microsoft.playready";qd="com.microsoft.playready.recommendation";_.sd="com.widevine.alpha";_.td="config.drm.customData is not defined";ud="controls";_.vd="cuechange";
12
+ _.wd="destroy()";_.xd="disabled";_.yd="div";zd="drm.mediaKeys.end";Ad="drm.mediaKeys.start";Bd="drm.onPlay.end";Cd="drm.onPlay.start";_.Dd="drmexpirationupdate";Ed="drmrenewalstarted";_.Fd="drmsessionpersisted";_.Gd="drmsessionupdate";Hd="drmtoday";Id="durationchange";Jd="encrypted";_.Kd="end";_.Ld="ended";_.Md="error";Nd="fullscreenElement";_.Od="function";_.Pd="height";_.Qd="hidden";_.Rd="html";_.Sd="image";_.Td="internal-error";Ud="itemchange";Vd="keystatuseschange";_.Wd="left";Yd="license-renewal";
13
+ Zd="license-request";_.ce="line-left";_.de="line-right";_.ee="loadeddata";_.fe="loadedmetadata";ge="loadstart";_.he="main";_.ie="mdat";_.je="mdia";_.ke="message";_.le="metadata";_.me="mimeType";_.ne="minf";_.oe="moov";_.pe="mp4";_.qe="mpd-type-changed";_.re="mpeg-dash-callback-event";_.se="none";_.r="number";_.te="object";_.ue="onBitrateChanged()";_.ve="onPlayerError()";_.we="onPlayerWillDestroy";_.xe="onPlayerWillRelease";_.ye="onStateChanged()";ze="online-status-changed";_.Ae="optional";_.Be="org.w3.clearkey";
14
+ _.Ce="output-restricted";_.De="pause";_.Ee="persistent";_.Fe="persistent-license";Ge="picture-in-picture";_.He="play";Ie="player.afterLoad.end";Je="player.afterLoad.start";Ke="player.beforeLoad.end";Le="player.beforeLoad.start";Me="player.load.end";Ne="player.load.start";_.Oe="playing";_.Pe="playlist-item-changed";_.Qe="playlist-modified";Re="playlist.next.end";Se="playlist.next.start";Te="preload-aborted";Ue="preload-failed";Ve="preloaded";We="preloading";Xe="primary-before-load";Ye="primary-content";
15
+ _.Ze="progress";_.$e="px";_.af="ratechange";bf="released";_.cf="releasing";df="removetrack";_.ef="required";_.ff="resize";_.gf="right";_.hf="seeked";_.jf="seeking";_.kf="showing";_.lf="simid-creative-started";_.mf="simid-creative-stopped";_.nf="sinf";of="stalled";_.pf="start";_.qf="statechanged";rf="status-pending";_.sf="stbl";_.tf="string";_.uf="stsd";_.vf="style";_.wf="subtitles-htmlcue";xf="temporary";_.t="text";_.yf="text/vtt";_.zf="text/xml";_.Af="timeupdate";_.Bf="trak";_.Cf="ttml-xml";
16
+ _.Df="und";Ef="unknown";Ff="update";_.Gf="urn:scte:scte35";_.Hf="urn:scte:scte35:2014";_.If="user-seeked";_.Jf="user-seeking";_.Kf="value";_.Lf="vertical-lr";_.Mf="vertical-rl";_.w="video";_.Nf="video/mp2t";_.Of="video/mp4";_.Qf="videobufferchanged";_.Rf="videotrackchanged";_.Sf="vimond-response";Xf="visibilitychange";_.Yf="vtt-xml";_.Zf="waiting";_.$f="waitingforkey";ag="webkit-org.w3.clearkey";bg="webkitkeyadded";cg="webkitkeyerror";dg="webkitkeymessage";eg="webkitneedkey";_.fg="width";gg="x-dt-csl-tracking-token";
17
+ hg="x-dt-follow-up-token";ig="x-dt-resp-code";kg=function(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}};lg=function(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:kg(a)}};og=function(a,b){if(b){var c=mg;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&&ng(c,a,{configurable:!0,writable:!0,value:b})}};
18
+ pg=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 pg(a())};_.z=function(a,b){a=a.split(".");var c=qg;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};
19
+ _.tg=function(a){return _.B(a)||rg(a)?a:_.sg(a)};_.sg=function(...a){let b={};for(let c=0;c<a.length;c++)null!=a[c]&&(b=ug(b,{merging:a[c]},1));return b.merging||null};_.vg=function(a){for(const b in a)if(void 0!==a[b])return!0;return!1};
20
+ ug=function(a,b,c){const d=c+1;if(_.B(a)||!_.wg(a))a={};for(const e in b)c=b[e],rg(c)||_.B(c)||_.xg(c)||c instanceof Element?a[e]=c:_.wg(c)&&c.buffer&&c.buffer instanceof ArrayBuffer&&_.xg(c.subarray)?a[e]=c.subarray(0):c instanceof Array?a[e]=ug([],c,d):!_.B(c)&&_.yg(c)&&20>d&&(a[e]=ug(a[e],c,d));return a};rg=function(a){a=typeof a;return a===_.tf||a===_.r||a===_.Kc};_.B=function(a){return null===a||"undefined"===typeof a};_.wg=function(a){return typeof a===_.te};
21
+ _.xg=function(a){return typeof a===_.Od};_.zg=function(a){return typeof a===_.tf};_.Ag=function(a){return typeof a===_.r};_.yg=function(a){if(_.B(a)||!_.wg(a))return!1;a=Object.getPrototypeOf(a);return a===Object.prototype||null===a};
22
+ _.Bg=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||!_.wg(a)||!_.wg(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};
23
+ Cg=function(a){return(Number.hasOwnProperty("isNaN")?Number.isNaN:b=>b!==b)(a)};Dg=function(a){const b=new Map;for(const c of Object.keys(a))b.set(c,a[c]);return b};_.Eg=function(a){const b={};a.forEach((c,d)=>{b[d]=c});return b};Hg=function(a){return a&&0<=Fg[a]?Fg[a]:Gg};Jg=function(a){if(!a)return _.C("clpp.log",Hb+a+ca),-1;const b=Ig[a.toUpperCase()];return void 0===b?(_.C("clpp.log",Hb+a+ca),-1):b};_.Lg=function(a){Kg.info.apply(Kg,arguments)};_.Mg=function(a){Kg.debug.apply(Kg,arguments)};
24
+ _.C=function(a){Kg.warn.apply(Kg,arguments)};_.Ng=function(a){Kg.error.apply(Kg,arguments)};_.Qg=function(a){if(a){var b=a.a();b in _.Og?_.Pg.warn("Player-Factory '"+b+"' already registered"):(_.Og[b]=a,_.Pg.info("Registered Player-Factory: '"+b+"'"))}};_.Sg=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)Rg(b[c]);a.a.clear()};_.Tg=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)};
25
+ Rg=function(a){a.target.removeEventListener(a.type,a.a,a.f);a.target=null;a.a=null};
26
+ ah=function(a,b){a.h.debug("onMetadata_()");b.mode=_.Qd;const c=[];let d=!0;const e=f=>{for(var g of c)if(f.startTime===g.startTime&&f.endTime===g.endTime)return g;g={schemeIdUri:"",value:"",startTime:0,endTime:0,id:"",type:_.Ug,eventElement:null};a.o&&d&&"SCTE35-IN"===f.value.key&&0<f.startTime?(g.startTime=0,g.endTime=f.startTime):(g.startTime=f.startTime,g.endTime=f.endTime);d=!1;c.push(g);return c[c.length-1]};if(b.cues){for(const f of b.cues){if(Vg(a,f))continue;const g=e(f);switch(f.value.key){case "SCTE35-IN":case "SCTE35-OUT":g.schemeIdUri=
27
+ _.Hf;g.type=_.Wg;break;case "X-CUSTOM-ID":g.id=f.value.data}}for(const f of c)a.m.trigger(new _.F(_.Xg,{detail:f}));Array.prototype.push.apply(a.g,c);Yg(a,c,b);a.f.off(b,_.vd);a.f.on(b,_.vd,f=>{f=f.target.activeCues;f=f.length?Vg(a,f[0]):a.a;var g;if(g=f){{g=f;const h=a.m.getPosition();g=g.startTime<=h&&h<g.endTime}}if(g)a.a=f,a.m.trigger(new _.F(_.Zg,{detail:f}));else{if(f=a.a)f=a.a,g=a.m.getPosition(),f=f.endTime<=g;f&&(f=a.a,a.a=null,a.m.trigger(new _.F(_.$g,{detail:f})))}})}};
28
+ bh=function(a,b){a.j=b;a.l=a.j.textTracks;a.f.on(a.l,_.mc,c=>{c=c.track;c.kind===_.le&&ah(a,c)})};Vg=function(a,b){for(const c of a.g)if(b.startTime===c.startTime&&b.endTime===c.endTime)return c;return null};Yg=function(a,b,c){if(a.o){for(;0<c.cues.length;)c.removeCue(c.cues[0]);b.forEach(function(d){c.addCue(new DataCue(d.startTime,d.endTime,{key:"SCTE35-OUT",data:null}))})}};_.ch=function(a){return Array.isArray(a)?a:[a]};
29
+ dh=function(a,b){return a===b?!0:a.length===b.length&&a.every((c,d)=>c===b[d])};fh=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 eh(a,b)&&eh(b,a)};eh=function(a,b){const c=new Set(a);return b.every(d=>c.has(d))};_.gh=function(a,b={}){if(b.Re){const c=[];for(const d of a)c.some(e=>b.Re(d,e))||c.push(d);return c}return Array.from((new Set(a)).values())};
30
+ hh=function(a,b){b=b.track;b.kind!==_.le&&(b.mode===_.kf&&(b.mode=_.Qd),a.a.on(b,_.vd,c=>{c=c.target||c.srcElement;c.mode=_.Qd;c.activeCues&&(c=Array.from(c.activeCues).map(a.o),a.l.append(c,[]))}))};ih=function(a,b,c,d){a=`${a===_.G?"FATAL":"RECOVERABLE"} Clpp-Error [Category ${b} - Code ${c}]`;if(_.zg(d))a+=": "+d;else if(null!=d&&void 0!=d)if(null!=d.message&&void 0!=d.message)a+=": "+d.message,delete d.message;else try{a+=": "+JSON.stringify(d)}catch(e){}return a};
31
+ jh=function(a,b){const c=b||dh;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)}};_.kh=function(a){return null!=a};oh=function(...a){for(let b=0;b<a.length;b++){const c=a[b];if(null!==c&&void 0!==c)return c}throw new nh("No non-null, non-undefined value found");};ph=function(...a){for(let b=0;b<a.length;b++){const c=a[b];if(null!==c&&void 0!==c)return c}};
32
+ _.qh=function(a){var b;a instanceof _.qh?(rh(this,a.Xa),this.nc=a.nc,this.Ha=a.Ha,sh(this,a.Fc),this.xa=a.xa,_.th(this,uh(a.a)),this.bc=a.bc):a&&(b=String(a).match(vh))?(rh(this,b[1]||"",!0),this.nc=wh(b[2]||""),this.Ha=wh(b[3]||"",!0),sh(this,b[4]),this.xa=wh(b[5]||"",!0),_.th(this,b[6]||"",!0),this.bc=wh(b[7]||"")):this.a=new _.xh(null)};rh=function(a,b,c){a.Xa=c?wh(b,!0):b;a.Xa&&(a.Xa=a.Xa.replace(/:$/,""))};
33
+ sh=function(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.Fc=b}else a.Fc=null};_.th=function(a,b,c){b instanceof _.xh?a.a=b:(c||(b=yh(b,zh)),a.a=new _.xh(b))};wh=function(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""};yh=function(a,b,c){return typeof a===_.tf?(a=encodeURI(a).replace(b,Ah),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null};Ah=function(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)};_.xh=function(a){this.f=a||null};
34
+ uh=function(a){var b=new _.xh;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.g=a.g}return b};_.I=function(a,b,c,d){d=void 0===d?{}:d;a=a.getAttribute(b);if(!a&&d.required)throw new _.H(_.G,4,4023,`Required attribute missing: ${b}`);return a?a.value:c||null};_.Ch=function(a){var b=(a||"").split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=Bh.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a};_.Dh=function(a,b){a=_.Ch(a);b=_.Ch(b);return a.split("-")[0]==b.split("-")[0]};
35
+ _.Eh=function(a,b){for(const c of a)if(!b(c))return!1;return!0};Fh=function*(a){for(let b=0;b<a;b++)yield b};Hh=function(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if(Gh(a)==Gh(b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;const c=_.J(a);b=_.J(b);for(const d of Fh(a.byteLength))if(c[d]!=b[d])return!1;return!0};Gh=function(a){return a instanceof ArrayBuffer?a:a.buffer};_.J=function(a,b=0,c=Infinity){return Ih(a,b,c,Uint8Array)};
36
+ Ih=function(a,b,c,d){const e=d.BYTES_PER_ELEMENT||1,f=Gh(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)};Jh=function(a,b=0,c=Infinity){return Ih(a,b,c,Uint16Array)};Kh=function(a,b=0,c=Infinity){return Ih(a,b,c,Uint32Array)};_.Lh=function(a,b=0,c=Infinity){return Ih(a,b,c,Int32Array)};_.Mh=function(a,b=0,c=Infinity){return Ih(a,b,c,DataView)};
37
+ Nh=function(a){return a instanceof ArrayBuffer?a:0==a.byteOffset&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer};Oh=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};
38
+ _.Ph=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(Na);return a}a=escape(Oh(a));try{return decodeURIComponent(a)}catch(b){throw Error(Na);}};
39
+ Rh=function(a,b,c){if(!a)return"";if(!c&&0!==a.byteLength%2)throw Qh.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 Oh(c)};
40
+ _.Sh=function(a,b){if(_.zg(a))return a;let c="";b=!!b;const d=_.J(a);239==d[0]&&187==d[1]&&191==d[2]?c=_.Ph(d):254==d[0]&&255==d[1]?c=Rh(d.subarray(2),!1):255==d[0]&&254==d[1]&&(c=Rh(d.subarray(2),!0));const e=function(f,g){return f.byteLength<=g||32<=f[g]&&126>=f[g]}.bind(null,d);Qh.debug("Unable to find byte-order-mark, making an educated guess.");0==d[0]&&0==d[2]?c=Rh(a,!1):0==d[1]&&0==d[3]?c=Rh(a,!0):e(0)&&e(1)&&e(2)&&e(3)&&(c=_.Ph(a));if(c)return b&&(c=escape(c)),c;throw Error("Unable to detect text encoding");
41
+ };_.Th=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};_.Uh=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};
42
+ _.Vh=function(a,b){var c=b||1;b=a.length;const d=new ArrayBuffer(b*c);let e;4===c?e=Kh(d):2===c?e=Jh(d):e=_.J(d);for(c=0;c<b;c++)e[c]=a.charCodeAt(c);return d};_.Wh=function(a,b){return String.prototype.startsWith?a.startsWith(b):0===a.indexOf(b)};_.Xh=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};_.Yh=function(a){return!!(a&&0<a.length)};_.Zh=function(a){return!a||0===a.length};
43
+ _.$h=function(a){if(void 0===a||null===a||""===a)return"";try{let b=Number(a);if(Cg(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""}};_.bi=function(a){a=a.replace(/<[^>]+>/gi,"");ai.innerHTML=a;a=ai.textContent;return a=a.replace(/<[^>]+>/gi,"")};_.di=function(a,b){b=void 0==b?!0:b;a=_.ci(a).replace(/\+/g,"-").replace(/\//g,"_");return b?a:a.replace(/[=]*$/,"")};
44
+ _.ci=function(a){a=Oh(_.J(a));return btoa(a)};_.ei=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};_.fi=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};_.gi=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};
45
+ _.hi=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};_.ii=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};
46
+ _.ji=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};
47
+ _.ni=function(a,b){var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new _.H(_.G,4,4016,{invalidTag:b});b=c[1];var d=c[2];c=[];let e;if(d){d=new _.ki(d);var f;(f=_.ji(d,/^([^,=]+)(?:,|$)/g))&&(e=f[1]);const g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;for(;f=_.ji(d,g);)c.push(new _.li(f[1],f[2]||f[3]))}return new _.mi(a,b,c,e)};_.pi=function(){return{maxAttempts:1,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:0,fatalStatusCodes:[...oi]}};
48
+ qi=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||[...oi]};
49
+ _.si=function(a,b){_.zg(a)&&(a={uris:[a]});Array.isArray(a)&&(a={uris:a});const c={uris:a.uris||[],type:a.type||_.ri,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||
50
+ [],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:[...oi],requestStartTimestamp:null};a.keyInfo&&(c.keyInfo=a.keyInfo);b&&qi(c,b);return c};
51
+ _.ti=function(a,b,c,d,e,f,g,h){e&&(d=e);e={uri:d,data:b||new ArrayBuffer(0),headers:a,status:c,fromCache:!!a["x-shaka-from-cache"],timeMs:g,responseStartMs:h,request:f};if(200<=c&&299>=c&&202!==c)return e;g=null;try{g=_.Sh(b,!0)}catch(k){}_.Mg("HTTP error text:",g);throw new _.H(0<=(f.fatalStatusCodes||[]).indexOf(c)?_.G:1,1,1001,{url:d,status:c,responseText:g,headers:a,request:f,response:e});};
52
+ ui=function(a,b){b=parseInt(b,10);Number.isNaN(b)&&(b=-1);a.bytesTotal=b;a.bytesLoaded=0;a.bytesRemaining=b};vi=function(a,b,c){0<a.bytesRemaining&&(a.bytesRemaining-=b);a.bytesLoaded+=b;if(a.onProgress)a.onProgress(b,c)};wi=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()};
53
+ xi=function(a,b,c){try{const d=a(b);if(d&&d.P&&d.abort)return c.resolve(d.P),()=>d.abort();c.resolve(d);return()=>Promise.resolve(d).then(()=>{}).catch(()=>{})}catch(d){return c.reject(d),()=>Promise.resolve()}};yi=function(a,b){a.P.then(()=>b(!0),()=>b(!1));return a};_.zi=function(a,b){a.a.push(yi(b,()=>{{var c=a.a;const d=c.indexOf(b);-1<d&&c.splice(d,1)}}))};Ai=function(a,b){return _.x(function*(){const c=yield a.fetch(b);return _.Ph(c.data).replace(/\r\n|\r(?=[^\n]|$)/gm,"\n")})};
54
+ Bi=function(a,b){return _.x(function*(){const c=yield Ai(a,b);try{const d=JSON.parse(c);if(null==d||typeof d!==_.te)throw Error("Not an object");return d}catch(d){throw new nh("Failed to parse JSON response","json-failed");}})};Ci=function(a,b,c,d){d=void 0===d?"HEAD":d;return _.x(function*(){if(!navigator.onLine)return!1;if(b){const e=_.si(b,c);e.method=d;c||(e.timeout=5E3);e.headers["cache-control"]="no-cache";try{yield a.fetch(e).P}catch(f){if(1002===f.code||1003===f.code)return!1}}return!0})};
55
+ Di=function(a){return`@@scheme:${a.scheme||""}`+`@@value:${a.value}`+`@@id:${a.id||""}@@type:${a.type||""}`+`@@protocol:${a.protocol||""}`};_.Ei=function(a){return a&&a!==_.Df?a:null};
56
+ Gi=function(a){if(!a)throw new _.H(_.G,3,3101,`Invalid track type: ${a}`);if(!_.zg(a))throw new _.H(_.G,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 Fi:return Fi}throw new _.H(_.G,3,3101,`Unknown track type: ${a}.`);};
57
+ Ji=function(a,b){a=Gi(a);const c=_.Ei(b.kind);let d=b.id;d||(d=String(_.Hi++));a=new _.Ii(d,c===_.le?Fi:a);a.kind=c;a.label=_.Ei(b.label);a.language=_.Ei(b.language);a.originalLanguage=b.originalLanguage||a.language;return a};_.Ki=function(a){return`${a.scheme}//`+`${a.a}${a.port?":"+a.port:""}${a.path}${a.g}${a.f}`};
58
+ _.Li=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)},""):""};_.Mi=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};
59
+ Ni=function(a,b){return a.startsWith("http:://")||a.startsWith("https:://")?a:(new URL(a,b)).toString()};Oi=function(a,b){return _.x(function*(){const c=_.si(b);return yield Ai(a.f,c)})};Ui=function(a,b,c){return _.x(function*(){const {mimeType:d,renditions:e}=yield Ri(a,b,c),f=new _.Ii("dummy",_.M),g=e.map((h,k)=>{k=new _.Si(`R${k}`,f);k.bandwidth=h.bandwidth;k.Jc=h.Jc;k.codec=h.codec;k.width=h.width;k.height=h.height;return k});Ti(g);return{renditions:g,mimeType:d||void 0}})};
60
+ Wi=function(a){a=a.split("\n").filter(c=>c.trim().startsWith("#EXT-X-MEDIA:")).map(c=>Vi(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};Ri=function(a,b,c){return _.x(function*(){const d=Xi(b),e=Yi(b,c);return{mimeType:yield Zi(a,e,d[0]?d[0].codec:null),renditions:d}})};
61
+ Ti=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.");};Vi=function(a){const b=_.ni(0,a);a=d=>(d=b.getAttribute(d))?d.value:void 0;var c=a(_.Eb);c=null!=c?{AUDIO:_.L,VIDEO:_.M,SUBTITLES:_.K}[c]:void 0;return{type:c,groupId:a(_.Sa),name:a("NAME"),language:a(_.Za),sh:a("AUTOSELECT"),default:a("DEFAULT"),Eh:a("FORCED"),Qe:a("CHARACTERISTICS"),uri:a(_.Gb)}};
62
+ Xi=function(a){return a.split("\n").filter(b=>b.trim().startsWith("#EXT-X-STREAM-INF:")).map(b=>{var c=_.ni(0,b);if(c.getAttribute(_.Mb))throw Error("Playlist contains alternative video streams.");var d=_.I(c,_.ub);b=d?Number(d.split("x")[0]):null;d=d?Number(d.split("x")[1]):null;var e=_.I(c,_.la);e=e?Number(e):null;var f=_.I(c,"AVERAGE-BANDWIDTH");f=f?Number(f):null;c=_.I(c,_.na);c=_.$i(_.w,c?c.split(","):[]);return b={bandwidth:e,Jc:f,codec:c,width:b,height:d,mimeType:null}})};
63
+ Yi=function(a,b){return(a=a.split("\n").filter(c=>c.trim().endsWith(".m3u8"))[0])?Ni(a,b):null};Zi=function(a,b,c){return _.x(function*(){if(!b||!c)return null;var d=yield Oi(a,b);d=[aj(d,b),bj(d,b)].filter(Boolean);return _.cj(d,_.w,c)})};aj=function(a,b){return(a=a.split("\n").find(c=>!c.startsWith("#")&&0<c.trim().length))?Ni(a,b):null};bj=function(a,b){a=a.split("\n").find(c=>c.startsWith("#EXT-X-MAP:"));return a?(a=_.I(_.ni(0,a),_.Gb))?Ni(a,b):null:null};
64
+ _.ej=function(a,b,c){for(const d of _.dj)if(d.probe(b,c))return d.create(a);return null};_.fj=function(a){a=_.dj.indexOf(a);0<=a&&_.dj.splice(a,1)};_.gj=function(a,b){b&&(a+='; codecs\x3d"'+b+'"');return a};hj=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};
65
+ lj=function(){if(ij)return ij;jj||(jj=new _.kj(()=>{ij=null}));(ij=document.querySelector(_.w)||document.querySelector(_.p))||(ij=document.createElement(_.w));jj.ca(1);return ij};_.mj=function(){return!!navigator.userAgent.match(/Edge?\//)};_.nj=function(a){return(navigator.userAgent||"").includes(a)};_.oj=function(a){return _.nj("Tizen"+(a?" "+String(a):""))};
66
+ qj=function(a){const b={major:-1,name:Ef};if(!a)return b;var c=a.replace(/_/g,".");b.name=c;c=c.split(".");1<=c.length&&(b.major=pj(a,c[0]));2<=c.length&&(b.minor=pj(a,c[1]));3<=c.length&&(b.patch=pj(a,c[2]));4<=c.length&&(b.build=pj(a,c[3]));return b};_.rj=function(){return _.nj("Web0S")};_.tj=function(){return _.rj()&&79===sj().major};
67
+ sj=function(){const a=uj();const b=["ie","edge","opera","firefox","safari",Wc];var c=vj();const d=wj[c];for(let e=0,f=b.length;e<f;e++)if(c=d[b[e]]&&a.match(d[b[e]]))return qj(c[1]);return qj("")};_.xj=function(){return _.nj("CrKey")};_.yj=function(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!_.oj()};_.zj=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:_.yj()&&1<navigator.maxTouchPoints};_.Aj=function(){return/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)};
68
+ pj=function(a,b){try{return parseInt(b,10)}catch(c){Bj.warn("Unable to parse version number for '"+b+"' from '"+a+"'")}return-1};Cj=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};
69
+ vj=function(){const a=uj();if(!a)return Dj;var b=a.match(/^.+?(?=\))/);if(!b)return Dj;b=b[0];if(Cj(b,["iphone","ipad"]))return Ej;if(Cj(b,["android"]))return Fj;if(Cj(b,["macintosh"]))return Gj;if(Cj(b,["windows nt"]))return Hj;if(Cj(b,["tizen"]))return Ij;if(Cj(b,["web0s"]))return Jj;if(Cj(b,["linux"]))return Kj;Bj.warn("Unable to identify OS from user agent: "+a);return Dj};uj=function(){let a=window.navigator.userAgent;return a=a.toLowerCase()};
70
+ _.Mj=function(){var a=vj();var b=vj();var c=wj[b];if(c){c=uj().match(c.os_version)[1];c=qj(c);if(b===Hj)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=qj("");a:{c=uj();const e=["ie","edge","opera","firefox","safari",Wc];var d=vj();d=wj[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=Lj}return{os:a,osVersion:b,browser:c,browserVersion:sj()}};
71
+ Nj=function(a,b,c){return a.type!==c?!1:void 0!==b.id&&null!==b.id&&""!==b.id?a.id===b.id:_.Bg(a,{kind:_.Ei(b.kind),language:_.Ei(b.language),label:_.Ei(b.label)},["kind","language","label"])};Oj=function(a){return a.enabled||a.selected||a.mode===_.kf||a.mode===_.Qd};Qj=function(a,b,c){return Pj(a)&&b===_.M&&!!c.enableHlsVideoTrackInfo};
72
+ Rj=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})))})};Sj=function(a,b,c){return Pj(a)&&(b===_.L||b===_.K)&&!!c.enableMetadata};
73
+ Tj=function(a,b,c){return _.x(function*(){var d=a.m.getLoadedSource();d&&a.j&&(d=yield a.j.a(d.url,c),d.Cc&&(d=d.Cc.get(`${b.type}:${b.label}`))&&d.Qe&&(b.accessibility=d.Qe.split(",").map(e=>e.trim()).map(e=>({value:e,type:b.type,protocol:"HLS"}))))})};Uj=function(a,b){return a.g.filter(c=>c.type===b)};Vj=function(a){(a=a.m.getTextDisplayer())&&a.remove(0,Infinity)};Xj=function(a,b){if(a=Wj(a,b))a=Array.from(a),b===_.K&&(a=a.filter(c=>c.kind!==_.le));return a};
74
+ Wj=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}};Yj=function(a,b){return(a=a.a.get(b)||null)&&a.renditions[0]};Zj=function(a,b){return(a=a.l.get(b))&&a.renditions[0]};
75
+ ck=function(a,b,c){const d=Xj(a,b);if(c){if(void 0===a.g.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.h.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=_.kf;g=_.xd;break;case _.L:f="enabled";break;case _.M:f="selected"}if(f)for(const h of d)h[f]=Nj(c,h,c.type)?e:g}}else if(a.h.debug(_.xa+b),a.a.get(b)&&d&&b===_.K){for(e of d)e.mode=
76
+ _.xd;a.a.set(b,null)}b===_.L?a.m.trigger(new _.F(_.ak)):b===_.K&&a.m.trigger(new _.F(_.bk))};dk=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=_.Zh(b.url)?URL.createObjectURL(new Blob([])):b.url;d.appendChild(e);a.I.push(e)}}};
77
+ ek=function(a,b){return _.x(function*(){var c=a.m.getConfiguration(),d=_.ej(c,b.mimeType,_.yf);if(d){c=_.si(b.url);var e=yield a.m.getNetworkEngine().fetch(c).P;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:_.yf},dk(a,d,c))}else a.h.warn("Track mimetype is not supported",b)})};Pj=function(a){a=a.m.getLoadedSource();return!(!a||a.type!==_.fk&&!a.url.endsWith(".m3u8"))&&_.yj()};
78
+ gk=function(a,b,c){c=_.ch(c).filter(e=>e);a.h.info("Find preferred tracks for",b,c);const d=Uj(a,b);c.some(e=>{const f=_.Ch(e);return(e=d.find(g=>{g=_.Ch(g.language||"");return _.Dh(f,g)}))?(a.h.info("Will select track with id",e.id),ck(a,b,e),!0):!1})};ik=function(a){return a.name===lb&&hk.some(b=>a.message.startsWith(b))};
79
+ _.lk=function(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&_.zj()&&(a=360);const b=_.pi();b.maxAttempts=3;a={source:"",license:jk,viewerId:void 0,autoplay:void 0,pauseWhenInBackground:!1,manifest:{attemptParameters:_.pi(),availabilityWindowOverride:NaN,clockSyncUri:"",ignoreDrmInfo:!1,xlinkFailGracefully:!1,autoCorrectDrift:!0},abr:{enabled:!0,defaultBandwidthEstimate:1E3,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,useSwitchIntervalForInitialSwitch:!1,
80
+ restrictions:kk(a),useCmsd:!1},drm:null,enableHtmlCue:!0,preferredAudioLanguage:"",preferredTextLanguage:"",preferredAudioRole:_.he,preferredTextRole:"",preferredAudioChannelCount:2,preferredAudioCodec:[],preferredVideoCodec:[],preferSpatialAudio:!1,volume:null,startTime:null,loop:!1,lowLatencyMode:!1,suggestedPresentationDelay:void 0,muted:void 0,forceWaitForTracks:!1,streaming:{attemptParameters:b,bufferingGoal:10,rebufferingGoal:2,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,
81
+ 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,chaseJumpDistance:10,patchEdgeWhenMixedContent:!1,ignoreDrift:!1,disableFragmentSupport:!1,
82
+ disableMergedFragments:!1,ignoreManagedMediaSourceStreamingHints:!1},restrictions:kk(),tizen:{sideStreamText:_.oj(2)},safari:{enableHlsVideoTrackInfo:!1,enableMetadata:!1}};if(_.nj("Edge/")||_.oj())a.streaming.gapDetectionThreshold=.5;_.rj()&&(a.streaming.stallEnabled=!1);_.tj()&&(a.streaming.stallEnabled=!0,a.streaming.stallThreshold=1,a.streaming.stallSkip=1,a.streaming.gapDetectionThreshold=.02);_.oj()&&(a.streaming.stallEnabled=!0,a.streaming.stallThreshold=1,a.streaming.stallSkip=0);a.vr={enable:!1,
83
+ attachMouseListener:!0,fieldOfView:70,sensitivity:1,invertHorizontalControl:!1,invertVerticalControl:!1};return a};kk=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}};
84
+ _.nk=function(...a){if(!a)return _.lk();var b=[_.lk()];let c=!1;for(let d of a)null!==d&&void 0!==d&&(_.zg(d)&&(d={source:d}),d.lowLatencyMode&&!c&&(b.push({suggestedPresentationDelay:0,streaming:{rebufferingGoal:.1,bufferLimitUpdateInterval:.01,attemptParameters:{maxAttempts:3,baseDelay:250,backoffFactor:1}},abr:{bandwidthUpgradeTarget:.6,bandwidthDowngradeTarget:.95},manifest:{hlsLowLatency:!0}}),c=!0),b.push(d));a=_.sg.apply(null,b);_.zg(a.volume)&&(""===""+a.volume?a.volume=null:a.volume=Number(a.volume));
85
+ if(!_.B(a.volume)&&(!_.Ag(a.volume)||Cg(a.volume)))throw new _.H(_.G,7,7100,"config.volume is not a number");if(!_.B(a.preferredTextLanguage)&&!_.zg(a.preferredTextLanguage)&&!Array.isArray(a.preferredTextLanguage))throw new _.H(_.G,7,7100,"config.preferredTextLanguage is not a string or an array");if(!_.B(a.preferredAudioLanguage)&&!_.zg(a.preferredAudioLanguage)&&!Array.isArray(a.preferredAudioLanguage))throw new _.H(_.G,7,7100,"config.preferredAudioLanguage is not a string or an array");if(!_.B(a.preferredAudioCodec)&&
86
+ !_.zg(a.preferredAudioCodec)&&!Array.isArray(a.preferredAudioCodec))throw new _.H(_.G,7,7100,"config.preferredAudioCodec is not a string or an array");if(!_.B(a.preferredVideoCodec)&&!_.zg(a.preferredVideoCodec)&&!Array.isArray(a.preferredVideoCodec))throw new _.H(_.G,7,7100,"config.preferredVideoCodec is not a string or an array");if(!_.B(a.drm)){if(a.drm.env&&!_.zg(a.drm.env))throw new _.H(_.G,7,7100,"config.drm.env is not a string");if(a.drm.offlineId&&!_.zg(a.drm.offlineId))throw new _.H(_.G,
87
+ 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(!_.Ag(b.bufferingGoal)||Cg(b.bufferingGoal))throw new _.H(_.G,7,7100,"config.streaming.bufferingGoal is not a number");if(!_.Ag(b.rebufferingGoal)||Cg(b.rebufferingGoal))throw new _.H(_.G,7,7100,"config.streaming.rebufferingGoal is not a number");
88
+ if(b.rebufferingGoal>b.bufferingGoal)throw new _.H(_.G,7,7100,"config.streaming.rebufferingGoal must be \x3e\x3d bufferingGoal");if(!_.Ag(b.bufferBehind)||Cg(b.bufferBehind))throw new _.H(_.G,7,7100,"config.streaming.bufferBehind is not a number");if(!_.Ag(b.smallGapLimit)||Cg(b.smallGapLimit))throw new _.H(_.G,7,7100,"config.streaming.smallGapLimit is not a number");if(!_.Ag(b.durationBackoff)||Cg(b.durationBackoff))throw new _.H(_.G,7,7100,"config.streaming.durationBackoff is not a number");b=a.manifest;
89
+ if(_.B(b.availabilityWindowOverride))b.availabilityWindowOverride=NaN;else if(typeof b.availabilityWindowOverride!==_.r)throw new _.H(_.G,7,7100,"Invalid value for |manifest.availabilityWindowOverride|");mk(a.restrictions);mk(a.abr.restrictions);a.abr.initialRestrictions&&mk(a.abr.initialRestrictions)}return a};
90
+ mk=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);
91
+ 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 _.H(_.G,7,7100,"Restrictions contain NaN");};_.ok=function(a){return typeof a===_.te&&!Array.isArray(a)&&"source"in a};_.qk=function(a){return _.pk.get(a)||null};
92
+ _.sk=function(a){_.pk.get(a.id())?rk.warn("Component already in use."):_.pk.set(a.id(),a)};tk=function(a){return Array.from(_.pk.values()).find(b=>b instanceof a)||null};uk=function(a){for(const b of _.pk.values())a(b)};vk=function(a){uk(b=>{b.o(a)})};wk=function(a){uk(b=>{b.g(a)})};xk=function(){uk(()=>{})};yk=function(){uk(()=>{})};zk=function(a){if(null!==tk(a))return null;a=new a;a.f();_.sk(a);rk.info("Installed component:",a.id());return a};
93
+ Ak=function(a){if(a=tk(a))a.a(),_.pk.delete(a.id()),rk.info("Uninstalled component:",a.id())};Bk=function(a){return _.Wh(a,_.nd)||_.Wh(a,_.pd)};Ck=function(a,b){3===b.type&&(a.f&&(a.h.debug("Attaching tracking token"),b.headers[gg]=a.f),a.a&&(b.headers[hg]=a.a))};
94
+ Dk=function(a,b){return b.request&&3===b.request.type&&(a.f=b.headers[gg],a.a=b.headers[hg],b=b.headers["x-dt-csl-renewal-info"],a.f&&a.h.debug("Loaded tracking token "+a.f),a.a&&a.h.debug("Loaded followup token "+a.a),b)?(a=JSON.parse(_.Ph(_.ei(b))),{delay:a.renewalPeriod,ph:{maxAttempts:a.retryCount,baseDelay:1E3*a.retryPeriod,backoffFactor:1,fuzzFactor:0,timeout:0}}):null};_.Fk=function(a){_.Ek[a.I]=a};
95
+ _.Hk=function(a){const b={attemptParameters:_.pi(),enforceSingleSession:!1,delayLicenseRequestUntilPlayed:!1,enableSessionCacheForSkd:!1,ignoreUnrecognizedInitData:!0,Ra:{}};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!==a.ignoreUnrecognizedInitData&&
96
+ (b.ignoreUnrecognizedInitData=!!a.ignoreUnrecognizedInitData),a.env)){const c=_.Ek[a.env]||null;if(!c)throw _.Mg(_.sa,_.qb+a.env+_.aa),new _.H(_.G,6,6015,`DRM environment '${a.env}' is missing.`);b.Ra=_.Gk(c,a.customData)||{};_.Wh(a.env.toLowerCase(),Hd)&&(b.enforceSingleSession=!0)}return b};Jk=function(a){a=Ik[a];if(!a)return null;const b=_.Mj();return b.os===Fj&&4===b.osVersion.major&&4===b.osVersion.minor?null:new Uint8Array(a)};
97
+ _.Gk=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[_.sd];if(g){var h=g.licenseUrl;d=ph(d,g.videoRobustness);e=ph(e,g.audioRobustness);var k=g.modifiers,l=oh(b?b.widevineDistinctiveIdentifierRequired:void 0,g.distinctiveIdentifierRequired,!1),m=oh(b?b.widevinePersistentStateRequired:void 0,g.persistentStateRequired,!1);g=void 0===f?g.serverCertificate:null===f?null:typeof f===_.tf?Jk(f):f;c[_.sd]=
98
+ {licenseUrl:h,videoRobustness:d,audioRobustness:e,modifiers:k,distinctiveIdentifierRequired:l,persistentStateRequired:m,serverCertificate:g}}(g=a.f[_.nd])&&(c[_.nd]={licenseUrl:g.licenseUrl,certificateUrl:g.certificateUrl,modifiers:g.modifiers});h=b?b.playReadyVideoRobustness:void 0;b=b?b.playReadyAudioRobustness:void 0;(g=a.f[_.pd])&&(c[_.pd]={licenseUrl:g.licenseUrl,videoRobustness:h||g.videoRobustness,audioRobustness:b||g.audioRobustness,individualizationServer:g.individualizationServer,useLegacySystem:g.useLegacySystem,
99
+ modifiers:g.modifiers});return c};_.Kk=function(){throw new _.H(_.G,3,3E3);};_.Lk=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){_.Kk()}};_.N=function(a,b){try{a.f.setUint32(a.a,b,a.g),a.a+=4}catch(c){_.Kk()}};_.Mk=function(a){return a.a<a.f.byteLength};_.Nk=function(){throw new _.H(_.G,3,3E3,"Buffer read out of bounds.");};_.Ok=function(a){try{const b=a.f.getUint8(a.a);a.a+=1;return b}catch(b){_.Nk()}};
100
+ _.Pk=function(a){try{const b=a.f.getUint16(a.a,a.g);a.a+=2;return b}catch(b){_.Nk()}};_.P=function(a){try{const b=a.f.getUint32(a.a,a.g);a.a+=4;return b}catch(b){_.Nk()}};_.Qk=function(a){try{const b=a.f.getInt32(a.a,a.g);a.a+=4;return b}catch(b){_.Nk()}};_.Rk=function(a){let b=0,c=0;try{!0===a.g?(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){_.Nk()}if(2097151<c)throw new _.H(_.G,3,3001);a.a+=8;return c*Math.pow(2,32)+b};
101
+ Sk=function(a,b){const c=new Uint8Array(b);for(let d=0;d<b;d++)c[d]=_.Ok(a);return c};_.Tk=function(a,b){a.a+b>a.f.byteLength&&_.Nk();var c=a.a+a.f.byteOffset;c=a.f.buffer.slice(c,c+b);a.a+=b;return _.J(c)};Uk=function(a){let b=0;for(let c=0;c<a.length;c++)b=b<<8|a.charCodeAt(c);return b};_.Vk=function(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)};_.Wk=function(a){for(;_.Mk(a.reader)&&!a.parser.a;)a.parser.Cd(a.start+a.headerSize,a.reader,a.partialOkay)};
102
+ _.Xk=function(a){for(let b=_.P(a.reader);0<b&&!a.parser.a;--b)a.parser.Cd(a.start+a.headerSize,a.reader,a.partialOkay)};_.Yk=function(a){return b=>{const c=b.reader.Ba()-b.reader.getPosition();a(_.Tk(b.reader,c))}};_.Zk=function(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)};$k=function(a){let b="";try{b=_.Sh(a)}catch(c){}return b};_.bl=function(a){a=$k(a);let b="";a.length&&(b=(new _.al(a)).a);return b};
103
+ el=function(a){if(!a)return null;let b=null;try{const c=JSON.parse(_.Ph(a)),d=_.ei(c.sinf[0]);(new _.dl).L(_.nf,_.Wk).L("schi",_.Wk).L("tenc",e=>{e.reader.skip(6);_.Ok(e.reader)&&(e.reader.skip(1),b=_.gi(_.Tk(e.reader,16)));e.parser.stop()}).parse(d)}catch(c){}return b};
104
+ gl=function(a,b,c){if(!c||!c.byteLength)throw new _.H(_.G,6,6102);let d;typeof b===_.tf?d=_.Uh(b,!0):d=b;a=_.Uh($k(a),!0);b=new _.fl(12+a.byteLength+d.byteLength+c.byteLength,!0);_.N(b,a.byteLength);_.Lk(b,_.J(a));_.N(b,d.byteLength);_.Lk(b,_.J(d));_.N(b,c.byteLength);_.Lk(b,_.J(c));return _.J(b.buffer)};_.hl=function(a){var b=_.J(a.body);b=_.di(b);a.headers[ra]=Cc;a.body=_.Th("spc\x3d"+b).buffer};
105
+ _.il=function(a){let b;try{b=_.Ph(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=Nh(_.ei(b))};nl=function(a,b){b=jl(b);if(a==_.sd)return b+kl;if(a==_.pd)return b+ll;if(a==_.nd)return b+ml;throw Error("Unknown DRM Key-System '"+a+"'. Can not infer license URL!");};
106
+ _.ql=function(a,b,c,d){d=void 0===d?!0:d;c=a.drm;c&&c.env.startsWith(ua)?c.customData&&(_.pl(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)):ol.warn(fb)};
107
+ _.rl=function(a,b){try{const c=_.J(b.data),d=JSON.parse(String.fromCharCode.apply(null,c));ol.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){ol.debug("Unable to parse DRMtoday response JSON, assuming the response contained raw data")}};
108
+ _.tl=function(a,b,c){var d=c&&c.customData&&c.customData.fpsContentId;_.ql(a,b,c,!1);b.headers[ra]=Cc;c={spc:_.ci(b.body)};if((a=a.drm)&&a.env.startsWith(va)&&d){a={};var e=_.Mi((new _.al(sl(d))).f);d=e.keyId;if(e=e.assetId)ol.info("Applying assetId from HLS manifest."),a.assetId=e;d&&(ol.info("Applying keyId from HLS manifest."),a.keyId=d);d=a;d.keyId&&(ol.info("Adding keyID to FPS payload:",d.keyId),c.keyId=d.keyId);d.assetId&&(ol.info("Adding assetID to FPS payload:",d.assetId),c.assetId=d.assetId)}b.body=
109
+ _.Vh(_.Li(c,!0))};_.ul=function(a,b){ol.debug("Clearing response data");200===b.status&&(a=_.Ph(b.data).trim(),"\x3cckc\x3e"===a.substr(0,5)&&"\x3c/ckc\x3e"===a.substr(-6)&&(a=a.slice(5,-6)),b.data=_.ei(a).buffer)};
110
+ _.yl=function(a,b,c){b=$k(b);c=c&&c.customData?c.customData:{};b=new _.al(sl(b));const d=_.Mi(b.f);if(a&&a.drm&&a.drm.customData){var e=a.drm.customData;a=e.assetId;e=e.variantId;a&&_.Yh(`${a}`)&&(d.assetId=a,ol.debug("Using assetId from the configuration instead of the value from the HLS manifest."));e&&_.Yh(`${e}`)&&(d.variantId=e,ol.info("Using variantId from the configuration instead of the value from the HLS manifest."))}d.keyId?(a=["keyId"],ol.debug("KeyId found in FPS SKD. Removing other parameters")):
111
+ a=["assetId","variantId"];b.f=_.Li(d,!1,a);"/"!==b.path||b.j.includes(`${b.a}/`)||(b.path="");b=_.Ki(b);return c.fpsContentId=b};_.zl=function(a,b){a=a.drm;if(!a||!a.env.startsWith(ua))ol.warn(fb);else if(a.customData&&a.customData.merchant&&!a.env.startsWith(va)){const c=new _.qh(b.uris[0]);let d=c.xa;d.endsWith("/")||(d+="/");d+=a.customData.merchant;c.xa=d;b.uris[0]=c.toString()}};Al=function(a,b,c){_.ql(a,b,c);a=a.drm;a=!(!a||!a.offlineId);c=new _.qh(b.uris[0]);c.a.add(_.Ee,a);b.uris[0]=c.toString()};
112
+ jl=function(a){if(a===Bl)return"https://lic.drmtoday.com";if(a===Cl)return"https://lic.staging.drmtoday.com";if(a===Dl)return"https://lic.test.drmtoday.com";throw Error("Unknown DRMtoday environment '"+a+"'. Can not infer DRMtoday base URL!");};sl=function(a){a=a.replace(/assetid/gi,"assetId");a=a.replace(/variantid/gi,"variantId");return a=a.replace(/keyid/gi,"keyId")};
113
+ _.pl=function(a,b){if((b=b.drm)&&b.customData){var c={userId:b.customData.userId,sessionId:b.customData.sessionId,merchant:b.customData.merchant};_.vg(c)&&(a.headers["dt-custom-data"]=btoa(JSON.stringify(c)));(b=b.customData.authToken)&&(a.headers["x-dt-auth-token"]=b)}};Fl=function(a){const b={},c=a?a[ig]:void 0;a=El[a?a[ig]:void 0];c&&(b.drmTodayErrorCode=c);a&&(b.drmTodayErrorMessage=a);return b};
114
+ Hl=function(a,b=0){_.Lg("Registering EME Factory: "+a.a());a={priority:b,Mb:a};for(let c=0;c<Gl.length;++c)if(Gl[c].priority<b){Gl.splice(c,0,a);return}Gl.push(a)};Il=function(a){if(a){const {Mb:b}=Gl.find(({Mb:c})=>c.a()===a);if(b&&b.da())return _.Lg(Rb+b.a()),b.create();_.Lg("Cannot create selected EME manager. Choosing by priority list.")}for(const {Mb:b}of Gl)if(b.da())return _.Lg(Rb+b.a()),b.create();throw Error("Missing EME managers");};
115
+ _.Kl=function(a,b){a=_.Jl(a,b);return 1!=a.length?null:a[0]};_.Jl=function(a,b){return Array.prototype.filter.call(a.childNodes,c=>c instanceof Element&&c.tagName==b)};_.Ll=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};
116
+ _.Ml=function(a,b){const c=new DOMParser;let d=null,e=null;try{e=c.parseFromString(a,_.zf)}catch(f){}e&&e.documentElement.tagName==b&&(d=e.documentElement);return d&&0<d.getElementsByTagName("parsererror").length?null:d};_.Pl=function(a){var b=_.fi(a);b=parseInt(b.byteLength,10).toString(16);b=_.fi("12"+b+a);return new Nl(Ol,a,b)};
117
+ _.Rl=function(a){const b=new _.Ql(new DataView(a.buffer,a.byteOffset,a.byteLength),!1);a=_.P(b);var c=_.P(b);c=_.Vk(c);var d=_.P(b);const e=d>>>24;d&=16777215;var f=_.Tk(b,16);f=_.gi(f);if(0<e){var g=_.P(b);b.skip(16*g)}g=_.P(b);const h=()=>{let u=_.Ok(b),v=(u&127)>>>0,y=7;for(;128<=u&&28>=y;)u=_.Ok(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(!_.Mk(b))throw Error("not enough data to skip!");while(_.Ok(b)&128);break;case 1:b.skip(8);break;case 2:b.skip(h());
118
+ 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(;_.Mk(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=Sk(b,q);2===n?l.push(q):4===n&&(m=q)}else k(q)}_.Mg("Parsed WV PSSH Box","size",a,"name",c,"version",e,"flags",d,"size",g,"systemId",f,"contentId (base64)",m?_.ci(m):"","keyIds",l.map(u=>_.gi(u)));return 0<l.length?_.Pl(_.gi(l[0])):null};
119
+ _.Sl=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};
120
+ _.Xl=function(a){a:{var b=new _.Ql(new DataView(a.buffer),!0);_.P(b);for(_.Pk(b);_.Mk(b);)if(1===_.Pk(b)){var c=_.Pk(b);b=_.Tk(b,c);break a}b=null}b||(b=a);a=Rh(b,!0);c=_.Ml(a,"WRMHEADER");a=c.getAttribute("version");var d=_.Kl(c,"DATA");c=(c=_.Kl(d,"LA_URL"))?_.Ll(c):"";var e;if(e=_.Kl(d,"KID"))if(e=_.Ll(e)){var f=_.Kl(d,ma);e={value:e,Nd:f?f.textContent.trim():null}}else e=null;else e=null;d=e?[e]:(e=Tl(d))?[e]:(d=Ul(d))?d:null;const {value:g="",Nd:h}=d&&d[0]||{};d=_.ei(g);d=_.Sl(d);d=_.gi(d);return new _.Vl(_.Wl,
121
+ d,c,b,a,h)};Tl=function(a){a=_.Kl(a,"PROTECTINFO");if(!a)return null;var b=_.Kl(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,Nd:c,Sf:b}};
122
+ Ul=function(a){a=_.Kl(a,"PROTECTINFO");if(!a)return null;a=_.Kl(a,"KIDS");if(!a)return null;var b=_.Jl(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,Nd:d,Sf:e})}return a.length?a:null};_.Yl=function(a){performance.mark(a)};Zl=function(a){return _.x(function*(){const b=new Promise(c=>{(new _.kj(c)).ca(1)});(yield Promise.race([a.close().then(()=>!0),b.then(()=>!1)]))||_.C("Timeout waiting for session close")})};
123
+ _.am=function(a){return $l(a)?_.pd:a};bm=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};
124
+ cm=function(a,b){if(a.keySystem){var c=_.am(a.keySystem);b=b[c];c===_.Be&&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=
125
+ b.serverCertificate||null)))}};dm=function(a){for(const b of a.audioCapabilities||[])delete b.robustness;for(const b of a.videoCapabilities||[])delete b.robustness};fm=function(a){return(a.audioCapabilities||[]).some(em)||(a.videoCapabilities||[]).some(em)};gm=function(a,b){a=_.bl(b);_.Mg("Using default Content ID extractor. The hostname part from HLS #EXT-X-KEY:URI skd:// will be used.","Extracted Content ID: "+a);return a};
126
+ hm=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;_.xg(k)||(k=gm);let l="";try{l=k(b,c,g)}catch(m){throw new _.H(_.G,6,6103);}if(!l.length)throw new _.H(_.G,6,6101,"Content ID is an empty string");c=gl(c,l,a)}return c};$l=function(a){return!!a.match(/^com\.(microsoft|chromecast)\.playready/)};
127
+ em=function(a){return null!=a.robustness&&""!==a.robustness};im=function(a,b,c,d,e){for(const f of a){b.includes(f.licenseServerUri)||b.push(f.licenseServerUri);f.serverCertificate&&(c.some(g=>_.hi(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])}};
128
+ jm=function(a){var b=a.j;const c=a.W;c.clear();b.forEach((d,e)=>c.set(e,d));b=Array.from(c.values());b.length&&b.every(d=>"expired"==d)&&a.U(new _.H(_.G,6,6014));a.D.oe(_.Eg(c));a.o||a.h.info(ta);a.o=!0;a.B=!1};km=function(a){a.f.forEach((b,c)=>{const d=b.ke;let e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.D.onExpirationUpdated(c.sessionId,e),b.ke=e)})};
129
+ lm=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.Z.stop();a.Z=null;a.T.stop();a.T=null;const b=Array.from(a.f.keys());for(const c of a.f.values())c.rc&&c.rc.stop();a.f.clear();yield Promise.all(b.map(c=>Promise.resolve().then(()=>_.x(function*(){a.h.debug("Closing session",c.sessionId);try{yield Zl(c)}catch(d){a.h.warn("Error while closing session",d)}}))));if(a.A){try{yield a.l.g(null)}catch(c){a.h.warn("Error while resetting media keys",
130
+ c)}a.A=null}a.l=null;a.a=null;a.J.clear();a.G=null;a.I=[];a.g=null;a.U=null;a.D=null;a.O=0;a.M=null})};_.pm=function(a,b){const c=b.some(e=>0<e.drmInfos.length);if(!c){var d=Dg(a.g.Ra);bm(b,d)}if(d=mm(a))for(const e of b)e.drmInfos=[d];for(const e of b)for(const f of e.drmInfos)cm(f,a.g.Ra);b=nm(a,b);if(!b.size)return a.R=!0,Promise.resolve();_.Yl(Ad);a=_.om(a,b);return(c?a:a.catch(()=>{})).then(()=>{_.Yl(zd);performance.measure("DRM queryMediaKeys_()",Ad,zd)})};
131
+ _.rm=function(a,b,c){a.H=qm;a.I=c;a.C=0<c.length;a.h.debug("Using Persisted Licenses: "+a.C);a.g&&a.g.enableSessionCacheForSkd&&a.h.info("Enabled session cache for SKD license requests");return _.pm(a,b)};
132
+ _.om=function(a,b){if(1==b.size&&b.has(""))return Promise.reject(new _.H(_.G,6,6E3));null===a.l&&(a.l=Il(a.g.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 _.sm;const e=(h,k,l)=>{k.drmInfos.some(m=>!!m.licenseServerUri)==h&&(d=d.catch(()=>{if(a.qa)return null;if(l===_.pd){if(_.mj()&&!a.g.Ra[l].useLegacySystem)return k.label=qd,a.l.a(qd,[k]).catch(()=>{a.h.warn("Unable to create com.microsoft.playready.recommendation. Falling back to com.microsoft.playready.");
133
+ k.label=_.pd;dm(k);return a.l.a(l,[k])});dm(k)}return a.l.a(l,[k]).catch(m=>{a:{if(l===_.sd&&fm(k)){const n=_.Mj();if(fm(k)&&n.os===Fj&&n.browser===Wc){a.h.warn("requestMediaKeySystemAccess() failed",m);a.h.warn("Will try to recover by removing the robustness attribute of videoCapabilities and audioCapabilities.");dm(k);m=a.l.a(l,[k]);break a}}throw m;}return m})}))};let f=a.g.preferredDrmSystem;if(!f){var g=_.Mj();if(g.os===Hj&&10<=g.osVersion.major&&"edge"===g.browser)f=_.pd;else if("safari"===
134
+ g.browser)f=_.nd;else if(g.browser===Wc||"firefox"===g.browser)f=_.sd}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(h=>{throw new _.H(_.G,6,6001,null,h);});d=d.then(h=>{if(a.qa)return null;a.J.clear();var k=h.getConfiguration();a.h.info("Got MediaKeySystemAccess with configuration",k);var l=k.audioCapabilities||[];k=k.videoCapabilities||[];for(var m of l)a.J.add(m.contentType);for(var n of k)a.J.add(n.contentType);{l=h.keySystem;m=b.get(_.am(h.keySystem));
135
+ n=[];k=[];const q=[],u=[];im(m.drmInfos,n,k,q,u);1<k.length&&_.C("Multiple unique server certificates found! Only the first will be used.");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==_.ef,persistentStateRequired:m.persistentState==_.ef,audioRobustness:m.audioCapabilities?m.audioCapabilities[0].robustness:"",videoRobustness:m.videoCapabilities?m.videoCapabilities[0].robustness:
136
+ "",serverCertificate:k[0],initData:q,keyIds:u,periodId:null}}a.a=l;if(!a.a.licenseServerUri)throw new _.H(_.G,6,6012,a.a.keySystem);return h.createMediaKeys()}).then(h=>{a.qa||(a.h.info("Created MediaKeys for key system",a.a.keySystem),a.G=h,a.R=!0)}).catch(h=>{if(!a.qa){a.a=null;a.J.clear();if(h instanceof _.H)throw h;throw new _.H(_.G,6,6002,{browserError:h.message});}});c.reject();return d};
137
+ mm=function(a){a=Dg(a.g.Ra[_.Be]||{});if(0==a.size)return null;const b=[],c=[];a.forEach((e,f)=>{f=_.fi(f);e=_.fi(e);e={kty:"oct",kid:_.di(f,!1),k:_.di(e,!1)};b.push(e);c.push(e.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:_.Th(d),initDataType:"keyids"}];return{keySystem:_.Be,licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:d,
138
+ keyIds:[],periodId:null}};
139
+ nm=function(a,b){var c=new Set;for(var d of b)for(var e of d.drmInfos)cm(e,a.g.Ra),c.add(e);d=a.C?_.ef:_.Ae;e=a.C?[_.Fe]:[xf];a=new Map;for(const f of c)a.set(f.keySystem,{initDataTypes:[_.Sc],audioCapabilities:[],videoCapabilities:[],distinctiveIdentifier:_.Ae,persistentState:d,sessionTypes:e,label:f.keySystem,drmInfos:[]});for(const f of b){b=f.audio;c=f.video;const g=b?_.gj(b.mimeType,b.codecs):"",h=c?_.gj(c.mimeType,c.codecs):"";for(const k of f.drmInfos){const l=a.get(k.keySystem);l.drmInfos.push(k);
140
+ k.initData&&k.initData.length&&(l.initDataTypes=[...new Set(k.initData.map(m=>m.initDataType))]);k.distinctiveIdentifierRequired&&(l.distinctiveIdentifier=_.ef);k.persistentStateRequired&&(l.persistentState=_.ef);b&&_.ch(k.audioRobustness).forEach(m=>{const n={robustness:m||"",contentType:g};l.audioCapabilities.find(q=>q.robustness===n.robustness&&q.contentType===n.contentType)||l.audioCapabilities.push(n)});c&&_.ch(k.videoRobustness).forEach(m=>{const n={robustness:m||"",contentType:h};l.videoCapabilities.find(q=>
141
+ q.robustness===n.robustness&&q.contentType===n.contentType)||l.videoCapabilities.push(n)})}}return a};tm=function(a){return _.x(function*(){if(!a.l.o())if(a.M)yield a.M;else try{a.M=a.l.g(a.G),yield a.M}catch(b){a.qa||a.U(new _.H(_.G,6,6003,b.message,b))}})};
142
+ _.xm=function(a,b,c,d){d=void 0===d?"":d;if(c.length&&(!a.C||a.H!==qm)){var e=a.keySystem();if(!e.startsWith(_.nd)&&b===_.Sc){const f=new um(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||
143
+ _.oj(2)||a.keySystem().startsWith(_.nd)||!_.vm(a,d,c,!0))&&wm(a,d,null,b,c)}};ym=function(a,b){return _.x(function*(){a.h.info(`Handle encrypted event for type ${b.initDataType}`);yield tm(a);b.initData&&_.xm(a,b.initDataType,_.J(b.initData))})};Am=function(a){return _.x(function*(){_.Yl(Cd);const b=a.V.map(c=>zm(a,c));a.ba=!0;a.V=[];yield Promise.all(b);_.Yl(Bd);performance.measure("drm.onPlay",Cd,Bd)})};
144
+ Cm=function(a){const b=a.keySystem(),c=a.g.Ra[b],d=c.certificateUrl||"";if(""===d)return Promise.resolve();const e=a.D.getConfiguration();return Bm(a,e).then(()=>{var f=c.modifiers;const g=f&&f.certificateRequest,h=f&&f.certificateResponse;f=_.si([d],a.g.attemptParameters);f.type=3;f.licenseRequestType=Uc;g&&f.requestModifiers.push(k=>g(e,k));h&&f.responseModifiers.push(k=>h(e,k));a.h.debug("Fetching certificate");return a.D.Bb.fetch(f).P}).then(f=>{a.a.serverCertificate=_.J(f.data)}).catch(f=>{var g=
145
+ 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}:{},Fl(g));throw new _.H(_.G,6,6100,g,f);})};
146
+ _.Dm=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.h.debug("Server certificates are not supported by the key system. The server certificate has been ignored.")}catch(b){throw new _.H(_.G,6,6004,{browserError:b.message});}})};
147
+ _.Gm=function(a){const b=a.a?a.a.initData||[]:[];for(const c of b){let d=!_.oj(2);if(a.g.enforceSingleSession&&!a.keySystem().startsWith(_.nd)){const e=a.f.values();for(const f of e)_.hi(c.initData,f.initData)?(a.h.info("Skipping Session creation. Existing init data in single session mode!"),d=!1):f.periodId===c.periodId&&(a.h.info("Skipping Session creation. Merging init data for period in single session mode "+`for Key ID ${c.keyId}.`),Em(c.initData,f)||(f.pd.push(c.initData),c.keyId&&!f.Sa.includes(c.keyId)&&
148
+ f.Sa.push(c.keyId),a.j.get(c.keyId)||a.j.set(c.keyId,rf)),d=!1)}!d||a.C&&a.H===qm||(_.vm(a,c.keyId,c.initData)&&(d=!1),d&&(a.h.info("Request new media key session on create"),wm(a,c.keyId,c.periodId,c.initDataType,c.initData)))}for(const c of a.I)_.Fm(a,c);b.length||a.I.length||(a.o||a.h.info(ta),a.o=!0,a.B=!1,a.F.resolve());return a.F};
149
+ _.Hm=function(a,b){if(!a.G)return _.Tg(a.w,b,[Jd,"msneedkey",eg,"needkey"],()=>{a.U(new _.H(_.G,6,6010))}),Promise.resolve();a.A=b;a.l.l(b);a.w.one(a.A,_.He,()=>Am(a));a.w.on(a.A,_.$f,e=>{const f=a.B;a.B=!a.o;!f&&a.B&&(a.h.info("Waiting for DRM license key delivery"),a.D.onEvent(e))});var c=a.a.initData.find(e=>0<e.initData.length);let d=Promise.resolve();if(c||a.l.f()!==xb||a.I.length)d=tm(a);c=Promise.resolve();_.rj()&&38===sj().major||(a.a&&a.a.keySystem!==_.Be&&!a.a.serverCertificate&&(c=Cm(a)),
150
+ c=c.then(()=>_.Dm(a)));return Promise.all([d,c]).then(()=>{a.qa||(_.Gm(a),a.w.on(a.A,Jd,e=>ym(a,e)))}).catch(e=>{if(!a.qa){if(6004===e.code&&a.a&&a.a.keySystem===_.sd&&1>a.O&&a.a.serverCertificate&&a.a.serverCertificate.length)return a.h.warn("Detected invalid widevine server certificate!. Retrying"),a.U(new _.H(1,6,6004)),a.a.serverCertificate=null,a.O++,_.Hm(a,b);1<=a.O&&a.h.info("Could not get valid widevine server certificate. Giving up");throw e;}})};
151
+ Bm=function(a,b){return _.x(function*(){const c=a.D.yc();if(c){var d=b&&b.drm&&b.drm.customData;d&&(yield c(d))}})};
152
+ _.Fm=function(a,b){let c;try{a.h.debug("Attempting to load an offline session",b),c=a.G.createSession(_.Fe)}catch(e){const f=new _.H(_.G,6,6005,{browserError:e.message});a.U(f);return Promise.reject(f)}a.w.on(c,_.ke,a.ja.bind(a));a.w.on(c,Vd,a.fa.bind(a));const d={initData:null,loaded:!1,ke:Infinity,ob:null,Ca:new _.sm,periodId:null,pd:[],keyId:null,Sa:[],initDataType:null,ac:null,sessionContext:{ldlDelay:0,customData:{}}};d.Ca.catch(()=>{});a.f.set(c,d);return c.load(b).then(e=>{if(a.qa)return null;
153
+ a.h.debug("Loaded offline session",b,e);if(!e)return a.f.delete(c),a.U(new _.H(_.G,6,6013)),null;d.loaded=!0;Im(a)&&(a.o||a.h.info(ta),a.o=!0,a.B=!1,a.F.resolve());return c},e=>{a.qa||(a.f.delete(c),a.U(new _.H(_.G,6,6005,{browserError:e.message})))})};Em=function(a,b){if(!a)return!1;for(let c=0;c<b.pd.length;c++)if(_.hi(a,b.pd[c]))return!0;return!1};
154
+ _.vm=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(_.hi(c,f.initData))return b?f.Sa.includes(b)?d&&a.h.info("Skipping Session creation. "+`License for init data with Key ID ${b} was already `+`requested in Session: '${e.sessionId}'. `):(f.Sa.push(b),a.j.get(b)||a.j.set(b,rf),d&&a.h.info(Cb+`Session: '${e.sessionId}'`+`Adding Key ID ${b} to session meta-data.`)):d&&a.h.info(Cb+`Session: '${e.sessionId}'`),!0;if(Em(c,f))return d&&a.h.info("Skipping Session creation. License for init data was already requested [extra]"),
155
+ !0}return!1};
156
+ wm=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=Jm(a,d,e,f)}catch(u){if(a.h.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.g.ignoreUnrecognizedInitData)return}if(!g&&Km(a,h,d,e)){var k=!0;if("skd"===d&&!a.g.enableSessionCacheForSkd)for(var l of a.f.keys()){var m=a.f.get(l);
157
+ if(h&&m.keyId===h){a.h.warn(`Close and re-open session for ${h}`);try{yield l.close()}catch(u){a.h.warn("Unable to close session",u)}k=!1}}if(k){a.h.warn(`Skip creating a new session for ${h}`);return}}try{var n=a.C?_.Fe:xf;var q=a.G.createSession(n);a.h.info(`Created new ${n} session for Key ID: '${h}'. `+`Init data type: ${d}.`)}catch(u){a.U(new _.H(_.G,6,6005,{browserError:u.message}));return}a.w.on(q,_.ke,a.ja.bind(a));a.w.on(q,Vd,a.fa.bind(a));k={ac:f,pd:[],initData:e,initDataType:d,keyId:h,
158
+ Sa:h?[h]:[],loaded:!1,ke:Infinity,periodId:c,ob:null,Ca:new _.sm,sessionContext:{ldlDelay:0,customData:{}}};k.Ca.catch(()=>{});f&&(l=a.f.get(f),k.sessionContext=l.sessionContext);a.f.set(q,k);h&&!a.j.get(h)&&a.j.set(h,rf);if(e)for(l=0;l<a.a.initData.length;l++)m=a.a.initData[l],m.keyId&&!k.Sa.includes(m.keyId)&&_.hi(m.initData,e)&&(k.keyId||(k.keyId=m.keyId),k.Sa.push(m.keyId),a.j.get(m.keyId)||a.j.set(m.keyId,rf));l=a.D.getConfiguration();m=a.keySystem();m=a.g.Ra[m];n=(n=m.modifiers)&&n.transformInitData;
159
+ _.xg(n)||(n=hm);try{e=n({playerConfig:l,initData:e,initDataType:d,drmInfo:a.a,drmSystemConfig:m,sessionContext:k.sessionContext,emeApi:a.l.f()})}catch(u){h=u;u instanceof _.H||(h=new _.H(_.G,6,6016,u));k.Ca&&k.Ca.reject(u);a.U(h);return}a.h.info(`Generate License Request for key ID: '${h}'`);q.generateRequest(d,e.buffer).catch(u=>{if(!a.qa){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.U(new _.H(_.G,6,6006,{browserError:u.message,
160
+ error:u,extended:v},u))}})}else a.h.warn("Empty init data")})};Lm=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};Im=function(a){a=a.f.values();return _.Eh(a,b=>b.loaded)};Km=function(a,b,c,d){if(!b&&c!==_.nf)return!1;d=b||el(d);for(const e of a.f.values())if(b&&e.keyId===b||b&&e.Sa.includes(b)||c===_.nf&&(e.keyId||el(e.initData))===d)return!0;return!1};
161
+ Jm=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.g.Ra[f];f=a.D.getConfiguration();g=g&&g.modifiers&&g.modifiers.extractContentId;_.xg(g)||(g=gm);try{var h={ldlDelay:0,customData:{}};e&&(h=a.f.get(e).sessionContext);var k=g(f,c,h);a.h.debug(`Extracted Content ID '${k}' from SKD`);var l=k;break a}catch(m){a.h.warn("Unable to extract Content ID from SKD",m)}l=""}return l}if(b===_.nf)return el(c)||"";if(b===_.Sc){l=a.keySystem();try{if(l.match(/^com\.widevine\.alpha/)){const m=
162
+ _.Rl(c);if(m)return m.a}else if($l(l)){{f=new _.Ql(new DataView(c.buffer,c.byteOffset,c.byteLength),!1);g=_.P(f);const m=_.P(f);h=_.Vk(m);const n=_.P(f);c=n>>>24;k=n&16777215;const q=_.Tk(f,16),u=_.gi(q);if(0<c){const D=_.P(f);f.skip(16*D)}const v=_.P(f),y=_.Tk(f,v),A=_.Xl(y);_.Mg("Parsed PR PSSH Box","size",g,"name",h,"version",c,"flags",k,"size",v,"systemId",u,"keyId",A.a);e=A}if(e)return e.a}}catch(m){throw a.h.warn("Unable to extract Key ID from PSSH data.",{error:m,keySystem:l}),m;}}return""};
163
+ zm=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.h.info("WV Server certificate request for "+`SID:'${c.sessionId} `+`from msg '${b.messageType}'`)):a.h.info("License request for "+`SID:'${c.sessionId}'/KID:'${d.keyId}' `+`from msg '${b.messageType}'`);let g=a.a.licenseServerUri;e=a.g.Ra[e];"individualization-request"===b.messageType&&e&&e.individualizationServer&&(g=e.individualizationServer);
164
+ const h=_.si([g],a.g.attemptParameters);h.type=3;h.body=b.message;h.method="POST";h.licenseRequestType=b.messageType===Zd&&d.ac?Yd:f?Uc:b.messageType;h.sessionId=c.sessionId;if(h.licenseRequestType===Yd)a.D.onEvent(new _.F(Ed));$l(a.a.keySystem)&&Mm(a,h);Ck(a.K,h);const k=Math.floor(b.timeStamp),l=Date.now();return Nm(a,h,d.sessionContext).then(()=>{_.Yl(`drm.license.req.${k}.start`);a.h.debug("Sending DRM license request to",g,h);return a.D.Bb.fetch(h).P}).then(m=>{_.Yl(`drm.license.req.${k}.end`);
165
+ performance.measure(`drm.license.req.${k}`,`drm.license.req.${k}.start`,`drm.license.req.${k}.end`);if(a.qa)return Promise.reject();const n=Date.now()-l;var q=Om(a,m);let u="";q&&(u=` RID:${q}`);q=m&&m.data?m.data.byteLength:-1;f?a.h.info("WV Server certificate response for "+`SID:'${c.sessionId}' `+`${q} bytes `+`in ${n}ms${u}`):a.h.info("License response for "+`SID:'${c.sessionId}'/`+`KID:'${d.keyId}' `+`${q} bytes `+`in ${n}ms${u}`);const v=Dk(a.K,m);_.Yl(`drm.sess.update.${k}.start`);return c.update(m.data).then(()=>
166
+ {_.Yl(`drm.sess.update.${k}.end`);performance.measure(`drm.sess.update.${k}`,`drm.sess.update.${k}.start`,`drm.sess.update.${k}.end`);if(!f){var y=Lm(a),A=v?Date.now()+1E3*v.delay:Number.NaN;y=new _.F(_.Gd,{keySystem:a.keySystem(),expirationTime:y,expectedRenewalTime:A});a.D.onEvent(y);d&&(d.ob&&d.ob.resolve(),d.ac&&(y=d.ac,a.h.info(`Closing expired session '${y.sessionId}'`),Zl(y).catch(()=>{a.h.warn("Unable to close expired session in time")}),(y=a.f.get(d.ac))&&y.rc&&y.rc.stop(),a.f.delete(d.ac),
167
+ d.ac=null),(new _.kj(()=>{a.qa||(d.loaded=!0,d.Ca&&d.Ca.resolve(),Im(a)&&(a.o||a.h.info(ta),a.o=!0,a.B=!1,a.F.resolve()))})).ca(5),null!==d.initData&&(0<d.sessionContext.ldlDelay||v&&Bk(a.keySystem()))&&(y=new _.kj(()=>{!a.qa&&a.K&&(a.h.info("Updating CSL Sessions"),$l(a.keySystem())?wm(a,d.keyId,d.periodId,d.initDataType,d.initData,c,!0):a.keySystem().startsWith(_.nd)&&c.update(_.Th("renew")))}),d.rc=y,y.ca(v?v.delay:d.sessionContext.ldlDelay)))}})},m=>_.x(function*(){if(!a.qa){var n=m.data.headers;
168
+ n=Object.assign({message:_.Pa,url:m.data.url,status:m.data.status,response:m.data.response},n?{headers:n}:{},Fl(n));n=new _.H(_.G,6,6007,n,m);a.U(n);d&&d.ob&&d.ob.reject(n);d&&d.Ca&&d.Ca.reject(n)}})).catch(m=>{a.qa||(m===Ab?a.h.info("Ignore update for closed sessions"):(m=new _.H(_.G,6,6008,{browserError:m.message}),a.U(m),d&&d.ob&&d.ob.reject(m),d&&d.Ca&&d.Ca.reject(m)))})};
169
+ Mm=function(a,b){var c=Rh(b.body,!0,!0);if(c.includes("PlayReadyKeyMessage")){a.h.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(_.Kf).textContent;b.body=_.ei(a.querySelector("Challenge").textContent).buffer}else a.h.debug("PlayReady request is already unwrapped."),b.headers[ra]="text/xml; charset\x3dutf-8"};
170
+ Nm=function(a,b,c){return _.x(function*(){const d=a.D.getConfiguration();yield Bm(a,d);const e=a.keySystem();var f=a.g.Ra[e];const g=(f=f&&f.modifiers)&&f.licenseRequest,h=f&&f.licenseResponse;g?b.requestModifiers.push(k=>g(d,k,c)):e.startsWith(_.nd)&&b.requestModifiers.push(k=>_.hl(k));h?b.responseModifiers.push(k=>h(d,k,c)):e.startsWith(_.nd)&&b.responseModifiers.push(k=>_.il(k))})};
171
+ Om=function(a,b){if(!b||!b.headers)return"";if(b=b.headers["x-dt-li"])try{return JSON.parse(_.Ph(_.ei(b))).ti}catch(c){a.h.warn("Unable to parse DRMtoday Request ID",c)}return""};_.Rm=function(a,b){a&&b&&(_.Pm.set(a,b),_.Qm.info(`Registered TextDisplayerFactory: '${a}'`))};
172
+ _.Sm=function(a,b){b=b.find(c=>(c=_.Pm.get(c))?c.da(a):!1);if(null==b)return _.Qm.warn("Subtitles may not work as expected. No compatible text displayer found for this platform."),null;_.Qm.info(`Chosen the text displayer: ${b}`);return _.Pm.get(b)};_.Tm=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})}}};
173
+ Um=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};Vm=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};Wm=function(a){return a.a.map(b=>_.tg(b))};
174
+ _.Xm=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:[]}};Zm=function(a,b,c,d){b===HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=Ym.value().get(b),c.one(a,b,d))};
175
+ cn=function(a){a.h.debug("Start watching for video events for "+a.m.namespace());const b=a.m,c=d=>$m(a,d.type);a.a.on(b,_.Ld,()=>{a.j=!1;an(a,_.bn)});a.a.on(b,Nc,c);a.a.on(b,_.Oe,()=>{a.F=!0;a.j=!1;$m(a,_.Oe)});a.a.on(b,_.De,()=>{a.F=!1;a.j=!1;$m(a,_.De)});a.a.on(b,_.Af,c);a.a.on(b,_.af,c);a.a.on(b,_.hf,d=>{a.l=!1;a.j=!1;$m(a,d.type)});a.a.on(b,_.jf,d=>{a.l=!0;$m(a,d.type)});a.a.on(b,of,c);a.a.on(b,_.Zf,()=>{a.j=!0;$m(a,_.Zf)});a.a.on(b,_.Md,d=>a.U(d));a.a.on(b,_.fe,c);a.a.on(b,Oc,()=>{a.C=!0;$m(a,
176
+ Oc)});a.a.on(b,_.Jf,d=>{a.l=!0;$m(a,d.type)});a.a.on(b,_.If,d=>{a.l=!1;a.j=!1;$m(a,d.type)})};dn=function(a,b){return Object.keys(b)[a]};fn=function(a,b){const c={type:_.qf};b===_.Mc||b===_.Lc?(c.reason=a.w,b===_.Mc?c.timeSinceLastStateChangeMS=a.H:c.bufferedTimeMS=a.B):(a.f===_.en&&(c.reason=a.w),a.A===_.en&&(c.reason=a.w,c.bufferedTimeMS=a.B),c.currentState=a.f,c.previousState=a.A,c.timeSinceLastStateChangeMS=a.H);return c};
177
+ an=function(a,b){if(a.f===b)return!1;var c=Date.now();const d=a.f===_.en;a.A=a.f;a.f=b;a.A===_.bn&&(a.I=c,a.o=0);a.o||(a.o=a.I||c);a.H=c-a.o;a.o=c;b===_.en?(a.K=a.o,a.w=a.l?1:2,a.h.info("Buffering started. Reason: "+dn(a.w-1,_.gn)),b=fn(a,_.Mc),a.Vb(_.Mc,b)):d&&(a.B=a.o-a.K,a.h.info("Buffering finished. Reason: "+dn(a.w-1,_.gn)+". Buffering time: "+a.B+" ms"),b=fn(a,_.Lc),a.Vb(_.Lc,b));b=dn(a.A,_.hn);c=dn(a.f,_.hn);a.h.info(`Player state change: ${b} -> ${c}`);a.Vb(_.qf,fn(a,""));return!0};
178
+ $m=function(a,b){if(a.f===_.jn)a.h.warn("Player is in error state, aborting any further state checks");else{var c=a.m.isPaused();var d=a.m.getPosition();var e=a.m.getDuration();if(d=a.m.isEnded()||a.f===_.bn&&1>=Math.abs(d-e)||c&&d>=e)an(a,_.bn)&&a.h.debug("Player claims to be in ended state, not checking more");else if(b!==_.Af){e=a.m.getPosition();e=null!==e&&void 0!==e&&0<=e?a.m.getBufferInfo().Ga(e,!0):-1;a.G=e;e=a.m.getSurface().getMedia();a.g=e?e.readyState:null;a.J=a.m.getPlaybackRate()||1;
179
+ e=typeof a.g===_.r&&2>a.g&&2===e.networkState;var f=typeof a.g===_.r&&0>=a.G&&a.f===_.kn,g=typeof a.g===_.r&&2>=a.g&&a.j;e=a.l||f||e||g;!a.M||a.m.isLive()||a.f!==_.en||e||(f=b===_.hf&&4===a.g,(g=a.A===_.ln)&&!a.C?e=!0:g||a.C||f||(e=!0));f=!1;e?f=an(a,_.en):c?f=an(a,_.mn):a.F&&(f=an(a,_.nn));f&&(a.C=!1);a.h.debug("Video state check for event "+b+":: seeking: "+a.l+", waiting: "+a.j+", playing: "+a.F+", paused: "+c+", readyState: "+a.g+", rate: "+a.J+", buffer: "+a.G+", ended: "+d+". Changed state: "+
180
+ f+", Current state: "+dn(a.f,_.hn))}}};on=function(a){a=(new _.qh(a)).xa;if(!a)return null;a=a.toUpperCase();return _.Xh(a,".MPD")?_.sc:_.Xh(a,".M3U8")?_.fk:_.Xh(a,".MP4")?_.Of:_.Xh(a,"MANIFEST")||_.Xh(a,".ISM")?_.Bc:null};_.qn=function(a){let b;_.ok(a)?b=a.source:b=a;Array.isArray(b)||(b=[b]);b=b.filter(c=>typeof c===_.tf||"url"in c);a=[];for(let c=0;c<b.length;c++){const d=pn(b[c]);d&&a.push(d)}return a};
181
+ pn=function(a){let b=null;_.zg(a)&&(a={url:a});typeof a===_.te&&!Array.isArray(a)&&"url"in a&&(b={url:a.url,type:a.type?a.type:null},_.B(a.drmProtected)||typeof a.drmProtected!==_.Kc||(b.drmProtected=a.drmProtected),_.B(a.isLive)||typeof a.isLive!==_.Kc||(b.isLive=a.isLive),_.B(a.name)||typeof a.name!==_.tf||(b.name=a.name),_.B(a.Fb)||typeof a.Fb!==_.tf||(b.Fb=a.Fb),_.B(a.audioMimeType)||typeof a.audioMimeType!==_.tf||(b.audioMimeType=a.audioMimeType));b&&!b.type&&(b.type=on(a.url),b.type?rn.debug("Detect media type "+
182
+ b.type+" for "+a.url):rn.warn("Unable to detect media type for "+a.url));return b};tn=function(a){return a.A?sn():new Promise(b=>{if(a.a){const c=a.a;a.g.off(c,_.Md);a.g.off(c,_.ff);a.a=null}b()})};sn=function(){return Promise.reject(new _.H(_.G,7,7E3))};
183
+ vn=function(a,b){return a.A?sn():new Promise(c=>{a.a||(a.g.on(b,_.Md,()=>{{const d=un(a);if(d)a.onError(d)}}),a.g.on(b,_.ff,()=>{const d=b.videoWidth,e=b.videoHeight,f=a.getTrackManager();f&&0<d&&0<e&&(f.w={width:d,height:e});a.trigger(new _.F(_.Jc,{detail:{width:d,height:e}}))}),a.a=b);c()})};
184
+ xn=function(a){return _.x(function*(){if(a.A)return sn();var b=a.w[a.getSourceIndex()];if(!a.configuration.drm||!1===b.drmProtected)return a.log.debug("No DRM configuration present.","Skipping DRM engine initialization"),Promise.resolve();b=_.Hk(a.configuration.drm);a.log.debug("Drm configuration: ",b);const c=a.getNetworkEngine();a.o=new _.wn({Bb:c,onError:d=>a.onError(d),oe:()=>{},onExpirationUpdated:(d,e)=>{a.trigger(new _.F(_.Dd,{expirationTime:e}))},onEvent:d=>{d instanceof _.F?a.dispatchEvent(d):
185
+ a.log.debug(_.Ib,d.type)},getConfiguration:()=>a.getConfiguration(),yc:()=>a.yc()});a.o.g=b;yield _.rm(a.o,[{id:0,language:_.Df,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,ya:0,mimeType:_.Of,codecs:"",encrypted:!0,keyId:null,language:_.Df,originalLanguage:_.Df,label:null,type:_.w,primary:!1,frameRate:void 0,
186
+ Lh:void 0,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,spatialAudio:!1,qh:null,closedCaptions:null},bandwidth:100,drmInfos:[],allowedByApplication:!0,allowedByKeySystem:!0}],[]);yield _.Hm(a.o,a.a);return Promise.resolve()})};yn=function(a,b){Zm(a.a,HTMLMediaElement.HAVE_CURRENT_DATA,a.g,()=>{a.getState()!==_.jn&&a.seek(b).catch(c=>{a.log.warn("Error while seeking to start position.",c)})})};
187
+ un=function(a){if(null===a.w||!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 _.H(_.G,3,3016,{code:b,Dh:c,message:a.a.error.message})};
188
+ An=function(a){if(a.A)return new _.zn(sn(),()=>{});const b=a.w[a.getSourceIndex()],c=a.configuration.startTime||null,d=a.a,e=a.I;c&&yn(a,c);if(d.preload!==_.se)a.g.one(d,_.fe,()=>{const g=Date.now()/1E3-e;a.f.A=g;a.log.debug("Time to load: ",g)});d.src=b.url;(_.oj()||_.rj())&&d.load();const f=new _.sm;a.g.one(d,of,()=>{const g=a.getConfiguration().manifest.attemptParameters.timeout||30;a.F||(a.F=(new _.kj(()=>{f.reject(new _.H(_.G,3,3100,{message:`Unable to load media source successfully from ${b.url}`,
189
+ uri:b.url},d.error))})).ca(g))});Zm(d,a.configuration.forceWaitForTracks?HTMLMediaElement.HAVE_CURRENT_DATA:HTMLMediaElement.HAVE_METADATA,a.g,()=>f.resolve());d.error?f.reject(un(a)):d.preload===_.se&&(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.g.one(d,_.Md,()=>{f.reject(un(a))});return new _.zn(f,
190
+ ()=>{const g=new _.H(_.G,7,7001);f.reject(g);return Promise.resolve()})};Bn=function(a,b){Zm(b,HTMLMediaElement.HAVE_CURRENT_DATA,a.g,()=>{if(a.isLive()&&a.getState()!==_.jn){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)}))}})};
191
+ _.En=function(a){a&&(0<=Cn.indexOf(a)?Dn.warn(`Factory '${a.name()}' is already registered`):(Cn.push(a),Dn.info(`Factory ${a.name()}' has been registered.`)))};Gn=function(a,b){let c=Cn.find(d=>d.da(a,b));c||(c=new Fn);Dn.info(`Chosen ads: ${c.name()}`);return c};_.Hn=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};_.In=function(a,b){a.classList.add(b)};
192
+ _.Jn=function(a,b){if(a&&typeof b===_.te)for(const c in b)a.style[c]=b[c]};_.Kn=function(a){return document.createElement(a)};Ln=function(a,b){const c=new MutationObserver(()=>{const d=Array.from(a.g.values());eh(Array.from(b.classList),Array.from(d))||b.classList.add(...d)});c.observe(b,{attributes:!0,attributeFilter:["class"]});return c};Mn=function(a,b){a.a&&0!==b.length&&(a.a.classList.add(b),a.g.add(b))};
193
+ Nn=function(a,b,c){(_.rj()&&53===sj().major||_.rj()&&68===sj().major||_.tj())&&!b.hasAttribute(ud)&&(b.style.opacity="0",b.setAttribute(ud,""),a.j.one(b,Id,()=>{b.removeAttribute(ud);b.style.opacity="1";c&&(c.style.opacity="1")}))};
194
+ Rn=function(a){a.a.on(window,"offline",()=>{On(a,!1)});a.a.on(window,"online",()=>{a.f||Pn(a)});a.a.on(a.m,of,()=>Qn(a));a.a.on(a.m,"suspend",()=>Qn(a));a.a.on(a.m,_.Zf,()=>Qn(a));a.a.on(a.m,_.Oe,()=>{a.f||Pn(a)});a.a.on(a.m,_.Ze,()=>{a.f||Pn(a)});a.a.on(a.m,_.qf,()=>{switch(a.m.getState()){case _.en:Qn(a);break;default:Qn(a)}})};Sn=function(a){a.g&&(a.g.stop(),a.g=null)};Qn=function(a){a.f&&Pn(a)};
195
+ Tn=function(a){return _.x(function*(){var b=a.m.getConfiguration().connectivityCheck;b&&a.m&&(b=yield Ci(a.j,b.url,b.attemptParameters,b.method),On(a,b))})};Pn=function(a){a.m.getConfiguration().connectivityCheck&&(Sn(a),a.g=(new _.kj(()=>Tn(a))).ca(5))};On=function(a,b){Sn(a);a.f!==b&&(a.f=b,a.m&&a.m.getConfiguration().connectivityCheck&&a.m.trigger(new _.F(ze,{online:a.f})))};Vn=function(){for(let a=0;a<Un.length;++a)Un[a].qc()};
196
+ _.Wn=function(a,b){b=b||0;a={priority:b,qc:a};for(let c=0;c<Un.length;c++)if(Un[c].priority<b){Un.splice(c,0,a);return}Un.push(a)};Xn=function(a,b){a.onError(b);a.release().then(()=>a.destroy())};Zn=function(a){if(!a.a){var b=a.license.split(".");if(3!==b.length)throw Error("Expected to find 3 data sections in JWT raw data");b=new Yn(b[0],b[1],b[2]);a.a=b}return a.a};
197
+ $n=function(a){switch((a.td()[0]||{src:"",type:""}).type){case _.sc:a="dash";break;case _.Bc:a="ss";break;case _.fk:a="hls";break;case _.Of:a=_.pe;break;default:a=""}return a};ao=function(a){return a.viewerId?a.viewerId:(a=a.drm||null)&&a.customData&&a.customData.userId?`${a.customData.userId}`:""};bo=function(a){return(a=a.drm||null)&&a.customData&&a.customData.assetId?`${a.customData.assetId}`:""};
198
+ co=function(a){return(a=a.drm||null)&&a.customData&&a.customData.sessionId?`${a.customData.sessionId}`:""};eo=function(a){a=a.getDrmInfo();return(new _.qh(a&&a.licenseServerUri||"")).Ha};fo=function(a){const b=a.getConfiguration();let c="no";b.drm&&!_.Bg(b.drm,{})&&(c="custom",b.drm.env&&b.drm.env.toLowerCase().startsWith(Hd)||eo(a).endsWith("drmtoday.com"))&&(c=Hd);return c};
199
+ go=function(a){a=a.getDrmInfo();let b="";if(a)switch(a.keySystem){case _.sd:b="wv";break;case _.pd:b="pr";break;case _.nd:b="fps"}return b};ho=function(a){a=a.getDrmInfo();let b=!1;a&&(b=a.persistentStateRequired);return b.toString()};io=function(a){a=a.getDrmInfo();let b="";if(a)switch(a.videoRobustness){case Wa:case Ta:b="L1";break;case Ua:b="L2";break;case _.zb:case _.yb:b="L3"}return b};
200
+ mo=function(a,b){const c="ie"===_.Mj().browser;var d=b.getConfiguration();const e=[...Array.from(_.pk.keys()),...b.rg()];b={"CL-KEY":a.license,"CL-LOCATION":window.location.href,"CL-SDK-VERSION":_.da,"CL-USER-ID":ao(d),"CL-ASSET-ID":bo(d),"CL-SESSION-ID":co(d),"CL-PLAYBACK-TYPE":b.isLive()?jo:ko,"CL-CONTENT-TYPE":$n(b),"CL-PLUGINS":e.join(" "),"CL-DRM":fo(b),"CL-DRM-CDM":go(b),"CL-DRM-SEC-LEVEL":io(b),"CL-DRM-OFFLINE":ho(b),"CL-DRM-IP":eo(b)};c&&(d=window.localStorage.getItem("cl_et"))&&(b["CL-ETAG"]=
201
+ d);d=_.si(["https://downloads.castlabs.com/r/register/"]);d.method="GET";d.headers=b;return(new _.lo).fetch(d).P.then(f=>{200===f.status&&c&&window.localStorage.setItem("cl_et",f.headers.etag);return Promise.resolve()}).catch(f=>{a:{var g=Zn(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=
202
+ k+"!";k=f;break;case 412:g=7103;k="License requires a viewer ID. It should be supplied either via the `viewerId` config or in case of DRMtoday via the `drm.customData.userID` config.";break;default:g=Promise.resolve();break a}a.h.error($a+k);g=Promise.reject(new _.H(_.G,7,g,k))}}return g})};_.oo=function(a){a&&(0<=no.indexOf(a)||no.push(a))};
203
+ qo=function(a){if(!a.M){a.M=!0;a.g.getMedia()||a.g.getCastElement();a.w||(a.w=new po(a.f.license));var b=Object.keys(a.K);mo(a.w,{getConfiguration:a.getConfiguration.bind(a),td:a.td.bind(a),getDrmInfo:a.getDrmInfo.bind(a),rg:()=>b,isLive:a.isLive.bind(a)}).then(()=>{a.h.debug("License verified remotely")}).catch(c=>{setTimeout(Xn,1E3,{release:a.release.bind(a),destroy:a.destroy.bind(a),onError:a.onError.bind(a)},c)})}};
204
+ ro=function(a,b){a.w=new po(b);a.w.verify().catch(c=>{setTimeout(()=>{a.h.error($a+c);a.trigger(new _.F(_.Md,{detail:new _.H(_.G,7,7101)}));a.destroy()},1E3)})};to=function(a,b){a.J=b;for(const c of a.J)(b=c.id())&&(a.K[b]=c);_.so(a,"onPlayerCreated")};_.uo=function(a,b){b!==a.a&&(a.a&&(a.a.removeDelegate(a),a.a.destroy()),a.a=b,a.a&&(a.a.init(a.g,a.f),a.a.setNetworkEngine(a.getNetworkEngine()),a.a.addDelegate(a)))};
205
+ _.so=function(a,b,...c){const d=a.J.map(e=>e[b].call(e,a,...c)).filter(e=>e instanceof Promise);return Promise.all(d)};
206
+ vo=function(a){return _.x(function*(){if(a.H)return a.h.debug("The player is already released. No-op"),new Promise(b=>b());a.off(_.qf,a.C);a.A.off(a,_.qf,a.C);a.A.off(document,Xf);a.trigger(new _.F(_.cf));a.M=!1;a.g&&a.g.release();a.j&&(yield a.j.dispose(),a.j=null);if(a.a){let b=null;const c=a.a.on(_.qf,d=>{b=d});return _.so(a,_.xe).then(()=>{a.a.removeDelegate(a);return Promise.all([a.a.release(),a.B.release()])}).then(()=>{a.h.debug("Releasing player completed");b&&(a.h.debug("Re-post state change event after release"),
207
+ a.trigger(b))}).finally(()=>{a.a.off(_.qf,c);a.trigger(new _.F(bf))})}a.trigger(new _.F(bf));return new Promise(b=>b())})};
208
+ yo=function(a,b,c){return new Promise((d,e)=>{var f;if(b){var g=f=null;for(var h=0;h<b.length;h++);h=Object.values(_.Og);for(let k=0;k<b.length;k++)for(let l=0;l<h.length;l++){const m={Mb:h[l],confidence:h[l].canPlay(b[k],c)};if(null===f||f.confidence<m.confidence)f=m,g=k}f&&typeof g===_.r&&0<f.confidence?(_.Pg.debug("Player Factory '"+f.Mb.a()+"' can play",b[g]),f=new wo(f.Mb,g)):(_.Pg.error("No compatible Player Factory found for sources:",b),f=null)}else f=null;f?(e=f.Mb.create(),d(new xo(e,f.a))):
209
+ (d=new _.F(_.Md,{detail:new _.H(_.G,7,7003)}),a.trigger(d),e(d))})};
210
+ _.Bo=function(a,b){return _.x(function*(){_.Yl(Le);if(a.G)throw Error("Player is already destroyed.");if(!a.g)throw Error("No surface associated with this player!");yield a.release();a.o=_.qn(b);a.f=_.nk(a.O,_.ok(b)?b:{},{source:a.o});if(0===a.o.length)throw Error("Invalid request to load: could not find source to load");a.H=!1;let c;var d=0;if(a.I||2!==a.canPlay(a.o[0],a.f))d=yield yo(a,a.o,a.f),c=d.player,d=d.a,a.I=!1;c?_.uo(a,c):a.a.addDelegate(a);zo(a);a.a&&a.a.setCdnErrorCallback(a.F);Ao(a,a.f);
211
+ a.setSourceIndex(d);if(a.f.pauseWhenInBackground)a.A.on(document,Xf,()=>{document.hidden?(a.h.debug("Player is hidden: pausing..."),a.pause()):(a.h.debug("Player is visible: resuming..."),a.play())});wk(a);yield _.so(a,"onContentWillLoad",a.f.source[d]);_.Yl(Ke);performance.measure("player.beforeLoad",Le,Ke)})};_.Co=function(a){return _.x(function*(){a.g.getMedia()||a.g.getCastElement();a.A.on(a,_.qf,a.C);a.trigger(new _.F(ge));yield Promise.all([a.a.load(a.f),a.j.load()])})};
212
+ _.Eo=function(a){return _.x(function*(){_.Yl(Je);const b=[];if(a.f.remoteTextTracks)for(const c of a.f.remoteTextTracks)b.push(a.getTrackManager().addTextTrack(c));yield Promise.all(b);Do(a);xk();yield _.so(a,"onContentLoaded");a.f.autoplay&&(yield a.play());_.Yl(Ie);performance.measure("player.afterLoad",Je,Ie)})};Fo=function(a){return _.x(function*(){if(a.a){var b=a.a;b.tf?(a.trigger(new _.F(ge)),yield b.tf(),yield _.Eo(a)):a.h.warn(rb)}else a.h.warn(ob)})};
213
+ zo=function(a){a.a&&a.a.setDrmCustomDataModifier(b=>_.x(function*(){a.tc&&a.Qd&&(a.Qd=!1,yield a.tc(b))}))};Ao=function(a,b){a.j=Gn(a,b).create(a)};Do=function(a){const b=_.ch(a.f.preferredTextLanguage).filter(d=>d),c=a.getTrackManager().ka();b.some(d=>{const e=_.Ch(d);return(d=c.find(f=>{f=_.Ch(f.language||"");return _.Dh(f,e)}))?(a.getTrackManager().Ea(d),!0):!1})};
214
+ Go=function(a){const b=document.getElementById(a);if(!b)throw Error("Anchor element not found");b.classList.add($c);return Array.from({length:3}).map(()=>{const c=document.createElement(_.w);c.classList.add(bd);const d=document.createElement(_.yd);d.classList.add(ad);d.appendChild(c);b.appendChild(d);return new Q(c)})};
215
+ Ho=function(a,b,c){const d=b.getSurface().getMedia();b=b.getSurface().getUniqueCssClass();d&&(c?(a.h.info(`Show video element .${b}`),d.classList.add(cd)):(a.h.info(`Hide video element .${b}`),d.classList.remove(cd)),a.A&&a.A(d,c))};Jo=function(a,b){return _.x(function*(){const c=yield a.o.get();a.f=b;b.role=Io;a.f.player=c;a.f.videoEl=c.getSurface().getMedia();Ho(a,c,!0);yield c.load(b.config);b.config.autoplay||(yield c.play())})};
216
+ No=function(a){_.x(function*(){if(0===a.a)yield Ko(a);else if(a.a===a.g.length-1)yield Lo(a);else{const b=[a.a-1,a.a+1];a.h.info(`Preload items (indices: ${b})`);yield Promise.all(b.map(c=>Mo(a,c)))}})};
217
+ Oo=function(a,b){return _.x(function*(){if(b.player){if(b.state===We){a.h.info(Ob);try{yield b.preloadPromise}catch(c){}}a.f=b;b.role=Io;Ho(a,b.player,!0);b.state===Ve?(_.Yl(Se),a.w.preloadMedia?yield b.player.play():yield Fo(b.player),_.Yl(Re),performance.measure("playlist.next",Se,Re)):b.state===Ue&&(yield b.player.load(b.config));b.config.autoplay||(yield b.player.play())}})};
218
+ Qo=function(a,b){return _.x(function*(){a.h.info(`Stop current playback (index: ${b.index})`);const c=b.player;b.player=null;b.videoEl=null;b.role=Po;c.pause();yield a.o.release(c);Ho(a,c,!1)})};So=function(a){return Promise.all(Array.from(a.l.keys()).map(b=>Ro(a,b)))};To=function(a){return _.x(function*(){yield a.o.destroy();const b=document.getElementById(a.w.anchorId);b&&(b.classList.remove($c),b.innerHTML="")})};
219
+ Ro=function(a,b){return _.x(function*(){const c=a.l.get(b);c&&(a.h.info(`Stop preloading item (index: ${b})`),c.player&&(yield a.o.release(c.player)),a.l.delete(b))})};
220
+ Mo=function(a,b){return _.x(function*(){const c=yield a.o.get(),d=a.g[b];d.player=c;d.videoEl=c.getSurface().getMedia();d.role=Po;d.state=We;a.trigger(new _.F(Ff));try{a.l.set(b,d),a.w.preloadMedia?(d.config.autoplay&&(a.h.warn(ka+`Force disabling autoplay (index: ${b})`),d.config.autoplay=!1),d.preloadPromise=c.load(d.config)):d.preloadPromise=c.preload(d.config),yield d.preloadPromise,d.state=Ve,a.trigger(new _.F(Ff))}catch(e){7001===e.code?(a.h.info(`Preload aborted (index: ${b})`),d.state=Te):
221
+ (a.h.warn(`Preload failed (index: ${b})`,e),a.trigger(new _.F(_.Md,{detail:e})),d.state=Ue),a.trigger(new _.F(Ff))}})};Ko=function(a){return _.x(function*(){const b=a.a+1;a.h.info(`Preload following item (index: ${b})`);yield Mo(a,b)})};Lo=function(a){return _.x(function*(){const b=a.a-1;a.h.info(`Preload preceding item (index: ${b})`);yield Mo(a,b)})};
222
+ Uo=function(a,b){a.classList.add($c);return Array.from({length:b}).map(()=>{const c=document.createElement(_.w);c.classList.add(bd);const d=document.createElement(_.yd);d.classList.add(ad);d.appendChild(c);a.appendChild(d);return new Q(c)})};
223
+ Vo=function(a,b,c){if(!a.A){var d=b.getSurface().getMedia();b=b.getSurface().getUniqueCssClass();d&&(c?(a.h.info(`Show video element .${b}`),d.classList.add(cd),d.classList.remove("clpp-hide")):(a.h.info(`Hide video element .${b}`),d.classList.remove(cd),d.classList.add("clpp-hide")),a.w&&a.w(d,c))}};Wo=function(a){return _.x(function*(){const b=a.a;b&&("loaded"!==b.state&&(yield b.Xc),yield b.player.play(),b.state=_.Oe,b.jc&&b.jc())})};Xo=function(a,b){a.A=b;const c=a.a&&a.a.player;c&&Vo(a,c,!b)};
224
+ Zo=function(a,b){return _.x(function*(){if(b.player){if(b.state===We){a.h.info(Ob);try{yield b.preloadPromise}catch(c){}}a.a=b;b.role=Yo;Vo(a,b.player,!0);b.state="loading";b.state===Ve?yield b.player.play():b.state===Ue&&(yield b.player.load(b.config));b.config.autoplay||(yield b.player.play());b.state=_.Oe}})};ap=function(a,b){return _.x(function*(){yield $o(a,b);b.config.autoplay||(yield b.player.play());b.state=_.Oe})};
225
+ bp=function(a,b){const c=b.transition;if(c){if(c.ic){const d=c.ic,e=()=>{a.h.info(`Transition onEnded to (ID: ${d})`);a.play(d)};b.player.on(_.Ld,e);b.$b.push(()=>{b.player.off(_.Ld,e)})}if(c.jf){const d=e=>{const f=c.jf.find(g=>g.cueId===e.detail.id);f&&(a.h.info(`Transition onCue to (ID: ${f.itemId})`),a.play(f.itemId))};b.player.on(_.Zg,d);b.$b.push(()=>{b.player.off(_.Zg,d)})}if(c.pf){const d=c.pf,e=()=>{b.player.getPosition()>=d.position&&(a.h.info(`Transition onPosition to (ID: ${d.itemId})`),
226
+ a.play(d.itemId))};b.player.on(_.Af,e);b.$b.push(()=>{b.player.off(_.Af,e)})}}};dp=function(a,b){return _.x(function*(){a.h.info(`Stop current playback (ID: ${b.id})`);b.$b.forEach(d=>d());b.$b=[];const c=b.player;b.player=null;b.videoEl=null;b.role=cp;c.pause();yield a.l.release(c);Vo(a,c,!1)})};fp=function(a){return Promise.all(Array.from(a.f.keys()).map(b=>ep(a,b)))};
227
+ hp=function(a,b){_.x(function*(){if(0!==b.length){a.h.info(`Preload items (IDs: ${b})`);var c=a.j.filter(d=>b.includes(d.id))||[];yield Promise.all(c.map(d=>gp(a,d)))}})};$o=function(a,b){return _.x(function*(){const c=yield a.l.get();a.a=b;b.role=Yo;a.a.player=c;a.a.videoEl=c.getSurface().getMedia();Vo(a,c,!0);b.primary&&a.trigger(new _.F(Xe,{detail:{player:c}}));b.state="loading";b.Xc=yield c.load(b.config);b.state="loaded"})};
228
+ ip=function(a){return _.x(function*(){yield a.l.destroy();const b=a.o.anchorEl;b&&(b.classList.remove($c),b.innerHTML="")})};jp=function(a){a.a&&(a.a.$b.forEach(b=>b()),a.a.$b=[],bp(a,a.a),fp(a),hp(a,a.a.next))};ep=function(a,b){return _.x(function*(){const c=a.f.get(b);c&&(a.h.info(`Stop preloading item (ID: ${b})`),c.player&&(yield a.l.release(c.player)),a.f.delete(b))})};
229
+ gp=function(a,b){return _.x(function*(){const c=b.id,d=yield a.l.get();b.player=d;b.videoEl=d.getSurface().getMedia();b.role=cp;b.state=We;a.trigger(new _.F(Ff));try{a.f.set(c,b),b.config.autoplay&&(a.h.warn(ka+`Force disabling autoplay (ID: ${c})`),b.config.autoplay=!1),b.primary&&a.trigger(new _.F(Xe,{detail:{player:d}})),b.preloadPromise=d.load(b.config),yield b.preloadPromise,b.state=Ve,a.trigger(new _.F(Ff))}catch(e){7001===e.code?(a.h.info(`Preload aborted (ID: ${c})`),b.state=Te):(a.h.warn(`Preload failed (ID: ${c})`,
230
+ e),a.trigger(new _.F(_.Md,{detail:e})),b.state=Ue),a.trigger(new _.F(Ff))}})};kp=function(a){return a&&a.ASSETS&&Array.isArray(a.ASSETS)?a.ASSETS.every(b=>typeof b.URI===_.tf&&typeof b.DURATION===_.r):!1};lp=function(a){a.g.forEach(b=>b());a.g=[]};
231
+ qp=function(a,b){const c=()=>_.x(function*(){var e=b.getPosition();if(e=mp(a,e))a.h.info(`Interstitial ${e.cueId} coming up `+`at ${e.startTime} s`),(yield np(a,e))&&op(a,e,b)});b.addEventListener(_.Af,c);a.g.push(()=>{b.removeEventListener(_.Af,c)});const d=()=>{a.trigger(new _.F(pp))};b.on(_.Ld,d);a.g.push(()=>{b.off(_.Ld,d)})};
232
+ sp=function(a,b,c){return _.x(function*(){if(b.source){a.a.fd([{id:Ye,primary:!0,config:b,next:[]}]);yield a.a.load(Ye);var d=a.a.tb();d&&d.rd()?(d=Array.from(d.rd().cues()),rp(a,d,c)||(Xo(a.a,!1),c||(yield Wo(a.a)))):a.h.error("Failed to get cue timeline after load")}else a.h.error("Config must be of type cl.api.PlayerConfiguration")})};
233
+ rp=function(a,b,c){var d=b.filter(f=>f.schemeIdUri===_.od&&f.Pa);a.h.info("Interstitial cues found",d);if(!tp(a,d))return!1;b=d.find(f=>f.startTime<a.f.prerollMarginSec);const e=d.filter(f=>f.startTime<a.f.resolutionOffsetSec&&!(f.startTime<a.f.prerollMarginSec));d=d.filter(f=>!(f.startTime<a.f.resolutionOffsetSec));b&&up(a,b,c);0<e.length&&e.forEach(f=>vp(a,f));d.forEach(f=>wp(a,f));a.trigger(new _.F(xp,{detail:a.Pc()}));return!!b};
234
+ tp=function(a,b){const c=b.sort((g,h)=>g.startTime-h.startTime),d=a.f.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.Pa[_.Tb],k=g.Pa[_.Ub];g.Pa[_.Sb]||h?null!=k&&1>k&&a.h.warn(`Interstitial cue ${g.id} is invalid `+"X-PLAYOUT-LIMIT is less than 1 s.",
235
+ g):f.push(`Interstitial cue ${g.id} is invalid `+"it contains neither X-ASSET-LIST nor X-ASSET-URI.")});0<f.length?a.h.error("Invalid interstitials, all interstitials will "+`be skipped. ${f.join(" ")}`):0<e.length&&a.h.warn("Unsupported format of interstitials, playback may not "+`behave correctly. ${e.join(" ")}`);return 0===f.length};
236
+ up=function(a,b,c){_.x(function*(){const d=wp(a,b),e=yield np(a,d),f=d.Fa?d.Fa.length:0;e&&0<f?yp(a,d,c):(e?a.h.warn("Preroll interstitial has no assets, skipping"):a.h.error("Preroll interstitial failed, skipping"),Xo(a.a,!1),c||(yield Wo(a.a)))})};
237
+ vp=function(a,b){return _.x(function*(){const c=wp(a,b);a.h.info(`Interstitial ${c.cueId} coming up `+`at ${c.startTime} s`);if(yield np(a,c)){const e=a.a.getCurrentItem();if(!e)a.h.error("Cannot schedule interstitial "+`${c.cueId}, no primary content not found in `+"playlist");else if(e.player){var d=e.player;e.state===_.Oe?op(a,c,d):e.jc=()=>{op(a,c,d)}}}})};
238
+ wp=function(a,b){{const c=b.Pa[_.Vb];b={cueId:b.id,startTime:b.startTime,endTime:b.endTime,state:zp,He:b.Pa[_.Sb],Ie:b.Pa[_.Tb],Fa:null,resumePosition:null==c?b.endTime:b.startTime+c,playoutLimit:b.Pa[_.Ub]}}a.j.push(b);return b};
239
+ np=function(a,b){return _.x(function*(){b.state=Ap;if(b.He)try{a.h.info(`Load X-ASSET-LIST for ${b.cueId}`),b.Fa=yield Bp(a,b.He),b.state=Cp}catch(c){a.h.error("Failed to load X-ASSET-LIST",c),b.state=Dp}else b.Ie?(b.Fa=[{URI:b.Ie,DURATION:b.endTime-b.startTime}],b.state=Cp):b.state=Dp;return b.state===Cp})};
240
+ yp=function(a,b,c){_.x(function*(){const d=a.a.getCurrentItem();if(d){var e=Ep(a,b,"preroll");a.a.fd(e);Fp(a,d,b,e);jp(a.a);b.state=Cp;c?yield a.a.load(e[0].id):yield a.a.play(e[0].id);Xo(a.a,!1)}})};
241
+ op=function(a,b,c){if(b.Fa)if(0===b.Fa.length){const g=()=>{c.seek(b.resumePosition)};c.on(_.Zg,g);a.g.push(()=>{c.off(_.Zg,g)});a.h.info(`Interstitial ${b.cueId} scheduled to `+"be skipped")}else{var d=a.a.getCurrentItem();if(d){var e=Ep(a,b);a.a.fd(e);var f=e[0].id;Fp(a,d,b,e);d.next=[f];d.transition={jf:[{cueId:b.cueId,itemId:f}]};jp(a.a);b.state=Cp;a.h.info(`Interstitial ${b.cueId} scheduled for `+`${b.startTime} s`)}}};
242
+ mp=function(a,b){return a.j.find(c=>{const d=c.startTime-b;return c.state===zp&&0<d&&d<=a.f.resolutionOffsetSec})||null};Bp=function(a,b){return _.x(function*(){var c=a.a.tb();if(!c)throw Error("No player found");c=c.getNetworkEngine();const d=_.si(b);c=yield Bi(c,d);if(!kp(c))throw new nh("Invalid X-ASSET-LIST list response");return Promise.resolve(c.ASSETS)})};
243
+ Ep=function(a,b,c){c=void 0===c?"":c;let d=0,e=b.Fa.map((f,g)=>{const h=`${b.cueId}-${g}`;g=g===b.Fa.length-1?Ye:`${b.cueId}-${g+1}`;d+=f.DURATION;return{id:h,config:{source:{url:f.URI,type:_.fk}},next:[g],transition:{ic:g},duration:f.DURATION,Se:d}});e.forEach((f,g)=>{f.jc=()=>{a.h.info(`Playing interstitial asset ${f.id}`,f);a.trigger(new _.F(Gp,{detail:{id:f.id,podId:b.cueId,uri:f.config.source.url,duration:f.duration,podOrder:g+1,podCount:b.Fa.length}}))}});if(null!=b.playoutLimit){const f=b.playoutLimit;
244
+ a.h.info(`Playout limit for ${b.cueId} is `+`${f} s`);e=e.filter(k=>k.Se-k.duration<=f);const g=e[e.length-1],h=Math.abs(g.Se-f);1>h?g.transition.ic=Ye:(g.transition.ic=void 0,g.transition.pf={position:g.duration-h,itemId:Ye});g.next=[Ye]}e[0].jc=()=>{a.h.info(`Playing interstitial ${c} ${b.cueId} with `+`${b.Fa.length} assets and will resume primary `+`content at ${b.resumePosition} s.`,e);a.h.info(`Playing interstitial asset ${e[0].id}`,e[0]);a.trigger(new _.F(Hp,{detail:{id:b.cueId,startTime:b.startTime,
245
+ endTime:b.endTime,resumePosition:b.resumePosition,itemCount:e.length,playoutLimit:b.playoutLimit}}));a.trigger(new _.F(Gp,{detail:{id:e[0].id,podId:b.cueId,uri:b.Fa[0].URI,duration:b.Fa[0].DURATION,podOrder:1,podCount:b.Fa.length}}))};return e};Fp=function(a,b,c,d){b.jc=()=>{a.h.info("Resuming primary content at "+`${b.config.startTime} s.`);a.trigger(new _.F(Ip,{detail:{id:c.cueId}}));c.state=Jp;a.a.removeItems(d.map(e=>e.id));b.next=[]};b.config.startTime=c.resumePosition};
246
+ Kp=function(a,b){a.size=void 0===b?0:1;a.h.debug("Setting key status to",b);a.a=b};
247
+ Lp=function(a,b){a.f=b;_.Sg(a.a);if(!b)return Promise.resolve();a.a.on(b,Jd,c=>{_.Mg("AppleEmeManager.cancelNativeMediaEncryptedEvent_",c);"MediaEncryptedEvent"in window&&c instanceof MediaEncryptedEvent&&(a.h.info("Cancel native MediaEncryptedEvent when using Apple-prefixed EME"),c.stopImmediatePropagation())});a.a.on(b,eg,c=>{{a.h.debug("Handle webkitNeedKey event");c=_.J(c.initData);if(_.Mh(c).getUint32(0,!0)+4!==c.byteLength)throw new RangeError("Malformed FairPlay init data");c=Rh(c.subarray(4),
248
+ !0);c=_.Th(c);const d=new Event(Jd);d.initDataType="skd";d.initData=Nh(c);a.f.dispatchEvent(d)}});Zm(b,HTMLMediaElement.HAVE_METADATA,a.a,()=>b.webkitSetMediaKeys(a.g));return Promise.resolve()};Mp=function(a,b){Kp(a.keyStatuses,b);b=new _.F(Vd);a.dispatchEvent(b)};
249
+ Pp=function(a,b){a.a=b;_.Sg(a.f);b&&(a.f.on(b,a.g+"needkey",c=>{{const d=new Event(Jd);d.initDataType=_.Sc;d.initData=Nh(c.initData);a.a.dispatchEvent(d)}}),a.f.on(b,a.g+"keymessage",c=>{{const e=Np(a,c.sessionId);if(e){var d=void 0===e.keyStatuses.getStatus();c=new _.F(_.ke,{messageType:d?Zd:Yd,message:c.message});d=e;_.Mg("WebkitEmeManager.MediaKeySession.generated");d.f&&(d.f.resolve(),d.f=null);e.dispatchEvent(c)}else _.Ng("Session not found",c.sessionId)}}),a.f.on(b,a.g+"keyadded",c=>{(c=Np(a,
250
+ c.sessionId))&&c.ready()}),a.f.on(b,a.g+"keyerror",c=>{var d=Np(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?Op(d,_.Ce):1===e?Op(d,"expired"):Op(d,_.Td))}}}))};
251
+ Np=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};Op=function(a,b){Kp(a.keyStatuses,b);b=new _.F(Vd);a.dispatchEvent(b)};Qp=function(a,b){return a.w?a.w+b.charAt(0).toUpperCase()+b.slice(1):b};
252
+ Rp=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===_.Fe)if(c)d=_.J(_.Th("LOAD_SESSION|"+c));else{const f=_.Th("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 _.sm;const e=Qp(a,"generateKeyRequest");try{a.j[e](a.g,d)}catch(f){if(f.name!==Ya)return a.f=null,Promise.reject(f);(new _.kj(()=>{try{a.j[e](a.g,d)}catch(g){a.f.reject(g),
253
+ a.f=null}})).ca(.01)}return a.f};Sp=function(a,b,c){if(a.a)a.a.then(()=>Sp(a,b,c)).catch(()=>Sp(a,b,c));else{a.a=b;if(a.g===ag){var d=_.Ph(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=_.ei(e.keys[0].k);e=_.ei(e.keys[0].kid)}else d=_.J(c),e=null;var f=Qp(a,"addKey");try{a.j[f](a.g,d,e,a.sessionId)}catch(g){a.a.reject(g),a.a=null}}};
254
+ Tp=function(a){const b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase();let c;typeof Event===_.Od?c=new Event(b,a):(c=document.createEvent("Event"),c.initEvent(b,a.bubbles,a.cancelable));a.target.dispatchEvent(c)};Up=function(a){a=a.target;if(a.webkitPresentationMode===Ge){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)};
255
+ Vp=function(){return this.webkitSupportsPresentationMode(Ge)?(this.webkitSetPresentationMode(Ge),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))};Wp=function(){const a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))};
256
+ Xp=function(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}};Yp=function(a,b,c){return new window.TextTrackCue(a,b,c)};Zp=function(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)};aq=function(a,b,c){if("input"===a)switch(this.type){case "range":a=Vc}$p.call(this,a,b,c)};bq=function(){return window.performance&&window.performance.now?window.performance.now():Date.now()};
257
+ cq=function(a){return bq()-a.a};eq=function(a){const b=new dq;b.a=a.a;return b};_.fq=function(a){const b=[];for(const c of a)for(const d of c.variants)b.push(d);return b};_.hq=function(a,b,c,d){return _.x(function*(){try{return new (yield gq(a,b,c,d))}catch(e){throw e.a(_.G),e;}})};
258
+ gq=function(a,b,c,d){return _.x(function*(){if(d){var e=_.iq[d.toLowerCase()];if(e)return e;_.C("Could not determine manifest type using MIME type ",d)}if(e=_.jq(a)){const f=_.kq[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 lq(a,b,c))){if(e=_.iq[d])return e;_.C("Could not determine manifest type using MIME type",d)}throw new _.H(_.G,4,4E3,{url:a});})};
259
+ _.jq=function(a){a=(new _.qh(a)).xa.split("/").pop().split(".");return 1==a.length?"":a.pop().toLowerCase()};lq=function(a,b,c){return _.x(function*(){var d=_.si(a);qi(d,c);d.type=1;d.method="HEAD";return(d=(yield b.fetch(d).P).headers["content-type"])?d.toLowerCase():""})};mq=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};
260
+ nq=function(a,b,c){return b.read().then(({done:d,value:e})=>{null!=e&&(mq(a,e),vi(c,e.byteLength,cq(a.g)),a.g.a=bq());return d?(d=a.a.buffer,a.a.byteLength!==a.f&&(d=d.slice(0,a.f)),Promise.resolve(d)):Promise.resolve().then(()=>nq(a,b,c))})};
261
+ pq=function(a){const b=a.uris[a.uriIndex],c=new oq,d=new dq,e=eq(d);let f=0,g;const h=new _.sm;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=cq(e));m.readyState>=XMLHttpRequest.HEADERS_RECEIVED&&!k&&(m=m.getResponseHeader(qa),ui(a,m),k=!0)};c.onload=function(m){m=m.target;var n=(m.getAllResponseHeaders()||"").trim().split("\r\n");
262
+ const q={};for(const u of n)n=u.split(": "),q[n[0].toLowerCase()]=n.slice(1).join(": ");try{const u=cq(e);l||vi(a,m.response?m.response.length:0,u);const v=_.ti(q,m.response,m.status,b,m.responseURL,a,u,g);a.rateLimitBps?wi(a.rateLimitBps,cq(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 _.H(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");
263
+ for(var q of n)n=q.split(": "),u[n[0].toLowerCase()]=n.slice(1).join(": ")}q=_.ti(u,m.response,m.status,b,m.responseURL,a,cq(e),g);h.resolve(q)}};c.ontimeout=function(){h.reject(new _.H(1,1,1003,{url:b,request:a}))};c.onprogress=function(m){const n=cq(d);d.a=bq();if(100<n||m.lengthComputable&&m.loaded===m.total)vi(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{P:h,request:a,abort:()=>{c.abort();h.reject(new _.H(1,1,
264
+ 7001,{url:b,request:a}));return Promise.resolve()}}};qq=function(a){let b=null;a.g!==a.f&&(b={start:a.g,end:a.f,length:a.f-a.g,data:new DataView(a.j.a.buffer,a.g,a.f-a.g),count:-1});return b};rq=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.g),d));c.a.set(e)}c.a.set(b,c.f);c.f+=b.byteLength}a.a=a.g;a.f=a.j.f;a.l=new DataView(a.j.a.buffer,0,a.j.f)};
265
+ tq=function(a){if(0<=a.o&&a.f<a.o)return null;let b=sq(a);for(;null!==b;){if(b.name===_.ie){const c={start:a.g,end:b.end,length:b.end-a.g,data:new DataView(a.j.a.buffer,a.g,b.end-a.g),count:1};a.g=b.end;return c}b=sq(a)}return null};
266
+ uq=function(a,b,c,d){return b.read().then(e=>{var {done:f,value:g}=e;d&&g&&(d(g.byteLength,cq(a.w)),a.w.a=bq());if(f)return e=qq(a),(e=c(!0,e))?e.then(()=>a.j.a.buffer):Promise.resolve(a.j.a.buffer);let h=Promise.resolve();if(null!=g){rq(a,g);var k=tq(a);for(e=[];k;)e.push(k),k=tq(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=
267
+ c(!1,k))&&(h=e)}}return h.then(()=>uq(a,b,c,d))})};
268
+ sq=function(a){const b=a.a;if(a.a+4>=a.f)return a.a=a.f,null;var c=vq(a);if(a.a+4>=a.f)return a.a=a.f,null;var d=vq(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 _.H(_.G,3,3E3);}if(2097151<f)throw new _.H(_.G,3,3E3);a.a+=8;c=f*Math.pow(2,32)+e}}c=b+c;a.o=c;return a.f>=c?(a.a=c,{name:d,start:b,end:c}):null};
269
+ vq=function(a){const b=a.l.getUint32(a.a,!1);a.a+=4;return b};
270
+ yq=function(a){a.g=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=wq(e.request.baseDelay,1E3));const f=a.f*(1+(2*Math.random()-1)*wq(e.request.fuzzFactor,.5));a.f*=wq(e.request.backoffFactor,2);if(0<f)return(new Promise((g,h)=>{a.l=h;xq(a,()=>{g(e.plugin(e.request))},f)})).catch(g=>{if(!a.a)throw g;})}if(a.a)throw new _.H(1,1,7001,{url:e.request.uris[e.request.uriIndex],request:e.request});return e.plugin(e.request)});
271
+ let b=0,c=0,d=0;return a.g.then(e=>{const f=e.request;f.currentAttempt+=1;b=f.currentAttempt;c=f.maxAttempts;d=f.uris.length;return e.P}).then(e=>{a.w.resolve(e)}).catch(e=>{if(e instanceof _.H){const f=b<d,g=7001!==e.code,h=b<c;if((1===e.severity||f)&&g&&h)return yq(a);g&&e.a(_.G);a.w.reject(e)}else a.w.reject(e)})};xq=function(a,b,c){a.o=setTimeout(b,c)};wq=function(a,b){return null===a||void 0===a?b:a};
272
+ zq=function(a){var b=a.split("\x3d");const c=b[0];b=b[1];if(!c)throw new nh("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 nh(`Parsing CMSD, not recognized value type of ${a}`);};
273
+ Dq=function(a){var b=new Aq;for(const e in a.headers)b.append(e.toLowerCase(),a.headers[e]);const c=new Bq,d={Kc:!1,Cf:!1};b={P:Cq(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.Kc||(d.Kc=!0,c.abort());return Promise.resolve()}};if(a=a.timeout){const e=window.setTimeout(()=>{d.Cf=!0;c.abort()},a);b.P=b.P.finally(()=>{window.clearTimeout(e)})}return b};
274
+ Cq=function(a,b,c,d){return _.x(function*(){let e,f,g;const h=new dq,k=eq(h);try{e=yield Eq(a,c);g=cq(h);const m=e.headers.get(qa);ui(b,m);const n=m?parseInt(m,10):0;if(b.onFragment&&!b.disableFragmentSupport&&2===b.type){const q=e.body.getReader();f=yield uq(new Fq(n,!b.disableMergedFragments),q,(u,v)=>{if(d.Kc)return null;v&&v.data&&(vi(b,v.data.byteLength,cq(h)),h.a=bq());return b.onFragment&&v?b.rateLimitBps?wi(b.rateLimitBps,cq(k),b.bytesLoaded).then(()=>b.onFragment(v)):b.onFragment(v):null},
275
+ b.onProgress)}else{const q=e.body.getReader();f=yield nq(new Gq(n),q,b);b.rateLimitBps&&(yield wi(b.rateLimitBps,cq(k),f.byteLength))}}catch(m){if(d.Kc)throw new _.H(1,1,7001,{url:a,request:b});if(d.Cf)throw new _.H(1,1,1003,{url:a,request:b});_.Ng("Error while fetching data:",m);throw new _.H(1,1,1002,{url:a,error:m,request:b,status:-1},m);}const l={};e.headers.forEach((m,n)=>{l[n.trim()]=m});if(d.Kc)throw new _.H(1,1,7001,{url:a,request:b});return _.ti(l,f,e.status,a,e.url,b,cq(k),g)})};
276
+ Iq=function(a){try{const b=a.uris[a.uriIndex],c=_.Hq(b);return{P:Promise.resolve({uri:b,data:c.data,request:a,headers:{"content-type":c.contentType}}),request:a,abort:()=>Promise.resolve()}}catch(b){return{P:Promise.reject(b),request:a,abort:()=>Promise.resolve()}}};
277
+ _.Hq=function(a){var b=a.split(":");if(2>b.length||"data"!==b[0])throw _.Ng("Bad data URI, failed to parse scheme"),new _.H(_.G,1,1004,{uri:a});b=b.slice(1).join(":").split(",");if(2>b.length)throw _.Ng("Bad data URI, failed to extract encoding and MIME type"),new _.H(_.G,1,1004,{uri:a});var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];let d=!1;1<b.length&&"base64"===b[b.length-1]&&(d=!0,b.pop());return{data:d?_.ei(a).buffer:_.Th(a).buffer,contentType:c}};_.Kq=function(a){delete _.Jq[a]};
278
+ _.Pq=function(a){if(!a.w)return null;const b=a.H;switch(a.w){case Lq:return`-2px -2px 0 ${b}, -1px -1px 0 ${b}`;case Mq:return`2px 2px 0 ${b}, 1px 1px 0 ${b}`;case Nq:return`-1px 0 ${b}, 0 1px ${b}, 1px 0 ${b}, `+`0 -1px ${b}`;case Oq:return`2px 2px 3px ${b}, 2px 2px 4px ${b}, `+`2px 2px 5px ${b}`;default:return _.se}};mg="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this;
279
+ ng=typeof Object.defineProperties==_.Od?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)};
280
+ og("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.g(function(){h.l()})}this.a.push(g)};var e=mg.setTimeout;c.prototype.g=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=
281
+ g[h];g[h]=null;try{k()}catch(l){this.j(l)}}}this.a=null};c.prototype.j=function(g){this.g(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.g)}};b.prototype.C=function(g){if(g===this)this.g(new TypeError("A Promise cannot resolve to itself"));else if(g instanceof b)this.F(g);else{a:switch(typeof g){case _.te:var h=null!=g;break a;case _.Od:h=!0;break a;default:h=!1}h?this.B(g):this.o(g)}};
282
+ b.prototype.B=function(g){var h=void 0;try{h=g.then}catch(k){this.g(k);return}typeof h==_.Od?this.G(h,g):this.o(g)};b.prototype.g=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();
283
+ g.hd(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==_.Od?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.hd(k(g,l),k(h,m));return n};b.prototype.catch=function(g){return this.then(void 0,g)};b.prototype.hd=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: "+
284
+ 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=lg(g),m=l.next();!m.done;m=l.next())d(m.value).hd(h,k)})};b.all=function(g){var h=lg(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).hd(n(q.length-1),m),k=h.next();while(!k.done)})};return b});var qg=this||self;
285
+ qg.a=!0;_.z("clpp.utils.obj.cloneItem",_.tg);_.z("clpp.utils.obj.merge",_.sg);var Ig={DEFAULT:-1,NONE:0,ERROR:1,WARNING:2,INFO:3,DEBUG:4};_.z("clpp.log.Level",Ig);var Gg=3,Fg={},Sq=[];_.z("clpp.log.getLoggers",function(){return _.tg(Fg)});_.z("clpp.log.addInterceptor",function(a){a&&Sq.push(a)});_.z("clpp.log.removeInterceptor",function(a){a&&(a=Sq.indexOf(a),0<=a&&Sq.splice(a,1))});_.z("clpp.log.getTagLevel",Hg);_.z("clpp.log.hasTagLevel",function(a){return void 0===a?!1:0<=Fg[a]});_.z("clpp.log.setTagLevel",function(a,b){a&&(_.zg(b)&&(b=Jg(b)),Fg[a]=b)});
286
+ _.z("clpp.log.setLogLevel",function(a){-1===a&&(a=3);_.zg(a)&&(a=Jg(a));Gg=a});_.z("clpp.log.getLogLevel",function(){return Gg});
287
+ _.R=class{constructor(a){(this.tag=a)&&void 0===Fg[a]&&(Fg[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=Hg(this.tag);if(0<=d){if(d<c)return}else if(Gg<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,
288
+ arguments):2===c?console.warn.apply(console,arguments):1===c?console.error.apply(console,arguments):console.log.apply(console,arguments);for(const e of Sq)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)}bg(a){return a?
289
+ this.tag?new _.R(this.tag+"."+a):new _.R(a):this}};_.z("clpp.log.Logger",_.R);_.R.prototype.createChild=_.R.prototype.bg;_.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 Kg=new _.R("clpp");_.z("clpp.log.info",_.Lg);_.z("clpp.log.debug",_.Mg);_.z("clpp.log.warn",_.C);_.z("clpp.log.error",_.Ng);(function(){const a=console.assert;a?a.bind||(console.assert=function(){a.apply(console,arguments)}):console.assert=function(){}})();var wo,xo;wo=class{constructor(a,b){this.Mb=a;this.a=b}};xo=class{constructor(a,b){this.player=a;this.a=b}};_.Pg=new _.R("clpp.players");_.Og={};_.Tq=class{constructor(){this.a={}}push(a,b){a in this.a?this.a[a].push(b):this.a[a]=[b]}get(a){return(a=this.a[a])?a.slice():[]}remove(a,b){a=this.a[a];if(!a)return!1;let c=!1;for(let d=0;d<a.length;++d)a[d]==b&&(a.splice(d,1),--d,c=!0);return c}clear(){this.a={}}forEach(a){for(const b in this.a)a(b,this.a[b])}};var Uq,Vq;Uq=class{constructor(a,b,c,d){this.f=a;this.qc=b;this.a=c;this.Tg=!!d}Vb(a){try{this.qc.handleEvent?this.qc.handleEvent(a):this.qc.call(this.a,a)}catch(b){_.Ng("clpp","Uncaught exception in event handler for event '"+this.f+"'",b,b?b.message:null,b?b.stack:null)}}};
290
+ _.F=class{constructor(a,b){if(b)for(const c in b)this[c]=b[c];this.defaultPrevented=this.cancelable=this.bubbles=!1;this.timeStamp=window.performance&&window.performance.now?window.performance.now():Date.now();this.type=a;this.isTrusted=!1;this.target=this.currentTarget=null;this.f=this.a=!1}preventDefault(){this.cancelable&&(this.defaultPrevented=!0)}stopImmediatePropagation(){this.f=!0}stopPropagation(){}};
291
+ Vq=class{constructor(a){this.a=new _.Tq;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].Vb(a),b[c].Tg&&this.a.remove(a.type,b[c]),!a||!a.f);c++);}on(a,b,c){this.a.push(a,new Uq(a,b,c||this.f));return b}one(a,b,c){this.a.push(a,new Uq(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].qc===b&&(d=this.a.remove(a,c[e])||d);return d}clear(){this.a.clear()}};var Wq;_.Xq=class{constructor(){this.a=new _.Tq}release(){_.Sg(this)}on(a,b,c,d=!1){a=new Wq(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||(Rg(f),this.a.remove(b,f))}}};Wq=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 Yq=class{constructor(a){this.m=a;this.o=a.getConfiguration().streaming.addMissingTimelineCues||!1;this.j=null;this.f=new _.Xq;this.a=this.l=null;this.g=[];this.h=new _.R("clpp.native.Metadata")}release(){this.f.release();this.g=[];this.a=null}destroy(){const a=this;return _.x(function*(){a.release();a.l=null;a.j=null})}getTimelineCues(){return this.g}};_.er=class{constructor(a,b,c,d){d=void 0===d?_.Zq:d;this.startTime=a;this.endTime=b;this.payload=c;this.payloadType=d;this.positionAlign=this.position=null;this.size=100;this.textAlign=_.$q;this.writingMode=_.ar;this.lineInterpretation=_.br;this.line=null;this.lineAlign=_.cr;this.direction=dr;this.region=null;this.cssClassList=[];this.id=this.backgroundImage="";this.containerRows=null}od(a){return this.payload===a.payload&&this.startTime===a.startTime&&this.endTime===a.endTime&&this.payloadType===
292
+ a.payloadType}};_.z("clpp.text.Cue",_.er);_.er.positionAlign={LEFT:_.ce,RIGHT:_.de,CENTER:_.Tc,AUTO:"auto"};_.Zq=_.t;_.er.payloadType={TEXT:_.Zq,VTT_XML:_.Yf,TTML_XML:_.Cf};_.$q=_.Tc;_.fr={LEFT:_.Wd,RIGHT:_.gf,CENTER:_.$q,START:_.Wd,END:_.gf};_.er.textAlign=_.fr;var dr="ltr";_.er.direction={HORIZONTAL_LEFT_TO_RIGHT:dr,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};_.ar="horizontal-tb";_.er.writingMode={HORIZONTAL_TOP_TO_BOTTOM:_.ar,VERTICAL_LEFT_TO_RIGHT:_.Lf,VERTICAL_RIGHT_TO_LEFT:_.Mf};_.br=0;
293
+ _.er.lineInterpretation={LINE_NUMBER:_.br,PERCENTAGE:1};_.cr=_.pf;_.gr={CENTER:_.Tc,START:_.cr,END:_.Kd};_.er.lineAlign=_.gr;_.jr=class{constructor(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=_.hr;this.scroll=ir;this.cssClassList=[];this.writingMode=this.displayAlign=null}};_.z("clpp.text.CueRegion",_.jr);_.hr=1;_.jr.units={PX:0,PERCENTAGE:_.hr,LINES:2};var ir="";
294
+ _.jr.scrollMode={NONE:ir,UP:"up"};_.jr.displayAlign={BEFORE:"flex-end",CENTER:_.Tc,AFTER:"flex-start"};_.jr.writingMode={HORIZONTAL_TOP_TO_BOTTOM:_.ld,VERTICAL_LEFT_TO_RIGHT:"row-reverse",VERTICAL_RIGHT_TO_LEFT:"row"};var kr=class{constructor(a){this.m=a;this.l=a.getTextDisplayer();this.f=this.g=null;this.a=new _.Xq;this.j=!1;this.h=new _.R("clpp.native.CueHandler")}destroy(){this.a.release();this.j=!1;this.l=this.a=this.g=this.f=null;return Promise.resolve()}start(a){this.j?this.h.warn("Already started. Ignoring request..."):(this.j=!0,this.g=a,this.f=this.g.textTracks,this.a.on(this.f,_.mc,b=>hh(this,b)),this.a.on(this.f,Vc,()=>{{const b=this.f;for(let c=0;c<b.length;c++){const d=b[c];d.mode===_.kf&&(d.mode=
295
+ _.Qd)}}}))}o(a){const b=new _.er(a.startTime,a.endTime,a.text,_.Yf);if(_.zg(a.vertical))switch(a.vertical){case "lr":b.writingMode=_.Lf;break;case "rl":b.writingMode=_.Mf}_.Ag(a.size)&&(b.size=a.size);if(_.zg(a.align))switch(a.align){case _.Wd:case _.pf:b.textAlign=_.Wd;break;case _.Tc:b.textAlign=_.$q;break;case _.gf:case _.Kd:b.textAlign=_.gf}_.Ag(a.position)&&(b.position=a.position);if(_.zg(a.positionAlign))switch(a.positionAlign){case _.ce:b.positionAlign=_.ce;break;case _.Tc:b.positionAlign=
296
+ _.Tc;break;case _.de:b.positionAlign=_.de}_.Ag(a.line)&&(b.line=a.line);if(_.zg(a.lineAlign))switch(a.lineAlign){case _.pf:b.lineAlign=_.cr;break;case _.Tc:b.lineAlign=_.Tc;break;case _.Kd:b.lineAlign=_.Kd}typeof a.snapToLines===_.Kc&&(b.lineInterpretation=a.snapToLines?_.br:1);return b}};_.H=class extends Error{constructor(a,b,c,d,e){super(ih(a,b,c,d));this.severity=a;this.category=b;this.code=c;this.data=!d||_.zg(d)?{}:d;this.cause=void 0===e?null:e;this.f=!1;Error.captureStackTrace&&Error.captureStackTrace(this,_.H)}a(a){this.severity!==a&&(this.severity=a,this.message=ih(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",_.H);_.G=2;_.H.Severity={RECOVERABLE:1,FATAL:_.G};
297
+ _.H.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,PLUGIN:9,ADS:10};
298
+ _.H.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,
299
+ TEXT_PARSER_MISSING:2012,THUMBNAILS_FAILED_TO_LOAD:2013,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,
300
+ 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,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,DASH_NO_COMMON_KEY_SYSTEM:4008,
301
+ 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,DASH_UNSUPPORTED_XLINK_ACTUATE:4027,
302
+ DASH_XLINK_DEPTH_LIMIT:4028,HLS_COULD_NOT_PARSE_SEGMENT_START_TIME:4030,CONTENT_UNSUPPORTED_BY_BROWSER:4032,SMOOTH_INVALID_MANIFEST_XML:4033,SMOOTH_EMPTY_PRESENTATION:4034,SMOOTH_MEDIA_PROCESSING_ERROR:4035,SMOOTH_INVALID_VERSION:4036,SMOOTH_INVALID_FRAGMENT_METADATA:4037,SMOOTH_REQUIRED_ATTRIBUTE_MISSING:4038,SMOOTH_TRUNCATED_MEDIA_FILE:4039,CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM:4040,HLS_MSE_ENCRYPTED_TS_NOT_SUPPORTED:4041,HLS_PLAYLIST_NOT_UTF8:4042,HLS_PLAYLIST_EMPTY:4043,HLS_INVALID_VALUE:4044,
303
+ HLS_DISCONTINUITY_NOT_SUPPORTED:4045,HLS_UNSUPPORTED_FEATURE:4046,HLS_INCOMPATIBLE_PLAYLIST_UPDATE:4047,INVALID_STREAMS_CHOSEN:5005,NO_RECOGNIZED_KEY_SYSTEMS:6E3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,FAILED_TO_CREATE_CDM:6002,FAILED_TO_ATTACH_TO_VIDEO:6003,INVALID_SERVER_CERTIFICATE:6004,FAILED_TO_CREATE_SESSION:6005,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,
304
+ 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,INVALID_CONTAINER_ELEMENT:7006,INVALID_CONFIGURATION:7100,
305
+ 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,YOUBORA_SDK_MISSING:9100,YOUBORA_INVALID_CONFIGURATION:9101,YOUBORA_SDK_VERSION_NOT_SUPPORTED:9102,VIMOND_INVALID_CONFIGURATION:9200,
306
+ 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};var nh=class extends Error{constructor(a,b){super(a);this.code=b}};var vh=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;jg=_.qh.prototype;jg.Xa="";jg.nc="";jg.Ha="";jg.Fc=null;jg.xa="";jg.bc="";jg.toString=function(){var a=[],b=this.Xa;b&&a.push(yh(b,lr,!0),":");if(b=this.Ha){a.push("//");var c=this.nc;c&&a.push(yh(c,lr,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Fc;null!=b&&a.push(":",String(b))}if(b=this.xa)this.Ha&&"/"!=b.charAt(0)&&a.push("/"),a.push(yh(b,"/"==b.charAt(0)?mr:nr,!0));(b=this.a.toString())&&a.push("?",b);(b=this.bc)&&a.push("#",yh(b,or));return a.join("")};
307
+ jg.resolve=function(a){var b=new _.qh(this);"data"===b.Xa&&(b=new _.qh);var c=!!a.Xa;c?rh(b,a.Xa):c=!!a.nc;c?b.nc=a.nc:c=!!a.Ha;c?b.Ha=a.Ha:c=null!=a.Fc;var d=a.xa;if(c)sh(b,a.Fc);else if(c=!!a.xa){if("/"!=d.charAt(0))if(this.Ha&&!this.xa)d="/"+d;else{var e=b.xa.lastIndexOf("/");-1!=e&&(d=b.xa.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(""):
308
+ ".."==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.xa=d:c=""!==a.a.toString();c?_.th(b,uh(a.a)):c=!!a.bc;c&&(b.bc=a.bc);return b};var lr=/[#\/\?@]/g,nr=/[#\?:]/g,mr=/[#\?]/g,zh=/[#\?@]/g,or=/#/g;_.xh.prototype.a=null;_.xh.prototype.g=null;
309
+ _.xh.prototype.add=function(a,b){if(!this.a&&(this.a={},this.g=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.g&&this.g++;return this};
310
+ _.xh.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")};_.pr=1/15;var qr;qr={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av1$/],text:[/^vtt$/,/^wvtt/,/^stpp/]};_.$i=(a,b)=>{const c=qr[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===_.t?"":null};_.rr={text:{mp4:uc,m4s:uc,m4i:uc,cmft:uc,vtt:_.yf,ttml:_.Ac},video:{mp4:_.Of,m4s:_.Of,m4i:_.Of,m4v:_.Of,cmfv:_.Of,ts:_.Nf},audio:{mp4:_.Gc,m4s:_.Gc,m4i:_.Gc,m4a:_.Gc,cmfa:_.Gc,ts:_.Nf,aac:_.Dc,ec3:_.Fc,ac3:_.Ec},image:{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}};_.cj=(a,b,c)=>a.map(d=>{d=_.sr(d)||"";return d=(d=_.rr[b][d])?d:b===_.t?c&&"vtt"!==c?uc:_.yf:null}).filter(Boolean)[0]||null;
311
+ _.sr=a=>{a=(new _.qh(a)).xa.split(".");return 1>=a.length?null:a.pop()};_.mi=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}};_.li=class{constructor(a,b){this.name=a;this.value=b}};var Bh=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",
312
+ "cs"],["dan","da"],["deu","de"],[_.yd,"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",
313
+ "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",
314
+ "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",
315
+ "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",
316
+ "vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);var tr=class{};_.z("clpp.utils.BufferUtils",tr);tr.toArrayBuffer=Nh;tr.toDataView=_.Mh;tr.toInt32Array=_.Lh;tr.toUint32Array=Kh;tr.toUint16Array=Jh;tr.toUint8Array=_.J;tr.equal=Hh;var Qh=new _.R("clpp.utils.strings");_.z("clpp.utils.strings.fromUtf8",_.Ph);_.z("clpp.utils.strings.fromBytesAutoDetect",_.Sh);_.z("clpp.utils.strings.toUtf8",_.Th);_.z("clpp.utils.strings.toUtf16",_.Uh);_.z("clpp.utils.strings.toByteArray",_.Vh);_.z("clpp.utils.strings.startsWith",_.Wh);_.z("clpp.utils.strings.endsWith",_.Xh);_.z("clpp.utils.strings.bitrateToString",_.$h);
317
+ _.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)))});
318
+ _.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 ai=document.createElement("span");var ur=class{};_.z("clpp.utils.Uint8ArrayUtils",ur);ur.toStandardBase64=_.ci;ur.concat=_.ii;ur.equal=_.hi;ur.toHex=_.gi;ur.fromHex=_.fi;ur.fromBase64=_.ei;ur.toBase64Url=_.di;_.vr=new _.R("clpp.hls.Utils");_.ki=class{constructor(a){this.f=a;this.a=0}};_.wr=new Set([_.Ba,_.Ca,"EXT-X-I-FRAMES-ONLY",_.Fa,_.Ga,_.Ha,_.Ka,_.Ma]);_.xr=new Set(["EXTINF",_.ya,_.Aa,_.Da,_.Ea,_.Ja]);_.yr=new Set(["EXT-X-PART",_.Ia]);_.zr=new Set([_.za]);var oi=[403,401];_.z("clpp.net.DEFAULT_FATAL_STATUS_CODES",oi);_.z("clpp.net.makeRequest",_.si);_.ri=6;_.z("clpp.net.RequestType",{MANIFEST:1,SEGMENT:2,LICENSE:3,APP:4,TIMING:5,OTHER:_.ri});_.sm=class{constructor(){let a,b;const c=new Promise((d,e)=>{a=d;b=e});c.resolve=a;c.reject=b;return c}resolve(){}reject(){}};_.zn=class{constructor(a,b){this.P=a;this.A=b;this.a=!1}abort(){this.a=!0;return this.A()}kd(a,b){const c=new _.sm;let d=()=>{c.reject(new _.H(_.G,7,7001));return this.abort()};this.P.then(e=>{this.a?c.reject(new _.H(_.G,7,7001)):a?d=xi(a,e,c):c.resolve(e)},e=>{b?d=xi(b,e,c):c.reject(e)});return new _.zn(c,()=>d())}};_.zn.aborted=function(){const a=Promise.reject(new _.H(_.G,7,7001));a.catch(()=>{});return new _.zn(a,()=>Promise.resolve())};_.zn.prototype.chain=_.zn.prototype.kd;_.Ar=class{constructor(){this.a=[]}destroy(){const a=[];for(const b of this.a)b.P.catch(()=>{}),a.push(b.abort());this.a=[];return Promise.all(a)}};_.lo=class{constructor(){this.f=[];this.g=[];this.o=!1;this.l=new _.Ar;this.a={};this.j=0;this.a.data=Iq;!window.fetch||!window.AbortController||_.oj(6)||_.rj()&&68<_.Mj().browserVersion.major?(this.a.http=pq,this.a.https=pq):(this.a.http=Dq,this.a.https=Dq)}$g(a){0<a?_.C("Rate limit set to "+a+"bps"):_.C("Rate limit disabled");this.j=a}release(){return this.l.destroy()}destroy(){this.o=!0;this.f=[];this.g=[];return this.l.destroy()}Ge(a){this.f.push(a)}Ic(a){this.g.push(a)}uf(a){this.f=this.f.filter(b=>
319
+ b!==a)}Dd(a){this.g=this.g.filter(b=>b!==a)}fetch(a){if(this.o)return new Br(Promise.reject(new _.H(1,1,7001,{url:a.uris[a.uriIndex],request:a})));this.j&&0<this.j&&(a.rateLimitBps=this.j);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.g)b.push(c);if(a.responseModifiers)for(var d of a.responseModifiers)b.push(d);a.responseModifiers=b;let e;d=c=new _.sm;try{for(const f of a.requestModifiers)d=d.then(g=>
320
+ {if(e.a)throw new _.H(_.G,1,7001,g?{url:g.uris[g.uriIndex],request:g}:null);return f(g)||g}).catch(g=>{if(g instanceof _.H)throw g;throw new _.H(_.G,1,1006,null,g);});d=d.then(f=>{var g=new _.qh(f.uris[f.uriIndex]);var h=g.Xa;h||(h=location.protocol,h=h.slice(0,-1),rh(g,h),f.uris[f.uriIndex]=g.toString());h=this.a[h];if(!h)throw new _.H(_.G,1,1E3,{url:g.toString()});g=h;return{request:f,plugin:g}});e=new Br(d);for(const f of a.responseModifiers)e.then(g=>{const h=()=>{if(e.a)throw new _.H(_.G,1,7001,
321
+ 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 _.H&&g.data&&g.data.response){const h=f(g.data.response);if(h)return h.then(()=>Promise.reject(g))}return Promise.reject(g)}).catch(g=>{if(g instanceof _.H)throw g;throw new _.H(_.G,1,1007,null,g);});_.zi(this.l,e);c.resolve(a);return e}catch(f){return new Br(Promise.reject(f))}}};_.z("clpp.net.NetworkEngine",_.lo);_.lo.prototype.fetch=_.lo.prototype.fetch;
322
+ _.lo.prototype.removeResponseModifier=_.lo.prototype.Dd;_.lo.prototype.removeRequestModifier=_.lo.prototype.uf;_.lo.prototype.addResponseModifier=_.lo.prototype.Ic;_.lo.prototype.addRequestModifier=_.lo.prototype.Ge;_.lo.prototype.setRateLimit=_.lo.prototype.$g;var Fi;
323
+ _.Ii=class{constructor(a,b){this.id=a;this.type=b;this.roles=[];this.channelsCount=this.src=this.mimeType=this.frameRate=this.label=this.originalLanguage=this.language=this.kind=null;this.spatialAudio=!1;this.renditions=[];this.accessibility=[]}od(a){return this.type===a.type&&this.channelsCount===a.channelsCount&&this.frameRate===a.frameRate&&this.kind===a.kind&&this.label===a.label&&this.language===a.language&&this.mimeType===a.mimeType&&fh(this.roles,a.roles)&&fh(this.accessibility,a.accessibility,Di)}toString(){return`Track type: ${this.type} id: ${this.id}
324
+ renditions size: ${this.renditions.length}`}};_.z("clpp.Track",_.Ii);_.Ii.prototype.toString=_.Ii.prototype.toString;_.Si=class{constructor(a,b){this.track=b;this.id=a;this.originalId=this.drm=this.drmInfo=this.codec=this.Jc=this.bandwidth=this.height=this.width=null}};_.z("clpp.Rendition",_.Si);_.Hi=1;_.M=_.w;_.L=_.p;_.K=_.t;Fi=_.le;_.Cr={VIDEO:_.M,AUDIO:_.L,TEXT:_.K,METADATA:Fi};_.Ii.Type=_.Cr;_.al=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;
325
+ _.Wh(this.path,"/")||(this.path="/"+this.path);this.f=b.search;this.g=b.hash}};_.z("clpp.utils.url.queryString",_.Li);var Dr=class{constructor(a){this.f=a;this.h=new _.R("clpp.native.hls.HlsMetadataParser");this.a=jh(this.g.bind(this),(b,c)=>b[0]===c[0]&&b[1].enableHlsVideoTrackInfo===c[1].enableHlsVideoTrackInfo&&b[1].enableMetadata===c[1].enableMetadata)}g(a,b){const c=this;return _.x(function*(){let d=null;try{d=yield Oi(c,a)}catch(f){return c.h.warn("Failed to fetch playlist in order metadata from HLS playlist.",f.message),Promise.resolve({})}const e={};try{if(b.enableHlsVideoTrackInfo){const f=yield Ui(c,d,
326
+ a);e.renditions=f.renditions;e.mimeType=f.mimeType}}catch(f){c.h.warn("Failed to parse video metadata from HLS playlist.",f.message)}try{const f=yield Wi(d);e.Cc=f}catch(f){c.h.warn("Failed to parse metadata from HLS playlist.",f.message)}return e})}};_.dj=[];_.S=class{Md(){return!0}jg(a){return this.getVideoTracks().find(b=>_.Bg(b,a,a&&Object.keys(a)))}fg(a){return this.getAudioTracks().find(b=>_.Bg(b,a,a&&Object.keys(a)))}hg(a){return this.ka().find(b=>_.Bg(b,a,a&&Object.keys(a)))}ig(a){return this.getVideoTracks().flatMap(b=>b.renditions).find(b=>_.Bg(b,a,a&&Object.keys(a)))}eg(a){return this.getAudioTracks().flatMap(b=>b.renditions).find(b=>_.Bg(b,a,a&&Object.keys(a)))}gg(a){return this.ka().flatMap(b=>b.renditions).find(b=>_.Bg(b,a,a&&Object.keys(a)))}};
327
+ _.z("clpp.TrackManager",_.S);_.S.prototype.isAbrEnabled=_.S.prototype.ma;_.S.prototype.addTextTrack=_.S.prototype.addTextTrack;_.S.prototype.findTextRendition=_.S.prototype.gg;_.S.prototype.findAudioRendition=_.S.prototype.eg;_.S.prototype.findVideoRendition=_.S.prototype.ig;_.S.prototype.findTextTrack=_.S.prototype.hg;_.S.prototype.findAudioTrack=_.S.prototype.fg;_.S.prototype.findVideoTrack=_.S.prototype.jg;_.S.prototype.setTextRendition=_.S.prototype.nb;_.S.prototype.setAudioRendition=_.S.prototype.mb;
328
+ _.S.prototype.setVideoRendition=_.S.prototype.Ya;_.S.prototype.setTextTrack=_.S.prototype.Ea;_.S.prototype.setAudioTrack=_.S.prototype.sa;_.S.prototype.setVideoTrack=_.S.prototype.Za;_.S.prototype.getTextTrack=_.S.prototype.pa;_.S.prototype.getAudioTrack=_.S.prototype.oa;_.S.prototype.getVideoTrack=_.S.prototype.La;_.S.prototype.getLoadingTextRendition=_.S.prototype.hb;_.S.prototype.getLoadingAudioRendition=_.S.prototype.gb;_.S.prototype.getLoadingVideoRendition=_.S.prototype.Ua;
329
+ _.S.prototype.getTextRendition=_.S.prototype.Ja;_.S.prototype.getAudioRendition=_.S.prototype.Ia;_.S.prototype.getVideoRendition=_.S.prototype.ia;_.S.prototype.getTextTracks=_.S.prototype.ka;_.S.prototype.getAudioTracks=_.S.prototype.getAudioTracks;_.S.prototype.getVideoTracks=_.S.prototype.getVideoTracks;_.S.prototype.canSelectVideoTracks=_.S.prototype.Md;_.Er=new Map;_.Fr=(new Map).set(_.kd,_.kd).set("frameRate","framerate").set("bandwidth","bitrate").set(_.fg,_.fg).set(_.Pd,_.Pd).set("channelsCount","channels");_.Gr=class{constructor(a){this.f=a;this.a=null}ca(a){return hj(this,a,!1)}$a(a){return hj(this,a,!0)}stop(){this.a&&(this.a(),this.a=null)}};_.kj=class{constructor(a){this.f=a;this.a=null}Ae(){this.stop();this.f();return this}ca(a){this.stop();this.a=(new _.Gr(()=>{this.f()})).ca(a);return this}$a(a){this.stop();this.a=(new _.Gr(()=>{this.f()})).$a(a);return this}stop(){this.a&&(this.a.stop(),this.a=null)}};_.z("clpp.utils.Timer",_.kj);_.kj.prototype.stop=_.kj.prototype.stop;_.kj.prototype.tickEvery=_.kj.prototype.$a;_.kj.prototype.tickAfter=_.kj.prototype.ca;_.kj.prototype.tickNow=_.kj.prototype.Ae;var Hr=class{};_.z(jd,Hr);Hr.getInfo=_.Mj;
330
+ var jj=null,ij=null,Bj=new _.R(jd),Fj="android",Ej="ios",Kj="linux",Gj="osx",Hj="windows",Ij="tizen",Jj="webos",Dj=Ef,Lj=Ef,wj={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,
331
+ 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,
332
+ 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},
333
+ 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.h=new _.R("clpp.native.TrackManager");this.m=null;this.f=new _.Xq;this.g=[];this.G=0;this.o={};this.I=[];this.a=new Map;this.w=null;this.l=new Map;this.A=!0;this.O=this.B.bind(this,_.K);this.T=this.F.bind(this,_.K);this.R=this.C.bind(this,_.K);this.V=this.B.bind(this,_.M);this.Z=this.F.bind(this,_.M);this.W=this.C.bind(this,_.M);this.J=this.B.bind(this,_.L);this.M=this.F.bind(this,_.L);this.K=this.C.bind(this,_.L);this.j=null}Md(){return!_.yj()}B(a,
334
+ b){const c=this;return _.x(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.g.find(n=>Nj(n,d,a));if(k)c.h.warn("Track from event already exists",d,k);else{var l=Ji(a,d),m=Oj(d);if(f){if(d.kind===_.le)return;let n;void 0!==d.id?n=c.o[d.id]:n=Object.values(c.o).find(q=>Nj(l,q,a));l.kind&&"captions"===l.kind&&(l.mimeType=_.rc);n&&(l.src=n.url,l.mimeType=n.mimeType)}else if(k=c.g.find(n=>n.type===a&&_.Bg(n,l,["kind","label","language"]))){k.id=d.id;m&&(c.h.debug(`Setting native ${a} track active`),
335
+ c.a.set(a,k));c.h.debug("Track from event seems to already exists, flipped native track to",d);return}try{l.renditions.push(new _.Si(l.id,l));c.g.push(l);const n=c.m.getConfiguration().safari;Qj(c,a,n)?yield Rj(c,l,n):Sj(c,a,n)&&(yield Tj(c,l,n));c.h.debug(a+" Track added",l);c.m.trigger(new _.F(_.Ir));const q=Uj(c,a).length,u=!(!h||!h.length),v=h&&h.length||0;f=()=>{c.h.debug(`Setting native ${a} track active. `+`Native track active: ${m}. `+`Number of tracks: ${q}`,d);c.a.set(a,l)};m?f():1===q&&
336
+ g&&(e?f():u&&1!==v||f())}catch(n){c.h.error("Error while converting track data",n)}}}else c.h.warn(jb)}else c.h.warn(hb)})}F(a,b){if(b){var c=b.track;c?a===_.K&&c.kind!==_.le&&(b=this.g.find(d=>Nj(d,c,a)))&&(this.g.splice(this.g.indexOf(b),1),(this.a.get(a)||null)===b&&(this.a.set(a,null),Vj(this)),this.h.debug(a+" Track removed, id: ",b.id)):this.h.warn(jb)}else this.h.warn(hb)}C(a,b){this.h.debug(a+" Track changed",b);a===_.K&&Vj(this);const c=Xj(this,a);if(c)for(let d=0;d<c.length;++d)if(Oj(c[d])){if(b=
337
+ this.g.find(e=>Nj(e,c[d],a)))this.a.set(a,b),this.h.debug("Track change detected, id:",b.id),b===this.l.get(a)&&this.l.set(a,null),a===_.L?this.m.trigger(new _.F(_.ak)):a===_.K&&this.m.trigger(new _.F(_.bk));break}}initialize(a){this.m=a;this.j=new Dr(a.getNetworkEngine())}load(){this.A=!1;var a=Wj(this,_.K);a&&(this.f.on(a,_.mc,this.O),this.f.on(a,df,this.T),this.f.on(a,Vc,this.R));if(a=Wj(this,_.L))this.f.on(a,_.mc,this.J),this.f.on(a,df,this.M),this.f.on(a,Vc,this.K);if(a=Wj(this,_.M))this.f.on(a,
338
+ _.mc,this.V),this.f.on(a,df,this.Z),this.f.on(a,Vc,this.W);this.f.one(this.m,Oc,this.H.bind(this))}release(){this.A=!0;this.g=[];this.o={};this.a.clear();this.l.clear();this.f.release()}destroy(){this.release();this.m=null}getVideoTracks(){return Uj(this,_.M)}getAudioTracks(){return Uj(this,_.L)}ka(){return Uj(this,_.K)}ia(){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]||
339
+ null}Ia(){return Yj(this,_.L)}Ja(){return Yj(this,_.K)}Ua(){return Zj(this,_.M)}gb(){return Zj(this,_.L)}hb(){return Zj(this,_.K)}La(){return this.a.get(_.M)||null}oa(){return this.a.get(_.L)||null}pa(){return this.a.get(_.K)||null}Za(a){ck(this,_.M,a)}sa(a){ck(this,_.L,a)}Ea(a){ck(this,_.K,a)}Ya(a){ck(this,_.M,a&&a.track)}mb(a){ck(this,_.L,a&&a.track)}nb(a){ck(this,_.K,a&&a.track)}addTextTrack(a){const b=this;return _.x(function*(){if(a.mimeType.match(/text\/vtt/)){const c="External_"+`${b.G++}`;
340
+ b.o[c]=a;dk(b,a,c)}else yield ek(b,a)})}ma(){return 1>=this.getVideoTracks().flatMap(a=>a.renditions).length}H(){const a=this;return _.x(function*(){const b=a.m.getConfiguration();gk(a,_.L,b.preferredAudioLanguage);if(!Xj(a,_.K).some(c=>Oj(c))){const c=Wj(a,_.K);yield new Promise(d=>{a.f.one(c,Vc,d);(new _.kj(d)).ca(1)})}a.A||gk(a,_.K,b.preferredTextLanguage)})}};T.prototype.isAbrEnabled=T.prototype.ma;T.prototype.addTextTrack=T.prototype.addTextTrack;T.prototype.setTextRendition=T.prototype.nb;
341
+ T.prototype.setAudioRendition=T.prototype.mb;T.prototype.setVideoRendition=T.prototype.Ya;T.prototype.setTextTrack=T.prototype.Ea;T.prototype.setAudioTrack=T.prototype.sa;T.prototype.setVideoTrack=T.prototype.Za;T.prototype.getTextTrack=T.prototype.pa;T.prototype.getAudioTrack=T.prototype.oa;T.prototype.getVideoTrack=T.prototype.La;T.prototype.getLoadingTextRendition=T.prototype.hb;T.prototype.getLoadingAudioRendition=T.prototype.gb;T.prototype.getLoadingVideoRendition=T.prototype.Ua;
342
+ T.prototype.getTextRendition=T.prototype.Ja;T.prototype.getAudioRendition=T.prototype.Ia;T.prototype.getVideoRendition=T.prototype.ia;T.prototype.getTextTracks=T.prototype.ka;T.prototype.getAudioTracks=T.prototype.getAudioTracks;T.prototype.getVideoTracks=T.prototype.getVideoTracks;T.prototype.canSelectVideoTracks=T.prototype.Md;_.Jr=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(Fb);}end(a){if(this.f)return this.f.end(a);if(a<this.a.length)return this.a[a].end;throw Error(Fb);}qb(){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)}Aa(){return!this.length||1===this.length&&1E-6>this.end(0)-this.start(0)?null:this.end(this.length-
343
+ 1)}fc(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}Ga(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.Aa(),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=
344
+ "";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",_.Jr);_.Jr.prototype.bufferedAheadOf=_.Jr.prototype.Ga;_.Jr.prototype.isBuffered=_.Jr.prototype.fc;_.Jr.prototype.bufferEnd=_.Jr.prototype.Aa;_.Jr.prototype.bufferStart=_.Jr.prototype.qb;_.Jr.prototype.end=_.Jr.prototype.end;_.Jr.prototype.start=_.Jr.prototype.start;_.Kr=class{constructor(){this.Oc=new Vq(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)}addDelegate(a){a&&(0<=this.Mc.indexOf(a)||this.Mc.push(a))}dispatchEvent(a){this.trigger(a);return a.defaultPrevented}removeDelegate(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)}};
345
+ _.Kr.prototype.off=_.Kr.prototype.off;_.Kr.prototype.one=_.Kr.prototype.one;_.Kr.prototype.on=_.Kr.prototype.on;_.Kr.prototype.removeEventListener=_.Kr.prototype.removeEventListener;_.Kr.prototype.addEventListener=_.Kr.prototype.addEventListener;_.z("clpp.events.ERROR",_.Md);_.z("clpp.events.LOADEDMETADATA",_.fe);_.z("clpp.events.BUFFERING_ENDED",_.Lc);_.z("clpp.events.BUFFERING_STARTED",_.Mc);_.z("clpp.events.STATE_CHANGED",_.qf);_.ak="audiotrackchanged";_.z("clpp.events.AUDIO_TRACK_CHANGED",_.ak);_.bk="texttrackchanged";_.z("clpp.events.TEXT_TRACK_CHANGED",_.bk);_.z("clpp.events.VIDEO_TRACK_CHANGED",_.Rf);_.z("clpp.events.BITRATE_CHANGED",_.Jc);_.Ir="tracksadded";_.z("clpp.events.TRACKS_ADDED",_.Ir);_.z("clpp.events.LOAD_START",ge);
346
+ _.z("clpp.events.RELEASING",_.cf);_.z("clpp.events.RELEASED",bf);_.z("clpp.events.DESTROYING","destroying");_.z("clpp.events.DESTROYED","destroyed");_.z("clpp.events.VIDEO_BUFFER_CHANGED",_.Qf);_.z("clpp.events.AUDIO_BUFFER_CHANGED",_.Hc);_.z("clpp.events.DOWNLOAD_TRACE","downloadtrace");_.z("clpp.events.DRM_SESSION_UPDATE",_.Gd);_.z("clpp.events.DRM_SESSION_PERSISTED",_.Fd);_.z("clpp.events.DRM_RENEWAL_STARTED",Ed);_.z("clpp.events.DRM_EXPIRATION_UPDATE",_.Dd);
347
+ _.z("clpp.events.AUTOPLAY_NOT_ALLOWED",_.Ic);_.z("clpp.events.PLAY",_.He);_.z("clpp.events.SEEKING",_.jf);_.z("clpp.events.SEEKED",_.hf);_.z("clpp.events.USER_SEEKING",_.Jf);_.z("clpp.events.USER_SEEKED",_.If);_.gn={SEEKING:1,NO_DATA:2};_.z("clpp.events.BufferingReasons",_.gn);_.z("clpp.events.ADS_TIMELINE_CHANGED",_.nc);_.z("clpp.events.AD_LOADED",_.dc);_.z("clpp.events.AD_BREAK_STARTED",_.Wb);_.z("clpp.events.AD_STARTED",_.jc);_.z("clpp.events.AD_BUFFERING",_.Zb);_.z("clpp.events.AD_PROGRESS",_.gc);
348
+ _.z("clpp.events.AD_FIRST_QUARTILE",_.bc);_.z("clpp.events.AD_MIDPOINT",_.ec);_.z("clpp.events.AD_THIRD_QUARTILE",_.lc);_.z("clpp.events.AD_PAUSED",_.fc);_.z("clpp.events.AD_RESUMED",_.hc);_.z("clpp.events.AD_SKIPPED",_.ic);_.z("clpp.events.AD_CLICKED",_.$b);_.z("clpp.events.AD_IMPRESSION",_.cc);_.z("clpp.events.AD_COMPLETED",_.ac);_.z("clpp.events.AD_STOPPED",_.kc);_.z("clpp.events.AD_BREAK_STOPPED",_.Xb);_.z("clpp.events.SIMID_CREATIVE_STARTED",_.lf);_.z("clpp.events.SIMID_CREATIVE_STOPPED",_.mf);
349
+ _.z("clpp.events.CASTING_STARTED",_.Pc);_.z("clpp.events.CASTING_ENDED","castingended");_.z("clpp.events.CAST_STATUS_CHANGED",_.Qc);_.z("clpp.events.AIRPLAY_STATUS_CHANGED",_.qc);_.z("clpp.events.AIRPLAY_CASTING_STARTED",_.pc);_.z("clpp.events.AIRPLAY_CASTING_ENDED",_.oc);_.Xg="timeline-cue-added";_.z("clpp.events.TIMELINE_CUE_ADDED",_.Xg);_.Zg="timeline-cue-enter";_.z("clpp.events.TIMELINE_CUE_ENTER",_.Zg);_.$g="timeline-cue-exit";_.z("clpp.events.TIMELINE_CUE_EXIT",_.$g);
350
+ _.z("clpp.events.MPD_TYPE_CHANGED",_.qe);_.z("clpp.events.VIMOND_RESPONSE",_.Sf);_.z("clpp.events.PLAYLIST_ITEM_CHANGED",_.Pe);_.z("clpp.events.PLAYLIST_MODIFIED",_.Qe);_.z("clpp.events.CDN_SWITCH_SUCCESS",_.Rc);_.z("clpp.events.ONLINE_STATUS_CHANGED",ze);var hk=["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"];var Lr=class{};_.z("clpp.utils.PlayerConfiguration",Lr);Lr.create=_.nk;var Mr=["abort",Nc,Oc,Id,"emptied",Jd,_.Ld,_.Md,"interruptbegin","interruptend",_.ee,_.fe,ge,"mozaudioavailable",_.De,_.He,_.Oe,_.Ze,_.af,_.hf,_.jf,of,"suspend",_.Af,"volumechange",_.Zf,_.$f,_.ff,eg,dg,bg,cg];_.Nr=class extends _.Kr{constructor(a){super();this.log=new _.R(a);this.configuration=this.vc=_.lk();this.w=this.C=null;this.yd=this.be=!1;this.Jf=new _.R("clpp.video.events");this.Wb=null;this.wc=-1;this.Rf=this.Pf.bind(this);this.ae=new _.lo;this.M=new _.Xq;this.ab=this.tc=this.K=null}init(a,b){this.configuration=this.vc=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 Mr)this.M.on(a,c,this.Rf,c!==_.Md);
351
+ this.Wb||(this.Wb=this.xf());this.Wb.initialize(this);this.C.showMediaElement()}release(){this.K&&(this.K.destroy(),this.K=null);return Promise.resolve()}destroy(){this.M.release();return this.ae.release()}canPlay(a,b){return _.Og[this.namespace()].canPlay(a,b)}play(){if(!this.w)return Promise.reject("No sources specified yet. You need to load content before calling play.");const a=this.C.getMedia().play();return Promise.resolve(a).catch(b=>{this.log.info("Caught play promise exception",b);const c=
352
+ {name:b.name||"",message:b.message||"",stack:b.stack||""};ik(c)?(this.trigger(new _.F(_.Ic)),this.log.warn(_.ja)):c.name===lb&&this.log.warn('Unrecognized "NotAllowedError" on play(). '+`${b.name}: ${b.message}`);throw b;})}pause(){return this.w?new Promise((a,b)=>{const c=this.getState();if(c!==_.en&&c!==_.bn&&c!==_.nn&&c!==_.mn)b();else if(this.C.getMedia().pause(),this.getState()===_.nn)this.M.one(this,_.qf,()=>{a()});else a()}):Promise.reject("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.tc=
353
+ a}setCdnErrorCallback(a){this.ab=a}yc(){return this.tc}getSurface(){return this.C}getBufferInfo(a){const b=this.getSurface().getMedia();return new _.Jr(b?b.buffered:void 0,a)}getPosition(){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.getPosition();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!"),
354
+ Promise.reject();const d=a-b;return.1>=Math.abs(d)?(this.log.info("Skip seek. Delta "+Math.abs(d)+" \x3c 0.1"),Promise.resolve()):new Promise((e,f)=>{const g=()=>{this.trigger(new _.F(_.Jf));this.M.on(c,_.hf,h);this.M.on(c,_.Af,h);this.M.on(c,_.Ze,h);this.log.info("Seeking to "+a+". Delta "+d);this.yd=this.be=!0;c.currentTime=a},h=l=>{const m=this.getPosition(),n=.1>=Math.abs(a-m);var q=.25<m-a;const u=c.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA,v=l.type===_.hf,y=l.type===_.Ze,A=l.type===_.Af,
355
+ D=y&&u;q=v||n&&D||A&&q;this.log.debug("Checking seeking state after "+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.yd=this.be=!1,this.M.off(c,_.hf,h),this.M.off(c,_.Af,h),this.M.off(c,_.Ze,h),this.If(),this.trigger(new _.F(_.If)),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();
356
+ else this.M.one(c,_.fe,g)};this.getState()===_.kn?(this.log.debug("Player is in IDLE state. Postpone seek."),this.M.one(this,_.qf,()=>{switch(this.getState()){case _.en:case _.nn:case _.mn: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();
357
+ b?_.Ag(a)?0>a||1<a?this.log.warn(`Can not set volume to ${a}.
358
+ 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===_.Kc&&(b.muted=a)}getDuration(){return this.w?this.C.getMedia().duration:-1}getTrackManager(){return this.Wb}getPlaybackRate(){const a=this.C.getMedia();return a&&a.playbackRate||1}setPlaybackRate(a){const b=this.C.getMedia();
359
+ void 0!==a&&b&&(b.playbackRate=a)}setSourceIndex(a){this.wc=a}getSourceIndex(){return this.wc}getLoadedSource(){return this.w&&-1!==this.wc?this.w[this.wc]:null}getPeriods(){return[]}getNetworkEngine(){return this.ae}setNetworkEngine(a){this.ae=a}getTextDisplayer(){return this.K}getTimelineCues(){return[]}resetAbr(){}Pf(a){var b=this.getSurface().getMedia();const c=this.getPosition();let d="Received Video Element Event: '"+a.type+"' with playhead at: "+c;if(a.type===_.Af||a.type===_.Ze)this.Jf.debug(d);
360
+ else{let e="";switch(a.type){case _.af:e=`Rate: ${this.getPlaybackRate()}`;break;case Id:e=`Duration: ${this.getDuration()}`;break;case "volumechange":e=`Volume: ${this.getVolume()} Muted: ${this.isMuted()}`;break;case _.He:case _.Oe:case "suspend":case _.Zf:case of:case _.jf:case _.hf:case _.Af:case _.Ze:case Nc:case Oc:b=this.getBufferInfo().Ga(c);e=`State ${this.getSurface().getMedia().readyState} `+`Buffer: ${b}`;break;case _.ff:null!=b&&(e=`Size: ${b.videoWidth}x${b.videoHeight}`)}e&&(d+=". "+
361
+ e);this.Jf.info(d)}a.type!==_.Md&&this.trigger(new _.F(a.type,{detail:a}))}If(){}};_.Nr.prototype.getTextDisplayer=_.Nr.prototype.getTextDisplayer;_.Nr.prototype.setNetworkEngine=_.Nr.prototype.setNetworkEngine;_.Nr.prototype.getNetworkEngine=_.Nr.prototype.getNetworkEngine;var rk;rk=new _.R("clpp.Components");_.pk=new Map;_.z("clpp.install",function(a){zk(a)});_.z("clpp.uninstall",function(a){Ak(a)});var Or=class{constructor(){this.a=this.f=null;this.h=new _.R("clpp.drm.csl")}release(){this.a=this.f=null}};_.z("clpp.drm.WidevineRobustnessLevel",{SW_SECURE_CRYPTO:_.yb,SW_SECURE_DECODE:_.zb,HW_SECURE_CRYPTO:Ua,HW_SECURE_DECODE:Wa,HW_SECURE_ALL:Ta});_.z("clpp.drm.PlayreadyRobustnessLevel",{SL150:"150",SL2000:"2000",SL3000:"3000"});_.z("clpp.drm.KeySystem",{NONE:_.se,CLEAR_KEY:_.Be,WIDEVINE:_.sd,PLAYREADY:_.pd,FAIRPLAY:_.nd,PRIMETIME:_.md});_.Ek={};_.z("clpp.drm.registerDrmEnvironment",_.Fk);var Ik={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,
362
+ 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,
363
+ 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,
364
+ 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,
365
+ 48,60,247,12,110,151,132,201,61,45,232,69,173,130,98,190,126,13,78,46,74,7,89,206,248,45,16,157,37,146,199,36,41,248,192,23,66,186,226,179,222,202,219,195,60,62,95,75,175,94,22,236,183,78,173,186,252,183,198,112,95,122,158,59,111,57,64,56,63,156,81,22,210,2,162,12,146,41,238,150,156,37,25,113,131,3,181,13,1,48,195,53,46,6,176,20,216,56,84,15,138,12,34,124,0,17,224,245,179,142,78,41,142,210,203,48,30,180,86,73,101,245,92,93,121,117,122,37,10,78,185,200,74,179,230,83,159,107,111,223,86,137,158,162,
366
+ 153,20],V1_PROD:[10,193,2,8,3,18,16,23,5,185,23,204,18,4,134,139,6,51,58,47,119,42,140,24,130,180,130,146,5,34,142,2,48,130,1,10,2,130,1,1,0,153,237,91,59,50,125,171,94,36,239,195,182,42,149,181,152,82,10,213,188,203,55,80,62,6,69,184,20,216,118,184,223,64,81,4,65,173,140,227,173,177,27,184,140,78,114,90,94,74,158,7,149,41,29,88,88,64,35,167,225,175,14,56,169,18,121,57,48,8,97,11,111,21,140,135,140,126,33,191,251,254,234,119,225,1,158,30,87,129,232,164,95,70,38,61,20,230,14,128,88,168,96,122,220,
367
+ 224,79,172,132,87,177,55,168,214,124,205,235,51,112,93,152,58,33,251,78,236,189,74,16,202,71,73,12,164,126,170,93,67,130,24,221,186,241,202,222,51,146,241,61,111,251,100,66,253,49,225,191,64,176,198,4,209,196,186,76,149,32,164,191,151,238,189,96,146,154,252,238,245,91,186,245,100,226,208,231,108,215,197,92,115,160,130,185,150,18,11,131,89,237,206,36,112,112,130,104,13,111,103,198,216,44,74,197,243,19,68,144,167,78,236,55,175,75,47,1,12,89,232,40,67,226,88,47,11,107,159,93,176,252,94,110,223,100,251,
368
+ 211,8,180,113,27,207,18,80,1,156,159,90,9,2,3,1,0,1,58,20,108,105,99,101,110,115,101,46,119,105,100,101,118,105,110,101,46,99,111,109,18,128,3,174,52,115,20,181,168,53,41,127,39,19,136,251,123,184,203,82,119,210,73,130,60,221,209,218,48,185,51,57,81,30,179,204,189,234,4,185,68,185,39,193,33,52,110,253,189,234,201,212,19,145,126,110,193,118,161,4,56,70,10,80,59,193,149,43,155,164,228,206,15,196,191,194,10,152,8,170,175,75,252,209,156,29,207,205,245,116,204,172,40,209,180,16,65,108,249,222,136,4,48,
369
+ 28,189,179,52,202,252,208,212,9,120,66,58,100,46,84,97,61,240,175,207,150,202,74,146,73,216,85,228,43,58,112,62,241,118,127,106,155,211,109,107,248,43,231,107,191,12,186,79,222,89,210,171,204,118,254,182,66,71,184,92,67,31,188,165,34,102,182,25,252,54,151,149,67,252,169,203,189,187,250,250,14,26,85,231,85,163,199,188,230,85,249,100,111,88,42,185,207,112,170,8,185,121,248,103,246,58,11,43,127,219,54,44,91,196,236,213,85,216,91,202,169,197,147,195,131,200,87,212,157,170,183,126,64,183,133,29,223,210,
370
+ 73,152,128,142,53,178,88,231,93,120,234,192,202,22,247,4,115,4,194,13,147,237,228,232,255,28,111,23,230,36,62,63,61,168,252,23,9,135,14,196,95,186,130,58,38,63,12,239,161,247,9,59,25,9,146,131,38,51,55,5,4,58,41,189,166,249,180,52,44,200,223,84,60,177,161,24,47,124,95,255,51,241,4,144,250,202,91,37,54,11,118,1,94,156,90,6,171,142,224,47,0,210,232,213,152,97,4,170,204,77,212,117,253,150,238,156,228,227,38,242,27,131,199,5,133,119,179,135,50,205,218,188,106,107,237,19,251,13,73,211,138,69,235,135,165,
371
+ 244],V2:[10,187,2,8,3,18,16,160,220,209,96,48,44,4,19,213,32,118,162,12,129,36,76,24,191,132,241,238,5,34,142,2,48,130,1,10,2,130,1,1,0,188,93,207,198,77,28,25,14,217,103,5,56,106,241,93,252,216,61,104,36,3,52,23,246,32,9,11,77,12,188,251,189,53,137,249,11,36,52,104,185,13,221,170,204,238,44,227,192,167,199,144,75,188,190,7,211,16,145,75,13,132,119,167,164,29,39,107,69,76,50,161,131,132,248,207,237,214,130,27,113,204,37,77,14,232,248,26,85,213,126,147,7,183,241,23,44,117,142,192,109,70,192,86,166,
372
+ 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,
373
+ 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,
374
+ 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,
375
+ 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]};_.Pr=class{constructor(a){this.I=a;this.f={}}Ma(a,b){this.f[a]=b}};_.z("clpp.drm.DrmEnvironment",_.Pr);_.Pr.prototype.setDrmSystem=_.Pr.prototype.Ma;_.fl=class{constructor(a,b){b=void 0===b?!1:b;this.f=_.Ag(a)?new DataView(new ArrayBuffer(a),0,a):a;this.a=0;this.g=b;this.buffer=this.f.buffer}getPosition(){return this.a}Ba(){return this.f.byteLength}seek(a){(0>a||a>=this.f.byteLength)&&_.Kk();this.a=a}};_.Ql=class{constructor(a,b){this.f=a;this.g=void 0===b?!0:b;this.a=0}getPosition(){return this.a}Ba(){return this.f.byteLength}skip(a){this.a+a>this.f.byteLength&&_.Nk();this.a+=a}seek(a){if(0>a||a>=this.f.byteLength)throw _.Nk();this.a=a}};
376
+ _.z("clpp.utils.dataview.DataViewReader",_.Ql);_.dl=class{constructor(){this.g=[];this.f=[];this.a=!1;this.h=new _.R("clpp.mp4")}L(a,b){a=Uk(a);this.g[a]=Qr;this.f[a]=b;return this}$(a,b){a=Uk(a);this.g[a]=Rr;this.f[a]=b;return this}stop(){this.a=!0}parse(a,b){a=_.J(a);a=new _.Ql(new DataView(a.buffer,a.byteOffset,a.byteLength),!1);for(this.a=!1;_.Mk(a)&&!this.a;)this.Cd(0,a,b)}Cd(a,b,c){const d=b.getPosition();let e=_.P(b);var f=_.P(b);let g=!1;this.h.debug("Parsing MP4 box",_.Vk(f));switch(e){case 0:e=b.Ba()-d;break;case 1:e=_.Rk(b),g=!0}const h=
377
+ this.f[f];if(h){let m=null;var k=null;this.g[f]==Rr&&(k=_.P(b),m=k>>>24,k&=16777215);f=b.getPosition()-d;var l=d+e;c&&l>b.Ba()&&(l=b.Ba());l-=b.getPosition();b=0<l?_.Tk(b,l):new Uint8Array(0);b=new _.Ql(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.Ba()-b.getPosition()),b.skip(a)}};_.z("clpp.utils.Mp4Parser",_.dl);_.dl.typeToString=_.Vk;
378
+ _.dl.allData=_.Yk;_.dl.sampleDescription=_.Xk;_.dl.children=_.Wk;_.dl.prototype.parseNext=_.dl.prototype.Cd;_.dl.prototype.parse=_.dl.prototype.parse;_.dl.prototype.stop=_.dl.prototype.stop;_.dl.prototype.fullBox=_.dl.prototype.$;_.dl.prototype.box=_.dl.prototype.L;_.dl.headerSize=_.Zk;var Qr=0,Rr=1;var Sr=class{};_.z("clpp.utils.FairplayUtils",Sr);Sr.parseFairPlayResponse=_.il;Sr.formatFairPlayRequest=_.hl;Sr.createFairplayPayload=gl;Sr.extractContentId=_.bl;Sr.extractExtXKeyUri=$k;var ol=new _.R("clpp.drm.DrmToday"),Bl="PRODUCTION",Cl="STAGING",Dl="TEST",Tr={PRODUCTION:Bl,STAGING:Cl,TEST:Dl};_.z("clpp.drm.DrmToday.Environment",Tr);_.z("clpp.drm.DrmToday.WidevineCertificates",{V1_PROD:"V1_PROD",V1_STAGING:"V1_STAGING",V2:"V2"});
379
+ var kl="/license-proxy-widevine/cenc/",ll="/license-proxy-headerauth/drmtoday/RightsManager.asmx",ml="/license-server-fairplay/",El={"00000":"Success","01000":"General Internal Error","02000":"General Request Error","03000":"General Request Authentication Error",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",42E3:"General Playready error",
380
+ 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"},Ur=[Ta,Wa,Ua,_.zb,_.yb],Vr=[_.zb,_.yb],Wr=["3000","2000","150"],
381
+ Xr=["2000","150"];
382
+ for(const a of Object.keys(Tr)){let b=ua;a!==Bl&&(b+=`_${a}`);const c=new _.Pr(b);let d=null;switch(a){case Bl:d=Jk("V1_PROD");break;case Cl:d=Jk("V2");break;case Dl:d=null}c.Ma(_.sd,{licenseUrl:nl(_.sd,a),videoRobustness:Ur,audioRobustness:Vr,persistentStateRequired:!1,distinctiveIdentifierRequired:!1,serverCertificate:d,modifiers:{licenseRequest:_.ql,licenseResponse:_.rl}});c.Ma(_.nd,{licenseUrl:nl(_.nd,a),certificateUrl:jl(a)+"/license-server-fairplay/cert/",modifiers:{licenseRequest:_.tl,licenseResponse:_.ul,
383
+ extractContentId:_.yl,certificateRequest:_.zl}});c.Ma(_.pd,{licenseUrl:nl(_.pd,a),videoRobustness:Wr,audioRobustness:Xr,modifiers:{licenseRequest:Al}});_.Fk(c)};var Yr=class{};_.z("clpp.drm.eme.EmeFactory",Yr);var Gl=[];Yr.Apis={STANDARD:xb,APPLE:"APPLE",WEBKIT:"WEBKIT",NOP:"NOP"};var Ol,Zr,Nl;_.Wl=[154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149];Ol=[237,239,139,169,121,214,74,206,163,200,39,220,213,29,33,237];Zr=class{constructor(a,b,c){this.j=new Uint8Array(a);this.a=b;this.f=c}};Nl=class extends Zr{};_.Vl=class extends Zr{constructor(a,b,c,d,e,f){f=void 0===f?null:f;super(a,b,d);this.version=e;this.g=c;this.l=f}};var um=class{constructor(a){this.f=[];this.g=[];this.a=[];8<=a.byteLength&&(new _.dl).$("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=_.gi(_.Tk(a.reader,16)),c=[];if(0<a.version){var d=_.P(a.reader);for(let e=0;e<d;++e){const f=_.gi(_.Tk(a.reader,16));c.push(f)}}d=_.P(a.reader);a.reader.skip(d);this.g.push.apply(this.g,c);this.f.push(b);this.a.push({start:a.start,end:a.start+a.size-1});a.reader.getPosition()!=
384
+ a.reader.Ba()&&_.C("Mismatch between box size and data size!")}}};var qm,$r;
385
+ _.wn=class{constructor(a){this.D=a;this.J=new Set;this.A=this.G=this.l=null;this.R=!1;this.a=null;this.H=$r;this.w=new _.Xq;this.K=new Or;this.f=new Map;this.I=[];this.F=new _.sm;this.g=null;this.U=b=>{this.o=!0;this.B=!1;this.F.reject(b);a.onError(b)};this.j=new Map;this.W=new Map;this.T=new _.kj(()=>jm(this));this.qa=!1;this.aa=new _.sm;this.C=!1;this.V=[];this.ba=!1;this.O=0;this.h=new _.R("clpp.drm.DrmEngine");this.Z=(new _.kj(()=>{km(this)})).$a(1);this.F.catch(()=>{});this.o=this.B=!1;this.M=
386
+ null}destroy(){const a=this;return _.x(function*(){a.qa?yield a.aa:(a.qa=!0,yield lm(a),a.aa.resolve())})}keySystem(){return this.a?_.am(this.a.keySystem):""}getDrmInfo(){return this.a}ja(a){const b=this;return _.x(function*(){if(!b.C||b.H!==qm){var c=Math.floor(a.timeStamp),d=`drm.msg.${c}.start`,e=`drm.msg.${c}.end`;_.Yl(d);!b.g.delayLicenseRequestUntilPlayed||b.A&&!b.A.paused||b.ba?yield zm(b,a):b.V.push(a);_.Yl(e);performance.measure(`drm.sess.msg.${c}`,d,e)}})}fa(a){const b=a.target;this.h.info("Key status changed for session",
387
+ b.sessionId);const c=this.f.get(b);let d=!1;b.keyStatuses.forEach((e,f)=>{if(typeof f==_.tf){var g=f;f=e;e=g}if($l(this.a.keySystem)&&16===f.byteLength&&_.mj()){g=_.Mh(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!==rf&&(c.loaded=!0);c&&c.Ca&&c.Ca.resolve();"expired"===e&&(d=!0);f=_.J(f);let h=_.gi(f);"00"===h&&c&&c.keyId?h=c.keyId:this.a.keySystem.startsWith(_.nd)&&16!==f.byteLength&&(h=Oh(f));(f=h||"")?this.h.info(`Key status for Key ID '${h}': ${e}`):
388
+ this.h.info(`Key status global keys: ${e}`);this.j.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.Sa.forEach(e=>{this.j.get(e)===rf&&(this.h.warn(`Key status for Key ID '${e}': 'output-restricted'`),this.j.set(e,_.Ce))});for(a=0;a<this.a.initData.length;a++){const e=this.a.initData[a];e.keyId&&this.j.get(e.keyId)===rf&&_.hi(e.initData,c.initData)&&(this.h.warn(`Key status for Key ID '${e.keyId}': 'output-restricted'`),this.j.set(e.keyId,
389
+ _.Ce))}a=b.expiration-Date.now();(0>a||d&&1E3>a)&&c&&!c.ob&&(this.h.debug("Session has expired",b.sessionId),(a=this.f.get(b))&&a.rc&&a.rc.stop(),this.f.delete(b),b.close().catch(()=>{}));Im(this)&&(this.F.resolve(),1!==this.f.size||d?this.T.ca(.5):jm(this))}};qm=0;$r=3;_.Pm=new Map;_.Qm=new _.R("clpp.text");var as=class{constructor(){this.a=null;this.f=[]}};var bs=class{constructor(){this.g=this.f=this.j=null;this.a=[]}};_.cs=class{constructor(){this.f=this.o=this.A=this.C=this.j=this.l=this.g=this.w=NaN;this.a=new as;this.B=new bs}getStats(){return{width:this.w,height:this.g,streamBandwidth:this.o,decodedFrames:this.j,droppedFrames:this.l,corruptedFrames:this.C,estimatedBandwidth:this.f,loadLatency:this.A,playTime:Um(this.a,_.nn),pauseTime:Um(this.a,_.mn),bufferingTime:Um(this.a,_.en),stateHistory:Vm(this.a),switchHistory:Wm(this.B)}}};_.ds=class{constructor(a){this.f=a;this.a=void 0}value(){void 0==this.a&&(this.a=this.f());return this.a}};var Ym=new _.ds(()=>new Map([[HTMLMediaElement.HAVE_METADATA,_.fe],[HTMLMediaElement.HAVE_CURRENT_DATA,_.ee],[HTMLMediaElement.HAVE_FUTURE_DATA,Nc],[HTMLMediaElement.HAVE_ENOUGH_DATA,Oc]]));var fs=class{constructor(a){this.h=new _.R("clpp.StateManager");this.m=a;this.a=new _.Xq;this.f=_.kn;this.A=_.es;this.H=0;this.w=-1;this.K=this.o=this.I=this.B=0;this.j=this.l=this.F=!1;this.G=0;this.g=null;this.J=0;this.M=_.yj();this.C=!1;this.I=Date.now();cn(this)}Vb(a,b){this.m&&this.m.trigger(new _.F(a,{detail:b}))}getState(){return fn(this,"")}U(a){(a=a&&a.detail)&&a.severity&&a.severity===_.G&&an(this,_.jn)}destroy(){this.h.debug("Stop watching for video events for "+this.m.namespace());this.a.release()}};_.z("clpp.version",_.da);_.z("clpp.name",_.pa);_.fk="application/x-mpegurl";_.z("clpp.Type",{DASH:_.sc,HLS:_.fk,SMOOTH_STREAMING:_.Bc,MP4:_.Of});_.Wg="scte35";_.Ug=Ef;_.z("clpp.TimelineCueType",{SCTE35:_.Wg,DASH_CALLBACK:_.re,HLS_DATERANGE:"hls-daterange",UNKNOWN:_.Ug});_.z("clpp.utils.media.detectType",on);var rn=new _.R("clpp.sources");var gs=class extends _.Nr{constructor(){super(hd);this.A=this.H=!1;this.l=this.B=this.o=this.a=this.j=null;this.g=new _.Xq;this.G=this.F=this.f=this.I=null}init(a,b){super.init(a,b);this.j=new fs(this);an(this.j,_.kn)}namespace(){return hd}unload(){const a=this;return _.x(function*(){if(a.w){a.log.debug(_.vb,a.w);a.F&&(a.F.stop(),a.F=null);const b=a.getTrackManager();b&&b.release();a.B&&(a.B.destroy(),a.B=null);a.K&&(a.K.destroy(),a.K=null);a.l&&a.l.release();a.o&&(a.o.destroy(),a.o=null);_.Sg(a.g);
390
+ a.f&&(a.f=new _.cs);a.G=null;a.w=null;a.H=!1;a.a&&(a.a.removeAttribute("src"),a.a.load());yield tn(a)}})}release(){return super.release().then(()=>this.unload()).then(()=>{this.j&&an(this.j,_.kn)})}destroy(){if(this.A)return this.log.warn("Player is already destroyed!"),Promise.resolve();this.A=!0;return super.destroy().then(()=>this.release()).then(()=>{this.log.debug(wa);const a=this.getTrackManager();a&&a.destroy();this.l&&(this.l.destroy().catch(b=>{this.log.warn("Error while disposing metadata handler",
391
+ b)}),this.l=null);this.j&&(this.j.destroy(),this.j=null);this.f=null})}getDrmInfo(){return this.o?this.o.getDrmInfo():null}detach(){}getTrackManager(){return this.Wb}load(a){const b=this;return _.x(function*(){if(b.A)return sn();if(!b.getSurface()||!b.getSurface().getMedia())return Promise.reject("No surface or no media element in surface");const c=b.C.getMedia();b.I=Date.now()/1E3;b.f=new _.cs;b.g.on(b,_.qf,()=>{b.f&&_.Tm(b.f.a,b.getState())});an(b.j,_.ln);b.w=_.qn(a);_.ok(a)&&(b.configuration=_.nk(b.vc,
392
+ a));b.log.debug(_.ab,b.configuration);b.log.debug(_.pb,b.w);const d=_.Sm(b.configuration,[_.Rd,"native"]);b.K=d.create(b);b.K.setTextVisibility(!0);b.configuration.enableHtmlCue&&_.qk(_.wf)&&!_.Aj()&&(b.B=new kr(b),b.B.start(c));b.l?b.l.release():b.l=new Yq(b);bh(b.l,c);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.g.one(c,Nc,()=>{b.trigger(new _.F(_.Ir))});null==
393
+ b.configuration.startTime&&Bn(b,c);try{yield vn(b,c),yield xn(b),yield An(b).P}catch(e){b.H=!1,b.onError(e)}})}onError(a){this.H||(a.severity===_.G&&null!==this.j&&an(this.j,_.jn),this.trigger(new _.F(_.Md,{detail:a})))}xf(){return new T}getState(){return null!==this.j?this.j.getState().currentState:_.es}getPresentationStartTime(){if(this.a&&this.a.getStartDate&&this.isLive()){const a=this.a.getStartDate();return isNaN(a.getTime())?(this.log.warn("EXT-X-PROGRAM-DATETIME required to get presentation start time as Date!"),
394
+ null):a.getTime()/1E3}return null}getSeekRange(){var a=this.getSurface().getMedia();if(a&&a.src){a=a.seekable;if(a.length)return this.G=a={start:a.start(0),end:a.end(a.length-1)};if(this.G)return this.G}return{start:0,end:0}}isLive(){return this.a&&this.a.src?Infinity===this.a.duration:!1}getStats(){if(!this.f||!this.a)return _.Xm();this.f&&_.Tm(this.f.a,this.getState());var a=this.a,b=this.f,c=a.videoHeight;b.w=a.videoWidth;b.g=c;a.getVideoPlaybackQuality&&(c=a.getVideoPlaybackQuality(),a=this.f,
395
+ b=Number(c.totalVideoFrames),a.l=Number(c.droppedVideoFrames),a.j=b,this.f.C=Number(c.corruptedVideoFrames));if(a=this.getTrackManager())if(a=a.ia())a.bandwidth&&(this.f.o=a.bandwidth),a.Jc&&(this.f.f=a.Jc);return this.f.getStats()}getTimelineCues(){return this.l?this.l.getTimelineCues():[]}};
396
+ _.Qg(new class{a(){return hd}canPlay(a,b){a=a.type||"";const c=a===_.sc,d=a===_.Bc,e=a===_.fk;var f;_.xj()||c||d||e&&!_.yj()?f=0:f=""!==lj().canPlayType(a)?e&&_.yj()&&(window.ManagedMediaSource||window.MediaSource&&MediaSource.isTypeSupported)&&!b.streaming.preferNativeHlsOnSafari?1:2:0;return f}create(){return new gs}});_.z("clpp.ads.PodType",{PREROLL:0,MIDROLL:1,POSTROLL:2});_.z("clpp.ads.Technology",{CLIENT_SIDE:0,SERVER_SIDE:1});_.z("clpp.ads.ErrorType",{LOAD:0,PLAY:1,OTHER:2});var Dn=new _.R("clpp.ads"),Cn=[];_.z("clpp.utils.dom.createHTMLElement",_.Kn);var hs=class{constructor(a){this.a=null;this.g=new Set;this.f=null;this.set(a||null)}set(a){this.g.clear();this.f&&(this.f.disconnect(),this.f=null);if(this.a=a)this.f=Ln(this,a)}get(){return this.a}};var ks=class{constructor(a,b){this.h=new _.R("clpp.PlayerSurface");this.w=_.sg(is,b);this.f=new hs;this.g=null;this.a=new hs;this.l=js;js+=1;this.o=`clpp-video-${this.l}`;this.j=new _.Xq;if(null==a)throw new _.H(_.G,7,7102,"No Media element was provided");if(!(a instanceof Element||(a=document.getElementById(a),a)))throw new _.H(_.G,7,7004,"Media element not found");b=this.w;this.h.debug("Initializing Player Surface on ",a);if("cast-media-player"===a.tagName.toLowerCase())this.g=a;else{if(!(a instanceof
397
+ HTMLMediaElement))throw new _.H(_.G,7,7005,"Media element is not instance of HTMLMediaElement");if(!a.hasAttribute("crossorigin")){var c=b.crossorigin;this.h.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 _.H(_.G,7,7006,"Container element is not a direct parent of media element");d=b.containerEl}else{c=document.createElement(_.yd);a.parentNode?a.parentNode.replaceChild(c,
398
+ a):this.h.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),_.In(c,f);c.style.cssText=a.style.cssText;a.removeAttribute(_.vf);for(d of[_.fg,_.Pd])f=a.getAttribute(d),f=parseInt(f,10),isNaN(f)||(c.style[d]=`${f}px`),_.oj()||a.removeAttribute(d);c.appendChild(a);d=c}d&&(this.a.set(d),Mn(this.a,"clpp-container"),
399
+ Mn(this.a,this.o),Mn(this.f,_.Xc),Mn(this.f,"clpp-video"));b.webOSStartupPatch&&Nn(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.g}isFullscreen(){return!!document.fullscreenElement}hideMediaElement(){const a=this.getMedia();a?_.In(a,Zc):this.h.debug("No media element available that could be hidden")}showMediaElement(){const a=this.getMedia();a?a.classList.remove(Zc):
400
+ this.h.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&&_.In(a,_.Xc);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){_.In(a,Zc)}show(a){a.classList.remove(Zc)}release(){this.j.release()}};
401
+ ks.prototype.removeElementFromContainer=ks.prototype.removeElementFromContainer;ks.prototype.addElementToContainer=ks.prototype.addElementToContainer;ks.prototype.getCastElement=ks.prototype.getCastElement;ks.prototype.getContainer=ks.prototype.getContainer;ks.prototype.getMedia=ks.prototype.getMedia;var is={disableContainer:!1,webOSStartupPatch:!0,crossorigin:"anonymous",containerEl:null},js=1;var ls=class{constructor(a){this.m=a;this.j=this.m.getNetworkEngine();this.a=new _.Xq;this.g=null;this.f=!0;Rn(this)}release(){this.a.release();Sn(this);this.m=null}};_.z("clpp.polyfill.installAll",Vn);var Un=[];_.z("clpp.polyfill.register",_.Wn);var Yn=class{constructor(a,b,c){this.g=a;this.f=b;JSON.parse(_.Ph(_.ei(a)));this.a=JSON.parse(_.Ph(_.ei(b)));this.j=c}verify(a,b){const c={kty:"RSA",n:a.n,e:a.e},d=this.g+"."+this.f,e=this.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=_.Th(d),n=_.ei(e);return h.verify(k,l,n.buffer,m.buffer)}).then(function(l){l?f():g(Bb)}).catch(g)}else b?
402
+ g("Web Crypto API is not supported"):f()})}};var ms={n:"vXdoJIQCz6sZ9pbduNukEHOR0H2dHlwuuBUAR5Ot7WLEYvav5mn63yxr6F6TIl8RHTFw2siXQhHblZH2Y89o8vhcZRFkYXo6h0igEVafu-n0w52UEcH8Cqzlb8Q7x03Qb8OcKLngSzDkwe5Y2Aix6I66RRVNLLssqyjp2n5tXs4JQmYdqY6hhpGhmBN84naeCTdcPpAYhCw8jqbTSNrJp5hjU4GVvOiUtoYCvdESV9xrOR7fPCFXhWfLtC3i1k1zVoIM7YW5qD0F676jhqkF-GmDuCHpRY2I2Cxui-ytYEVIM6_pylSIlmYLjARmv2jXz9aV_WvHLh6B8Yx0slNGCQ",e:"AQAB"},jk="eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJ1cmxzIjpbIjovL2Nhc3RsYWJzLmNvbSJdLCJ0eXBlIjoiV2ViIiwia2lkIjoxOTUwLCJpbHYiOmZhbHNlfQ.jzGGRcbFr_2QET-4tbMcpR5pSaj7eV7X2d1HWw_VKQpPg3zCwSZSDuqw225dIYyAYwLSiElbozbZPSArkBXOsoUm-KZRUPF4m7WG0T7Uza5G-QaQw57BbbfcSsooSpatC997kHKLMTjO71By9Olcu5ykN164nZpGQtZNzQjYag-bnUaMVI5vvhzjlvDihORQ9V_qRlEh0-mpoz6W0-36HGAbWIXWq0kxPh6inbovby-ZmFpqGrVjWOEFa55EARZXPNW9ERupW5xrrYHZdwwTpdRTY5IwEnobS85yTrLhK8Y2MV4jlQLTtQp372fKDsuU6q6_4XvmNq1SgAoKoaf41g";var po=class{constructor(a){this.license=a;this.a=null;this.h=new _.R("clpp.utils.LicenseKey")}verify(){return(new Promise((a,b)=>{try{const c=Zn(this);a(c)}catch(c){b()}})).then(a=>a.verify(ms)).catch(a=>{if(a&&a!==Bb){{var b=window.location.href;const c=new _.qh(b);b=c.Xa||c.Ha?c:new _.qh("//"+b)}if(/(^127\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^192\.168\.)|(^localhost)/.test(b.Ha))return Promise.resolve()}throw a;})}},ko="vod",jo="live";var Q=class extends _.Kr{constructor(a,b,c){super();Vn();this.h=new _.R("clpp.Player");if(!a)throw new _.H(_.G,7,7102);this.A=new _.Xq;this.f=this.O=b||_.lk();this.l=null;void 0===this.f.license&&(this.f.license=jk,this.h.warn("You are using the embedded demo license!"));if(!this.f.license)throw this.h.error("You provided null or empty string as your license. Please check your license configuration."),new _.H(_.G,7,7101,"No license provided in configuration!");this.g=new ks(a,c);this.a=this.w=null;
403
+ this.B=new _.lo;this.j=null;this.J=[];this.K={};this.o=null;this.H=!0;this.I=this.G=!1;this.F=this.tc=null;this.Qd=!1;this.T=new ls(this);this.M=!1;this.C=d=>{(d=d.detail)&&d.currentState===_.nn&&(this.off(_.qf,this.C),qo(this))};this.on(_.qf,()=>{this.getState()===_.jn&&this.unload()});this.on(_.pc,this.R.bind(this));this.on(_.oc,this.R.bind(this));ro(this,this.f.license);this.g.getMedia()&&(a=this.g.getMedia(),a.hasAttribute("autoplay")&&(a.removeAttribute("autoplay"),this.h.debug("Removed autoplay attribute from video element. Auto play will be handled by configuration."),
404
+ void 0===this.f.autoplay&&(this.f.autoplay=!0,this.h.debug("Setting autoplay in configuration since it was specified in the video element"))));a=[];for(const d of no)try{const e=d.create(this.f);e&&a.push(e)}catch(e){this.h.error("Error while creating player plugin",e)}to(this,a);vk(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)}init(){}onError(a){if(null!==this.a)this.a.onError(a);else a=new _.F(_.Md,{detail:a}),this.trigger(a)}cc(a){a=this.K[a];
405
+ void 0===a&&(a=null);return a}getSurface(){return this.g}getConfiguration(){return _.tg(this.f)}getDrmInfo(){return this.a?this.a.getDrmInfo():null}unload(){return this.a?this.a.unload():Promise.resolve()}detach(){return this.a?this.a.detach():Promise.resolve()}release(){if(null!=this.l)return this.h.info("Player release already in progress"),this.l;this.h.debug("Releasing player");this.l=vo(this);return this.l.finally(()=>{this.h.debug("Player released");this.l=null})}destroy(){if(this.G)return this.h.debug("The player is already destroyed. No-op"),
406
+ new Promise(a=>a());this.G=!0;return this.release().then(()=>{this.h.debug(wa);this.trigger(new _.F("destroying"));return _.so(this,_.we)}).then(()=>{this.a&&this.a.removeDelegate(this);this.Oc.clear();this.T.release();if(this.a)return this.a.destroy()}).then(()=>this.B.destroy()).then(()=>{yk();this.a=null;this.trigger(new _.F("destroyed"))})}load(a){const b=this;return _.x(function*(){try{_.Yl(Ne),yield _.Bo(b,a),yield _.Co(b),yield _.Eo(b),_.Yl(Me),performance.measure("player.load",Ne,Me)}catch(c){if(b.l)throw b.h.info("Load interrupted while a player release is pending"),
407
+ new _.H(_.G,7,7E3);throw c;}})}preload(a){const b=this;return _.x(function*(){yield _.Bo(b,a);if(b.a){var c=b.a;c.preload?yield c.preload(b.f):b.h.warn(rb)}else b.h.warn(ob)})}use(a){(a=zk(a))&&a.o(this)}remove(a){return(this.getState()<=_.kn||this.H)&&null!==tk(a)?(Ak(a),this.I=!0):!1}play(){return this.a?this.j&&this.a.namespace()!==_.dd?this.j.start(this.a):this.a.play():Promise.reject("No player initialized. You need to load content before calling play.")}pause(){return this.a?this.a.pause():
408
+ 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 _.Jr}getState(){return this.a?this.a.getState():_.kn}getPeriods(){return this.a?this.a.getPeriods():[]}isEnded(){return this.a&&this.a.isEnded()||!1}isPaused(){return this.a&&this.a.isPaused()||!1}getPosition(){return this.a?this.a.getPosition():0}seek(a){return this.getState()===_.jn?Promise.reject("Cannot seek in current state."):
409
+ 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}}zc(){const a=this.a;return a&&a.zc?a.zc():null}getVolume(){return this.a?this.a.getVolume():null}setVolume(a){this.a&&this.a.setVolume(a)}getDuration(){return this.a?this.a.getDuration():-1}getAdsManager(){return this.j}namespace(){return this.a&&this.a.namespace()||"Undefined"}canPlay(a,b){return this.a?
410
+ this.a.canPlay(a,b):0}getPlaybackRate(){return this.a?this.a.getPlaybackRate():1}setPlaybackRate(a){this.a&&this.a.setPlaybackRate(a)}isMuted(){return this.a&&this.a.isMuted()||!1}setMuted(a){this.a&&this.a.setMuted(a)}getNetworkEngine(){return this.B}setNetworkEngine(a){this.B=a}getTextDisplayer(){return this.a&&this.a.getTextDisplayer()}isLive(){return!!this.a&&this.a.isLive()}getStats(){return this.a?this.a.getStats():null}td(){return Object.freeze(this.o)}setSourceIndex(a){this.a&&this.a.setSourceIndex(a)}getSourceIndex(){return this.a?
411
+ this.a.getSourceIndex():-1}getLoadedSource(){return this.a&&this.a.getLoadedSource()}getTimelineCues(){return this.a?this.a.getTimelineCues():[]}rd(){return this.a?this.a.rd():null}resetAbr(){this.a&&this.a.resetAbr()}setDrmCustomDataModifier(a){this.tc=a;zo(this)}setCdnErrorCallback(a){this.F=a;this.a&&this.a.setCdnErrorCallback(this.F)}R(){this.Qd=!0}};_.z("clpp.Player",Q);Q.registerPlugin=_.oo;Q.prototype.setCdnErrorCallback=Q.prototype.setCdnErrorCallback;
412
+ 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.td;Q.prototype.getStats=Q.prototype.getStats;Q.prototype.isLive=Q.prototype.isLive;Q.prototype.getTextDisplayer=Q.prototype.getTextDisplayer;Q.prototype.setNetworkEngine=Q.prototype.setNetworkEngine;Q.prototype.getNetworkEngine=Q.prototype.getNetworkEngine;
413
+ 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;Q.prototype.getTimelineOffset=Q.prototype.zc;Q.prototype.getSeekRange=Q.prototype.getSeekRange;
414
+ 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;Q.prototype.pause=Q.prototype.pause;Q.prototype.play=Q.prototype.play;Q.prototype.remove=Q.prototype.remove;
415
+ 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.cc;Q.prototype.off=Q.prototype.off;Q.prototype.one=Q.prototype.one;Q.prototype.on=Q.prototype.on;_.kn=0;_.ln=1;_.en=2;_.nn=3;_.mn=4;_.bn=5;_.jn=6;_.es=7;
416
+ _.hn={IDLE:_.kn,PREPARING:_.ln,BUFFERING:_.en,PLAYING:_.nn,PAUSED:_.mn,ENDED:_.bn,ERROR:_.jn,UNSET:_.es};Q.State=_.hn;var no=[];var ns=class{constructor(a){this.a=a.map(b=>({videoId:b.getSurface().getMedia().id,player:b,gd:!0,ready:Promise.resolve()}));this.h=new _.R("clpp.plist.PlayerPool")}has(){return this.a.some(a=>a.gd)}get(){const a=this;return _.x(function*(){const b=a.a.find(c=>c.gd);if(!b)throw Error("No available players in the pool");b.gd=!1;yield b.ready;return b.player})}release(a){const b=this.a.find(c=>c.player===a);if(!b)return Promise.resolve();b.gd=!0;b.ready=new Promise(c=>{a.unload().catch(d=>{this.h.error("Failed to unload player",
417
+ d)}).then(c)});return b.ready}destroy(){const a=this;return _.x(function*(){yield Promise.all(a.a.map(b=>b.player.destroy()))})}};var os=class extends _.Kr{constructor(a){super();this.w=_.sg({transition:_.De,preloadMedia:!1},a);this.g=[];this.a=0;const b=Go(a.anchorId);this.o=new ns(b);this.f=null;this.j=!1;this.l=new Map;this.A=a.toggleVisible;this.h=new _.R(id);this.o.a.forEach(c=>Ho(this,c.player,!1))}Qc(){return this.f}tb(){return this.f?this.f.player:null}$e(){return this.l.get(this.a+1)||null}af(){return this.l.get(this.a-1)||null}Vd(){return[this.af(),this.$e()].filter(Boolean)}Yg(a){if(0<this.g.length)throw Error("Cannot re-set items in the playlist");
418
+ this.h.info("Set items",a);this.g=a.map((b,c)=>({config:b,index:c,preloadPromise:Promise.resolve()}))}Xg(a){if(0===this.g.length)throw Error(ib);if(0>a||a>this.g.length-1)throw Error("Index out of bounds");this.a=a}Bc(){return this.a<this.g.length-1}cf(){return 0<this.a}Ng(){const a=this;return _.x(function*(){if(a.j)a.h.warn("Cannot play first item while busy");else if(0===a.g.length)a.h.warn(ib);else{a.j=!0;a.h.info(`First (index: ${a.a})`);var b=a.g[a.a];try{a.h.info(`First loading (index: ${a.a})`),
419
+ yield Jo(a,b),a.h.info(`First playing (index: ${a.a})`)}catch(c){throw a.h.error(`First failed (index: ${a.a})`),c;}finally{a.j=!1,No(a)}}})}Og(){const a=this;return _.x(function*(){if(a.j)a.h.warn("Cannot play next item while busy");else if(a.Bc()){a.j=!0;a.a+=1;a.h.info(`Next (index: ${a.a})`);var b=a.f;a.w.transition===_.De&&b.player.pause();Ro(a,a.a+-2);a.l.delete(a.a);var c=a.g[a.a];try{a.h.info(`Next loading (index: ${a.a})`),yield Oo(a,c),a.h.info(`Next playing (index: ${a.a})`)}catch(d){throw a.h.error(`Next failed (index: ${a.a})`),
420
+ d;}finally{a.j=!1,b&&Qo(a,b),No(a)}}else a.h.warn("There are no more items in the playlist")})}Pg(){const a=this;return _.x(function*(){if(a.j)a.h.warn("Cannot play previous item while busy");else if(a.cf()){a.j=!0;--a.a;a.h.info(`Previous (index: ${a.a})`);var b=a.f;a.w.transition===_.De&&b.player.pause();Ro(a,a.a+2);a.l.delete(a.a);var c=a.g[a.a];try{a.h.info(`Previous loading (index: ${a.a})`),yield Oo(a,c),a.h.info(`Previous playing (index: ${a.a})`)}catch(d){throw a.h.error(`Previous failed (index: ${a.a})`),
421
+ d;}finally{a.j=!1,b&&Qo(a,b),No(a)}}else a.h.warn("There are no more previous items in the playlist")})}destroy(){const a=this;return _.x(function*(){a.h.info("Destroy");yield Promise.all([So(a),a.f?Qo(a,a.f):Promise.resolve()]);yield To(a)})}};_.z(id,os);os.prototype.destroy=os.prototype.destroy;os.prototype.playPrev=os.prototype.Pg;os.prototype.playNext=os.prototype.Og;os.prototype.playFirst=os.prototype.Ng;os.prototype.hasPrev=os.prototype.cf;os.prototype.hasNext=os.prototype.Bc;
422
+ os.prototype.setIndex=os.prototype.Xg;os.prototype.setItems=os.prototype.Yg;os.prototype.getPreloading=os.prototype.Vd;os.prototype.getPrev=os.prototype.af;os.prototype.getNext=os.prototype.$e;os.prototype.getCurrentPlayer=os.prototype.tb;os.prototype.getCurrent=os.prototype.Qc;var Po="preload",Io=_.he;var ps=class extends _.Kr{constructor(a){super();this.o=_.sg({Eg:2},a);this.j=[];const b=Uo(a.anchorEl,this.o.Eg+1);this.l=new ns(b);this.a=null;this.g=!1;this.f=new Map;this.A=!1;this.w=a.toggleVisible;this.h=new _.R("clpp.interstitial.MultiController");this.l.a.forEach(c=>Vo(this,c.player,!1))}getCurrentItem(){return this.a}tb(){return this.a?this.a.player:null}Vd(){return Array.from(this.f.values())}fd(a){this.h.info("Add items",a);this.j=this.j.concat(a.map(b=>Object.assign({},b,{state:"idle",
423
+ $b:[],preloadPromise:Promise.resolve(),Xc:Promise.resolve()})))}removeItems(a){this.h.info("Remove items",a);a?this.j=this.j.filter(b=>!a.includes(b.id)):this.j=[]}Bc(){return 0<this.f.size}play(a){const b=this;return _.x(function*(){if(b.g)b.h.warn(`Cannot play item while busy (ID: ${a})`);else{var c=b.getItem(a);if(c){b.h.info(`Play item (ID: ${a})`);b.g=!0;var d=b.a;d&&d.player.pause();var e=b.f.has(a);e&&b.f.delete(a);try{b.h.info(`Item loading (ID: ${a})`),e?yield Zo(b,c):yield ap(b,c),c.jc&&
424
+ c.jc(),b.trigger(new _.F(Ud,{detail:c})),bp(b,c),b.h.info(`Item playing (ID: ${a})`)}catch(f){throw b.h.error(`Item failed (ID: ${a})`),f;}finally{b.g=!1,d&&dp(b,d),fp(b),hp(b,c.next)}}else b.h.warn(`Item not found (ID: ${a})`)}})}load(a){const b=this;return _.x(function*(){if(b.g)b.h.warn(`Cannot load item while busy (ID: ${a})`);else{var c=b.getItem(a);if(c){b.h.info(`Load item (ID: ${a})`);b.g=!0;var d=b.a;d&&d.player.pause();var e=b.f.has(a);e&&b.f.delete(a);try{b.h.info(`Item loading (ID: ${a})`),
425
+ e?b.h.error("Loading preloaded items is not supported"):yield $o(b,c),b.trigger(new _.F(Ud,{detail:c})),bp(b,c),b.h.info(`Item loaded (ID: ${a})`)}catch(f){throw b.h.error(`Item failed (ID: ${a})`),f;}finally{b.g=!1,d&&dp(b,d),fp(b),hp(b,c.next)}}else b.h.warn(`Item not found (ID: ${a})`)}})}getItem(a){return this.j.find(b=>b.id===a)||null}release(){const a=this;return _.x(function*(){yield Promise.all([fp(a),a.a?dp(a,a.a):Promise.resolve()]);a.a=null;a.g=!1;a.removeItems();Xo(a,!0)})}destroy(){const a=
426
+ this;return _.x(function*(){a.h.info("Destroy");yield a.release();yield ip(a)})}};ps.prototype.destroy=ps.prototype.destroy;ps.prototype.release=ps.prototype.release;ps.prototype.getItem=ps.prototype.getItem;ps.prototype.load=ps.prototype.load;ps.prototype.play=ps.prototype.play;ps.prototype.hasNext=ps.prototype.Bc;ps.prototype.removeItems=ps.prototype.removeItems;ps.prototype.addItems=ps.prototype.fd;ps.prototype.getPreloading=ps.prototype.Vd;ps.prototype.getCurrentPlayer=ps.prototype.tb;
427
+ ps.prototype.getCurrentItem=ps.prototype.getCurrentItem;var cp="preload",Yo=_.he;var ss=class extends _.Kr{constructor(a){super();this.f=_.sg({prerollMarginSec:.5,resolutionOffsetSec:35},a);this.h=new _.R(gd);this.l=null;this.a=new ps({anchorEl:a.anchorEl,preloadMedia:!0});Xo(this.a,!0);this.a.on(Ud,b=>{const c=b.detail;c.primary&&(this.l=c.player.getDuration());this.trigger(new _.F(qs,b));lp(this);c.primary&&qp(this,c.player)});this.g=[];this.a.on(Xe,b=>{this.trigger(new _.F(rs,{detail:{player:b.detail.player}}))});this.j=[]}load(a){const b=this;return _.x(function*(){yield sp(b,
428
+ a,!1)})}Pc(){const a=this.l;return a?this.j.map(b=>({cueId:b.cueId,startTime:b.startTime,endTime:b.endTime,primaryDuration:a})):[]}Dg(a){const b=this;return _.x(function*(){yield sp(b,a,!0)})}unload(){const a=this;return _.x(function*(){yield a.a.release();a.j=[]})}destroy(){const a=this;return _.x(function*(){yield a.a.destroy()})}gh(){const a=this;return _.x(function*(){yield Wo(a.a)})}getPosition(){const a=this.a.tb();return a?a.getPosition():null}tb(){return this.a.tb()}getCurrentItem(){return this.a.getCurrentItem()}};
429
+ _.z(gd,ss);ss.prototype.getCurrentItem=ss.prototype.getCurrentItem;ss.prototype.getCurrentPlayer=ss.prototype.tb;ss.prototype.getPosition=ss.prototype.getPosition;ss.prototype.unpause=ss.prototype.gh;ss.prototype.destroy=ss.prototype.destroy;ss.prototype.unload=ss.prototype.unload;ss.prototype.loadPaused=ss.prototype.Dg;ss.prototype.getCues=ss.prototype.Pc;ss.prototype.load=ss.prototype.load;
430
+ var zp="new",Ap="preparing",Cp="ready",Jp="completed",Dp="failed",Hp="interstitial-started",Ip="interstitial-ended",Gp="interstitial-item-started",rs="primary-player-changed",qs="item-changed",pp="primary-ended",xp="cues-changed";var U=class{rb(){}sb(){}yb(){}getId(){}getCreativeId(){}getApiFramework(){}getAdSystem(){}getAdvertiserName(){}getTitle(){}getDuration(){}getSkipTimeOffset(){}gc(){}Nb(){}getMediaUrl(){}vb(){}ub(){}ib(){}Va(){}getPodIndex(){}Ob(){}Pb(){}xb(){}getWrapperAdIds(){}getWrapperAdSystems(){}getWrapperCreativeIds(){}};_.z("clpp.ads.IAd",U);U.prototype.getWrapperCreativeIds=U.prototype.getWrapperCreativeIds;U.prototype.getWrapperAdSystems=U.prototype.getWrapperAdSystems;U.prototype.getWrapperAdIds=U.prototype.getWrapperAdIds;
431
+ U.prototype.getSequenceLength=U.prototype.xb;U.prototype.getPositionInSequence=U.prototype.Pb;U.prototype.getPodTimeOffset=U.prototype.Ob;U.prototype.getPodIndex=U.prototype.getPodIndex;U.prototype.getPodType=U.prototype.Va;U.prototype.getMediaBitrate=U.prototype.ib;U.prototype.getMediaHeight=U.prototype.ub;U.prototype.getMediaWidth=U.prototype.vb;U.prototype.getMediaUrl=U.prototype.getMediaUrl;U.prototype.getClickThroughUrl=U.prototype.Nb;U.prototype.isBumper=U.prototype.gc;
432
+ U.prototype.getSkipTimeOffset=U.prototype.getSkipTimeOffset;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;U.prototype.getTechnology=U.prototype.yb;U.prototype.getAdManagerVersion=U.prototype.sb;
433
+ U.prototype.getAdManagerName=U.prototype.rb;var ts=class{name(){}da(){}create(){}};_.z("clpp.ads.IAdsManagerFactory",ts);ts.prototype.create=ts.prototype.create;ts.prototype.isSupported=ts.prototype.da;ts.prototype.name=ts.prototype.name;var us=class{load(){}start(){}resume(){}pause(){}skip(){}getVolume(){}setVolume(){}getPosition(){}dispose(){}};_.z("clpp.ads.IAdsManager",us);us.prototype.getPosition=us.prototype.getPosition;us.prototype.setVolume=us.prototype.setVolume;us.prototype.getVolume=us.prototype.getVolume;us.prototype.skip=us.prototype.skip;us.prototype.pause=us.prototype.pause;us.prototype.resume=us.prototype.resume;var vs=class{load(){return Promise.resolve()}start(a){return a.play()}resume(){}pause(){}skip(){}getVolume(){return 1}setVolume(){}getPosition(){return-1}dispose(){return _.x(function*(){})}};vs.prototype.dispose=vs.prototype.dispose;vs.prototype.getPosition=vs.prototype.getPosition;vs.prototype.setVolume=vs.prototype.setVolume;vs.prototype.getVolume=vs.prototype.getVolume;vs.prototype.skip=vs.prototype.skip;vs.prototype.pause=vs.prototype.pause;vs.prototype.resume=vs.prototype.resume;
434
+ vs.prototype.start=vs.prototype.start;vs.prototype.load=vs.prototype.load;var Fn=class{name(){return"clpp.ads.NopAdsManagerFactory"}da(){return!0}create(){return new vs}};Fn.prototype.create=Fn.prototype.create;Fn.prototype.isSupported=Fn.prototype.da;Fn.prototype.name=Fn.prototype.name;var ws=class{getCuePoints(){}Qb(){}jb(){}};_.z("clpp.ads.IAdsTimeline",ws);ws.prototype.hasPostroll=ws.prototype.jb;ws.prototype.hasPreroll=ws.prototype.Qb;ws.prototype.getCuePoints=ws.prototype.getCuePoints;_.xs=class{f(){}a(){}g(){}o(){}};var ys=class{constructor(){this.j=null;this.h=new _.R("clpp.drm.eme.StandardEmeManager")}l(a){this.j=a}g(a){return this.j?this.j.setMediaKeys(a):Promise.reject(eb)}o(){return this.j&&this.j.mediaKeys}a(a,b){this.h.debug("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=>{c.message&&(c=Error(`${c.message} (keySystem: ${a})`));return Promise.reject(c)})}f(){return xb}};
435
+ Hl(new class{a(){return xb}da(){return!!(window.MediaKeys&&navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)}create(){return new ys}},1E3);var As=class{constructor(){this.size=0;this.a=void 0;this.h=new _.R("clpp.drm.eme.MediaKeyStatusMap")}getStatus(){return this.a}forEach(a){this.a&&a(this.a,zs.value())}get(a){if(this.has(a))return this.a}has(a){const b=zs.value();return this.a&&Hh(a,b)?!0:!1}entries(){}keys(){}values(){}},zs=new _.ds(()=>Nh(new Uint8Array([0])));var Bs=class{l(){}g(a){_.Mg("NopEmeManager.setMediaKeys");return null===a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}o(){return null}a(){_.Mg("NopEmeManager.requestMediaKeySystemAccess");return Promise.reject(Error("The key system specified is not supported."))}f(){return"NOP"}};Hl(new class{a(){return"NOP"}da(){return!0}create(){return new Bs}},-1);var Ds=class{constructor(){this.j=this.w=null}l(a){this.w=a}g(a){const b=this.j;b&&b!==a&&Lp(b,null);return(this.j=a)?Lp(a,this.w):Promise.resolve()}o(){return this.j}a(a,b){_.Mg("AppleEmeManager.requestMediaKeySystemAccess");try{const c=new Cs(a,b);return Promise.resolve(c)}catch(c){return Promise.reject(c)}}f(){return"APPLE"}},Cs=class{constructor(a,b){this.keySystem=a;if(a.startsWith(_.nd))for(var c of b){a:{a=c;if(a.persistentState===_.ef){a=null;break a}b={audioCapabilities:[],videoCapabilities:[],
436
+ persistentState:_.Ae,distinctiveIdentifier:_.Ae,initDataTypes:a.initDataTypes,sessionTypes:[xf],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),
437
+ e=!0));d||(e=WebKitMediaKeys.isTypeSupported(this.keySystem,_.Of));a=e?b:null}if(a){this.a=a;return}}c=Error(Kb);c.name=mb;c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}createMediaKeys(){const a=new Es(this.keySystem);return Promise.resolve(a)}getConfiguration(){_.Mg("AppleEmeManager.MediaKeySystemAccess.getConfiguration");return this.a}},Es=class{constructor(a){this.f=null;this.g=new WebKitMediaKeys(a);this.a=new _.Xq;this.j=0;this.h=new _.R(fd);this.h.info("Created Media Keys for "+a)}createSession(a){a=
438
+ void 0===a?xf:a;this.h.debug("Creating Apple MediaKeys Session");if(a!==xf)throw new TypeError("Session type "+a+ba);return new Fs(this.g,`__session_${this.j++}`)}setServerCertificate(){this.h.debug("AppleEmeManager.MediaKeys.setServerCertificate");return Promise.resolve(!1)}},Fs=class extends _.Kr{constructor(a,b){super();this.a=null;this.o=a;this.f=this.g=null;this.j=new _.Xq;this.sessionId=b;this.expiration=NaN;this.closed=new _.sm;this.l=!1;this.keyStatuses=new As;this.h=new _.R(fd)}generateRequest(a,
439
+ b){if(this.l)return Promise.reject(Ab);this.h.debug("generateRequest");this.g=new _.sm;try{const c=this.o.createSession(_.Of,_.J(b));this.a=c;this.sessionId=c.sessionId||this.sessionId||"";this.j.on(c,dg,d=>{{const e=this.keyStatuses.getStatus();this.h.debug(`Received Key Message in ${this.sessionId}`);this.g&&(this.g.resolve(),this.g=null);d=new _.F(_.ke,{messageType:void 0===e||e===rf?Zd:Yd,message:Nh(d.message.buffer)});this.dispatchEvent(d)}});this.j.on(c,bg,d=>{this.h.debug("onWebkitKeyAdded_",
440
+ d);this.f&&(Mp(this,"usable"),this.f.resolve(),this.f=null)});this.j.on(c,cg,()=>{var d=this.keyStatuses.getStatus();if(this.a&&this.a&&this.a.error&&this.a.error.code===WebKitMediaKeyError.MEDIA_KEYERR_DOMAIN&&d===rf)this.h.warn(`Ignoring webkit key error for session ${this.sessionId}`);else if(this.h.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.g)this.g.reject(d),
441
+ this.g=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:Mp(this,"output-not-allowed");break;default:Mp(this,_.Td)}});Mp(this,rf)}catch(c){this.g.reject(c)}return this.g}load(){this.h.debug("load");return Promise.reject(Error("MediaKeySession.load not yet supported"))}update(a){if(this.l)return Promise.reject(Ab);this.h.debug(Ff);this.f=new _.sm;try{this.a.update(_.J(a))}catch(b){this.f.reject(b)}return this.f}close(){if(this.l)return this.closed;
442
+ this.h.info(`Closing Key Session ${this.sessionId}`);this.l=!0;try{this.a.close(),this.closed.resolve(),_.Sg(this.j)}catch(a){this.closed.reject(a)}return this.closed}remove(){this.h.debug("remove");return Promise.reject(Error("MediaKeySession is only applicable for persistent licenses, which are not supported on this platform"))}};Hl(new class{a(){return"APPLE"}da(){return!!window.WebKitMediaKeys}create(){return new Ds}},1100);var Hs=class{constructor(){this.w=this.j=null;this.A="";HTMLMediaElement.prototype.webkitGenerateKeyRequest&&(this.A="webkit")}l(a){this.j=a}g(a){_.Mg("WebkitEmeManager.setMediaKeys");if(!this.j)return Promise.reject(eb);const b=this.w;b&&b!==a&&Pp(b,null);(this.w=a)&&Pp(a,this.j);return Promise.resolve()}o(){return this.w}a(a,b){_.Mg("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=
443
+ new Gs(this.A,c,a,b);return Promise.resolve(e)}catch(e){return Promise.reject(e)}}f(){return"WEBKIT"}},Gs=class{constructor(a,b,c,d){this.g=a;this.a=this.keySystem=c;a=!1;c===_.Be&&(this.a=ag,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,
444
+ this.a)&&(f.push(k),e=!0));h||(e=b.canPlayType(_.Of,this.a)||b.canPlayType("video/webm",this.a));g.persistentState!==_.ef||a||(e=!1);if(e){this.f=g;return}}b=Kb;if(c===_.Be||c===_.sd)b="None of the requested configurations were supported.";c=Error(b);c.name=mb;c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}createMediaKeys(){return Promise.resolve(new Is(this.g,this.a))}getConfiguration(){return this.f}},Is=class{constructor(a,b){this.g=a;this.o=b;this.a=null;this.f=new _.Xq;this.j=[];this.l=new Map}createSession(a=
445
+ xf){if(a!==xf&&a!==_.Fe)throw new TypeError("Session type "+a+ba);if(!this.a)throw a=Error("Media element is missing."),a.name=Ya,a.code=DOMException.INVALID_STATE_ERR,a;this.a.src||(this.a.src="about:blank");a=new Js(this.g,this.a,this.o,a);this.j.push(a);return a}setServerCertificate(){return Promise.resolve(!1)}},Js=class extends _.Kr{constructor(a,b,c,d){super();this.w=a;this.j=b;this.o=!1;this.a=this.f=null;this.g=c;this.l=d;this.sessionId="";this.expiration=NaN;this.closed=new _.sm;this.keyStatuses=
446
+ new As}ready(){_.Mg("WebkitEmeManager.MediaKeySession.ready");Op(this,"usable");this.a&&this.a.resolve();this.a=null}generateRequest(a,b){_.Mg("WebkitEmeManager.MediaKeySession.generateRequest");return Rp(this,b,null)}load(a){_.Mg(Pb);return this.l===_.Fe?Rp(this,null,a):Promise.reject(Error(kb))}update(a){_.Mg(Pb);const b=new _.sm;Sp(this,b,a);return b}close(){_.Mg("WebkitEmeManager.MediaKeySession.close");if(this.l!==_.Fe){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),
447
+ this.closed;const a=Qp(this,"cancelKeyRequest");try{this.j[a](this.g,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed}remove(){_.Mg("WebkitEmeManager.MediaKeySession.remove");return this.l!==_.Fe?Promise.reject(Error(kb)):this.close()}};Hl(new class{a(){return"WEBKIT"}da(){return!(!HTMLMediaElement.prototype.webkitGenerateKeyRequest&&!HTMLMediaElement.prototype.generateKeyRequest)}create(){return new Hs}});var Ms=class extends _.Pr{constructor(a,b,c,d,e){super(Xa);this.l=a;this.j=b;this.g=c;this.a=d;this.o=e;this.h=new _.R(ed);_.Zh(this.l)?this.h.warn(_.Qb):this.Ma(_.sd,{licenseUrl:this.l,videoRobustness:[_.zb,void 0],audioRobustness:[_.yb,void 0],persistentStateRequired:!1,distinctiveIdentifierRequired:!1,serverCertificate:null,modifiers:{licenseRequest:this.Zc.bind(this)}});_.Zh(this.j)?this.h.warn(_.nb):this.Ma(_.pd,{licenseUrl:this.j,videoRobustness:["3000"],audioRobustness:["2000"],modifiers:{licenseRequest:this.Zc.bind(this)}});
448
+ _.Zh(this.g)?this.h.warn(_.Ra):_.Zh(this.a)?this.h.warn(_.Qa):this.Ma(_.nd,{licenseUrl:this.g,certificateUrl:this.a,modifiers:{licenseRequest:this.lf.bind(this),licenseResponse:this.mf.bind(this),certificateRequest:this.Zc.bind(this),extractContentId:this.Ve.bind(this)}})}Zc(a,b){a=a.drm.customData.headers||{};for(const c of Object.keys(a))b.headers[c]=a[c]}Ve(a,b){a=$k(b);switch(this.o){case Ks:return a;case Ls:return(new _.al(a)).a;default:throw Error("Unknown content ID strategy");}}lf(a,b){b.headers[ra]=
449
+ Cc;this.Zc(a,b);a={spc:_.ci(b.body)};b.body=_.Vh(_.Li(a,!0))}mf(a,b){a=_.Ph(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=_.ei(a).buffer}};_.z(ed,Ms);Ms.prototype.onFairPlayLicenseResponse=Ms.prototype.mf;Ms.prototype.onFairPlayLicenseRequest=Ms.prototype.lf;Ms.prototype.extractFairPlayContentId=Ms.prototype.Ve;Ms.prototype.onLicenseRequest=Ms.prototype.Zc;Ms.prototype.constructor=Ms.prototype.constructor;Ms.NAME=Xa;
450
+ var Ls="hostname",Ks="full-skd";Ms.FairPlayContentIdStrategy={HOSTNAME:Ls,FULL_SKD:Ks};_.z("clpp.drm.HeaderDrmComponent",class extends _.xs{g(a){a=a.getConfiguration();if(a.drm&&a.drm&&a.drm.env===Xa){a=a.drm.customData;if(!a)throw new _.H(_.G,7,7100,_.td);a=new Ms(a.widevineLicenseUrl,a.playReadyLicenseUrl,a.fairPlayLicenseUrl,a.fairPlayCertificateUrl,a.fairPlayContentIdStrategy||Ks);_.Fk(a)}}a(){delete _.Ek.HeaderDrm}id(){return"headerdrm"}});_.Wn(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})});_.Wn(function(){_.Mg("mathRound.install")});_.Wn(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;Nd in document||(Object.defineProperty(document,Nd,{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement}}),Object.defineProperty(document,"fullscreenEnabled",
451
+ {get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitSupportsFullscreen||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",Tp);document.addEventListener("webkitfullscreenerror",Tp);document.addEventListener("mozfullscreenchange",Tp);document.addEventListener("mozfullscreenerror",Tp);document.addEventListener("MSFullscreenChange",Tp);document.addEventListener("MSFullscreenError",Tp)}});_.Wn(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(_.Mg("PiPWebkit.install"),document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=Vp,document.exitPictureInPicture=Wp,document.addEventListener("webkitpresentationmodechanged",Up,!0))}});_.Wn(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in a&&(a.getVideoPlaybackQuality=Xp)}});_.Wn(function(){if(window.VTTCue)_.Lg("Using native VTTCue.");else if(window.TextTrackCue){var a=TextTrackCue.length;if(3===a)_.Lg(Lb),window.VTTCue=Yp;else if(6===a)_.Lg("Using VTTCue polyfill from 6 argument TextTrackCue."),window.VTTCue=Zp;else{try{var b=!!Yp(1,2,"")}catch(c){b=!1}b&&(_.Lg(Lb),window.VTTCue=Yp)}}else _.Ng("VTTCue not available.")});var $p;_.Wn(function(){_.Mg("InputEvent.install");_.nj("Trident/")&&HTMLInputElement.prototype.addEventListener!==aq&&(_.Lg("Patching input event support on IE."),$p=HTMLInputElement.prototype.addEventListener,HTMLInputElement.prototype.addEventListener=aq)});_.Wn(function(){navigator.languages||Object.defineProperty(navigator,"languages",{get:()=>navigator.language?[navigator.language]:["en"]})});_.Wn(function(){_.Mg("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 dq=class{constructor(){this.a=bq()}};var Ns=class{constructor(a,b){b=void 0===b?2:b;this.a=new Uint8Array(a);this.g=b;this.f=0}};_.Os=class{constructor(a,b,c){this.g=a;this.j=b;this.f=c||this.g.getMedia();this.a=null}start(){this.a=new ResizeObserver(a=>{a=a[0];this.j(a.contentRect.width,a.contentRect.height,this.g.isFullscreen())});this.f&&this.a.observe(this.f)}stop(){this.a&&(this.a.disconnect(),this.a=null)}};var Ps;_.Qs=class{constructor(){this.a=new Blob([Ps],{type:_.Of})}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 _.sm;b=b.play();const d=(new _.kj(()=>{d.stop();c.resolve(a)})).ca(.25);void 0!==b?b.then(()=>{d.stop();c.resolve(!0)}).catch(e=>{e&&e.message&&e.message===mb?(d.stop(),c.resolve(!0)):(d.stop(),c.resolve(!1))}):(d.stop(),c.resolve(!0));return c}};
452
+ Ps=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,
453
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,
454
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,
455
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,
456
+ 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,
457
+ 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,
458
+ 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]);_.Rs=new _.R("clpp.media.TimestampParser");_.iq={};_.kq={};var Gq=class{constructor(a){this.a=new Uint8Array(a||65536);this.f=0;this.g=new dq}};var oq=window.XMLHttpRequest;var Fq=class{constructor(a,b){a=void 0===a?1E6:a;b=void 0===b?!0:b;this.j=new Ns(a);this.length=a;this.A=b;this.f=this.a=this.g=0;this.l=null;this.o=-1;this.w=new dq}};var Br=class extends _.zn{constructor(a){super(new _.sm,()=>Promise.resolve());this.B=a;this.g=null;this.w=this.P;this.f=-1;this.j=this.l=this.o=null;yq(this)}then(a,b){this.P=this.P.then(a,b);return this}catch(a){this.P=this.P.catch(a);return this}abort(){if(this.a)return Promise.resolve();this.a=!0;return this.g.then(a=>{this.o&&clearTimeout(this.o);this.l&&this.l();return a.abort()}).catch(()=>{})}};_.Vs=class{constructor(a){this.a=!1;this.g=a;this.j=this.l.bind(this);this.g.Ic(this.j);this.f=null}enabled(){return this.a}Ze(){return this.a&&this.f&&this.f.has(Ss)?1E3*this.f.get(Ss):null}release(){this.f=null;this.a=!1;this.g.Dd(this.j)}l(a){if(this.a){var b=a.headers["cmsd-dynamic"];if(b){try{const d=new Map,e=b.split(";");for(b=0;b<e.length;b++){const {key:f,value:g}=zq(e[b]);Object.values(Ts).includes(f)&&d.set(f,g)}var c=d}catch(d){Us.error("CmsdManager parseCmsdDynamicHeader_ failed:",d),
459
+ c=null}this.f=c}}return a}};_.Vs.prototype.getEstimatedThroughput=_.Vs.prototype.Ze;var Ss="etp",Ts={nh:Ss},Us=new _.R("clpp.net.CmsdManager");var Eq=window.fetch,Bq=window.AbortController,Aq=window.Headers;_.Jq={};_.Xs=class{constructor(a){a=a.getConfiguration();a=_.tg(a.textStyle||a.textstyle||{});this.K=typeof a.backgroundColor===_.tf?a.backgroundColor:null;this.T=typeof a.windowColor===_.tf?a.windowColor:null;this.O=typeof a.fontColor===_.tf?a.fontColor:null;this.R=typeof a.fontFamily===_.tf?a.fontFamily:null;this.I=typeof a.fontSize===_.tf?a.fontSize:null;this.C=typeof a.fontSizePercent===_.r?a.fontSizePercent:null;this.H=typeof a.edgeColor===_.tf?a.edgeColor:"rgba(0, 0, 0, 1)";this.w=null;typeof a.edgeType===
460
+ _.tf&&(this.w=a.edgeType)}getBackgroundColor(){return this.K}setBackgroundColor(a){this.K=a;this.g()}getWindowColor(){return this.T}setWindowColor(a){this.T=a;this.g()}getFontFamily(){return this.R}setFontFamily(a){this.R=a;this.g()}getFontColor(){return this.O}setFontColor(a){this.O=a;this.g()}getFontSize(){return this.I}setFontSize(a){this.I=a;this.g()}getFontSizePercent(){return null===this.C?Ws:this.C}setFontSizePercent(a){this.C=a;this.g()}getEdgeColor(){return this.H}setEdgeColor(a){this.H=
461
+ a;this.g()}getEdgeType(){return this.w}setEdgeType(a){this.w=a;this.g()}};_.Xs.prototype.setEdgeType=_.Xs.prototype.setEdgeType;_.Xs.prototype.getEdgeType=_.Xs.prototype.getEdgeType;_.Xs.prototype.setEdgeColor=_.Xs.prototype.setEdgeColor;_.Xs.prototype.getEdgeColor=_.Xs.prototype.getEdgeColor;_.Xs.prototype.setFontSizePercent=_.Xs.prototype.setFontSizePercent;_.Xs.prototype.getFontSizePercent=_.Xs.prototype.getFontSizePercent;_.Xs.prototype.setFontSize=_.Xs.prototype.setFontSize;
462
+ _.Xs.prototype.getFontSize=_.Xs.prototype.getFontSize;_.Xs.prototype.setFontColor=_.Xs.prototype.setFontColor;_.Xs.prototype.getFontColor=_.Xs.prototype.getFontColor;_.Xs.prototype.setFontFamily=_.Xs.prototype.setFontFamily;_.Xs.prototype.getFontFamily=_.Xs.prototype.getFontFamily;_.Xs.prototype.setWindowColor=_.Xs.prototype.setWindowColor;_.Xs.prototype.getWindowColor=_.Xs.prototype.getWindowColor;_.Xs.prototype.setBackgroundColor=_.Xs.prototype.setBackgroundColor;
463
+ _.Xs.prototype.getBackgroundColor=_.Xs.prototype.getBackgroundColor;var Ws=1/15;var Lq="raised",Mq="depressed",Oq="dropshadow",Nq="uniform";_.z("clpp.text.EdgeType",{NONE:_.se,RAISED:Lq,DEPRESSED:Mq,DROP_SHADOW:Oq,UNIFORM:Nq});_.Jq[uc]=class{constructor(a){this.f=a;this.a=null;this.h=new _.R("clpp.text.Mp4TextParser")}parseInit(a){let b;try{const c=_.Jq[_.vc]||null;c?(b=new c(this.f),b.parseInit(a)):this.h.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=_.Jq[_.zc]||null;c?(b=new c(this.f),b.parseInit(a)):this.h.warn("The clpp.vtt.Mp4VttParser class is not available. Please register the vtt component first.")}catch(c){b=
464
+ null}if(b)this.a=b;else throw new _.H(_.G,2,2011);}}parseMedia(a,b){if(!this.a)throw new _.H(_.G,2,2011);return this.a.parseMedia(a,b)}};var Ys;
465
+ _.Zs=class extends _.Xs{constructor(a){super(a);this.o=a.getSurface().getMedia();this.f=`clpp-video-${Ys++}`;this.j=document.createElement(_.vf);this.l=this.A=!1;_.In(this.o,this.f);document.head.appendChild(this.j);this.g()}append(){}remove(){return!0}isTextVisible(){return this.A}setTextVisibility(a){this.A=a}g(){if(!this.l){var a={"background-color":this.getBackgroundColor(),color:this.getFontColor(),"font-family":this.getFontFamily(),"font-size":this.getFontSize(),"text-shadow":_.Pq(this)},b=
466
+ 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()}};Ys=0;_.Rm("native",new class{da(){return!0}create(a){return new _.Zs(a)}});_.$s=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;