@castlabs/prestoplay 6.9.0 → 6.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/CHANGELOG.md +66 -0
  2. package/cjs/cl.adobe.js +3 -3
  3. package/cjs/cl.airplay.js +3 -3
  4. package/cjs/cl.broadpeak.js +6 -6
  5. package/cjs/cl.cast.js +112 -111
  6. package/cjs/cl.conviva.js +33 -33
  7. package/cjs/cl.core.js +467 -432
  8. package/cjs/cl.crypto.js +9 -9
  9. package/cjs/cl.dash.js +72 -72
  10. package/cjs/cl.externs.js +143 -45
  11. package/cjs/cl.freewheel.js +24 -24
  12. package/cjs/cl.hls.js +78 -73
  13. package/cjs/cl.hlssmpte.js +6 -6
  14. package/cjs/cl.htmlcue.js +29 -31
  15. package/cjs/cl.ima.js +24 -24
  16. package/cjs/cl.mse.js +276 -275
  17. package/cjs/cl.muxdata.js +14 -15
  18. package/cjs/cl.onboard.js +3 -3
  19. package/cjs/cl.persistent.js +14 -14
  20. package/cjs/cl.playlist.js +6 -6
  21. package/cjs/cl.smooth.js +71 -71
  22. package/cjs/cl.thumbnails.js +24 -24
  23. package/cjs/cl.tizen.js +71 -71
  24. package/cjs/cl.ttml.js +29 -27
  25. package/cjs/cl.verimatrix.js +5 -5
  26. package/cjs/cl.vimond.js +13 -13
  27. package/cjs/cl.vr.js +19 -19
  28. package/cjs/cl.vtt.js +14 -14
  29. package/cjs/cl.youbora.js +20 -20
  30. package/cl.adobe.js +3 -3
  31. package/cl.airplay.js +3 -3
  32. package/cl.broadpeak.js +5 -5
  33. package/cl.cast.js +88 -88
  34. package/cl.conviva.js +27 -27
  35. package/cl.core.js +396 -365
  36. package/cl.crypto.js +9 -9
  37. package/cl.dash.js +68 -67
  38. package/cl.externs.js +139 -45
  39. package/cl.freewheel.js +19 -19
  40. package/cl.hls.js +64 -61
  41. package/cl.hlssmpte.js +5 -5
  42. package/cl.htmlcue.js +26 -25
  43. package/cl.ima.js +17 -17
  44. package/cl.mse.js +240 -242
  45. package/cl.muxdata.js +12 -12
  46. package/cl.onboard.js +4 -4
  47. package/cl.persistent.js +11 -11
  48. package/cl.playlist.js +5 -5
  49. package/cl.smooth.js +59 -58
  50. package/cl.thumbnails.js +17 -17
  51. package/cl.tizen.js +57 -57
  52. package/cl.ttml.js +22 -22
  53. package/cl.verimatrix.js +4 -4
  54. package/cl.vimond.js +8 -8
  55. package/cl.vr.js +14 -14
  56. package/cl.vtt.js +12 -12
  57. package/cl.youbora.js +15 -15
  58. package/clpp.styles.css +15 -0
  59. package/package.json +1 -1
  60. package/typings.d.ts +249 -21
