@castlabs/prestoplay 6.25.0 → 6.25.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/cl.core.js CHANGED
@@ -1,21 +1,21 @@
1
- let g={}; let _ = {};let f=function(window){'use strict';var ba,ca,ka,na,sa,ta,wa,xa,ya,za,Qa,Ra,Va,Wa,Xa,Ya,Za,ab,bb,fb,hb,jb,kb,lb,mb,nb,pb,qb,ub,yb,Fb,Gb,Jb,Lb,Qb,Rb,Sb,Vb,Wb,Yb,Zb,ic,pc,qc,rc,Lc,Qc,Vc,cd,ed,md,nd,od,qd,rd,sd,td,vd,wd,xd,yd,zd,Ad,Gd,Id,Nd,Td,Ud,Vd,Wd,Yd,ae,be,ee,fe,he,me,te,ve,we,Ge,Ze,ff,hf,jf,kf,lf,mf,nf,of,pf,qf,rf,wf,xf,yf,zf,Af,Bf,Df,Hf,Jf,Yf,ag,gg,sg,vg,Eg,Mg,Qg,Rg,Sg,Tg,Ug,Wg,Xg,Yg,dh,eh,hh,ih,nh,kh,vh,wh,yh,Bh,Dh,Lh,Mh,Nh,Qh,Rh,Ph,Oh,Uh,Sh,Yh,Zh,ci,Xh,di,bi,ei,fi,$h,ai,ii,ni,oi,ji,mi,li,ki,qi,si,ri,ui,vi,wi,xi,Ai,
1
+ let g={}; let _ = {};let f=function(window){'use strict';var ba,ca,ka,na,sa,ta,wa,xa,ya,za,Qa,Ra,Va,Wa,Xa,Ya,Za,ab,bb,fb,hb,jb,kb,lb,mb,nb,pb,qb,ub,yb,Eb,Gb,Jb,Lb,Qb,Rb,Sb,Vb,Wb,Yb,Zb,hc,pc,qc,rc,Lc,Qc,Vc,cd,ed,md,nd,od,qd,rd,sd,td,vd,wd,xd,yd,zd,Ad,Gd,Id,Nd,Td,Ud,Vd,Wd,$d,ae,be,ee,fe,he,me,te,ve,we,Ge,Ze,ff,hf,jf,kf,lf,mf,nf,of,pf,qf,rf,wf,xf,yf,zf,Af,Bf,Df,Hf,Jf,Yf,ag,gg,sg,vg,Eg,Mg,Qg,Rg,Sg,Tg,Ug,Wg,Xg,Yg,dh,eh,hh,ih,nh,kh,vh,wh,yh,Bh,Dh,Lh,Mh,Nh,Qh,Rh,Ph,Oh,Uh,Sh,Yh,Zh,ci,Xh,di,bi,ei,fi,$h,ai,ii,ni,oi,ji,mi,li,ki,qi,si,ri,ui,vi,wi,xi,Ai,
2
2
  Bi,Di,Ei,Ii,Ki,Mi,Gi,Oi,Si,Zi,aj,$i,bj,cj,dj,gj,hj,kj,yj,zj,Cj,Dj,Gj,Ij,Jj,Kj,Lj,Nj,Oj,Pj,Qj,Rj,Sj,Vj,Yj,ck,dk,hk,jk,ek,gk,ik,kk,lk,mk,ok,pk,wk,Hk,Mk,Lk,Yk,Rk,Qk,jl,kl,ml,nl,ol,pl,ql,rl,tl,sl,ul,vl,wl,xl,yl,ll,Al,Cl,El,Hl,Jl,Ol,Pl,Ql,Rl,Sl,Tl,Ul,Vl,cm,dm,jm,sm,um,Am,Em,Gm,Nm,$m,Jm,Vm,fn,gn,hn,kn,ln,mn,pn,nn,on,qn,sn,tn,wn,En,Fn,Nn,Qn,Rn,Tn,Vn,Wn,Yn,On,Un,Zn,$n,ao,bo,lo,eo,mo,co,fo,go,no,so,uo,wo,vo,yo,qo,Go,Do,Fo,Eo,to,Ho,Io,Jo,Ko,Lo,Mo,No,Oo,Uo,Vo,Wo,bp,cp,ep,Zo,Yo,lp,mp,qp,sp,tp,up,pp,wp,xp,yp,
3
3
  Cp,Hp,Ip,Jp,Kp,Lp,Mp,Op,Pp,Qp,Rp,eq,$p,gq,hq,iq,jq,Sp,Tp,Wp,Xp,Yp,Zp,aq,bq,cq,dq,rq,sq,fq,tq,pq,oq,uq,mq,qq,kq,xq,yq,zq,Aq,Bq,Eq,Fq,Mq,Nq,Oq,Lq,Vq,Pq,Qq,Rq,Sq,Tq,Uq,Cq,Dq,Gq,Hq,Iq,Xq,$q,Jq,Kq,ar,dr,hr,ir,gr,jr,fr,er,lr,nr,pr,rr,sr,tr,ur,vr,wr,xr,yr,zr,Ar,Br,Fr,Jr,Gr,Lr,Pr,Rr,Tr,Vr,Wr,Xr,Yr,$r,is,as,bs,cs,ds,ks,gs,ls,os,ps,qs,ms,ns,rs,ss,vs,zs,As,Ds,Fs,Gs,Es,Bs,us,ys,ws,xs,Js,Ks,Ls,Ms,Ns,Rs,Ss,Ts,Vs,Ws,Xs,Zs,at,ft,gt,ht,jt,kt,lt,nt,ot,mt,pt,st,rt,qt,wt,vt,Bt,fh,gh;_.aa=" is registered.";ba=" is unsupported on this platform.";
4
- ca=" to a log level. Falling back to default!";_.da="#text";_.ea="6.25.0";_.fa="AdaptationSet";_.ha="Already destroyed. No-op";_.ia="Already released. No-op";_.ja="Autoplay is not allowed due to browser policy.";ka="Autoplay should not be used for preloaded streams. ";_.la="BANDWIDTH";_.ma="BASIC";na="CHECKSUM";_.oa="CODECS";_.pa="Cannot retrieve buffer information due to platform limitations";_.qa="CastlabsPlayer";_.ra="Configuration is valid";sa="Content-Length";ta="Content-Type";_.ua="Could not find configured DRM environment.";
4
+ ca=" to a log level. Falling back to default!";_.da="#text";_.ea="6.25.1";_.fa="AdaptationSet";_.ha="Already destroyed. No-op";_.ia="Already released. No-op";_.ja="Autoplay is not allowed due to browser policy.";ka="Autoplay should not be used for preloaded streams. ";_.la="BANDWIDTH";_.ma="BASIC";na="CHECKSUM";_.oa="CODECS";_.pa="Cannot retrieve buffer information due to platform limitations";_.qa="CastlabsPlayer";_.ra="Configuration is valid";sa="Content-Length";ta="Content-Type";_.ua="Could not find configured DRM environment.";
5
5
  wa="DRM licenses loaded";xa="DRMtoday";ya="DRMtodayOnboard";za="Destroying player";_.Aa="EXT-X-BYTERANGE";_.Ba="EXT-X-DATERANGE";_.Ca="EXT-X-DEFINE";_.Da="EXT-X-DISCONTINUITY";_.Ea="EXT-X-DISCONTINUITY-SEQUENCE";_.Fa="EXT-X-ENDLIST";_.Ga="EXT-X-KEY";_.Ha="EXT-X-MAP";_.Ia="EXT-X-MEDIA-SEQUENCE";_.Ja="EXT-X-PART-INF";_.Ka="EXT-X-PLAYLIST-TYPE";_.La="EXT-X-PRELOAD-HINT";_.Ma="EXT-X-PROGRAM-DATE-TIME";_.Oa="EXT-X-SERVER-CONTROL";_.Pa="EXT-X-TARGETDURATION";Qa="Error while decoding string!";Ra="Error while fetching certificate!";
6
6
  _.Sa="FairPlay Certificate URL is not defined";_.Ta="FairPlay License URL is not defined";_.Ua="GROUP-ID";Va="HW_SECURE_ALL";Wa="HW_SECURE_CRYPTO";Xa="HW_SECURE_DECODE";Ya="HeaderDrm";Za="InvalidStateError";_.$a="LANGUAGE";ab="License verification failed: ";bb="Load interrupted while a player release is pending";_.cb="Loading player with configuration";_.db="MaxHeight";_.eb="MaxWidth";fb="Missing media element";_.gb="NAME";hb="No drmtoday configuration found in player configuration. Unable to modify the DRM license request!";
7
- jb="No event provided!";kb="No items in the playlist";lb="No sources provided!";mb="No track data attached to the event, unable to add track!";nb="Not a persistent session.";_.ob="Not supported";pb="NotAllowedError";qb="NotSupportedError";_.rb="PLAYLIST";_.sb="POST";_.tb="PlayReady License URL is not defined";ub="Player not ready yet.";_.vb="Player sources";_.xb="Please make sure ";yb="Preloading is not supported by this player.";_.zb="QualityLevel";_.Ab="RESOLUTION";_.Bb="Representation";_.Cb="SW_SECURE_CRYPTO";
8
- _.Db="SW_SECURE_DECODE";Fb="Session is closed";Gb="Skipping Session creation. License for init data was already requested in ";_.Hb="SmoothStreamingMedia";_.Ib="TYPE";Jb="The index is not in the allowed range.";_.Kb="URI";Lb="Unable to translate ";_.Ob="Unhandled/ignored event";_.Pb="Unregistering listeners";Qb="Unsupported keySystem";Rb="Updating playout limit for interstitial";Sb="Using VTTCue polyfill from 3 argument TextTrackCue.";_.Tb="VIDEO";_.Ub="VOD";Vb="Wait for preloading to finish";
9
- Wb="WebkitEmeManager.MediaKeySession.load";_.Xb="Widevine License URL is not defined";Yb="Will create EME Manager: ";Zb="X-AD-CREATIVE-SIGNALING";_.$b="X-ASSET-LIST";_.ac="X-ASSET-URI";_.bc="X-PLAYOUT-LIMIT";_.cc="X-RESTRICT";_.gc="X-RESUME-OFFSET";ic="X-TIMELINE-OCCUPIES";_.jc="ad-break-started";_.kc="ad-break-stopped";_.lc="ad-buffering";_.mc="ad-clicked";_.nc="ad-completed";_.oc="ad-first-quartile";pc="ad-hls-asset-list-request";qc="ad-hls-asset-list-response";rc="ad-hls-resoled";_.sc="ad-impression";
10
- _.tc="ad-loaded";_.uc="ad-midpoint";_.vc="ad-paused";_.wc="ad-progress";_.xc="ad-resumed";_.yc="ad-skipped";_.zc="ad-started";_.Cc="ad-stopped";_.Dc="ad-third-quartile";_.Ec="addtrack";_.Fc="ads-timeline-changed";_.Gc="airplay-casting-ended";_.Hc="airplay-casting-started";_.Ic="airplay-status-changed";_.Jc="application/cea-608";_.Kc="application/dash+xml";Lc="application/mp4";_.Mc='application/mp4; codecs\x3d"stpp"';_.Nc='application/mp4; codecs\x3d"wvtt"';_.Oc="application/ttml+xml";_.Pc="application/vnd.ms-sstr+xml";
7
+ jb="No event provided!";kb="No items in the playlist";lb="No sources provided!";mb="No track data attached to the event, unable to add track!";nb="Not a persistent session.";_.ob="Not supported";pb="NotAllowedError";qb="NotSupportedError";_.rb="PLAYLIST";_.sb="POST";_.tb="PlayReady License URL is not defined";ub="Player not ready yet.";_.vb="Player sources";_.wb="Please make sure ";yb="Preloading is not supported by this player.";_.zb="QualityLevel";_.Ab="RESOLUTION";_.Bb="Representation";_.Cb="SW_SECURE_CRYPTO";
8
+ _.Db="SW_SECURE_DECODE";Eb="Session is closed";Gb="Skipping Session creation. License for init data was already requested in ";_.Hb="SmoothStreamingMedia";_.Ib="TYPE";Jb="The index is not in the allowed range.";_.Kb="URI";Lb="Unable to translate ";_.Mb="Unhandled/ignored event";_.Pb="Unregistering listeners";Qb="Unsupported keySystem";Rb="Updating playout limit for interstitial";Sb="Using VTTCue polyfill from 3 argument TextTrackCue.";_.Tb="VIDEO";_.Ub="VOD";Vb="Wait for preloading to finish";
9
+ Wb="WebkitEmeManager.MediaKeySession.load";_.Xb="Widevine License URL is not defined";Yb="Will create EME Manager: ";Zb="X-AD-CREATIVE-SIGNALING";_.$b="X-ASSET-LIST";_.ac="X-ASSET-URI";_.bc="X-PLAYOUT-LIMIT";_.cc="X-RESTRICT";_.dc="X-RESUME-OFFSET";hc="X-TIMELINE-OCCUPIES";_.jc="ad-break-started";_.kc="ad-break-stopped";_.lc="ad-buffering";_.mc="ad-clicked";_.nc="ad-completed";_.oc="ad-first-quartile";pc="ad-hls-asset-list-request";qc="ad-hls-asset-list-response";rc="ad-hls-resoled";_.sc="ad-impression";
10
+ _.tc="ad-loaded";_.uc="ad-midpoint";_.vc="ad-paused";_.wc="ad-progress";_.xc="ad-resumed";_.yc="ad-skipped";_.zc="ad-started";_.Ac="ad-stopped";_.Dc="ad-third-quartile";_.Ec="addtrack";_.Fc="ads-timeline-changed";_.Gc="airplay-casting-ended";_.Hc="airplay-casting-started";_.Ic="airplay-status-changed";_.Jc="application/cea-608";_.Kc="application/dash+xml";Lc="application/mp4";_.Mc='application/mp4; codecs\x3d"stpp"';_.Nc='application/mp4; codecs\x3d"wvtt"';_.Oc="application/ttml+xml";_.Pc="application/vnd.ms-sstr+xml";
11
11
  Qc="application/x-www-form-urlencoded";_.p="audio";_.Rc="audio/aac";_.Sc="audio/ac3";_.Tc="audio/eac3";_.Uc="audio/mp4";Vc='audio/mp4;codecs\x3d"mp4a.40.2"';_.Wc="audiobufferchanged";_.Xc="audiotrackchanged";_.Yc="autoplaynotallowed";_.Zc="bitratechanged";_.$c="boolean";_.ad="bufferingended";_.bd="bufferingstarted";cd="canplay";ed="canplaythrough";_.fd="castingstarted";_.id="caststatuschanged";_.jd="cdn-switch-success";_.kd="cenc";_.ld="center";md="certificate-request";nd="change";od="chrome";
12
12
  _.pd="clpp-fill";qd="clpp-hidden";rd="clpp-mc-playlist";sd="clpp-visible";td="clpp.PlayerFleet";_.ud="clpp.cast.CastSender";vd="clpp.drm.HeaderDrm";wd="clpp.drm.eme.AppleEmeManager";xd="clpp.drm.eme.EmeFactory";yd="clpp.native.Player";zd="clpp.plist.McPlaylist";Ad="clpp.utils.Platform";_.Bd="codecs";_.Cd="column-reverse";_.Dd="com.adobe.primetime";_.Ed="com.apple.fps";_.Fd="com.apple.hls.interstitial";Gd="com.apple.quicktime.HLS";_.Hd="com.microsoft.playready";Id="com.microsoft.playready.recommendation";
13
- _.Jd="com.widevine.alpha";_.Kd="config.drm.customData is not defined";_.Ld="content-steering-change";_.Md="content-steering-location-ban-update";Nd="controls";_.Od="cuechange";_.Pd="decoder";_.Qd="destroy()";_.Rd="disabled";_.Sd="div";Td="drm.mediaKeys.end";Ud="drm.mediaKeys.start";Vd="drm.onPlay.end";Wd="drm.onPlay.start";_.Xd="drmexpirationupdate";Yd="drmlicenserequested";ae="drmrenewalstarted";be="drmsessioncreated";_.ce="drmsessionpersisted";_.de="drmsessionupdate";ee="drmtoday";fe="durationchange";
14
- _.ge="ec-3";he="encrypted";_.ie="end";_.je="ended";_.q="error";_.ke="estimatedThroughputKbps";_.le="forced";me="fullscreenElement";_.ne="function";_.oe="height";_.pe="hidden";_.qe="html";_.re="image";_.se="internal-error";te="keystatuseschange";_.ue="left";ve="license-renewal";we="license-request";_.xe="line-left";_.Be="line-right";_.Ce="live-turned-static";_.De="load";_.Ee="loadeddata";_.Fe="loadedmetadata";Ge="loadstart";_.He="main";_.Ie="mdat";_.Je="mdia";_.Ke="message";_.Le="metadata";_.Me="mimeType";
13
+ _.Jd="com.widevine.alpha";_.Kd="config.drm.customData is not defined";_.Ld="content-steering-change";_.Md="content-steering-location-ban-update";Nd="controls";_.Od="cuechange";_.Pd="decoder";_.Qd="destroy()";_.Rd="disabled";_.Sd="div";Td="drm.mediaKeys.end";Ud="drm.mediaKeys.start";Vd="drm.onPlay.end";Wd="drm.onPlay.start";_.Xd="drmexpirationupdate";$d="drmlicenserequested";ae="drmrenewalstarted";be="drmsessioncreated";_.ce="drmsessionpersisted";_.de="drmsessionupdate";ee="drmtoday";fe="durationchange";
14
+ _.ge="ec-3";he="encrypted";_.ie="end";_.je="ended";_.q="error";_.ke="estimatedThroughputKbps";_.le="forced";me="fullscreenElement";_.ne="function";_.oe="height";_.pe="hidden";_.qe="html";_.re="image";_.se="internal-error";te="keystatuseschange";_.ue="left";ve="license-renewal";we="license-request";_.Ae="line-left";_.Be="line-right";_.Ce="live-turned-static";_.De="load";_.Ee="loadeddata";_.Fe="loadedmetadata";Ge="loadstart";_.He="main";_.Ie="mdat";_.Je="mdia";_.Ke="message";_.Le="metadata";_.Me="mimeType";
15
15
  _.Ne="minf";_.Oe="moov";_.Pe="mpd-type-changed";_.Qe="mpeg-dash-callback-event";_.Re="none";_.t="number";_.Se="object";_.Te="onBitrateChanged()";_.Ue="onContentLoaded";_.Ve="onPlayerError()";_.We="onPlayerWillDestroy";_.Xe="onPlayerWillRelease";_.Ye="onStateChanged()";Ze="online-status-changed";_.$e="optional";_.af="org.w3.clearkey";_.bf="output-restricted";_.cf="pause";_.df="persistent";_.ef="persistent-license";ff="picture-in-picture";_.gf="play";hf="player.afterLoad.end";jf="player.afterLoad.start";
16
- kf="player.appendLoad.end";lf="player.appendLoad.start";mf="player.beforeLoad.end";nf="player.beforeLoad.start";of="player.load.end";pf="player.load.start";qf="player.setupPlaylist.end";rf="player.setupPlaylist.start";_.sf="playing";_.tf="playlist-item-changed";_.uf="playlist-modified";wf="playlist.next.end";xf="playlist.next.start";yf="preload-aborted";zf="preload-failed";Af="preloaded";Bf="preloading";_.Cf="prevent";Df="primary-content";_.Ef="progress";_.Ff="px";_.Gf="ratechange";Hf="released";
16
+ kf="player.appendLoad.end";lf="player.appendLoad.start";mf="player.beforeLoad.end";nf="player.beforeLoad.start";of="player.load.end";pf="player.load.start";qf="player.setupPlaylist.end";rf="player.setupPlaylist.start";_.sf="playing";_.tf="playlist-item-changed";_.vf="playlist-modified";wf="playlist.next.end";xf="playlist.next.start";yf="preload-aborted";zf="preload-failed";Af="preloaded";Bf="preloading";_.Cf="prevent";Df="primary-content";_.Ef="progress";_.Ff="px";_.Gf="ratechange";Hf="released";
17
17
  _.If="releasing";Jf="removetrack";_.Kf="required";_.Lf="resize";_.Mf="right";_.Nf="sc-playlist-ended";_.Of="sc-playlist-item-changed";_.Pf="sc-playlist-live-turned-static";_.Qf="sc-playlist-timeline-changed";_.Rf="seeked";_.Sf="seeking";_.Tf="showing";_.Uf="simid-creative-started";_.Vf="simid-creative-stopped";_.Wf="sinf";_.Xf="smooth";Yf="stalled";_.Zf="start";_.$f="statechanged";ag="status-pending";_.bg="stbl";_.cg="string";_.dg="stsd";_.eg="style";_.fg="subtitles-htmlcue";gg="temporary";_.hg="text/vtt";
18
- _.ig="text/xml";_.jg="texttrackchanged";_.kg="timeline-cue-added";_.lg="timeline-cue-enter";_.mg="timeline-cue-exit";_.ng="timeline-cues-changed";_.og="timeupdate";_.pg="tracksadded";_.qg="trak";_.rg="ttml-xml";sg="unauthenticated";_.tg="und";_.ug="unknown";vg="update";_.wg="urn:scte:scte35";_.Ag="urn:scte:scte35:2014";_.Bg="user-seeked";_.Cg="user-seeking";_.Dg="value";Eg="version";_.Fg="vertical-lr";_.Gg="vertical-rl";_.w="video";_.Hg="video/mp2t";_.Ig="video/mp4";_.Jg="videobufferchanged";
18
+ _.ig="text/xml";_.jg="texttrackchanged";_.kg="timeline-cue-added";_.lg="timeline-cue-enter";_.mg="timeline-cue-exit";_.ng="timeline-cues-changed";_.og="timeupdate";_.pg="tracksadded";_.qg="trak";_.rg="ttml-xml";sg="unauthenticated";_.tg="und";_.ug="unknown";vg="update";_.zg="urn:scte:scte35";_.Ag="urn:scte:scte35:2014";_.Bg="user-seeked";_.Cg="user-seeking";_.Dg="value";Eg="version";_.Fg="vertical-lr";_.Gg="vertical-rl";_.w="video";_.Hg="video/mp2t";_.Ig="video/mp4";_.Jg="videobufferchanged";
19
19
  _.Kg="videotrackchanged";_.Lg="vimond-response";Mg="visibilitychange";_.Ng="vtt-xml";_.Og="waiting";_.Pg="waitingforkey";Qg="webkit-org.w3.clearkey";Rg="webkitkeyadded";Sg="webkitkeyerror";Tg="webkitkeymessage";Ug="webkitneedkey";_.Vg="width";Wg="x-dt-csl-tracking-token";Xg="x-dt-follow-up-token";Yg="x-dt-resp-code";_.Zg="yospace-session-ended";_.$g="yospace-session-started";_.ch=function(a){return function(){return _.bh[a].apply(this,arguments)}};
20
20
  dh=function(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}};eh=function(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:dh(a)}};hh=function(a,b){if(b){var c=fh;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&&gh(c,a,{configurable:!0,writable:!0,value:b})}};
21
21
  ih=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 ih(a())};_.z=function(a,b){a=a.split(".");var c=jh;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};
