@castlabs/prestoplay 6.30.1-beta.1 → 6.31.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/CHANGELOG.md +44 -9
  2. package/cjs/cl.adobe.js +3 -3
  3. package/cjs/cl.airplay.js +3 -3
  4. package/cjs/cl.broadpeak.js +19 -7
  5. package/cjs/cl.cast.js +127 -127
  6. package/cjs/cl.conviva.js +32 -32
  7. package/cjs/cl.core.js +509 -510
  8. package/cjs/cl.crypto.js +10 -10
  9. package/cjs/cl.dash.js +95 -95
  10. package/cjs/cl.externs.js +214 -40
  11. package/cjs/cl.freewheel.js +26 -26
  12. package/cjs/cl.hls.js +79 -78
  13. package/cjs/cl.hlssmpte.js +6 -6
  14. package/cjs/cl.htmlcue.js +30 -30
  15. package/cjs/cl.ima.js +26 -26
  16. package/cjs/cl.mediatailor.js +3 -3
  17. package/cjs/cl.mse.js +350 -348
  18. package/cjs/cl.muxdata.js +14 -14
  19. package/cjs/cl.onboard.js +4 -4
  20. package/cjs/cl.persistent.js +15 -15
  21. package/cjs/cl.playlist.js +6 -6
  22. package/cjs/cl.simid.js +16 -16
  23. package/cjs/cl.smooth.js +71 -71
  24. package/cjs/cl.thumbnails.js +25 -25
  25. package/cjs/cl.tizen.js +72 -72
  26. package/cjs/cl.ttml.js +29 -29
  27. package/cjs/cl.verimatrix.js +5 -5
  28. package/cjs/cl.vimond.js +11 -11
  29. package/cjs/cl.vr.js +19 -19
  30. package/cjs/cl.vtt.js +14 -14
  31. package/cjs/cl.yospace.js +4 -4
  32. package/cjs/cl.youbora.js +38 -38
  33. package/cl.adobe.js +3 -3
  34. package/cl.airplay.js +3 -3
  35. package/cl.broadpeak.js +14 -6
  36. package/cl.cast.js +99 -99
  37. package/cl.conviva.js +26 -26
  38. package/cl.core.js +387 -386
  39. package/cl.crypto.js +8 -8
  40. package/cl.dash.js +86 -86
  41. package/cl.externs.js +215 -37
  42. package/cl.freewheel.js +20 -20
  43. package/cl.hls.js +82 -82
  44. package/cl.hlssmpte.js +5 -5
  45. package/cl.htmlcue.js +26 -26
  46. package/cl.ima.js +20 -19
  47. package/cl.mediatailor.js +2 -2
  48. package/cl.mse.js +300 -298
  49. package/cl.muxdata.js +12 -12
  50. package/cl.onboard.js +4 -4
  51. package/cl.persistent.js +10 -10
  52. package/cl.playlist.js +5 -5
  53. package/cl.simid.js +14 -14
  54. package/cl.smooth.js +61 -61
  55. package/cl.thumbnails.js +17 -17
  56. package/cl.tizen.js +55 -55
  57. package/cl.ttml.js +22 -22
  58. package/cl.verimatrix.js +4 -4
  59. package/cl.vimond.js +8 -8
  60. package/cl.vr.js +14 -14
  61. package/cl.vtt.js +12 -12
  62. package/cl.yospace.js +3 -3
  63. package/cl.youbora.js +31 -31
  64. package/package.json +10 -6
  65. package/typings.d.ts +84 -60
