@castlabs/prestoplay 6.16.1-beta.4 → 6.16.1-beta.6

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 (62) hide show
  1. package/cjs/cl.adobe.js +3 -3
  2. package/cjs/cl.airplay.js +3 -3
  3. package/cjs/cl.broadpeak.js +7 -7
  4. package/cjs/cl.cast.js +105 -105
  5. package/cjs/cl.conviva.js +33 -33
  6. package/cjs/cl.core.js +540 -539
  7. package/cjs/cl.crypto.js +9 -9
  8. package/cjs/cl.dash.js +74 -74
  9. package/cjs/cl.externs.js +56 -56
  10. package/cjs/cl.freewheel.js +21 -21
  11. package/cjs/cl.hls.js +68 -68
  12. package/cjs/cl.hlssmpte.js +6 -6
  13. package/cjs/cl.htmlcue.js +29 -29
  14. package/cjs/cl.ima.js +22 -22
  15. package/cjs/cl.mse.js +362 -362
  16. package/cjs/cl.muxdata.js +15 -15
  17. package/cjs/cl.onboard.js +3 -3
  18. package/cjs/cl.persistent.js +13 -13
  19. package/cjs/cl.playlist.js +6 -6
  20. package/cjs/cl.sessions.js +20 -0
  21. package/cjs/cl.simid.js +15 -15
  22. package/cjs/cl.smooth.js +72 -72
  23. package/cjs/cl.thumbnails.js +26 -26
  24. package/cjs/cl.tizen.js +70 -70
  25. package/cjs/cl.ttml.js +28 -28
  26. package/cjs/cl.verimatrix.js +5 -5
  27. package/cjs/cl.vimond.js +13 -13
  28. package/cjs/cl.vr.js +18 -18
  29. package/cjs/cl.vtt.js +14 -14
  30. package/cjs/cl.youbora.js +16 -16
  31. package/cl.adobe.js +3 -3
  32. package/cl.airplay.js +3 -3
  33. package/cl.broadpeak.js +5 -5
  34. package/cl.cast.js +82 -82
  35. package/cl.conviva.js +27 -27
  36. package/cl.core.js +442 -441
  37. package/cl.crypto.js +8 -8
  38. package/cl.dash.js +69 -69
  39. package/cl.externs.js +56 -56
  40. package/cl.freewheel.js +15 -15
  41. package/cl.hls.js +72 -72
  42. package/cl.hlssmpte.js +5 -5
  43. package/cl.htmlcue.js +26 -26
  44. package/cl.ima.js +15 -15
  45. package/cl.mse.js +313 -313
  46. package/cl.muxdata.js +13 -13
  47. package/cl.onboard.js +4 -4
  48. package/cl.persistent.js +10 -10
  49. package/cl.playlist.js +5 -5
  50. package/cl.sessions.js +10 -0
  51. package/cl.simid.js +13 -13
  52. package/cl.smooth.js +59 -59
  53. package/cl.thumbnails.js +19 -19
  54. package/cl.tizen.js +57 -57
  55. package/cl.ttml.js +22 -22
  56. package/cl.verimatrix.js +4 -4
  57. package/cl.vimond.js +8 -8
  58. package/cl.vr.js +14 -14
  59. package/cl.vtt.js +12 -12
  60. package/cl.youbora.js +13 -13
  61. package/package.json +1 -1
  62. package/typings.d.ts +21 -1