@@ -70,7 +70,7 @@ gk=function(a){const b=new Set;a.forEach(c=>{b.add(`${c.width}x${c.height}`)});i
70
70
  kk=function(a){return a.split("\n").filter(b=>b.trim().startsWith("#EXT-X-STREAM-INF:")).map(b=>{var c=_.Xi(0,b);if(c.getAttribute(_.Tb))throw Error("Playlist contains alternative video streams.");var d=_.J(c,_.Ab);b=d?Number(d.split("x")[0]):null;d=d?Number(d.split("x")[1]):null;var e=_.J(c,_.la);e=e?Number(e):null;var f=_.J(c,"AVERAGE-BANDWIDTH");f=f?Number(f):null;c=_.J(c,_.oa);c=_.nk(_.w,c?c.split(","):[]);return b={bandwidth:e,Wc:f,codec:c,width:b,height:d,mimeType:null}})};
71
71
  lk=function(a,b){return(a=a.split("\n").filter(c=>c.trim().endsWith(".m3u8"))[0])?ck(a,b):null};mk=function(a,b,c){return _.x(function*(){if(!b||!c)return null;var d=yield dk(a,b);d=[ok(d,b),pk(d,b)].filter(Boolean);return _.qk(d,_.w,c)})};ok=function(a,b){return(a=a.split("\n").find(c=>!c.startsWith("#")&&0<c.trim().length))?ck(a,b):null};pk=function(a,b){a=a.split("\n").find(c=>c.startsWith("#EXT-X-MAP:"));return a?(a=_.J(_.Xi(0,a),_.Kb))?ck(a,b):null:null};
72
72
  _.sk=function(a,b,c){for(const d of _.rk)if(d.probe(b,c))return d.create(a);return null};_.tk=function(a){a=_.rk.indexOf(a);0<=a&&_.rk.splice(a,1)};wk=function(a,b){var c=uk;vk.set(`${a.toLowerCase().split(";")[0]}-${c}`,{priority:c,plugin:b})};_.Ak=function(a,b){var c=[xk,yk,zk,uk];for(const d of c)if(c=vk.get(`${a.toLowerCase().split(";")[0]}-${d}`)){const e=c.plugin(),f=e.isSupported(a,b);e.destroy();if(f)return c.plugin}return null};
73
- _.Bk=function(a,b){b&&(a+=';codecs\x3d"'+b+'"');return a.replace(/\s/g,"")};_.Ck=function(a){return a.split(";")[0]};_.Dk=function(a){a=a.split(/\s*;\s*/);a.shift();return(a=a.find(b=>b.startsWith("codecs\x3d")))?a.split("\x3d")[1].replace(/^"|"$/g,"").split(/\s*,\s*/).join(","):""};Hk=function(){if(Ek)return Ek;Fk||(Fk=new _.Gk(()=>{Ek=null}));(Ek=document.querySelector(_.w)||document.querySelector(_.p))||(Ek=document.createElement(_.w));Fk.ia(1);return Ek};_.Ik=function(){return!!navigator.userAgent.match(/Edge?\//)};
73
+ _.Bk=function(a,b){b&&(a+=';codecs\x3d"'+b+'"');return a.replace(/\s/g,"")};_.Ck=function(a){return a.split(";")[0]};_.Dk=function(a){a=a.split(/\s*;\s*/);a.shift();return(a=a.find(b=>b.startsWith("codecs\x3d")))?a.split("\x3d")[1].replace(/^"|"$/g,"").split(/\s*,\s*/).join(","):""};Hk=function(){if(Ek)return Ek;Fk||(Fk=new _.Gk(()=>{Ek=null}));(Ek=document.querySelector(_.w)||document.querySelector(_.p))||(Ek=document.createElement(_.w));Fk.ha(1);return Ek};_.Ik=function(){return!!navigator.userAgent.match(/Edge?\//)};
74
74
  _.Jk=function(a){return(navigator.userAgent||"").includes(a)};_.Kk=function(a){return _.Jk("Tizen"+(a?" "+String(a):""))};Mk=function(a){const b={major:-1,name:_.ug};if(!a)return b;var c=a.replace(/_/g,".");b.name=c;c=c.split(".");1<=c.length&&(b.major=Lk(a,c[0]));2<=c.length&&(b.minor=Lk(a,c[1]));3<=c.length&&(b.patch=Lk(a,c[2]));4<=c.length&&(b.build=Lk(a,c[3]));return b};_.Nk=function(){return _.Jk("Web0S")};_.Pk=function(){return _.Nk()&&79===_.Ok().major};
75
75
  _.Ok=function(){const a=Qk();const b=["ie","edge","opera","firefox","safari",od];var c=Rk();const d=Sk[c];for(let e=0,f=b.length;e<f;e++)if(c=d[b[e]]&&a.match(d[b[e]]))return Mk(c[1]);return Mk("")};_.Tk=function(){return _.Jk("CrKey")};_.Uk=function(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!_.Kk()};_.Vk=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:_.Uk()&&1<navigator.maxTouchPoints};_.Wk=function(){return/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)};
76
76
  Lk=function(a,b){try{return parseInt(b,10)}catch(c){Xk.warn("Unable to parse version number for '"+b+"' from '"+a+"'")}return-1};Yk=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};
@@ -104,7 +104,7 @@ _.Zl=function(a){const b=new Uint8Array(a.length/2);for(let c=0;c<a.length;c+=2)
104
104
  _.bm=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};cm=function(a,b){3===b.type&&(a.f&&(a.g.debug("Attaching tracking token"),b.headers[Wg]=a.f),a.a&&(b.headers[Xg]=a.a))};
105
105
  dm=function(a,b){return b.request&&3===b.request.type&&(a.f=b.headers[Wg],a.a=b.headers[Xg],b=b.headers["x-dt-csl-renewal-info"],a.f&&a.g.debug("Loaded tracking token "+a.f),a.a&&a.g.debug("Loaded followup token "+a.a),b)?(a=JSON.parse(_.ij(_.Yl(b))),{delay:a.renewalPeriod,Gi:{maxAttempts:a.retryCount,baseDelay:1E3*a.retryPeriod,backoffFactor:1,fuzzFactor:0,timeout:0}}):null};_.fm=function(a){_.em[a.I]=a};
106
106
  _.hm=function(a){const b={attemptParameters:_.xj(),enforceSingleSession:!1,delayLicenseRequestUntilPlayed:!1,enableSessionCacheForSkd:!1,ignoreUnrecognizedInitData:!0,Na:{},widevineVersion:_.Jd};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!==
107
- a.ignoreUnrecognizedInitData&&(b.ignoreUnrecognizedInitData=!!a.ignoreUnrecognizedInitData),typeof a.widevineVersion===_.cg&&0<a.widevineVersion.length&&(b.widevineVersion=a.widevineVersion),a.env)){const c=_.em[a.env]||null;if(!c)throw _.Gh(_.ua,_.xb+a.env+_.aa),new _.I(_.F,6,6015,`DRM environment '${a.env}' is missing.`);b.Na=_.gm(c,a.customData)||{};_.pj(a.env.toLowerCase(),ee)&&(b.enforceSingleSession=!0)}return b};
107
+ a.ignoreUnrecognizedInitData&&(b.ignoreUnrecognizedInitData=!!a.ignoreUnrecognizedInitData),typeof a.widevineVersion===_.cg&&0<a.widevineVersion.length&&(b.widevineVersion=a.widevineVersion),a.env)){const c=_.em[a.env]||null;if(!c)throw _.Gh(_.ua,_.wb+a.env+_.aa),new _.I(_.F,6,6015,`DRM environment '${a.env}' is missing.`);b.Na=_.gm(c,a.customData)||{};_.pj(a.env.toLowerCase(),ee)&&(b.enforceSingleSession=!0)}return b};
108
108
  jm=function(a){a=im[a];if(!a)return null;const b=_.il();return b.os===al&&4===b.osVersion.major&&4===b.osVersion.minor?null:new Uint8Array(a)};
109
109
  _.gm=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[_.Jd];if(g){var h=g.licenseUrl;d=Bi(d,g.videoRobustness);e=Bi(e,g.audioRobustness);var k=g.modifiers,l=Ai(b?b.widevineDistinctiveIdentifierRequired:void 0,g.distinctiveIdentifierRequired,!1),m=Ai(b?b.widevinePersistentStateRequired:void 0,g.persistentStateRequired,!1);g=void 0===f?g.serverCertificate:null===f?null:typeof f===_.cg?jm(f):f;c[_.Jd]=
110
110
  {licenseUrl:h,videoRobustness:d,audioRobustness:e,modifiers:k,distinctiveIdentifierRequired:l,persistentStateRequired:m,serverCertificate:g}}(g=a.f[_.Ed])&&(c[_.Ed]={licenseUrl:g.licenseUrl,certificateUrl:g.certificateUrl,modifiers:g.modifiers});h=b?b.playReadyVideoRobustness:void 0;b=b?b.playReadyAudioRobustness:void 0;(g=a.f[_.Hd])&&(c[_.Hd]={licenseUrl:g.licenseUrl,videoRobustness:h||g.videoRobustness,audioRobustness:b||g.audioRobustness,individualizationServer:g.individualizationServer,useLegacySystem:g.useLegacySystem,
@@ -130,7 +130,7 @@ pn=function(a,b){a.a=b;_.Th(a.f);b&&(a.f.on(b,a.h+"needkey",c=>{{const d=new Eve
130
130
  c.sessionId))&&c.ready()}),a.f.on(b,a.h+"keyerror",c=>{var d=nn(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?on(d,_.bf):1===e?on(d,"expired"):on(d,_.se))}}}))};
131
131
  nn=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};on=function(a,b){hn(a.keyStatuses,b);b=new _.D(te);a.dispatchEvent(b)};qn=function(a,b){return a.w?a.w+b.charAt(0).toUpperCase()+b.slice(1):b};
132
132
  sn=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===_.ef)if(c)d=_.K(_.mj("LOAD_SESSION|"+c));else{const f=_.mj("PERSISTENT|"),g=new Uint8Array(f.byteLength+b.byteLength);g.set(f,0);g.set(_.K(b),f.byteLength);d=g}else d=_.K(b)}catch(f){return Promise.reject(f)}a.f=new _.rn;const e=qn(a,"generateKeyRequest");try{a.j[e](a.h,d)}catch(f){if(f.name!==Za)return a.f=null,Promise.reject(f);(new _.Gk(()=>{try{a.j[e](a.h,d)}catch(g){a.f.reject(g),
133
- a.f=null}})).ia(.01)}return a.f};tn=function(a,b,c){if(a.a)a.a.then(()=>tn(a,b,c)).catch(()=>tn(a,b,c));else{a.a=b;if(a.h===Qg){var d=_.ij(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=_.Yl(e.keys[0].k);e=_.Yl(e.keys[0].kid)}else d=_.K(c),e=null;var f=qn(a,"addKey");try{a.j[f](a.h,d,e,a.sessionId)}catch(g){a.a.reject(g),a.a=null}}};
133
+ a.f=null}})).ha(.01)}return a.f};tn=function(a,b,c){if(a.a)a.a.then(()=>tn(a,b,c)).catch(()=>tn(a,b,c));else{a.a=b;if(a.h===Qg){var d=_.ij(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=_.Yl(e.keys[0].k);e=_.Yl(e.keys[0].kid)}else d=_.K(c),e=null;var f=qn(a,"addKey");try{a.j[f](a.h,d,e,a.sessionId)}catch(g){a.a.reject(g),a.a=null}}};
134
134
  wn=function(a,b){var c=un;if(a){var d=c.find(e=>e.a()===a);if(d)return vn.info(Yb+d.a()),d.create();vn.info("Cannot create selected EME manager, falling back to the default.")}if(b&&(d=c.find(e=>e.a()===b)))return vn.info(Yb+d.a()),d.create();c=c[0];if(!c)throw Error("Missing EME managers.");vn.info(Yb+c.a());return c.create()};_.zn=function(a){var b=_.Zl(a);b=parseInt(b.byteLength,10).toString(16);b=_.Zl("12"+b+a);return new xn(yn,a,b)};
135
135
  _.Bn=function(a){const b=new _.An(new DataView(a.buffer,a.byteOffset,a.byteLength),!1);a=_.P(b);var c=_.P(b);c=_.vm(c);var d=_.P(b);const e=d>>>24;d&=16777215;var f=_.tm(b,16);f=_.$l(f);if(0<e){var g=_.P(b);b.skip(16*g)}g=_.P(b);const h=()=>{let u=_.om(b),v=(u&127)>>>0,y=7;for(;128<=u&&28>=y;)u=_.om(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(!_.mm(b))throw Error("not enough data to skip!");while(_.om(b)&128);break;case 1:b.skip(8);break;case 2:b.skip(h());
136
136
  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(;_.mm(b);){var n=h(),r=n&7;n>>>=3;if(2===r){r=h();if(0>r)throw Error(`unable to read length of field ${n}`);r=sm(b,r);2===n?l.push(r):4===n&&(m=r)}else k(r)}_.Gh("Parsed WV PSSH Box","size",a,"name",c,Eg,e,"flags",d,"size",g,"systemId",f,"contentId (base64)",m?_.Wl(m):"","keyIds",l.map(u=>_.$l(u)));return 0<l.length?_.zn(_.$l(l[0])):null};
@@ -138,7 +138,7 @@ _.Cn=function(a){const b=[];b.push(a[3]);b.push(a[2]);b.push(a[1]);b.push(a[0]);
138
138
  _.In=function(a){var b=_.Dn;a:{var c=new _.An(new DataView(a.buffer),!0);_.P(c);for(_.pm(c);_.mm(c);)if(1===_.pm(c)){var d=_.pm(c);c=_.tm(c,d);break a}c=null}c||(c=a);a=kj(c,!0);d=b.j(a,"WRMHEADER");a=d.getAttribute(Eg)||"";d=b.h(d,"DATA");var e=b.h(d,"LA_URL");b=e?b.f(e):"";var f=_.Dn;if(e=f.h(d,"KID"))if(e=f.f(e)){var g=f.h(d,na);f=g?f.f(g):null;e={value:e,se:f}}else e=null;else e=null;d=e?[e]:(e=En(d))?[e]:(d=Fn(d))?d:null;const {value:h="",se:k}=d&&d[0]||{};d=_.Yl(h);d=_.Cn(d);d=_.$l(d);return new _.Gn(_.Hn,
139
139
  d,b,c,a,k)};En=function(a){var b=_.Dn;a=b.h(a,"PROTECTINFO");if(!a)return null;var c=b.h(a,"KID");if(!c)return null;b=c.getAttribute("VALUE");if(!b)return null;a=c.getAttribute(na);c=c.getAttribute("ALGID");return{value:b,se:a,Pg:c}};
140
140
  Fn=function(a){var b=_.Dn;a=b.h(a,"PROTECTINFO");if(!a)return null;a=b.h(a,"KIDS");if(!a)return null;a=b.a(a,"KID");if(!a.length)return null;b=[];for(const c of a)if(a=c.getAttribute("VALUE")){const d=c.getAttribute(na),e=c.getAttribute("ALGID");b.push({value:a,se:d,Pg:e})}return b.length?b:null};_.Kn=function(a){Jn&&performance.mark(a)};_.Mn=function(a,b,c){Jn&&(b=performance.measure(a,b,c),null!=b&&Ln.info(`Step: "${a}" took ${b.duration.toFixed(0)} ms.`))};
141
- Nn=function(a){return _.x(function*(){const b=new Promise(c=>{(new _.Gk(c)).ia(1)});(yield Promise.race([a.close().then(()=>!0),b.then(()=>!1)]))||_.C("Timeout waiting for session close")})};_.Pn=function(a){return On(a)?_.Hd:a};Qn=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};
141
+ Nn=function(a){return _.x(function*(){const b=new Promise(c=>{(new _.Gk(c)).ha(1)});(yield Promise.race([a.close().then(()=>!0),b.then(()=>!1)]))||_.C("Timeout waiting for session close")})};_.Pn=function(a){return On(a)?_.Hd:a};Qn=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};
142
142
  Rn=function(a,b){b=b[_.Pn(a.keySystem)];a.keyIds||(a.keyIds=[]);b&&(a.distinctiveIdentifierRequired||(a.distinctiveIdentifierRequired=b.distinctiveIdentifierRequired),a.persistentStateRequired||(a.persistentStateRequired=b.persistentStateRequired),a.videoRobustness||(a.videoRobustness=b.videoRobustness||""),a.audioRobustness||(a.audioRobustness=b.audioRobustness||""),a.serverCertificate||(a.serverCertificate=b.serverCertificate||null))};
143
143
  _.Sn=function(a,b){b=_.Bk(a.mimeType,b||a.codecs);if(_.Ak(b,a.type)){a=a.type;var c=_.Ak(b,a);c&&(c=c(),b=c.convertCodecs(a,b),c.destroy())}return b};Tn=function(a){for(const b of a.audioCapabilities||[])delete b.robustness;for(const b of a.videoCapabilities||[])delete b.robustness};Vn=function(a){return(a.audioCapabilities||[]).some(Un)||(a.videoCapabilities||[]).some(Un)};
144
144
  Wn=function(a,b){a=_.Cm(b);_.Gh("Using default Content ID extractor. The hostname part from HLS #EXT-X-KEY:URI skd:// will be used.","Extracted Content ID: "+a);return a};
@@ -182,14 +182,14 @@ m=a.f.Na[m];n=(n=m.modifiers)&&n.transformInitData;_.qh(n)||(n=Yn);try{e=n({play
182
182
  a.w(new _.I(_.F,6,6006,{browserError:u.message,error:u,extended:v},u))}})}else a.g.warn("Empty init data")})};Go=function(a){let b=Infinity;a=a.h.keys();for(const c of a)isNaN(c.expiration)||(b=Math.min(b,c.expiration));return b};Do=function(a){a=a.h.values();return _.Yi(a,b=>b.loaded)};Fo=function(a,b,c,d){if(!b&&c!==_.Wf)return!1;d=b||Em(d);for(const e of a.h.values())if(b&&e.keyId===b||b&&e.qb.includes(b)||c===_.Wf&&(e.keyId||Em(e.initData))===d)return!0;return!1};
183
183
  Eo=function(a,b,c,d){d=void 0===d?null:d;if("skd"===b){a:{var e=d;e=void 0===e?null:e;var f=a.keySystem(),g=a.f.Na[f];f=a.D.getConfiguration();g=g&&g.modifiers&&g.modifiers.extractContentId;_.qh(g)||(g=Wn);try{var h={ldlDelay:0,customData:{}};e&&(h=a.h.get(e).sessionContext);var k=g(f,c,h);a.g.debug(`Extracted Content ID '${k}' from SKD`);var l=k;break a}catch(m){a.g.warn("Unable to extract Content ID from SKD",m)}l=""}return l}if(b===_.Wf)return Em(c)||"";if(b===_.kd){l=a.keySystem();try{if(l.match(/^com\.widevine\.alpha/)){const m=
184
184
  _.Bn(c);if(m)return m.a}else if(On(l)){{f=new _.An(new DataView(c.buffer,c.byteOffset,c.byteLength),!1);g=_.P(f);const m=_.P(f);h=_.vm(m);const n=_.P(f);c=n>>>24;k=n&16777215;const r=_.tm(f,16),u=_.$l(r);if(0<c){const E=_.P(f);f.skip(16*E)}const v=_.P(f),y=_.tm(f,v),A=_.In(y);_.Gh("Parsed PR PSSH Box","size",g,"name",h,Eg,c,"flags",k,"size",v,"systemId",u,"keyId",A.a);e=A}if(e)return e.a}}catch(m){throw a.g.warn("Unable to extract Key ID from PSSH data.",{error:m,keySystem:l}),m;}}return""};
185
- to=function(a,b){return _.x(function*(){const c=b.target,d=a.h.get(c);if(d){var e=a.a.licenseServerUri;if(Ho(a,b))yield Io(a,e,b,c,d);else{var f=a.ha;if(0<f&&(a.g.info(`Delaying license request by ${f} s.`),yield Nh(f),a.j))return;var g=a.keySystem(),h=a.f.Na[g];"individualization-request"===b.messageType&&h&&h.individualizationServer&&(e=h.individualizationServer);var k=_.Bj([e],a.f.attemptParameters);k.type=3;k.body=b.message;k.method=_.sb;k.licenseRequestType=b.messageType===we&&d.pc?ve:b.messageType;
185
+ to=function(a,b){return _.x(function*(){const c=b.target,d=a.h.get(c);if(d){var e=a.a.licenseServerUri;if(Ho(a,b))yield Io(a,e,b,c,d);else{var f=a.ja;if(0<f&&(a.g.info(`Delaying license request by ${f} s.`),yield Nh(f),a.j))return;var g=a.keySystem(),h=a.f.Na[g];"individualization-request"===b.messageType&&h&&h.individualizationServer&&(e=h.individualizationServer);var k=_.Bj([e],a.f.attemptParameters);k.type=3;k.body=b.message;k.method=_.sb;k.licenseRequestType=b.messageType===we&&d.pc?ve:b.messageType;
186
186
  k.sessionId=c.sessionId;if(k.licenseRequestType===ve)a.D.onEvent(new _.D(ae));On(a.a.keySystem)&&Jo(a,k);cm(a.M,k);h=String(Math.floor(b.timeStamp));if(f=yield Ko(a,k,d,h,e,c.sessionId,b.messageType,f))if(e=dm(a.M,f),yield Lo(a,c,f.data,d,h))h=Go(a),a.D.onEvent(new _.D(_.de,{keySystem:g,expirationTime:h,expectedRenewalTime:e?Date.now()+1E3*e.delay:Number.NaN})),d.kc&&d.kc.resolve(),d.pc&&(h=d.pc,a.g.info(`Closing expired session '${h.sessionId}'`),Nn(h).catch(()=>{a.g.warn("Unable to close expired session in time")}),
187
- (h=a.h.get(d.pc))&&h.Jc&&h.Jc.stop(),a.h.delete(d.pc),d.pc=null),(new _.Gk(()=>{a.j||(d.loaded=!0,d.kb&&d.kb.resolve(),Do(a)&&(a.A||a.g.info(wa),a.A=!0,a.F=!1,a.H.resolve()))})).ia(5),null!==d.initData&&(0<d.sessionContext.ldlDelay||e&&(_.pj(g,_.Ed)||_.pj(g,_.Hd)))&&(h=new _.Gk(()=>{!a.j&&a.M&&(a.g.info("Updating CSL Sessions"),On(g)?qo(a,d.keyId,d.periodId,d.initDataType,d.initData,c,!0):g.startsWith(_.Ed)&&c.update(_.mj("renew")))}),d.Jc=h,h.ia(e?e.delay:d.sessionContext.ldlDelay))}}else a.g.error(`Session metadata not found for ${c.sessionId}.`)})};
187
+ (h=a.h.get(d.pc))&&h.Jc&&h.Jc.stop(),a.h.delete(d.pc),d.pc=null),(new _.Gk(()=>{a.j||(d.loaded=!0,d.kb&&d.kb.resolve(),Do(a)&&(a.A||a.g.info(wa),a.A=!0,a.F=!1,a.H.resolve()))})).ha(5),null!==d.initData&&(0<d.sessionContext.ldlDelay||e&&(_.pj(g,_.Ed)||_.pj(g,_.Hd)))&&(h=new _.Gk(()=>{!a.j&&a.M&&(a.g.info("Updating CSL Sessions"),On(g)?qo(a,d.keyId,d.periodId,d.initDataType,d.initData,c,!0):g.startsWith(_.Ed)&&c.update(_.mj("renew")))}),d.Jc=h,h.ha(e?e.delay:d.sessionContext.ldlDelay))}}else a.g.error(`Session metadata not found for ${c.sessionId}.`)})};
188
188
  Ho=function(a,b){return!!a.keySystem().match(/^com\.widevine\.alpha/)&&b.message&&2===b.message.byteLength};Io=function(a,b,c,d,e){return _.x(function*(){var f=_.Bj([b],a.f.attemptParameters);f.type=3;f.body=c.message;f.method=_.sb;f.licenseRequestType=md;f.sessionId=d.sessionId;(f=yield Mo(a,f,e,b,d.sessionId,c.messageType))&&(yield Lo(a,d,f.data,e,String(Math.floor(c.timeStamp))))})};
189
189
  Jo=function(a,b){var c=kj(b.body,!0,!0);if(c.includes("PlayReadyKeyMessage")){a.g.debug("Unwrapping PlayReady request.");a=(new DOMParser).parseFromString(c,"application/xml");c=a.getElementsByTagName("HttpHeader");for(let d=0;d<c.length;++d)b.headers[c[d].querySelector("name").textContent]=c[d].querySelector(_.Dg).textContent;b.body=_.Yl(a.querySelector("Challenge").textContent).buffer}else a.g.debug("PlayReady request is already unwrapped."),b.headers[ta]="text/xml; charset\x3dutf-8"};
190
- Ko=function(a,b,c,d,e,f,g,h){return _.x(function*(){a.g.info("License request for "+`SID:'${f}'/KID:'${c.keyId}' `+`from msg '${g}'.`);yield No(a,b,c.sessionContext);a.g.debug("Sending DRM license request to",e,b);a.D.onEvent(new _.D(Yd,{delay:h}));var k=Date.now();_.Kn(`drm.license.req.${d}.start`);var l=null;try{l=yield a.D.yb.fetch(b).V}catch(r){if(a.j)return null;l=r.data.headers;l=Object.assign({message:"Error while fetching DRM license!",url:r.data.url,status:r.data.status,response:r.data.response},
191
- l?{headers:l}:{},fn(l));l=new _.I(_.F,6,6007,l,r);Oo(a,l,c);return null}_.Kn(`drm.license.req.${d}.end`);_.Mn(`drm.license.req.${d}`,`drm.license.req.${d}.start`,`drm.license.req.${d}.end`);k=Date.now()-k;const m=gn(l.headers);m&&(a.ha=m.delay||0);let n="";m&&m.requestId&&(n=` RID:${m.requestId}`);a.g.info("License response for "+`SID:'${f}'/`+`KID:'${c.keyId}' `+`${l.data.byteLength} bytes `+`in ${k}ms${n}`);return a.j?null:l})};
192
- Lo=function(a,b,c,d,e){return _.x(function*(){_.Kn(`drm.sess.update.${e}.start`);try{yield b.update(c)}catch(f){if(a.j)return!1;if(f===Fb)return a.g.info("Ignore update for closed sessions"),!1;const g=new _.I(_.F,6,6008,{browserError:f.message});Oo(a,g,d);return!1}_.Kn(`drm.sess.update.${e}.end`);_.Mn(`drm.sess.update.${e}`,`drm.sess.update.${e}.start`,`drm.sess.update.${e}.end`);return a.j?!1:!0})};
190
+ Ko=function(a,b,c,d,e,f,g,h){return _.x(function*(){a.g.info("License request for "+`SID:'${f}'/KID:'${c.keyId}' `+`from msg '${g}'.`);yield No(a,b,c.sessionContext);a.g.debug("Sending DRM license request to",e,b);a.D.onEvent(new _.D($d,{delay:h}));var k=Date.now();_.Kn(`drm.license.req.${d}.start`);var l=null;try{l=yield a.D.yb.fetch(b).V}catch(r){if(a.j)return null;l=r.data.headers;l=Object.assign({message:"Error while fetching DRM license!",url:r.data.url,status:r.data.status,response:r.data.response},
191
+ l?{headers:l}:{},fn(l));l=new _.I(_.F,6,6007,l,r);Oo(a,l,c);return null}_.Kn(`drm.license.req.${d}.end`);_.Mn(`drm.license.req.${d}`,`drm.license.req.${d}.start`,`drm.license.req.${d}.end`);k=Date.now()-k;const m=gn(l.headers);m&&(a.ja=m.delay||0);let n="";m&&m.requestId&&(n=` RID:${m.requestId}`);a.g.info("License response for "+`SID:'${f}'/`+`KID:'${c.keyId}' `+`${l.data.byteLength} bytes `+`in ${k}ms${n}`);return a.j?null:l})};
192
+ Lo=function(a,b,c,d,e){return _.x(function*(){_.Kn(`drm.sess.update.${e}.start`);try{yield b.update(c)}catch(f){if(a.j)return!1;if(f===Eb)return a.g.info("Ignore update for closed sessions"),!1;const g=new _.I(_.F,6,6008,{browserError:f.message});Oo(a,g,d);return!1}_.Kn(`drm.sess.update.${e}.end`);_.Mn(`drm.sess.update.${e}`,`drm.sess.update.${e}.start`,`drm.sess.update.${e}.end`);return a.j?!1:!0})};
193
193
  Mo=function(a,b,c,d,e,f){return _.x(function*(){a.g.info("WV Server certificate request for "+`SID:'${e} from msg '${f}'.`);yield No(a,b,c.sessionContext);a.g.debug("Sending Widevine certificate request to",d,b);var g=Date.now(),h=null;try{h=yield a.D.yb.fetch(b).V}catch(m){if(a.j)return null;h=m.data.headers;h=Object.assign({message:Ra,url:m.data.url,status:m.data.status,response:m.data.response},h?{headers:h}:{},fn(h));h=new _.I(_.F,6,6100,h,m);Oo(a,h,c);return null}g=Date.now()-g;const k=gn(h.headers);
194
194
  let l="";k&&k.requestId&&(l=` RID:${k.requestId}`);a.g.info("WV Server certificate response for "+`SID:'${e}' `+`${h.data.byteLength} bytes `+`in ${g}ms${l}`);return a.j?null:h})};
