(function(){var g={}; var _ = {};
(function(window){var ba,ca,ea,fa,ha,sa,va,za,Aa,Ga,Ha,Ia,Ka,Oa,Pa,Ta,Ua,Va,Wa,Xa,Ya,Za,$a,bb,cb,gb,ib,jb,kb,lb,mb,nb,pb,qb,ub,yb,Gb,Hb,Ib,Jb,Kb,Nb,Pb,Sb,Tb,Ub,Xb,Yb,$b,ac,bc,cc,dc,ec,fc,gc,nc,oc,pc,Jc,Oc,Uc,bd,cd,jd,kd,ld,nd,pd,qd,rd,td,ud,vd,wd,xd,yd,Dd,Fd,Kd,Rd,Sd,Td,Ud,Vd,Wd,Yd,Zd,$d,ce,de,fe,le,ue,we,xe,Ee,Ye,ef,gf,hf,jf,kf,lf,mf,nf,of,pf,qf,uf,vf,wf,xf,yf,zf,Bf,Jf,Lf,$f,cg,jg,vg,yg,Eg,Pg,Tg,Ug,Vg,Wg,Xg,Zg,$g,ah,fh,jh,nh,ph,oh,qh,rh,sh,xh,Ah,yh,zh,Bh,Dh,Eh,Ih,Lh,Qh,Uh,Wh,Yh,Zh,$h,bi,ci,ai,ei,fi,ii,li,ji,mi,oi,
ni,si,vi,ui,ti,xi,Ai,zi,yi,qi,pi,wi,ri,Di,Ei,Fi,Hi,Ji,Ii,Li,Wi,Xi,Yi,$i,bj,cj,ej,fj,jj,lj,nj,hj,qj,Bj,Fj,Gj,Mj,Qj,Sj,Tj,Wj,Rj,Nj,Zj,ak,dk,ek,fk,hk,ik,jk,mk,wk,xk,yk,zk,Ck,Hk,Jk,Kk,Rk,Uk,Wk,Vk,Tk,Xk,Sk,$k,Yk,Zk,al,bl,jl,rl,Cl,El,Fl,Gl,Ql,Hl,Tl,Vl,Xl,Yl,Wl,$l,am,Ul,bm,cm,dm,em,fm,hm,im,jm,km,gm,om,pm,rm,um,wm,Cm,Dm,Em,Fm,Gm,Hm,Im,Jm,Km,Sm,Tm,Um,$m,nn,tn,wn,xn,zn,An,In,Nn,On,Tn,Zn,$n,bo,co,fo,go,ho,io,jo,ko,lo,mo,no,oo,po,qo,ro,uo,so,vo,xo,yo,to,wo,zo,Ao,Bo,Co,Fo,Ho,Oo,Uo,Vo,cp,ip,rp,op,pp,vp,xp,Ap,
Ep,Fp,Jp,tp,np,Qp,Hp,Rp,Tp,Sp,aq,Xp,Wp,Zp,bq,$p,dq,Yp,cq,ep,yp,Up,fp,Pp,mp,Lp,Mp,gq,Op,sp,qp,hp,lq,nq,oq,pq,qq,wq,xq,zq,Dq,Iq,vq,Jq,Kq,Nq,Pq,Qq,Sq,Tq,Oq,Uq,Vq,Wq,Xq,ar,br,cr,W,dr,ir,jr,kr,or,nr,tr,xr,zr,Ar,Cr,Br,Fr,Gr,Er,vr,Ur,ur,Ir,wr,Vr,Hr,rr,Sr,pr,Dr,Xr,Rr,Or,Pr,Nr,Qr,Mr,Wr,Zr,Tr,bs,sr,qr,Jr,cs,ds,as,yr,os,ps,rs,fs,gs,es,ls,js,ks,qs,As,ws,vs,us,Bs,zs,ys,Gs,ns,Is,xs,Hs,hs,is,Ds,Ps,Es,Fs,Ks,Js,Qs,Os,Ts,Cs,Ls,Us,Vs,Xs,Ws,Zs,$s,at,bt,Ys,dt,ft,gt,it,jt,kt,lt,mt,nt,ot,pt,rt,st,tt,ut,qt,xt,zt,yt,At,Bt,
X,Gt,Kt,It,Lt,Nt,Mt,Pt,Qt,Vt,Xt,Wt,St,Ft,Rt,Zt,$t,au,du,eu,cu,bu,hu,ju,iu,mu,ku,pu,qu,ou,su,tu,uu,ru,gu,vu,fu,yu,zu,Au,Cu,Du,Eu,Fu,Gu,Hu,Iu,Ju,Ku,Mu,Ou,Qu,Ru,Nu,Tu,Uu,$u,ev,fv,hv,gv,tk,jv,mv,lv,nv,ov,kv,qv,rv,pv,sv,uk,wv,pk,Yv,aw,hh,cw;_.aa=" is registered.";ba=" is unsupported on this platform.";ca=" to a log level. Falling back to default!";_.da="#text";ea="': 'output-restricted'";fa="() is ongoing!";ha=".start";_.ia="6.25.2";_.ja="AUDIO";_.la="AdaptationSet";_.ma="Already destroyed. No-op";
_.na="Already released. No-op";_.oa="Autoplay is not allowed due to browser policy.";_.pa="BANDWIDTH";_.ra="BASIC";sa="CHECKSUM";_.ta="CLOSED-CAPTIONS";_.ua="CODECS";va="Can not set volume to ";_.wa="Cannot retrieve buffer information due to platform limitations";_.xa="CastlabsPlayer";_.ya="Configuration is valid";za="Content-Length";Aa="Content-Type";_.Ea="Could not find configured DRM environment.";_.Fa="DRM environment '";Ga="DRM licenses loaded";Ha="DRMtoday";Ia="DRMtodayOnboard";_.Ja="DURATION";
Ka="Destroying player";_.La="EXT-X-MEDIA";_.Ma="EXT-X-STREAM-INF";Oa="Error while decoding string!";Pa="Error while fetching certificate!";_.Qa="FairPlay Certificate URL is not defined";_.Ra="FairPlay License URL is not defined";_.Sa="GROUP-ID";Ta="HW_SECURE_ALL";Ua="HW_SECURE_CRYPTO";Va="HW_SECURE_DECODE";Wa="HeaderDrm";Xa="Hide video element .";Ya="Invalid track type: ";Za="InvalidStateError";$a="Key status for Key ID '";_.ab="LANGUAGE";bb="License verification failed: ";cb="Load interrupted while a player release is pending";
_.db="Loading player with configuration";_.eb="MaxHeight";_.fb="MaxWidth";gb="Missing media element";_.hb="NAME";ib="No drmtoday configuration found in player configuration. Unable to modify the DRM license request!";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="Player state change: ";_.xb="Please make sure ";yb="Preloading is not supported by this player.";_.Ab="QualityLevel";_.Bb="RESOLUTION";_.Cb="Representation";_.Db="SUBTITLES";_.Eb="SW_SECURE_CRYPTO";_.Fb="SW_SECURE_DECODE";Gb="Schedule interstitial ";Hb="Session is closed";Ib="Setting native ";Jb="Show video element .";Kb="Skipping Session creation. License for init data was already requested in Session: '";_.Lb="SmoothStreamingMedia";_.Mb="TYPE";
Nb="The index is not in the allowed range.";_.Ob="URI";Pb="Unable to translate ";_.Qb="Unhandled/ignored event";_.Rb="Unregistering listeners";Sb="Unsupported keySystem";Tb="Updating playout limit for interstitial";Ub="Using VTTCue polyfill from 3 argument TextTrackCue.";_.Vb="VIDEO";_.Wb="VOD";Xb="Wait for preloading to finish";Yb="WebkitEmeManager.MediaKeySession.load";_.Zb="Widevine License URL is not defined";$b="Will create EME Manager: ";ac="X-AD-CREATIVE-SIGNALING";bc="X-ASSET-LIST";cc="X-ASSET-URI";
dc="X-PLAYOUT-LIMIT";ec="X-RESTRICT";fc="X-RESUME-OFFSET";gc="X-TIMELINE-OCCUPIES";_.hc="ad-break-started";_.ic="ad-break-stopped";_.jc="ad-buffering";_.kc="ad-clicked";_.lc="ad-completed";_.mc="ad-first-quartile";nc="ad-hls-asset-list-request";oc="ad-hls-asset-list-response";pc="ad-hls-resoled";_.qc="ad-impression";_.rc="ad-loaded";_.sc="ad-midpoint";_.tc="ad-paused";_.uc="ad-progress";_.vc="ad-resumed";_.wc="ad-skipped";_.xc="ad-started";_.zc="ad-stopped";_.Ac="ad-third-quartile";_.Bc="addtrack";
_.Cc="ads-timeline-changed";_.Dc="airplay-casting-ended";_.Ec="airplay-casting-started";_.Fc="airplay-status-changed";_.Gc="application";_.Hc="application/cea-608";_.Ic="application/dash+xml";Jc="application/mp4";_.Kc='application/mp4; codecs\x3d"stpp"';_.Lc='application/mp4; codecs\x3d"wvtt"';_.Mc="application/ttml+xml";_.Nc="application/vnd.ms-sstr+xml";Oc="application/x-www-form-urlencoded";_.Pc="audio";_.Qc="audio/aac";_.Rc="audio/ac3";_.Sc="audio/eac3";_.Tc="audio/mp4";Uc='audio/mp4;codecs\x3d"mp4a.40.2"';
_.Vc="audiobufferchanged";_.Wc="audiotrackchanged";_.Xc="autoplaynotallowed";_.Yc="bitratechanged";_.Zc="boolean";_.$c="bufferingended";_.ad="bufferingstarted";bd="canplay";cd="canplaythrough";_.dd="caption";_.ed="castingstarted";_.fd="caststatuschanged";_.gd="cdn-switch-success";_.hd="cenc";_.id="center";jd="certificate-request";kd="change";ld="chrome";_.md="clpp-fill";nd="clpp-hidden";pd="clpp-mc-playlist";qd="clpp-visible";rd="clpp.PlayerFleet";_.sd="clpp.cast.CastSender";td="clpp.drm.HeaderDrm";
ud="clpp.drm.eme.AppleEmeManager";vd="clpp.drm.eme.EmeFactory";wd="clpp.native.Player";xd="clpp.plist.McPlaylist";yd="clpp.utils.Platform";_.zd="codecs";_.Ad="column-reverse";_.Bd="com.adobe.primetime";_.Cd="com.apple.fps";Dd="com.apple.quicktime.HLS";_.Ed="com.microsoft.playready";Fd="com.microsoft.playready.recommendation";_.Gd="com.widevine.alpha";_.Hd="config.drm.customData is not defined";_.Id="content-steering-change";_.Jd="content-steering-location-ban-update";Kd="controls";_.Ld="cuechange";
_.Md="decoder";_.Nd="destroy()";_.Pd="disabled";_.Qd="div";Rd="drm.license.req.";Sd="drm.mediaKeys.end";Td="drm.mediaKeys.start";Ud="drm.onPlay.end";Vd="drm.onPlay.start";Wd="drm.sess.update.";_.Xd="drmexpirationupdate";Yd="drmlicenserequested";Zd="drmrenewalstarted";$d="drmsessioncreated";_.ae="drmsessionpersisted";_.be="drmsessionupdate";ce="drmtoday";de="durationchange";_.ee="ec-3";fe="encrypted";_.ge="end";_.he="ended";_.ie="error";_.je="estimatedThroughputKbps";_.ke="forced";le="fullscreenElement";
_.oe="function";_.pe="height";_.qe="hidden";_.re="html";_.se="image";_.te="internal-error";ue="keystatuseschange";_.ve="left";we="license-renewal";xe="license-request";_.ye="line-left";_.ze="line-right";_.Ae="live-turned-static";_.Be="load";_.Ce="loadeddata";_.De="loadedmetadata";Ee="loadstart";_.Fe="main";_.Ge="mdat";_.He="mdia";_.Ie="message";_.Je="metadata";_.Ke="mimeType";_.Le="minf";_.Ne="moov";_.Oe="mpd-type-changed";_.Pe="mpeg-dash-callback-event";_.Qe="none";_.k="number";_.Re="object";
_.Se="onBitrateChanged()";_.Te="onContentLoaded";_.Ue="onPlayerError()";_.Ve="onPlayerWillDestroy";_.We="onPlayerWillRelease";_.Xe="onStateChanged()";Ye="online-status-changed";_.Ze="optional";_.$e="org.w3.clearkey";_.af="output-restricted";_.bf="pause";_.cf="persistent";_.df="persistent-license";ef="picture-in-picture";_.ff="play";gf="player.afterLoad.end";hf="player.afterLoad.start";jf="player.appendLoad.end";kf="player.appendLoad.start";lf="player.beforeLoad.end";mf="player.beforeLoad.start";
nf="player.load.end";of="player.load.start";pf="player.setupPlaylist.end";qf="player.setupPlaylist.start";_.rf="playing";_.sf="playlist-item-changed";_.tf="playlist-modified";uf="playlist.next.end";vf="playlist.next.start";wf="preload-aborted";xf="preload-failed";yf="preloaded";zf="preloading";_.Af="prevent";Bf="primary-content";_.Df="progress";_.Hf="px";_.If="ratechange";Jf="released";_.Kf="releasing";Lf="removetrack";_.Mf="required";_.Nf="resize";_.Of="right";_.Pf="sc-playlist-ended";_.Qf="sc-playlist-item-changed";
_.Rf="sc-playlist-live-turned-static";_.Sf="sc-playlist-timeline-changed";_.Tf="seeked";_.Uf="seeking";_.Vf="showing";_.Wf="simid-creative-started";_.Xf="simid-creative-stopped";_.Yf="sinf";_.Zf="smooth";$f="stalled";_.ag="start";_.bg="statechanged";cg="status-pending";_.dg="stbl";_.eg="string";_.fg="stsd";_.gg="style";_.hg="subtitle";_.ig="subtitles-htmlcue";jg="temporary";_.kg="text/vtt";_.lg="text/xml";_.mg="texttrackchanged";_.ng="timeline-cue-added";_.og="timeline-cue-enter";_.pg="timeline-cue-exit";
_.qg="timeline-cues-changed";_.rg="timeupdate";_.sg="tracksadded";_.tg="trak";_.ug="ttml-xml";vg="unauthenticated";_.wg="und";_.xg="unknown";yg="update";_.zg="urn:scte:scte35";_.Ag="urn:scte:scte35:2014";_.Bg="user-seeked";_.Cg="user-seeking";_.Dg="value";Eg="version";_.Gg="vertical-lr";_.Hg="vertical-rl";_.Jg="video";_.Kg="video/mp2t";_.Lg="video/mp4";_.Mg="videobufferchanged";_.Ng="videotrackchanged";_.Og="vimond-response";Pg="visibilitychange";_.Qg="vtt-xml";_.Rg="waiting";_.Sg="waitingforkey";
Tg="webkit-org.w3.clearkey";Ug="webkitkeyadded";Vg="webkitkeyerror";Wg="webkitkeymessage";Xg="webkitneedkey";_.Yg="width";Zg="x-dt-csl-tracking-token";$g="x-dt-follow-up-token";ah="x-dt-resp-code";_.bh="yospace-session-ended";_.ch="yospace-session-started";_.eh=function(a){return function(){return _.dh[a].apply(this,arguments)}};fh=function(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}};
_.u=function(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:fh(a)}};_.gh=function(a){if(!(a instanceof Array)){a=_.u(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a};_.w=function(a,b){a.prototype=hh(b.prototype);a.prototype.constructor=a;if(ih)ih(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c]};
jh=function(){jh=function(){};kh.Symbol||(kh.Symbol=lh)};nh=function(a,b){this.a=a;mh(this,"description",{configurable:!0,writable:!0,value:b})};ph=function(){jh();var a=kh.Symbol.iterator;a||(a=kh.Symbol.iterator=kh.Symbol("Symbol.iterator"));typeof Array.prototype[a]!=_.oe&&mh(Array.prototype,a,{configurable:!0,writable:!0,value:function(){return oh(fh(this))}});ph=function(){}};oh=function(a){ph();a={next:a};a[kh.Symbol.iterator]=function(){return this};return a};
qh=function(){this.w=!1;this.l=null;this.f=void 0;this.a=1;this.j=this.o=0;this.B=this.h=null};rh=function(a){if(a.w)throw new TypeError("Generator is already running");a.w=!0};sh=function(a,b){a.h={Qh:b,ri:!0};a.a=a.o||a.j};_.x=function(a,b,c){a.a=c;return{value:b}};_.y=function(a){a.a=0};_.C=function(a,b,c){a.o=b;void 0!=c&&(a.j=c)};_.th=function(a){a.o=0;a.j=2};_.uh=function(a,b){a.a=b;a.o=0};_.E=function(a){a.o=0;var b=a.h.Qh;a.h=null;return b};_.vh=function(a){a.B=[a.h];a.o=0;a.j=0};
_.wh=function(a){var b=a.B.splice(0)[0];(b=a.h=a.h||b)?b.ri?a.a=a.o||a.j:void 0!=b.D&&a.j<b.D?(a.a=b.D,a.h=null):a.a=a.j:a.a=0};xh=function(a){this.a=new qh;this.f=a};Ah=function(a,b){rh(a.a);var c=a.a.l;if(c)return yh(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.a["return"]);a.a["return"](b);return zh(a)};
yh=function(a,b,c,d){try{var e=b.call(a.a.l,c);if(!(e instanceof Object))throw new TypeError("Iterator result "+e+" is not an object");if(!e.done)return a.a.w=!1,e;var f=e.value}catch(g){return a.a.l=null,sh(a.a,g),zh(a)}a.a.l=null;d.call(a.a,f);return zh(a)};zh=function(a){for(;a.a.a;)try{var b=a.f(a.a);if(b)return a.a.w=!1,{value:b.value,done:!1}}catch(c){a.a.f=void 0,sh(a.a,c)}a.a.w=!1;if(a.a.h){b=a.a.h;a.a.h=null;if(b.ri)throw b.Qh;return{value:b["return"],done:!0}}return{value:void 0,done:!0}};
Bh=function(a){this.next=function(b){rh(a.a);a.a.l?b=yh(a,a.a.l.next,b,a.a.A):(a.a.A(b),b=zh(a));return b};this["throw"]=function(b){rh(a.a);a.a.l?b=yh(a,a.a.l["throw"],b,a.a.A):(sh(a.a,b),b=zh(a));return b};this["return"]=function(b){return Ah(a,b)};ph();this[Symbol.iterator]=function(){return this}};_.Ch=function(a,b){var c=new Bh(new xh(b));ih&&ih(c,a.prototype);return c};
Dh=function(a,b){if(b){for(var c=kh,d=a.split("."),e=0;e<d.length-1;e++){var f=d[e];f in c||(c[f]={});c=c[f]}d=d[d.length-1];e=c[d];f=b(e);f!=e&&null!=f&&mh(c,d,{configurable:!0,writable:!0,value:f})}};Eh=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())})};_.H=function(a){return Eh(new Bh(new xh(a)))};
_.I=function(a,b){var c=a.split("."),d=Fh;c[0]in d||"undefined"==typeof d.execScript||d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)c.length||void 0===b?d[e]&&d[e]!==Object.prototype[e]?d=d[e]:d=d[e]={}:d[e]=b};Ih=function(a){return a&&0<=Gh[a]?Gh[a]:Hh};Lh=function(a){if(!a)return _.Jh("clpp.log",Pb+a+ca),-1;var b=Kh[a.toUpperCase()];return void 0===b?(_.Jh("clpp.log",Pb+a+ca),-1):b};_.J=function(a){(this.tag=a)&&void 0===Gh[a]&&(Gh[a]=-1)};_.Nh=function(a){Mh.info.apply(Mh,arguments)};
_.Oh=function(a){Mh.debug.apply(Mh,arguments)};_.Jh=function(a){Mh.warn.apply(Mh,arguments)};_.Ph=function(a){Mh.error.apply(Mh,arguments)};Qh=function(a,b){this.lb=a;this.sourceIndex=b};_.Th=function(a){if(a){var b=a.a();b in _.Rh?_.Sh.warn("Player-Factory '"+b+"' already registered"):(_.Rh[b]=a,_.Sh.info("Registered Player-Factory: '"+b+"'"))}};Uh=function(a){return Object.values(_.Rh).find(a)||null};_.Vh=function(a){this.f=a;this.a=null};
Wh=function(a,b,c){function d(){e&&a.f()}a.stop();var e=!0,f=null;a.a=function(){c?clearInterval(f):clearTimeout(f);e=!1};f=c?setInterval(d,1E3*b):setTimeout(d,1E3*b);return a};_.Xh=function(a){this.f=a;this.a=null};Yh=function(a){return 0>=a?Promise.resolve():new Promise(function(b){setTimeout(function(){b()},1E3*a)})};Zh=function(){this.Nc=null;this.f=[];this.h=[];this.Ca=new _.J(rd);this.a=null;this.j=!1};$h=function(a){return[a.Nc].concat(_.gh(a.f)).filter(function(b){return null!=b})};
bi=function(a,b){var c;_.H(function(d){c=function(){return Promise.all(a.f.filter(function(e){return null!=e.getLoadedSource()}).map(b))};return _.x(d,ai(a,c),0)})};ci=function(a,b){var c;return _.H(function(d){c=function(){return Promise.all($h(a).map(b))};return _.x(d,ai(a,c),0)})};ai=function(a,b){return _.H(function(c){if(1==c.a)return a.a?_.x(c,a.a,2):c.D(2);a.a=b().then(function(){a.a=null});_.y(c)})};_.di=function(){this.a={}};ei=function(a,b,c,d){this.f=a;this.hd=b;this.a=c;this.co=!!d};
_.K=function(a,b){if(b)for(var 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};fi=function(a){this.a=new _.di;this.f=a};_.gi=function(){this.a=new _.di};
ii=function(a,b,c){function d(h){for(var l=_.u(e),m=l.next();!m.done;m=l.next())a.off(b,m.value,d);c(h)}for(var e=[fe,"msneedkey",Xg,"needkey"],f=_.u(e),g=f.next();!g.done;g=f.next())a.on(b,g.value,d)};_.ki=function(a){var b=a.a,c=[],d;for(d in b.a)c.push.apply(c,b.a[d]);for(b=0;b<c.length;++b)ji(c[b]);a.a.clear()};li=function(a,b,c,d){this.target=a;this.type=b;this.a=c;this.f=d;this.target.addEventListener(b,c,d)};ji=function(a){a.target.removeEventListener(a.type,a.a,a.f);a.target=null;a.a=null};
mi=function(a){this.m=a;this.l=a.getConfiguration().streaming.addMissingTimelineCues||!1;this.j=new _.gi;this.f=new Set;this.a=new Set;this.h=null;this.g=new _.J("clpp.native.Metadata")};oi=function(a,b){a.j.on(b,_.Bc,function(c){c=c.track;c.kind===_.Je&&ni(a,c)})};
ni=function(a,b){a.g.debug("onMetadataTrackAdded_()");b.mode=_.qe;var c=!b.cues||0===b.cues.length;if(a.m.isLive()||!c){var d=b.cues;c=pi(d);qi(c);a.a=ri(c,a.l);0<a.a.size&&(si(a,a.a),a.m.trigger(new _.K(_.qg)));a.j.on(b,_.Ld,function(){for(var e=a.m.getPosition(),f=_.u(a.a),g=f.next();!g.done;g=f.next()){var h,l=a;g=g.value;if(Infinity===g.endTime){if(h=!l.f.has(g)){h=g.startTime;var m=h+.5;h=h<=e&&e<=m}h&&(l.f.add(g),l.m.trigger(new _.K(_.og,{detail:g})))}else h=g.startTime<=e&&e<=g.endTime,!h&&
l.f.has(g)?(l.f["delete"](g),l.m.trigger(new _.K(_.pg,{detail:g}))):h&&!l.f.has(g)&&(l.f.add(g),l.m.trigger(new _.K(_.og,{detail:g})))}});a.m.isLive()&&(a.h=setInterval(function(){if(b.cues){var e=a.m.getSeekRange().start;for(var f=[],g=_.u(b.cues),h=g.next();!h.done;h=g.next())h=h.value,h.endTime<e&&f.push(h);ti(a,b,f);0<f.length&&a.g.debug("Evicted "+f.length+" old cues.");g=_.u(a.a);for(h=g.next();!h.done;h=g.next())h=h.value,h.endTime<e&&a.a["delete"](h);e=0<f.length}else e=!1;ui(a,b);f=pi(d);
var l=ri(f,a.l);g=new Set;h=!1;l=_.u(l);for(var m=l.next();!m.done;m=l.next()){m=m.value;var n=vi(a,m);n?(m.customAttributes&&(n.customAttributes=_.L.ta(n.customAttributes||{},m.customAttributes)||void 0),h=!0):(a.a.add(m),g.add(m))}h=0<g.size||h;qi(f);(e||h)&&a.m.trigger(new _.K(_.qg));si(a,g)},6E3))}};si=function(a,b){for(var c=_.u(b),d=c.next();!d.done;d=c.next())a.m.trigger(new _.K(_.ng,{detail:d.value}))};
vi=function(a,b){return Array.from(a.a.values()).find(function(c){return b.startTime===c.startTime&&b.endTime===c.endTime})||null};ui=function(a,b){if(b.cues){var c=wi(b.cues).filter(function(l){return l.type===Dd}),d=c.filter(function(l){return l.Eg}),e=c.filter(function(l){return!l.Eg});c=[];e=_.u(e);for(var f=e.next();!f.done;f=e.next()){f=f.value;for(var g=_.u(d),h=g.next();!h.done;h=g.next())h=h.value,xi(f,h)&&(c.push(f),h.Nh=f.startTime)}ti(a,b,c);0<c.length&&a.g.debug("Removed "+c.length+" duplicated cues.")}};
ti=function(a,b,c){c=_.u(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;try{b.removeCue(d)}catch(e){a.g.debug("Failed to remove cue",d,e)}}};xi=function(a,b){var c=a.endTime-a.startTime,d=b.endTime-b.startTime,e=a.Nh||a.startTime,f=b.Nh||b.startTime;return(Infinity===c&&Infinity===d||.01>Math.abs(c-d))&&.5>Math.abs(e-f)&&a.value.key===b.value.key&&a.value.data===b.value.data};
Ai=function(a){var b=[],c={};a=_.u(a);for(var d=a.next();!d.done;c={Hd:c.Hd},d=a.next())c.Hd=d.value,(d=b.find(function(e){return function(f){var g=e.Hd;return f.startTime===g.startTime&&f.endTime===g.endTime}}(c)))?yi(c.Hd,d):(d=zi(c.Hd),b.push(d));return b};zi=function(a){var b=a.startTime,c=a.endTime;b={schemeIdUri:"",value:"",startTime:b,endTime:c,id:"T"+b.toFixed(2)+"-"+c.toFixed(2),type:_.Bi,eventElement:null};yi(a,b);return b};
yi=function(a,b){if(a.key.startsWith("X-"))b.customAttributes||(b.customAttributes={}),b.customAttributes[a.key]=a.value,"X-CUSTOM-ID"===a.key&&(b.id=a.value);else if("SCTE35-OUT"===a.key||"SCTE35-IN"===a.key)b.schemeIdUri=_.Ag,b.type=_.Ci};qi=function(a){a.forEach(function(b){b.Eg=!0})};pi=function(a){return wi(a).filter(function(b){return b.type===Dd&&!b.Eg})};wi=function(a){var b=[];a=_.u(a);for(var c=a.next();!c.done;c=a.next())b.push(c.value);return b};
ri=function(a,b){var c=a.map(function(d){return{startTime:d.startTime,endTime:d.endTime,key:d.value.key,value:d.value.data,si:!1}});c=Di(c);b&&(c=Ei(c));return new Set(Ai(c))};Di=function(a){var b=new Set(a),c=new Set(a.filter(function(d){return"SCTE35-OUT"===d.key}).map(Fi));a.filter(function(d){return"SCTE35-IN"===d.key}).forEach(function(d){c.has(Fi(d))||(d.si=!0)});return Array.from(b.values())};Ei=function(a){a.forEach(function(b){b.si&&(b.endTime=b.startTime,b.startTime=0)});return a};
Fi=function(a){return a.startTime+"-"+a.endTime};_.Gi=function(a){return Array.isArray(a)?a:[a]};Hi=function(a,b){return a===b?!0:a.length===b.length&&a.every(function(c,d){return c===b[d]})};Ji=function(a,b,c){if(null==a&&null==b)return!0;if(null==a||null==b)return!1;a=c?a.map(c):a;b=c?b.map(c):b;return Ii(a,b)&&Ii(b,a)};Ii=function(a,b){var c=new Set(a);return b.every(function(d){return c.has(d)})};
_.Ki=function(a,b){b=void 0===b?{}:b;if(b.Ih){for(var c=[],d={},e=_.u(a),f=e.next();!f.done;d={Ke:d.Ke},f=e.next())d.Ke=f.value,c.some(function(g){return function(h){return b.Ih(g.Ke,h)}}(d))||c.push(d.Ke);return c}return Array.from((new Set(a)).values())};Li=function(a,b){var c=new Set(a),d=new Set(b);return{eo:a.filter(function(e){return!d.has(e)}),zp:a.filter(function(e){return d.has(e)}),Ij:b.filter(function(e){return!c.has(e)})}};
_.Si=function(a,b,c,d){d=void 0===d?_.Mi:d;this.startTime=a;this.endTime=b;this.payload=c;this.payloadType=d;this.positionAlign=this.position=null;this.size=100;this.textAlign=_.Ni;this.writingMode=_.Oi;this.lineInterpretation=_.Pi;this.line=null;this.lineAlign=_.Qi;this.direction=Ri;this.region=null;this.cssClassList=[];this.id=this.backgroundImage="";this.containerRows=null};
_.Vi=function(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=_.Ti;this.scroll=Ui;this.cssClassList=[];this.writingMode=this.displayAlign=null};Wi=function(a){this.m=a;this.l=a.getTextDisplayer();this.f=this.h=null;this.a=new _.gi;this.j=!1;this.g=new _.J("clpp.native.CueHandler")};
Xi=function(a,b){var c=b.track;c.kind!==_.Je&&(c.mode===_.Vf&&(c.mode=_.qe),a.a.on(c,_.Ld,function(d){d=d.target||d.srcElement;d.mode=_.qe;d.activeCues&&(d=Array.from(d.activeCues).map(a.o),a.l.append(d,[]))}))};_.N=function(a,b,c,d,e){var f=Error.call(this,Yi(a,b,c,d));this.message=f.message;"stack"in f&&(this.stack=f.stack);this.severity=a;this.category=b;this.code=c;this.data=!d||_.L.ia(d)?{}:d;this.cause=void 0===e?null:e;this.f=!1;Error.captureStackTrace&&Error.captureStackTrace(this,_.N)};
Yi=function(a,b,c,d){a=(a===_.O?"FATAL":"RECOVERABLE")+" Clpp-Error [Category "+b+" - Code "+c+"]";if(_.L.ia(d))a+=": "+d;else if(null!=d)if(null!=d.message)a+=": "+d.message,delete d.message;else try{a+=": "+JSON.stringify(d)}catch(e){}return a};_.Zi=function(a,b){var c=Error.call(this,a);this.message=c.message;"stack"in c&&(this.stack=c.stack);this.code=b};
$i=function(a,b){var c=b||Hi,d=null,e=null,f=!1;return function(g){for(var h=[],l=0;l<arguments.length;++l)h[l]=arguments[l];if(f&&c(h,d))return e;f=!0;d=h;return e=a.apply(null,_.gh(h))}};_.aj=function(a){return null!=a};bj=function(a){for(var b=[],c=0;c<arguments.length;++c)b[c]=arguments[c];for(c=0;c<b.length;c++){var d=b[c];if(null!==d&&void 0!==d)return d}throw new _.Zi("No non-null, non-undefined value found");};
cj=function(a){for(var b=[],c=0;c<arguments.length;++c)b[c]=arguments[c];for(c=0;c<b.length;c++){var d=b[c];if(null!==d&&void 0!==d)return d}};_.dj=function(a){var b;a instanceof _.dj?(ej(this,a.Fb),this.Tc=a.Tc,this.ab=a.ab,fj(this,a.Dd),this.Ma=a.Ma,_.gj(this,hj(a.a)),this.Gc=a.Gc):a&&(b=String(a).match(ij))?(ej(this,b[1]||"",!0),this.Tc=jj(b[2]||""),this.ab=jj(b[3]||"",!0),fj(this,b[4]),this.Ma=jj(b[5]||"",!0),_.gj(this,b[6]||"",!0),this.Gc=jj(b[7]||"")):this.a=new _.kj(null)};
ej=function(a,b,c){a.Fb=c?jj(b,!0):b;a.Fb&&(a.Fb=a.Fb.replace(/:$/,""))};fj=function(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.Dd=b}else a.Dd=null};_.gj=function(a,b,c){b instanceof _.kj?a.a=b:(c||(b=lj(b,mj)),a.a=new _.kj(b))};jj=function(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""};lj=function(a,b,c){return typeof a===_.eg?(a=encodeURI(a).replace(b,nj),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null};
nj=function(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)};_.kj=function(a){this.f=a||null};hj=function(a){var b=new _.kj;b.f=a.f;if(a.a){var c={},d;for(d in a.a)c[d]=a.a[d].concat();b.a=c;b.h=a.h}return b};qj=function(a,b){for(var c=_.u(oj[a]),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=_.u(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.test(f.trim()))return f.trim()}return a===_.pj?"":null};
_.sj=function(a,b){for(var c=rj[a],d=0;d<c.length;d++)for(var e=0;e<b.length;e++)if(c[d].test(b[e].trim()))return b[e].trim();return a===_.pj?"":null};_.vj=function(a,b,c){return a.map(function(d){d=_.tj(d)||"";return(d=_.uj[b][d])?d:b===_.pj?c&&"vtt"!==c?Jc:_.kg:null}).filter(Boolean)[0]||null};_.tj=function(a){a=(new _.dj(a)).Ma.split(".");return 1>=a.length?null:a.pop()};_.wj=function(a,b,c,d){this.id=a;this.name=b;this.attributes=c;this.value=void 0===d?null:d};
_.P=function(a,b,c,d){d=void 0===d?{}:d;a=a.getAttribute(b);if(!a&&d.required)throw new _.N(_.O,4,4023,"Required attribute missing: "+b);return a?a.value:c||null};_.xj=function(a,b){return _.P(a,b,void 0,{required:!0})};_.yj=function(a,b){this.name=a;this.value=b};
_.zj=function(a,b,c,d,e,f,g,h,l,m,n,p,q,t,v,z,A){l=void 0===l?!1:l;m=void 0===m?null:m;n=void 0===n?null:n;p=void 0===p?null:p;q=void 0===q?null:q;t=void 0===t?[]:t;v=void 0===v?null:v;z=void 0===z?"":z;this.position=a;this.startTime=b;this.endTime=c;this.Ha=g;this.cb=d;this.Da=e;this.oa=f;this.keyInfo=(void 0===h?null:h)||null;this.qd=_.L.R(l)?!1:!!l;this.timescale=m;this.horizontalTiles=n;this.verticalTiles=p;this.durationPerTile=q;this.a=t||[];this.h=!1;this.initSegment=v;this.xe=z;this.Qa=A};
_.Aj=function(a,b,c,d,e,f,g,h,l,m,n,p,q,t,v){t=void 0===t?[]:t;_.zj.call(this,a,b,c,d,e,f,g,void 0===h?null:h,void 0===l?!1:l,void 0===m?null:m,void 0===n?null:n,void 0===p?null:p,void 0===q?null:q,t,void 0===v?null:v);this.na=0};Bj=function(a){return"com.apple.hls.interstitial"===a||"com.apple.hls.overlay"===a};_.Dj=function(a,b){a=_.Cj(a);b=_.Cj(b);return a.split("-")[0]===b.split("-")[0]};
_.Cj=function(a){var b=(a||"").split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=Ej.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a};Fj=function(a){if(null!==a&&void 0!==a)return Number(a)};Gj=function(a){return a.reduce(function(b,c){return b+c},0)};_.Hj=function(a){if(typeof a!==_.eg)return null;var b=a.trim().match(/^(\d+)x(\d+)$/);if(!b)return null;a=parseInt(b[1],10);b=parseInt(b[2],10);return 0>=a||0>=b?null:{ke:a,Fe:b,Bo:a*b}};_.Ij=function(a){this.f=a;this.a=0};
_.Jj=function(a,b){b.lastIndex=a.a;var c=b.exec(a.f);c=null==c?null:{position:c.index,length:c[0].length,results:c};if(a.a===a.f.length||null===c||c.position!==a.a)return null;a.a+=c.length;return c.results};
_.Kj=function(a,b){var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new _.N(_.O,4,4016,{invalidTag:b});var d=c[1],e=c[2];c=[];var f;if(e){e=new _.Ij(e);var g;(g=_.Jj(e,/^([^,=]+)(?:,|$)/g))&&g[1]&&(f=g[1].trim());for(var h=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;g=_.Jj(e,h);)c.push(new _.yj(g[1],g[2]||g[3]||""))}return new _.wj(a,d,c,f)};_.Lj=function(a,b){for(var c=_.u(a),d=c.next();!d.done;d=c.next())if(!b(d.value))return!1;return!0};Mj=function(){};
Qj=function(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!==b.byteLength)return!1;if(Nj(a)===Nj(b)&&(a.byteOffset||0)===(b.byteOffset||0))return!0;for(var c=_.Oj(a),d=_.Oj(b),e=_.u(Pj(a.byteLength)),f=e.next();!f.done;f=e.next())if(f=f.value,c[f]!==d[f])return!1;return!0};_.Oj=function(a,b,c){c=void 0===c?Infinity:c;return Rj(a,void 0===b?0:b,c,Uint8Array)};Sj=function(a,b,c){c=void 0===c?Infinity:c;return Rj(a,void 0===b?0:b,c,Uint16Array)};
Tj=function(a,b,c){c=void 0===c?Infinity:c;return Rj(a,void 0===b?0:b,c,Uint32Array)};_.Uj=function(a,b,c){c=void 0===c?Infinity:c;return Rj(a,void 0===b?0:b,c,Int32Array)};_.Vj=function(a,b,c){c=void 0===c?Infinity:c;return Rj(a,void 0===b?0:b,c,DataView)};Wj=function(a){return a instanceof ArrayBuffer?a:0===a.byteOffset&&a.byteLength===a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer};
Rj=function(a,b,c,d){var e=d.BYTES_PER_ELEMENT||1,f=Nj(a),g=(a.byteOffset||0)+a.byteLength;a=Math.max(0,Math.min((a.byteOffset||0)+b*e,g));c=Math.min(a+Math.max(c*e,0),g);a/=e;return new d(f,a,c/e-a)};Nj=function(a){return a instanceof ArrayBuffer?a:a.buffer};_.Yj=function(){return{maxAttempts:1,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:0,fatalStatusCodes:_.gh(Xj).concat()}};
Zj=function(a,b){a.timeout=b.timeout;a.baseDelay=b.baseDelay;a.backoffFactor=b.backoffFactor;a.fuzzFactor=b.fuzzFactor;a.maxAttempts=b.maxAttempts;a.fatalStatusCodes=b.fatalStatusCodes||_.gh(Xj).concat()};ak=function(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b};
_.ck=function(a,b){_.L.ia(a)&&(a={uris:[a]});Array.isArray(a)&&(a={uris:a});var c={uris:a.uris||[],type:a.type||_.bk,uriIndex:0,method:a.method||"GET",body:a.body||null,headers:Object.assign({},a.headers),allowCrossSiteCredentials:a.allowCrossSiteCredentials||!1,onProgress:a.onProgress||null,onFragment:a.onFragment||null,maxAttempts:a.maxAttempts||1,currentAttempt:0,baseDelay:a.baseDelay||1E3,backoffFactor:a.backoffFactor||2,fuzzFactor:a.fuzzFactor||.5,timeout:a.timeout||0,requestModifiers:a.requestModifiers||
[],responseModifiers:a.responseModifiers||[],startTime:a.startTime||null,endTime:a.endTime||null,contentType:a.contentType||null,licenseRequestType:a.licenseRequestType||null,sessionId:null,bytesRemaining:-1,bytesLoaded:-1,bytesTotal:-1,timescale:a.timescale||null,rateLimitBps:a.rateLimitBps||null,disableFragmentSupport:a.disableFragmentSupport||!1,disableMergedFragments:a.disableMergedFragments||!1,fatalStatusCodes:_.gh(Xj).concat(),requestStartTimestamp:null};a.keyInfo&&(c.keyInfo=a.keyInfo);b&&
Zj(c,b);return c};_.gk=function(a,b,c,d,e,f,g,h){a={uri:e||d,data:b,headers:a,status:c,timeMs:g,responseStartMs:h,request:f};if(dk(c))return ek(a);throw fk(a);};dk=function(a){return 200<=a&&299>=a&&202!==a};ek=function(a){return{uri:a.uri,data:a.data||new ArrayBuffer(0),headers:a.headers,status:a.status,fromCache:!!a.headers["x-shaka-from-cache"],timeMs:a.timeMs,responseStartMs:a.responseStartMs,request:a.request}};
fk=function(a){a=ek(a);try{var b=_.Q.de(a.data,!0)}catch(d){b=null}_.Oh("HTTP error text:",b);var c=a.request;return new _.N(0<=(c?c.fatalStatusCodes||[]:[]).indexOf(a.status)?_.O:1,1,1001,{url:a.uri,status:a.status,responseText:b,headers:a.headers,request:a.request,response:a})};hk=function(a,b){var c=parseInt(b,10);Number.isNaN(c)&&(c=-1);a.bytesTotal=c;a.bytesLoaded=0;a.bytesRemaining=c};
ik=function(a,b,c){0<a.bytesRemaining&&(a.bytesRemaining-=b);a.bytesLoaded+=b;if(a.onProgress)a.onProgress(b,c)};jk=function(a,b,c){if(0>=a)return Promise.resolve();var d=8*c/a-b/1E3;return 0<d?new Promise(function(e){setTimeout(e,1E3*d)}):Promise.resolve()};
_.kk=function(){this.dj=this.Cf=this.done=!1;this.error=this.value=null;var a,b,c=new Promise(function(d,e){a=function(f){this.done=this.Cf=!0;this.value=f;d(f)};b=function(f){this.done=this.dj=!0;this.error=f;e(f)}});c.Cf=!1;c.done=!1;c.dj=!1;c.value=null;c.error=null;c.resolve=a;c.reject=b;return c};_.lk=function(a,b){this.S=a;this.A=b;this.a=!1};mk=function(a,b){a.S.then(function(){return b(!0)},function(){return b(!1)});return a};_.nk=function(){this.a=[]};
_.ok=function(a,b){a.a.push(mk(b,function(){var c=a.a,d=c.indexOf(b);-1<d&&c.splice(d,1)}))};_.vk=function(){this.f=[];this.h=[];this.j=[];this.w=!1;this.o=new _.nk;this.a={};this.headers=new Map;this.l=0;this.a.data=pk;!window.fetch||!window.AbortController||_.qk(6)||_.rk()&&68<_.sk().browserVersion.major?(this.a.http=tk,this.a.https=tk):(this.a.http=uk,this.a.https=uk)};wk=function(a,b){var c,d;return _.H(function(e){if(1==e.a)return c=_.Q,_.x(e,a.fetch(b),2);d=e.f;return e["return"](c.Fi(c.ea(d.data)))})};
xk=function(a,b){var c,d;return _.H(function(e){if(1==e.a)return _.x(e,wk(a,b),2);c=e.f;if(!c)return e["return"](null);try{d=JSON.parse(c);if(null==d||typeof d!==_.Re)throw Error("Not an object");return e["return"](d)}catch(f){throw new _.Zi("Failed to parse JSON response","json-failed");}})};
yk=function(a,b,c,d){d=void 0===d?"HEAD":d;var e,f;return _.H(function(g){switch(g.a){case 1:if(!navigator.onLine)return g["return"](!1);if(!b){g.D(2);break}e=_.ck(b,c);e.method=d;c||(e.timeout=5E3);e.headers["cache-control"]="no-cache";_.C(g,4);return _.x(g,a.fetch(e).S,6);case 6:_.uh(g,2);break;case 4:if(f=_.E(g),1002===f.code||1003===f.code)return g["return"](!1);case 2:return g["return"](!0)}})};
zk=function(a,b){for(var c=_.u(a.headers),d=c.next();!d.done;d=c.next()){var e=_.u(d.value);d=e.next().value;e=e.next().value;b.headers[d]||(b.headers[d]=e)}};Ck=function(a,b){var c=new _.dj(b.uris[b.uriIndex]),d=c.Fb;d||(d=location.protocol,d=d.slice(0,-1),ej(c,d),b.uris[b.uriIndex]=c.toString());var e=a.a[d];if(!e)throw new _.N(_.O,1,1E3,{url:c.toString()});return function(f){return e(f)}};
_.Dk=function(a,b){this.id=a;this.type=b;this.roles=[];this.frameRate=this.label=this.originalLanguage=this.language=this.kind=null;this.trickPlay=!1;this.channelsCount=this.src=this.mimeType=null;this.spatialAudio=!1;this.renditions=[];this.accessibility=[]};_.Ek=function(a){return a&&a!==_.wg?a:null};
Hk=function(a){if(!a)throw new _.N(_.O,3,3101,Ya+a);if(!_.L.ia(a))throw new _.N(_.O,3,3101,Ya+a+". Track type must be a string!");switch(a.toLowerCase()){case _.S:return _.S;case _.T:return _.T;case _.Fk:return _.Fk;case Gk:return Gk}throw new _.N(_.O,3,3101,"Unknown track type: "+a+".");};
Jk=function(a,b){a=Hk(a);var c=_.Ek(b.kind),d=b.id;d||(d=String(_.Ik++));d=new _.Dk(d,c===_.Je?Gk:a);d.kind=c;d.label=_.Ek(b.label);d.language=_.Ek(b.language);d.originalLanguage=b.originalLanguage||d.language;return d};Kk=function(a){return"@@scheme:"+(a.scheme||"")+("@@value:"+a.value)+("@@id:"+(a.id||"")+"@@type:"+(a.type||""))+("@@protocol:"+(a.protocol||""))};_.Lk=function(a,b){this.track=b;this.id=a;this.originalId=this.codec=this.Od=this.bandwidth=this.height=this.width=null;this.a=!1};
_.Mk=function(a){this.j=a;this.scheme=null;var b=document.createElement("a"),c=a.match(/^(.*:)(\/\/(.*))$/),d=!1;if(c){if(this.scheme=c[1],b.href=c[2],":"===b.protocol||""===b.host&&""===b.pathname)b.href="//dummy.com/"+c[3],d=!0}else{b.href=a;if(":"===b.protocol||""===b.host&&""===b.pathname)b.href="//dummy.com/"+a.match(/\/?\/?(.*)/)[1],d=!0;this.scheme=b.protocol}""===this.scheme&&(this.scheme=window.location.protocol);this.a=d?"":b.hostname;this.port=b.port;this.path=b.pathname;_.Q.startsWith(this.path,
"/")||(this.path="/"+this.path);this.f=b.search;this.h=b.hash};_.Nk=function(a){return a.scheme+"//"+(a.a+(a.port?":"+a.port:"")+a.path+a.h+a.f)};_.Ok=function(a,b,c){return a?(c||Object.keys(a).sort()).reduce(function(d,e){if(!(e in a))return d;var f=a[e],g="\x26";""===d&&(g=b?"":"?");d=d+g+encodeURIComponent(e);return d=d+"\x3d"+encodeURIComponent(void 0===f?"":f)},""):""};
_.Pk=function(a){var b={};a=a||"";a=a.substring(a.indexOf("?")+1);a=_.u(a.split("\x26"));for(var c=a.next();!c.done;c=a.next()){var d=c.value.split("\x3d");c=decodeURIComponent(d[0]);d=decodeURIComponent(d[1]||"");c&&(b[c]=d)}return b};_.Qk=function(a,b){return a.startsWith("http:://")||a.startsWith("https:://")?a:(new URL(a,b)).toString()};
Rk=function(a){this.f=a;this.g=new _.J("clpp.native.hls.HlsMetadataParser");this.a=$i(this.h.bind(this),function(b,c){return b[0]===c[0]&&b[1].enableHlsVideoTrackInfo===c[1].enableHlsVideoTrackInfo&&b[1].enableMetadata===c[1].enableMetadata})};
Uk=function(a,b,c){var d,e,f,g,h;return _.H(function(l){if(1==l.a)return _.x(l,Sk(a,b,c),2);d=l.f;e=d.mimeType;f=d.renditions;g=new _.Dk("dummy",_.Fk);h=f.map(function(m,n){var p=new _.Lk("R"+n,g);p.bandwidth=m.bandwidth;p.Od=m.Od;p.codec=m.codec;p.width=m.width;p.height=m.height;return p});Tk(h);return l["return"]({renditions:h,mimeType:e||void 0})})};
Wk=function(a){a=a.split("\n").filter(function(c){return c.trim().startsWith("#EXT-X-MEDIA:")}).map(function(c){return Vk(c)});var b=new Map;a.forEach(function(c){if(c.type&&c.name){var d=c.type+":"+c.name;if(b.has(d))throw Error("#EXT-X-MEDIA:NAME attributes are not unique. It is impossible to map HLS metadata to Safari data structures.");b.set(d,c)}});return b};
Vk=function(a){function b(d){return(d=c.getAttribute(d))?d.value:void 0}var c=_.Kj(0,a);a=b(_.Mb);a=null!=a?{AUDIO:_.T,VIDEO:_.Fk,SUBTITLES:_.S}[a]:void 0;return{type:a,groupId:b(_.Sa),name:b(_.hb),language:b(_.ab),fp:b("AUTOSELECT"),"default":b("DEFAULT"),qp:b("FORCED"),vh:b("CHARACTERISTICS"),uri:b(_.Ob)}};Tk=function(a){var b=new Set;a.forEach(function(c){b.add(c.width+"x"+c.height)});if(b.size<a.length)throw Error("Playlist contains multiple renditions with the same resolution.");};
Xk=function(a,b){var c,d;return _.H(function(e){if(1==e.a)return c=_.ck(b),_.x(e,wk(a.f,c),2);d=e.f;return e["return"](d)})};Sk=function(a,b,c){var d,e,f,g;return _.H(function(h){if(1==h.a)return d=Yk(b),e=Zk(b,c),f=d[0]?d[0].codec:null,_.x(h,$k(a,e,f),2);g=h.f;return h["return"]({mimeType:g,renditions:d})})};$k=function(a,b,c){var d,e;return _.H(function(f){if(1==f.a)return b&&c?_.x(f,Xk(a,b),2):f["return"](null);d=f.f;e=[al(d,b),bl(d,b)].filter(Boolean);return f["return"](_.vj(e,_.Jg,c))})};
Yk=function(a){return a.split("\n").filter(function(b){return b.trim().startsWith("#EXT-X-STREAM-INF:")}).map(function(b){var c=_.Kj(0,b);if(c.getAttribute(_.Vb))throw Error("Playlist contains alternative video streams.");var d=_.P(c,_.Bb);b=d?Number(d.split("x")[0]):null;d=d?Number(d.split("x")[1]):null;var e=_.P(c,_.pa);e=e?Number(e):null;var f=_.P(c,"AVERAGE-BANDWIDTH");f=f?Number(f):null;c=_.P(c,_.ua);c=_.sj(_.Jg,c?c.split(","):[]);return{bandwidth:e,Od:f,codec:c,width:b,height:d,mimeType:null}})};
Zk=function(a,b){var c=a.split("\n").filter(function(d){return d.trim().endsWith(".m3u8")})[0];return c?_.Qk(c,b):null};al=function(a,b){var c=a.split("\n").find(function(d){return!d.startsWith("#")&&0<d.trim().length});return c?_.Qk(c,b):null};bl=function(a,b){var c=a.split("\n").find(function(d){return d.startsWith("#EXT-X-MAP:")});return c?(c=_.P(_.Kj(0,c),_.Ob))?_.Qk(c,b):null:null};
_.el=function(a,b,c){for(var d=_.u(_.dl),e=d.next();!e.done;e=d.next())if(e=e.value,e.probe(b,c))return e.create(a);return null};_.fl=function(a){a=_.dl.indexOf(a);0<=a&&_.dl.splice(a,1)};_.gl=function(){};jl=function(a,b){var c=hl;il.set(a.toLowerCase().split(";")[0]+"-"+c,{priority:c,plugin:b})};_.nl=function(a,b){for(var c=_.u([kl,ll,ml,hl]),d=c.next();!d.done;d=c.next())if(d=il.get(a.toLowerCase().split(";")[0]+"-"+d.value)){var e=d.plugin(),f=e.isSupported(a,b);e.destroy();if(f)return d.plugin}return null};
_.ol=function(a,b){var c=a;b&&(c+=';codecs\x3d"'+b+'"');return c.replace(/\s/g,"")};_.pl=function(a){return a.split(";")[0]};_.ql=function(a){a=a.split(/\s*;\s*/);a.shift();return(a=a.find(function(b){return b.startsWith("codecs\x3d")}))?a.split("\x3d")[1].replace(/^"|"$/g,"").split(/\s*,\s*/).join(","):""};rl=function(){};_.sl=function(){return!!navigator.userAgent.match(/Edge?\//)};_.qk=function(a){return _.tl("Tizen"+(a?" "+String(a):""))};_.rk=function(){return _.tl("Web0S")};
_.vl=function(){return _.rk()&&79===_.ul().major};_.wl=function(){return _.tl("CrKey")};_.xl=function(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!_.qk()};_.yl=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:_.xl()&&1<navigator.maxTouchPoints};_.zl=function(){return/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)};_.tl=function(a){return(navigator.userAgent||"").includes(a)};
Cl=function(){if(Al)return Al;Bl||(Bl=new _.Xh(function(){Al=null}));(Al=document.querySelector(_.Jg)||document.querySelector(_.Pc))||(Al=document.createElement(_.Jg));Bl.ga(1);return Al};El=function(a,b){try{return parseInt(b,10)}catch(c){Dl.warn("Unable to parse version number for '"+b+"' from '"+a+"'")}return-1};
Fl=function(a){var b={major:-1,name:_.xg};if(!a)return b;var c=a.replace(/_/g,".");b.name=c;c=c.split(".");1<=c.length&&(b.major=El(a,c[0]));2<=c.length&&(b.minor=El(a,c[1]));3<=c.length&&(b.patch=El(a,c[2]));4<=c.length&&(b.build=El(a,c[3]));return b};Gl=function(a,b){if(!a||!b||0===b.length)return!1;for(var c=0;c<b.length;c++)if(0<=a.indexOf(b[c]))return!0;return!1};
Ql=function(){var a=Hl();if(!a)return Il;var b=a.match(/^.+?(?=\))/);if(!b)return Il;b=b[0];if(Gl(b,["iphone","ipad"]))return Jl;if(Gl(b,["android"]))return Kl;if(Gl(b,["macintosh"]))return Ll;if(Gl(b,["windows nt"]))return Ml;if(Gl(b,["tizen"]))return Nl;if(Gl(b,["web0s"]))return Ol;if(Gl(b,["linux"]))return Pl;Dl.warn("Unable to identify OS from user agent: "+a);return Il};
_.ul=function(){var a=Hl(),b=["ie","edge","opera","firefox","safari",ld];var c=Ql();for(var d=Rl[c],e=0,f=b.length;e<f;e++)if(c=d[b[e]]&&a.match(d[b[e]]))return Fl(c[1]);return Fl("")};Hl=function(){var a=window.navigator.userAgent;return a=a.toLowerCase()};
_.sk=function(){var a=Ql();var b=Ql();var c=Rl[b];if(c){c=Hl().match(c.os_version)[1];c=Fl(c);if(b===Ml)if("5.1"===c.name)c.name="xp";else if("6.1"===c.name)c.name="7";else if("6.2"===c.name||"6.3"===c.name)c.name="8";b=c}else b=Fl("");a:{c=Hl();var d=["ie","edge","opera","firefox","safari",ld],e=Ql();e=Rl[e];for(var f=0,g=d.length;f<g;f++)if(e[d[f]]&&c.match(e[d[f]])){c=d[f];break a}c=Sl}return{os:a,osVersion:b,browser:c,browserVersion:_.ul()}};
Tl=function(){this.g=new _.J("clpp.native.TrackManager");this.m=null;this.f=new _.gi;this.h=[];this.B=0;this.o={};this.C=[];this.a=new Map;this.w=null;this.l=new Map;this.A=!0;this.J=this.zg.bind(this,_.S);this.L=this.Bg.bind(this,_.S);this.K=this.Ag.bind(this,_.S);this.N=this.zg.bind(this,_.Fk);this.T=this.Bg.bind(this,_.Fk);this.P=this.Ag.bind(this,_.Fk);this.G=this.zg.bind(this,_.T);this.I=this.Bg.bind(this,_.T);this.H=this.Ag.bind(this,_.T);this.j=null};
Vl=function(a,b){var c,d,e,f,g,h,l,m;return _.H(function(n){if(1==n.a){c=a.m.getConfiguration();d=_.el(c,b.mimeType,_.kg);if(!d)return a.g.warn("Track MIME type is not supported",b),n["return"]();e=_.ck(b.url);return _.x(n,a.m.getNetworkEngine().fetch(e).S,2)}(f=n.f)&&f.data&&(g="External_"+a.B++,a.o[g]=b,h=d.a(_.Oj(f.data)),l=URL.createObjectURL(new Blob([h])),m={url:l,kind:b.kind,language:b.language,label:b.label,mimeType:_.kg},Ul(a,m,g));_.y(n)})};Xl=function(a,b,c){return Wl(a)&&b===_.Fk&&!!c.enableHlsVideoTrackInfo};
Yl=function(a,b,c){return Wl(a)&&(b===_.T||b===_.S)&&!!c.enableMetadata};Wl=function(a){a=a.m.getLoadedSource();return!(!a||a.type!==_.Zl&&!a.url.endsWith(".m3u8"))&&_.xl()};$l=function(a,b,c){var d,e;return _.H(function(f){if(1==f.a)return(d=a.m.getLoadedSource())&&a.j?_.x(f,a.j.a(d.url,c),2):f["return"]();e=f.f;e.mimeType&&(b.mimeType=e.mimeType);e.renditions&&0<e.renditions.length&&(b.renditions=e.renditions,b.renditions.forEach(function(g){g.track=b}));_.y(f)})};
am=function(a,b,c){var d,e,f,g;return _.H(function(h){if(1==h.a)return(d=a.m.getLoadedSource())&&a.j?_.x(h,a.j.a(d.url,c),2):h["return"]();e=h.f;e.Pc&&(f=b.type+":"+b.label,(g=e.Pc.get(f))&&g.vh&&(b.accessibility=g.vh.split(",").map(function(l){return l.trim()}).map(function(l){return{value:l,type:b.type,protocol:"HLS"}})));_.y(h)})};
Ul=function(a,b,c){if(a.m){var d=a.m.getSurface().getMedia();if(d){var e=document.createElement("track");e.id=c;e.kind=b.kind;e.srclang=b.language;b.label&&(e.label=b.label);_.Q.empty(b.url)?e.src=URL.createObjectURL(new Blob([])):e.src=b.url;d.appendChild(e);a.C.push(e)}}};bm=function(a,b){if(!a.m)return null;var c=a.m.getSurface();if(!c)return null;c=c.getMedia();if(!c)return null;switch(b){case _.T:return c.audioTracks;case _.Fk:return c.videoTracks;case _.S:return c.textTracks;default:return null}};
cm=function(a,b){var c=bm(a,b);c&&(c=Array.from(c),b===_.S&&(c=c.filter(function(d){return d.kind!==_.Je})));return c};dm=function(a,b){return a.h.filter(function(c){return c.type===b})};em=function(a,b){var c=a.a.get(b)||null;return c&&c.renditions[0]};fm=function(a,b){var c=a.l.get(b);return c&&c.renditions[0]};
hm=function(a,b,c){var d=cm(a,b);if(c){if(void 0===a.h.find(function(l){return l.id===c.id}))throw Error("Unknown track with ID "+c.id+" and type "+b);if(c.type!==b)throw Error("Types mismatch for track "+c.type+" and arg "+b);a.g.debug("Activate track type "+b+" with ID: "+c.id);if(d){a.l.set(b,c);var e=!0,f=!1;switch(b){case _.S:var g="mode";e=_.Vf;f=_.Pd;break;case _.T:g="enabled";break;case _.Fk:g="selected"}if(g){d=_.u(d);for(var h=d.next();!h.done;h=d.next())h=h.value,h[g]=gm(c,h,c.type)?e:
f}}}else if(a.g.debug("Disable track type "+b),a.a.get(b)&&d&&b===_.S){g=_.u(d);for(h=g.next();!h.done;h=g.next())h.value.mode=_.Pd;a.a.set(b,null)}b===_.T?a.m.trigger(new _.K(_.Wc)):b===_.S&&a.m.trigger(new _.K(_.mg))};im=function(a){return a.enabled||a.selected||a.mode===_.Vf||a.mode===_.qe};
jm=function(a,b,c){c=_.Gi(c).filter(function(e){return e});a.g.info("Find preferred tracks for",b,c);var d=dm(a,b);c.some(function(e){var f=_.Cj(e);return(e=d.find(function(g){g=_.Cj(g.language||"");return _.Dj(f,g)}))?(a.g.info("Will select track with id",e.id),hm(a,b,e),!0):!1})};km=function(a){(a=a.m.getTextDisplayer())&&a.remove(0,Infinity)};
gm=function(a,b,c){return a.type!==c?!1:void 0!==b.id&&null!==b.id&&""!==b.id?a.id===b.id:_.L.pa(a,{kind:_.Ek(b.kind),language:_.Ek(b.language),label:_.Ek(b.label)},["kind","language","label"])};_.lm=function(a,b){this.length=(this.f=a)?a.length:0;this.a=[];this.type=void 0===b?"total":b};_.mm=function(){this.be=new fi(this);this.Zd=[]};om=function(a){return a.name===pb&&nm.some(function(b){return a.message.startsWith(b)})};pm=function(){};
_.tm=function(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&_.yl()&&(a=360);var b=_.Yj();b.maxAttempts=3;a={source:"",license:qm,viewerId:void 0,autoplay:void 0,pauseWhenInBackground:!1,ads:{hls:{enable:!0,resolutionOffsetSec:35}},manifest:{attemptParameters:_.Yj(),availabilityWindowOverride:NaN,clockSyncUri:"",ignoreDrmInfo:!1,xlinkFailGracefully:!1,autoCorrectDrift:!0,timeline:{version:1,type:void 0}},abr:{enabled:!0,defaultBandwidthEstimate:1E3,switchInterval:8,bandwidthUpgradeTarget:.85,
bandwidthDowngradeTarget:.95,useSwitchIntervalForInitialSwitch:!1,restrictions:rm(a),useCmsd:!0},contentSteering:{enabled:!0,attemptParameters:_.Yj()},drm:null,cmcd:{enabled:!1},enableHtmlCue:!0,preferredAudioLanguage:"",preferredTextLanguage:"",preferredAudioRole:_.Fe,preferredTextRole:"",preferredAudioChannelCount:2,preferredAudioCodec:[],preferredVideoCodec:[],preferSpatialAudio:!1,preferForcedSubtitles:!1,volume:null,startTime:null,loop:!1,lowLatencyMode:!1,suggestedPresentationDelay:void 0,muted:void 0,
forceWaitForTracks:!1,xmlParser:_.sm,streaming:{attemptParameters:b,bufferingGoal:10,rebufferingGoal:2,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,relativeTextTimestamp:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.1,disableAudioTracks:!1,disableVideoTracks:!1,smallGapLimit:.5,jumpLargeGaps:!0,gapTolerance:.001,durationBackoff:1,maxSegmentToMediaOffset:1,forceNativeTS:!1,preferNativeHlsOnSafari:!0,safeSeekOffset:5,stallEnabled:!0,stallThreshold:3,stallSkip:.5,bufferLimitUpdateInterval:.5,
overridePasp:!1,enableLiveEdgeChasing:!1,chasingRate:1.15,startChasingAt:5,stopChasingAt:2,chaseJumpDistance:10,patchEdgeWhenMixedContent:!1,ignoreDrift:!1,disableFragmentSupport:!1,disableMergedFragments:!1,ignoreManagedMediaSourceStreamingHints:!1},mediaSource:{codecSwitchingStrategy:_.Af},restrictions:rm(),tizen:{sideStreamText:_.qk(2)},safari:{enableHlsVideoTrackInfo:!1,enableMetadata:!1},mse:{sendPlaybackSessionIdHeader:!1},trickPlay:{speedUpMode:_.Md,preferTrickPlayTracks:!0},playlist:{timeline:"basic",
content:_.Wb,cropTimeline:!1},yospace:{enabled:!1},cmsd:{enabled:!0},mediatailor:{enabled:!1,sessionConfig:{}},disableRestrictions:!1};if(_.qk()||_.rk())a.ads.hls.enable=!1;if(_.tl("Edge/")||_.qk())a.streaming.gapDetectionThreshold=.5;_.rk()&&(a.streaming.stallEnabled=!1);_.vl()&&(a.streaming.stallEnabled=!0,a.streaming.stallThreshold=1,a.streaming.stallSkip=1,a.streaming.gapDetectionThreshold=.02);_.qk()&&(a.streaming.stallEnabled=!0,a.streaming.stallThreshold=1,a.streaming.stallSkip=0);a.vr={enable:!1,
attachMouseListener:!0,fieldOfView:70,sensitivity:1,invertHorizontalControl:!1,invertVerticalControl:!1};return a};
_.vm=function(a){for(var b=[],c=0;c<arguments.length;++c)b[c]=arguments[c];if(!b)return _.tm();c=[_.tm()];var d=!1;b=_.u(b);for(var e=b.next();!e.done;e=b.next())e=e.value,null!==e&&void 0!==e&&(_.L.ia(e)&&(e={source:e}),e.lowLatencyMode&&!d&&(c.push({streaming:{rebufferingGoal:.1,bufferLimitUpdateInterval:.01,attemptParameters:{maxAttempts:3,baseDelay:250,backoffFactor:1}},abr:{bandwidthUpgradeTarget:.6,bandwidthDowngradeTarget:.95},manifest:{lowLatencyMode:!0}}),d=!0),c.push(e),null!=e.suggestedPresentationDelay&&
c.push({manifest:{suggestedPresentationDelay:e.suggestedPresentationDelay}}));c=_.L.ta.apply(null,c);_.L.ia(c.volume)&&(""===""+c.volume?c.volume=null:c.volume=Number(c.volume));if(!_.L.R(c.volume)&&(!_.L.wa(c.volume)||_.L.isNaN(c.volume)))throw new _.N(_.O,7,7100,"config.volume is not a number");if(!_.L.R(c.preferredTextLanguage)&&!_.L.ia(c.preferredTextLanguage)&&!Array.isArray(c.preferredTextLanguage))throw new _.N(_.O,7,7100,"config.preferredTextLanguage is not a string or an array");if(!_.L.R(c.preferredAudioLanguage)&&
!_.L.ia(c.preferredAudioLanguage)&&!Array.isArray(c.preferredAudioLanguage))throw new _.N(_.O,7,7100,"config.preferredAudioLanguage is not a string or an array");if(!_.L.R(c.preferredAudioCodec)&&!_.L.ia(c.preferredAudioCodec)&&!Array.isArray(c.preferredAudioCodec))throw new _.N(_.O,7,7100,"config.preferredAudioCodec is not a string or an array");if(!_.L.R(c.preferredVideoCodec)&&!_.L.ia(c.preferredVideoCodec)&&!Array.isArray(c.preferredVideoCodec))throw new _.N(_.O,7,7100,"config.preferredVideoCodec is not a string or an array");
if(!_.L.R(c.drm)){if(c.drm.env&&!_.L.ia(c.drm.env))throw new _.N(_.O,7,7100,"config.drm.env is not a string");if(c.drm.offlineId&&!_.L.ia(c.drm.offlineId))throw new _.N(_.O,7,7100,"config.drm.offlineId is not a string");}if(d=c.streaming){d.bufferingGoal=Number(d.bufferingGoal);d.rebufferingGoal=Number(d.rebufferingGoal);d.bufferBehind=Number(d.bufferBehind);d.smallGapLimit=Number(d.smallGapLimit);d.durationBackoff=Number(d.durationBackoff);if(!_.L.wa(d.bufferingGoal)||_.L.isNaN(d.bufferingGoal))throw new _.N(_.O,
7,7100,"config.streaming.bufferingGoal is not a number");if(!_.L.wa(d.rebufferingGoal)||_.L.isNaN(d.rebufferingGoal))throw new _.N(_.O,7,7100,"config.streaming.rebufferingGoal is not a number");if(d.rebufferingGoal>d.bufferingGoal)throw new _.N(_.O,7,7100,"config.streaming.rebufferingGoal must be \x3e\x3d bufferingGoal");if(!_.L.wa(d.bufferBehind)||_.L.isNaN(d.bufferBehind))throw new _.N(_.O,7,7100,"config.streaming.bufferBehind is not a number");if(!_.L.wa(d.smallGapLimit)||_.L.isNaN(d.smallGapLimit))throw new _.N(_.O,
7,7100,"config.streaming.smallGapLimit is not a number");if(!_.L.wa(d.durationBackoff)||_.L.isNaN(d.durationBackoff))throw new _.N(_.O,7,7100,"config.streaming.durationBackoff is not a number");d=c.manifest;if(_.L.R(d.availabilityWindowOverride))d.availabilityWindowOverride=NaN;else if(typeof d.availabilityWindowOverride!==_.k)throw new _.N(_.O,7,7100,"Invalid value for |manifest.availabilityWindowOverride|");um(c.restrictions);um(c.abr.restrictions);c.abr.initialRestrictions&&um(c.abr.initialRestrictions)}return c};
rm=function(a){a=void 0===a?Infinity:a;return{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:a,minPixels:0,maxPixels:Infinity,minBandwidth:0,maxBandwidth:Infinity}};
um=function(a){_.L.R(a.maxPixels)&&(a.maxPixels=Infinity);_.L.R(a.maxBandwidth)&&(a.maxBandwidth=Infinity);_.L.R(a.maxHeight)&&(a.maxHeight=Infinity);_.L.R(a.maxWidth)&&(a.maxWidth=Infinity);_.L.R(a.minPixels)&&(a.minPixels=0);_.L.R(a.minBandwidth)&&(a.minBandwidth=0);_.L.R(a.minHeight)&&(a.minHeight=0);_.L.R(a.minWidth)&&(a.minWidth=0);a.minWidth=Number(a.minWidth);a.maxWidth=Number(a.maxWidth);a.minHeight=Number(a.minHeight);a.maxHeight=Number(a.maxHeight);a.minBandwidth=Number(a.minBandwidth);
a.maxBandwidth=Number(a.maxBandwidth);a.minPixels=Number(a.minPixels);a.maxPixels=Number(a.maxPixels);if(Number.isNaN(a.minWidth)||Number.isNaN(a.maxWidth)||Number.isNaN(a.minHeight)||Number.isNaN(a.maxHeight)||Number.isNaN(a.minBandwidth)||Number.isNaN(a.maxBandwidth)||Number.isNaN(a.minPixels)||Number.isNaN(a.maxPixels))throw new _.N(_.O,7,7100,"Restrictions contain NaN");};wm=function(a){return typeof a===_.Re&&!Array.isArray(a)&&"source"in a};
_.xm=function(a){_.mm.call(this);this.log=new _.J(a);this.configuration=this.jb=_.tm();this.ba=this.G=null;this.re=this.Rg=!1;this.fh=new _.J("clpp.video.events");this.Pd=null;this.ef=-1;this.vj=this.bo.bind(this);this.Ig=new _.vk;this.P=new _.gi;this.Fg=this.cd=this.sd=this.T=null};_.zm=function(a){return _.ym.get(a)||null};_.Bm=function(a){_.ym.get(a.id())?Am.warn("Component already in use."):_.ym.set(a.id(),a)};
Cm=function(a){return Array.from(_.ym.values()).find(function(b){return b instanceof a})||null};Dm=function(a){for(var b=_.u(_.ym.values()),c=b.next();!c.done;c=b.next())a(c.value)};Em=function(a){Dm(function(b){b.o(a)})};Fm=function(a){Dm(function(b){b.h(a)})};Gm=function(){Dm(function(){})};Hm=function(){Dm(function(){})};Im=function(a){if(null!==Cm(a))return null;a=new a;a.f();_.Bm(a);Am.info("Installed component:",a.id());return a};
Jm=function(a){if(a=Cm(a))a.a(),_.ym["delete"](a.id()),Am.info("Uninstalled component:",a.id())};Km=function(){};_.Mm=function(a,b){b=void 0===b?!0:b;var c=_.Lm(a).replace(/\+/g,"-").replace(/\//g,"_");return b?c:c.replace(/[=]*$/,"")};_.Nm=function(a){a=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b};
_.Om=function(a){for(var b=new Uint8Array(a.length/2),c=0;c<a.length;c+=2)b[c/2]=window.parseInt(a.substr(c,2),16);return b};_.Pm=function(a){for(var b="",c=0;c<a.length;++c){var d=a[c].toString(16);1===d.length&&(d="0"+d);b+=d}return b};_.Qm=function(a,b){if(!a&&!b)return!0;if(!a||!b||a.length!==b.length)return!1;for(var c=0;c<a.length;++c)if(a[c]!==b[c])return!1;return!0};
_.Rm=function(a){for(var b=0,c=0;c<arguments.length;++c)b+=arguments[c].length;b=new Uint8Array(+b);for(var d=c=0;d<arguments.length;++d)b.set(arguments[d],c),c+=arguments[d].length;return b};_.Lm=function(a){a=_.Q.fromCharCode(_.Oj(a));return btoa(a)};Sm=function(){this.a=this.f=null;this.g=new _.J("clpp.drm.csl")};Tm=function(a,b){3===b.type&&(a.f&&(a.g.debug("Attaching tracking token"),b.headers[Zg]=a.f),a.a&&(b.headers[$g]=a.a))};
Um=function(a,b){if(b.request&&3===b.request.type){a.f=b.headers[Zg];a.a=b.headers[$g];var c=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);if(c)return c=JSON.parse(_.Q.ea(_.Nm(c))),{delay:c.renewalPeriod,ap:{maxAttempts:c.retryCount,baseDelay:1E3*c.retryPeriod,backoffFactor:1,fuzzFactor:0,timeout:0}}}return null};_.Wm=function(a){_.Vm[a.J]=a};
_.Ym=function(a){var b={attemptParameters:_.Yj(),enforceSingleSession:!1,delayLicenseRequestUntilPlayed:!1,enableSessionCacheForSkd:!1,ignoreUnrecognizedInitData:!0,Pa:{},widevineVersion:_.Gd};if(a&&(b.enforceSingleSession=!!a.enforceSingleSession,b.delayLicenseRequestUntilPlayed=!!a.delayLicenseRequestUntilPlayed,b.preferredDrmSystem=a.preferredDrmSystem,b.emeApi=a.emeApi,a.attemptParameters&&(b.attemptParameters=a.attemptParameters),b.enableSessionCacheForSkd=!!a.enableSessionCacheForSkd,void 0!==
a.ignoreUnrecognizedInitData&&(b.ignoreUnrecognizedInitData=!!a.ignoreUnrecognizedInitData),typeof a.widevineVersion===_.eg&&0<a.widevineVersion.length&&(b.widevineVersion=a.widevineVersion),a.env)){var c=_.Vm[a.env]||null;if(!c)throw _.Oh(_.Ea,_.xb+a.env+_.aa),new _.N(_.O,6,6015,_.Fa+a.env+"' is missing.");b.Pa=_.Xm(c,a.customData)||{};_.Q.startsWith(a.env.toLowerCase(),ce)&&(b.enforceSingleSession=!0)}return b};
$m=function(a){a=Zm[a];if(!a)return null;var b=_.sk();return b.os===Kl&&4===b.osVersion.major&&4===b.osVersion.minor?null:new Uint8Array(a)};_.an=function(a){this.J=a;this.f={}};
_.Xm=function(a,b){var c={},d=b?b.widevineVideoRobustness:void 0,e=b?b.widevineAudioRobustness:void 0,f=b?b.serverCertificate:void 0,g=a.f[_.Gd];g&&(c[_.Gd]={licenseUrl:g.licenseUrl,videoRobustness:cj(d,g.videoRobustness),audioRobustness:cj(e,g.audioRobustness),modifiers:g.modifiers,distinctiveIdentifierRequired:bj(b?b.widevineDistinctiveIdentifierRequired:void 0,g.distinctiveIdentifierRequired,!1),persistentStateRequired:bj(b?b.widevinePersistentStateRequired:void 0,g.persistentStateRequired,!1),
serverCertificate:void 0===f?g.serverCertificate:null===f?null:typeof f===_.eg?$m(f):f});(g=a.f[_.Cd])&&(c[_.Cd]={licenseUrl:g.licenseUrl,certificateUrl:g.certificateUrl,modifiers:g.modifiers});d=b?b.playReadyVideoRobustness:void 0;e=b?b.playReadyAudioRobustness:void 0;(g=a.f[_.Ed])&&(c[_.Ed]={licenseUrl:g.licenseUrl,videoRobustness:d||g.videoRobustness,audioRobustness:e||g.audioRobustness,individualizationServer:g.individualizationServer,useLegacySystem:g.useLegacySystem,modifiers:g.modifiers});
return c};_.bn=function(a,b){b=void 0===b?!1:b;this.f=_.L.wa(a)?new DataView(new ArrayBuffer(a),0,a):a;this.a=0;this.h=b;this.buffer=this.f.buffer};_.dn=function(a,b,c){var d=c||0;c=b.byteLength-d;var e=_.Oj(a.f.buffer);b=_.Oj(b.buffer,d,c);try{e.set(b,a.a),a.a+=c}catch(f){_.cn()}};_.V=function(a,b){try{a.f.setUint32(a.a,b,a.h),a.a+=4}catch(c){_.cn()}};_.cn=function(){throw new _.N(_.O,3,3E3);};_.en=function(a,b){this.f=a;this.h=void 0===b?!0:b;this.a=0};_.fn=function(a){return a.a<a.f.byteLength};
_.hn=function(a){try{var b=a.f.getUint8(a.a);a.a+=1;return b}catch(c){_.gn()}};_.jn=function(a){try{var b=a.f.getUint16(a.a,a.h);a.a+=2;return b}catch(c){_.gn()}};_.kn=function(a){try{var b=a.f.getUint32(a.a,a.h);a.a+=4;return b}catch(c){_.gn()}};_.ln=function(a){try{var b=a.f.getInt32(a.a,a.h);a.a+=4;return b}catch(c){_.gn()}};
_.mn=function(a){var b=0,c=0;try{!0===a.h?(b=a.f.getUint32(a.a,!0),c=a.f.getUint32(a.a+4,!0)):(c=a.f.getUint32(a.a,!1),b=a.f.getUint32(a.a+4,!1))}catch(d){_.gn()}if(2097151<c)throw new _.N(_.O,3,3001);a.a+=8;return c*Math.pow(2,32)+b};nn=function(a,b){for(var c=new Uint8Array(b),d=0;d<b;d++)c[d]=_.hn(a);return c};_.on=function(a,b){a.a+b>a.f.byteLength&&_.gn();var c=a.a+a.f.byteOffset;c=a.f.buffer.slice(c,c+b);a.a+=b;return _.Oj(c)};
_.gn=function(){throw new _.N(_.O,3,3E3,"Buffer read out of bounds.");};_.pn=function(){this.h=[];this.f=[];this.a=!1;this.g=new _.J("clpp.mp4")};_.qn=function(a){for(;_.fn(a.reader)&&!a.parser.a;)a.parser.xf(a.start+a.headerSize,a.reader,a.partialOkay)};_.rn=function(a){for(var b=_.kn(a.reader);0<b&&!a.parser.a;--b)a.parser.xf(a.start+a.headerSize,a.reader,a.partialOkay)};_.sn=function(a){return function(b){var c=b.reader.Ta()-b.reader.getPosition();a(_.on(b.reader,c))}};
tn=function(a){for(var b=0,c=0;c<a.length;c++)b=b<<8|a.charCodeAt(c);return b};_.un=function(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)};_.vn=function(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)};wn=function(){};xn=function(a){var b="";try{b=_.Q.de(a)}catch(c){}return b};_.yn=function(a){a=xn(a);var b="";a.length&&(b=(new _.Mk(a)).a);return b};
zn=function(a){if(!a)return null;var b=null;try{var c=JSON.parse(_.Q.ea(a)),d=_.Nm(c.sinf[0]);(new _.pn).M(_.Yf,_.qn).M("schi",_.qn).M("tenc",function(e){e.reader.skip(6);_.hn(e.reader)&&(e.reader.skip(1),b=_.Pm(_.on(e.reader,16)));e.parser.stop()}).parse(d)}catch(e){}return b};
An=function(a,b,c){if(!c||!c.byteLength)throw new _.N(_.O,6,6102);var d;typeof b===_.eg?d=_.Q.Gf(b,!0):d=b;a=_.Q.Gf(xn(a),!0);b=new _.bn(12+a.byteLength+d.byteLength+c.byteLength,!0);_.V(b,a.byteLength);_.dn(b,_.Oj(a));_.V(b,d.byteLength);_.dn(b,_.Oj(d));_.V(b,c.byteLength);_.dn(b,_.Oj(c));return _.Oj(b.buffer)};_.Bn=function(a){var b=_.Oj(a.body);b=_.Mm(b);a.headers[Aa]=Oc;a.body=_.Q.hb("spc\x3d"+b).buffer};
_.Cn=function(a){try{var b=_.Q.ea(a.data)}catch(d){return}b=b.trim();"\x3cckc\x3e"===b.substr(0,5)&&"\x3c/ckc\x3e"===b.substr(-6)&&(b=b.slice(5,-6));try{var c=JSON.parse(b);c.ckc&&(b=c.ckc);c.CkcMessage&&(b=c.CkcMessage);c.License&&(b=c.License)}catch(d){}a.data=Wj(_.Nm(b))};
In=function(){var a=Dn;if(a===En)return"https://lic.drmtoday.com";if(a===Fn)return"https://lic.staging.drmtoday.com";if(a===Gn)return"https://lic-demo.staging.drmtoday.com";if(a===Hn)return"https://lic.test.drmtoday.com";throw Error("Unknown DRMtoday environment '"+a+"'. Can not infer DRMtoday base URL!");};Nn=function(a){var b=In();if(a===_.Gd)return b+Jn;if(a===_.Ed)return b+Kn;if(a===_.Cd)return b+Mn;throw Error("Unknown DRM Key-System '"+a+"'. Can not infer license URL!");};
On=function(a){a=a.replace(/assetid/gi,"assetId");a=a.replace(/variantid/gi,"variantId");return a=a.replace(/keyid/gi,"keyId")};
_.Qn=function(a,b,c){b=xn(b);c=c&&c.customData?c.customData:{};b=new _.Mk(On(b));var d=_.Pk(b.f);if(a&&a.drm&&a.drm.customData){var e=a.drm.customData;a=e.assetId;e=e.variantId;a&&_.Q.nf(""+a)&&(d.assetId=a,Pn.debug("Using assetId from the configuration instead of the value from the HLS manifest."));e&&_.Q.nf(""+e)&&(d.variantId=e,Pn.info("Using variantId from the configuration instead of the value from the HLS manifest."))}d.keyId?(a=["keyId"],Pn.debug("KeyId found in FPS SKD. Removing other parameters")):
a=["assetId","variantId"];b.f=_.Ok(d,!1,a);"/"!==b.path||b.j.includes(b.a+"/")||(b.path="");b=_.Nk(b);return c.fpsContentId=b};_.Sn=function(a,b,c,d){d=void 0===d?!0:d;c=a.drm;c&&c.env.startsWith(Ha)?c.customData&&(_.Rn(b,a),a=b.uris[0],d&&c.customData.assetId&&(a+="?assetId\x3d"+encodeURI(""+c.customData.assetId),c.customData.variantId&&(a+="\x26variantId\x3d"+encodeURI(""+c.customData.variantId)),b.uris[0]=a)):Pn.warn(ib)};
Tn=function(a,b,c){_.Sn(a,b,c);a=a.drm;a=!(!a||!a.offlineId);c=new _.dj(b.uris[0]);c.a.add(_.cf,a);b.uris[0]=c.toString()};
_.Un=function(a,b,c){var d=c&&c.customData&&c.customData.fpsContentId;_.Sn(a,b,c,!1);b.headers[Aa]=Oc;c={spc:_.Lm(b.body)};if((a=a.drm)&&a.env.startsWith(Ia)&&d){a={};var e=_.Pk((new _.Mk(On(d))).f);d=e.keyId;if(e=e.assetId)Pn.info("Applying assetId from HLS manifest."),a.assetId=e;d&&(Pn.info("Applying keyId from HLS manifest."),a.keyId=d);a.keyId&&(Pn.info("Adding keyID to FPS payload:",a.keyId),c.keyId=a.keyId);a.assetId&&(Pn.info("Adding assetID to FPS payload:",a.assetId),c.assetId=a.assetId)}b.body=
_.Q.Fd(_.Ok(c,!0))};_.Vn=function(a,b){Pn.debug("Clearing response data");if(200===b.status){var c=_.Q.ea(b.data).trim();"\x3cckc\x3e"===c.substr(0,5)&&"\x3c/ckc\x3e"===c.substr(-6)&&(c=c.slice(5,-6));b.data=_.Nm(c).buffer}};_.Wn=function(a,b){var c=a.drm;if(!c||!c.env.startsWith(Ha))Pn.warn(ib);else if(c.customData&&c.customData.merchant&&!c.env.startsWith(Ia)){var d=new _.dj(b.uris[0]),e=d.Ma;e.endsWith("/")||(e+="/");e+=c.customData.merchant;d.Ma=e;b.uris[0]=d.toString()}};
_.Xn=function(a,b){try{var c=_.Oj(b.data),d=JSON.parse(String.fromCharCode.apply(null,c));Pn.debug("Widevine License response",d);var e=atob(d.license),f=new Uint8Array(e.length);for(c=0;c<e.length;++c)f[c]=e.charCodeAt(c);b.data=f.buffer}catch(g){Pn.debug("Unable to parse DRMtoday response JSON, assuming the response contained raw data")}};
_.Rn=function(a,b){var c=b.drm;if(c&&c.customData){var d={userId:c.customData.userId,sessionId:c.customData.sessionId,merchant:c.customData.merchant};_.L.Jc(d)&&(a.headers["dt-custom-data"]=btoa(JSON.stringify(d)));(c=c.customData.authToken)&&(a.headers["x-dt-auth-token"]=c)}};Zn=function(a){var b={},c=a?a[ah]:void 0;a=Yn[a?a[ah]:void 0];c&&(b.drmTodayErrorCode=c);a&&(b.drmTodayErrorMessage=a);return b};
$n=function(a){a=a["x-dt-li"];if(!a)return null;try{var b=JSON.parse(atob(a));a={};b.ti&&(a.requestId=b.ti);b.rpd&&(a.delay=Number(b.rpd)/1E3);return a}catch(c){return Pn.warn("Unable to parse DRMtoday License Info header (x-dt-li)",c),null}};_.ao=function(a){this.f=a;this.a=void 0};bo=function(){this.size=0;this.a=void 0;this.g=new _.J("clpp.drm.eme.MediaKeyStatusMap")};co=function(a,b){a.size=void 0===b?0:1;a.g.debug("Setting key status to",b);a.a=b};
fo=function(a,b,c,d){b===HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=eo.value().get(b),c.one(a,b,d))};go=function(){this.a=this.f=null};
ho=function(a,b){this.keySystem=a;if(a.startsWith(_.Cd))for(var c=_.u(b),d=c.next();!d.done;d=c.next()){var e=d.value;if(e.persistentState===_.Mf)d=null;else{d={audioCapabilities:[],videoCapabilities:[],persistentState:_.Ze,distinctiveIdentifier:_.Ze,initDataTypes:e.initDataTypes,sessionTypes:[jg],label:e.label};var f=!1,g=!1;if(e.audioCapabilities)for(var h=_.u(e.audioCapabilities),l=h.next();!l.done;l=h.next())l=l.value,l.contentType&&(f=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,l.contentType.split(";")[0])&&
(d.audioCapabilities.push(l),g=!0));if(e.videoCapabilities)for(e=_.u(e.videoCapabilities),l=e.next();!l.done;l=e.next())h=l.value,h.contentType&&(f=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,h.contentType.split(";")[0])&&(d.videoCapabilities.push(h),g=!0));f||(g=WebKitMediaKeys.isTypeSupported(this.keySystem,_.Lg));d=g?d:null}if(d){this.a=d;return}}c=Error(Sb);c.name=qb;c.code=DOMException.NOT_SUPPORTED_ERR;throw c;};
io=function(a){this.f=null;this.h=new WebKitMediaKeys(a);this.a=new _.gi;this.j=0;this.g=new _.J(ud);this.g.info("Created Media Keys for "+a)};
jo=function(a,b){a.f=b;_.ki(a.a);if(!b)return Promise.resolve();a.a.on(b,fe,function(c){_.Oh("AppleEmeManager.cancelNativeMediaEncryptedEvent_",c);"MediaEncryptedEvent"in window&&c instanceof MediaEncryptedEvent&&(a.g.info("Cancel native MediaEncryptedEvent when using Apple-prefixed EME"),c.stopImmediatePropagation())});a.a.on(b,Xg,function(c){a.g.debug("Handle webkitNeedKey event");c=_.Oj(c.initData);if(_.Vj(c).getUint32(0,!0)+4!==c.byteLength)throw new RangeError("Malformed FairPlay init data");
c=_.Q.Hc(c.subarray(4),!0);c=_.Q.hb(c);var d=new Event(fe);d.initDataType="skd";d.initData=Wj(c);a.f.dispatchEvent(d)});fo(b,HTMLMediaElement.HAVE_METADATA,a.a,function(){return b.webkitSetMediaKeys(a.h)});return Promise.resolve()};ko=function(a,b){_.mm.call(this);this.a=null;this.o=a;this.f=this.h=null;this.j=new _.gi;this.sessionId=b;this.expiration=NaN;this.closed=new _.kk;this.l=!1;this.keyStatuses=new bo;this.g=new _.J(ud)};lo=function(a,b){co(a.keyStatuses,b);a.dispatchEvent(new _.K(ue))};
mo=function(){};no=function(){this.a=null;this.g=new _.J("clpp.drm.eme.StandardEmeManager")};oo=function(){};po=function(){this.f=this.a=null;this.h="";HTMLMediaElement.prototype.webkitGenerateKeyRequest&&(this.h="webkit")};
qo=function(a,b,c,d){this.h=a;this.a=this.keySystem=c;a=!1;c===_.$e&&(this.a=Tg,a=!1);var e=!1;d=_.u(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=[],h=[],l=!1;if(f.audioCapabilities)for(var m=_.u(f.audioCapabilities),n=m.next();!n.done;n=m.next())n=n.value,n.contentType&&(l=!0,b.canPlayType(n.contentType.split(";")[0],this.a)&&(g.push(n),e=!0));if(f.videoCapabilities)for(g=_.u(f.videoCapabilities),n=g.next();!n.done;n=g.next())m=n.value,m.contentType&&(l=!0,b.canPlayType(m.contentType,
this.a)&&(h.push(m),e=!0));l||(e=b.canPlayType(_.Lg,this.a)||b.canPlayType("video/webm",this.a));f.persistentState!==_.Mf||a||(e=!1);if(e){this.f=f;return}}b=Sb;if(c===_.$e||c===_.Gd)b="None of the requested configurations were supported.";c=Error(b);c.name=qb;c.code=DOMException.NOT_SUPPORTED_ERR;throw c;};ro=function(a,b){this.h=a;this.o=b;this.a=null;this.f=new _.gi;this.j=[];this.l=new Map};
uo=function(a,b){a.a=b;_.ki(a.f);b&&(a.f.on(b,a.h+"needkey",function(c){var d=new Event(fe);d.initDataType=_.hd;d.initData=Wj(c.initData);a.a.dispatchEvent(d)}),a.f.on(b,a.h+"keymessage",function(c){var d=so(a,c.sessionId);if(d){var e=void 0===d.keyStatuses.getStatus();c=new _.K(_.Ie,{messageType:e?xe:we,message:c.message});_.Oh("WebkitEmeManager.MediaKeySession.generated");d.f&&(d.f.resolve(),d.f=null);d.dispatchEvent(c)}else _.Ph("Session not found",c.sessionId)}),a.f.on(b,a.h+"keyadded",function(c){(c=
so(a,c.sessionId))&&c.ready()}),a.f.on(b,a.h+"keyerror",function(c){var d=so(a,c.sessionId);if(d){var e=Error("EME v0.1b key error"),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?to(d,_.af):1===e?to(d,"expired"):to(d,_.te))}}))};
so=function(a,b){var c=a.l.get(b);return c?c:(c=a.j.shift())?(c.sessionId=b,a.l.set(b,c),c):null};vo=function(a,b,c,d){_.mm.call(this);this.w=a;this.j=b;this.o=!1;this.a=this.f=null;this.h=c;this.l=d;this.sessionId="";this.expiration=NaN;this.closed=new _.kk;this.keyStatuses=new bo};
xo=function(a,b,c){if(a.o)return Promise.reject(Error("The session is already initialized."));a.o=!0;try{if(a.l===_.df)if(c)var d=_.Oj(_.Q.hb("LOAD_SESSION|"+c));else{var e=_.Q.hb("PERSISTENT|"),f=new Uint8Array(e.byteLength+b.byteLength);f.set(e,0);f.set(_.Oj(b),e.byteLength);d=f}else d=_.Oj(b)}catch(h){return Promise.reject(h)}a.f=new _.kk;var g=wo(a,"generateKeyRequest");try{a.j[g](a.h,d)}catch(h){if(h.name!==Za)return a.f=null,Promise.reject(h);(new _.Xh(function(){try{a.j[g](a.h,d)}catch(l){a.f.reject(l),
a.f=null}})).ga(.01)}return a.f};yo=function(a,b,c){if(a.a)a.a.then(function(){return yo(a,b,c)})["catch"](function(){return yo(a,b,c)});else{a.a=b;if(a.h===Tg){var d=_.Q.ea(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=_.Nm(e.keys[0].k);e=_.Nm(e.keys[0].kid)}else d=_.Oj(c),e=null;var f=wo(a,"addKey");try{a.j[f](a.h,d,e,a.sessionId)}catch(g){a.a.reject(g),a.a=null}}};to=function(a,b){co(a.keyStatuses,b);a.dispatchEvent(new _.K(ue))};
wo=function(a,b){return a.w?a.w+b.charAt(0).toUpperCase()+b.slice(1):b};zo=function(){};Ao=function(){};Bo=function(){};Co=function(){};Fo=function(a,b){var c=Do;if(a){var d=c.find(function(e){return e.a()===a});if(d)return Eo.info($b+d.a()),d.create();Eo.info("Cannot create selected EME manager, falling back to the default.")}if(b&&(d=c.find(function(e){return e.a()===b})))return Eo.info($b+d.a()),d.create();c=c[0];if(!c)throw Error("Missing EME managers.");Eo.info($b+c.a());return c.create()};
_.Go=function(){};Ho=function(a,b,c){this.j=new Uint8Array(a);this.a=b;this.f=c};Oo=function(){Ho.apply(this,arguments)};_.Qo=function(a){var b=_.Om(a);b=parseInt(b.byteLength,10).toString(16);b=_.Om("12"+b+a);return new Oo(Po,a,b)};
_.Ro=function(a){function b(t){switch(t){case 0:do if(!_.fn(d))throw Error("not enough data to skip!");while(_.hn(d)&128);break;case 1:d.skip(8);break;case 2:d.skip(c());break;case 3:for(;4!==(t=c()&7);)b(t);break;case 5:d.skip(4);break;default:throw Error("invalid wire type "+t);}}function c(){for(var t=_.hn(d),v=(t&127)>>>0,z=7;128<=t&&28>=z;)t=_.hn(d),v=(v|(t&(28>z?127:15))<<z)>>>0,z+=7;return 28<z?-1:v}var d=new _.en(new DataView(a.buffer,a.byteOffset,a.byteLength),!1);a=_.kn(d);var e=_.kn(d);
e=_.un(e);var f=_.kn(d),g=f>>>24;f&=16777215;var h=_.on(d,16);h=_.Pm(h);if(0<g){var l=_.kn(d);d.skip(16*l)}l=_.kn(d);for(var m=[],n=null;_.fn(d);){var p=c(),q=p&7;p>>>=3;if(2===q){q=c();if(0>q)throw Error("unable to read length of field "+p);q=nn(d,q);2===p?m.push(q):4===p&&(n=q)}else b(q)}_.Oh("Parsed WV PSSH Box","size",a,"name",e,Eg,g,"flags",f,"size",l,"systemId",h,"contentId (base64)",n?_.Lm(n):"","keyIds",m.map(function(t){return _.Pm(t)}));return 0<m.length?_.Qo(_.Pm(m[0])):null};
_.So=function(a,b,c,d,e,f){f=void 0===f?null:f;Ho.call(this,a,b,d);this.version=e;this.h=c;this.l=f};
_.Yo=function(a){var b=_.To;a:{var c=new _.en(new DataView(a.buffer),!0);_.kn(c);for(_.jn(c);_.fn(c);)if(1===_.jn(c)){var d=_.jn(c);c=_.on(c,d);break a}c=null}c||(c=a);a=_.Q.Hc(c,!0);d=b.we(a,"WRMHEADER");a=d.getAttribute(Eg)||"";d=b.Ka(d,"DATA");var e=b.Ka(d,"LA_URL");b=e?b.ra(e):"";e=_.To;var f=e.Ka(d,"KID");if(f)if(f=e.ra(f)){var g=e.Ka(d,sa);e=g?e.ra(g):null;e={value:f,Zf:e}}else e=null;else e=null;d=e?[e]:(e=Uo(d))?[e]:(d=Vo(d))?d:null;e=d&&d[0]||{};d=e.Zf;e=_.Nm(void 0===e.value?"":e.value);
e=_.Wo(e);e=_.Pm(e);return new _.So(_.Xo,e,b,c,a,d)};_.Wo=function(a){var b=[];b.push(a[3]);b.push(a[2]);b.push(a[1]);b.push(a[0]);b.push(a[5]);b.push(a[4]);b.push(a[7]);b.push(a[6]);a=_.Oj(a);a.set(b,0);return a};Uo=function(a){var b=_.To;a=b.Ka(a,"PROTECTINFO");if(!a)return null;var c=b.Ka(a,"KID");if(!c)return null;b=c.getAttribute("VALUE");if(!b)return null;a=c.getAttribute(sa);c=c.getAttribute("ALGID");return{value:b,Zf:a,Kj:c}};
Vo=function(a){var b=_.To;a=b.Ka(a,"PROTECTINFO");if(!a)return null;a=b.Ka(a,"KIDS");if(!a)return null;a=b.$(a,"KID");if(!a.length)return null;b=[];a=_.u(a);for(var c=a.next();!c.done;c=a.next()){var d=c.value;if(c=d.getAttribute("VALUE")){var e=d.getAttribute(sa);d=d.getAttribute("ALGID");b.push({value:c,Zf:e,Kj:d})}}return b.length?b:null};_.$o=function(a){Zo&&performance.mark(a)};
_.bp=function(a,b,c){Zo&&(b=performance.measure(a,b,c),null!=b&&ap.info('Step: "'+a+'" took '+b.duration.toFixed(0)+" ms."))};cp=function(a){this.f=[];this.h=[];this.a=[];8<=a.byteLength&&(new _.pn).aa("pssh",this.j.bind(this)).parse(a.buffer);0===this.a.length&&_.Jh("No pssh box found!")};
_.gp=function(a,b){var c=this;this.F=a;this.Yb=b;this.K=new Set;this.C=this.J=this.l=null;this.ca=!1;this.a=null;this.L=dp;this.B=new _.gi;this.P=new Sm;this.h=new Map;this.N=[];this.I=new _.kk;this.Kb=0;this.f=null;this.w=function(d){c.A=!0;c.G=!1;c.I.reject(d);a.onError(d)};this.o=new Map;this.ja=new Map;this.da=new _.Xh(function(){return ep(c)});this.j=!1;this.Ea=new _.kk;this.H=!1;this.ha=[];this.jb=!1;this.Y=0;this.g=new _.J("clpp.drm.DrmEngine");this.xa=(new _.Xh(function(){fp(c)})).Jb(1);this.I["catch"](function(){});
this.A=this.G=!1;this.T=null};
ip=function(a){var b,c,d,e,f;return _.H(function(g){switch(g.a){case 1:a.B.release();a.B=null;a.P.release();a.P=null;a.A=!1;a.G=!1;a.I.reject();a.xa.stop();a.xa=null;a.da.stop();a.da=null;b=Array.from(a.h.keys());c=_.u(a.h.values());for(d=c.next();!d.done;d=c.next())e=d.value,e.pd&&e.pd.stop();a.h.clear();return _.x(g,Promise.all(b.map(function(h){return Promise.resolve().then(function(){var l;return _.H(function(m){if(1==m.a)return a.g.debug("Closing session",h.sessionId),_.C(m,2),_.x(m,hp(h),4);
if(2!=m.a)return _.uh(m,0);l=_.E(m);a.g.warn("Error while closing session",l);_.y(m)})})})),2);case 2:if(!a.C){g.D(3);break}_.C(g,4);return _.x(g,a.l.Ud(null),6);case 6:_.uh(g,5);break;case 4:f=_.E(g),a.g.warn("Error while resetting media keys",f);case 5:a.C=null;case 3:a.l=null,a.a=null,a.K.clear(),a.J=null,a.N=[],a.f=null,a.w=null,a.F=null,a.Y=0,a.T=null,_.y(g)}})};
_.lp=function(a,b,c){c=void 0===c?[]:c;a.L=jp;a.N=c;a.H=0<c.length;a.g.debug("Using Persisted Licenses: "+a.H);a.f&&a.f.enableSessionCacheForSkd&&a.g.info("Enabled session cache for SKD license requests");return _.kp(a,b)};
rp=function(a,b){var c=b.some(function(g){return 0<g.drmInfos.length});if(!c){var d=_.L.hh(a.f.Pa);mp(b,d)}var e=a.f.Pa[_.Cd];d=b.some(function(g){return g.drmInfos.some(function(h){return h.keySystem===_.Cd})});if(!1!==a.f.ep&&_.xl()&&!d&&e){var f=_.u(b);for(d=f.next();!d.done;d=f.next())d.value.drmInfos.push({keySystem:_.Cd,licenseServerUri:e.licenseUrl,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:[],keyIds:[],
periodId:null})}if(e=np(a))for(f=_.u(b),d=f.next();!d.done;d=f.next())d.value.drmInfos=[e];d=op(b);pp(a,d);d=_.u(d);for(e=d.next();!e.done;e=d.next())qp(e.value,a.f.Pa);return c};_.kp=function(a,b){var c=rp(a,b),d=op(b);d=_.u(d);for(var e=d.next();!e.done;e=d.next())sp(a,e.value,a.f.Pa);d=tp(a,b);if(!d.size)return a.ca=!0,Promise.resolve();_.$o(Td);d=_.up(a,d);return(c?d:d["catch"](function(){})).then(function(){_.$o(Sd);_.bp("DRM queryMediaKeys_()",Td,Sd)})};
op=function(a){var b=[];a=_.u(a);for(var c=a.next();!c.done;c=a.next()){c=_.u(c.value.drmInfos);for(var d=c.next();!d.done;d=c.next())b.push(d.value)}return b};pp=function(a,b){for(var c=_.u(b),d=c.next();!d.done;d=c.next())d=d.value,""===d.licenseServerUri||a.f.Pa[d.keySystem]||(a.f.Pa[d.keySystem]={licenseUrl:""})};
vp=function(a){var b;return _.H(function(c){switch(c.a){case 1:if(a.l.bf())return c["return"]();if(!a.T){c.D(2);break}return _.x(c,a.T,3);case 3:return c["return"]();case 2:return _.C(c,4),a.T=a.l.Ud(a.J),_.x(c,a.T,6);case 6:_.uh(c,0);break;case 4:b=_.E(c);if(a.j)return c["return"]();a.w(new _.N(_.O,6,6003,b.message,b));_.y(c)}})};
xp=function(a,b){return _.H(function(c){if(1==c.a)return a.g.info("Handle encrypted event for type "+b.initDataType),_.x(c,vp(a),2);if(!b.initData)return c["return"]();_.wp(a,b.initDataType,_.Oj(b.initData));_.y(c)})};
_.Dp=function(a,b){if(!a.J)return ii(a.B,b,function(){a.w(new _.N(_.O,6,6010))}),Promise.resolve();a.C=b;a.l.Ue(b);a.B.one(a.C,_.ff,function(){return yp(a)});a.B.on(a.C,_.Sg,function(e){var f=a.G;a.G=!a.A;!f&&a.G&&(a.g.info("Waiting for DRM license key delivery"),a.F.onEvent(e))});var c=a.a.initData.find(function(e){return 0<e.initData.length}),d=Promise.resolve();if(c||a.l.Td()!==zp||a.N.length)d=vp(a);c=Promise.resolve();_.rk()&&38===_.ul().major||(a.a&&a.a.keySystem!==_.$e&&!a.a.serverCertificate&&
(c=Ap(a)),c=c.then(function(){return _.Bp(a)}));return Promise.all([d,c]).then(function(){a.j||(_.Cp(a),a.B.on(a.C,fe,function(e){return xp(a,e)}))})["catch"](function(e){if(!a.j){if(6004===e.code&&a.a&&a.a.keySystem===_.Gd&&1>a.Y&&a.a.serverCertificate&&a.a.serverCertificate.length)return a.g.warn("Detected invalid widevine server certificate!. Retrying"),a.w(new _.N(1,6,6004)),a.a.serverCertificate=null,a.Y++,_.Dp(a,b);1<=a.Y&&a.g.info("Could not get valid widevine server certificate. Giving up");
throw e;}})};_.Bp=function(a){var b,c;return _.H(function(d){if(1==d.a){if(!(a.J&&a.a&&a.a.serverCertificate&&a.a.serverCertificate.length))return d.D(0);_.C(d,3);return _.x(d,a.J.setServerCertificate(a.a.serverCertificate),5)}if(3!=d.a)return b=d.f,void 0===b||b||a.g.debug("Server certificates are not supported by the key system. The server certificate has been ignored."),_.uh(d,0);c=_.E(d);throw new _.N(_.O,6,6004,{browserError:c.message});})};
Ap=function(a){var b=a.keySystem(),c=a.f.Pa[b],d=c.certificateUrl||"";if(""===d)return Promise.resolve();var e=a.F.getConfiguration();return Ep(a,e).then(function(){var f=c.modifiers,g=f&&f.certificateRequest,h=f&&f.certificateResponse;f=_.ck([d],a.f.attemptParameters);f.type=3;f.licenseRequestType=jd;g&&f.requestModifiers.push(function(l){return g(e,l)});h&&f.responseModifiers.push(function(l){return h(e,l)});a.g.debug("Fetching certificate");return a.F.Db.fetch(f).S}).then(function(f){a.a.serverCertificate=
_.Oj(f.data)})["catch"](function(f){var g=f.data.headers;g=Object.assign({message:Pa,url:f.data.url,status:f.data.status,response:f.data.response},g?{headers:g}:{},Zn(g));throw new _.N(_.O,6,6100,g,f);})};Ep=function(a,b){var c,d;return _.H(function(e){c=a.F.ud();return c?(d=b&&b.drm&&b.drm.customData)?_.x(e,c(d),0):e["return"]():e["return"]()})};Fp=function(a,b){if(!a)return!1;for(var c=0;c<b.Ye.length;c++)if(_.Qm(a,b.Ye[c]))return!0;return!1};
_.Cp=function(a){for(var b=a.a?a.a.initData||[]:[],c=_.u(b),d=c.next();!d.done;d=c.next()){d=d.value;var e=!_.qk(2);if(a.f.enforceSingleSession&&!a.keySystem().startsWith(_.Cd)){var f=a.h.values();f=_.u(f);for(var g=f.next();!g.done;g=f.next())g=g.value,_.Qm(d.initData,g.initData)?(a.g.info("Skipping Session creation. Existing init data in single session mode!"),e=!1):g.periodId===d.periodId&&(a.g.info("Skipping Session creation. Merging init data for period in single session mode for Key ID "+(d.keyId+
".")),Fp(d.initData,g)||(g.Ye.push(d.initData),d.keyId&&!g.vb.includes(d.keyId)&&g.vb.push(d.keyId),a.o.get(d.keyId)||a.o.set(d.keyId,cg)),e=!1)}!e||a.H&&a.L===jp||(_.Gp(a,d.keyId,d.initData)&&(e=!1),e&&(a.g.info("Request new media key session on create"),Hp(a,d.keyId,d.periodId,d.initDataType,d.initData)))}c=_.u(a.N);for(d=c.next();!d.done;d=c.next())_.Ip(a,d.value);b.length||a.N.length||(a.A||a.g.info(Ga),a.A=!0,a.G=!1,a.I.resolve());return a.I};
_.wp=function(a,b,c,d){d=void 0===d?"":d;if(c.length&&(!a.H||a.L!==jp)){var e=a.keySystem();if(!e.startsWith(_.Cd)&&b===_.hd){var f=new cp(c);if(1<f.a.length&&(e={"org.w3.clearkey":"1077efecc0b24d02ace33c1e52e2fb4b","com.widevine.alpha":"edef8ba979d64acea3c827dcd51d21ed","com.microsoft.playready":"9a04f07998404286ab92e65be0885f95","com.adobe.primetime":"f239e769efa348509c16a903c6932efb"}[e]))for(var g=0;g<f.f.length;g++)if(e===f.f[g]){c=c.subarray(f.a[g].start,f.a[g].end+1);break}}(a.C.webkitCurrentPlaybackTargetIsWireless||
_.qk(2)||a.keySystem().startsWith(_.Cd)||!_.Gp(a,d,c,!0))&&Hp(a,d,null,b,c)}};
_.Gp=function(a,b,c,d){d=void 0===d?!1:d;for(var e=_.u(a.h.keys()),f=e.next();!f.done;f=e.next()){f=f.value;var g=a.h.get(f);if(_.Qm(c,g.initData))return b?g.vb.includes(b)?d&&a.g.info("Skipping Session creation. License for init data with Key ID "+(b+" was already requested in Session: '")+(f.sessionId+"'. ")):(g.vb.push(b),a.o.get(b)||a.o.set(b,cg),d&&a.g.info(Kb+(f.sessionId+"'Adding Key ID ")+(b+" to session meta-data."))):d&&a.g.info(Kb+(f.sessionId+"'")),!0;if(Fp(c,g))return d&&a.g.info("Skipping Session creation. License for init data was already requested [extra]"),
!0}return!1};Jp=function(a){var b=Infinity;a=a.h.keys();a=_.u(a);for(var c=a.next();!c.done;c=a.next())c=c.value,isNaN(c.expiration)||(b=Math.min(b,c.expiration));return b};
tp=function(a,b){var c=new Set(op(b)),d=a.H?_.Mf:_.Ze,e=a.H?[_.df]:[jg],f=new Map,g=_.u(c);for(c=g.next();!c.done;c=g.next())c=c.value,f.set(c.keySystem,{initDataTypes:[_.hd],audioCapabilities:[],videoCapabilities:[],distinctiveIdentifier:_.Ze,persistentState:d,sessionTypes:e,label:c.keySystem,drmInfos:[]});d={};e=_.u(b);for(c=e.next();!c.done;d={Jf:d.Jf,Jd:d.Jd,Rf:d.Rf,Kd:d.Kd},c=e.next()){c=c.value;g=c.audio;var h=c.video;d.Jf=g?_.Kp(g):"";d.Jd=null;g&&"ac-3"===g.codecs.toLowerCase()&&_.qk()&&(d.Jd=
_.Kp(g,_.ee));d.Rf=h?_.Kp(h):"";d.Kd=null;h&&"ac-3"===h.codecs.toLowerCase()&&_.qk()&&(d.Kd=_.Kp(h,_.ee));var l={},m=_.u(c.drmInfos);for(c=m.next();!c.done;l={ib:l.ib},c=m.next())c=c.value,l.ib=f.get(c.keySystem),l.ib.drmInfos.push(c),c.initData&&c.initData.length&&(l.ib.initDataTypes=_.gh(new Set(c.initData.map(function(n){return n.initDataType}))).concat()),c.distinctiveIdentifierRequired&&(l.ib.distinctiveIdentifier=_.Mf),c.persistentStateRequired&&(l.ib.persistentState=_.Mf),g&&_.Gi(c.audioRobustness).forEach(function(n,
p){return function(q){var t={robustness:q||"",contentType:n.Jf};p.ib.audioCapabilities.find(function(v){return v.robustness===t.robustness&&v.contentType===t.contentType})||p.ib.audioCapabilities.push(t);n.Jd&&p.ib.audioCapabilities.push({robustness:q||"",contentType:n.Jd})}}(d,l)),h&&_.Gi(c.videoRobustness).forEach(function(n,p){return function(q){var t={robustness:q||"",contentType:n.Rf};p.ib.videoCapabilities.find(function(v){return v.robustness===t.robustness&&v.contentType===t.contentType})||
p.ib.videoCapabilities.push(t);n.Kd&&p.ib.videoCapabilities.push({robustness:q||"",contentType:n.Kd})}}(d,l))}return f};_.Kp=function(a,b){var c=_.ol(a.mimeType,b||a.codecs);if(_.nl(c,a.type)){var d=a.type,e=_.nl(c,d);e&&(e=e(),c=e.convertCodecs(d,c),e.destroy())}return c};
_.up=function(a,b){function c(m,n,p){n.drmInfos.some(function(q){return!!q.licenseServerUri})===m&&(f=f["catch"](function(){if(a.j)return null;if(p===_.Ed){if(_.sl()&&!a.f.Pa[p].useLegacySystem)return n.label=Fd,a.l.$b(Fd,[n])["catch"](function(){a.g.warn("Unable to create com.microsoft.playready.recommendation. Falling back to com.microsoft.playready.");n.label=_.Ed;Lp(n);return a.l.$b(p,[n])});Lp(n)}if(p===_.Gd&&a.f.widevineVersion!==_.Gd){var q=a.f.widevineVersion;if(!q.startsWith(_.Gd))return a.g.error('Invalid "widevineVersion" value "'+
q+'".'),Promise.reject();var t=Object.assign({},n,{label:q,distinctiveIdentifier:_.Ze,persistentState:_.Ze});return a.l.$b(q,[t])["catch"](function(){return a.l.$b(p,[n])})}return a.l.$b(p,[n])["catch"](function(v){a:{if(p===_.Gd&&Mp(n)){var z=_.sk();if(Mp(n)&&z.os===Kl&&z.browser===ld){a.g.warn("requestMediaKeySystemAccess() failed",v);a.g.warn("Will try to recover by removing the robustness attribute of videoCapabilities and audioCapabilities.");Lp(n);v=a.l.$b(p,[n]);break a}}throw v;}return v})}))}
if(1===b.size&&b.has(""))return Promise.reject(new _.N(_.O,6,6E3));null===a.l&&(a.l=Fo(a.f.emeApi,a.Yb));for(var d=_.u(b.values()),e=d.next();!e.done;e=d.next())e=e.value,0===e.audioCapabilities.length&&delete e.audioCapabilities,0===e.videoCapabilities.length&&delete e.videoCapabilities;var f=d=new _.kk,g=a.f.preferredDrmSystem;if(!g)if(e=_.sk(),e.os===Ml&&10<=e.osVersion.major&&"edge"===e.browser)g=_.Ed;else if("safari"===e.browser)g=_.Cd;else if(e.browser===ld||"firefox"===e.browser)g=_.Gd;g&&
(e=b.get(g))&&(c(!0,e,g),c(!1,e,g));e={};for(var h=_.u([!0,!1]),l=h.next();!l.done;e={Qf:e.Qf},l=h.next())e.Qf=l.value,b.forEach(function(m){return function(n,p){p!==g&&c(m.Qf,n,p)}}(e));f=f["catch"](function(){throw new _.N(_.O,6,6001,"Failed to get MediaKeySystemAccess.");});f=f.then(function(m){if(a.j)return null;a.K.clear();var n=m.getConfiguration();a.g.info("Got MediaKeySystemAccess with configuration",n);var p=n.videoCapabilities||[],q=_.u(n.audioCapabilities||[]);for(n=q.next();!n.done;n=
q.next())a.K.add(n.value.contentType.toLowerCase());p=_.u(p);for(n=p.next();!n.done;n=p.next())a.K.add(n.value.contentType.toLowerCase());p=m.keySystem;n=b.get(_.Np(m.keySystem));q=[];var t=[],v=[],z=[];Op(n.drmInfos,q,t,v,z);1<t.length&&_.Jh("Multiple unique server certificates found! Only the first will be used.");1<q.length&&_.Jh("Multiple unique license server URIs found! Only the first will be used.");a.a={keySystem:p,licenseServerUri:q[0],distinctiveIdentifierRequired:n.distinctiveIdentifier===
_.Mf,persistentStateRequired:n.persistentState===_.Mf,audioRobustness:n.audioCapabilities?n.audioCapabilities[0].robustness:"",videoRobustness:n.videoCapabilities?n.videoCapabilities[0].robustness:"",serverCertificate:t[0],initData:v,keyIds:z,periodId:null};if(!a.a.licenseServerUri)throw new _.N(_.O,6,6012,a.a.keySystem);return m.createMediaKeys()}).then(function(m){a.j||(a.g.info("Created MediaKeys for key system",a.a.keySystem),a.J=m,a.ca=!0)})["catch"](function(m){if(!a.j){a.a=null;a.K.clear();
if(m instanceof _.N)throw m;throw new _.N(_.O,6,6002,{browserError:m.message});}});d.reject();return f};
np=function(a){a=_.L.hh(a.f.Pa[_.$e]||{});if(0===a.size)return null;var b=[],c=[];a.forEach(function(e,f){var g=_.Om(f),h=_.Om(e);g={kty:"oct",kid:_.Mm(g,!1),k:_.Mm(h,!1)};b.push(g);c.push(g.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:_.Q.hb(d),initDataType:"keyids"}];return{keySystem:_.$e,licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,
initData:d,keyIds:[],periodId:null}};
_.Ip=function(a,b){try{a.g.debug("Attempting to load an offline session",b);var c=a.J.createSession(_.df)}catch(f){var d=new _.N(_.O,6,6005,{browserError:f.message});a.w(d);return Promise.reject(d)}a.B.on(c,_.Ie,a.Qi.bind(a));a.B.on(c,ue,a.Li.bind(a));var e={initData:null,loaded:!1,sg:Infinity,yc:null,qb:new _.kk,periodId:null,Ye:[],keyId:null,vb:[],initDataType:null,Ec:null,sessionContext:{ldlDelay:0,customData:{}}};e.qb["catch"](function(){});a.h.set(c,e);return c.load(b).then(function(f){if(a.j)return null;a.g.debug("Loaded offline session",
b,f);if(!f)return a.h["delete"](c),a.w(new _.N(_.O,6,6013)),null;e.loaded=!0;Pp(a)&&(a.A||a.g.info(Ga),a.A=!0,a.G=!1,a.I.resolve());return c},function(f){a.j||(a.h["delete"](c),a.w(new _.N(_.O,6,6005,{browserError:f.message})))})};Qp=function(a,b,c,d){if(!b&&c!==_.Yf)return!1;d=b||zn(d);a=_.u(a.h.values());for(var e=a.next();!e.done;e=a.next())if(e=e.value,b&&e.keyId===b||b&&e.vb.includes(b)||c===_.Yf&&(e.keyId||zn(e.initData))===d)return!0;return!1};
Hp=function(a,b,c,d,e,f,g){f=void 0===f?null:f;g=void 0===g?!1:g;var h,l,m,n,p,q,t,v,z,A,D,G,B,F,M,R,ka,U,qa,Ba,Ca;_.H(function(Da){switch(Da.a){case 1:if(!e.length)return a.g.warn("Empty init data"),Da["return"]();h=b;if(!h)try{h=Rp(a,d,e,f)}catch(Na){if(a.g.warn("Ignoring unrecognized init data. This may be caused by unsupported or malformed init data. Set `drm.ignoreUnrecognizedInitData \x3d false` if you want to override this behavior and use the init data after all.",{error:Na,initDataType:d,
initData:e}),a.f.ignoreUnrecognizedInitData)return Da["return"]()}if(g){Da.D(2);break}if(!Qp(a,h,d,e)){Da.D(2);break}l=!0;if("skd"!==d||a.f.enableSessionCacheForSkd){Da.D(4);break}m=_.u(a.h.keys());n=m.next();case 5:if(n.done){Da.D(4);break}p=n.value;q=a.h.get(p);if(!h||q.keyId!==h){Da.D(6);break}a.g.warn("Close and re-open session for "+h);_.C(Da,9);return _.x(Da,p.close(),11);case 11:_.uh(Da,10);break;case 9:t=_.E(Da),a.g.warn("Unable to close session",t);case 10:l=!1;case 6:n=m.next();Da.D(5);
break;case 4:if(l)return a.g.warn("Skip creating a new session for "+h),Da["return"]();case 2:try{z=a.H?_.df:jg,v=a.J.createSession(z),a.F.onEvent(new _.K($d,{keySystem:a.keySystem()})),a.g.info("Created new "+z+" session for Key ID: '"+h+"'. Init data type: "+(d+"."))}catch(Na){return a.w(new _.N(_.O,6,6005,{browserError:Na.message})),Da["return"]()}a.B.on(v,_.Ie,a.Qi.bind(a));a.B.on(v,ue,a.Li.bind(a));A={Ec:f,Ye:[],initData:e,initDataType:d,keyId:h,vb:h?[h]:[],loaded:!1,sg:Infinity,periodId:c,yc:null,
qb:new _.kk,sessionContext:{ldlDelay:0,customData:{}}};A.qb["catch"](function(){});f&&(D=a.h.get(f),A.sessionContext=D.sessionContext);a.h.set(v,A);h&&!a.o.get(h)&&a.o.set(h,cg);if(e)for(G=0;G<a.a.initData.length;G++)B=a.a.initData[G],B.keyId&&!A.vb.includes(B.keyId)&&_.Qm(B.initData,e)&&(A.keyId||(A.keyId=B.keyId),A.vb.push(B.keyId),a.o.get(B.keyId)||a.o.set(B.keyId,cg));F=_.L;M=F.Ub;R=a.F.getConfiguration();ka=a.keySystem();U=a.f.Pa[ka];Ba=(qa=U.modifiers)&&qa.transformInitData;M(Ba)||(Ba=Sp);try{e=
Ba({playerConfig:R,initData:e,initDataType:d,drmInfo:a.a,drmSystemConfig:U,sessionContext:A.sessionContext,emeApi:a.l.Td()})}catch(Na){return Ca=Na,Na instanceof _.N||(Ca=new _.N(_.O,6,6016,Na)),A.qb&&A.qb.reject(Na),a.w(Ca),Da["return"]()}a.g.info("Generate License Request for key ID: '"+h+"'");v.generateRequest(d,e.buffer)["catch"](function(Na){if(!a.j){var zb=null;Na.errorCode&&Na.errorCode.systemCode&&(zb=Na.errorCode.systemCode,0>zb&&(zb+=Math.pow(2,32)),zb="0x"+zb.toString(16));a.w(new _.N(_.O,
6,6006,{browserError:Na.message,error:Na,extended:zb},Na))}});_.y(Da)}})};
Rp=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.Pa[f];f=a.F.getConfiguration();g=g&&g.modifiers&&g.modifiers.extractContentId;_.L.Ub(g)||(g=Tp);try{var h={ldlDelay:0,customData:{}};e&&(h=a.h.get(e).sessionContext);var l=g(f,c,h);a.g.debug("Extracted Content ID '"+l+"' from SKD");var m=l;break a}catch(G){a.g.warn("Unable to extract Content ID from SKD",G)}m=""}return m}if(b===_.Yf)return zn(c)||"";if(b===_.hd){m=a.keySystem();try{if(m.match(/^com\.widevine\.alpha/)){var n=
_.Ro(c);if(n)return n.a}else if(Up(m)){e=new _.en(new DataView(c.buffer,c.byteOffset,c.byteLength),!1);f=_.kn(e);var p=_.kn(e);g=_.un(p);var q=_.kn(e);c=q>>>24;l=q&16777215;h=_.on(e,16);var t=_.Pm(h);if(0<c){var v=_.kn(e);e.skip(16*v)}var z=_.kn(e),A=_.on(e,z),D=_.Yo(A);_.Oh("Parsed PR PSSH Box","size",f,"name",g,Eg,c,"flags",l,"size",z,"systemId",t,"keyId",D.a);if(D)return D.a}}catch(G){throw a.g.warn("Unable to extract Key ID from PSSH data.",{error:G,keySystem:m}),G;}}return""};
Tp=function(a,b){var c=_.yn(b);_.Oh("Using default Content ID extractor. The hostname part from HLS #EXT-X-KEY:URI skd:// will be used.","Extracted Content ID: "+c);return c};
Sp=function(a){var b=a.playerConfig,c=a.initData,d=a.drmInfo,e=a.drmSystemConfig,f=a.sessionContext,g=a.emeApi;if("skd"===a.initDataType&&g===Vp){a=_.L.Ub;d=d.serverCertificate;e=e&&e.modifiers&&e.modifiers.extractContentId;a(e)||(e=Tp);a="";try{a=e(b,c,f)}catch(h){throw new _.N(_.O,6,6103);}if(!a.length)throw new _.N(_.O,6,6101,"Content ID is an empty string");c=An(c,a,d)}return c};
aq=function(a,b){var c,d,e,f,g,h,l,m,n,p,q,t,v,z,A,D,G,B;return _.H(function(F){switch(F.a){case 1:c=b.target;d=a.h.get(c);if(!d)return a.g.error("Session metadata not found for "+c.sessionId+"."),F["return"]();e=a.a.licenseServerUri;if(!Wp(a,b)){F.D(2);break}return _.x(F,Xp(a,e,b,c,d),3);case 3:return F["return"]();case 2:f=a.Kb;if(!(0<f)){F.D(4);break}a.g.info("Delaying license request by "+f+" s.");return _.x(F,Yh(f),5);case 5:if(a.j)return F["return"]();case 4:g=a.keySystem();h=a.f.Pa[g];"individualization-request"===
b.messageType&&h&&h.individualizationServer&&(e=h.individualizationServer);l=_.ck([e],a.f.attemptParameters);l.type=3;l.body=b.message;l.method=_.sb;l.licenseRequestType=b.messageType===xe&&d.Ec?we:b.messageType;l.sessionId=c.sessionId;if(l.licenseRequestType===we)a.F.onEvent(new _.K(Zd));Up(a.a.keySystem)&&Yp(a,l);Tm(a.P,l);m=String(Math.floor(b.timeStamp));return _.x(F,Zp(a,l,d,m,e,c.sessionId,b.messageType,f),6);case 6:n=F.f;if(!n)return F["return"]();p=Um(a.P,n);return _.x(F,$p(a,c,n.data,d,m),
7);case 7:q=F.f;if(!q)return F["return"]();t=Jp(a);v=p?Date.now()+1E3*p.delay:Number.NaN;a.F.onEvent(new _.K(_.be,{keySystem:g,expirationTime:t,expectedRenewalTime:v}));d.yc&&d.yc.resolve();d.Ec&&(z=d.Ec,a.g.info("Closing expired session '"+z.sessionId+"'"),hp(z)["catch"](function(){a.g.warn("Unable to close expired session in time")}),(A=a.h.get(d.Ec))&&A.pd&&A.pd.stop(),a.h["delete"](d.Ec),d.Ec=null);D=new _.Xh(function(){a.j||(d.loaded=!0,d.qb&&d.qb.resolve(),Pp(a)&&(a.A||a.g.info(Ga),a.A=!0,a.G=
!1,a.I.resolve()))});D.ga(5);null!==d.initData&&(0<d.sessionContext.ldlDelay||p&&(_.Q.startsWith(g,_.Cd)||_.Q.startsWith(g,_.Ed)))&&(G=new _.Xh(function(){!a.j&&a.P&&(a.g.info("Updating CSL Sessions"),Up(g)?Hp(a,d.keyId,d.periodId,d.initDataType,d.initData,c,!0):g.startsWith(_.Cd)&&c.update(_.Q.hb("renew")))}),d.pd=G,B=p?p.delay:d.sessionContext.ldlDelay,G.ga(B));_.y(F)}})};
Xp=function(a,b,c,d,e){var f,g,h;return _.H(function(l){if(1==l.a)return f=_.ck([b],a.f.attemptParameters),f.type=3,f.body=c.message,f.method=_.sb,f.licenseRequestType=jd,f.sessionId=d.sessionId,_.x(l,bq(a,f,e,b,d.sessionId,c.messageType),2);g=l.f;if(!g)return l["return"]();h=String(Math.floor(c.timeStamp));return _.x(l,$p(a,d,g.data,e,h),0)})};Wp=function(a,b){return!!a.keySystem().match(/^com\.widevine\.alpha/)&&b.message&&2===b.message.byteLength};
Zp=function(a,b,c,d,e,f,g,h){var l,m,n,p,q,t,v,z,A,D,G,B;return _.H(function(F){switch(F.a){case 1:return a.g.info("License request for SID:'"+(f+"'/KID:'"+c.keyId+"' from msg '")+(g+"'.")),_.x(F,cq(a,b,c.sessionContext),2);case 2:return a.g.debug("Sending DRM license request to",e,b),a.F.onEvent(new _.K(Yd,{delay:h})),l=Date.now(),_.$o(Rd+d+ha),m=null,_.C(F,3),_.x(F,a.F.Db.fetch(b).S,5);case 5:m=F.f;_.uh(F,4);break;case 3:n=_.E(F);if(a.j)return F["return"](null);p=n;q=p.data.headers;t=Zn(q);v=Object.assign({message:"Error while fetching DRM license!",
url:p.data.url,status:p.data.status,response:p.data.response},q?{headers:q}:{},t);z=new _.N(_.O,6,6007,v,p);dq(a,z,c);return F["return"](null);case 4:_.$o(Rd+d+".end");_.bp(Rd+d,Rd+d+ha,Rd+d+".end");A=Date.now()-l;if(D=$n(m.headers))a.Kb=D.delay||0;G="";D&&D.requestId&&(G=" RID:"+D.requestId);B=m.data.byteLength;a.g.info("License response for SID:'"+(f+"'/KID:'")+(c.keyId+"' ")+(B+" bytes in ")+(A+"ms"+G));return a.j?F["return"](null):F["return"](m)}})};
bq=function(a,b,c,d,e,f){var g,h,l,m,n,p,q,t,v,z,A,D;return _.H(function(G){switch(G.a){case 1:return a.g.info("WV Server certificate request for SID:'"+(e+" from msg '"+f+"'.")),_.x(G,cq(a,b,c.sessionContext),2);case 2:return a.g.debug("Sending Widevine certificate request to",d,b),g=Date.now(),h=null,_.C(G,3),_.x(G,a.F.Db.fetch(b).S,5);case 5:h=G.f;_.uh(G,4);break;case 3:l=_.E(G);if(a.j)return G["return"](null);m=l;n=m.data.headers;p=Zn(n);q=Object.assign({message:Pa,url:m.data.url,status:m.data.status,
response:m.data.response},n?{headers:n}:{},p);t=new _.N(_.O,6,6100,q,m);dq(a,t,c);return G["return"](null);case 4:return v=Date.now()-g,z=$n(h.headers),A="",z&&z.requestId&&(A=" RID:"+z.requestId),D=h.data.byteLength,a.g.info("WV Server certificate response for SID:'"+(e+"' ")+(D+" bytes in ")+(v+"ms"+A)),a.j?G["return"](null):G["return"](h)}})};
$p=function(a,b,c,d,e){var f,g;return _.H(function(h){switch(h.a){case 1:return _.$o(Wd+e+ha),_.C(h,2),_.x(h,b.update(c),4);case 4:_.uh(h,3);break;case 2:f=_.E(h);if(a.j)return h["return"](!1);if(f===Hb)return a.g.info("Ignore update for closed sessions"),h["return"](!1);g=new _.N(_.O,6,6008,{browserError:f.message});dq(a,g,d);return h["return"](!1);case 3:return _.$o(Wd+e+".end"),_.bp(Wd+e,Wd+e+ha,Wd+e+".end"),a.j?h["return"](!1):h["return"](!0)}})};
dq=function(a,b,c){a.j||(a.w(b),c.yc&&c.yc.reject(b),c.qb&&c.qb.reject(b))};
Yp=function(a,b){var c=_.Q.Hc(b.body,!0,!0);if(c.includes("PlayReadyKeyMessage")){a.g.debug("Unwrapping PlayReady request.");c=(new DOMParser).parseFromString(c,"application/xml");for(var d=c.getElementsByTagName("HttpHeader"),e=0;e<d.length;++e)b.headers[d[e].querySelector("name").textContent]=d[e].querySelector(_.Dg).textContent;b.body=_.Nm(c.querySelector("Challenge").textContent).buffer}else a.g.debug("PlayReady request is already unwrapped."),b.headers[Aa]="text/xml; charset\x3dutf-8"};
cq=function(a,b,c){var d,e,f,g,h,l;return _.H(function(m){if(1==m.a)return d=a.F.getConfiguration(),_.x(m,Ep(a,d),2);e=a.keySystem();h=(g=(f=a.f.Pa[e])&&f.modifiers)&&g.licenseRequest;l=g&&g.licenseResponse;h?b.requestModifiers.push(function(n){return h(d,n,c)}):e.startsWith(_.Cd)&&b.requestModifiers.push(function(n){return _.Bn(n)});l?b.responseModifiers.push(function(n){return l(d,n,c)}):e.startsWith(_.Cd)&&b.responseModifiers.push(function(n){return _.Cn(n)});_.y(m)})};
ep=function(a){var b=a.o,c=a.ja;c.clear();b.forEach(function(d,e){return c.set(e,d)});b=Array.from(c.values());b.length&&b.every(function(d){return"expired"===d})&&a.w(new _.N(_.O,6,6014));a.F.xg(_.L.ih(c));a.A||a.g.info(Ga);a.A=!0;a.G=!1};yp=function(a){var b;return _.H(function(c){if(1==c.a)return _.$o(Vd),b=a.ha.map(function(d){return aq(a,d)}),a.jb=!0,a.ha=[],_.x(c,Promise.all(b),2);_.$o(Ud);_.bp("drm.onPlay",Vd,Ud);_.y(c)})};Up=function(a){return!!a.match(/^com\.(microsoft|chromecast)\.playready/)};
_.Np=function(a){return Up(a)?_.Ed:a};_.fq=function(a,b){return a.length&&b.length?0<_.eq(a,b).length:!0};
_.eq=function(a,b){if(!a.length)return b;if(!b.length)return a;for(var c=[],d=0;d<a.length;d++)for(var e={},f=0;f<b.length;e={Ld:e.Ld},f++)if(a[d].keySystem===b[f].keySystem&&a[d].periodId===b[f].periodId){var g=a[d];f=b[f];var h=[];h=h.concat(g.initData||[]);h=h.concat(f.initData||[]);e.Ld=_.gh(g.keyIds||[]).concat();f.keyIds&&f.keyIds.length&&f.keyIds.forEach(function(l){return function(m){l.Ld.includes(m)||l.Ld.push(m)}}(e));c.push({keySystem:g.keySystem,licenseServerUri:g.licenseServerUri||f.licenseServerUri,
licenseServerUriOrigin:g.licenseServerUriOrigin||f.licenseServerUriOrigin,distinctiveIdentifierRequired:g.distinctiveIdentifierRequired||f.distinctiveIdentifierRequired,persistentStateRequired:g.persistentStateRequired||f.persistentStateRequired,videoRobustness:g.videoRobustness||f.videoRobustness,audioRobustness:g.audioRobustness||f.audioRobustness,serverCertificate:g.serverCertificate||f.serverCertificate,initData:h,keyIds:e.Ld,periodId:g.periodId});break}return c};
fp=function(a){a.h.forEach(function(b,c){var d=b.sg,e=c.expiration;isNaN(e)&&(e=Infinity);e!==d&&(a.F.wg(c.sessionId,e),b.sg=e)})};Pp=function(a){a=a.h.values();return _.Lj(a,function(b){return b.loaded})};
mp=function(a,b){var c=[];b.forEach(function(f,g){c.push({keySystem:g,licenseServerUri:f.licenseUrl,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:[],keyIds:[]})});for(var d=_.u(a),e=d.next();!e.done;e=d.next())e.value.drmInfos=c};Lp=function(a){for(var b=_.u(a.audioCapabilities||[]),c=b.next();!c.done;c=b.next())delete c.value.robustness;a=_.u(a.videoCapabilities||[]);for(b=a.next();!b.done;b=a.next())delete b.value.robustness};
Mp=function(a){return(a.audioCapabilities||[]).some(gq)||(a.videoCapabilities||[]).some(gq)};gq=function(a){return null!=a.robustness&&""!==a.robustness};
Op=function(a,b,c,d,e){var f={};a=_.u(a);for(var g=a.next();!g.done;f={Ja:f.Ja},g=a.next()){f.Ja=g.value;b.includes(f.Ja.licenseServerUri)||b.push(f.Ja.licenseServerUri);f.Ja.serverCertificate&&(c.some(function(m){return function(n){return _.Qm(n,m.Ja.serverCertificate)}}(f))||c.push(f.Ja.serverCertificate));if(f.Ja.initData){var h=_.u(f.Ja.initData);for(g=h.next();!g.done;g=h.next())g.value.periodId=f.Ja.periodId;h={};var l=_.u(f.Ja.initData);for(g=l.next();!g.done;h={Je:h.Je},g=l.next())h.Je=g.value,
d.some(function(m){return function(n){var p=m.Je;return n.keyId&&n.keyId===p.keyId&&n.periodId===p.periodId?!0:!1}}(h))||d.push(h.Je)}if(f.Ja.keyIds)for(g=0;g<f.Ja.keyIds.length;++g)e.includes(f.Ja.keyIds[g])||e.push(f.Ja.keyIds[g])}};
sp=function(a,b,c){var d=_.Np(b.keySystem);c=c[d];d===_.$e&&b.licenseServerUri?a.g.debug("Using Clear Key data URI for",d):c&&c.licenseUrl?(b.licenseServerUri=c.licenseUrl,a.g.debug("Using license server URI from user-configured clpp.drm.DrmEnvironment (licenseUrl) for",d)):a.g.debug("Using license server URI from the manifest for ",d)};
qp=function(a,b){var c=b[_.Np(a.keySystem)];a.keyIds||(a.keyIds=[]);c&&(a.distinctiveIdentifierRequired||(a.distinctiveIdentifierRequired=c.distinctiveIdentifierRequired),a.persistentStateRequired||(a.persistentStateRequired=c.persistentStateRequired),a.videoRobustness||(a.videoRobustness=c.videoRobustness||""),a.audioRobustness||(a.audioRobustness=c.audioRobustness||""),a.serverCertificate||(a.serverCertificate=c.serverCertificate||null))};
hp=function(a){var b,c;return _.H(function(d){if(1==d.a)return b=new Promise(function(e){(new _.Xh(e)).ga(1)}),_.x(d,Promise.race([a.close().then(function(){return!0}),b.then(function(){return!1})]),2);(c=d.f)||_.Jh("Timeout waiting for session close");_.y(d)})};_.jq=function(a,b){a&&b&&(_.hq.set(a,b),_.iq.info("Registered TextDisplayerFactory: '"+a+"'"))};
_.kq=function(a,b){var c=b.find(function(d){return(d=_.hq.get(d))?d.a(a):!1});if(null==c)return _.iq.warn("Subtitles may not work as expected. No compatible text displayer found for this platform."),null;_.iq.info("Chosen the text displayer: "+c);return _.hq.get(c)};lq=function(){this.a=null;this.f=[]};_.mq=function(a,b){if(null==a.a)a.a={timestamp:Date.now()/1E3,state:b,duration:0};else{var c=Date.now()/1E3;a.a.duration=c-a.a.timestamp;a.a.state!==b&&(a.f.push(a.a),a.a={timestamp:c,state:b,duration:0})}};
nq=function(a,b){var c=0;a.a&&a.a.state===b&&(c+=a.a.duration);for(var d=_.u(a.f),e=d.next();!e.done;e=d.next())e=e.value,c+=e.state===b?e.duration:0;return c};oq=function(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=_.u(a.f),e=d.next();!e.done;e=d.next())c.push(b(e.value));a.a&&c.push(b(a.a));return c};pq=function(){this.h=this.f=this.j=null;this.a=[]};qq=function(a){return a.a.map(function(b){return _.L.kb(b)})};
_.rq=function(){this.h=this.w=this.B=this.C=this.l=this.o=this.j=this.A=NaN;this.a=new lq;this.f=new pq};_.sq=function(){return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,estimatedBandwidth:NaN,loadLatency:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,switchHistory:[],stateHistory:[]}};
wq=function(a){this.g=new _.J("clpp.StateManager");this.m=a;this.a=new _.gi;this.h=_.tq;this.A=_.uq;this.I=0;this.w=-1;this.L=this.o=this.J=this.B=0;this.j=this.f=this.G=!1;this.H=0;this.l=null;this.K=0;this.N=_.xl();this.C=!1;this.J=Date.now();vq(this)};xq=function(a,b){return Object.keys(b)[a]};
zq=function(a,b){var c={type:_.bg};b===_.ad||b===_.$c?(c.reason=a.w,b===_.ad?c.timeSinceLastStateChangeMS=a.I:c.bufferedTimeMS=a.B):(a.h===_.yq&&(c.reason=a.w),a.A===_.yq&&(c.reason=a.w,c.bufferedTimeMS=a.B),c.currentState=a.h,c.previousState=a.A,c.timeSinceLastStateChangeMS=a.I);return c};
Dq=function(a,b){if(a.h===b)return!1;var c=Date.now(),d=a.h===_.yq;a.A=a.h;a.h=b;a.A===_.Aq&&(a.J=c,a.o=0);a.o||(a.o=a.J||c);a.I=c-a.o;a.o=c;b===_.yq?(a.L=a.o,a.w=a.f?1:2,a.g.info("Buffering started. Reason: "+xq(a.w-1,_.Bq)),c=zq(a,_.ad),a.Ya(_.ad,c)):d&&(a.B=a.o-a.L,a.g.info("Buffering finished. Reason: "+xq(a.w-1,_.Bq)+". Buffering time: "+a.B+" ms"),c=zq(a,_.$c),a.Ya(_.$c,c));c=xq(a.A,_.Cq);d=xq(a.h,_.Cq);a.g.info(_.wb+c+" -\x3e "+d);a.Ya(_.bg,zq(a,""));return!0};
Iq=function(a,b){if(a.h===_.Eq)a.g.warn("Player is in error state, aborting any further state checks");else{var c=a.m.isPaused(),d=a.m?a.m.isEnded():!1;if(d)a.f||(a.j=!1,Dq(a,_.Aq));else if(b!==_.rg){var e=a.m.getPosition();e=null!==e&&void 0!==e&&0<=e?a.m.getBufferInfo().$a(e,!0):-1;a.H=e;e=a.m.getSurface().getMedia();a.l=e?e.readyState:null;a.K=a.m.getPlaybackRate()||1;e=typeof a.l===_.k&&2>a.l&&2===e.networkState;var f=typeof a.l===_.k&&0>=a.H&&a.h===_.tq,g=typeof a.l===_.k&&2>=a.l&&a.j;e=a.f||
f||e||g;!a.N||a.m.isLive()||a.h!==_.yq||e||(f=b===_.Tf&&4===a.l,(g=a.A===_.Fq)&&!a.C?e=!0:g||a.C||f||(e=!0));f=!1;e?f=Dq(a,_.yq):c?f=Dq(a,_.Gq):a.G&&(f=Dq(a,_.Hq));f&&(a.C=!1);a.g.debug("Video state check for event "+b+":: seeking: "+a.f+", waiting: "+a.j+", playing: "+a.G+", paused: "+c+", readyState: "+a.l+", rate: "+a.K+", buffer: "+a.H+", ended: "+d+". Changed state: "+f+", Current state: "+xq(a.h,_.Cq))}}};
vq=function(a){function b(d){return Iq(a,d.type)}a.g.debug("Start watching for video events for "+a.m.namespace());var c=a.m;a.a.on(c,_.he,function(){a.f||(a.j=!1,Dq(a,_.Aq))});a.a.on(c,bd,b);a.a.on(c,_.rf,function(){a.G=!0;a.j=!1;Iq(a,_.rf)});a.a.on(c,_.bf,function(){a.G=!1;a.j=!1;Iq(a,_.bf)});a.a.on(c,_.rg,b);a.a.on(c,_.If,b);a.a.on(c,_.Tf,function(d){a.f=!1;a.j=!1;Iq(a,d.type)});a.a.on(c,_.Uf,function(d){a.f=!0;Iq(a,d.type)});a.a.on(c,$f,b);a.a.on(c,_.Rg,function(){a.j=!0;Iq(a,_.Rg)});a.a.on(c,
_.ie,function(d){(d=d&&d.detail)&&d.severity&&d.severity===_.O&&Dq(a,_.Eq)});a.a.on(c,_.De,b);a.a.on(c,cd,function(){a.C=!0;Iq(a,cd)});a.a.on(c,_.Cg,function(d){a.f=!0;Iq(a,d.type)});a.a.on(c,_.Bg,function(d){a.f=!1;a.j=!1;Iq(a,d.type)})};Jq=function(a){a=(new _.dj(a)).Ma;if(!a)return null;a=a.toUpperCase();return _.Q.endsWith(a,".MPD")?_.Ic:_.Q.endsWith(a,".M3U8")?_.Zl:_.Q.endsWith(a,".MP4")?_.Lg:_.Q.endsWith(a,".MP3")?"audio/mp3":_.Q.endsWith(a,"MANIFEST")||_.Q.endsWith(a,".ISM")?_.Nc:null};
_.Lq=function(a){var b;wm(a)?b=a.source:b=a;Array.isArray(b)||(b=[b]);b=b.filter(function(e){return typeof e===_.eg||"url"in e});a=[];for(var c=0;c<b.length;c++){var d=Kq(b[c]);d&&a.push(d)}return a};
Kq=function(a){var b=null;_.L.ia(a)&&(a={url:a});typeof a===_.Re&&!Array.isArray(a)&&"url"in a&&(b={url:a.url,type:a.type?a.type:null},_.L.R(a.drmProtected)||typeof a.drmProtected!==_.Zc||(b.drmProtected=a.drmProtected),_.L.R(a.isLive)||typeof a.isLive!==_.Zc||(b.isLive=a.isLive),_.L.R(a.name)||typeof a.name!==_.eg||(b.name=a.name),_.L.R(a.lc)||typeof a.lc!==_.eg||(b.lc=a.lc),_.L.R(a.audioMimeType)||typeof a.audioMimeType!==_.eg||(b.audioMimeType=a.audioMimeType));b&&!b.type&&(b.type=Jq(a.url),b.type?
Mq.debug("Detect media type "+b.type+" for "+a.url):Mq.warn("Unable to detect media type for "+a.url));return b};Nq=function(){_.xm.call(this,wd);this.w=this.H=!1;this.l=this.A=this.o=this.a=this.j=null;this.h=new _.gi;this.C=this.B=this.f=this.I=null};
Pq=function(a,b){if(a.w)throw new _.N(_.O,7,7E3);a.a||(a.h.on(b,_.ie,function(){var c=Oq(a);if(c)a.onError(c)}),a.h.on(b,_.Nf,function(){var c=b.videoWidth,d=b.videoHeight,e=a.getTrackManager();e&&0<c&&0<d&&(e.w={width:c,height:d});a.trigger(new _.K(_.Yc,{detail:{width:c,height:d}}))}),a.a=b)};Qq=function(a){var b=_.xl()?Vp:void 0;return new _.gp(a,b)};
Sq=function(a){var b,c,d,e,f;return _.H(function(g){if(1==g.a){if(a.w)return g["return"](Promise.reject(new _.N(_.O,7,7E3)));b=a.ba[a.getSourceIndex()];if(!a.configuration.drm||!1===b.drmProtected)return a.log.debug("No DRM configuration present.","Skipping DRM engine initialization"),g["return"](Promise.resolve());c=_.Rq;d=_.Ym(a.configuration.drm);a.log.debug("Drm configuration: ",d);e=a.getNetworkEngine();a.o=Qq({Db:e,onError:function(h){return a.onError(h)},xg:function(){},wg:function(h,l){a.trigger(new _.K(_.Xd,
{expirationTime:l}))},onEvent:function(h){h instanceof _.K?a.dispatchEvent(h):a.log.debug(_.Qb,h.type)},getConfiguration:function(){return a.getConfiguration()},ud:function(){return a.ud()}});a.o.f=d;f={id:0,language:_.wg,primary:!1,audio:null,video:{id:0,originalId:null,createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(){return null},getSegmentReference:function(){return null},adjustSegmentDurations:function(){},getDuration:a.getDuration.bind(a),initSegmentReference:null,
Ha:0,mimeType:_.Lg,codecs:"",encrypted:!0,keyId:null,language:_.wg,originalLanguage:_.wg,label:null,type:c.VIDEO,primary:!1,frameRate:void 0,vp:void 0,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,spatialAudio:!1,bp:null,closedCaptions:null},bandwidth:100,drmInfos:[],allowedByApplication:!0,allowedByKeySystem:!0};return _.x(g,_.lp(a.o,[f]),2)}return _.x(g,_.Dp(a.o,a.a),0)})};
Tq=function(a,b){fo(a.a,HTMLMediaElement.HAVE_CURRENT_DATA,a.h,function(){a.getState()!==_.Eq&&a.seek(b)["catch"](function(c){a.log.warn("Error while seeking to start position.",c)})})};Oq=function(a){if(null===a.ba||!a.a.error)return null;var b=a.a.error.code;if(1===b)return null;var c=a.a.error.msExtendedCode;c&&(0>c&&(c+=Math.pow(2,32)),c=c.toString(16));return new _.N(_.O,3,3016,{code:b,op:c,message:a.a.error.message})};
Uq=function(a){if(a.w)return new _.lk(Promise.reject(new _.N(_.O,7,7E3)),function(){});var b=a.ba[a.getSourceIndex()],c=a.configuration.startTime||null,d=a.a,e=a.I;c&&Tq(a,c);if(d.preload!==_.Qe)a.h.one(d,_.De,function(){var g=Date.now()/1E3-e;a.f.B=g;a.log.debug("Time to load: ",g)});d.src=b.url;(_.qk()||_.rk())&&d.load();var f=new _.kk;a.h.one(d,$f,function(){var g=a.getConfiguration().manifest.attemptParameters.timeout||30;a.B||(a.B=(new _.Xh(function(){f.reject(new _.N(_.O,3,3100,{message:"Unable to load media source successfully from "+
b.url,uri:b.url},d.error))})).ga(g))});fo(d,a.configuration.forceWaitForTracks?HTMLMediaElement.HAVE_CURRENT_DATA:HTMLMediaElement.HAVE_METADATA,a.h,function(){return f.resolve()});d.error?f.reject(Oq(a)):d.preload===_.Qe&&(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,_.ie,function(){f.reject(Oq(a))});
return new _.lk(f,function(){var g=new _.N(_.O,7,7001);f.reject(g);return Promise.resolve()})};
Vq=function(a,b){fo(b,HTMLMediaElement.HAVE_CURRENT_DATA,a.h,function(){if(a.isLive()&&a.getState()!==_.Eq){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"](function(e){a.log.warn("Error while seeking to seek range edge.",e)}))}})};
Wq=function(a,b){var c=!1;a.h.on(b,_.Uf,function(){c=b.paused});a.h.on(b,_.Tf,function(){.2>b.duration-b.currentTime&&b.paused&&!c&&(a.log.warn("Player was auto-paused during seek to the end, auto-resuming."),b.play())})};Xq=function(){};_.$q=function(a){0<=Yq.indexOf(a)?Zq.warn("Factory '"+a.name()+"' is already registered"):(Yq.push(a),Zq.info("Factory '"+a.name()+"' has been registered."))};
ar=function(a,b){var c=Yq.find(function(d){return d.a(a,b)})||null;c&&Zq.info("Chosen ads manager: "+c.name());return c};br=function(){};cr=function(){};W=function(a,b,c,d,e,f,g){this.w=this.o=this.l=!1;this.G=a;this.f=b;this.a=c;this.h=d;this.j=0;this.B=e+":"+b;this.H=e;this.videoEl=null;this.A=f;this.C=g||null};dr=function(a){this.a=a.map(function(b){return{videoId:b.getSurface().getMedia().id,player:b,Re:!0,ready:Promise.resolve()}});this.g=new _.J("clpp.plist.PlayerPool")};
_.er=function(a,b){var c=document.createElement(a),d;for(d in b){var e=b[d];null===e||void 0===e?c.setAttribute(d,""):c.setAttribute(d,e)}return c};_.fr=function(a,b){a.classList.add(b)};_.gr=function(a,b){if(a&&typeof b===_.Re)for(var c in b)a.style[c]=b[c]};_.hr=function(a){return document.createElement(a)};ir=function(){this.a=null;this.h=new Set;this.f=null;this.set(null)};jr=function(a,b){a.a&&0!==b.length&&(a.a.classList.add(b),a.h.add(b))};
kr=function(a,b){var c=new MutationObserver(function(){var d=Array.from(a.h.values());Ii(Array.from(b.classList),Array.from(d))||b.classList.add.apply(b.classList,_.gh(d))});c.observe(b,{attributes:!0,attributeFilter:["class"]});return c};
or=function(a,b){this.g=new _.J("clpp.PlayerSurface");this.w=_.L.ta(lr,b);this.f=new ir;this.h=null;this.a=new ir;this.l=mr;mr+=1;this.o="clpp-video-"+this.l;this.j=new _.gi;if(null==a)throw new _.N(_.O,7,7102,"No Media element was provided");if(a instanceof Element)var c=a;else if(c=document.getElementById(a),!c)throw new _.N(_.O,7,7004,"Media element not found");var d=this.w;this.g.debug("Initializing Player Surface on ",c);if("cast-media-player"===c.tagName.toLowerCase())this.h=c;else{if(!(c instanceof
HTMLMediaElement))throw new _.N(_.O,7,7005,"Media element is not instance of HTMLMediaElement");if(!c.hasAttribute("crossorigin")){var e=d.crossorigin;this.g.info("Setting media elements crossorigin to "+e);c.setAttribute("crossorigin",e)}this.f.set(c);if(d.disableContainer)e=null;else if(d.containerEl){if(c.parentNode!==d.containerEl)throw new _.N(_.O,7,7006,"Container element is not a direct parent of media element");e=d.containerEl}else{e=document.createElement(_.Qd);c.parentNode?c.parentNode.replaceChild(e,
c):this.g.warn("Player Surface Element has no parent. Can not inject container. You have to manually add playerSurface.getContainer() to the DOM!");for(var f=[],g=0;g<c.classList.length;g++)f.push(c.classList[g]);f=_.u(f);for(g=f.next();!g.done;g=f.next())g=g.value,c.classList.remove(g),_.fr(e,g);e.style.cssText=c.style.cssText;c.removeAttribute(_.gg);f=_.u([_.Yg,_.pe]);for(g=f.next();!g.done;g=f.next()){g=g.value;var h=c.getAttribute(g);h=parseInt(h,10);isNaN(h)||(e.style[g]=h+_.Hf);_.qk()||c.removeAttribute(g)}e.appendChild(c)}e&&
(this.a.set(e),jr(this.a,"clpp-container"),jr(this.a,this.o),jr(this.f,_.md),jr(this.f,"clpp-video"));d.webOSStartupPatch&&nr(this,c,e)}};nr=function(a,b,c){(_.rk()&&53===_.ul().major||_.rk()&&68===_.ul().major||_.vl())&&!b.hasAttribute(Kd)&&(b.style.opacity="0",b.setAttribute(Kd,""),a.j.one(b,de,function(){b.removeAttribute(Kd);b.style.opacity="1";c&&(c.style.opacity="1")}))};
tr=function(a){var b=this;this.j=a;this.A=!!a.sideAdContainer;this.l=[];this.a=a.cj;this.H=pr(a);this.C=[];var c=qr(this,this.H,this.j.vl);this.w=new dr(c);this.h=null;this.B=!1;this.o=new Map;this.I=a.toggleVisible;this.g=new _.J("clpp.interstitial.MultiController");this.f=this.G=!1;this.J=a.xn||function(){};rr(this).forEach(function(d){return sr(b,d,!1)})};
xr=function(a,b){var c,d,e,f,g,h,l,m,n,p,q,t,v;return _.H(function(z){if(1==z.a){a.g.info("Crop ads by playout limit",b);c=ur(a);d=a.getCurrentItem();if(!c||!d||!d.Za||null==c.V)return z["return"]();e=a.l.filter(function(A){return!A.primary});f=Math.max.apply(Math,_.gh(e.map(function(A){return A.wb})));if(b>f)return a.g.info("Playout limit is greater than ad pod duration, ignored."),z["return"]();g=d.player.getPosition()+(d.wb-d.duration);h=e.sort(function(A,D){return D.wb-A.wb})[0];l=c.V;m=b<=g;
if(!m)return z.D(2);n=f-g;c.V-=n;a.g.warn("Playout limit exceeded, immediately returning to primary at "+(c.V.toFixed(1)+" instead of ")+l.toFixed(1));return _.x(z,vr(a,c.id,_.ff),3)}if(2!=z.a)return h.Fa&&h.Fa(),p=d.Za,a.a.trigger(new _.K(_.zc,{ad:p})),a.a.trigger(new _.K(_.lc,{ad:p})),a.a.trigger(new _.K(_.ic,{id:d.Sb})),z["return"]();a.g.warn("Limiting playout of ads to",b);q=e.find(function(A){return b<=A.wb&&b>=A.wb-A.duration});if(!q)return a.g.warn("Cannot find ad hit by limit"),z["return"]();
t=b-(q.wb-q.duration);q.Za.h=t;v=f-b;c.V-=v;a.g.info("Last ad is now ",q.Za.Bb(),"with cropped duration",t,"and primary will resume at",c.V.toFixed(1),"instead of",l.toFixed(1));h.Fa&&(q.Fa=h.Fa);q.transition={tf:{position:t,itemId:c.id,V:c.V}};wr(a,q);_.y(z)})};zr=function(a){var b;return _.H(function(c){if(1==c.a)return(b=a.h)?"loaded"===b.state?c.D(2):_.x(c,b.zd,2):c["return"]();if(4!=c.a)return _.x(c,b.player.play(),4);b.state=_.rf;yr(b);_.y(c)})};
Ar=function(a,b){a.g.info("Add items",b);a.l=a.l.concat(b.map(function(c){return Object.assign({},c,{state:"idle",disposers:[],preloadPromise:Promise.resolve(),zd:Promise.resolve()})}))};Cr=function(a){return _.H(function(b){return _.x(b,Br(a,a.l.map(function(c){return c.id})),0)})};
Br=function(a,b){var c,d,e,f,g;return _.H(function(h){a.g.info("Remove items",b);c=[];d=[];e=_.u(a.l);for(f=e.next();!f.done;f=e.next())g=f.value,b.includes(g.id)?d.push(g):c.push(g);a.l=c;return _.x(h,Promise.all(d.map(function(l){l.disposers.forEach(function(m){return m()});l.disposers=[];return Dr(a,l.id)})),0)})};Fr=function(a){var b;return _.H(function(c){b=a.l.filter(function(d){return!d.primary}).map(function(d){return d.id});Er(a);return _.x(c,Br(a,b),0)})};
Gr=function(a){var b,c;_.H(function(d){b=a.getCurrentItem();c=b.next[0];if(!(b&&b.primary&&c))return d.D(0);Er(a);return _.x(d,a.play(c),0)})};Er=function(a){var b=ur(a);b&&(b.transition=void 0,b.next=[],Hr(a))};
vr=function(a,b,c){var d,e,f,g,h,l;return _.H(function(m){switch(m.a){case 1:if(a.B)return a.g.warn("Cannot "+c+" item while busy (ID: "+b+")"),m["return"]();d=Ir(a,b);if(!d)return a.g.warn("Item not found (ID: "+b+")"),m["return"]();a.g.info(c+" item (ID: "+b+")");a.B=!0;if(e=a.h)e.player.isPaused()||(a.A?e.primary?Jr(a,e,Kr):e.player.pause():e.player.pause()),e.primary?Jr(a,e,Kr):Jr(a,e,Lr);(f=a.o.has(b))&&a.o["delete"](b);_.C(m,2,3);if(c===_.ff)return(g=e&&d.primary)?_.x(m,Mr(a,d),10):f?_.x(m,
Nr(a,d),10):_.x(m,Or(a,d),10);if(f){a.g.error("Loading preloaded items is not supported");m.D(6);break}return _.x(m,Pr(a,d),6);case 10:yr(d);case 6:wr(a,d);d.primary?Jr(a,d,Lr):Jr(a,d,Kr);d.Za&&Qr(a,d,d.Za);if(d.Fa)d.player.one(_.he,d.Fa);d.Mi&&d.Mi(d.player.getDuration());e&&Rr(a,e);case 3:_.vh(m);a.B=!1;Sr(a);Tr(a,d.next);_.wh(m);break;case 2:h=_.E(m);a.g.error("Item failed to "+c+" (ID: "+b+")",h);if(d.primary)throw h;if(l=ur(a))return a.g.warn("Ad failed, resuming primary item"),_.x(m,Mr(a,l),
3);m.D(3)}})};Ur=function(a,b,c){c=void 0===c?!1:c;if(!a.f){var d=ur(a);d?(d.V=b,c&&(a.f=!0)):a.g.error("Failed to get primary item. Cannot configure resume position.")}};ur=function(a){return a.l.find(function(b){return!!b.primary})||null};Ir=function(a,b){return a.l.find(function(c){return c.id===b})||null};
wr=function(a,b){var c=b.transition;if(c&&!c.ij){if(c.Fa){var d=c.Fa,e=function(){a.g.info("Transition onEnded to (ID: "+d+")");a.play(d)};b.player.one(_.he,e);b.disposers.push(function(){b.player.off(_.he,e)})}c.tf&&Vr(a,b,function(){var f=a.h.Za;f&&(b.disposers.forEach(function(g){return g()}),b.disposers=[],a.a.trigger(new _.K(_.zc,{ad:f})),a.a.trigger(new _.K(_.lc,{ad:f})),a.a.trigger(new _.K(_.ic,{id:b.Sb})))});c.ij=!0}};
Vr=function(a,b,c){function d(){a.g.info("Stop timeupdate polling");b.player.off(_.rg,f)}function e(){var l=b.player.getPosition();l>=g.position?(c(),a.g.info("Transition onPosition to (ID: "+g.itemId+"), playback position: "+(l.toFixed(3)+" s, transition point: ")+(g.position.toFixed(3)+" s. ")),a.play(g.itemId),l=!0):l=!1;l?h=null:h=requestAnimationFrame(e)}function f(){var l=b.player.getPosition();.5>=g.position-l&&(a.g.info("Start RAF polling"),d(),e())}var g=b.transition.tf,h=null;g.V&&Ur(a,
g.V);a.g.info("Start timeupdate polling");b.player.on(_.rg,f);b.disposers.push(function(){null!=h&&(a.g.info("Stop RAF polling"),cancelAnimationFrame(h),h=null)});b.disposers.push(d)};Hr=function(a){a.h&&(a.h.disposers.forEach(function(b){return b()}),a.h.disposers=[],a.h.transition&&(a.h.transition.ij=!1),wr(a,a.h))};rr=function(a){return[a.a].concat(_.gh(a.w.a.map(function(b){return b.player})))};Sr=function(a){Promise.all(Array.from(a.o.keys()).map(function(b){return Dr(a,b)}))};
pr=function(a){if(a.sideAdContainer)a=a.sideAdContainer;else if(a=a.cj.getSurface().getContainer(),!a)throw Error("Primary player does not have a container");return a};Dr=function(a,b){var c;return _.H(function(d){if(1==d.a){c=a.o.get(b);if(!c)return d.D(0);a.g.info("Stop preloading item (ID: "+b+")");return c.player?_.x(d,Wr(a,c.player),3):d.D(3)}a.o["delete"](b);_.y(d)})};Xr=function(a){return _.H(function(b){if(1==b.a)return a.h?_.x(b,Rr(a,a.h),3):b.D(0);sr(a,a.a,!0);_.y(b)})};
Rr=function(a,b){var c;return _.H(function(d){if(1==d.a){c=b.player;if(b.primary)return a.g.info("Pause primary playback"),a.A||sr(a,c,!1),d.D(0);a.g.info("Stop previous playback (ID: "+b.id+")");b.disposers.forEach(function(e){return e()});b.disposers=[];b.player=null;b.videoEl=null;b.role=Yr;return b.Hg?(a.g.info("Release player (ID: "+b.id+") after delay "+(b.Hg+" ms.")),_.x(d,new Promise(function(e){setTimeout(function(){return _.H(function(f){if(1==f.a)return _.x(f,Wr(a,c),2);sr(a,c,!1);a.a.trigger(new _.K("ad-hls-released"));
e();_.y(f)})},b.Hg)}),0)):_.x(d,Wr(a,c),5)}sr(a,c,!1);return d.D(0)})};Or=function(a,b){return _.H(function(c){if(1==c.a)return _.x(c,Pr(a,b),2);if(3!=c.a)return _.x(c,b.player.play(),3);b.state=_.rf;_.y(c)})};Pr=function(a,b){var c;return _.H(function(d){if(1==d.a)return _.x(d,Zr(a,!!b.primary),2);if(3!=d.a)return c=d.f,a.h=b,b.role=$r,a.h.player=c,a.h.videoEl=c.getSurface().getMedia(),sr(a,c,!0),b.state="loading",b.zd=as(c,b.config),_.x(d,b.zd,3);b.state="loaded";_.y(d)})};
Nr=function(a,b){var c;return _.H(function(d){switch(d.a){case 1:c=b.player;if(!c)return d["return"]();if(b.state!==zf){d.D(2);break}a.g.info(Xb);_.C(d,3);return _.x(d,b.preloadPromise,5);case 5:_.uh(d,2);break;case 3:_.E(d);case 2:a.h=b;b.role=$r;sr(a,c,!0);if(b.state===yf)return _.x(d,c.play(),7);if(b.state!==xf){d.D(7);break}return _.x(d,as(c,b.config),7);case 7:b.state=_.rf,_.y(d)}})};
Qr=function(a,b,c){function d(){a.a.trigger(new _.K(_.zc,{ad:c}));a.a.trigger(new _.K(_.lc,{ad:c}));c.f===c.a&&a.a.trigger(new _.K(_.ic,{id:b.Sb}))}function e(){a.a.trigger(new _.K(_.jc,{ad:c}))}function f(){a.a.trigger(new _.K(_.vc,{ad:c}))}function g(){l.isEnded()||a.a.trigger(new _.K(_.tc,{ad:c}))}function h(){var m=l.getPosition(),n=c.getDuration();c.j=m;a.a.trigger(new _.K(_.uc,{ad:c}));!c.l&&m>=n/4&&(c.l=!0,a.a.trigger(new _.K(_.mc,{ad:c})));!c.o&&m>=n/2&&(c.o=!0,a.a.trigger(new _.K(_.sc,{ad:c})));
!c.w&&m>=3*n/4&&(c.w=!0,a.a.trigger(new _.K(_.Ac,{ad:c})))}var l=b.player;l.on(_.rg,h);l.on(_.bf,g);l.on(_.rf,f);l.on(_.ad,e);l.one(_.he,d);b.disposers.push(function(){l.off(_.rg,h);l.off(_.bf,g);l.off(_.rf,f);l.off(_.ad,e);l.off(_.he,d)});1===c.f&&a.a.trigger(new _.K(_.hc,{id:b.Sb}));c.videoEl=l.getSurface().getMedia();a.a.trigger(new _.K(_.qc,{ad:c}));a.a.trigger(new _.K(_.xc,{ad:c}))};
Mr=function(a,b){return _.H(function(c){switch(c.a){case 1:if(!b.player)return c["return"]();a.J();if(b.state!==zf){c.D(2);break}a.g.info("Wait for seek to finish");_.C(c,3);return _.x(c,b.preloadPromise,5);case 5:_.uh(c,2);break;case 3:_.E(c);case 2:a.f=!1;if(!b.V){c.D(6);break}return _.x(c,b.player.seek(b.V,!0),6);case 6:a.h=b;b.role=$r;sr(a,b.player,!0);b.state="loading";if(a.A&&(Jr(a,b,Lr),!b.player.isPaused())){c.D(9);break}return _.x(c,b.player.play(),9);case 9:b.state=_.rf,_.y(c)}})};
Wr=function(a,b){return _.H(function(c){return b===a.a?c.D(0):_.x(c,a.w.release(b),0)})};Zr=function(a,b){var c;return _.H(function(d){if(1==d.a)return b?d["return"](a.a):_.x(d,a.w.get(),2);c=d.f;if(!c)throw Error("No player available");return d["return"](c)})};Tr=function(a,b){var c;_.H(function(d){if(0===b.length)return d["return"]();a.g.info("Preload items (IDs: "+b+")");c=a.l.filter(function(e){return b.includes(e.id)})||[];return _.x(d,Promise.all(c.map(function(e){return bs(a,e)})),0)})};
bs=function(a,b){var c,d,e,f,g;return _.H(function(h){switch(h.a){case 1:if(!b.primary){h.D(2);break}b.state=zf;a.o.set(b.id,b);if(!b.V||a.A){h.D(3);break}c=b.player;a.g.info("Preparing to resume at",b.V);Jr(a,b,Kr);return _.x(h,c.seek(b.V,!0),3);case 3:return b.state=yf,h["return"]();case 2:return d=b.id,_.x(h,Zr(a,!1),5);case 5:e=h.f;b.player=e;b.videoEl=e.getSurface().getMedia();b.role=Yr;b.state=zf;_.C(h,6);a.o.set(d,b);b.config.autoplay&&(a.g.warn("Autoplay should not be used for preloaded streams. Force disabling autoplay (ID: "+
(d+")")),b.config.autoplay=!1);if(f=a.a.getBandwidthEstimate())b.config.abr||(b.config.abr={}),b.config.abr.defaultBandwidthEstimate=f;b.preloadPromise=as(e,b.config);return _.x(h,b.preloadPromise,8);case 8:b.state=yf;_.uh(h,0);break;case 6:g=_.E(h),7001===g.code?(a.g.info("Preload aborted (ID: "+d+")"),b.state=wf):(a.g.warn("Preload failed (ID: "+d+")",g),b.state=xf),_.y(h)}})};
sr=function(a,b,c){var d=b.getSurface().getMedia();b=b.getSurface().getUniqueCssClass();d&&(c?(a.g.debug(Jb+b),d.classList.add(qd),d.classList.remove("clpp-hide")):(a.g.debug(Xa+b),d.classList.remove(qd),d.classList.add("clpp-hide")),a.I&&a.I(d,c))};
qr=function(a,b,c){return Array.from({length:2}).map(function(d,e){var f=document.createElement(_.Jg);b.appendChild(f);var g=a.j.lb.create();f=new or(f);g.init(f,c);g.setSourceIndex(0);var h=f.getContainer();if(!h)throw Error("Failed to create player surface container element");h.classList.add("secondary");f.getMedia().classList.add("v-"+e);a.C.push(h);return g})};
Jr=function(a,b,c){var d=b?b.Sb||null:null;a.a.getConfiguration().muted||a.G?(a.a.setMuted(!0),cs(a,!0)):(b.audio&&(c=b.audio),a.j.onAudioDecision&&(c=a.j.onAudioDecision(d)),c===Lr?(a.a.setMuted(!1),cs(a,!0)):c===Kr?(a.a.setMuted(!0),cs(a,!1)):a.g.warn("Audio decision not supported",c))};cs=function(a,b){a.l.filter(function(c){return!c.primary&&c.player}).forEach(function(c){return c.player.setMuted(b)})};ds=function(a){a.C.forEach(function(b){return a.H.removeChild(b)});a.C=[];sr(a,a.a,!0)};
as=function(a,b){return _.H(function(c){return 1==c.a?_.x(c,a.release(),2):_.x(c,a.load(b),0)})};yr=function(a){if(a.Za){var b=a.player.getDuration();a.maxDuration&&(b=Math.min(b,a.maxDuration));a.Za.h=b}a.vf&&a.vf()};
os=function(a){_.mm.call(this);var b=this;this.j=_.L.ta({Xn:.5},a);this.A=this.f=!1;this.g=new _.J("clpp.interstitial.Player");this.l=a.player;this.l.setSeekInterceptor(function(c,d){if(d)return!0;if(b.f)return!1;var e=es(b);if(e)return b.g.info("Seek ignored while binding interstitial",e.Z),!1;fs(b,c);e=gs(b);var f=hs(b,c),g=is(b,c);if(e){if(f&&f!==e)return js(b,f,c),!1;if(g&&g!==e)return ks(b,g,c),!1;if(c<e.startTime-b.j.resolutionOffsetSec)return ls(b,e),!0;if(c<e.startTime)return Hr(b.a),b.g.info("Seek inside resolution area of",
e.Z),!0;if(c<=e.endTime)return b.g.info("Seek into the scheduled interstitial",e.Z),Gr(b.a),!1;if(e.th)return b.g.info("Jump over a scheduled interstitial",e.Z),Fr(b.a),e.state=ms,!0;b.g.info("Jump over a scheduled interstitial triggering it",e.Z);Gr(b.a);Ur(b.a,c,!0);return!1}return f?(js(b,f,c),!1):g&&!g.Al?(ks(b,g,c),!1):!0});this.a=new tr({vl:this.j.config,cj:a.player,preloadMedia:!0,lb:a.lb,sideAdContainer:this.j.sideAdContainer,onAudioDecision:this.j.onAudioDecision,xn:function(){b.g.info("Resume primary content")}});
this.o=[];this.h=[];this.w=!1;ns(this,a.player)};ps=function(a){return(a=a.a.getCurrentItem())&&!a.primary?a.player:null};
rs=function(a){var b,c,d;_.H(function(e){var f=a.a;Ar(f,[{id:Bf,primary:!0,config:f.a.getConfiguration(),next:[],wb:0,duration:0,Sb:null}]);var g=ur(f);if(!g)throw Error("Failed to find primary item");f.h=g;g.role=$r;g.player=f.a;g.videoEl=g.player.getSurface().getMedia();sr(f,g.player,!0);b=a.l;c=b.getConfiguration();d=!c.autoplay;a.w=qs(a,d,b.isLive(),!1);if(a.w){f=a.a;g=f.w;if(g=g.a[0]?g.a[0].player:null)f.A||sr(f,f.a,!1),sr(f,g,!0);return e.D(0)}return c.autoplay?_.x(e,zr(a.a),0):e.D(0)})};
fs=function(a,b){var c=a.l.getPosition();b>=c||a.h.filter(function(d){return 1===d.Cd&&!d.once&&d.Ei&&d.startTime>b}).forEach(function(d){d.Zg=!0})};gs=function(a){return a.h.find(function(b){return b.state===ss})||null};es=function(a){return a.h.find(function(b){return b.state===ts})||null};ls=function(a,b){return _.H(function(c){if(1==c.a)return a.g.info("Unschedule interstitial",b.Z),_.x(c,Fr(a.a),2);b.state=ms;_.y(c)})};
js=function(a,b,c){var d;_.H(function(e){switch(e.a){case 1:a.f=!0;_.C(e,2,3);d=gs(a);if(!d){e.D(5);break}return _.x(e,ls(a,d),5);case 5:return a.g.info("Seek into interstitial",b.Z),_.x(e,us(a,b),3);case 3:_.vh(e);a.f=!1;_.wh(e);break;case 2:return _.E(e),_.x(e,a.l.seek(c),3)}})};
ks=function(a,b,c){var d,e;_.H(function(f){switch(f.a){case 1:a.f=!0;_.C(f,2,3);d=gs(a);if(!d){f.D(5);break}return _.x(f,ls(a,d),5);case 5:return a.g.info("Play jumped interstitial",b.Z,"resume at",c.toFixed(2)),_.x(f,us(a,b,c),3);case 3:_.vh(f);a.f=!1;_.wh(f);break;case 2:return e=_.E(f),a.g.warn("Failed to play jumped interstitial",b.Z,e),b.Al=new Date,_.x(f,a.l.seek(c),3)}})};
qs=function(a,b,c,d){var e=vs(a);a.g.info("Interstitial cues changed",e);var f=e;if(d){f=Li(a.h.map(function(n){return n.Z}),e.map(function(n){return n.id}));ws(a,f.eo);var g=new Set(f.Ij);f=e.filter(function(n){return g.has(n.id)})}if(!xs(a,f))return!1;var h=[],l=[],m=[];f.forEach(function(n){var p=n.customAttributes.CUE||[];p.includes(_.sb)?l.push(n):!d&&p.includes("PRE")?h.push(n):!c&&n.startTime<a.j.Xn?h.push(n):m.push(n)});1<h.length?a.g.warn("Multiple preroll interstitials not supported. Will display only the 1st one."):
h[0]&&ys(a,h[0],b);m.forEach(function(n){return zs(a,n,1)});1<l.length?a.g.warn("Multiple postroll interstitials not supported. Will display only the 1st one."):l[0]&&zs(a,l[0],2);As(a,e);return 0<h.length};
As=function(a,b){var c,d,e,f;_.H(function(g){c=a.a.getCurrentItem();if(!c)return g["return"]();if(c.primary)return a.h.forEach(function(h){var l=b.find(function(n){return n.id===h.Z});if(l){var m=l.customAttributes[dc];null==h.sc&&null!=m&&(a.g.info(Tb,l.id,"Playout limit",m),h.sc=m,1===h.Cd&&h.state===ss&&Bs(a,h))}}),g["return"]();d=b.find(function(h){return h.id===c.Sb});if(!d)return g["return"]();e=d.customAttributes[dc];if(null==e)return g["return"]();f=a.h.find(function(h){return h.Z===d.id});
if(!f||null!=f.sc)return g["return"]();a.g.info(Tb,d.id,"Playout limit",e);f.sc=e;return _.x(g,xr(a.a,e),0)})};ws=function(a,b){var c=new Set(b);a.h.forEach(function(d){c.has(d.Z)&&!Cs(d)&&a.g.warn("Removing an interstitial in active state",d)});a.h=a.h.filter(function(d){return!c.has(d.Z)})};vs=function(a){return a.l.getTimelineCues().filter(function(b){return Bj(b.schemeIdUri)&&b.customAttributes})};
us=function(a,b,c){var d;return _.H(function(e){if(1==e.a)return _.x(e,Ds(a,b),2);d=e.f;if(!d)throw Error("Failed to bind");return _.x(e,Es(a,b,1,!1,c),0)})};Bs=function(a,b){_.H(function(c){return 1==c.a?_.x(c,ls(a,b),2):_.x(c,Fs(a,b,a.l),0)})};
zs=function(a,b,c){var d=b.customAttributes[cc],e=b.customAttributes[bc],f=b.customAttributes[fc],g=b.customAttributes[dc],h=b.customAttributes[ec]||[];b.customAttributes[gc]||(b.customAttributes[gc]=null==f||0<f?"RANGE":"POINT");var l=b.customAttributes["X-YOSPACE-AUDIO-PRIORITY"];l="CONTENT"===l?Lr:"AD"===l?Kr:void 0;var m=b.id,n=b.startTime,p=b.endTime,q=ms,t=null==f?null:Math.max(0,b.startTime+f),v="POINT"===b.customAttributes[gc],z=!h.includes("SKIP");h=!h.includes("JUMP");var A=b.customAttributes[ac];
if(A)try{var D=JSON.parse(atob(A))}catch(G){D=null}else D=null;b={Z:m,startTime:n,endTime:p,state:q,jh:e,kh:d,Aa:null,V:t,jo:f,sc:g,Cd:c,um:v,Rj:z,th:h,mj:D,Ei:null!=f&&0>f,once:(b.customAttributes.CUE||[]).includes("ONCE"),jj:!1,Zg:!0,customAttributes:b.customAttributes,audio:l};a.h.push(b);return b};
ys=function(a,b,c){var d,e,f,g,h;_.H(function(l){switch(l.a){case 1:return d=zs(a,b,0),_.x(l,Ds(a,d),2);case 2:e=l.f;f=d.Aa?d.Aa.length:0;if(e&&0<f){_.C(l,8);a.g.info("Player preroll interstitial "+d.Z);var m=Es(a,d,0,c);return _.x(l,m,10)}e?a.g.warn("Preroll interstitial has no assets, skipping"):a.g.error("Preroll interstitial failed, skipping");return _.x(l,Xr(a.a),5);case 5:if(c){l.D(0);break}return _.x(l,zr(a.a),0);case 10:_.uh(l,0);break;case 8:g=_.E(l);a.g.error("Preroll interstitial failed.",
g);if(h=ur(a.a))return _.x(l,a.a.play(h.id),0);l.D(0)}})};Gs=function(a){a.o.forEach(function(b){return b()});a.o=[]};
ns=function(a,b){function c(){a.A=!1}function d(){a.A=!0}function e(){qs(a,!1,!0,!0)}function f(){var g,h,l,m,n;return _.H(function(p){switch(p.a){case 1:if(a.f||a.A)return p["return"]();g=b.getPosition();h=Hs(a,g);if(!h){p.D(2);break}return _.x(p,Ds(a,h),3);case 3:(l=p.f)&&Fs(a,h,b);case 2:m=Is(a);if(!(m&&m.state===ms&&b.getDuration()-g<a.j.resolutionOffsetSec)){p.D(0);break}return _.x(p,Ds(a,m),5);case 5:if(n=p.f)if(m.Aa&&0!==m.Aa.length){var q=a.a.getCurrentItem();if(q){var t=Js(a,m,2);if(0!==
t.length){var v=t[0].id;q.next=[v];q.transition={Fa:v};a.g.info("Schedule postroll interstitial "+m.Z);Ks(a,m,t)}}}else a.g.warn("Postroll interstitial has no assets, ignoring.");_.y(p)}})}b.on(_.rg,f);a.o.push(function(){b.off(_.rg,f)});b.on(_.qg,e);a.o.push(function(){b.off(_.qg,e)});b.on(_.hc,d);a.o.push(function(){b.off(_.hc,d)});b.on(_.ic,c);a.o.push(function(){b.off(_.ic,c)})};Is=function(a){return a.h.find(function(b){return 2===b.Cd})||null};
xs=function(a,b){for(var c=b.sort(function(n,p){return n.startTime-p.startTime}),d=a.j.resolutionOffsetSec,e=Infinity,f=[],g=0;g<c.length-1;g++){var h=c[g],l=c[g+1];l&&(e=Math.min(e,l.startTime-h.endTime));l&&l.startTime<=h.endTime&&f.push("Interstitials "+h.id+" and "+l.id+" overlap.")}e<d&&(c=e/2,a.j.resolutionOffsetSec=c,a.g.info("Interstitials are closer than configured resolutionOffsetSec ("+(d+" s) auto-reconfiguring to ")+(c+" s.")));var m=[];b.forEach(function(n){var p=n.customAttributes[cc];
n.customAttributes[bc]||p||m.push("Interstitial cue "+n.id+" is invalid it contains neither X-ASSET-LIST nor X-ASSET-URI.")});0<m.length?a.g.error("Invalid interstitials, all interstitials will be skipped. "+m.join(" ")):0<f.length&&a.g.warn("Unsupported format of interstitials, playback may not behave correctly. "+f.join(" "));return 0===m.length};Hs=function(a,b){return a.h.find(function(c){var d=c.startTime-b;return 1===c.Cd&&Cs(c)&&0<d&&d<=a.j.resolutionOffsetSec})||null};
hs=function(a,b){return a.h.find(function(c){return Cs(c)&&!c.um&&1===c.Cd&&b>c.startTime&&b<c.endTime})||null};is=function(a,b){var c=a.l.getPosition();return a.h.filter(function(d){return 1===d.Cd&&!d.th}).sort(function(d,e){return e.startTime-d.startTime}).find(function(d){return d.startTime>c&&d.startTime<b})||null};
Ds=function(a,b){var c,d,e,f;return _.H(function(g){switch(g.a){case 1:b.state=ts;if(!b.jh){b.kh?(b.Aa=[{URI:b.kh,DURATION:b.endTime-b.startTime}],a.Ya(new _.K(pc,{id:b.Z,detail:Ls(b)})),b.state=Ms):b.state=Ns;g.D(2);break}_.C(g,3);a.g.info("Load X-ASSET-LIST for "+b.Z);a.Ya(new _.K(nc));return _.x(g,Os(a,b.jh),5);case 5:c=g.f;b.Aa=c.ASSETS;b.Aa&&0!==b.Aa.length||a.g.info("Interstitial "+b.Z+" has no assets, will be smoothly skipped");null==b.V&&(d=Gj(b.Aa.map(function(h){return h.DURATION})),e=null==
b.sc?d:Math.min(b.sc,d),b.V=b.startTime+e);b.state=Ms;a.Ya(new _.K(oc));a.Ya(new _.K(pc,{id:b.Z,detail:c}));_.uh(g,2);break;case 3:f=_.E(g),a.g.error("Failed to load X-ASSET-LIST",f),b.state=Ns;case 2:return g["return"](b.state===Ms)}})};Ps=function(a,b){var c=a.j.Vn;if(c){var d=new URL(b);d.searchParams.set("_HLS_primary_id",c);return d.toString()}return b};
Es=function(a,b,c,d,e){var f,g,h;return _.H(function(l){if(0===b.Aa.length)return l["return"]();f=a.a.getCurrentItem();if(!f)return l["return"]();g=Js(a,b,c);if(0===g.length)return l["return"]();Ks(a,b,g);(h=0===c&&a.l.isLive())||(null!=e?Ur(a.a,e,!0):null!=b.V&&Ur(a.a,b.V));return d?_.x(l,a.a.load(g[0].id),0):_.x(l,a.a.play(g[0].id),0)})};
Fs=function(a,b,c){if(b.Aa)if(0===b.Aa.length){var d=function(){c.isLive()?a.g.info("Skipping empty live interstitial "+b.Z):null!=b.V&&0!==b.jo?c.seek(b.V):a.g.info("Empty VOD interstitial "+b.Z+", continuing to next segment")};c.one(_.og,d);a.o.push(function(){c.off(_.og,d)});a.g.info(Gb+b.Z+" to be skipped")}else{var e=a.a.getCurrentItem();if(e){var f=Js(a,b,1);if(0!==f.length){var g=f[0].id;null!=b.V&&Ur(a.a,b.V);e.next=[g];e.transition={tf:{position:b.startTime,itemId:g,V:b.V}};a.g.info(Gb+b.Z+
" for "+(b.startTime+" s"));Ks(a,b,f)}}}};Ks=function(a,b,c){Ar(a.a,c);c=a.a;Hr(c);c.h&&(c.h.Za&&Qr(c,c.h,c.h.Za),Sr(c),Tr(c,c.h.next));b.state=ss;a.Ya(new _.K(_.rc,{detail:null}))};
Js=function(a,b,c){var d=0,e=b.Aa.map(function(h,l){var m=b.Z+"-"+l;d+=h.DURATION;return{id:m,config:{source:{url:Ps(a,h.URI),type:_.Zl}},duration:h.DURATION,wb:d,Sb:b.Z,next:[],Za:new W(c,l+1,b.Aa.length,h.DURATION,b.Z,b.Rj,b.customAttributes||null),audio:b.audio}});e.forEach(function(h,l){var m=l===e.length-1;m&&2===c||(m?(h.next=[Bf],h.transition={Fa:Bf}):(m=m?Bf:h.Sb+"-"+(l+1),h.next=[m],h.transition={Fa:m}))});e.forEach(function(h){h.vf=function(){var l=h.Za;a.g.info("Playing ad "+(l.f+"/"+l.a)+
" of interstitial "+h.Sb)}});if(null!=b.sc&&(e=Qs(a,b,e),0===e.length))return[];var f=e[0].vf;e[0].vf=function(){b.jj=!0;b.Ei&&(b.Zg=!1);a.g.info("Playing interstitial "+b.Z+" with "+(b.Aa.length+" assets and will resume primary content ")+((b.V?"at "+b.V.toFixed(1)+" s":"after interstitial ended")+"."));f()};e[0].Mi=function(h){null==b.V&&(b.V=b.startTime+h,Ur(a.a,b.V),a.g.info("Primary content will resume at",b.V.toFixed(1),"s"));b.state=Rs};var g=e[e.length-1];g.Fa=function(){b.state=Ss;Br(a.a,
e.map(function(h){return h.id}));2===c&&Xr(a.a)};g.Hg=a.j.adReleaseDelayMs;return e};
Qs=function(a,b,c){var d=b.sc;a.g.info("Playout limit for "+b.Z+" is "+(d+" s"));b=c[c.length-1].wb;if(d>=b)return a.g.info("Playout limit ("+d+") islarger or equal to total duration: ("+(b+").")),c;if(0>=d)return a.g.info("Discarding all ads."),[];var e=c.filter(function(f){return f.wb-f.duration<=d});e.forEach(function(f){f.Za.a=e.length});a=e[e.length-1];c=d-(a.wb-a.duration);.1>Math.abs(c-a.duration)?a.transition.Fa=Bf:a.transition.tf={position:c,itemId:Bf,V:null};a.maxDuration=c;return e};
Os=function(a,b){var c,d,e,f,g,h;return _.H(function(l){if(1==l.a){c=a.a.$e();if(!c)throw Error("No player found");d=c.getNetworkEngine();e=_.ck(Ps(a,b));return _.x(l,xk(d,e),2)}f=l.f;if(null===f)return a.g.warn("X-ASSET-LIST "+b+" returned no content"),l["return"]({ASSETS:[]});g=Ts(f);if(!g)throw new _.Zi("Invalid X-ASSET-LIST list response");h=f;return l["return"](h)})};
Ts=function(a){return a&&a.ASSETS&&Array.isArray(a.ASSETS)?a.ASSETS.every(function(b){return typeof b.URI===_.eg&&typeof b.DURATION===_.k}):!1};Cs=function(a){return a.Zg&&!(a.once&&a.jj)&&[ms,Ss].includes(a.state)};Ls=function(a){var b={URI:a.Aa[0].URI,DURATION:a.Aa[0].DURATION};a.mj&&(b[ac]=a.mj);return{ASSETS:[b]}};Us=function(){this.a=null};
Vs=function(){try{var a=URL.createObjectURL(new Blob);URL.revokeObjectURL(a);return a.slice(a.lastIndexOf("/")+1)}catch(c){var b=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(d){var e=(b+16*Math.random())%16|0;b=Math.floor(b/16);return("x"===d?e:e&3|8).toString(16)})}};Xs=function(a){this.m=a;this.j=this.m.getNetworkEngine();this.a=new _.gi;this.h=null;this.f=!0;Ws(this)};
Ws=function(a){a.a.on(window,"offline",function(){Ys(a,!1)});a.a.on(window,"online",function(){a.f||Zs(a)});a.a.on(a.m,$f,function(){return $s(a)});a.a.on(a.m,"suspend",function(){return $s(a)});a.a.on(a.m,_.Rg,function(){return $s(a)});a.a.on(a.m,_.rf,function(){a.f||Zs(a)});a.a.on(a.m,_.Df,function(){a.f||Zs(a)});a.a.on(a.m,_.bg,function(){switch(a.m.getState()){case _.yq:$s(a);break;default:$s(a)}})};Zs=function(a){a.m.getConfiguration().connectivityCheck&&(at(a),a.h=(new _.Xh(function(){return bt(a)})).ga(5))};
$s=function(a){a.f&&Zs(a)};at=function(a){a.h&&(a.h.stop(),a.h=null)};bt=function(a){var b,c;return _.H(function(d){if(1==d.a)return(b=a.m.getConfiguration().connectivityCheck)&&a.m?_.x(d,yk(a.j,b.url,b.attemptParameters,b.method),2):d["return"]();c=d.f;Ys(a,c);_.y(d)})};Ys=function(a,b){at(a);a.f!==b&&(a.f=b,a.m&&a.m.getConfiguration().connectivityCheck&&a.m.trigger(new _.K(Ye,{online:a.f})))};dt=function(){for(var a=0;a<ct.length;++a)ct[a].hd()};
_.et=function(a){var b=b||0;a={priority:b,hd:a};for(var c=0;c<ct.length;c++)if(ct[c].priority<b){ct.splice(c,0,a);return}ct.push(a)};ft=function(a,b){a.onError(b);a.release().then(function(){return a.destroy()})};gt=function(a,b,c){var d=_.Q.ea;this.h=a;this.f=b;JSON.parse(d(_.Nm(a)));this.a=JSON.parse(d(_.Nm(b)));this.j=c};
it=function(a){var b=ht,c=_.Q.hb,d={kty:"RSA",n:b.n,e:b.e},e=a.h+"."+a.f,f=a.j;return new Promise(function(g,h){try{var l=window&&window.crypto&&window.crypto.subtle}catch(n){}if(l){var m={name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};l.importKey("jwk",d,m,!1,["verify"]).then(function(n){var p=c(e),q=_.Nm(f);return l.verify(m,n,q.buffer,p.buffer)}).then(function(n){n?g():h(new _.Zi("Signature Verification failed",vg))})["catch"](h)}else g()})};jt=function(a){this.f=a;this.a=null;this.g=new _.J("clpp.utils.LicenseKey")};
kt=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 gt(b[0],b[1],b[2]);a.a=b}return a.a};
lt=function(a){var b,c,d;return _.H(function(e){if(1==e.a)return b=kt(a),_.C(e,2),_.x(e,it(b),4);if(2!=e.a)return _.uh(e,0);if((c=_.E(e))&&c.code===vg)throw c;var f=window.location.href,g=new _.dj(f);d=g.Fb||g.ab?g:new _.dj("//"+f);if(/(^127\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^192\.168\.)|(^localhost)/.test(d.ab))return e["return"]();throw c;})};
mt=function(a){switch((a.ba[0]||{src:"",type:""}).type){case _.Ic:a="dash";break;case _.Nc:a="ss";break;case _.Zl:a="hls";break;case _.Lg:a="mp4";break;default:a=""}return a};nt=function(a){return a.viewerId?a.viewerId:(a=a.drm||null)&&a.customData&&a.customData.userId?""+a.customData.userId:""};ot=function(a){return(a=a.drm||null)&&a.customData&&a.customData.assetId?""+a.customData.assetId:""};pt=function(a){return(a=a.drm||null)&&a.customData&&a.customData.sessionId?""+a.customData.sessionId:""};
rt=function(a){var b=a.configuration,c="no";b.drm&&!_.L.pa(b.drm,{})&&(c="custom",b.drm.env&&b.drm.env.toLowerCase().startsWith(ce)||qt(a).endsWith("drmtoday.com"))&&(c=ce);return c};st=function(a){a=a.drmInfo;var b="";if(a)switch(a.keySystem){case _.Gd:b="wv";break;case _.Ed:b="pr";break;case _.Cd:b="fps"}return b};tt=function(a){a=a.drmInfo;var b=!1;a&&(b=a.persistentStateRequired);return b.toString()};
ut=function(a){a=a.drmInfo;var b="";if(a)switch(a.videoRobustness){case Va:case Ta:b="L1";break;case Ua:b="L2";break;case _.Fb:case _.Eb:b="L3"}return b};qt=function(a){a=a.drmInfo;return(new _.dj(a&&a.licenseServerUri||"")).ab};
xt=function(a,b){var c="ie"===_.sk().browser,d=b.configuration,e=_.gh(Array.from(_.ym.keys())).concat(_.gh(b.bj));d={"CL-KEY":a.f,"CL-LOCATION":window.location.href,"CL-SDK-VERSION":_.ia,"CL-USER-ID":nt(d),"CL-ASSET-ID":ot(d),"CL-SESSION-ID":pt(d),"CL-PLAYBACK-TYPE":b.isLive?vt:wt,"CL-CONTENT-TYPE":mt(b),"CL-PLUGINS":e.join(" "),"CL-DRM":rt(b),"CL-DRM-CDM":st(b),"CL-DRM-SEC-LEVEL":ut(b),"CL-DRM-OFFLINE":tt(b),"CL-DRM-IP":qt(b)};c&&(e=window.localStorage.getItem("cl_et"))&&(d["CL-ETAG"]=e);e=_.ck(["https://downloads.castlabs.com/r/register/"]);
e.method="GET";e.headers=d;return(new _.vk).fetch(e).S.then(function(f){200===f.status&&c&&window.localStorage.setItem("cl_et",f.headers.etag);return Promise.resolve()})["catch"](function(f){a:{var g=kt(a);f=f.data;var h=f.status;if(g.a&&g.a.ilv)f=Promise.resolve();else{switch(h){case 403:case 404:g=7101;var l="Castlabs Player license is invalid";if(403===h){h=l;l="";try{l=JSON.parse(decodeURIComponent(f.responseText)).message}catch(m){}f=h+(": "+l)}else f=l+"!";l=f;break;case 412:g=7103;l="License requires a viewer ID. It should be supplied either via the `viewerId` config or in case of DRMtoday via the `drm.customData.userID` config.";
break;default:f=Promise.resolve();break a}a.g.error(bb+l);f=Promise.reject(new _.N(_.O,7,g,l))}}return f})};zt=function(a){this.m=a;this.f=a.getNetworkEngine();this.h=yt(this);this.f.fd(this.h);this.a=null};
yt=function(a){return function(b){var c=b.headers,d=b=null,e=_.L.fi(c,"cmsd-dynamic");c=_.L.fi(c,"cmsd-static");e&&(b=At(e),a.a=b);if(c)try{e={};var f=c.split(",");for(c=0;c<f.length;c++){var g=Bt(f[c]),h=g.key,l=g.value;Object.keys(Ct).includes(h)&&(e[Ct[h]]=l)}d=_.L.Jc(e)?e:null}catch(m){Dt.error("CmsdManager parseCmsdStaticHeader_ failed:",m),d=null}(b||d)&&a.m.trigger(new _.K("cmsd-event",{np:b,Bp:d}))}};
At=function(a){try{var b=a.split(",").map(function(c){var d={};c=c.split(";");for(var e=0;e<c.length;e++){var f=Bt(c[e]),g=f.key;f=f.value;Object.keys(Et).includes(g)&&(d[Et[g]]=f)}return d}).filter(function(c){return _.L.Jc(c)});return 0<b.length?b:null}catch(c){return Dt.error("CmsdManager parseCmsdDynamicHeader_ failed:",c),null}};
Bt=function(a){var b=a.split("\x3d"),c=b[0];b=b[1];if(!c)throw new _.Zi("Parsing CMSD, missing parameter or wrong format");if(c&&!b)return{key:c,value:!0};var d=b[0];if('"'===d&&'"'===b[b.length-1])return{key:c,value:b.replaceAll(/(^")|("$)/g,"")};if(/^[-0-9]/.test(d))return{key:c,value:parseInt(b,10)};if(/^[a-zA-Z*]/.test(d))return{key:c,value:b};throw new _.Zi("Parsing CMSD, not recognized value type of "+a);};
X=function(a,b,c){_.mm.call(this);var d=this;dt();this.g=new _.J("clpp.Player");if(!a)throw new _.N(_.O,7,7102);this.xa=new _.gi;this.f=this.C=b||_.tm();this.l=null;void 0===this.f.license&&(this.f.license=qm,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 _.N(_.O,7,7101,"No license provided in configuration!");this.j=new or(a,c);this.H=this.A=this.a=this.G=
null;this.J=new _.vk;this.h=null;this.ha=[];this.ja=!0;this.L={};this.Ea=null;this.Y=!0;this.ca=this.T=!1;this.N=this.sd=null;this.lg=!1;this.jb=new Xs(this);this.B=null;this.on(_.bg,function(){d.getState()===_.Eq&&(d.a?d.a.unload():Promise.resolve())});this.on(_.Ec,function(){d.lg=!0});this.on(_.Dc,function(){d.lg=!1});this.on(_.qg,function(){return Ft(d)});Gt(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."),
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=[];b=_.u(Ht);for(c=b.next();!c.done;c=b.next()){c=c.value;try{var e=c.create(this.f);e&&a.push(e)}catch(f){this.g.error("Error while creating player plugin",f)}}It(this,a);this.P=_.ra;Em(this)};
_.Jt=function(a,b,c){c=void 0===c?null:c;null!=b&&b===a.a?a.a.forwardEventsTo(a):(a.a&&(a.a.stopForwardingEventsTo(a),a.a.destroy(),a.a=null,a.A=null),b&&(b.init(a.j,a.C),b.setNetworkEngine(a.getNetworkEngine()),b.forwardEventsTo(a),a.a=b,a.A=c))};Gt=function(a,b){a.G=new jt(b);lt(a.G)["catch"](function(c){setTimeout(function(){a.g.error(bb+c);a.trigger(new _.K(_.ie,{detail:new _.N(_.O,7,7101)}));a.destroy()},1E3)})};
Kt=function(a,b){var c,d;_.H(function(e){if(1==e.a)return a.j.getMedia()||a.j.getCastElement(),a.G||(a.G=new jt(a.f.license)),_.C(e,2),a.g.debug("Verifying license remotely"),_.x(e,xt(a.G,b),4);if(2!=e.a)return a.g.debug("License verified remotely"),_.uh(e,0);c=_.E(e);a.g.debug("License rejected by remote",c);d={release:a.release.bind(a),destroy:a.destroy.bind(a),onError:a.onError.bind(a)};setTimeout(ft,1E3,d,c);_.y(e)})};
It=function(a,b){a.ha=b;for(var c=_.u(a.ha),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.id();e&&(a.L[e]=d)}a.Rc("onPlayerCreated")};
Lt=function(a){var b,c;return _.H(function(d){switch(d.a){case 1:if(a.Y)return a.g.debug("The player is already released. No-op"),d["return"](new Promise(function(e){return e()}));a.xa.off(document,Pg);a.trigger(new _.K(_.Kf));a.j&&a.j.release();if(!a.h){d.D(2);break}return _.x(d,a.h.Dc(),3);case 3:a.h=null;case 2:if(!a.B){d.D(4);break}return _.x(d,a.B.release(),5);case 5:a.B=null;case 4:if(a.a)return b=null,c=a.a.on(_.bg,function(e){b=e}),d["return"](a.Rc(_.We).then(function(){a.a.stopForwardingEventsTo(a);
return Promise.all([a.a.release(),a.J.release()])}).then(function(){a.g.debug("Releasing player completed");b&&(a.g.debug("Re-post state change event after release"),a.trigger(b))})["finally"](function(){a.a.off(_.bg,c);a.trigger(new _.K(Jf))}));a.trigger(new _.K(Jf));return d["return"](new Promise(function(e){return e()}))}})};
Nt=function(a,b,c){if(a.P===_.rb)b=Mt(b,c);else if(2!==(a.a?a.a.canPlay(b[0],c):0)||a.ca){a.ca=!1;if(b){for(var d=a=null,e=0;e<b.length;e++);e=Object.values(_.Rh);for(var f=0;f<b.length;f++)for(var g=0;g<e.length;g++){var h={lb:e[g],confidence:e[g].canPlay(b[f],c)};if(null===a||a.confidence<h.confidence)a=h,d=f}a&&typeof d===_.k&&0<a.confidence?(_.Sh.debug("Player Factory '"+a.lb.a()+"' can play",b[d]),b=new Qh(a.lb,d)):(_.Sh.debug("No compatible Player Factory found for sources:",b),b=null)}else b=
null;if(!b)throw new _.N(_.O,7,7003,"No player factory compatible with given sources found!");c=b.lb;a=c.create();b={lb:c,player:a,sourceIndex:b.sourceIndex}}else b={lb:a.A,player:a.a,sourceIndex:0};return b};Mt=function(a,b){var c=Uh(function(d){return d.f(_.rb)&&a.every(function(e){return 2===d.canPlay(e,b)})});if(!c)throw new _.N(_.O,7,7003,"No compatible player implementing playlist mode found!");return{lb:c,player:c.create(),sourceIndex:0}};
Pt=function(a){var b;return _.H(function(c){if(1==c.a){if(!a.a)return a.g.warn(ub),c["return"]();b=a.a;if(!b.yh)return a.g.warn(yb),c["return"]();a.trigger(new _.K(Ee));return _.x(c,b.yh(),2)}return _.x(c,_.Ot(a),0)})};
_.Tt=function(a,b,c){var d,e;return _.H(function(f){if(1==f.a){if(a.T)throw new _.N(_.O,7,7E3,"Player is already destroyed.");if(!a.j)throw new _.N(_.O,7,7E3,"No surface associated with this player!");_.$o(mf);return _.x(f,a.release(),2)}if(3!=f.a){d=c||_.Lq(b);if(!b||0===d.length)throw new _.N(_.O,7,7003,lb);a.Ea=d;a.f=_.vm(a.C,b,{source:d});a.Y=!1;e=Nt(a,d,a.f);_.Jt(a,e.player,e.lb);Qt(a,a.a);a.a&&a.a.setSourceIndex(e.sourceIndex);Rt(a);a.a&&a.a.setCdnErrorCallback(a.N);St(a,a.f);a.f.cmsd.enabled&&
(a.B=new zt(a),a.a.setCmsdManager(a.B));if(a.f.pauseWhenInBackground)a.xa.on(document,Pg,function(){document.hidden?(a.g.debug("Player is hidden: pausing..."),a.pause()):(a.g.debug("Player is visible: resuming..."),a.play())});Fm(a);return _.x(f,a.Rc("onContentWillLoad",a.f.source[e.sourceIndex]),3)}_.$o(lf);_.bp("player.beforeLoad",mf,lf);_.y(f)})};
_.Ut=function(a){return _.H(function(b){a.j.getMedia()||a.j.getCastElement();a.trigger(new _.K(Ee));return _.x(b,Promise.all([a.a.load(a.f),a.h?a.h.load():Promise.resolve()]),0)})};Qt=function(a,b){try{var c=crypto.randomUUID()}catch(d){c=Vs()}a.g.info("Playback session started, ID:",c);b.setPlaybackSessionId(c);a.H=c};Vt=function(a){a.H&&(a.g.info("Playback session ended, ID:",a.H),a.H=null,a.a&&a.a.setPlaybackSessionId(null))};
Xt=function(a){var b,c,d,e;_.H(function(f){if(1==f.a){b=[];if(a.f.remoteTextTracks)for(c=_.u(a.f.remoteTextTracks),d=c.next();!d.done;d=c.next())e=d.value,b.push(a.getTrackManager().addTextTrack(e));return _.x(f,Promise.all(b),2)}Wt(a);_.y(f)})};
Wt=function(a){var b=_.Gi(a.f.preferredTextLanguage).filter(function(f){return f}),c=a.f.preferForcedSubtitles,d=a.getTrackManager().la().filter(function(f){return c?f.kind===_.ke:f.kind!==_.ke});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().qa();e&&e.language?(e=_.Cj(e.language||""),b.push(e)):(e=a.getTrackManager().La())&&e.language&&(e=_.Cj(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(function(f){var g=_.Cj(f);if(f=d.find(function(h){h=_.Cj(h.language||"");return _.Dj(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})}};
_.Ot=function(a){var b;return _.H(function(c){if(1==c.a)return _.$o(hf),Kt(a,{configuration:a.getConfiguration(),ba:a.ji(),drmInfo:a.getDrmInfo(),bj:Object.keys(a.L),isLive:a.isLive()}),Xt(a),Gm(),_.x(c,a.Rc(_.Te),2);if(3!=c.a)return a.f.autoplay?(b=a.h?a.h.gd():!0)?_.x(c,a.play(),3):c.D(3):c.D(3);_.$o(gf);_.bp("player.afterLoad",hf,gf);_.y(c)})};St=function(a,b){var c=ar(a,b);c&&(a.h=c.create(a))};
Ft=function(a){if(!a.h&&a.A&&a.a&&a.f.ads.hls.enable&&a.getTimelineCues().some(function(c){return Bj(c.schemeIdUri)})){var b=a.f.mse.sendPlaybackSessionIdHeader?a.H:null;a.h=new Us;a.h.kd(a.a,a.A,b)}};Rt=function(a){a.a&&a.a.setDrmCustomDataModifier(function(b){return _.H(function(c){return a.lg&&a.sd?_.x(c,a.sd(b),0):c["return"]()})})};_.Yt=function(a){a&&(0<=Ht.indexOf(a)||Ht.push(a))};
Zt=function(a,b,c){X.call(this,a,b,c);a={manifest:{timeline:{version:2},keepTimelineLive:!0},streaming:{preferNativeHlsOnSafari:!1,enableLiveEdgeChasing:!1,startAtSegmentBoundary:!1}};this.C=_.L.ta(this.C,a);this.f=_.L.ta(this.f,a);this.I=0;this.o=[];this.da=!1;this.w=null;this.K=[]};$t=function(a){a.K.forEach(function(b){return b()});a.K=[]};
au=function(a,b){function c(f){a.I=a.o.findIndex(function(g){return g.id===f.id})}a.addEventListener(_.Qf,c);a.K.push(function(){a.removeEventListener(_.Qf,c)});if(b.endTime){var d=b.endTime,e=function(){a.getPosition()>=d&&(a.removeEventListener(_.rg,e),a.g.info("Playlist end time reached. Stopping playback."),a.trigger(new _.K(_.Pf)),a.pause())};a.addEventListener(_.rg,e);a.K.push(function(){a.removeEventListener(_.rg,e)})}};
du=function(a,b){var c,d;return _.H(function(e){switch(e.a){case 1:return _.C(e,2),_.$o(qf),a.P=_.rb,a.ja=!1,c=b.slice(1).map(function(f){return{config:f,ba:_.Lq(f)}}),_.x(e,_.Tt(a,b[0]),4);case 4:return c.forEach(function(f){bu(a,f.config,f.ba)}),a.trigger(new _.K(Ee)),_.x(e,a.a.setupPlaylist(b),5);case 5:return _.x(e,_.Ot(a),6);case 6:c.forEach(function(f){cu(a,f.config,f.ba)});_.$o(pf);_.bp("player.setupPlaylist",qf,pf);_.uh(e,0);break;case 2:d=_.E(e);if(a.l)throw a.g.info(cb),new _.N(_.O,7,7E3);
throw d;}})};eu=function(a,b){var c,d;return _.H(function(e){if(1==e.a)return _.C(e,2),_.$o(kf),c=_.Lq(b),bu(a,b,c),_.x(e,a.a.appendLoad(b),4);if(2!=e.a)return cu(a,b,c),_.$o(jf),_.bp("player.appendLoad",kf,jf),_.uh(e,0);d=_.E(e);if(a.l)throw a.g.info(cb),new _.N(_.O,7,7E3,{id:b.id});throw d;})};cu=function(a,b,c){Kt(a,{configuration:b,ba:c,drmInfo:a.getDrmInfo(),bj:Object.keys(a.L),isLive:c[0].isLive})};
bu=function(a,b,c){if(0===c.length)throw new _.N(_.O,7,7003,{message:lb,id:b.id});if(1<c.length)throw new _.N(_.O,7,7003,{message:"Multiple sources not supported!",id:b.id,source:c});if(2!==(a.a?a.a.canPlay(c[0],a.f):0))throw new _.N(_.O,7,7003,{message:"Source not supported by the current player!",id:b.id,source:c[0]});};
hu=function(a){_.mm.call(this);var b=this;this.j=_.L.ta({transition:_.bf,preloadMedia:!1},a);this.h=[];this.a=0;var c=fu(a.anchorId,this.j.config);this.w=new dr(c);this.f=null;this.l=!1;this.o=new Map;this.A=a.toggleVisible;this.g=new _.J(xd);this.w.a.forEach(function(d){return gu(b,d.player,!1)})};ju=function(a){return Promise.all(Array.from(a.o.keys()).map(function(b){return iu(a,b)}))};
iu=function(a,b){var c;return _.H(function(d){if(1==d.a){c=a.o.get(b);if(!c)return d.D(0);a.g.info("Stop preloading item (index: "+b+")");return c.player?_.x(d,ku(a,c),3):d.D(3)}a.o["delete"](b);_.y(d)})};mu=function(a,b){return _.H(function(c){if(1==c.a)return a.g.info("Stop current playback (index: "+b.index+")"),b.player.pause(),gu(a,b.player,!1),_.x(c,ku(a,b),2);b.player=null;b.videoEl=null;b.role=lu;_.y(c)})};
ku=function(a,b){return _.H(function(c){b.disposers.forEach(function(d){return d()});b.disposers=[];return b.player?_.x(c,a.w.release(b.player),0):c.D(0)})};pu=function(a,b){var c;return _.H(function(d){if(1==d.a)return _.x(d,a.w.get(),2);if(3!=d.a)return c=d.f,a.f=b,b.role=nu,a.f.player=c,a.f.videoEl=c.getSurface().getMedia(),gu(a,c,!0),_.x(d,c.load(b.config),3);ou(a,b);return b.config.autoplay?d.D(0):_.x(d,c.play(),0)})};
qu=function(a,b){return _.H(function(c){switch(c.a){case 1:if(!b.player)return c["return"]();if(b.state!==zf){c.D(2);break}a.g.info(Xb);_.C(c,3);return _.x(c,b.preloadPromise,5);case 5:_.uh(c,2);break;case 3:_.E(c);case 2:a.f=b;b.role=nu;gu(a,b.player,!0);if(b.state===yf)return _.$o(vf),a.j.preloadMedia?_.x(c,b.player.play(),11):_.x(c,Pt(b.player),11);if(b.state!==xf){c.D(7);break}return _.x(c,b.player.load(b.config),7);case 11:_.$o(uf),_.bp("playlist.next",vf,uf);case 7:if(ou(a,b),b.config.autoplay)c.D(0);
else return _.x(c,b.player.play(),0)}})};ou=function(a,b){if(a.j.autoplayNext){var c=function(){a.g.info("Automatically transition to next item");a.$i()};b.player.on(_.he,c);var d=b.player;b.disposers.push(function(){d.off(_.he,c)})}};su=function(a){var b;return _.H(function(c){b=a.a+1;a.g.info("Preload following item (index: "+b+")");return _.x(c,ru(a,b),0)})};tu=function(a){var b;return _.H(function(c){b=a.a-1;a.g.info("Preload preceding item (index: "+b+")");return _.x(c,ru(a,b),0)})};
uu=function(a){var b;_.H(function(c){if(0===a.a)return _.x(c,su(a),0);if(a.a===a.h.length-1)return _.x(c,tu(a),0);b=[a.a-1,a.a+1];a.g.info("Preload items (indices: "+b+")");return _.x(c,Promise.all(b.map(function(d){return ru(a,d)})),0)})};
ru=function(a,b){var c,d,e;return _.H(function(f){switch(f.a){case 1:return _.x(f,a.w.get(),2);case 2:return c=f.f,d=a.h[b],d.player=c,d.videoEl=c.getSurface().getMedia(),d.role=lu,d.state=zf,a.trigger(new _.K(yg)),_.C(f,3),a.o.set(b,d),a.j.preloadMedia?(d.config.autoplay&&(a.g.warn("Autoplay should not be used for preloaded streams. Force disabling autoplay (index: "+(b+")")),d.config.autoplay=!1),d.preloadPromise=c.load(d.config)):d.preloadPromise=c.preload(d.config),_.x(f,d.preloadPromise,5);case 5:d.state=
yf;a.trigger(new _.K(yg));_.uh(f,0);break;case 3:e=_.E(f),7001===e.code?(a.g.info("Preload aborted (index: "+b+")"),d.state=wf):(a.g.warn("Preload failed (index: "+b+")",e),a.trigger(new _.K(_.ie,{detail:e})),d.state=xf),a.trigger(new _.K(yg)),_.y(f)}})};gu=function(a,b,c){var d=b.getSurface().getMedia();b=b.getSurface().getUniqueCssClass();d&&(c?(a.g.info(Jb+b),d.classList.add(qd)):(a.g.info(Xa+b),d.classList.remove(qd)),a.A&&a.A(d,c))};
vu=function(a){var b;return _.H(function(c){if(1==c.a)return _.x(c,a.w.destroy(),2);b=document.getElementById(a.j.anchorId);if(!b)return c["return"]();b.classList.remove(pd);b.innerHTML="";_.y(c)})};
fu=function(a,b){var c=document.getElementById(a);if(!c)throw Error("Anchor element not found");c.classList.add(pd);return Array.from({length:3}).map(function(){var d=document.createElement(_.Jg);d.classList.add("clpp-mc-playlist-video-el");var e=document.createElement(_.Qd);e.classList.add("clpp-mc-playlist-item");e.appendChild(d);c.appendChild(e);return new X(d,b)})};
_.xu=function(a){if(wu.has(a))return wu.get(a);if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported(a);wu.set(a,b);return b}return window.MediaSource?(b=MediaSource.isTypeSupported(a),wu.set(a,b),b):!1};yu=function(a){this.h=a;this.f={keepOriginalTimestamps:!0,remux:!1};this.a=new muxjs.mp4.Transmuxer(this.f)};
zu=function(a,b){var c=b.replace(/mp2t/i,"mp4");a===_.Pc&&(c=c.replace(_.Jg,_.Pc));var d=/avc1\.(66|77|100)\.(\d+)/.exec(c);if(d){var e="avc1.",f=d[1],g=Number(d[2]);e=("66"===f?e+"4200":"77"===f?e+"4d00":e+"6400")+(g>>4).toString(16);e+=(g&15).toString(16);c=c.replace(d[0],e)}return c};Au=function(){};_.Bu=function(){};
Cu=function(a,b,c,d,e){_.an.call(this,Wa);this.l=a;this.j=b;this.h=c;this.a=d;this.o=e;this.g=new _.J(td);_.Q.empty(this.l)?this.g.warn(_.Zb):this.fb(_.Gd,{licenseUrl:this.l,videoRobustness:[_.Fb,void 0],audioRobustness:[_.Eb,void 0],persistentStateRequired:!1,distinctiveIdentifierRequired:!1,serverCertificate:null,modifiers:{licenseRequest:this.ve.bind(this)}});_.Q.empty(this.j)?this.g.warn(_.tb):this.fb(_.Ed,{licenseUrl:this.j,videoRobustness:["3000"],audioRobustness:["2000"],modifiers:{licenseRequest:this.ve.bind(this)}});
_.Q.empty(this.h)?this.g.warn(_.Ra):_.Q.empty(this.a)?this.g.warn(_.Qa):this.fb(_.Cd,{licenseUrl:this.h,certificateUrl:this.a,modifiers:{licenseRequest:this.Ji.bind(this),licenseResponse:this.Ki.bind(this),certificateRequest:this.ve.bind(this),extractContentId:this.Sh.bind(this)}})};Du=function(){};Eu=function(a){var b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase();if(typeof Event===_.oe)var c=new Event(b,a);else c=document.createEvent("Event"),c.initEvent(b,a.bubbles,a.cancelable);a.target.dispatchEvent(c)};
Fu=function(a){a=a.target;if(a.webkitPresentationMode===ef){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)};Gu=function(){return this.webkitSupportsPresentationMode(ef)?(this.webkitSetPresentationMode(ef),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))};
Hu=function(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))};Iu=function(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}};Ju=function(a,b,c){return new window.TextTrackCue(a,b,c)};
Ku=function(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)};Mu=function(a,b,c){if("input"===a)switch(this.type){case "range":a=kd}Lu.call(this,a,b,c)};Ou=function(){this.a=Nu()};Qu=function(a){return Nu()-a.a};Ru=function(a){var b=new Ou;b.a=a.a;return b};Nu=function(){return window.performance&&window.performance.now?window.performance.now():Date.now()};_.Su=function(a){var b=[];a=_.u(a);for(var c=a.next();!c.done;c=a.next()){c=_.u(c.value.variants);for(var d=c.next();!d.done;d=c.next())b.push(d.value)}return b};
Tu=function(a){var b=void 0===b?2:b;this.a=new Uint8Array(a);this.h=b;this.f=0};Uu=function(a,b){var c=a.f+b.byteLength;if(c>a.a.byteLength){var d=a.a;a.a=new Uint8Array(Math.max(Math.ceil(a.a.buffer.byteLength*a.h),c));a.a.set(d)}a.a.set(b,a.f);a.f+=b.byteLength};_.Vu=function(a,b,c){this.h=a;this.j=b;this.f=c||this.h.getMedia();this.a=null};_.Xu=function(){this.a=new Blob([Wu],{type:_.Lg})};_.Yu=function(a,b,c,d){this.id=a;this.f=b;this.a=c;this.h=d};_.Zu=function(){this.a=[];this.f=-1;this.h=null};
_.av=function(a,b,c,d){var e,f;return _.H(function(g){if(1==g.a)return _.C(g,2),_.x(g,$u(a,b,c,d),4);if(2!=g.a)return e=g.f,g["return"](new e);f=_.E(g);f.a(_.O);throw f;})};
$u=function(a,b,c,d){var e,f,g,h;return _.H(function(l){if(1==l.a){if(d){if(e=_.bv[d.toLowerCase()])return l["return"](e);_.Jh("Could not determine manifest type using MIME type ",d)}if(f=_.cv(a)){if(g=_.dv[f])return l["return"](g);_.Jh("Could not determine manifest type for extension ",f)}else _.Jh("Could not find extension for ",a);return d?l.D(2):_.x(l,ev(a,b,c),3)}if(2!=l.a&&(d=l.f)){if(h=_.bv[d])return l["return"](h);_.Jh("Could not determine manifest type using MIME type",d)}throw new _.N(_.O,
4,4E3,{url:a});})};ev=function(a,b,c){var d,e,f;return _.H(function(g){if(1==g.a)return d=_.ck(a),Zj(d,c),d.type=1,d.method="HEAD",_.x(g,b.fetch(d).S,2);e=g.f;f=e.headers["content-type"];return g["return"](f?f.toLowerCase():"")})};_.cv=function(a){a=(new _.dj(a)).Ma.split("/").pop().split(".");return 1===a.length?"":a.pop().toLowerCase()};fv=function(a){this.a=new Uint8Array(a||65536);this.f=0;this.h=new Ou};
hv=function(a,b,c){return b.read().then(function(d){var e=d.done;d=d.value;null!=d&&(gv(a,d),ik(c,d.byteLength,Qu(a.h)),a.h.a=Nu());return e?(e=a.a.buffer,a.a.byteLength!==a.f&&(e=e.slice(0,a.f)),Promise.resolve(e)):Promise.resolve().then(function(){return hv(a,b,c)})})};gv=function(a,b){var c=a.f+b.byteLength;if(a.a.byteLength<c){for(var d=a.a.byteLength;d<c;)d*=2;c=new Uint8Array(d);c.set(a.a);a.a=c}a.a.set(b,a.f);a.f+=b.byteLength};
tk=function(a){var b=a.uris[a.uriIndex],c=new iv,d=new Ou,e=Ru(d),f=0,g,h=new _.kk;c.open(a.method,b,!0);c.responseType="arraybuffer";c.timeout=a.timeout;c.withCredentials=a.allowCrossSiteCredentials;var l=!1,m=!1;c.onreadystatechange=function(p){p=p.target;p.readyState>=XMLHttpRequest.LOADING&&0===f&&(g=Qu(e));p.readyState>=XMLHttpRequest.HEADERS_RECEIVED&&!l&&(p=p.getResponseHeader(za),hk(a,p),l=!0)};c.onload=function(p){p=p.target;var q=(p.getAllResponseHeaders()||"").trim().split("\r\n"),t={};
q=_.u(q);for(var v=q.next();!v.done;v=q.next())v=v.value.split(": "),t[v[0].toLowerCase()]=v.slice(1).join(": ");try{var z=Qu(e);m||ik(a,p.response?p.response.length:0,z);var A=_.gk(t,p.response,p.status,b,p.responseURL,a,z,g);a.rateLimitBps?jk(a.rateLimitBps,Qu(e),a.bytesLoaded).then(function(){h.resolve(A)}):h.resolve(A)}catch(D){h.reject(D)}};c.onerror=function(p){p=p.target;if(0>=p.status)h.reject(new _.N(1,1,1002,{url:b,request:a,status:p.status}));else{var q=p.getAllResponseHeaders(),t={};if(q){q=
_.u(q.trim().split("\r\n"));for(var v=q.next();!v.done;v=q.next())v=v.value.split(": "),t[v[0].toLowerCase()]=v.slice(1).join(": ")}p=_.gk(t,p.response,p.status,b,p.responseURL,a,Qu(e),g);h.resolve(p)}};c.ontimeout=function(){h.reject(new _.N(1,1,1003,{url:b,request:a}))};c.onprogress=function(p){var q=Qu(d);d.a=Nu();if(100<q||p.lengthComputable&&p.loaded===p.total)ik(a,p.loaded-f,q),f=p.loaded,m=!0};for(var n in a.headers)c.setRequestHeader(n.toLowerCase(),a.headers[n]);c.send(a.body);return{S:h,
request:a,abort:function(){c.abort();h.reject(new _.N(1,1,7001,{url:b,request:a}));return Promise.resolve()}}};jv=function(a,b){a=void 0===a?1E6:a;b=void 0===b?!0:b;this.j=new Tu(a);this.length=a;this.A=b;this.f=this.a=this.h=0;this.l=null;this.o=-1;this.w=new Ou};
mv=function(a,b,c,d){return b.read().then(function(e){var f=e.done;e=e.value;d&&e&&(d(e.byteLength,Qu(a.w)),a.w.a=Nu());if(f)return f=kv(a),(f=c(!0,f))?f.then(function(){return a.j.a.buffer}):Promise.resolve(a.j.a.buffer);var g=Promise.resolve();if(null!=e){Uu(a.j,e);a.a=a.h;a.f=a.j.f;a.l=new DataView(a.j.a.buffer,0,a.j.f);e=lv(a);for(f=[];e;)f.push(e),e=lv(a);if(!a.A)f.forEach(function(m){g=g.then(function(){return c(!1,m)})});else if(0<f.length){e=f[0];if(1<f.length){e=f[0];var h=f[f.length-1],
l=h.end-e.start;e={start:e.start,end:h.end,length:l,data:new DataView(a.j.a.buffer,e.start,l),count:f.length}}(f=c(!1,e))&&(g=f)}}return g.then(function(){return mv(a,b,c,d)})})};lv=function(a){if(0<=a.o&&a.f<a.o)return null;for(var b=nv(a);null!==b;){if(b.name===_.Ge){var c={start:a.h,end:b.end,length:b.end-a.h,data:new DataView(a.j.a.buffer,a.h,b.end-a.h),count:1};a.h=b.end;return c}b=nv(a)}return null};
nv=function(a){var b=a.a;if(a.a+4>=a.f)return a.a=a.f,null;var c=ov(a);if(a.a+4>=a.f)return a.a=a.f,null;var d=ov(a);d=String.fromCharCode(d>>24&255,d>>16&255,d>>8&255,d&255);switch(c){case 0:c=a.f-b;break;case 1:if(a.a+8>=a.f)return a.a=a.f,null;try{var e=a.l.getUint32(a.a,!1);var f=a.l.getUint32(a.a+4,!1)}catch(g){throw new _.N(_.O,3,3E3);}if(2097151<e)throw new _.N(_.O,3,3E3);a.a+=8;c=e*Math.pow(2,32)+f}c=b+c;a.o=c;return a.f>=c?(a.a=c,{name:d,start:b,end:c}):null};
ov=function(a){var b=a.l.getUint32(a.a,!1);a.a+=4;return b};kv=function(a){var b=null;a.h!==a.f&&(b={start:a.h,end:a.f,length:a.f-a.h,data:new DataView(a.j.a.buffer,a.h,a.f-a.h),count:-1});return b};qv=function(a){_.lk.call(this,new _.kk,function(){return Promise.resolve()});this.B=a;this.h=null;this.w=this.S;this.f=-1;this.j=this.l=this.o=null;pv(this)};rv=function(a,b,c){a.o=setTimeout(b,c)};
pv=function(a){a.h=a.B.then(function(e){a.j=e.request;e.request.uriIndex=e.request.currentAttempt%e.request.uris.length;if(0<e.request.currentAttempt){-1===a.f&&(a.f=sv(e.request.baseDelay,1E3));var f=a.f*(1+(2*Math.random()-1)*sv(e.request.fuzzFactor,.5));a.f*=sv(e.request.backoffFactor,2);if(0<f)return(new Promise(function(g,h){a.l=h;rv(a,function(){g(e.plugin(e.request))},f)}))["catch"](function(g){if(!a.a)throw g;})}if(a.a)throw new _.N(1,1,7001,{url:e.request.uris[e.request.uriIndex],request:e.request});
return e.plugin(e.request)});var b=0,c=0,d=0;return a.h.then(function(e){var f=e.request;f.currentAttempt+=1;b=f.currentAttempt;c=f.maxAttempts;d=f.uris.length;return e.S}).then(function(e){a.w.resolve(e)})["catch"](function(e){if(e instanceof _.N){var f=b<d,g=7001!==e.code,h=b<c;if((1===e.severity||f)&&g&&h)return pv(a);g&&e.a(_.O);a.w.reject(e)}else a.w.reject(e)})};sv=function(a,b){return null===a||void 0===a?b:a};
uk=function(a){var b=new uv,c;for(c in a.headers)b.append(c.toLowerCase(),a.headers[c]);var d=new vv,e={Sd:!1,pj:!1};b={S:wv(a.uris[a.uriIndex],a,{body:a.body||void 0,headers:b,method:a.method,signal:d.signal,credentials:a.allowCrossSiteCredentials?"include":void 0},e),request:a,abort:function(){e.Sd||(e.Sd=!0,d.abort());return Promise.resolve()}};if(a=a.timeout){var f=window.setTimeout(function(){e.pj=!0;d.abort()},a);b.S=b.S["finally"](function(){window.clearTimeout(f)})}return b};
wv=function(a,b,c,d){var e,f,g,h,l,m,n,p,q,t,v,z,A,D,G,B,F;return _.H(function(M){switch(M.a){case 1:return e=xv,f=new Ou,g=Ru(f),_.C(M,2),_.x(M,e(a,c),4);case 4:h=M.f;l=ak(h.headers);m={uri:h.url,data:null,headers:l,status:h.status,timeMs:0,responseStartMs:Qu(g),request:b};if(dk(h.status)){M.D(5);break}n=m;return _.x(M,h.arrayBuffer(),6);case 6:throw n.data=M.f,m.timeMs=Qu(f),fk(m);case 5:p=h.headers.get(za);hk(b,p);q=p?parseInt(p,10):0;if(b.onFragment&&!b.disableFragmentSupport&&2===b.type)return A=
h.body.getReader(),D=new jv(q,!b.disableMergedFragments),G=function(R,ka){if(d.Sd)return null;ka&&ka.data&&(ik(b,ka.data.byteLength,Qu(g)),g.a=Nu());return b.onFragment&&ka?b.rateLimitBps?jk(b.rateLimitBps,Qu(f),b.bytesLoaded).then(function(){return b.onFragment(ka)}):b.onFragment(ka):null},B=m,_.x(M,mv(D,A,G,b.onProgress),12);t=h.body.getReader();v=new fv(q);return _.x(M,hv(v,t,b),9);case 9:z=M.f;if(!b.rateLimitBps){M.D(10);break}return _.x(M,jk(b.rateLimitBps,Qu(f),z.byteLength),10);case 10:m.data=
z;M.D(8);break;case 12:B.data=M.f;case 8:if(d.Sd)throw Error("Request was aborted");m.timeMs=Qu(f);return M["return"](ek(m));case 2:F=_.E(M);if(d.Sd)throw new _.N(1,1,7001,{url:a,request:b});if(d.pj)throw new _.N(1,1,1003,{url:a,request:b});if(F&&1001===F.code)throw F;_.Ph("Error while fetching data:",F);throw new _.N(1,1,1002,{url:a,error:F,request:b,status:-1},F);}})};
pk=function(a){try{var b=a.uris[a.uriIndex],c=_.yv(b);return{S:Promise.resolve({uri:b,data:c.data,request:a,headers:{"content-type":c.contentType}}),request:a,abort:function(){return Promise.resolve()}}}catch(d){return{S:Promise.reject(d),request:a,abort:function(){return Promise.resolve()}}}};
_.yv=function(a){var b=a.split(":");if(2>b.length||"data"!==b[0])throw _.Ph("Bad data URI, failed to parse scheme"),new _.N(_.O,1,1004,{uri:a});b=b.slice(1).join(":").split(",");if(2>b.length)throw _.Ph("Bad data URI, failed to extract encoding and MIME type"),new _.N(_.O,1,1004,{uri:a});var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];var d=!1;1<b.length&&"base64"===b[b.length-1]&&(d=!0,b.pop());return{data:d?_.Nm(a).buffer:_.Q.hb(a).buffer,contentType:c}};
_.Av=function(a,b){var c=_.ol(_.pl(a),_.ql(a));_.zv[c]=b};_.Bv=function(a){a=_.ol(_.pl(a),_.ql(a));return _.zv[a]||null};_.Cv=function(a){a=_.ol(_.pl(a),_.ql(a));delete _.zv[a]};
_.Dv=function(a){a=a.getConfiguration();a=_.L.kb(a.textStyle||a.textstyle||{});this.K=typeof a.backgroundColor===_.eg?a.backgroundColor:null;this.T=typeof a.windowColor===_.eg?a.windowColor:null;this.N=typeof a.fontColor===_.eg?a.fontColor:null;this.P=typeof a.fontFamily===_.eg?a.fontFamily:null;this.I=typeof a.fontSize===_.eg?a.fontSize:null;this.B=typeof a.fontSizePercent===_.k?a.fontSizePercent:null;this.H=typeof a.edgeColor===_.eg?a.edgeColor:"rgba(0, 0, 0, 1)";this.o=null;typeof a.edgeType===
_.eg&&(this.o=a.edgeType)};_.Xv=function(a){if(!a.o)return null;var b=a.H;switch(a.o){case Mv:return"-2px -2px 0 "+b+", -1px -1px 0 "+b;case Uv:return"2px 2px 0 "+b+", 1px 1px 0 "+b;case Vv:return"-1px 0 "+b+", 0 1px "+b+", 1px 0 "+b+", 0 -1px "+b;case Wv:return"2px 2px 3px "+b+", 2px 2px 4px "+b+", 2px 2px 5px "+b;default:return _.Qe}};Yv=function(a){this.f=a;this.a=null;this.g=new _.J("clpp.text.Mp4TextParser")};
_.$v=function(a){_.Dv.call(this,a);this.l=a.getSurface().getMedia();this.f="clpp-video-"+Zv++;this.h=document.createElement(_.gg);this.j=this.w=!1;_.fr(this.l,this.f);document.head.appendChild(this.h);this.Wb()};aw=function(){};_.bw=function(){};_.dh=[];hh=typeof Object.create==_.oe?Object.create:function(a){function b(){}b.prototype=a;return new b};
if(typeof Object.setPrototypeOf==_.oe)cw=Object.setPrototypeOf;else{var dw;a:{var ew={Dj:!0},fw={};try{fw.__proto__=ew;dw=fw.Dj;break a}catch(a){}dw=!1}cw=dw?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}
var ih=cw,mh=typeof Object.defineProperties==_.oe?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)},kh="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this;nh.prototype.toString=function(){return this.a};var lh=function(){function a(c){if(this instanceof a)throw new TypeError("Symbol is not a constructor");return new nh("jscomp_symbol_"+(c||"")+"_"+b++,c)}var b=0;return a}();
qh.prototype.A=function(a){this.f=a};qh.prototype["return"]=function(a){this.h={"return":a};this.a=this.j};qh.prototype.D=function(a){this.a=a};
Dh("Promise",function(a){function b(g){this.f=0;this.l=void 0;this.a=[];var h=this.j();try{g(h.resolve,h.reject)}catch(l){h.reject(l)}}function c(){this.a=null}function d(g){return g instanceof b?g:new b(function(h){h(g)})}if(a)return a;c.prototype.f=function(g){if(null==this.a){this.a=[];var h=this;this.h(function(){h.l()})}this.a.push(g)};var e=kh.setTimeout;c.prototype.h=function(g){e(g,0)};c.prototype.l=function(){for(;this.a&&this.a.length;){var g=this.a;this.a=[];for(var h=0;h<g.length;++h){var l=
g[h];g[h]=null;try{l()}catch(m){this.j(m)}}}this.a=null};c.prototype.j=function(g){this.h(function(){throw g;})};b.prototype.j=function(){function g(m){return function(n){l||(l=!0,m.call(h,n))}}var h=this,l=!1;return{resolve:g(this.C),reject:g(this.h)}};b.prototype.C=function(g){if(g===this)this.h(new TypeError("A Promise cannot resolve to itself"));else if(g instanceof b)this.G(g);else{a:switch(typeof g){case _.Re:var h=null!=g;break a;case _.oe:h=!0;break a;default:h=!1}h?this.B(g):this.o(g)}};
b.prototype.B=function(g){var h=void 0;try{h=g.then}catch(l){this.h(l);return}typeof h==_.oe?this.H(h,g):this.o(g)};b.prototype.h=function(g){this.w(2,g)};b.prototype.o=function(g){this.w(1,g)};b.prototype.w=function(g,h){if(0!=this.f)throw Error("Cannot settle("+g+", "+h+"): Promise already settled in state"+this.f);this.f=g;this.l=h;this.A()};b.prototype.A=function(){if(null!=this.a){for(var g=0;g<this.a.length;++g)f.f(this.a[g]);this.a=null}};var f=new c;b.prototype.G=function(g){var h=this.j();
g.Se(h.resolve,h.reject)};b.prototype.H=function(g,h){var l=this.j();try{g.call(h,l.resolve,l.reject)}catch(m){l.reject(m)}};b.prototype.then=function(g,h){function l(q,t){return typeof q==_.oe?function(v){try{m(q(v))}catch(z){n(z)}}:t}var m,n,p=new b(function(q,t){m=q;n=t});this.Se(l(g,m),l(h,n));return p};b.prototype["catch"]=function(g){return this.then(void 0,g)};b.prototype.Se=function(g,h){function l(){switch(m.f){case 1:g(m.l);break;case 2:h(m.l);break;default:throw Error("Unexpected state: "+
m.f);}}var m=this;null==this.a?f.f(l):this.a.push(l)};b.resolve=d;b.reject=function(g){return new b(function(h,l){l(g)})};b.race=function(g){return new b(function(h,l){for(var m=_.u(g),n=m.next();!n.done;n=m.next())d(n.value).Se(h,l)})};b.all=function(g){var h=_.u(g),l=h.next();return l.done?d([]):new b(function(m,n){function p(v){return function(z){q[v]=z;t--;0==t&&m(q)}}var q=[],t=0;do q.push(void 0),t++,d(l.value).Se(p(q.length-1),n),l=h.next();while(!l.done)})};return b});var Fh=this||self;
Fh.a=!0;_.L={Bj:20,kb:function(a){var b=_.L.R,c=_.L.wi,d=_.L.ta;return b(a)||c(a)?a:d(a)}};_.I("clpp.utils.obj.cloneItem",_.L.kb);_.L.ta=function(a){for(var b=[],c=0;c<arguments.length;++c)b[c]=arguments[c];c={};for(var d=0;d<b.length;d++)null!=b[d]&&(c=_.L.Ci(c,{merging:b[d]},1));return c.merging||null};_.I("clpp.utils.obj.merge",_.L.ta);_.L.Jc=function(a){for(var b in a)if(void 0!==a[b])return!0;return!1};
_.L.Ci=function(a,b,c){var d=_.L.R,e=_.L.wi,f=_.L.Ci,g=_.L.Ub,h=_.L.ym,l=_.L.mg,m=_.L.sm,n=_.L.xd;c+=1;if(d(a)||!n(a))a={};for(var p in b)n=b[p],e(n)||d(n)||g(n)||m(n)?a[p]=n:h(n)?a[p]=n.subarray(0):n instanceof Array?a[p]=f([],n,c):!d(n)&&l(n)&&c<_.L.Bj&&(a[p]=f(a[p],n,c));return a};_.L.wi=function(a){a=typeof a;return a===_.eg||a===_.k||a===_.Zc};_.L.sm=function(a){return a instanceof Element};_.L.R=function(a){return null===a||"undefined"===typeof a};_.L.xd=function(a){return typeof a===_.Re};
_.L.Ub=function(a){return typeof a===_.oe};_.L.ia=function(a){return typeof a===_.eg};_.L.wa=function(a){return typeof a===_.k};_.L.pi=function(a){return typeof a===_.Zc};_.L.mg=function(a){var b=_.L.xd,c=_.L.R;if(c(a)||!b(a))return!1;a=Object.getPrototypeOf(a);return a===Object.prototype||null===a};_.L.ym=function(a){var b=_.L.xd,c=_.L.Ub;return!!(b(a)&&a.buffer&&a.buffer instanceof ArrayBuffer&&c(a.subarray))};
_.L.pa=function(a,b,c,d){if(a===b||null===a&&null===b||void 0===a&&void 0===b)return!0;if(null===a&&null!==b||null!==a&&null===b||void 0!==a&&void 0===b||void 0===a&&void 0!==b||!_.L.xd(a)||!_.L.xd(b))return!1;for(var e=c||Object.keys(a),f={},g=0;g<e.length;g++){var h=e[g];if(_.L.R(d)||0>d.indexOf(h))if(f[h]=!0,a[h]!==b[h])return!1}if(_.L.R(c))for(a=Object.keys(b),b=0;b<a.length;b++)if(c=a[b],(_.L.R(d)||0>d.indexOf(c))&&!f[c])return!1;return!0};
_.L.isNaN=function(a){return(Number.hasOwnProperty("isNaN")?Number.isNaN:function(b){return b!==b})(a)};_.L.tm=function(a,b,c){return a>=b&&a<=c};_.L.hh=function(a){for(var b=new Map,c=_.u(Object.keys(a)),d=c.next();!d.done;d=c.next())d=d.value,b.set(d,a[d]);return b};_.L.ih=function(a){var b={};a.forEach(function(c,d){b[d]=c});return b};
_.L.fi=function(a,b){for(var c=b.toLowerCase(),d=_.u(Object.entries(a)),e=d.next();!e.done;e=d.next()){var f=_.u(e.value);e=f.next().value;f=f.next().value;if(e.toLowerCase()===c)return f}return null};_.L.xi=function(a,b){for(var c in a){if(!(c in b))return!1;var d=a[c],e=b[c];if(d&&typeof d===_.Re&&e&&typeof e===_.Re){if(!_.L.xi(d,e))return!1}else if(void 0!==d&&void 0!==e&&d!==e)return!1}return!0};
_.L.yi=function(a,b){if(!_.L.xi(a,b))return!1;for(var c in b){if(!(c in a))return!0;var d=a[c],e=b[c];if(!d&&e||d&&typeof d===_.Re&&e&&typeof e===_.Re&&_.L.yi(d,e))return!0}return!1};var Kh={DEFAULT:-1,NONE:0,ERROR:1,WARNING:2,INFO:3,DEBUG:4};_.I("clpp.log.Level",Kh);var Hh=0,Gh={},gw=[];_.I("clpp.log.getLoggers",function(){return _.L.kb(Gh)});_.I("clpp.log.addInterceptor",function(a){a&&gw.push(a)});_.I("clpp.log.removeInterceptor",function(a){a&&(a=gw.indexOf(a),0<=a&&gw.splice(a,1))});_.I("clpp.log.getTagLevel",Ih);_.I("clpp.log.hasTagLevel",function(a){return void 0===a?!1:0<=Gh[a]});_.I("clpp.log.setTagLevel",function(a,b){a&&(_.L.ia(b)&&(b=Lh(b)),Gh[a]=b)});
_.I("clpp.log.setLogLevel",function(a){-1===a&&(a=3);_.L.ia(a)&&(a=Lh(a));Hh=a});_.I("clpp.log.getLogLevel",function(){return Hh});_.r=_.J.prototype;
_.r.log=function(a,b){if(window.console){if(1<arguments.length){var c=arguments[0];Array.prototype.shift.call(arguments)}else c=3;var d=Ih(this.tag);if(0<=d){if(d<c)return}else if(Hh<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,arguments):2===c?console.warn.apply(console,arguments):
1===c?console.error.apply(console,arguments):console.log.apply(console,arguments);d=_.u(gw);for(var e=d.next();!e.done;e=d.next())e=e.value,e.call(e,c,arguments)}};_.r.info=function(a){Array.prototype.unshift.call(arguments,3);this.log.apply(this,arguments)};_.r.debug=function(a){Array.prototype.unshift.call(arguments,4);this.log.apply(this,arguments)};_.r.warn=function(a){Array.prototype.unshift.call(arguments,2);this.log.apply(this,arguments)};
_.r.error=function(a){Array.prototype.unshift.call(arguments,1);this.log.apply(this,arguments)};_.r.pl=function(a){return a?this.tag?new _.J(this.tag+"."+a):new _.J(a):this};_.I("clpp.log.Logger",_.J);_.J.prototype.createChild=_.J.prototype.pl;_.J.prototype.error=_.J.prototype.error;_.J.prototype.warn=_.J.prototype.warn;_.J.prototype.debug=_.J.prototype.debug;_.J.prototype.info=_.J.prototype.info;_.J.prototype.log=_.J.prototype.log;var Mh=new _.J("clpp");_.I("clpp.log.info",_.Nh);
_.I("clpp.log.debug",_.Oh);_.I("clpp.log.warn",_.Jh);_.I("clpp.log.error",_.Ph);(function(){var a=console.assert;a?a.bind||(console.assert=function(){a.apply(console,arguments)}):console.assert=function(){}})();_.Sh=new _.J("clpp.players");_.Rh={};_.I("clpp.events.ERROR",_.ie);_.I("clpp.events.LOADEDMETADATA",_.De);_.I("clpp.events.BUFFERING_ENDED",_.$c);_.I("clpp.events.BUFFERING_STARTED",_.ad);_.I("clpp.events.STATE_CHANGED",_.bg);_.I("clpp.events.AUDIO_TRACK_CHANGED",_.Wc);_.I("clpp.events.TEXT_TRACK_CHANGED",_.mg);_.I("clpp.events.VIDEO_TRACK_CHANGED",_.Ng);_.I("clpp.events.BITRATE_CHANGED",_.Yc);_.I("clpp.events.TRACKS_ADDED",_.sg);_.I("clpp.events.LOAD_START",Ee);_.I("clpp.events.RELEASING",_.Kf);_.I("clpp.events.RELEASED",Jf);
_.I("clpp.events.DESTROYING","destroying");_.I("clpp.events.DESTROYED","destroyed");_.I("clpp.events.VIDEO_BUFFER_CHANGED",_.Mg);_.I("clpp.events.AUDIO_BUFFER_CHANGED",_.Vc);_.I("clpp.events.DOWNLOAD_TRACE","downloadtrace");_.I("clpp.events.DRM_SESSION_CREATED",$d);_.I("clpp.events.DRM_SESSION_UPDATE",_.be);_.I("clpp.events.DRM_SESSION_PERSISTED",_.ae);_.I("clpp.events.DRM_RENEWAL_STARTED",Zd);_.I("clpp.events.DRM_EXPIRATION_UPDATE",_.Xd);_.I("clpp.events.DRM_LICENSE_REQUESTED",Yd);
_.I("clpp.events.AUTOPLAY_NOT_ALLOWED",_.Xc);_.I("clpp.events.PLAY",_.ff);_.I("clpp.events.SEEKING",_.Uf);_.I("clpp.events.SEEKED",_.Tf);_.I("clpp.events.USER_SEEKING",_.Cg);_.I("clpp.events.USER_SEEKED",_.Bg);_.Bq={SEEKING:1,NO_DATA:2};_.I("clpp.events.BufferingReasons",_.Bq);_.I("clpp.events.ADS_TIMELINE_CHANGED",_.Cc);_.I("clpp.events.AD_LOADED",_.rc);_.I("clpp.events.AD_BREAK_STARTED",_.hc);_.I("clpp.events.AD_STARTED",_.xc);_.I("clpp.events.AD_BUFFERING",_.jc);_.I("clpp.events.AD_PROGRESS",_.uc);
_.I("clpp.events.AD_FIRST_QUARTILE",_.mc);_.I("clpp.events.AD_MIDPOINT",_.sc);_.I("clpp.events.AD_THIRD_QUARTILE",_.Ac);_.I("clpp.events.AD_PAUSED",_.tc);_.I("clpp.events.AD_RESUMED",_.vc);_.I("clpp.events.AD_SKIPPED",_.wc);_.I("clpp.events.AD_CLICKED",_.kc);_.I("clpp.events.AD_IMPRESSION",_.qc);_.I("clpp.events.AD_COMPLETED",_.lc);_.I("clpp.events.AD_STOPPED",_.zc);_.I("clpp.events.AD_BREAK_STOPPED",_.ic);_.I("clpp.events.AD_HLS_ASSET_LIST_REQUEST",nc);
_.I("clpp.events.AD_HLS_ASSET_LIST_RESPONSE",oc);_.I("clpp.events.AD_HLS_RESOLVED",pc);_.I("clpp.events.SIMID_CREATIVE_STARTED",_.Wf);_.I("clpp.events.SIMID_CREATIVE_STOPPED",_.Xf);_.I("clpp.events.CASTING_STARTED",_.ed);_.I("clpp.events.CASTING_ENDED","castingended");_.I("clpp.events.CAST_STATUS_CHANGED",_.fd);_.I("clpp.events.AIRPLAY_STATUS_CHANGED",_.Fc);_.I("clpp.events.AIRPLAY_CASTING_STARTED",_.Ec);_.I("clpp.events.AIRPLAY_CASTING_ENDED",_.Dc);_.I("clpp.events.TIMELINE_CUE_ADDED",_.ng);
_.I("clpp.events.TIMELINE_CUE_ENTER",_.og);_.I("clpp.events.TIMELINE_CUE_EXIT",_.pg);_.I("clpp.events.TIMELINE_CUES_CHANGED",_.qg);_.I("clpp.events.MPD_TYPE_CHANGED",_.Oe);_.I("clpp.events.LIVE_TURNED_STATIC",_.Ae);_.I("clpp.events.VIMOND_RESPONSE",_.Og);_.I("clpp.events.PLAYLIST_ITEM_CHANGED",_.sf);_.I("clpp.events.PLAYLIST_MODIFIED",_.tf);_.I("clpp.events.SC_PLAYLIST_TIMELINE_CHANGED",_.Sf);_.I("clpp.events.SC_PLAYLIST_ITEM_CHANGED",_.Qf);_.I("clpp.events.SC_PLAYLIST_ENDED",_.Pf);
_.I("clpp.events.SC_PLAYLIST_LIVE_TURNED_STATIC",_.Rf);_.I("clpp.events.CDN_SWITCH_SUCCESS",_.gd);_.I("clpp.events.ONLINE_STATUS_CHANGED",Ye);_.I("clpp.events.CMSD_EVENT","cmsd-event");_.I("clpp.events.YOSPACE_SESSION_STARTED",_.ch);_.I("clpp.events.YOSPACE_SESSION_ENDED",_.bh);_.I("clpp.events.CONTENT_STEERING_CHANGE",_.Id);_.I("clpp.events.CONTENT_STEERING_LOCATION_BAN_UPDATE",_.Jd);_.Vh.prototype.ga=function(a){return Wh(this,a,!1)};_.Vh.prototype.Jb=function(a){return Wh(this,a,!0)};_.Vh.prototype.stop=function(){this.a&&(this.a(),this.a=null)};_.Xh.prototype.Sg=function(){this.stop();this.f();return this};_.Xh.prototype.ga=function(a){var b=this;this.stop();this.a=(new _.Vh(function(){b.f()})).ga(a);return this};_.Xh.prototype.Jb=function(a){var b=this;this.stop();this.a=(new _.Vh(function(){b.f()})).Jb(a);return this};_.Xh.prototype.stop=function(){this.a&&(this.a.stop(),this.a=null)};_.I("clpp.utils.Timer",_.Xh);_.Xh.prototype.stop=_.Xh.prototype.stop;_.Xh.prototype.tickEvery=_.Xh.prototype.Jb;_.Xh.prototype.tickAfter=_.Xh.prototype.ga;
_.Xh.prototype.tickNow=_.Xh.prototype.Sg;_.r=Zh.prototype;_.r.load=function(a){var b=this;return _.H(function(c){return b.Nc?_.x(c,ci(b,function(d){return _.H(function(e){return _.x(e,d.load(a),0)})}),0):(b.Ca.warn("No main player, cannot load."),c["return"]())})};_.r.ro=function(a){this.j=a;this.Ca.info("Looping set to",a)};_.r.Hj=function(a){this.f.push(a)};
_.r.Gj=function(a){if(this.Nc)this.Ca.warn("Main player already set.");else{this.Nc=a;var b=this.Jm.bind(this),c=this.Km.bind(this),d=this.Vj.bind(this);a.on(_.bg,b);a.on(_.rg,c);a.on(_.he,d);this.h.push(function(){a.off(_.bg,b);a.off(_.rg,c);a.on(_.he,d)})}};_.r.clear=function(){this.Nc=null;this.f=[];this.h.forEach(function(a){return a()});this.h=[]};
_.r.Vj=function(){var a=this;return _.H(function(b){if(!a.j)return b.D(0);a.Ca.info("Looping playback.");return _.x(b,ci(a,function(c){return _.H(function(d){return 1==d.a?_.x(d,c.seek(0),2):_.x(d,c.play(),0)})}),0)})};
_.r.Jm=function(a){var b=this;this.a||(a=a.detail.currentState,a===_.Hq?(this.Ca.info("Mirroring playing."),bi(this,function(c){return _.H(function(d){return _.x(d,c.play(),0)})})):[_.Gq,_.yq,_.Eq].includes(a)&&(this.Ca.info("Mirroring paused/buffering/error."),bi(this,function(c){var d,e;return _.H(function(f){if(1==f.a)return d=Math.round(b.Nc.getPosition())-.1,_.x(f,c.seek(d),2);if(3!=f.a)return _.x(f,Yh(.2),3);e=c.getState();return e!==_.Hq&&e!==_.yq?f.D(0):_.x(f,c.pause(),0)})})))};
_.r.Km=function(){var a=this;this.a||bi(this,function(b){var c,d,e,f,g,h,l;return _.H(function(m){switch(m.a){case 1:if(!b.isPaused()){m.D(2);break}return _.x(m,b.play(),2);case 2:c=a.Nc.getPosition();d=b.getPosition();e=c-d;f=Math.abs(e);g=b.getPlaybackRate();h=b.getState();if(h!==_.Hq||.05>=f)return m["return"]();var n=Math.abs(e);l=Math.min(Math.max(1+(.05>=n?0:n/(1>n?6:3))*Math.sign(e),.2),5);if(!(5<=f)){m.D(4);break}b.setPlaybackRate(1);return _.x(m,b.seek(c),5);case 5:return m["return"]();case 4:if(g===
l)return 1!==l&&a.Ca.info("Delta "+e.toFixed(1)+" s."),m["return"]();1===l?a.Ca.info("Secondary caught up."):1>l?a.Ca.info("Secondary slowing down to catch up. Rate: "+(l.toFixed(1)+", delta: "+e.toFixed(1)+" s")):1<l&&a.Ca.info("Secondary speeding up to catch up. Rate: "+(l.toFixed(1)+", delta: "+e.toFixed(1)+" s"));b.setPlaybackRate(l);_.y(m)}})})};_.I(rd,Zh);Zh.prototype.clear=Zh.prototype.clear;Zh.prototype.addMainPlayer=Zh.prototype.Gj;Zh.prototype.addSecondaryPlayer=Zh.prototype.Hj;
Zh.prototype.setLoop=Zh.prototype.ro;Zh.prototype.load=Zh.prototype.load;_.r=_.di.prototype;_.r.push=function(a,b){a in this.a?this.a[a].push(b):this.a[a]=[b]};_.r.get=function(a){return(a=this.a[a])?a.slice():[]};_.r.remove=function(a,b){var c=this.a[a];if(!c)return!1;for(var d=!1,e=0;e<c.length;++e)c[e]===b&&(c.splice(e,1),--e,d=!0);return d};_.r.clear=function(){this.a={}};_.r.forEach=function(a){for(var b in this.a)a(b,this.a[b])};ei.prototype.Ya=function(a){try{this.hd.handleEvent?this.hd.handleEvent(a):this.hd.call(this.a,a)}catch(b){_.Ph("clpp","Uncaught exception in event handler for event '"+this.f+"'",b,b?b.message:null,b?b.stack:null)}};_.K.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};_.K.prototype.stopImmediatePropagation=function(){this.f=!0};_.K.prototype.stopPropagation=function(){};_.r=fi.prototype;
_.r.trigger=function(a){var b=this.a.get(a.type);if(b)for(var c=0;c<b.length&&(a.target=this.f,a.currentTarget=this.f,b[c].Ya(a),b[c].co&&this.a.remove(a.type,b[c]),!a||!a.f);c++);};_.r.on=function(a,b,c){this.a.push(a,new ei(a,b,c||this.f));return b};_.r.one=function(a,b,c){this.a.push(a,new ei(a,b,c||this.f,!0));return b};_.r.off=function(a,b){var c=this.a.get(a),d=!1;if(c)for(var e=0;e<c.length;e++)c[e].hd===b&&(d=this.a.remove(a,c[e])||d);return d};_.r.clear=function(){this.a.clear()};_.gi.prototype.release=function(){_.ki(this)};_.gi.prototype.on=function(a,b,c,d){a=new li(a,b,c,void 0===d?!1:d);this.a.push(b,a)};_.gi.prototype.one=function(a,b,c){function d(f){e.off(a,b,d);return c(f)}var e=this;this.on(a,b,d)};_.gi.prototype.off=function(a,b,c){for(var d=this.a.get(b)||[],e=0;e<d.length;++e){var f=d[e];f.target!==a||c!==f.a&&c||(ji(f),this.a.remove(b,f))}};mi.prototype.release=function(){this.j.release();this.a=new Set;this.f.clear();null!=this.h&&(clearInterval(this.h),this.h=null)};mi.prototype.destroy=function(){var a=this;return _.H(function(b){a.release();_.y(b)})};mi.prototype.getTimelineCues=function(){return Array.from(this.a.values()).sort(function(a,b){return a.startTime-b.startTime})};_.Si.prototype.pa=function(a){return this.payload===a.payload&&this.startTime===a.startTime&&this.endTime===a.endTime&&this.payloadType===a.payloadType};_.I("clpp.text.Cue",_.Si);_.Si.positionAlign={LEFT:_.ye,RIGHT:_.ze,CENTER:_.id,AUTO:"auto"};_.Mi="text";_.Si.payloadType={TEXT:_.Mi,VTT_XML:_.Qg,TTML_XML:_.ug};_.Ni=_.id;_.hw={LEFT:_.ve,RIGHT:_.Of,CENTER:_.Ni,START:_.ag,END:_.ge};_.Si.textAlign=_.hw;var Ri="ltr";_.Si.direction={HORIZONTAL_LEFT_TO_RIGHT:Ri,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};_.Oi="horizontal-tb";
_.Si.writingMode={HORIZONTAL_TOP_TO_BOTTOM:_.Oi,VERTICAL_LEFT_TO_RIGHT:_.Gg,VERTICAL_RIGHT_TO_LEFT:_.Hg};_.Pi=0;_.Si.lineInterpretation={LINE_NUMBER:_.Pi,PERCENTAGE:1};_.Qi=_.ag;_.iw={CENTER:_.id,START:_.Qi,END:_.ge};_.Si.lineAlign=_.iw;_.I("clpp.text.CueRegion",_.Vi);_.Ti=1;_.Vi.units={PX:0,PERCENTAGE:_.Ti,LINES:2};var Ui="";_.Vi.scrollMode={NONE:Ui,UP:"up"};_.Vi.displayAlign={BEFORE:"flex-end",CENTER:_.id,AFTER:"flex-start"};
_.Vi.writingMode={HORIZONTAL_TOP_TO_BOTTOM:_.Ad,VERTICAL_LEFT_TO_RIGHT:"row-reverse",VERTICAL_RIGHT_TO_LEFT:"row"};Wi.prototype.destroy=function(){this.a.release();this.j=!1;this.l=this.a=this.h=this.f=null;return Promise.resolve()};Wi.prototype.start=function(a){var b=this;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,_.Bc,function(c){return Xi(b,c)}),this.a.on(this.f,kd,function(){for(var c=b.f,d=0;d<c.length;d++){var e=c[d];e.mode===_.Vf&&(e.mode=_.qe)}}))};
Wi.prototype.o=function(a){var b=new _.Si(a.startTime,a.endTime,a.text,_.Qg);if(_.L.ia(a.vertical))switch(a.vertical){case "lr":b.writingMode=_.Gg;break;case "rl":b.writingMode=_.Hg}_.L.wa(a.size)&&(b.size=a.size);if(_.L.ia(a.align))switch(a.align){case _.ve:case _.ag:b.textAlign=_.ag;break;case _.id:b.textAlign=_.Ni;break;case _.Of:case _.ge:b.textAlign=_.ge}_.L.wa(a.position)&&(b.position=a.position);if(_.L.ia(a.positionAlign))switch(a.positionAlign){case _.ye:b.positionAlign=_.ye;break;case _.id:b.positionAlign=
_.id;break;case _.ze:b.positionAlign=_.ze}_.L.wa(a.line)&&(b.line=a.line);if(_.L.ia(a.lineAlign))switch(a.lineAlign){case _.ag:b.lineAlign=_.Qi;break;case _.id:b.lineAlign=_.id;break;case _.ge:b.lineAlign=_.ge}_.L.pi(a.snapToLines)&&(b.lineInterpretation=a.snapToLines?_.Pi:1);return b};_.w(_.N,Error);_.N.prototype.a=function(a){this.severity!==a&&(this.severity=a,this.message=Yi(this.severity,this.category,this.code,this.data))};_.N.prototype.toString=function(){var a=this.message;this.cause&&(a+="\n Caused by "+this.cause);return a};_.I("clpp.Error",_.N);_.O=2;_.N.Severity={RECOVERABLE:1,FATAL:_.O};_.N.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,PLUGIN:9,ADS:10};
_.N.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,
TEXT_PARSER_MISSING:2012,THUMBNAILS_FAILED_TO_LOAD:2013,THUMBNAIL_ERROR:2014,BUFFER_READ_OUT_OF_BOUNDS:3E3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,EBML_BAD_FLOATING_POINT_SIZE:3003,MP4_SIDX_WRONG_BOX_TYPE:3004,MP4_SIDX_INVALID_TIMESCALE:3005,MP4_SIDX_TYPE_NOT_SUPPORTED:3006,WEBM_CUES_ELEMENT_MISSING:3007,WEBM_EBML_HEADER_ELEMENT_MISSING:3008,WEBM_SEGMENT_ELEMENT_MISSING:3009,WEBM_INFO_ELEMENT_MISSING:3010,WEBM_DURATION_ELEMENT_MISSING:3011,WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING:3012,WEBM_CUE_TIME_ELEMENT_MISSING:3013,
MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,TRANSMUXING_FAILED:3018,MP4_PARSER_ERROR:3019,MEDIA_LOAD_ERROR:3100,INVALID_TRACK_TYPE:3101,UNKNOWN_TRACK:3102,MEDIA_DECRYPTION_ERROR:3103,PLAY_NOT_ALLOWED:3200,PAUSE_FAILED:3201,UNABLE_TO_GUESS_MANIFEST_TYPE:4E3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,DASH_EMPTY_ADAPTATION_SET:4003,DASH_EMPTY_PERIOD:4004,DASH_WEBM_MISSING_INIT:4005,DASH_UNSUPPORTED_CONTAINER:4006,DASH_PSSH_BAD_ENCODING:4007,
DASH_NO_COMMON_KEY_SYSTEM:4008,DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED:4009,DASH_CONFLICTING_KEY_IDS:4010,UNPLAYABLE_PERIOD:4011,RESTRICTIONS_CANNOT_BE_MET:4012,NO_PERIODS:4014,HLS_PLAYLIST_HEADER_MISSING:4015,INVALID_HLS_TAG:4016,HLS_INVALID_PLAYLIST_HIERARCHY:4017,DASH_DUPLICATE_REPRESENTATION_ID:4018,HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND:4020,HLS_COULD_NOT_GUESS_MIME_TYPE:4021,HLS_REQUIRED_ATTRIBUTE_MISSING:4023,HLS_REQUIRED_TAG_MISSING:4024,HLS_COULD_NOT_GUESS_CODECS:4025,HLS_KEYFORMATS_NOT_SUPPORTED:4026,
DASH_UNSUPPORTED_XLINK_ACTUATE:4027,DASH_XLINK_DEPTH_LIMIT:4028,HLS_COULD_NOT_PARSE_SEGMENT_START_TIME:4030,CONTENT_UNSUPPORTED_BY_BROWSER:4032,SMOOTH_INVALID_MANIFEST_XML:4033,SMOOTH_EMPTY_PRESENTATION:4034,SMOOTH_MEDIA_PROCESSING_ERROR:4035,SMOOTH_INVALID_VERSION:4036,SMOOTH_INVALID_FRAGMENT_METADATA:4037,SMOOTH_REQUIRED_ATTRIBUTE_MISSING:4038,SMOOTH_TRUNCATED_MEDIA_FILE:4039,CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM:4040,HLS_MSE_ENCRYPTED_TS_NOT_SUPPORTED:4041,HLS_PLAYLIST_NOT_UTF8:4042,HLS_PLAYLIST_EMPTY:4043,
HLS_INVALID_VALUE:4044,HLS_DISCONTINUITY_NOT_SUPPORTED:4045,HLS_UNSUPPORTED_FEATURE:4046,HLS_INCOMPATIBLE_PLAYLIST_UPDATE:4047,INVALID_STREAMS_CHOSEN:5005,STREAMING_ERROR:5006,NO_RECOGNIZED_KEY_SYSTEMS:6E3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,FAILED_TO_CREATE_CDM:6002,FAILED_TO_ATTACH_TO_VIDEO:6003,INVALID_SERVER_CERTIFICATE:6004,FAILED_TO_CREATE_SESSION:6005,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,
NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,REQUESTED_DRM_ENVIRONMENT_UNAVAILABLE:6015,INIT_DATA_TRANSFORM_ERROR:6016,CERTIFICATE_REQUEST_FAILED:6100,NO_CONTENT_ID:6101,SERVER_CERTIFICATE_REQUIRED:6102,EXTRACT_CONTENT_ID_MODIFIER_ERROR:6103,FAILED_TO_PERSIST_SESSION:6200,FAILED_TO_REMOVE_SESSION:6201,INVALID_SESSION_STORAGE_IMPLEMENTATION:6202,LOAD_INTERRUPTED:7E3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,CANNOT_LOAD_SOURCE:7003,MEDIA_ELEMENT_NOT_FOUND:7004,INVALID_MEDIA_ELEMENT:7005,
INVALID_CONTAINER_ELEMENT:7006,INVALID_ARGUMENT:7007,WRONG_ORDER_OF_OPERATIONS:7008,NOT_SUPPORTED:7009,INVALID_CONFIGURATION:7100,INVALID_LICENSE:7101,NO_ELEMENT:7102,USER_ID_NOT_PROVIDED:7103,KEY_LOAD_ERROR:7104,TIZEN_INTERNAL_ERROR:7200,CAF_INTERNAL_ERROR:7300,INTERNAL_CAST_ERROR:8E3,CAST_API_NOT_READY:8001,NO_RECEIVERS_AVAILABLE:8002,ALREADY_CASTING:8003,NO_CAST_SESSION:8004,CONVIVA_SDK_NOT_LOADED:9E3,CONVIVA_INVALID_CONFIGURATION:9001,CONVIVA_RUNTIME_ERROR:9002,GL_CONTEXT_ERROR:9003,GL_SHADER_ERROR:9004,
YOUBORA_SDK_MISSING:9100,YOUBORA_INVALID_CONFIGURATION:9101,YOUBORA_SDK_VERSION_NOT_SUPPORTED:9102,VIMOND_INVALID_CONFIGURATION:9200,VIMOND_SESSION_ERROR:9201,MUXDATA_INVALID_CONFIGURATION:9300,MUX_SDK_MISSING:9301,MUXDATA_INIT_ERROR:9302,IMA_SDK_MISSING:1E4,IMA_INVALID_CONFIGURATION:10001,IMA_UNSUPPORTED_PLATFORM:10002,AD_ERROR:10003,SIMID_CONTAINER_MISSING:10100,BROADPEAK_SDK_MISSING:11E3,BROADPEAK_SESSION_ERROR:11001,FREEWHEEL_SDK_MISSING:12E3,FREEWHEEL_INVALID_CONFIGURATION:12001,CONTENT_TRANSFORMATION_FAILED:14E3,
SESSIONS_INVALID_CONFIGURATION:15E3};_.w(_.Zi,Error);var ij=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;_.r=_.dj.prototype;_.r.Fb="";_.r.Tc="";_.r.ab="";_.r.Dd=null;_.r.Ma="";_.r.Gc="";_.r.toString=function(){var a=[],b=this.Fb;b&&a.push(lj(b,jw,!0),":");if(b=this.ab){a.push("//");var c=this.Tc;c&&a.push(lj(c,jw,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Dd;null!=b&&a.push(":",String(b))}if(b=this.Ma)this.ab&&"/"!=b.charAt(0)&&a.push("/"),a.push(lj(b,"/"==b.charAt(0)?kw:lw,!0));(b=this.a.toString())&&a.push("?",b);(b=this.Gc)&&a.push("#",lj(b,mw));return a.join("")};
_.r.resolve=function(a){var b=new _.dj(this);"data"===b.Fb&&(b=new _.dj);var c=!!a.Fb;c?ej(b,a.Fb):c=!!a.Tc;c?b.Tc=a.Tc:c=!!a.ab;c?b.ab=a.ab:c=null!=a.Dd;var d=a.Ma;if(c)fj(b,a.Dd);else if(c=!!a.Ma){if("/"!=d.charAt(0))if(this.ab&&!this.Ma)d="/"+d;else{var e=b.Ma.lastIndexOf("/");-1!=e&&(d=b.Ma.substr(0,e+1)+d)}if(".."==d||"."==d)d="";else if(-1!=d.indexOf("./")||-1!=d.indexOf("/.")){e=0==d.lastIndexOf("/",0);d=d.split("/");for(var f=[],g=0;g<d.length;){var h=d[g++];"."==h?e&&g==d.length&&f.push(""):
".."==h?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),e&&g==d.length&&f.push("")):(f.push(h),e=!0)}d=f.join("/")}}c?b.Ma=d:c=""!==a.a.toString();c?_.gj(b,hj(a.a)):c=!!a.Gc;c&&(b.Gc=a.Gc);return b};var jw=/[#\/\?@]/g,lw=/[#\?:]/g,kw=/[#\?]/g,mj=/[#\?@]/g,mw=/#/g;_.kj.prototype.a=null;_.kj.prototype.h=null;
_.kj.prototype.add=function(a,b){if(!this.a&&(this.a={},this.h=0,this.f))for(var c=this.f.split("\x26"),d=0;d<c.length;d++){var e=c[d].indexOf("\x3d"),f=null;if(0<=e){var g=c[d].substring(0,e);f=c[d].substring(e+1)}else g=c[d];g=decodeURIComponent(g.replace(/\+/g," "));f=f||"";this.add(g,decodeURIComponent(f.replace(/\+/g," ")))}this.f=null;(c=this.a.hasOwnProperty(a)&&this.a[a])||(this.a[a]=c=[]);c.push(b);null!==this.h&&this.h++;return this};
_.kj.prototype.toString=function(){if(this.f)return this.f;if(!this.a)return"";var a=[],b;for(b in this.a)for(var c=encodeURIComponent(b),d=this.a[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="\x3d"+encodeURIComponent(d[e]));a.push(f)}return this.f=a.join("\x26")};var oj;_.pj="text";_.Rq={VIDEO:_.Jg,AUDIO:_.Pc,TEXT:_.pj,Oo:_.Gc,IMAGE:_.se,gh:_.hg};_.nw=1/15;oj={audio:[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4/,/^dts[cex]$/,/^iamf/,/^mhm[12]/],video:[/^avc/,/^hev/,/^hvc/,/^vvc/,/^vvi/,/^vp0?[89]/,/^av01/,/^dvh/,/^dva/,/^dav/]};oj[_.pj]=[/^vtt$/,/^wvtt/,/^stpp/];var rj={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av0?1/],text:[/^vtt$/,/^wvtt/,/^stpp/]};_.uj={text:{mp4:Jc,m4s:Jc,m4i:Jc,cmft:Jc,vtt:_.kg,ttml:_.Mc},video:{mp4:_.Lg,m4s:_.Lg,m4f:_.Lg,m4i:_.Lg,m4v:_.Lg,cmfv:_.Lg,ts:_.Kg},audio:{mp4:_.Tc,m4s:_.Tc,m4f:_.Tc,m4i:_.Tc,m4a:_.Tc,cmfa:_.Tc,ts:_.Kg,aac:_.Qc,ec3:_.Sc,ac3:_.Rc},image:{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}};_.wj.prototype.toString=function(){function a(d){return d.name+"\x3d"+(isNaN(Number(d.value))?'"'+d.value+'"':d.value)}var b="#"+this.name,c=this.attributes?this.attributes.map(a):[];this.value&&c.unshift(this.value);0<c.length&&(b+=":"+c.join(","));return b};_.wj.prototype.getAttribute=function(a){var b=this.attributes.filter(function(c){return c.name===a});return b.length?b[0]:null};_.wj.prototype.hasAttribute=function(a){return null!=this.getAttribute(a)};_.zj.prototype.getPosition=function(){return this.position};_.zj.prototype.je=function(){return this.oa?this.oa-this.Da+1:null};_.zj.prototype.f=_.eh(0);_.w(_.Aj,_.zj);var Ej=new Map([["aar","aa"],["abk","ab"],["afr","af"],["aka","ak"],["alb","sq"],["amh","am"],["ara","ar"],["arg","an"],["arm","hy"],["asm","as"],["ava","av"],["ave","ae"],["aym","ay"],["aze","az"],["bak","ba"],["bam","bm"],["baq","eu"],["bel","be"],["ben","bn"],["bih","bh"],["bis","bi"],["bod","bo"],["bos","bs"],["bre","br"],["bul","bg"],["bur","my"],["cat","ca"],["ces","cs"],["cha","ch"],["che","ce"],["chi","zh"],["chu","cu"],["chv","cv"],["cor","kw"],["cos","co"],["cre","cr"],["cym","cy"],["cze",
"cs"],["dan","da"],["deu","de"],[_.Qd,"dv"],["dut","nl"],["dzo","dz"],["ell","el"],["eng","en"],["epo","eo"],["est","et"],["eus","eu"],["ewe","ee"],["fao","fo"],["fas","fa"],["fij","fj"],["fin","fi"],["fra","fr"],["fre","fr"],["fry","fy"],["ful","ff"],["geo","ka"],["ger","de"],["gla","gd"],["gle","ga"],["glg","gl"],["glv","gv"],["gre","el"],["grn","gn"],["guj","gu"],["hat","ht"],["hau","ha"],["heb","he"],["her","hz"],["hin","hi"],["hmo","ho"],["hrv","hr"],["hun","hu"],["hye","hy"],["ibo","ig"],["ice",
"is"],["ido","io"],["iii","ii"],["iku","iu"],["ile","ie"],["ina","ia"],["ind","id"],["ipk","ik"],["isl","is"],["ita","it"],["jav","jv"],["jpn","ja"],["kal","kl"],["kan","kn"],["kas","ks"],["kat","ka"],["kau","kr"],["kaz","kk"],["khm","km"],["kik","ki"],["kin","rw"],["kir","ky"],["kom","kv"],["kon","kg"],["kor","ko"],["kua","kj"],["kur","ku"],["lao","lo"],["lat","la"],["lav","lv"],["lim","li"],["lin","ln"],["lit","lt"],["ltz","lb"],["lub","lu"],["lug","lg"],["mac","mk"],["mah","mh"],["mal","ml"],["mao",
"mi"],["mar","mr"],["may","ms"],["mkd","mk"],["mlg","mg"],["mlt","mt"],["mon","mn"],["mri","mi"],["msa","ms"],["mya","my"],["nau","na"],["nav","nv"],["nbl","nr"],["nde","nd"],["ndo","ng"],["nep","ne"],["nld","nl"],["nno","nn"],["nob","nb"],["nor","no"],["nya","ny"],["oci","oc"],["oji","oj"],["ori","or"],["orm","om"],["oss","os"],["pan","pa"],["per","fa"],["pli","pi"],["pol","pl"],["por","pt"],["pus","ps"],["que","qu"],["roh","rm"],["ron","ro"],["rum","ro"],["run","rn"],["rus","ru"],["sag","sg"],["san",
"sa"],["sin","si"],["slk","sk"],["slo","sk"],["slv","sl"],["sme","se"],["smo","sm"],["sna","sn"],["snd","sd"],["som","so"],["sot","st"],["spa","es"],["sqi","sq"],["srd","sc"],["srp","sr"],["ssw","ss"],["sun","su"],["swa","sw"],["swe","sv"],["tah","ty"],["tam","ta"],["tat","tt"],["tel","te"],["tgk","tg"],["tgl","tl"],["tha","th"],["tib","bo"],["tir","ti"],["ton","to"],["tsn","tn"],["tso","ts"],["tuk","tk"],["tur","tr"],["twi","tw"],["uig","ug"],["ukr","uk"],["urd","ur"],["uzb","uz"],["ven","ve"],["vie",
"vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);_.Y={pc:function(a,b){return a.filter(function(c){return c.name===b})},qj:function(a){var b=/^[a-zA-Z0-9_-]+$/,c=new Set;a.forEach(function(d){var e=_.P(d,"VALUE"),f=_.P(d,_.hb),g=_.P(d,"IMPORT"),h=_.P(d,"QUERYPARAM");if(1!==[f,g,h].filter(Boolean).length||f&&null==e)throw new _.N(_.O,4,4044,{message:"Invalid tag.",text:d.toString()});d=f||g||h;if(c.has(d))throw new _.N(_.O,4,4044,'EXT-X-DEFINE redefined variable "'+d+'".');if(!b.test(d))throw new _.N(_.O,4,4044,'EXT-X-DEFINE invalid variable name "'+
d+'".');c.add(d)})},gg:function(a,b){var c=Array.isArray(b)?b:[b];return a.filter(function(d){d=_.xj(d,_.Mb);return c.includes(d)})},wd:function(a,b){return a.some(function(c){return c.name===b})},bb:function(a,b,c){c=void 0===c?{}:c;a=a.find(function(d){return d.name===b})||null;if(!a&&c.required)throw new _.N(_.O,4,4024,{missingTag:b});return a},hi:function(a,b){return _.Y.bb(a,b,{required:!0})},Vl:function(a,b,c){c=void 0===c?0:c;return(a=_.Y.bb(a,b))?Number(a.value):c},pp:function(a,b,c){return a.filter(function(d){var e=
d.getAttribute(_.Mb);d=d.getAttribute(_.Sa);return e.value===b&&d.value===c})},Qn:function(a){var b=_.Y.bb(a,"EXT-X-TILES");if(!b)return{ke:1,Fe:1,durationPerTile:null};a=_.P(b,"LAYOUT")||"1x1";b=_.P(b,_.Ja);a=_.Hj(a);return{ke:a.ke,Fe:a.Fe,durationPerTile:b?Number(b):null}},nd:function(a,b,c){c=void 0===c?!0:c;a=new _.dj(a);b=new _.dj(b);b=a.resolve(b).toString();return c?b:decodeURI(b)},qm:function(a){return/^#(?!EXT)/m.test(a)},wm:function(a){return/^(#EXT)/.test(a)},Am:function(a,b){Array.isArray(a)||
(a=[a]);a.forEach(function(c){for(var d=_.u(_.Y.Ef(c)),e=d.next();!e.done;e=d.next())b(e.value,c)})},Ef:function(a){var b=new Set;a.variants.forEach(function(c){c.audio&&b.add(c.audio);c.video&&b.add(c.video)});a.textStreams.forEach(function(c){return b.add(c)});a.thumbStreams.forEach(function(c){return b.add(c)});return Array.from(b)},km:function(a){return a.some(function(b){return _.Y.wd(b.fa,"EXT-X-ENDLIST")})},Nj:function(a){return _.Y.Ef(a).filter(_.Y.oi)},Xi:function(a){if(_.Y.bb(a,"EXT-X-ENDLIST"))return _.Wb;
a=_.Y.bb(a,"EXT-X-PLAYLIST-TYPE");if(!a)return"LIVE";if(a.value===_.Wb)return _.Wb;if("EVENT"===a.value)return"EVENT";throw new _.N(_.O,4,4044,"Invalid EXT-X-PLAYLIST-TYPE value: "+a.value);},Jh:function(a){a={AUDIO:_.Pc,VIDEO:_.Jg,SUBTITLES:_.pj,"CLOSED-CAPTIONS":_.pj}[a.toUpperCase()];if(!a)throw new _.N(_.O,4,4044,"EXT-X-MEDIA tag has an invalid TYPE attribute.");return a},ol:function(a){var b=_.xj(a,_.Mb).toUpperCase();if(_.Y.Jh(b)!==_.pj)return null;a=a.getAttribute("FORCED");a=!(!a||!a.value||
"YES"!==a.value.toUpperCase());var c=_.hg;b===_.ta&&(c=_.dd);a&&(c=_.ke);return c},Ui:function(a,b,c){c=void 0===c?!1:c;var d=0,e=null;if(a){d=a.split("@");a=Number(d[0]);if(0>=a)throw new _.N(_.O,4,4044,"Byte range length must be positive.");if(d[1]){if(d=Number(d[1]),0>d)throw new _.N(_.O,4,4044,"Byte range start byte must not be negative.");}else{if(c)throw new _.N(_.O,4,4044,"Invalid byte range, offset is required but missing.");if(null==b)throw new _.N(_.O,4,4044,"Invalid byte range, cannot calculate offset based on previous byte ranges.");
d=b+1}e=d+a-1}return{Da:d,oa:e}},Wi:function(a,b){var c=_.Y.bb(a,"EXT-X-BYTERANGE");return _.Y.Ui(c?c.value:null,b)},Ln:function(a){a=_.Y.hi(a,"EXTINF").value.split(",");return{duration:Number(a[0]),title:a[1]||null}},Yi:function(a,b){function c(f){return null==f?null:Number(f)}b=void 0===b?{}:b;var d={sh:!1,Sj:!1,Tj:null,lm:null,Zi:null},e=_.Y.bb(a,"EXT-X-SERVER-CONTROL",{required:b.gj});if(!e)return d;d.sh="YES"===_.P(e,"CAN-BLOCK-RELOAD");d.Sj="YES"===_.P(e,"CAN-SKIP-DATERANGES");d.Tj=c(_.P(e,
"CAN-SKIP-UNTIL"));d.lm=c(_.P(e,"HOLD-BACK"));d.Zi=c(_.P(e,"PART-HOLD-BACK",void 0,{required:b.gj}));return d},Vi:function(a,b,c){c=void 0===c?!1:c;a=_.P(a,"BYTERANGE");return _.Y.Ui(a,b,c)},Pn:function(a){var b=_.Y.pc(a,_.La),c=_.Y.pc(a,_.Ma);a=_.Y.pc(a,"EXT-X-IMAGE-STREAM-INF");return{Pc:{nh:_.Y.gg(b,[_.ja,_.Vb]),closedCaptions:_.Y.gg(b,_.ta),zo:_.Y.gg(b,_.Db)},Ge:c,jg:a}},ql:function(a,b){var c=_.Y.Wi(a.fa,null);return new _.Aj(0,0,0,function(){return[a.a]},c.Da,c.oa,0,b)},bm:function(a){var b=
a.U;a=b[0].startTime;b=b[b.length-1].endTime;return{rc:a,hf:b,duration:b-a}},Zl:function(a){var b=Infinity,c=Infinity;_.Y.Nj(a).forEach(function(d){d=_.Y.bm(d);b=Math.min(b,d.rc);c=Math.min(c,d.duration)});return{rc:b,duration:c}},oi:function(a){return a.type===_.Pc||a.type===_.Jg},Bl:function(a){return a.filter(_.Y.oi)},Xl:function(a){return a.map(function(b){return _.Y.Zl(b).duration}).reduce(function(b,c){return b+c},0)},Ql:function(a,b){return a&&b?_.fq(a.drmInfos,b.drmInfos)?_.eq(a.drmInfos,
b.drmInfos):null:a?a.drmInfos:b?b.drmInfos:null},sl:function(a,b){return(b?b.dc():"")+" - "+(a?a.dc():"")},Kh:function(a){return(a.video?a.video.zc:"")+" - "+(a.audio?a.audio.zc:"")},On:function(a,b,c,d,e){if(b===_.Wb)return{delay:0,Ee:0};b=_.Y.bb(a,"EXT-X-PART-INF");if(c&&b)return e=Number(_.xj(b,"PART-TARGET")),null!=d?{delay:d,Ee:e}:{delay:_.Y.Yi(a,{gj:!0}).Zi,Ee:e};a=_.Y.hi(a,"EXT-X-TARGETDURATION");a=Number(a.value);e=e||a;return null!=d?{delay:d,Ee:e}:{delay:3*a,Ee:e}},We:function(a,b){return a+
":"+b},Do:function(a){var b=_.Y.We,c=new Map;a.forEach(function(d){var e=b(d.a(),d.f());c.has(e)?(e=c.get(e),e.includes(d)||e.push(d)):c.set(e,[d])});return c},ci:function(a){return _.Cj(a||_.wg)},Hn:function(a){var b=new Map;a=_.u(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=_.P(c,_.ab);d=_.Y.ci(d);var e=_.xj(c,_.Sa);c=_.xj(c,"INSTREAM-ID");b.has(e)||b.set(e,new Map);b.get(e).set(c,d)}return b},wl:function(a){return a.filter(function(b){return"mp4a.40.34"!==b})},Rn:function(a){if(!a.hasAttribute("FRAME-RATE")&&
!a.hasAttribute(_.Bb))return null;var b=_.P(a,"FRAME-RATE");a=_.P(a,_.Bb);var c=_.u(a?a.split("x"):[null,null]);a=c.next().value;c=c.next().value;return{frameRate:Fj(b),width:Fj(a),height:Fj(c)}},zm:function(a){return a.name!==_.La?!0:_.P(a,_.Mb)===_.Db},In:function(a,b,c,d){var e=_.P(a,"ID"),f=_.P(a,"START-DATE");if(null===e||null===f)return _.Y.g.warn("Invalid  EXT-X-DATERANGE missing mandatory ID or START-DATE attribute, ignoring the EXT-X-DATERANGE tag.",a),null;b=d?c-b:-b;var g=new Date(f);c=
g.getTime()/1E3+b;e={id:e,startTime:c,startDate:g,Df:f};f=Fj(_.P(a,_.Ja));void 0!==f&&0<=f&&(e.duration=f);d=Fj(_.P(a,"PLANNED-DURATION"));void 0!==d&&0<=d&&(e.plannedDuration=d);var h=_.P(a,"CLASS");null!==h&&(e.schemeIdUri=h);var l=_.P(a,"END-DATE");l=l?new Date(l):null;null!==l&&l.getTime()>=g.getTime()&&(e.endDate=l);g=_.Y.Gn(a)||{};var m=_.P(a,"CUE");m&&(g.CUE=m.split(","));if(Bj(h)){h=_.Y.Mn(a);if(null===h)return _.Y.g.warn("Invalid interstitial attributes, ignoring the EXT-X-DATERANGE tag.",
a),null;g=Object.assign(g,h)}_.L.Jc(g)&&(e.customAttributes=g);e.endTime=l?l.getTime()/1E3+b:f?c+f:d?c+d:c;e.type=_.Bi;return e},Gn:function(a){var b=a.attributes;if(null==b)return null;a={};b=_.u(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c.name.trim().startsWith("X-")&&(a[c.name]=c.value);return _.L.Jc(a)?a:null},Mn:function(a){var b=a.attributes;if(null==b)return null;a={};b=_.u(b);for(var c=b.next();!c.done;c=b.next())switch(c=c.value,c.name){case cc:a[cc]=c.value;break;case bc:a[bc]=
c.value;break;case fc:a[fc]=Fj(c.value);break;case dc:a[dc]=Fj(c.value);break;case "X-SNAP":a["X-SNAP"]=c.value.split(",");break;case ec:a[ec]=c.value.split(",")}return a[cc]&&a[bc]||!a[cc]&&!a[bc]?(_.Y.g.warn("Invalid EXT-X-DATERANGE Interstitial attributes X-ASSET-URI, X-ASSET-LIST"),null):_.L.Jc(a)?a:null},Th:function(a,b){if(!a)return null;var c=a.zc;return b.find(function(d){return d.dc()===c})||null},Zh:function(a){return(a=_.P(a,"CHANNELS"))?parseInt(a.split("/")[0],10):null}};_.Y.g=new _.J("clpp.hls.Utils");var Pj=function ow(a){var c;return _.Ch(ow,function(d){1==d.a&&(c=0);if(3!=d.a)return c<a?_.x(d,c,3):d.D(0);c++;return d.D(2)})};_.I("clpp.utils.BufferUtils",Mj);Mj.toArrayBuffer=Wj;Mj.toDataView=_.Vj;Mj.toInt32Array=_.Uj;Mj.toUint32Array=Tj;Mj.toUint16Array=Sj;Mj.toUint8Array=_.Oj;Mj.equal=Qj;_.Q={};_.Q.Ca=new _.J("clpp.utils.strings");_.Q.Aj=16E3;_.Q.fromCharCode=function(a){for(var b=_.Q.Aj,c="",d=0;d<a.length;d+=b)c+=String.fromCharCode.apply(null,a.subarray(d,d+b));return c};_.Q.ea=function(a){if(!a)return"";a=_.Oj(a);239===a[0]&&187===a[1]&&191===a[2]&&(a=a.subarray(3));if("TextDecoder"in window){a=(new TextDecoder).decode(a);if(a.includes("\ufffd"))throw Error(Oa);return a}a=escape(_.Q.fromCharCode(a));try{return decodeURIComponent(a)}catch(b){throw Error(Oa);}};
_.I("clpp.utils.strings.fromUtf8",_.Q.ea);
_.Q.Hc=function(a,b,c){if(!a)return"";var d=_.Q.Ca;if(!c&&0!==a.byteLength%2)throw d.error("Data has an incorrect length, must be even."),Error("Data does not seem to be UTF-16 encoded!");c=_.Oj(a);if(b&&255===c[0]&&254===c[1]||254===c[0]&&255===c[1])a=c.subarray(2);a instanceof ArrayBuffer?d=a:(c=new Uint8Array(a.byteLength),c.set(_.Oj(a)),d=c.buffer);a=Math.floor(a.byteLength/2);c=new Uint16Array(a);d=new DataView(d);for(var e=0;e<a;e++)c[e]=d.getUint16(2*e,b);return _.Q.fromCharCode(c)};
_.Q.de=function(a,b){if(_.L.ia(a))return a;var c="",d=!!b,e=_.Oj(a);239===e[0]&&187===e[1]&&191===e[2]?c=_.Q.ea(e):254===e[0]&&255===e[1]?c=_.Q.Hc(e.subarray(2),!1):255===e[0]&&254===e[1]&&(c=_.Q.Hc(e.subarray(2),!0));var f=function(g,h){return g.byteLength<=h||32<=g[h]&&126>=g[h]}.bind(null,e);_.Q.Ca.debug("Unable to find byte-order-mark, making an educated guess.");0===e[0]&&0===e[2]?c=_.Q.Hc(a,!1):0===e[1]&&0===e[3]?c=_.Q.Hc(a,!0):f(0)&&f(1)&&f(2)&&f(3)&&(c=_.Q.ea(a));if(c)return d&&(c=escape(c)),
c;throw Error("Unable to detect text encoding");};_.I("clpp.utils.strings.fromBytesAutoDetect",_.Q.de);_.Q.hb=function(a){if("TextEncoder"in window)return(new TextEncoder).encode(a);a=encodeURIComponent(a);a=unescape(a);for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b};_.I("clpp.utils.strings.toUtf8",_.Q.hb);_.Q.Gf=function(a,b){for(var c=new Uint8Array(2*a.length),d=new DataView(c.buffer),e=0;e<a.length;++e)d.setUint16(2*e,a.charCodeAt(e),b);return c.buffer};
_.I("clpp.utils.strings.toUtf16",_.Q.Gf);_.Q.Fd=function(a,b){var c=b||1,d=a.length,e=new ArrayBuffer(d*c),f;4===c?f=Tj(e):2===c?f=Sj(e):f=_.Oj(e);for(c=0;c<d;c++)f[c]=a.charCodeAt(c);return e};_.I("clpp.utils.strings.toByteArray",_.Q.Fd);_.Q.startsWith=function(a,b){return String.prototype.startsWith?a.startsWith(b):0===a.indexOf(b)};_.I("clpp.utils.strings.startsWith",_.Q.startsWith);
_.Q.endsWith=function(a,b){if(String.prototype.endsWith)return a.endsWith(b);var c=a.length-b.length,d=a.lastIndexOf(b,c);return-1!==d&&d===c};_.I("clpp.utils.strings.endsWith",_.Q.endsWith);_.Q.nf=function(a){return!!(a&&0<a.length)};_.Q.empty=function(a){return!a||0===a.length};_.Q.hp=function(a){return a.replace(/([A-Z])/g,"-$1").toLowerCase()};_.Q.kp=function(a){return a.replace(/-(\w)/g,function(b,c){return c.toUpperCase()})};
_.Q.Vf=function(a){if(void 0===a||null===a||""===a)return"";try{var b=Number(a);if(_.L.isNaN(b))return"";a="bps";1E3<=Math.abs(b)&&(a="Kbps",b/=1E3);1E3<=Math.abs(b)&&(a="Mbps",b/=1E3);return b.toFixed(2).replace(/[.,]00$/,"")+a}catch(c){return""}};_.I("clpp.utils.strings.bitrateToString",_.Q.Vf);
_.Q.xl=function(a,b){function c(h){return function(l,m){return d(h,m.length-1)}}function d(h,l){return h.length<l?d("0"+h,l):h}b=void 0===b?"%h:%mm:%ss":b;if(null===a||void 0===a)a=0;if(null===b||void 0===b)b="%h:%mm:%ss";var e=Math.floor(a/3600),f=Math.floor((a-3600*e)/60),g=Math.floor(a-3600*e-60*f);return b.replace(/(%h+)/,c(String(e))).replace(/(%m+)/,c(String(f))).replace(/(%s+)/,c(String(g)))};_.I("clpp.utils.strings.durationToString",_.Q.xl);
_.Q.zl=function(a,b){for(var c in b)if(b[c]===a)return c;return""};_.Q.jm=function(a){var b=0;if(0===a.length)return b;for(var c=0;c<a.length;c++)b=(b<<5)-b+a.charCodeAt(c),b|=0;return b};_.I("clpp.utils.strings.hashCode",_.Q.jm);_.Q.Go=function(a){_.Q.lj.innerHTML=a;return _.Q.lj.textContent};_.Q.lj=document.createElement("span");_.Q.Pg=function(a){a=a.replace(/<[^>]+>/gi,"");a=_.Q.Go(a);return a=a.replace(/<[^>]+>/gi,"")};_.Q.Fi=function(a){return a.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n")};var Xj=[403,401];_.I("clpp.net.DEFAULT_FATAL_STATUS_CODES",Xj);_.I("clpp.net.makeRequest",_.ck);_.bk=6;_.I("clpp.net.RequestType",{MANIFEST:1,SEGMENT:2,LICENSE:3,APP:4,TIMING:5,OTHER:_.bk,CONTENT_STEERING:7});_.kk.prototype.resolve=function(){};_.kk.prototype.reject=function(){};_.lk.prototype.abort=function(){this.a=!0;return this.A()};_.nk.prototype.destroy=function(){for(var a=[],b=_.u(this.a),c=b.next();!c.done;c=b.next())c=c.value,c.S["catch"](function(){}),a.push(c.abort());this.a=[];return Promise.all(a)};_.r=_.vk.prototype;_.r.uo=function(a){0<a?_.Jh("Rate limit set to "+a+"bps"):_.Jh("Rate limit disabled");this.l=a};_.r.release=function(){return this.o.destroy()};_.r.destroy=function(){this.w=!0;this.f=[];this.h=[];return this.o.destroy()};_.r.Qe=function(a){this.f.push(a)};_.r.fd=function(a){this.h.push(a)};_.r.Bf=function(a){this.f=this.f.filter(function(b){return b!==a})};_.r.ye=function(a){this.h=this.h.filter(function(b){return b!==a})};
_.r.fetch=function(a){var b=this;if(this.w)return new qv(Promise.reject(new _.N(1,1,7001,{url:a.uris[a.uriIndex],request:a})));this.l&&0<this.l&&(a.rateLimitBps=this.l);for(var c=[],d=_.u(this.f),e=d.next();!e.done;e=d.next())c.push(e.value);if(a.requestModifiers)for(d=_.u(a.requestModifiers),e=d.next();!e.done;e=d.next())c.push(e.value);a.requestModifiers=c;zk(this,a);c=[];d=_.u(this.h);for(e=d.next();!e.done;e=d.next())c.push(e.value);if(a.responseModifiers)for(d=_.u(a.responseModifiers),e=d.next();!e.done;e=
d.next())c.push(e.value);a.responseModifiers=c;d=c=new _.kk;try{var f={},g=_.u(a.requestModifiers);for(e=g.next();!e.done;f={Mf:f.Mf},e=g.next())f.Mf=e.value,d=d.then(function(n){return function(p){if(h.a)throw new _.N(_.O,1,7001,p?{url:p.uris[p.uriIndex],request:p}:null);return n.Mf(p)||p}}(f))["catch"](function(n){if(n instanceof _.N)throw n;throw new _.N(_.O,1,1006,null,n);});d=d.then(function(n){return{request:n,plugin:Ck(b,n)}});var h=new qv(d);g={};var l=_.u(a.responseModifiers);for(e=l.next();!e.done;g=
{Le:g.Le},e=l.next())g.Le=e.value,h.then(function(n){return function(p){function q(){if(h.a)throw new _.N(_.O,1,7001,p?{url:p.request.uris[p.request.uriIndex],request:p.request}:null);}q();var t=n.Le(p)||p;q();return t}}(g))["catch"](function(n){return function(p){if(p instanceof _.N&&p.data&&p.data.response){var q=n.Le(p.data.response);if(q&&q.then)return q.then(function(){return Promise.reject(p)})}return Promise.reject(p)}}(g))["catch"](function(n){if(n instanceof _.N)throw n;throw new _.N(_.O,
1,1007,null,n);});l={};var m=_.u(this.j);for(e=m.next();!e.done;l={Nf:l.Nf},e=m.next())l.Nf=e.value,h["catch"](function(n){return function(p){p instanceof _.N&&p.data&&p.data.response||n.Nf({uri:a.uris[a.uriIndex],data:(new Uint8Array(0)).buffer,status:-1,timeMs:0,headers:{},request:a});return Promise.reject(p)}}(l))["catch"](function(n){if(n instanceof _.N)throw n;throw new _.N(_.O,1,1007,null,n);});_.ok(this.o,h);c.resolve(a);return h}catch(n){return new qv(Promise.reject(n))}};
_.I("clpp.net.NetworkEngine",_.vk);_.vk.prototype.fetch=_.vk.prototype.fetch;_.vk.prototype.removeResponseModifier=_.vk.prototype.ye;_.vk.prototype.removeRequestModifier=_.vk.prototype.Bf;_.vk.prototype.addResponseModifier=_.vk.prototype.fd;_.vk.prototype.addRequestModifier=_.vk.prototype.Qe;_.vk.prototype.setRateLimit=_.vk.prototype.uo;var Gk;_.Dk.prototype.pa=function(a){return this.type===a.type&&this.channelsCount===a.channelsCount&&this.frameRate===a.frameRate&&this.trickPlay===a.trickPlay&&this.kind===a.kind&&this.label===a.label&&this.language===a.language&&this.mimeType===a.mimeType&&Ji(this.roles,a.roles)&&Ji(this.accessibility,a.accessibility,Kk)};_.Dk.prototype.toString=function(){return"Track type: "+this.type+" id: "+this.id+"\n        renditions size: "+this.renditions.length};_.I("clpp.Track",_.Dk);
_.Dk.prototype.toString=_.Dk.prototype.toString;_.I("clpp.Rendition",_.Lk);_.Ik=1;_.Fk=_.Jg;_.T=_.Pc;_.S="text";Gk=_.Je;_.pw={VIDEO:_.Fk,AUDIO:_.T,TEXT:_.S,METADATA:Gk};_.Dk.Type=_.pw;_.I("clpp.utils.url.queryString",_.Ok);Rk.prototype.h=function(a,b){var c=this,d,e,f,g,h,l,m;return _.H(function(n){switch(n.a){case 1:return d=null,_.C(n,2),_.x(n,Xk(c,a),4);case 4:d=n.f;_.uh(n,3);break;case 2:return e=_.E(n),c.g.warn("Failed to fetch playlist in order metadata from HLS playlist.",e.message),n["return"](Promise.resolve({}));case 3:f={};_.C(n,5);if(!b.enableHlsVideoTrackInfo){n.D(7);break}return _.x(n,Uk(c,d,a),8);case 8:g=n.f,f.renditions=g.renditions,f.mimeType=g.mimeType;case 7:_.uh(n,6);break;case 5:h=_.E(n),c.g.warn("Failed to parse video metadata from HLS playlist.",
h.message);case 6:return _.C(n,9),_.x(n,Wk(d),11);case 11:l=n.f;f.Pc=l;_.uh(n,10);break;case 9:m=_.E(n),c.g.warn("Failed to parse metadata from HLS playlist.",m.message);case 10:return n["return"](f)}})};_.dl=[];_.r=_.gl.prototype;_.r.Yf=function(){return!0};_.r.Il=function(a){return this.getVideoTracks().find(function(b){return _.L.pa(b,a,a&&Object.keys(a))})};_.r.El=function(a){return this.getAudioTracks().find(function(b){return _.L.pa(b,a,a&&Object.keys(a))})};_.r.Gl=function(a){return this.la().find(function(b){return _.L.pa(b,a,a&&Object.keys(a))})};_.r.Hl=function(a){return this.getVideoTracks().flatMap(function(b){return b.renditions}).find(function(b){return _.L.pa(b,a,a&&Object.keys(a))})};
_.r.Dl=function(a){return this.getAudioTracks().flatMap(function(b){return b.renditions}).find(function(b){return _.L.pa(b,a,a&&Object.keys(a))})};_.r.Fl=function(a){return this.la().flatMap(function(b){return b.renditions}).find(function(b){return _.L.pa(b,a,a&&Object.keys(a))})};_.I("clpp.TrackManager",_.gl);_.gl.prototype.isAbrEnabled=_.gl.prototype.va;_.gl.prototype.addTextTrack=_.gl.prototype.addTextTrack;_.gl.prototype.findTextRendition=_.gl.prototype.Fl;_.gl.prototype.findAudioRendition=_.gl.prototype.Dl;
_.gl.prototype.findVideoRendition=_.gl.prototype.Hl;_.gl.prototype.findTextTrack=_.gl.prototype.Gl;_.gl.prototype.findAudioTrack=_.gl.prototype.El;_.gl.prototype.findVideoTrack=_.gl.prototype.Il;_.gl.prototype.setTextRendition=_.gl.prototype.Hb;_.gl.prototype.setAudioRendition=_.gl.prototype.Gb;_.gl.prototype.setVideoRendition=_.gl.prototype.sb;_.gl.prototype.setTextTrack=_.gl.prototype.Xa;_.gl.prototype.setAudioTrack=_.gl.prototype.Ia;_.gl.prototype.setVideoTrack=_.gl.prototype.Ib;
_.gl.prototype.getTextTrack=_.gl.prototype.Ba;_.gl.prototype.getAudioTrack=_.gl.prototype.qa;_.gl.prototype.getVideoTrack=_.gl.prototype.La;_.gl.prototype.getLoadingTextRendition=_.gl.prototype.Nb;_.gl.prototype.getLoadingAudioRendition=_.gl.prototype.Mb;_.gl.prototype.getLoadingVideoRendition=_.gl.prototype.Ab;_.gl.prototype.getTextRendition=_.gl.prototype.Wa;_.gl.prototype.getAudioRendition=_.gl.prototype.Sa;_.gl.prototype.getVideoRendition=_.gl.prototype.ma;_.gl.prototype.getTextTracks=_.gl.prototype.la;
_.gl.prototype.getAudioTracks=_.gl.prototype.getAudioTracks;_.gl.prototype.getVideoTracks=_.gl.prototype.getVideoTracks;_.gl.prototype.canSelectVideoTracks=_.gl.prototype.Yf;var il=new Map,hl=1,ml=2,ll=3,kl=4;_.qw=(new Map).set(_.zd,_.zd).set("frameRate","framerate").set("bandwidth","bitrate").set(_.Yg,_.Yg).set(_.pe,_.pe).set("channelsCount","channels");_.I(yd,rl);rl.getInfo=_.sk;
var Bl=null,Al=null,Dl=new _.J(yd),Kl="android",Jl="ios",Pl="linux",Ll="osx",Ml="windows",Nl="tizen",Ol="webos",Il=_.xg,Sl=_.xg,Rl={windows:{os_version:/windows\s+?nt\s([\d.]+)/i,ie:/windows\s+?nt.+?trident\/[\d.]+.*rv:([\d.]+)/i,edge:/windows\s+?nt.+?edge?\/([\d.]+)/i,chrome:/windows\s+?nt.+?chrome\/([\d.]+)/i,firefox:/windows\s+?nt.+?firefox\/([\d.]+)/i,opera:/windows\s+?nt.+?opr\/([\d.]+)/i},osx:{os_version:/macintosh.+?([\d._]+)/i,safari:/macintosh.+?version\/([\d._]+).+?safari/i,edge:/macintosh.+?edge?\/([\d._]+)/i,
chrome:/macintosh.+?chrome\/([\d._]+)/i,firefox:/macintosh.+?firefox\/([\d._]+)/i,opera:/macintosh.+?opr\/([\d._]+)/i},unknown:{ie:/.+?trident\/([\d.]+)/i,edge:/.+?edge?\/([\d.]+)/i,safari:/.+?version\/([\d._]+).+?safari/i,chrome:/.+?chrome\/([\d._]+)/i,firefox:/.+?firefox\/([\d._]+)/i,opera:/.+?opr\/([\d._]+)/i},android:{os_version:/android.+?([\d._]+)/i,chrome:/android.+?chrome\/([\d._]+)/i,firefox:/android.+?firefox\/([\d._]+)/i,opera:/android.+?opr\/([\d._]+)/i},ios:{os_version:/(?:iPad|iPhone).+?([\d._]+)/i,
chrome:/.+?CriOS\/([\d._]+)/i,firefox:/.+?FxiOS\/([\d._]+)/i,safari:/.+?version\/([\d._]+).+?safari/i,opera:/.+?opr\/([\d._]+)/i},linux:{os_version:/linux.+?([\d._]+)/i,safari:/linux.+?version\/([\d._]+).+?safari/i,chrome:/linux.+?chrome\/([\d._]+)/i,firefox:/linux.+?firefox\/([\d._]+)/i,opera:/linux.+?opr\/([\d._]+)/i},tizen:{os_version:/tizen.+?([\d._]+)/i,safari:/linux.+?version\/([\d._]+).+?safari/i,chrome:/linux.+?chrome\/([\d._]+)/i,firefox:/linux.+?firefox\/([\d._]+)/i,opera:/linux.+?opr\/([\d._]+)/i},
webos:{os_version:/linux.+?([\d._]+)/i,safari:/linux.+?version\/([\d._]+).+?safari/i,chrome:/linux.+?chrome\/([\d._]+)/i,firefox:/linux.+?firefox\/([\d._]+)/i,opera:/linux.+?opr\/([\d._]+)/i}};_.w(Tl,_.gl);_.r=Tl.prototype;_.r.Yf=function(){return!_.xl()};
_.r.zg=function(a,b){var c=this,d,e,f,g,h,l,m,n,p,q,t,v,z,A,D,G,B,F;return _.H(function(M){if(1==M.a){if(!b)return c.g.warn(jb),M["return"]();d=b.track;if(!d)return c.g.warn(mb),M["return"]();e=a===_.T;f=a===_.Fk;g=a===_.S;h=e||f;l=b.target;if(m=c.h.find(function(R){return gm(R,d,a)}))return c.g.warn("Track from event already exists",d,m),M["return"]();n=Jk(a,d);p=im(d);if(g){if(d.kind===_.Je)return M["return"]();void 0!==d.id?q=c.o[d.id]:(t=Object.values(c.o),q=t.find(function(R){return gm(n,R,a)}));
n.kind&&"captions"===n.kind&&(n.mimeType=_.Hc);q&&(n.src=q.url,n.mimeType=q.mimeType)}else if(m=c.h.find(function(R){return R.type===a&&_.L.pa(R,n,["kind","label","language"])}))return m.id=d.id,p&&(c.g.debug(Ib+a+" track active"),c.a.set(a,m)),c.g.debug("Track from event seems to already exists, flipped native track to",d),M["return"]();_.C(M,2);v=new _.Lk(n.id,n);n.renditions.push(v);c.h.push(n);z=c.m.getConfiguration().safari;return Xl(c,a,z)?_.x(M,$l(c,n,z),5):Yl(c,a,z)?_.x(M,am(c,n,z),5):M.D(5)}if(2!=
M.a)return c.g.debug(a+" Track added",n),c.m.trigger(new _.K(_.sg)),A=dm(c,a).length,D=!(!l||!l.length),G=l&&l.length||0,B=function(){c.g.debug(Ib+a+" track active. Native track active: "+(p+". Number of tracks: ")+A,d);c.a.set(a,n)},p?B():1===A&&h&&(f?B():D&&1!==G||B()),_.uh(M,0);F=_.E(M);c.g.error("Error while converting track data",F);_.y(M)})};
_.r.Bg=function(a,b){if(b){var c=b.track;if(!c)this.g.warn(mb);else if(a===_.S&&c.kind!==_.Je){var d=this.h.find(function(e){return gm(e,c,a)});d&&(this.h.splice(this.h.indexOf(d),1),(this.a.get(a)||null)===d&&(this.a.set(a,null),km(this)),this.g.debug(a+" Track removed, id: ",d.id))}}else this.g.warn(jb)};
_.r.Ag=function(a,b){this.g.debug(a+" Track changed",b);a===_.S&&km(this);var c=cm(this,a);if(c)for(var d={Zc:0};d.Zc<c.length;d={Zc:d.Zc},++d.Zc)if(im(c[d.Zc])){if(d=this.h.find(function(e){return function(f){return gm(f,c[e.Zc],a)}}(d)))this.a.set(a,d),this.g.debug("Track change detected, id:",d.id),d===this.l.get(a)&&this.l.set(a,null),a===_.T?this.m.trigger(new _.K(_.Wc)):a===_.S&&this.m.trigger(new _.K(_.mg));break}};_.r.initialize=function(a){this.m=a;this.j=new Rk(a.getNetworkEngine())};
_.r.load=function(){this.A=!1;var a=bm(this,_.S);a&&(this.f.on(a,_.Bc,this.J),this.f.on(a,Lf,this.L),this.f.on(a,kd,this.K));if(a=bm(this,_.T))this.f.on(a,_.Bc,this.G),this.f.on(a,Lf,this.I),this.f.on(a,kd,this.H);if(a=bm(this,_.Fk))this.f.on(a,_.Bc,this.N),this.f.on(a,Lf,this.T),this.f.on(a,kd,this.P);this.f.one(this.m,cd,this.Rk.bind(this))};_.r.release=function(){this.A=!0;this.h=[];this.o={};this.a.clear();this.l.clear();this.f.release()};_.r.destroy=function(){this.release();this.m=null};
_.r.getVideoTracks=function(){return dm(this,_.Fk)};_.r.getAudioTracks=function(){return dm(this,_.T)};_.r.la=function(){return dm(this,_.S)};_.r.ma=function(){var a=this,b=this.a.get(_.Fk)||null;if(!b)return null;if(this.w){var c=b.renditions.find(function(d){return d.width===a.w.width&&d.height===a.w.height});if(c)return c}return b.renditions[0]||null};_.r.Sa=function(){return em(this,_.T)};_.r.Wa=function(){return em(this,_.S)};_.r.Ab=function(){return fm(this,_.Fk)};
_.r.Mb=function(){return fm(this,_.T)};_.r.Nb=function(){return fm(this,_.S)};_.r.La=function(){return this.a.get(_.Fk)||null};_.r.qa=function(){return this.a.get(_.T)||null};_.r.Ba=function(){return this.a.get(_.S)||null};_.r.Ib=function(a){hm(this,_.Fk,a)};_.r.Ia=function(a){hm(this,_.T,a)};_.r.Xa=function(a){hm(this,_.S,a)};_.r.sb=function(a){hm(this,_.Fk,a&&a.track)};_.r.Gb=function(a){hm(this,_.T,a&&a.track)};_.r.Hb=function(a){hm(this,_.S,a&&a.track)};
_.r.addTextTrack=function(a){var b=this,c;return _.H(function(d){return a.mimeType.match(/text\/vtt/)?(c="External_"+b.B++,b.o[c]=a,Ul(b,a,c),d.D(0)):_.x(d,Vl(b,a),0)})};_.r.va=function(){return 1>=this.getVideoTracks().flatMap(function(a){return a.renditions}).length};
_.r.Rk=function(){var a=this,b,c,d;return _.H(function(e){if(1==e.a){b=a.m.getConfiguration();jm(a,_.T,b.preferredAudioLanguage);c=cm(a,_.S);if(c.some(function(f){return im(f)}))return e.D(2);d=bm(a,_.S);return _.x(e,new Promise(function(f){a.f.one(d,kd,f);(new _.Xh(f)).ga(1)}),2)}if(a.A)return e["return"]();jm(a,_.S,b.preferredTextLanguage);_.y(e)})};Tl.prototype.isAbrEnabled=Tl.prototype.va;Tl.prototype.addTextTrack=Tl.prototype.addTextTrack;Tl.prototype.setTextRendition=Tl.prototype.Hb;
Tl.prototype.setAudioRendition=Tl.prototype.Gb;Tl.prototype.setVideoRendition=Tl.prototype.sb;Tl.prototype.setTextTrack=Tl.prototype.Xa;Tl.prototype.setAudioTrack=Tl.prototype.Ia;Tl.prototype.setVideoTrack=Tl.prototype.Ib;Tl.prototype.getTextTrack=Tl.prototype.Ba;Tl.prototype.getAudioTrack=Tl.prototype.qa;Tl.prototype.getVideoTrack=Tl.prototype.La;Tl.prototype.getLoadingTextRendition=Tl.prototype.Nb;Tl.prototype.getLoadingAudioRendition=Tl.prototype.Mb;Tl.prototype.getLoadingVideoRendition=Tl.prototype.Ab;
Tl.prototype.getTextRendition=Tl.prototype.Wa;Tl.prototype.getAudioRendition=Tl.prototype.Sa;Tl.prototype.getVideoRendition=Tl.prototype.ma;Tl.prototype.getTextTracks=Tl.prototype.la;Tl.prototype.getAudioTracks=Tl.prototype.getAudioTracks;Tl.prototype.getVideoTracks=Tl.prototype.getVideoTracks;Tl.prototype.canSelectVideoTracks=Tl.prototype.Yf;_.r=_.lm.prototype;_.r.start=function(a){if(this.f)return this.f.start(a);if(a<this.a.length)return this.a[a].start;throw Error(Nb);};_.r.end=function(a){if(this.f)return this.f.end(a);if(a<this.a.length)return this.a[a].end;throw Error(Nb);};_.r.Zb=function(){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)};_.r.Ra=function(){return!this.length||1===this.length&&1E-6>this.end(0)-this.start(0)?null:this.end(this.length-1)};
_.r.Mc=function(a,b,c){b=void 0===b?!0:b;c=void 0===c?0:c;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};
_.r.$a=function(a,b){b=void 0===b?!1:b;if(!this.length||1===this.length&&1E-6>this.end(0)-this.start(0))return 0;var c=0;if(b){var d=this.Ra();null!=d&&(c=Math.max(0,d-a))}else for(d=this.length-1;0<=d&&this.end(d)>a;--d)c+=this.end(d)-Math.max(this.start(d),a);return c};_.r.toString=function(){for(var a="",b=0;b<this.length;b++)0<b&&(a+=" "),a+=this.start(b).toFixed(3)+"-"+this.end(b).toFixed(3);return a};_.I("clpp.BufferInfo",_.lm);_.lm.prototype.bufferedAheadOf=_.lm.prototype.$a;
_.lm.prototype.isBuffered=_.lm.prototype.Mc;_.lm.prototype.bufferEnd=_.lm.prototype.Ra;_.lm.prototype.bufferStart=_.lm.prototype.Zb;_.lm.prototype.end=_.lm.prototype.end;_.lm.prototype.start=_.lm.prototype.start;_.r=_.mm.prototype;_.r.addEventListener=function(a,b){this.on(a,b)};_.r.removeEventListener=function(a,b){this.off(a,b)};_.r.on=function(a,b,c){return this.be.on(a,b,c)};_.r.one=function(a,b,c){return this.be.one(a,b,c)};_.r.off=function(a,b){return this.be.off(a,b)};_.r.forwardEventsTo=function(a){a&&(0<=this.Zd.indexOf(a)||this.Zd.push(a))};_.r.dispatchEvent=function(a){this.trigger(a);return a.defaultPrevented};
_.r.stopForwardingEventsTo=function(a){a&&(a=this.Zd.indexOf(a),0<=a&&this.Zd.splice(a,1))};_.r.trigger=function(a){this.be.trigger(a);for(var b=_.u(this.Zd),c=b.next();!c.done;c=b.next())c.value.dispatchEvent(a)};_.mm.prototype.off=_.mm.prototype.off;_.mm.prototype.one=_.mm.prototype.one;_.mm.prototype.on=_.mm.prototype.on;_.mm.prototype.removeEventListener=_.mm.prototype.removeEventListener;_.mm.prototype.addEventListener=_.mm.prototype.addEventListener;var nm=["play() failed because the user didn't interact","The play method is not allowed by the user agent","The request is not allowed by the user agent or the platform"];_.I("clpp.version",_.ia);_.I("clpp.name",_.xa);_.Zl="application/x-mpegurl";_.I("clpp.Type",{DASH:_.Ic,HLS:_.Zl,SMOOTH_STREAMING:_.Nc,MP4:_.Lg,MP3:"audio/mp3"});_.Ci="scte35";_.Bi="hls-daterange";_.I("clpp.TimelineCueType",{SCTE35:_.Ci,DASH_CALLBACK:_.Pe,HLS_DATERANGE:_.Bi,UNKNOWN:_.xg});_.I("clpp.SpeedUpMode",{DECODER:_.Md,SEEK:"seek"});_.I("clpp.CodecSwitchingStrategy",{PREVENT:_.Af,SMOOTH:_.Zf});_.I("clpp.utils.PlayerConfiguration",pm);pm.create=_.vm;var rw=["abort",bd,cd,de,"emptied",fe,_.he,_.ie,"interruptbegin","interruptend",_.Ce,_.De,Ee,"mozaudioavailable",_.bf,_.ff,_.rf,_.Df,_.If,_.Tf,_.Uf,$f,"suspend",_.rg,"volumechange",_.Rg,_.Sg,_.Nf,Xg,Wg,Ug,Vg];_.w(_.xm,_.mm);_.r=_.xm.prototype;_.r.init=function(a,b){this.configuration=this.jb=b;this.G=a;this.log.info("Initializing Player surface");var c=this.G.getMedia();this.log.info("Attaching media element listeners");for(var d=_.u(rw),e=d.next();!e.done;e=d.next())e=e.value,this.P.on(c,e,this.vj,e!==_.ie);this.Pd||(this.Pd=this.Lh());this.Pd.initialize(this);this.G.showMediaElement()};_.r.release=function(){this.T&&(this.T.destroy(),this.T=null);return Promise.resolve()};
_.r.destroy=function(){this.P.release();return this.Ig.release()};_.r.canPlay=function(a,b){return _.Rh[this.namespace()].canPlay(a,b)};_.r.getTimeline=function(){return null};_.r.setupPlaylist=function(){return Promise.reject(_.ob)};_.r.appendLoad=function(){return Promise.reject(_.ob)};_.r.seekWith=function(){return Promise.reject(_.ob)};_.r.detach=function(){return Promise.resolve()};_.r.setSeekInterceptor=function(){};_.r.setPlaybackSessionId=function(){};_.r.getBandwidthEstimate=function(){return null};
_.r.play=function(){var a=this;if(!this.ba)return Promise.reject("No sources specified yet. You need to load content before calling play.");var b=this.G.getMedia().play();return Promise.resolve(b)["catch"](function(c){a.log.info("Caught play promise exception",c);var d={name:c.name||"",message:c.message||"",stack:c.stack||""};om(d)?(a.trigger(new _.K(_.Xc)),a.log.warn(_.oa)):d.name===pb&&a.log.warn('Unrecognized "NotAllowedError" on play(). '+(c.name+": "+c.message));throw c;})};
_.r.pause=function(){var a=this;return this.ba?new Promise(function(b,c){var d=a.getState();if(d!==_.yq&&d!==_.Aq&&d!==_.Hq&&d!==_.Gq)c(new _.N(_.O,7,3201,"The player state does not allow pause."));else if(a.G.getMedia().pause(),a.getState()===_.Hq)a.P.one(a,_.bg,function(){b()});else b()}):Promise.reject(new _.N(_.O,7,3201,"No sources specified yet. You need to load content before calling pause."))};_.r.isPaused=function(){return this.G.getMedia().paused};_.r.isEnded=function(){return this.G.getMedia().ended};
_.r.getConfiguration=function(){return this.configuration};_.r.setDrmCustomDataModifier=function(a){this.sd=a};_.r.setCdnErrorCallback=function(a){this.cd=a};_.r.ud=function(){return this.sd};_.r.getSurface=function(){return this.G};_.r.getBufferInfo=function(a){var b=this.getSurface().getMedia();return new _.lm(b?b.buffered:void 0,a)};_.r.getPosition=function(){return this.getMediaPosition()};
_.r.getMediaPosition=function(){var a=this.G.getMedia();if(a)return a.currentTime;this.log.warn("No media element available, can not report current time!");return 0};
_.r.seek=function(a){var b=this,c=this.getMediaPosition();if(void 0===a||null===a||typeof a!==_.k||a===c)return Promise.resolve();var d=this.G.getMedia();if(!d)return this.log.warn("No media element available, can not set current time!"),Promise.reject();var e=a-c;return.1>=Math.abs(e)?(this.log.info("Skip seek. Delta "+Math.abs(e)+" \x3c 0.1"),Promise.resolve()):new Promise(function(f,g){function h(){if(d.readyState>HTMLMediaElement.HAVE_NOTHING)m();else b.P.one(d,_.De,m)}function l(n){var p=b.getMediaPosition(),
q=.1>=Math.abs(a-p),t=.25<p-a,v=d.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA,z=n.type===_.Tf,A=n.type===_.Df,D=n.type===_.rg,G=A&&v;t=z||q&&G||D&&t;b.log.debug("Checking seeking state after "+n.type+" event. Seek completed:",t,"Current Time:",p,"Target Time:",a,"Native Event:",z,"Time reached",q,"Timeupdate:",D,"Progress:",A,"ReadyState:",v,"Progress Ready:",G);t?(b.Rg=!1,b.re=!1,b.P.off(d,_.Tf,l),b.P.off(d,_.rg,l),b.P.off(d,_.Df,l),b.Ri(),b.trigger(new _.K(_.Bg)),f()):A&&c===p&&(b.log.debug("Seek seemed to have been ignored. Trying again"),
d.currentTime=a)}function m(){b.trigger(new _.K(_.Cg));b.P.on(d,_.Tf,l);b.P.on(d,_.rg,l);b.P.on(d,_.Df,l);b.log.info("Seeking to "+a+". Delta "+e);b.Rg=!0;b.re=!0;d.currentTime=a}b.getState()===_.tq?(b.log.debug("Player is in IDLE state. Postpone seek."),b.P.one(b,_.bg,function(){switch(b.getState()){case _.yq:case _.Hq:case _.Gq:b.log.debug("Valid seek state reached.");h();break;default:b.log.warn("Invalid seek target state. Aborting seek"),g()}})):h()})};
_.r.getVolume=function(){var a=this.G.getMedia();if(a)return a.volume;this.log.warn("No media element available, can not report volume!");return null};_.r.setVolume=function(a){var b=this.G.getMedia();b?_.L.wa(a)?0>a||1<a?this.log.warn(va+a+".\n          Value must be between 0 and 1."):b.volume=a:this.log.warn(va+a+". Volume must be a number"):this.log.warn("No media element available, can not set volume !")};_.r.isMuted=function(){return this.G.getMedia().muted};
_.r.setMuted=function(a){var b=this.G.getMedia();typeof a===_.Zc&&(b.muted=a)};_.r.getDuration=function(){return this.getMediaDuration()};_.r.getMediaDuration=function(){return this.ba?this.G.getMedia().duration:-1};_.r.getTrackManager=function(){return this.Pd};_.r.getPlaybackRate=function(){var a=this.G.getMedia();return a&&a.playbackRate||1};_.r.setPlaybackRate=function(a){var b=this.G.getMedia();void 0!==a&&b&&(b.playbackRate=a)};_.r.setSourceIndex=function(a){this.ef=a};_.r.getSourceIndex=function(){return this.ef};
_.r.getLoadedSource=function(){return this.ba&&-1!==this.ef?this.ba[this.ef]:null};_.r.getPeriods=function(){return[]};_.r.getNetworkEngine=function(){return this.Ig};_.r.setNetworkEngine=function(a){this.Ig=a};_.r.setCmsdManager=function(a){this.Fg=a};_.r.getTextDisplayer=function(){return this.T};_.r.getTimelineCues=function(){return[]};_.r.getCueTimeline=function(){return null};_.r.resetAbr=function(){};
_.r.bo=function(a){var b=this.getSurface().getMedia(),c=this.getPosition(),d="Received Video Element Event: '"+a.type+"' with playhead at: "+c;if(a.type===_.rg||a.type===_.Df)this.fh.debug(d);else{var e="";switch(a.type){case _.If:e="Rate: "+this.getPlaybackRate();break;case de:e="Duration: "+this.getDuration();break;case "volumechange":e="Volume: "+this.getVolume()+" Muted: "+this.isMuted();break;case _.ff:case _.rf:case "suspend":case _.Rg:case $f:case _.Uf:case _.Tf:case _.rg:case _.Df:case bd:case cd:b=
this.getBufferInfo().$a(c);e="State "+this.getSurface().getMedia().readyState+" Buffer: "+b;break;case _.Nf:null!=b&&(e="Size: "+b.videoWidth+"x"+b.videoHeight)}e&&(d+=". "+e);this.fh.info(d)}a.type!==_.ie&&this.trigger(new _.K(a.type,{detail:a}))};_.r.Ri=function(){};var Am;Am=new _.J("clpp.Components");_.ym=new Map;_.I("clpp.install",function(a){Im(a)});_.I("clpp.uninstall",function(a){Jm(a)});_.I("clpp.utils.Uint8ArrayUtils",Km);Km.toStandardBase64=_.Lm;Km.concat=_.Rm;Km.equal=_.Qm;Km.toHex=_.Pm;Km.fromHex=_.Om;Km.fromBase64=_.Nm;Km.toBase64Url=_.Mm;Sm.prototype.release=function(){this.a=this.f=null};_.I("clpp.drm.WidevineRobustnessLevel",{SW_SECURE_CRYPTO:_.Eb,SW_SECURE_DECODE:_.Fb,HW_SECURE_CRYPTO:Ua,HW_SECURE_DECODE:Va,HW_SECURE_ALL:Ta});_.I("clpp.drm.PlayreadyRobustnessLevel",{SL150:"150",SL2000:"2000",SL3000:"3000"});_.I("clpp.drm.KeySystem",{NONE:_.Qe,CLEAR_KEY:_.$e,WIDEVINE:_.Gd,PLAYREADY:_.Ed,FAIRPLAY:_.Cd,PRIMETIME:_.Bd});_.Vm={};_.I("clpp.drm.registerDrmEnvironment",_.Wm);var Zm={V1_STAGING:[10,191,2,8,3,18,16,40,112,52,84,192,8,246,54,24,173,231,68,61,182,196,200,24,139,231,249,144,5,34,142,2,48,130,1,10,2,130,1,1,0,181,33,18,184,208,93,2,63,204,93,149,226,194,81,193,198,73,180,23,124,216,210,190,239,53,91,176,103,67,222,102,30,61,42,188,49,130,183,153,70,213,95,220,8,223,233,84,7,129,94,154,98,116,179,34,162,199,245,224,103,187,95,10,192,122,137,212,90,234,148,178,81,111,7,91,102,239,129,29,13,38,225,185,166,184,148,242,185,133,121,98,170,23,28,79,102,99,13,62,76,
96,39,24,137,127,94,30,249,182,170,245,173,77,186,42,126,20,23,109,241,52,161,211,24,91,90,33,138,192,90,76,65,240,129,239,255,128,163,160,64,197,11,9,187,199,64,238,220,216,241,77,103,90,145,152,15,146,202,125,220,100,106,6,173,173,81,1,247,74,14,73,140,192,31,0,83,43,172,33,120,80,189,144,94,144,146,54,86,183,223,239,239,66,72,103,103,243,62,246,40,61,79,66,84,171,114,88,147,144,190,229,88,8,241,214,104,8,13,69,216,147,194,188,162,247,77,96,160,192,208,160,153,60,239,1,96,71,3,51,76,54,56,19,148,
134,188,157,175,36,253,103,160,127,154,217,67,2,3,1,0,1,58,18,115,116,97,103,105,110,103,46,103,111,111,103,108,101,46,99,111,109,18,128,3,152,62,48,53,38,117,244,11,167,21,252,36,155,218,229,212,172,114,73,162,102,101,33,228,54,85,115,149,41,114,31,248,128,224,170,239,197,226,123,201,128,218,234,218,191,63,195,134,208,132,160,44,130,83,120,72,204,117,63,244,151,176,17,167,218,151,120,138,0,226,170,107,132,205,125,113,192,122,72,235,246,22,2,204,165,163,243,32,48,167,41,92,48,218,145,91,145,220,24,
185,188,149,147,184,222,139,181,15,13,237,193,41,56,184,233,224,57,205,222,24,250,130,232,27,176,50,99,15,233,85,216,90,86,108,225,84,48,11,246,212,193,189,18,105,102,53,107,40,125,101,123,24,206,99,208,239,212,95,197,38,158,151,234,177,28,181,99,229,86,67,178,111,244,159,16,156,33,1,175,202,243,91,131,47,40,143,13,157,69,150,14,37,158,133,251,93,36,219,210,207,130,118,76,93,217,191,114,126,251,233,200,97,248,105,50,31,106,222,24,144,95,77,146,249,166,218,101,54,219,132,117,135,29,22,142,135,11,178,
48,60,247,12,110,151,132,201,61,45,232,69,173,130,98,190,126,13,78,46,74,7,89,206,248,45,16,157,37,146,199,36,41,248,192,23,66,186,226,179,222,202,219,195,60,62,95,75,175,94,22,236,183,78,173,186,252,183,198,112,95,122,158,59,111,57,64,56,63,156,81,22,210,2,162,12,146,41,238,150,156,37,25,113,131,3,181,13,1,48,195,53,46,6,176,20,216,56,84,15,138,12,34,124,0,17,224,245,179,142,78,41,142,210,203,48,30,180,86,73,101,245,92,93,121,117,122,37,10,78,185,200,74,179,230,83,159,107,111,223,86,137,158,162,
153,20],V1_PROD:[10,193,2,8,3,18,16,23,5,185,23,204,18,4,134,139,6,51,58,47,119,42,140,24,130,180,130,146,5,34,142,2,48,130,1,10,2,130,1,1,0,153,237,91,59,50,125,171,94,36,239,195,182,42,149,181,152,82,10,213,188,203,55,80,62,6,69,184,20,216,118,184,223,64,81,4,65,173,140,227,173,177,27,184,140,78,114,90,94,74,158,7,149,41,29,88,88,64,35,167,225,175,14,56,169,18,121,57,48,8,97,11,111,21,140,135,140,126,33,191,251,254,234,119,225,1,158,30,87,129,232,164,95,70,38,61,20,230,14,128,88,168,96,122,220,
224,79,172,132,87,177,55,168,214,124,205,235,51,112,93,152,58,33,251,78,236,189,74,16,202,71,73,12,164,126,170,93,67,130,24,221,186,241,202,222,51,146,241,61,111,251,100,66,253,49,225,191,64,176,198,4,209,196,186,76,149,32,164,191,151,238,189,96,146,154,252,238,245,91,186,245,100,226,208,231,108,215,197,92,115,160,130,185,150,18,11,131,89,237,206,36,112,112,130,104,13,111,103,198,216,44,74,197,243,19,68,144,167,78,236,55,175,75,47,1,12,89,232,40,67,226,88,47,11,107,159,93,176,252,94,110,223,100,251,
211,8,180,113,27,207,18,80,1,156,159,90,9,2,3,1,0,1,58,20,108,105,99,101,110,115,101,46,119,105,100,101,118,105,110,101,46,99,111,109,18,128,3,174,52,115,20,181,168,53,41,127,39,19,136,251,123,184,203,82,119,210,73,130,60,221,209,218,48,185,51,57,81,30,179,204,189,234,4,185,68,185,39,193,33,52,110,253,189,234,201,212,19,145,126,110,193,118,161,4,56,70,10,80,59,193,149,43,155,164,228,206,15,196,191,194,10,152,8,170,175,75,252,209,156,29,207,205,245,116,204,172,40,209,180,16,65,108,249,222,136,4,48,
28,189,179,52,202,252,208,212,9,120,66,58,100,46,84,97,61,240,175,207,150,202,74,146,73,216,85,228,43,58,112,62,241,118,127,106,155,211,109,107,248,43,231,107,191,12,186,79,222,89,210,171,204,118,254,182,66,71,184,92,67,31,188,165,34,102,182,25,252,54,151,149,67,252,169,203,189,187,250,250,14,26,85,231,85,163,199,188,230,85,249,100,111,88,42,185,207,112,170,8,185,121,248,103,246,58,11,43,127,219,54,44,91,196,236,213,85,216,91,202,169,197,147,195,131,200,87,212,157,170,183,126,64,183,133,29,223,210,
73,152,128,142,53,178,88,231,93,120,234,192,202,22,247,4,115,4,194,13,147,237,228,232,255,28,111,23,230,36,62,63,61,168,252,23,9,135,14,196,95,186,130,58,38,63,12,239,161,247,9,59,25,9,146,131,38,51,55,5,4,58,41,189,166,249,180,52,44,200,223,84,60,177,161,24,47,124,95,255,51,241,4,144,250,202,91,37,54,11,118,1,94,156,90,6,171,142,224,47,0,210,232,213,152,97,4,170,204,77,212,117,253,150,238,156,228,227,38,242,27,131,199,5,133,119,179,135,50,205,218,188,106,107,237,19,251,13,73,211,138,69,235,135,165,
244],V2:[10,187,2,8,3,18,16,160,220,209,96,48,44,4,19,213,32,118,162,12,129,36,76,24,191,132,241,238,5,34,142,2,48,130,1,10,2,130,1,1,0,188,93,207,198,77,28,25,14,217,103,5,56,106,241,93,252,216,61,104,36,3,52,23,246,32,9,11,77,12,188,251,189,53,137,249,11,36,52,104,185,13,221,170,204,238,44,227,192,167,199,144,75,188,190,7,211,16,145,75,13,132,119,167,164,29,39,107,69,76,50,161,131,132,248,207,237,214,130,27,113,204,37,77,14,232,248,26,85,213,126,147,7,183,241,23,44,117,142,192,109,70,192,86,166,
21,58,231,13,118,215,58,166,74,44,51,103,50,120,198,197,213,64,34,105,66,115,72,235,88,51,28,238,54,93,147,140,187,28,173,50,109,5,234,155,141,29,52,234,135,38,55,103,111,116,98,171,210,13,211,129,249,70,57,64,155,151,38,8,225,188,229,3,247,234,26,46,91,211,250,252,38,87,111,205,37,108,74,168,112,74,116,191,73,170,243,167,54,36,20,23,72,67,35,181,159,241,102,250,221,22,18,92,161,54,236,172,183,214,18,160,199,92,46,171,180,211,90,64,62,144,121,201,77,74,211,17,244,49,124,244,120,116,148,234,184,79,
136,12,176,34,231,39,149,87,28,219,2,3,1,0,1,58,12,99,97,115,116,108,97,98,115,46,99,111,109,64,1,18,128,3,50,97,151,165,120,63,210,172,84,187,10,36,166,202,149,32,118,107,37,251,186,217,170,254,4,95,20,85,66,157,43,154,24,66,136,147,101,223,78,204,173,228,175,111,100,168,97,164,222,84,160,51,79,233,227,223,105,252,85,11,242,129,199,206,11,9,236,118,163,118,204,179,159,69,108,223,229,114,176,8,26,36,9,23,103,233,62,55,162,154,209,96,98,102,80,173,114,233,213,36,56,135,65,188,245,176,95,70,189,199,
143,81,72,182,124,207,225,238,28,172,144,110,89,44,12,137,51,52,239,130,117,119,15,207,200,229,142,166,8,80,79,111,255,191,70,47,189,108,75,234,184,241,119,21,255,98,167,124,132,30,239,102,113,7,132,96,39,134,123,220,209,255,110,222,35,147,0,77,125,253,129,139,66,158,126,221,13,117,113,163,143,235,9,130,180,3,133,94,152,45,199,69,168,182,95,122,82,25,203,10,99,191,186,193,238,225,224,140,156,142,171,110,26,214,32,240,6,218,138,10,47,114,133,17,1,151,43,213,223,198,210,186,81,18,50,221,84,177,180,
26,58,164,235,113,177,235,207,22,230,8,119,76,167,166,176,173,209,214,53,116,116,231,227,221,238,174,87,249,19,166,195,81,47,210,172,15,75,251,202,192,80,85,213,23,17,178,104,181,193,115,239,91,72,230,167,55,143,10,250,26,54,8,60,13,213,206,235,3,215,179,205,232,1,144,158,35,48,196,149,117,219,63,196,130,117,40,165,193,65,215,122,44,201,218,67,216,6,131,178,5,168,229,21,137,112,215,254,127,48,160,181,68,49,255,64,46,247,236,85,155,146,208,5,219,252,37,174,31,218,136,135,55,119,112]};_.an.prototype.fb=function(a,b){this.f[a]=b};_.I("clpp.drm.DrmEnvironment",_.an);_.an.prototype.setDrmSystem=_.an.prototype.fb;_.bn.prototype.getPosition=function(){return this.a};_.bn.prototype.Ta=function(){return this.f.byteLength};_.bn.prototype.seek=function(a){(0>a||a>=this.f.byteLength)&&_.cn();this.a=a};_.en.prototype.getPosition=function(){return this.a};_.en.prototype.Ta=function(){return this.f.byteLength};_.en.prototype.skip=function(a){this.a+a>this.f.byteLength&&_.gn();this.a+=a};_.en.prototype.seek=function(a){if(0>a||a>=this.f.byteLength)throw _.gn();this.a=a};_.I("clpp.utils.dataview.DataViewReader",_.en);_.r=_.pn.prototype;_.r.M=function(a,b){var c=tn(a);this.h[c]=sw;this.f[c]=b;return this};_.r.aa=function(a,b){var c=tn(a);this.h[c]=tw;this.f[c]=b;return this};_.r.stop=function(){this.a=!0};_.r.parse=function(a,b){var c=_.Oj(a);c=new _.en(new DataView(c.buffer,c.byteOffset,c.byteLength),!1);for(this.a=!1;_.fn(c)&&!this.a;)this.xf(0,c,b)};
_.r.xf=function(a,b,c){var d=b.getPosition(),e=_.kn(b),f=_.kn(b),g=!1;this.g.debug("Parsing MP4 box",_.un(f));switch(e){case 0:e=b.Ta()-d;break;case 1:e=_.mn(b),g=!0}var h=this.f[f];if(h){var l=null,m=null;this.h[f]===tw&&(m=_.kn(b),l=m>>>24,m&=16777215);f=b.getPosition()-d;var n=d+e;c&&n>b.Ta()&&(n=b.Ta());n-=b.getPosition();b=0<n?_.on(b,n):new Uint8Array(0);b=new _.en(new DataView(b.buffer,b.byteOffset,b.byteLength),!1);h({parser:this,partialOkay:c||!1,version:l,flags:m,reader:b,size:e,start:d+
a,headerSize:f,has64BitSize:g})}else a=Math.min(d+e-b.getPosition(),b.Ta()-b.getPosition()),b.skip(a)};_.I("clpp.utils.Mp4Parser",_.pn);_.pn.typeToString=_.un;_.pn.allData=_.sn;_.pn.sampleDescription=_.rn;_.pn.children=_.qn;_.pn.prototype.parseNext=_.pn.prototype.xf;_.pn.prototype.parse=_.pn.prototype.parse;_.pn.prototype.stop=_.pn.prototype.stop;_.pn.prototype.fullBox=_.pn.prototype.aa;_.pn.prototype.box=_.pn.prototype.M;_.pn.headerSize=_.vn;var sw=0,tw=1;_.I("clpp.utils.FairplayUtils",wn);wn.parseFairPlayResponse=_.Cn;wn.formatFairPlayRequest=_.Bn;wn.createFairplayPayload=An;wn.extractContentId=_.yn;wn.extractExtXKeyUri=xn;var Pn=new _.J("clpp.drm.DrmToday"),En="PRODUCTION",Fn="STAGING",Gn="DEMO",Hn="TEST",uw={PRODUCTION:En,STAGING:Fn,DEMO:Gn,TEST:Hn};_.I("clpp.drm.DrmToday.Environment",uw);_.I("clpp.drm.DrmToday.WidevineCertificates",{V1_PROD:"V1_PROD",V1_STAGING:"V1_STAGING",V2:"V2"});
for(var Jn="/license-proxy-widevine/cenc/",Kn="/license-proxy-headerauth/drmtoday/RightsManager.asmx",Mn="/license-server-fairplay/",Yn={"00000":"Success","01000":"General Internal Error","02000":"General Request Error","03000":"General Request Authentication Error",10001:"Bad Request",3E4:"General DRM error",4E4:"General Widevine Modular error",40001:"Widevine Device Certificate Revocation (wv 127)",40002:"Widevine Device Certificate Revocation - Permanently (wv 175)",41E3:"General Widevine Classic error",
42E3:"General Playready error",43E3:"General Fairplay error",44E3:"General OMA error",44001:"OMA Device registration failed",45E3:"General CDRM error",45001:"CDRM Device registration failed",6E4:"CSL",60001:"CSL - INVALID",60100:"CSL - Denied by Stream Limiting",7E4:"General Output Protection",70001:"All keys filtered by EOP settings",8E4:"TAKE DOWN",80001:"TAKE DOWN - Denied by Take Down",9E4:"General GBL error",90001:"License delivery prohibited in your region"},vw={video:[Ta,Va,Ua,_.Fb,_.Eb],audio:[Ta,
Va,Ua,_.Fb,_.Eb]},ww={video:["3000","2000","150"],audio:["2000","150"]},xw=_.u(Object.keys(uw)),yw=xw.next();!yw.done;yw=xw.next()){var Dn=yw.value,zw=Ha;Dn!==En&&(zw+="_"+Dn);var Aw=new _.an(zw),Bw=null;switch(Dn){case En:case Fn:case Gn:Bw=$m("V2");break;case Hn:Bw=null}Aw.fb(_.Gd,{licenseUrl:Nn(_.Gd),videoRobustness:vw.video,audioRobustness:vw.audio,persistentStateRequired:!1,distinctiveIdentifierRequired:!1,serverCertificate:Bw,modifiers:{licenseRequest:_.Sn,licenseResponse:_.Xn}});Aw.fb(_.Cd,
{licenseUrl:Nn(_.Cd),certificateUrl:In()+"/license-server-fairplay/cert/",modifiers:{licenseRequest:_.Un,licenseResponse:_.Vn,extractContentId:_.Qn,certificateRequest:_.Wn}});Aw.fb(_.Ed,{licenseUrl:Nn(_.Ed),videoRobustness:ww.video,audioRobustness:ww.audio,modifiers:{licenseRequest:Tn}});_.Wm(Aw)};_.ao.prototype.value=function(){void 0===this.a&&(this.a=this.f());return this.a};_.r=bo.prototype;_.r.getStatus=function(){return this.a};_.r.forEach=function(a){this.a&&a(this.a,Cw.value())};_.r.get=function(a){if(this.has(a))return this.a};_.r.has=function(a){var b=Cw.value();return this.a&&Qj(a,b)?!0:!1};_.r.entries=function(){};_.r.keys=function(){};_.r.values=function(){};var Cw=new _.ao(function(){return Wj(new Uint8Array([0]))});var eo=new _.ao(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,_.De],[HTMLMediaElement.HAVE_CURRENT_DATA,_.Ce],[HTMLMediaElement.HAVE_FUTURE_DATA,bd],[HTMLMediaElement.HAVE_ENOUGH_DATA,cd]])});_.r=go.prototype;_.r.Ue=function(a){this.f=a};_.r.Ud=function(a){var b=this.a;b&&b!==a&&jo(b,null);return(this.a=a)?jo(a,this.f):Promise.resolve()};_.r.bf=function(){return this.a};_.r.$b=function(a,b){_.Oh("AppleEmeManager.requestMediaKeySystemAccess");try{var c=new ho(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}};_.r.Td=function(){return Vp};ho.prototype.createMediaKeys=function(){var a=new io(this.keySystem);return Promise.resolve(a)};
ho.prototype.getConfiguration=function(){_.Oh("AppleEmeManager.MediaKeySystemAccess.getConfiguration");return this.a};io.prototype.createSession=function(a){a=void 0===a?jg:a;this.g.debug("Creating Apple MediaKeys Session");if(a!==jg)throw new TypeError("Session type "+a+ba);return new ko(this.h,"__session_"+this.j++)};io.prototype.setServerCertificate=function(){this.g.debug("AppleEmeManager.MediaKeys.setServerCertificate");return Promise.resolve(!1)};_.w(ko,_.mm);_.r=ko.prototype;
_.r.generateRequest=function(a,b){var c=this;if(this.l)return Promise.reject(Hb);this.g.debug("generateRequest");this.h=new _.kk;try{var d=this.o.createSession(_.Lg,_.Oj(b));this.a=d;this.sessionId=d.sessionId||this.sessionId||"";this.j.on(d,Wg,function(e){var f=c.keyStatuses.getStatus();c.g.debug("Received Key Message in "+c.sessionId);c.h&&(c.h.resolve(),c.h=null);e=new _.K(_.Ie,{messageType:void 0===f||f===cg?xe:we,message:Wj(e.message.buffer)});c.dispatchEvent(e)});this.j.on(d,Ug,function(e){c.g.debug("onWebkitKeyAdded_",
e);c.f&&(lo(c,"usable"),c.f.resolve(),c.f=null)});this.j.on(d,Vg,function(){var e=c.keyStatuses.getStatus();if(c.a&&c.a&&c.a.error&&c.a.error.code===WebKitMediaKeyError.MEDIA_KEYERR_DOMAIN&&e===cg)c.g.warn("Ignoring webkit key error for session "+c.sessionId);else if(c.g.error("Received key error in session "+c.sessionId+" with code "+(c.a.error.code+". Session Status ")+(e+".")),e=Error("EME AppleEmeManager key error"),e.errorCode=c.a.error,null!==c.h)c.h.reject(e),c.h=null;else if(null!==c.f)c.f.reject(e),
c.f=null;else switch(c.a.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:lo(c,"output-not-allowed");break;default:lo(c,_.te)}});lo(this,cg)}catch(e){this.h.reject(e)}return this.h};_.r.load=function(){this.g.debug(_.Be);return Promise.reject(Error("MediaKeySession.load not yet supported"))};_.r.update=function(a){if(this.l)return Promise.reject(Hb);this.g.debug(yg);this.f=new _.kk;try{this.a.update(_.Oj(a))}catch(b){this.f.reject(b)}return this.f};
_.r.close=function(){if(this.l)return this.closed;this.g.info("Closing Key Session "+this.sessionId);this.l=!0;try{this.a.close(),this.closed.resolve(),_.ki(this.j)}catch(a){this.closed.reject(a)}return this.closed};_.r.remove=function(){this.g.debug("remove");return Promise.reject(Error("MediaKeySession is only applicable for persistent licenses, which are not supported on this platform"))};mo.prototype.a=function(){return Vp};mo.prototype.f=function(){return!!window.WebKitMediaKeys};
mo.prototype.create=function(){return new go};_.r=no.prototype;_.r.Ue=function(a){this.a=a};_.r.Ud=function(a){return this.a?this.a.setMediaKeys(a):Promise.reject(gb)};_.r.bf=function(){return this.a&&this.a.mediaKeys};
_.r.$b=function(a,b){var c=this;this.g.info("Requesting media key system access for",a,b.map(function(d){return Object.assign({},d,{drmInfos:d.drmInfos.map(function(){return"_anonymous_"})})}));return navigator.requestMediaKeySystemAccess(a,b)["catch"](function(d){c.g.info("Failed to request media key system access for "+(a+"."),d);return Promise.reject(d)})};_.r.Td=function(){return zp};oo.prototype.a=function(){return zp};
oo.prototype.f=function(){return!!(window.MediaKeys&&navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)};oo.prototype.create=function(){return new no};_.r=po.prototype;_.r.Ue=function(a){this.a=a};_.r.Ud=function(a){_.Oh("WebkitEmeManager.setMediaKeys");if(!this.a)return Promise.reject(gb);var b=this.f;b&&b!==a&&uo(b,null);(this.f=a)&&uo(a,this.a);return Promise.resolve()};_.r.bf=function(){return this.f};_.r.$b=function(a,b){_.Oh("WebkitEmeManager.requestMediaKeySystemAccess");try{if(this.a)var c=this.a;else{var d=document.getElementsByTagName(_.Jg);c=d.length?d[0]:document.createElement(_.Jg)}var e=new qo(this.h,c,a,b);return Promise.resolve(e)}catch(f){return Promise.reject(f)}};
_.r.Td=function(){return Dw};qo.prototype.createMediaKeys=function(){return Promise.resolve(new ro(this.h,this.a))};qo.prototype.getConfiguration=function(){return this.f};ro.prototype.createSession=function(a){a=void 0===a?jg:a;if(a!==jg&&a!==_.df)throw new TypeError("Session type "+a+ba);if(!this.a)throw a=Error("Media element is missing."),a.name=Za,a.code=DOMException.INVALID_STATE_ERR,a;this.a.src||(this.a.src="about:blank");a=new vo(this.h,this.a,this.o,a);this.j.push(a);return a};
ro.prototype.setServerCertificate=function(){return Promise.resolve(!1)};_.w(vo,_.mm);_.r=vo.prototype;_.r.ready=function(){_.Oh("WebkitEmeManager.MediaKeySession.ready");to(this,"usable");this.a&&this.a.resolve();this.a=null};_.r.generateRequest=function(a,b){_.Oh("WebkitEmeManager.MediaKeySession.generateRequest");return xo(this,b,null)};_.r.load=function(a){_.Oh(Yb);return this.l===_.df?xo(this,null,a):Promise.reject(Error(nb))};_.r.update=function(a){_.Oh(Yb);var b=new _.kk;yo(this,b,a);return b};
_.r.close=function(){_.Oh("WebkitEmeManager.MediaKeySession.close");if(this.l!==_.df){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=wo(this,"cancelKeyRequest");try{this.j[a](this.h,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};_.r.remove=function(){_.Oh("WebkitEmeManager.MediaKeySession.remove");return this.l!==_.df?Promise.reject(Error(nb)):this.close()};zo.prototype.a=function(){return Dw};
zo.prototype.f=function(){return!(!HTMLMediaElement.prototype.webkitGenerateKeyRequest&&!HTMLMediaElement.prototype.generateKeyRequest)};zo.prototype.create=function(){return new po};_.r=Ao.prototype;_.r.Ue=function(){};_.r.Ud=function(a){_.Oh("NopEmeManager.setMediaKeys");return null===a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))};_.r.bf=function(){return null};_.r.$b=function(){_.Oh("NopEmeManager.requestMediaKeySystemAccess");return Promise.reject(Error("The key system specified is not supported."))};_.r.Td=function(){return Ew};Bo.prototype.a=function(){return Ew};Bo.prototype.f=function(){return!0};Bo.prototype.create=function(){return new Ao};_.I(vd,Co);var Eo=new _.J(vd),Do=[];Do=[new oo,new mo,new zo,new Bo].filter(function(a){return a.f()});var zp="STANDARD",Vp="APPLE",Dw="WEBKIT",Ew="NOP";Co.Apis={STANDARD:zp,APPLE:Vp,WEBKIT:Dw,NOP:Ew};_.r=_.Go.prototype;_.r.Ka=function(a,b){var c=this.$(a,b);return 1!==c.length?null:c[0]};_.r.ac=_.eh(2);_.r.$=function(a,b){return Array.from(a.childNodes).filter(function(c){return c instanceof Element&&c.tagName===b})};_.r.Fc=_.eh(4);_.r.getAttributeNS=function(a,b,c){return a.hasAttributeNS(b,c)?a.getAttributeNS(b,c):null};_.r.ra=function(a){return Array.from(a.childNodes).every(function(b){return b.nodeType===Node.TEXT_NODE||b.nodeType===Node.CDATA_SECTION_NODE})?a.textContent.trim():null};
_.r.W=_.eh(6);_.r.we=function(a,b){var c=new DOMParser,d=null;try{d=c.parseFromString(a,_.lg)}catch(e){}if(!d)return null;c=d.documentElement;return b&&c.tagName!==b||0<d.getElementsByTagName("parsererror").length?null:c};_.r.Ze=_.eh(8);_.r.md=_.eh(10);_.r.zf=_.eh(12);_.r.removeChild=function(a,b){a.removeChild(b)};_.r.kf=_.eh(14);_.r.jf=_.eh(16);_.r.Af=_.eh(18);_.r.De=_.eh(20);_.To=new _.Go;_.Fw=new _.J("clpp.xml.Parser");_.sm="dom";var Po;_.Xo=[154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149];Po=[237,239,139,169,121,214,74,206,163,200,39,220,213,29,33,237];_.w(Oo,Ho);_.w(_.So,Ho);var Zo=!!(performance&&performance.mark&&performance.measure),ap=new _.J("clpp.perf");cp.prototype.j=function(a){if(1<a.version)_.Jh("Unrecognized PSSH version found!");else{var b=_.Pm(_.on(a.reader,16)),c=[];if(0<a.version)for(var d=_.kn(a.reader),e=0;e<d;++e){var f=_.Pm(_.on(a.reader,16));c.push(f)}d=_.kn(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});a.reader.getPosition()!==a.reader.Ta()&&_.Jh("Mismatch between box size and data size!")}};_.r=_.gp.prototype;_.r.destroy=function(){var a=this;return _.H(function(b){if(1==b.a){if(a.j)return _.x(b,a.Ea,0);a.j=!0;return _.x(b,ip(a),4)}a.Ea.resolve();return b.D(0)})};_.r.keySystem=function(){return this.a?_.Np(this.a.keySystem):""};_.r.getDrmInfo=function(){return this.a};_.r.Qi=function(a){var b=this;return _.H(function(c){return b.H&&b.L===jp?c["return"]():!b.f.delayLicenseRequestUntilPlayed||b.C&&!b.C.paused||b.jb?_.x(c,aq(b,a),0):(b.ha.push(a),c.D(0))})};
_.r.Li=function(a){var b=this,c=a.target;this.g.info("Key status changed for session",c.sessionId);var d=this.h.get(c),e=!1;c.keyStatuses.forEach(function(g,h){if(typeof h===_.eg){var l=h;h=g;g=l}if(Up(b.a.keySystem)&&16===h.byteLength&&_.sl()){l=_.Vj(h);var m=l.getUint32(0,!0),n=l.getUint16(4,!0),p=l.getUint16(6,!0);l.setUint32(0,m,!1);l.setUint16(4,n,!1);l.setUint16(6,p,!1)}d&&g!==cg&&(d.loaded=!0);d&&d.qb&&d.qb.resolve();"expired"===g&&(e=!0);l=_.Oj(h);var q=_.Pm(l);"00"===q&&d&&d.keyId?q=d.keyId:
b.a.keySystem.startsWith(_.Cd)&&16!==l.byteLength&&(q=_.Q.fromCharCode(l));(l=q||"")?b.g.info($a+q+"': "+g):b.g.info("Key status global keys: "+g);b.o.set(l,g);d&&!d.keyId&&b.h.forEach(function(t,v){v===c||t.keyId!==q||t.loaded||(t.loaded=!0)})});d&&d.loaded&&d.vb.forEach(function(g){b.o.get(g)===cg&&(b.g.warn($a+g+ea),b.o.set(g,_.af))});for(a=0;a<this.a.initData.length;a++){var f=this.a.initData[a];f.keyId&&this.o.get(f.keyId)===cg&&_.Qm(f.initData,d.initData)&&(this.g.warn($a+f.keyId+ea),this.o.set(f.keyId,
_.af))}a=c.expiration-Date.now();(0>a||e&&1E3>a)&&d&&!d.yc&&(this.g.debug("Session has expired",c.sessionId),(a=this.h.get(c))&&a.pd&&a.pd.stop(),this.h["delete"](c),c.close()["catch"](function(){}));Pp(this)&&(this.I.resolve(),1!==this.h.size||e?this.da.ga(.5):ep(this))};var jp=0,dp=3;_.hq=new Map;_.iq=new _.J("clpp.text");_.rq.prototype.getStats=function(){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:nq(this.a,_.Hq),pauseTime:nq(this.a,_.Gq),bufferingTime:nq(this.a,_.yq),stateHistory:oq(this.a),switchHistory:qq(this.f)}};wq.prototype.Ya=function(a,b){this.m&&this.m.trigger(new _.K(a,{detail:b}))};wq.prototype.getState=function(){return zq(this,"")};wq.prototype.destroy=function(){this.g.debug("Stop watching for video events for "+this.m.namespace());this.a.release()};_.I("clpp.utils.media.detectType",Jq);var Mq=new _.J("clpp.sources");_.w(Nq,_.xm);_.r=Nq.prototype;_.r.init=function(a,b){_.xm.prototype.init.call(this,a,b);this.j=new wq(this);Dq(this.j,_.tq)};_.r.namespace=function(){return wd};
_.r.unload=function(){var a=this,b;return _.H(function(c){if(a.ba){a.log.debug("Releasing player with source",a.ba);a.B&&(a.B.stop(),a.B=null);(b=a.getTrackManager())&&b.release();a.A&&(a.A.destroy(),a.A=null);a.T&&(a.T.destroy(),a.T=null);a.l&&a.l.release();a.o&&(a.o.destroy(),a.o=null);_.ki(a.h);a.f&&(a.f=new _.rq);a.C=null;a.ba=null;a.H=!1;a.a&&(a.a.removeAttribute("src"),a.a.load());if(a.w)throw new _.N(_.O,7,7E3);if(a.a){var d=a.a;a.h.off(d,_.ie);a.h.off(d,_.Nf);a.a=null}}_.y(c)})};
_.r.release=function(){var a=this;return _.xm.prototype.release.call(this).then(function(){return a.unload()}).then(function(){a.j&&Dq(a.j,_.tq)})};
_.r.destroy=function(){var a=this;if(this.w)return this.log.warn("Player is already destroyed!"),Promise.resolve();this.w=!0;return _.xm.prototype.destroy.call(this).then(function(){return a.release()}).then(function(){a.log.debug(Ka);var b=a.getTrackManager();b&&b.destroy();a.l&&(a.l.destroy()["catch"](function(c){a.log.warn("Error while disposing metadata handler",c)}),a.l=null);a.j&&(a.j.destroy(),a.j=null);a.f=null})};_.r.getDrmInfo=function(){return this.o?this.o.getDrmInfo():null};
_.r.getTrackManager=function(){return this.Pd};
_.r.load=function(a){var b=this,c,d,e,f,g;return _.H(function(h){switch(h.a){case 1:if(b.w)return h["return"](Promise.reject(new _.N(_.O,7,7E3)));if(!b.getSurface()||!b.getSurface().getMedia())return h["return"](Promise.reject("No surface or no media element in surface"));c=_.L;d=b.G.getMedia();b.I=Date.now()/1E3;b.f=new _.rq;b.h.on(b,_.bg,function(){b.f&&_.mq(b.f.a,b.getState())});Dq(b.j,_.Fq);b.ba=_.Lq(a);b.configuration=_.vm(b.jb,a);b.log.debug(_.db,b.configuration);b.log.debug(_.vb,b.ba);e=_.kq(b.configuration,
[_.re,"native"]);b.T=e.create(b);b.T.setTextVisibility(!0);b.configuration.enableHtmlCue&&_.zm(_.ig)&&!_.zl()&&(b.A=new Wi(b),b.A.start(d));b.l?b.l.release():b.l=new mi(b);d.textTracks&&oi(b.l,d.textTracks);f=b.getTrackManager();f.load();d.loop=!!b.configuration.loop;c.R(b.configuration.volume)||b.setVolume(b.configuration.volume);c.R(b.configuration.muted)||b.setMuted(b.configuration.muted);b.h.one(d,bd,function(){b.trigger(new _.K(_.sg))});null==b.configuration.startTime&&Vq(b,d);_.xl()&&Wq(b,d);
_.C(h,2);Pq(b,d);return _.x(h,Sq(b),4);case 4:return _.x(h,Uq(b).S,5);case 5:_.uh(h,0);break;case 2:g=_.E(h),b.H=!1,b.onError(g),_.y(h)}})};_.r.onError=function(a){this.H||(a.severity===_.O&&null!==this.j&&Dq(this.j,_.Eq),this.trigger(new _.K(_.ie,{detail:a})))};_.r.Lh=function(){return new Tl};_.r.getState=function(){return null!==this.j?this.j.getState().currentState:_.uq};
_.r.getPresentationStartTime=function(){if(this.a&&this.a.getStartDate&&this.isLive()){var a=this.a.getStartDate();return isNaN(a.getTime())?null:a.getTime()/1E3}return null};_.r.getSeekRange=function(){var a=this.getSurface().getMedia();if(a&&a.src){a=a.seekable;if(a.length)return this.C=a={start:a.start(0),end:a.end(a.length-1)};if(this.C)return this.C}return{start:0,end:0}};_.r.isLive=function(){return this.a&&this.a.src?Infinity===this.a.duration:!1};
_.r.getStats=function(){if(!this.f||!this.a)return _.sq();this.f&&_.mq(this.f.a,this.getState());var a=this.a,b=this.f,c=a.videoHeight;b.A=a.videoWidth;b.j=c;a.getVideoPlaybackQuality&&(a=a.getVideoPlaybackQuality(),b=this.f,c=Number(a.totalVideoFrames),b.o=Number(a.droppedVideoFrames),b.l=c,this.f.C=Number(a.corruptedVideoFrames));if(a=this.getTrackManager())if(a=a.ma())a.bandwidth&&(this.f.w=a.bandwidth),a.Od&&(this.f.h=a.Od);return this.f.getStats()};
_.r.getTimelineCues=function(){return this.l?this.l.getTimelineCues():[]};_.r.getCueTimeline=function(){return null};Xq.prototype.a=function(){return wd};Xq.prototype.canPlay=function(a,b){var c=a.type||"",d=c===_.Ic,e=c===_.Nc,f=c===_.Zl;return _.wl()||d||e||f&&!_.xl()?0:""!==Cl().canPlayType(c)?f&&_.xl()&&(window.ManagedMediaSource||window.MediaSource&&MediaSource.isTypeSupported)&&!b.streaming.preferNativeHlsOnSafari?1:2:0};Xq.prototype.f=function(a){return a===_.ra};Xq.prototype.create=function(){return new Nq};
_.Th(new Xq);_.I("clpp.ads.PodType",{PREROLL:0,MIDROLL:1,POSTROLL:2});_.I("clpp.ads.Technology",{CLIENT_SIDE:0,SERVER_SIDE:1,SERVER_GUIDED:2});_.I("clpp.ads.ErrorType",{LOAD:0,PLAY:1,OTHER:2});var Zq=new _.J("clpp.ads"),Yq=[];_.r=br.prototype;_.r.load=function(){};_.r.start=function(){};_.r.kd=function(){};_.r.resume=function(){};_.r.pause=function(){};_.r.skip=function(){};_.r.getVolume=function(){};_.r.setVolume=function(){};_.r.getPosition=function(){};_.r.Dc=function(){};_.r.gd=function(){};_.I("clpp.ads.IAdsManager",br);br.prototype.getPosition=br.prototype.getPosition;br.prototype.setVolume=br.prototype.setVolume;br.prototype.getVolume=br.prototype.getVolume;br.prototype.skip=br.prototype.skip;
br.prototype.pause=br.prototype.pause;br.prototype.resume=br.prototype.resume;_.r=cr.prototype;_.r.xb=function(){};_.r.yb=function(){};_.r.Cb=function(){};_.r.getId=function(){};_.r.getCreativeId=function(){};_.r.bc=function(){};_.r.getApiFramework=function(){};_.r.getAdSystem=function(){};_.r.getAdvertiserName=function(){};_.r.getTitle=function(){};_.r.getDuration=function(){};_.r.getPosition=function(){};_.r.getSkipTimeOffset=function(){};_.r.fc=function(){};_.r.zb=function(){};_.r.getMediaUrl=function(){};_.r.ob=function(){};_.r.nb=function(){};_.r.Ua=function(){};
_.r.Va=function(){};_.r.getPodIndex=function(){};_.r.Ob=function(){};_.r.Bb=function(){};_.r.pb=function(){};_.r.getWrapperAdIds=function(){};_.r.getWrapperAdSystems=function(){};_.r.getWrapperCreativeIds=function(){};_.r.ec=function(){};_.r.canSeek=function(){};_.I("clpp.ads.IAd",cr);cr.prototype.canSeek=cr.prototype.canSeek;cr.prototype.getVideoElement=cr.prototype.ec;cr.prototype.getWrapperCreativeIds=cr.prototype.getWrapperCreativeIds;cr.prototype.getWrapperAdSystems=cr.prototype.getWrapperAdSystems;
cr.prototype.getWrapperAdIds=cr.prototype.getWrapperAdIds;cr.prototype.getSequenceLength=cr.prototype.pb;cr.prototype.getPositionInSequence=cr.prototype.Bb;cr.prototype.getPodTimeOffset=cr.prototype.Ob;cr.prototype.getPodIndex=cr.prototype.getPodIndex;cr.prototype.getPodType=cr.prototype.Va;cr.prototype.getMediaBitrate=cr.prototype.Ua;cr.prototype.getMediaHeight=cr.prototype.nb;cr.prototype.getMediaWidth=cr.prototype.ob;cr.prototype.getMediaUrl=cr.prototype.getMediaUrl;
cr.prototype.getClickThroughUrl=cr.prototype.zb;cr.prototype.isBumper=cr.prototype.fc;cr.prototype.getSkipTimeOffset=cr.prototype.getSkipTimeOffset;cr.prototype.getPosition=cr.prototype.getPosition;cr.prototype.getDuration=cr.prototype.getDuration;cr.prototype.getTitle=cr.prototype.getTitle;cr.prototype.getAdvertiserName=cr.prototype.getAdvertiserName;cr.prototype.getAdSystem=cr.prototype.getAdSystem;cr.prototype.getApiFramework=cr.prototype.getApiFramework;cr.prototype.getSourceId=cr.prototype.bc;
cr.prototype.getCreativeId=cr.prototype.getCreativeId;cr.prototype.getId=cr.prototype.getId;cr.prototype.getTechnology=cr.prototype.Cb;cr.prototype.getAdManagerVersion=cr.prototype.yb;cr.prototype.getAdManagerName=cr.prototype.xb;_.r=W.prototype;_.r.xb=function(){return""};_.r.yb=function(){return""};_.r.Cb=function(){return 2};_.r.getId=function(){return this.B};_.r.getCreativeId=function(){return""};_.r.bc=function(){return this.H};_.r.getApiFramework=function(){return null};_.r.getAdSystem=function(){return""};_.r.getAdvertiserName=function(){return""};_.r.getTitle=function(){return""};_.r.getDuration=function(){return this.h};_.r.getPosition=function(){return this.j};_.r.getSkipTimeOffset=function(){return-1};
_.r.canSeek=function(){return this.A};_.r.fc=function(){return!1};_.r.zb=function(){return null};_.r.getMediaUrl=function(){return null};_.r.ob=function(){return 0};_.r.nb=function(){return 0};_.r.Ua=function(){return 0};_.r.Va=function(){return this.G};_.r.getPodIndex=function(){return 0};_.r.Ob=function(){return 0};_.r.Bb=function(){return this.f};_.r.pb=function(){return this.a};_.r.getWrapperAdIds=function(){return[]};_.r.getWrapperAdSystems=function(){return[]};_.r.getWrapperCreativeIds=function(){return[]};
_.r.ec=function(){return this.videoEl};_.r.Sl=function(){return this.C};W.prototype.getCustomAttributes=W.prototype.Sl;W.prototype.getVideoElement=W.prototype.ec;W.prototype.getWrapperCreativeIds=W.prototype.getWrapperCreativeIds;W.prototype.getWrapperAdSystems=W.prototype.getWrapperAdSystems;W.prototype.getWrapperAdIds=W.prototype.getWrapperAdIds;W.prototype.getSequenceLength=W.prototype.pb;W.prototype.getPositionInSequence=W.prototype.Bb;W.prototype.getPodTimeOffset=W.prototype.Ob;
W.prototype.getPodIndex=W.prototype.getPodIndex;W.prototype.getPodType=W.prototype.Va;W.prototype.getMediaBitrate=W.prototype.Ua;W.prototype.getMediaHeight=W.prototype.nb;W.prototype.getMediaWidth=W.prototype.ob;W.prototype.getMediaUrl=W.prototype.getMediaUrl;W.prototype.getClickThroughUrl=W.prototype.zb;W.prototype.isBumper=W.prototype.fc;W.prototype.canSeek=W.prototype.canSeek;W.prototype.getSkipTimeOffset=W.prototype.getSkipTimeOffset;W.prototype.getPosition=W.prototype.getPosition;
W.prototype.getDuration=W.prototype.getDuration;W.prototype.getTitle=W.prototype.getTitle;W.prototype.getAdvertiserName=W.prototype.getAdvertiserName;W.prototype.getAdSystem=W.prototype.getAdSystem;W.prototype.getApiFramework=W.prototype.getApiFramework;W.prototype.getSourceId=W.prototype.bc;W.prototype.getCreativeId=W.prototype.getCreativeId;W.prototype.getId=W.prototype.getId;W.prototype.getTechnology=W.prototype.Cb;W.prototype.getAdManagerVersion=W.prototype.yb;W.prototype.getAdManagerName=W.prototype.xb;dr.prototype.has=function(){return this.a.some(function(a){return a.Re})};dr.prototype.get=function(){var a=this,b;return _.H(function(c){if(1==c.a){b=a.a.find(function(d){return d.Re});if(!b)throw Error("No available players in the pool");b.Re=!1;return _.x(c,b.ready,2)}return c["return"](b.player)})};
dr.prototype.release=function(a){var b=this,c=this.a.find(function(d){return d.player===a});if(!c)return Promise.resolve();c.Re=!0;c.ready=new Promise(function(d){a.release()["catch"](function(e){b.g.error("Failed to unload player",e)}).then(d)});return c.ready};dr.prototype.destroy=function(){var a=this;return _.H(function(b){return _.x(b,Promise.all(a.a.map(function(c){return c.player.destroy()})),0)})};_.I("clpp.utils.dom.createHTMLElement",_.hr);ir.prototype.set=function(a){this.h.clear();this.f&&(this.f.disconnect(),this.f=null);if(this.a=a)this.f=kr(this,a)};ir.prototype.get=function(){return this.a};_.r=or.prototype;_.r.getMedia=function(){return this.f.get()};_.r.getContainer=function(){return this.a.get()};_.r.getSafeContainer=function(){return this.a};_.r.getId=function(){return this.l};_.r.getUniqueCssClass=function(){return this.o};_.r.getCastElement=function(){return this.h};_.r.isFullscreen=function(){return!!document.fullscreenElement};_.r.hideMediaElement=function(){var a=this.getMedia();a?_.fr(a,nd):this.g.debug("No media element available that could be hidden")};
_.r.showMediaElement=function(){var a=this.getMedia();a?a.classList.remove(nd):this.g.debug("No media element available that could be shown")};_.r.addElementToContainer=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?!1:c;var d=this.getContainer();if(!d)throw Error("No container is available. Unable to add element");b&&_.fr(a,_.md);c?d.insertBefore(a,d.firstElementChild):d.appendChild(a)};
_.r.removeElementFromContainer=function(a){var b=this.getContainer();if(!b)throw Error("No container is available. Unable to remove element");b.removeChild(a)};_.r.hide=function(a){_.fr(a,nd)};_.r.show=function(a){a.classList.remove(nd)};_.r.release=function(){this.j.release()};or.prototype.removeElementFromContainer=or.prototype.removeElementFromContainer;or.prototype.addElementToContainer=or.prototype.addElementToContainer;or.prototype.getCastElement=or.prototype.getCastElement;
or.prototype.getContainer=or.prototype.getContainer;or.prototype.getMedia=or.prototype.getMedia;var lr={disableContainer:!1,webOSStartupPatch:!0,crossorigin:"anonymous",containerEl:null},mr=1;_.r=tr.prototype;_.r.getCurrentItem=function(){return this.h};_.r.$e=function(){return this.h?this.h.player:null};_.r.di=function(){return Array.from(this.o.values())};_.r.me=function(){return 0<this.o.size};_.r.play=function(a){return vr(this,a,_.ff)};_.r.load=function(a){return vr(this,a,_.Be)};_.r.release=function(){var a=this,b,c;return _.H(function(d){if(1==d.a)return b=Promise,c=b.all,_.x(d,Cr(a),3);if(2!=d.a)return _.x(d,c.call(b,[d.f,a.h?Rr(a,a.h):Promise.resolve()]),2);a.h=null;a.B=!1;_.y(d)})};
_.r.destroy=function(){var a=this;return _.H(function(b){if(1==b.a)return a.g.info("Destroy"),_.x(b,a.release(),2);if(3!=b.a)return _.x(b,a.w.destroy(),3);ds(a);_.y(b)})};_.r.isMuted=function(){return this.G};var Yr="preload",$r=_.Fe,Lr="primary",Kr="ad";_.w(os,_.mm);_.r=os.prototype;_.r.destroy=function(){var a=this;return _.H(function(b){Gs(a);a.h=[];a.w=!1;a.l.setSeekInterceptor(null);return _.x(b,a.a.destroy(),0)})};_.r.Rb=function(){return this.w};_.r.setMuted=function(a){var b=this.a;(b.G=a)?(b.a.setMuted(!0),cs(b,!0)):(a=b.getCurrentItem(),Jr(b,a,a&&a.Sb?Kr:Lr))};_.r.isMuted=function(){return this.a.isMuted()};_.r.isLive=function(){var a=this.a.$e();return a?a.isLive():null};_.r.Ya=function(a){this.l.trigger(a)};
var ms=0,ts=1,Ms=2,Ns=3,ss=4,Rs=5,Ss=6;_.r=Us.prototype;_.r.load=function(){return Promise.resolve()};_.r.start=function(){return Promise.resolve()};_.r.kd=function(a,b,c){var d=a.getConfiguration();a=Object.assign({},{config:d,player:a,lb:b},d.ads.hls||{},{Vn:c});this.a=new os(a);rs(this.a)};_.r.setMuted=function(a){this.a&&this.a.setMuted(a)};_.r.isMuted=function(){return this.a?this.a.isMuted():!0};_.r.resume=function(){var a=ps(this.a);a&&a.play()};_.r.pause=function(){var a=ps(this.a);a&&a.pause()};_.r.skip=function(){};
_.r.getVolume=function(){var a=ps(this.a);return a?a.getVolume()||0:0};_.r.setVolume=function(a){var b=ps(this.a);if(b)return b.setVolume(a)};_.r.getPosition=function(){var a=ps(this.a);return a?a.getPosition():-1};_.r.gd=function(){return!this.a.Rb()};_.r.Dc=function(){return this.a.destroy()};Us.prototype.getPosition=Us.prototype.getPosition;Us.prototype.setVolume=Us.prototype.setVolume;Us.prototype.getVolume=Us.prototype.getVolume;Us.prototype.skip=Us.prototype.skip;Us.prototype.pause=Us.prototype.pause;
Us.prototype.resume=Us.prototype.resume;Xs.prototype.release=function(){this.a.release();at(this);this.m=null};var ct=[];var ht={n:"vXdoJIQCz6sZ9pbduNukEHOR0H2dHlwuuBUAR5Ot7WLEYvav5mn63yxr6F6TIl8RHTFw2siXQhHblZH2Y89o8vhcZRFkYXo6h0igEVafu-n0w52UEcH8Cqzlb8Q7x03Qb8OcKLngSzDkwe5Y2Aix6I66RRVNLLssqyjp2n5tXs4JQmYdqY6hhpGhmBN84naeCTdcPpAYhCw8jqbTSNrJp5hjU4GVvOiUtoYCvdESV9xrOR7fPCFXhWfLtC3i1k1zVoIM7YW5qD0F676jhqkF-GmDuCHpRY2I2Cxui-ytYEVIM6_pylSIlmYLjARmv2jXz9aV_WvHLh6B8Yx0slNGCQ",e:"AQAB"},qm="eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJ1cmxzIjpbIjovL2Nhc3RsYWJzLmNvbSJdLCJ0eXBlIjoiV2ViIiwia2lkIjoxOTUwLCJpbHYiOmZhbHNlfQ.jzGGRcbFr_2QET-4tbMcpR5pSaj7eV7X2d1HWw_VKQpPg3zCwSZSDuqw225dIYyAYwLSiElbozbZPSArkBXOsoUm-KZRUPF4m7WG0T7Uza5G-QaQw57BbbfcSsooSpatC997kHKLMTjO71By9Olcu5ykN164nZpGQtZNzQjYag-bnUaMVI5vvhzjlvDihORQ9V_qRlEh0-mpoz6W0-36HGAbWIXWq0kxPh6inbovby-ZmFpqGrVjWOEFa55EARZXPNW9ERupW5xrrYHZdwwTpdRTY5IwEnobS85yTrLhK8Y2MV4jlQLTtQp372fKDsuU6q6_4XvmNq1SgAoKoaf41g";var wt="vod",vt="live";var Et,Ct,Dt;zt.prototype.release=function(){this.a=null;this.f.ye(this.h)};_.Gw="maxSuggestedBitrateKbps";Et={du:"duress",etp:_.je,mb:_.Gw,rd:"responseDelay",rtt:"roundTripTime"};Ct={at:"availabilityTime",br:"encodedBitrateKbps",ht:"heldTime",n:"intermediaryIdentifier",nor:"nextObjectResponse",nrr:"nextRangeResponse",d:"objectDuration",ot:"objectType",su:"startup",st:"streamType",sf:"streamingFormat",v:Eg};Dt=new _.J("clpp.net.CmsdManager");_.w(X,_.mm);_.r=X.prototype;_.r.on=function(a,b,c){return _.mm.prototype.on.call(this,a,b,c)};_.r.one=function(a,b,c){return _.mm.prototype.one.call(this,a,b,c)};_.r.off=function(a,b){return _.mm.prototype.off.call(this,a,b)};_.r.onError=function(a){if(null!==this.a)this.a.onError(a);else this.trigger(new _.K(_.ie,{detail:a}))};_.r.he=function(a){a=this.L[a];void 0===a&&(a=null);return a};_.r.getSurface=function(){return this.j};_.r.getConfiguration=function(){return _.L.kb(this.f)};
_.r.getDrmInfo=function(){return this.a?this.a.getDrmInfo():null};_.r.detach=function(){return this.a?this.a.detach():Promise.resolve()};_.r.release=function(){var a=this;if(null!=this.l)return this.g.info("Player release already in progress"),this.l;this.g.debug("Releasing player");this.l=Lt(this);return this.l["finally"](function(){Vt(a);a.g.debug("Player released");a.l=null})};
_.r.destroy=function(){var a=this;if(this.T)return this.g.debug("The player is already destroyed. No-op"),new Promise(function(b){return b()});this.T=!0;return this.release().then(function(){a.g.debug(Ka);a.trigger(new _.K("destroying"));return a.Rc(_.Ve)}).then(function(){a.a&&a.a.stopForwardingEventsTo(a);a.be.clear();a.jb.release();if(a.a)return a.a.destroy()}).then(function(){return a.J.destroy()}).then(function(){Hm();a.a=null;a.A=null;a.trigger(new _.K("destroyed"))})};
_.r.load=function(a){var b=this,c,d,e;return _.H(function(f){switch(f.a){case 1:_.C(f,2);_.$o(of);b.P=_.ra;b.ja=!0;c=_.Lq(a);d=wm(a)?a:{};if(d.license)throw new _.N(_.O,7,7100,"License cannot be passed into the load method.");return _.x(f,_.Tt(b,d,c),4);case 4:return _.x(f,_.Ut(b),5);case 5:return _.x(f,_.Ot(b),6);case 6:_.$o(nf);_.bp("player.load",of,nf);_.uh(f,0);break;case 2:e=_.E(f);Vt(b);if(b.l)throw b.g.info(cb),new _.N(_.O,7,7E3);throw e;}})};
_.r.preload=function(a){var b=this,c;return _.H(function(d){if(1==d.a)return _.x(d,_.Tt(b,a),2);if(!b.a)return b.g.warn(ub),d["return"]();c=b.a;return c.preload?_.x(d,c.preload(b.f),0):(b.g.warn(yb),d["return"]())})};_.r.Rc=function(a,b){for(var c=[],d=1;d<arguments.length;++d)c[d-1]=arguments[d];if(!this.ja)return Promise.resolve();var e=this;d=this.ha.map(function(f){var g=f[a];return g.call.apply(g,[f,e].concat(_.gh(c)))}).filter(function(f){return f instanceof Promise});return Promise.all(d)};
_.r.use=function(a){(a=Im(a))&&a.o(this)};_.r.remove=function(a){return(this.getState()<=_.tq||this.Y)&&null!==Cm(a)?(Jm(a),this.ca=!0):!1};_.r.play=function(){return this.a?!this.h||this.h instanceof Us||this.a.namespace()===_.sd?this.a.play():this.h.start(this.a):Promise.reject("No player initialized. You need to load content before calling play.")};_.r.pause=function(){return this.a?this.a.pause():Promise.reject("No player initialized. You need to load content before calling pause.")};
_.r.getTrackManager=function(){return this.a&&this.a.getTrackManager()};_.r.getBufferInfo=function(a){return this.a?this.a.getBufferInfo(a):new _.lm};_.r.getState=function(){return this.a?this.a.getState():_.tq};_.r.getPeriods=function(){return this.a?this.a.getPeriods():[]};_.r.isEnded=function(){return this.a&&this.a.isEnded()||!1};_.r.isPaused=function(){return this.a&&this.a.isPaused()||!1};_.r.getPosition=function(){return this.a?this.a.getPosition():0};
_.r.seek=function(a){return this.getState()===_.Eq?Promise.reject("Cannot seek in current state."):this.a?this.a.seek(a):Promise.reject("delegate does not exist")};_.r.getPresentationStartTime=function(){return this.a?this.a.getPresentationStartTime():null};_.r.getSeekRange=function(){return this.a?this.a.getSeekRange():{start:0,end:0}};_.r.Ic=function(){var a=this.a;return a&&a.Ic?a.Ic():null};_.r.getVolume=function(){return this.a?this.a.getVolume():null};_.r.setVolume=function(a){this.a&&this.a.setVolume(a)};
_.r.getDuration=function(){return this.a?this.a.getDuration():-1};_.r.getAdsManager=function(){return this.h};_.r.namespace=function(){return this.a&&this.a.namespace()||"Undefined"};_.r.getPlaybackRate=function(){return this.a?this.a.getPlaybackRate():1};_.r.setPlaybackRate=function(a,b){this.a&&this.a.setPlaybackRate(a,b)};_.r.isMuted=function(){return this.h&&this.h instanceof Us?this.h.isMuted():this.a&&this.a.isMuted()||!1};
_.r.setMuted=function(a){this.a&&this.a.setMuted(a);this.h&&this.h instanceof Us&&this.h.setMuted(a)};_.r.getNetworkEngine=function(){return this.J};_.r.setNetworkEngine=function(a){this.J=a};_.r.getTextDisplayer=function(){return this.a&&this.a.getTextDisplayer()};_.r.isLive=function(){return!!this.a&&this.a.isLive()};_.r.getStats=function(){return this.a?this.a.getStats():null};_.r.ji=function(){return Object.freeze(this.Ea)};_.r.getLoadedSource=function(){return this.a&&this.a.getLoadedSource()};
_.r.getTimelineCues=function(){return this.a?this.a.getTimelineCues():[]};_.r.getCueTimeline=function(){return this.a?this.a.getCueTimeline():null};_.r.resetAbr=function(){this.a&&this.a.resetAbr()};_.r.setDrmCustomDataModifier=function(a){this.sd=a;Rt(this)};_.r.setCdnErrorCallback=function(a){this.N=a;this.a&&this.a.setCdnErrorCallback(this.N)};_.I("clpp.Player",X);X.registerPlugin=_.Yt;X.prototype.setCdnErrorCallback=X.prototype.setCdnErrorCallback;X.prototype.setDrmCustomDataModifier=X.prototype.setDrmCustomDataModifier;
X.prototype.resetAbr=X.prototype.resetAbr;X.prototype.getTimelineCues=X.prototype.getTimelineCues;X.prototype.getLoadedSource=X.prototype.getLoadedSource;X.prototype.getSources=X.prototype.ji;X.prototype.getStats=X.prototype.getStats;X.prototype.isLive=X.prototype.isLive;X.prototype.getTextDisplayer=X.prototype.getTextDisplayer;X.prototype.setNetworkEngine=X.prototype.setNetworkEngine;X.prototype.getNetworkEngine=X.prototype.getNetworkEngine;X.prototype.setMuted=X.prototype.setMuted;
X.prototype.isMuted=X.prototype.isMuted;X.prototype.setPlaybackRate=X.prototype.setPlaybackRate;X.prototype.getPlaybackRate=X.prototype.getPlaybackRate;X.prototype.namespace=X.prototype.namespace;X.prototype.getAdsManager=X.prototype.getAdsManager;X.prototype.getDuration=X.prototype.getDuration;X.prototype.setVolume=X.prototype.setVolume;X.prototype.getVolume=X.prototype.getVolume;X.prototype.getTimelineOffset=X.prototype.Ic;X.prototype.getSeekRange=X.prototype.getSeekRange;
X.prototype.getPresentationStartTime=X.prototype.getPresentationStartTime;X.prototype.seek=X.prototype.seek;X.prototype.getPosition=X.prototype.getPosition;X.prototype.isPaused=X.prototype.isPaused;X.prototype.isEnded=X.prototype.isEnded;X.prototype.getState=X.prototype.getState;X.prototype.getBufferInfo=X.prototype.getBufferInfo;X.prototype.getTrackManager=X.prototype.getTrackManager;X.prototype.pause=X.prototype.pause;X.prototype.play=X.prototype.play;X.prototype.remove=X.prototype.remove;
X.prototype.use=X.prototype.use;X.prototype.load=X.prototype.load;X.prototype.destroy=X.prototype.destroy;X.prototype.release=X.prototype.release;X.prototype.getDrmInfo=X.prototype.getDrmInfo;X.prototype.getConfiguration=X.prototype.getConfiguration;X.prototype.getSurface=X.prototype.getSurface;X.prototype.getPlugin=X.prototype.he;X.prototype.off=X.prototype.off;X.prototype.one=X.prototype.one;X.prototype.on=X.prototype.on;_.tq=0;_.Fq=1;_.yq=2;_.Hq=3;_.Gq=4;_.Aq=5;_.Eq=6;_.uq=7;
_.Cq={IDLE:_.tq,PREPARING:_.Fq,BUFFERING:_.yq,PLAYING:_.Hq,PAUSED:_.Gq,ENDED:_.Aq,ERROR:_.Eq,UNSET:_.uq};X.State=_.Cq;var Ht=[];_.w(Zt,X);_.r=Zt.prototype;
_.r.open=function(a,b){var c=this,d,e,f,g,h,l,m;return _.H(function(n){if(1==n.a){if(c.w)throw new _.N(_.O,7,7008,"Cannot call open() while "+c.w+fa);if(0!==a)throw new _.N(_.O,7,7007,"The index parameter only supports the value of 0.");if(0===b.length)throw new _.N(_.O,7,7003,lb);if(b.some(function(p){return!p.id||!p.source}))throw new _.N(_.O,7,7100,"Some config is missing required properties `id` or `source`!");d=new Set(b.map(function(p){return p.id}));if(d.size!==b.length)throw new _.N(_.O,7,
7100,"Some config contains a non-unique property `id`!");if(e=b[0].playlist){f=e.timeline;g=["flat","basic"];if(f&&!g.includes(f))throw new _.N(_.O,7,7100,"Unsupported `playlist.timeline` config value!");h=e.startTime;if(null!=h&&(typeof h!==_.k||0>h))throw new _.N(_.O,7,7100,"Invalid `playlist.startTime` config value!");l=e.endTime;if(null!=l&&(typeof l!==_.k||0>l||null!=h&&l<=h))throw new _.N(_.O,7,7100,"Invalid `playlist.endTime` config value!");m=e.content;if("DVR"===m&&!l)throw new _.N(_.O,7,
7100,"`playlist.endTime` config value is required for DVR content!");}_.th(n);$t(c);c.w="open";return _.x(n,du(c,b),4)}2!=n.a&&(c.I=0,c.o=b,c.da=!0,au(c,b[0].playlist||{}));_.vh(n);c.w=null;return _.wh(n)})};
_.r.Fj=function(a){var b=this,c;return _.H(function(d){if(1==d.a){if(b.w)throw new _.N(_.O,7,7008,"Cannot call addItem() while "+b.w+fa);if(!b.da)throw new _.N(_.O,7,7008,"open() must be called before addItem()!");if(!a.id||!a.source)throw new _.N(_.O,7,7100,"The config is missing required properties `id` or `source`!");c=new Set(b.o.map(function(e){return e.id}));if(c.has(a.id))throw new _.N(_.O,7,7100,"A config with this `id` already exists in the playlist!");_.th(d);b.w="addItem";b.o.push(a);return _.x(d,
eu(b,a),2)}_.vh(d);b.w=null;return _.wh(d)})};_.r.getCurrentItem=function(){return this.o[this.I]||null};_.r.getCurrentItemIndex=function(){return this.I};_.r.$l=function(){return _.gh(this.o).concat()};_.r.je=function(){return this.o.length};_.r.getTimeline=function(){return this.a?this.a.getTimeline():null};_.r.seekWith=function(a){return this.a?this.a.seekWith(a):Promise.resolve()};_.r.release=function(){this.o=[];this.I=0;this.da=!1;return X.prototype.release.call(this)};
_.r.destroy=function(){$t(this);return X.prototype.destroy.call(this)};_.r.setCdnErrorCallback=function(){throw new _.N(1,7,7009,"CDN switching is not supported!");};_.I("clpp.plist.ScPlaylist",Zt);Zt.prototype.setCdnErrorCallback=Zt.prototype.setCdnErrorCallback;Zt.prototype.destroy=Zt.prototype.destroy;Zt.prototype.release=Zt.prototype.release;Zt.prototype.seekWith=Zt.prototype.seekWith;Zt.prototype.getTimeline=Zt.prototype.getTimeline;Zt.prototype.getSize=Zt.prototype.je;
Zt.prototype.getPlaylist=Zt.prototype.$l;Zt.prototype.getCurrentItemIndex=Zt.prototype.getCurrentItemIndex;Zt.prototype.getCurrentItem=Zt.prototype.getCurrentItem;Zt.prototype.addItem=Zt.prototype.Fj;Zt.prototype.open=Zt.prototype.open;_.w(hu,_.mm);_.r=hu.prototype;_.r.ge=function(){return this.f};_.r.$e=function(){return this.f?this.f.player:null};_.r.bi=function(){return this.o.get(this.a+1)||null};_.r.ei=function(){return this.o.get(this.a-1)||null};_.r.di=function(){return[this.ei(),this.bi()].filter(Boolean)};_.r.po=function(a){if(0<this.h.length)throw Error("Cannot re-set items in the playlist");this.g.info("Set items",a);this.h=a.map(function(b,c){return{config:b,index:c,preloadPromise:Promise.resolve(),disposers:[]}})};
_.r.oo=function(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};_.r.me=function(){return this.a<this.h.length-1};_.r.ki=function(){return 0<this.a};
_.r.Tn=function(){var a=this,b,c;return _.H(function(d){switch(d.a){case 1:if(a.l)return a.g.warn("Cannot play first item while busy"),d["return"]();if(0===a.h.length)return a.g.warn(kb),d["return"]();a.l=!0;a.g.info("First (index: "+a.a+")");b=a.h[a.a];_.C(d,2,3);a.g.info("First loading (index: "+a.a+")");return _.x(d,pu(a,b),5);case 5:a.g.info("First playing (index: "+a.a+")");case 3:_.vh(d);a.l=!1;uu(a);_.wh(d);break;case 2:throw c=_.E(d),a.g.error("First failed (index: "+a.a+")"),c;}})};
_.r.$i=function(){var a=this,b,c,d;return _.H(function(e){switch(e.a){case 1:if(a.l)return a.g.warn("Cannot play next item while busy"),e["return"]();if(!a.me())return a.g.warn("There are no more items in the playlist"),e["return"]();a.l=!0;a.a+=1;a.g.info("Next (index: "+a.a+")");b=a.f;a.j.transition===_.bf&&b.player.pause();iu(a,a.a+-2);a.o["delete"](a.a);c=a.h[a.a];_.C(e,2,3);a.g.info("Next loading (index: "+a.a+")");return _.x(e,qu(a,c),5);case 5:a.g.info("Next playing (index: "+a.a+")");case 3:_.vh(e);
a.l=!1;b&&mu(a,b);uu(a);_.wh(e);break;case 2:throw d=_.E(e),a.g.error("Next failed (index: "+a.a+")"),d;}})};
_.r.Un=function(){var a=this,b,c,d;return _.H(function(e){switch(e.a){case 1:if(a.l)return a.g.warn("Cannot play previous item while busy"),e["return"]();if(!a.ki())return a.g.warn("There are no more previous items in the playlist"),e["return"]();a.l=!0;--a.a;a.g.info("Previous (index: "+a.a+")");b=a.f;a.j.transition===_.bf&&b.player.pause();iu(a,a.a+2);a.o["delete"](a.a);c=a.h[a.a];_.C(e,2,3);a.g.info("Previous loading (index: "+a.a+")");return _.x(e,qu(a,c),5);case 5:a.g.info("Previous playing (index: "+
a.a+")");case 3:_.vh(e);a.l=!1;b&&mu(a,b);uu(a);_.wh(e);break;case 2:throw d=_.E(e),a.g.error("Previous failed (index: "+a.a+")"),d;}})};_.r.destroy=function(){var a=this;return _.H(function(b){return 1==b.a?(a.g.info("Destroy"),_.x(b,Promise.all([ju(a),a.f?mu(a,a.f):Promise.resolve()]),2)):_.x(b,vu(a),0)})};_.I(xd,hu);hu.prototype.destroy=hu.prototype.destroy;hu.prototype.playPrev=hu.prototype.Un;hu.prototype.playNext=hu.prototype.$i;hu.prototype.playFirst=hu.prototype.Tn;hu.prototype.hasPrev=hu.prototype.ki;
hu.prototype.hasNext=hu.prototype.me;hu.prototype.setIndex=hu.prototype.oo;hu.prototype.setItems=hu.prototype.po;hu.prototype.getPreloading=hu.prototype.di;hu.prototype.getPrev=hu.prototype.ei;hu.prototype.getNext=hu.prototype.bi;hu.prototype.getCurrentPlayer=hu.prototype.$e;hu.prototype.getCurrent=hu.prototype.ge;var lu="preload",nu=_.Fe;var wu=new Map;_.r=yu.prototype;_.r.destroy=function(){this.a.dispose();this.a=null};_.r.reset=function(){this.a=new muxjs.mp4.Transmuxer(this.f)};_.r.isSupported=function(a,b){var c="mp2t"===a.toLowerCase().split(";")[0].split("/")[1],d=a.toLowerCase().split(";")[0]===_.Qc;if(!window.muxjs||!c&&!d)return!1;if(d)return _.xu(Uc);if(b)return _.xu(zu(b,a));c=zu(_.Pc,a);d=zu(_.Jg,a);return _.xu(c)||_.xu(d)};_.r.isMuxed=function(a,b){return 1<this.demuxMimeTypes(a,b).size};
_.r.demuxMimeTypes=function(a,b){var c=new Map;c.set(a,b);try{var d=_.pl(b),e=_.ql(b).split(","),f=new Map,g=qj(_.Pc,e),h=qj(_.Jg,e);g&&f.set(_.Pc,this.convertCodecs(_.Pc,_.ol(d,g)));h&&f.set(_.Jg,this.convertCodecs(_.Jg,_.ol(d,h)));return f}catch(l){return c}};_.r.convertCodecs=function(a,b){return b.toLowerCase().split(";")[0]===_.Qc?Uc:"mp2t"===b.toLowerCase().split(";")[0].split("/")[1]?zu(a,b):b};_.r.getOriginalMimeType=function(){return this.h};
_.r.transmux=function(a){function b(){g={video:_.Rm.apply(Km,_.gh(d)),captions:f,audio:_.Rm.apply(Km,_.gh(e))}}function c(h){f=h.captions;var l=new Uint8Array(h.data.byteLength+h.initSegment.byteLength);l.set(h.initSegment,0);l.set(h.data,h.initSegment.byteLength);h.type===Hw?d.push(l):h.type===Iw&&e.push(l)}var d=[],e=[],f=[],g=null;a=_.Oj(a);this.a.on("data",c);this.a.on("done",b);this.a.push(a);this.a.flush();this.a.off("data",c);this.a.off("done",b);if(!g)throw new _.N(_.O,3,3018);return g};
jl(_.Qc,function(){return new yu(_.Qc)});jl(_.Kg,function(){return new yu(_.Kg)});var Iw=_.Pc,Hw=_.Jg;Au.prototype.getCuePoints=function(){};Au.prototype.Rb=function(){};Au.prototype.Qb=function(){};_.I("clpp.ads.IAdsTimeline",Au);Au.prototype.hasPostroll=Au.prototype.Qb;Au.prototype.hasPreroll=Au.prototype.Rb;Au.prototype.getCuePoints=Au.prototype.getCuePoints;_.Bu.prototype.f=function(){};_.Bu.prototype.a=function(){};_.Bu.prototype.h=function(){};_.Bu.prototype.o=function(){};_.w(Cu,_.an);Cu.prototype.ve=function(a,b){for(var c=a.drm.customData.headers||{},d=_.u(Object.keys(c)),e=d.next();!e.done;e=d.next())e=e.value,b.headers[e]=c[e]};Cu.prototype.Sh=function(a,b){var c=xn(b);switch(this.o){case Jw:return c;case Kw:return(new _.Mk(c)).a;default:throw Error("Unknown content ID strategy");}};Cu.prototype.Ji=function(a,b){b.headers[Aa]=Oc;this.ve(a,b);var c={spc:_.Lm(b.body)};b.body=_.Q.Fd(_.Ok(c,!0))};
Cu.prototype.Ki=function(a,b){var c=_.Q.ea(b.data).trim(),d="\x3c/ckc\x3e"===c.substr(-6);"\x3cckc\x3e"===c.substr(0,5)&&d&&(c=c.slice(5,-6));b.data=_.Nm(c).buffer};_.I(td,Cu);Cu.prototype.onFairPlayLicenseResponse=Cu.prototype.Ki;Cu.prototype.onFairPlayLicenseRequest=Cu.prototype.Ji;Cu.prototype.extractFairPlayContentId=Cu.prototype.Sh;Cu.prototype.onLicenseRequest=Cu.prototype.ve;Cu.prototype.constructor=Cu.prototype.constructor;Cu.NAME=Wa;var Kw="hostname",Jw="full-skd";
Cu.FairPlayContentIdStrategy={HOSTNAME:Kw,FULL_SKD:Jw};_.w(Du,_.Bu);Du.prototype.h=function(a){a=a.getConfiguration();if(a.drm&&a.drm&&a.drm.env===Wa){a=a.drm.customData;if(!a)throw new _.N(_.O,7,7100,_.Hd);a=new Cu(a.widevineLicenseUrl,a.playReadyLicenseUrl,a.fairPlayLicenseUrl,a.fairPlayCertificateUrl,a.fairPlayContentIdStrategy||Jw);_.Wm(a)}};Du.prototype.a=function(){delete _.Vm.HeaderDrm};Du.prototype.id=function(){return"headerdrm"};_.I("clpp.drm.HeaderDrmComponent",Du);_.et(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);var c=new ArrayBuffer(b-a),d=_.Oj(c),e=new Uint8Array(this,a,b-a);d.set(e);return c})});_.et(function(){_.Oh("mathRound.install")});_.et(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;le in document||(Object.defineProperty(document,le,{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement}}),Object.defineProperty(document,"fullscreenEnabled",
{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitSupportsFullscreen||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",Eu);document.addEventListener("webkitfullscreenerror",Eu);document.addEventListener("mozfullscreenchange",Eu);document.addEventListener("mozfullscreenerror",Eu);document.addEventListener("MSFullscreenChange",Eu);document.addEventListener("MSFullscreenError",Eu)}});_.et(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(_.Oh("PiPWebkit.install"),document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=Gu,document.exitPictureInPicture=Hu,document.addEventListener("webkitpresentationmodechanged",Fu,!0))}});_.et(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in a&&(a.getVideoPlaybackQuality=Iu)}});_.et(function(){if(window.VTTCue)_.Nh("Using native VTTCue.");else if(window.TextTrackCue){var a=TextTrackCue.length;if(3===a)_.Nh(Ub),window.VTTCue=Ju;else if(6===a)_.Nh("Using VTTCue polyfill from 6 argument TextTrackCue."),window.VTTCue=Ku;else{try{var b=!!Ju(1,2,"")}catch(c){b=!1}b&&(_.Nh(Ub),window.VTTCue=Ju)}}else _.Ph("VTTCue not available.")});var Lu;_.et(function(){_.Oh("InputEvent.install");_.tl("Trident/")&&HTMLInputElement.prototype.addEventListener!==Mu&&(_.Nh("Patching input event support on IE."),Lu=HTMLInputElement.prototype.addEventListener,HTMLInputElement.prototype.addEventListener=Mu)});_.et(function(){navigator.languages||Object.defineProperty(navigator,"languages",{get:function(){return navigator.language?[navigator.language]:["en"]}})});_.et(function(){_.Oh("VideoPlayPromise.install");if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b["catch"](function(){});return b}}});_.Vu.prototype.start=function(){var a=this;this.a=new ResizeObserver(function(b){b=b[0];a.j(b.contentRect.width,b.contentRect.height,a.h.isFullscreen())});this.f&&this.a.observe(this.f)};_.Vu.prototype.stop=function(){this.a&&(this.a.disconnect(),this.a=null)};_.Xu.prototype.canPlay=function(a){function b(f){e.stop();d.resolve(f)}var c=document.createElement(_.Jg);c.setAttribute("playsinline","playsinline");a&&(c.muted=!0,c.setAttribute("muted","muted"));c.src=URL.createObjectURL(this.a);var d=new _.kk;c=c.play();var e=(new _.Xh(function(){b(a)})).ga(.25);void 0!==c?c.then(function(){return b(!0)})["catch"](function(f){f&&f.message&&f.message===qb?b(!0):b(!1)}):b(!0);return d};
var Wu=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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,112,0,0,2,194,109,111,111,118,0,0,0,108,109,118,104,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,232,0,0,0,47,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,1,236,116,114,97,107,0,0,0,92,116,107,104,100,0,0,0,3,0,0,0,0,
0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,47,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36,101,100,116,115,0,0,0,28,101,108,115,116,0,0,0,0,0,0,0,1,0,0,0,47,0,0,0,0,0,1,0,0,0,0,1,100,109,100,105,97,0,0,0,32,109,100,104,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,172,68,0,0,8,0,85,196,0,0,0,0,0,45,104,100,108,114,0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0,0,0,1,15,109,105,110,102,
0,0,0,16,115,109,104,100,0,0,0,0,0,0,0,0,0,0,0,36,100,105,110,102,0,0,0,28,100,114,101,102,0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1,0,0,0,211,115,116,98,108,0,0,0,103,115,116,115,100,0,0,0,0,0,0,0,1,0,0,0,87,109,112,52,97,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,2,0,16,0,0,0,0,172,68,0,0,0,0,0,51,101,115,100,115,0,0,0,0,3,128,128,128,34,0,2,0,4,128,128,128,20,64,21,0,0,0,0,1,244,0,0,1,243,249,5,128,128,128,2,18,16,6,128,128,128,1,2,0,0,0,24,115,116,116,115,0,0,0,0,0,0,0,1,0,0,0,2,0,0,4,0,0,0,0,28,
115,116,115,99,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,2,0,0,0,1,0,0,0,28,115,116,115,122,0,0,0,0,0,0,0,0,0,0,0,2,0,0,1,115,0,0,1,116,0,0,0,20,115,116,99,111,0,0,0,0,0,0,0,1,0,0,0,44,0,0,0,98,117,100,116,97,0,0,0,90,109,101,116,97,0,0,0,0,0,0,0,33,104,100,108,114,0,0,0,0,0,0,0,0,109,100,105,114,97,112,112,108,0,0,0,0,0,0,0,0,0,0,0,0,45,105,108,115,116,0,0,0,37,169,116,111,111,0,0,0,29,100,97,116,97,0,0,0,1,0,0,0,0,76,97,118,102,53,54,46,52,48,46,49,48,49]);_.r=_.Yu.prototype;_.r.getDuration=function(){return this.a};_.r.getId=function(){return this.id};_.r.cc=function(){return this.f};_.r.qe=function(){return this.h};_.r.pa=function(a){return this.getId()===a.getId()&&this.cc()===a.cc()&&this.getDuration()===a.getDuration()&&this.qe()===a.qe()};_.I("clpp.media.TimelineWindow",_.Yu);_.Yu.prototype.isDynamic=_.Yu.prototype.qe;_.Yu.prototype.getStart=_.Yu.prototype.cc;_.Yu.prototype.getId=_.Yu.prototype.getId;_.Yu.prototype.getDuration=_.Yu.prototype.getDuration;_.Lw=new _.J("clpp.media.TimestampParser");_.r=_.Zu.prototype;_.r.dm=function(a){return this.a[a]||null};_.r.em=function(){return this.a.length};_.r.fm=function(){return this.a};_.r.$h=function(){return this.a[this.f]||null};_.r.Rl=function(){return this.f};_.I("clpp.media.Timeline",_.Zu);_.Zu.prototype.getCurrentWindowIndex=_.Zu.prototype.Rl;_.Zu.prototype.getCurrentWindow=_.Zu.prototype.$h;_.Zu.prototype.getWindows=_.Zu.prototype.fm;_.Zu.prototype.getWindowCount=_.Zu.prototype.em;_.Zu.prototype.getWindow=_.Zu.prototype.dm;_.bv={};_.dv={};var iv=window.XMLHttpRequest;_.w(qv,_.lk);qv.prototype.then=function(a,b){this.S=this.S.then(a,b);return this};qv.prototype["catch"]=function(a){this.S=this.S["catch"](a);return this};qv.prototype.abort=function(){var a=this;if(this.a)return Promise.resolve();this.a=!0;return this.h.then(function(b){a.o&&clearTimeout(a.o);a.l&&a.l();return b.abort()})["catch"](function(){})};var xv=window.fetch,vv=window.AbortController,uv=window.Headers;_.zv={};_.r=_.Dv.prototype;_.r.getBackgroundColor=function(){return this.K};_.r.setBackgroundColor=function(a){this.K=a;this.Wb()};_.r.getWindowColor=function(){return this.T};_.r.setWindowColor=function(a){this.T=a;this.Wb()};_.r.getFontFamily=function(){return this.P};_.r.setFontFamily=function(a){this.P=a;this.Wb()};_.r.getFontColor=function(){return this.N};_.r.setFontColor=function(a){this.N=a;this.Wb()};_.r.getFontSize=function(){return this.I};_.r.setFontSize=function(a){this.I=a;this.Wb()};
_.r.getFontSizePercent=function(){return null===this.B?Mw:this.B};_.r.setFontSizePercent=function(a){this.B=a;this.Wb()};_.r.getEdgeColor=function(){return this.H};_.r.setEdgeColor=function(a){this.H=a;this.Wb()};_.r.getEdgeType=function(){return this.o};_.r.setEdgeType=function(a){this.o=a;this.Wb()};_.Dv.prototype.setEdgeType=_.Dv.prototype.setEdgeType;_.Dv.prototype.getEdgeType=_.Dv.prototype.getEdgeType;_.Dv.prototype.setEdgeColor=_.Dv.prototype.setEdgeColor;_.Dv.prototype.getEdgeColor=_.Dv.prototype.getEdgeColor;
_.Dv.prototype.setFontSizePercent=_.Dv.prototype.setFontSizePercent;_.Dv.prototype.getFontSizePercent=_.Dv.prototype.getFontSizePercent;_.Dv.prototype.setFontSize=_.Dv.prototype.setFontSize;_.Dv.prototype.getFontSize=_.Dv.prototype.getFontSize;_.Dv.prototype.setFontColor=_.Dv.prototype.setFontColor;_.Dv.prototype.getFontColor=_.Dv.prototype.getFontColor;_.Dv.prototype.setFontFamily=_.Dv.prototype.setFontFamily;_.Dv.prototype.getFontFamily=_.Dv.prototype.getFontFamily;
_.Dv.prototype.setWindowColor=_.Dv.prototype.setWindowColor;_.Dv.prototype.getWindowColor=_.Dv.prototype.getWindowColor;_.Dv.prototype.setBackgroundColor=_.Dv.prototype.setBackgroundColor;_.Dv.prototype.getBackgroundColor=_.Dv.prototype.getBackgroundColor;var Mw=1/15;var Mv="raised",Uv="depressed",Wv="dropshadow",Vv="uniform";_.I("clpp.text.EdgeType",{NONE:_.Qe,RAISED:Mv,DEPRESSED:Uv,DROP_SHADOW:Wv,UNIFORM:Vv});Yv.prototype.parseInit=function(a){try{var b=_.Bv(_.Kc);if(b){var c=new b(this.f);c.parseInit(a)}else this.g.warn("The clpp.ttml.Mp4TtmlParser class is not available. Please register the ttml component first.")}catch(e){c=null}if(c)this.a=c;else{try{var d=_.Bv(_.Lc);d?(c=new d(this.f),c.parseInit(a)):this.g.warn("The clpp.vtt.Mp4VttParser class is not available. Please register the vtt component first.")}catch(e){c=null}if(c)this.a=c;else throw new _.N(_.O,2,2011);}};
Yv.prototype.parseMedia=function(a,b){if(!this.a)throw new _.N(_.O,2,2011);return this.a.parseMedia(a,b)};_.Av(Jc,Yv);_.w(_.$v,_.Dv);_.r=_.$v.prototype;_.r.append=function(){};_.r.remove=function(){return!0};_.r.isTextVisible=function(){return this.w};_.r.setTextVisibility=function(a){this.w=a};
_.r.Wb=function(){if(!this.j){var a={"background-color":this.getBackgroundColor(),color:this.getFontColor(),"font-family":this.getFontFamily(),"font-size":this.getFontSize(),"text-shadow":_.Xv(this)},b=Object.keys(a).map(function(c){return null!==a[c]?c+":"+a[c]+";":""}).join("");this.h.textContent="."+this.f+"::cue {"+b+"}"}};_.r.destroy=function(){this.l.classList.remove(this.f);document.head.removeChild(this.h);this.j=!0;return Promise.resolve()};var Zv=0;aw.prototype.a=function(){return!0};aw.prototype.create=function(a){return new _.$v(a)};_.jq("native",new aw);_.r=_.bw.prototype;_.r.onPlayerCreated=function(){};_.r.onContentWillLoad=function(){return Promise.resolve()};_.r.onContentLoaded=function(a,b){for(var c=1;c<arguments.length;++c);return Promise.resolve()};_.r.onPlayerWillDestroy=function(){};_.r.onPlayerWillRelease=function(){};}.call(g,this));
g.clpp._ = _;
if (typeof(module)!="undefined"&&module.exports) {module.exports=g.clpp;}
else if (typeof(define)!="undefined" && define.amd) {define(function(){return g.clpp;});}
else {this.clpp=g.clpp;}
})();