package/cjs/cl.adobe.js CHANGED
@@ -1,7 +1,7 @@
1
1
  (function(){var g={}; var _ = _ || {}
2
- var f=function(window){var GX=function(){this.m=this.f=null;this.a="";this.g=new _.K("clpp.adobe.AdobePlugin")},JX=function(a){a.f=new _.Uh;a.f.on(a.m,_.Bg,function(){return HX(a)});a.f.on(a.m,_.Ag,function(){s.Media.play(a.a,a.m.getPosition())});a.f.on(a.m,_.Ke,function(){return IX(a)});a.f.on(a.m,_.hg,function(b){b=b.detail;switch(b.currentState){case _.zp:a.a.length||IX(a);s.Media.play(a.a,a.m.getPosition());break;case _.yp:case _.qp:HX(a);break;case _.sp:case _.lp:case _.wp:a.g.info("Close session for "+a.a+" in player state "+
3
- (b.currentState+".")),HX(a),s.Media.close(a.a),a.a=""}})},IX=function(a){var b=a.m.getLoadedSource();a.a=b?b.name||b.url:"";a.g.info("Open session for "+a.a+" with duration "+a.m.getDuration());s.Media.open(a.a,a.m.getDuration(),_.wa)},HX=function(a){s.Media.stop(a.a,a.m.getPosition())},KX=function(){};_.x(GX,_.wu);GX.prototype.onPlayerCreated=function(a){window.s&&s.Media?(this.m=a,JX(this)):this.g.warn("Adobe API not available.")};
4
- GX.prototype.onPlayerWillDestroy=function(){this.f&&(this.f.release(),this.f=null);this.m=null;this.a=""};GX.prototype.id=function(){return"adobe"};_.J("clpp.adobe.AdobeAnalyticsPlugin",GX);GX.Id="adobe";KX.prototype.create=function(){return new GX};_.Xq(new KX);};
2
+ var f=function(window){var NY=function(){this.m=this.f=null;this.a="";this.g=new _.K("clpp.adobe.AdobePlugin")},QY=function(a){a.f=new _.Vh;a.f.on(a.m,_.Cg,function(){return OY(a)});a.f.on(a.m,_.Bg,function(){s.Media.play(a.a,a.m.getPosition())});a.f.on(a.m,_.Le,function(){return PY(a)});a.f.on(a.m,_.ig,function(b){b=b.detail;switch(b.currentState){case _.Ap:a.a.length||PY(a);s.Media.play(a.a,a.m.getPosition());break;case _.zp:case _.rp:OY(a);break;case _.tp:case _.mp:case _.xp:a.g.info("Close session for "+a.a+" in player state "+
3
+ (b.currentState+".")),OY(a),s.Media.close(a.a),a.a=""}})},PY=function(a){var b=a.m.getLoadedSource();a.a=b?b.name||b.url:"";a.g.info("Open session for "+a.a+" with duration "+a.m.getDuration());s.Media.open(a.a,a.m.getDuration(),_.wa)},OY=function(a){s.Media.stop(a.a,a.m.getPosition())},RY=function(){};_.x(NY,_.wu);NY.prototype.onPlayerCreated=function(a){window.s&&s.Media?(this.m=a,QY(this)):this.g.warn("Adobe API not available.")};
4
+ NY.prototype.onPlayerWillDestroy=function(){this.f&&(this.f.release(),this.f=null);this.m=null;this.a=""};NY.prototype.id=function(){return"adobe"};_.J("clpp.adobe.AdobeAnalyticsPlugin",NY);NY.Id="adobe";RY.prototype.create=function(){return new NY};_.Yq(new RY);};
5
5
  if(typeof(module)!="undefined"&&module.exports){var x=require("./cl.core.js");_ = x._;(f.call(g,this));module.exports=g;}
6
6
  else if (typeof(define)!="undefined"&&define.amd) {define(["./cl.core"], function(c){_=c._;(f.call(g,this));return g;});}
7
7
  else{_=this.clpp._;(f.call(g,this));}
package/cjs/cl.airplay.js CHANGED
@@ -1,7 +1,7 @@
1
1
  (function(){var g={}; var _ = _ || {}
2
- var f=function(window){var EX=function(){var a=this;this.a=this.m=null;this.l=this.f=this.j=!1;this.o=new _.Vk(function(){a.m.play()["catch"](function(){})});this.h=new _.Uh},FX=function(){};_.x(EX,_.wu);_.u=EX.prototype;_.u.onPlayerCreated=function(a){this.m=a;this.a=a.getSurface().getMedia()};_.u.onContentWillLoad=function(){this.a&&(this.h.on(this.a,"webkitplaybacktargetavailabilitychanged",this.km.bind(this)),this.h.on(this.a,"webkitcurrentplaybacktargetiswirelesschanged",this.Hm.bind(this)))};
3
- _.u.onPlayerWillRelease=function(){this.o.stop();this.h.release()};_.u.id=function(){return"airplay"};_.u.km=function(a){switch(a.availability){case "available":this.f=!0;break;case "not-available":this.f=!1}this.m.trigger(new _.L(_.Sc,{canCast:this.f}))};_.u.Hm=function(){var a=(this.j=this.a.webkitCurrentPlaybackTargetIsWireless)?_.Rc:_.Qc;if(this.l||!this.m.isPaused()||this.m.getState()===_.zp)this.l?this.m.play()["catch"](function(){}):this.o.fa(.01);this.m.trigger(new _.L(a))};_.u.Gb=function(){return this.j};
4
- _.u.yf=function(){return this.f};_.u.pn=function(){this.f&&(this.l=!this.m.isPaused(),this.a.webkitShowPlaybackTargetPicker())};_.J("clpp.airplay.AirPlayPlugin",EX);EX.prototype.showCastMenu=EX.prototype.pn;EX.prototype.canCast=EX.prototype.yf;EX.prototype.isCasting=EX.prototype.Gb;EX.Id="airplay";FX.prototype.create=function(){return new EX};_.Xq(new FX);};
2
+ var f=function(window){var LY=function(){var a=this;this.a=this.m=null;this.l=this.f=this.j=!1;this.o=new _.Wk(function(){a.m.play()["catch"](function(){})});this.h=new _.Vh},MY=function(){};_.x(LY,_.wu);_.u=LY.prototype;_.u.onPlayerCreated=function(a){this.m=a;this.a=a.getSurface().getMedia()};_.u.onContentWillLoad=function(){this.a&&(this.h.on(this.a,"webkitplaybacktargetavailabilitychanged",this.om.bind(this)),this.h.on(this.a,"webkitcurrentplaybacktargetiswirelesschanged",this.Nm.bind(this)))};
3
+ _.u.onPlayerWillRelease=function(){this.o.stop();this.h.release()};_.u.id=function(){return"airplay"};_.u.om=function(a){switch(a.availability){case "available":this.f=!0;break;case "not-available":this.f=!1}this.m.trigger(new _.L(_.Tc,{canCast:this.f}))};_.u.Nm=function(){var a=(this.j=this.a.webkitCurrentPlaybackTargetIsWireless)?_.Sc:_.Rc;if(this.l||!this.m.isPaused()||this.m.getState()===_.Ap)this.l?this.m.play()["catch"](function(){}):this.o.fa(.01);this.m.trigger(new _.L(a))};_.u.Gb=function(){return this.j};
4
+ _.u.Af=function(){return this.f};_.u.vn=function(){this.f&&(this.l=!this.m.isPaused(),this.a.webkitShowPlaybackTargetPicker())};_.J("clpp.airplay.AirPlayPlugin",LY);LY.prototype.showCastMenu=LY.prototype.vn;LY.prototype.canCast=LY.prototype.Af;LY.prototype.isCasting=LY.prototype.Gb;LY.Id="airplay";MY.prototype.create=function(){return new LY};_.Yq(new MY);};
5
5
  if(typeof(module)!="undefined"&&module.exports){var x=require("./cl.core.js");_ = x._;(f.call(g,this));module.exports=g;}
6
6
  else if (typeof(define)!="undefined"&&define.amd) {define(["./cl.core"], function(c){_=c._;(f.call(g,this));return g;});}
7
7
  else{_=this.clpp._;(f.call(g,this));}
@@ -1,11 +1,11 @@
1
1
  (function(){var g={}; var _ = _ || {}
2
- var f=function(window){var wX=function(a,b){this.m=a;this.f=b;this.a=new _.Uh;this.h=!1},xX=function(a){function b(c){var d=GenericPlayerApi.call(this)||this;d.m=c;d.a=_.Xj();return d}_.x(b,GenericPlayerApi);b.prototype.getPlayerName=function(){return _.wa};b.prototype.getVersion=function(){return _.ja};b.prototype.getOSName=function(){return this.a.os};b.prototype.getDeviceVersion=function(){return this.a.osVersion.name};b.prototype.getDeviceType=function(){return"browser"};b.prototype.getTotalDuration=function(){return this.m.isLive()?
3
- 0:1E3*this.m.getDuration()};b.prototype.getCurrentPosition=function(){return 1E3*this.m.getPosition()};b.prototype.getCurrentBitrate=function(){var c=this.m.getStats();return(c?c.streamBandwidth:0)/1E3};return new b(a)},yX=function(){this.l=this.f=this.a=this.h=this.m=null;this.o=new _.Uh;this.j=!1},zX=function(a,b){var c=b.analyticsAddress||null,d=b.nanoCDNHost||null,e=b.broadpeakDomainNames||"",f=b.uuid||null;a.h||(a.h=SmartLib.getInstance(),a.h.init(c,d,e),typeof f===_.kg&&a.h.setUUID(f))},AX=
4
- function(a,b){var c=b.customParameters||{};a.a=a.h.createStreamingSession();a.a.setOption(StreamingSessionOptions.SESSION_PRECACHE,!0);for(var d in c)a.a.setCustomParameter(d,c[d]);a.o.on(a.m,_.se,a.V.bind(a));a.l=xX(a.m);a.a.attachPlayer(a.l)},BX=function(a,b){_.Xh(a.o);a.f&&(a.f.release(),a.f=null);a.a&&(a.a.stopStreamingSession(b),a.a=null)},CX=function(){return!window.SmartLib||!window.GenericPlayerApi},DX=function(){};_.u=wX.prototype;
5
- _.u.init=function(){var a=this.m,b=this.a;b.on(a,_.hg,this.tj.bind(this));b.on(a,_.kd,this.rj.bind(this));b.on(a,"seek",this.sj.bind(this))};_.u.rj=function(a){a=a.detail;typeof a.bandwidth===_.k&&this.f.notifyLayerSwitch(a.bandwidth/1E3)};_.u.tj=function(a){var b=this.m,c=this.f;a=a.detail;var d=a.currentState;a.previousState===_.qp&&c.notifyStallEnd(!b.isPaused());switch(d){case _.qp:c.notifyStallStart();break;case _.zp:this.h?c.notifyResume():(c.notifyFirstImage(),this.h=!0);break;case _.yp:c.notifyPause()}};
6
- _.u.sj=function(){var a=1E3*this.m.getPosition();this.f.notifySeek(a)};_.u.release=function(){this.a&&(_.Xh(this.a),this.a=null)};_.x(yX,_.wu);_.u=yX.prototype;_.u.onPlayerCreated=function(a){this.m=a};_.u.onContentWillLoad=function(a,b){var c=this,d=a.getConfiguration().broadpeak;if(d){if(CX())return a.onError(new _.P(1,9,11E3));this.j=!0;zX(this,d);AX(this,d);return this.a.getURL(b.url).then(function(e){if(e.isError()){var f=e.getDetailedErrorCode();e=e.getDetailedErrorMessage();c.m.onError(new _.P(1,9,11001,{bpkErrorCode:f,message:e}));BX(c,void 0)}else b.url=e.getURL(),c.f=new wX(c.m,c.l),c.f.init()})}};
7
- _.u.onContentLoaded=function(){!1!==this.j&&this.a.precacheEnded()};_.u.V=function(a){a=a.detail;if(7003===a.code)BX(this,SmartLib.BPFormatNotSupportedError);else if(a.severity===_.Q)switch(a.category){case 3:BX(this,SmartLib.BPDecodingError);break;case 1:BX(this,SmartLib.BPNetworkingError);break;case 6:BX(this,SmartLib.BPAccessRightError);break;default:BX(this,SmartLib.BPUnspecifiedError)}};_.u.onPlayerWillRelease=function(){CX()||BX(this,SmartLib.BPSessionEndsNormally);this.j=!1};_.u.id=function(){return"broadpeak"};
8
- _.J("clpp.broadpeak.BroadpeakPlugin",yX);yX.isSdkMissing=CX;yX.Id="broadpeak";DX.prototype.create=function(){return new yX};_.Xq(new DX);};
2
+ var f=function(window){var DY=function(a,b){this.m=a;this.f=b;this.a=new _.Vh;this.h=!1},EY=function(a){function b(c){var d=GenericPlayerApi.call(this)||this;d.m=c;d.a=_.Yj();return d}_.x(b,GenericPlayerApi);b.prototype.getPlayerName=function(){return _.wa};b.prototype.getVersion=function(){return _.ja};b.prototype.getOSName=function(){return this.a.os};b.prototype.getDeviceVersion=function(){return this.a.osVersion.name};b.prototype.getDeviceType=function(){return"browser"};b.prototype.getTotalDuration=function(){return this.m.isLive()?
3
+ 0:1E3*this.m.getDuration()};b.prototype.getCurrentPosition=function(){return 1E3*this.m.getPosition()};b.prototype.getCurrentBitrate=function(){var c=this.m.getStats();return(c?c.streamBandwidth:0)/1E3};return new b(a)},FY=function(){this.l=this.f=this.a=this.h=this.m=null;this.o=new _.Vh;this.j=!1},GY=function(a,b){var c=b.analyticsAddress||null,d=b.nanoCDNHost||null,e=b.broadpeakDomainNames||"",f=b.uuid||null;a.h||(a.h=SmartLib.getInstance(),a.h.init(c,d,e),typeof f===_.lg&&a.h.setUUID(f))},HY=
4
+ function(a,b){var c=b.customParameters||{};a.a=a.h.createStreamingSession();a.a.setOption(StreamingSessionOptions.SESSION_PRECACHE,!0);for(var d in c)a.a.setCustomParameter(d,c[d]);a.o.on(a.m,_.te,a.U.bind(a));a.l=EY(a.m);a.a.attachPlayer(a.l)},IY=function(a,b){_.Yh(a.o);a.f&&(a.f.release(),a.f=null);a.a&&(a.a.stopStreamingSession(b),a.a=null)},JY=function(){return!window.SmartLib||!window.GenericPlayerApi},KY=function(){};_.u=DY.prototype;
5
+ _.u.init=function(){var a=this.m,b=this.a;b.on(a,_.ig,this.uj.bind(this));b.on(a,_.ld,this.sj.bind(this));b.on(a,"seek",this.tj.bind(this))};_.u.sj=function(a){a=a.detail;typeof a.bandwidth===_.k&&this.f.notifyLayerSwitch(a.bandwidth/1E3)};_.u.uj=function(a){var b=this.m,c=this.f;a=a.detail;var d=a.currentState;a.previousState===_.rp&&c.notifyStallEnd(!b.isPaused());switch(d){case _.rp:c.notifyStallStart();break;case _.Ap:this.h?c.notifyResume():(c.notifyFirstImage(),this.h=!0);break;case _.zp:c.notifyPause()}};
6
+ _.u.tj=function(){var a=1E3*this.m.getPosition();this.f.notifySeek(a)};_.u.release=function(){this.a&&(_.Yh(this.a),this.a=null)};_.x(FY,_.wu);_.u=FY.prototype;_.u.onPlayerCreated=function(a){this.m=a};_.u.onContentWillLoad=function(a,b){var c=this,d=a.getConfiguration().broadpeak;if(d){if(JY())return a.onError(new _.P(1,9,11E3));this.j=!0;GY(this,d);HY(this,d);return this.a.getURL(b.url).then(function(e){if(e.isError()){var f=e.getDetailedErrorCode();e=e.getDetailedErrorMessage();c.m.onError(new _.P(1,9,11001,{bpkErrorCode:f,message:e}));IY(c,void 0)}else b.url=e.getURL(),c.f=new DY(c.m,c.l),c.f.init()})}};
7
+ _.u.onContentLoaded=function(){!1!==this.j&&this.a.precacheEnded()};_.u.U=function(a){a=a.detail;if(7003===a.code)IY(this,SmartLib.BPFormatNotSupportedError);else if(a.severity===_.Q)switch(a.category){case 3:IY(this,SmartLib.BPDecodingError);break;case 1:IY(this,SmartLib.BPNetworkingError);break;case 6:IY(this,SmartLib.BPAccessRightError);break;default:IY(this,SmartLib.BPUnspecifiedError)}};_.u.onPlayerWillRelease=function(){JY()||IY(this,SmartLib.BPSessionEndsNormally);this.j=!1};_.u.id=function(){return"broadpeak"};
8
+ _.J("clpp.broadpeak.BroadpeakPlugin",FY);FY.isSdkMissing=JY;FY.Id="broadpeak";KY.prototype.create=function(){return new FY};_.Yq(new KY);};
9
9
  if(typeof(module)!="undefined"&&module.exports){var x=require("./cl.core.js");_ = x._;(f.call(g,this));module.exports=g;}
10
10
  else if (typeof(define)!="undefined"&&define.amd) {define(["./cl.core"], function(c){_=c._;(f.call(g,this));return g;});}
11
11
  else{_=this.clpp._;(f.call(g,this));}
package/cjs/cl.cast.js CHANGED
@@ -1,118 +1,118 @@
1
1
  (function(){var g={}; var _ = _ || {}
2
- var f=function(window){var KV="Cannot seek during ads playout.",LV="Cannot switch track",MV="Media session does not exist.",NV="No receivers available",OV="Reset ABR functionality not available on cast.",PV="SDK not yet ready",QV="Sender is destroyed.",RV="clpp.cast.CastProxy",SV="clpp.cast.Player",TV="clpp.cast.Receiver",UV="urn:x-cast:castlabs",VV="urn:x-cast:com.google.cast.media",WV=function(a){return _.I(function(b){return 1==b.a?_.y(b,a.Hc(_.bf),2):_.y(b,a.Hc(_.af),0)})},XV=function(a,b){this.log=new _.K(b);this.player=
3
- a;this.j=null;this.f=_.lp;this.l=_.mp;this.h=2;this.C=Date.now();this.A=-1},YV=function(a){return JSON.stringify(a,function(b,c){if("license"!==b&&typeof c!==_.ve){if(c instanceof Event){var d={},e;for(e in c){var f=c[e];typeof f===_.Ye?"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}})},ZV=function(a){if(typeof a!==_.kg)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}},$V=function(a,b,c,d){var e,f,g,h,l,m,n,p;return _.I(function(q){if(1==q.a){if(b.includes(a.mimeType))return q["return"](a);g=f=e=null;for(h=0;h<b.length&&!f;)g=b[h++],f=_.Ik(d,a.mimeType,g);if(!f||!g)return q.F(2);l=_.Jj(a.url);return _.y(q,c.fetch(l).N,3)}2!=q.a&&(m=q.f)&&m.data&&(n=f.a(_.lj(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)})},aW=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 _.Gg:return d.FMP4;case _.Fg:return b===_.hk?d.MPEG2_TS:c.TS;case _.cd:return c.AAC;case _.dd:return c.AC3;case _.ed:return c.E_AC3;case "audio/mpeg":return c.MP3;case _.gd:return c.FMP4}},cW=function(a){a=
6
- void 0===a?bW:a;var b=cast.framework.messages||chrome.cast.media;if(!b)throw new _.P(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}},dW=function(a){XV.call(this,a,"clpp.cast.SenderStateManager");
7
- this.o=this.a=null;this.w=this.tb.bind(this)},eW=function(){this.g=new _.K("clpp.cast.SenderTrackManager");this.a=null;this.h=[];this.f={}},fW=function(a){a=a.a?a.a.a:null;return(a?a.activeTrackIds||[]:[]).map(function(b){return b.toString()})},hW=function(a,b){var c=fW(a);return gW(a,b).find(function(d){return c.includes(d.id)})||null},gW=function(a,b){return a.h.filter(function(c){return c.type===b})},jW=function(a,b,c){var d=a.a.a;if(d)if(c){a.f[b]=c.renditions[0];c=[+c.id];if(b!==_.T){var e=a.Ea();
8
- e&&c.push(+e.id)}c=new chrome.cast.media.EditTracksInfoRequest(c);d.editTracksInfo(c,function(){a.f[b]=null;iW(a,b)},function(f){a.f[b]=null;a.g.debug(LV,f)})}else b===_.T&&(c=new chrome.cast.media.EditTracksInfoRequest([]),d.editTracksInfo(c,function(){iW(a,b)},function(f){a.g.debug(LV,f)}))},iW=function(a,b){b===_.gk?a.a.trigger(new _.L(_.Pl)):b===_.T&&a.a.trigger(new _.L(_.Ql))},nW=function(a,b,c,d){_.Wl.call(this);this.g=new _.K(_.Fd);this.ca=a;this.o=new _.Xk(b);this.ba=c;this.ja=d;this.h=this.J=
9
- _.bm();this.D=[];this.C=0;this.M=new _.ak;this.H=this.l=this.a=null;this.A=this.w=!1;this.na="";this.Wa=1E6;this.f=new eW;this.f.initialize(this);this.j=new dW(this);this.I=new _.Uh;this.L=null;this.G=new Set;this.T=this.mm.bind(this);this.Pa=this.Cm.bind(this);this.ia=this.um.bind(this);this.W=this.qm.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(){kW(!0)},0)}});lW(this);mW.add(this)},
10
- oW=function(a){var b,c;return _.I(function(d){if(1==d.a)return mW["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.Pa)),c=[],a.f&&(c.push(a.f.destroy()),a.f=null),a.j&&(c.push(a.j.destroy()),a.j=null),_.y(d,Promise.all(c),2);a.A=!1;a.o&&(a.o.stop(),a.o=null);a.ba=null;a.ja=null;_.C(d)})},tW=function(a){if(!a)return null;
11
- a:{var b=a.metadataType;var c=Object.entries(pW);c=_.w(c);for(var d=c.next();!d.done;d=c.next()){d=_.w(d.value);var e=d.next().value;if(d.next().value===b){b=e;break a}}b=null}if(!b)return null;b=cW(pW[b]);return Object.assign(b,a)},yW=function(a){var b=void 0===b?bW:b;return Object.values(pW).includes(a)?a:b},DW=function(a){var b={},c;for(c in a)void 0!==a[c]&&(b[c]=a[c]);return b},lW=function(a){if(!a.w&&window.chrome&&chrome.cast&&chrome.cast.isAvailable&&window.cast&&cast.framework&&cast.framework.CastContext&&
12
- a.ca.length){a.w=!0;a.o.xg();var b=cast.framework.CastContext.getInstance(),c=new cast.framework.CastOptions;c.receiverApplicationId=a.ca;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.Pa);EW&&a.o.fa(.02)}},FW=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},HW=function(a,b){GW(a,b.getMediaSession());b.addEventListener(cast.framework.SessionEventType.MEDIA_SESSION,a.ia);b.addMessageListener(UV,a.W)},GW=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.uj.bind(a)),a.f&&a.f.load(),a.j&&a.j.init(),a.trigger(new _.L(_.Ke)))},IW=function(a){return _.I(function(b){return a.Gb()?
14
- b.F(0):_.y(b,cast.framework.CastContext.getInstance().requestSession(),0)})},JW=function(a,b){var c,d,e,f,g,h,l,m,n,p,q,t,v,z,B,F,G;return _.I(function(A){switch(A.a){case 1:return c=chrome.cast.media.StreamType,d=_.Pu,_.y(A,IW(a),2);case 2:if(!b)return A["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.Wb;m=h.audioMimeType;g.hlsVideoSegmentFormat=aW(l,d.VIDEO);
15
- g.hlsSegmentFormat=aW(m,d.AUDIO);if(!b.kb){A.F(3);break}if(!a.P){A.F(4);break}return _.y(A,Promise.resolve(a.P(b.kb)),5);case 5:if(n=A.f)b.kb=n;case 4:a.h=b.kb;a.D=_.Dp(a.h);a.C=a.D.findIndex(function(H){return H.url===b.source.url});if(!b.kb.remoteTextTracks){A.F(6);break}return _.y(A,Promise.all(b.kb.remoteTextTracks.map(a.Fk.bind(a))),7);case 7:p=A.f,g.tracks=p.filter(function(H){return H}),b.kb.remoteTextTracks=void 0;case 6:delete b.kb.autoplay,b.kb.startTime=null,g.customData={playerConfiguration:YV(b.kb)};
16
- case 3:q=a.Ab()||{};t=yW(q.metadataType);typeof b.kg===_.k&&(v={metadataType:t,sectionStartAbsoluteTime:b.kg});b.source.name&&(z={metadataType:t,title:b.source.name});B=DW(q);if(F=tW(Object.assign({},v,z,B)))g.metadata=F;G=new chrome.cast.media.LoadRequest(g);typeof b.autoplay===_.ld&&(G.autoplay=b.autoplay);typeof b.currentTime===_.k&&(G.currentTime=b.currentTime);return _.y(A,f.loadMedia(G),0)}})},KW=function(a,b,c){c=void 0===c?0:c;var d,e;return _.I(function(f){(d=a.f.Ea())&&d.language&&(a.h.preferredTextLanguage=
17
- d.language);(e=a.f.pa())&&e.language&&(a.h.preferredAudioLanguage=e.language);return _.y(f,JW(a,{source:a.getLoadedSource(),currentTime:c,isLive:a.isLive(),kg:a.getPresentationStartTime(),autoplay:b,kb:a.h}),0)})},kW=function(a){if(a){a=_.w(mW);for(var b=a.next();!b.done;b=a.next())lW(b.value)}},MW=function(a,b,c){_.Wl.call(this);var d=this;this.f=a;this.h=b;this.j=typeof c===_.ve?c:function(e,f){d.f&&e!==_.sp&&e!==_.lp&&d.f.load(f)};this.a=LW(this);this.g=new _.K(RV);this.f&&this.forwardEventsTo(this.f)},
18
- LW=function(a){return new nW(a.h,function(){a.trigger(new _.L(_.sd))},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.Mg&&(d.preferredAudioLanguage=c.Mg);c.Ki&&(d.preferredTextLanguage=c.Ki);_.Jq(a.f,null);a.trigger(new _.L("castingended"));a.j(b,d)},function(){return NW(a)})},NW=function(a){var b;return _.I(function(c){if(1==c.a)return a.trigger(new _.L(_.rd)),
19
- b=a.f.a,b!==a.a&&a.f&&a.a?_.y(c,a.f.release(),2):c["return"]();_.Jq(a.f,a.a);_.C(c)})},OW=function(a){XV.call(this,a,"clpp.cast.StateManager");this.I=this.yj.bind(this);this.H=this.xj.bind(this);this.w=this.rm.bind(this);this.o=this.lm.bind(this);this.L=this.Aj.bind(this);this.J=this.zj.bind(this);this.M=this.Fm.bind(this);this.G=this.tm.bind(this);this.D=this.V.bind(this);this.a=this.wj.bind(this)},PW=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.h=
20
- typeof e===_.k?e:0},QW=function(a){this.a=a},SW=function(a){this.m=a;this.a=null;this.h=this.Bj.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
- RW().addEventListener(this.f,this.h)},VW=function(a,b,c){var d,e,f,g,h,l,m;return _.I(function(n){if(1==n.a){d=b.adTagUrl;if(!d)return n["return"]();_.D(n,2);TW=!1;e=_.Jj(d);return _.y(n,c.fetch(e).N,4)}if(2!=n.a){if((f=n.f)&&f.data)if(g=_.S.ea(f.data),h=new DOMParser,l=h.parseFromString(g,_.rg),l.getElementsByTagName("vmap:VMAP").length)_.Fh("VMAP detected."),a.vmapAdsRequest=UW(g);else if(l.getElementsByTagName("VAST").length){_.Fh("VAST detected.");var p=new cast.framework.messages.BreakClip("bc1");
22
- p.vastAdsRequest=UW(g);var q=new cast.framework.messages.Break("b1",[p.id],0);a.breakClips=[p];a.breaks=[q]}else _.Fh("Unsupported schema."),TW=!0;return _.qh(n,0)}m=_.E(n);_.Fh("Failed to fetch an ad",m);TW=!0;_.C(n)})},UW=function(a){var b=new cast.framework.messages.VastAdsRequest;b.adsResponse=a;return b},RW=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},XW=function(a,b,c){if(c instanceof cast.framework.events.BreaksEvent||-1!==a.getPosition()){var d=null;
23
- (c=WW(a,c))&&(d={ad:c});a.m.trigger(new _.L(b,d))}},YW=function(a,b){var c=new _.P(1,10,10003,{errorType:b});a.m.onError(c)},WW=function(a,b){var c=null;if(a.a&&b instanceof cast.framework.events.BreaksEvent){var d=null,e=null,f;typeof b.breakClipId===_.kg&&(d=a.a.getBreakClipById(b.breakClipId));typeof b.breakId===_.kg&&(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 PW(d,e,b.index,b.total,f)}return c},ZW=function(a){this.nc=a;this.a=this.f.bind(this)},$W=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]},aX=function(a){var b=a.dashTimedMetadata,c=_.zg;b&&(c=b.schemeIdUri);return{type:c.startsWith(_.yg)?
25
- _.ei:_.bi,schemeIdUri:c,id:a.id||"",startTime:a.startTime,endTime:a.endTime,value:b&&b.value||"",eventElement:b?b.eventElement:null}},bX=function(){this.g=new _.K("clpp.cast.TrackManager");this.m=null;this.o=1E9;this.h=[];this.j=[];this.l=this.Xm.bind(this);this.a=this.f=null},cX=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},eX=function(a){a.a=cX().getTextTracksManager();var b=a.a.getTracks();a.j=dX(_.T,b)},fX=function(a,b,c,d){c=_.ji(c).filter(function(h){return h});
26
- var e=!1,f=[];b===_.gk?f=a.getAudioTracks():b===_.T&&(f=a.ma());if(c=c.find(function(h){var l=_.dj(h);return f.some(function(m){m=_.dj(m.language||"");return _.ej(l,m)})})){var g=_.dj(c);c=f.filter(function(h){h=_.dj(h.language||"");return _.ej(g,h)});f=c.length?c:f;e=e||!!c.length}_.S.Te(d)&&(c=f.filter(function(h){return h.roles.includes(d)}),f=c.length?c:f,e=e||!!c.length);e&&f[0]&&(e=f[0],a.g.info("Will select track",e),b===_.gk?a.Ia(e):b===_.T&&a.Va(e))},dX=function(a,b){for(var c=[],d=_.w(b),
27
- e=d.next();!e.done;e=d.next()){e=e.value;var f=new _.ek(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 _.nk(f.id,f));c.push(f)}return c},gX=function(){_.Wl.call(this);this.g=new _.K(SV);this.h=this.w=_.bm();this.A=null;
28
- this.l=-1;this.G=new _.ak;this.f=this.o=this.j=this.a=this.C=null;this.D=!1},hX=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},kX=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=_.zm(d);if(e){var f=[_.Sd];_.Dp(a)[0].type!==_.$c&&f.unshift(_.Ud);d.preferredDrmSystem===_.Sd&&f.reverse();for(var g,h;f.length&&!h;)g=f.shift(),
29
- h=e.mb[g];h?(d=g===_.Ud?cast.framework.ContentProtection.WIDEVINE:g===_.Sd?cast.framework.ContentProtection.PLAYREADY:void 0,b.protectionSystem=d,b.licenseUrl=h.licenseUrl,d={ldlDelay:0,customData:{}},iX(b,h,a,d),jX(b,h,a,d)):c()}else c()}else c()},iX=function(a,b,c,d){b.modifiers.licenseRequest?a.licenseRequestHandler=function(e){var f=_.Jj({method:"POST",uris:[e.url]});e.headers&&(f.headers=e.headers);f.body=e.content;f.allowCrossSiteCredentials=e.withCredentials;b.modifiers.licenseRequest(c,f,
30
- d);e.url=f.uris[0];e.headers=f.headers;e.content=f.body;e.withCredentials=f.allowCrossSiteCredentials}:a.licenseRequestHandler=void 0},jX=function(a,b,c,d){b.modifiers.licenseResponse?a.licenseHandler=function(e,f){var g;return _.I(function(h){return 1==h.a?(g=_.Kj(Object.assign({},f.headers),e.buffer,200,""),_.y(h,b.modifiers.licenseResponse(c,g,d),2)):h["return"](_.lj(g.data))})}:a.licenseHandler=void 0},lX=function(){this.a=!1;this.g=new _.K(TV);this.f=this.m=null;this.h=new Set;this.A=this.sm.bind(this);
31
- this.w=this.vj.bind(this);this.j=null;this.o=new _.Uh;this.l=null},nX=function(){return mX||(mX=new lX)},oX=function(){return cast.framework.CastReceiverContext.getInstance()},qX=function(a,b){a.g.debug("Detected HLS, parsing");var c=cast.framework.messages.HlsVideoSegmentFormat,d=oX();c=(oX().getPlayerManager().getMediaInformation()||{}).hlsVideoSegmentFormat===c.FMP4?_.Gg:_.Fg;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
- pX(h,_.ta),m=pX(h,_.Tb),n=_.w([]),p=n.next().value;n=n.next().value;m&&(m=_.w(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")},pX=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},rX=function(a){this.f=a;this.a=null;this.h=new _.Uh;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]},tX=function(a,b){var c=null,d=sX(a);d&&(c={ad:d});a.f.trigger(new _.L(b,c))},sX=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 PW(d,c,e,f,g)}return b},uX=function(){},vX=function(){};_.u=XV.prototype;_.u.release=function(){this.Ca(_.lp)};_.u.destroy=function(){this.j=this.player=null;return Promise.resolve()};_.u.getState=function(){return this.f};
35
- _.u.onError=function(a){a.severity===_.Q&&this.Ca(_.wp)};
36
- _.u.Ca=function(a){if(a!==this.f)if(this.f===_.wp&&a!==_.lp)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===_.qp?(this.A=b,this.player.trigger(new _.L(_.nd,{detail:{bufferedTimeMS:-1,reason:this.h}}))):this.l===_.qp&&this.player.trigger(new _.L(_.md,{detail:{bufferedTimeMS:b-this.A,reason:this.h}}));a={currentState:this.f,previousState:this.l,timeSinceLastStateChangeMS:b-this.C};this.C=b;this.j&&_.bp(this.j,this.f);this.player.trigger(new _.L(_.hg,
37
- {detail:a}))}};_.J("clpp.cast.CastUtils",function(){});var bW=0,pW={GENERIC:bW,MOVIE:1,TV_SHOW:2,MUSIC_TRACK:3,PHOTO:4,AUDIOBOOK_CHAPTER:5};_.x(dW,XV);dW.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)};dW.prototype.destroy=function(){var a=this;return _.I(function(b){a.a&&(a.a.removeUpdateListener(a.w),a.a=null);return _.y(b,XV.prototype.destroy.call(a),0)})};dW.prototype.Ca=function(a){var b=this.player.l;b&&b.isPlayingBreak||XV.prototype.Ca.call(this,a)};
38
- dW.prototype.tb=function(){if(this.a&&this.o&&!this.o.isPlayingBreak)switch(this.a.playerState){case chrome.cast.media.PlayerState.IDLE:switch(this.a.idleReason){case chrome.cast.media.IdleReason.FINISHED:this.Ca(_.sp);break;case chrome.cast.media.IdleReason.ERROR:this.Ca(_.wp);break;default:this.Ca(_.lp)}break;case chrome.cast.media.PlayerState.PLAYING:this.Ca(_.zp);break;case chrome.cast.media.PlayerState.PAUSED:this.Ca(_.yp);break;case chrome.cast.media.PlayerState.BUFFERING:this.Ca(_.qp)}};_.x(eW,_.Kk);_.u=eW.prototype;_.u.initialize=function(a){this.a=a};_.u.release=function(){this.h=[];this.f={}};
39
- _.u.load=function(){this.release();var a=this.a.a;a&&(a=a.media)&&(this.h=(a=a.tracks)?a.map(function(b){switch(b.type){case chrome.cast.media.TrackType.VIDEO:var c=_.hk;break;case chrome.cast.media.TrackType.AUDIO:c=_.gk;break;case chrome.cast.media.TrackType.TEXT:c=_.T}c=new _.ek(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 _.nk(c.id,c));return c}):[],this.a.trigger(new _.L(_.Ru)))};_.u.destroy=function(){this.a=null};_.u.getVideoTracks=function(){return gW(this,_.hk)};_.u.getAudioTracks=function(){return gW(this,_.gk)};_.u.ma=function(){return gW(this,_.T)};_.u.qa=function(){var a=this.Ta();return a?a.renditions[0]:null};_.u.Za=function(){var a=this.pa();return a?a.renditions[0]:null};_.u.Ra=function(){var a=this.Ea();return a?a.renditions[0]:null};_.u.pb=function(){return this.f[_.hk]||null};
41
- _.u.Bb=function(){return this.f[_.gk]||null};_.u.Cb=function(){return this.f[_.T]||null};_.u.Ta=function(){return hW(this,_.hk)};_.u.pa=function(){return hW(this,_.gk)};_.u.Ea=function(){return hW(this,_.T)};_.u.xb=function(a){jW(this,_.hk,a)};_.u.Ia=function(a){jW(this,_.gk,a)};_.u.Va=function(a){jW(this,_.T,a)};_.u.lb=function(a){this.xb(a&&a.track)};_.u.vb=function(a){this.Ia(a&&a.track)};_.u.wb=function(a){this.Va(a&&a.track)};_.u.addTextTrack=function(){return _.I(function(a){_.C(a)})};
42
- _.u.xa=function(){return!0};eW.prototype.isAbrEnabled=eW.prototype.xa;eW.prototype.addTextTrack=eW.prototype.addTextTrack;eW.prototype.setTextRendition=eW.prototype.wb;eW.prototype.setAudioRendition=eW.prototype.vb;eW.prototype.setVideoRendition=eW.prototype.lb;eW.prototype.setTextTrack=eW.prototype.Va;eW.prototype.setAudioTrack=eW.prototype.Ia;eW.prototype.setVideoTrack=eW.prototype.xb;eW.prototype.getTextTrack=eW.prototype.Ea;eW.prototype.getAudioTrack=eW.prototype.pa;
43
- eW.prototype.getVideoTrack=eW.prototype.Ta;eW.prototype.getLoadingTextRendition=eW.prototype.Cb;eW.prototype.getLoadingAudioRendition=eW.prototype.Bb;eW.prototype.getLoadingVideoRendition=eW.prototype.pb;eW.prototype.getTextRendition=eW.prototype.Ra;eW.prototype.getAudioRendition=eW.prototype.Za;eW.prototype.getVideoRendition=eW.prototype.qa;eW.prototype.getTextTracks=eW.prototype.ma;eW.prototype.getAudioTracks=eW.prototype.getAudioTracks;eW.prototype.getVideoTracks=eW.prototype.getVideoTracks;_.x(nW,_.Wl);_.u=nW.prototype;_.u.init=function(a,b){this.h=this.J=b};_.u.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)})};_.u.release=function(){var a=this;return this.unload().then(function(){a.j&&a.j.release()})};_.u.getTimeline=function(){return null};_.u.setupPlaylist=function(){return Promise.reject(_.Hb)};_.u.appendLoad=function(){return Promise.reject(_.Hb)};_.u.seekWith=function(){return Promise.reject(_.Hb)};
44
- _.u.destroy=function(){return _.I(function(a){_.C(a)})};_.u.me=function(a){this.P=a};_.u.Cc=function(){return this.w};_.u.Gb=function(){return this.A};_.u.Qf=function(){return this.na};
45
- _.u.sendMessage=function(a,b){var c=this,d,e,f;return _.I(function(g){switch(g.a){case 1:e=cast.framework.CastContext.getInstance().getCurrentSession();if(!e){d=new _.P(1,8,8004,void 0);g.F(2);break}_.D(g,3);return _.y(g,e.sendMessage(a,YV(b)),5);case 5:_.qh(g,2);break;case 3:f=_.E(g),d=new _.P(1,8,8E3,{detailedErrorCode:f});case 2:if(d)c.onError(d);_.C(g)}})};
46
- _.u.cast=function(){var a=this,b,c;return _.I(function(d){if(1==d.a){if(!a.Cc())throw a.g.warn(PV),new _.P(1,8,8001,void 0);if(!EW)throw a.g.warn(NV),new _.P(1,8,8002,void 0);if(a.Gb())throw a.g.warn("Already casting"),new _.P(1,8,8003,void 0);_.D(d,2);return _.y(d,IW(a),4)}if(2!=d.a)return _.qh(d,0);b=_.E(d);c={};b instanceof chrome.cast.Error?(c.detailedErrorCode=b.code,c.details=b.details,c.reason=b.description):c.detailedErrorCode=b;throw new _.P(1,8,8E3,c);})};_.u.Lf=function(){this.Gb()&&cast.framework.CastContext.getInstance().endCurrentSession(!0)};
47
- _.u.addMessageListener=function(a){typeof a===_.ve&&this.G.add(a)};_.u.removeMessageListener=function(a){typeof a===_.ve&&this.G["delete"](a)};_.u.play=function(){var a=this;return this.isEnded()?KW(this,!0):new Promise(function(b,c){if(!a.a)return c(MV);a.a.play(null,b,c)})};_.u.pause=function(){var a=this;return new Promise(function(b,c){a.isEnded()&&b();if(!a.a)return c(MV);a.a.pause(null,b,c)})};_.u.isPaused=function(){return!!this.a&&this.a.playerState===chrome.cast.media.PlayerState.PAUSED};
48
- _.u.isEnded=function(){return this.getState()===_.sp};_.u.seek=function(a){var b=this;return this.isEnded()?KW(this,!1,a):new Promise(function(c,d){b.a||d(MV);b.l.isPlayingBreak&&d(KV);var e=new chrome.cast.media.SeekRequest;e.currentTime=a;b.trigger(new _.L(_.Bg));b.a.seek(e,function(){b.trigger(new _.L(_.Ag));c()},d)})};_.u.getPosition=function(){return this.getMediaPosition()};_.u.getMediaPosition=function(){return this.a&&this.a.getEstimatedTime()||0};_.u.getDuration=function(){return this.getMediaDuration()};
49
- _.u.getMediaDuration=function(){if(!this.a||!this.a.media)return-1;var a=this.a.media.duration;return typeof a!==_.k?-1:-1===a?Infinity:a};_.u.setDrmCustomDataModifier=function(){};_.u.setCdnErrorCallback=function(){};_.u.detach=function(){};_.u.getPlaybackRate=function(){return this.a&&this.a.playbackRate||0};_.u.setPlaybackRate=function(a){this.a&&0<a&&this.sendMessage(VV,{type:"SET_PLAYBACK_RATE",requestId:Math.round(1E3*Math.random()),mediaSessionId:this.a.mediaSessionId,playbackRate:a})};
2
+ var f=function(window){var RW="Cannot seek during ads playout.",SW="Cannot switch track",TW="Media session does not exist.",UW="No receivers available",VW="Reset ABR functionality not available on cast.",WW="SDK not yet ready",XW="Sender is destroyed.",YW="clpp.cast.CastProxy",ZW="clpp.cast.Player",$W="clpp.cast.Receiver",aX="urn:x-cast:castlabs",bX="urn:x-cast:com.google.cast.media",cX=function(a){return _.I(function(b){return 1==b.a?_.y(b,a.Hc(_.cf),2):_.y(b,a.Hc(_.bf),0)})},dX=function(a,b){this.log=new _.K(b);this.player=
3
+ a;this.j=null;this.f=_.mp;this.l=_.np;this.h=2;this.C=Date.now();this.A=-1},eX=function(a){return JSON.stringify(a,function(b,c){if("license"!==b&&typeof c!==_.we){if(c instanceof Event){var d={},e;for(e in c){var f=c[e];typeof f===_.Ze?"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}})},fX=function(a){if(typeof a!==_.lg)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}},gX=function(a,b,c,d){var e,f,g,h,l,m,n,p;return _.I(function(q){if(1==q.a){if(b.includes(a.mimeType))return q["return"](a);g=f=e=null;for(h=0;h<b.length&&!f;)g=b[h++],f=_.Jk(d,a.mimeType,g);if(!f||!g)return q.F(2);l=_.Kj(a.url);return _.y(q,c.fetch(l).N,3)}2!=q.a&&(m=q.f)&&m.data&&(n=f.a(_.mj(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)})},hX=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 _.Hg:return d.FMP4;case _.Gg:return b===_.ik?d.MPEG2_TS:c.TS;case _.dd:return c.AAC;case _.ed:return c.AC3;case _.fd:return c.E_AC3;case "audio/mpeg":return c.MP3;case _.gd:return c.FMP4}},jX=function(a){a=
6
+ void 0===a?iX:a;var b=cast.framework.messages||chrome.cast.media;if(!b)throw new _.P(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}},kX=function(a){dX.call(this,a,"clpp.cast.SenderStateManager");
7
+ this.o=this.a=null;this.w=this.tb.bind(this)},lX=function(){this.g=new _.K("clpp.cast.SenderTrackManager");this.a=null;this.h=[];this.f={}},mX=function(a){a=a.a?a.a.a:null;return(a?a.activeTrackIds||[]:[]).map(function(b){return b.toString()})},oX=function(a,b){var c=mX(a);return nX(a,b).find(function(d){return c.includes(d.id)})||null},nX=function(a,b){return a.h.filter(function(c){return c.type===b})},qX=function(a,b,c){var d=a.a.a;if(d)if(c){a.f[b]=c.renditions[0];c=[+c.id];if(b!==_.T){var e=a.Ea();
8
+ e&&c.push(+e.id)}c=new chrome.cast.media.EditTracksInfoRequest(c);d.editTracksInfo(c,function(){a.f[b]=null;pX(a,b)},function(f){a.f[b]=null;a.g.debug(SW,f)})}else b===_.T&&(c=new chrome.cast.media.EditTracksInfoRequest([]),d.editTracksInfo(c,function(){pX(a,b)},function(f){a.g.debug(SW,f)}))},pX=function(a,b){b===_.hk?a.a.trigger(new _.L(_.Ql)):b===_.T&&a.a.trigger(new _.L(_.Rl))},uX=function(a,b,c,d){_.Xl.call(this);this.g=new _.K(_.Gd);this.ca=a;this.o=new _.Yk(b);this.ba=c;this.ja=d;this.h=this.J=
9
+ _.cm();this.D=[];this.C=0;this.M=new _.bk;this.H=this.l=this.a=null;this.A=this.w=!1;this.na="";this.Wa=1E6;this.f=new lX;this.f.initialize(this);this.j=new kX(this);this.I=new _.Vh;this.L=null;this.G=new Set;this.T=this.qm.bind(this);this.Pa=this.Im.bind(this);this.ia=this.Am.bind(this);this.W=this.um.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(){rX(!0)},0)}});sX(this);tX.add(this)},
10
+ vX=function(a){var b,c;return _.I(function(d){if(1==d.a)return tX["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.Pa)),c=[],a.f&&(c.push(a.f.destroy()),a.f=null),a.j&&(c.push(a.j.destroy()),a.j=null),_.y(d,Promise.all(c),2);a.A=!1;a.o&&(a.o.stop(),a.o=null);a.ba=null;a.ja=null;_.C(d)})},AX=function(a){if(!a)return null;
11
+ a:{var b=a.metadataType;var c=Object.entries(wX);c=_.w(c);for(var d=c.next();!d.done;d=c.next()){d=_.w(d.value);var e=d.next().value;if(d.next().value===b){b=e;break a}}b=null}if(!b)return null;b=jX(wX[b]);return Object.assign(b,a)},FX=function(a){var b=void 0===b?iX:b;return Object.values(wX).includes(a)?a:b},KX=function(a){var b={},c;for(c in a)void 0!==a[c]&&(b[c]=a[c]);return b},sX=function(a){if(!a.w&&window.chrome&&chrome.cast&&chrome.cast.isAvailable&&window.cast&&cast.framework&&cast.framework.CastContext&&
12
+ a.ca.length){a.w=!0;a.o.Ag();var b=cast.framework.CastContext.getInstance(),c=new cast.framework.CastOptions;c.receiverApplicationId=a.ca;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.Pa);LX&&a.o.fa(.02)}},MX=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},OX=function(a,b){NX(a,b.getMediaSession());b.addEventListener(cast.framework.SessionEventType.MEDIA_SESSION,a.ia);b.addMessageListener(aX,a.W)},NX=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.vj.bind(a)),a.f&&a.f.load(),a.j&&a.j.init(),a.trigger(new _.L(_.Le)))},PX=function(a){return _.I(function(b){return a.Gb()?
14
+ b.F(0):_.y(b,cast.framework.CastContext.getInstance().requestSession(),0)})},QX=function(a,b){var c,d,e,f,g,h,l,m,n,p,q,t,v,z,B,F,G;return _.I(function(A){switch(A.a){case 1:return c=chrome.cast.media.StreamType,d=_.Qu,_.y(A,PX(a),2);case 2:if(!b)return A["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.Wb;m=h.audioMimeType;g.hlsVideoSegmentFormat=hX(l,d.VIDEO);
15
+ g.hlsSegmentFormat=hX(m,d.AUDIO);if(!b.kb){A.F(3);break}if(!a.P){A.F(4);break}return _.y(A,Promise.resolve(a.P(b.kb)),5);case 5:if(n=A.f)b.kb=n;case 4:a.h=b.kb;a.D=_.Ep(a.h);a.C=a.D.findIndex(function(H){return H.url===b.source.url});if(!b.kb.remoteTextTracks){A.F(6);break}return _.y(A,Promise.all(b.kb.remoteTextTracks.map(a.Jk.bind(a))),7);case 7:p=A.f,g.tracks=p.filter(function(H){return H}),b.kb.remoteTextTracks=void 0;case 6:delete b.kb.autoplay,b.kb.startTime=null,g.customData={playerConfiguration:eX(b.kb)};
16
+ case 3:q=a.Ab()||{};t=FX(q.metadataType);typeof b.mg===_.k&&(v={metadataType:t,sectionStartAbsoluteTime:b.mg});b.source.name&&(z={metadataType:t,title:b.source.name});B=KX(q);if(F=AX(Object.assign({},v,z,B)))g.metadata=F;G=new chrome.cast.media.LoadRequest(g);typeof b.autoplay===_.md&&(G.autoplay=b.autoplay);typeof b.currentTime===_.k&&(G.currentTime=b.currentTime);return _.y(A,f.loadMedia(G),0)}})},RX=function(a,b,c){c=void 0===c?0:c;var d,e;return _.I(function(f){(d=a.f.Ea())&&d.language&&(a.h.preferredTextLanguage=
17
+ d.language);(e=a.f.pa())&&e.language&&(a.h.preferredAudioLanguage=e.language);return _.y(f,QX(a,{source:a.getLoadedSource(),currentTime:c,isLive:a.isLive(),mg:a.getPresentationStartTime(),autoplay:b,kb:a.h}),0)})},rX=function(a){if(a){a=_.w(tX);for(var b=a.next();!b.done;b=a.next())sX(b.value)}},TX=function(a,b,c){_.Xl.call(this);var d=this;this.f=a;this.h=b;this.j=typeof c===_.we?c:function(e,f){d.f&&e!==_.tp&&e!==_.mp&&d.f.load(f)};this.a=SX(this);this.g=new _.K(YW);this.f&&this.forwardEventsTo(this.f)},
18
+ SX=function(a){return new uX(a.h,function(){a.trigger(new _.L(_.td))},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.Og&&(d.preferredAudioLanguage=c.Og);c.Li&&(d.preferredTextLanguage=c.Li);_.Kq(a.f,null);a.trigger(new _.L("castingended"));a.j(b,d)},function(){return UX(a)})},UX=function(a){var b;return _.I(function(c){if(1==c.a)return a.trigger(new _.L(_.sd)),
19
+ b=a.f.a,b!==a.a&&a.f&&a.a?_.y(c,a.f.release(),2):c["return"]();_.Kq(a.f,a.a);_.C(c)})},VX=function(a){dX.call(this,a,"clpp.cast.StateManager");this.I=this.zj.bind(this);this.H=this.yj.bind(this);this.w=this.xm.bind(this);this.o=this.pm.bind(this);this.L=this.Bj.bind(this);this.J=this.Aj.bind(this);this.M=this.Lm.bind(this);this.G=this.zm.bind(this);this.D=this.U.bind(this);this.a=this.xj.bind(this)},WX=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.h=
20
+ typeof e===_.k?e:0},XX=function(a){this.a=a},ZX=function(a){this.m=a;this.a=null;this.h=this.Cj.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
+ YX().addEventListener(this.f,this.h)},bY=function(a,b,c){var d,e,f,g,h,l,m;return _.I(function(n){if(1==n.a){d=b.adTagUrl;if(!d)return n["return"]();_.D(n,2);$X=!1;e=_.Kj(d);return _.y(n,c.fetch(e).N,4)}if(2!=n.a){if((f=n.f)&&f.data)if(g=_.S.ea(f.data),h=new DOMParser,l=h.parseFromString(g,_.sg),l.getElementsByTagName("vmap:VMAP").length)_.Gh("VMAP detected."),a.vmapAdsRequest=aY(g);else if(l.getElementsByTagName("VAST").length){_.Gh("VAST detected.");var p=new cast.framework.messages.BreakClip("bc1");
22
+ p.vastAdsRequest=aY(g);var q=new cast.framework.messages.Break("b1",[p.id],0);a.breakClips=[p];a.breaks=[q]}else _.Gh("Unsupported schema."),$X=!0;return _.rh(n,0)}m=_.E(n);_.Gh("Failed to fetch an ad",m);$X=!0;_.C(n)})},aY=function(a){var b=new cast.framework.messages.VastAdsRequest;b.adsResponse=a;return b},YX=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},dY=function(a,b,c){if(c instanceof cast.framework.events.BreaksEvent||-1!==a.getPosition()){var d=null;
23
+ (c=cY(a,c))&&(d={ad:c});a.m.trigger(new _.L(b,d))}},eY=function(a,b){var c=new _.P(1,10,10003,{errorType:b});a.m.onError(c)},cY=function(a,b){var c=null;if(a.a&&b instanceof cast.framework.events.BreaksEvent){var d=null,e=null,f;typeof b.breakClipId===_.lg&&(d=a.a.getBreakClipById(b.breakClipId));typeof b.breakId===_.lg&&(e=a.a.getBreakById(b.breakId),!e&&d&&(e=a.a.getBreaks().find(function(g){return g.breakClipIds.includes(d.id)})||null),e&&(f=a.a.getBreaks().filter(function(g){return 0<=g.position}).sort(function(g,
24
+ h){return g.position-h.position}).findIndex(function(g){return g===e})));c=new WX(d,e,b.index,b.total,f)}return c},fY=function(a){this.nc=a;this.a=this.f.bind(this)},gY=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]},hY=function(a){var b=a.dashTimedMetadata,c=_.Ag;b&&(c=b.schemeIdUri);return{type:c.startsWith(_.zg)?
25
+ _.ei:_.ci,schemeIdUri:c,id:a.id||"",startTime:a.startTime,endTime:a.endTime,value:b&&b.value||"",eventElement:b?b.eventElement:null}},iY=function(){this.g=new _.K("clpp.cast.TrackManager");this.m=null;this.o=1E9;this.h=[];this.j=[];this.l=this.cn.bind(this);this.a=this.f=null},jY=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},lY=function(a){a.a=jY().getTextTracksManager();var b=a.a.getTracks();a.j=kY(_.T,b)},mY=function(a,b,c,d){c=_.ki(c).filter(function(h){return h});
26
+ var e=!1,f=[];b===_.hk?f=a.getAudioTracks():b===_.T&&(f=a.ma());if(c=c.find(function(h){var l=_.ej(h);return f.some(function(m){m=_.ej(m.language||"");return _.fj(l,m)})})){var g=_.ej(c);c=f.filter(function(h){h=_.ej(h.language||"");return _.fj(g,h)});f=c.length?c:f;e=e||!!c.length}_.S.Ue(d)&&(c=f.filter(function(h){return h.roles.includes(d)}),f=c.length?c:f,e=e||!!c.length);e&&f[0]&&(e=f[0],a.g.info("Will select track",e),b===_.hk?a.Ia(e):b===_.T&&a.Va(e))},kY=function(a,b){for(var c=[],d=_.w(b),
27
+ e=d.next();!e.done;e=d.next()){e=e.value;var f=new _.fk(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 _.ok(f.id,f));c.push(f)}return c},nY=function(){_.Xl.call(this);this.g=new _.K(ZW);this.h=this.w=_.cm();this.A=null;
28
+ this.l=-1;this.G=new _.bk;this.f=this.o=this.j=this.a=this.C=null;this.D=!1},oY=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},rY=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=_.Am(d);if(e){var f=[_.Td];_.Ep(a)[0].type!==_.ad&&f.unshift(_.Vd);d.preferredDrmSystem===_.Td&&f.reverse();for(var g,h;f.length&&!h;)g=f.shift(),
29
+ h=e.mb[g];h?(d=g===_.Vd?cast.framework.ContentProtection.WIDEVINE:g===_.Td?cast.framework.ContentProtection.PLAYREADY:void 0,b.protectionSystem=d,b.licenseUrl=h.licenseUrl,d={ldlDelay:0,customData:{}},pY(b,h,a,d),qY(b,h,a,d)):c()}else c()}else c()},pY=function(a,b,c,d){b.modifiers.licenseRequest?a.licenseRequestHandler=function(e){var f=_.Kj({method:"POST",uris:[e.url]});e.headers&&(f.headers=e.headers);f.body=e.content;f.allowCrossSiteCredentials=e.withCredentials;b.modifiers.licenseRequest(c,f,
30
+ d);e.url=f.uris[0];e.headers=f.headers;e.content=f.body;e.withCredentials=f.allowCrossSiteCredentials}:a.licenseRequestHandler=void 0},qY=function(a,b,c,d){b.modifiers.licenseResponse?a.licenseHandler=function(e,f){var g;return _.I(function(h){return 1==h.a?(g=_.Lj(Object.assign({},f.headers),e.buffer,200,""),_.y(h,b.modifiers.licenseResponse(c,g,d),2)):h["return"](_.mj(g.data))})}:a.licenseHandler=void 0},sY=function(){this.a=!1;this.g=new _.K($W);this.f=this.m=null;this.h=new Set;this.A=this.ym.bind(this);
31
+ this.w=this.wj.bind(this);this.j=null;this.o=new _.Vh;this.l=null},uY=function(){return tY||(tY=new sY)},vY=function(){return cast.framework.CastReceiverContext.getInstance()},xY=function(a,b){a.g.debug("Detected HLS, parsing");var c=cast.framework.messages.HlsVideoSegmentFormat,d=vY();c=(vY().getPlayerManager().getMediaInformation()||{}).hlsVideoSegmentFormat===c.FMP4?_.Hg:_.Gg;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
+ wY(h,_.ta),m=wY(h,_.Ub),n=_.w([]),p=n.next().value;n=n.next().value;m&&(m=_.w(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")},wY=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},yY=function(a){this.f=a;this.a=null;this.h=new _.Vh;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]},AY=function(a,b){var c=null,d=zY(a);d&&(c={ad:d});a.f.trigger(new _.L(b,c))},zY=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 WX(d,c,e,f,g)}return b},BY=function(){},CY=function(){};_.u=dX.prototype;_.u.release=function(){this.Ca(_.mp)};_.u.destroy=function(){this.j=this.player=null;return Promise.resolve()};_.u.getState=function(){return this.f};
35
+ _.u.onError=function(a){a.severity===_.Q&&this.Ca(_.xp)};
36
+ _.u.Ca=function(a){if(a!==this.f)if(this.f===_.xp&&a!==_.mp)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===_.rp?(this.A=b,this.player.trigger(new _.L(_.od,{detail:{bufferedTimeMS:-1,reason:this.h}}))):this.l===_.rp&&this.player.trigger(new _.L(_.nd,{detail:{bufferedTimeMS:b-this.A,reason:this.h}}));a={currentState:this.f,previousState:this.l,timeSinceLastStateChangeMS:b-this.C};this.C=b;this.j&&_.cp(this.j,this.f);this.player.trigger(new _.L(_.ig,
37
+ {detail:a}))}};_.J("clpp.cast.CastUtils",function(){});var iX=0,wX={GENERIC:iX,MOVIE:1,TV_SHOW:2,MUSIC_TRACK:3,PHOTO:4,AUDIOBOOK_CHAPTER:5};_.x(kX,dX);kX.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)};kX.prototype.destroy=function(){var a=this;return _.I(function(b){a.a&&(a.a.removeUpdateListener(a.w),a.a=null);return _.y(b,dX.prototype.destroy.call(a),0)})};kX.prototype.Ca=function(a){var b=this.player.l;b&&b.isPlayingBreak||dX.prototype.Ca.call(this,a)};
38
+ kX.prototype.tb=function(){if(this.a&&this.o&&!this.o.isPlayingBreak)switch(this.a.playerState){case chrome.cast.media.PlayerState.IDLE:switch(this.a.idleReason){case chrome.cast.media.IdleReason.FINISHED:this.Ca(_.tp);break;case chrome.cast.media.IdleReason.ERROR:this.Ca(_.xp);break;default:this.Ca(_.mp)}break;case chrome.cast.media.PlayerState.PLAYING:this.Ca(_.Ap);break;case chrome.cast.media.PlayerState.PAUSED:this.Ca(_.zp);break;case chrome.cast.media.PlayerState.BUFFERING:this.Ca(_.rp)}};_.x(lX,_.Lk);_.u=lX.prototype;_.u.initialize=function(a){this.a=a};_.u.release=function(){this.h=[];this.f={}};
39
+ _.u.load=function(){this.release();var a=this.a.a;a&&(a=a.media)&&(this.h=(a=a.tracks)?a.map(function(b){switch(b.type){case chrome.cast.media.TrackType.VIDEO:var c=_.ik;break;case chrome.cast.media.TrackType.AUDIO:c=_.hk;break;case chrome.cast.media.TrackType.TEXT:c=_.T}c=new _.fk(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 _.ok(c.id,c));return c}):[],this.a.trigger(new _.L(_.Su)))};_.u.destroy=function(){this.a=null};_.u.getVideoTracks=function(){return nX(this,_.ik)};_.u.getAudioTracks=function(){return nX(this,_.hk)};_.u.ma=function(){return nX(this,_.T)};_.u.qa=function(){var a=this.Ta();return a?a.renditions[0]:null};_.u.Za=function(){var a=this.pa();return a?a.renditions[0]:null};_.u.Ra=function(){var a=this.Ea();return a?a.renditions[0]:null};_.u.pb=function(){return this.f[_.ik]||null};
41
+ _.u.Bb=function(){return this.f[_.hk]||null};_.u.Cb=function(){return this.f[_.T]||null};_.u.Ta=function(){return oX(this,_.ik)};_.u.pa=function(){return oX(this,_.hk)};_.u.Ea=function(){return oX(this,_.T)};_.u.xb=function(a){qX(this,_.ik,a)};_.u.Ia=function(a){qX(this,_.hk,a)};_.u.Va=function(a){qX(this,_.T,a)};_.u.lb=function(a){this.xb(a&&a.track)};_.u.vb=function(a){this.Ia(a&&a.track)};_.u.wb=function(a){this.Va(a&&a.track)};_.u.addTextTrack=function(){return _.I(function(a){_.C(a)})};
42
+ _.u.xa=function(){return!0};lX.prototype.isAbrEnabled=lX.prototype.xa;lX.prototype.addTextTrack=lX.prototype.addTextTrack;lX.prototype.setTextRendition=lX.prototype.wb;lX.prototype.setAudioRendition=lX.prototype.vb;lX.prototype.setVideoRendition=lX.prototype.lb;lX.prototype.setTextTrack=lX.prototype.Va;lX.prototype.setAudioTrack=lX.prototype.Ia;lX.prototype.setVideoTrack=lX.prototype.xb;lX.prototype.getTextTrack=lX.prototype.Ea;lX.prototype.getAudioTrack=lX.prototype.pa;
43
+ lX.prototype.getVideoTrack=lX.prototype.Ta;lX.prototype.getLoadingTextRendition=lX.prototype.Cb;lX.prototype.getLoadingAudioRendition=lX.prototype.Bb;lX.prototype.getLoadingVideoRendition=lX.prototype.pb;lX.prototype.getTextRendition=lX.prototype.Ra;lX.prototype.getAudioRendition=lX.prototype.Za;lX.prototype.getVideoRendition=lX.prototype.qa;lX.prototype.getTextTracks=lX.prototype.ma;lX.prototype.getAudioTracks=lX.prototype.getAudioTracks;lX.prototype.getVideoTracks=lX.prototype.getVideoTracks;_.x(uX,_.Xl);_.u=uX.prototype;_.u.init=function(a,b){this.h=this.J=b};_.u.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)})};_.u.release=function(){var a=this;return this.unload().then(function(){a.j&&a.j.release()})};_.u.getTimeline=function(){return null};_.u.setupPlaylist=function(){return Promise.reject(_.Ib)};_.u.appendLoad=function(){return Promise.reject(_.Ib)};_.u.seekWith=function(){return Promise.reject(_.Ib)};
44
+ _.u.destroy=function(){return _.I(function(a){_.C(a)})};_.u.ne=function(a){this.P=a};_.u.Cc=function(){return this.w};_.u.Gb=function(){return this.A};_.u.Sf=function(){return this.na};
45
+ _.u.sendMessage=function(a,b){var c=this,d,e,f;return _.I(function(g){switch(g.a){case 1:e=cast.framework.CastContext.getInstance().getCurrentSession();if(!e){d=new _.P(1,8,8004,void 0);g.F(2);break}_.D(g,3);return _.y(g,e.sendMessage(a,eX(b)),5);case 5:_.rh(g,2);break;case 3:f=_.E(g),d=new _.P(1,8,8E3,{detailedErrorCode:f});case 2:if(d)c.onError(d);_.C(g)}})};
46
+ _.u.cast=function(){var a=this,b,c;return _.I(function(d){if(1==d.a){if(!a.Cc())throw a.g.warn(WW),new _.P(1,8,8001,void 0);if(!LX)throw a.g.warn(UW),new _.P(1,8,8002,void 0);if(a.Gb())throw a.g.warn("Already casting"),new _.P(1,8,8003,void 0);_.D(d,2);return _.y(d,PX(a),4)}if(2!=d.a)return _.rh(d,0);b=_.E(d);c={};b instanceof chrome.cast.Error?(c.detailedErrorCode=b.code,c.details=b.details,c.reason=b.description):c.detailedErrorCode=b;throw new _.P(1,8,8E3,c);})};_.u.Nf=function(){this.Gb()&&cast.framework.CastContext.getInstance().endCurrentSession(!0)};
47
+ _.u.addMessageListener=function(a){typeof a===_.we&&this.G.add(a)};_.u.removeMessageListener=function(a){typeof a===_.we&&this.G["delete"](a)};_.u.play=function(){var a=this;return this.isEnded()?RX(this,!0):new Promise(function(b,c){if(!a.a)return c(TW);a.a.play(null,b,c)})};_.u.pause=function(){var a=this;return new Promise(function(b,c){a.isEnded()&&b();if(!a.a)return c(TW);a.a.pause(null,b,c)})};_.u.isPaused=function(){return!!this.a&&this.a.playerState===chrome.cast.media.PlayerState.PAUSED};
48
+ _.u.isEnded=function(){return this.getState()===_.tp};_.u.seek=function(a){var b=this;return this.isEnded()?RX(this,!1,a):new Promise(function(c,d){b.a||d(TW);b.l.isPlayingBreak&&d(RW);var e=new chrome.cast.media.SeekRequest;e.currentTime=a;b.trigger(new _.L(_.Cg));b.a.seek(e,function(){b.trigger(new _.L(_.Bg));c()},d)})};_.u.getPosition=function(){return this.getMediaPosition()};_.u.getMediaPosition=function(){return this.a&&this.a.getEstimatedTime()||0};_.u.getDuration=function(){return this.getMediaDuration()};
49
+ _.u.getMediaDuration=function(){if(!this.a||!this.a.media)return-1;var a=this.a.media.duration;return typeof a!==_.k?-1:-1===a?Infinity:a};_.u.setDrmCustomDataModifier=function(){};_.u.setCdnErrorCallback=function(){};_.u.detach=function(){};_.u.getPlaybackRate=function(){return this.a&&this.a.playbackRate||0};_.u.setPlaybackRate=function(a){this.a&&0<a&&this.sendMessage(bX,{type:"SET_PLAYBACK_RATE",requestId:Math.round(1E3*Math.random()),mediaSessionId:this.a.mediaSessionId,playbackRate:a})};
50
50
  _.u.getVolume=function(){return this.a&&this.a.volume.level};_.u.setVolume=function(a){this.a&&0<=a&&1>=a&&(a=new chrome.cast.media.VolumeRequest(new chrome.cast.Volume(a)),this.a.setVolume(a))};_.u.isMuted=function(){return this.a&&this.a.volume.muted};_.u.setMuted=function(a){this.a&&(a=new chrome.cast.media.VolumeRequest(new chrome.cast.Volume(void 0,a)),this.a.setVolume(a))};