195
195
  No=function(a,b,c){return _.x(function*(){const d=a.D.getConfiguration();yield vo(a,d);const e=a.keySystem();var f=a.f.Na[e];const g=(f=f&&f.modifiers)&&f.licenseRequest,h=f&&f.licenseResponse;g?b.requestModifiers.push(k=>g(d,k,c)):e.startsWith(_.Ed)&&b.requestModifiers.push(k=>_.Hm(k));h?b.responseModifiers.push(k=>h(d,k,c)):e.startsWith(_.Ed)&&b.responseModifiers.push(k=>_.Im(k))})};Oo=function(a,b,c){a.j||(a.w(b),c.kc&&c.kc.reject(b),c.kb&&c.kb.reject(b))};
@@ -205,30 +205,30 @@ lp=function(a){a=(new _.Ci(a)).Ka;if(!a)return null;a=a.toUpperCase();return _.q
205
205
  mp=function(a){let b=null;_.sh(a)&&(a={url:a});typeof a===_.Se&&!Array.isArray(a)&&"url"in a&&(b={url:a.url,type:a.type?a.type:null},_.B(a.drmProtected)||typeof a.drmProtected!==_.$c||(b.drmProtected=a.drmProtected),_.B(a.isLive)||typeof a.isLive!==_.$c||(b.isLive=a.isLive),_.B(a.name)||typeof a.name!==_.cg||(b.name=a.name),_.B(a.ac)||typeof a.ac!==_.cg||(b.ac=a.ac),_.B(a.audioMimeType)||typeof a.audioMimeType!==_.cg||(b.audioMimeType=a.audioMimeType));b&&!b.type&&(b.type=lp(a.url),b.type?op.debug("Detect media type "+
206
206
  b.type+" for "+a.url):op.warn("Unable to detect media type for "+a.url));return b};qp=function(a,b){if(a.w)throw new _.I(_.F,7,7E3);a.a||(a.h.on(b,_.q,()=>{{const c=pp(a);if(c)a.onError(c)}}),a.h.on(b,_.Lf,()=>{const c=b.videoWidth,d=b.videoHeight,e=a.getTrackManager();e&&0<c&&0<d&&(e.w={width:c,height:d});a.trigger(new _.D(_.Zc,{detail:{width:c,height:d}}))}),a.a=b)};sp=function(a){const b=_.Uk()?Xn:void 0;return new _.rp(a,b)};
207
207
  tp=function(a){return _.x(function*(){if(a.w)return Promise.reject(new _.I(_.F,7,7E3));var b=a.ga[a.getSourceIndex()];if(!a.configuration.drm||!1===b.drmProtected)return a.log.debug("No DRM configuration present.","Skipping DRM engine initialization"),Promise.resolve();b=_.hm(a.configuration.drm);a.log.debug("Drm configuration: ",b);const c=a.getNetworkEngine();a.o=sp({yb:c,onError:d=>a.onError(d),Ne:()=>{},Me:(d,e)=>{a.trigger(new _.D(_.Xd,{expirationTime:e}))},onEvent:d=>{d instanceof _.D?a.dispatchEvent(d):
208
- a.log.debug(_.Ob,d.type)},getConfiguration:()=>a.getConfiguration(),Oc:()=>a.Oc()});a.o.f=b;yield _.ko(a.o,[{id:0,language:_.tg,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,Fa:0,mimeType:_.Ig,codecs:"",encrypted:!0,keyId:null,language:_.tg,originalLanguage:_.tg,label:null,type:_.w,primary:!1,frameRate:void 0,
208
+ a.log.debug(_.Mb,d.type)},getConfiguration:()=>a.getConfiguration(),Oc:()=>a.Oc()});a.o.f=b;yield _.ko(a.o,[{id:0,language:_.tg,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,Fa:0,mimeType:_.Ig,codecs:"",encrypted:!0,keyId:null,language:_.tg,originalLanguage:_.tg,label:null,type:_.w,primary:!1,frameRate:void 0,
209
209
  Wi:void 0,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,spatialAudio:!1,Hi:null,closedCaptions:null},bandwidth:100,drmInfos:[],allowedByApplication:!0,allowedByKeySystem:!0}]);yield _.Co(a.o,a.a)})};up=function(a,b){kn(a.a,HTMLMediaElement.HAVE_CURRENT_DATA,a.h,()=>{a.getState()!==_.ap&&a.seek(b).catch(c=>{a.log.warn("Error while seeking to start position.",c)})})};
210
210
  pp=function(a){if(null===a.ga||!a.a.error)return null;const b=a.a.error.code;if(1===b)return null;let c=a.a.error.msExtendedCode;c&&(0>c&&(c+=Math.pow(2,32)),c=c.toString(16));return new _.I(_.F,3,3016,{code:b,Ri:c,message:a.a.error.message})};
211
211
  wp=function(a){if(a.w)return new _.vp(Promise.reject(new _.I(_.F,7,7E3)),()=>{});const b=a.ga[a.getSourceIndex()],c=a.configuration.startTime||null,d=a.a,e=a.H;c&&up(a,c);if(d.preload!==_.Re)a.h.one(d,_.Fe,()=>{const g=Date.now()/1E3-e;a.f.B=g;a.log.debug("Time to load: ",g)});d.src=b.url;(_.Kk()||_.Nk())&&d.load();const f=new _.rn;a.h.one(d,Yf,()=>{const g=a.getConfiguration().manifest.attemptParameters.timeout||30;a.B||(a.B=(new _.Gk(()=>{f.reject(new _.I(_.F,3,3100,{message:`Unable to load media source successfully from ${b.url}`,
212
- uri:b.url},d.error))})).ia(g))});kn(d,a.configuration.forceWaitForTracks?HTMLMediaElement.HAVE_CURRENT_DATA:HTMLMediaElement.HAVE_METADATA,a.h,()=>f.resolve());d.error?f.reject(pp(a)):d.preload===_.Re&&(a.log.warn('With \x3cvideo preload\x3d"none"\x3e, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way. Please do not use preload\x3d"none" with PRESTOplay for Web Apps.'),f.resolve());a.h.one(d,_.q,()=>{f.reject(pp(a))});return new _.vp(f,
212
+ uri:b.url},d.error))})).ha(g))});kn(d,a.configuration.forceWaitForTracks?HTMLMediaElement.HAVE_CURRENT_DATA:HTMLMediaElement.HAVE_METADATA,a.h,()=>f.resolve());d.error?f.reject(pp(a)):d.preload===_.Re&&(a.log.warn('With \x3cvideo preload\x3d"none"\x3e, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way. Please do not use preload\x3d"none" with PRESTOplay for Web Apps.'),f.resolve());a.h.one(d,_.q,()=>{f.reject(pp(a))});return new _.vp(f,
213
213
  ()=>{const g=new _.I(_.F,7,7001);f.reject(g);return Promise.resolve()})};xp=function(a,b){kn(b,HTMLMediaElement.HAVE_CURRENT_DATA,a.h,()=>{if(a.isLive()&&a.getState()!==_.ap){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)}))}})};
214
214
  yp=function(a,b){let c=!1;a.h.on(b,_.Sf,()=>{c=b.paused});a.h.on(b,_.Rf,()=>{.2>b.duration-b.currentTime&&b.paused&&!c&&(a.log.warn("Player was auto-paused during seek to the end, auto-resuming."),b.play())})};_.Bp=function(a){0<=zp.indexOf(a)?Ap.warn(`Factory '${a.name()}' is already registered`):(zp.push(a),Ap.info(`Factory '${a.name()}' has been registered.`))};Cp=function(a,b){const c=zp.find(d=>d.a(a,b))||null;c&&Ap.info(`Chosen ads manager: ${c.name()}`);return c};
215
215
  _.Dp=function(a,b){a=document.createElement(a);for(const c in b){const d=b[c];null===d||void 0===d?a.setAttribute(c,""):a.setAttribute(c,d)}return a};_.Ep=function(a,b){a.classList.add(b)};_.Fp=function(a,b){if(a&&typeof b===_.Se)for(const c in b)a.style[c]=b[c]};_.Gp=function(a){return document.createElement(a)};
216
216
  Hp=function(a,b){const c=new MutationObserver(()=>{const d=Array.from(a.h.values());ri(Array.from(b.classList),Array.from(d))||b.classList.add(...d)});c.observe(b,{attributes:!0,attributeFilter:["class"]});return c};Ip=function(a,b){a.a&&0!==b.length&&(a.a.classList.add(b),a.h.add(b))};
217
217
  Jp=function(a,b,c){(_.Nk()&&53===_.Ok().major||_.Nk()&&68===_.Ok().major||_.Pk())&&!b.hasAttribute(Nd)&&(b.style.opacity="0",b.setAttribute(Nd,""),a.j.one(b,fe,()=>{b.removeAttribute(Nd);b.style.opacity="1";c&&(c.style.opacity="1")}))};Kp=function(a){if(a.fb){let b=a.player.getDuration();a.maxDuration&&(b=Math.min(b,a.maxDuration));a.fb.a=b}a.de&&a.de()};Lp=function(a,b){return _.x(function*(){yield a.release();yield a.load(b)})};
218
218
  Mp=function(a){if(a.sideAdContainer)a=a.sideAdContainer;else if(a=a.pg.getSurface().getContainer(),!a)throw Error("Primary player does not have a container");return a};
219
- Op=function(a,b,c){return Array.from({length:2}).map((d,e)=>{var f=document.createElement(_.w);b.appendChild(f);d=a.ja.gb.create();f=new Np(f);d.init(f,c);d.setSourceIndex(0);const g=f.getContainer();if(!g)throw Error("Failed to create player surface container element");g.classList.add("secondary");f.getMedia().classList.add(`v-${e}`);a.A.push(g);return d})};Pp=function(a){return[a.a,...a.l.a.map(b=>b.player)]};
219
+ Op=function(a,b,c){return Array.from({length:2}).map((d,e)=>{var f=document.createElement(_.w);b.appendChild(f);d=a.ia.gb.create();f=new Np(f);d.init(f,c);d.setSourceIndex(0);const g=f.getContainer();if(!g)throw Error("Failed to create player surface container element");g.classList.add("secondary");f.getMedia().classList.add(`v-${e}`);a.A.push(g);return d})};Pp=function(a){return[a.a,...a.l.a.map(b=>b.player)]};
220
220
  Qp=function(a,b,c){const d=b.getSurface().getMedia();b=b.getSurface().getUniqueCssClass();d&&(c?(a.g.debug(`Show video element .${b}`),d.classList.add(sd),d.classList.remove("clpp-hide")):(a.g.debug(`Hide video element .${b}`),d.classList.remove(sd),d.classList.add("clpp-hide")),a.F&&a.F(d,c))};Rp=function(a){return a.h.find(b=>!!b.primary)||null};
221
221
  eq=function(a,b,c){return _.x(function*(){if(a.w)a.g.warn(`Cannot ${c} item while busy (ID: ${b})`);else{var d=Sp(a,b);if(d){a.g.info(`${c} item (ID: ${b})`);a.w=!0;var e=a.f;e&&(e.player.isPaused()||(a.o?e.primary?Tp(a,e.Ja,Up):e.player.pause():e.player.pause()),e.primary?Tp(a,e.Ja,Up):Tp(a,e.Ja,Vp));var f=a.j.has(b);f&&a.j.delete(b);try{c===_.gf?(e&&d.primary?yield Wp(a,d):f?yield Xp(a,d):yield Yp(a,d),Kp(d)):f?a.g.error("Loading preloaded items is not supported"):yield Zp(a,d);$p(a,d);d.primary?
222
222
  Tp(a,d.Ja,Vp):Tp(a,d.Ja,Up);d.fb&&aq(a,d,d.fb);if(d.Da)d.player.one(_.je,d.Da);d.kg&&d.kg(d.player.getDuration())}catch(g){throw a.g.error(`Item failed to ${c} (ID: ${b})`),g;}finally{a.w=!1,e&&bq(a,e),cq(a),dq(a,d.next)}}else a.g.warn(`Item not found (ID: ${b})`)}})};
223
- $p=function(a,b){const c=b.transition;if(c&&!c.hi){if(c.Da){const d=c.Da,e=()=>{a.g.info(`Transition onEnded to (ID: ${d})`);a.play(d)};b.player.one(_.je,e);b.disposers.push(()=>{b.player.off(_.je,e)})}c.be&&fq(a,b,()=>{const d=a.f.fb;d&&(b.disposers.forEach(e=>e()),b.disposers=[],a.a.trigger(new _.D(_.Cc,{ad:d})),a.a.trigger(new _.D(_.nc,{ad:d})),a.a.trigger(new _.D(_.kc,{id:b.Ja})))});c.hi=!0}};
223
+ $p=function(a,b){const c=b.transition;if(c&&!c.hi){if(c.Da){const d=c.Da,e=()=>{a.g.info(`Transition onEnded to (ID: ${d})`);a.play(d)};b.player.one(_.je,e);b.disposers.push(()=>{b.player.off(_.je,e)})}c.be&&fq(a,b,()=>{const d=a.f.fb;d&&(b.disposers.forEach(e=>e()),b.disposers=[],a.a.trigger(new _.D(_.Ac,{ad:d})),a.a.trigger(new _.D(_.nc,{ad:d})),a.a.trigger(new _.D(_.kc,{id:b.Ja})))});c.hi=!0}};
224
224
  gq=function(a,b){return _.x(function*(){a.g.info("Crop ads by playout limit",b);var c=Rp(a),d=a.getCurrentItem();if(c&&d&&d.fb&&null!=c.X){var e=a.h.filter(l=>!l.primary),f=Math.max(...e.map(l=>l.rb));if(b>f)a.g.info("Playout limit is greater than ad pod duration, ignored.");else{var g=d.player.getPosition()+(d.rb-d.duration),h=e.sort((l,m)=>m.rb-l.rb)[0],k=c.X;b<=g?(c.X-=f-g,a.g.warn("Playout limit exceeded, immediately returning "+`to primary at ${c.X.toFixed(1)} instead of `+`${k.toFixed(1)}`),
225
- yield eq(a,c.id,_.gf),h.Da&&h.Da(),c=d.fb,a.a.trigger(new _.D(_.Cc,{ad:c})),a.a.trigger(new _.D(_.nc,{ad:c})),a.a.trigger(new _.D(_.kc,{id:d.Ja}))):(a.g.warn("Limiting playout of ads to",b),(d=e.find(l=>b<=l.rb&&b>=l.rb-l.duration))?(e=b-(d.rb-d.duration),d.fb.a=e,c.X-=f-b,a.g.info("Last ad is now ",d.fb.wb(),"with cropped duration",e,"and primary will resume at",c.X.toFixed(1),"instead of",k.toFixed(1)),h.Da&&(d.Da=h.Da),d.transition={be:{position:e,itemId:c.id,X:c.X}},$p(a,d)):a.g.warn("Cannot find ad hit by limit"))}}})};
225
+ yield eq(a,c.id,_.gf),h.Da&&h.Da(),c=d.fb,a.a.trigger(new _.D(_.Ac,{ad:c})),a.a.trigger(new _.D(_.nc,{ad:c})),a.a.trigger(new _.D(_.kc,{id:d.Ja}))):(a.g.warn("Limiting playout of ads to",b),(d=e.find(l=>b<=l.rb&&b>=l.rb-l.duration))?(e=b-(d.rb-d.duration),d.fb.a=e,c.X-=f-b,a.g.info("Last ad is now ",d.fb.wb(),"with cropped duration",e,"and primary will resume at",c.X.toFixed(1),"instead of",k.toFixed(1)),h.Da&&(d.Da=h.Da),d.transition={be:{position:e,itemId:c.id,X:c.X}},$p(a,d)):a.g.warn("Cannot find ad hit by limit"))}}})};
226
226
  hq=function(a){return _.x(function*(){const b=a.f;b&&("loaded"!==b.state&&(yield b.Rc),yield b.player.play(),b.state=_.sf,Kp(b))})};iq=function(a,b){a.g.info("Add items",b);a.h=a.h.concat(b.map(c=>Object.assign({},c,{state:"idle",disposers:[],preloadPromise:Promise.resolve(),Rc:Promise.resolve()})))};jq=function(a,b){0!==a.h.length&&(b?(a.g.info("Remove items",b),a.h=a.h.filter(c=>!b.includes(c.id))):(a.g.info("Remove all items"),a.h=[]))};Sp=function(a,b){return a.h.find(c=>c.id===b)||null};
227
- Tp=function(a,b,c){a.a.getConfiguration().muted||a.B?(a.a.setMuted(!0),kq(a,!0)):(a.ja.onAudioDecision&&(c=a.ja.onAudioDecision(b)),c===Vp?(a.a.setMuted(!1),kq(a,!0)):c===Up?(a.a.setMuted(!0),kq(a,!1)):a.g.warn("Audio decision not supported",c))};
227
+ Tp=function(a,b,c){a.a.getConfiguration().muted||a.B?(a.a.setMuted(!0),kq(a,!0)):(a.ia.onAudioDecision&&(c=a.ia.onAudioDecision(b)),c===Vp?(a.a.setMuted(!1),kq(a,!0)):c===Up?(a.a.setMuted(!0),kq(a,!1)):a.g.warn("Audio decision not supported",c))};
228
228
  Wp=function(a,b){return _.x(function*(){if(b.player){if(b.state===Bf){a.g.info("Wait for seek to finish");try{yield b.preloadPromise}catch(c){}}b.X&&(yield b.player.seek(b.X,!0));a.f=b;b.role=lq;Qp(a,b.player,!0);b.state="loading";a.o?Tp(a,b.Ja,Vp):yield b.player.play();b.state=_.sf}})};
229
229
  Xp=function(a,b){return _.x(function*(){const c=b.player;if(c){if(b.state===Bf){a.g.info(Vb);try{yield b.preloadPromise}catch(d){}}a.f=b;b.role=lq;Qp(a,c,!0);b.state===Af?yield c.play():b.state===zf&&(yield Lp(c,b.config));b.state=_.sf}})};Yp=function(a,b){return _.x(function*(){yield Zp(a,b);yield b.player.play();b.state=_.sf})};
230
230
  Zp=function(a,b){return _.x(function*(){const c=yield mq(a,!!b.primary);a.f=b;b.role=lq;a.f.player=c;a.f.videoEl=c.getSurface().getMedia();Qp(a,c,!0);b.state="loading";b.Rc=Lp(c,b.config);yield b.Rc;b.state="loaded"})};