package/cjs/cl.cast.js CHANGED
@@ -1,134 +1,134 @@
1
1
  (function(){var g={}; var _ = _ || {}
2
- var f=function(window){var oV="Cannot seek during ads playout.",pV="Cannot switch track",qV="Media session does not exist.",rV="No receivers available",sV="QUEUE_ITEM_CHANGED",tV="Reset ABR functionality not available on cast.",uV="SDK not yet ready",vV="Sender is destroyed.",wV="clpp.cast.CastProxy",xV="clpp.cast.Player",yV="clpp.cast.Receiver",zV="urn:x-cast:castlabs",AV="urn:x-cast:castlabs:int",BV="urn:x-cast:com.google.cast.media",CV="volume control is not supported",DV=function(a){return _.I(function(b){return 1==
3
- b.a?_.x(b,a.Yc(_.ef),2):_.x(b,a.Yc(_.df),0)})},EV=function(a,b){this.log=new _.L(b);this.player=a;this.j=null;this.f=_.du;this.l=7;this.h=2;this.B=Date.now();this.A=-1},FV=function(a){return JSON.stringify(a,function(b,c){if("license"!==b&&typeof c!==_.ue){if(c instanceof Event){var d={},e;for(e in c){var f=c[e];typeof f===_.$e?"detail"===e&&(d[e]=f):e in Event||(d[e]=f)}return d}return typeof c===_.k?isNaN(c)?"NaN":isFinite(c)?c:0>c?"-Infinity":"Infinity":c}})},GV=function(a){if(typeof a!==_.lg)return a;
4
- try{return JSON.parse(a,function(b,c){return"NaN"===c?NaN:"-Infinity"===c?-Infinity:"Infinity"===c?Infinity:c})}catch(b){return a}},HV=function(a,b){var c=new Set(b);return Object.keys(a).reduce(function(d,e){c.has(e)&&(d[e]=a[e]);return d},{})},IV=function(a,b,c,d){var e,f,g,h,l,m,n,p;return _.I(function(q){if(1==q.a){if(b.includes(a.mimeType))return q["return"](a);g=f=e=null;for(h=0;h<b.length&&!f;)g=b[h++],f=_.ut(d,a.mimeType,g);if(!f||!g)return q.C(2);l=_.Zk(a.url);return _.x(q,c.fetch(l).U,3)}2!=
5
- q.a&&(m=q.f)&&m.data&&(n=f.a(_.Qi(m.data)),p=URL.createObjectURL(new Blob([n])),e={url:p,kind:a.kind,language:a.language,label:a.label,mimeType:g});return q["return"](e)})},JV=function(a,b){if(window.chrome&&chrome.cast&&chrome.cast.media){var c=chrome.cast.media.HlsSegmentFormat;var d=chrome.cast.media.HlsVideoSegmentFormat}else if(window.cast&&cast.framework&&cast.framework.messages)c=cast.framework.messages.HlsSegmentFormat,d=cast.framework.messages.HlsVideoSegmentFormat;else return;switch(a){case _.Ug:return d.FMP4;
6
- case _.Tg:return b===_.at?d.MPEG2_TS:c.TS;case _.Tc:return c.AAC;case _.Uc:return c.AC3;case _.Vc:return c.E_AC3;case "audio/mpeg":return c.MP3;case _.Wc:return c.FMP4}},LV=function(a){a=void 0===a?KV:a;var b=cast.framework.messages||chrome.cast.media;if(!b)throw new _.O(1,8,8001);var c=b.MetadataType,d=b.GenericMediaMetadata,e=b.MovieMediaMetadata,f=b.TvShowMediaMetadata,g=b.MusicTrackMediaMetadata,h=b.PhotoMediaMetadata;b=b.AudiobookChapterMediaMetadata;switch(a){case c.MOVIE:return new e;case c.TV_SHOW:return new f;
7
- case c.MUSIC_TRACK:return new g;case c.PHOTO:return new h;case c.AUDIOBOOK_CHAPTER:return new b;default:return new d}},MV=function(){return Math.round(1E3*Math.random())},NV=function(a){EV.call(this,a,"clpp.cast.SenderStateManager");this.o=this.a=null;this.w=this.kc.bind(this)},OV=function(){this.g=new _.L("clpp.cast.SenderTrackManager");this.a=null;this.h=[];this.f={}},PV=function(a){a=a.a?a.a.a:null;return(a?a.activeTrackIds||[]:[]).map(function(b){return b.toString()})},RV=function(a,b){var c=
8
- PV(a);return QV(a,b).find(function(d){return c.includes(d.id)})||null},QV=function(a,b){return a.h.filter(function(c){return c.type===b})},TV=function(a,b,c){var d=a.a.a;if(d)if(c){a.f[b]=c.renditions[0];c=[+c.id];if(b!==_.$s){var e=a.xa();e&&c.push(+e.id)}c=new chrome.cast.media.EditTracksInfoRequest(c);d.editTracksInfo(c,function(){a.f[b]=null;SV(a,b)},function(f){a.f[b]=null;a.g.debug(pV,f)})}else b===_.$s&&(c=new chrome.cast.media.EditTracksInfoRequest([]),d.editTracksInfo(c,function(){SV(a,b)},
9
- function(f){a.g.debug(pV,f)}))},SV=function(a,b){b===_.X?a.a.trigger(new _.Q(_.Zc)):b===_.$s&&a.a.trigger(new _.Q(_.ug))},XV=function(a,b,c,d){_.Di.call(this);this.g=new _.L(_.xd);this.aa=a;this.w=new _.gj(b);this.W=c;this.la=d;this.j=this.H=_.Ln();this.D=[];this.B=0;this.J=new _.Xm;this.a=null;this.f=!1;this.O=new _.nm;this.A=!1;this.Aa="";this.Sa=1E6;this.h=new OV;this.h.initialize(this);this.l=new NV(this);this.G=new _.wi;this.I=null;this.L=new Set;this.P=this.An.bind(this);this.Ga=this.Xn.bind(this);
10
- this.ha=this.Nn.bind(this);this.T=this.Gn.bind(this);this.ca=this.Fn.bind(this);this.o=this.K=null;window.cast||Object.defineProperty(window,"cast",{get:function(){return window.cast_},set:function(e){window.cast_=e;window.setTimeout(function(){UV(!0)},0)}});VV(this);WV.add(this)},YV=function(a){var b,c;return _.I(function(d){if(1==d.a)return a.G.release(),WV["delete"](a),a.f&&(a.f=!1,b=cast.framework.CastContext.getInstance(),b.removeEventListener(cast.framework.CastContextEventType.CAST_STATE_CHANGED,
11
- a.P),b.removeEventListener(cast.framework.CastContextEventType.SESSION_STATE_CHANGED,a.Ga)),c=[],a.h&&(c.push(a.h.destroy()),a.h=null),a.l&&(c.push(a.l.destroy()),a.l=null),_.x(d,Promise.all(c),2);a.A=!1;a.w&&(a.w.stop(),a.w=null);a.W=null;a.la=null;_.z(d)})},$V=function(a){if(!a)return null;a:{var b=a.metadataType;var c=Object.entries(ZV);c=_.v(c);for(var d=c.next();!d.done;d=c.next()){d=_.v(d.value);var e=d.next().value;if(d.next().value===b){b=e;break a}}b=null}if(!b)return null;b=LV(ZV[b]);return Object.assign(b,
12
- a)},aW=function(a){var b=void 0===b?KV:b;return Object.values(ZV).includes(a)?a:b},bW=function(a){var b={},c;for(c in a)void 0!==a[c]&&(b[c]=a[c]);return b},VV=function(a){if(!a.f&&window.chrome&&chrome.cast&&chrome.cast.isAvailable&&window.cast&&cast.framework&&cast.framework.CastContext&&a.aa.length){a.o=new cast.framework.RemotePlayer;var b=new cast.framework.RemotePlayerController(a.o);a.G.on(b,cast.framework.RemotePlayerEventType.CURRENT_TIME_CHANGED,a.Bk.bind(a));a.G.on(b,cast.framework.RemotePlayerEventType.MEDIA_INFO_CHANGED,
13
- a.Mn.bind(a));a.f=!0;a.O.resolve();a.w.jh();b=cast.framework.CastContext.getInstance();var c=new cast.framework.CastOptions;c.receiverApplicationId=a.aa;c.autoJoinPolicy=chrome.cast.AutoJoinPolicy.ORIGIN_SCOPED;b.setOptions(c);b.addEventListener(cast.framework.CastContextEventType.CAST_STATE_CHANGED,a.P);b.addEventListener(cast.framework.CastContextEventType.SESSION_STATE_CHANGED,a.Ga);cW&&a.w.ia(.02)}},dW=function(a){var b=a.getPosition();a.a&&a.a.media?(a=a.a.media.startAbsoluteTime,a=typeof a!==
14
- _.k?null:a):a=null;a=null===a?null:a+b;return null===a?b:a},fW=function(a,b){eW(a,b.getMediaSession());b.addEventListener(cast.framework.SessionEventType.MEDIA_SESSION,a.ha);b.addMessageListener(zV,a.T);b.addMessageListener(AV,a.ca)},eW=function(a,b){a.a=b;a.a&&(a.l&&a.l.init(),a.trigger(new _.Q(_.Me)))},gW=function(a){return _.I(function(b){return a.Da()?b.C(0):_.x(b,cast.framework.CastContext.getInstance().requestSession(),0)})},hW=function(a,b){var c,d,e,f,g,h,l,m,n,p,q,t,u,y,D,C,B,E,A;return _.I(function(J){switch(J.a){case 1:if(!a.f)return J["return"]();
15
- c=chrome.cast.media.StreamType;d=_.xw;return _.x(J,gW(a),2);case 2:if(!b)return J["return"]();e=cast.framework.CastContext.getInstance();f=e.getCurrentSession();g=new chrome.cast.media.MediaInfo(b.source.url,b.source.type);g.streamType=b.isLive?c.LIVE:c.BUFFERED;h=b;l=h.pc;m=h.kb;g.hlsVideoSegmentFormat=JV(l,d.VIDEO);g.hlsSegmentFormat=JV(m,d.AUDIO);if(!b.Ja){J.C(3);break}if(!a.K){J.C(4);break}return _.x(J,Promise.resolve(a.K(b.Ja)),5);case 5:if(n=J.f)b.Ja=n;case 4:a.j=b.Ja;a.D=_.Rn(a.j);a.B=a.D.findIndex(function(N){return N.url===
16
- b.source.url});if(!b.Ja.remoteTextTracks){J.C(6);break}return _.x(J,Promise.all(b.Ja.remoteTextTracks.map(a.Ol.bind(a))),7);case 7:p=J.f,g.tracks=p.filter(function(N){return N}),b.Ja.remoteTextTracks=void 0;case 6:delete b.Ja.autoplay,b.Ja.startTime=null,g.customData={playerConfiguration:FV(b.Ja)};case 3:q=a.Ob()||{};t=aW(q.metadataType);typeof b.Ug===_.k&&(u={metadataType:t,sectionStartAbsoluteTime:b.Ug});b.source.name&&(y={metadataType:t,title:b.source.name});D=bW(q);if(C=$V(Object.assign({},u,
17
- y,D)))g.metadata=C;B=new chrome.cast.media.LoadRequest(g);(E=b.queueData)&&E.items&&0<E.items.length&&(A=new chrome.cast.media.QueueData,A.items=E.items,A.startIndex=E.startIndex,B.queueData=A);typeof b.autoplay===_.bd&&(B.autoplay=b.autoplay);typeof b.currentTime===_.k&&(B.currentTime=b.currentTime);return _.x(J,f.loadMedia(B),8);case 8:null!=b.Ja.muted&&a.setMuted(b.Ja.muted),null!=b.Ja.volume&&a.setVolume(b.Ja.volume),_.z(J)}})},iW=function(a,b,c){c=void 0===c?0:c;var d,e;return _.I(function(f){(d=
18
- a.h.xa())&&d.language&&(a.j.preferredTextLanguage=d.language);(e=a.h.oa())&&e.language&&(a.j.preferredAudioLanguage=e.language);return _.x(f,hW(a,{source:a.getLoadedSource(),currentTime:c,isLive:a.isLive(),Ug:a.getPresentationStartTime(),autoplay:b,Ja:a.j}),0)})},UV=function(a){if(a){a=_.v(WV);for(var b=a.next();!b.done;b=a.next())VV(b.value)}},kW=function(a,b,c){_.Di.call(this);this.f=a;this.h=b;this.j=typeof c===_.ue?c:this.Eo;this.a=jW(this);this.g=new _.L(wV);this.f&&this.forwardEventsTo(this.f)},
19
- jW=function(a){return new XV(a.h,function(){a.trigger(new _.Q(_.id))},function(b,c){var d=a.f.getConfiguration();d.source=c.source;d.autoplay=!1;d.startTime=c.currentTime?Math.max(c.currentTime-1,0):null;d.ima&&d.startTime&&(d.ima.playAdsAfterTime=d.startTime);c.Dh&&(d.preferredAudioLanguage=c.Dh);c.Oj&&(d.preferredTextLanguage=c.Oj);_.Mo(a.f,null);a.trigger(new _.Q("castingended"));a.j(b,d)},function(){return lW(a)})},lW=function(a){var b,c,d;return _.I(function(e){if(1==e.a){a.trigger(new _.Q(_.hd));
20
- b=a.f.a;if(b===a.a||!a.f||!a.a)return e["return"]();c=null!=a.f.getLoadedSource();return _.x(e,a.f.release(),2)}_.Mo(a.f,a.a);if(!c)return e.C(0);_.Vo(a.f);return(d=a.f.getAdsManager())?_.x(e,d.load(),0):e.C(0)})},mW=function(a){EV.call(this,a,"clpp.cast.StateManager");this.I=this.Ik.bind(this);this.H=this.Hk.bind(this);this.w=this.In.bind(this);this.o=this.yn.bind(this);this.K=this.Kk.bind(this);this.J=this.Jk.bind(this);this.L=this.$n.bind(this);this.G=this.Ln.bind(this);this.D=this.Gk.bind(this);
21
- this.a=this.Fk.bind(this)},qW=function(a,b){a=void 0===a?[]:a;b=void 0===b?0:b;_.Di.call(this);this.a=a.slice();this.f=b},vW=function(a,b){0>b||b>=a.a.length||(a.f=b,a.trigger(new _.Q(_.Cf,{item:a.Pb()})))},AW=function(a){a.trigger(new _.Q(_.Df))},CW=function(a,b,c){c=void 0===c?function(){return Promise.resolve()}:c;_.Di.call(this);var d=this;this.m=a;this.a=b;this.w=c;this.j=this.f=this.h=!1;this.o=function(){var e,f;return _.I(function(g){switch(g.a){case 1:if(d.f)return g["return"]();e=d.a.Pb();
22
- if(!e)return g["return"]();d.f=!0;_.F(g,2,3);return _.x(g,d.w(e),5);case 5:return _.x(g,d.m.load(Object.assign({},e.configuration,{autoplay:!0})),3);case 3:_.Eh(g);d.f=!1;_.Fh(g);break;case 2:throw f=_.H(g),f;}})};this.l=function(){BW(d)}},BW=function(a){DW(a);var b=Math.min(a.a.oe().length-1,a.a.getPosition()+1);vW(a.a,b)},DW=function(a){a.j||(a.a.on(_.Cf,a.o),a.j=!0)},EW=function(a,b,c){var d=this;this.player=a;this.Xb=new qW(c);this.Kd=new CW({load:this.player.load.bind(this.player),off:this.player.off.bind(this.player),
23
- on:this.player.on.bind(this.player)},this.Xb,function(){return _.I(function(e){_.z(e)})});this.a=new kW(this.player,b,function(e,f){var g;return _.I(function(h){if(1==h.a)return g=d.Xb.getPosition(),d.Kd.Cd(g),f.autoplay=!0,delete f.license,_.x(h,d.player.load(f),2);if(3!=h.a)return typeof f.currentTime!==_.k?h.C(3):_.x(h,d.player.seek(Math.max(f.currentTime-1,0)),3);d.player.play();_.z(h)})});this.f=function(e){e&&e.type===sV&&typeof e.index===_.k&&vW(d.Xb,e.index)};this.a.addMessageListener(this.f)},
24
- FW=function(a){return a.map(function(b){var c={};c.media={contentId:b.configuration.source};c.customData={skippable:!1!==b.skippable};return c})},GW=function(a,b,c,d,e){this.a=a;this.f=b;this.l=typeof c===_.k?c:1;this.h=typeof d===_.k?d:1;this.j=typeof e===_.k?e:0},HW=function(a){this.a=a},JW=function(a){this.m=a;this.a=null;this.j=this.Lk.bind(this);this.h=[cast.framework.events.EventType.PLAYER_LOADING,cast.framework.events.EventType.BREAK_CLIP_LOADING,cast.framework.events.EventType.BREAK_STARTED,
25
- cast.framework.events.EventType.BREAK_ENDED,cast.framework.events.EventType.BREAK_CLIP_STARTED,cast.framework.events.EventType.BREAK_CLIP_ENDED,cast.framework.events.EventType.PLAYING,cast.framework.events.EventType.PAUSE,cast.framework.events.EventType.BUFFERING];this.f=!1;IW().addEventListener(this.h,this.j)},NW=function(a,b,c){var d,e,f,g,h,l,m;return _.I(function(n){if(1==n.a){d=b.adTagUrl;if(!d)return n["return"]();_.F(n,2);KW=!1;e=_.Zk(d);return _.x(n,c.fetch(e).U,4)}if(2!=n.a){if((f=n.f)&&
26
- f.data)if(g=_.R.ga(f.data),h=new DOMParser,l=h.parseFromString(g,_.tg),l.getElementsByTagName("vmap:VMAP").length)LW.warn("VMAP detected."),a.vmapAdsRequest=MW(g);else if(l.getElementsByTagName("VAST").length){LW.warn("VAST detected.");var p=new cast.framework.messages.BreakClip("bc1");p.vastAdsRequest=MW(g);var q=new cast.framework.messages.Break("b1",[p.id],0);a.breakClips=[p];a.breaks=[q]}else LW.warn("Unsupported schema."),KW=!0;return _.G(n,0)}m=_.H(n);LW.warn("Failed to fetch an ad",m);KW=!0;
27
- _.z(n)})},MW=function(a){var b=new cast.framework.messages.VastAdsRequest;b.adsResponse=a;return b},IW=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},PW=function(a,b,c){if(c instanceof cast.framework.events.BreaksEvent||-1!==a.getPosition()){var d=null;(c=OW(a,c))&&(d={ad:c});a.m.trigger(new _.Q(b,d))}},QW=function(a,b){var c=new _.O(1,10,10003,{errorType:b});a.m.onError(c)},OW=function(a,b){var c=null;if(a.a&&b instanceof cast.framework.events.BreaksEvent){var d=
28
- null,e=null,f;typeof b.breakClipId===_.lg&&(d=a.a.getBreakClipById(b.breakClipId));typeof b.breakId===_.lg&&(e=a.a.getBreakById(b.breakId),!e&&d&&(e=a.a.getBreaks().find(function(g){return g.breakClipIds.includes(d.id)})||null),e&&(f=a.a.getBreaks().filter(function(g){return 0<=g.position}).sort(function(g,h){return g.position-h.position}).findIndex(function(g){return g===e})));c=new GW(d,e,b.index,b.total,f)}return c},RW=function(a){this.a=a;this.f=this.h.bind(this)},SW=function(){return[cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,
29
- cast.framework.events.EventType.TIMED_METADATA_CHANGED,cast.framework.events.EventType.TIMED_METADATA_ENTER,cast.framework.events.EventType.TIMED_METADATA_EXIT]},TW=function(a){var b=a.dashTimedMetadata,c=_.Lg;b&&(c=b.schemeIdUri);return{type:c.startsWith(_.Kg)?_.Zf:_.Ig,schemeIdUri:c,id:a.id||"",startTime:a.startTime,endTime:a.endTime,value:b&&b.value||"",eventElement:b?b.eventElement:null}},UW=function(){this.g=new _.L("clpp.cast.TrackManager");this.m=null;this.o=1E9;this.h=[];this.j=[];this.l=
30
- this.vo.bind(this);this.a=this.f=null},VW=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},XW=function(a){a.a=VW().getTextTracksManager();var b=a.a.getTracks();a.j=WW(_.$s,b)},YW=function(a,b,c,d){c=_.Ii(c).filter(function(h){return h});var e=!1,f=[];b===_.X?f=a.getAudioTracks():b===_.$s&&(f=a.pa());if(c=c.find(function(h){var l=_.ro(h);return f.some(function(m){m=_.ro(m.language||"");return _.so(l,m)})})){var g=_.ro(c);c=f.filter(function(h){h=_.ro(h.language||
31
- "");return _.so(g,h)});f=c.length?c:f;e=e||!!c.length}_.R.Gf(d)&&(c=f.filter(function(h){return h.roles.includes(d)}),f=c.length?c:f,e=e||!!c.length);e&&f[0]&&(e=f[0],a.g.info("Will select track",e),b===_.X?a.Ka(e):b===_.$s&&a.cb(e))},WW=function(a,b){for(var c=[],d=_.v(b),e=d.next();!e.done;e=d.next()){e=e.value;var f=new _.Ys(e.trackId.toString(),a);f.roles=e.roles||[];f.kind=e.subtype||null;f.language=e.language||null;f.originalLanguage=e.language||null;f.label=e.name||null;f.src=e.trackContentId||
32
- null;f.mimeType=e.trackContentType||null;e.customData&&(f.mimeType=e.customData.mimeType||f.mimeType,f.src=e.customData.url||f.src);f.renditions.push(new _.gt(f.id,f));c.push(f)}return c},ZW=function(){_.Di.call(this);this.g=new _.L(xV);this.h=this.w=_.Ln();this.A=null;this.l=-1;this.G=new _.Xm;this.f=this.o=this.j=this.a=this.B=null;this.D=!1},$W=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},aX=function(a,b){var c=Object.assign({},a.shakaConfig,b);return Object.assign({},
33
- a,{shakaConfig:c})},dX=function(a,b){function c(){b.protectionSystem=cast.framework.ContentProtection.NONE;b.licenseUrl=void 0;b.licenseRequestHandler=void 0;b.licenseHandler=void 0}if(a&&a.drm){var d=a.drm,e=_.Xn(d);if(e){var f=[_.Kd];_.Rn(a)[0].type!==_.Qc&&f.unshift(_.Md);d.preferredDrmSystem===_.Kd&&f.reverse();for(var g,h;f.length&&!h;)g=f.shift(),h=e.Ra[g];h?(d=g===_.Md?cast.framework.ContentProtection.WIDEVINE:g===_.Kd?cast.framework.ContentProtection.PLAYREADY:void 0,b.protectionSystem=d,
34
- b.licenseUrl=h.licenseUrl,d={ldlDelay:0,customData:{}},bX(b,h,a,d),cX(b,h,a,d)):c()}else c()}else c()},bX=function(a,b,c,d){b.modifiers.licenseRequest?a.licenseRequestHandler=function(e){var f=_.Zk({method:_.rb,uris:[e.url]});e.headers&&(f.headers=e.headers);f.body=e.content;f.allowCrossSiteCredentials=e.withCredentials;b.modifiers.licenseRequest(c,f,d);e.url=f.uris[0];e.headers=f.headers;e.content=f.body;e.withCredentials=f.allowCrossSiteCredentials}:a.licenseRequestHandler=void 0},cX=function(a,
35
- b,c,d){b.modifiers.licenseResponse?a.licenseHandler=function(e,f){var g;return _.I(function(h){return 1==h.a?(g=_.dl(Object.assign({},f.headers),e.buffer,200,""),_.x(h,b.modifiers.licenseResponse(c,g,d),2)):h["return"](_.Qi(g.data))})}:a.licenseHandler=void 0},eX=function(){this.a=!1;this.g=new _.L(yV);this.f=this.m=null;this.w=new Set;this.D=this.Kn.bind(this);this.B=this.Dk.bind(this);this.o=null;this.l=new _.wi;this.j=this.h=this.A=null},gX=function(){return fX||(fX=new eX)},hX=function(){return cast.framework.CastReceiverContext.getInstance()},
36
- iX=function(){var a=hX().getPlayerManager().getMediaInformation();return a&&a.metadata?a.metadata:null},jX=function(a,b){var c=hX().getPlayerManager().getMediaInformation();if(c){b?c.metadata=b:delete c.metadata;var d=!0;d=void 0===d?!1:d;hX().getPlayerManager().setMediaInformation(c,d)}else a.g.warn("No mediaInformation is present. Skipping metadata update.")},lX=function(a,b){a.g.debug("Detected HLS, parsing");var c=cast.framework.messages.HlsVideoSegmentFormat,d=hX();c=(hX().getPlayerManager().getMediaInformation()||
37
- {}).hlsVideoSegmentFormat===c.FMP4?_.Ug:_.Tg;b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");for(var e=b.split(/\n+/m),f=[],g=0;g<e.length;){var h=e[g].trim();if(e[g].startsWith("#EXT-X-STREAM-INF")){var l=kX(h,_.ua),m=kX(h,_.zb),n=_.v([]),p=n.next().value;n=n.next().value;m&&(m=_.v(m.split("x").map(function(q){return+q})),p=m.next().value,n=m.next().value);if(!d.canDisplayType(c,l,p,n)){g+=2;continue}}f.push(h);++g}return f.join("\n")},kX=function(a,b){b+="\x3d";var c=a.indexOf(b);if(0<=c){var d=a.substring(c+
38
- b.length);d.startsWith('"')?(d=d.substring(1),d=d.substring(0,d.indexOf('"'))):(c=d.indexOf(","),0<=c&&(d=d.substring(0,c)))}return d},mX=function(a){a=_.v(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;var c={};b.customData&&_.M.Tb(b.customData)&&(c=b.customData);b.roles&&(c.roles=b.roles);b.audioTrackInfo&&(c.audioTrackInfo=b.audioTrackInfo);_.M.Tb(c)&&(b.customData=c)}},oX=function(a){this.h=a;this.a=null;this.j=new _.wi;this.f=null;nX(this)},nX=function(a){_.I(function(b){if(1==b.a)return _.x(b,
39
- a.h.O,2);a.a=a.h.o;a.j.on(a.a.controller,cast.framework.RemotePlayerEventType.ANY_CHANGE,a.bo.bind(a));_.z(b)})},pX=function(a,b,c){var d=null;c&&(d={ad:c});a.h.trigger(new _.Q(b,d))},qX=function(a){if(!a.a||!a.a.mediaInfo)return null;var b=a.a.mediaInfo.breaks,c=a.a.mediaInfo.breakClips,d=a.a.isPlayingBreak,e=a.a.breakId,f=a.a.currentBreakClipNumber,g=a.a.numberBreakClips,h=a.a.breakClipId;if(!(b&&c&&null!=e&&null!=f&&null!=g&&null!=h&&d))return null;var l=b.find(function(m){return m.id===e})||null;
40
- a=0;l&&(a=0>=l.position?l.position:b.filter(function(m){return 0<=m.position}).sort(function(m,n){return m.position-n.position}).findIndex(function(m){return m===l}));b=c.find(function(m){return m.id===h})||null;return new GW(b,l,f,g,a)},rX=function(){},sX=function(){};_.r=EV.prototype;_.r.release=function(){this.Ca(_.du)};_.r.destroy=function(){this.j=this.player=null;return Promise.resolve()};_.r.getState=function(){return this.f};_.r.onError=function(a){a.severity===_.P&&this.Ca(_.Ho)};
41
- _.r.Ca=function(a){if(a!==this.f)if(this.f===_.Ho&&a!==_.du)this.log.debug("Player is in ERROR state and can not switch to",a);else{var b=Date.now();this.l=this.f;this.f=a;2===this.f?(this.A=b,this.player.trigger(new _.Q(_.dd,{detail:{bufferedTimeMS:-1,reason:this.h}}))):2===this.l&&this.player.trigger(new _.Q(_.cd,{detail:{bufferedTimeMS:b-this.A,reason:this.h}}));a={currentState:this.f,previousState:this.l,timeSinceLastStateChangeMS:b-this.B};this.B=b;this.j&&_.Xt(this.j,this.f);this.player.trigger(new _.Q(_.ig,
42
- {detail:a}))}};var tX;_.K("clpp.cast.CastUtils",function(){});var KV=0,ZV={GENERIC:KV,MOVIE:1,TV_SHOW:2,MUSIC_TRACK:3,PHOTO:4,AUDIOBOOK_CHAPTER:5},uX="addMissingTimelineCues alwaysStreamText bufferBehind bufferingGoal durationBackoff gapDetectionThreshold ignoreTextStreamFailures lowLatencyMode rebufferingGoal retryParameters safeSeekOffset stallEnabled stallSkip stallThreshold startAtSegmentBoundary".split(" "),vX="bandwidthDowngradeTarget bandwidthUpgradeTarget defaultBandwidthEstimate enabled initialRestrictions restrictions switchInterval".split(" ");_.w(NV,EV);NV.prototype.init=function(){var a=this.player,b=a.a;b&&(this.a&&this.a.removeUpdateListener(this.w),this.a=b,this.a.addUpdateListener(this.w),this.o=a.o)};NV.prototype.destroy=function(){var a=this;return _.I(function(b){a.a&&(a.a.removeUpdateListener(a.w),a.a=null);return _.x(b,EV.prototype.destroy.call(a),0)})};NV.prototype.Ca=function(a){var b=this.player.o;b&&b.isPlayingBreak||EV.prototype.Ca.call(this,a)};
43
- NV.prototype.kc=function(){if(this.a&&this.o&&!this.o.isPlayingBreak)switch(this.a.playerState){case chrome.cast.media.PlayerState.IDLE:switch(this.a.idleReason){case chrome.cast.media.IdleReason.FINISHED:this.Ca(5);break;case chrome.cast.media.IdleReason.ERROR:this.Ca(_.Ho);break;default:this.Ca(_.du)}break;case chrome.cast.media.PlayerState.PLAYING:this.Ca(3);break;case chrome.cast.media.PlayerState.PAUSED:this.Ca(4);break;case chrome.cast.media.PlayerState.BUFFERING:this.Ca(2)}};_.w(OV,_.wt);_.r=OV.prototype;_.r.initialize=function(a){this.a=a};_.r.release=function(){this.h=[];this.f={}};
44
- _.r.load=function(){this.release();var a=this.a.a;a&&(a=a.media)&&(this.h=(a=a.tracks)?a.map(function(b){switch(b.type){case chrome.cast.media.TrackType.VIDEO:var c=_.at;break;case chrome.cast.media.TrackType.AUDIO:c=_.X;break;case chrome.cast.media.TrackType.TEXT:c=_.$s}c=new _.Ys(b.trackId.toString(),c);c.kind=b.subtype;c.language=b.language;c.label=b.name;c.src=b.trackContentId;c.mimeType=b.trackContentType;if(b.customData){c.src=b.customData.url||c.src;c.mimeType=b.customData.mimeType||c.mimeType;
45
- var d=b.customData.roles;d&&(c.roles=d);if(b=b.customData.audioTrackInfo)void 0!==b.numAudioChannels&&(c.channelsCount=b.numAudioChannels),void 0!==b.spatialAudio&&(c.spatialAudio=b.spatialAudio)}c.renditions.push(new _.gt(c.id,c));return c}):[],this.a.trigger(new _.Q(_.Cg)))};_.r.destroy=function(){this.a=null};_.r.getVideoTracks=function(){return QV(this,_.at)};_.r.getAudioTracks=function(){return QV(this,_.X)};_.r.pa=function(){return QV(this,_.$s)};
46
- _.r.qa=function(){var a=this.Oa();return a?a.renditions[0]:null};_.r.Wa=function(){var a=this.oa();return a?a.renditions[0]:null};_.r.ab=function(){var a=this.xa();return a?a.renditions[0]:null};_.r.Bb=function(){return this.f[_.at]||null};_.r.Qb=function(){return this.f[_.X]||null};_.r.Rb=function(){return this.f[_.$s]||null};_.r.Oa=function(){return RV(this,_.at)};_.r.oa=function(){return RV(this,_.X)};_.r.xa=function(){return RV(this,_.$s)};_.r.Kb=function(a){TV(this,_.at,a)};
47
- _.r.Ka=function(a){TV(this,_.X,a)};_.r.cb=function(a){TV(this,_.$s,a)};_.r.ub=function(a){this.Kb(a&&a.track)};_.r.Ib=function(a){this.Ka(a&&a.track)};_.r.Jb=function(a){this.cb(a&&a.track)};_.r.addTextTrack=function(){return _.I(function(a){_.z(a)})};_.r.ya=function(){return!0};OV.prototype.isAbrEnabled=OV.prototype.ya;OV.prototype.addTextTrack=OV.prototype.addTextTrack;OV.prototype.setTextRendition=OV.prototype.Jb;OV.prototype.setAudioRendition=OV.prototype.Ib;OV.prototype.setVideoRendition=OV.prototype.ub;
48
- OV.prototype.setTextTrack=OV.prototype.cb;OV.prototype.setAudioTrack=OV.prototype.Ka;OV.prototype.setVideoTrack=OV.prototype.Kb;OV.prototype.getTextTrack=OV.prototype.xa;OV.prototype.getAudioTrack=OV.prototype.oa;OV.prototype.getVideoTrack=OV.prototype.Oa;OV.prototype.getLoadingTextRendition=OV.prototype.Rb;OV.prototype.getLoadingAudioRendition=OV.prototype.Qb;OV.prototype.getLoadingVideoRendition=OV.prototype.Bb;OV.prototype.getTextRendition=OV.prototype.ab;OV.prototype.getAudioRendition=OV.prototype.Wa;
49
- OV.prototype.getVideoRendition=OV.prototype.qa;OV.prototype.getTextTracks=OV.prototype.pa;OV.prototype.getAudioTracks=OV.prototype.getAudioTracks;OV.prototype.getVideoTracks=OV.prototype.getVideoTracks;_.w(XV,_.Di);_.r=XV.prototype;_.r.init=function(a,b){this.j=this.H=b};_.r.unload=function(){var a=this;return this.f?new Promise(function(b,c){a.h&&a.h.release();a.a&&!a.a.idleReason||b();a.a.stop(null,b,c)}):Promise.resolve()};_.r.release=function(){var a=this;return this.f?this.unload().then(function(){a.l&&a.l.release()}):Promise.resolve()};_.r.getTimeline=function(){return null};_.r.setupPlaylist=function(){return Promise.reject(_.nb)};_.r.appendLoad=function(){return Promise.reject(_.nb)};
50
- _.r.seekWith=function(){return Promise.reject(_.nb)};_.r.setSeekInterceptor=function(){};_.r.setPlaybackSessionId=function(){};_.r.getBandwidthEstimate=function(){return null};_.r.destroy=function(){return _.I(function(a){_.z(a)})};_.r.Le=function(a){this.K=a};_.r.Tc=function(){return this.f};_.r.Da=function(){return this.A};_.r.Ag=function(){return this.Aa};
51
- _.r.sendMessage=function(a,b){var c=this,d,e,f;return _.I(function(g){switch(g.a){case 1:if(!c.f)return g["return"]();e=cast.framework.CastContext.getInstance().getCurrentSession();if(!e){d=new _.O(1,8,8004,void 0);g.C(2);break}_.F(g,3);return _.x(g,e.sendMessage(a,b),5);case 5:_.G(g,2);break;case 3:f=_.H(g),d=new _.O(1,8,8E3,{detailedErrorCode:f});case 2:if(d)c.onError(d);_.z(g)}})};
52
- _.r.cast=function(){var a=this,b,c;return _.I(function(d){if(1==d.a){if(!a.Tc())throw a.g.warn(uV),new _.O(1,8,8001,void 0);if(!cW)throw a.g.warn(rV),new _.O(1,8,8002,void 0);if(a.Da())throw a.g.warn("Already casting"),new _.O(1,8,8003,void 0);_.F(d,2);return _.x(d,gW(a),4)}if(2!=d.a)return _.G(d,0);b=_.H(d);c={};b instanceof chrome.cast.Error?(c.detailedErrorCode=b.code,c.details=b.details,c.reason=b.description):c.detailedErrorCode=b;throw new _.O(1,8,8E3,c);})};
53
- _.r.rf=function(){this.f&&this.Da()&&cast.framework.CastContext.getInstance().endCurrentSession(!0)};_.r.addMessageListener=function(a){typeof a===_.ue&&this.L.add(a)};_.r.removeMessageListener=function(a){typeof a===_.ue&&this.L["delete"](a)};_.r.play=function(){var a=this;return this.f?this.isEnded()?iW(this,!0):new Promise(function(b,c){if(!a.a)return c(qV);a.a.play(null,b,c)}):Promise.resolve()};
54
- _.r.pause=function(){var a=this;return this.f?new Promise(function(b,c){a.isEnded()&&b();if(!a.a)return c(qV);a.a.pause(null,b,c)}):Promise.resolve()};_.r.isPaused=function(){return this.f?!!this.a&&this.a.playerState===chrome.cast.media.PlayerState.PAUSED:!1};_.r.isEnded=function(){return this.f?5===this.getState():!1};
55
- _.r.seek=function(a){var b=this;return this.f?this.isEnded()?iW(this,!1,a):new Promise(function(c,d){b.a||d(qV);b.o.isPlayingBreak&&d(oV);var e=new chrome.cast.media.SeekRequest;e.currentTime=a;b.trigger(new _.Q(_.Ng));b.a.seek(e,function(){b.trigger(new _.Q(_.Mg));c()},d)}):Promise.resolve()};_.r.getPosition=function(){return this.f?this.getMediaPosition():0};_.r.getMediaPosition=function(){return this.f?this.a&&this.a.getEstimatedTime()||0:0};
56
- _.r.getDuration=function(){return this.f?this.getMediaDuration():0};_.r.getMediaDuration=function(){if(!this.f)return 0;if(!this.a||!this.a.media)return-1;var a=this.a.media.duration;return typeof a!==_.k?-1:-1===a?Infinity:a};_.r.setDrmCustomDataModifier=function(){};_.r.setCdnErrorCallback=function(){};_.r.detach=function(){};_.r.getPlaybackRate=function(){return this.f?this.a&&this.a.playbackRate||0:0};
57
- _.r.setPlaybackRate=function(a){this.f&&this.a&&0<a&&this.sendMessage(BV,{type:"SET_PLAYBACK_RATE",requestId:MV(),mediaSessionId:this.a.mediaSessionId,playbackRate:a})};_.r.getVolume=function(){return this.f?this.a&&this.a.volume.level:0};_.r.setVolume=function(a){this.f&&this.a&&0<=a&&1>=a&&(a=new chrome.cast.media.VolumeRequest(new chrome.cast.Volume(a)),this.a.setVolume(a))};_.r.isMuted=function(){return this.f?this.a&&this.a.volume.muted:!1};
58
- _.r.setMuted=function(a){this.f&&this.a&&(a=new chrome.cast.media.VolumeRequest(new chrome.cast.Volume(void 0,a)),this.a.setVolume(a))};_.r.getPresentationStartTime=function(){if(!this.f)return 0;if(!this.a||!this.a.media||!this.a.media.metadata)return null;var a=this.a.media.metadata.sectionStartAbsoluteTime;return typeof a!==_.k?null:1E-8===a?0:a};
59
- _.r.getSeekRange=function(){if(!this.f)return{start:0,end:0};var a={start:0,end:this.getDuration()};if(this.isLive()){var b=this.a.getEstimatedLiveSeekableRange();b&&typeof b.start===_.k&&typeof b.end===_.k&&(a={start:b.start,end:b.end})}return a};_.r.getState=function(){return this.f?this.l?this.l.getState():7:7};_.r.getStats=function(){return this.f?this.a&&this.a.customData&&this.a.customData.stats?GV(this.a.customData.stats):_.cu():_.cu()};
60
- _.r.isLive=function(){return this.f?Infinity===this.getDuration():!1};_.r.load=function(a){var b=this,c,d;return _.I(function(e){if(!b.Tc())return b.g.warn(uV),e["return"]();if(!cW)return b.g.warn(rV),e["return"]();b.D=_.Rn(a);b.j=_.Nn([b.H,a]);c=b.D[b.B];d={source:c,isLive:c.isLive,autoplay:b.j.autoplay,Ja:b.j,pc:c.pc,kb:c.kb};return _.x(e,hW(b,d),0)})};_.r.getBufferInfo=function(){return new _.gi};_.r.getTrackManager=function(){return this.h};_.r.getConfiguration=function(){return this.j};
61
- _.r.getSurface=function(){return null};_.r.setNetworkEngine=function(a){this.J=a};_.r.getNetworkEngine=function(){return this.J};_.r.getSourceIndex=function(){return this.B};_.r.setSourceIndex=function(a){this.B=a};_.r.setCmsdManager=function(){};_.r.getLoadedSource=function(){return this.D[this.B]};_.r.getPeriods=function(){return[]};_.r.getDrmInfo=function(){return null};_.r.getTimelineCues=function(){return[]};_.r.getCueTimeline=function(){return null};_.r.resetAbr=function(){this.g.warn(tV)};
62
- _.r.onError=function(a){if(a&&(this.trigger(new _.Q(_.qe,{detail:a})),this.l))this.l.onError(a)};_.r.namespace=function(){return _.xd};_.r.canPlay=function(){return this.Tc()?2:0};_.r.Ob=function(){return this.I};_.r.nc=function(a){this.I=$V(a)};_.r.qg=function(){this.I=null};_.r.dh=function(a){if(this.f){var b=this.Ob()||{};a={metadataType:aW(b.metadataType),title:a};this.nc(Object.assign({},b,a))}};
63
- _.r.ah=function(a){if(this.f){var b=this.Ob()||{},c=aW(b.metadataType);a=new chrome.cast.Image(a);this.nc(Object.assign({},b,{metadataType:c,images:[a]}))}};_.r.$g=function(a){if(this.f){var b=this.Ob()||{};this.nc(Object.assign({},b,{metadataType:3,artist:a}))}};_.r.bh=function(a){if(this.f){var b=this.Ob()||{};a={metadataType:aW(b.metadataType),releaseDate:a};this.nc(Object.assign({},b,a))}};
64
- _.r.An=function(a){var b=cast.framework.CastContext.getInstance(),c=a.castState===cast.framework.CastState.CONNECTED;cW=a.castState!==cast.framework.CastState.NO_DEVICES_AVAILABLE;this.Aa=c?b.getCurrentSession().getCastDevice().friendlyName:"";this.w.jh()};
65
- _.r.Xn=function(a){this.g.debug("state: "+a.sessionState+", details:",a);switch(a.sessionState){case cast.framework.SessionState.SESSION_STARTED:this.A=!0;fW(this,a.session);break;case cast.framework.SessionState.SESSION_RESUMED:this.Da()||(this.A=!0,fW(this,a.session),this.la());break;case cast.framework.SessionState.SESSION_ENDED:if(this.Da()&&this.a){var b=this.a.media,c=this.h.oa(),d=this.h.xa();c=c&&c.language||void 0;d=d&&d.language||void 0;this.W(this.getState(),{source:{url:b.contentId,type:b.contentType,
66
- isLive:this.isLive()},currentTime:dW(this),Oj:d,Dh:c})}a.session.removeEventListener(cast.framework.SessionEventType.MEDIA_SESSION,this.ha);a.session.removeMessageListener(zV,this.T);a.session.removeMessageListener(AV,this.ca);this.A=!1;this.a=null}};_.r.Nn=function(a){this.g.debug("New media session",a.mediaSession);eW(this,a.mediaSession)};_.r.Mn=function(a){a.value&&a.value.tracks&&this.h&&this.h.load()};_.r.Gn=function(a,b){var c=GV(b);this.L.forEach(function(d){return d(c)})};
67
- _.r.Fn=function(a,b){var c=GV(b);"event"===c.type&&c.name===_.Yg&&this.trigger(new _.Q(_.jd,{visible:!!c.visible}))};_.r.Bk=function(){this.trigger(new _.Q(_.zg))};
68
- _.r.Ol=function(a){var b=this,c,d;return _.I(function(e){if(1==e.a)return c=null,_.x(e,IV(a,[_.sg,_.Pc],b.J,b.j),2);if(d=e.f)c=new chrome.cast.media.Track(b.Sa++,chrome.cast.media.TrackType.TEXT),c.language=d.language,c.name=d.label||null,c.trackContentId=d.url,c.trackContentType=d.mimeType,c.customData={mimeType:a.mimeType,url:a.url};return e["return"](c)})};_.r.getTextDisplayer=function(){return null};var cW=!1,WV=new Set;window.__onGCastApiAvailable=UV;_.w(kW,_.Di);_.r=kW.prototype;_.r.destroy=function(){var a=this;return _.I(function(b){if(1==b.a)return a.a?_.x(b,YV(a.a),3):b.C(2);2!=b.a&&(a.a=null);a.f&&a.stopForwardingEventsTo(a.f);_.z(b)})};_.r.Eo=function(a,b){this.f&&5!==a&&a!==_.du&&(delete b.license,this.f.load(b))};_.r.od=function(){return!!this.a&&this.a.Tc()&&cW};_.r.Da=function(){return!!this.a&&this.a.Da()};_.r.Ag=function(){return this.a?this.a.Ag():""};_.r.Le=function(a){this.a&&this.a.Le(a)};
69
- _.r.cast=function(a,b){var c=this,d,e,f;return _.I(function(g){switch(g.a){case 1:if(!c.a)return g["return"]();_.F(g,2);return _.x(g,c.a.cast(),4);case 4:if(!c.f||!c.a)return g["return"]();var h=null,l=c.f.getLoadedSource();if(l){var m=c.f.getTrackManager();h=m.getVideoTracks()[0];if(h&&h.mimeType)var n=h.mimeType;h=c.f.getConfiguration();var p=m.oa();if(p){if(p.mimeType)var q=p.mimeType;p.language&&(h.preferredAudioLanguage=p.language);p.roles.length&&(h.preferredAudioRole=p.roles[0])}if(m=m.xa())m.language&&
70
- (h.preferredTextLanguage=m.language),m.roles.length&&(h.preferredTextRole=m.roles[0]);m=l&&typeof l.isLive===_.bd?l.isLive:c.f.isLive();h={source:l,isLive:m,autoplay:!c.f.isPaused(),currentTime:Math.max(c.f.getPosition()-1,0),Ug:c.f.getPresentationStartTime(),pc:n,kb:q,Ja:h}}d=h;b&&d&&(d.queueData={items:b.items,startIndex:b.startIndex});return _.x(g,lW(c),5);case 5:if(!c.a)return g["return"]();d&&(d.autoplay=!c.f.isPaused());if(a)return _.x(g,c.f.load(a),7);if(c.a.a){g.C(7);break}return _.x(g,hW(c.a,
71
- d),7);case 7:_.G(g,0);break;case 2:e=_.H(g),c.g.error("Error while trying to cast",e),f=new _.Q(_.qe,{detail:e}),c.trigger(f),_.z(g)}})};_.r.rf=function(){this.a&&this.a.rf()};_.r.vk=function(a){var b=this;return _.I(function(c){if(1==c.a){if(a===b.h)return c["return"]();b.h=a;return b.a?_.x(c,YV(b.a),2):c.C(2)}b.a=jW(b);_.z(c)})};_.r.sendMessage=function(a){var b=this;return _.I(function(c){return b.a?_.x(c,b.a.sendMessage(zV,a),0):(b.g.warn(vV),c["return"]())})};
72
- _.r.Bj=function(){var a=this;return _.I(function(b){return _.x(b,a.a.sendMessage(BV,{type:"QUEUE_NEXT",requestId:MV(),mediaSessionId:a.a.a.mediaSessionId}),0)})};_.r.Cj=function(){var a=this;return _.I(function(b){return _.x(b,a.a.sendMessage(BV,{type:"QUEUE_PREV",requestId:MV(),mediaSessionId:a.a.a.mediaSessionId}),0)})};_.r.Aj=function(a){var b=this;return _.I(function(c){return _.x(c,b.a.sendMessage(BV,{type:"QUEUE_INSERT",requestId:MV(),mediaSessionId:b.a.a.mediaSessionId,items:a}),0)})};
73
- _.r.addMessageListener=function(a){this.a?this.a.addMessageListener(a):this.g.warn(vV)};_.r.removeMessageListener=function(a){this.a?this.a.removeMessageListener(a):this.g.warn(vV)};_.r.Ob=function(){return this.a&&this.a.Ob()};_.r.nc=function(a){this.a&&this.a.nc(a)};_.r.qg=function(){this.a&&this.a.qg()};_.r.dh=function(a){this.a&&this.a.dh(a)};_.r.ah=function(a){this.a&&this.a.ah(a)};_.r.$g=function(a){this.a&&this.a.$g(a)};_.r.bh=function(a){this.a&&this.a.bh(a)};_.K(wV,kW);
74
- kW.prototype.setContentReleaseDate=kW.prototype.bh;kW.prototype.setContentArtist=kW.prototype.$g;kW.prototype.setContentImage=kW.prototype.ah;kW.prototype.setContentTitle=kW.prototype.dh;kW.prototype.clearContentMetadata=kW.prototype.qg;kW.prototype.setContentMetadata=kW.prototype.nc;kW.prototype.getContentMetadata=kW.prototype.Ob;kW.prototype.removeMessageListener=kW.prototype.removeMessageListener;kW.prototype.addMessageListener=kW.prototype.addMessageListener;kW.prototype.queueAddItems=kW.prototype.Aj;
75
- kW.prototype.queuePreviousItem=kW.prototype.Cj;kW.prototype.queueNextItem=kW.prototype.Bj;kW.prototype.sendMessage=kW.prototype.sendMessage;kW.prototype.changeReceiverId=kW.prototype.vk;kW.prototype.forceDisconnect=kW.prototype.rf;kW.prototype.cast=kW.prototype.cast;kW.prototype.setPlayerConfigInterceptor=kW.prototype.Le;kW.prototype.getReceiverName=kW.prototype.Ag;kW.prototype.isCasting=kW.prototype.Da;kW.prototype.canCast=kW.prototype.od;kW.prototype.destroy=kW.prototype.destroy;_.w(mW,EV);_.r=mW.prototype;
2
+ var f=function(window){var qV="Cannot seek during ads playout.",rV="Cannot switch track",sV="Media session does not exist.",tV="No receivers available",uV="QUEUE_ITEM_CHANGED",vV="Reset ABR functionality not available on cast.",wV="SDK not yet ready",xV="Sender is destroyed.",yV="clpp.cast.CastProxy",zV="clpp.cast.Player",AV="clpp.cast.Receiver",BV="urn:x-cast:castlabs",CV="urn:x-cast:castlabs:int",DV="urn:x-cast:com.google.cast.media",EV="volume control is not supported",FV=function(a){return _.I(function(b){return 1==
3
+ b.a?_.x(b,a.Zc(_.ef),2):_.x(b,a.Zc(_.df),0)})},GV=function(a,b){this.log=new _.M(b);this.player=a;this.j=null;this.f=_.du;this.l=7;this.h=2;this.B=Date.now();this.A=-1},HV=function(a){return JSON.stringify(a,function(b,c){if("license"!==b&&typeof c!==_.ue){if(c instanceof Event){var d={},e;for(e in c){var f=c[e];typeof f===_.$e?"detail"===e&&(d[e]=f):e in Event||(d[e]=f)}return d}return typeof c===_.h?isNaN(c)?"NaN":isFinite(c)?c:0>c?"-Infinity":"Infinity":c}})},IV=function(a){if(typeof a!==_.lg)return a;
4
+ try{return JSON.parse(a,function(b,c){return"NaN"===c?NaN:"-Infinity"===c?-Infinity:"Infinity"===c?Infinity:c})}catch(b){return a}},JV=function(a,b){var c=new Set(b);return Object.keys(a).reduce(function(d,e){c.has(e)&&(d[e]=a[e]);return d},{})},KV=function(a,b,c,d){var e,f,g,k,l,m,n,p;return _.I(function(q){if(1==q.a){if(b.includes(a.mimeType))return q["return"](a);g=f=e=null;for(k=0;k<b.length&&!f;)g=b[k++],f=_.ut(d,a.mimeType,g);if(!f||!g)return q.C(2);l=_.Zk(a.url);return _.x(q,c.fetch(l).U,3)}2!=
5
+ q.a&&(m=q.f)&&m.data&&(n=f.a(_.Qi(m.data)),p=URL.createObjectURL(new Blob([n])),e={url:p,kind:a.kind,language:a.language,label:a.label,mimeType:g});return q["return"](e)})},LV=function(a,b){if(window.chrome&&chrome.cast&&chrome.cast.media){var c=chrome.cast.media.HlsSegmentFormat;var d=chrome.cast.media.HlsVideoSegmentFormat}else if(window.cast&&cast.framework&&cast.framework.messages)c=cast.framework.messages.HlsSegmentFormat,d=cast.framework.messages.HlsVideoSegmentFormat;else return;switch(a){case _.Ug:return d.FMP4;
6
+ case _.Tg:return b===_.bt?d.MPEG2_TS:c.TS;case _.Tc:return c.AAC;case _.Uc:return c.AC3;case _.Vc:return c.E_AC3;case "audio/mpeg":return c.MP3;case _.Wc:return c.FMP4}},NV=function(a){a=void 0===a?MV:a;var b=cast.framework.messages||chrome.cast.media;if(!b)throw new _.O(1,8,8001);var c=b.MetadataType,d=b.GenericMediaMetadata,e=b.MovieMediaMetadata,f=b.TvShowMediaMetadata,g=b.MusicTrackMediaMetadata,k=b.PhotoMediaMetadata;b=b.AudiobookChapterMediaMetadata;switch(a){case c.MOVIE:return new e;case c.TV_SHOW:return new f;
7
+ case c.MUSIC_TRACK:return new g;case c.PHOTO:return new k;case c.AUDIOBOOK_CHAPTER:return new b;default:return new d}},OV=function(){return Math.round(1E3*Math.random())},PV=function(a){GV.call(this,a,"clpp.cast.SenderStateManager");this.o=this.a=null;this.w=this.mc.bind(this)},QV=function(){this.g=new _.M("clpp.cast.SenderTrackManager");this.a=null;this.h=[];this.f={}},RV=function(a){a=a.a?a.a.a:null;return(a?a.activeTrackIds||[]:[]).map(function(b){return b.toString()})},TV=function(a,b){var c=
8
+ RV(a);return SV(a,b).find(function(d){return c.includes(d.id)})||null},SV=function(a,b){return a.h.filter(function(c){return c.type===b})},VV=function(a,b,c){var d=a.a.a;if(d)if(c){a.f[b]=c.renditions[0];c=[+c.id];if(b!==_.at){var e=a.xa();e&&c.push(+e.id)}c=new chrome.cast.media.EditTracksInfoRequest(c);d.editTracksInfo(c,function(){a.f[b]=null;UV(a,b)},function(f){a.f[b]=null;a.g.debug(rV,f)})}else b===_.at&&(c=new chrome.cast.media.EditTracksInfoRequest([]),d.editTracksInfo(c,function(){UV(a,b)},
9
+ function(f){a.g.debug(rV,f)}))},UV=function(a,b){b===_.X?a.a.trigger(new _.Q(_.Zc)):b===_.at&&a.a.trigger(new _.Q(_.ug))},ZV=function(a,b,c,d){_.Di.call(this);this.g=new _.M(_.xd);this.X=a;this.w=new _.gj(b);this.W=c;this.ma=d;this.j=this.H=_.Ln();this.D=[];this.B=0;this.J=new _.Xm;this.a=null;this.f=!1;this.M=new _.nm;this.A=!1;this.Aa="";this.Va=1E6;this.h=new QV;this.h.initialize(this);this.l=new PV(this);this.G=new _.wi;this.I=null;this.L=new Set;this.P=this.Cn.bind(this);this.Ba=this.Zn.bind(this);
10
+ this.ha=this.Pn.bind(this);this.T=this.In.bind(this);this.ba=this.Hn.bind(this);this.o=this.K=null;window.cast||Object.defineProperty(window,"cast",{get:function(){return window.cast_},set:function(e){window.cast_=e;window.setTimeout(function(){WV(!0)},0)}});XV(this);YV.add(this)},$V=function(a){var b,c;return _.I(function(d){if(1==d.a)return a.G.release(),YV["delete"](a),a.f&&(a.f=!1,b=cast.framework.CastContext.getInstance(),b.removeEventListener(cast.framework.CastContextEventType.CAST_STATE_CHANGED,
11
+ a.P),b.removeEventListener(cast.framework.CastContextEventType.SESSION_STATE_CHANGED,a.Ba)),c=[],a.h&&(c.push(a.h.destroy()),a.h=null),a.l&&(c.push(a.l.destroy()),a.l=null),_.x(d,Promise.all(c),2);a.A=!1;a.w&&(a.w.stop(),a.w=null);a.W=null;a.ma=null;_.A(d)})},bW=function(a){if(!a)return null;a:{var b=a.metadataType;var c=Object.entries(aW);c=_.v(c);for(var d=c.next();!d.done;d=c.next()){d=_.v(d.value);var e=d.next().value;if(d.next().value===b){b=e;break a}}b=null}if(!b)return null;b=NV(aW[b]);return Object.assign(b,
12
+ a)},cW=function(a){var b=void 0===b?MV:b;return Object.values(aW).includes(a)?a:b},dW=function(a){var b={},c;for(c in a)void 0!==a[c]&&(b[c]=a[c]);return b},XV=function(a){if(!a.f&&window.chrome&&chrome.cast&&chrome.cast.isAvailable&&window.cast&&cast.framework&&cast.framework.CastContext&&a.X.length){a.o=new cast.framework.RemotePlayer;var b=new cast.framework.RemotePlayerController(a.o);a.G.on(b,cast.framework.RemotePlayerEventType.CURRENT_TIME_CHANGED,a.Dk.bind(a));a.G.on(b,cast.framework.RemotePlayerEventType.MEDIA_INFO_CHANGED,
13
+ a.On.bind(a));a.f=!0;a.M.resolve();a.w.mh();b=cast.framework.CastContext.getInstance();var c=new cast.framework.CastOptions;c.receiverApplicationId=a.X;c.autoJoinPolicy=chrome.cast.AutoJoinPolicy.ORIGIN_SCOPED;b.setOptions(c);b.addEventListener(cast.framework.CastContextEventType.CAST_STATE_CHANGED,a.P);b.addEventListener(cast.framework.CastContextEventType.SESSION_STATE_CHANGED,a.Ba);eW&&a.w.ia(.02)}},fW=function(a){var b=a.getPosition();a.a&&a.a.media?(a=a.a.media.startAbsoluteTime,a=typeof a!==
14
+ _.h?null:a):a=null;a=null===a?null:a+b;return null===a?b:a},hW=function(a,b){gW(a,b.getMediaSession());b.addEventListener(cast.framework.SessionEventType.MEDIA_SESSION,a.ha);b.addMessageListener(BV,a.T);b.addMessageListener(CV,a.ba)},gW=function(a,b){a.a=b;a.a&&(a.l&&a.l.init(),a.trigger(new _.Q(_.Le)))},iW=function(a){return _.I(function(b){return a.Ea()?b.C(0):_.x(b,cast.framework.CastContext.getInstance().requestSession(),0)})},jW=function(a,b){var c,d,e,f,g,k,l,m,n,p,q,t,u,y,C,D,B,E,z;return _.I(function(L){switch(L.a){case 1:if(!a.f)return L["return"]();
15
+ c=chrome.cast.media.StreamType;d=_.yw;return _.x(L,iW(a),2);case 2:if(!b)return L["return"]();e=cast.framework.CastContext.getInstance();f=e.getCurrentSession();g=new chrome.cast.media.MediaInfo(b.source.url,b.source.type);g.streamType=b.isLive?c.LIVE:c.BUFFERED;k=b;l=k.sc;m=k.vb;g.hlsVideoSegmentFormat=LV(l,d.VIDEO);g.hlsSegmentFormat=LV(m,d.AUDIO);if(!b.Ka){L.C(3);break}if(!a.K){L.C(4);break}return _.x(L,Promise.resolve(a.K(b.Ka)),5);case 5:if(n=L.f)b.Ka=n;case 4:a.j=b.Ka;a.D=_.Rn(a.j);a.B=a.D.findIndex(function(J){return J.url===
16
+ b.source.url});if(!b.Ka.remoteTextTracks){L.C(6);break}return _.x(L,Promise.all(b.Ka.remoteTextTracks.map(a.Ql.bind(a))),7);case 7:p=L.f,g.tracks=p.filter(function(J){return J}),b.Ka.remoteTextTracks=void 0;case 6:delete b.Ka.autoplay,b.Ka.startTime=null,g.customData={playerConfiguration:HV(b.Ka)};case 3:q=a.Sb()||{};t=cW(q.metadataType);typeof b.Xg===_.h&&(u={metadataType:t,sectionStartAbsoluteTime:b.Xg});b.source.name&&(y={metadataType:t,title:b.source.name});C=dW(q);if(D=bW(Object.assign({},u,
17
+ y,C)))g.metadata=D;B=new chrome.cast.media.LoadRequest(g);(E=b.queueData)&&E.items&&0<E.items.length&&(z=new chrome.cast.media.QueueData,z.items=E.items,z.startIndex=E.startIndex,B.queueData=z);typeof b.autoplay===_.bd&&(B.autoplay=b.autoplay);typeof b.currentTime===_.h&&(B.currentTime=b.currentTime);return _.x(L,f.loadMedia(B),8);case 8:null!=b.Ka.muted&&a.setMuted(b.Ka.muted),null!=b.Ka.volume&&a.setVolume(b.Ka.volume),_.A(L)}})},kW=function(a,b,c){c=void 0===c?0:c;var d,e;return _.I(function(f){(d=
18
+ a.h.xa())&&d.language&&(a.j.preferredTextLanguage=d.language);(e=a.h.qa())&&e.language&&(a.j.preferredAudioLanguage=e.language);return _.x(f,jW(a,{source:a.getLoadedSource(),currentTime:c,isLive:a.isLive(),Xg:a.getPresentationStartTime(),autoplay:b,Ka:a.j}),0)})},WV=function(a){if(a){a=_.v(YV);for(var b=a.next();!b.done;b=a.next())XV(b.value)}},mW=function(a,b,c){_.Di.call(this);this.f=a;this.h=b;this.j=typeof c===_.ue?c:this.Ho;this.a=lW(this);this.g=new _.M(yV);this.forwardEventsTo(this.f)},lW=
19
+ function(a){return new ZV(a.h,function(){a.trigger(new _.Q(_.id))},function(b,c){var d=a.f.getConfiguration();d.source=c.source;d.autoplay=!1;d.startTime=c.currentTime?Math.max(c.currentTime-1,0):null;d.ima&&d.startTime&&(d.ima.playAdsAfterTime=d.startTime);c.Gh&&(d.preferredAudioLanguage=c.Gh);c.Qj&&(d.preferredTextLanguage=c.Qj);_.Mo(a.f,null);a.trigger(new _.Q("castingended"));a.j(b,d)},function(){return nW(a)})},nW=function(a){var b,c,d;return _.I(function(e){if(1==e.a){a.trigger(new _.Q(_.hd));
20
+ b=a.f.a;if(b===a.a||!a.a)return e["return"]();c=null!=a.f.getLoadedSource();return _.x(e,a.f.release(),2)}_.Mo(a.f,a.a);if(!c)return e.C(0);_.Vo(a.f);return(d=a.f.getAdsManager())?_.x(e,d.load(),0):e.C(0)})},oW=function(a){GV.call(this,a,"clpp.cast.StateManager");this.I=this.Kk.bind(this);this.H=this.Jk.bind(this);this.w=this.Kn.bind(this);this.o=this.An.bind(this);this.K=this.Mk.bind(this);this.J=this.Lk.bind(this);this.L=this.bo.bind(this);this.G=this.Nn.bind(this);this.D=this.Ik.bind(this);this.a=
21
+ this.Hk.bind(this)},pW=function(a,b){a=void 0===a?[]:a;b=void 0===b?0:b;_.Di.call(this);this.a=a.slice();this.f=b},qW=function(a,b){0>b||b>=a.a.length||(a.f=b,a.trigger(new _.Q(_.Bf,{item:a.Tb()})))},rW=function(a){a.trigger(new _.Q(_.Cf))},wW=function(a,b,c){c=void 0===c?function(){return Promise.resolve()}:c;_.Di.call(this);var d=this;this.m=a;this.a=b;this.w=c;this.j=this.f=this.h=!1;this.o=function(){var e,f;return _.I(function(g){switch(g.a){case 1:if(d.f)return g["return"]();e=d.a.Tb();if(!e)return g["return"]();
22
+ d.f=!0;_.F(g,2,3);return _.x(g,d.w(e),5);case 5:return _.x(g,d.m.load(Object.assign({},e.configuration,{autoplay:!0})),3);case 3:_.Eh(g);d.f=!1;_.Fh(g);break;case 2:throw f=_.H(g),f;}})};this.l=function(){sW(d)}},sW=function(a){BW(a);var b=Math.min(a.a.pe().length-1,a.a.getPosition()+1);qW(a.a,b)},BW=function(a){a.j||(a.a.on(_.Bf,a.o),a.j=!0)},GW=function(a,b,c){var d=this;this.player=a;this.$b=new pW(c);this.Ld=new wW({load:this.player.load.bind(this.player),off:this.player.off.bind(this.player),
23
+ on:this.player.on.bind(this.player)},this.$b,function(){return _.I(function(e){_.A(e)})});this.a=new mW(this.player,b,function(e,f){var g;return _.I(function(k){if(1==k.a)return g=d.$b.getPosition(),d.Ld.Cd(g),f.autoplay=!0,delete f.license,_.x(k,d.player.load(f),2);if(3!=k.a)return typeof f.currentTime!==_.h?k.C(3):_.x(k,d.player.seek(Math.max(f.currentTime-1,0)),3);d.player.play();_.A(k)})});this.f=function(e){e&&e.type===uV&&typeof e.index===_.h&&qW(d.$b,e.index)};this.a.addMessageListener(this.f)},
24
+ HW=function(a){return a.map(function(b){var c={};c.media={contentId:b.configuration.source};c.customData={skippable:!1!==b.skippable};return c})},IW=function(a,b,c,d,e){this.a=a;this.f=b;this.l=typeof c===_.h?c:1;this.h=typeof d===_.h?d:1;this.j=typeof e===_.h?e:0},JW=function(a){this.a=a},LW=function(a){this.m=a;this.a=null;this.j=this.Nk.bind(this);this.h=[cast.framework.events.EventType.PLAYER_LOADING,cast.framework.events.EventType.BREAK_CLIP_LOADING,cast.framework.events.EventType.BREAK_STARTED,
25
+ cast.framework.events.EventType.BREAK_ENDED,cast.framework.events.EventType.BREAK_CLIP_STARTED,cast.framework.events.EventType.BREAK_CLIP_ENDED,cast.framework.events.EventType.PLAYING,cast.framework.events.EventType.PAUSE,cast.framework.events.EventType.BUFFERING];this.f=!1;KW().addEventListener(this.h,this.j)},PW=function(a,b,c){var d,e,f,g,k,l,m;return _.I(function(n){if(1==n.a){d=b.adTagUrl;if(!d)return n["return"]();_.F(n,2);MW=!1;e=_.Zk(d);return _.x(n,c.fetch(e).U,4)}if(2!=n.a){if((f=n.f)&&
26
+ f.data)if(g=_.R.ga(f.data),k=new DOMParser,l=k.parseFromString(g,_.tg),l.getElementsByTagName("vmap:VMAP").length)NW.warn("VMAP detected."),a.vmapAdsRequest=OW(g);else if(l.getElementsByTagName("VAST").length){NW.warn("VAST detected.");var p=new cast.framework.messages.BreakClip("bc1");p.vastAdsRequest=OW(g);var q=new cast.framework.messages.Break("b1",[p.id],0);a.breakClips=[p];a.breaks=[q]}else NW.warn("Unsupported schema."),MW=!0;return _.G(n,0)}m=_.H(n);NW.warn("Failed to fetch an ad",m);MW=!0;
27
+ _.A(n)})},OW=function(a){var b=new cast.framework.messages.VastAdsRequest;b.adsResponse=a;return b},KW=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},RW=function(a,b,c){if(c instanceof cast.framework.events.BreaksEvent||-1!==a.getPosition()){var d=null;(c=QW(a,c))&&(d={ad:c});a.m.trigger(new _.Q(b,d))}},SW=function(a,b){var c=new _.O(1,10,10003,{errorType:b});a.m.onError(c)},QW=function(a,b){var c=null;if(a.a&&b instanceof cast.framework.events.BreaksEvent){var d=
28
+ null,e=null,f;typeof b.breakClipId===_.lg&&(d=a.a.getBreakClipById(b.breakClipId));typeof b.breakId===_.lg&&(e=a.a.getBreakById(b.breakId),!e&&d&&(e=a.a.getBreaks().find(function(g){return g.breakClipIds.includes(d.id)})||null),e&&(f=a.a.getBreaks().filter(function(g){return 0<=g.position}).sort(function(g,k){return g.position-k.position}).findIndex(function(g){return g===e})));c=new IW(d,e,b.index,b.total,f)}return c},TW=function(a){this.a=a;this.f=this.h.bind(this)},UW=function(){return[cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,
29
+ cast.framework.events.EventType.TIMED_METADATA_CHANGED,cast.framework.events.EventType.TIMED_METADATA_ENTER,cast.framework.events.EventType.TIMED_METADATA_EXIT]},VW=function(a){var b=a.dashTimedMetadata,c=_.Lg;b&&(c=b.schemeIdUri);return{type:c.startsWith(_.Kg)?_.Zf:_.Ig,schemeIdUri:c,id:a.id||"",startTime:a.startTime,endTime:a.endTime,value:b&&b.value||"",eventElement:b?b.eventElement:null}},WW=function(){this.g=new _.M("clpp.cast.TrackManager");this.m=null;this.o=1E9;this.h=[];this.j=[];this.l=
30
+ this.yo.bind(this);this.a=this.f=null},XW=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},ZW=function(a){a.a=XW().getTextTracksManager();var b=a.a.getTracks();a.j=YW(_.at,b)},$W=function(a,b,c,d){c=_.Ii(c).filter(function(k){return k});var e=!1,f=[];b===_.X?f=a.getAudioTracks():b===_.at&&(f=a.ra());if(c=c.find(function(k){var l=_.ro(k);return f.some(function(m){m=_.ro(m.language||"");return _.so(l,m)})})){var g=_.ro(c);c=f.filter(function(k){k=_.ro(k.language||
31
+ "");return _.so(g,k)});f=c.length?c:f;e=e||!!c.length}_.R.If(d)&&(c=f.filter(function(k){return k.roles.includes(d)}),f=c.length?c:f,e=e||!!c.length);e&&f[0]&&(e=f[0],a.g.info("Will select track",e),b===_.X?a.La(e):b===_.at&&a.ib(e))},YW=function(a,b){for(var c=[],d=_.v(b),e=d.next();!e.done;e=d.next()){e=e.value;var f=new _.Zs(e.trackId.toString(),a);f.roles=e.roles||[];f.kind=e.subtype||null;f.language=e.language||null;f.originalLanguage=e.language||null;f.label=e.name||null;f.src=e.trackContentId||
32
+ null;f.mimeType=e.trackContentType||null;e.customData&&(f.mimeType=e.customData.mimeType||f.mimeType,f.src=e.customData.url||f.src);f.renditions.push(new _.gt(f.id,f));c.push(f)}return c},aX=function(){_.Di.call(this);this.g=new _.M(zV);this.h=this.w=_.Ln();this.A=null;this.l=-1;this.G=new _.Xm;this.f=this.o=this.j=this.a=this.B=null;this.D=!1},bX=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},cX=function(a,b){var c=Object.assign({},a.shakaConfig,b);return Object.assign({},
33
+ a,{shakaConfig:c})},fX=function(a,b){function c(){b.protectionSystem=cast.framework.ContentProtection.NONE;b.licenseUrl=void 0;b.licenseRequestHandler=void 0;b.licenseHandler=void 0}if(a&&a.drm){var d=a.drm,e=_.Xn(d);if(e){var f=[_.Kd];_.Rn(a)[0].type!==_.Qc&&f.unshift(_.Md);d.preferredDrmSystem===_.Kd&&f.reverse();for(var g,k;f.length&&!k;)g=f.shift(),k=e.Ua[g];k?(d=g===_.Md?cast.framework.ContentProtection.WIDEVINE:g===_.Kd?cast.framework.ContentProtection.PLAYREADY:void 0,b.protectionSystem=d,
34
+ b.licenseUrl=k.licenseUrl,d={ldlDelay:0,customData:{}},dX(b,k,a,d),eX(b,k,a,d)):c()}else c()}else c()},dX=function(a,b,c,d){b.modifiers.licenseRequest?a.licenseRequestHandler=function(e){var f=_.Zk({method:_.rb,uris:[e.url]});e.headers&&(f.headers=e.headers);f.body=e.content;f.allowCrossSiteCredentials=e.withCredentials;b.modifiers.licenseRequest(c,f,d);e.url=f.uris[0];e.headers=f.headers;e.content=f.body;e.withCredentials=f.allowCrossSiteCredentials}:a.licenseRequestHandler=void 0},eX=function(a,
35
+ b,c,d){b.modifiers.licenseResponse?a.licenseHandler=function(e,f){var g;return _.I(function(k){return 1==k.a?(g=_.dl(Object.assign({},f.headers),e.buffer,200,""),_.x(k,b.modifiers.licenseResponse(c,g,d),2)):k["return"](_.Qi(g.data))})}:a.licenseHandler=void 0},gX=function(){this.a=!1;this.g=new _.M(AV);this.f=this.m=null;this.w=new Set;this.D=this.Mn.bind(this);this.B=this.Fk.bind(this);this.o=null;this.l=new _.wi;this.j=this.h=this.A=null},iX=function(){return hX||(hX=new gX)},jX=function(){return cast.framework.CastReceiverContext.getInstance()},
36
+ kX=function(){var a=jX().getPlayerManager().getMediaInformation();return a&&a.metadata?a.metadata:null},lX=function(a,b){var c=jX().getPlayerManager().getMediaInformation();if(c){b?c.metadata=b:delete c.metadata;var d=!0;d=void 0===d?!1:d;jX().getPlayerManager().setMediaInformation(c,d)}else a.g.warn("No mediaInformation is present. Skipping metadata update.")},nX=function(a,b){a.g.debug("Detected HLS, parsing");var c=cast.framework.messages.HlsVideoSegmentFormat,d=jX();c=(jX().getPlayerManager().getMediaInformation()||
37
+ {}).hlsVideoSegmentFormat===c.FMP4?_.Ug:_.Tg;b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");for(var e=b.split(/\n+/m),f=[],g=0;g<e.length;){var k=e[g].trim();if(e[g].startsWith("#EXT-X-STREAM-INF")){var l=mX(k,_.ua),m=mX(k,_.zb),n=_.v([]),p=n.next().value;n=n.next().value;m&&(m=_.v(m.split("x").map(function(q){return+q})),p=m.next().value,n=m.next().value);if(!d.canDisplayType(c,l,p,n)){g+=2;continue}}f.push(k);++g}return f.join("\n")},mX=function(a,b){b+="\x3d";var c=a.indexOf(b);if(0<=c){var d=a.substring(c+
38
+ b.length);d.startsWith('"')?(d=d.substring(1),d=d.substring(0,d.indexOf('"'))):(c=d.indexOf(","),0<=c&&(d=d.substring(0,c)))}return d},oX=function(a){a=_.v(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;var c={};b.customData&&_.N.Wb(b.customData)&&(c=b.customData);b.roles&&(c.roles=b.roles);b.audioTrackInfo&&(c.audioTrackInfo=b.audioTrackInfo);_.N.Wb(c)&&(b.customData=c)}},qX=function(a){this.h=a;this.a=null;this.j=new _.wi;this.f=null;pX(this)},pX=function(a){_.I(function(b){if(1==b.a)return _.x(b,
39
+ a.h.M,2);a.a=a.h.o;a.j.on(a.a.controller,cast.framework.RemotePlayerEventType.ANY_CHANGE,a.eo.bind(a));_.A(b)})},rX=function(a,b,c){var d=null;c&&(d={ad:c});a.h.trigger(new _.Q(b,d))},sX=function(a){if(!a.a||!a.a.mediaInfo)return null;var b=a.a.mediaInfo.breaks,c=a.a.mediaInfo.breakClips,d=a.a.isPlayingBreak,e=a.a.breakId,f=a.a.currentBreakClipNumber,g=a.a.numberBreakClips,k=a.a.breakClipId;if(!(b&&c&&null!=e&&null!=f&&null!=g&&null!=k&&d))return null;var l=b.find(function(m){return m.id===e})||null;
40
+ a=0;l&&(a=0>=l.position?l.position:b.filter(function(m){return 0<=m.position}).sort(function(m,n){return m.position-n.position}).findIndex(function(m){return m===l}));b=c.find(function(m){return m.id===k})||null;return new IW(b,l,f,g,a)},tX=function(){},uX=function(){};_.r=GV.prototype;_.r.release=function(){this.Da(_.du)};_.r.destroy=function(){this.j=this.player=null;return Promise.resolve()};_.r.getState=function(){return this.f};_.r.onError=function(a){a.severity===_.P&&this.Da(_.Bo)};
41
+ _.r.Da=function(a){if(a!==this.f)if(this.f===_.Bo&&a!==_.du)this.log.debug("Player is in ERROR state and can not switch to",a);else{var b=Date.now();this.l=this.f;this.f=a;2===this.f?(this.A=b,this.player.trigger(new _.Q(_.dd,{detail:{bufferedTimeMS:-1,reason:this.h}}))):2===this.l&&this.player.trigger(new _.Q(_.cd,{detail:{bufferedTimeMS:b-this.A,reason:this.h}}));a={currentState:this.f,previousState:this.l,timeSinceLastStateChangeMS:b-this.B};this.B=b;this.j&&_.Xt(this.j,this.f);this.player.trigger(new _.Q(_.ig,
42
+ {detail:a}))}};var vX;_.K("clpp.cast.CastUtils",function(){});var MV=0,aW={GENERIC:MV,MOVIE:1,TV_SHOW:2,MUSIC_TRACK:3,PHOTO:4,AUDIOBOOK_CHAPTER:5},wX="addMissingTimelineCues alwaysStreamText bufferBehind bufferingGoal durationBackoff gapDetectionThreshold ignoreTextStreamFailures lowLatencyMode rebufferingGoal retryParameters safeSeekOffset stallEnabled stallSkip stallThreshold startAtSegmentBoundary".split(" "),xX="bandwidthDowngradeTarget bandwidthUpgradeTarget defaultBandwidthEstimate enabled initialRestrictions restrictions switchInterval".split(" ");_.w(PV,GV);PV.prototype.init=function(){var a=this.player,b=a.a;b&&(this.a&&this.a.removeUpdateListener(this.w),this.a=b,this.a.addUpdateListener(this.w),this.o=a.o)};PV.prototype.destroy=function(){var a=this;return _.I(function(b){a.a&&(a.a.removeUpdateListener(a.w),a.a=null);return _.x(b,GV.prototype.destroy.call(a),0)})};PV.prototype.Da=function(a){var b=this.player.o;b&&b.isPlayingBreak||GV.prototype.Da.call(this,a)};
43
+ PV.prototype.mc=function(){if(this.a&&this.o&&!this.o.isPlayingBreak)switch(this.a.playerState){case chrome.cast.media.PlayerState.IDLE:switch(this.a.idleReason){case chrome.cast.media.IdleReason.FINISHED:this.Da(5);break;case chrome.cast.media.IdleReason.ERROR:this.Da(_.Bo);break;default:this.Da(_.du)}break;case chrome.cast.media.PlayerState.PLAYING:this.Da(3);break;case chrome.cast.media.PlayerState.PAUSED:this.Da(4);break;case chrome.cast.media.PlayerState.BUFFERING:this.Da(2)}};_.w(QV,_.wt);_.r=QV.prototype;_.r.initialize=function(a){this.a=a};_.r.release=function(){this.h=[];this.f={}};
44
+ _.r.load=function(){this.release();var a=this.a.a;a&&(a=a.media)&&(this.h=(a=a.tracks)?a.map(function(b){switch(b.type){case chrome.cast.media.TrackType.VIDEO:var c=_.bt;break;case chrome.cast.media.TrackType.AUDIO:c=_.X;break;case chrome.cast.media.TrackType.TEXT:c=_.at}c=new _.Zs(b.trackId.toString(),c);c.kind=b.subtype;c.language=b.language;c.label=b.name;c.src=b.trackContentId;c.mimeType=b.trackContentType;if(b.customData){c.src=b.customData.url||c.src;c.mimeType=b.customData.mimeType||c.mimeType;
45
+ var d=b.customData.roles;d&&(c.roles=d);if(b=b.customData.audioTrackInfo)void 0!==b.numAudioChannels&&(c.channelsCount=b.numAudioChannels),void 0!==b.spatialAudio&&(c.spatialAudio=b.spatialAudio)}c.renditions.push(new _.gt(c.id,c));return c}):[],this.a.trigger(new _.Q(_.Ag)))};_.r.destroy=function(){this.a=null};_.r.getVideoTracks=function(){return SV(this,_.bt)};_.r.getAudioTracks=function(){return SV(this,_.X)};_.r.ra=function(){return SV(this,_.at)};
46
+ _.r.sa=function(){var a=this.Qa();return a?a.renditions[0]:null};_.r.Za=function(){var a=this.qa();return a?a.renditions[0]:null};_.r.gb=function(){var a=this.xa();return a?a.renditions[0]:null};_.r.Fb=function(){return this.f[_.bt]||null};_.r.Ub=function(){return this.f[_.X]||null};_.r.Vb=function(){return this.f[_.at]||null};_.r.Qa=function(){return TV(this,_.bt)};_.r.qa=function(){return TV(this,_.X)};_.r.xa=function(){return TV(this,_.at)};_.r.Ob=function(a){VV(this,_.bt,a)};
47
+ _.r.La=function(a){VV(this,_.X,a)};_.r.ib=function(a){VV(this,_.at,a)};_.r.Bb=function(a){this.Ob(a&&a.track)};_.r.Mb=function(a){this.La(a&&a.track)};_.r.Nb=function(a){this.ib(a&&a.track)};_.r.addTextTrack=function(){return _.I(function(a){_.A(a)})};_.r.ya=function(){return!0};QV.prototype.isAbrEnabled=QV.prototype.ya;QV.prototype.addTextTrack=QV.prototype.addTextTrack;QV.prototype.setTextRendition=QV.prototype.Nb;QV.prototype.setAudioRendition=QV.prototype.Mb;QV.prototype.setVideoRendition=QV.prototype.Bb;
48
+ QV.prototype.setTextTrack=QV.prototype.ib;QV.prototype.setAudioTrack=QV.prototype.La;QV.prototype.setVideoTrack=QV.prototype.Ob;QV.prototype.getTextTrack=QV.prototype.xa;QV.prototype.getAudioTrack=QV.prototype.qa;QV.prototype.getVideoTrack=QV.prototype.Qa;QV.prototype.getLoadingTextRendition=QV.prototype.Vb;QV.prototype.getLoadingAudioRendition=QV.prototype.Ub;QV.prototype.getLoadingVideoRendition=QV.prototype.Fb;QV.prototype.getTextRendition=QV.prototype.gb;QV.prototype.getAudioRendition=QV.prototype.Za;
49
+ QV.prototype.getVideoRendition=QV.prototype.sa;QV.prototype.getTextTracks=QV.prototype.ra;QV.prototype.getAudioTracks=QV.prototype.getAudioTracks;QV.prototype.getVideoTracks=QV.prototype.getVideoTracks;_.w(ZV,_.Di);_.r=ZV.prototype;_.r.init=function(a,b){this.j=this.H=b};_.r.unload=function(){var a=this;return this.f?new Promise(function(b,c){a.h&&a.h.release();a.a&&!a.a.idleReason||b();a.a.stop(null,b,c)}):Promise.resolve()};_.r.release=function(){var a=this;return this.f?this.unload().then(function(){a.l&&a.l.release()}):Promise.resolve()};_.r.getTimeline=function(){return null};_.r.setupPlaylist=function(){return Promise.reject(_.nb)};_.r.appendLoad=function(){return Promise.reject(_.nb)};
50
+ _.r.seekWith=function(){return Promise.reject(_.nb)};_.r.setSeekInterceptor=function(){};_.r.setPlaybackSessionId=function(){};_.r.getBandwidthEstimate=function(){return null};_.r.destroy=function(){return _.I(function(a){_.A(a)})};_.r.Ne=function(a){this.K=a};_.r.Ed=function(){return this.f};_.r.Ea=function(){return this.A};_.r.Cg=function(){return this.Aa};
51
+ _.r.sendMessage=function(a,b){var c=this,d,e,f;return _.I(function(g){switch(g.a){case 1:if(!c.f)return g["return"]();e=cast.framework.CastContext.getInstance().getCurrentSession();if(!e){d=new _.O(1,8,8004,void 0);g.C(2);break}_.F(g,3);return _.x(g,e.sendMessage(a,b),5);case 5:_.G(g,2);break;case 3:f=_.H(g),d=new _.O(1,8,8E3,{detailedErrorCode:f});case 2:if(d)c.onError(d);_.A(g)}})};
52
+ _.r.cast=function(){var a=this,b,c;return _.I(function(d){if(1==d.a){if(!a.Ed())throw a.g.warn(wV),new _.O(1,8,8001,void 0);if(!eW)throw a.g.warn(tV),new _.O(1,8,8002,void 0);if(a.Ea())throw a.g.warn("Already casting"),new _.O(1,8,8003,void 0);_.F(d,2);return _.x(d,iW(a),4)}if(2!=d.a)return _.G(d,0);b=_.H(d);c={};b instanceof chrome.cast.Error?(c.detailedErrorCode=b.code,c.details=b.details,c.reason=b.description):c.detailedErrorCode=b;throw new _.O(1,8,8E3,c);})};
53
+ _.r.uf=function(){this.f&&this.Ea()&&cast.framework.CastContext.getInstance().endCurrentSession(!0)};_.r.addMessageListener=function(a){typeof a===_.ue&&this.L.add(a)};_.r.removeMessageListener=function(a){typeof a===_.ue&&this.L["delete"](a)};_.r.play=function(){var a=this;return this.f?this.isEnded()?kW(this,!0):new Promise(function(b,c){if(!a.a)return c(sV);a.a.play(null,b,c)}):Promise.resolve()};
54
+ _.r.pause=function(){var a=this;return this.f?new Promise(function(b,c){a.isEnded()&&b();if(!a.a)return c(sV);a.a.pause(null,b,c)}):Promise.resolve()};_.r.isPaused=function(){return this.f?!!this.a&&this.a.playerState===chrome.cast.media.PlayerState.PAUSED:!1};_.r.isEnded=function(){return this.f?5===this.getState():!1};
55
+ _.r.seek=function(a){var b=this;return this.f?this.isEnded()?kW(this,!1,a):new Promise(function(c,d){b.a||d(sV);b.o.isPlayingBreak&&d(qV);var e=new chrome.cast.media.SeekRequest;e.currentTime=a;b.trigger(new _.Q(_.Ng));b.a.seek(e,function(){b.trigger(new _.Q(_.Mg));c()},d)}):Promise.resolve()};_.r.getPosition=function(){return this.f?this.getMediaPosition():0};_.r.getMediaPosition=function(){return this.f?this.a&&this.a.getEstimatedTime()||0:0};
56
+ _.r.getDuration=function(){return this.f?this.getMediaDuration():0};_.r.getMediaDuration=function(){if(!this.f)return 0;if(!this.a||!this.a.media)return-1;var a=this.a.media.duration;return typeof a!==_.h?-1:-1===a?Infinity:a};_.r.setDrmCustomDataModifier=function(){};_.r.setCdnErrorCallback=function(){};_.r.detach=function(){};_.r.getPlaybackRate=function(){return this.f?this.a&&this.a.playbackRate||0:0};
57
+ _.r.setPlaybackRate=function(a){this.f&&this.a&&0<a&&this.sendMessage(DV,{type:"SET_PLAYBACK_RATE",requestId:OV(),mediaSessionId:this.a.mediaSessionId,playbackRate:a})};_.r.getVolume=function(){return this.f?this.a&&this.a.volume.level:0};_.r.setVolume=function(a){this.f&&this.a&&0<=a&&1>=a&&(a=new chrome.cast.media.VolumeRequest(new chrome.cast.Volume(a)),this.a.setVolume(a))};_.r.isMuted=function(){return this.f?this.a&&this.a.volume.muted:!1};
58
+ _.r.setMuted=function(a){this.f&&this.a&&(a=new chrome.cast.media.VolumeRequest(new chrome.cast.Volume(void 0,a)),this.a.setVolume(a))};_.r.getPresentationStartTime=function(){if(!this.f)return 0;if(!this.a||!this.a.media||!this.a.media.metadata)return null;var a=this.a.media.metadata.sectionStartAbsoluteTime;return typeof a!==_.h?null:1E-8===a?0:a};
59
+ _.r.getSeekRange=function(){if(!this.f)return{start:0,end:0};var a={start:0,end:this.getDuration()};if(this.isLive()){var b=this.a.getEstimatedLiveSeekableRange();b&&typeof b.start===_.h&&typeof b.end===_.h&&(a={start:b.start,end:b.end})}return a};_.r.getState=function(){return this.f?this.l?this.l.getState():7:7};_.r.getStats=function(){return this.f?this.a&&this.a.customData&&this.a.customData.stats?IV(this.a.customData.stats):_.cu():_.cu()};
60
+ _.r.isLive=function(){return this.f?Infinity===this.getDuration():!1};_.r.load=function(a){var b=this,c,d;return _.I(function(e){if(!b.Ed())return b.g.warn(wV),e["return"]();if(!eW)return b.g.warn(tV),e["return"]();b.D=_.Rn(a);b.j=_.Nn([b.H,a]);c=b.D[b.B];d={source:c,isLive:c.isLive,autoplay:b.j.autoplay,Ka:b.j,sc:c.sc,vb:c.vb};return _.x(e,jW(b,d),0)})};_.r.getBufferInfo=function(){return new _.gi};_.r.getTrackManager=function(){return this.h};_.r.getConfiguration=function(){return this.j};
61
+ _.r.getSurface=function(){return null};_.r.setNetworkEngine=function(a){this.J=a};_.r.getNetworkEngine=function(){return this.J};_.r.getSourceIndex=function(){return this.B};_.r.setSourceIndex=function(a){this.B=a};_.r.setCmsdManager=function(){};_.r.getLoadedSource=function(){return this.D[this.B]};_.r.getPeriods=function(){return[]};_.r.getDrmInfo=function(){return null};_.r.getTimelineCues=function(){return[]};_.r.getCueTimeline=function(){return null};_.r.resetAbr=function(){this.g.warn(vV)};
62
+ _.r.onError=function(a){if(a&&(this.trigger(new _.Q(_.qe,{detail:a})),this.l))this.l.onError(a)};_.r.namespace=function(){return _.xd};_.r.canPlay=function(){return this.Ed()?2:0};_.r.Sb=function(){return this.I};_.r.pc=function(a){this.I=bW(a)};_.r.sg=function(){this.I=null};_.r.gh=function(a){if(this.f){var b=this.Sb()||{};a={metadataType:cW(b.metadataType),title:a};this.pc(Object.assign({},b,a))}};
63
+ _.r.eh=function(a){if(this.f){var b=this.Sb()||{},c=cW(b.metadataType);a=new chrome.cast.Image(a);this.pc(Object.assign({},b,{metadataType:c,images:[a]}))}};_.r.dh=function(a){if(this.f){var b=this.Sb()||{};this.pc(Object.assign({},b,{metadataType:3,artist:a}))}};_.r.fh=function(a){if(this.f){var b=this.Sb()||{};a={metadataType:cW(b.metadataType),releaseDate:a};this.pc(Object.assign({},b,a))}};
64
+ _.r.Cn=function(a){var b=cast.framework.CastContext.getInstance(),c=a.castState===cast.framework.CastState.CONNECTED;eW=a.castState!==cast.framework.CastState.NO_DEVICES_AVAILABLE;this.Aa=c?b.getCurrentSession().getCastDevice().friendlyName:"";this.w.mh()};
65
+ _.r.Zn=function(a){this.g.debug("state: "+a.sessionState+", details:",a);switch(a.sessionState){case cast.framework.SessionState.SESSION_STARTED:this.A=!0;hW(this,a.session);break;case cast.framework.SessionState.SESSION_RESUMED:this.Ea()||(this.A=!0,hW(this,a.session),this.ma());break;case cast.framework.SessionState.SESSION_ENDED:if(this.Ea()&&this.a){var b=this.a.media,c=this.h.qa(),d=this.h.xa();c=c&&c.language||void 0;d=d&&d.language||void 0;this.W(this.getState(),{source:{url:b.contentId,type:b.contentType,
66
+ isLive:this.isLive()},currentTime:fW(this),Qj:d,Gh:c})}a.session.removeEventListener(cast.framework.SessionEventType.MEDIA_SESSION,this.ha);a.session.removeMessageListener(BV,this.T);a.session.removeMessageListener(CV,this.ba);this.A=!1;this.a=null}};_.r.Pn=function(a){this.g.debug("New media session",a.mediaSession);gW(this,a.mediaSession)};_.r.On=function(a){a.value&&a.value.tracks&&this.h&&this.h.load()};_.r.In=function(a,b){var c=IV(b);this.L.forEach(function(d){return d(c)})};
67
+ _.r.Hn=function(a,b){var c=IV(b);"event"===c.type&&c.name===_.Yg&&this.trigger(new _.Q(_.jd,{visible:!!c.visible}))};_.r.Dk=function(){this.trigger(new _.Q(_.zg))};
68
+ _.r.Ql=function(a){var b=this,c,d;return _.I(function(e){if(1==e.a)return c=null,_.x(e,KV(a,[_.sg,_.Pc],b.J,b.j),2);if(d=e.f)c=new chrome.cast.media.Track(b.Va++,chrome.cast.media.TrackType.TEXT),c.language=d.language,c.name=d.label||null,c.trackContentId=d.url,c.trackContentType=d.mimeType,c.customData={mimeType:a.mimeType,url:a.url};return e["return"](c)})};_.r.getTextDisplayer=function(){return null};var eW=!1,YV=new Set;window.__onGCastApiAvailable=WV;_.w(mW,_.Di);_.r=mW.prototype;_.r.destroy=function(){var a=this;return _.I(function(b){if(1==b.a)return a.a?_.x(b,$V(a.a),3):b.C(2);2!=b.a&&(a.a=null);a.stopForwardingEventsTo(a.f);_.A(b)})};_.r.Ho=function(a,b){5!==a&&a!==_.du&&(delete b.license,this.f.load(b))};_.r.pd=function(){return!!this.a&&this.a.Ed()&&eW};_.r.Ea=function(){return!!this.a&&this.a.Ea()};_.r.Cg=function(){return this.a?this.a.Cg():""};_.r.Ne=function(a){this.a&&this.a.Ne(a)};
69
+ _.r.cast=function(a,b){var c=this,d,e,f;return _.I(function(g){switch(g.a){case 1:if(!c.a)return g["return"]();_.F(g,2);return _.x(g,c.a.cast(),4);case 4:if(!c.a)return g["return"]();var k=null,l=c.f.getLoadedSource();if(l){var m=c.f.getTrackManager();k=m.getVideoTracks()[0];if(k&&k.mimeType)var n=k.mimeType;k=c.f.getConfiguration();var p=m.qa();if(p){if(p.mimeType)var q=p.mimeType;p.language&&(k.preferredAudioLanguage=p.language);p.roles.length&&(k.preferredAudioRole=p.roles[0])}if(m=m.xa())m.language&&
70
+ (k.preferredTextLanguage=m.language),m.roles.length&&(k.preferredTextRole=m.roles[0]);m=l&&typeof l.isLive===_.bd?l.isLive:c.f.isLive();k={source:l,isLive:m,autoplay:!c.f.isPaused(),currentTime:Math.max(c.f.getPosition()-1,0),Xg:c.f.getPresentationStartTime(),sc:n,vb:q,Ka:k}}d=k;b&&d&&(d.queueData={items:b.items,startIndex:b.startIndex});return _.x(g,nW(c),5);case 5:if(!c.a)return g["return"]();d&&(d.autoplay=!c.f.isPaused());if(a)return _.x(g,c.f.load(a),7);if(c.a.a){g.C(7);break}return _.x(g,jW(c.a,
71
+ d),7);case 7:_.G(g,0);break;case 2:e=_.H(g),c.g.error("Error while trying to cast",e),f=new _.Q(_.qe,{detail:e}),c.trigger(f),_.A(g)}})};_.r.uf=function(){this.a&&this.a.uf()};_.r.xk=function(a){var b=this;return _.I(function(c){if(1==c.a){if(a===b.h)return c["return"]();b.h=a;return b.a?_.x(c,$V(b.a),2):c.C(2)}b.a=lW(b);_.A(c)})};_.r.sendMessage=function(a){var b=this;return _.I(function(c){return b.a?_.x(c,b.a.sendMessage(BV,a),0):(b.g.warn(xV),c["return"]())})};
72
+ _.r.Dj=function(){var a=this;return _.I(function(b){return _.x(b,a.a.sendMessage(DV,{type:"QUEUE_NEXT",requestId:OV(),mediaSessionId:a.a.a.mediaSessionId}),0)})};_.r.Ej=function(){var a=this;return _.I(function(b){return _.x(b,a.a.sendMessage(DV,{type:"QUEUE_PREV",requestId:OV(),mediaSessionId:a.a.a.mediaSessionId}),0)})};_.r.Cj=function(a){var b=this;return _.I(function(c){return _.x(c,b.a.sendMessage(DV,{type:"QUEUE_INSERT",requestId:OV(),mediaSessionId:b.a.a.mediaSessionId,items:a}),0)})};
73
+ _.r.addMessageListener=function(a){this.a?this.a.addMessageListener(a):this.g.warn(xV)};_.r.removeMessageListener=function(a){this.a?this.a.removeMessageListener(a):this.g.warn(xV)};_.r.Sb=function(){return this.a&&this.a.Sb()};_.r.pc=function(a){this.a&&this.a.pc(a)};_.r.sg=function(){this.a&&this.a.sg()};_.r.gh=function(a){this.a&&this.a.gh(a)};_.r.eh=function(a){this.a&&this.a.eh(a)};_.r.dh=function(a){this.a&&this.a.dh(a)};_.r.fh=function(a){this.a&&this.a.fh(a)};_.K(yV,mW);
74
+ mW.prototype.setContentReleaseDate=mW.prototype.fh;mW.prototype.setContentArtist=mW.prototype.dh;mW.prototype.setContentImage=mW.prototype.eh;mW.prototype.setContentTitle=mW.prototype.gh;mW.prototype.clearContentMetadata=mW.prototype.sg;mW.prototype.setContentMetadata=mW.prototype.pc;mW.prototype.getContentMetadata=mW.prototype.Sb;mW.prototype.removeMessageListener=mW.prototype.removeMessageListener;mW.prototype.addMessageListener=mW.prototype.addMessageListener;mW.prototype.queueAddItems=mW.prototype.Cj;
75
+ mW.prototype.queuePreviousItem=mW.prototype.Ej;mW.prototype.queueNextItem=mW.prototype.Dj;mW.prototype.sendMessage=mW.prototype.sendMessage;mW.prototype.changeReceiverId=mW.prototype.xk;mW.prototype.forceDisconnect=mW.prototype.uf;mW.prototype.cast=mW.prototype.cast;mW.prototype.setPlayerConfigInterceptor=mW.prototype.Ne;mW.prototype.getReceiverName=mW.prototype.Cg;mW.prototype.isCasting=mW.prototype.Ea;mW.prototype.canCast=mW.prototype.pd;mW.prototype.destroy=mW.prototype.destroy;_.w(oW,GV);_.r=oW.prototype;
76
76
  _.r.init=function(){var a=cast.framework.events.EventType,b=cast.framework.CastReceiverContext.getInstance().getPlayerManager();b.addEventListener(a.PLAYING,this.I);b.addEventListener(a.PAUSE,this.H);b.addEventListener(a.MEDIA_FINISHED,this.w);b.addEventListener(a.BUFFERING,this.o);b.addEventListener(a.SEEKING,this.K);b.addEventListener(a.SEEKED,this.J);b.addEventListener(a.STALLED,this.L);b.addEventListener(a.PLAYER_LOADING,this.G);b.addEventListener(a.ERROR,this.D);b.addEventListener(a.BITRATE_CHANGED,this.a)};