51
- _.u.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};_.u.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};_.u.getState=function(){return this.j?this.j.getState():_.mp};
52
- _.u.getStats=function(){return this.a&&this.a.customData&&this.a.customData.stats?ZV(this.a.customData.stats):_.hp()};_.u.isLive=function(){return Infinity===this.getDuration()};_.u.load=function(a){var b=this,c,d;return _.I(function(e){if(!b.Cc())return b.g.warn(PV),e["return"]();if(!EW)return b.g.warn(NV),e["return"]();b.D=_.Dp(a);b.h=_.dm(b.J,a);c=b.D[b.C];d={source:c,isLive:c.isLive,autoplay:b.h.autoplay,kb:b.h,Wb:c.Wb,audioMimeType:c.audioMimeType};return _.y(e,JW(b,d),0)})};
53
- _.u.getBufferInfo=function(){return new _.Vl};_.u.getTrackManager=function(){return this.f};_.u.getConfiguration=function(){return this.h};_.u.getSurface=function(){return null};_.u.setNetworkEngine=function(a){this.M=a};_.u.getNetworkEngine=function(){return this.M};_.u.getSourceIndex=function(){return this.C};_.u.setSourceIndex=function(a){this.C=a};_.u.getLoadedSource=function(){return this.D[this.C]};_.u.getPeriods=function(){return[]};_.u.getDrmInfo=function(){return null};
54
- _.u.getTimelineCues=function(){return[]};_.u.resetAbr=function(){this.g.warn(OV)};_.u.onError=function(a){if(a&&(this.trigger(new _.L(_.se,{detail:a})),this.j))this.j.onError(a)};_.u.namespace=function(){return _.Fd};_.u.canPlay=function(){return this.Cc()?2:0};_.u.Ab=function(){return this.L};_.u.Jc=function(a){this.L=tW(a)};_.u.Bf=function(){this.L=null};_.u.rg=function(a){var b=this.Ab()||{};a={metadataType:yW(b.metadataType),title:a};this.Jc(Object.assign({},b,a))};
55
- _.u.pg=function(a){var b=this.Ab()||{},c=yW(b.metadataType);a=new chrome.cast.Image(a);this.Jc(Object.assign({},b,{metadataType:c,images:[a]}))};_.u.og=function(a){var b=this.Ab()||{};this.Jc(Object.assign({},b,{metadataType:3,artist:a}))};_.u.qg=function(a){var b=this.Ab()||{};a={metadataType:yW(b.metadataType),releaseDate:a};this.Jc(Object.assign({},b,a))};
56
- _.u.mm=function(a){var b=cast.framework.CastContext.getInstance(),c=a.castState===cast.framework.CastState.CONNECTED;EW=a.castState!==cast.framework.CastState.NO_DEVICES_AVAILABLE;this.na=c?b.getCurrentSession().getCastDevice().friendlyName:"";this.o.xg()};
57
- _.u.Cm=function(a){this.g.debug("state: "+a.sessionState+", details:",a);switch(a.sessionState){case cast.framework.SessionState.SESSION_STARTED:this.A=!0;HW(this,a.session);break;case cast.framework.SessionState.SESSION_RESUMED:this.Gb()||(this.A=!0,HW(this,a.session),this.ja());break;case cast.framework.SessionState.SESSION_ENDED:if(this.Gb()&&this.a){var b=this.a.media,c=this.f.pa(),d=this.f.Ea();c=c&&c.language||void 0;d=d&&d.language||void 0;this.ba(this.getState(),{source:{url:b.contentId,type:b.contentType,
58
- isLive:this.isLive()},currentTime:FW(this),Ki:d,Mg:c})}a.session.removeEventListener(cast.framework.SessionEventType.MEDIA_SESSION,this.ia);a.session.removeMessageListener(UV,this.W);this.A=!1;this.a=null;this.I.release();this.l=this.H=null}};_.u.um=function(a){this.g.debug("New media session",a.mediaSession);GW(this,a.mediaSession)};_.u.qm=function(a,b){if(a===UV&&0<this.G.size){var c=ZV(b);this.G.forEach(function(d){return d(c)})}};_.u.uj=function(){this.trigger(new _.L(_.sg))};
59
- _.u.Fk=function(a){var b=this,c,d;return _.I(function(e){if(1==e.a)return c=null,_.y(e,$V(a,[_.qg,_.Zc],b.M,b.h),2);if(d=e.f)c=new chrome.cast.media.Track(b.Wa++,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)})};_.u.getTextDisplayer=function(){return null};nW.prototype.getTextDisplayer=nW.prototype.getTextDisplayer;nW.prototype.getNetworkEngine=nW.prototype.getNetworkEngine;
60
- nW.prototype.setNetworkEngine=nW.prototype.setNetworkEngine;var EW=!1,mW=new Set;window.__onGCastApiAvailable=kW;_.x(MW,_.Wl);_.u=MW.prototype;_.u.destroy=function(){var a=this;return _.I(function(b){if(1==b.a)return a.a?_.y(b,oW(a.a),3):b.F(2);2!=b.a&&(a.a=null);a.f&&a.stopForwardingEventsTo(a.f);_.C(b)})};_.u.yf=function(){return!!this.a&&this.a.Cc()&&EW};_.u.Gb=function(){return!!this.a&&this.a.Gb()};_.u.Qf=function(){return this.a?this.a.Qf():""};_.u.me=function(a){this.a&&this.a.me(a)};
51
+ _.u.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};_.u.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};_.u.getState=function(){return this.j?this.j.getState():_.np};
52
+ _.u.getStats=function(){return this.a&&this.a.customData&&this.a.customData.stats?fX(this.a.customData.stats):_.ip()};_.u.isLive=function(){return Infinity===this.getDuration()};_.u.load=function(a){var b=this,c,d;return _.I(function(e){if(!b.Cc())return b.g.warn(WW),e["return"]();if(!LX)return b.g.warn(UW),e["return"]();b.D=_.Ep(a);b.h=_.em(b.J,a);c=b.D[b.C];d={source:c,isLive:c.isLive,autoplay:b.h.autoplay,kb:b.h,Wb:c.Wb,audioMimeType:c.audioMimeType};return _.y(e,QX(b,d),0)})};
53
+ _.u.getBufferInfo=function(){return new _.Wl};_.u.getTrackManager=function(){return this.f};_.u.getConfiguration=function(){return this.h};_.u.getSurface=function(){return null};_.u.setNetworkEngine=function(a){this.M=a};_.u.getNetworkEngine=function(){return this.M};_.u.getSourceIndex=function(){return this.C};_.u.setSourceIndex=function(a){this.C=a};_.u.getLoadedSource=function(){return this.D[this.C]};_.u.getPeriods=function(){return[]};_.u.getDrmInfo=function(){return null};
54
+ _.u.getTimelineCues=function(){return[]};_.u.resetAbr=function(){this.g.warn(VW)};_.u.onError=function(a){if(a&&(this.trigger(new _.L(_.te,{detail:a})),this.j))this.j.onError(a)};_.u.namespace=function(){return _.Gd};_.u.canPlay=function(){return this.Cc()?2:0};_.u.Ab=function(){return this.L};_.u.Jc=function(a){this.L=AX(a)};_.u.Df=function(){this.L=null};_.u.ug=function(a){var b=this.Ab()||{};a={metadataType:FX(b.metadataType),title:a};this.Jc(Object.assign({},b,a))};
55
+ _.u.sg=function(a){var b=this.Ab()||{},c=FX(b.metadataType);a=new chrome.cast.Image(a);this.Jc(Object.assign({},b,{metadataType:c,images:[a]}))};_.u.rg=function(a){var b=this.Ab()||{};this.Jc(Object.assign({},b,{metadataType:3,artist:a}))};_.u.tg=function(a){var b=this.Ab()||{};a={metadataType:FX(b.metadataType),releaseDate:a};this.Jc(Object.assign({},b,a))};
56
+ _.u.qm=function(a){var b=cast.framework.CastContext.getInstance(),c=a.castState===cast.framework.CastState.CONNECTED;LX=a.castState!==cast.framework.CastState.NO_DEVICES_AVAILABLE;this.na=c?b.getCurrentSession().getCastDevice().friendlyName:"";this.o.Ag()};
57
+ _.u.Im=function(a){this.g.debug("state: "+a.sessionState+", details:",a);switch(a.sessionState){case cast.framework.SessionState.SESSION_STARTED:this.A=!0;OX(this,a.session);break;case cast.framework.SessionState.SESSION_RESUMED:this.Gb()||(this.A=!0,OX(this,a.session),this.ja());break;case cast.framework.SessionState.SESSION_ENDED:if(this.Gb()&&this.a){var b=this.a.media,c=this.f.pa(),d=this.f.Ea();c=c&&c.language||void 0;d=d&&d.language||void 0;this.ba(this.getState(),{source:{url:b.contentId,type:b.contentType,
58
+ isLive:this.isLive()},currentTime:MX(this),Li:d,Og:c})}a.session.removeEventListener(cast.framework.SessionEventType.MEDIA_SESSION,this.ia);a.session.removeMessageListener(aX,this.W);this.A=!1;this.a=null;this.I.release();this.l=this.H=null}};_.u.Am=function(a){this.g.debug("New media session",a.mediaSession);NX(this,a.mediaSession)};_.u.um=function(a,b){if(a===aX&&0<this.G.size){var c=fX(b);this.G.forEach(function(d){return d(c)})}};_.u.vj=function(){this.trigger(new _.L(_.tg))};
59
+ _.u.Jk=function(a){var b=this,c,d;return _.I(function(e){if(1==e.a)return c=null,_.y(e,gX(a,[_.rg,_.$c],b.M,b.h),2);if(d=e.f)c=new chrome.cast.media.Track(b.Wa++,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)})};_.u.getTextDisplayer=function(){return null};uX.prototype.getTextDisplayer=uX.prototype.getTextDisplayer;uX.prototype.getNetworkEngine=uX.prototype.getNetworkEngine;
60
+ uX.prototype.setNetworkEngine=uX.prototype.setNetworkEngine;var LX=!1,tX=new Set;window.__onGCastApiAvailable=rX;_.x(TX,_.Xl);_.u=TX.prototype;_.u.destroy=function(){var a=this;return _.I(function(b){if(1==b.a)return a.a?_.y(b,vX(a.a),3):b.F(2);2!=b.a&&(a.a=null);a.f&&a.stopForwardingEventsTo(a.f);_.C(b)})};_.u.Af=function(){return!!this.a&&this.a.Cc()&&LX};_.u.Gb=function(){return!!this.a&&this.a.Gb()};_.u.Sf=function(){return this.a?this.a.Sf():""};_.u.ne=function(a){this.a&&this.a.ne(a)};
61
61
  _.u.cast=function(a){var b=this,c,d,e;return _.I(function(f){switch(f.a){case 1:if(!b.a)return f["return"]();_.D(f,2);return _.y(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.Ea())l.language&&
62
- (g.preferredTextLanguage=l.language),l.roles.length&&(g.preferredTextRole=l.roles[0]);l=h&&typeof h.isLive===_.ld?h.isLive:b.f.isLive();g={source:h,isLive:l,autoplay:!b.f.isPaused(),currentTime:Math.max(b.f.getPosition()-1,0),kg:b.f.getPresentationStartTime(),Wb:m,audioMimeType:p,kb:g}}c=g;return _.y(f,NW(b),5);case 5:if(!b.a)return f["return"]();c&&(c.autoplay=!b.f.isPaused());if(a)return _.y(f,b.f.load(a),7);if(b.a.a){f.F(7);break}return _.y(f,JW(b.a,c),7);case 7:_.qh(f,0);break;case 2:d=_.E(f),
63
- b.g.error("Error while trying to cast",d),e=new _.L(_.se,{detail:d}),b.trigger(e),_.C(f)}})};_.u.Lf=function(){this.a&&this.a.Lf()};_.u.qj=function(a){var b=this;return _.I(function(c){if(1==c.a){if(a===b.h)return c["return"]();b.h=a;return b.a?_.y(c,oW(b.a),2):c.F(2)}b.a=LW(b);_.C(c)})};_.u.sendMessage=function(a){var b=this;return _.I(function(c){return b.a?_.y(c,b.a.sendMessage(UV,a),0):(b.g.warn(QV),c["return"]())})};_.u.addMessageListener=function(a){this.a?this.a.addMessageListener(a):this.g.warn(QV)};
64
- _.u.removeMessageListener=function(a){this.a?this.a.removeMessageListener(a):this.g.warn(QV)};_.u.Ab=function(){return this.a&&this.a.Ab()};_.u.Jc=function(a){this.a&&this.a.Jc(a)};_.u.Bf=function(){this.a&&this.a.Bf()};_.u.rg=function(a){this.a&&this.a.rg(a)};_.u.pg=function(a){this.a&&this.a.pg(a)};_.u.og=function(a){this.a&&this.a.og(a)};_.u.qg=function(a){this.a&&this.a.qg(a)};_.J(RV,MW);MW.prototype.setContentReleaseDate=MW.prototype.qg;MW.prototype.setContentArtist=MW.prototype.og;
65
- MW.prototype.setContentImage=MW.prototype.pg;MW.prototype.setContentTitle=MW.prototype.rg;MW.prototype.clearContentMetadata=MW.prototype.Bf;MW.prototype.setContentMetadata=MW.prototype.Jc;MW.prototype.getContentMetadata=MW.prototype.Ab;MW.prototype.removeMessageListener=MW.prototype.removeMessageListener;MW.prototype.addMessageListener=MW.prototype.addMessageListener;MW.prototype.sendMessage=MW.prototype.sendMessage;MW.prototype.changeReceiverId=MW.prototype.qj;MW.prototype.forceDisconnect=MW.prototype.Lf;
66
- MW.prototype.cast=MW.prototype.cast;MW.prototype.setPlayerConfigInterceptor=MW.prototype.me;MW.prototype.getReceiverName=MW.prototype.Qf;MW.prototype.isCasting=MW.prototype.Gb;MW.prototype.canCast=MW.prototype.yf;MW.prototype.destroy=MW.prototype.destroy;_.x(OW,XV);_.u=OW.prototype;
62
+ (g.preferredTextLanguage=l.language),l.roles.length&&(g.preferredTextRole=l.roles[0]);l=h&&typeof h.isLive===_.md?h.isLive:b.f.isLive();g={source:h,isLive:l,autoplay:!b.f.isPaused(),currentTime:Math.max(b.f.getPosition()-1,0),mg:b.f.getPresentationStartTime(),Wb:m,audioMimeType:p,kb:g}}c=g;return _.y(f,UX(b),5);case 5:if(!b.a)return f["return"]();c&&(c.autoplay=!b.f.isPaused());if(a)return _.y(f,b.f.load(a),7);if(b.a.a){f.F(7);break}return _.y(f,QX(b.a,c),7);case 7:_.rh(f,0);break;case 2:d=_.E(f),
63
+ b.g.error("Error while trying to cast",d),e=new _.L(_.te,{detail:d}),b.trigger(e),_.C(f)}})};_.u.Nf=function(){this.a&&this.a.Nf()};_.u.rj=function(a){var b=this;return _.I(function(c){if(1==c.a){if(a===b.h)return c["return"]();b.h=a;return b.a?_.y(c,vX(b.a),2):c.F(2)}b.a=SX(b);_.C(c)})};_.u.sendMessage=function(a){var b=this;return _.I(function(c){return b.a?_.y(c,b.a.sendMessage(aX,a),0):(b.g.warn(XW),c["return"]())})};_.u.addMessageListener=function(a){this.a?this.a.addMessageListener(a):this.g.warn(XW)};
64
+ _.u.removeMessageListener=function(a){this.a?this.a.removeMessageListener(a):this.g.warn(XW)};_.u.Ab=function(){return this.a&&this.a.Ab()};_.u.Jc=function(a){this.a&&this.a.Jc(a)};_.u.Df=function(){this.a&&this.a.Df()};_.u.ug=function(a){this.a&&this.a.ug(a)};_.u.sg=function(a){this.a&&this.a.sg(a)};_.u.rg=function(a){this.a&&this.a.rg(a)};_.u.tg=function(a){this.a&&this.a.tg(a)};_.J(YW,TX);TX.prototype.setContentReleaseDate=TX.prototype.tg;TX.prototype.setContentArtist=TX.prototype.rg;
65
+ TX.prototype.setContentImage=TX.prototype.sg;TX.prototype.setContentTitle=TX.prototype.ug;TX.prototype.clearContentMetadata=TX.prototype.Df;TX.prototype.setContentMetadata=TX.prototype.Jc;TX.prototype.getContentMetadata=TX.prototype.Ab;TX.prototype.removeMessageListener=TX.prototype.removeMessageListener;TX.prototype.addMessageListener=TX.prototype.addMessageListener;TX.prototype.sendMessage=TX.prototype.sendMessage;TX.prototype.changeReceiverId=TX.prototype.rj;TX.prototype.forceDisconnect=TX.prototype.Nf;
66
+ TX.prototype.cast=TX.prototype.cast;TX.prototype.setPlayerConfigInterceptor=TX.prototype.ne;TX.prototype.getReceiverName=TX.prototype.Sf;TX.prototype.isCasting=TX.prototype.Gb;TX.prototype.canCast=TX.prototype.Af;TX.prototype.destroy=TX.prototype.destroy;_.x(VX,dX);_.u=VX.prototype;
67
67
  _.u.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.L);b.addEventListener(a.SEEKED,this.J);b.addEventListener(a.STALLED,this.M);b.addEventListener(a.PLAYER_LOADING,this.G);b.addEventListener(a.ERROR,this.D);b.addEventListener(a.BITRATE_CHANGED,this.a)};