231
- aq=function(a,b,c){const d=b.player,e=()=>{const l=d.getPosition(),m=c.getDuration();c.j=l;a.a.trigger(new _.D(_.wc,{ad:c}));!c.l&&l>=m/4&&(c.l=!0,a.a.trigger(new _.D(_.oc,{ad:c})));!c.o&&l>=m/2&&(c.o=!0,a.a.trigger(new _.D(_.uc,{ad:c})));!c.w&&l>=3*m/4&&(c.w=!0,a.a.trigger(new _.D(_.Dc,{ad:c})))},f=()=>{d.isEnded()||a.a.trigger(new _.D(_.vc,{ad:c}))},g=()=>{a.a.trigger(new _.D(_.xc,{ad:c}))},h=()=>{a.a.trigger(new _.D(_.lc,{ad:c}))},k=()=>{a.a.trigger(new _.D(_.Cc,{ad:c}));a.a.trigger(new _.D(_.nc,
231
+ aq=function(a,b,c){const d=b.player,e=()=>{const l=d.getPosition(),m=c.getDuration();c.j=l;a.a.trigger(new _.D(_.wc,{ad:c}));!c.l&&l>=m/4&&(c.l=!0,a.a.trigger(new _.D(_.oc,{ad:c})));!c.o&&l>=m/2&&(c.o=!0,a.a.trigger(new _.D(_.uc,{ad:c})));!c.w&&l>=3*m/4&&(c.w=!0,a.a.trigger(new _.D(_.Dc,{ad:c})))},f=()=>{d.isEnded()||a.a.trigger(new _.D(_.vc,{ad:c}))},g=()=>{a.a.trigger(new _.D(_.xc,{ad:c}))},h=()=>{a.a.trigger(new _.D(_.lc,{ad:c}))},k=()=>{a.a.trigger(new _.D(_.Ac,{ad:c}));a.a.trigger(new _.D(_.nc,
232
232
  {ad:c}));c.h===c.f&&a.a.trigger(new _.D(_.kc,{id:b.Ja}))};d.on(_.og,e);d.on(_.cf,f);d.on(_.sf,g);d.on(_.bd,h);d.one(_.je,k);b.disposers.push(()=>{d.off(_.og,e);d.off(_.cf,f);d.off(_.sf,g);d.off(_.bd,h);d.off(_.je,k)});1===c.h&&a.a.trigger(new _.D(_.jc,{id:b.Ja}));c.videoEl=d.getSurface().getMedia();a.a.trigger(new _.D(_.sc,{ad:c}));a.a.trigger(new _.D(_.zc,{ad:c}))};
233
233
  bq=function(a,b){return _.x(function*(){const c=b.player;b.primary?(a.g.info("Pause primary playback"),a.o||Qp(a,c,!1)):(a.g.info(`Stop previous playback (ID: ${b.id})`),b.disposers.forEach(d=>d()),b.disposers=[],b.player=null,b.videoEl=null,b.role=nq,b.Ve?(a.g.info(`Release player (ID: ${b.id}) `+`after delay ${b.Ve} ms.`),yield new Promise(d=>{setTimeout(()=>_.x(function*(){yield oq(a,c);Qp(a,c,!1);a.a.trigger(new _.D("ad-hls-released"));d()}),b.Ve)})):(yield oq(a,c),Qp(a,c,!1)))})};
234
234
  cq=function(a){return Promise.all(Array.from(a.j.keys()).map(b=>pq(a,b)))};dq=function(a,b){_.x(function*(){if(0!==b.length){a.g.info(`Preload items (IDs: ${b})`);var c=a.h.filter(d=>b.includes(d.id))||[];yield Promise.all(c.map(d=>qq(a,d)))}})};rq=function(a,b){const c=Rp(a);c?c.X=b:a.g.error("Failed to get primary item. Cannot configure resume position.")};sq=function(a){a.A.forEach(b=>a.C.removeChild(b));a.A=[];Qp(a,a.a,!0)};
@@ -239,29 +239,29 @@ qq=function(a,b){return _.x(function*(){if(b.primary){b.state=Bf;a.j.set(b.id,b)
239
239
  e);b.preloadPromise=Lp(d,b.config);yield b.preloadPromise;b.state=Af}catch(e){7001===e.code?(a.g.info(`Preload aborted (ID: ${c})`),b.state=yf):(a.g.warn(`Preload failed (ID: ${c})`,e),b.state=zf)}}})};kq=function(a,b){a.h.filter(c=>!c.primary&&c.player).forEach(c=>c.player.setMuted(b))};xq=function(a){return a.nf&&!(a.once&&a.tg)&&[vq,wq].includes(a.state)};yq=function(a){const b={URI:a.Ba[0].URI,DURATION:a.Ba[0].DURATION};a.ug&&(b[Zb]=a.ug);return{ASSETS:[b]}};
240
240
  zq=function(a){return a&&a.ASSETS&&Array.isArray(a.ASSETS)?a.ASSETS.every(b=>typeof b.URI===_.cg&&typeof b.DURATION===_.t):!1};Aq=function(a,b){const c=a.f.getPosition();b>=c||a.a.filter(d=>1===d.td&&!d.once&&d.gg&&d.startTime>b).forEach(d=>{d.nf=!0})};Bq=function(a,b){return a.a.find(c=>!c.Hh&&1===c.td&&b>c.startTime&&b<c.endTime)||null};Eq=function(a,b,c){return _.x(function*(){if(!(yield Cq(a,b)))throw Error("Failed to bind");yield Dq(a,b,1,!1,c)})};
241
241
  Fq=function(a,b){const c=a.f.getPosition();return a.a.filter(d=>1===d.td&&!d.Wg).sort((d,e)=>e.startTime-d.startTime).find(d=>d.startTime>c&&d.startTime<b)||null};
242
- Mq=function(a,b){const c=()=>_.x(function*(){var e=b.getPosition(),f=Gq(a,e);f&&(a.g.info(`Interstitial ${f.ka} coming up `+`at ${f.startTime} s`),(yield Cq(a,f))&&Hq(a,f,b));if((f=Iq(a))&&f.state===vq&&b.getDuration()-e<a.ja.resolutionOffsetSec&&(yield Cq(a,f)))if(f.Ba&&0!==f.Ba.length){if(e=a.fa.getCurrentItem()){var g=Jq(a,f,2);if(0!==g.length){var h=g[0].id;e.next=[h];e.transition={Da:h};Kq(a,f,g);a.g.info(`Postroll interstitial ${f.ka} scheduled`)}}}else a.g.warn("Postroll interstitial has no assets, ignoring.")});
242
+ Mq=function(a,b){const c=()=>_.x(function*(){var e=b.getPosition(),f=Gq(a,e);f&&(a.g.info(`Interstitial ${f.ka} coming up `+`at ${f.startTime} s`),(yield Cq(a,f))&&Hq(a,f,b));if((f=Iq(a))&&f.state===vq&&b.getDuration()-e<a.ia.resolutionOffsetSec&&(yield Cq(a,f)))if(f.Ba&&0!==f.Ba.length){if(e=a.fa.getCurrentItem()){var g=Jq(a,f,2);if(0!==g.length){var h=g[0].id;e.next=[h];e.transition={Da:h};Kq(a,f,g);a.g.info(`Postroll interstitial ${f.ka} scheduled`)}}}else a.g.warn("Postroll interstitial has no assets, ignoring.")});
243
243
  b.addEventListener(_.og,c);a.h.push(()=>{b.removeEventListener(_.og,c)});const d=()=>{Lq(a,!1,!0,!0)};b.addEventListener(_.ng,d);a.h.push(()=>{b.removeEventListener(_.ng,d)})};Nq=function(a){a.h.forEach(b=>b());a.h=[]};Oq=function(a){return(a=a.fa.getCurrentItem())&&!a.primary?a.player:null};
244
- Lq=function(a,b,c,d){const e=Pq(a);a.g.info("Interstitial cues found",e);var f=e;if(d){f=ui(a.a.map(m=>m.ka),e.map(m=>m.id));Qq(a,f.di);const l=new Set(f.Og);f=e.filter(m=>l.has(m.id))}if(!Rq(a,f))return!1;const g=[],h=[],k=[];f.forEach(l=>{const m=l.customAttributes.CUE||[];m.includes(_.sb)?h.push(l):!d&&m.includes("PRE")?g.push(l):!c&&l.startTime<a.ja.Yh?g.push(l):k.push(l)});1<g.length?a.g.warn("Multiple preroll interstitials not supported. Will display only the 1st one."):g[0]&&Sq(a,g[0],b);k.forEach(l=>
244
+ Lq=function(a,b,c,d){const e=Pq(a);a.g.info("Interstitial cues found",e);var f=e;if(d){f=ui(a.a.map(m=>m.ka),e.map(m=>m.id));Qq(a,f.di);const l=new Set(f.Og);f=e.filter(m=>l.has(m.id))}if(!Rq(a,f))return!1;const g=[],h=[],k=[];f.forEach(l=>{const m=l.customAttributes.CUE||[];m.includes(_.sb)?h.push(l):!d&&m.includes("PRE")?g.push(l):!c&&l.startTime<a.ia.Yh?g.push(l):k.push(l)});1<g.length?a.g.warn("Multiple preroll interstitials not supported. Will display only the 1st one."):g[0]&&Sq(a,g[0],b);k.forEach(l=>
245
245
  Tq(a,l,1));1<h.length?a.g.warn("Multiple postroll interstitials not supported. Will display only the 1st one."):h[0]&&Tq(a,h[0],2);Uq(a,e);a.g.info("Interstitials changed",a.a);return 0<g.length};
246
246
  Vq=function(a){_.x(function*(){var b=a.fa;iq(b,[{id:Df,primary:!0,config:b.a.getConfiguration(),next:[],rb:0,duration:0,Ja:null}]);var c=Rp(b);if(!c)throw Error("Failed to find primary item");b.f=c;c.role=lq;c.player=b.a;c.videoEl=c.player.getSurface().getMedia();Qp(b,c.player,!0);b=a.f;c=b.getConfiguration();a.j=Lq(a,!c.autoplay,b.isLive(),!1);if(a.j){if(b=a.fa,c=b.l,c=c.a[0]?c.a[0].player:null)b.o||Qp(b,b.a,!1),Qp(b,c,!0)}else c.autoplay&&(yield hq(a.fa))})};
247
247
  Pq=function(a){return a.f.getTimelineCues().filter(b=>b.schemeIdUri===_.Fd&&b.customAttributes)};Qq=function(a,b){const c=new Set(b);a.a.forEach(d=>{c.has(d.ka)&&!xq(d)&&a.g.warn("Removing an interstitial in active state",d)});a.a=a.a.filter(d=>!c.has(d.ka))};
248
- Rq=function(a,b){var c=b.sort((h,k)=>h.startTime-k.startTime);const d=a.ja.resolutionOffsetSec;let e=Infinity;const f=[];for(let h=0;h<c.length-1;h++){const k=c[h],l=c[h+1];l&&(e=Math.min(e,l.startTime-k.endTime));l&&l.startTime<=k.endTime&&f.push(`Interstitials ${k.id} and ${l.id} `+"overlap.")}e<d&&(c=e/2,a.ja.resolutionOffsetSec=c,a.g.info("Interstitials are closer than configured "+`resolutionOffsetSec (${d} s) auto-reconfiguring to `+`${c} s.`));const g=[];b.forEach(h=>{const k=h.customAttributes[_.ac];
248
+ Rq=function(a,b){var c=b.sort((h,k)=>h.startTime-k.startTime);const d=a.ia.resolutionOffsetSec;let e=Infinity;const f=[];for(let h=0;h<c.length-1;h++){const k=c[h],l=c[h+1];l&&(e=Math.min(e,l.startTime-k.endTime));l&&l.startTime<=k.endTime&&f.push(`Interstitials ${k.id} and ${l.id} `+"overlap.")}e<d&&(c=e/2,a.ia.resolutionOffsetSec=c,a.g.info("Interstitials are closer than configured "+`resolutionOffsetSec (${d} s) auto-reconfiguring to `+`${c} s.`));const g=[];b.forEach(h=>{const k=h.customAttributes[_.ac];
249
249
  h.customAttributes[_.$b]||k||g.push(`Interstitial cue ${h.id} is invalid `+"it contains neither X-ASSET-LIST nor X-ASSET-URI.")});0<g.length?a.g.error("Invalid interstitials, all interstitials will "+`be skipped. ${g.join(" ")}`):0<f.length&&a.g.warn("Unsupported format of interstitials, playback may not "+`behave correctly. ${f.join(" ")}`);return 0===g.length};
250
250
  Sq=function(a,b,c){_.x(function*(){var d=Tq(a,b,0);const e=yield Cq(a,d),f=d.Ba?d.Ba.length:0;if(e&&0<f)try{{const h=Dq(a,d,0,c);a.g.info(`Preroll interstitial ${d.ka} scheduled`);var g=h}yield g}catch(h){a.g.error("Preroll interstitial failed.",h),(d=Rp(a.fa))&&(yield a.fa.play(d.id))}else e?a.g.warn("Preroll interstitial has no assets, skipping"):(a.g.error("Preroll interstitial failed, skipping"),yield uq(a.fa)),c||(yield hq(a.fa))})};
251
- Tq=function(a,b,c){{const r=b.customAttributes[_.ac],u=b.customAttributes[_.$b],v=b.customAttributes[_.gc],y=b.customAttributes[_.bc];var d=b.customAttributes[_.cc]||[];b.customAttributes[ic]||(b.customAttributes[ic]=null==v||0<v?"RANGE":"POINT");var e=b.id,f=b.startTime,g=b.endTime,h=vq,k=null==v?null:Math.max(0,b.startTime+v),l="POINT"===b.customAttributes[ic],m=!d.includes("SKIP");d=!d.includes("JUMP");{const A=b.customAttributes[Zb];if(A)try{var n=JSON.parse(atob(A))}catch(E){n=null}else n=null}b=
251
+ Tq=function(a,b,c){{const r=b.customAttributes[_.ac],u=b.customAttributes[_.$b],v=b.customAttributes[_.dc],y=b.customAttributes[_.bc];var d=b.customAttributes[_.cc]||[];b.customAttributes[hc]||(b.customAttributes[hc]=null==v||0<v?"RANGE":"POINT");var e=b.id,f=b.startTime,g=b.endTime,h=vq,k=null==v?null:Math.max(0,b.startTime+v),l="POINT"===b.customAttributes[hc],m=!d.includes("SKIP");d=!d.includes("JUMP");{const A=b.customAttributes[Zb];if(A)try{var n=JSON.parse(atob(A))}catch(E){n=null}else n=null}b=
252
252
  {ka:e,startTime:f,endTime:g,state:h,vf:u,wf:r,Ba:null,X:k,fi:v,ec:y,td:c,Hh:l,Xg:m,Wg:d,ug:n,gg:null!=v&&0>v,once:(b.customAttributes.CUE||[]).includes("ONCE"),tg:!1,nf:!0}}a.a.push(b);return b};
253
253
  Uq=function(a,b){_.x(function*(){const c=a.fa.getCurrentItem();if(c)if(c.primary)a.a.forEach(g=>{const h=b.find(k=>k.id===g.ka);if(h){const k=h.customAttributes[_.bc];null==g.ec&&null!=k&&(a.g.info(Rb,h.id,"Playout limit",k),g.ec=k)}});else{var d=b.find(g=>g.id===c.Ja);if(d){var e=d.customAttributes[_.bc];if(null!=e){var f=a.a.find(g=>g.ka===d.id);f&&null==f.ec&&(a.g.info(Rb,d.id,"Playout limit",e),f.ec=e,yield gq(a.fa,e))}}}})};
254
254
  Cq=function(a,b){return _.x(function*(){b.state=Wq;if(b.vf)try{a.g.info(`Load X-ASSET-LIST for ${b.ka}`);a.Ya(new _.D(pc));const c=yield Xq(a,b.vf);b.Ba=c.ASSETS;b.Ba&&0!==b.Ba.length||a.g.info(`Interstitial ${b.ka} has no assets, `+"will be smoothly skipped");if(null==b.X){const d=Si(b.Ba.map(e=>e.DURATION));b.X=b.startTime+(null==b.ec?d:Math.min(b.ec,d))}b.state=Yq;a.Ya(new _.D(qc));a.Ya(new _.D(rc,{id:b.ka,detail:c}))}catch(c){a.g.error("Failed to load X-ASSET-LIST",c),b.state=Zq}else b.wf?(b.Ba=
255
- [{URI:b.wf,DURATION:b.endTime-b.startTime}],a.Ya(new _.D(rc,{id:b.ka,detail:yq(b)})),b.state=Yq):b.state=Zq;return b.state===Yq})};Dq=function(a,b,c,d,e){return _.x(function*(){if(a.fa.getCurrentItem()){var f=Jq(a,b,c);if(0!==f.length){Kq(a,b,f);if(0!==c||!a.f.isLive()){const g=e||b.X;g&&rq(a.fa,g)}d?yield a.fa.load(f[0].id):yield a.fa.play(f[0].id)}}})};Gq=function(a,b){return a.a.find(c=>{const d=c.startTime-b;return 1===c.td&&xq(c)&&0<d&&d<=a.ja.resolutionOffsetSec})||null};
255
+ [{URI:b.wf,DURATION:b.endTime-b.startTime}],a.Ya(new _.D(rc,{id:b.ka,detail:yq(b)})),b.state=Yq):b.state=Zq;return b.state===Yq})};Dq=function(a,b,c,d,e){return _.x(function*(){if(a.fa.getCurrentItem()){var f=Jq(a,b,c);if(0!==f.length){Kq(a,b,f);if(0!==c||!a.f.isLive()){const g=e||b.X;g&&rq(a.fa,g)}d?yield a.fa.load(f[0].id):yield a.fa.play(f[0].id)}}})};Gq=function(a,b){return a.a.find(c=>{const d=c.startTime-b;return 1===c.td&&xq(c)&&0<d&&d<=a.ia.resolutionOffsetSec})||null};
256
256
  Hq=function(a,b,c){if(b.Ba)if(0===b.Ba.length){const g=()=>{c.isLive()?a.g.info("Skipping empty "+`live interstitial ${b.ka}`):null!=b.X&&0!==b.fi?c.seek(b.X):a.g.info(`Empty VOD interstitial ${b.ka}, `+"continuing to next segment")};c.one(_.lg,g);a.h.push(()=>{c.off(_.lg,g)});a.g.info(`Interstitial ${b.ka} scheduled to `+"be skipped")}else{var d=a.fa.getCurrentItem();if(d){var e=Jq(a,b,1);if(0!==e.length){var f=e[0].id;null!=b.X&&rq(a.fa,b.X);d.next=[f];d.transition={be:{position:b.startTime,itemId:f,
257
- X:b.X}};Kq(a,b,e);a.g.info(`Interstitial ${b.ka} scheduled for `+`${b.startTime} s`)}}}};Iq=function(a){return a.a.find(b=>2===b.td)||null};Xq=function(a,b){return _.x(function*(){var c=a.fa.Od();if(!c)throw Error("No player found");c=c.getNetworkEngine();const d=_.Bj($q(a,b));c=yield Oj(c,d);if(!zq(c))throw new _.zi("Invalid X-ASSET-LIST list response");return c})};$q=function(a,b){return(a=a.ja.Xh)?(b=new URL(b),b.searchParams.set("_HLS_primary_id",a),b.toString()):b};
257
+ X:b.X}};Kq(a,b,e);a.g.info(`Interstitial ${b.ka} scheduled for `+`${b.startTime} s`)}}}};Iq=function(a){return a.a.find(b=>2===b.td)||null};Xq=function(a,b){return _.x(function*(){var c=a.fa.Od();if(!c)throw Error("No player found");c=c.getNetworkEngine();const d=_.Bj($q(a,b));c=yield Oj(c,d);if(!zq(c))throw new _.zi("Invalid X-ASSET-LIST list response");return c})};$q=function(a,b){return(a=a.ia.Xh)?(b=new URL(b),b.searchParams.set("_HLS_primary_id",a),b.toString()):b};
258
258
  Jq=function(a,b,c){let d=0,e=b.Ba.map((h,k)=>{const l=`${b.ka}-${k}`;d+=h.DURATION;return{id:l,config:{source:{url:$q(a,h.URI),type:_.zl}},duration:h.DURATION,rb:d,Ja:b.ka,next:[],fb:new Q(c,k+1,b.Ba.length,h.DURATION,b.ka,b.Xg)}});e.forEach((h,k)=>{const l=k===e.length-1;l&&2===c||(l?(h.next=[Df],h.transition={Da:Df}):(k=l?Df:`${h.Ja}-${k+1}`,h.next=[k],h.transition={Da:k}))});e.forEach(h=>{h.de=()=>{a.g.info(`Playing interstitial asset ${h.id}`,h)}});if(null!=b.ec&&(e=ar(a,b,e),0===e.length))return[];
259
- const f=e[0].de;e[0].de=()=>{b.tg=!0;b.gg&&(b.nf=!1);a.g.info(`Playing interstitial ${c} ${b.ka} with `+`${b.Ba.length} assets and will resume primary `+`content ${b.X?`at ${b.X.toFixed(1)} s`:"after interstitial ended"}.`,e);f()};e[0].kg=h=>{null==b.X&&(b.X=b.startTime+h,rq(a.fa,b.X),a.g.info("Primary content will resume at",b.X));b.state=br};const g=e[e.length-1];g.Da=()=>{b.state=wq;jq(a.fa,e.map(h=>h.id));2===c&&uq(a.fa)};g.Ve=a.ja.adReleaseDelayMs;return e};
259
+ const f=e[0].de;e[0].de=()=>{b.tg=!0;b.gg&&(b.nf=!1);a.g.info(`Playing interstitial ${c} ${b.ka} with `+`${b.Ba.length} assets and will resume primary `+`content ${b.X?`at ${b.X.toFixed(1)} s`:"after interstitial ended"}.`,e);f()};e[0].kg=h=>{null==b.X&&(b.X=b.startTime+h,rq(a.fa,b.X),a.g.info("Primary content will resume at",b.X));b.state=br};const g=e[e.length-1];g.Da=()=>{b.state=wq;jq(a.fa,e.map(h=>h.id));2===c&&uq(a.fa)};g.Ve=a.ia.adReleaseDelayMs;return e};
260
260
  Kq=function(a,b,c){iq(a.fa,c);tq(a.fa);b.state=cr;a.Ya(new _.D(_.tc,{detail:null}))};
261
261
  ar=function(a,b,c){const d=b.ec;a.g.info(`Playout limit for ${b.ka} is `+`${d} s`);b=c[c.length-1].rb;if(d>=b)return a.g.info(`Playout limit (${d}) is`+`larger or equal to total duration: (${b}).`),c;if(0>=d)return a.g.info("Discarding all ads."),[];const e=c.filter(f=>f.rb-f.duration<=d);e.forEach(f=>{f.fb.f=e.length});a=e[e.length-1];c=d-(a.rb-a.duration);.1>Math.abs(c-a.duration)?a.transition.Da=Df:a.transition.be={position:c,itemId:Df,X:null};a.maxDuration=c;return e};
262
262
  dr=function(){try{const a=URL.createObjectURL(new Blob);URL.revokeObjectURL(a);return a.slice(a.lastIndexOf("/")+1)}catch(a){let b=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,c=>{const d=(b+16*Math.random())%16|0;b=Math.floor(b/16);return("x"===c?d:d&3|8).toString(16)})}};
263
263
  hr=function(a){a.a.on(window,"offline",()=>{er(a,!1)});a.a.on(window,"online",()=>{a.f||fr(a)});a.a.on(a.m,Yf,()=>gr(a));a.a.on(a.m,"suspend",()=>gr(a));a.a.on(a.m,_.Og,()=>gr(a));a.a.on(a.m,_.sf,()=>{a.f||fr(a)});a.a.on(a.m,_.Ef,()=>{a.f||fr(a)});a.a.on(a.m,_.$f,()=>{switch(a.m.getState()){case _.dp:gr(a);break;default:gr(a)}})};ir=function(a){a.h&&(a.h.stop(),a.h=null)};gr=function(a){a.f&&fr(a)};
264
- jr=function(a){return _.x(function*(){var b=a.m.getConfiguration().connectivityCheck;b&&a.m&&(b=yield Rj(a.j,b.url,b.attemptParameters,b.method),er(a,b))})};fr=function(a){a.m.getConfiguration().connectivityCheck&&(ir(a),a.h=(new _.Gk(()=>jr(a))).ia(5))};er=function(a,b){ir(a);a.f!==b&&(a.f=b,a.m&&a.m.getConfiguration().connectivityCheck&&a.m.trigger(new _.D(Ze,{online:a.f})))};lr=function(){for(let a=0;a<kr.length;++a)kr[a].Fc()};
264
+ jr=function(a){return _.x(function*(){var b=a.m.getConfiguration().connectivityCheck;b&&a.m&&(b=yield Rj(a.j,b.url,b.attemptParameters,b.method),er(a,b))})};fr=function(a){a.m.getConfiguration().connectivityCheck&&(ir(a),a.h=(new _.Gk(()=>jr(a))).ha(5))};er=function(a,b){ir(a);a.f!==b&&(a.f=b,a.m&&a.m.getConfiguration().connectivityCheck&&a.m.trigger(new _.D(Ze,{online:a.f})))};lr=function(){for(let a=0;a<kr.length;++a)kr[a].Fc()};
265
265
  _.mr=function(a){var b=b||0;a={priority:b,Fc:a};for(let c=0;c<kr.length;c++)if(kr[c].priority<b){kr.splice(c,0,a);return}kr.push(a)};nr=function(a,b){a.onError(b);a.release().then(()=>a.destroy())};
266
266
  pr=function(a){var b=or;const c={kty:"RSA",n:b.n,e:b.e},d=a.h+"."+a.f,e=a.j;return new Promise(function(f,g){let h;try{h=window&&window.crypto&&window.crypto.subtle}catch(l){}if(h){var k={name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};h.importKey("jwk",c,k,!1,["verify"]).then(function(l){const m=_.mj(d),n=_.Yl(e);return h.verify(k,l,n.buffer,m.buffer)}).then(function(l){l?f():g(new _.zi("Signature Verification failed",sg))}).catch(g)}else f()})};
267
267
  rr=function(a){if(!a.a){var b=a.f.split(".");if(3!==b.length)throw Error("Expected to find 3 data sections in JWT raw data");b=new qr(b[0],b[1],b[2]);a.a=b}return a.a};sr=function(a){return _.x(function*(){var b=rr(a);try{yield pr(b)}catch(c){if(c&&c.code===sg)throw c;{b=window.location.href;const d=new _.Ci(b);b=d.Ab||d.$a?d:new _.Ci("//"+b)}if(!/(^127\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^192\.168\.)|(^localhost)/.test(b.$a))throw c;}})};