package/cjs/cl.cast.js CHANGED
@@ -1,115 +1,116 @@
1
1
  (function(){var g={}; var _ = _ || {}
2
- var f=function(window){var tM="Cannot seek during ads playout.",uM="Cannot switch track",vM="Media session does not exist.",wM="No receivers available",xM="Reset ABR functionality not available on cast.",yM="SDK not yet ready",zM="Sender is destroyed.",AM="clpp.cast.CastProxy",BM="clpp.cast.Player",CM="clpp.cast.Receiver",DM="urn:x-cast:castlabs",EM="urn:x-cast:com.google.cast.media",FM=function(a){return _.B(function(b){return 1==b.a?_.x(b,a.kc(_.Nd),2):_.x(b,a.kc(_.Md),0)})},GM=function(a,b){this.log=new _.I(b);this.a=
3
- a;this.m=null;this.g=_.Em;this.o=_.Km;this.j=2;this.D=Date.now();this.B=-1},HM=function(a){return JSON.stringify(a,function(b,c){if("license"!==b&&typeof c!==_.jd){if(c instanceof Event){var d={},e;for(e in c){var f=c[e];typeof f===_.Jd?"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}})},IM=function(a){if(typeof a!==_.te)return a;try{return JSON.parse(a,function(b,c){return"NaN"===c?NaN:"-Infinity"===c?-Infinity:
4
- "Infinity"===c?Infinity:c})}catch(b){return a}},JM=function(a,b,c,d){var e,f,g,h,l,m,n,p;return _.B(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=_.Ri(d,a.mimeType,g);if(!f||!g)return q.G(2);l=_.Xh(a.url);return _.x(q,c.fetch(l).P,3)}2!=q.a&&(m=q.f)&&m.data&&(n=f.a(_.N(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)})},KM=function(a,b){if(window.chrome&&
5
- 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 _.Re:return d.FMP4;case _.Qe:return b===_.si?d.MPEG2_TS:c.TS;case _.kc:return c.AAC;case _.lc:return c.AC3;case _.nc:return c.E_AC3;case "audio/mpeg":return c.MP3;case _.oc:return c.FMP4}},MM=function(a){a=
6
- void 0===a?LM:a;var b=cast.framework.messages||chrome.cast.media;if(!b)throw new _.L(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;case c.MUSIC_TRACK:return new g;case c.PHOTO:return new h;case c.AUDIOBOOK_CHAPTER:return new b;default:return new d}},NM=function(a){GM.call(this,a,"clpp.cast.SenderStateManager");
7
- this.w=this.f=null;this.A=this.Eb.bind(this)},OM=function(){this.h=new _.I("clpp.cast.SenderTrackManager");this.a=null;this.g=[];this.f={}},PM=function(a){return(a=a.a?a.a.a:null)?a.activeTrackIds.map(function(b){return b.toString()}):[]},RM=function(a,b){var c=PM(a);return QM(a,b).find(function(d){return c.includes(d.id)})||null},QM=function(a,b){return a.g.filter(function(c){return c.type===b})},TM=function(a,b,c){var d=a.a.a;if(d)if(c){a.f[b]=c.renditions[0];c=[+c.id];if(b!==_.O){var e=a.qa();
8
- e&&c.push(+e.id)}c=new chrome.cast.media.EditTracksInfoRequest(c);d.editTracksInfo(c,function(){a.f[b]=null;SM(a,b)},function(f){a.f[b]=null;a.h.debug(uM,f)})}else b===_.O&&(c=new chrome.cast.media.EditTracksInfoRequest([]),d.editTracksInfo(c,function(){SM(a,b)},function(f){a.h.debug(uM,f)}))},SM=function(a,b){b===_.Q?a.a.trigger(new _.J(_.Pj)):b===_.O&&a.a.trigger(new _.J(_.Qj))},XM=function(a,b,c,d){_.Wj.call(this);this.h=new _.I(_.Hc);this.ga=a;this.o=new _.Wi(b);this.da=c;this.ma=d;this.g=this.J=
9
- _.ck();this.D=[];this.B=0;this.M=new _.ni;this.H=this.m=this.a=null;this.A=this.w=!1;this.na="";this.Xa=1E6;this.f=new OM;this.f.initialize(this);this.j=new NM(this);this.I=new _.dg;this.K=null;this.F=new Set;this.T=this.jk.bind(this);this.Ia=this.Dk.bind(this);this.ha=this.uk.bind(this);this.V=this.nk.bind(this);this.N=null;window.cast||Object.defineProperty(window,"cast",{get:function(){return window.cast_},set:function(e){window.cast_=e;window.setTimeout(function(){UM(!0)},0)}});VM(this);WM.add(this)},
10
- YM=function(a){var b,c;return _.B(function(d){if(1==d.a)return WM["delete"](a),a.w&&(a.w=!1,b=cast.framework.CastContext.getInstance(),b.removeEventListener(cast.framework.CastContextEventType.CAST_STATE_CHANGED,a.T),b.removeEventListener(cast.framework.CastContextEventType.SESSION_STATE_CHANGED,a.Ia)),c=[],a.f&&(c.push(a.f.destroy()),a.f=null),a.j&&(c.push(a.j.destroy()),a.j=null),_.x(d,Promise.all(c),2);a.A=!1;a.o&&(a.o.stop(),a.o=null);a.da=null;a.ma=null;_.y(d)})},$M=function(a){if(!a)return null;
11
- a:{var b=a.metadataType;var c=Object.entries(ZM);c=_.u(c);for(var d=c.next();!d.done;d=c.next()){d=_.u(d.value);var e=d.next().value;if(d.next().value===b){b=e;break a}}b=null}if(!b)return null;b=MM(ZM[b]);return Object.assign(b,a)},aN=function(a){var b=void 0===b?LM:b;return Object.values(ZM).includes(a)?a:b},eN=function(a){var b={},c;for(c in a)void 0!==a[c]&&(b[c]=a[c]);return b},VM=function(a){if(!a.w&&window.chrome&&chrome.cast&&chrome.cast.isAvailable&&window.cast&&cast.framework&&cast.framework.CastContext&&
12
- a.ga.length){a.w=!0;a.o.vf();var b=cast.framework.CastContext.getInstance(),c=new cast.framework.CastOptions;c.receiverApplicationId=a.ga;c.autoJoinPolicy=chrome.cast.AutoJoinPolicy.ORIGIN_SCOPED;b.setOptions(c);b.addEventListener(cast.framework.CastContextEventType.CAST_STATE_CHANGED,a.T);b.addEventListener(cast.framework.CastContextEventType.SESSION_STATE_CHANGED,a.Ia);jN&&a.o.aa(.02)}},oN=function(a){var b=a.getPosition();a.a&&a.a.media?(a=a.a.media.startAbsoluteTime,a=typeof a!==_.k?null:a):a=
13
- null;a=null===a?null:a+b;return null===a?b:a},qN=function(a,b){pN(a,b.getMediaSession());b.addEventListener(cast.framework.SessionEventType.MEDIA_SESSION,a.ha);b.addMessageListener(DM,a.V)},pN=function(a,b){a.a=b;a.a&&(a.I.release(),a.H=null,a.m=null,a.m=new cast.framework.RemotePlayer,a.H=new cast.framework.RemotePlayerController(a.m),a.I.on(a.H,cast.framework.RemotePlayerEventType.CURRENT_TIME_CHANGED,a.Fh.bind(a)),a.f&&a.f.load(),a.j&&a.j.init(),a.trigger(new _.J(_.vd)))},rN=function(a){return _.B(function(b){return a.mb()?
14
- b.G(0):_.x(b,cast.framework.CastContext.getInstance().requestSession(),0)})},sN=function(a,b){var c,d,e,f,g,h,l,m,n,p,q,r,v,z,A,E,H;return _.B(function(D){switch(D.a){case 1:return c=chrome.cast.media.StreamType,d=_.nq,_.x(D,rN(a),2);case 2:if(!b)return D["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.Hb;m=h.audioMimeType;g.hlsVideoSegmentFormat=KM(l,d.VIDEO);
15
- g.hlsSegmentFormat=KM(m,d.AUDIO);if(!b.Ua){D.G(3);break}if(!a.N){D.G(4);break}return _.x(D,Promise.resolve(a.N(b.Ua)),5);case 5:if(n=D.f)b.Ua=n;case 4:a.g=b.Ua;a.D=_.an(a.g);a.B=a.D.findIndex(function(F){return F.url===b.source.url});if(!b.Ua.remoteTextTracks){D.G(6);break}return _.x(D,Promise.all(b.Ua.remoteTextTracks.map(a.Pi.bind(a))),7);case 7:p=D.f,g.tracks=p.filter(function(F){return F}),b.Ua.remoteTextTracks=void 0;case 6:delete b.Ua.autoplay,b.Ua.startTime=null,g.customData={playerConfiguration:HM(b.Ua)};
16
- case 3:q=a.hb()||{};r=aN(q.metadataType);typeof b.kf===_.k&&(v={metadataType:r,sectionStartAbsoluteTime:b.kf});b.source.name&&(z={metadataType:r,title:b.source.name});A=eN(q);if(E=$M(Object.assign({},v,z,A)))g.metadata=E;H=new chrome.cast.media.LoadRequest(g);typeof b.autoplay===_.sc&&(H.autoplay=b.autoplay);typeof b.currentTime===_.k&&(H.currentTime=b.currentTime);return _.x(D,f.loadMedia(H),0)}})},tN=function(a,b,c){c=void 0===c?0:c;var d,e;return _.B(function(f){(d=a.f.qa())&&d.language&&(a.g.preferredTextLanguage=
17
- d.language);(e=a.f.pa())&&e.language&&(a.g.preferredAudioLanguage=e.language);return _.x(f,sN(a,{source:a.getLoadedSource(),currentTime:c,isLive:a.isLive(),kf:a.getPresentationStartTime(),autoplay:b,Ua:a.g}),0)})},UM=function(a){if(a){a=_.u(WM);for(var b=a.next();!b.done;b=a.next())VM(b.value)}},vN=function(a,b,c){_.Wj.call(this);var d=this;this.f=a;this.g=b;this.j=typeof c===_.jd?c:function(e,f){d.f&&e!==_.Qm&&e!==_.Em&&d.f.load(f)};this.a=uN(this);this.h=new _.I(AM);this.addDelegate(this.f)},uN=
18
- function(a){return new XM(a.g,function(){a.trigger(new _.J(_.yc))},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.Hf&&(d.preferredAudioLanguage=c.Hf);c.gh&&(d.preferredTextLanguage=c.gh);_.io(a.f,null);a.trigger(new _.J("castingended"));a.j(b,d)},function(){return wN(a)})},wN=function(a){var b;return _.B(function(c){if(1==c.a)return a.trigger(new _.J(_.xc)),
19
- b=a.f.a,b!==a.a&&a.f&&a.a?_.x(c,a.f.release(),2):c["return"]();_.io(a.f,a.a);_.y(c)})},xN=function(a){GM.call(this,a,"clpp.cast.StateManager");this.J=this.Jh.bind(this);this.I=this.Ih.bind(this);this.A=this.qk.bind(this);this.w=this.ik.bind(this);this.M=this.Lh.bind(this);this.K=this.Kh.bind(this);this.N=this.Gk.bind(this);this.H=this.tk.bind(this);this.F=this.U.bind(this);this.f=this.Hh.bind(this)},Z=function(a,b,c,d,e){this.a=a;this.f=b;this.j=typeof c===_.k?c:1;this.m=typeof d===_.k?d:1;this.g=
20
- typeof e===_.k?e:0},yN=function(a){this.a=a},AN=function(a){this.l=a;this.a=null;this.g=this.Mh.bind(this);this.f=[cast.framework.events.EventType.PLAYER_LOADING,cast.framework.events.EventType.BREAK_CLIP_LOADING,cast.framework.events.EventType.BREAK_STARTED,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];
21
- zN().addEventListener(this.f,this.g)},DN=function(a,b,c){var d,e,f,g,h,l,m;return _.B(function(n){if(1==n.a){d=b.adTagUrl;if(!d)return n["return"]();_.zf(n,2);BN=!1;e=_.Xh(d);return _.x(n,c.fetch(e).P,4)}if(2!=n.a){if((f=n.f)&&f.data)if(g=_.uh(f.data),h=new DOMParser,l=h.parseFromString(g,_.Ce),l.getElementsByTagName("vmap:VMAP").length)_.G("VMAP detected."),a.vmapAdsRequest=CN(g);else if(l.getElementsByTagName("VAST").length){_.G("VAST detected.");var p=new cast.framework.messages.BreakClip("bc1");
22
- p.vastAdsRequest=CN(g);var q=new cast.framework.messages.Break("b1",[p.id],0);a.breakClips=[p];a.breaks=[q]}else _.G("Unsupported schema."),BN=!0;return _.Af(n,0)}m=_.Bf(n);_.G("Failed to fetch an ad",m);BN=!0;_.y(n)})},CN=function(a){var b=new cast.framework.messages.VastAdsRequest;b.adsResponse=a;return b},zN=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},FN=function(a,b,c){if(c instanceof cast.framework.events.BreaksEvent||-1!==a.getPosition()){var d=null;
23
- (c=EN(a,c))&&(d={ad:c});a.l.trigger(new _.J(b,d))}},GN=function(a,b){var c=new _.L(1,10,10003,{errorType:b});a.l.onError(c)},EN=function(a,b){var c=null;if(a.a&&b instanceof cast.framework.events.BreaksEvent){var d=null,e=null,f;typeof b.breakClipId===_.te&&(d=a.a.getBreakClipById(b.breakClipId));typeof b.breakId===_.te&&(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,
24
- h){return g.position-h.position}).findIndex(function(g){return g===e})));c=new Z(d,e,b.index,b.total,f)}return c},HN=function(a){this.Xb=a;this.a=this.f.bind(this)},IN=function(){return[cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,cast.framework.events.EventType.TIMED_METADATA_CHANGED,cast.framework.events.EventType.TIMED_METADATA_ENTER,cast.framework.events.EventType.TIMED_METADATA_EXIT]},JN=function(a){var b=a.dashTimedMetadata,c=_.Je;b&&(c=b.schemeIdUri);return{type:c.startsWith(_.Ie)?
25
- _.ng:_.lg,schemeIdUri:c,id:a.id||"",startTime:a.startTime,endTime:a.endTime,value:b&&b.value||"",eventElement:b&&b.eventElement}},KN=function(){this.h=new _.I("clpp.cast.TrackManager");this.l=null;this.o=1E9;this.g=[];this.j=[];this.m=this.Vk.bind(this);this.a=this.f=null},LN=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},NN=function(a){a.a=LN().getTextTracksManager();var b=a.a.getTracks();a.j=MN(_.O,b)},ON=function(a,b,c,d){c=_.Eg(c).filter(function(h){return h});
26
- var e=!1,f=[];b===_.Q?f=a.getAudioTracks():b===_.O&&(f=a.ia());if(c=c.find(function(h){var l=_.eh(h);return f.some(function(m){m=_.eh(m.language||"");return _.fh(l,m)})})){var g=_.eh(c);c=f.filter(function(h){h=_.eh(h.language||"");return _.fh(g,h)});f=c.length?c:f;e=e||!!c.length}_.Dh(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.h.info("Will select track",e),b===_.Q?a.xa(e):b===_.O&&a.Ga(e))},MN=function(a,b){for(var c=[],d=_.u(b),e=
27
- d.next();!e.done;e=d.next()){e=e.value;var f=new _.qi(e.trackId.toString(),a);f.roles=e.roles||[];f.kind=e.subtype||null;f.language=e.language||null;f.label=e.name||null;f.src=e.trackContentId||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 _.yi(f.id,f));c.push(f)}return c},PN=function(){_.Wj.call(this);this.h=new _.I(BM);this.g=this.w=_.ck();this.A=null;this.m=-1;this.F=new _.ni;this.f=this.o=
28
- this.j=this.a=this.B=null;this.D=!1},QN=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},TN=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=_.tk(d);if(e){var f=[_.Qc];_.an(a)[0].type!==_.hc&&f.unshift(_.Rc);d.preferredDrmSystem===_.Qc&&f.reverse();for(var g,h;f.length&&!h;)g=f.shift(),h=e.Wa[g];h?(d=g===_.Rc?cast.framework.ContentProtection.WIDEVINE:
29
- g===_.Qc?cast.framework.ContentProtection.PLAYREADY:void 0,b.protectionSystem=d,b.licenseUrl=h.licenseUrl,d={ldlDelay:0,customData:{}},RN(b,h,a,d),SN(b,h,a,d)):c()}else c()}else c()},RN=function(a,b,c,d){b.modifiers.licenseRequest?a.licenseRequestHandler=function(e){var f=_.Xh({method:"POST",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=
30
- f.allowCrossSiteCredentials}:a.licenseRequestHandler=void 0},SN=function(a,b,c,d){b.modifiers.licenseResponse?a.licenseHandler=function(e,f){var g;return _.B(function(h){return 1==h.a?(g=_.Yh(Object.assign({},f.headers),e.buffer,200,""),_.x(h,b.modifiers.licenseResponse(c,g,d),2)):h["return"](_.N(g.data))})}:a.licenseHandler=void 0},UN=function(){this.a=!1;this.h=new _.I(CM);this.f=this.l=null;this.g=new Set;this.A=this.sk.bind(this);this.w=this.Gh.bind(this);this.j=null;this.o=new _.dg;this.m=null},
31
- WN=function(){return VN||(VN=new UN)},XN=function(){return cast.framework.CastReceiverContext.getInstance()},ZN=function(a,b){a.h.debug("Detected HLS, parsing");var c=cast.framework.messages.HlsVideoSegmentFormat,d=XN();c=(XN().getPlayerManager().getMediaInformation()||{}).hlsVideoSegmentFormat===c.FMP4?_.Re:_.Qe;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=YN(h,_.la),m=YN(h,_.hb),n=_.u([]),
32
- p=n.next().value;n=n.next().value;m&&(m=_.u(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")},YN=function(a,b){b+="\x3d";var c=a.indexOf(b);if(0<=c){var d=a.substring(c+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},$N=function(a){this.f=a;this.a=null;this.g=new _.dg;this.j=[cast.framework.RemotePlayerEventType.IS_PLAYING_BREAK_CHANGED,
33
- cast.framework.RemotePlayerEventType.CURRENT_BREAK_CLIP_NUMBER_CHANGED,cast.framework.RemotePlayerEventType.MEDIA_INFO_CHANGED,cast.framework.RemotePlayerEventType.IS_PAUSED_CHANGED]},bO=function(a,b){var c=null,d=aO(a);d&&(c={ad:d});a.f.trigger(new _.J(b,c))},aO=function(a){var b=null;if(a.a&&a.a.mediaInfo){b=a.a.mediaInfo;var c=null,d=null,e=a.a.currentBreakClipNumber;if(b.breaks&&(c=b.breaks.find(function(h){return h.id===a.a.breakId})||null)){var f=c.breakClipIds.length;var g=0>=c.position?c.position:
34
- b.breaks.filter(function(h){return 0<=h.position}).sort(function(h,l){return h.position-l.position}).findIndex(function(h){return h===c})}b.breakClips&&(d=b.breakClips.find(function(h){return h.id===a.a.breakClipId})||null);b=new Z(d,c,e,f,g)}return b},cO=function(){},dO=function(){};_.t=GM.prototype;_.t.release=function(){this.oa(_.Em)};_.t.destroy=function(){this.m=this.a=null;return Promise.resolve()};_.t.getState=function(){return this.g};_.t.onError=function(a){a.severity===_.M&&this.oa(_.Um)};
35
- _.t.oa=function(a){if(a!==this.g)if(this.g===_.Um&&a!==_.Em)this.log.debug("Player is in ERROR state and can not switch to",a);else{var b=Date.now();this.o=this.g;this.g=a;this.g===_.Om?(this.B=b,this.a.trigger(new _.J(_.uc,{detail:{bufferedTimeMS:-1,reason:this.j}}))):this.o===_.Om&&this.a.trigger(new _.J(_.tc,{detail:{bufferedTimeMS:b-this.B,reason:this.j}}));a={currentState:this.g,previousState:this.o,timeSinceLastStateChangeMS:b-this.D};this.D=b;this.m&&_.um(this.m,this.g);this.a.trigger(new _.J(_.pe,
36
- {detail:a}))}};_.C("clpp.cast.CastUtils",function(){});var LM=0,ZM={GENERIC:LM,MOVIE:1,TV_SHOW:2,MUSIC_TRACK:3,PHOTO:4,AUDIOBOOK_CHAPTER:5};_.w(NM,GM);NM.prototype.init=function(){var a=this.a,b=a.a;b&&(this.f&&this.f.removeUpdateListener(this.A),this.f=b,this.f.addUpdateListener(this.A),this.w=a.m)};NM.prototype.destroy=function(){var a=this;return _.B(function(b){a.f&&(a.f.removeUpdateListener(a.A),a.f=null);return _.x(b,GM.prototype.destroy.call(a),0)})};NM.prototype.oa=function(a){var b=this.a.m;b&&b.isPlayingBreak||GM.prototype.oa.call(this,a)};
37
- NM.prototype.Eb=function(){if(this.f&&this.w&&!this.w.isPlayingBreak)switch(this.f.playerState){case chrome.cast.media.PlayerState.IDLE:switch(this.f.idleReason){case chrome.cast.media.IdleReason.FINISHED:this.oa(_.Qm);break;case chrome.cast.media.IdleReason.ERROR:this.oa(_.Um);break;default:this.oa(_.Em)}break;case chrome.cast.media.PlayerState.PLAYING:this.oa(_.Xm);break;case chrome.cast.media.PlayerState.PAUSED:this.oa(_.Wm);break;case chrome.cast.media.PlayerState.BUFFERING:this.oa(_.Om)}};_.w(OM,_.R);_.t=OM.prototype;_.t.initialize=function(a){this.a=a};_.t.release=function(){this.g=[];this.f={}};
38
- _.t.load=function(){this.release();var a=this.a.a;a&&(a=a.media)&&(this.g=(a=a.tracks)?a.map(function(b){switch(b.type){case chrome.cast.media.TrackType.VIDEO:var c=_.si;break;case chrome.cast.media.TrackType.AUDIO:c=_.Q;break;case chrome.cast.media.TrackType.TEXT:c=_.O}c=new _.qi(b.trackId.toString(),c);c.kind=b.subtype;c.language=b.language;c.label=b.name;c.src=b.trackContentId;c.mimeType=b.trackContentType;b.customData&&(c.src=b.customData.url||c.src,c.mimeType=b.customData.mimeType||c.mimeType);
39
- c.renditions.push(new _.yi(c.id,c));return c}):[],this.a.trigger(new _.J(_.qq)))};_.t.destroy=function(){this.a=null};_.t.getVideoTracks=function(){return QM(this,_.si)};_.t.getAudioTracks=function(){return QM(this,_.Q)};_.t.ia=function(){return QM(this,_.O)};_.t.fa=function(){var a=this.Na();return a?a.renditions[0]:null};_.t.Ka=function(){var a=this.pa();return a?a.renditions[0]:null};_.t.La=function(){var a=this.qa();return a?a.renditions[0]:null};_.t.Za=function(){return this.f[_.si]||null};
40
- _.t.ib=function(){return this.f[_.Q]||null};_.t.jb=function(){return this.f[_.O]||null};_.t.Na=function(){return RM(this,_.si)};_.t.pa=function(){return RM(this,_.Q)};_.t.qa=function(){return RM(this,_.O)};_.t.eb=function(a){TM(this,_.si,a)};_.t.xa=function(a){TM(this,_.Q,a)};_.t.Ga=function(a){TM(this,_.O,a)};_.t.cb=function(a){this.eb(a&&a.track)};_.t.pb=function(a){this.xa(a&&a.track)};_.t.qb=function(a){this.Ga(a&&a.track)};_.t.addTextTrack=function(){return _.B(function(a){_.y(a)})};_.t.ka=function(){return!0};
41
- OM.prototype.isAbrEnabled=OM.prototype.ka;OM.prototype.addTextTrack=OM.prototype.addTextTrack;OM.prototype.setTextRendition=OM.prototype.qb;OM.prototype.setAudioRendition=OM.prototype.pb;OM.prototype.setVideoRendition=OM.prototype.cb;OM.prototype.setTextTrack=OM.prototype.Ga;OM.prototype.setAudioTrack=OM.prototype.xa;OM.prototype.setVideoTrack=OM.prototype.eb;OM.prototype.getTextTrack=OM.prototype.qa;OM.prototype.getAudioTrack=OM.prototype.pa;OM.prototype.getVideoTrack=OM.prototype.Na;
42
- OM.prototype.getLoadingTextRendition=OM.prototype.jb;OM.prototype.getLoadingAudioRendition=OM.prototype.ib;OM.prototype.getLoadingVideoRendition=OM.prototype.Za;OM.prototype.getTextRendition=OM.prototype.La;OM.prototype.getAudioRendition=OM.prototype.Ka;OM.prototype.getVideoRendition=OM.prototype.fa;OM.prototype.getTextTracks=OM.prototype.ia;OM.prototype.getAudioTracks=OM.prototype.getAudioTracks;OM.prototype.getVideoTracks=OM.prototype.getVideoTracks;_.w(XM,_.Wj);_.t=XM.prototype;_.t.init=function(a,b){this.g=this.J=b};_.t.unload=function(){var a=this;return new Promise(function(b,c){a.f&&a.f.release();a.a&&!a.a.idleReason||b();a.a.stop(null,b,c)})};_.t.release=function(){var a=this;return this.unload().then(function(){a.j&&a.j.release()})};_.t.destroy=function(){return _.B(function(a){_.y(a)})};_.t.wd=function(a){this.N=a};_.t.gc=function(){return this.w};_.t.mb=function(){return this.A};_.t.Ke=function(){return this.na};
43
- _.t.sendMessage=function(a,b){var c=this,d,e,f;return _.B(function(g){switch(g.a){case 1:e=cast.framework.CastContext.getInstance().getCurrentSession();if(!e){d=new _.L(1,8,8004,void 0);g.G(2);break}_.zf(g,3);return _.x(g,e.sendMessage(a,HM(b)),5);case 5:_.Af(g,2);break;case 3:f=_.Bf(g),d=new _.L(1,8,8E3,{detailedErrorCode:f});case 2:if(d)c.onError(d);_.y(g)}})};
44
- _.t.cast=function(){var a=this,b,c;return _.B(function(d){if(1==d.a){if(!a.gc())throw a.h.warn(yM),new _.L(1,8,8001,void 0);if(!jN)throw a.h.warn(wM),new _.L(1,8,8002,void 0);if(a.mb())throw a.h.warn("Already casting"),new _.L(1,8,8003,void 0);_.zf(d,2);return _.x(d,rN(a),4)}if(2!=d.a)return _.Af(d,0);b=_.Bf(d);c={};b instanceof chrome.cast.Error?(c.detailedErrorCode=b.code,c.details=b.details,c.reason=b.description):c.detailedErrorCode=b;throw new _.L(1,8,8E3,c);})};
45
- _.t.Ee=function(){this.mb()&&cast.framework.CastContext.getInstance().endCurrentSession(!0)};_.t.addMessageListener=function(a){typeof a===_.jd&&this.F.add(a)};_.t.removeMessageListener=function(a){typeof a===_.jd&&this.F["delete"](a)};_.t.play=function(){var a=this;return this.isEnded()?tN(this,!0):new Promise(function(b,c){if(!a.a)return c(vM);a.a.play(null,b,c)})};_.t.pause=function(){var a=this;return new Promise(function(b,c){a.isEnded()&&b();if(!a.a)return c(vM);a.a.pause(null,b,c)})};
46
- _.t.isPaused=function(){return!!this.a&&this.a.playerState===chrome.cast.media.PlayerState.PAUSED};_.t.isEnded=function(){return this.getState()===_.Qm};_.t.seek=function(a){var b=this;return this.isEnded()?tN(this,!1,a):new Promise(function(c,d){b.a||d(vM);b.m.isPlayingBreak&&d(tM);var e=new chrome.cast.media.SeekRequest;e.currentTime=a;b.trigger(new _.J(_.Le));b.a.seek(e,function(){b.trigger(new _.J(_.Ke));c()},d)})};_.t.getPosition=function(){return this.a&&this.a.getEstimatedTime()||0};
47
- _.t.getDuration=function(){if(!this.a||!this.a.media)return-1;var a=this.a.media.duration;return typeof a!==_.k?-1:-1===a?Infinity:a};_.t.setDrmCustomDataModifier=function(){};_.t.setCdnErrorCallback=function(){};_.t.detach=function(){};_.t.getPlaybackRate=function(){return this.a&&this.a.playbackRate||0};_.t.setPlaybackRate=function(a){this.a&&0<a&&this.sendMessage(EM,{type:"SET_PLAYBACK_RATE",requestId:Math.round(1E3*Math.random()),mediaSessionId:this.a.mediaSessionId,playbackRate:a})};
48
- _.t.getVolume=function(){return this.a&&this.a.volume.level};_.t.setVolume=function(a){this.a&&0<=a&&1>=a&&(a=new chrome.cast.media.VolumeRequest(new chrome.cast.Volume(a)),this.a.setVolume(a))};_.t.isMuted=function(){return this.a&&this.a.volume.muted};_.t.setMuted=function(a){this.a&&(a=new chrome.cast.media.VolumeRequest(new chrome.cast.Volume(void 0,a)),this.a.setVolume(a))};
49
- _.t.getPresentationStartTime=function(){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};_.t.getSeekRange=function(){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};_.t.getState=function(){return this.j?this.j.getState():_.Km};
50
- _.t.getStats=function(){return this.a&&this.a.customData&&this.a.customData.stats?IM(this.a.customData.stats):_.Am()};_.t.isLive=function(){return Infinity===this.getDuration()};_.t.load=function(a){var b=this,c,d;return _.B(function(e){if(!b.gc())return b.h.warn(yM),e["return"]();if(!jN)return b.h.warn(wM),e["return"]();b.D=_.an(a);_.fk(a)&&(b.g=_.ek(b.J,a));c=b.D[b.B];d={source:c,isLive:c.isLive,autoplay:b.g.autoplay,Ua:b.g,Hb:c.Hb,audioMimeType:c.audioMimeType};return _.x(e,sN(b,d),0)})};
51
- _.t.getBufferInfo=function(){return new _.Vj};_.t.getTrackManager=function(){return this.f};_.t.getConfiguration=function(){return this.g};_.t.getSurface=function(){return null};_.t.setNetworkEngine=function(a){this.M=a};_.t.getNetworkEngine=function(){return this.M};_.t.getSourceIndex=function(){return this.B};_.t.setSourceIndex=function(a){this.B=a};_.t.getLoadedSource=function(){return this.D[this.B]};_.t.getPeriods=function(){return[]};_.t.getDrmInfo=function(){return null};
52
- _.t.getTimelineCues=function(){return[]};_.t.resetAbr=function(){this.h.warn(xM)};_.t.onError=function(a){if(a&&(this.trigger(new _.J(_.hd,{detail:a})),this.j))this.j.onError(a)};_.t.namespace=function(){return _.Hc};_.t.canPlay=function(){return this.gc()?2:0};_.t.hb=function(){return this.K};_.t.mc=function(a){this.K=$M(a)};_.t.we=function(){this.K=null};_.t.qf=function(a){var b=this.hb()||{};a={metadataType:aN(b.metadataType),title:a};this.mc(Object.assign({},b,a))};
53
- _.t.nf=function(a){var b=this.hb()||{},c=aN(b.metadataType);a=new chrome.cast.Image(a);this.mc(Object.assign({},b,{metadataType:c,images:[a]}))};_.t.mf=function(a){var b=this.hb()||{};this.mc(Object.assign({},b,{metadataType:3,artist:a}))};_.t.pf=function(a){var b=this.hb()||{};a={metadataType:aN(b.metadataType),releaseDate:a};this.mc(Object.assign({},b,a))};
54
- _.t.jk=function(a){var b=cast.framework.CastContext.getInstance(),c=a.castState===cast.framework.CastState.CONNECTED;jN=a.castState!==cast.framework.CastState.NO_DEVICES_AVAILABLE;this.na=c?b.getCurrentSession().getCastDevice().friendlyName:"";this.o.vf()};
55
- _.t.Dk=function(a){this.h.debug("state: "+a.sessionState+", details:",a);switch(a.sessionState){case cast.framework.SessionState.SESSION_STARTED:this.A=!0;qN(this,a.session);break;case cast.framework.SessionState.SESSION_RESUMED:this.mb()||(this.A=!0,qN(this,a.session),this.ma());break;case cast.framework.SessionState.SESSION_ENDED:if(this.mb()&&this.a){var b=this.a.media,c=this.f.pa(),d=this.f.qa();c=c&&c.language||void 0;d=d&&d.language||void 0;this.da(this.getState(),{source:{url:b.contentId,type:b.contentType,
56
- isLive:this.isLive()},currentTime:oN(this),gh:d,Hf:c})}a.session.removeEventListener(cast.framework.SessionEventType.MEDIA_SESSION,this.ha);a.session.removeMessageListener(DM,this.V);this.A=!1;this.a=null;this.I.release();this.m=this.H=null}};_.t.uk=function(a){this.h.debug("New media session",a.mediaSession);pN(this,a.mediaSession)};_.t.nk=function(a,b){if(a===DM&&0<this.F.size){var c=IM(b);this.F.forEach(function(d){return d(c)})}};_.t.Fh=function(){this.trigger(new _.J(_.De))};
57
- _.t.Pi=function(a){var b=this,c,d;return _.B(function(e){if(1==e.a)return c=null,_.x(e,JM(a,[_.Be,_.gc],b.M,b.g),2);if(d=e.f)c=new chrome.cast.media.Track(b.Xa++,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)})};_.t.getTextDisplayer=function(){return null};XM.prototype.getTextDisplayer=XM.prototype.getTextDisplayer;XM.prototype.getNetworkEngine=XM.prototype.getNetworkEngine;
58
- XM.prototype.setNetworkEngine=XM.prototype.setNetworkEngine;var jN=!1,WM=new Set;window.__onGCastApiAvailable=UM;_.w(vN,_.Wj);_.t=vN.prototype;_.t.destroy=function(){var a=this;return _.B(function(b){if(1==b.a)return a.a?_.x(b,YM(a.a),3):b.G(2);2!=b.a&&(a.a=null);a.removeDelegate(a.f);_.y(b)})};_.t.te=function(){return!!this.a&&this.a.gc()&&jN};_.t.mb=function(){return!!this.a&&this.a.mb()};_.t.Ke=function(){return this.a?this.a.Ke():""};_.t.wd=function(a){this.a&&this.a.wd(a)};
59
- _.t.cast=function(a){var b=this,c,d,e;return _.B(function(f){switch(f.a){case 1:if(!b.a)return f["return"]();_.zf(f,2);return _.x(f,b.a.cast(),4);case 4:if(!b.f||!b.a)return f["return"]();var g=null,h=b.f.getLoadedSource();if(h){var l=b.f.getTrackManager();g=l.getVideoTracks()[0];if(g&&g.mimeType)var m=g.mimeType;g=b.f.getConfiguration();var n=l.pa();if(n){if(n.mimeType)var p=n.mimeType;n.language&&(g.preferredAudioLanguage=n.language);n.roles.length&&(g.preferredAudioRole=n.roles[0])}if(l=l.qa())l.language&&
60
- (g.preferredTextLanguage=l.language),l.roles.length&&(g.preferredTextRole=l.roles[0]);l=h&&typeof h.isLive===_.sc?h.isLive:b.f.isLive();g={source:h,isLive:l,autoplay:!b.f.isPaused(),currentTime:Math.max(b.f.getPosition()-1,0),kf:b.f.getPresentationStartTime(),Hb:m,audioMimeType:p,Ua:g}}c=g;return _.x(f,wN(b),5);case 5:if(!b.a)return f["return"]();c&&(c.autoplay=!b.f.isPaused());if(a)return _.x(f,b.f.load(a),7);if(b.a.a){f.G(7);break}return _.x(f,sN(b.a,c),7);case 7:_.Af(f,0);break;case 2:d=_.Bf(f),
61
- b.h.error("Error while trying to cast",d),e=new _.J(_.hd,{detail:d}),b.trigger(e),_.y(f)}})};_.t.Ee=function(){this.a&&this.a.Ee()};_.t.Bh=function(a){var b=this;return _.B(function(c){if(1==c.a){if(a===b.g)return c["return"]();b.g=a;return b.a?_.x(c,YM(b.a),2):c.G(2)}b.a=uN(b);_.y(c)})};_.t.sendMessage=function(a){var b=this;return _.B(function(c){return b.a?_.x(c,b.a.sendMessage(DM,a),0):(b.h.warn(zM),c["return"]())})};_.t.addMessageListener=function(a){this.a?this.a.addMessageListener(a):this.h.warn(zM)};
62
- _.t.removeMessageListener=function(a){this.a?this.a.removeMessageListener(a):this.h.warn(zM)};_.t.hb=function(){return this.a&&this.a.hb()};_.t.mc=function(a){this.a&&this.a.mc(a)};_.t.we=function(){this.a&&this.a.we()};_.t.qf=function(a){this.a&&this.a.qf(a)};_.t.nf=function(a){this.a&&this.a.nf(a)};_.t.mf=function(a){this.a&&this.a.mf(a)};_.t.pf=function(a){this.a&&this.a.pf(a)};_.C(AM,vN);vN.prototype.setContentReleaseDate=vN.prototype.pf;vN.prototype.setContentArtist=vN.prototype.mf;
63
- vN.prototype.setContentImage=vN.prototype.nf;vN.prototype.setContentTitle=vN.prototype.qf;vN.prototype.clearContentMetadata=vN.prototype.we;vN.prototype.setContentMetadata=vN.prototype.mc;vN.prototype.getContentMetadata=vN.prototype.hb;vN.prototype.removeMessageListener=vN.prototype.removeMessageListener;vN.prototype.addMessageListener=vN.prototype.addMessageListener;vN.prototype.sendMessage=vN.prototype.sendMessage;vN.prototype.changeReceiverId=vN.prototype.Bh;vN.prototype.forceDisconnect=vN.prototype.Ee;
64
- vN.prototype.cast=vN.prototype.cast;vN.prototype.setPlayerConfigInterceptor=vN.prototype.wd;vN.prototype.getReceiverName=vN.prototype.Ke;vN.prototype.isCasting=vN.prototype.mb;vN.prototype.canCast=vN.prototype.te;vN.prototype.destroy=vN.prototype.destroy;_.w(xN,GM);_.t=xN.prototype;
65
- _.t.init=function(){var a=cast.framework.events.EventType,b=cast.framework.CastReceiverContext.getInstance().getPlayerManager();b.addEventListener(a.PLAYING,this.J);b.addEventListener(a.PAUSE,this.I);b.addEventListener(a.MEDIA_FINISHED,this.A);b.addEventListener(a.BUFFERING,this.w);b.addEventListener(a.SEEKING,this.M);b.addEventListener(a.SEEKED,this.K);b.addEventListener(a.STALLED,this.N);b.addEventListener(a.PLAYER_LOADING,this.H);b.addEventListener(a.ERROR,this.F);b.addEventListener(a.BITRATE_CHANGED,this.f)};
66
- _.t.destroy=function(){var a=this,b,c;return _.B(function(d){b=cast.framework.events.EventType;c=cast.framework.CastReceiverContext.getInstance().getPlayerManager();c.removeEventListener(b.PLAYING,a.J);c.removeEventListener(b.PAUSE,a.I);c.removeEventListener(b.MEDIA_FINISHED,a.A);c.removeEventListener(b.BUFFERING,a.w);c.removeEventListener(b.SEEKING,a.M);c.removeEventListener(b.SEEKED,a.K);c.removeEventListener(b.STALLED,a.N);c.removeEventListener(b.PLAYER_LOADING,a.H);c.removeEventListener(b.ERROR,
67
- a.F);c.removeEventListener(b.BITRATE_CHANGED,a.f);return _.x(d,GM.prototype.destroy.call(a),0)})};_.t.Jh=function(){this.a.trigger(new _.J(_.Xd));this.oa(_.Xm)};_.t.Ih=function(){this.oa(_.Wm)};_.t.qk=function(){this.oa(_.Qm)};_.t.ik=function(a){a.isBuffering?this.oa(_.Om):(a=this.a.isPaused()?_.Wm:_.Xm,this.oa(a))};_.t.Lh=function(){this.j=1;this.a.trigger(new _.J(_.Le))};_.t.Kh=function(){this.a.trigger(new _.J(_.Ke))};_.t.Gk=function(){this.j=2};_.t.tk=function(){this.oa(_.Vm)};
68
- _.t.Hh=function(a){var b=this.a.getStats();this.a.trigger(new _.J(_.rc,{detail:{bandwidth:a.totalBitrate,width:b.width,height:b.height}}))};_.t.U=function(a){a=new _.L(_.M,7,7300,{detailedErrorCode:a.detailedErrorCode,error:a.error,reason:a.reason});this.a.trigger(new _.J(_.hd,{detail:a}));this.oa(_.Um)};_.t=Z.prototype;_.t.vb=function(){return"Google Cast Framework"};_.t.wb=function(){return cast.framework.VERSION};_.t.Bb=function(){return 0};_.t.getId=function(){return""};_.t.getCreativeId=function(){return""};_.t.getApiFramework=function(){return null};_.t.getAdSystem=function(){return""};_.t.getAdvertiserName=function(){return""};_.t.getTitle=function(){return this.a.title||""};_.t.getDuration=function(){return this.a.duration||0};
69
- _.t.getSkipTimeOffset=function(){return this.a.whenSkippable||0};_.t.ic=function(){return!1};_.t.Nb=function(){return this.a.clickThroughUrl||null};_.t.getMediaUrl=function(){return this.a.contentUrl||this.a.contentId||null};_.t.yb=function(){return 0};_.t.xb=function(){return 0};_.t.kb=function(){return 0};_.t.$a=function(){switch(this.Ob()){case 0:return 0;case -1:return 2;default:return 1}};_.t.getPodIndex=function(){return this.g};_.t.Ob=function(){return this.f.position};_.t.Pb=function(){return this.j};
70
- _.t.Ab=function(){return this.m};_.t.getWrapperAdIds=function(){return[]};_.t.getWrapperAdSystems=function(){return[]};_.t.getWrapperCreativeIds=function(){return[]};Z.prototype.getWrapperCreativeIds=Z.prototype.getWrapperCreativeIds;Z.prototype.getWrapperAdSystems=Z.prototype.getWrapperAdSystems;Z.prototype.getWrapperAdIds=Z.prototype.getWrapperAdIds;Z.prototype.getSequenceLength=Z.prototype.Ab;Z.prototype.getPositionInSequence=Z.prototype.Pb;Z.prototype.getPodTimeOffset=Z.prototype.Ob;
71
- Z.prototype.getPodIndex=Z.prototype.getPodIndex;Z.prototype.getPodType=Z.prototype.$a;Z.prototype.getMediaBitrate=Z.prototype.kb;Z.prototype.getMediaHeight=Z.prototype.xb;Z.prototype.getMediaWidth=Z.prototype.yb;Z.prototype.getMediaUrl=Z.prototype.getMediaUrl;Z.prototype.getClickThroughUrl=Z.prototype.Nb;Z.prototype.isBumper=Z.prototype.ic;Z.prototype.getSkipTimeOffset=Z.prototype.getSkipTimeOffset;Z.prototype.getDuration=Z.prototype.getDuration;Z.prototype.getTitle=Z.prototype.getTitle;
72
- Z.prototype.getAdvertiserName=Z.prototype.getAdvertiserName;Z.prototype.getAdSystem=Z.prototype.getAdSystem;Z.prototype.getApiFramework=Z.prototype.getApiFramework;Z.prototype.getCreativeId=Z.prototype.getCreativeId;Z.prototype.getId=Z.prototype.getId;Z.prototype.getTechnology=Z.prototype.Bb;Z.prototype.getAdManagerVersion=Z.prototype.wb;Z.prototype.getAdManagerName=Z.prototype.vb;yN.prototype.getCuePoints=function(){return this.a.map(function(a){return a.position})};yN.prototype.Qb=function(){return!!this.a.find(function(a){return 0===a.position})};yN.prototype.lb=function(){return!!this.a.find(function(a){return-1===a.position})};yN.prototype.hasPostroll=yN.prototype.lb;yN.prototype.hasPreroll=yN.prototype.Qb;yN.prototype.getCuePoints=yN.prototype.getCuePoints;_.t=AN.prototype;_.t.load=function(){var a=this;return _.B(function(b){BN&&(BN=!1,GN(a,0));_.y(b)})};_.t.start=function(){return _.B(function(a){zN().play();_.y(a)})};_.t.resume=function(){-1!==this.getPosition()&&zN().play()};_.t.pause=function(){-1!==this.getPosition()&&zN().pause()};_.t.skip=function(){};_.t.getVolume=function(){return this.l.getVolume()||0};_.t.setVolume=function(a){this.l.setVolume(a)};
73
- _.t.getPosition=function(){var a=this.a&&this.a.getBreakClipCurrentTimeSec();return typeof a===_.k?a:-1};_.t.dispose=function(){var a=this;return _.B(function(b){zN().removeEventListener(a.f,a.g);_.y(b)})};
74
- _.t.Mh=function(a){var b=cast.framework.events.EndedReason;switch(a.type){case cast.framework.events.EventType.PLAYER_LOADING:this.a=zN().getBreakManager();this.a.setPlayWatchedBreak(!0);a=this.a.getBreaks();this.l.trigger(new _.J(_.Wb,{adsTimeline:new yN(a)}));break;case cast.framework.events.EventType.BREAK_CLIP_LOADING:FN(this,_.Mb,a);break;case cast.framework.events.EventType.BREAK_STARTED:FN(this,_.Fb,a);break;case cast.framework.events.EventType.BREAK_ENDED:FN(this,_.Gb,a);break;case cast.framework.events.EventType.BREAK_CLIP_STARTED:FN(this,
75
- _.Sb,a);break;case cast.framework.events.EventType.BREAK_CLIP_ENDED:a.endedReason===b.SKIPPED?(FN(this,_.Rb,a),FN(this,_.Tb,a)):a.endedReason===b.STOPPED?FN(this,_.Tb,a):a.endedReason===b.END_OF_STREAM?(FN(this,_.Jb,a),FN(this,_.Tb,a)):a.endedReason===b.ERROR&&GN(this,1);break;case cast.framework.events.EventType.PLAYING:FN(this,_.Qb,a);break;case cast.framework.events.EventType.PAUSE:FN(this,_.Ob,a);break;case cast.framework.events.EventType.BUFFERING:a.isBuffering?FN(this,_.Hb,a):FN(this,_.Qb,a)}};
76
- AN.prototype.getPosition=AN.prototype.getPosition;AN.prototype.setVolume=AN.prototype.setVolume;AN.prototype.getVolume=AN.prototype.getVolume;AN.prototype.skip=AN.prototype.skip;AN.prototype.pause=AN.prototype.pause;AN.prototype.resume=AN.prototype.resume;var BN=!1;HN.prototype.init=function(){cast.framework.CastReceiverContext.getInstance().getPlayerManager().addEventListener(IN(),this.a)};HN.prototype.release=function(){cast.framework.CastReceiverContext.getInstance().getPlayerManager().removeEventListener(IN(),this.a)};HN.prototype.getTimelineCues=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager().getTimedMetadata().map(function(a){return JN(a)})};
77
- HN.prototype.f=function(a){if(a instanceof cast.framework.events.TimedMetadataEvent){var b=null;switch(a.type){case cast.framework.events.EventType.TIMED_METADATA_CHANGED:b=_.og;break;case cast.framework.events.EventType.TIMED_METADATA_ENTER:b=_.qg;break;case cast.framework.events.EventType.TIMED_METADATA_EXIT:b=_.rg}b&&this.Xb(new _.J(b,{detail:JN(a.timedMetadataInfo)}))}else for(a=_.u(this.getTimelineCues()),b=a.next();!b.done;b=a.next())this.Xb(new _.J(_.og,{detail:b.value}))};_.w(KN,_.R);_.t=KN.prototype;_.t.initialize=function(a){this.l=a;LN().addEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.m)};_.t.release=function(){this.g=[];this.j=[];this.a=this.f=null};_.t.load=function(){};_.t.destroy=function(){this.l=null;LN().removeEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.m)};_.t.getVideoTracks=function(){return[]};_.t.getAudioTracks=function(){return this.g};_.t.ia=function(){return this.j};_.t.fa=function(){return null};
78
- _.t.Ka=function(){var a=this.pa();return a&&a.renditions[0]};_.t.La=function(){var a=this.qa();return a&&a.renditions[0]};_.t.Za=function(){return null};_.t.ib=function(){return null};_.t.jb=function(){return null};_.t.Na=function(){return null};_.t.pa=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};
79
- _.t.qa=function(){var a=null;if(this.a){var b=this.a.getActiveIds()[0];typeof b===_.k&&(b=b.toString(),a=this.ia().find(function(c){return c.id===b})||null)}return a};_.t.eb=function(){this.h.warn("Video tracks unavailable on Cast")};_.t.xa=function(a){a&&this.f&&this.f.setActiveById(+a.id)};_.t.Ga=function(a){this.a&&(a?this.a.setActiveByIds([+a.id]):this.a.setActiveByIds([]))};_.t.cb=function(){this.h.warn("Video renditions unavailable on Cast")};_.t.pb=function(a){this.xa(a&&a.track)};
80
- _.t.qb=function(a){this.Ga(a&&a.track)};
81
- _.t.addTextTrack=function(a){var b=this,c,d,e;return _.B(function(f){if(1==f.a)return c=b.l.getConfiguration(),_.x(f,JM(a,Object.values(cast.framework.messages.CaptionMimeType),b.l.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]),NN(b)}catch(g){throw b.h.warn("failed on track",
82
- a),g;}}_.y(f)})};_.t.ka=function(){return!0};_.t.Vk=function(){this.f=LN().getAudioTracksManager();var a=this.f.getTracks();this.g=MN(_.Q,a);NN(this);a=this.l.getConfiguration();ON(this,_.Q,a.preferredAudioLanguage,a.preferredAudioRole);ON(this,_.O,a.preferredTextLanguage,a.preferredTextRole)};KN.prototype.isAbrEnabled=KN.prototype.ka;KN.prototype.addTextTrack=KN.prototype.addTextTrack;KN.prototype.setTextRendition=KN.prototype.qb;KN.prototype.setAudioRendition=KN.prototype.pb;
83
- KN.prototype.setVideoRendition=KN.prototype.cb;KN.prototype.setTextTrack=KN.prototype.Ga;KN.prototype.setAudioTrack=KN.prototype.xa;KN.prototype.setVideoTrack=KN.prototype.eb;KN.prototype.getTextTrack=KN.prototype.qa;KN.prototype.getAudioTrack=KN.prototype.pa;KN.prototype.getVideoTrack=KN.prototype.Na;KN.prototype.getLoadingTextRendition=KN.prototype.jb;KN.prototype.getLoadingAudioRendition=KN.prototype.ib;KN.prototype.getLoadingVideoRendition=KN.prototype.Za;KN.prototype.getTextRendition=KN.prototype.La;
84
- KN.prototype.getAudioRendition=KN.prototype.Ka;KN.prototype.getVideoRendition=KN.prototype.fa;KN.prototype.getTextTracks=KN.prototype.ia;KN.prototype.getAudioTracks=KN.prototype.getAudioTracks;KN.prototype.getVideoTracks=KN.prototype.getVideoTracks;_.w(PN,_.Wj);_.t=PN.prototype;_.t.init=function(a,b){var c=this;this.B=a;b&&(this.g=this.w=b);var d=QN();d.setMessageInterceptor(cast.framework.messages.MessageType.MEDIA_STATUS,this.vk.bind(this));d.setMediaPlaybackInfoHandler(this.qh.bind(this));this.a=new xN(this);this.a.init();this.j=new KN;this.j.initialize(this);this.o=new HN(function(e){return c.trigger(e)});this.o.init()};
85
- _.t.unload=function(){var a=cast.framework.messages.PlayerState,b=QN();b.getPlayerState()!==a.IDLE&&b.stop();this.j&&this.j.release();this.o&&this.o.release();this.f=null;return Promise.resolve()};_.t.release=function(){var a=this;return this.unload().then(function(){a.a&&a.a.release()})};_.t.destroy=function(){var a=this;return _.B(function(b){if(1==b.a)return a.B=null,a.w=_.ck(),a.g=a.w,a.m=-1,a.A=null,a.a?_.x(b,a.a.destroy(),3):b.G(2);2!=b.a&&(a.a=null);a.j&&(a.j.destroy(),a.j=null);_.y(b)})};
86
- _.t.play=function(){var a=QN();if(null!==a.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject("Cannot play during ads playout.");a.play();return Promise.resolve()};_.t.pause=function(){var a=QN();if(null!==a.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject("Cannot pause during ads playout.");a.pause();return Promise.resolve()};_.t.isPaused=function(){return QN().getPlayerState()===cast.framework.messages.PlayerState.PAUSED};
87
- _.t.isEnded=function(){return QN().getPlayerState()===cast.framework.messages.PlayerState.IDLE};_.t.seek=function(a){var b=QN();if(null!==b.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject(tM);b.seek(a);return Promise.resolve()};_.t.getPosition=function(){return QN().getCurrentTimeSec()};_.t.getDuration=function(){var a=QN().getDurationSec();return typeof a===_.k?-1===a?Infinity:a:-1};_.t.getPlaybackRate=function(){return QN().getPlaybackRate()};
88
- _.t.setPlaybackRate=function(a){if(0<a){var b=new cast.framework.messages.SetPlaybackRateRequestData;b.playbackRate=a;QN().sendLocalMediaRequest(b)}};_.t.getVolume=function(){return cast.framework.CastReceiverContext.getInstance().getSystemVolume().level||null};_.t.setVolume=function(a){0<=a&&1>=a&&cast.framework.CastReceiverContext.getInstance().setSystemVolumeLevel(a)};_.t.setMuted=function(a){cast.framework.CastReceiverContext.getInstance().setSystemVolumeMuted(a)};
89
- _.t.isMuted=function(){return cast.framework.CastReceiverContext.getInstance().getSystemVolume().muted||null};_.t.getLoadedSource=function(){var a=QN().getMediaInformation();if(a){var b=QN().getPlaybackConfig();b=!!b&&b.protectionSystem!==cast.framework.ContentProtection.NONE;var c=this.A&&-1!==this.m?this.A[this.m]:null;c=c?c.name:void 0;!c&&a.metadata&&(c=a.metadata.title);return{url:a.contentId,type:a.contentType,Tl:b,name:c}}return null};_.t.getDrmInfo=function(){return null};
90
- _.t.getPresentationStartTime=function(){return QN().getStartAbsoluteTime()};_.t.getSeekRange=function(){var a={start:0,end:this.getDuration()};if(this.isLive()){var b=QN().getLiveSeekableRange();b&&typeof b.start===_.k&&typeof b.end===_.k&&(a={start:b.start,end:b.end})}return a};_.t.getState=function(){return this.a?this.a.getState():_.Km};
91
- _.t.getStats=function(){var a=_.Am();if(this.f){a=QN().getStats();this.f.f=a.estimatedBandwidth||NaN;this.f.o=a.streamBandwidth||NaN;var b=this.f,c=a.height||NaN;b.w=a.width||NaN;b.g=c;b=this.f;c=typeof a.decodedFrames===_.k?a.decodedFrames:NaN;b.m=typeof a.droppedFrames===_.k?a.droppedFrames:NaN;b.j=c;a=this.f.getStats()}return a};_.t.isLive=function(){return Infinity===this.getDuration()};
92
- _.t.load=function(a){var b=this,c,d;return _.B(function(e){b.f=new _.zm;b.a.m=b.f.a;b.A=_.an(a);_.fk(a)&&(b.g=_.ek(b.w,a));if(b.D)return b.D=!1,e["return"]();c=b.A[b.m];d=new cast.framework.messages.LoadRequestData;d.autoplay=b.g.autoplay;typeof b.g.startTime===_.k&&(d.currentTime=b.g.startTime);c.type&&(d.media.contentType=c.type);d.media.contentId=c.url;d.media.customData={playerConfiguration:HM(b.g),local:!0};return _.x(e,QN().load(d),0)})};_.t.getBufferInfo=function(){this.h.warn(_.na);return new _.Vj};
93
- _.t.getTrackManager=function(){return this.j};_.t.getConfiguration=function(){return this.g};_.t.getSurface=function(){return this.B};_.t.setNetworkEngine=function(a){this.F=a};_.t.getNetworkEngine=function(){return this.F};_.t.getSourceIndex=function(){return this.m};_.t.setSourceIndex=function(a){this.m=a};_.t.getPeriods=function(){return[]};_.t.namespace=function(){return BM};_.t.getTimelineCues=function(){return this.o&&this.o.getTimelineCues()||[]};_.t.resetAbr=function(){this.h.warn(xM)};
94
- _.t.onError=function(a){this.trigger(new _.J(_.hd,{detail:a}))};_.t.canPlay=function(){return _.bj()?2:0};
95
- _.t.vk=function(a){a=Object.assign({},a);a.customData||(a.customData={});a.customData.stats=HM(this.getStats());var b=QN(),c=a.media||b.getMediaInformation();b=b.getStartAbsoluteTime();c&&typeof b===_.k&&c.startAbsoluteTime!==b&&(this.h.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&&
96
- (!e||e&&f)){d=QN().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};_.t.qh=function(a,b){var c=null;a.media.customData&&(c=IM(a.media.customData.playerConfiguration));var d=c?c.abr:null;d&&typeof d.defaultBandwidthEstimate===_.k?b.initialBandwidth=d.defaultBandwidthEstimate:b.initialBandwidth=void 0;TN(c,b);return b};
97
- _.t.getTextDisplayer=function(){return null};_.t.setDrmCustomDataModifier=function(){};_.t.setCdnErrorCallback=function(){};_.t.detach=function(){};PN.prototype.getTextDisplayer=PN.prototype.getTextDisplayer;PN.prototype.getNetworkEngine=PN.prototype.getNetworkEngine;PN.prototype.setNetworkEngine=PN.prototype.setNetworkEngine;_.t=UN.prototype;_.t.init=function(a){var b=this;a&&(this.f=new PN,_.io(a,this.f),this.l=a,this.o.on(window,"unload",function(){return _.B(function(c){return b.l&&b.l.getState()!==_.Em?_.x(c,FM(b.l),0):c.G(0)})}))};
98
- _.t.start=function(){if(!this.a&&window.cast&&cast.framework&&cast.framework.CastReceiverContext){this.a=!0;var a=XN(),b=XN().getPlayerManager(),c=new cast.framework.CastReceiverOptions;c.customNamespaces={};c.customNamespaces[DM]=cast.framework.system.MessageType.JSON;c.shakaVersion="4.3.4";var d=new cast.framework.PlaybackConfig;d.manifestHandler=this.Oj.bind(this);d.shakaConfig={streaming:{ignoreTextStreamFailures:!0}};d.enableSmoothLiveRefresh=!0;c.playbackConfig=d;if(d=this.l&&this.l.getSurface().getMedia())c.mediaElement=
99
- d;c.disableIdleTimeout=!0;c.maxInactivity=Infinity;b.setMessageInterceptor(cast.framework.messages.MessageType.LOAD,this.Nj.bind(this));b.addEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.A);a.start(c);a.addCustomMessageListener(DM,this.w)}};
100
- _.t.stop=function(){if(this.a){this.a=!1;this.o.release();var a=XN();XN().getPlayerManager().removeEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.A);a.removeCustomMessageListener(DM,this.w);a.stop();this.l=this.f=null}};_.t.wd=function(a){this.j=a};_.t.gl=function(a){this.m=a};_.t.on=function(a,b){XN().addEventListener(a,b)};_.t.off=function(a,b){XN().removeEventListener(a,b)};_.t.addMessageListener=function(a){typeof a===_.jd&&this.g.add(a)};
101
- _.t.removeMessageListener=function(a){typeof a===_.jd&&this.g["delete"](a)};_.t.sendMessage=function(a,b){XN().sendCustomMessage(DM,b,HM(a))};_.t.gc=function(){return this.a};_.t.hb=function(){var a=XN().getPlayerManager().getMediaInformation();return a&&a.metadata?a.metadata:null};
102
- _.t.Oj=function(a){a=a.trim();if(a.startsWith("#EXTM3U"))return ZN(this,a);try{var b=(new DOMParser).parseFromString(a,_.Ce)}catch(r){return a}var c=b.getElementsByTagName("MPD")[0];if(c){a=c;this.h.debug("Detected DASH, parsing");b=XN();c=a.getElementsByTagName("Period");for(var d=c.length-1;0<=d;--d){for(var e=c[d].getElementsByTagName(_.fa),f=e.length-1;0<=f;--f){var g=e[f].getAttribute("contentType");if(g===_.Pe||g===_.jc){g=e[f].getAttribute(_.Bd);for(var h=e[f].getElementsByTagName(_.jb),l=
103
- h.length-1;0<=l;--l){var m=h[l].getAttribute(_.Bd)||g,n=h[l].getAttribute(_.Mc),p=h[l].getAttribute(_.df)||void 0,q=h[l].getAttribute(_.kd)||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(_.jb).length||c[d].removeChild(e[f])}}c[d].getElementsByTagName(_.fa).length||a.removeChild(c[d])}return(new XMLSerializer).serializeToString(a)}if(c=b.getElementsByTagName(_.rb)[0]){a=c;this.h.debug("Detected Smooth, parsing");b=XN();c=a.getElementsByTagName("StreamIndex");
104
- for(d=c.length-1;0<=d;--d)if(c[d].getAttribute("Type")===_.Pe){e=c[d].getElementsByTagName(_.gb);for(f=e.length-1;0<=f;--f)g=e[f].getAttribute(_.Ua)||void 0,h=e[f].getAttribute(_.Ta)||void 0,void 0!==g&&(g=+g),void 0!==h&&(h=+h),b.canDisplayType(_.Re,void 0,g,h)||c[d].removeChild(e[f]);c[d].getElementsByTagName(_.gb).length||a.removeChild(c[d])}a=(new XMLSerializer).serializeToString(a)}return a};
105
- _.t.Nj=function(a){var b=this,c,d,e,f,g,h;return _.B(function(l){switch(l.a){case 1:c=a;c.media.customData&&(d=IM(c.media.customData.playerConfiguration));if(!b.l||!d){l.G(2);break}if(!b.j){l.G(3);break}return _.x(l,Promise.resolve(b.j(d)),4);case 4:d=(e=l.f)||d;case 3:if(!d.ima){l.G(5);break}return _.x(l,DN(c.media,d.ima,b.l.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.G(7);
106
- break}b.f.D=!0;return _.x(l,_.mo(b.l,d),8);case 8:return _.x(l,_.no(b.l),9);case 9:f=b.l.getLoadedSource(),c.media.contentId=f.url,c.media.contentType=f.type,f.Hb&&(c.media.hlsVideoSegmentFormat=KM(f.Hb,_.si)),f.audioMimeType&&(c.media.hlsSegmentFormat=KM(f.audioMimeType,_.Q));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.l.getConfiguration().autoplay);case 2:if(!b.m){l.G(10);
107
- break}return _.x(l,Promise.resolve(b.m(c)),11);case 11:(h=l.f)&&(c=h);case 10:return l["return"](c)}})};_.t.sk=function(a){if(this.l&&(!a.media.customData||!a.media.customData.local)){a=_.K.Ej;var b=XN().getPlayerManager(),c=b.getLiveSeekableRange();if(c){var d=c.start;c=c.end;var e=this.l.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.l.seek(b))}_.po(this.l)}};
108
- _.t.Gh=function(a){if(0<this.g.size){var b=IM(a.data);this.g.forEach(function(c){return c(b)})}};_.C(CM,UN);UN.prototype.getContentMetadata=UN.prototype.hb;UN.prototype.isApiReady=UN.prototype.gc;UN.prototype.sendMessage=UN.prototype.sendMessage;UN.prototype.removeMessageListener=UN.prototype.removeMessageListener;UN.prototype.addMessageListener=UN.prototype.addMessageListener;UN.prototype.off=UN.prototype.off;UN.prototype.on=UN.prototype.on;UN.prototype.setLoadRequestDataInterceptor=UN.prototype.gl;
109
- UN.prototype.setPlayerConfigInterceptor=UN.prototype.wd;UN.prototype.stop=UN.prototype.stop;UN.prototype.start=UN.prototype.start;UN.prototype.init=UN.prototype.init;UN.getInstance=WN;var VN=null;_.t=$N.prototype;_.t.load=function(){var a=this,b,c,d,e,f;return _.B(function(g){a.a=a.f.m;if(a.a)for(b=a.a.controller,c=a.Ik.bind(a),d=_.u(a.j),e=d.next();!e.done;e=d.next())f=e.value,a.g.on(b,f,c);_.y(g)})};_.t.start=function(){return _.B(function(a){_.y(a)})};_.t.resume=function(){this.a&&this.a.isPlayingBreak&&this.a.isPaused&&this.a.controller.playOrPause()};_.t.pause=function(){this.a&&this.a.isPlayingBreak&&!this.a.isPaused&&this.a.controller.playOrPause()};
110
- _.t.skip=function(){var a=this.f.a;a&&this.f.sendMessage(EM,{type:"SKIP_AD",requestId:Math.round(1E3*Math.random()),mediaSessionId:a.mediaSessionId})};_.t.getVolume=function(){return this.f.getVolume()||0};_.t.setVolume=function(a){this.f.setVolume(a)};_.t.getPosition=function(){var a=-1,b=this.f.a;b&&(b=b.getEstimatedBreakClipTime(),typeof b===_.k&&(a=b));return a};_.t.dispose=function(){var a=this;return _.B(function(b){a.g.release();_.y(b)})};
111
- _.t.Ik=function(a){switch(a.field){case "mediaInfo":a.value&&(a=a.value,a.breaks&&this.f.trigger(new _.J(_.Wb,{adsTimeline:new yN(a.breaks)})));break;case "isPlayingBreak":a.value?bO(this,_.Fb):(bO(this,_.Jb),bO(this,_.Tb),bO(this,_.Gb));break;case "currentBreakClipNumber":0<=a.value&&(0<a.value&&(bO(this,_.Jb),bO(this,_.Tb)),bO(this,_.Sb));break;case "isPaused":this.a.isPlayingBreak&&(a.value?bO(this,_.Ob):bO(this,_.Qb))}};$N.prototype.getPosition=$N.prototype.getPosition;
112
- $N.prototype.setVolume=$N.prototype.setVolume;$N.prototype.getVolume=$N.prototype.getVolume;$N.prototype.skip=$N.prototype.skip;$N.prototype.pause=$N.prototype.pause;$N.prototype.resume=$N.prototype.resume;cO.prototype.name=function(){return"clpp.cast.ads.SenderAdsManagerFactory"};cO.prototype.ba=function(a,b){return a.namespace()!==_.Hc?!1:!(!b||!b.ima)};cO.prototype.create=function(a){return new $N(a.a)};cO.prototype.create=cO.prototype.create;cO.prototype.isSupported=cO.prototype.ba;cO.prototype.name=cO.prototype.name;_.qn(new cO);dO.prototype.name=function(){return"clpp.cast.ads.AdsManagerFactory"};dO.prototype.ba=function(a,b){return WN().gc()?!(!b||!b.ima):!1};dO.prototype.create=function(a){return new AN(a)};dO.prototype.create=dO.prototype.create;dO.prototype.isSupported=dO.prototype.ba;dO.prototype.name=dO.prototype.name;_.qn(new dO);};
2
+ var f=function(window){var VN="Cannot seek during ads playout.",WN="Cannot switch track",XN="Media session does not exist.",YN="No receivers available",ZN="Reset ABR functionality not available on cast.",$N="SDK not yet ready",aO="Sender is destroyed.",bO="clpp.cast.CastProxy",cO="clpp.cast.Player",dO="clpp.cast.Receiver",eO="urn:x-cast:castlabs",fO="urn:x-cast:com.google.cast.media",gO=function(a){return _.G(function(b){return 1==b.a?_.x(b,a.ic(_.ee),2):_.x(b,a.ic(_.de),0)})},hO=function(a,b){this.log=new _.K(b);this.player=
3
+ a;this.j=null;this.f=_.Jn;this.l=_.Kn;this.g=2;this.B=Date.now();this.A=-1},iO=function(a){return JSON.stringify(a,function(b,c){if("license"!==b&&typeof c!==_.Ad){if(c instanceof Event){var d={},e;for(e in c){var f=c[e];typeof f===_.ae?"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}})},jO=function(a){if(typeof a!==_.Ue)return a;try{return JSON.parse(a,function(b,c){return"NaN"===c?NaN:"-Infinity"===c?-Infinity:
4
+ "Infinity"===c?Infinity:c})}catch(b){return a}},kO=function(a,b,c,d){var e,f,g,h,l,m,n,p;return _.G(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=_.uj(d,a.mimeType,g);if(!f||!g)return q.G(2);l=_.Ai(a.url);return _.x(q,c.fetch(l).O,3)}2!=q.a&&(m=q.f)&&m.data&&(n=f.a(_.R(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)})},lO=function(a,b){if(window.chrome&&
5
+ 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 _.wf:return d.FMP4;case _.vf:return b===_.Wi?d.MPEG2_TS:c.TS;case _.sc:return c.AAC;case _.tc:return c.AC3;case _.uc:return c.E_AC3;case "audio/mpeg":return c.MP3;case _.vc:return c.FMP4}},nO=function(a){a=
6
+ void 0===a?mO:a;var b=cast.framework.messages||chrome.cast.media;if(!b)throw new _.N(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;case c.MUSIC_TRACK:return new g;case c.PHOTO:return new h;case c.AUDIOBOOK_CHAPTER:return new b;default:return new d}},oO=function(a){hO.call(this,a,"clpp.cast.SenderStateManager");
7
+ this.o=this.a=null;this.w=this.Db.bind(this)},pO=function(){this.h=new _.K("clpp.cast.SenderTrackManager");this.a=null;this.g=[];this.f={}},qO=function(a){return(a=a.a?a.a.a:null)?a.activeTrackIds.map(function(b){return b.toString()}):[]},sO=function(a,b){var c=qO(a);return rO(a,b).find(function(d){return c.includes(d.id)})||null},rO=function(a,b){return a.g.filter(function(c){return c.type===b})},uO=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.ra();
8
+ e&&c.push(+e.id)}c=new chrome.cast.media.EditTracksInfoRequest(c);d.editTracksInfo(c,function(){a.f[b]=null;tO(a,b)},function(f){a.f[b]=null;a.h.debug(WN,f)})}else b===_.S&&(c=new chrome.cast.media.EditTracksInfoRequest([]),d.editTracksInfo(c,function(){tO(a,b)},function(f){a.h.debug(WN,f)}))},tO=function(a,b){b===_.T?a.a.trigger(new _.L(_.tk)):b===_.S&&a.a.trigger(new _.L(_.uk))},yO=function(a,b,c,d){_.Ak.call(this);this.h=new _.K(_.Pc);this.ea=a;this.o=new _.zj(b);this.ca=c;this.ma=d;this.g=this.J=
9
+ _.Gk();this.D=[];this.B=0;this.M=new _.Ri;this.H=this.l=this.a=null;this.A=this.w=!1;this.na="";this.Ra=1E6;this.f=new pO;this.f.initialize(this);this.j=new oO(this);this.I=new _.Eg;this.K=null;this.F=new Set;this.T=this.xk.bind(this);this.Da=this.Qk.bind(this);this.ha=this.Hk.bind(this);this.V=this.Bk.bind(this);this.P=null;window.cast||Object.defineProperty(window,"cast",{get:function(){return window.cast_},set:function(e){window.cast_=e;window.setTimeout(function(){vO(!0)},0)}});wO(this);xO.add(this)},
10
+ zO=function(a){var b,c;return _.G(function(d){if(1==d.a)return xO["delete"](a),a.w&&(a.w=!1,b=cast.framework.CastContext.getInstance(),b.removeEventListener(cast.framework.CastContextEventType.CAST_STATE_CHANGED,a.T),b.removeEventListener(cast.framework.CastContextEventType.SESSION_STATE_CHANGED,a.Da)),c=[],a.f&&(c.push(a.f.destroy()),a.f=null),a.j&&(c.push(a.j.destroy()),a.j=null),_.x(d,Promise.all(c),2);a.A=!1;a.o&&(a.o.stop(),a.o=null);a.ca=null;a.ma=null;_.y(d)})},EO=function(a){if(!a)return null;
11
+ a:{var b=a.metadataType;var c=Object.entries(AO);c=_.u(c);for(var d=c.next();!d.done;d=c.next()){d=_.u(d.value);var e=d.next().value;if(d.next().value===b){b=e;break a}}b=null}if(!b)return null;b=nO(AO[b]);return Object.assign(b,a)},JO=function(a){var b=void 0===b?mO:b;return Object.values(AO).includes(a)?a:b},OO=function(a){var b={},c;for(c in a)void 0!==a[c]&&(b[c]=a[c]);return b},wO=function(a){if(!a.w&&window.chrome&&chrome.cast&&chrome.cast.isAvailable&&window.cast&&cast.framework&&cast.framework.CastContext&&
12
+ a.ea.length){a.w=!0;a.o.xf();var b=cast.framework.CastContext.getInstance(),c=new cast.framework.CastOptions;c.receiverApplicationId=a.ea;c.autoJoinPolicy=chrome.cast.AutoJoinPolicy.ORIGIN_SCOPED;b.setOptions(c);b.addEventListener(cast.framework.CastContextEventType.CAST_STATE_CHANGED,a.T);b.addEventListener(cast.framework.CastContextEventType.SESSION_STATE_CHANGED,a.Da);PO&&a.o.$(.02)}},QO=function(a){var b=a.getPosition();a.a&&a.a.media?(a=a.a.media.startAbsoluteTime,a=typeof a!==_.k?null:a):a=
13
+ null;a=null===a?null:a+b;return null===a?b:a},SO=function(a,b){RO(a,b.getMediaSession());b.addEventListener(cast.framework.SessionEventType.MEDIA_SESSION,a.ha);b.addMessageListener(eO,a.V)},RO=function(a,b){a.a=b;a.a&&(a.I.release(),a.H=null,a.l=null,a.l=new cast.framework.RemotePlayer,a.H=new cast.framework.RemotePlayerController(a.l),a.I.on(a.H,cast.framework.RemotePlayerEventType.CURRENT_TIME_CHANGED,a.Rh.bind(a)),a.f&&a.f.load(),a.j&&a.j.init(),a.trigger(new _.L(_.Od)))},TO=function(a){return _.G(function(b){return a.lb()?
14
+ b.G(0):_.x(b,cast.framework.CastContext.getInstance().requestSession(),0)})},UO=function(a,b){var c,d,e,f,g,h,l,m,n,p,q,t,v,z,A,C,F;return _.G(function(E){switch(E.a){case 1:return c=chrome.cast.media.StreamType,d=_.Fr,_.x(E,TO(a),2);case 2:if(!b)return E["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.Gb;m=h.audioMimeType;g.hlsVideoSegmentFormat=lO(l,d.VIDEO);
15
+ g.hlsSegmentFormat=lO(m,d.AUDIO);if(!b.Ua){E.G(3);break}if(!a.P){E.G(4);break}return _.x(E,Promise.resolve(a.P(b.Ua)),5);case 5:if(n=E.f)b.Ua=n;case 4:a.g=b.Ua;a.D=_.ao(a.g);a.B=a.D.findIndex(function(H){return H.url===b.source.url});if(!b.Ua.remoteTextTracks){E.G(6);break}return _.x(E,Promise.all(b.Ua.remoteTextTracks.map(a.$i.bind(a))),7);case 7:p=E.f,g.tracks=p.filter(function(H){return H}),b.Ua.remoteTextTracks=void 0;case 6:delete b.Ua.autoplay,b.Ua.startTime=null,g.customData={playerConfiguration:iO(b.Ua)};
16
+ case 3:q=a.gb()||{};t=JO(q.metadataType);typeof b.nf===_.k&&(v={metadataType:t,sectionStartAbsoluteTime:b.nf});b.source.name&&(z={metadataType:t,title:b.source.name});A=OO(q);if(C=EO(Object.assign({},v,z,A)))g.metadata=C;F=new chrome.cast.media.LoadRequest(g);typeof b.autoplay===_.zc&&(F.autoplay=b.autoplay);typeof b.currentTime===_.k&&(F.currentTime=b.currentTime);return _.x(E,f.loadMedia(F),0)}})},VO=function(a,b,c){c=void 0===c?0:c;var d,e;return _.G(function(f){(d=a.f.ra())&&d.language&&(a.g.preferredTextLanguage=
17
+ d.language);(e=a.f.qa())&&e.language&&(a.g.preferredAudioLanguage=e.language);return _.x(f,UO(a,{source:a.getLoadedSource(),currentTime:c,isLive:a.isLive(),nf:a.getPresentationStartTime(),autoplay:b,Ua:a.g}),0)})},vO=function(a){if(a){a=_.u(xO);for(var b=a.next();!b.done;b=a.next())wO(b.value)}},XO=function(a,b,c){_.Ak.call(this);var d=this;this.f=a;this.g=b;this.j=typeof c===_.Ad?c:function(e,f){d.f&&e!==_.Qn&&e!==_.Jn&&d.f.load(f)};this.a=WO(this);this.h=new _.K(bO);this.addDelegate(this.f)},WO=
18
+ function(a){return new yO(a.g,function(){a.trigger(new _.L(_.Fc))},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.If&&(d.preferredAudioLanguage=c.If);c.ph&&(d.preferredTextLanguage=c.ph);_.hp(a.f,null);a.trigger(new _.L("castingended"));a.j(b,d)},function(){return YO(a)})},YO=function(a){var b;return _.G(function(c){if(1==c.a)return a.trigger(new _.L(_.Ec)),
19
+ b=a.f.a,b!==a.a&&a.f&&a.a?_.x(c,a.f.release(),2):c["return"]();_.hp(a.f,a.a);_.y(c)})},ZO=function(a){hO.call(this,a,"clpp.cast.StateManager");this.I=this.Vh.bind(this);this.H=this.Uh.bind(this);this.w=this.Dk.bind(this);this.o=this.wk.bind(this);this.K=this.Xh.bind(this);this.J=this.Wh.bind(this);this.M=this.Tk.bind(this);this.F=this.Gk.bind(this);this.D=this.U.bind(this);this.a=this.Th.bind(this)},$O=function(a,b,c,d,e){this.a=a;this.f=b;this.j=typeof c===_.k?c:1;this.l=typeof d===_.k?d:1;this.g=
20
+ typeof e===_.k?e:0},aP=function(a){this.a=a},cP=function(a){this.m=a;this.a=null;this.g=this.Yh.bind(this);this.f=[cast.framework.events.EventType.PLAYER_LOADING,cast.framework.events.EventType.BREAK_CLIP_LOADING,cast.framework.events.EventType.BREAK_STARTED,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];
21
+ bP().addEventListener(this.f,this.g)},fP=function(a,b,c){var d,e,f,g,h,l,m;return _.G(function(n){if(1==n.a){d=b.adTagUrl;if(!d)return n["return"]();_.B(n,2);dP=!1;e=_.Ai(d);return _.x(n,c.fetch(e).O,4)}if(2!=n.a){if((f=n.f)&&f.data)if(g=_.Yh(f.data),h=new DOMParser,l=h.parseFromString(g,_.bf),l.getElementsByTagName("vmap:VMAP").length)_.J("VMAP detected."),a.vmapAdsRequest=eP(g);else if(l.getElementsByTagName("VAST").length){_.J("VAST detected.");var p=new cast.framework.messages.BreakClip("bc1");
22
+ p.vastAdsRequest=eP(g);var q=new cast.framework.messages.Break("b1",[p.id],0);a.breakClips=[p];a.breaks=[q]}else _.J("Unsupported schema."),dP=!0;return _.ag(n,0)}m=_.D(n);_.J("Failed to fetch an ad",m);dP=!0;_.y(n)})},eP=function(a){var b=new cast.framework.messages.VastAdsRequest;b.adsResponse=a;return b},bP=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},hP=function(a,b,c){if(c instanceof cast.framework.events.BreaksEvent||-1!==a.getPosition()){var d=null;
23
+ (c=gP(a,c))&&(d={ad:c});a.m.trigger(new _.L(b,d))}},iP=function(a,b){var c=new _.N(1,10,10003,{errorType:b});a.m.onError(c)},gP=function(a,b){var c=null;if(a.a&&b instanceof cast.framework.events.BreaksEvent){var d=null,e=null,f;typeof b.breakClipId===_.Ue&&(d=a.a.getBreakClipById(b.breakClipId));typeof b.breakId===_.Ue&&(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,
24
+ h){return g.position-h.position}).findIndex(function(g){return g===e})));c=new $O(d,e,b.index,b.total,f)}return c},jP=function(a){this.Wb=a;this.a=this.f.bind(this)},kP=function(){return[cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,cast.framework.events.EventType.TIMED_METADATA_CHANGED,cast.framework.events.EventType.TIMED_METADATA_ENTER,cast.framework.events.EventType.TIMED_METADATA_EXIT]},lP=function(a){var b=a.dashTimedMetadata,c=_.kf;b&&(c=b.schemeIdUri);return{type:c.startsWith(_.jf)?
25
+ _.Og:_.Mg,schemeIdUri:c,id:a.id||"",startTime:a.startTime,endTime:a.endTime,value:b&&b.value||"",eventElement:b&&b.eventElement}},mP=function(){this.h=new _.K("clpp.cast.TrackManager");this.m=null;this.o=1E9;this.g=[];this.j=[];this.l=this.kl.bind(this);this.a=this.f=null},nP=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},pP=function(a){a.a=nP().getTextTracksManager();var b=a.a.getTracks();a.j=oP(_.S,b)},qP=function(a,b,c,d){c=_.Tg(c).filter(function(h){return h});
26
+ var e=!1,f=[];b===_.T?f=a.getAudioTracks():b===_.S&&(f=a.ia());if(c=c.find(function(h){var l=_.Jh(h);return f.some(function(m){m=_.Jh(m.language||"");return _.Kh(l,m)})})){var g=_.Jh(c);c=f.filter(function(h){h=_.Jh(h.language||"");return _.Kh(g,h)});f=c.length?c:f;e=e||!!c.length}_.gi(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.h.info("Will select track",e),b===_.T?a.xa(e):b===_.S&&a.Ia(e))},oP=function(a,b){for(var c=[],d=_.u(b),e=
27
+ d.next();!e.done;e=d.next()){e=e.value;var f=new _.Ui(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||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 _.bj(f.id,f));c.push(f)}return c},rP=function(){_.Ak.call(this);this.h=new _.K(cO);this.g=this.w=_.Gk();this.A=null;this.l=
28
+ -1;this.F=new _.Ri;this.f=this.o=this.j=this.a=this.B=null;this.D=!1},sP=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},vP=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=_.el(d);if(e){var f=[_.Zc];_.ao(a)[0].type!==_.pc&&f.unshift(_.ad);d.preferredDrmSystem===_.Zc&&f.reverse();for(var g,h;f.length&&!h;)g=f.shift(),h=e.Va[g];
29
+ h?(d=g===_.ad?cast.framework.ContentProtection.WIDEVINE:g===_.Zc?cast.framework.ContentProtection.PLAYREADY:void 0,b.protectionSystem=d,b.licenseUrl=h.licenseUrl,d={ldlDelay:0,customData:{}},tP(b,h,a,d),uP(b,h,a,d)):c()}else c()}else c()},tP=function(a,b,c,d){b.modifiers.licenseRequest?a.licenseRequestHandler=function(e){var f=_.Ai({method:"POST",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];
30
+ e.headers=f.headers;e.content=f.body;e.withCredentials=f.allowCrossSiteCredentials}:a.licenseRequestHandler=void 0},uP=function(a,b,c,d){b.modifiers.licenseResponse?a.licenseHandler=function(e,f){var g;return _.G(function(h){return 1==h.a?(g=_.Bi(Object.assign({},f.headers),e.buffer,200,""),_.x(h,b.modifiers.licenseResponse(c,g,d),2)):h["return"](_.R(g.data))})}:a.licenseHandler=void 0},wP=function(){this.a=!1;this.h=new _.K(dO);this.f=this.m=null;this.g=new Set;this.A=this.Fk.bind(this);this.w=this.Sh.bind(this);
31
+ this.j=null;this.o=new _.Eg;this.l=null},yP=function(){return xP||(xP=new wP)},zP=function(){return cast.framework.CastReceiverContext.getInstance()},BP=function(a,b){a.h.debug("Detected HLS, parsing");var c=cast.framework.messages.HlsVideoSegmentFormat,d=zP();c=(zP().getPlayerManager().getMediaInformation()||{}).hlsVideoSegmentFormat===c.FMP4?_.wf:_.vf;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=
32
+ AP(h,_.pa),m=AP(h,_.nb),n=_.u([]),p=n.next().value;n=n.next().value;m&&(m=_.u(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")},AP=function(a,b){b+="\x3d";var c=a.indexOf(b);if(0<=c){var d=a.substring(c+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},CP=function(a){this.f=a;this.a=null;this.g=new _.Eg;this.j=
33
+ [cast.framework.RemotePlayerEventType.IS_PLAYING_BREAK_CHANGED,cast.framework.RemotePlayerEventType.CURRENT_BREAK_CLIP_NUMBER_CHANGED,cast.framework.RemotePlayerEventType.MEDIA_INFO_CHANGED,cast.framework.RemotePlayerEventType.IS_PAUSED_CHANGED]},EP=function(a,b){var c=null,d=DP(a);d&&(c={ad:d});a.f.trigger(new _.L(b,c))},DP=function(a){var b=null;if(a.a&&a.a.mediaInfo){b=a.a.mediaInfo;var c=null,d=null,e=a.a.currentBreakClipNumber;if(b.breaks&&(c=b.breaks.find(function(h){return h.id===a.a.breakId})||
34
+ null)){var f=c.breakClipIds.length;var g=0>=c.position?c.position:b.breaks.filter(function(h){return 0<=h.position}).sort(function(h,l){return h.position-l.position}).findIndex(function(h){return h===c})}b.breakClips&&(d=b.breakClips.find(function(h){return h.id===a.a.breakClipId})||null);b=new $O(d,c,e,f,g)}return b},FP=function(){},GP=function(){};_.r=hO.prototype;_.r.release=function(){this.oa(_.Jn)};_.r.destroy=function(){this.j=this.player=null;return Promise.resolve()};_.r.getState=function(){return this.f};
35
+ _.r.onError=function(a){a.severity===_.O&&this.oa(_.Un)};
36
+ _.r.oa=function(a){if(a!==this.f)if(this.f===_.Un&&a!==_.Jn)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;this.f===_.On?(this.A=b,this.player.trigger(new _.L(_.Bc,{detail:{bufferedTimeMS:-1,reason:this.g}}))):this.l===_.On&&this.player.trigger(new _.L(_.Ac,{detail:{bufferedTimeMS:b-this.A,reason:this.g}}));a={currentState:this.f,previousState:this.l,timeSinceLastStateChangeMS:b-this.B};this.B=b;this.j&&_.zn(this.j,this.f);this.player.trigger(new _.L(_.Re,
37
+ {detail:a}))}};_.I("clpp.cast.CastUtils",function(){});var mO=0,AO={GENERIC:mO,MOVIE:1,TV_SHOW:2,MUSIC_TRACK:3,PHOTO:4,AUDIOBOOK_CHAPTER:5};_.w(oO,hO);oO.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.l)};oO.prototype.destroy=function(){var a=this;return _.G(function(b){a.a&&(a.a.removeUpdateListener(a.w),a.a=null);return _.x(b,hO.prototype.destroy.call(a),0)})};oO.prototype.oa=function(a){var b=this.player.l;b&&b.isPlayingBreak||hO.prototype.oa.call(this,a)};
38
+ oO.prototype.Db=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.oa(_.Qn);break;case chrome.cast.media.IdleReason.ERROR:this.oa(_.Un);break;default:this.oa(_.Jn)}break;case chrome.cast.media.PlayerState.PLAYING:this.oa(_.Xn);break;case chrome.cast.media.PlayerState.PAUSED:this.oa(_.Wn);break;case chrome.cast.media.PlayerState.BUFFERING:this.oa(_.On)}};_.w(pO,_.U);_.r=pO.prototype;_.r.initialize=function(a){this.a=a};_.r.release=function(){this.g=[];this.f={}};
39
+ _.r.load=function(){this.release();var a=this.a.a;a&&(a=a.media)&&(this.g=(a=a.tracks)?a.map(function(b){switch(b.type){case chrome.cast.media.TrackType.VIDEO:var c=_.Wi;break;case chrome.cast.media.TrackType.AUDIO:c=_.T;break;case chrome.cast.media.TrackType.TEXT:c=_.S}c=new _.Ui(b.trackId.toString(),c);c.kind=b.subtype;c.language=b.language;c.label=b.name;c.src=b.trackContentId;c.mimeType=b.trackContentType;b.customData&&(c.src=b.customData.url||c.src,c.mimeType=b.customData.mimeType||c.mimeType);
40
+ c.renditions.push(new _.bj(c.id,c));return c}):[],this.a.trigger(new _.L(_.Ir)))};_.r.destroy=function(){this.a=null};_.r.getVideoTracks=function(){return rO(this,_.Wi)};_.r.getAudioTracks=function(){return rO(this,_.T)};_.r.ia=function(){return rO(this,_.S)};_.r.ga=function(){var a=this.Oa();return a?a.renditions[0]:null};_.r.La=function(){var a=this.qa();return a?a.renditions[0]:null};_.r.Ma=function(){var a=this.ra();return a?a.renditions[0]:null};_.r.Ya=function(){return this.f[_.Wi]||null};
41
+ _.r.hb=function(){return this.f[_.T]||null};_.r.ib=function(){return this.f[_.S]||null};_.r.Oa=function(){return sO(this,_.Wi)};_.r.qa=function(){return sO(this,_.T)};_.r.ra=function(){return sO(this,_.S)};_.r.cb=function(a){uO(this,_.Wi,a)};_.r.xa=function(a){uO(this,_.T,a)};_.r.Ia=function(a){uO(this,_.S,a)};_.r.bb=function(a){this.cb(a&&a.track)};_.r.ob=function(a){this.xa(a&&a.track)};_.r.pb=function(a){this.Ia(a&&a.track)};_.r.addTextTrack=function(){return _.G(function(a){_.y(a)})};_.r.ka=function(){return!0};
42
+ pO.prototype.isAbrEnabled=pO.prototype.ka;pO.prototype.addTextTrack=pO.prototype.addTextTrack;pO.prototype.setTextRendition=pO.prototype.pb;pO.prototype.setAudioRendition=pO.prototype.ob;pO.prototype.setVideoRendition=pO.prototype.bb;pO.prototype.setTextTrack=pO.prototype.Ia;pO.prototype.setAudioTrack=pO.prototype.xa;pO.prototype.setVideoTrack=pO.prototype.cb;pO.prototype.getTextTrack=pO.prototype.ra;pO.prototype.getAudioTrack=pO.prototype.qa;pO.prototype.getVideoTrack=pO.prototype.Oa;
43
+ pO.prototype.getLoadingTextRendition=pO.prototype.ib;pO.prototype.getLoadingAudioRendition=pO.prototype.hb;pO.prototype.getLoadingVideoRendition=pO.prototype.Ya;pO.prototype.getTextRendition=pO.prototype.Ma;pO.prototype.getAudioRendition=pO.prototype.La;pO.prototype.getVideoRendition=pO.prototype.ga;pO.prototype.getTextTracks=pO.prototype.ia;pO.prototype.getAudioTracks=pO.prototype.getAudioTracks;pO.prototype.getVideoTracks=pO.prototype.getVideoTracks;_.w(yO,_.Ak);_.r=yO.prototype;_.r.init=function(a,b){this.g=this.J=b};_.r.unload=function(){var a=this;return new Promise(function(b,c){a.f&&a.f.release();a.a&&!a.a.idleReason||b();a.a.stop(null,b,c)})};_.r.release=function(){var a=this;return this.unload().then(function(){a.j&&a.j.release()})};_.r.destroy=function(){return _.G(function(a){_.y(a)})};_.r.wd=function(a){this.P=a};_.r.ec=function(){return this.w};_.r.lb=function(){return this.A};_.r.Ne=function(){return this.na};
44
+ _.r.sendMessage=function(a,b){var c=this,d,e,f;return _.G(function(g){switch(g.a){case 1:e=cast.framework.CastContext.getInstance().getCurrentSession();if(!e){d=new _.N(1,8,8004,void 0);g.G(2);break}_.B(g,3);return _.x(g,e.sendMessage(a,iO(b)),5);case 5:_.ag(g,2);break;case 3:f=_.D(g),d=new _.N(1,8,8E3,{detailedErrorCode:f});case 2:if(d)c.onError(d);_.y(g)}})};
45
+ _.r.cast=function(){var a=this,b,c;return _.G(function(d){if(1==d.a){if(!a.ec())throw a.h.warn($N),new _.N(1,8,8001,void 0);if(!PO)throw a.h.warn(YN),new _.N(1,8,8002,void 0);if(a.lb())throw a.h.warn("Already casting"),new _.N(1,8,8003,void 0);_.B(d,2);return _.x(d,TO(a),4)}if(2!=d.a)return _.ag(d,0);b=_.D(d);c={};b instanceof chrome.cast.Error?(c.detailedErrorCode=b.code,c.details=b.details,c.reason=b.description):c.detailedErrorCode=b;throw new _.N(1,8,8E3,c);})};_.r.Je=function(){this.lb()&&cast.framework.CastContext.getInstance().endCurrentSession(!0)};
46
+ _.r.addMessageListener=function(a){typeof a===_.Ad&&this.F.add(a)};_.r.removeMessageListener=function(a){typeof a===_.Ad&&this.F["delete"](a)};_.r.play=function(){var a=this;return this.isEnded()?VO(this,!0):new Promise(function(b,c){if(!a.a)return c(XN);a.a.play(null,b,c)})};_.r.pause=function(){var a=this;return new Promise(function(b,c){a.isEnded()&&b();if(!a.a)return c(XN);a.a.pause(null,b,c)})};_.r.isPaused=function(){return!!this.a&&this.a.playerState===chrome.cast.media.PlayerState.PAUSED};
47
+ _.r.isEnded=function(){return this.getState()===_.Qn};_.r.seek=function(a){var b=this;return this.isEnded()?VO(this,!1,a):new Promise(function(c,d){b.a||d(XN);b.l.isPlayingBreak&&d(VN);var e=new chrome.cast.media.SeekRequest;e.currentTime=a;b.trigger(new _.L(_.mf));b.a.seek(e,function(){b.trigger(new _.L(_.lf));c()},d)})};_.r.getPosition=function(){return this.a&&this.a.getEstimatedTime()||0};
48
+ _.r.getDuration=function(){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.a&&this.a.playbackRate||0};_.r.setPlaybackRate=function(a){this.a&&0<a&&this.sendMessage(fO,{type:"SET_PLAYBACK_RATE",requestId:Math.round(1E3*Math.random()),mediaSessionId:this.a.mediaSessionId,playbackRate:a})};
49
+ _.r.getVolume=function(){return this.a&&this.a.volume.level};_.r.setVolume=function(a){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.a&&this.a.volume.muted};_.r.setMuted=function(a){this.a&&(a=new chrome.cast.media.VolumeRequest(new chrome.cast.Volume(void 0,a)),this.a.setVolume(a))};
50
+ _.r.getPresentationStartTime=function(){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};_.r.getSeekRange=function(){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.j?this.j.getState():_.Kn};
51
+ _.r.getStats=function(){return this.a&&this.a.customData&&this.a.customData.stats?jO(this.a.customData.stats):_.Fn()};_.r.isLive=function(){return Infinity===this.getDuration()};_.r.load=function(a){var b=this,c,d;return _.G(function(e){if(!b.ec())return b.h.warn($N),e["return"]();if(!PO)return b.h.warn(YN),e["return"]();b.D=_.ao(a);_.Jk(a)&&(b.g=_.Ik(b.J,a));c=b.D[b.B];d={source:c,isLive:c.isLive,autoplay:b.g.autoplay,Ua:b.g,Gb:c.Gb,audioMimeType:c.audioMimeType};return _.x(e,UO(b,d),0)})};
52
+ _.r.getBufferInfo=function(){return new _.zk};_.r.getTrackManager=function(){return this.f};_.r.getConfiguration=function(){return this.g};_.r.getSurface=function(){return null};_.r.setNetworkEngine=function(a){this.M=a};_.r.getNetworkEngine=function(){return this.M};_.r.getSourceIndex=function(){return this.B};_.r.setSourceIndex=function(a){this.B=a};_.r.getLoadedSource=function(){return this.D[this.B]};_.r.getPeriods=function(){return[]};_.r.getDrmInfo=function(){return null};
53
+ _.r.getTimelineCues=function(){return[]};_.r.resetAbr=function(){this.h.warn(ZN)};_.r.onError=function(a){if(a&&(this.trigger(new _.L(_.yd,{detail:a})),this.j))this.j.onError(a)};_.r.namespace=function(){return _.Pc};_.r.canPlay=function(){return this.ec()?2:0};_.r.gb=function(){return this.K};_.r.kc=function(a){this.K=EO(a)};_.r.Be=function(){this.K=null};_.r.tf=function(a){var b=this.gb()||{};a={metadataType:JO(b.metadataType),title:a};this.kc(Object.assign({},b,a))};
54
+ _.r.rf=function(a){var b=this.gb()||{},c=JO(b.metadataType);a=new chrome.cast.Image(a);this.kc(Object.assign({},b,{metadataType:c,images:[a]}))};_.r.qf=function(a){var b=this.gb()||{};this.kc(Object.assign({},b,{metadataType:3,artist:a}))};_.r.sf=function(a){var b=this.gb()||{};a={metadataType:JO(b.metadataType),releaseDate:a};this.kc(Object.assign({},b,a))};
55
+ _.r.xk=function(a){var b=cast.framework.CastContext.getInstance(),c=a.castState===cast.framework.CastState.CONNECTED;PO=a.castState!==cast.framework.CastState.NO_DEVICES_AVAILABLE;this.na=c?b.getCurrentSession().getCastDevice().friendlyName:"";this.o.xf()};
56
+ _.r.Qk=function(a){this.h.debug("state: "+a.sessionState+", details:",a);switch(a.sessionState){case cast.framework.SessionState.SESSION_STARTED:this.A=!0;SO(this,a.session);break;case cast.framework.SessionState.SESSION_RESUMED:this.lb()||(this.A=!0,SO(this,a.session),this.ma());break;case cast.framework.SessionState.SESSION_ENDED:if(this.lb()&&this.a){var b=this.a.media,c=this.f.qa(),d=this.f.ra();c=c&&c.language||void 0;d=d&&d.language||void 0;this.ca(this.getState(),{source:{url:b.contentId,type:b.contentType,
57
+ isLive:this.isLive()},currentTime:QO(this),ph:d,If:c})}a.session.removeEventListener(cast.framework.SessionEventType.MEDIA_SESSION,this.ha);a.session.removeMessageListener(eO,this.V);this.A=!1;this.a=null;this.I.release();this.l=this.H=null}};_.r.Hk=function(a){this.h.debug("New media session",a.mediaSession);RO(this,a.mediaSession)};_.r.Bk=function(a,b){if(a===eO&&0<this.F.size){var c=jO(b);this.F.forEach(function(d){return d(c)})}};_.r.Rh=function(){this.trigger(new _.L(_.cf))};
58
+ _.r.$i=function(a){var b=this,c,d;return _.G(function(e){if(1==e.a)return c=null,_.x(e,kO(a,[_.af,_.oc],b.M,b.g),2);if(d=e.f)c=new chrome.cast.media.Track(b.Ra++,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};yO.prototype.getTextDisplayer=yO.prototype.getTextDisplayer;yO.prototype.getNetworkEngine=yO.prototype.getNetworkEngine;
59
+ yO.prototype.setNetworkEngine=yO.prototype.setNetworkEngine;var PO=!1,xO=new Set;window.__onGCastApiAvailable=vO;_.w(XO,_.Ak);_.r=XO.prototype;_.r.destroy=function(){var a=this;return _.G(function(b){if(1==b.a)return a.a?_.x(b,zO(a.a),3):b.G(2);2!=b.a&&(a.a=null);a.removeDelegate(a.f);_.y(b)})};_.r.ye=function(){return!!this.a&&this.a.ec()&&PO};_.r.lb=function(){return!!this.a&&this.a.lb()};_.r.Ne=function(){return this.a?this.a.Ne():""};_.r.wd=function(a){this.a&&this.a.wd(a)};
60
+ _.r.cast=function(a){var b=this,c,d,e;return _.G(function(f){switch(f.a){case 1:if(!b.a)return f["return"]();_.B(f,2);return _.x(f,b.a.cast(),4);case 4:if(!b.f||!b.a)return f["return"]();var g=null,h=b.f.getLoadedSource();if(h){var l=b.f.getTrackManager();g=l.getVideoTracks()[0];if(g&&g.mimeType)var m=g.mimeType;g=b.f.getConfiguration();var n=l.qa();if(n){if(n.mimeType)var p=n.mimeType;n.language&&(g.preferredAudioLanguage=n.language);n.roles.length&&(g.preferredAudioRole=n.roles[0])}if(l=l.ra())l.language&&
61
+ (g.preferredTextLanguage=l.language),l.roles.length&&(g.preferredTextRole=l.roles[0]);l=h&&typeof h.isLive===_.zc?h.isLive:b.f.isLive();g={source:h,isLive:l,autoplay:!b.f.isPaused(),currentTime:Math.max(b.f.getPosition()-1,0),nf:b.f.getPresentationStartTime(),Gb:m,audioMimeType:p,Ua:g}}c=g;return _.x(f,YO(b),5);case 5:if(!b.a)return f["return"]();c&&(c.autoplay=!b.f.isPaused());if(a)return _.x(f,b.f.load(a),7);if(b.a.a){f.G(7);break}return _.x(f,UO(b.a,c),7);case 7:_.ag(f,0);break;case 2:d=_.D(f),
62
+ b.h.error("Error while trying to cast",d),e=new _.L(_.yd,{detail:d}),b.trigger(e),_.y(f)}})};_.r.Je=function(){this.a&&this.a.Je()};_.r.Nh=function(a){var b=this;return _.G(function(c){if(1==c.a){if(a===b.g)return c["return"]();b.g=a;return b.a?_.x(c,zO(b.a),2):c.G(2)}b.a=WO(b);_.y(c)})};_.r.sendMessage=function(a){var b=this;return _.G(function(c){return b.a?_.x(c,b.a.sendMessage(eO,a),0):(b.h.warn(aO),c["return"]())})};_.r.addMessageListener=function(a){this.a?this.a.addMessageListener(a):this.h.warn(aO)};
63
+ _.r.removeMessageListener=function(a){this.a?this.a.removeMessageListener(a):this.h.warn(aO)};_.r.gb=function(){return this.a&&this.a.gb()};_.r.kc=function(a){this.a&&this.a.kc(a)};_.r.Be=function(){this.a&&this.a.Be()};_.r.tf=function(a){this.a&&this.a.tf(a)};_.r.rf=function(a){this.a&&this.a.rf(a)};_.r.qf=function(a){this.a&&this.a.qf(a)};_.r.sf=function(a){this.a&&this.a.sf(a)};_.I(bO,XO);XO.prototype.setContentReleaseDate=XO.prototype.sf;XO.prototype.setContentArtist=XO.prototype.qf;
64
+ XO.prototype.setContentImage=XO.prototype.rf;XO.prototype.setContentTitle=XO.prototype.tf;XO.prototype.clearContentMetadata=XO.prototype.Be;XO.prototype.setContentMetadata=XO.prototype.kc;XO.prototype.getContentMetadata=XO.prototype.gb;XO.prototype.removeMessageListener=XO.prototype.removeMessageListener;XO.prototype.addMessageListener=XO.prototype.addMessageListener;XO.prototype.sendMessage=XO.prototype.sendMessage;XO.prototype.changeReceiverId=XO.prototype.Nh;XO.prototype.forceDisconnect=XO.prototype.Je;
65
+ XO.prototype.cast=XO.prototype.cast;XO.prototype.setPlayerConfigInterceptor=XO.prototype.wd;XO.prototype.getReceiverName=XO.prototype.Ne;XO.prototype.isCasting=XO.prototype.lb;XO.prototype.canCast=XO.prototype.ye;XO.prototype.destroy=XO.prototype.destroy;_.w(ZO,hO);_.r=ZO.prototype;
66
+ _.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.M);b.addEventListener(a.PLAYER_LOADING,this.F);b.addEventListener(a.ERROR,this.D);b.addEventListener(a.BITRATE_CHANGED,this.a)};
67
+ _.r.destroy=function(){var a=this,b,c;return _.G(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.M);c.removeEventListener(b.PLAYER_LOADING,a.F);c.removeEventListener(b.ERROR,
68
+ a.D);c.removeEventListener(b.BITRATE_CHANGED,a.a);return _.x(d,hO.prototype.destroy.call(a),0)})};_.r.Vh=function(){this.player.trigger(new _.L(_.oe));this.oa(_.Xn)};_.r.Uh=function(){this.oa(_.Wn)};_.r.Dk=function(){this.oa(_.Qn)};_.r.wk=function(a){a.isBuffering?this.oa(_.On):(a=this.player.isPaused()?_.Wn:_.Xn,this.oa(a))};_.r.Xh=function(){this.g=1;this.player.trigger(new _.L(_.mf))};_.r.Wh=function(){this.player.trigger(new _.L(_.lf))};_.r.Tk=function(){this.g=2};_.r.Gk=function(){this.oa(_.Vn)};
69
+ _.r.Th=function(a){var b=this.player.getStats();this.player.trigger(new _.L(_.yc,{detail:{bandwidth:a.totalBitrate,width:b.width,height:b.height}}))};_.r.U=function(a){a=new _.N(_.O,7,7300,{detailedErrorCode:a.detailedErrorCode,error:a.error,reason:a.reason});this.player.trigger(new _.L(_.yd,{detail:a}));this.oa(_.Un)};_.r=$O.prototype;_.r.ub=function(){return"Google Cast Framework"};_.r.vb=function(){return cast.framework.VERSION};_.r.Ab=function(){return 0};_.r.getId=function(){return""};_.r.getCreativeId=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};
70
+ _.r.getSkipTimeOffset=function(){return this.a.whenSkippable||0};_.r.gc=function(){return!1};_.r.Lb=function(){return this.a.clickThroughUrl||null};_.r.getMediaUrl=function(){return this.a.contentUrl||this.a.contentId||null};_.r.xb=function(){return 0};_.r.wb=function(){return 0};_.r.jb=function(){return 0};_.r.Za=function(){switch(this.Mb()){case 0:return 0;case -1:return 2;default:return 1}};_.r.getPodIndex=function(){return this.g};_.r.Mb=function(){return this.f.position};_.r.Nb=function(){return this.j};
71
+ _.r.zb=function(){return this.l};_.r.getWrapperAdIds=function(){return[]};_.r.getWrapperAdSystems=function(){return[]};_.r.getWrapperCreativeIds=function(){return[]};$O.prototype.getWrapperCreativeIds=$O.prototype.getWrapperCreativeIds;$O.prototype.getWrapperAdSystems=$O.prototype.getWrapperAdSystems;$O.prototype.getWrapperAdIds=$O.prototype.getWrapperAdIds;$O.prototype.getSequenceLength=$O.prototype.zb;$O.prototype.getPositionInSequence=$O.prototype.Nb;$O.prototype.getPodTimeOffset=$O.prototype.Mb;
72
+ $O.prototype.getPodIndex=$O.prototype.getPodIndex;$O.prototype.getPodType=$O.prototype.Za;$O.prototype.getMediaBitrate=$O.prototype.jb;$O.prototype.getMediaHeight=$O.prototype.wb;$O.prototype.getMediaWidth=$O.prototype.xb;$O.prototype.getMediaUrl=$O.prototype.getMediaUrl;$O.prototype.getClickThroughUrl=$O.prototype.Lb;$O.prototype.isBumper=$O.prototype.gc;$O.prototype.getSkipTimeOffset=$O.prototype.getSkipTimeOffset;$O.prototype.getDuration=$O.prototype.getDuration;$O.prototype.getTitle=$O.prototype.getTitle;
73
+ $O.prototype.getAdvertiserName=$O.prototype.getAdvertiserName;$O.prototype.getAdSystem=$O.prototype.getAdSystem;$O.prototype.getApiFramework=$O.prototype.getApiFramework;$O.prototype.getCreativeId=$O.prototype.getCreativeId;$O.prototype.getId=$O.prototype.getId;$O.prototype.getTechnology=$O.prototype.Ab;$O.prototype.getAdManagerVersion=$O.prototype.vb;$O.prototype.getAdManagerName=$O.prototype.ub;aP.prototype.getCuePoints=function(){return this.a.map(function(a){return a.position})};aP.prototype.Ob=function(){return!!this.a.find(function(a){return 0===a.position})};aP.prototype.kb=function(){return!!this.a.find(function(a){return-1===a.position})};aP.prototype.hasPostroll=aP.prototype.kb;aP.prototype.hasPreroll=aP.prototype.Ob;aP.prototype.getCuePoints=aP.prototype.getCuePoints;_.r=cP.prototype;_.r.load=function(){var a=this;return _.G(function(b){dP&&(dP=!1,iP(a,0));_.y(b)})};_.r.start=function(){return _.G(function(a){bP().play();_.y(a)})};_.r.resume=function(){-1!==this.getPosition()&&bP().play()};_.r.pause=function(){-1!==this.getPosition()&&bP().pause()};_.r.skip=function(){};_.r.getVolume=function(){return this.m.getVolume()||0};_.r.setVolume=function(a){this.m.setVolume(a)};
74
+ _.r.getPosition=function(){var a=this.a&&this.a.getBreakClipCurrentTimeSec();return typeof a===_.k?a:-1};_.r.dispose=function(){var a=this;return _.G(function(b){bP().removeEventListener(a.f,a.g);_.y(b)})};
75
+ _.r.Yh=function(a){var b=cast.framework.events.EndedReason;switch(a.type){case cast.framework.events.EventType.PLAYER_LOADING:this.a=bP().getBreakManager();this.a.setPlayWatchedBreak(!0);a=this.a.getBreaks();this.m.trigger(new _.L(_.dc,{adsTimeline:new aP(a)}));break;case cast.framework.events.EventType.BREAK_CLIP_LOADING:hP(this,_.Tb,a);break;case cast.framework.events.EventType.BREAK_STARTED:hP(this,_.Mb,a);break;case cast.framework.events.EventType.BREAK_ENDED:hP(this,_.Nb,a);break;case cast.framework.events.EventType.BREAK_CLIP_STARTED:hP(this,
76
+ _.$b,a);break;case cast.framework.events.EventType.BREAK_CLIP_ENDED:a.endedReason===b.SKIPPED?(hP(this,_.Zb,a),hP(this,_.ac,a)):a.endedReason===b.STOPPED?hP(this,_.ac,a):a.endedReason===b.END_OF_STREAM?(hP(this,_.Qb,a),hP(this,_.ac,a)):a.endedReason===b.ERROR&&iP(this,1);break;case cast.framework.events.EventType.PLAYING:hP(this,_.Yb,a);break;case cast.framework.events.EventType.PAUSE:hP(this,_.Vb,a);break;case cast.framework.events.EventType.BUFFERING:a.isBuffering?hP(this,_.Ob,a):hP(this,_.Yb,a)}};
77
+ cP.prototype.getPosition=cP.prototype.getPosition;cP.prototype.setVolume=cP.prototype.setVolume;cP.prototype.getVolume=cP.prototype.getVolume;cP.prototype.skip=cP.prototype.skip;cP.prototype.pause=cP.prototype.pause;cP.prototype.resume=cP.prototype.resume;var dP=!1;jP.prototype.init=function(){cast.framework.CastReceiverContext.getInstance().getPlayerManager().addEventListener(kP(),this.a)};jP.prototype.release=function(){cast.framework.CastReceiverContext.getInstance().getPlayerManager().removeEventListener(kP(),this.a)};jP.prototype.getTimelineCues=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager().getTimedMetadata().map(function(a){return lP(a)})};
78
+ jP.prototype.f=function(a){if(a instanceof cast.framework.events.TimedMetadataEvent){var b=null;switch(a.type){case cast.framework.events.EventType.TIMED_METADATA_CHANGED:b=_.Pg;break;case cast.framework.events.EventType.TIMED_METADATA_ENTER:b=_.Rg;break;case cast.framework.events.EventType.TIMED_METADATA_EXIT:b=_.Sg}b&&this.Wb(new _.L(b,{detail:lP(a.timedMetadataInfo)}))}else for(a=_.u(this.getTimelineCues()),b=a.next();!b.done;b=a.next())this.Wb(new _.L(_.Pg,{detail:b.value}))};_.w(mP,_.U);_.r=mP.prototype;_.r.initialize=function(a){this.m=a;nP().addEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.l)};_.r.release=function(){this.g=[];this.j=[];this.a=this.f=null};_.r.load=function(){};_.r.destroy=function(){this.m=null;nP().removeEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.l)};_.r.getVideoTracks=function(){return[]};_.r.getAudioTracks=function(){return this.g};_.r.ia=function(){return this.j};_.r.ga=function(){return null};
79
+ _.r.La=function(){var a=this.qa();return a&&a.renditions[0]};_.r.Ma=function(){var a=this.ra();return a&&a.renditions[0]};_.r.Ya=function(){return null};_.r.hb=function(){return null};_.r.ib=function(){return null};_.r.Oa=function(){return null};_.r.qa=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};
80
+ _.r.ra=function(){var a=null;if(this.a){var b=this.a.getActiveIds()[0];typeof b===_.k&&(b=b.toString(),a=this.ia().find(function(c){return c.id===b})||null)}return a};_.r.cb=function(){this.h.warn("Video tracks unavailable on Cast")};_.r.xa=function(a){a&&this.f&&this.f.setActiveById(+a.id)};_.r.Ia=function(a){this.a&&(a?this.a.setActiveByIds([+a.id]):this.a.setActiveByIds([]))};_.r.bb=function(){this.h.warn("Video renditions unavailable on Cast")};_.r.ob=function(a){this.xa(a&&a.track)};
81
+ _.r.pb=function(a){this.Ia(a&&a.track)};
82
+ _.r.addTextTrack=function(a){var b=this,c,d,e;return _.G(function(f){if(1==f.a)return c=b.m.getConfiguration(),_.x(f,kO(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]),pP(b)}catch(g){throw b.h.warn("failed on track",
83
+ a),g;}}_.y(f)})};_.r.ka=function(){return!0};_.r.kl=function(){this.f=nP().getAudioTracksManager();var a=this.f.getTracks();this.g=oP(_.T,a);pP(this);a=this.m.getConfiguration();qP(this,_.T,a.preferredAudioLanguage,a.preferredAudioRole);qP(this,_.S,a.preferredTextLanguage,a.preferredTextRole)};mP.prototype.isAbrEnabled=mP.prototype.ka;mP.prototype.addTextTrack=mP.prototype.addTextTrack;mP.prototype.setTextRendition=mP.prototype.pb;mP.prototype.setAudioRendition=mP.prototype.ob;
84
+ mP.prototype.setVideoRendition=mP.prototype.bb;mP.prototype.setTextTrack=mP.prototype.Ia;mP.prototype.setAudioTrack=mP.prototype.xa;mP.prototype.setVideoTrack=mP.prototype.cb;mP.prototype.getTextTrack=mP.prototype.ra;mP.prototype.getAudioTrack=mP.prototype.qa;mP.prototype.getVideoTrack=mP.prototype.Oa;mP.prototype.getLoadingTextRendition=mP.prototype.ib;mP.prototype.getLoadingAudioRendition=mP.prototype.hb;mP.prototype.getLoadingVideoRendition=mP.prototype.Ya;mP.prototype.getTextRendition=mP.prototype.Ma;
85
+ mP.prototype.getAudioRendition=mP.prototype.La;mP.prototype.getVideoRendition=mP.prototype.ga;mP.prototype.getTextTracks=mP.prototype.ia;mP.prototype.getAudioTracks=mP.prototype.getAudioTracks;mP.prototype.getVideoTracks=mP.prototype.getVideoTracks;_.w(rP,_.Ak);_.r=rP.prototype;_.r.init=function(a,b){var c=this;this.B=a;b&&(this.g=this.w=b);var d=sP();d.setMessageInterceptor(cast.framework.messages.MessageType.MEDIA_STATUS,this.Ik.bind(this));d.setMediaPlaybackInfoHandler(this.Ch.bind(this));this.a=new ZO(this);this.a.init();this.j=new mP;this.j.initialize(this);this.o=new jP(function(e){return c.trigger(e)});this.o.init()};
86
+ _.r.unload=function(){var a=cast.framework.messages.PlayerState,b=sP();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 _.G(function(b){if(1==b.a)return a.B=null,a.w=_.Gk(),a.g=a.w,a.l=-1,a.A=null,a.a?_.x(b,a.a.destroy(),3):b.G(2);2!=b.a&&(a.a=null);a.j&&(a.j.destroy(),a.j=null);_.y(b)})};
87
+ _.r.play=function(){var a=sP();if(null!==a.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject("Cannot play during ads playout.");a.play();return Promise.resolve()};_.r.pause=function(){var a=sP();if(null!==a.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject("Cannot pause during ads playout.");a.pause();return Promise.resolve()};_.r.isPaused=function(){return sP().getPlayerState()===cast.framework.messages.PlayerState.PAUSED};
88
+ _.r.isEnded=function(){return sP().getPlayerState()===cast.framework.messages.PlayerState.IDLE};_.r.seek=function(a){var b=sP();if(null!==b.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject(VN);b.seek(a);return Promise.resolve()};_.r.getPosition=function(){return sP().getCurrentTimeSec()};_.r.getDuration=function(){var a=sP().getDurationSec();return typeof a===_.k?-1===a?Infinity:a:-1};_.r.getPlaybackRate=function(){return sP().getPlaybackRate()};
89
+ _.r.setPlaybackRate=function(a){if(0<a){var b=new cast.framework.messages.SetPlaybackRateRequestData;b.playbackRate=a;sP().sendLocalMediaRequest(b)}};_.r.getVolume=function(){return cast.framework.CastReceiverContext.getInstance().getSystemVolume().level||null};_.r.setVolume=function(a){0<=a&&1>=a&&cast.framework.CastReceiverContext.getInstance().setSystemVolumeLevel(a)};_.r.setMuted=function(a){cast.framework.CastReceiverContext.getInstance().setSystemVolumeMuted(a)};
90
+ _.r.isMuted=function(){return cast.framework.CastReceiverContext.getInstance().getSystemVolume().muted||null};_.r.getLoadedSource=function(){var a=sP().getMediaInformation();if(a){var b=sP().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,km:b,name:c}}return null};_.r.getDrmInfo=function(){return null};
91
+ _.r.getPresentationStartTime=function(){return sP().getStartAbsoluteTime()};_.r.getSeekRange=function(){var a={start:0,end:this.getDuration()};if(this.isLive()){var b=sP().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():_.Kn};
92
+ _.r.getStats=function(){var a=_.Fn();if(this.f){a=sP().getStats();this.f.f=a.estimatedBandwidth||NaN;this.f.o=a.streamBandwidth||NaN;var b=this.f,c=a.height||NaN;b.w=a.width||NaN;b.g=c;b=this.f;c=typeof a.decodedFrames===_.k?a.decodedFrames:NaN;b.l=typeof a.droppedFrames===_.k?a.droppedFrames:NaN;b.j=c;a=this.f.getStats()}return a};_.r.isLive=function(){return Infinity===this.getDuration()};
93
+ _.r.load=function(a){var b=this,c,d;return _.G(function(e){b.f=new _.En;b.a.j=b.f.a;b.A=_.ao(a);_.Jk(a)&&(b.g=_.Ik(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.g.autoplay;typeof b.g.startTime===_.k&&(d.currentTime=b.g.startTime);c.type&&(d.media.contentType=c.type);d.media.contentId=c.url;d.media.customData={playerConfiguration:iO(b.g),local:!0};return _.x(e,sP().load(d),0)})};_.r.getBufferInfo=function(){this.h.warn(_.ra);return new _.zk};
94
+ _.r.getTrackManager=function(){return this.j};_.r.getConfiguration=function(){return this.g};_.r.getSurface=function(){return this.B};_.r.setNetworkEngine=function(a){this.F=a};_.r.getNetworkEngine=function(){return this.F};_.r.getSourceIndex=function(){return this.l};_.r.setSourceIndex=function(a){this.l=a};_.r.getPeriods=function(){return[]};_.r.namespace=function(){return cO};_.r.getTimelineCues=function(){return this.o&&this.o.getTimelineCues()||[]};_.r.resetAbr=function(){this.h.warn(ZN)};
95
+ _.r.onError=function(a){this.trigger(new _.L(_.yd,{detail:a}))};_.r.canPlay=function(){return _.Hj()?2:0};
96
+ _.r.Ik=function(a){a=Object.assign({},a);a.customData||(a.customData={});a.customData.stats=iO(this.getStats());var b=sP(),c=a.media||b.getMediaInformation();b=b.getStartAbsoluteTime();c&&typeof b===_.k&&c.startAbsoluteTime!==b&&(this.h.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&&
97
+ (!e||e&&f)){d=sP().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};_.r.Ch=function(a,b){var c=null;a.media.customData&&(c=jO(a.media.customData.playerConfiguration));var d=c?c.abr:null;d&&typeof d.defaultBandwidthEstimate===_.k?b.initialBandwidth=d.defaultBandwidthEstimate:b.initialBandwidth=void 0;vP(c,b);return b};
98
+ _.r.getTextDisplayer=function(){return null};_.r.setDrmCustomDataModifier=function(){};_.r.setCdnErrorCallback=function(){};_.r.detach=function(){};rP.prototype.getTextDisplayer=rP.prototype.getTextDisplayer;rP.prototype.getNetworkEngine=rP.prototype.getNetworkEngine;rP.prototype.setNetworkEngine=rP.prototype.setNetworkEngine;_.r=wP.prototype;_.r.init=function(a){var b=this;a&&(this.f=new rP,_.hp(a,this.f),this.m=a,this.o.on(window,"unload",function(){return _.G(function(c){return b.m&&b.m.getState()!==_.Jn?_.x(c,gO(b.m),0):c.G(0)})}))};
99
+ _.r.start=function(){if(!this.a&&window.cast&&cast.framework&&cast.framework.CastReceiverContext){this.a=!0;var a=zP(),b=zP().getPlayerManager(),c=new cast.framework.CastReceiverOptions;c.customNamespaces={};c.customNamespaces[eO]=cast.framework.system.MessageType.JSON;c.shakaVersion="4.3.4";var d=new cast.framework.PlaybackConfig;d.manifestHandler=this.ak.bind(this);d.shakaConfig={streaming:{ignoreTextStreamFailures:!0}};d.enableSmoothLiveRefresh=!0;c.playbackConfig=d;if(d=this.m&&this.m.getSurface().getMedia())c.mediaElement=
100
+ d;c.disableIdleTimeout=!0;c.maxInactivity=Infinity;b.setMessageInterceptor(cast.framework.messages.MessageType.LOAD,this.$j.bind(this));b.addEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.A);a.start(c);a.addCustomMessageListener(eO,this.w)}};
101
+ _.r.stop=function(){if(this.a){this.a=!1;this.o.release();var a=zP();zP().getPlayerManager().removeEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.A);a.removeCustomMessageListener(eO,this.w);a.stop();this.m=this.f=null}};_.r.wd=function(a){this.j=a};_.r.zl=function(a){this.l=a};_.r.on=function(a,b){zP().addEventListener(a,b)};_.r.off=function(a,b){zP().removeEventListener(a,b)};_.r.addMessageListener=function(a){typeof a===_.Ad&&this.g.add(a)};
102
+ _.r.removeMessageListener=function(a){typeof a===_.Ad&&this.g["delete"](a)};_.r.sendMessage=function(a,b){zP().sendCustomMessage(eO,b,iO(a))};_.r.ec=function(){return this.a};_.r.gb=function(){var a=zP().getPlayerManager().getMediaInformation();return a&&a.metadata?a.metadata:null};
103
+ _.r.ak=function(a){a=a.trim();if(a.startsWith("#EXTM3U"))return BP(this,a);try{var b=(new DOMParser).parseFromString(a,_.bf)}catch(t){return a}var c=b.getElementsByTagName("MPD")[0];if(c){a=c;this.h.debug("Detected DASH, parsing");b=zP();c=a.getElementsByTagName("Period");for(var d=c.length-1;0<=d;--d){for(var e=c[d].getElementsByTagName(_.ha),f=e.length-1;0<=f;--f){var g=e[f].getAttribute("contentType");if(g===_.uf||g===_.rc){g=e[f].getAttribute(_.Ud);for(var h=e[f].getElementsByTagName(_.pb),l=
104
+ h.length-1;0<=l;--l){var m=h[l].getAttribute(_.Ud)||g,n=h[l].getAttribute(_.Vc),p=h[l].getAttribute(_.Jf)||void 0,q=h[l].getAttribute(_.Bd)||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(_.pb).length||c[d].removeChild(e[f])}}c[d].getElementsByTagName(_.ha).length||a.removeChild(c[d])}return(new XMLSerializer).serializeToString(a)}if(c=b.getElementsByTagName(_.xb)[0]){a=c;this.h.debug("Detected Smooth, parsing");b=zP();c=a.getElementsByTagName("StreamIndex");
105
+ for(d=c.length-1;0<=d;--d)if(c[d].getAttribute("Type")===_.uf){e=c[d].getElementsByTagName(_.mb);for(f=e.length-1;0<=f;--f)g=e[f].getAttribute(_.Ya)||void 0,h=e[f].getAttribute(_.Xa)||void 0,void 0!==g&&(g=+g),void 0!==h&&(h=+h),b.canDisplayType(_.wf,void 0,g,h)||c[d].removeChild(e[f]);c[d].getElementsByTagName(_.mb).length||a.removeChild(c[d])}a=(new XMLSerializer).serializeToString(a)}return a};
106
+ _.r.$j=function(a){var b=this,c,d,e,f,g,h;return _.G(function(l){switch(l.a){case 1:c=a;c.media.customData&&(d=jO(c.media.customData.playerConfiguration));if(!b.m||!d){l.G(2);break}if(!b.j){l.G(3);break}return _.x(l,Promise.resolve(b.j(d)),4);case 4:d=(e=l.f)||d;case 3:if(!d.ima){l.G(5);break}return _.x(l,fP(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.G(7);
107
+ break}b.f.D=!0;return _.x(l,_.np(b.m,d),8);case 8:return _.x(l,_.op(b.m),9);case 9:f=b.m.getLoadedSource(),c.media.contentId=f.url,c.media.contentType=f.type,f.Gb&&(c.media.hlsVideoSegmentFormat=lO(f.Gb,_.Wi)),f.audioMimeType&&(c.media.hlsSegmentFormat=lO(f.audioMimeType,_.T));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.l){l.G(10);
108
+ break}return _.x(l,Promise.resolve(b.l(c)),11);case 11:(h=l.f)&&(c=h);case 10:return l["return"](c)}})};_.r.Fk=function(a){if(this.m&&(!a.media.customData||!a.media.customData.local)){a=_.M.Sj;var b=zP().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))}_.kp(this.m)}};
109
+ _.r.Sh=function(a){if(0<this.g.size){var b=jO(a.data);this.g.forEach(function(c){return c(b)})}};_.I(dO,wP);wP.prototype.getContentMetadata=wP.prototype.gb;wP.prototype.isApiReady=wP.prototype.ec;wP.prototype.sendMessage=wP.prototype.sendMessage;wP.prototype.removeMessageListener=wP.prototype.removeMessageListener;wP.prototype.addMessageListener=wP.prototype.addMessageListener;wP.prototype.off=wP.prototype.off;wP.prototype.on=wP.prototype.on;wP.prototype.setLoadRequestDataInterceptor=wP.prototype.zl;
110
+ wP.prototype.setPlayerConfigInterceptor=wP.prototype.wd;wP.prototype.stop=wP.prototype.stop;wP.prototype.start=wP.prototype.start;wP.prototype.init=wP.prototype.init;wP.getInstance=yP;var xP=null;_.r=CP.prototype;_.r.load=function(){var a=this,b,c,d,e,f;return _.G(function(g){a.a=a.f.l;if(a.a)for(b=a.a.controller,c=a.Vk.bind(a),d=_.u(a.j),e=d.next();!e.done;e=d.next())f=e.value,a.g.on(b,f,c);_.y(g)})};_.r.start=function(){return _.G(function(a){_.y(a)})};_.r.resume=function(){this.a&&this.a.isPlayingBreak&&this.a.isPaused&&this.a.controller.playOrPause()};_.r.pause=function(){this.a&&this.a.isPlayingBreak&&!this.a.isPaused&&this.a.controller.playOrPause()};
111
+ _.r.skip=function(){var a=this.f.a;a&&this.f.sendMessage(fO,{type:"SKIP_AD",requestId:Math.round(1E3*Math.random()),mediaSessionId:a.mediaSessionId})};_.r.getVolume=function(){return this.f.getVolume()||0};_.r.setVolume=function(a){this.f.setVolume(a)};_.r.getPosition=function(){var a=-1,b=this.f.a;b&&(b=b.getEstimatedBreakClipTime(),typeof b===_.k&&(a=b));return a};_.r.dispose=function(){var a=this;return _.G(function(b){a.g.release();_.y(b)})};
112
+ _.r.Vk=function(a){switch(a.field){case "mediaInfo":a.value&&(a=a.value,a.breaks&&this.f.trigger(new _.L(_.dc,{adsTimeline:new aP(a.breaks)})));break;case "isPlayingBreak":a.value?EP(this,_.Mb):(EP(this,_.Qb),EP(this,_.ac),EP(this,_.Nb));break;case "currentBreakClipNumber":0<=a.value&&(0<a.value&&(EP(this,_.Qb),EP(this,_.ac)),EP(this,_.$b));break;case "isPaused":this.a.isPlayingBreak&&(a.value?EP(this,_.Vb):EP(this,_.Yb))}};CP.prototype.getPosition=CP.prototype.getPosition;
113
+ CP.prototype.setVolume=CP.prototype.setVolume;CP.prototype.getVolume=CP.prototype.getVolume;CP.prototype.skip=CP.prototype.skip;CP.prototype.pause=CP.prototype.pause;CP.prototype.resume=CP.prototype.resume;FP.prototype.name=function(){return"clpp.cast.ads.SenderAdsManagerFactory"};FP.prototype.aa=function(a,b){return a.namespace()!==_.Pc?!1:!(!b||!b.ima)};FP.prototype.create=function(a){return new CP(a.a)};FP.prototype.create=FP.prototype.create;FP.prototype.isSupported=FP.prototype.aa;FP.prototype.name=FP.prototype.name;_.qo(new FP);GP.prototype.name=function(){return"clpp.cast.ads.AdsManagerFactory"};GP.prototype.aa=function(a,b){return yP().ec()?!(!b||!b.ima):!1};GP.prototype.create=function(a){return new cP(a)};GP.prototype.create=GP.prototype.create;GP.prototype.isSupported=GP.prototype.aa;GP.prototype.name=GP.prototype.name;_.qo(new GP);};
113
114
  if(typeof(module)!="undefined"&&module.exports){var x=require("./cl.core.js");_ = x._;(f.call(g,this));module.exports=g;}
114
115
  else if (typeof(define)!="undefined"&&define.amd) {define(["./cl.core"], function(c){_=c._;(f.call(g,this));return g;});}
115
116
  else{_=this.clpp._;(f.call(g,this));}