68
68
  _.u.destroy=function(){var a=this,b,c;return _.I(function(d){b=cast.framework.events.EventType;c=cast.framework.CastReceiverContext.getInstance().getPlayerManager();c.removeEventListener(b.PLAYING,a.I);c.removeEventListener(b.PAUSE,a.H);c.removeEventListener(b.MEDIA_FINISHED,a.w);c.removeEventListener(b.BUFFERING,a.o);c.removeEventListener(b.SEEKING,a.L);c.removeEventListener(b.SEEKED,a.J);c.removeEventListener(b.STALLED,a.M);c.removeEventListener(b.PLAYER_LOADING,a.G);c.removeEventListener(b.ERROR,
69
- a.D);c.removeEventListener(b.BITRATE_CHANGED,a.a);return _.y(d,XV.prototype.destroy.call(a),0)})};_.u.yj=function(){this.player.trigger(new _.L(_.mf));this.Ca(_.zp)};_.u.xj=function(){this.Ca(_.yp)};_.u.rm=function(){this.Ca(_.sp)};_.u.lm=function(a){a.isBuffering?this.Ca(_.qp):(a=this.player.isPaused()?_.yp:_.zp,this.Ca(a))};_.u.Aj=function(){this.h=1;this.player.trigger(new _.L(_.Bg))};_.u.zj=function(){this.player.trigger(new _.L(_.Ag))};_.u.Fm=function(){this.h=2};_.u.tm=function(){this.Ca(_.xp)};
70
- _.u.wj=function(a){var b=this.player.getStats();this.player.trigger(new _.L(_.kd,{detail:{bandwidth:a.totalBitrate,width:b.width,height:b.height}}))};_.u.V=function(a){a=new _.P(_.Q,7,7300,{detailedErrorCode:a.detailedErrorCode,error:a.error,reason:a.reason});this.player.trigger(new _.L(_.se,{detail:a}));this.Ca(_.wp)};_.u=PW.prototype;_.u.Nb=function(){return"Google Cast Framework"};_.u.Ob=function(){return cast.framework.VERSION};_.u.Tb=function(){return 0};_.u.getId=function(){return""};_.u.getCreativeId=function(){return""};_.u.getApiFramework=function(){return null};_.u.getAdSystem=function(){return""};_.u.getAdvertiserName=function(){return""};_.u.getTitle=function(){return this.a.title||""};_.u.getDuration=function(){return this.a.duration||0};
69
+ a.D);c.removeEventListener(b.BITRATE_CHANGED,a.a);return _.y(d,dX.prototype.destroy.call(a),0)})};_.u.zj=function(){this.player.trigger(new _.L(_.nf));this.Ca(_.Ap)};_.u.yj=function(){this.Ca(_.zp)};_.u.xm=function(){this.Ca(_.tp)};_.u.pm=function(a){a.isBuffering?this.Ca(_.rp):(a=this.player.isPaused()?_.zp:_.Ap,this.Ca(a))};_.u.Bj=function(){this.h=1;this.player.trigger(new _.L(_.Cg))};_.u.Aj=function(){this.player.trigger(new _.L(_.Bg))};_.u.Lm=function(){this.h=2};_.u.zm=function(){this.Ca(_.yp)};
70
+ _.u.xj=function(a){var b=this.player.getStats();this.player.trigger(new _.L(_.ld,{detail:{bandwidth:a.totalBitrate,width:b.width,height:b.height}}))};_.u.U=function(a){a=new _.P(_.Q,7,7300,{detailedErrorCode:a.detailedErrorCode,error:a.error,reason:a.reason});this.player.trigger(new _.L(_.te,{detail:a}));this.Ca(_.xp)};_.u=WX.prototype;_.u.Nb=function(){return"Google Cast Framework"};_.u.Ob=function(){return cast.framework.VERSION};_.u.Tb=function(){return 0};_.u.getId=function(){return""};_.u.getCreativeId=function(){return""};_.u.getApiFramework=function(){return null};_.u.getAdSystem=function(){return""};_.u.getAdvertiserName=function(){return""};_.u.getTitle=function(){return this.a.title||""};_.u.getDuration=function(){return this.a.duration||0};
71
71
  _.u.getSkipTimeOffset=function(){return this.a.whenSkippable||0};_.u.Dc=function(){return!1};_.u.dc=function(){return this.a.clickThroughUrl||null};_.u.getMediaUrl=function(){return this.a.contentUrl||this.a.contentId||null};_.u.Rb=function(){return 0};_.u.Qb=function(){return 0};_.u.Db=function(){return 0};_.u.qb=function(){switch(this.ec()){case 0:return 0;case -1:return 2;default:return 1}};_.u.getPodIndex=function(){return this.h};_.u.ec=function(){return this.f.position};_.u.fc=function(){return this.j};