@@ -283,7 +283,7 @@ null;if(!b)throw new _.I(_.F,7,7003,"No player factory compatible with given sou
283
283
  _.es=function(a,b,c){return _.x(function*(){if(a.O)throw new _.I(_.F,7,7E3,"Player is already destroyed.");if(!a.j)throw new _.I(_.F,7,7E3,"No surface associated with this player!");_.Kn(nf);yield a.release();var d=c||_.np(b);if(!b||0===d.length)throw new _.I(_.F,7,7003,lb);a.da=d;a.f=_.Il(a.C,b,{source:d});a.R=!1;d=$r(a,d,a.f);_.Ur(a,d.player,d.gb);as(a,a.a);a.a&&a.a.setSourceIndex(d.sourceIndex);bs(a);a.a&&a.a.setCdnErrorCallback(a.L);cs(a,a.f);ds(a);if(a.f.pauseWhenInBackground)a.$.on(document,
284
284
  Mg,()=>{document.hidden?(a.g.debug("Player is hidden: pausing..."),a.pause()):(a.g.debug("Player is visible: resuming..."),a.play())});Rl(a);yield _.Sr(a,"onContentWillLoad",a.f.source[d.sourceIndex]);_.Kn(mf);_.Mn("player.beforeLoad",nf,mf)})};_.fs=function(a){return _.x(function*(){a.j.getMedia()||a.j.getCastElement();a.trigger(new _.D(Ge));yield Promise.all([a.a.load(a.f),a.h?a.h.load():Promise.resolve()])})};
285
285
  _.hs=function(a){return _.x(function*(){_.Kn(jf);Vr(a,{configuration:a.getConfiguration(),ga:a.Wf(),drmInfo:a.getDrmInfo(),og:Object.keys(a.K),isLive:a.isLive()});gs(a);Sl();yield _.Sr(a,_.Ue);a.f.autoplay&&(a.h?a.h.o():1)&&(yield a.play());_.Kn(hf);_.Mn("player.afterLoad",jf,hf)})};is=function(a){return _.x(function*(){if(a.a){var b=a.a;b.zg?(a.trigger(new _.D(Ge)),yield b.zg(),yield _.hs(a)):a.g.warn(yb)}else a.g.warn(ub)})};
286
- as=function(a,b){try{var c=crypto.randomUUID()}catch(d){c=dr()}a.g.info("Playback session started, ID:",c);b.setPlaybackSessionId(c);a.G=c};bs=function(a){a.a&&a.a.setDrmCustomDataModifier(b=>_.x(function*(){a.Lc&&a.ue&&(a.ue=!1,yield a.Lc(b))}))};cs=function(a,b){if(b=Cp(a,b))a.h=b.create(a)};ds=function(a){a.B=new js(a);a.a.setCmsdManager(a.B)};
286
+ as=function(a,b){try{var c=crypto.randomUUID()}catch(d){c=dr()}a.g.info("Playback session started, ID:",c);b.setPlaybackSessionId(c);a.G=c};bs=function(a){a.a&&a.a.setDrmCustomDataModifier(b=>_.x(function*(){a.Be&&a.Lc&&(yield a.Lc(b))}))};cs=function(a,b){if(b=Cp(a,b))a.h=b.create(a)};ds=function(a){a.B=new js(a);a.a.setCmsdManager(a.B)};
287
287
  ks=function(a){const b=_.pi(a.f.preferredTextLanguage).filter(f=>f),c=a.f.preferForcedSubtitles,d=a.getTrackManager().na().filter(f=>c?f.kind===_.le:f.kind!==_.le);if(0===d.length)c&&a.g.warn("Forced subtitles are configured to be preferred, but no forced subtitles are available.");else{if(c&&0===b.length){var e=a.getTrackManager().ra();e&&e.language?(e=_.Qi(e.language||""),b.push(e)):(e=a.getTrackManager().Ia())&&e.language&&(e=_.Qi(e.language||""),b.push(e));0===b.length&&a.g.warn("Forced subtitles are configured to be preferred, but neither the preferred text language is set, nor the audio or video track language is available to determine which forced subtitles language to select.")}b.some(f=>
288
288
  {const g=_.Qi(f);if(f=d.find(h=>{h=_.Qi(h.language||"");return _.Ri(h,g)}))return a.getTrackManager().Xa(f),!0;c&&a.g.warn("Forced subtitles are configured to be preferred, but no forced subtitles match the preferred languages: ",b);return!1})}};gs=function(a){_.x(function*(){const b=[];if(a.f.remoteTextTracks)for(const c of a.f.remoteTextTracks)b.push(a.getTrackManager().addTextTrack(c));yield Promise.all(b);ks(a)})};ls=function(a){a.J.forEach(b=>b());a.J=[]};
289
289
  os=function(a,b){return _.x(function*(){try{_.Kn(rf);a.M=_.rb;a.Y=!1;const c=b.slice(1).map(d=>({config:d,ga:_.np(d)}));yield _.es(a,b[0]);c.forEach(d=>{ms(a,d.config,d.ga)});a.trigger(new _.D(Ge));yield a.a.setupPlaylist(b);yield _.hs(a);c.forEach(d=>{ns(a,d.config,d.ga)});_.Kn(qf);_.Mn("player.setupPlaylist",rf,qf)}catch(c){if(a.l)throw a.g.info(bb),new _.I(_.F,7,7E3);throw c;}})};
@@ -293,10 +293,10 @@ ms=function(a,b,c){if(0===c.length)throw new _.I(_.F,7,7003,{message:lb,id:b.id}
293
293
  rs=function(a,b){const c=document.getElementById(a);if(!c)throw Error("Anchor element not found");c.classList.add(rd);return Array.from({length:3}).map(()=>{const d=document.createElement(_.w);d.classList.add("clpp-mc-playlist-video-el");const e=document.createElement(_.Sd);e.classList.add("clpp-mc-playlist-item");e.appendChild(d);c.appendChild(e);return new R(d,b)})};
294
294
  ss=function(a,b,c){const d=b.getSurface().getMedia();b=b.getSurface().getUniqueCssClass();d&&(c?(a.g.info(`Show video element .${b}`),d.classList.add(sd)):(a.g.info(`Hide video element .${b}`),d.classList.remove(sd)),a.w&&a.w(d,c))};vs=function(a,b){return _.x(function*(){const c=yield a.o.get();a.f=b;b.role=ts;a.f.player=c;a.f.videoEl=c.getSurface().getMedia();ss(a,c,!0);yield c.load(b.config);us(a,b);b.config.autoplay||(yield c.play())})};
295
295
  zs=function(a){_.x(function*(){if(0===a.a)yield ws(a);else if(a.a===a.h.length-1)yield xs(a);else{const b=[a.a-1,a.a+1];a.g.info(`Preload items (indices: ${b})`);yield Promise.all(b.map(c=>ys(a,c)))}})};
296
- As=function(a,b){return _.x(function*(){if(b.player){if(b.state===Bf){a.g.info(Vb);try{yield b.preloadPromise}catch(c){}}a.f=b;b.role=ts;ss(a,b.player,!0);b.state===Af?(_.Kn(xf),a.ja.preloadMedia?yield b.player.play():yield is(b.player),_.Kn(wf),_.Mn("playlist.next",xf,wf)):b.state===zf&&(yield b.player.load(b.config));us(a,b);b.config.autoplay||(yield b.player.play())}})};
297
- Ds=function(a,b){return _.x(function*(){a.g.info(`Stop current playback (index: ${b.index})`);b.player.pause();ss(a,b.player,!1);yield Bs(a,b);b.player=null;b.videoEl=null;b.role=Cs})};Fs=function(a){return Promise.all(Array.from(a.l.keys()).map(b=>Es(a,b)))};Gs=function(a){return _.x(function*(){yield a.o.destroy();const b=document.getElementById(a.ja.anchorId);b&&(b.classList.remove(rd),b.innerHTML="")})};
298
- Es=function(a,b){return _.x(function*(){const c=a.l.get(b);c&&(a.g.info(`Stop preloading item (index: ${b})`),c.player&&(yield Bs(a,c)),a.l.delete(b))})};Bs=function(a,b){return _.x(function*(){b.disposers.forEach(c=>c());b.disposers=[];b.player&&(yield a.o.release(b.player))})};us=function(a,b){if(a.ja.autoplayNext){const c=()=>{a.g.info("Automatically transition to next item");a.ng()};b.player.on(_.je,c);const d=b.player;b.disposers.push(()=>{d.off(_.je,c)})}};
299
- ys=function(a,b){return _.x(function*(){const c=yield a.o.get(),d=a.h[b];d.player=c;d.videoEl=c.getSurface().getMedia();d.role=Cs;d.state=Bf;a.trigger(new _.D(vg));try{a.l.set(b,d),a.ja.preloadMedia?(d.config.autoplay&&(a.g.warn(ka+`Force disabling autoplay (index: ${b})`),d.config.autoplay=!1),d.preloadPromise=c.load(d.config)):d.preloadPromise=c.preload(d.config),yield d.preloadPromise,d.state=Af,a.trigger(new _.D(vg))}catch(e){7001===e.code?(a.g.info(`Preload aborted (index: ${b})`),d.state=yf):
296
+ As=function(a,b){return _.x(function*(){if(b.player){if(b.state===Bf){a.g.info(Vb);try{yield b.preloadPromise}catch(c){}}a.f=b;b.role=ts;ss(a,b.player,!0);b.state===Af?(_.Kn(xf),a.ia.preloadMedia?yield b.player.play():yield is(b.player),_.Kn(wf),_.Mn("playlist.next",xf,wf)):b.state===zf&&(yield b.player.load(b.config));us(a,b);b.config.autoplay||(yield b.player.play())}})};
297
+ Ds=function(a,b){return _.x(function*(){a.g.info(`Stop current playback (index: ${b.index})`);b.player.pause();ss(a,b.player,!1);yield Bs(a,b);b.player=null;b.videoEl=null;b.role=Cs})};Fs=function(a){return Promise.all(Array.from(a.l.keys()).map(b=>Es(a,b)))};Gs=function(a){return _.x(function*(){yield a.o.destroy();const b=document.getElementById(a.ia.anchorId);b&&(b.classList.remove(rd),b.innerHTML="")})};
298
+ Es=function(a,b){return _.x(function*(){const c=a.l.get(b);c&&(a.g.info(`Stop preloading item (index: ${b})`),c.player&&(yield Bs(a,c)),a.l.delete(b))})};Bs=function(a,b){return _.x(function*(){b.disposers.forEach(c=>c());b.disposers=[];b.player&&(yield a.o.release(b.player))})};us=function(a,b){if(a.ia.autoplayNext){const c=()=>{a.g.info("Automatically transition to next item");a.ng()};b.player.on(_.je,c);const d=b.player;b.disposers.push(()=>{d.off(_.je,c)})}};
299
+ ys=function(a,b){return _.x(function*(){const c=yield a.o.get(),d=a.h[b];d.player=c;d.videoEl=c.getSurface().getMedia();d.role=Cs;d.state=Bf;a.trigger(new _.D(vg));try{a.l.set(b,d),a.ia.preloadMedia?(d.config.autoplay&&(a.g.warn(ka+`Force disabling autoplay (index: ${b})`),d.config.autoplay=!1),d.preloadPromise=c.load(d.config)):d.preloadPromise=c.preload(d.config),yield d.preloadPromise,d.state=Af,a.trigger(new _.D(vg))}catch(e){7001===e.code?(a.g.info(`Preload aborted (index: ${b})`),d.state=yf):
300
300
  (a.g.warn(`Preload failed (index: ${b})`,e),a.trigger(new _.D(_.q,{detail:e})),d.state=zf),a.trigger(new _.D(vg))}})};ws=function(a){return _.x(function*(){const b=a.a+1;a.g.info(`Preload following item (index: ${b})`);yield ys(a,b)})};xs=function(a){return _.x(function*(){const b=a.a-1;a.g.info(`Preload preceding item (index: ${b})`);yield ys(a,b)})};
301
301
  _.Is=function(a){if(Hs.has(a))return Hs.get(a);if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported(a);Hs.set(a,b);return b}return window.MediaSource?(b=MediaSource.isTypeSupported(a),Hs.set(a,b),b):!1};Js=function(a,b){b=b.replace(/mp2t/i,"mp4");a===_.p&&(b=b.replace(_.w,_.p));if(a=/avc1\.(66|77|100)\.(\d+)/.exec(b)){let d="avc1.";var c=a[1];d="66"===c?d+"4200":"77"===c?d+"4d00":d+"6400";c=Number(a[2]);d+=(c>>4).toString(16);d+=(c&15).toString(16);b=b.replace(a[0],d)}return b};
302
302
  Ks=function(a){const b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase();let c;typeof Event===_.ne?c=new Event(b,a):(c=document.createEvent("Event"),c.initEvent(b,a.bubbles,a.cancelable));a.target.dispatchEvent(c)};Ls=function(a){a=a.target;if(a.webkitPresentationMode===ff){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)};
@@ -334,21 +334,21 @@ _.z("clpp.log.setLogLevel",function(a){-1===a&&(a=3);_.sh(a)&&(a=Dh(a));Ah=a});_
334
334
  _.S=class{constructor(a){(this.tag=a)&&void 0===zh[a]&&(zh[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=Bh(this.tag);if(0<=d){if(d<c)return}else if(Ah<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,
335
335
  arguments):2===c?console.warn.apply(console,arguments):1===c?console.error.apply(console,arguments):console.log.apply(console,arguments);for(const e of Lt)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)}bh(a){return a?
336
336
  this.tag?new _.S(this.tag+"."+a):new _.S(a):this}};_.z("clpp.log.Logger",_.S);_.S.prototype.createChild=_.S.prototype.bh;_.S.prototype.error=_.S.prototype.error;_.S.prototype.warn=_.S.prototype.warn;_.S.prototype.debug=_.S.prototype.debug;_.S.prototype.info=_.S.prototype.info;_.S.prototype.log=_.S.prototype.log;var Eh=new _.S("clpp");_.z("clpp.log.info",_.Fh);_.z("clpp.log.debug",_.Gh);_.z("clpp.log.warn",_.C);_.z("clpp.log.error",_.Hh);(function(){const a=console.assert;a?a.bind||(console.assert=function(){a.apply(console,arguments)}):console.assert=function(){}})();var Zr;Zr=class{constructor(a,b){this.gb=a;this.sourceIndex=b}};_.Jh=new _.S("clpp.players");_.Ih={};_.z("clpp.events.ERROR",_.q);_.z("clpp.events.LOADEDMETADATA",_.Fe);_.z("clpp.events.BUFFERING_ENDED",_.ad);_.z("clpp.events.BUFFERING_STARTED",_.bd);_.z("clpp.events.STATE_CHANGED",_.$f);_.z("clpp.events.AUDIO_TRACK_CHANGED",_.Xc);_.z("clpp.events.TEXT_TRACK_CHANGED",_.jg);_.z("clpp.events.VIDEO_TRACK_CHANGED",_.Kg);_.z("clpp.events.BITRATE_CHANGED",_.Zc);_.z("clpp.events.TRACKS_ADDED",_.pg);_.z("clpp.events.LOAD_START",Ge);_.z("clpp.events.RELEASING",_.If);_.z("clpp.events.RELEASED",Hf);
337
- _.z("clpp.events.DESTROYING","destroying");_.z("clpp.events.DESTROYED","destroyed");_.z("clpp.events.VIDEO_BUFFER_CHANGED",_.Jg);_.z("clpp.events.AUDIO_BUFFER_CHANGED",_.Wc);_.z("clpp.events.DOWNLOAD_TRACE","downloadtrace");_.z("clpp.events.DRM_SESSION_CREATED",be);_.z("clpp.events.DRM_SESSION_UPDATE",_.de);_.z("clpp.events.DRM_SESSION_PERSISTED",_.ce);_.z("clpp.events.DRM_RENEWAL_STARTED",ae);_.z("clpp.events.DRM_EXPIRATION_UPDATE",_.Xd);_.z("clpp.events.DRM_LICENSE_REQUESTED",Yd);
337
+ _.z("clpp.events.DESTROYING","destroying");_.z("clpp.events.DESTROYED","destroyed");_.z("clpp.events.VIDEO_BUFFER_CHANGED",_.Jg);_.z("clpp.events.AUDIO_BUFFER_CHANGED",_.Wc);_.z("clpp.events.DOWNLOAD_TRACE","downloadtrace");_.z("clpp.events.DRM_SESSION_CREATED",be);_.z("clpp.events.DRM_SESSION_UPDATE",_.de);_.z("clpp.events.DRM_SESSION_PERSISTED",_.ce);_.z("clpp.events.DRM_RENEWAL_STARTED",ae);_.z("clpp.events.DRM_EXPIRATION_UPDATE",_.Xd);_.z("clpp.events.DRM_LICENSE_REQUESTED",$d);
338
338
  _.z("clpp.events.AUTOPLAY_NOT_ALLOWED",_.Yc);_.z("clpp.events.PLAY",_.gf);_.z("clpp.events.SEEKING",_.Sf);_.z("clpp.events.SEEKED",_.Rf);_.z("clpp.events.USER_SEEKING",_.Cg);_.z("clpp.events.USER_SEEKED",_.Bg);_.fp={SEEKING:1,NO_DATA:2};_.z("clpp.events.BufferingReasons",_.fp);_.z("clpp.events.ADS_TIMELINE_CHANGED",_.Fc);_.z("clpp.events.AD_LOADED",_.tc);_.z("clpp.events.AD_BREAK_STARTED",_.jc);_.z("clpp.events.AD_STARTED",_.zc);_.z("clpp.events.AD_BUFFERING",_.lc);_.z("clpp.events.AD_PROGRESS",_.wc);
339
- _.z("clpp.events.AD_FIRST_QUARTILE",_.oc);_.z("clpp.events.AD_MIDPOINT",_.uc);_.z("clpp.events.AD_THIRD_QUARTILE",_.Dc);_.z("clpp.events.AD_PAUSED",_.vc);_.z("clpp.events.AD_RESUMED",_.xc);_.z("clpp.events.AD_SKIPPED",_.yc);_.z("clpp.events.AD_CLICKED",_.mc);_.z("clpp.events.AD_IMPRESSION",_.sc);_.z("clpp.events.AD_COMPLETED",_.nc);_.z("clpp.events.AD_STOPPED",_.Cc);_.z("clpp.events.AD_BREAK_STOPPED",_.kc);_.z("clpp.events.AD_HLS_ASSET_LIST_REQUEST",pc);
339
+ _.z("clpp.events.AD_FIRST_QUARTILE",_.oc);_.z("clpp.events.AD_MIDPOINT",_.uc);_.z("clpp.events.AD_THIRD_QUARTILE",_.Dc);_.z("clpp.events.AD_PAUSED",_.vc);_.z("clpp.events.AD_RESUMED",_.xc);_.z("clpp.events.AD_SKIPPED",_.yc);_.z("clpp.events.AD_CLICKED",_.mc);_.z("clpp.events.AD_IMPRESSION",_.sc);_.z("clpp.events.AD_COMPLETED",_.nc);_.z("clpp.events.AD_STOPPED",_.Ac);_.z("clpp.events.AD_BREAK_STOPPED",_.kc);_.z("clpp.events.AD_HLS_ASSET_LIST_REQUEST",pc);
340
340
  _.z("clpp.events.AD_HLS_ASSET_LIST_RESPONSE",qc);_.z("clpp.events.AD_HLS_RESOLVED",rc);_.z("clpp.events.SIMID_CREATIVE_STARTED",_.Uf);_.z("clpp.events.SIMID_CREATIVE_STOPPED",_.Vf);_.z("clpp.events.CASTING_STARTED",_.fd);_.z("clpp.events.CASTING_ENDED","castingended");_.z("clpp.events.CAST_STATUS_CHANGED",_.id);_.z("clpp.events.AIRPLAY_STATUS_CHANGED",_.Ic);_.z("clpp.events.AIRPLAY_CASTING_STARTED",_.Hc);_.z("clpp.events.AIRPLAY_CASTING_ENDED",_.Gc);_.z("clpp.events.TIMELINE_CUE_ADDED",_.kg);
341
- _.z("clpp.events.TIMELINE_CUE_ENTER",_.lg);_.z("clpp.events.TIMELINE_CUE_EXIT",_.mg);_.z("clpp.events.TIMELINE_CUES_CHANGED",_.ng);_.z("clpp.events.MPD_TYPE_CHANGED",_.Pe);_.z("clpp.events.LIVE_TURNED_STATIC",_.Ce);_.z("clpp.events.VIMOND_RESPONSE",_.Lg);_.z("clpp.events.PLAYLIST_ITEM_CHANGED",_.tf);_.z("clpp.events.PLAYLIST_MODIFIED",_.uf);_.z("clpp.events.SC_PLAYLIST_TIMELINE_CHANGED",_.Qf);_.z("clpp.events.SC_PLAYLIST_ITEM_CHANGED",_.Of);_.z("clpp.events.SC_PLAYLIST_ENDED",_.Nf);
342
- _.z("clpp.events.SC_PLAYLIST_LIVE_TURNED_STATIC",_.Pf);_.z("clpp.events.CDN_SWITCH_SUCCESS",_.jd);_.z("clpp.events.ONLINE_STATUS_CHANGED",Ze);_.z("clpp.events.CMSD_EVENT","cmsd-event");_.z("clpp.events.YOSPACE_SESSION_STARTED",_.$g);_.z("clpp.events.YOSPACE_SESSION_ENDED",_.Zg);_.z("clpp.events.CONTENT_STEERING_CHANGE",_.Ld);_.z("clpp.events.CONTENT_STEERING_LOCATION_BAN_UPDATE",_.Md);_.Mt=class{constructor(a){this.f=a;this.a=null}ia(a){return Mh(this,a,!1)}Eb(a){return Mh(this,a,!0)}stop(){this.a&&(this.a(),this.a=null)}};_.Gk=class{constructor(a){this.f=a;this.a=null}ff(){this.stop();this.f();return this}ia(a){this.stop();this.a=(new _.Mt(()=>{this.f()})).ia(a);return this}Eb(a){this.stop();this.a=(new _.Mt(()=>{this.f()})).Eb(a);return this}stop(){this.a&&(this.a.stop(),this.a=null)}};_.z("clpp.utils.Timer",_.Gk);_.Gk.prototype.stop=_.Gk.prototype.stop;_.Gk.prototype.tickEvery=_.Gk.prototype.Eb;_.Gk.prototype.tickAfter=_.Gk.prototype.ia;_.Gk.prototype.tickNow=_.Gk.prototype.ff;var Nt=class{constructor(){this.xc=null;this.f=[];this.h=[];this.Wa=new _.S(td);this.a=null;this.j=!1}load(a){const b=this;return _.x(function*(){b.xc?yield Qh(b,c=>_.x(function*(){yield c.load(a)})):b.Wa.warn("No main player, cannot load.")})}mi(a){this.j=a;this.Wa.info("Looping set to",a)}Ng(a){this.f.push(a)}Mg(a){if(this.xc)this.Wa.warn("Main player already set.");else{this.xc=a;var b=this.o.bind(this),c=this.w.bind(this),d=this.l.bind(this);a.on(_.$f,b);a.on(_.og,c);a.on(_.je,d);this.h.push(()=>
341
+ _.z("clpp.events.TIMELINE_CUE_ENTER",_.lg);_.z("clpp.events.TIMELINE_CUE_EXIT",_.mg);_.z("clpp.events.TIMELINE_CUES_CHANGED",_.ng);_.z("clpp.events.MPD_TYPE_CHANGED",_.Pe);_.z("clpp.events.LIVE_TURNED_STATIC",_.Ce);_.z("clpp.events.VIMOND_RESPONSE",_.Lg);_.z("clpp.events.PLAYLIST_ITEM_CHANGED",_.tf);_.z("clpp.events.PLAYLIST_MODIFIED",_.vf);_.z("clpp.events.SC_PLAYLIST_TIMELINE_CHANGED",_.Qf);_.z("clpp.events.SC_PLAYLIST_ITEM_CHANGED",_.Of);_.z("clpp.events.SC_PLAYLIST_ENDED",_.Nf);
342
+ _.z("clpp.events.SC_PLAYLIST_LIVE_TURNED_STATIC",_.Pf);_.z("clpp.events.CDN_SWITCH_SUCCESS",_.jd);_.z("clpp.events.ONLINE_STATUS_CHANGED",Ze);_.z("clpp.events.CMSD_EVENT","cmsd-event");_.z("clpp.events.YOSPACE_SESSION_STARTED",_.$g);_.z("clpp.events.YOSPACE_SESSION_ENDED",_.Zg);_.z("clpp.events.CONTENT_STEERING_CHANGE",_.Ld);_.z("clpp.events.CONTENT_STEERING_LOCATION_BAN_UPDATE",_.Md);_.Mt=class{constructor(a){this.f=a;this.a=null}ha(a){return Mh(this,a,!1)}Eb(a){return Mh(this,a,!0)}stop(){this.a&&(this.a(),this.a=null)}};_.Gk=class{constructor(a){this.f=a;this.a=null}ff(){this.stop();this.f();return this}ha(a){this.stop();this.a=(new _.Mt(()=>{this.f()})).ha(a);return this}Eb(a){this.stop();this.a=(new _.Mt(()=>{this.f()})).Eb(a);return this}stop(){this.a&&(this.a.stop(),this.a=null)}};_.z("clpp.utils.Timer",_.Gk);_.Gk.prototype.stop=_.Gk.prototype.stop;_.Gk.prototype.tickEvery=_.Gk.prototype.Eb;_.Gk.prototype.tickAfter=_.Gk.prototype.ha;_.Gk.prototype.tickNow=_.Gk.prototype.ff;var Nt=class{constructor(){this.xc=null;this.f=[];this.h=[];this.Wa=new _.S(td);this.a=null;this.j=!1}load(a){const b=this;return _.x(function*(){b.xc?yield Qh(b,c=>_.x(function*(){yield c.load(a)})):b.Wa.warn("No main player, cannot load.")})}mi(a){this.j=a;this.Wa.info("Looping set to",a)}Ng(a){this.f.push(a)}Mg(a){if(this.xc)this.Wa.warn("Main player already set.");else{this.xc=a;var b=this.o.bind(this),c=this.w.bind(this),d=this.l.bind(this);a.on(_.$f,b);a.on(_.og,c);a.on(_.je,d);this.h.push(()=>
343
343
  {a.off(_.$f,b);a.off(_.og,c);a.on(_.je,d)})}}clear(){this.xc=null;this.f=[];this.h.forEach(a=>a());this.h=[]}l(){const a=this;return _.x(function*(){a.j&&(a.Wa.info("Looping playback."),yield Qh(a,b=>_.x(function*(){yield b.seek(0);yield b.play()})))})}o(a){this.a||(a=a.detail.currentState,a===_.kp?(this.Wa.info("Mirroring playing."),Rh(this,b=>_.x(function*(){yield b.play()}))):[_.jp,_.dp,_.ap].includes(a)&&(this.Wa.info("Mirroring paused/buffering/error."),Rh(this,b=>{const c=this;return _.x(function*(){var d=
344
344
  Math.round(c.xc.getPosition())-.1;yield b.seek(d);yield Nh(.2);d=b.getState();if(d===_.kp||d===_.dp)yield b.pause()})})))}w(){this.a||Rh(this,a=>{const b=this;return _.x(function*(){a.isPaused()&&(yield a.play());const c=b.xc.getPosition();var d=a.getPosition();d=c-d;const e=Math.abs(d),f=a.getPlaybackRate();if(!(a.getState()!==_.kp||.05>=e)){var g=Math.abs(d);g=Math.min(Math.max(1+(.05>=g?0:g/(1>g?6:3))*Math.sign(d),.2),5);5<=e?(a.setPlaybackRate(1),yield a.seek(c)):f===g?1!==g&&b.Wa.info(`Delta ${d.toFixed(1)} s.`):
345
345
  (1===g?b.Wa.info("Secondary caught up."):1>g?b.Wa.info("Secondary slowing down to catch up. "+`Rate: ${g.toFixed(1)}, delta: ${d.toFixed(1)} s`):1<g&&b.Wa.info("Secondary speeding up to catch up. "+`Rate: ${g.toFixed(1)}, delta: ${d.toFixed(1)} s`),a.setPlaybackRate(g))}})})}};_.z(td,Nt);Nt.prototype.clear=Nt.prototype.clear;Nt.prototype.addMainPlayer=Nt.prototype.Mg;Nt.prototype.addSecondaryPlayer=Nt.prototype.Ng;Nt.prototype.setLoop=Nt.prototype.mi;Nt.prototype.load=Nt.prototype.load;_.Ot=class{constructor(){this.a={}}push(a,b){a in this.a?this.a[a].push(b):this.a[a]=[b]}get(a){return(a=this.a[a])?a.slice():[]}remove(a,b){a=this.a[a];if(!a)return!1;let c=!1;for(let d=0;d<a.length;++d)a[d]===b&&(a.splice(d,1),--d,c=!0);return c}clear(){this.a={}}};var Pt,Qt;Pt=class{constructor(a,b,c,d){this.f=a;this.Fc=b;this.a=c;this.ci=!!d}Ya(a){try{this.Fc.handleEvent?this.Fc.handleEvent(a):this.Fc.call(this.a,a)}catch(b){_.Hh("clpp","Uncaught exception in event handler for event '"+this.f+"'",b,b?b.message:null,b?b.stack:null)}}};
346
346
  _.D=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(){}};
347
347
  Qt=class{constructor(a){this.a=new _.Ot;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].Ya(a),b[c].ci&&this.a.remove(a.type,b[c]),!a||!a.f);c++);}on(a,b,c){this.a.push(a,new Pt(a,b,c||this.f));return b}one(a,b,c){this.a.push(a,new Pt(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].Fc===b&&(d=this.a.remove(a,c[e])||d);return d}clear(){this.a.clear()}};var Rt;_.St=class{constructor(){this.a=new _.Ot}release(){_.Th(this)}on(a,b,c,d=!1){a=new Rt(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||(Sh(f),this.a.remove(b,f))}}};Rt=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 Tt=class{constructor(a){this.m=a;this.l=a.getConfiguration().streaming.addMissingTimelineCues||!1;this.j=new _.St;this.f=new Set;this.a=new Set;this.h=null;this.g=new _.S("clpp.native.Metadata")}release(){this.j.release();this.a=new Set;this.f.clear();null!=this.h&&(clearInterval(this.h),this.h=null)}destroy(){const a=this;return _.x(function*(){a.release()})}getTimelineCues(){return Array.from(this.a.values()).sort((a,b)=>a.startTime-b.startTime)}};_.$t=class{constructor(a,b,c,d){d=void 0===d?_.Ut:d;this.startTime=a;this.endTime=b;this.payload=c;this.payloadType=d;this.positionAlign=this.position=null;this.size=100;this.textAlign=_.Vt;this.writingMode=_.Wt;this.lineInterpretation=_.Xt;this.line=null;this.lineAlign=_.Yt;this.direction=Zt;this.region=null;this.cssClassList=[];this.id=this.backgroundImage="";this.containerRows=null}Mc(a){return this.payload===a.payload&&this.startTime===a.startTime&&this.endTime===a.endTime&&this.payloadType===
348
- a.payloadType}};_.z("clpp.text.Cue",_.$t);_.$t.positionAlign={LEFT:_.xe,RIGHT:_.Be,CENTER:_.ld,AUTO:"auto"};_.Ut="text";_.$t.payloadType={TEXT:_.Ut,VTT_XML:_.Ng,TTML_XML:_.rg};_.Vt=_.ld;_.au={LEFT:_.ue,RIGHT:_.Mf,CENTER:_.Vt,START:_.ue,END:_.Mf};_.$t.textAlign=_.au;var Zt="ltr";_.$t.direction={HORIZONTAL_LEFT_TO_RIGHT:Zt,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};_.Wt="horizontal-tb";_.$t.writingMode={HORIZONTAL_TOP_TO_BOTTOM:_.Wt,VERTICAL_LEFT_TO_RIGHT:_.Fg,VERTICAL_RIGHT_TO_LEFT:_.Gg};_.Xt=0;
348
+ a.payloadType}};_.z("clpp.text.Cue",_.$t);_.$t.positionAlign={LEFT:_.Ae,RIGHT:_.Be,CENTER:_.ld,AUTO:"auto"};_.Ut="text";_.$t.payloadType={TEXT:_.Ut,VTT_XML:_.Ng,TTML_XML:_.rg};_.Vt=_.ld;_.au={LEFT:_.ue,RIGHT:_.Mf,CENTER:_.Vt,START:_.Zf,END:_.ie};_.$t.textAlign=_.au;var Zt="ltr";_.$t.direction={HORIZONTAL_LEFT_TO_RIGHT:Zt,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};_.Wt="horizontal-tb";_.$t.writingMode={HORIZONTAL_TOP_TO_BOTTOM:_.Wt,VERTICAL_LEFT_TO_RIGHT:_.Fg,VERTICAL_RIGHT_TO_LEFT:_.Gg};_.Xt=0;
349
349
  _.$t.lineInterpretation={LINE_NUMBER:_.Xt,PERCENTAGE:1};_.Yt=_.Zf;_.bu={CENTER:_.ld,START:_.Yt,END:_.ie};_.$t.lineAlign=_.bu;_.eu=class{constructor(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=_.cu;this.scroll=du;this.cssClassList=[];this.writingMode=this.displayAlign=null}};_.z("clpp.text.CueRegion",_.eu);_.cu=1;_.eu.units={PX:0,PERCENTAGE:_.cu,LINES:2};var du="";
350
350
  _.eu.scrollMode={NONE:du,UP:"up"};_.eu.displayAlign={BEFORE:"flex-end",CENTER:_.ld,AFTER:"flex-start"};_.eu.writingMode={HORIZONTAL_TOP_TO_BOTTOM:_.Cd,VERTICAL_LEFT_TO_RIGHT:"row-reverse",VERTICAL_RIGHT_TO_LEFT:"row"};var fu=class{constructor(a){this.m=a;this.l=a.getTextDisplayer();this.f=this.h=null;this.a=new _.St;this.j=!1;this.g=new _.S("clpp.native.CueHandler")}destroy(){this.a.release();this.j=!1;this.l=this.a=this.h=this.f=null;return Promise.resolve()}start(a){this.j?this.g.warn("Already started. Ignoring request..."):(this.j=!0,this.h=a,this.f=this.h.textTracks,this.a.on(this.f,_.Ec,b=>vi(this,b)),this.a.on(this.f,nd,()=>{{const b=this.f;for(let c=0;c<b.length;c++){const d=b[c];d.mode===_.Tf&&(d.mode=
351
- _.pe)}}}))}o(a){const b=new _.$t(a.startTime,a.endTime,a.text,_.Ng);if(_.sh(a.vertical))switch(a.vertical){case "lr":b.writingMode=_.Fg;break;case "rl":b.writingMode=_.Gg}_.th(a.size)&&(b.size=a.size);if(_.sh(a.align))switch(a.align){case _.ue:case _.Zf:b.textAlign=_.ue;break;case _.ld:b.textAlign=_.Vt;break;case _.Mf:case _.ie:b.textAlign=_.Mf}_.th(a.position)&&(b.position=a.position);if(_.sh(a.positionAlign))switch(a.positionAlign){case _.xe:b.positionAlign=_.xe;break;case _.ld:b.positionAlign=
351
+ _.pe)}}}))}o(a){const b=new _.$t(a.startTime,a.endTime,a.text,_.Ng);if(_.sh(a.vertical))switch(a.vertical){case "lr":b.writingMode=_.Fg;break;case "rl":b.writingMode=_.Gg}_.th(a.size)&&(b.size=a.size);if(_.sh(a.align))switch(a.align){case _.ue:case _.Zf:b.textAlign=_.Zf;break;case _.ld:b.textAlign=_.Vt;break;case _.Mf:case _.ie:b.textAlign=_.ie}_.th(a.position)&&(b.position=a.position);if(_.sh(a.positionAlign))switch(a.positionAlign){case _.Ae:b.positionAlign=_.Ae;break;case _.ld:b.positionAlign=
352
352
  _.ld;break;case _.Be:b.positionAlign=_.Be}_.th(a.line)&&(b.line=a.line);if(_.sh(a.lineAlign))switch(a.lineAlign){case _.Zf:b.lineAlign=_.Yt;break;case _.ld:b.lineAlign=_.ld;break;case _.ie:b.lineAlign=_.ie}typeof a.snapToLines===_.$c&&(b.lineInterpretation=a.snapToLines?_.Xt:1);return b}};_.I=class extends Error{constructor(a,b,c,d,e){super(wi(a,b,c,d));this.severity=a;this.category=b;this.code=c;this.data=!d||_.sh(d)?{}:d;this.cause=void 0===e?null:e;this.f=!1;Error.captureStackTrace&&Error.captureStackTrace(this,_.I)}a(a){this.severity!==a&&(this.severity=a,this.message=wi(this.severity,this.category,this.code,this.data))}toString(){let a=this.message;this.cause&&(a+=`\n Caused by ${this.cause}`);return a}};_.z("clpp.Error",_.I);_.F=2;_.I.Severity={RECOVERABLE:1,FATAL:_.F};
353
353
  _.I.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,PLUGIN:9,ADS:10};