77
77
  _.r.destroy=function(){var a=this,b,c;return _.I(function(d){b=cast.framework.events.EventType;c=cast.framework.CastReceiverContext.getInstance().getPlayerManager();c.removeEventListener(b.PLAYING,a.I);c.removeEventListener(b.PAUSE,a.H);c.removeEventListener(b.MEDIA_FINISHED,a.w);c.removeEventListener(b.BUFFERING,a.o);c.removeEventListener(b.SEEKING,a.K);c.removeEventListener(b.SEEKED,a.J);c.removeEventListener(b.STALLED,a.L);c.removeEventListener(b.PLAYER_LOADING,a.G);c.removeEventListener(b.ERROR,
78
- a.D);c.removeEventListener(b.BITRATE_CHANGED,a.a);return _.x(d,EV.prototype.destroy.call(a),0)})};_.r.Ik=function(){this.player.trigger(new _.Q(_.pf));this.Ca(3)};_.r.Hk=function(){this.Ca(4)};_.r.In=function(){this.Ca(5)};_.r.yn=function(a){a.isBuffering?this.Ca(2):(a=this.player.isPaused()?4:3,this.Ca(a))};_.r.Kk=function(){this.h=1;this.player.trigger(new _.Q(_.Ng))};_.r.Jk=function(){this.player.trigger(new _.Q(_.Mg))};_.r.$n=function(){this.h=2};_.r.Ln=function(){this.Ca(1)};
79
- _.r.Fk=function(a){var b=this.player.getStats();this.player.trigger(new _.Q(_.ad,{detail:{bandwidth:a.totalBitrate,width:b.width,height:b.height}}))};_.r.Gk=function(a){a=new _.O(_.P,7,7300,{detailedErrorCode:a.detailedErrorCode,error:a.error,reason:a.reason});this.player.trigger(new _.Q(_.qe,{detail:a}));this.Ca(_.Ho)};_.w(qW,_.Di);_.r=qW.prototype;_.r.oe=function(){return this.a};_.r.getPosition=function(){return this.f};_.r.Pb=function(){return this.a[this.f]||null};_.r.Gi=function(){return this.a[this.f+1]||null};_.r.append=function(a){this.a.push(a);AW(this)};_.r.Li=function(a,b){0>b||b>this.a.length||(this.a.splice(b,0,a),AW(this))};_.r.remove=function(a){0>a||a>=this.a.length||a===this.f||(this.a.splice(a,1),this.f>a&&this.f--,AW(this))};_.r.clear=function(){this.a=[];this.f=0;AW(this)};_.w(CW,_.Di);_.r=CW.prototype;_.r.start=function(){this.h||this.f||(this.h=!0,this.m.on(_.pe,this.l),DW(this),vW(this.a,this.a.getPosition()))};_.r.next=function(){var a=this.a.Pb();a&&!1===a.skippable||BW(this)};_.r.Ie=function(){var a=this.a.Pb();a&&!1===a.skippable||(DW(this),a=Math.max(0,this.a.getPosition()-1),vW(this.a,a))};_.r.Cd=function(a){var b=this;return _.I(function(c){vW(b.a,a);_.z(c)})};_.r.stop=function(){this.h=!1;this.m.off(_.pe,this.l);this.a.off(_.Cf,this.o);this.j=!1};_.r=EW.prototype;_.r.Sn=function(a){return this.Xb.on(_.Cf,a)};_.r.Tn=function(a){return this.Xb.on(_.Df,a)};_.r.Bn=function(a){return this.player.on(_.id,a)};_.r.od=function(){return this.a.od()};_.r.ym=function(){return this.Xb.oe()};_.r.Da=function(){return this.a.Da()};_.r.append=function(a){var b=this;return _.I(function(c){b.Xb.append(a);return b.a.Da()?_.x(c,b.a.Aj(FW([a])),0):c["return"]()})};_.r.nm=function(){return this.Xb.getPosition()};_.r.start=function(){this.Kd.start()};_.r.play=function(){this.player.play()};
80
- _.r.pause=function(){this.player.pause()};_.r.destroy=function(){this.Kd.stop();this.a.removeMessageListener(this.f);this.a.destroy();this.player.release()};_.r.$o=function(){var a=this,b,c;return _.I(function(d){if(a.a.Da())return a.a.rf(),d["return"]();a.Kd.stop();b=FW(a.Xb.oe());c=a.Xb.getPosition();return _.x(d,a.a.cast(void 0,{items:b,startIndex:c}),0)})};
81
- _.r.next=function(){var a=this;return _.I(function(b){return 1==b.a?a.a.Da()?_.x(b,a.a.Bj(),3):b.C(2):2!=b.a?b["return"]():_.x(b,a.Kd.next(),0)})};_.r.Ie=function(){var a=this;return _.I(function(b){return 1==b.a?a.a.Da()?_.x(b,a.a.Cj(),3):b.C(2):2!=b.a?b["return"]():_.x(b,a.Kd.Ie(),0)})};_.K("clpp.cast.playlist.CastPlaylist",EW);EW.prototype.previous=EW.prototype.Ie;EW.prototype.next=EW.prototype.next;EW.prototype.toggleCast=EW.prototype.$o;EW.prototype.destroy=EW.prototype.destroy;
82
- EW.prototype.pause=EW.prototype.pause;EW.prototype.play=EW.prototype.play;EW.prototype.start=EW.prototype.start;EW.prototype.getCurrentIndex=EW.prototype.nm;EW.prototype.append=EW.prototype.append;EW.prototype.isCasting=EW.prototype.Da;EW.prototype.getPlaylistItems=EW.prototype.ym;EW.prototype.canCast=EW.prototype.od;EW.prototype.onCastStatusChanged=EW.prototype.Bn;EW.prototype.onPlaylistModified=EW.prototype.Tn;EW.prototype.onPlaylistItemChange=EW.prototype.Sn;_.r=GW.prototype;_.r.yb=function(){return"Google Cast Framework"};_.r.zb=function(){return cast.framework.VERSION};_.r.Eb=function(){return 0};_.r.getId=function(){return this.a.id};_.r.getCreativeId=function(){return""};_.r.dc=function(){return""};_.r.getApiFramework=function(){return null};_.r.getAdSystem=function(){return""};_.r.getAdvertiserName=function(){return""};_.r.getTitle=function(){return this.a.title||""};_.r.getDuration=function(){return this.a.duration||0};_.r.getPosition=function(){return 0};
83
- _.r.getSkipTimeOffset=function(){return this.a.whenSkippable||0};_.r.ic=function(){return!1};_.r.Ab=function(){return this.a.clickThroughUrl||null};_.r.getMediaUrl=function(){return this.a.contentUrl||this.a.contentId||null};_.r.pb=function(){return 0};_.r.ob=function(){return 0};_.r.Za=function(){return 0};_.r.$a=function(){switch(this.Sb()){case 0:return 0;case -1:return 2;default:return 1}};_.r.getPodIndex=function(){return this.j};_.r.Sb=function(){return this.f.position};_.r.Cb=function(){return this.l};
84
- _.r.qb=function(){return this.h};_.r.getWrapperAdIds=function(){return[]};_.r.canSeek=function(){return!1};_.r.getWrapperAdSystems=function(){return[]};_.r.getWrapperCreativeIds=function(){return[]};_.r.gc=function(){return null};GW.prototype.getVideoElement=GW.prototype.gc;GW.prototype.getWrapperCreativeIds=GW.prototype.getWrapperCreativeIds;GW.prototype.getWrapperAdSystems=GW.prototype.getWrapperAdSystems;GW.prototype.canSeek=GW.prototype.canSeek;GW.prototype.getWrapperAdIds=GW.prototype.getWrapperAdIds;
85
- GW.prototype.getSequenceLength=GW.prototype.qb;GW.prototype.getPositionInSequence=GW.prototype.Cb;GW.prototype.getPodTimeOffset=GW.prototype.Sb;GW.prototype.getPodIndex=GW.prototype.getPodIndex;GW.prototype.getPodType=GW.prototype.$a;GW.prototype.getMediaBitrate=GW.prototype.Za;GW.prototype.getMediaHeight=GW.prototype.ob;GW.prototype.getMediaWidth=GW.prototype.pb;GW.prototype.getMediaUrl=GW.prototype.getMediaUrl;GW.prototype.getClickThroughUrl=GW.prototype.Ab;GW.prototype.isBumper=GW.prototype.ic;
86
- GW.prototype.getSkipTimeOffset=GW.prototype.getSkipTimeOffset;GW.prototype.getPosition=GW.prototype.getPosition;GW.prototype.getDuration=GW.prototype.getDuration;GW.prototype.getTitle=GW.prototype.getTitle;GW.prototype.getAdvertiserName=GW.prototype.getAdvertiserName;GW.prototype.getAdSystem=GW.prototype.getAdSystem;GW.prototype.getApiFramework=GW.prototype.getApiFramework;GW.prototype.getSourceId=GW.prototype.dc;GW.prototype.getCreativeId=GW.prototype.getCreativeId;GW.prototype.getId=GW.prototype.getId;
87
- GW.prototype.getTechnology=GW.prototype.Eb;GW.prototype.getAdManagerVersion=GW.prototype.zb;GW.prototype.getAdManagerName=GW.prototype.yb;HW.prototype.getCuePoints=function(){return this.a.map(function(a){return a.position})};HW.prototype.Vb=function(){return!!this.a.find(function(a){return 0===a.position})};HW.prototype.Ub=function(){return!!this.a.find(function(a){return-1===a.position})};HW.prototype.hasPostroll=HW.prototype.Ub;HW.prototype.hasPreroll=HW.prototype.Vb;HW.prototype.getCuePoints=HW.prototype.getCuePoints;_.r=JW.prototype;_.r.load=function(){var a=this;return _.I(function(b){KW&&(KW=!1,QW(a,0));_.z(b)})};_.r.Gb=function(){return!0};_.r.qd=function(){};_.r.sb=function(){-1!==this.getPosition()&&IW().pause()};_.r.skip=function(){};_.r.getAdVolume=function(){LW.warn(CV);return 0};_.r.Va=function(){LW.warn(CV)};_.r.setMuted=function(){};_.r.isMuted=function(){return!1};_.r.xc=function(){return-1!==this.getPosition()};_.r.isPaused=function(){return this.f};
88
- _.r.getPosition=function(){var a=this.a&&this.a.getBreakClipCurrentTimeSec();return typeof a===_.k?a:-1};_.r.nd=function(){return!0};_.r.Mc=function(){var a=this;return _.I(function(b){IW().removeEventListener(a.h,a.j);_.z(b)})};_.r.setVolume=function(a){this.Va(a)};_.r.getVolume=function(){return this.getAdVolume()};_.r.pause=function(){this.sb()};_.r.resume=function(){this.Gb()};
89
- _.r.Lk=function(a){var b=cast.framework.events.EndedReason;switch(a.type){case cast.framework.events.EventType.PLAYER_LOADING:this.a=IW().getBreakManager();this.a.setPlayWatchedBreak(!0);a=this.a.getBreaks();this.m.trigger(new _.Q(_.Fc,{adsTimeline:new HW(a)}));break;case cast.framework.events.EventType.BREAK_CLIP_LOADING:PW(this,_.vc,a);break;case cast.framework.events.EventType.BREAK_STARTED:PW(this,_.jc,a);break;case cast.framework.events.EventType.BREAK_ENDED:PW(this,_.kc,a);break;case cast.framework.events.EventType.BREAK_CLIP_STARTED:PW(this,
90
- _.Bc,a);break;case cast.framework.events.EventType.BREAK_CLIP_ENDED:a.endedReason===b.SKIPPED?(PW(this,_.Ac,a),PW(this,_.Cc,a)):a.endedReason===b.STOPPED?PW(this,_.Cc,a):a.endedReason===b.END_OF_STREAM?(PW(this,_.nc,a),PW(this,_.Cc,a)):a.endedReason===b.ERROR&&QW(this,1);break;case cast.framework.events.EventType.PLAYING:this.f=!1;PW(this,_.zc,a);break;case cast.framework.events.EventType.PAUSE:this.f=!0;PW(this,_.xc,a);break;case cast.framework.events.EventType.BUFFERING:a.isBuffering?PW(this,_.lc,
91
- a):(this.f=!1,PW(this,_.zc,a))}};JW.prototype.resume=JW.prototype.resume;JW.prototype.pause=JW.prototype.pause;JW.prototype.getVolume=JW.prototype.getVolume;JW.prototype.setVolume=JW.prototype.setVolume;JW.prototype.getPosition=JW.prototype.getPosition;JW.prototype.skip=JW.prototype.skip;var KW=!1,LW=new _.L("clpp.cast.ads.AdsManager");RW.prototype.init=function(){cast.framework.CastReceiverContext.getInstance().getPlayerManager().addEventListener(SW(),this.f)};RW.prototype.release=function(){cast.framework.CastReceiverContext.getInstance().getPlayerManager().removeEventListener(SW(),this.f)};RW.prototype.getTimelineCues=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager().getTimedMetadata().map(function(a){return TW(a)})};
92
- RW.prototype.h=function(a){if(a instanceof cast.framework.events.TimedMetadataEvent){var b=null;switch(a.type){case cast.framework.events.EventType.TIMED_METADATA_CHANGED:b=_.vg;break;case cast.framework.events.EventType.TIMED_METADATA_ENTER:b=_.wg;break;case cast.framework.events.EventType.TIMED_METADATA_EXIT:b=_.xg}b&&this.a(new _.Q(b,{detail:TW(a.timedMetadataInfo)}))}else for(a=_.v(this.getTimelineCues()),b=a.next();!b.done;b=a.next())this.a(new _.Q(_.vg,{detail:b.value}))};_.w(UW,_.wt);_.r=UW.prototype;_.r.initialize=function(a){this.m=a;VW().addEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.l)};_.r.release=function(){this.h=[];this.j=[];this.a=this.f=null};_.r.load=function(){};_.r.destroy=function(){this.m=null;VW().removeEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.l)};_.r.getVideoTracks=function(){return[]};_.r.getAudioTracks=function(){return this.h};_.r.pa=function(){return this.j};_.r.qa=function(){return null};
93
- _.r.Wa=function(){var a=this.oa();return a&&a.renditions[0]};_.r.ab=function(){var a=this.xa();return a&&a.renditions[0]};_.r.Bb=function(){return null};_.r.Qb=function(){return null};_.r.Rb=function(){return null};_.r.Oa=function(){return null};_.r.oa=function(){var a=null;if(this.f){var b=this.f.getActiveId();typeof b===_.k&&(b=b.toString(),a=this.getAudioTracks().find(function(c){return c.id===b})||null)}return a};
94
- _.r.xa=function(){var a=null;if(this.a){var b=this.a.getActiveIds()[0];typeof b===_.k&&(b=b.toString(),a=this.pa().find(function(c){return c.id===b})||null)}return a};_.r.Kb=function(){this.g.warn("Video tracks unavailable on Cast")};_.r.Ka=function(a){a&&this.f&&this.f.setActiveById(+a.id)};_.r.cb=function(a){this.a&&(a?this.a.setActiveByIds([+a.id]):this.a.setActiveByIds([]))};_.r.ub=function(){this.g.warn("Video renditions unavailable on Cast")};_.r.Ib=function(a){this.Ka(a&&a.track)};
95
- _.r.Jb=function(a){this.cb(a&&a.track)};
96
- _.r.addTextTrack=function(a){var b=this,c,d,e;return _.I(function(f){if(1==f.a)return c=b.m.getConfiguration(),_.x(f,IV(a,Object.values(cast.framework.messages.CaptionMimeType),b.m.getNetworkEngine(),c),2);if((d=f.f)&&b.a){e=new cast.framework.messages.Track(b.o++,cast.framework.messages.TrackType.TEXT);e.isInband=!1;e.language=d.language;e.name=d.label;e.subtype=d.kind;e.trackContentId=d.url;e.trackContentType=d.mimeType;e.customData={mimeType:a.mimeType,url:a.url};try{b.a.addTracks([e]),XW(b)}catch(g){throw b.g.warn("failed on track",
97
- a),g;}}_.z(f)})};_.r.ya=function(){return!0};_.r.vo=function(){this.f=VW().getAudioTracksManager();var a=this.f.getTracks();this.h=WW(_.X,a);XW(this);a=this.m.getConfiguration();YW(this,_.X,a.preferredAudioLanguage,a.preferredAudioRole);YW(this,_.$s,a.preferredTextLanguage,a.preferredTextRole)};UW.prototype.isAbrEnabled=UW.prototype.ya;UW.prototype.addTextTrack=UW.prototype.addTextTrack;UW.prototype.setTextRendition=UW.prototype.Jb;UW.prototype.setAudioRendition=UW.prototype.Ib;
98
- UW.prototype.setVideoRendition=UW.prototype.ub;UW.prototype.setTextTrack=UW.prototype.cb;UW.prototype.setAudioTrack=UW.prototype.Ka;UW.prototype.setVideoTrack=UW.prototype.Kb;UW.prototype.getTextTrack=UW.prototype.xa;UW.prototype.getAudioTrack=UW.prototype.oa;UW.prototype.getVideoTrack=UW.prototype.Oa;UW.prototype.getLoadingTextRendition=UW.prototype.Rb;UW.prototype.getLoadingAudioRendition=UW.prototype.Qb;UW.prototype.getLoadingVideoRendition=UW.prototype.Bb;UW.prototype.getTextRendition=UW.prototype.ab;
99
- UW.prototype.getAudioRendition=UW.prototype.Wa;UW.prototype.getVideoRendition=UW.prototype.qa;UW.prototype.getTextTracks=UW.prototype.pa;UW.prototype.getAudioTracks=UW.prototype.getAudioTracks;UW.prototype.getVideoTracks=UW.prototype.getVideoTracks;_.w(ZW,_.Di);_.r=ZW.prototype;_.r.init=function(a,b){var c=this;this.B=a;b&&(this.h=this.w=b);var d=$W();d.setMessageInterceptor(cast.framework.messages.MessageType.MEDIA_STATUS,this.Ck.bind(this));d.setMediaPlaybackInfoHandler(this.jk.bind(this));this.a=new mW(this);this.a.init();this.j=new UW;this.j.initialize(this);this.o=new RW(function(e){return c.trigger(e)});this.o.init()};
100
- _.r.unload=function(){var a=cast.framework.messages.PlayerState,b=$W();b.getPlayerState()!==a.IDLE&&b.stop();this.j&&this.j.release();this.o&&this.o.release();this.f=null;return Promise.resolve()};_.r.release=function(){var a=this;return this.unload().then(function(){a.a&&a.a.release()})};_.r.destroy=function(){var a=this;return _.I(function(b){if(1==b.a)return a.B=null,a.w=_.Ln(),a.h=a.w,a.l=-1,a.A=null,a.a?_.x(b,a.a.destroy(),3):b.C(2);2!=b.a&&(a.a=null);a.j&&(a.j.destroy(),a.j=null);_.z(b)})};
101
- _.r.play=function(){$W().play();return Promise.resolve()};_.r.pause=function(){$W().pause();return Promise.resolve()};_.r.isPaused=function(){return $W().getPlayerState()===cast.framework.messages.PlayerState.PAUSED};_.r.isEnded=function(){return $W().getPlayerState()===cast.framework.messages.PlayerState.IDLE};_.r.seek=function(a){var b=$W();if(null!==b.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject(oV);b.seek(a);return Promise.resolve()};_.r.getPosition=function(){return this.getMediaPosition()};
102
- _.r.setSeekInterceptor=function(){};_.r.setPlaybackSessionId=function(){};_.r.getBandwidthEstimate=function(){return null};_.r.getMediaPosition=function(){return $W().getCurrentTimeSec()};_.r.getDuration=function(){return this.getMediaDuration()};_.r.getMediaDuration=function(){var a=$W().getDurationSec();return typeof a===_.k?-1===a?Infinity:a:-1};_.r.getPlaybackRate=function(){return $W().getPlaybackRate()};
103
- _.r.setPlaybackRate=function(a){if(0<a){var b=new cast.framework.messages.SetPlaybackRateRequestData;b.playbackRate=a;$W().sendLocalMediaRequest(b)}};_.r.getVolume=function(){this.g.warn(CV);return null};_.r.setVolume=function(){this.g.warn(CV)};_.r.setMuted=function(){this.g.warn(CV)};_.r.isMuted=function(){this.g.warn(CV);return!1};
104
- _.r.getLoadedSource=function(){var a=$W().getMediaInformation();if(a){var b=$W().getPlaybackConfig();b=!!b&&b.protectionSystem!==cast.framework.ContentProtection.NONE;var c=this.A&&-1!==this.l?this.A[this.l]:null;c=c?c.name:void 0;!c&&a.metadata&&(c=a.metadata.title);return{url:a.contentId,type:a.contentType,Lp:b,name:c}}return null};_.r.getDrmInfo=function(){return null};_.r.getPresentationStartTime=function(){return $W().getStartAbsoluteTime()};
105
- _.r.getSeekRange=function(){var a={start:0,end:this.getDuration()};if(this.isLive()){var b=$W().getLiveSeekableRange();b&&typeof b.start===_.k&&typeof b.end===_.k&&(a={start:b.start,end:b.end})}return a};_.r.getState=function(){return this.a?this.a.getState():7};
106
- _.r.getStats=function(){var a=_.cu();if(this.f){a=$W().getStats();this.f.h=a.estimatedBandwidth||NaN;this.f.w=a.streamBandwidth||NaN;var b=this.f,c=a.height||NaN;b.A=a.width||NaN;b.j=c;b=this.f;c=typeof a.decodedFrames===_.k?a.decodedFrames:NaN;b.o=typeof a.droppedFrames===_.k?a.droppedFrames:NaN;b.l=c;a=this.f.getStats()}return a};_.r.isLive=function(){return Infinity===this.getDuration()};
107
- _.r.load=function(a){var b=this,c,d;return _.I(function(e){b.f=new _.bu;b.a.j=b.f.a;b.A=_.Rn(a);b.h=_.Nn([b.w,a]);if(b.D)return b.D=!1,e["return"]();c=b.A[b.l];d=new cast.framework.messages.LoadRequestData;d.autoplay=b.h.autoplay;typeof b.h.startTime===_.k&&(d.currentTime=b.h.startTime);c.type&&(d.media.contentType=c.type);d.media.contentId=c.url;d.media.customData={playerConfiguration:FV(b.h),local:!0};return _.x(e,$W().load(d),0)})};_.r.getBufferInfo=function(){this.g.warn(_.xa);return new _.gi};
78
+ a.D);c.removeEventListener(b.BITRATE_CHANGED,a.a);return _.x(d,GV.prototype.destroy.call(a),0)})};_.r.Kk=function(){this.player.trigger(new _.Q(_.pf));this.Da(3)};_.r.Jk=function(){this.Da(4)};_.r.Kn=function(){this.Da(5)};_.r.An=function(a){a.isBuffering?this.Da(2):(a=this.player.isPaused()?4:3,this.Da(a))};_.r.Mk=function(){this.h=1;this.player.trigger(new _.Q(_.Ng))};_.r.Lk=function(){this.player.trigger(new _.Q(_.Mg))};_.r.bo=function(){this.h=2};_.r.Nn=function(){this.Da(1)};
79
+ _.r.Hk=function(a){var b=this.player.getStats();this.player.trigger(new _.Q(_.ad,{detail:{bandwidth:a.totalBitrate,width:b.width,height:b.height}}))};_.r.Ik=function(a){a=new _.O(_.P,7,7300,{detailedErrorCode:a.detailedErrorCode,error:a.error,reason:a.reason});this.player.trigger(new _.Q(_.qe,{detail:a}));this.Da(_.Bo)};_.w(pW,_.Di);_.r=pW.prototype;_.r.pe=function(){return this.a};_.r.getPosition=function(){return this.f};_.r.Tb=function(){return this.a[this.f]||null};_.r.Ji=function(){return this.a[this.f+1]||null};_.r.append=function(a){this.a.push(a);rW(this)};_.r.Oi=function(a,b){0>b||b>this.a.length||(this.a.splice(b,0,a),rW(this))};_.r.remove=function(a){0>a||a>=this.a.length||a===this.f||(this.a.splice(a,1),this.f>a&&this.f--,rW(this))};_.r.clear=function(){this.a=[];this.f=0;rW(this)};_.w(wW,_.Di);_.r=wW.prototype;_.r.start=function(){this.h||this.f||(this.h=!0,this.m.on(_.pe,this.l),BW(this),qW(this.a,this.a.getPosition()))};_.r.next=function(){var a=this.a.Tb();a&&!1===a.skippable||sW(this)};_.r.Ke=function(){var a=this.a.Tb();a&&!1===a.skippable||(BW(this),a=Math.max(0,this.a.getPosition()-1),qW(this.a,a))};_.r.Cd=function(a){var b=this;return _.I(function(c){qW(b.a,a);_.A(c)})};_.r.stop=function(){this.h=!1;this.m.off(_.pe,this.l);this.a.off(_.Bf,this.o);this.j=!1};_.r=GW.prototype;_.r.Un=function(a){return this.$b.on(_.Bf,a)};_.r.Vn=function(a){return this.$b.on(_.Cf,a)};_.r.Dn=function(a){return this.player.on(_.id,a)};_.r.pd=function(){return this.a.pd()};_.r.Am=function(){return this.$b.pe()};_.r.Ea=function(){return this.a.Ea()};_.r.append=function(a){var b=this;return _.I(function(c){b.$b.append(a);return b.a.Ea()?_.x(c,b.a.Cj(HW([a])),0):c["return"]()})};_.r.pm=function(){return this.$b.getPosition()};_.r.start=function(){this.Ld.start()};_.r.play=function(){this.player.play()};
80
+ _.r.pause=function(){this.player.pause()};_.r.destroy=function(){this.Ld.stop();this.a.removeMessageListener(this.f);this.a.destroy();this.player.release()};_.r.cp=function(){var a=this,b,c;return _.I(function(d){if(a.a.Ea())return a.a.uf(),d["return"]();a.Ld.stop();b=HW(a.$b.pe());c=a.$b.getPosition();return _.x(d,a.a.cast(void 0,{items:b,startIndex:c}),0)})};
81
+ _.r.next=function(){var a=this;return _.I(function(b){return 1==b.a?a.a.Ea()?_.x(b,a.a.Dj(),3):b.C(2):2!=b.a?b["return"]():_.x(b,a.Ld.next(),0)})};_.r.Ke=function(){var a=this;return _.I(function(b){return 1==b.a?a.a.Ea()?_.x(b,a.a.Ej(),3):b.C(2):2!=b.a?b["return"]():_.x(b,a.Ld.Ke(),0)})};_.K("clpp.cast.playlist.CastPlaylist",GW);GW.prototype.previous=GW.prototype.Ke;GW.prototype.next=GW.prototype.next;GW.prototype.toggleCast=GW.prototype.cp;GW.prototype.destroy=GW.prototype.destroy;
82
+ GW.prototype.pause=GW.prototype.pause;GW.prototype.play=GW.prototype.play;GW.prototype.start=GW.prototype.start;GW.prototype.getCurrentIndex=GW.prototype.pm;GW.prototype.append=GW.prototype.append;GW.prototype.isCasting=GW.prototype.Ea;GW.prototype.getPlaylistItems=GW.prototype.Am;GW.prototype.canCast=GW.prototype.pd;GW.prototype.onCastStatusChanged=GW.prototype.Dn;GW.prototype.onPlaylistModified=GW.prototype.Vn;GW.prototype.onPlaylistItemChange=GW.prototype.Un;_.r=IW.prototype;_.r.jb=function(){return"Google Cast Framework"};_.r.kb=function(){return cast.framework.VERSION};_.r.nb=function(){return 0};_.r.getId=function(){return this.a.id};_.r.getCreativeId=function(){return""};_.r.Hb=function(){return""};_.r.getApiFramework=function(){return null};_.r.getAdSystem=function(){return""};_.r.getAdvertiserName=function(){return""};_.r.getTitle=function(){return this.a.title||""};_.r.getDuration=function(){return this.a.duration||0};_.r.getPosition=function(){return 0};
83
+ _.r.getSkipTimeOffset=function(){return this.a.whenSkippable||0};_.r.Jb=function(){return!1};_.r.$a=function(){return this.a.clickThroughUrl||null};_.r.getMediaUrl=function(){return this.a.contentUrl||this.a.contentId||null};_.r.eb=function(){return 0};_.r.cb=function(){return 0};_.r.Ga=function(){return 0};_.r.Ha=function(){switch(this.yb()){case 0:return 0;case -1:return 2;default:return 1}};_.r.getPodIndex=function(){return this.j};_.r.yb=function(){return this.f.position};_.r.lb=function(){return this.l};
84
+ _.r.fb=function(){return this.h};_.r.getWrapperAdIds=function(){return[]};_.r.canSeek=function(){return!1};_.r.getWrapperAdSystems=function(){return[]};_.r.getWrapperCreativeIds=function(){return[]};_.r.Ib=function(){return null};IW.prototype.getVideoElement=IW.prototype.Ib;IW.prototype.getWrapperCreativeIds=IW.prototype.getWrapperCreativeIds;IW.prototype.getWrapperAdSystems=IW.prototype.getWrapperAdSystems;IW.prototype.canSeek=IW.prototype.canSeek;IW.prototype.getWrapperAdIds=IW.prototype.getWrapperAdIds;
85
+ IW.prototype.getSequenceLength=IW.prototype.fb;IW.prototype.getPositionInSequence=IW.prototype.lb;IW.prototype.getPodTimeOffset=IW.prototype.yb;IW.prototype.getPodIndex=IW.prototype.getPodIndex;IW.prototype.getPodType=IW.prototype.Ha;IW.prototype.getMediaBitrate=IW.prototype.Ga;IW.prototype.getMediaHeight=IW.prototype.cb;IW.prototype.getMediaWidth=IW.prototype.eb;IW.prototype.getMediaUrl=IW.prototype.getMediaUrl;IW.prototype.getClickThroughUrl=IW.prototype.$a;IW.prototype.isBumper=IW.prototype.Jb;
86
+ IW.prototype.getSkipTimeOffset=IW.prototype.getSkipTimeOffset;IW.prototype.getPosition=IW.prototype.getPosition;IW.prototype.getDuration=IW.prototype.getDuration;IW.prototype.getTitle=IW.prototype.getTitle;IW.prototype.getAdvertiserName=IW.prototype.getAdvertiserName;IW.prototype.getAdSystem=IW.prototype.getAdSystem;IW.prototype.getApiFramework=IW.prototype.getApiFramework;IW.prototype.getSourceId=IW.prototype.Hb;IW.prototype.getCreativeId=IW.prototype.getCreativeId;IW.prototype.getId=IW.prototype.getId;
87
+ IW.prototype.getTechnology=IW.prototype.nb;IW.prototype.getAdManagerVersion=IW.prototype.kb;IW.prototype.getAdManagerName=IW.prototype.jb;JW.prototype.getCuePoints=function(){return this.a.map(function(a){return a.position})};JW.prototype.Yb=function(){return!!this.a.find(function(a){return 0===a.position})};JW.prototype.Xb=function(){return!!this.a.find(function(a){return-1===a.position})};JW.prototype.hasPostroll=JW.prototype.Xb;JW.prototype.hasPreroll=JW.prototype.Yb;JW.prototype.getCuePoints=JW.prototype.getCuePoints;_.r=LW.prototype;_.r.load=function(){var a=this;return _.I(function(b){MW&&(MW=!1,SW(a,0));_.A(b)})};_.r.Ab=function(){return!0};_.r.Nc=function(){};_.r.pb=function(){-1!==this.getPosition()&&KW().pause()};_.r.skip=function(){};_.r.getAdVolume=function(){NW.warn(EV);return 0};_.r.Oa=function(){NW.warn(EV)};_.r.setMuted=function(){};_.r.isMuted=function(){return!1};_.r.jc=function(){return-1!==this.getPosition()};_.r.isPaused=function(){return this.f};
88
+ _.r.getPosition=function(){var a=this.a&&this.a.getBreakClipCurrentTimeSec();return typeof a===_.h?a:-1};_.r.Kc=function(){return!0};_.r.xc=function(){var a=this;return _.I(function(b){KW().removeEventListener(a.h,a.j);_.A(b)})};_.r.setVolume=function(a){this.Oa(a)};_.r.getVolume=function(){return this.getAdVolume()};_.r.pause=function(){this.pb()};_.r.resume=function(){this.Ab()};
89
+ _.r.Nk=function(a){var b=cast.framework.events.EndedReason;switch(a.type){case cast.framework.events.EventType.PLAYER_LOADING:this.a=KW().getBreakManager();this.a.setPlayWatchedBreak(!0);a=this.a.getBreaks();this.m.trigger(new _.Q(_.Fc,{adsTimeline:new JW(a)}));break;case cast.framework.events.EventType.BREAK_CLIP_LOADING:RW(this,_.uc,a);break;case cast.framework.events.EventType.BREAK_STARTED:RW(this,_.jc,a);break;case cast.framework.events.EventType.BREAK_ENDED:RW(this,_.kc,a);break;case cast.framework.events.EventType.BREAK_CLIP_STARTED:RW(this,
90
+ _.Bc,a);break;case cast.framework.events.EventType.BREAK_CLIP_ENDED:a.endedReason===b.SKIPPED?(RW(this,_.Ac,a),RW(this,_.Cc,a)):a.endedReason===b.STOPPED?RW(this,_.Cc,a):a.endedReason===b.END_OF_STREAM?(RW(this,_.nc,a),RW(this,_.Cc,a)):a.endedReason===b.ERROR&&SW(this,1);break;case cast.framework.events.EventType.PLAYING:this.f=!1;RW(this,_.zc,a);break;case cast.framework.events.EventType.PAUSE:this.f=!0;RW(this,_.xc,a);break;case cast.framework.events.EventType.BUFFERING:a.isBuffering?RW(this,_.lc,
91
+ a):(this.f=!1,RW(this,_.zc,a))}};LW.prototype.resume=LW.prototype.resume;LW.prototype.pause=LW.prototype.pause;LW.prototype.getVolume=LW.prototype.getVolume;LW.prototype.setVolume=LW.prototype.setVolume;LW.prototype.getPosition=LW.prototype.getPosition;LW.prototype.skip=LW.prototype.skip;var MW=!1,NW=new _.M("clpp.cast.ads.AdsManager");TW.prototype.init=function(){cast.framework.CastReceiverContext.getInstance().getPlayerManager().addEventListener(UW(),this.f)};TW.prototype.release=function(){cast.framework.CastReceiverContext.getInstance().getPlayerManager().removeEventListener(UW(),this.f)};TW.prototype.getTimelineCues=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager().getTimedMetadata().map(function(a){return VW(a)})};
92
+ TW.prototype.h=function(a){if(a instanceof cast.framework.events.TimedMetadataEvent){var b=null;switch(a.type){case cast.framework.events.EventType.TIMED_METADATA_CHANGED:b=_.vg;break;case cast.framework.events.EventType.TIMED_METADATA_ENTER:b=_.wg;break;case cast.framework.events.EventType.TIMED_METADATA_EXIT:b=_.xg}b&&this.a(new _.Q(b,{detail:VW(a.timedMetadataInfo)}))}else for(a=_.v(this.getTimelineCues()),b=a.next();!b.done;b=a.next())this.a(new _.Q(_.vg,{detail:b.value}))};_.w(WW,_.wt);_.r=WW.prototype;_.r.initialize=function(a){this.m=a;XW().addEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.l)};_.r.release=function(){this.h=[];this.j=[];this.a=this.f=null};_.r.load=function(){};_.r.destroy=function(){this.m=null;XW().removeEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.l)};_.r.getVideoTracks=function(){return[]};_.r.getAudioTracks=function(){return this.h};_.r.ra=function(){return this.j};_.r.sa=function(){return null};
93
+ _.r.Za=function(){var a=this.qa();return a&&a.renditions[0]};_.r.gb=function(){var a=this.xa();return a&&a.renditions[0]};_.r.Fb=function(){return null};_.r.Ub=function(){return null};_.r.Vb=function(){return null};_.r.Qa=function(){return null};_.r.qa=function(){var a=null;if(this.f){var b=this.f.getActiveId();typeof b===_.h&&(b=b.toString(),a=this.getAudioTracks().find(function(c){return c.id===b})||null)}return a};
94
+ _.r.xa=function(){var a=null;if(this.a){var b=this.a.getActiveIds()[0];typeof b===_.h&&(b=b.toString(),a=this.ra().find(function(c){return c.id===b})||null)}return a};_.r.Ob=function(){this.g.warn("Video tracks unavailable on Cast")};_.r.La=function(a){a&&this.f&&this.f.setActiveById(+a.id)};_.r.ib=function(a){this.a&&(a?this.a.setActiveByIds([+a.id]):this.a.setActiveByIds([]))};_.r.Bb=function(){this.g.warn("Video renditions unavailable on Cast")};_.r.Mb=function(a){this.La(a&&a.track)};
95
+ _.r.Nb=function(a){this.ib(a&&a.track)};
96
+ _.r.addTextTrack=function(a){var b=this,c,d,e;return _.I(function(f){if(1==f.a)return c=b.m.getConfiguration(),_.x(f,KV(a,Object.values(cast.framework.messages.CaptionMimeType),b.m.getNetworkEngine(),c),2);if((d=f.f)&&b.a){e=new cast.framework.messages.Track(b.o++,cast.framework.messages.TrackType.TEXT);e.isInband=!1;e.language=d.language;e.name=d.label;e.subtype=d.kind;e.trackContentId=d.url;e.trackContentType=d.mimeType;e.customData={mimeType:a.mimeType,url:a.url};try{b.a.addTracks([e]),ZW(b)}catch(g){throw b.g.warn("failed on track",
97
+ a),g;}}_.A(f)})};_.r.ya=function(){return!0};_.r.yo=function(){this.f=XW().getAudioTracksManager();var a=this.f.getTracks();this.h=YW(_.X,a);ZW(this);a=this.m.getConfiguration();$W(this,_.X,a.preferredAudioLanguage,a.preferredAudioRole);$W(this,_.at,a.preferredTextLanguage,a.preferredTextRole)};WW.prototype.isAbrEnabled=WW.prototype.ya;WW.prototype.addTextTrack=WW.prototype.addTextTrack;WW.prototype.setTextRendition=WW.prototype.Nb;WW.prototype.setAudioRendition=WW.prototype.Mb;
98
+ WW.prototype.setVideoRendition=WW.prototype.Bb;WW.prototype.setTextTrack=WW.prototype.ib;WW.prototype.setAudioTrack=WW.prototype.La;WW.prototype.setVideoTrack=WW.prototype.Ob;WW.prototype.getTextTrack=WW.prototype.xa;WW.prototype.getAudioTrack=WW.prototype.qa;WW.prototype.getVideoTrack=WW.prototype.Qa;WW.prototype.getLoadingTextRendition=WW.prototype.Vb;WW.prototype.getLoadingAudioRendition=WW.prototype.Ub;WW.prototype.getLoadingVideoRendition=WW.prototype.Fb;WW.prototype.getTextRendition=WW.prototype.gb;
99
+ WW.prototype.getAudioRendition=WW.prototype.Za;WW.prototype.getVideoRendition=WW.prototype.sa;WW.prototype.getTextTracks=WW.prototype.ra;WW.prototype.getAudioTracks=WW.prototype.getAudioTracks;WW.prototype.getVideoTracks=WW.prototype.getVideoTracks;_.w(aX,_.Di);_.r=aX.prototype;_.r.init=function(a,b){var c=this;this.B=a;b&&(this.h=this.w=b);var d=bX();d.setMessageInterceptor(cast.framework.messages.MessageType.MEDIA_STATUS,this.Ek.bind(this));d.setMediaPlaybackInfoHandler(this.lk.bind(this));this.a=new oW(this);this.a.init();this.j=new WW;this.j.initialize(this);this.o=new TW(function(e){return c.trigger(e)});this.o.init()};
100
+ _.r.unload=function(){var a=cast.framework.messages.PlayerState,b=bX();b.getPlayerState()!==a.IDLE&&b.stop();this.j&&this.j.release();this.o&&this.o.release();this.f=null;return Promise.resolve()};_.r.release=function(){var a=this;return this.unload().then(function(){a.a&&a.a.release()})};_.r.destroy=function(){var a=this;return _.I(function(b){if(1==b.a)return a.B=null,a.w=_.Ln(),a.h=a.w,a.l=-1,a.A=null,a.a?_.x(b,a.a.destroy(),3):b.C(2);2!=b.a&&(a.a=null);a.j&&(a.j.destroy(),a.j=null);_.A(b)})};
101
+ _.r.play=function(){bX().play();return Promise.resolve()};_.r.pause=function(){bX().pause();return Promise.resolve()};_.r.isPaused=function(){return bX().getPlayerState()===cast.framework.messages.PlayerState.PAUSED};_.r.isEnded=function(){return bX().getPlayerState()===cast.framework.messages.PlayerState.IDLE};_.r.seek=function(a){var b=bX();if(null!==b.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject(qV);b.seek(a);return Promise.resolve()};_.r.getPosition=function(){return this.getMediaPosition()};
102
+ _.r.setSeekInterceptor=function(){};_.r.setPlaybackSessionId=function(){};_.r.getBandwidthEstimate=function(){return null};_.r.getMediaPosition=function(){return bX().getCurrentTimeSec()};_.r.getDuration=function(){return this.getMediaDuration()};_.r.getMediaDuration=function(){var a=bX().getDurationSec();return typeof a===_.h?-1===a?Infinity:a:-1};_.r.getPlaybackRate=function(){return bX().getPlaybackRate()};
103
+ _.r.setPlaybackRate=function(a){if(0<a){var b=new cast.framework.messages.SetPlaybackRateRequestData;b.playbackRate=a;bX().sendLocalMediaRequest(b)}};_.r.getVolume=function(){this.g.warn(EV);return null};_.r.setVolume=function(){this.g.warn(EV)};_.r.setMuted=function(){this.g.warn(EV)};_.r.isMuted=function(){this.g.warn(EV);return!1};
104
+ _.r.getLoadedSource=function(){var a=bX().getMediaInformation();if(a){var b=bX().getPlaybackConfig();b=!!b&&b.protectionSystem!==cast.framework.ContentProtection.NONE;var c=this.A&&-1!==this.l?this.A[this.l]:null;c=c?c.name:void 0;!c&&a.metadata&&(c=a.metadata.title);return{url:a.contentId,type:a.contentType,Op:b,name:c}}return null};_.r.getDrmInfo=function(){return null};_.r.getPresentationStartTime=function(){return bX().getStartAbsoluteTime()};
105
+ _.r.getSeekRange=function(){var a={start:0,end:this.getDuration()};if(this.isLive()){var b=bX().getLiveSeekableRange();b&&typeof b.start===_.h&&typeof b.end===_.h&&(a={start:b.start,end:b.end})}return a};_.r.getState=function(){return this.a?this.a.getState():7};
106
+ _.r.getStats=function(){var a=_.cu();if(this.f){a=bX().getStats();this.f.h=a.estimatedBandwidth||NaN;this.f.w=a.streamBandwidth||NaN;var b=this.f,c=a.height||NaN;b.A=a.width||NaN;b.j=c;b=this.f;c=typeof a.decodedFrames===_.h?a.decodedFrames:NaN;b.o=typeof a.droppedFrames===_.h?a.droppedFrames:NaN;b.l=c;a=this.f.getStats()}return a};_.r.isLive=function(){return Infinity===this.getDuration()};
107
+ _.r.load=function(a){var b=this,c,d;return _.I(function(e){b.f=new _.bu;b.a.j=b.f.a;b.A=_.Rn(a);b.h=_.Nn([b.w,a]);if(b.D)return b.D=!1,e["return"]();c=b.A[b.l];d=new cast.framework.messages.LoadRequestData;d.autoplay=b.h.autoplay;typeof b.h.startTime===_.h&&(d.currentTime=b.h.startTime);c.type&&(d.media.contentType=c.type);d.media.contentId=c.url;d.media.customData={playerConfiguration:HV(b.h),local:!0};return _.x(e,bX().load(d),0)})};_.r.getBufferInfo=function(){this.g.warn(_.xa);return new _.gi};
108
108
  _.r.getTrackManager=function(){return this.j};_.r.getConfiguration=function(){return this.h};_.r.getSurface=function(){return this.B};_.r.getTimeline=function(){return null};_.r.setupPlaylist=function(){return Promise.reject(_.nb)};_.r.appendLoad=function(){return Promise.reject(_.nb)};_.r.seekWith=function(){return Promise.reject(_.nb)};_.r.setNetworkEngine=function(a){this.G=a};_.r.setCmsdManager=function(){};_.r.getNetworkEngine=function(){return this.G};_.r.getSourceIndex=function(){return this.l};
109
- _.r.setSourceIndex=function(a){this.l=a};_.r.getPeriods=function(){return[]};_.r.namespace=function(){return xV};_.r.getTimelineCues=function(){return this.o&&this.o.getTimelineCues()||[]};_.r.getCueTimeline=function(){return null};_.r.resetAbr=function(){this.g.warn(tV)};_.r.onError=function(a){this.trigger(new _.Q(_.qe,{detail:a}))};_.r.canPlay=function(){return _.nj()?2:0};
110
- _.r.Ck=function(a){a=Object.assign({},a);a.customData||(a.customData={});a.customData.stats=FV(this.getStats());var b=$W(),c=a.media||b.getMediaInformation();b=b.getStartAbsoluteTime();c&&typeof b===_.k&&c.startAbsoluteTime!==b&&(this.g.info("Syncing startAbsoluteTime.Old value: "+(c.startAbsoluteTime+", new value: ")+b),c.startAbsoluteTime=b,a=Object.assign({},a,{media:c}));c=cast.framework.messages.StreamType;b=a.media;var d=!!b,e=this.isLive(),f=d&&!b.metadata,g=!!a.liveSeekableRange;if(d&&g&&
111
- (!e||e&&f)){d=$W().getStartAbsoluteTime();if(typeof d===_.k){b.startAbsoluteTime=d;var h;f?h=new cast.framework.messages.GenericMediaMetadata:h=b.metadata;h.sectionStartAbsoluteTime=d;b.metadata=h}b.streamType=c.LIVE;a=Object.assign({},a,{media:b})}return a};
112
- _.r.jk=function(a,b){var c=null,d=b;a.media.customData&&(c=GV(a.media.customData.playerConfiguration));var e=null,f=null;a.media.customData&&(e=GV(a.media.customData["com.castlabs.reactnative.PlayerConfiguration"]),f=GV(a.media.customData.playerConfiguration));var g=e&&e.LiveConfiguration;g=g?0===g.liveEdgeLatencyMs:!1;e=!(!e||!e.lowLatencyMode);d=null!=f&&f.lowLatencyMode||g||e?aX(d,{streaming:{lowLatencyMode:!0}}):d;if(!c)return d;f=c.chromecast||null;e=c.abr||null;g=d;e&&typeof e.defaultBandwidthEstimate===
113
- _.k?g.initialBandwidth=e.defaultBandwidthEstimate:g.initialBandwidth=void 0;dX(c,d);e={};g=c.streaming||null;f&&f.useSenderStreamingConfig&&g&&(e.streaming=HV(g,uX));c=c.abr||null;f&&f.useSenderAbrConfig&&c&&(e.abr=HV(c,vX));_.M.Tb(e)&&(d=aX(d,e));return d};_.r.getTextDisplayer=function(){return null};_.r.setDrmCustomDataModifier=function(){};_.r.setCdnErrorCallback=function(){};_.r.detach=function(){};_.r=eX.prototype;_.r.init=function(a){var b=this;a&&(this.f=new ZW,_.Mo(a,this.f),this.m=a,this.l.on(window,"unload",function(){return _.I(function(c){return b.m&&b.m.getState()!==_.du?_.x(c,DV(b.m),0):c.C(0)})}))};
114
- _.r.start=function(){var a=this;if(!this.a&&window.cast&&cast.framework&&cast.framework.CastReceiverContext){this.a=!0;var b=hX(),c=hX().getPlayerManager(),d=new cast.framework.CastReceiverOptions;d.customNamespaces={};d.customNamespaces[zV]=cast.framework.system.MessageType.JSON;d.customNamespaces[AV]=cast.framework.system.MessageType.JSON;var e=new cast.framework.PlaybackConfig;e.manifestHandler=this.bn.bind(this);e.shakaConfig={streaming:{ignoreTextStreamFailures:!0}};e.enableSmoothLiveRefresh=
115
- !0;d.playbackConfig=e;if(e=this.m&&this.m.getSurface().getMedia())d.mediaElement=e;d.disableIdleTimeout=!0;d.maxInactivity=Infinity;this.h&&(d.queue=this.h);c.setMessageInterceptor(cast.framework.messages.MessageType.QUEUE_UPDATE,function(f){a.g.info("QUEUE_UPDATE message received",f);var g=a.getQueueManager();if(!g)return f;g=g.getCurrentItem();return g?(g=g.customData)&&!1===g.skippable?null:f:f});c.setMessageInterceptor(cast.framework.messages.MessageType.LOAD,this.an.bind(this));c.setMessageInterceptor(cast.framework.messages.MessageType.MEDIA_STATUS,
116
- this.dn.bind(this));c.addEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.D);c.addEventListener(cast.framework.events.EventType.MEDIA_STATUS,this.Ek.bind(this));b.start(d);b.addCustomMessageListener(zV,this.B);this.l.on(document,_.Yg,function(){var f={type:"event",name:_.Yg,visible:!document.hidden};hX().sendCustomMessage(AV,void 0,f)})}};
117
- _.r.stop=function(){if(this.a){this.a=!1;this.l.release();var a=hX();hX().getPlayerManager().removeEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.D);a.removeCustomMessageListener(zV,this.B);a.stop();this.j=this.h=this.m=this.f=null}};_.r.Le=function(a){this.o=a};_.r.Mo=function(a){this.A=a};_.r.on=function(a,b){hX().addEventListener(a,b)};_.r.off=function(a,b){hX().removeEventListener(a,b)};_.r.addMessageListener=function(a){typeof a===_.ue&&this.w.add(a)};
118
- _.r.removeMessageListener=function(a){typeof a===_.ue&&this.w["delete"](a)};_.r.sendMessage=function(a,b){hX().sendCustomMessage(zV,b,a)};_.r.Tc=function(){return this.a};_.r.Ob=function(){return iX()};_.r.nc=function(a){jX(this,a)};_.r.ip=function(a){var b=iX(),c=null;a?c=Object.assign({},b,a):c=b;jX(this,c)};_.r.Oo=function(a){this.h=a;this.j=null};_.r.getQueueManager=function(){return hX().getPlayerManager().getQueueManager()};
119
- _.r.Ek=function(){var a=this.getQueueManager();a&&(a=a.getCurrentItemIndex(),this.j!==a&&(this.j=a,hX().sendCustomMessage(zV,void 0,{type:sV,index:a})))};
120
- _.r.bn=function(a){a=a.trim();if(a.startsWith("#EXTM3U"))return lX(this,a);try{var b=(new DOMParser).parseFromString(a,_.tg)}catch(t){return a}var c=b.getElementsByTagName("MPD")[0];if(c){a=c;this.g.debug("Detected DASH, parsing");b=hX();c=a.getElementsByTagName("Period");for(var d=c.length-1;0<=d;--d){for(var e=c[d].getElementsByTagName(_.ka),f=e.length-1;0<=f;--f){var g=e[f].getAttribute("contentType");if(g===_.Sg||g===_.Sc){g=e[f].getAttribute(_.Ue);for(var h=e[f].getElementsByTagName(_.Ab),l=
121
- h.length-1;0<=l;--l){var m=h[l].getAttribute(_.Ue)||g,n=h[l].getAttribute(_.Fd),p=h[l].getAttribute(_.gh)||void 0,q=h[l].getAttribute(_.ve)||void 0;void 0!==p&&(p=+p);void 0!==q&&(q=+q);b.canDisplayType(m,n,p,q)||e[f].removeChild(h[l])}e[f].getElementsByTagName(_.Ab).length||c[d].removeChild(e[f])}}c[d].getElementsByTagName(_.ka).length||a.removeChild(c[d])}return(new XMLSerializer).serializeToString(a)}if(c=b.getElementsByTagName(_.Jb)[0]){a=c;this.g.debug("Detected Smooth, parsing");b=hX();c=a.getElementsByTagName("StreamIndex");
122
- for(d=c.length-1;0<=d;--d)if(c[d].getAttribute("Type")===_.Sg){e=c[d].getElementsByTagName(_.yb);for(f=e.length-1;0<=f;--f)g=e[f].getAttribute(_.eb)||void 0,h=e[f].getAttribute(_.db)||void 0,void 0!==g&&(g=+g),void 0!==h&&(h=+h),b.canDisplayType(_.Ug,void 0,g,h)||c[d].removeChild(e[f]);c[d].getElementsByTagName(_.yb).length||a.removeChild(c[d])}a=(new XMLSerializer).serializeToString(a)}return a};
123
- _.r.an=function(a){var b=this,c,d,e,f,g,h;return _.I(function(l){switch(l.a){case 1:c=a;c.media.customData&&(d=GV(c.media.customData.playerConfiguration));if(!b.m||!d){l.C(2);break}if(!b.o){l.C(3);break}return _.x(l,Promise.resolve(b.o(d)),4);case 4:d=(e=l.f)||d;case 3:if(!d.ima){l.C(5);break}return _.x(l,NW(c.media,d.ima,b.m.getNetworkEngine()),5);case 5:typeof d.startTime===_.k&&d.startTime!==c.currentTime?c.currentTime=d.startTime:d.startTime=c.currentTime||null;if(c.media.customData.local){l.C(7);
124
- break}b.f.D=!0;return _.x(l,_.Wo(b.m,d),8);case 8:return _.x(l,_.Xo(b.m),9);case 9:f=b.m.getLoadedSource(),c.media.contentId=f.url,c.media.contentType=f.type,f.pc&&(c.media.hlsVideoSegmentFormat=JV(f.pc,_.at)),f.kb&&(c.media.hlsSegmentFormat=JV(f.kb,_.X));case 7:if((g=c.media.metadata)&&typeof g.sectionStartAbsoluteTime===_.k){var m=g.sectionStartAbsoluteTime;g.sectionStartAbsoluteTime=0===m?1E-8:m}void 0===c.autoplay&&(c.autoplay=b.m.getConfiguration().autoplay);case 2:if(!b.A){l.C(10);break}return _.x(l,
125
- Promise.resolve(b.A(c)),11);case 11:(h=l.f)&&(c=h);case 10:return l["return"](c)}})};_.r.dn=function(a){var b=a.media;b&&b.tracks&&b.tracks.length&&mX(b.tracks);if((b=a.items)&&b.length){b=_.v(b);for(var c=b.next();!c.done;c=b.next())(c=(c=c.value)&&c.media)&&c.tracks&&c.tracks.length&&mX(c.tracks)}return a};
126
- _.r.Kn=function(a){if(this.m&&(!a.media.customData||!a.media.customData.local)){a=_.M.Nm;var b=hX().getPlayerManager(),c=b.getLiveSeekableRange();if(c){var d=c.start;c=c.end;var e=this.m.getConfiguration().startTime;typeof d!==_.k||typeof c!==_.k||typeof e!==_.k||a(e,d,c)||(b=b.getMediaTimeForAbsoluteTime(e),typeof b===_.k&&a(b,d,c)&&this.m.seek(b))}_.Ro(this.m)}};_.r.Dk=function(a){this.w.forEach(function(b){return b(a.data)})};_.K(yV,eX);eX.prototype.getQueueManager=eX.prototype.getQueueManager;
127
- eX.prototype.setQueue=eX.prototype.Oo;eX.prototype.updateContentMetadata=eX.prototype.ip;eX.prototype.setContentMetadata=eX.prototype.nc;eX.prototype.getContentMetadata=eX.prototype.Ob;eX.prototype.isApiReady=eX.prototype.Tc;eX.prototype.sendMessage=eX.prototype.sendMessage;eX.prototype.removeMessageListener=eX.prototype.removeMessageListener;eX.prototype.addMessageListener=eX.prototype.addMessageListener;eX.prototype.off=eX.prototype.off;eX.prototype.on=eX.prototype.on;
128
- eX.prototype.setLoadRequestDataInterceptor=eX.prototype.Mo;eX.prototype.setPlayerConfigInterceptor=eX.prototype.Le;eX.prototype.stop=eX.prototype.stop;eX.prototype.start=eX.prototype.start;eX.prototype.init=eX.prototype.init;eX.getInstance=gX;var fX=null;_.r=oX.prototype;_.r.load=function(){return _.I(function(a){_.z(a)})};_.r.Gb=function(){return!0};_.r.qd=function(){};_.r.sb=function(){this.a&&this.a.isPlayingBreak&&!this.a.isPaused&&this.a.controller.playOrPause()};_.r.skip=function(){var a=this.h.a;a&&this.h.sendMessage(BV,{type:"SKIP_AD",requestId:MV(),mediaSessionId:a.mediaSessionId})};_.r.getAdVolume=function(){return this.h.getVolume()||0};_.r.Va=function(a){this.h.setVolume(a)};_.r.setMuted=function(a){this.h.setMuted(a)};_.r.isMuted=function(){return!!this.h.isMuted()};
129
- _.r.xc=function(){return this.a?this.a.isPlayingBreak:!1};_.r.isPaused=function(){return this.a&&this.a.isPlayingBreak?this.a.isPaused:!1};_.r.getPosition=function(){var a=-1,b=this.h.a;b&&(b=b.getEstimatedBreakClipTime(),typeof b===_.k&&(a=b));return a};_.r.nd=function(){return!0};_.r.Mc=function(){var a=this;return _.I(function(b){a.j.release();_.z(b)})};_.r.setVolume=function(a){this.Va(a)};_.r.getVolume=function(){return this.getAdVolume()};_.r.pause=function(){this.sb()};_.r.resume=function(){this.Gb()};
130
- _.r.bo=function(a){switch(a.field){case "mediaInfo":a.value&&(a=a.value,a.breaks&&this.h.trigger(new _.Q(_.Fc,{adsTimeline:new HW(a.breaks)})));break;case "isPlayingBreak":a.value?pX(this,_.jc):(pX(this,_.nc,this.f),pX(this,_.Cc,this.f),this.f=null,pX(this,_.kc));break;case "isPaused":this.f&&(a.value?pX(this,_.xc):pX(this,_.zc));break;case "breakClipId":this.f&&(a=this.a.breakClipId,this.f.getId()!==a&&null!=a&&(pX(this,_.nc,this.f),pX(this,_.Cc,this.f),this.f=qX(this),pX(this,_.Bc,this.f)));break;
131
- default:this.f||(this.f=qX(this))&&pX(this,_.Bc,this.f)}};oX.prototype.resume=oX.prototype.resume;oX.prototype.pause=oX.prototype.pause;oX.prototype.getVolume=oX.prototype.getVolume;oX.prototype.setVolume=oX.prototype.setVolume;oX.prototype.getPosition=oX.prototype.getPosition;oX.prototype.skip=oX.prototype.skip;rX.prototype.name=function(){return"clpp.cast.ads.SenderAdsManagerFactory"};rX.prototype.a=function(a,b){return a.namespace()!==_.xd?!1:!(!b||!b.ima)};rX.prototype.create=function(a){return new oX(a.a)};sX.prototype.name=function(){return"clpp.cast.ads.AdsManagerFactory"};sX.prototype.a=function(a,b){return gX().Tc()?!(!b||!b.ima):!1};sX.prototype.create=function(a){return new JW(a)};_.K("clpp.cast.createCastQueue",function(){tX=function(){return cast.framework.QueueBase.apply(this,arguments)||this};_.w(tX,cast.framework.QueueBase);tX.prototype.initialize=function(a){var b=a.queueData;b||(b=new cast.framework.messages.QueueData,b.name="queue",b.description="queue",b.items=[{media:a.media}],b.startTime=a.currentTime);return b};return new tX});_.ei(new rX);_.ei(new sX);};
109
+ _.r.setSourceIndex=function(a){this.l=a};_.r.getPeriods=function(){return[]};_.r.namespace=function(){return zV};_.r.getTimelineCues=function(){return this.o&&this.o.getTimelineCues()||[]};_.r.getCueTimeline=function(){return null};_.r.resetAbr=function(){this.g.warn(vV)};_.r.onError=function(a){this.trigger(new _.Q(_.qe,{detail:a}))};_.r.canPlay=function(){return _.nj()?2:0};
110
+ _.r.Ek=function(a){a=Object.assign({},a);a.customData||(a.customData={});a.customData.stats=HV(this.getStats());var b=bX(),c=a.media||b.getMediaInformation();b=b.getStartAbsoluteTime();c&&typeof b===_.h&&c.startAbsoluteTime!==b&&(this.g.info("Syncing startAbsoluteTime.Old value: "+(c.startAbsoluteTime+", new value: ")+b),c.startAbsoluteTime=b,a=Object.assign({},a,{media:c}));c=cast.framework.messages.StreamType;b=a.media;var d=!!b,e=this.isLive(),f=d&&!b.metadata,g=!!a.liveSeekableRange;if(d&&g&&
111
+ (!e||e&&f)){d=bX().getStartAbsoluteTime();if(typeof d===_.h){b.startAbsoluteTime=d;var k;f?k=new cast.framework.messages.GenericMediaMetadata:k=b.metadata;k.sectionStartAbsoluteTime=d;b.metadata=k}b.streamType=c.LIVE;a=Object.assign({},a,{media:b})}return a};
112
+ _.r.lk=function(a,b){var c=null,d=b;a.media.customData&&(c=IV(a.media.customData.playerConfiguration));var e=null,f=null;a.media.customData&&(e=IV(a.media.customData["com.castlabs.reactnative.PlayerConfiguration"]),f=IV(a.media.customData.playerConfiguration));var g=e&&e.LiveConfiguration;g=g?0===g.liveEdgeLatencyMs:!1;e=!(!e||!e.lowLatencyMode);d=null!=f&&f.lowLatencyMode||g||e?cX(d,{streaming:{lowLatencyMode:!0}}):d;if(!c)return d;f=c.chromecast||null;e=c.abr||null;g=d;e&&typeof e.defaultBandwidthEstimate===
113
+ _.h?g.initialBandwidth=e.defaultBandwidthEstimate:g.initialBandwidth=void 0;fX(c,d);e={};g=c.streaming||null;f&&f.useSenderStreamingConfig&&g&&(e.streaming=JV(g,wX));c=c.abr||null;f&&f.useSenderAbrConfig&&c&&(e.abr=JV(c,xX));_.N.Wb(e)&&(d=cX(d,e));return d};_.r.getTextDisplayer=function(){return null};_.r.setDrmCustomDataModifier=function(){};_.r.setCdnErrorCallback=function(){};_.r.detach=function(){};_.r=gX.prototype;_.r.init=function(a){var b=this;a&&(this.f=new aX,_.Mo(a,this.f),this.m=a,this.l.on(window,"unload",function(){return _.I(function(c){return b.m&&b.m.getState()!==_.du?_.x(c,FV(b.m),0):c.C(0)})}))};
114
+ _.r.start=function(){var a=this;if(!this.a&&window.cast&&cast.framework&&cast.framework.CastReceiverContext){this.a=!0;var b=jX(),c=jX().getPlayerManager(),d=new cast.framework.CastReceiverOptions;d.customNamespaces={};d.customNamespaces[BV]=cast.framework.system.MessageType.JSON;d.customNamespaces[CV]=cast.framework.system.MessageType.JSON;var e=new cast.framework.PlaybackConfig;e.manifestHandler=this.cn.bind(this);e.shakaConfig={streaming:{ignoreTextStreamFailures:!0}};e.enableSmoothLiveRefresh=
115
+ !0;d.playbackConfig=e;if(e=this.m&&this.m.getSurface().getMedia())d.mediaElement=e;d.disableIdleTimeout=!0;d.maxInactivity=Infinity;this.h&&(d.queue=this.h);c.setMessageInterceptor(cast.framework.messages.MessageType.QUEUE_UPDATE,function(f){a.g.info("QUEUE_UPDATE message received",f);var g=a.getQueueManager();if(!g)return f;g=g.getCurrentItem();return g?(g=g.customData)&&!1===g.skippable?null:f:f});c.setMessageInterceptor(cast.framework.messages.MessageType.LOAD,this.bn.bind(this));c.setMessageInterceptor(cast.framework.messages.MessageType.MEDIA_STATUS,
116
+ this.en.bind(this));c.addEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.D);c.addEventListener(cast.framework.events.EventType.MEDIA_STATUS,this.Gk.bind(this));b.start(d);b.addCustomMessageListener(BV,this.B);this.l.on(document,_.Yg,function(){var f={type:"event",name:_.Yg,visible:!document.hidden};jX().sendCustomMessage(CV,void 0,f)})}};
117
+ _.r.stop=function(){if(this.a){this.a=!1;this.l.release();var a=jX();jX().getPlayerManager().removeEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.D);a.removeCustomMessageListener(BV,this.B);a.stop();this.j=this.h=this.m=this.f=null}};_.r.Ne=function(a){this.o=a};_.r.Po=function(a){this.A=a};_.r.on=function(a,b){jX().addEventListener(a,b)};_.r.off=function(a,b){jX().removeEventListener(a,b)};_.r.addMessageListener=function(a){typeof a===_.ue&&this.w.add(a)};
118
+ _.r.removeMessageListener=function(a){typeof a===_.ue&&this.w["delete"](a)};_.r.sendMessage=function(a,b){jX().sendCustomMessage(BV,b,a)};_.r.Ed=function(){return this.a};_.r.Ig=function(){return this.a};_.r.Sb=function(){return kX()};_.r.pc=function(a){lX(this,a)};_.r.lp=function(a){var b=kX(),c=null;a?c=Object.assign({},b,a):c=b;lX(this,c)};_.r.Ro=function(a){this.h=a;this.j=null};_.r.getQueueManager=function(){return jX().getPlayerManager().getQueueManager()};
119
+ _.r.Gk=function(){var a=this.getQueueManager();a&&(a=a.getCurrentItemIndex(),this.j!==a&&(this.j=a,jX().sendCustomMessage(BV,void 0,{type:uV,index:a})))};
120
+ _.r.cn=function(a){a=a.trim();if(a.startsWith("#EXTM3U"))return nX(this,a);try{var b=(new DOMParser).parseFromString(a,_.tg)}catch(t){return a}var c=b.getElementsByTagName("MPD")[0];if(c){a=c;this.g.debug("Detected DASH, parsing");b=jX();c=a.getElementsByTagName("Period");for(var d=c.length-1;0<=d;--d){for(var e=c[d].getElementsByTagName(_.ka),f=e.length-1;0<=f;--f){var g=e[f].getAttribute("contentType");if(g===_.Sg||g===_.Sc){g=e[f].getAttribute(_.Ue);for(var k=e[f].getElementsByTagName(_.Ab),l=
121
+ k.length-1;0<=l;--l){var m=k[l].getAttribute(_.Ue)||g,n=k[l].getAttribute(_.Fd),p=k[l].getAttribute(_.gh)||void 0,q=k[l].getAttribute(_.ve)||void 0;void 0!==p&&(p=+p);void 0!==q&&(q=+q);b.canDisplayType(m,n,p,q)||e[f].removeChild(k[l])}e[f].getElementsByTagName(_.Ab).length||c[d].removeChild(e[f])}}c[d].getElementsByTagName(_.ka).length||a.removeChild(c[d])}return(new XMLSerializer).serializeToString(a)}if(c=b.getElementsByTagName(_.Jb)[0]){a=c;this.g.debug("Detected Smooth, parsing");b=jX();c=a.getElementsByTagName("StreamIndex");
122
+ for(d=c.length-1;0<=d;--d)if(c[d].getAttribute("Type")===_.Sg){e=c[d].getElementsByTagName(_.yb);for(f=e.length-1;0<=f;--f)g=e[f].getAttribute(_.eb)||void 0,k=e[f].getAttribute(_.db)||void 0,void 0!==g&&(g=+g),void 0!==k&&(k=+k),b.canDisplayType(_.Ug,void 0,g,k)||c[d].removeChild(e[f]);c[d].getElementsByTagName(_.yb).length||a.removeChild(c[d])}a=(new XMLSerializer).serializeToString(a)}return a};
123
+ _.r.bn=function(a){var b=this,c,d,e,f,g,k;return _.I(function(l){switch(l.a){case 1:c=a;c.media.customData&&(d=IV(c.media.customData.playerConfiguration));if(!b.m||!d){l.C(2);break}if(!b.o){l.C(3);break}return _.x(l,Promise.resolve(b.o(d)),4);case 4:d=(e=l.f)||d;case 3:if(!d.ima){l.C(5);break}return _.x(l,PW(c.media,d.ima,b.m.getNetworkEngine()),5);case 5:typeof d.startTime===_.h&&d.startTime!==c.currentTime?c.currentTime=d.startTime:d.startTime=c.currentTime||null;if(c.media.customData.local){l.C(7);
124
+ break}b.f.D=!0;return _.x(l,_.Wo(b.m,d),8);case 8:return _.x(l,_.Xo(b.m),9);case 9:f=b.m.getLoadedSource(),c.media.contentId=f.url,c.media.contentType=f.type,f.sc&&(c.media.hlsVideoSegmentFormat=LV(f.sc,_.bt)),f.vb&&(c.media.hlsSegmentFormat=LV(f.vb,_.X));case 7:if((g=c.media.metadata)&&typeof g.sectionStartAbsoluteTime===_.h){var m=g.sectionStartAbsoluteTime;g.sectionStartAbsoluteTime=0===m?1E-8:m}void 0===c.autoplay&&(c.autoplay=b.m.getConfiguration().autoplay);case 2:if(!b.A){l.C(10);break}return _.x(l,
125
+ Promise.resolve(b.A(c)),11);case 11:(k=l.f)&&(c=k);case 10:return l["return"](c)}})};_.r.en=function(a){var b=a.media;b&&b.tracks&&b.tracks.length&&oX(b.tracks);if((b=a.items)&&b.length){b=_.v(b);for(var c=b.next();!c.done;c=b.next())(c=(c=c.value)&&c.media)&&c.tracks&&c.tracks.length&&oX(c.tracks)}return a};
126
+ _.r.Mn=function(a){if(this.m&&(!a.media.customData||!a.media.customData.local)){a=_.N.Pm;var b=jX().getPlayerManager(),c=b.getLiveSeekableRange();if(c){var d=c.start;c=c.end;var e=this.m.getConfiguration().startTime;typeof d!==_.h||typeof c!==_.h||typeof e!==_.h||a(e,d,c)||(b=b.getMediaTimeForAbsoluteTime(e),typeof b===_.h&&a(b,d,c)&&this.m.seek(b))}_.Ro(this.m)}};_.r.Fk=function(a){this.w.forEach(function(b){return b(a.data)})};_.K(AV,gX);gX.prototype.getQueueManager=gX.prototype.getQueueManager;
127
+ gX.prototype.setQueue=gX.prototype.Ro;gX.prototype.updateContentMetadata=gX.prototype.lp;gX.prototype.setContentMetadata=gX.prototype.pc;gX.prototype.getContentMetadata=gX.prototype.Sb;gX.prototype.isApiReady=gX.prototype.Ed;gX.prototype.sendMessage=gX.prototype.sendMessage;gX.prototype.removeMessageListener=gX.prototype.removeMessageListener;gX.prototype.addMessageListener=gX.prototype.addMessageListener;gX.prototype.off=gX.prototype.off;gX.prototype.on=gX.prototype.on;
128
+ gX.prototype.setLoadRequestDataInterceptor=gX.prototype.Po;gX.prototype.setPlayerConfigInterceptor=gX.prototype.Ne;gX.prototype.stop=gX.prototype.stop;gX.prototype.start=gX.prototype.start;gX.prototype.init=gX.prototype.init;gX.getInstance=iX;var hX=null;_.r=qX.prototype;_.r.load=function(){return _.I(function(a){_.A(a)})};_.r.Ab=function(){return!0};_.r.Nc=function(){};_.r.pb=function(){this.a&&this.a.isPlayingBreak&&!this.a.isPaused&&this.a.controller.playOrPause()};_.r.skip=function(){var a=this.h.a;a&&this.h.sendMessage(DV,{type:"SKIP_AD",requestId:OV(),mediaSessionId:a.mediaSessionId})};_.r.getAdVolume=function(){return this.h.getVolume()||0};_.r.Oa=function(a){this.h.setVolume(a)};_.r.setMuted=function(a){this.h.setMuted(a)};_.r.isMuted=function(){return!!this.h.isMuted()};
129
+ _.r.jc=function(){return this.a?this.a.isPlayingBreak:!1};_.r.isPaused=function(){return this.a&&this.a.isPlayingBreak?this.a.isPaused:!1};_.r.getPosition=function(){var a=-1,b=this.h.a;b&&(b=b.getEstimatedBreakClipTime(),typeof b===_.h&&(a=b));return a};_.r.Kc=function(){return!0};_.r.xc=function(){var a=this;return _.I(function(b){a.j.release();_.A(b)})};_.r.setVolume=function(a){this.Oa(a)};_.r.getVolume=function(){return this.getAdVolume()};_.r.pause=function(){this.pb()};_.r.resume=function(){this.Ab()};
130
+ _.r.eo=function(a){switch(a.field){case "mediaInfo":a.value&&(a=a.value,a.breaks&&this.h.trigger(new _.Q(_.Fc,{adsTimeline:new JW(a.breaks)})));break;case "isPlayingBreak":a.value?rX(this,_.jc):(rX(this,_.nc,this.f),rX(this,_.Cc,this.f),this.f=null,rX(this,_.kc));break;case "isPaused":this.f&&(a.value?rX(this,_.xc):rX(this,_.zc));break;case "breakClipId":this.f&&(a=this.a.breakClipId,this.f.getId()!==a&&null!=a&&(rX(this,_.nc,this.f),rX(this,_.Cc,this.f),this.f=sX(this),rX(this,_.Bc,this.f)));break;
131
+ default:this.f||(this.f=sX(this))&&rX(this,_.Bc,this.f)}};qX.prototype.resume=qX.prototype.resume;qX.prototype.pause=qX.prototype.pause;qX.prototype.getVolume=qX.prototype.getVolume;qX.prototype.setVolume=qX.prototype.setVolume;qX.prototype.getPosition=qX.prototype.getPosition;qX.prototype.skip=qX.prototype.skip;tX.prototype.name=function(){return"clpp.cast.ads.SenderAdsManagerFactory"};tX.prototype.a=function(a,b){return a.namespace()!==_.xd?!1:!(!b||!b.ima)};tX.prototype.create=function(a){return new qX(a.a)};uX.prototype.name=function(){return"clpp.cast.ads.AdsManagerFactory"};uX.prototype.a=function(a,b){return iX().Ig()?!(!b||!b.ima):!1};uX.prototype.create=function(a){return new LW(a)};_.K("clpp.cast.createCastQueue",function(){vX=function(){return cast.framework.QueueBase.apply(this,arguments)||this};_.w(vX,cast.framework.QueueBase);vX.prototype.initialize=function(a){var b=a.queueData;b||(b=new cast.framework.messages.QueueData,b.name="queue",b.description="queue",b.items=[{media:a.media}],b.startTime=a.currentTime);return b};return new vX});_.ei(new tX);_.ei(new uX);};
132
132
  if(typeof(module)!="undefined"&&module.exports){var x=require("./cl.core.js");_ = x._;(f.call(g,this));module.exports=g;}
133
133
  else if (typeof(define)!="undefined"&&define.amd) {define(["./cl.core"], function(c){_=c._;(f.call(g,this));return g;});}
134
134
  else{_=this.clpp._;(f.call(g,this));}