72
- _.u.Sb=function(){return this.l};_.u.getWrapperAdIds=function(){return[]};_.u.getWrapperAdSystems=function(){return[]};_.u.getWrapperCreativeIds=function(){return[]};PW.prototype.getWrapperCreativeIds=PW.prototype.getWrapperCreativeIds;PW.prototype.getWrapperAdSystems=PW.prototype.getWrapperAdSystems;PW.prototype.getWrapperAdIds=PW.prototype.getWrapperAdIds;PW.prototype.getSequenceLength=PW.prototype.Sb;PW.prototype.getPositionInSequence=PW.prototype.fc;PW.prototype.getPodTimeOffset=PW.prototype.ec;
73
- PW.prototype.getPodIndex=PW.prototype.getPodIndex;PW.prototype.getPodType=PW.prototype.qb;PW.prototype.getMediaBitrate=PW.prototype.Db;PW.prototype.getMediaHeight=PW.prototype.Qb;PW.prototype.getMediaWidth=PW.prototype.Rb;PW.prototype.getMediaUrl=PW.prototype.getMediaUrl;PW.prototype.getClickThroughUrl=PW.prototype.dc;PW.prototype.isBumper=PW.prototype.Dc;PW.prototype.getSkipTimeOffset=PW.prototype.getSkipTimeOffset;PW.prototype.getDuration=PW.prototype.getDuration;PW.prototype.getTitle=PW.prototype.getTitle;
74
- PW.prototype.getAdvertiserName=PW.prototype.getAdvertiserName;PW.prototype.getAdSystem=PW.prototype.getAdSystem;PW.prototype.getApiFramework=PW.prototype.getApiFramework;PW.prototype.getCreativeId=PW.prototype.getCreativeId;PW.prototype.getId=PW.prototype.getId;PW.prototype.getTechnology=PW.prototype.Tb;PW.prototype.getAdManagerVersion=PW.prototype.Ob;PW.prototype.getAdManagerName=PW.prototype.Nb;QW.prototype.getCuePoints=function(){return this.a.map(function(a){return a.position})};QW.prototype.hc=function(){return!!this.a.find(function(a){return 0===a.position})};QW.prototype.Fb=function(){return!!this.a.find(function(a){return-1===a.position})};QW.prototype.hasPostroll=QW.prototype.Fb;QW.prototype.hasPreroll=QW.prototype.hc;QW.prototype.getCuePoints=QW.prototype.getCuePoints;_.u=SW.prototype;_.u.load=function(){var a=this;return _.I(function(b){TW&&(TW=!1,YW(a,0));_.C(b)})};_.u.start=function(){return _.I(function(a){RW().play();_.C(a)})};_.u.resume=function(){-1!==this.getPosition()&&RW().play()};_.u.pause=function(){-1!==this.getPosition()&&RW().pause()};_.u.skip=function(){};_.u.getVolume=function(){return this.m.getVolume()||0};_.u.setVolume=function(a){this.m.setVolume(a)};
75
- _.u.getPosition=function(){var a=this.a&&this.a.getBreakClipCurrentTimeSec();return typeof a===_.k?a:-1};_.u.dispose=function(){var a=this;return _.I(function(b){RW().removeEventListener(a.f,a.h);_.C(b)})};
76
- _.u.Bj=function(a){var b=cast.framework.events.EndedReason;switch(a.type){case cast.framework.events.EventType.PLAYER_LOADING:this.a=RW().getBreakManager();this.a.setPlayWatchedBreak(!0);a=this.a.getBreaks();this.m.trigger(new _.L(_.Pc,{adsTimeline:new QW(a)}));break;case cast.framework.events.EventType.BREAK_CLIP_LOADING:XW(this,_.Fc,a);break;case cast.framework.events.EventType.BREAK_STARTED:XW(this,_.yc,a);break;case cast.framework.events.EventType.BREAK_ENDED:XW(this,_.zc,a);break;case cast.framework.events.EventType.BREAK_CLIP_STARTED:XW(this,
77
- _.Lc,a);break;case cast.framework.events.EventType.BREAK_CLIP_ENDED:a.endedReason===b.SKIPPED?(XW(this,_.Kc,a),XW(this,_.Mc,a)):a.endedReason===b.STOPPED?XW(this,_.Mc,a):a.endedReason===b.END_OF_STREAM?(XW(this,_.Cc,a),XW(this,_.Mc,a)):a.endedReason===b.ERROR&&YW(this,1);break;case cast.framework.events.EventType.PLAYING:XW(this,_.Jc,a);break;case cast.framework.events.EventType.PAUSE:XW(this,_.Hc,a);break;case cast.framework.events.EventType.BUFFERING:a.isBuffering?XW(this,_.Ac,a):XW(this,_.Jc,a)}};
78
- SW.prototype.getPosition=SW.prototype.getPosition;SW.prototype.setVolume=SW.prototype.setVolume;SW.prototype.getVolume=SW.prototype.getVolume;SW.prototype.skip=SW.prototype.skip;SW.prototype.pause=SW.prototype.pause;SW.prototype.resume=SW.prototype.resume;var TW=!1;ZW.prototype.init=function(){cast.framework.CastReceiverContext.getInstance().getPlayerManager().addEventListener($W(),this.a)};ZW.prototype.release=function(){cast.framework.CastReceiverContext.getInstance().getPlayerManager().removeEventListener($W(),this.a)};ZW.prototype.getTimelineCues=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager().getTimedMetadata().map(function(a){return aX(a)})};
79
- ZW.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=_.fi;break;case cast.framework.events.EventType.TIMED_METADATA_ENTER:b=_.hi;break;case cast.framework.events.EventType.TIMED_METADATA_EXIT:b=_.ii}b&&this.nc(new _.L(b,{detail:aX(a.timedMetadataInfo)}))}else for(a=_.w(this.getTimelineCues()),b=a.next();!b.done;b=a.next())this.nc(new _.L(_.fi,{detail:b.value}))};_.x(bX,_.Kk);_.u=bX.prototype;_.u.initialize=function(a){this.m=a;cX().addEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.l)};_.u.release=function(){this.h=[];this.j=[];this.a=this.f=null};_.u.load=function(){};_.u.destroy=function(){this.m=null;cX().removeEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.l)};_.u.getVideoTracks=function(){return[]};_.u.getAudioTracks=function(){return this.h};_.u.ma=function(){return this.j};_.u.qa=function(){return null};
72
+ _.u.Sb=function(){return this.l};_.u.getWrapperAdIds=function(){return[]};_.u.getWrapperAdSystems=function(){return[]};_.u.getWrapperCreativeIds=function(){return[]};WX.prototype.getWrapperCreativeIds=WX.prototype.getWrapperCreativeIds;WX.prototype.getWrapperAdSystems=WX.prototype.getWrapperAdSystems;WX.prototype.getWrapperAdIds=WX.prototype.getWrapperAdIds;WX.prototype.getSequenceLength=WX.prototype.Sb;WX.prototype.getPositionInSequence=WX.prototype.fc;WX.prototype.getPodTimeOffset=WX.prototype.ec;
73
+ WX.prototype.getPodIndex=WX.prototype.getPodIndex;WX.prototype.getPodType=WX.prototype.qb;WX.prototype.getMediaBitrate=WX.prototype.Db;WX.prototype.getMediaHeight=WX.prototype.Qb;WX.prototype.getMediaWidth=WX.prototype.Rb;WX.prototype.getMediaUrl=WX.prototype.getMediaUrl;WX.prototype.getClickThroughUrl=WX.prototype.dc;WX.prototype.isBumper=WX.prototype.Dc;WX.prototype.getSkipTimeOffset=WX.prototype.getSkipTimeOffset;WX.prototype.getDuration=WX.prototype.getDuration;WX.prototype.getTitle=WX.prototype.getTitle;
74
+ WX.prototype.getAdvertiserName=WX.prototype.getAdvertiserName;WX.prototype.getAdSystem=WX.prototype.getAdSystem;WX.prototype.getApiFramework=WX.prototype.getApiFramework;WX.prototype.getCreativeId=WX.prototype.getCreativeId;WX.prototype.getId=WX.prototype.getId;WX.prototype.getTechnology=WX.prototype.Tb;WX.prototype.getAdManagerVersion=WX.prototype.Ob;WX.prototype.getAdManagerName=WX.prototype.Nb;XX.prototype.getCuePoints=function(){return this.a.map(function(a){return a.position})};XX.prototype.hc=function(){return!!this.a.find(function(a){return 0===a.position})};XX.prototype.Fb=function(){return!!this.a.find(function(a){return-1===a.position})};XX.prototype.hasPostroll=XX.prototype.Fb;XX.prototype.hasPreroll=XX.prototype.hc;XX.prototype.getCuePoints=XX.prototype.getCuePoints;_.u=ZX.prototype;_.u.load=function(){var a=this;return _.I(function(b){$X&&($X=!1,eY(a,0));_.C(b)})};_.u.start=function(){return _.I(function(a){YX().play();_.C(a)})};_.u.resume=function(){-1!==this.getPosition()&&YX().play()};_.u.pause=function(){-1!==this.getPosition()&&YX().pause()};_.u.skip=function(){};_.u.getVolume=function(){return this.m.getVolume()||0};_.u.setVolume=function(a){this.m.setVolume(a)};
75
+ _.u.getPosition=function(){var a=this.a&&this.a.getBreakClipCurrentTimeSec();return typeof a===_.k?a:-1};_.u.dispose=function(){var a=this;return _.I(function(b){YX().removeEventListener(a.f,a.h);_.C(b)})};
76
+ _.u.Cj=function(a){var b=cast.framework.events.EndedReason;switch(a.type){case cast.framework.events.EventType.PLAYER_LOADING:this.a=YX().getBreakManager();this.a.setPlayWatchedBreak(!0);a=this.a.getBreaks();this.m.trigger(new _.L(_.Qc,{adsTimeline:new XX(a)}));break;case cast.framework.events.EventType.BREAK_CLIP_LOADING:dY(this,_.Gc,a);break;case cast.framework.events.EventType.BREAK_STARTED:dY(this,_.zc,a);break;case cast.framework.events.EventType.BREAK_ENDED:dY(this,_.Ac,a);break;case cast.framework.events.EventType.BREAK_CLIP_STARTED:dY(this,
77
+ _.Mc,a);break;case cast.framework.events.EventType.BREAK_CLIP_ENDED:a.endedReason===b.SKIPPED?(dY(this,_.Lc,a),dY(this,_.Nc,a)):a.endedReason===b.STOPPED?dY(this,_.Nc,a):a.endedReason===b.END_OF_STREAM?(dY(this,_.Dc,a),dY(this,_.Nc,a)):a.endedReason===b.ERROR&&eY(this,1);break;case cast.framework.events.EventType.PLAYING:dY(this,_.Kc,a);break;case cast.framework.events.EventType.PAUSE:dY(this,_.Ic,a);break;case cast.framework.events.EventType.BUFFERING:a.isBuffering?dY(this,_.Bc,a):dY(this,_.Kc,a)}};
78
+ ZX.prototype.getPosition=ZX.prototype.getPosition;ZX.prototype.setVolume=ZX.prototype.setVolume;ZX.prototype.getVolume=ZX.prototype.getVolume;ZX.prototype.skip=ZX.prototype.skip;ZX.prototype.pause=ZX.prototype.pause;ZX.prototype.resume=ZX.prototype.resume;var $X=!1;fY.prototype.init=function(){cast.framework.CastReceiverContext.getInstance().getPlayerManager().addEventListener(gY(),this.a)};fY.prototype.release=function(){cast.framework.CastReceiverContext.getInstance().getPlayerManager().removeEventListener(gY(),this.a)};fY.prototype.getTimelineCues=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager().getTimedMetadata().map(function(a){return hY(a)})};
79
+ fY.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=_.fi;break;case cast.framework.events.EventType.TIMED_METADATA_ENTER:b=_.hi;break;case cast.framework.events.EventType.TIMED_METADATA_EXIT:b=_.ii}b&&this.nc(new _.L(b,{detail:hY(a.timedMetadataInfo)}))}else for(a=_.w(this.getTimelineCues()),b=a.next();!b.done;b=a.next())this.nc(new _.L(_.fi,{detail:b.value}))};_.x(iY,_.Lk);_.u=iY.prototype;_.u.initialize=function(a){this.m=a;jY().addEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.l)};_.u.release=function(){this.h=[];this.j=[];this.a=this.f=null};_.u.load=function(){};_.u.destroy=function(){this.m=null;jY().removeEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.l)};_.u.getVideoTracks=function(){return[]};_.u.getAudioTracks=function(){return this.h};_.u.ma=function(){return this.j};_.u.qa=function(){return null};
80
80
  _.u.Za=function(){var a=this.pa();return a&&a.renditions[0]};_.u.Ra=function(){var a=this.Ea();return a&&a.renditions[0]};_.u.pb=function(){return null};_.u.Bb=function(){return null};_.u.Cb=function(){return null};_.u.Ta=function(){return null};_.u.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};