354
354
  _.I.Code={UNSUPPORTED_SCHEME:1E3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,UNKNOWN_DATA_URI_ENCODING:1005,REQUEST_MODIFIER_ERROR:1006,RESPONSE_MODIFIER_ERROR:1007,MALFORMED_TEST_URI:1008,UNEXPECTED_TEST_REQUEST:1009,ATTEMPTS_EXHAUSTED:1010,INVALID_TEXT_HEADER:2E3,INVALID_TEXT_CUE:2001,UNABLE_TO_DETECT_ENCODING:2003,BAD_ENCODING:2004,INVALID_XML:2005,INVALID_MP4_TTML:2007,INVALID_MP4_VTT:2008,UNABLE_TO_EXTRACT_CUE_START_TIME:2009,FETCH_OR_APPEND_ERROR:2010,INVALID_MP4:2011,
@@ -396,7 +396,7 @@ g&&(e?f():u&&1!==v||f())}catch(n){c.g.error("Error while converting track data",
396
396
  this.h.find(e=>jl(e,c[d],a)))this.a.set(a,b),this.g.debug("Track change detected, id:",b.id),b===this.l.get(a)&&this.l.set(a,null),a===_.M?this.m.trigger(new _.D(_.Xc)):a===_.L&&this.m.trigger(new _.D(_.jg));break}}initialize(a){this.m=a;this.j=new yu(a.getNetworkEngine())}load(){this.A=!1;var a=sl(this,_.L);a&&(this.f.on(a,_.Ec,this.M),this.f.on(a,Jf,this.R),this.f.on(a,nd,this.O));if(a=sl(this,_.M))this.f.on(a,_.Ec,this.J),this.f.on(a,Jf,this.L),this.f.on(a,nd,this.K);if(a=sl(this,_.N))this.f.on(a,
397
397
  _.Ec,this.S),this.f.on(a,Jf,this.W),this.f.on(a,nd,this.U);this.f.one(this.m,ed,this.H.bind(this))}release(){this.A=!0;this.h=[];this.o={};this.a.clear();this.l.clear();this.f.release()}destroy(){this.release();this.m=null}getVideoTracks(){return ql(this,_.N)}getAudioTracks(){return ql(this,_.M)}na(){return ql(this,_.L)}oa(){const a=this.a.get(_.N)||null;if(!a)return null;if(this.w){const b=a.renditions.find(c=>c.width===this.w.width&&c.height===this.w.height);if(b)return b}return a.renditions[0]||
398
398
  null}Ra(){return ul(this,_.M)}Va(){return ul(this,_.L)}vb(){return vl(this,_.N)}Gb(){return vl(this,_.M)}Hb(){return vl(this,_.L)}Ia(){return this.a.get(_.N)||null}ra(){return this.a.get(_.M)||null}xa(){return this.a.get(_.L)||null}Db(a){wl(this,_.N,a)}ya(a){wl(this,_.M,a)}Xa(a){wl(this,_.L,a)}nb(a){wl(this,_.N,a&&a.track)}Bb(a){wl(this,_.M,a&&a.track)}Cb(a){wl(this,_.L,a&&a.track)}addTextTrack(a){const b=this;return _.x(function*(){if(a.mimeType.match(/text\/vtt/)){const c="External_"+`${b.G++}`;
399
- b.o[c]=a;xl(b,a,c)}else yield yl(b,a)})}ua(){return 1>=this.getVideoTracks().flatMap(a=>a.renditions).length}H(){const a=this;return _.x(function*(){const b=a.m.getConfiguration();Al(a,_.M,b.preferredAudioLanguage);if(!tl(a,_.L).some(c=>kl(c))){const c=sl(a,_.L);yield new Promise(d=>{a.f.one(c,nd,d);(new _.Gk(d)).ia(1)})}a.A||Al(a,_.L,b.preferredTextLanguage)})}};U.prototype.isAbrEnabled=U.prototype.ua;U.prototype.addTextTrack=U.prototype.addTextTrack;U.prototype.setTextRendition=U.prototype.Cb;
399
+ b.o[c]=a;xl(b,a,c)}else yield yl(b,a)})}ua(){return 1>=this.getVideoTracks().flatMap(a=>a.renditions).length}H(){const a=this;return _.x(function*(){const b=a.m.getConfiguration();Al(a,_.M,b.preferredAudioLanguage);if(!tl(a,_.L).some(c=>kl(c))){const c=sl(a,_.L);yield new Promise(d=>{a.f.one(c,nd,d);(new _.Gk(d)).ha(1)})}a.A||Al(a,_.L,b.preferredTextLanguage)})}};U.prototype.isAbrEnabled=U.prototype.ua;U.prototype.addTextTrack=U.prototype.addTextTrack;U.prototype.setTextRendition=U.prototype.Cb;
400
400
  U.prototype.setAudioRendition=U.prototype.Bb;U.prototype.setVideoRendition=U.prototype.nb;U.prototype.setTextTrack=U.prototype.Xa;U.prototype.setAudioTrack=U.prototype.ya;U.prototype.setVideoTrack=U.prototype.Db;U.prototype.getTextTrack=U.prototype.xa;U.prototype.getAudioTrack=U.prototype.ra;U.prototype.getVideoTrack=U.prototype.Ia;U.prototype.getLoadingTextRendition=U.prototype.Hb;U.prototype.getLoadingAudioRendition=U.prototype.Gb;U.prototype.getLoadingVideoRendition=U.prototype.vb;
401
401
  U.prototype.getTextRendition=U.prototype.Va;U.prototype.getAudioRendition=U.prototype.Ra;U.prototype.getVideoRendition=U.prototype.oa;U.prototype.getTextTracks=U.prototype.na;U.prototype.getAudioTracks=U.prototype.getAudioTracks;U.prototype.getVideoTracks=U.prototype.getVideoTracks;U.prototype.canSelectVideoTracks=U.prototype.re;_.Bu=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(Jb);}end(a){if(this.f)return this.f.end(a);if(a<this.a.length)return this.a[a].end;throw Error(Jb);}Qa(){return!this.length||1===this.length&&1E-6>this.end(0)-this.start(0)?null:1===this.length&&0>this.start(0)?0:this.start(0)}ma(){return!this.length||1===this.length&&1E-6>this.end(0)-this.start(0)?null:this.end(this.length-
402
402
  1)}Mb(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}Ca(a,b=!1){if(!this.length||1===this.length&&1E-6>this.end(0)-this.start(0))return 0;let c=0;if(b)b=this.ma(),null!=b&&(c=Math.max(0,b-a));else for(b=this.length-1;0<=b&&this.end(b)>a;--b)c+=this.end(b)-Math.max(this.start(b),a);return c}toString(){let a=
@@ -438,9 +438,9 @@ extractContentId:_.Ym,certificateRequest:_.Zm}});c.cb(_.Hd,{licenseUrl:Nm(_.Hd,a
438
438
  persistentState:_.$e,distinctiveIdentifier:_.$e,initDataTypes:a.initDataTypes,sessionTypes:[gg],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),
439
439
  e=!0));d||(e=WebKitMediaKeys.isTypeSupported(this.keySystem,_.Ig));a=e?b:null}if(a){this.a=a;return}}c=Error(Qb);c.name=qb;c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}createMediaKeys(){const a=new Wu(this.keySystem);return Promise.resolve(a)}getConfiguration(){_.Gh("AppleEmeManager.MediaKeySystemAccess.getConfiguration");return this.a}},Wu=class{constructor(a){this.f=null;this.h=new WebKitMediaKeys(a);this.a=new _.St;this.j=0;this.g=new _.S(wd);this.g.info("Created Media Keys for "+a)}createSession(a){a=
440
440
  void 0===a?gg:a;this.g.debug("Creating Apple MediaKeys Session");if(a!==gg)throw new TypeError("Session type "+a+ba);return new Xu(this.h,`__session_${this.j++}`)}setServerCertificate(){this.g.debug("AppleEmeManager.MediaKeys.setServerCertificate");return Promise.resolve(!1)}},Xu=class extends _.Cu{constructor(a,b){super();this.a=null;this.o=a;this.f=this.h=null;this.j=new _.St;this.sessionId=b;this.expiration=NaN;this.closed=new _.rn;this.l=!1;this.keyStatuses=new Tu;this.g=new _.S(wd)}generateRequest(a,
441
- b){if(this.l)return Promise.reject(Fb);this.g.debug("generateRequest");this.h=new _.rn;try{const c=this.o.createSession(_.Ig,_.K(b));this.a=c;this.sessionId=c.sessionId||this.sessionId||"";this.j.on(c,Tg,d=>{{const e=this.keyStatuses.getStatus();this.g.debug(`Received Key Message in ${this.sessionId}`);this.h&&(this.h.resolve(),this.h=null);d=new _.D(_.Ke,{messageType:void 0===e||e===ag?we:ve,message:gj(d.message.buffer)});this.dispatchEvent(d)}});this.j.on(c,Rg,d=>{this.g.debug("onWebkitKeyAdded_",
441
+ b){if(this.l)return Promise.reject(Eb);this.g.debug("generateRequest");this.h=new _.rn;try{const c=this.o.createSession(_.Ig,_.K(b));this.a=c;this.sessionId=c.sessionId||this.sessionId||"";this.j.on(c,Tg,d=>{{const e=this.keyStatuses.getStatus();this.g.debug(`Received Key Message in ${this.sessionId}`);this.h&&(this.h.resolve(),this.h=null);d=new _.D(_.Ke,{messageType:void 0===e||e===ag?we:ve,message:gj(d.message.buffer)});this.dispatchEvent(d)}});this.j.on(c,Rg,d=>{this.g.debug("onWebkitKeyAdded_",
442
442
  d);this.f&&(mn(this,"usable"),this.f.resolve(),this.f=null)});this.j.on(c,Sg,()=>{var d=this.keyStatuses.getStatus();if(this.a&&this.a&&this.a.error&&this.a.error.code===WebKitMediaKeyError.MEDIA_KEYERR_DOMAIN&&d===ag)this.g.warn(`Ignoring webkit key error for session ${this.sessionId}`);else if(this.g.error(`Received key error in session ${this.sessionId} `+`with code ${this.a.error.code}. `+`Session Status ${d}.`),d=Error("EME AppleEmeManager key error"),d.errorCode=this.a.error,null!==this.h)this.h.reject(d),
443
- this.h=null;else if(null!==this.f)this.f.reject(d),this.f=null;else switch(this.a.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:mn(this,"output-not-allowed");break;default:mn(this,_.se)}});mn(this,ag)}catch(c){this.h.reject(c)}return this.h}load(){this.g.debug(_.De);return Promise.reject(Error("MediaKeySession.load not yet supported"))}update(a){if(this.l)return Promise.reject(Fb);this.g.debug(vg);this.f=new _.rn;try{this.a.update(_.K(a))}catch(b){this.f.reject(b)}return this.f}close(){if(this.l)return this.closed;
443
+ this.h=null;else if(null!==this.f)this.f.reject(d),this.f=null;else switch(this.a.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:mn(this,"output-not-allowed");break;default:mn(this,_.se)}});mn(this,ag)}catch(c){this.h.reject(c)}return this.h}load(){this.g.debug(_.De);return Promise.reject(Error("MediaKeySession.load not yet supported"))}update(a){if(this.l)return Promise.reject(Eb);this.g.debug(vg);this.f=new _.rn;try{this.a.update(_.K(a))}catch(b){this.f.reject(b)}return this.f}close(){if(this.l)return this.closed;
444
444
  this.g.info(`Closing Key Session ${this.sessionId}`);this.l=!0;try{this.a.close(),this.closed.resolve(),_.Th(this.j)}catch(a){this.closed.reject(a)}return this.closed}remove(){this.g.debug("remove");return Promise.reject(Error("MediaKeySession is only applicable for persistent licenses, which are not supported on this platform"))}},Yu=class{a(){return Xn}f(){return!!window.WebKitMediaKeys}create(){return new Vu}};var Zu=class{constructor(){this.j=null;this.g=new _.S("clpp.drm.eme.StandardEmeManager")}l(a){this.j=a}h(a){return this.j?this.j.setMediaKeys(a):Promise.reject(fb)}o(){return this.j&&this.j.mediaKeys}a(a,b){this.g.info("Requesting media key system access for",a,b.map(c=>Object.assign({},c,{drmInfos:c.drmInfos.map(()=>"_anonymous_")})));return navigator.requestMediaKeySystemAccess(a,b).catch(c=>{this.g.info("Failed to request media key system access for "+`${a}.`,c);return Promise.reject(c)})}f(){return Bo}},
445
445
  $u=class{a(){return Bo}f(){return!!(window.MediaKeys&&navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)}create(){return new Zu}};var cv=class{constructor(){this.w=this.j=null;this.A="";HTMLMediaElement.prototype.webkitGenerateKeyRequest&&(this.A="webkit")}l(a){this.j=a}h(a){_.Gh("WebkitEmeManager.setMediaKeys");if(!this.j)return Promise.reject(fb);const b=this.w;b&&b!==a&&pn(b,null);(this.w=a)&&pn(a,this.j);return Promise.resolve()}o(){return this.w}a(a,b){_.Gh("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=
446
446
  new av(this.A,c,a,b);return Promise.resolve(e)}catch(e){return Promise.reject(e)}}f(){return bv}},av=class{constructor(a,b,c,d){this.h=a;this.a=this.keySystem=c;a=!1;c===_.af&&(this.a=Qg,a=!1);let e=!1;for(const g of d){d=[];var f=[];let h=!1;if(g.audioCapabilities)for(const k of g.audioCapabilities)k.contentType&&(h=!0,b.canPlayType(k.contentType.split(";")[0],this.a)&&(d.push(k),e=!0));if(g.videoCapabilities)for(const k of g.videoCapabilities)k.contentType&&(h=!0,b.canPlayType(k.contentType,this.a)&&
@@ -450,11 +450,11 @@ new Tu}ready(){_.Gh("WebkitEmeManager.MediaKeySession.ready");on(this,"usable");
450
450
  this.closed;const a=qn(this,"cancelKeyRequest");try{this.j[a](this.h,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed}remove(){_.Gh("WebkitEmeManager.MediaKeySession.remove");return this.l!==_.ef?Promise.reject(Error(nb)):this.close()}},fv=class{a(){return bv}f(){return!(!HTMLMediaElement.prototype.webkitGenerateKeyRequest&&!HTMLMediaElement.prototype.generateKeyRequest)}create(){return new cv}};var hv=class{l(){}h(a){_.Gh("NopEmeManager.setMediaKeys");return null===a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}o(){return null}a(){_.Gh("NopEmeManager.requestMediaKeySystemAccess");return Promise.reject(Error("The key system specified is not supported."))}f(){return gv}},iv=class{a(){return gv}f(){return!0}create(){return new hv}};var jv=class{};_.z(xd,jv);var vn=new _.S(xd),un=[];un=[new $u,new Yu,new fv,new iv].filter(a=>a.f());var Bo="STANDARD",Xn="APPLE",bv="WEBKIT",gv="NOP";jv.Apis={STANDARD:Bo,APPLE:Xn,WEBKIT:bv,NOP:gv};_.kv=class{h(a,b){a=this.a(a,b);return 1!==a.length?null:a[0]}a(a,b){return Array.from(a.childNodes).filter(c=>c instanceof Element&&c.tagName===b)}getAttributeNS(a,b,c){return a.hasAttributeNS(b,c)?a.getAttributeNS(b,c):null}f(a){return Array.from(a.childNodes).every(b=>b.nodeType===Node.TEXT_NODE||b.nodeType===Node.CDATA_SECTION_NODE)?a.textContent.trim():null}j(a,b){const c=new DOMParser;let d=null;try{d=c.parseFromString(a,_.ig)}catch(e){}if(!d)return null;a=d.documentElement;return b&&a.tagName!==
451
451
  b||0<d.getElementsByTagName("parsererror").length?null:a}removeChild(a,b){a.removeChild(b)}};_.ah=_.kv.prototype;_.ah.Bd=_.ch(19);_.ah.ge=_.ch(17);_.ah.Xd=_.ch(15);_.ah.Yd=_.ch(13);_.ah.fe=_.ch(11);_.ah.Hc=_.ch(9);_.ah.Nd=_.ch(7);_.ah.Z=_.ch(5);_.ah.rc=_.ch(3);_.ah.Rb=_.ch(1);_.Dn=new _.kv;_.lv=new _.S("clpp.xml.Parser");_.Fl="dom";var yn,mv,xn;_.Hn=[154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149];yn=[237,239,139,169,121,214,74,206,163,200,39,220,213,29,33,237];mv=class{constructor(a,b,c){this.j=new Uint8Array(a);this.a=b;this.f=c}};xn=class extends mv{};_.Gn=class extends mv{constructor(a,b,c,d,e,f){f=void 0===f?null:f;super(a,b,d);this.version=e;this.h=c;this.l=f}};var Jn=!!(performance&&performance.mark&&performance.measure),Ln=new _.S("clpp.perf");var oo=class{constructor(a){this.f=[];this.h=[];this.a=[];8<=a.byteLength&&(new _.Dm).ea("pssh",this.j.bind(this)).parse(a.buffer);0===this.a.length&&_.C("No pssh box found!")}j(a){if(1<a.version)_.C("Unrecognized PSSH version found!");else{var b=_.$l(_.tm(a.reader,16)),c=[];if(0<a.version){var d=_.P(a.reader);for(let e=0;e<d;++e){const f=_.$l(_.tm(a.reader,16));c.push(f)}}d=_.P(a.reader);a.reader.skip(d);this.h.push.apply(this.h,c);this.f.push(b);this.a.push({start:a.start,end:a.start+a.size-1});
452
452
  a.reader.getPosition()!==a.reader.Sa()&&_.C("Mismatch between box size and data size!")}}};var jo,nv;
453
- _.rp=class{constructor(a,b){this.D=a;this.Ha=b;this.J=new Set;this.C=this.I=this.l=null;this.S=!1;this.a=null;this.K=nv;this.B=new _.St;this.M=new Hu;this.h=new Map;this.L=[];this.H=new _.rn;this.ha=0;this.f=null;this.w=c=>{this.A=!0;this.F=!1;this.H.reject(c);a.onError(c)};this.o=new Map;this.Y=new Map;this.U=new _.Gk(()=>$n(this));this.j=!1;this.da=new _.rn;this.G=!1;this.W=[];this.ba=!1;this.R=0;this.g=new _.S("clpp.drm.DrmEngine");this.$=(new _.Gk(()=>{ao(this)})).Eb(1);this.H.catch(()=>{});this.A=
453
+ _.rp=class{constructor(a,b){this.D=a;this.Ha=b;this.J=new Set;this.C=this.I=this.l=null;this.S=!1;this.a=null;this.K=nv;this.B=new _.St;this.M=new Hu;this.h=new Map;this.L=[];this.H=new _.rn;this.ja=0;this.f=null;this.w=c=>{this.A=!0;this.F=!1;this.H.reject(c);a.onError(c)};this.o=new Map;this.Y=new Map;this.U=new _.Gk(()=>$n(this));this.j=!1;this.da=new _.rn;this.G=!1;this.W=[];this.ba=!1;this.R=0;this.g=new _.S("clpp.drm.DrmEngine");this.$=(new _.Gk(()=>{ao(this)})).Eb(1);this.H.catch(()=>{});this.A=
454
454
  this.F=!1;this.O=null}destroy(){const a=this;return _.x(function*(){a.j?yield a.da:(a.j=!0,yield bo(a),a.da.resolve())})}keySystem(){return this.a?_.Pn(this.a.keySystem):""}getDrmInfo(){return this.a}Aa(a){const b=this;return _.x(function*(){b.G&&b.K===jo||(!b.f.delayLicenseRequestUntilPlayed||b.C&&!b.C.paused||b.ba?yield to(b,a):b.W.push(a))})}va(a){const b=a.target;this.g.info("Key status changed for session",b.sessionId);const c=this.h.get(b);let d=!1;b.keyStatuses.forEach((e,f)=>{if(typeof f===
455
455
  _.cg){var g=f;f=e;e=g}if(On(this.a.keySystem)&&16===f.byteLength&&_.Ik()){g=_.fj(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!==ag&&(c.loaded=!0);c&&c.kb&&c.kb.resolve();"expired"===e&&(d=!0);f=_.K(f);let h=_.$l(f);"00"===h&&c&&c.keyId?h=c.keyId:this.a.keySystem.startsWith(_.Ed)&&16!==f.byteLength&&(h=hj(f));(f=h||"")?this.g.info(`Key status for Key ID '${h}': ${e}`):this.g.info(`Key status global keys: ${e}`);
456
456
  this.o.set(f,e);c&&!c.keyId&&this.h.forEach((k,l)=>{l===b||k.keyId!==h||k.loaded||(k.loaded=!0)})});c&&c.loaded&&c.qb.forEach(e=>{this.o.get(e)===ag&&(this.g.warn(`Key status for Key ID '${e}': 'output-restricted'`),this.o.set(e,_.bf))});for(a=0;a<this.a.initData.length;a++){const e=this.a.initData[a];e.keyId&&this.o.get(e.keyId)===ag&&_.am(e.initData,c.initData)&&(this.g.warn(`Key status for Key ID '${e.keyId}': 'output-restricted'`),this.o.set(e.keyId,_.bf))}a=b.expiration-Date.now();(0>a||d&&1E3>
457
- a)&&c&&!c.kc&&(this.g.debug("Session has expired",b.sessionId),(a=this.h.get(b))&&a.Jc&&a.Jc.stop(),this.h.delete(b),b.close().catch(()=>{}));Do(this)&&(this.H.resolve(),1!==this.h.size||d?this.U.ia(.5):$n(this))}};jo=0;nv=3;_.Po=new Map;_.Qo=new _.S("clpp.text");var ov=class{constructor(){this.a=null;this.f=[]}};var pv=class{constructor(){this.h=this.f=this.j=null;this.a=[]}};_.qv=class{constructor(){this.h=this.w=this.B=this.C=this.l=this.o=this.j=this.A=NaN;this.a=new ov;this.f=new pv}getStats(){return{width:this.A,height:this.j,streamBandwidth:this.w,decodedFrames:this.l,droppedFrames:this.o,corruptedFrames:this.C,estimatedBandwidth:this.h,loadLatency:this.B,playTime:Uo(this.a,_.kp),pauseTime:Uo(this.a,_.jp),bufferingTime:Uo(this.a,_.dp),stateHistory:Vo(this.a),switchHistory:Wo(this.f)}}};var sv=class{constructor(a){this.g=new _.S("clpp.StateManager");this.m=a;this.a=new _.St;this.f=_.hp;this.A=_.rv;this.H=0;this.w=-1;this.K=this.o=this.I=this.B=0;this.j=this.h=this.F=!1;this.G=0;this.l=null;this.J=0;this.L=_.Uk();this.C=!1;this.I=Date.now();bp(this)}Ya(a,b){this.m&&this.m.trigger(new _.D(a,{detail:b}))}getState(){return ep(this,"")}destroy(){this.g.debug("Stop watching for video events for "+this.m.namespace());this.a.release()}};_.z("clpp.utils.media.detectType",lp);var op=new _.S("clpp.sources");var uv=class extends _.Fu{constructor(){super(yd);this.w=this.G=!1;this.l=this.A=this.o=this.a=this.j=null;this.h=new _.St;this.C=this.B=this.f=this.H=null}init(a,b){super.init(a,b);this.j=new sv(this);Zo(this.j,_.hp)}namespace(){return yd}unload(){const a=this;return _.x(function*(){if(a.ga){a.log.debug("Releasing player with source",a.ga);a.B&&(a.B.stop(),a.B=null);var b=a.getTrackManager();b&&b.release();a.A&&(a.A.destroy(),a.A=null);a.O&&(a.O.destroy(),a.O=null);a.l&&a.l.release();a.o&&(a.o.destroy(),
457
+ a)&&c&&!c.kc&&(this.g.debug("Session has expired",b.sessionId),(a=this.h.get(b))&&a.Jc&&a.Jc.stop(),this.h.delete(b),b.close().catch(()=>{}));Do(this)&&(this.H.resolve(),1!==this.h.size||d?this.U.ha(.5):$n(this))}};jo=0;nv=3;_.Po=new Map;_.Qo=new _.S("clpp.text");var ov=class{constructor(){this.a=null;this.f=[]}};var pv=class{constructor(){this.h=this.f=this.j=null;this.a=[]}};_.qv=class{constructor(){this.h=this.w=this.B=this.C=this.l=this.o=this.j=this.A=NaN;this.a=new ov;this.f=new pv}getStats(){return{width:this.A,height:this.j,streamBandwidth:this.w,decodedFrames:this.l,droppedFrames:this.o,corruptedFrames:this.C,estimatedBandwidth:this.h,loadLatency:this.B,playTime:Uo(this.a,_.kp),pauseTime:Uo(this.a,_.jp),bufferingTime:Uo(this.a,_.dp),stateHistory:Vo(this.a),switchHistory:Wo(this.f)}}};var sv=class{constructor(a){this.g=new _.S("clpp.StateManager");this.m=a;this.a=new _.St;this.f=_.hp;this.A=_.rv;this.H=0;this.w=-1;this.K=this.o=this.I=this.B=0;this.j=this.h=this.F=!1;this.G=0;this.l=null;this.J=0;this.L=_.Uk();this.C=!1;this.I=Date.now();bp(this)}Ya(a,b){this.m&&this.m.trigger(new _.D(a,{detail:b}))}getState(){return ep(this,"")}destroy(){this.g.debug("Stop watching for video events for "+this.m.namespace());this.a.release()}};_.z("clpp.utils.media.detectType",lp);var op=new _.S("clpp.sources");var uv=class extends _.Fu{constructor(){super(yd);this.w=this.G=!1;this.l=this.A=this.o=this.a=this.j=null;this.h=new _.St;this.C=this.B=this.f=this.H=null}init(a,b){super.init(a,b);this.j=new sv(this);Zo(this.j,_.hp)}namespace(){return yd}unload(){const a=this;return _.x(function*(){if(a.ga){a.log.debug("Releasing player with source",a.ga);a.B&&(a.B.stop(),a.B=null);var b=a.getTrackManager();b&&b.release();a.A&&(a.A.destroy(),a.A=null);a.O&&(a.O.destroy(),a.O=null);a.l&&a.l.release();a.o&&(a.o.destroy(),
458
458
  a.o=null);_.Th(a.h);a.f&&(a.f=new _.qv);a.C=null;a.ga=null;a.G=!1;a.a&&(a.a.removeAttribute("src"),a.a.load());if(a.w)throw new _.I(_.F,7,7E3);a.a&&(b=a.a,a.h.off(b,_.q),a.h.off(b,_.Lf),a.a=null)}})}release(){return super.release().then(()=>this.unload()).then(()=>{this.j&&Zo(this.j,_.hp)})}destroy(){if(this.w)return this.log.warn("Player is already destroyed!"),Promise.resolve();this.w=!0;return super.destroy().then(()=>this.release()).then(()=>{this.log.debug(za);const a=this.getTrackManager();
459
459
  a&&a.destroy();this.l&&(this.l.destroy().catch(b=>{this.log.warn("Error while disposing metadata handler",b)}),this.l=null);this.j&&(this.j.destroy(),this.j=null);this.f=null})}getDrmInfo(){return this.o?this.o.getDrmInfo():null}getTrackManager(){return this.pb}load(a){const b=this;return _.x(function*(){if(b.w)return Promise.reject(new _.I(_.F,7,7E3));if(!b.getSurface()||!b.getSurface().getMedia())return Promise.reject("No surface or no media element in surface");const c=b.F.getMedia();b.H=Date.now()/
460
460
  1E3;b.f=new _.qv;b.h.on(b,_.$f,()=>{b.f&&_.To(b.f.a,b.getState())});Zo(b.j,_.ip);b.ga=_.np(a);b.configuration=_.Il(b.ba,a);b.log.debug(_.cb,b.configuration);b.log.debug(_.vb,b.ga);const d=_.So(b.configuration,[_.qe,"native"]);b.O=d.create(b);b.O.setTextVisibility(!0);b.configuration.enableHtmlCue&&_.Ll(_.fg)&&!_.Wk()&&(b.A=new fu(b),b.A.start(c));b.l?b.l.release():b.l=new Tt(b);c.textTracks&&oi(b.l,c.textTracks);b.getTrackManager().load();c.loop=!!b.configuration.loop;_.B(b.configuration.volume)||
@@ -473,22 +473,22 @@ HTMLMediaElement))throw new _.I(_.F,7,7005,"Media element is not instance of HTM
473
473
  a):this.g.warn("Player Surface Element has no parent. Can not inject container. You have to manually add playerSurface.getContainer() to the DOM!");var e=[];for(let g=0;g<a.classList.length;g++)e.push(a.classList[g]);for(var f of e)a.classList.remove(f),_.Ep(c,f);c.style.cssText=a.style.cssText;a.removeAttribute(_.eg);for(d of[_.Vg,_.oe])f=a.getAttribute(d),f=parseInt(f,10),isNaN(f)||(c.style[d]=`${f}px`),_.Kk()||a.removeAttribute(d);c.appendChild(a);d=c}d&&(this.a.set(d),Ip(this.a,"clpp-container"),
474
474
  Ip(this.a,this.o),Ip(this.f,_.pd),Ip(this.f,"clpp-video"));b.webOSStartupPatch&&Jp(this,a,d)}}getMedia(){return this.f.get()}getContainer(){return this.a.get()}getSafeContainer(){return this.a}getId(){return this.l}getUniqueCssClass(){return this.o}getCastElement(){return this.h}isFullscreen(){return!!document.fullscreenElement}hideMediaElement(){const a=this.getMedia();a?_.Ep(a,qd):this.g.debug("No media element available that could be hidden")}showMediaElement(){const a=this.getMedia();a?a.classList.remove(qd):
475
475
  this.g.debug("No media element available that could be shown")}addElementToContainer(a,b,c){b=void 0===b?!1:b;c=void 0===c?!1:c;const d=this.getContainer();if(!d)throw Error("No container is available. Unable to add element");b&&_.Ep(a,_.pd);c?d.insertBefore(a,d.firstElementChild):d.appendChild(a)}removeElementFromContainer(a){const b=this.getContainer();if(!b)throw Error("No container is available. Unable to remove element");b.removeChild(a)}hide(a){_.Ep(a,qd)}show(a){a.classList.remove(qd)}release(){this.j.release()}};
476
- Np.prototype.removeElementFromContainer=Np.prototype.removeElementFromContainer;Np.prototype.addElementToContainer=Np.prototype.addElementToContainer;Np.prototype.getCastElement=Np.prototype.getCastElement;Np.prototype.getContainer=Np.prototype.getContainer;Np.prototype.getMedia=Np.prototype.getMedia;var yv={disableContainer:!1,webOSStartupPatch:!0,crossorigin:"anonymous",containerEl:null},zv=1;var Av=class{constructor(a){this.ja=a;this.o=!!a.sideAdContainer;this.h=[];this.a=a.pg;this.C=Mp(a);this.A=[];const b=Op(this,this.C,this.ja.eh);this.l=new wv(b);this.f=null;this.w=!1;this.j=new Map;this.F=a.toggleVisible;this.g=new _.S("clpp.interstitial.MultiController");this.B=!1;Pp(this).forEach(c=>Qp(this,c,!1))}getCurrentItem(){return this.f}Od(){return this.f?this.f.player:null}Sf(){return Array.from(this.j.values())}kd(){return 0<this.j.size}play(a){return eq(this,a,_.gf)}load(a){return eq(this,
477
- a,_.De)}release(){const a=this;return _.x(function*(){yield Promise.all([cq(a),a.f?bq(a,a.f):Promise.resolve()]);a.f=null;a.w=!1;jq(a)})}destroy(){const a=this;return _.x(function*(){a.g.info("Destroy");yield a.release();yield a.l.destroy();sq(a)})}isMuted(){return this.B}},nq="preload",lq=_.He,Vp="primary",Up="ad";var Bv=class extends _.Cu{constructor(a){super();this.ja=_.lh({Yh:.5},a);this.g=new _.S("clpp.interstitial.Player");this.f=a.player;this.f.setSeekInterceptor((b,c)=>{c||Aq(this,b);if(c=Bq(this,b)){if(xq(c))return this.g.info("Seeking into an interstitial",c.ka),Eq(this,c).catch(()=>{this.f.seek(b)}),!1}else{const d=Fq(this,b);d&&!d.gh&&(this.g.info("Trigger interstitial due to jump over it",d,"will resume at",b),Eq(this,d,b).catch(()=>{d.gh=new Date;this.f.seek(b)}))}return!0});this.fa=new Av({eh:this.ja.config,
478
- pg:a.player,preloadMedia:!0,gb:a.gb,sideAdContainer:this.ja.sideAdContainer,onAudioDecision:this.ja.onAudioDecision});this.h=[];this.a=[];this.j=!1;Mq(this,a.player)}destroy(){const a=this;return _.x(function*(){Nq(a);a.a=[];a.j=!1;a.f.setSeekInterceptor(null);yield a.fa.destroy()})}Lb(){return this.j}setMuted(a){var b=this.fa;(b.B=a)?(b.a.setMuted(!0),kq(b,!0)):(a=(a=b.getCurrentItem())?a.Ja:null,Tp(b,a,a?Up:Vp))}isMuted(){return this.fa.isMuted()}isLive(){const a=this.fa.Od();return a?a.isLive():
476
+ Np.prototype.removeElementFromContainer=Np.prototype.removeElementFromContainer;Np.prototype.addElementToContainer=Np.prototype.addElementToContainer;Np.prototype.getCastElement=Np.prototype.getCastElement;Np.prototype.getContainer=Np.prototype.getContainer;Np.prototype.getMedia=Np.prototype.getMedia;var yv={disableContainer:!1,webOSStartupPatch:!0,crossorigin:"anonymous",containerEl:null},zv=1;var Av=class{constructor(a){this.ia=a;this.o=!!a.sideAdContainer;this.h=[];this.a=a.pg;this.C=Mp(a);this.A=[];const b=Op(this,this.C,this.ia.eh);this.l=new wv(b);this.f=null;this.w=!1;this.j=new Map;this.F=a.toggleVisible;this.g=new _.S("clpp.interstitial.MultiController");this.B=!1;Pp(this).forEach(c=>Qp(this,c,!1))}getCurrentItem(){return this.f}Od(){return this.f?this.f.player:null}Sf(){return Array.from(this.j.values())}kd(){return 0<this.j.size}play(a){return eq(this,a,_.gf)}load(a){return eq(this,
477
+ a,_.De)}release(){const a=this;return _.x(function*(){yield Promise.all([cq(a),a.f?bq(a,a.f):Promise.resolve()]);a.f=null;a.w=!1;jq(a)})}destroy(){const a=this;return _.x(function*(){a.g.info("Destroy");yield a.release();yield a.l.destroy();sq(a)})}isMuted(){return this.B}},nq="preload",lq=_.He,Vp="primary",Up="ad";var Bv=class extends _.Cu{constructor(a){super();this.ia=_.lh({Yh:.5},a);this.g=new _.S("clpp.interstitial.Player");this.f=a.player;this.f.setSeekInterceptor((b,c)=>{c||Aq(this,b);if(c=Bq(this,b)){if(xq(c))return this.g.info("Seeking into an interstitial",c.ka),Eq(this,c).catch(()=>{this.f.seek(b)}),!1}else{const d=Fq(this,b);d&&!d.gh&&(this.g.info("Trigger interstitial due to jump over it",d,"will resume at",b),Eq(this,d,b).catch(()=>{d.gh=new Date;this.f.seek(b)}))}return!0});this.fa=new Av({eh:this.ia.config,
478
+ pg:a.player,preloadMedia:!0,gb:a.gb,sideAdContainer:this.ia.sideAdContainer,onAudioDecision:this.ia.onAudioDecision});this.h=[];this.a=[];this.j=!1;Mq(this,a.player)}destroy(){const a=this;return _.x(function*(){Nq(a);a.a=[];a.j=!1;a.f.setSeekInterceptor(null);yield a.fa.destroy()})}Lb(){return this.j}setMuted(a){var b=this.fa;(b.B=a)?(b.a.setMuted(!0),kq(b,!0)):(a=(a=b.getCurrentItem())?a.Ja:null,Tp(b,a,a?Up:Vp))}isMuted(){return this.fa.isMuted()}isLive(){const a=this.fa.Od();return a?a.isLive():
479
479
  null}Ya(a){this.f.trigger(a)}},vq=0,Wq=1,Yq=2,Zq=3,cr=4,br=5,wq=6;var Or=class{constructor(){this.a=null}load(){return Promise.resolve()}start(){return Promise.resolve()}w(a,b,c){const d=a.getConfiguration();a=Object.assign({},{config:d,player:a,gb:b},d.ads.hls||{},{Xh:c});this.a=new Bv(a);Vq(this.a)}setMuted(a){this.a&&this.a.setMuted(a)}isMuted(){return this.a?this.a.isMuted():!0}resume(){const a=Oq(this.a);a&&a.play()}pause(){const a=Oq(this.a);a&&a.pause()}skip(){}getVolume(){const a=Oq(this.a);return a?a.getVolume()||0:0}setVolume(a){const b=Oq(this.a);if(b)return b.setVolume(a)}getPosition(){const a=
480
480
  Oq(this.a);return a?a.getPosition():-1}o(){return!this.a.Lb()}h(){return this.a.destroy()}};Or.prototype.getPosition=Or.prototype.getPosition;Or.prototype.setVolume=Or.prototype.setVolume;Or.prototype.getVolume=Or.prototype.getVolume;Or.prototype.skip=Or.prototype.skip;Or.prototype.pause=Or.prototype.pause;Or.prototype.resume=Or.prototype.resume;var Cv=class{constructor(a){this.m=a;this.j=this.m.getNetworkEngine();this.a=new _.St;this.h=null;this.f=!0;hr(this)}release(){this.a.release();ir(this);this.m=null}};var kr=[];var qr=class{constructor(a,b,c){this.h=a;this.f=b;JSON.parse(_.ij(_.Yl(a)));this.a=JSON.parse(_.ij(_.Yl(b)));this.j=c}};var or={n:"vXdoJIQCz6sZ9pbduNukEHOR0H2dHlwuuBUAR5Ot7WLEYvav5mn63yxr6F6TIl8RHTFw2siXQhHblZH2Y89o8vhcZRFkYXo6h0igEVafu-n0w52UEcH8Cqzlb8Q7x03Qb8OcKLngSzDkwe5Y2Aix6I66RRVNLLssqyjp2n5tXs4JQmYdqY6hhpGhmBN84naeCTdcPpAYhCw8jqbTSNrJp5hjU4GVvOiUtoYCvdESV9xrOR7fPCFXhWfLtC3i1k1zVoIM7YW5qD0F676jhqkF-GmDuCHpRY2I2Cxui-ytYEVIM6_pylSIlmYLjARmv2jXz9aV_WvHLh6B8Yx0slNGCQ",e:"AQAB"},Dl="eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJ1cmxzIjpbIjovL2Nhc3RsYWJzLmNvbSJdLCJ0eXBlIjoiV2ViIiwia2lkIjoxOTUwLCJpbHYiOmZhbHNlfQ.jzGGRcbFr_2QET-4tbMcpR5pSaj7eV7X2d1HWw_VKQpPg3zCwSZSDuqw225dIYyAYwLSiElbozbZPSArkBXOsoUm-KZRUPF4m7WG0T7Uza5G-QaQw57BbbfcSsooSpatC997kHKLMTjO71By9Olcu5ykN164nZpGQtZNzQjYag-bnUaMVI5vvhzjlvDihORQ9V_qRlEh0-mpoz6W0-36HGAbWIXWq0kxPh6inbovby-ZmFpqGrVjWOEFa55EARZXPNW9ERupW5xrrYHZdwwTpdRTY5IwEnobS85yTrLhK8Y2MV4jlQLTtQp372fKDsuU6q6_4XvmNq1SgAoKoaf41g";var Qr=class{constructor(a){this.f=a;this.a=null;this.g=new _.S("clpp.utils.LicenseKey")}},Dr="vod",Cr="live";var js,Hr,Kr,Ir;js=class{constructor(a){this.m=a;this.f=a.getNetworkEngine();this.h=Lr(this);this.f.Ec(this.h);this.a=null}release(){this.a=null;this.f.vd(this.h)}};_.Dv="maxSuggestedBitrateKbps";Hr={du:"duress",etp:_.ke,mb:_.Dv,rd:"responseDelay",rtt:"roundTripTime"};Kr={at:"availabilityTime",br:"encodedBitrateKbps",ht:"heldTime",n:"intermediaryIdentifier",nor:"nextObjectResponse",nrr:"nextRangeResponse",d:"objectDuration",ot:"objectType",su:"startup",st:"streamType",sf:"streamingFormat",v:Eg};
481
481
  Ir=new _.S("clpp.net.CmsdManager");var R=class extends _.Cu{constructor(a,b,c){super();lr();this.g=new _.S("clpp.Player");if(!a)throw new _.I(_.F,7,7102);this.$=new _.St;this.f=this.C=b||_.Gl();this.l=null;void 0===this.f.license&&(this.f.license=Dl,this.g.warn("You are using the embedded demo license!"));if(!this.f.license)throw this.g.error("You provided null or empty string as your license. Please check your license configuration."),new _.I(_.F,7,7101,"No license provided in configuration!");this.j=new Np(a,c);this.G=this.A=this.a=
482
- this.F=null;this.I=new _.Er;this.h=null;this.W=[];this.Y=!0;this.K={};this.da=null;this.R=!0;this.S=this.O=!1;this.L=this.Lc=null;this.ue=!1;this.ha=new Cv(this);this.B=null;this.on(_.$f,()=>{this.getState()===_.ap&&(this.a?this.a.unload():Promise.resolve())});this.on(_.Hc,this.ba.bind(this));this.on(_.Gc,this.ba.bind(this));this.on(_.ng,()=>Pr(this));Rr(this,this.f.license);this.j.getMedia()&&(a=this.j.getMedia(),a.hasAttribute("autoplay")&&(a.removeAttribute("autoplay"),this.g.debug("Removed autoplay attribute from video element. Auto play will be handled by configuration."),
482
+ this.F=null;this.I=new _.Er;this.h=null;this.W=[];this.Y=!0;this.K={};this.da=null;this.R=!0;this.S=this.O=!1;this.L=this.Lc=null;this.Be=!1;this.ba=new Cv(this);this.B=null;this.on(_.$f,()=>{this.getState()===_.ap&&(this.a?this.a.unload():Promise.resolve())});this.on(_.Hc,()=>{this.Be=!0});this.on(_.Gc,()=>{this.Be=!1});this.on(_.ng,()=>Pr(this));Rr(this,this.f.license);this.j.getMedia()&&(a=this.j.getMedia(),a.hasAttribute("autoplay")&&(a.removeAttribute("autoplay"),this.g.debug("Removed autoplay attribute from video element. Auto play will be handled by configuration."),
483
483
  void 0===this.f.autoplay&&(this.f.autoplay=!0,this.g.debug("Setting autoplay in configuration since it was specified in the video element"))));a=[];for(const d of Mr)try{const e=d.create(this.f);e&&a.push(e)}catch(e){this.g.error("Error while creating player plugin",e)}Tr(this,a);this.M=_.ma;Ql(this)}on(a,b,c){return super.on(a,b,c)}one(a,b,c){return super.one(a,b,c)}off(a,b){return super.off(a,b)}onError(a){if(null!==this.a)this.a.onError(a);else a=new _.D(_.q,{detail:a}),this.trigger(a)}fd(a){a=
484
484
  this.K[a];void 0===a&&(a=null);return a}getSurface(){return this.j}getConfiguration(){return _.mh(this.f)}getDrmInfo(){return this.a?this.a.getDrmInfo():null}detach(){return this.a?this.a.detach():Promise.resolve()}release(){if(null!=this.l)return this.g.info("Player release already in progress"),this.l;this.g.debug("Releasing player");this.l=Wr(this);return this.l.finally(()=>{Xr(this);this.g.debug("Player released");this.l=null})}destroy(){if(this.O)return this.g.debug("The player is already destroyed. No-op"),
485
- new Promise(a=>a());this.O=!0;return this.release().then(()=>{this.g.debug(za);this.trigger(new _.D("destroying"));return _.Sr(this,_.We)}).then(()=>{this.a&&this.a.stopForwardingEventsTo(this);this.cd.clear();this.ha.release();if(this.a)return this.a.destroy()}).then(()=>this.I.destroy()).then(()=>{Tl();this.A=this.a=null;this.trigger(new _.D("destroyed"))})}load(a){const b=this;return _.x(function*(){try{_.Kn(pf);b.M=_.ma;b.Y=!0;const c=_.np(a),d=Jl(a)?a:{};if(d.license)throw new _.I(_.F,7,7100,
485
+ new Promise(a=>a());this.O=!0;return this.release().then(()=>{this.g.debug(za);this.trigger(new _.D("destroying"));return _.Sr(this,_.We)}).then(()=>{this.a&&this.a.stopForwardingEventsTo(this);this.cd.clear();this.ba.release();if(this.a)return this.a.destroy()}).then(()=>this.I.destroy()).then(()=>{Tl();this.A=this.a=null;this.trigger(new _.D("destroyed"))})}load(a){const b=this;return _.x(function*(){try{_.Kn(pf);b.M=_.ma;b.Y=!0;const c=_.np(a),d=Jl(a)?a:{};if(d.license)throw new _.I(_.F,7,7100,
486
486
  "License cannot be passed into the load method.");yield _.es(b,d,c);yield _.fs(b);yield _.hs(b);_.Kn(of);_.Mn("player.load",pf,of)}catch(c){Xr(b);if(b.l)throw b.g.info(bb),new _.I(_.F,7,7E3);throw c;}})}preload(a){const b=this;return _.x(function*(){yield _.es(b,a);if(b.a){var c=b.a;c.preload?yield c.preload(b.f):b.g.warn(yb)}else b.g.warn(ub)})}use(a){(a=Ul(a))&&a.o(this)}remove(a){return(this.getState()<=_.hp||this.R)&&null!==Ol(a)?(Vl(a),this.S=!0):!1}play(){return this.a?!this.h||this.h instanceof
487
487
  Or||this.a.namespace()===_.ud?this.a.play():this.h.start(this.a):Promise.reject("No player initialized. You need to load content before calling play.")}pause(){return this.a?this.a.pause():Promise.reject("No player initialized. You need to load content before calling pause.")}getTrackManager(){return this.a&&this.a.getTrackManager()}getBufferInfo(a){return this.a?this.a.getBufferInfo(a):new _.Bu}getState(){return this.a?this.a.getState():_.hp}getPeriods(){return this.a?this.a.getPeriods():[]}isEnded(){return this.a&&
488
488
  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()===_.ap?Promise.reject("Cannot seek in current state."):this.a?this.a.seek(a):Promise.reject("delegate does not exist")}getPresentationStartTime(){return this.a?this.a.getPresentationStartTime():null}getSeekRange(){return this.a?this.a.getSeekRange():{start:0,end:0}}uc(){const a=this.a;return a&&a.uc?a.uc():null}getVolume(){return this.a?this.a.getVolume():
489
489
  null}setVolume(a){this.a&&this.a.setVolume(a)}getDuration(){return this.a?this.a.getDuration():-1}getAdsManager(){return this.h}namespace(){return this.a&&this.a.namespace()||"Undefined"}getPlaybackRate(){return this.a?this.a.getPlaybackRate():1}setPlaybackRate(a,b){this.a&&this.a.setPlaybackRate(a,b)}isMuted(){return this.h&&this.h instanceof Or?this.h.isMuted():this.a&&this.a.isMuted()||!1}setMuted(a){this.a&&this.a.setMuted(a);this.h&&this.h instanceof Or&&this.h.setMuted(a)}getNetworkEngine(){return this.I}setNetworkEngine(a){this.I=
490
- a}getTextDisplayer(){return this.a&&this.a.getTextDisplayer()}isLive(){return!!this.a&&this.a.isLive()}getStats(){return this.a?this.a.getStats():null}Wf(){return Object.freeze(this.da)}getLoadedSource(){return this.a&&this.a.getLoadedSource()}getTimelineCues(){return this.a?this.a.getTimelineCues():[]}getCueTimeline(){return this.a?this.a.getCueTimeline():null}resetAbr(){this.a&&this.a.resetAbr()}setDrmCustomDataModifier(a){this.Lc=a;bs(this)}setCdnErrorCallback(a){this.L=a;this.a&&this.a.setCdnErrorCallback(this.L)}ba(){this.ue=
491
- !0}};_.z("clpp.Player",R);R.registerPlugin=_.Nr;R.prototype.setCdnErrorCallback=R.prototype.setCdnErrorCallback;R.prototype.setDrmCustomDataModifier=R.prototype.setDrmCustomDataModifier;R.prototype.resetAbr=R.prototype.resetAbr;R.prototype.getTimelineCues=R.prototype.getTimelineCues;R.prototype.getLoadedSource=R.prototype.getLoadedSource;R.prototype.getSources=R.prototype.Wf;R.prototype.getStats=R.prototype.getStats;R.prototype.isLive=R.prototype.isLive;R.prototype.getTextDisplayer=R.prototype.getTextDisplayer;
490
+ a}getTextDisplayer(){return this.a&&this.a.getTextDisplayer()}isLive(){return!!this.a&&this.a.isLive()}getStats(){return this.a?this.a.getStats():null}Wf(){return Object.freeze(this.da)}getLoadedSource(){return this.a&&this.a.getLoadedSource()}getTimelineCues(){return this.a?this.a.getTimelineCues():[]}getCueTimeline(){return this.a?this.a.getCueTimeline():null}resetAbr(){this.a&&this.a.resetAbr()}setDrmCustomDataModifier(a){this.Lc=a;bs(this)}setCdnErrorCallback(a){this.L=a;this.a&&this.a.setCdnErrorCallback(this.L)}};
491
+ _.z("clpp.Player",R);R.registerPlugin=_.Nr;R.prototype.setCdnErrorCallback=R.prototype.setCdnErrorCallback;R.prototype.setDrmCustomDataModifier=R.prototype.setDrmCustomDataModifier;R.prototype.resetAbr=R.prototype.resetAbr;R.prototype.getTimelineCues=R.prototype.getTimelineCues;R.prototype.getLoadedSource=R.prototype.getLoadedSource;R.prototype.getSources=R.prototype.Wf;R.prototype.getStats=R.prototype.getStats;R.prototype.isLive=R.prototype.isLive;R.prototype.getTextDisplayer=R.prototype.getTextDisplayer;
492
492
  R.prototype.setNetworkEngine=R.prototype.setNetworkEngine;R.prototype.getNetworkEngine=R.prototype.getNetworkEngine;R.prototype.setMuted=R.prototype.setMuted;R.prototype.isMuted=R.prototype.isMuted;R.prototype.setPlaybackRate=R.prototype.setPlaybackRate;R.prototype.getPlaybackRate=R.prototype.getPlaybackRate;R.prototype.namespace=R.prototype.namespace;R.prototype.getAdsManager=R.prototype.getAdsManager;R.prototype.getDuration=R.prototype.getDuration;R.prototype.setVolume=R.prototype.setVolume;
493
493
  R.prototype.getVolume=R.prototype.getVolume;R.prototype.getTimelineOffset=R.prototype.uc;R.prototype.getSeekRange=R.prototype.getSeekRange;R.prototype.getPresentationStartTime=R.prototype.getPresentationStartTime;R.prototype.seek=R.prototype.seek;R.prototype.getPosition=R.prototype.getPosition;R.prototype.isPaused=R.prototype.isPaused;R.prototype.isEnded=R.prototype.isEnded;R.prototype.getState=R.prototype.getState;R.prototype.getBufferInfo=R.prototype.getBufferInfo;R.prototype.getTrackManager=R.prototype.getTrackManager;
494
494
  R.prototype.pause=R.prototype.pause;R.prototype.play=R.prototype.play;R.prototype.remove=R.prototype.remove;R.prototype.use=R.prototype.use;R.prototype.load=R.prototype.load;R.prototype.destroy=R.prototype.destroy;R.prototype.release=R.prototype.release;R.prototype.getDrmInfo=R.prototype.getDrmInfo;R.prototype.getConfiguration=R.prototype.getConfiguration;R.prototype.getSurface=R.prototype.getSurface;R.prototype.getPlugin=R.prototype.fd;R.prototype.off=R.prototype.off;R.prototype.one=R.prototype.one;
@@ -497,10 +497,10 @@ if(0===b.length)throw new _.I(_.F,7,7003,lb);if(b.some(g=>!g.id||!g.source))thro
497
497
  7,7100,"Invalid `playlist.startTime` config value!");f=d.endTime;if(null!=f&&(typeof f!==_.t||0>f||null!=e&&f<=e))throw new _.I(_.F,7,7100,"Invalid `playlist.endTime` config value!");if("DVR"===d.content&&!f)throw new _.I(_.F,7,7100,"`playlist.endTime` config value is required for DVR content!");}try{ls(c),c.w="open",yield os(c,b),c.H=0,c.o=b,c.U=!0,ps(c,b[0].playlist||{})}finally{c.w=null}})}Lg(a){const b=this;return _.x(function*(){if(b.w)throw new _.I(_.F,7,7008,`Cannot call addItem() while ${b.w}() is ongoing!`);
498
498
  if(!b.U)throw new _.I(_.F,7,7008,"open() must be called before addItem()!");if(!a.id||!a.source)throw new _.I(_.F,7,7100,"The config is missing required properties `id` or `source`!");if((new Set(b.o.map(c=>c.id))).has(a.id))throw new _.I(_.F,7,7100,"A config with this `id` already exists in the playlist!");try{b.w="addItem",b.o.push(a),yield qs(b,a)}finally{b.w=null}})}getCurrentItem(){return this.o[this.H]||null}getCurrentItemIndex(){return this.H}vh(){return[...this.o]}gd(){return this.o.length}getTimeline(){return this.a?
499
499
  this.a.getTimeline():null}seekWith(a){return this.a?this.a.seekWith(a):Promise.resolve()}release(){this.o=[];this.H=0;this.U=!1;return super.release()}destroy(){ls(this);return super.destroy()}setCdnErrorCallback(){throw new _.I(1,7,7009,"CDN switching is not supported!");}};_.z("clpp.plist.ScPlaylist",Ev);Ev.prototype.setCdnErrorCallback=Ev.prototype.setCdnErrorCallback;Ev.prototype.destroy=Ev.prototype.destroy;Ev.prototype.release=Ev.prototype.release;Ev.prototype.seekWith=Ev.prototype.seekWith;
500
- Ev.prototype.getTimeline=Ev.prototype.getTimeline;Ev.prototype.getSize=Ev.prototype.gd;Ev.prototype.getPlaylist=Ev.prototype.vh;Ev.prototype.getCurrentItemIndex=Ev.prototype.getCurrentItemIndex;Ev.prototype.getCurrentItem=Ev.prototype.getCurrentItem;Ev.prototype.addItem=Ev.prototype.Lg;Ev.prototype.open=Ev.prototype.open;var Fv=class extends _.Cu{constructor(a){super();this.ja=_.lh({transition:_.cf,preloadMedia:!1},a);this.h=[];this.a=0;const b=rs(a.anchorId,this.ja.config);this.o=new wv(b);this.f=null;this.j=!1;this.l=new Map;this.w=a.toggleVisible;this.g=new _.S(zd);this.o.a.forEach(c=>ss(this,c.player,!1))}ed(){return this.f}Od(){return this.f?this.f.player:null}Rf(){return this.l.get(this.a+1)||null}Tf(){return this.l.get(this.a-1)||null}Sf(){return[this.Tf(),this.Rf()].filter(Boolean)}ki(a){if(0<this.h.length)throw Error("Cannot re-set items in the playlist");
500
+ Ev.prototype.getTimeline=Ev.prototype.getTimeline;Ev.prototype.getSize=Ev.prototype.gd;Ev.prototype.getPlaylist=Ev.prototype.vh;Ev.prototype.getCurrentItemIndex=Ev.prototype.getCurrentItemIndex;Ev.prototype.getCurrentItem=Ev.prototype.getCurrentItem;Ev.prototype.addItem=Ev.prototype.Lg;Ev.prototype.open=Ev.prototype.open;var Fv=class extends _.Cu{constructor(a){super();this.ia=_.lh({transition:_.cf,preloadMedia:!1},a);this.h=[];this.a=0;const b=rs(a.anchorId,this.ia.config);this.o=new wv(b);this.f=null;this.j=!1;this.l=new Map;this.w=a.toggleVisible;this.g=new _.S(zd);this.o.a.forEach(c=>ss(this,c.player,!1))}ed(){return this.f}Od(){return this.f?this.f.player:null}Rf(){return this.l.get(this.a+1)||null}Tf(){return this.l.get(this.a-1)||null}Sf(){return[this.Tf(),this.Rf()].filter(Boolean)}ki(a){if(0<this.h.length)throw Error("Cannot re-set items in the playlist");
501
501
  this.g.info("Set items",a);this.h=a.map((b,c)=>({config:b,index:c,preloadPromise:Promise.resolve(),disposers:[]}))}ji(a){if(0===this.h.length)throw Error(kb);if(0>a||a>this.h.length-1)throw Error("Index out of bounds");this.a=a}kd(){return this.a<this.h.length-1}Xf(){return 0<this.a}Vh(){const a=this;return _.x(function*(){if(a.j)a.g.warn("Cannot play first item while busy");else if(0===a.h.length)a.g.warn(kb);else{a.j=!0;a.g.info(`First (index: ${a.a})`);var b=a.h[a.a];try{a.g.info(`First loading (index: ${a.a})`),
502
- yield vs(a,b),a.g.info(`First playing (index: ${a.a})`)}catch(c){throw a.g.error(`First failed (index: ${a.a})`),c;}finally{a.j=!1,zs(a)}}})}ng(){const a=this;return _.x(function*(){if(a.j)a.g.warn("Cannot play next item while busy");else if(a.kd()){a.j=!0;a.a+=1;a.g.info(`Next (index: ${a.a})`);var b=a.f;a.ja.transition===_.cf&&b.player.pause();Es(a,a.a+-2);a.l.delete(a.a);var c=a.h[a.a];try{a.g.info(`Next loading (index: ${a.a})`),yield As(a,c),a.g.info(`Next playing (index: ${a.a})`)}catch(d){throw a.g.error(`Next failed (index: ${a.a})`),
503
- d;}finally{a.j=!1,b&&Ds(a,b),zs(a)}}else a.g.warn("There are no more items in the playlist")})}Wh(){const a=this;return _.x(function*(){if(a.j)a.g.warn("Cannot play previous item while busy");else if(a.Xf()){a.j=!0;--a.a;a.g.info(`Previous (index: ${a.a})`);var b=a.f;a.ja.transition===_.cf&&b.player.pause();Es(a,a.a+2);a.l.delete(a.a);var c=a.h[a.a];try{a.g.info(`Previous loading (index: ${a.a})`),yield As(a,c),a.g.info(`Previous playing (index: ${a.a})`)}catch(d){throw a.g.error(`Previous failed (index: ${a.a})`),
502
+ yield vs(a,b),a.g.info(`First playing (index: ${a.a})`)}catch(c){throw a.g.error(`First failed (index: ${a.a})`),c;}finally{a.j=!1,zs(a)}}})}ng(){const a=this;return _.x(function*(){if(a.j)a.g.warn("Cannot play next item while busy");else if(a.kd()){a.j=!0;a.a+=1;a.g.info(`Next (index: ${a.a})`);var b=a.f;a.ia.transition===_.cf&&b.player.pause();Es(a,a.a+-2);a.l.delete(a.a);var c=a.h[a.a];try{a.g.info(`Next loading (index: ${a.a})`),yield As(a,c),a.g.info(`Next playing (index: ${a.a})`)}catch(d){throw a.g.error(`Next failed (index: ${a.a})`),
503
+ d;}finally{a.j=!1,b&&Ds(a,b),zs(a)}}else a.g.warn("There are no more items in the playlist")})}Wh(){const a=this;return _.x(function*(){if(a.j)a.g.warn("Cannot play previous item while busy");else if(a.Xf()){a.j=!0;--a.a;a.g.info(`Previous (index: ${a.a})`);var b=a.f;a.ia.transition===_.cf&&b.player.pause();Es(a,a.a+2);a.l.delete(a.a);var c=a.h[a.a];try{a.g.info(`Previous loading (index: ${a.a})`),yield As(a,c),a.g.info(`Previous playing (index: ${a.a})`)}catch(d){throw a.g.error(`Previous failed (index: ${a.a})`),
504
504
  d;}finally{a.j=!1,b&&Ds(a,b),zs(a)}}else a.g.warn("There are no more previous items in the playlist")})}destroy(){const a=this;return _.x(function*(){a.g.info("Destroy");yield Promise.all([Fs(a),a.f?Ds(a,a.f):Promise.resolve()]);yield Gs(a)})}};_.z(zd,Fv);Fv.prototype.destroy=Fv.prototype.destroy;Fv.prototype.playPrev=Fv.prototype.Wh;Fv.prototype.playNext=Fv.prototype.ng;Fv.prototype.playFirst=Fv.prototype.Vh;Fv.prototype.hasPrev=Fv.prototype.Xf;Fv.prototype.hasNext=Fv.prototype.kd;
505
505
  Fv.prototype.setIndex=Fv.prototype.ji;Fv.prototype.setItems=Fv.prototype.ki;Fv.prototype.getPreloading=Fv.prototype.Sf;Fv.prototype.getPrev=Fv.prototype.Tf;Fv.prototype.getNext=Fv.prototype.Rf;Fv.prototype.getCurrentPlayer=Fv.prototype.Od;Fv.prototype.getCurrent=Fv.prototype.ed;var Cs="preload",ts=_.He;var Hs=new Map;var Iv=class{constructor(a){this.h=a;this.f={keepOriginalTimestamps:!0,remux:!1};this.a=new muxjs.mp4.Transmuxer(this.f)}destroy(){this.a.dispose();this.a=null}reset(){this.a=new muxjs.mp4.Transmuxer(this.f)}isSupported(a,b){const c="mp2t"===a.toLowerCase().split(";")[0].split("/")[1],d=a.toLowerCase().split(";")[0]===_.Rc;if(!window.muxjs||!c&&!d)return!1;if(d)return _.Is(Vc);if(b)return _.Is(Js(b,a));b=Js(_.p,a);a=Js(_.w,a);return _.Is(b)||_.Is(a)}isMuxed(a,b){return 1<this.demuxMimeTypes(a,b).size}demuxMimeTypes(a,
506
506
  b){const c=new Map;c.set(a,b);try{const d=_.Ck(b),e=_.Dk(b).split(","),f=new Map,g=Oi(_.p,e),h=Oi(_.w,e);g&&f.set(_.p,this.convertCodecs(_.p,_.Bk(d,g)));h&&f.set(_.w,this.convertCodecs(_.w,_.Bk(d,h)));return f}catch(d){return c}}convertCodecs(a,b){return b.toLowerCase().split(";")[0]===_.Rc?Vc:"mp2t"===b.toLowerCase().split(";")[0].split("/")[1]?Js(a,b):b}getOriginalMimeType(){return this.h}transmux(a){const b=[],c=[];let d=[],e=null;a=_.K(a);const f=h=>{d=h.captions;const k=new Uint8Array(h.data.byteLength+
@@ -508,7 +508,7 @@ h.initSegment.byteLength);k.set(h.initSegment,0);k.set(h.data,h.initSegment.byte
508
508
  _.sj(this.h)?this.g.warn(_.Ta):_.sj(this.a)?this.g.warn(_.Sa):this.cb(_.Ed,{licenseUrl:this.h,certificateUrl:this.a,modifiers:{licenseRequest:this.ig.bind(this),licenseResponse:this.jg.bind(this),certificateRequest:this.sd.bind(this),extractContentId:this.Mf.bind(this)}})}sd(a,b){a=a.drm.customData.headers||{};for(const c of Object.keys(a))b.headers[c]=a[c]}Mf(a,b){a=Am(b);switch(this.o){case Lv:return a;case Mv:return(new _.Bm(a)).a;default:throw Error("Unknown content ID strategy");}}ig(a,b){b.headers[ta]=
509
509
  Qc;this.sd(a,b);a={spc:_.Wl(b.body)};b.body=_.oj(_.ak(a,!0))}jg(a,b){a=_.ij(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=_.Yl(a).buffer}};_.z(vd,Nv);Nv.prototype.onFairPlayLicenseResponse=Nv.prototype.jg;Nv.prototype.onFairPlayLicenseRequest=Nv.prototype.ig;Nv.prototype.extractFairPlayContentId=Nv.prototype.Mf;Nv.prototype.onLicenseRequest=Nv.prototype.sd;Nv.prototype.constructor=Nv.prototype.constructor;Nv.NAME=Ya;
510
510
  var Mv="hostname",Lv="full-skd";Nv.FairPlayContentIdStrategy={HOSTNAME:Mv,FULL_SKD:Lv};_.z("clpp.drm.HeaderDrmComponent",class extends _.Kv{h(a){a=a.getConfiguration();if(a.drm&&a.drm&&a.drm.env===Ya){a=a.drm.customData;if(!a)throw new _.I(_.F,7,7100,_.Kd);a=new Nv(a.widevineLicenseUrl,a.playReadyLicenseUrl,a.fairPlayLicenseUrl,a.fairPlayCertificateUrl,a.fairPlayContentIdStrategy||Lv);_.fm(a)}}a(){delete _.em.HeaderDrm}id(){return"headerdrm"}});_.mr(function(){ArrayBuffer.prototype.slice||(ArrayBuffer.prototype.slice=function(a,b){b=void 0!==b?b:this.byteLength;a=Math.floor(a);b=Math.floor(b);0>a&&(a+=this.byteLength);0>b&&(b+=this.byteLength);a=Math.min(Math.max(0,a),this.byteLength);b=Math.min(Math.max(0,b),this.byteLength);if(0>=b-a)return new ArrayBuffer(0);const c=new ArrayBuffer(b-a),d=_.K(c);a=new Uint8Array(this,a,b-a);d.set(a);return c})});_.mr(function(){_.Gh("mathRound.install")});_.mr(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;me in document||(Object.defineProperty(document,me,{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement}}),Object.defineProperty(document,"fullscreenEnabled",
511
- {get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitSupportsFullscreen||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",Ks);document.addEventListener("webkitfullscreenerror",Ks);document.addEventListener("mozfullscreenchange",Ks);document.addEventListener("mozfullscreenerror",Ks);document.addEventListener("MSFullscreenChange",Ks);document.addEventListener("MSFullscreenError",Ks)}});_.mr(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(_.Gh("PiPWebkit.install"),document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=Ms,document.exitPictureInPicture=Ns,document.addEventListener("webkitpresentationmodechanged",Ls,!0))}});_.mr(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in a&&(a.getVideoPlaybackQuality=Rs)}});_.mr(function(){if(window.VTTCue)_.Fh("Using native VTTCue.");else if(window.TextTrackCue){var a=TextTrackCue.length;if(3===a)_.Fh(Sb),window.VTTCue=Ss;else if(6===a)_.Fh("Using VTTCue polyfill from 6 argument TextTrackCue."),window.VTTCue=Ts;else{try{var b=!!Ss(1,2,"")}catch(c){b=!1}b&&(_.Fh(Sb),window.VTTCue=Ss)}}else _.Hh("VTTCue not available.")});var Us;_.mr(function(){_.Gh("InputEvent.install");_.Jk("Trident/")&&HTMLInputElement.prototype.addEventListener!==Vs&&(_.Fh("Patching input event support on IE."),Us=HTMLInputElement.prototype.addEventListener,HTMLInputElement.prototype.addEventListener=Vs)});_.mr(function(){navigator.languages||Object.defineProperty(navigator,"languages",{get:()=>navigator.language?[navigator.language]:["en"]})});_.mr(function(){_.Gh("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 Ys=class{constructor(){this.a=Ws()}};var Ov=class{constructor(a,b){b=void 0===b?2:b;this.a=new Uint8Array(a);this.h=b;this.f=0}};_.Pv=class{constructor(a,b,c){this.h=a;this.j=b;this.f=c||this.h.getMedia();this.a=null}start(){this.a=new ResizeObserver(a=>{a=a[0];this.j(a.contentRect.width,a.contentRect.height,this.h.isFullscreen())});this.f&&this.a.observe(this.f)}stop(){this.a&&(this.a.disconnect(),this.a=null)}};var Qv;_.Rv=class{constructor(){this.a=new Blob([Qv],{type:_.Ig})}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 _.rn;b=b.play();const d=(new _.Gk(()=>{d.stop();c.resolve(a)})).ia(.25);void 0!==b?b.then(()=>{d.stop();c.resolve(!0)}).catch(e=>{e&&e.message&&e.message===qb?(d.stop(),c.resolve(!0)):(d.stop(),c.resolve(!1))}):(d.stop(),c.resolve(!0));return c}};
511
+ {get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitSupportsFullscreen||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",Ks);document.addEventListener("webkitfullscreenerror",Ks);document.addEventListener("mozfullscreenchange",Ks);document.addEventListener("mozfullscreenerror",Ks);document.addEventListener("MSFullscreenChange",Ks);document.addEventListener("MSFullscreenError",Ks)}});_.mr(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(_.Gh("PiPWebkit.install"),document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=Ms,document.exitPictureInPicture=Ns,document.addEventListener("webkitpresentationmodechanged",Ls,!0))}});_.mr(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in a&&(a.getVideoPlaybackQuality=Rs)}});_.mr(function(){if(window.VTTCue)_.Fh("Using native VTTCue.");else if(window.TextTrackCue){var a=TextTrackCue.length;if(3===a)_.Fh(Sb),window.VTTCue=Ss;else if(6===a)_.Fh("Using VTTCue polyfill from 6 argument TextTrackCue."),window.VTTCue=Ts;else{try{var b=!!Ss(1,2,"")}catch(c){b=!1}b&&(_.Fh(Sb),window.VTTCue=Ss)}}else _.Hh("VTTCue not available.")});var Us;_.mr(function(){_.Gh("InputEvent.install");_.Jk("Trident/")&&HTMLInputElement.prototype.addEventListener!==Vs&&(_.Fh("Patching input event support on IE."),Us=HTMLInputElement.prototype.addEventListener,HTMLInputElement.prototype.addEventListener=Vs)});_.mr(function(){navigator.languages||Object.defineProperty(navigator,"languages",{get:()=>navigator.language?[navigator.language]:["en"]})});_.mr(function(){_.Gh("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 Ys=class{constructor(){this.a=Ws()}};var Ov=class{constructor(a,b){b=void 0===b?2:b;this.a=new Uint8Array(a);this.h=b;this.f=0}};_.Pv=class{constructor(a,b,c){this.h=a;this.j=b;this.f=c||this.h.getMedia();this.a=null}start(){this.a=new ResizeObserver(a=>{a=a[0];this.j(a.contentRect.width,a.contentRect.height,this.h.isFullscreen())});this.f&&this.a.observe(this.f)}stop(){this.a&&(this.a.disconnect(),this.a=null)}};var Qv;_.Rv=class{constructor(){this.a=new Blob([Qv],{type:_.Ig})}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 _.rn;b=b.play();const d=(new _.Gk(()=>{d.stop();c.resolve(a)})).ha(.25);void 0!==b?b.then(()=>{d.stop();c.resolve(!0)}).catch(e=>{e&&e.message&&e.message===qb?(d.stop(),c.resolve(!0)):(d.stop(),c.resolve(!1))}):(d.stop(),c.resolve(!0));return c}};
512
512
  Qv=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,
513
513
  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,55,167,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,112,33,16,5,32,164,27,255,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
514
514
  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,55,167,128,0,0,0,0,0,0,