81
81
  _.u.Ea=function(){var a=null;if(this.a){var b=this.a.getActiveIds()[0];typeof b===_.k&&(b=b.toString(),a=this.ma().find(function(c){return c.id===b})||null)}return a};_.u.xb=function(){this.g.warn("Video tracks unavailable on Cast")};_.u.Ia=function(a){a&&this.f&&this.f.setActiveById(+a.id)};_.u.Va=function(a){this.a&&(a?this.a.setActiveByIds([+a.id]):this.a.setActiveByIds([]))};_.u.lb=function(){this.g.warn("Video renditions unavailable on Cast")};_.u.vb=function(a){this.Ia(a&&a.track)};
82
82
  _.u.wb=function(a){this.Va(a&&a.track)};
83
- _.u.addTextTrack=function(a){var b=this,c,d,e;return _.I(function(f){if(1==f.a)return c=b.m.getConfiguration(),_.y(f,$V(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]),eX(b)}catch(g){throw b.g.warn("failed on track",
84
- a),g;}}_.C(f)})};_.u.xa=function(){return!0};_.u.Xm=function(){this.f=cX().getAudioTracksManager();var a=this.f.getTracks();this.h=dX(_.gk,a);eX(this);a=this.m.getConfiguration();fX(this,_.gk,a.preferredAudioLanguage,a.preferredAudioRole);fX(this,_.T,a.preferredTextLanguage,a.preferredTextRole)};bX.prototype.isAbrEnabled=bX.prototype.xa;bX.prototype.addTextTrack=bX.prototype.addTextTrack;bX.prototype.setTextRendition=bX.prototype.wb;bX.prototype.setAudioRendition=bX.prototype.vb;
85
- bX.prototype.setVideoRendition=bX.prototype.lb;bX.prototype.setTextTrack=bX.prototype.Va;bX.prototype.setAudioTrack=bX.prototype.Ia;bX.prototype.setVideoTrack=bX.prototype.xb;bX.prototype.getTextTrack=bX.prototype.Ea;bX.prototype.getAudioTrack=bX.prototype.pa;bX.prototype.getVideoTrack=bX.prototype.Ta;bX.prototype.getLoadingTextRendition=bX.prototype.Cb;bX.prototype.getLoadingAudioRendition=bX.prototype.Bb;bX.prototype.getLoadingVideoRendition=bX.prototype.pb;bX.prototype.getTextRendition=bX.prototype.Ra;
86
- bX.prototype.getAudioRendition=bX.prototype.Za;bX.prototype.getVideoRendition=bX.prototype.qa;bX.prototype.getTextTracks=bX.prototype.ma;bX.prototype.getAudioTracks=bX.prototype.getAudioTracks;bX.prototype.getVideoTracks=bX.prototype.getVideoTracks;_.x(gX,_.Wl);_.u=gX.prototype;_.u.init=function(a,b){var c=this;this.C=a;b&&(this.h=this.w=b);var d=hX();d.setMessageInterceptor(cast.framework.messages.MessageType.MEDIA_STATUS,this.vm.bind(this));d.setMediaPlaybackInfoHandler(this.gj.bind(this));this.a=new OW(this);this.a.init();this.j=new bX;this.j.initialize(this);this.o=new ZW(function(e){return c.trigger(e)});this.o.init()};
87
- _.u.unload=function(){var a=cast.framework.messages.PlayerState,b=hX();b.getPlayerState()!==a.IDLE&&b.stop();this.j&&this.j.release();this.o&&this.o.release();this.f=null;return Promise.resolve()};_.u.release=function(){var a=this;return this.unload().then(function(){a.a&&a.a.release()})};_.u.destroy=function(){var a=this;return _.I(function(b){if(1==b.a)return a.C=null,a.w=_.bm(),a.h=a.w,a.l=-1,a.A=null,a.a?_.y(b,a.a.destroy(),3):b.F(2);2!=b.a&&(a.a=null);a.j&&(a.j.destroy(),a.j=null);_.C(b)})};
88
- _.u.play=function(){var a=hX();if(null!==a.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject("Cannot play during ads playout.");a.play();return Promise.resolve()};_.u.pause=function(){var a=hX();if(null!==a.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject("Cannot pause during ads playout.");a.pause();return Promise.resolve()};_.u.isPaused=function(){return hX().getPlayerState()===cast.framework.messages.PlayerState.PAUSED};
89
- _.u.isEnded=function(){return hX().getPlayerState()===cast.framework.messages.PlayerState.IDLE};_.u.seek=function(a){var b=hX();if(null!==b.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject(KV);b.seek(a);return Promise.resolve()};_.u.getPosition=function(){return this.getMediaPosition()};_.u.getMediaPosition=function(){return hX().getCurrentTimeSec()};_.u.getDuration=function(){return this.getMediaDuration()};
90
- _.u.getMediaDuration=function(){var a=hX().getDurationSec();return typeof a===_.k?-1===a?Infinity:a:-1};_.u.getPlaybackRate=function(){return hX().getPlaybackRate()};_.u.setPlaybackRate=function(a){if(0<a){var b=new cast.framework.messages.SetPlaybackRateRequestData;b.playbackRate=a;hX().sendLocalMediaRequest(b)}};_.u.getVolume=function(){return cast.framework.CastReceiverContext.getInstance().getSystemVolume().level||null};_.u.setVolume=function(a){0<=a&&1>=a&&cast.framework.CastReceiverContext.getInstance().setSystemVolumeLevel(a)};
83
+ _.u.addTextTrack=function(a){var b=this,c,d,e;return _.I(function(f){if(1==f.a)return c=b.m.getConfiguration(),_.y(f,gX(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]),lY(b)}catch(g){throw b.g.warn("failed on track",
84
+ a),g;}}_.C(f)})};_.u.xa=function(){return!0};_.u.cn=function(){this.f=jY().getAudioTracksManager();var a=this.f.getTracks();this.h=kY(_.hk,a);lY(this);a=this.m.getConfiguration();mY(this,_.hk,a.preferredAudioLanguage,a.preferredAudioRole);mY(this,_.T,a.preferredTextLanguage,a.preferredTextRole)};iY.prototype.isAbrEnabled=iY.prototype.xa;iY.prototype.addTextTrack=iY.prototype.addTextTrack;iY.prototype.setTextRendition=iY.prototype.wb;iY.prototype.setAudioRendition=iY.prototype.vb;
85
+ iY.prototype.setVideoRendition=iY.prototype.lb;iY.prototype.setTextTrack=iY.prototype.Va;iY.prototype.setAudioTrack=iY.prototype.Ia;iY.prototype.setVideoTrack=iY.prototype.xb;iY.prototype.getTextTrack=iY.prototype.Ea;iY.prototype.getAudioTrack=iY.prototype.pa;iY.prototype.getVideoTrack=iY.prototype.Ta;iY.prototype.getLoadingTextRendition=iY.prototype.Cb;iY.prototype.getLoadingAudioRendition=iY.prototype.Bb;iY.prototype.getLoadingVideoRendition=iY.prototype.pb;iY.prototype.getTextRendition=iY.prototype.Ra;
86
+ iY.prototype.getAudioRendition=iY.prototype.Za;iY.prototype.getVideoRendition=iY.prototype.qa;iY.prototype.getTextTracks=iY.prototype.ma;iY.prototype.getAudioTracks=iY.prototype.getAudioTracks;iY.prototype.getVideoTracks=iY.prototype.getVideoTracks;_.x(nY,_.Xl);_.u=nY.prototype;_.u.init=function(a,b){var c=this;this.C=a;b&&(this.h=this.w=b);var d=oY();d.setMessageInterceptor(cast.framework.messages.MessageType.MEDIA_STATUS,this.Bm.bind(this));d.setMediaPlaybackInfoHandler(this.hj.bind(this));this.a=new VX(this);this.a.init();this.j=new iY;this.j.initialize(this);this.o=new fY(function(e){return c.trigger(e)});this.o.init()};
87
+ _.u.unload=function(){var a=cast.framework.messages.PlayerState,b=oY();b.getPlayerState()!==a.IDLE&&b.stop();this.j&&this.j.release();this.o&&this.o.release();this.f=null;return Promise.resolve()};_.u.release=function(){var a=this;return this.unload().then(function(){a.a&&a.a.release()})};_.u.destroy=function(){var a=this;return _.I(function(b){if(1==b.a)return a.C=null,a.w=_.cm(),a.h=a.w,a.l=-1,a.A=null,a.a?_.y(b,a.a.destroy(),3):b.F(2);2!=b.a&&(a.a=null);a.j&&(a.j.destroy(),a.j=null);_.C(b)})};
88
+ _.u.play=function(){var a=oY();if(null!==a.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject("Cannot play during ads playout.");a.play();return Promise.resolve()};_.u.pause=function(){var a=oY();if(null!==a.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject("Cannot pause during ads playout.");a.pause();return Promise.resolve()};_.u.isPaused=function(){return oY().getPlayerState()===cast.framework.messages.PlayerState.PAUSED};
89
+ _.u.isEnded=function(){return oY().getPlayerState()===cast.framework.messages.PlayerState.IDLE};_.u.seek=function(a){var b=oY();if(null!==b.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject(RW);b.seek(a);return Promise.resolve()};_.u.getPosition=function(){return this.getMediaPosition()};_.u.getMediaPosition=function(){return oY().getCurrentTimeSec()};_.u.getDuration=function(){return this.getMediaDuration()};
90
+ _.u.getMediaDuration=function(){var a=oY().getDurationSec();return typeof a===_.k?-1===a?Infinity:a:-1};_.u.getPlaybackRate=function(){return oY().getPlaybackRate()};_.u.setPlaybackRate=function(a){if(0<a){var b=new cast.framework.messages.SetPlaybackRateRequestData;b.playbackRate=a;oY().sendLocalMediaRequest(b)}};_.u.getVolume=function(){return cast.framework.CastReceiverContext.getInstance().getSystemVolume().level||null};_.u.setVolume=function(a){0<=a&&1>=a&&cast.framework.CastReceiverContext.getInstance().setSystemVolumeLevel(a)};
91
91
  _.u.setMuted=function(a){cast.framework.CastReceiverContext.getInstance().setSystemVolumeMuted(a)};_.u.isMuted=function(){return cast.framework.CastReceiverContext.getInstance().getSystemVolume().muted||null};
92
- _.u.getLoadedSource=function(){var a=hX().getMediaInformation();if(a){var b=hX().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,$n:b,name:c}}return null};_.u.getDrmInfo=function(){return null};_.u.getPresentationStartTime=function(){return hX().getStartAbsoluteTime()};
93
- _.u.getSeekRange=function(){var a={start:0,end:this.getDuration()};if(this.isLive()){var b=hX().getLiveSeekableRange();b&&typeof b.start===_.k&&typeof b.end===_.k&&(a={start:b.start,end:b.end})}return a};_.u.getState=function(){return this.a?this.a.getState():_.mp};
94
- _.u.getStats=function(){var a=_.hp();if(this.f){a=hX().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.h=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};_.u.isLive=function(){return Infinity===this.getDuration()};
95
- _.u.load=function(a){var b=this,c,d;return _.I(function(e){b.f=new _.gp;b.a.j=b.f.a;b.A=_.Dp(a);b.h=_.dm(b.w,a);if(b.D)return b.D=!1,e["return"]();c=b.A[b.l];d=new cast.framework.messages.LoadRequestData;d.autoplay=b.h.autoplay;typeof b.h.startTime===_.k&&(d.currentTime=b.h.startTime);c.type&&(d.media.contentType=c.type);d.media.contentId=c.url;d.media.customData={playerConfiguration:YV(b.h),local:!0};return _.y(e,hX().load(d),0)})};_.u.getBufferInfo=function(){this.g.warn(_.va);return new _.Vl};
96
- _.u.getTrackManager=function(){return this.j};_.u.getConfiguration=function(){return this.h};_.u.getSurface=function(){return this.C};_.u.getTimeline=function(){return null};_.u.setupPlaylist=function(){return Promise.reject(_.Hb)};_.u.appendLoad=function(){return Promise.reject(_.Hb)};_.u.seekWith=function(){return Promise.reject(_.Hb)};_.u.setNetworkEngine=function(a){this.G=a};_.u.getNetworkEngine=function(){return this.G};_.u.getSourceIndex=function(){return this.l};
97
- _.u.setSourceIndex=function(a){this.l=a};_.u.getPeriods=function(){return[]};_.u.namespace=function(){return SV};_.u.getTimelineCues=function(){return this.o&&this.o.getTimelineCues()||[]};_.u.resetAbr=function(){this.g.warn(OV)};_.u.onError=function(a){this.trigger(new _.L(_.se,{detail:a}))};_.u.canPlay=function(){return _.dl()?2:0};
98
- _.u.vm=function(a){a=Object.assign({},a);a.customData||(a.customData={});a.customData.stats=YV(this.getStats());var b=hX(),c=a.media||b.getMediaInformation();b=b.getStartAbsoluteTime();c&&typeof b===_.k&&c.startAbsoluteTime!==b&&(this.g.info("Syncing startAbsoluteTime.Old value: "+(c.startAbsoluteTime+", new value: ")+b),c.startAbsoluteTime=b,a=Object.assign({},a,{media:c}));c=cast.framework.messages.StreamType;b=a.media;var d=!!b,e=this.isLive(),f=d&&!b.metadata,g=!!a.liveSeekableRange;if(d&&g&&
99
- (!e||e&&f)){d=hX().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};_.u.gj=function(a,b){var c=null;a.media.customData&&(c=ZV(a.media.customData.playerConfiguration));var d=c?c.abr:null;d&&typeof d.defaultBandwidthEstimate===_.k?b.initialBandwidth=d.defaultBandwidthEstimate:b.initialBandwidth=void 0;kX(c,b);return b};
100
- _.u.getTextDisplayer=function(){return null};_.u.setDrmCustomDataModifier=function(){};_.u.setCdnErrorCallback=function(){};_.u.detach=function(){};gX.prototype.getTextDisplayer=gX.prototype.getTextDisplayer;gX.prototype.getNetworkEngine=gX.prototype.getNetworkEngine;gX.prototype.setNetworkEngine=gX.prototype.setNetworkEngine;_.u=lX.prototype;_.u.init=function(a){var b=this;a&&(this.f=new gX,_.Jq(a,this.f),this.m=a,this.o.on(window,"unload",function(){return _.I(function(c){return b.m&&b.m.getState()!==_.lp?_.y(c,WV(b.m),0):c.F(0)})}))};
101
- _.u.start=function(){if(!this.a&&window.cast&&cast.framework&&cast.framework.CastReceiverContext){this.a=!0;var a=oX(),b=oX().getPlayerManager(),c=new cast.framework.CastReceiverOptions;c.customNamespaces={};c.customNamespaces[UV]=cast.framework.system.MessageType.JSON;c.shakaVersion="4.3.4";var d=new cast.framework.PlaybackConfig;d.manifestHandler=this.Ql.bind(this);d.shakaConfig={streaming:{ignoreTextStreamFailures:!0}};d.enableSmoothLiveRefresh=!0;c.playbackConfig=d;if(d=this.m&&this.m.getSurface().getMedia())c.mediaElement=
102
- d;c.disableIdleTimeout=!0;c.maxInactivity=Infinity;b.setMessageInterceptor(cast.framework.messages.MessageType.LOAD,this.Ol.bind(this));b.addEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.A);a.start(c);a.addCustomMessageListener(UV,this.w)}};
103
- _.u.stop=function(){if(this.a){this.a=!1;this.o.release();var a=oX();oX().getPlayerManager().removeEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.A);a.removeCustomMessageListener(UV,this.w);a.stop();this.m=this.f=null}};_.u.me=function(a){this.j=a};_.u.ln=function(a){this.l=a};_.u.on=function(a,b){oX().addEventListener(a,b)};_.u.off=function(a,b){oX().removeEventListener(a,b)};_.u.addMessageListener=function(a){typeof a===_.ve&&this.h.add(a)};
104
- _.u.removeMessageListener=function(a){typeof a===_.ve&&this.h["delete"](a)};_.u.sendMessage=function(a,b){oX().sendCustomMessage(UV,b,YV(a))};_.u.Cc=function(){return this.a};_.u.Ab=function(){var a=oX().getPlayerManager().getMediaInformation();return a&&a.metadata?a.metadata:null};
105
- _.u.Ql=function(a){a=a.trim();if(a.startsWith("#EXTM3U"))return qX(this,a);try{var b=(new DOMParser).parseFromString(a,_.rg)}catch(t){return a}var c=b.getElementsByTagName("MPD")[0];if(c){a=c;this.g.debug("Detected DASH, parsing");b=oX();c=a.getElementsByTagName("Period");for(var d=c.length-1;0<=d;--d){for(var e=c[d].getElementsByTagName(_.ka),f=e.length-1;0<=f;--f){var g=e[f].getAttribute("contentType");if(g===_.r||g===_.bd){g=e[f].getAttribute(_.Se);for(var h=e[f].getElementsByTagName(_.Ub),l=h.length-
106
- 1;0<=l;--l){var m=h[l].getAttribute(_.Se)||g,n=h[l].getAttribute(_.Nd),p=h[l].getAttribute(_.Wg)||void 0,q=h[l].getAttribute(_.we)||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(_.Ub).length||c[d].removeChild(e[f])}}c[d].getElementsByTagName(_.ka).length||a.removeChild(c[d])}return(new XMLSerializer).serializeToString(a)}if(c=b.getElementsByTagName(_.dc)[0]){a=c;this.g.debug("Detected Smooth, parsing");b=oX();c=a.getElementsByTagName("StreamIndex");
107
- for(d=c.length-1;0<=d;--d)if(c[d].getAttribute("Type")===_.r){e=c[d].getElementsByTagName(_.Sb);for(f=e.length-1;0<=f;--f)g=e[f].getAttribute(_.zb)||void 0,h=e[f].getAttribute(_.yb)||void 0,void 0!==g&&(g=+g),void 0!==h&&(h=+h),b.canDisplayType(_.Gg,void 0,g,h)||c[d].removeChild(e[f]);c[d].getElementsByTagName(_.Sb).length||a.removeChild(c[d])}a=(new XMLSerializer).serializeToString(a)}return a};
108
- _.u.Ol=function(a){var b=this,c,d,e,f,g,h;return _.I(function(l){switch(l.a){case 1:c=a;c.media.customData&&(d=ZV(c.media.customData.playerConfiguration));if(!b.m||!d){l.F(2);break}if(!b.j){l.F(3);break}return _.y(l,Promise.resolve(b.j(d)),4);case 4:d=(e=l.f)||d;case 3:if(!d.ima){l.F(5);break}return _.y(l,VW(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.F(7);
109
- break}b.f.D=!0;return _.y(l,_.Tq(b.m,d),8);case 8:return _.y(l,_.Uq(b.m),9);case 9:f=b.m.getLoadedSource(),c.media.contentId=f.url,c.media.contentType=f.type,f.Wb&&(c.media.hlsVideoSegmentFormat=aW(f.Wb,_.hk)),f.audioMimeType&&(c.media.hlsSegmentFormat=aW(f.audioMimeType,_.gk));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.F(10);
110
- break}return _.y(l,Promise.resolve(b.l(c)),11);case 11:(h=l.f)&&(c=h);case 10:return l["return"](c)}})};_.u.sm=function(a){if(this.m&&(!a.media.customData||!a.media.customData.local)){a=_.O.Gl;var b=oX().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))}_.Qq(this.m)}};
111
- _.u.vj=function(a){if(0<this.h.size){var b=ZV(a.data);this.h.forEach(function(c){return c(b)})}};_.J(TV,lX);lX.prototype.getContentMetadata=lX.prototype.Ab;lX.prototype.isApiReady=lX.prototype.Cc;lX.prototype.sendMessage=lX.prototype.sendMessage;lX.prototype.removeMessageListener=lX.prototype.removeMessageListener;lX.prototype.addMessageListener=lX.prototype.addMessageListener;lX.prototype.off=lX.prototype.off;lX.prototype.on=lX.prototype.on;lX.prototype.setLoadRequestDataInterceptor=lX.prototype.ln;
112
- lX.prototype.setPlayerConfigInterceptor=lX.prototype.me;lX.prototype.stop=lX.prototype.stop;lX.prototype.start=lX.prototype.start;lX.prototype.init=lX.prototype.init;lX.getInstance=nX;var mX=null;_.u=rX.prototype;_.u.load=function(){var a=this,b,c,d,e,f;return _.I(function(g){a.a=a.f.l;if(a.a)for(b=a.a.controller,c=a.Gm.bind(a),d=_.w(a.j),e=d.next();!e.done;e=d.next())f=e.value,a.h.on(b,f,c);_.C(g)})};_.u.start=function(){return _.I(function(a){_.C(a)})};_.u.resume=function(){this.a&&this.a.isPlayingBreak&&this.a.isPaused&&this.a.controller.playOrPause()};_.u.pause=function(){this.a&&this.a.isPlayingBreak&&!this.a.isPaused&&this.a.controller.playOrPause()};
113
- _.u.skip=function(){var a=this.f.a;a&&this.f.sendMessage(VV,{type:"SKIP_AD",requestId:Math.round(1E3*Math.random()),mediaSessionId:a.mediaSessionId})};_.u.getVolume=function(){return this.f.getVolume()||0};_.u.setVolume=function(a){this.f.setVolume(a)};_.u.getPosition=function(){var a=-1,b=this.f.a;b&&(b=b.getEstimatedBreakClipTime(),typeof b===_.k&&(a=b));return a};_.u.dispose=function(){var a=this;return _.I(function(b){a.h.release();_.C(b)})};
114
- _.u.Gm=function(a){switch(a.field){case "mediaInfo":a.value&&(a=a.value,a.breaks&&this.f.trigger(new _.L(_.Pc,{adsTimeline:new QW(a.breaks)})));break;case "isPlayingBreak":a.value?tX(this,_.yc):(tX(this,_.Cc),tX(this,_.Mc),tX(this,_.zc));break;case "currentBreakClipNumber":0<=a.value&&(0<a.value&&(tX(this,_.Cc),tX(this,_.Mc)),tX(this,_.Lc));break;case "isPaused":this.a.isPlayingBreak&&(a.value?tX(this,_.Hc):tX(this,_.Jc))}};rX.prototype.getPosition=rX.prototype.getPosition;
115
- rX.prototype.setVolume=rX.prototype.setVolume;rX.prototype.getVolume=rX.prototype.getVolume;rX.prototype.skip=rX.prototype.skip;rX.prototype.pause=rX.prototype.pause;rX.prototype.resume=rX.prototype.resume;uX.prototype.name=function(){return"clpp.cast.ads.SenderAdsManagerFactory"};uX.prototype.isSupported=function(a,b){return a.namespace()!==_.Fd?!1:!(!b||!b.ima)};uX.prototype.create=function(a){return new rX(a.a)};uX.prototype.create=uX.prototype.create;uX.prototype.isSupported=uX.prototype.isSupported;uX.prototype.name=uX.prototype.name;_.Tp(new uX);vX.prototype.name=function(){return"clpp.cast.ads.AdsManagerFactory"};vX.prototype.isSupported=function(a,b){return nX().Cc()?!(!b||!b.ima):!1};vX.prototype.create=function(a){return new SW(a)};vX.prototype.create=vX.prototype.create;vX.prototype.isSupported=vX.prototype.isSupported;vX.prototype.name=vX.prototype.name;_.Tp(new vX);};
92
+ _.u.getLoadedSource=function(){var a=oY().getMediaInformation();if(a){var b=oY().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,ho:b,name:c}}return null};_.u.getDrmInfo=function(){return null};_.u.getPresentationStartTime=function(){return oY().getStartAbsoluteTime()};
93
+ _.u.getSeekRange=function(){var a={start:0,end:this.getDuration()};if(this.isLive()){var b=oY().getLiveSeekableRange();b&&typeof b.start===_.k&&typeof b.end===_.k&&(a={start:b.start,end:b.end})}return a};_.u.getState=function(){return this.a?this.a.getState():_.np};
94
+ _.u.getStats=function(){var a=_.ip();if(this.f){a=oY().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.h=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};_.u.isLive=function(){return Infinity===this.getDuration()};
95
+ _.u.load=function(a){var b=this,c,d;return _.I(function(e){b.f=new _.hp;b.a.j=b.f.a;b.A=_.Ep(a);b.h=_.em(b.w,a);if(b.D)return b.D=!1,e["return"]();c=b.A[b.l];d=new cast.framework.messages.LoadRequestData;d.autoplay=b.h.autoplay;typeof b.h.startTime===_.k&&(d.currentTime=b.h.startTime);c.type&&(d.media.contentType=c.type);d.media.contentId=c.url;d.media.customData={playerConfiguration:eX(b.h),local:!0};return _.y(e,oY().load(d),0)})};_.u.getBufferInfo=function(){this.g.warn(_.va);return new _.Wl};
96
+ _.u.getTrackManager=function(){return this.j};_.u.getConfiguration=function(){return this.h};_.u.getSurface=function(){return this.C};_.u.getTimeline=function(){return null};_.u.setupPlaylist=function(){return Promise.reject(_.Ib)};_.u.appendLoad=function(){return Promise.reject(_.Ib)};_.u.seekWith=function(){return Promise.reject(_.Ib)};_.u.setNetworkEngine=function(a){this.G=a};_.u.getNetworkEngine=function(){return this.G};_.u.getSourceIndex=function(){return this.l};
97
+ _.u.setSourceIndex=function(a){this.l=a};_.u.getPeriods=function(){return[]};_.u.namespace=function(){return ZW};_.u.getTimelineCues=function(){return this.o&&this.o.getTimelineCues()||[]};_.u.resetAbr=function(){this.g.warn(VW)};_.u.onError=function(a){this.trigger(new _.L(_.te,{detail:a}))};_.u.canPlay=function(){return _.el()?2:0};
98
+ _.u.Bm=function(a){a=Object.assign({},a);a.customData||(a.customData={});a.customData.stats=eX(this.getStats());var b=oY(),c=a.media||b.getMediaInformation();b=b.getStartAbsoluteTime();c&&typeof b===_.k&&c.startAbsoluteTime!==b&&(this.g.info("Syncing startAbsoluteTime.Old value: "+(c.startAbsoluteTime+", new value: ")+b),c.startAbsoluteTime=b,a=Object.assign({},a,{media:c}));c=cast.framework.messages.StreamType;b=a.media;var d=!!b,e=this.isLive(),f=d&&!b.metadata,g=!!a.liveSeekableRange;if(d&&g&&
99
+ (!e||e&&f)){d=oY().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};_.u.hj=function(a,b){var c=null;a.media.customData&&(c=fX(a.media.customData.playerConfiguration));var d=c?c.abr:null;d&&typeof d.defaultBandwidthEstimate===_.k?b.initialBandwidth=d.defaultBandwidthEstimate:b.initialBandwidth=void 0;rY(c,b);return b};
100
+ _.u.getTextDisplayer=function(){return null};_.u.setDrmCustomDataModifier=function(){};_.u.setCdnErrorCallback=function(){};_.u.detach=function(){};nY.prototype.getTextDisplayer=nY.prototype.getTextDisplayer;nY.prototype.getNetworkEngine=nY.prototype.getNetworkEngine;nY.prototype.setNetworkEngine=nY.prototype.setNetworkEngine;_.u=sY.prototype;_.u.init=function(a){var b=this;a&&(this.f=new nY,_.Kq(a,this.f),this.m=a,this.o.on(window,"unload",function(){return _.I(function(c){return b.m&&b.m.getState()!==_.mp?_.y(c,cX(b.m),0):c.F(0)})}))};
101
+ _.u.start=function(){if(!this.a&&window.cast&&cast.framework&&cast.framework.CastReceiverContext){this.a=!0;var a=vY(),b=vY().getPlayerManager(),c=new cast.framework.CastReceiverOptions;c.customNamespaces={};c.customNamespaces[aX]=cast.framework.system.MessageType.JSON;c.shakaVersion="4.3.4";var d=new cast.framework.PlaybackConfig;d.manifestHandler=this.Ul.bind(this);d.shakaConfig={streaming:{ignoreTextStreamFailures:!0}};d.enableSmoothLiveRefresh=!0;c.playbackConfig=d;if(d=this.m&&this.m.getSurface().getMedia())c.mediaElement=
102
+ d;c.disableIdleTimeout=!0;c.maxInactivity=Infinity;b.setMessageInterceptor(cast.framework.messages.MessageType.LOAD,this.Sl.bind(this));b.addEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.A);a.start(c);a.addCustomMessageListener(aX,this.w)}};
103
+ _.u.stop=function(){if(this.a){this.a=!1;this.o.release();var a=vY();vY().getPlayerManager().removeEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.A);a.removeCustomMessageListener(aX,this.w);a.stop();this.m=this.f=null}};_.u.ne=function(a){this.j=a};_.u.sn=function(a){this.l=a};_.u.on=function(a,b){vY().addEventListener(a,b)};_.u.off=function(a,b){vY().removeEventListener(a,b)};_.u.addMessageListener=function(a){typeof a===_.we&&this.h.add(a)};
104
+ _.u.removeMessageListener=function(a){typeof a===_.we&&this.h["delete"](a)};_.u.sendMessage=function(a,b){vY().sendCustomMessage(aX,b,eX(a))};_.u.Cc=function(){return this.a};_.u.Ab=function(){var a=vY().getPlayerManager().getMediaInformation();return a&&a.metadata?a.metadata:null};
105
+ _.u.Ul=function(a){a=a.trim();if(a.startsWith("#EXTM3U"))return xY(this,a);try{var b=(new DOMParser).parseFromString(a,_.sg)}catch(t){return a}var c=b.getElementsByTagName("MPD")[0];if(c){a=c;this.g.debug("Detected DASH, parsing");b=vY();c=a.getElementsByTagName("Period");for(var d=c.length-1;0<=d;--d){for(var e=c[d].getElementsByTagName(_.ka),f=e.length-1;0<=f;--f){var g=e[f].getAttribute("contentType");if(g===_.r||g===_.cd){g=e[f].getAttribute(_.Se);for(var h=e[f].getElementsByTagName(_.Vb),l=h.length-
106
+ 1;0<=l;--l){var m=h[l].getAttribute(_.Se)||g,n=h[l].getAttribute(_.Od),p=h[l].getAttribute(_.Xg)||void 0,q=h[l].getAttribute(_.xe)||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(_.Vb).length||c[d].removeChild(e[f])}}c[d].getElementsByTagName(_.ka).length||a.removeChild(c[d])}return(new XMLSerializer).serializeToString(a)}if(c=b.getElementsByTagName(_.ec)[0]){a=c;this.g.debug("Detected Smooth, parsing");b=vY();c=a.getElementsByTagName("StreamIndex");
107
+ for(d=c.length-1;0<=d;--d)if(c[d].getAttribute("Type")===_.r){e=c[d].getElementsByTagName(_.Tb);for(f=e.length-1;0<=f;--f)g=e[f].getAttribute(_.Ab)||void 0,h=e[f].getAttribute(_.zb)||void 0,void 0!==g&&(g=+g),void 0!==h&&(h=+h),b.canDisplayType(_.Hg,void 0,g,h)||c[d].removeChild(e[f]);c[d].getElementsByTagName(_.Tb).length||a.removeChild(c[d])}a=(new XMLSerializer).serializeToString(a)}return a};
108
+ _.u.Sl=function(a){var b=this,c,d,e,f,g,h;return _.I(function(l){switch(l.a){case 1:c=a;c.media.customData&&(d=fX(c.media.customData.playerConfiguration));if(!b.m||!d){l.F(2);break}if(!b.j){l.F(3);break}return _.y(l,Promise.resolve(b.j(d)),4);case 4:d=(e=l.f)||d;case 3:if(!d.ima){l.F(5);break}return _.y(l,bY(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.F(7);
109
+ break}b.f.D=!0;return _.y(l,_.Uq(b.m,d),8);case 8:return _.y(l,_.Vq(b.m),9);case 9:f=b.m.getLoadedSource(),c.media.contentId=f.url,c.media.contentType=f.type,f.Wb&&(c.media.hlsVideoSegmentFormat=hX(f.Wb,_.ik)),f.audioMimeType&&(c.media.hlsSegmentFormat=hX(f.audioMimeType,_.hk));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.F(10);
110
+ break}return _.y(l,Promise.resolve(b.l(c)),11);case 11:(h=l.f)&&(c=h);case 10:return l["return"](c)}})};_.u.ym=function(a){if(this.m&&(!a.media.customData||!a.media.customData.local)){a=_.O.Kl;var b=vY().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))}_.Rq(this.m)}};
111
+ _.u.wj=function(a){if(0<this.h.size){var b=fX(a.data);this.h.forEach(function(c){return c(b)})}};_.J($W,sY);sY.prototype.getContentMetadata=sY.prototype.Ab;sY.prototype.isApiReady=sY.prototype.Cc;sY.prototype.sendMessage=sY.prototype.sendMessage;sY.prototype.removeMessageListener=sY.prototype.removeMessageListener;sY.prototype.addMessageListener=sY.prototype.addMessageListener;sY.prototype.off=sY.prototype.off;sY.prototype.on=sY.prototype.on;sY.prototype.setLoadRequestDataInterceptor=sY.prototype.sn;
112
+ sY.prototype.setPlayerConfigInterceptor=sY.prototype.ne;sY.prototype.stop=sY.prototype.stop;sY.prototype.start=sY.prototype.start;sY.prototype.init=sY.prototype.init;sY.getInstance=uY;var tY=null;_.u=yY.prototype;_.u.load=function(){var a=this,b,c,d,e,f;return _.I(function(g){a.a=a.f.l;if(a.a)for(b=a.a.controller,c=a.Mm.bind(a),d=_.w(a.j),e=d.next();!e.done;e=d.next())f=e.value,a.h.on(b,f,c);_.C(g)})};_.u.start=function(){return _.I(function(a){_.C(a)})};_.u.resume=function(){this.a&&this.a.isPlayingBreak&&this.a.isPaused&&this.a.controller.playOrPause()};_.u.pause=function(){this.a&&this.a.isPlayingBreak&&!this.a.isPaused&&this.a.controller.playOrPause()};
113
+ _.u.skip=function(){var a=this.f.a;a&&this.f.sendMessage(bX,{type:"SKIP_AD",requestId:Math.round(1E3*Math.random()),mediaSessionId:a.mediaSessionId})};_.u.getVolume=function(){return this.f.getVolume()||0};_.u.setVolume=function(a){this.f.setVolume(a)};_.u.getPosition=function(){var a=-1,b=this.f.a;b&&(b=b.getEstimatedBreakClipTime(),typeof b===_.k&&(a=b));return a};_.u.dispose=function(){var a=this;return _.I(function(b){a.h.release();_.C(b)})};
114
+ _.u.Mm=function(a){switch(a.field){case "mediaInfo":a.value&&(a=a.value,a.breaks&&this.f.trigger(new _.L(_.Qc,{adsTimeline:new XX(a.breaks)})));break;case "isPlayingBreak":a.value?AY(this,_.zc):(AY(this,_.Dc),AY(this,_.Nc),AY(this,_.Ac));break;case "currentBreakClipNumber":0<=a.value&&(0<a.value&&(AY(this,_.Dc),AY(this,_.Nc)),AY(this,_.Mc));break;case "isPaused":this.a.isPlayingBreak&&(a.value?AY(this,_.Ic):AY(this,_.Kc))}};yY.prototype.getPosition=yY.prototype.getPosition;
115
+ yY.prototype.setVolume=yY.prototype.setVolume;yY.prototype.getVolume=yY.prototype.getVolume;yY.prototype.skip=yY.prototype.skip;yY.prototype.pause=yY.prototype.pause;yY.prototype.resume=yY.prototype.resume;BY.prototype.name=function(){return"clpp.cast.ads.SenderAdsManagerFactory"};BY.prototype.isSupported=function(a,b){return a.namespace()!==_.Gd?!1:!(!b||!b.ima)};BY.prototype.create=function(a){return new yY(a.a)};BY.prototype.create=BY.prototype.create;BY.prototype.isSupported=BY.prototype.isSupported;BY.prototype.name=BY.prototype.name;_.Up(new BY);CY.prototype.name=function(){return"clpp.cast.ads.AdsManagerFactory"};CY.prototype.isSupported=function(a,b){return uY().Cc()?!(!b||!b.ima):!1};CY.prototype.create=function(a){return new ZX(a)};CY.prototype.create=CY.prototype.create;CY.prototype.isSupported=CY.prototype.isSupported;CY.prototype.name=CY.prototype.name;_.Up(new CY);};
116
116
  if(typeof(module)!="undefined"&&module.exports){var x=require("./cl.core.js");_ = x._;(f.call(g,this));module.exports=g;}
117
117
  else if (typeof(define)!="undefined"&&define.amd) {define(["./cl.core"], function(c){_=c._;(f.call(g,this));return g;});}
118
118
  else{_=this.clpp._;(f.call(g,this));}