@viewlift/player-backup 2.0.96-backup → 2.0.96-smartTv-test1

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 (91) hide show
  1. package/cjs/autoNextVideo-630079de.js +1 -0
  2. package/cjs/browser-38ff3331.js +1 -0
  3. package/cjs/bundle.css +1620 -33
  4. package/cjs/{caption-settings-5c1f7b67.js → caption-settings-d31caa42.js} +1 -1
  5. package/cjs/captions-bc814903.js +1 -0
  6. package/cjs/{features-07fdfbf2.js → features-0814a0a4.js} +1 -1
  7. package/cjs/generic-ac6915a3.js +1 -0
  8. package/cjs/index-173955be.js +1 -0
  9. package/cjs/index-467f3c17.js +1 -0
  10. package/cjs/index.js +1 -1
  11. package/cjs/{multicamv2-c31baae6.js → multicamv2-d7fd65e9.js} +1 -1
  12. package/cjs/{multicamv2-048e9ae5.js → multicamv2-ec8d5060.js} +1 -1
  13. package/cjs/{nextEpisodeButton-3b022b8f.js → nextEpisodeButton-aede1150.js} +1 -1
  14. package/cjs/{playlist-14b2faaf.js → playlist-837fa123.js} +1 -1
  15. package/cjs/renditions-7fe52e97.js +1 -0
  16. package/cjs/{resolution-e46c9615.js → resolution-0a6680be.js} +1 -1
  17. package/cjs/{series-201db969.js → series-af700fb7.js} +1 -1
  18. package/cjs/series-v2-2105fd89.js +1 -0
  19. package/cjs/{series-v2-3ef3be0a.js → series-v2-5be92f0f.js} +1 -1
  20. package/cjs/series-v2-a51ee822.js +1 -0
  21. package/cjs/{settings-icon-6f9e9a90.js → settings-icon-dbfe75ab.js} +1 -1
  22. package/cjs/{skin-8dcda2d4.js → skin-13a2a94d.js} +1 -1
  23. package/cjs/{skin-33248e57.js → skin-19da0fd5.js} +1 -1
  24. package/cjs/skin-2b041920.js +1 -0
  25. package/cjs/{skin-f4cb5be7.js → skin-3ee6a08f.js} +1 -1
  26. package/cjs/{skin-cddb4ce1.js → skin-97501399.js} +1 -1
  27. package/cjs/skin-e4570995.js +1 -0
  28. package/cjs/skin-eca7096f.js +1 -0
  29. package/cjs/skin-f87e1c22.js +1 -0
  30. package/cjs/util-e1bc715c.js +1 -0
  31. package/cjs/{videoSelector-dce708c0.js → videoSelector-3293b6ce.js} +1 -1
  32. package/cjs/{videoSelector-8ef9ec73.js → videoSelector-5268ef13.js} +1 -1
  33. package/esm/autoNextVideo-25176f20.js +1 -0
  34. package/esm/browser-512cd55a.js +1 -0
  35. package/esm/bundle.css +1620 -33
  36. package/esm/{caption-settings-8804cef9.js → caption-settings-5e4c50d1.js} +1 -1
  37. package/esm/captions-bbc7eb98.js +1 -0
  38. package/esm/{features-4f479c67.js → features-540ec36b.js} +1 -1
  39. package/esm/generic-a4cc0314.js +1 -0
  40. package/esm/index-5a7423a2.js +1 -0
  41. package/esm/index-f1f0cece.js +1 -0
  42. package/esm/index.js +1 -1
  43. package/esm/{multicamv2-93b415f6.js → multicamv2-3bb84e58.js} +1 -1
  44. package/esm/{multicamv2-a5915be0.js → multicamv2-4dce7c00.js} +1 -1
  45. package/esm/{nextEpisodeButton-df6e9d73.js → nextEpisodeButton-2574d5c2.js} +1 -1
  46. package/esm/{playlist-30ca3b74.js → playlist-d178a6f0.js} +1 -1
  47. package/esm/renditions-05558f5d.js +1 -0
  48. package/esm/{resolution-920515d1.js → resolution-73611ca6.js} +1 -1
  49. package/esm/{series-ac83a128.js → series-774e5a42.js} +1 -1
  50. package/esm/series-v2-11dd925b.js +1 -0
  51. package/esm/series-v2-6e9853f8.js +1 -0
  52. package/esm/{series-v2-eb8252bd.js → series-v2-e141d362.js} +1 -1
  53. package/esm/{settings-icon-7e5f9a3a.js → settings-icon-e08003bf.js} +1 -1
  54. package/esm/skin-0195076b.js +1 -0
  55. package/esm/skin-2073cadc.js +1 -0
  56. package/esm/{skin-b121228d.js → skin-2c9519de.js} +1 -1
  57. package/esm/{skin-bc2d0757.js → skin-3986afad.js} +1 -1
  58. package/esm/{skin-66fc3448.js → skin-5be717a2.js} +1 -1
  59. package/esm/{skin-c0a47a00.js → skin-651a96b2.js} +1 -1
  60. package/esm/skin-86e7e2b5.js +1 -0
  61. package/esm/skin-c09b1530.js +1 -0
  62. package/esm/util-f9af2f94.js +1 -0
  63. package/esm/{videoSelector-994c8adf.js → videoSelector-3e0d433e.js} +1 -1
  64. package/esm/{videoSelector-1e40c9c3.js → videoSelector-4c81e19f.js} +1 -1
  65. package/package.json +7 -4
  66. package/cjs/autoNextVideo-948fb789.js +0 -1
  67. package/cjs/browser-77c57718.js +0 -1
  68. package/cjs/captions-07bd3069.js +0 -1
  69. package/cjs/generic-77c1578a.js +0 -1
  70. package/cjs/index-898638ad.js +0 -1
  71. package/cjs/index-b0ccbe15.js +0 -1
  72. package/cjs/renditions-fed22c12.js +0 -1
  73. package/cjs/series-v2-68886cd2.js +0 -1
  74. package/cjs/series-v2-ad373805.js +0 -1
  75. package/cjs/skin-3544db58.js +0 -1
  76. package/cjs/skin-a35b3781.js +0 -1
  77. package/cjs/skin-d21404a5.js +0 -1
  78. package/cjs/util-ef2cd61e.js +0 -1
  79. package/esm/autoNextVideo-613b5bf9.js +0 -1
  80. package/esm/browser-d4613b36.js +0 -1
  81. package/esm/captions-b7fd8308.js +0 -1
  82. package/esm/generic-76d748e7.js +0 -1
  83. package/esm/index-810dc03a.js +0 -1
  84. package/esm/index-cd5ceb95.js +0 -1
  85. package/esm/renditions-4c09c626.js +0 -1
  86. package/esm/series-v2-60e9a3f5.js +0 -1
  87. package/esm/series-v2-8a8b6f0c.js +0 -1
  88. package/esm/skin-49e82d7e.js +0 -1
  89. package/esm/skin-58b9263c.js +0 -1
  90. package/esm/skin-aa8bb069.js +0 -1
  91. package/esm/util-80257541.js +0 -1
@@ -1 +0,0 @@
1
- "use strict";require("video.js/dist/video-js.min.css");var e=require("./generic-77c1578a.js"),n=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/asyncToGenerator"),r=require("@babel/runtime/regenerator"),o=require("video.js"),i=require("./util-ef2cd61e.js"),l=require("./captions-07bd3069.js"),a=require("./renditions-fed22c12.js"),u=require("./resolution-e46c9615.js"),s=require("./skin-3544db58.js"),c=require("./browser-77c57718.js"),d=require("./localisation-56e0a999.js"),v=require("@babel/runtime/helpers/typeof"),f=require("@babel/runtime/helpers/toConsumableArray"),p=require("@babel/runtime/helpers/slicedToArray"),m=function(e){return new Promise(function(n,t){if(y(e))t("".concat(e," is alread initialised"));else{var r=document.createElement("script");r.async=!0,r.src=e,r.onload=function(){n()},r.onerror=function(n){t("Error while loading script ".concat(e," : ").concat(n))},document.head.appendChild(r)}})},y=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},g=function(e,n,t){var r=s.getPlayer(e);if(r)if(n>=0&&n<=100){r.muted()&&r.muted(!1);var o=parseFloat(n)/100;r.volume(o),t&&t({status:!0,msg:"Volume set to ".concat(n,"%")})}else t&&t({status:!1,msg:"Please enter a valid volume percentage (0 ≥ V ≤ 100)"});else t({status:!1,msg:"Cannot find player with id: '".concat(e,"'")})},h=function(e){var n=s.getPlayer(e);return n?parseInt(100*n.volume())+"%":"Cannot find player with id: '".concat(e,"'")},b=function(){var e=t(r.mark(function e(n){var t,i,l,a,u;return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(i=s.getPlayer(null==n?void 0:n.playerId),null!=n&&null!==(t=n.series)&&void 0!==t&&t.enable||null==n||!n.chromecastReceiverId){e.next=22;break}return e.next=4,import("@silvermine/videojs-chromecast");case 4:return a=e.sent,e.prev=5,e.next=8,m("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1");case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(5),console.log("Error",e.t0);case 13:return e.prev=13,a.default(o),e.finish(13);case 16:(u=o.getTech("chromecast"))&&!u.prototype.seeking&&(u.prototype.seeking=function(){}),null!==(l=window)&&void 0!==l&&l.cast?null==i||i.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}):window.__onGCastApiAvailable=function(){null==i||i.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0})},e.next=23;break;case 22:console.log("Chromecast plugin is not available");case 23:null!=n&&n.airplay&&"Safari"==c.detectBrowser()?null==i||i.airPlay({addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5}):console.log("AirPlay plugin is not available");case 24:case"end":return e.stop()}},e,null,[[5,10,13,16]])}));return function(n){return e.apply(this,arguments)}}(),w=function(e,n){var t=s.getPlayer(e);t&&n&&t.controlBar&&t.controlBar.progressControl.seekBar.on("click",function(n){var t,r,i,l,a,u=this.el(),s=o.dom.getPointerPosition(u,n).x;o.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var c=window.cast&&window.cast.framework&&window.cast.framework.CastSession,d=null===(t=window)||void 0===t||null===(r=t.cast)||void 0===r||null===(i=r.framework)||void 0===i||null===(l=i.CastContext)||void 0===l||null===(a=l.getInstance())||void 0===a?void 0:a.S;if(console.log(c),c&&"CONNECTED"===d){window.cast.framework.RemotePlayer.canSeek=!0;var v=new window.cast.framework.RemotePlayerController(window.cast.framework.RemotePlayer),f=v.h.media[0].liveSeekableRange.end;v.getSeekPosition(),window.cast.framework.RemotePlayer.currentTime=f*s,v.seek()}})};var k=function(){var e=t(r.mark(function e(){return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([import("videojs-contrib-ads"),import("ima"),m("https://imasdk.googleapis.com/js/sdkloader/ima3.js").then(function(){}).catch(function(e){return console.log(e)})]);case 2:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),S=function(){var e=t(r.mark(function e(){return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return console.log("utilising contrib eme"),e.next=3,import("videojs-contrib-eme").then(function(e){o.getPlugin("eme")||o.registerPlugin("eme",e.default)});case 3:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),O=function(){var e=t(r.mark(function e(){var n;return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,import("videojs-mux");case 3:if(!(n=e.sent)||"function"!=typeof n.register){e.next=7;break}return n.register(o),e.abrupt("return");case 7:console.log("Mux registration failed"),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),console.log("Failed to load Mux plugin:",e.t0);case 13:case"end":return e.stop()}},e,null,[[0,10]])}));return function(){return e.apply(this,arguments)}}(),T=function(){var e=t(r.mark(function e(){return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Promise.resolve().then(function(){return require("./index-84cce26a.js")});case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),console.error("Failed to load dvr seekbar");case 8:case"end":return e.stop()}},e,null,[[0,5]])}));return function(){return e.apply(this,arguments)}}(),j=function(){var e=t(r.mark(function e(){return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Promise.resolve().then(function(){return require("./videojs-dash5.es-0c89add5.js")});case 3:console.log("utilising contrib dash"),e.next=9;break;case 6:e.prev=6,e.t0=e.catch(0),console.error("Failed to load contrib dash plugin");case 9:case"end":return e.stop()}},e,null,[[0,6]])}));return function(){return e.apply(this,arguments)}}(),P=Object.freeze({__proto__:null,importChromecast:function(){import("@silvermine/videojs-chromecast").then(function(e){m("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1").then(function(){e.default(o)}).catch(function(e){console.log(e)})})},importAirplay:function(){import("@silvermine/videojs-airplay").then(function(e){e.default(o)})},loadAdsLibrary:k,loadEMELibrary:S,loadMuxPlugin:O,loadDvrSeekbar:T,loadContribDash:j});function I(e){return E.apply(this,arguments)}function E(){return(E=t(r.mark(function e(n){var t;return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=(null==n?void 0:n.airplay)||!1,e.next=3,k();case 3:t&&"Safari"==c.detectBrowser()&&Promise.resolve().then(function(){return P}).then(function(e){e.importAirplay()});case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}function D(e,n){return C.apply(this,arguments)}function C(){return(C=t(r.mark(function e(n,t){var o,i,l,a,u,s,d,v,f,p;return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return d=(null==t?void 0:t.contentType)||"video",v=null==t||null===(o=t[d])||void 0===o?void 0:o.drmEnabled,null==t||null===(i=t[d])||void 0===i||null===(l=i.liveDetails)||void 0===l||l.isDvrEnabled,null==n||n.showPositiveSeekbar,f=(null==t||null===(a=t[d])||void 0===a||null===(u=a.streamingInfo)||void 0===u||null===(s=u.videoAssets)||void 0===s?void 0:s.dash)||null,e.prev=5,e.next=8,Promise.allSettled([v?"Safari"==c.detectBrowser()?S():"caliente"!=(null===(p=window)||void 0===p?void 0:p.siteName)?j():S():"Safari"!=c.detectBrowser()&&f?j():null,b(n)]);case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(5),console.log("Error",e.t0);case 13:case"end":return e.stop()}},e,null,[[5,10]])}))).apply(this,arguments)}function x(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function A(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?x(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):x(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var R=new Set,L=null,N=function(n,t,r){var o,i,l,a,u,s,c,d={},v=(null==n?void 0:n.contentType)||"video";d["c3.cm.id"]=(null===(o=n[v])||void 0===o?void 0:o.id)||"Null",d["c3.cm.contentType"]=q(n),d[null==r||null===(i=r.Constants)||void 0===i?void 0:i.IS_LIVE]=!(null==n||!n.linearchannel),d[null==r||null===(l=r.Constants)||void 0===l?void 0:l.STREAM_URL]=t.currentSrc(),d[null==r||null===(a=r.Constants)||void 0===a?void 0:a.VIEWER_ID]="undefined"===e.getUserId()?"NULL":e.getUserId(),d["c3.cm.categoryType"]=B(n),d["m3.net.t"]=function(){var e=navigator.connection||navigator.mozConnection||navigator.webkitConnection;if(!e)return"Unknown";if(e.type)switch(e.type){case"wifi":return"WiFi";case"ethernet":return"Ethernet";default:return e.type}switch(e.effectiveType){case"slow-2g":case"2g":return"2G";case"3g":return"3G";case"4g":return e.downlink>=20?"WiFi":"4G";default:return"Unknown"}}(),d.DRMEnabled=(null===(u=n[v])||void 0===u?void 0:u.drmEnabled)||"None",d.DAIStream=null!==(s=n[v])&&void 0!==s&&null!==(c=s.gist)&&void 0!==c&&c.isSSAIEnabled?"YES":"NO",d[r.Constants.DEFAULT_RESOURCE]="AKAMAI",d["c3.cm.brand"]="NULL",d.CDVREnabled=U(n),d["c3.cm.genreList"]=M(n),d["c3.cm.genre"]=V(n),d["c3.cm.channel"]=_(n);var f=G(e.getCurrentSeries(),n);return d=A(A({},d),f)},V=function(e){var n,t,r,o=(null==e?void 0:e.contentType)||"video";return(null==e||null===(n=e[o])||void 0===n||null===(t=n.gist)||void 0===t||null===(r=t.primaryCategory)||void 0===r?void 0:r.title)||"Null"},M=function(e){var n,t=(null==e?void 0:e.contentType)||"video";return((null==e||null===(n=e[t])||void 0===n?void 0:n.categories)||[]).map(function(e){return null==e?void 0:e.title}).join(", ")||"Null"},_=function(e){var n,t,r=(null==e?void 0:e.contentType)||"video";return"video"===r?"VOD":(null==e||null===(n=e[r])||void 0===n||null===(t=n.channels[0])||void 0===t?void 0:t.title)||"NULL"},B=function(e){return(null==e?void 0:e.contentType)||"null"},U=function(e){var n,t,r=(null==e?void 0:e.contentType)||"video",o=(null==e||null===(n=e[r])||void 0===n||null===(t=n.liveDetails)||void 0===t?void 0:t.isDvrEnabled)||!1;return o?"YES":"NO"},H=function(e,n){var t,r,o=(n||{}).epg;if(o&&null!=o&&o.enable&&null!=o&&o.programTitle)return o.programTitle;var i=(null==e?void 0:e.contentType)||"video",l=(null==e||null===(t=e[i])||void 0===t||null===(r=t.gist)||void 0===r?void 0:r.title)||"Null";return"".concat(l)},q=function(e){return"linearchannel"===((null==e?void 0:e.contentType)||"video")?"Live":"VOD"};var F,G=function(n,t){var r,o,i,l,a,u={"c3.cm.seriesName":"Null","c3.cm.seasonNumber":"Null","c3.cm.showTitle":"Null","c3.cm.episodeNumber":"Null"};if(!n||!t||null!=t&&t.linearchannel)return u;var s=e.getSeasonNumber(),c=e.getEpisodeNumber();return u["c3.cm.seriesName"]=(null==t||null===(r=t.video)||void 0===r||null===(o=r.series)||void 0===o?void 0:o.title)||"Null",u["c3.cm.seasonNumber"]=(null==s?void 0:s.toString())||"Null",u["c3.cm.showTitle"]=(null==n||null===(i=n[s-1])||void 0===i||null===(l=i.episodes)||void 0===l||null===(a=l[c-1])||void 0===a?void 0:a.title)||"Null",u["c3.cm.episodeNumber"]=(null==c?void 0:c.toString())||"Null",u},K=function(e){switch(e){case"com.widevine.alpha":return"Widevine";case"com.microsoft.playready":return"PlayReady";case"org.w3.clearkey":return"ClearKey";case"com.apple.fps.1_0":return"FairPlay";default:return"Unknown DRM System"}},W=function(e){switch(e){case"application/x-mpegURL":case"application/vnd.apple.mpegurl":return"HLS";case"application/dash+xml":return"DASH";default:return"Unknown"}},Q=function(){var n=t(r.mark(function n(t,o){var i,l,a,u,c,d,v,f,p,m;return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(i=(null==o?void 0:o.convivaConfig)||{},l=i.trackConvivaPlayerEvent,a=i.paymentHandler,u=i.tveProvider,c=i.enable,d=i.appName,v=(o||{}).token,c){n.next=4;break}return n.abrupt("return");case 4:if(f=s.getPlayer(t),"function"==typeof(p=l)){n.next=8;break}return n.abrupt("return");case 8:return n.next=10,p("getConvivaObject");case 10:if(m=n.sent){n.next=13;break}return n.abrupt("return");case 13:f.ready(function(){var e=f.tech(!0),n=!1;e.on("keysessioncreated",function(e){n=!0;var t=e.target;if(t&&t.keySystem){var r=K(t.keySystem);p("contentInfo",{DRMEnabled:r})}else p("contentInfo",{DRMEnabled:"None"})}),n||p("contentInfo",{DRMEnabled:"None"})}),f.on("loadstart",function(){var n,t;L&&L!==f.currentSrc()&&p("playbackEnded"),p("setPlayer",f),R.clear(),L=f.currentSrc();var r=W(f.currentType()),i=e.getCurrentVideo(),l=N(i,f,m);l[null==m||null===(n=m.Constants)||void 0===n?void 0:n.PLAYER_NAME]=d||"WEB",l[null==m||null===(t=m.Constants)||void 0===t?void 0:t.ASSET_NAME]=H(i,o),l.authToken=v||"NULL",l.streamType=r,l.D2CType=a||"NONE",l.subscriberType=u||(a?"D2C":"FREE"),l["c3.cm.affiliate"]=u||"NULL",p("contentInfo",l)}),f.on("loadedmetadata",function(){var e,n=f.videoHeight();e=n>=2160?"4K":n>=1440?"1440p":n>=1080?"1080p":n>=720?"720p":n>=480?"480p":"".concat(n,"p"),p("contentInfo",{screenResolution:e})}),f.on("play",function(){R.has(f.currentSrc())||(R.add(f.currentSrc()),p("playbackStarted",null))}),f.on("ended",function(){R.has(f.currentSrc())&&R.delete(f.currentSrc()),p("playbackEnded")}),f.on("ads-loader",function(e){e&&null!=e&&e.adsLoader&&p("initAdSensor",{player:f,adsLoader:null==e?void 0:e.adsLoader})}),f.on("dispose",function(){null==R||R.clear(),p("playbackEnded")});case 20:case"end":return n.stop()}},n)}));return function(e,t){return n.apply(this,arguments)}}(),z=function(e,n){var t=null==n?void 0:n.skin;"default"==t?Promise.resolve().then(function(){return require("./skin-cddb4ce1.js")}).then(function(t){t.initialiseSkin(e,n)}):"carousel"==t?Promise.resolve().then(function(){return require("./skin-8dcda2d4.js")}).then(function(n){n.initaliseSkin(e)}):"defaultV2"==t?Promise.resolve().then(function(){return require("./skin-d21404a5.js")}).then(function(t){t.initialiseSkin(e,n)}):"multiplayer"==t?Promise.resolve().then(function(){return require("./skin-f4cb5be7.js")}).then(function(t){t.initialiseSkin(e,n)}):"minimalist"==t?Promise.resolve().then(function(){return require("./skin-33248e57.js")}).then(function(t){t.initaliseSkin(e,n)}):"VL_ONE"==t&&Promise.resolve().then(function(){return require("./skin-a35b3781.js")}).then(function(t){t.initialiseSkin(e,n)})};function J(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function X(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?J(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):J(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Y=[],$=0,Z=null;function ee(t,r,o){var i,l,a,u,s,c=arguments.length>3&&void 0!==arguments[3]&&arguments[3];null==r||null===(i=r.watchHistory)||void 0===i||i.apiVersion;var d=null==r||null===(l=r.watchHistory)||void 0===l?void 0:l.profileId,v=Math.floor(t.currentTime()),f=Math.floor(t.duration());null==r||null===(a=r.watchHistory)||void 0===a||a.xapiKey;var p=(null==r||null===(u=r.video)||void 0===u?void 0:u.originalObjectId)||null,m=(null==r||null===(s=r.watchHistory)||void 0===s?void 0:s.saveOffline)||!1,y=Math.floor(t.currentTime()),g=c?100:Math.floor(v/f*100),h={};m?function(t,r,o){var i=r?"watchhistory-data-".concat(r):"watchhistory-data-guest-".concat(o),l=ne(i),a=(new Date).getTime(),u=e.getCurrentVideo(),s=(null==u?void 0:u.video)||{},c=["id","title","gist","categories","tags","status","publishDate","plans","isVerticalVideo","monetizationBadgeIdentifier","runtime"].reduce(function(e,t){return X(X({},e),{},n({},t,s[t]))},{}),d=l.findIndex(function(e){var n;return(null==e||null===(n=e.content)||void 0===n?void 0:n.id)===F});d<0?l.push(X(X({content:c},t),{},{addedDate:a,updateDate:a})):l[d]=X(X(X({},l[d]),t),{},{updateDate:a});localStorage.setItem("".concat(i),JSON.stringify(l))}(h={completed:c,watchedTime:y,watchedPercentage:g},d,r.siteOwner):(h=X(X({videoId:F,watchedTime:y,watchedPercentage:g,doneWatching:c,profileId:d},Z&&{seriesId:Z}),p&&{originalObjectId:p}),e.saveWatchHistory(h).then(function(e){}).catch(function(e){})),$=v+o}function ne(e){var n=[];return e&&(n=JSON.parse(localStorage.getItem("".concat(e))||"[]")),n}function te(e,n,t){var r=ne(e?"watchhistory-data-".concat(e):"watchhistory-data-guest-".concat(t)),o=[];return r&&Array.isArray(r)&&(o=r.filter(function(e){var t;return(null==e||null===(t=e.content)||void 0===t?void 0:t.id)===n})),o}var re=!1,oe=function(n,t){var r,o,i=(null==n?void 0:n.contentType)||"video";if(((null==n||null===(r=n[i])||void 0===r||null===(o=r.streamingInfo)||void 0===o?void 0:o.secondaryVideoAssets)||null)&&!re){var l=ie(n,"videoAssets","secondaryVideoAssets"),a=e.getSource(l,t);return a&&e.loadVideo(t,a),re=!0,console.log("switching to secondary source"),!0}return console.log("secondary source is either corrupted / not available"),!1};function ie(e,n,t){if(Array.isArray(e))return e.map(function(e){return ie(e,n,t)});if(null!==e&&"object"===v(e)){var r={};return Object.keys(e).forEach(function(o){o===n&&void 0!==e[t]?r[o]=e[t]:o===t&&void 0!==e[n]?r[o]=e[n]:r[o]=ie(e[o],n,t)}),r}return e}function le(e,n){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,n){if(e){if("string"==typeof e)return ae(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?ae(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,l=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return l=e.done,e},e:function(e){a=!0,i=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw i}}}}function ae(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t<n;t++)r[t]=e[t];return r}function ue(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function se(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ue(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ue(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var ce=function(n,t,r,o){var i,a,u,d,f=o.res,p=o.sres,m=s.getPlayer(n),y=(null==f?void 0:f.contentType)||"video",h=(null==f?void 0:f[y].drmEnabled)||!1,b=(null==f||null===(i=f[y])||void 0===i||null===(a=i.streamingInfo)||void 0===a?void 0:a.isLiveStream)||!1,w=(null==f||null===(u=f[y])||void 0===u||null===(d=u.liveDetails)||void 0===d?void 0:d.isDvrEnabled)||!1;e.setCurrentVideo(f),m&&(m.on("loadstart",function(){b?r.resolve({status:!0,msg:"Video Loaded",response:f}):r.resolve(se({status:!0,msg:"Player Initialised"},p?{seriesResponse:p,response:f}:{response:f}))}),m.on("loadeddata",function(){var r,o,i,a=l.getCaptions(n);if(null==a||a.map(function(e){return l.disableCaptions(n,e.id)}),w&&"Safari"===c.detectBrowser())try{var u;null==m||null===(u=m.liveTracker)||void 0===u||u.seekToLiveEdge()}catch(e){console.log("Cannot seek to Live Edge",e)}(null==m||!m.muted())&&g(n,sessionStorage.getItem("volume")||"100");var d=e.getCurrentVideo();if(e.clearError(),null!=t&&t.watchHistory&&null!=t&&null!==(r=t.watchHistory)&&void 0!==r&&r.enable&&(!t.isAnonymousUser||null!=t&&null!==(o=t.watchHistory)&&void 0!==o&&o.saveOffline)){var v,p,y=se(se({},t),f);!function(e,n,t){var r,o,i;null!=n&&n.series&&null!=n&&null!==(r=n.series)&&void 0!==r&&r.enable&&(Z=null==n||null===(o=n.series)||void 0===o?void 0:o.id),Y=[],$=0,F=t;var l=(null==n||null===(i=n.watchHistory)||void 0===i?void 0:i.interval)||30,a=s.getPlayer(e);a&&(a.on("timeupdate",function(){var e=Math.floor(a.currentTime());Y.includes($)||(e==$?(Y.push(e),ee(a,n,l)):e>$&&($=e+l))}),a.one("ended",function(){ee(a,n,l,!0)}))}(n,y,null==d||null===(v=d.video)||void 0===v||null===(p=v.gist)||void 0===p?void 0:p.id)}if(null!=t&&null!==(i=t.analytics)&&void 0!==i&&i.muxKey&&null!=m&&m.mux){var h,b,k,S,O,T,j=(null===(h=e.getCurrentVideo())||void 0===h?void 0:h.video)||(null==f?void 0:f.video),P=null==j?void 0:j.gist,I={env_key:null==t||null===(b=t.analytics)||void 0===b?void 0:b.muxKey,player_name:"vl-web-player",player_version:null===(k=window)||void 0===k?void 0:k.vl_player_version,video_id:null==P?void 0:P.id,video_title:null==P?void 0:P.title,video_series:null==j||null===(S=j.series)||void 0===S?void 0:S.title,video_stream_type:null!=j&&null!==(O=j.streamingInfo)&&void 0!==O&&O.isLiveStream?"live":"video",viewer_user_id:null==t||null===(T=t.analytics)||void 0===T?void 0:T.userId};m.mux({debug:!1,data:I})}}),m.textTracks().on("change",function(e){var n=this.tracks_.filter(function(e){if(("subtitles"===e.kind||"captions"===e.kind)&&"showing"===e.mode)return!0})[0];m.trigger("subtitlechanged",n)}),m.on("subtitlechanged",function(e,n){var t,r,o,i,l,a,u,s,c,d,v=window.cast&&window.cast.framework&&window.cast.framework.CastSession,f=null===(t=window)||void 0===t||null===(r=t.cast)||void 0===r||null===(o=r.framework)||void 0===o||null===(i=o.CastContext)||void 0===i||null===(l=i.getInstance())||void 0===l?void 0:l.S,p=null===(a=window)||void 0===a||null===(u=a.cast)||void 0===u||null===(s=u.framework)||void 0===s||null===(c=s.CastContext)||void 0===c||null===(d=c.getInstance())||void 0===d?void 0:d.getCurrentSession();if(v&&"CONNECTED"===f){var m,y=p.getMediaSession(),g=y.media.tracks.filter(function(e){return"TEXT"==e.type});m=n?new chrome.cast.media.EditTracksInfoRequest([g[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),y.editTracksInfo(m)}}),m.tech_.on("retryplaylist",function(){b&&oe(f,n)}),m.on("error",function(){var t,o;(console.log("ERROR",m.error(),m.error().code),4===m.error().code&&b)?oe(f,n):(e.handleError(n,(null==m||null===(t=m.error())||void 0===t?void 0:t.message)||"Some error occured"),r.reject({status:!1,msg:(null==m||null===(o=m.error())||void 0===o?void 0:o.message)||"Some error occured",response:f}))}),m.one("play",function(){var n,r,o,i,l;if(null===(n=window)||void 0===n||null===(r=n.app_data)||void 0===r||null===(o=r.appcmsMain)||void 0===o||null===(i=o.adsConfig)||void 0===i||!i.vodAdClientSideTracking){if(null!=t&&null!==(l=t.series)&&void 0!==l&&l.enable){var a,u,s,c=null===(a=e.getCurrentVideo())||void 0===a||null===(u=a.video)||void 0===u||null===(s=u.gist)||void 0===s?void 0:s.id,d=e.getSeriesWatchMap(),v=(null==d?void 0:d.get(c))||{t:0,p:0},f=v.t,p=v.p;f&&p<95&&setTimeout(function(){m.currentTime(f)},0)}else null!=t&&t.watchHistoryResumeTime&&(null==t?void 0:t.watchedPercentage)<95&&setTimeout(function(){m.currentTime(null==t?void 0:t.watchHistoryResumeTime)},0);if(null!=m&&m.dvrSeekbar)try{m.dvrSeekbar()}catch(e){console.error("Error while initilizing dvr seekbar")}}}),m.on("volumechange",function(){var e=100*m.volume().toFixed(2);m.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)}),m.on("chromecastDisconnected",function(){if(b){m.currentSource();for(var e=m.textTracks(),n=e.length-1;n>=0;n--)m.removeRemoteTextTrack(e[n])}}),m.one("loadeddata",function(){var e,n=(null==m||null===(e=m.audioTracks())||void 0===e?void 0:e.tracks_)||null;if(n)if("object"==v(m.dash)){var t,r,o,i=null==m||null===(t=m.dash)||void 0===t||null===(r=t.mediaPlayer)||void 0===r?void 0:r.getTracksFor("audio"),l=null==i?void 0:i.find(function(e){var n;return null==e||null===(n=e.roles)||void 0===n?void 0:n.includes("main")}),a=le(n);try{for(a.s();!(o=a.n()).done;){var u=o.value;if(l&&(null==u?void 0:u.id)=="dash-audio-".concat(l.index)){u.enabled=!0;break}}}catch(e){a.e(e)}finally{a.f()}}else{var s,d=le(n);try{for(d.s();!(s=d.n()).done;){var f,p,y,g=s.value;("Chrome"==c.detectBrowser()||"Edge"==c.detectBrowser()&&(null!==(f=navigator)&&void 0!==f&&null!==(p=f.userAgent)&&void 0!==p&&p.includes("Macintosh")||!h))&&null!=g&&null!==(y=g.label)&&void 0!==y&&y.includes("5.1")?m.audioTracks().removeTrack(g):"main"==g.kind?g.enabled=!0:g.enabled=!1}}catch(e){d.e(e)}finally{d.f()}}}))};var de,ve=(de=!0,{enable:function(){de=!0},disable:function(){de=!1},get enabled(){return de}});function fe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function pe(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?fe(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fe(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function me(e,n){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,n){if(e){if("string"==typeof e)return ye(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?ye(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,l=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return l=e.done,e},e:function(e){a=!0,i=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw i}}}}function ye(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t<n;t++)r[t]=e[t];return r}var ge,he,be=(ge="",{set:function(e){e&&(ge=e)},get:function(){return ge}}),we=(he=null,{set:function(e){he=e},get position(){return he}});function ke(e,n){return Se.apply(this,arguments)}function Se(){return(Se=t(r.mark(function n(t,o){var i,l,a,u,c,d,v,f,m,y,g,h,b,w;return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return s.getPlayer(t),i=e.getSource(o,t),l=i.src,a=l.replace("/dash/","/session/").replace("master","session"),a=e.replaceMacros(a,t,o),u=Oe(a),c=p(u,2),d=c[0],v=c[1],a=new URL(a.split("?")[0]),Object.keys(v).length>0&&Object.entries(v).forEach(function(e){var n=p(e,2),t=n[0],r=n[1];a.searchParams.set(t,r)}),n.prev=8,n.next=11,fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({adsParams:pe({},d)})});case 11:return f=n.sent,n.next=14,f.json();case 14:return m=n.sent,y="https://"+new URL(a).hostname,g=m.trackingUrl,h=m.manifestUrl,b=y+g,w=y+h,be.set(b),console.log("%c TRACKING URL","background: #bdf369; color: #000",b),i.src=w,n.abrupt("return",i);case 26:return n.prev=26,n.t0=n.catch(8),n.abrupt("return",i);case 29:case"end":return n.stop()}},n,null,[[8,26]])}))).apply(this,arguments)}function Oe(e){var n={},t=e.split("?")[1];if(!t)return[{},{}];var r,o=me(t.split("&"));try{for(o.s();!(r=o.n()).done;){var i=r.value.split("="),l=p(i,2),a=l[0],u=l[1];n[decodeURIComponent(a)]=decodeURIComponent(u||"")}}catch(e){o.e(e)}finally{o.f()}for(var s={},c={},d=0,v=Object.entries(n);d<v.length;d++){var f=p(v[d],2),m=f[0],y=f[1];if(m.startsWith("ads."))s[m.replace(/^ads\./,"")]=y;else c[m]=y}return[s,c]}var Te,je=(Te=[],{setQueuePoints:function(e){Te=Array.isArray(e)?f(e):Te},getQueuePoints:function(){return f(Te)}});function Pe(){return Pe=t(r.mark(function e(n,o){var i,l,a,u,c,d;return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:d=function(e,t,r,o,i,l){var a=s.getPlayer(n);if(!a.seeking()){t.startTimeInSeconds,t.durationInSeconds,Math.floor(a.currentTime());var d,v=me(r);try{var f=function(){var n,r,s,v=d.value,f=v.eventType,p=v.beaconUrls,m=v.startTimeInSeconds,y=v.startTime,g=v.durationInSeconds,h=m||0,b=p,w=(null===(n=window)||void 0===n||null===(r=n.customData)||void 0===r||null===(s=r.ads)||void 0===s?void 0:s.adEventHandler)||null,k="".concat(h,"_").concat(f),S=u.get("pod-".concat(i))||[];if(console.warn(e,h,"map:",f,"condition1:",e>=h,"map:",u),e>=h&&!S.includes(k)){S.push(k),u.set("pod-".concat(i),S);try{c(f,t,b,a)}catch(e){console.error("Error when calling triggerAdBeacon:",e,f,t)}if("breakEnd"==f){var O=we.position;we.set(null),setTimeout(function(){null!=O&&(a.currentTime(O),l())},500)}if("function"==typeof w)try{var T;w({adsData:{eventType:f,startTimeInSeconds:m,startTime:y,durationInSeconds:g,ad:null==t||null===(T=t.ads)||void 0===T?void 0:T[o],adIndex:o}})}catch(e){console.error("Error when calling ads callback:",e)}}};for(v.s();!(d=v.n()).done;)f()}catch(e){v.e(e)}finally{v.f()}}},c=function(e,n,t,r){console.warn("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(r.currentTime())),"AD_POD:",n),console.log("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(r.currentTime())),"AD_POD:",n),null==t||t.forEach(function(e){fetch(e,{mode:"no-cors"}).catch(function(n){console.warn("Beacon failed:",e,n)})})},a=function(e){var n=Math.floor(e/60),t=Math.floor(e%60);return"".concat(n,":").concat(t.toString().padStart(2,"0"))},we.set(o),i=be.get(),s.getPlayer(n).one("loadeddata",function(){i&&l(i)}),l=function(){var e=t(r.mark(function e(t){var i,l,u,c,v,p,m,y,g,h,b,w,k,S,O,T,j,P,I,E,D,C,x,A,R;return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return D=function(e){document.removeEventListener("pointermove",E),document.removeEventListener("pointerup",D),0===e.button&&P()},E=function(e){},I=function(){var e,n=h.currentTime(),t=null,r=me(g);try{for(r.s();!(e=r.n()).done;){var o=e.value,i=o.startTimeInSeconds,l=o.durationInSeconds,a=(o.ads,Math.floor(i+l));n>=i&&n<=a&&(t=a,k.set(i,!0))}}catch(e){r.e(e)}finally{r.f()}null!==t&&(console.log("Seeking to end of the ad pod:",t),setTimeout(function(){h.currentTime(t+2.2)},100))},P=function(){var e,n=h.currentTime(),t=null,r=me(g);try{for(r.s();!(e=r.n()).done;){var o=e.value,i=o.startTimeInSeconds,l=o.durationInSeconds,a=o.ads,u=Math.floor(i+l);(Array.isArray(a)&&(null==a?void 0:a.length)>0&&(n>u||n>i)&&!k.has(i)||n>=i&&n<=u)&&(t=i,k.set(i,!0))}}catch(e){r.e(e)}finally{r.f()}null!==t&&(console.log("Seeking back to ad pod:",t),setTimeout(function(){h.currentTime(t+.4)},100))},v=!1,e.next=7,fetch(t);case 7:return p=e.sent,e.next=10,p.json();case 10:m=e.sent,console.log("%c TRACKING URL RESPONSE ","background: #d9e7ff; color: #000",m),y=m.avails,g=[],h=s.getPlayer(n),b=h.controlBar.progressControl,w=b.seekBar.el(),y.map(function(e,n){var t,r,o;0==n&&Array.isArray(null==e?void 0:e.ads)&&(null==e||null===(t=e.ads)||void 0===t?void 0:t.length)>0&&(v=!0),g.push({ads:null==e?void 0:e.ads,durationInSeconds:null==e?void 0:e.durationInSeconds,startTimeInSeconds:null==e?void 0:e.startTimeInSeconds,markerPositionInSeconds:Math.floor(null==e?void 0:e.startTimeInSeconds),podSlotImpressionBeacon:(null==e||null===(r=e.adBreakTrackingEvents)||void 0===r||null===(o=r.filter(function(e){return"breakStart"==(null==e?void 0:e.eventType)}))||void 0===o?void 0:o[0])||[]})}),!v&&o&&h.currentTime(o),null!=g&&g.length&&je.setQueuePoints(g),g.forEach(function(e){var n=e.markerPositionInSeconds,t=e.ads,r=h.duration();if(!(n>r||Array.isArray(t)&&0==(null==t?void 0:t.length))){var o=n/r*100,i=document.createElement("div");i.className="vjs-seekbar-marker",i.style.left="".concat(o,"%"),i.style.position="absolute",i.style.top="0",i.style.bottom="0",i.style.width="2px",i.style.backgroundColor="#fecc09",i.style.left="".concat(o,"%"),i.style.pointerEvents="none",w.appendChild(i)}}),k=new Map,S=-1,O=(null===(i=document)||void 0===i||null===(l=i.getElementsByClassName("tvProviderImage"))||void 0===l?void 0:l[0])||null,T=(null==h||null===(u=h.controlBar)||void 0===u?void 0:u.getChild("videoSelector"))||null,j=(null==h||null===(c=h.controlBar)||void 0===c?void 0:c.getChild("seriesV2"))||null,h.on("timeupdate",s.throttle(function(){var e=h.currentTime();if(e!==S){S=e;for(var n=!1,t=function(){var t=g[r],o=t.startTimeInSeconds,i=t.durationInSeconds,l=t.ads,u=o+i;if(e>=o-1.2&&e<=u+1.2){e<=u&&Array.isArray(l)&&(null==l?void 0:l.length)>0&&(n=!0),e>u&&k.set(o,!0),ve.disable(),O&&O.classList.add("vjs-hidden"),T&&(T.el().style.pointerEvents="none",T.el().classList.add("vjs-hidden")),j&&(j.el().style.pointerEvents="none",j.el().classList.add("vjs-hidden")),b.el().style.visibility="hidden";for(var s=e-o,c=0,v=0,p=0;p<l.length;p++){var m,y=null==l||null===(m=l[p])||void 0===m?void 0:m.durationInSeconds;if(s<c+y){v=p;break}c+=y}var h=l[v],w=s-c,S=Math.max(0,(null==h?void 0:h.durationInSeconds)-w),P=Math.round(S);C.style.display="block",R.textContent="".concat(v+1," of ").concat(l.length," • ").concat(a(P));var E=[];return null==l||l.forEach(function(e){var n=e.trackingEvents.filter(function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression","complete"].includes(e.eventType)});E.push.apply(E,f(n))}),Array.isArray(l)&&0==(null==l?void 0:l.length)&&E.push(null==t?void 0:t.podSlotImpressionBeacon),d(e,t,E,v,r,I),"break"}},r=0;r<g.length;r++){if("break"===t())break}n||(C.style.display="none",b.el().style.visibility="visible",T&&(T.el().style.pointerEvents="auto",T.el().classList.remove("vjs-hidden")),j&&(j.el().style.pointerEvents="auto",j.el().classList.remove("vjs-hidden")),O&&O.classList.remove("vjs-hidden"),ve.enable())}},1e3)),b.el().addEventListener("pointerdown",function(e){0===e.button&&(document.addEventListener("pointermove",E),document.addEventListener("pointerup",D))}),(C=document.createElement("div")).className="ssai-ad-container",(x=document.createElement("div")).className="sponsored-adbox",(A=document.createElement("div")).className="sponsored-text",A.textContent="Sponsored Ad",x.append(A),(R=document.createElement("div")).className="ad-counter",document.createElement("div").className="ad-timer",C.append(x),C.append(R),h.el().appendChild(C);case 44:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),u=new Map;case 10:case"end":return e.stop()}},e)})),Pe.apply(this,arguments)}function Ie(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function Ee(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ie(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ie(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var De=function(i,a,u,d){var v,f,p,m,y,g,h,b,k,S,O,T,j,P,I,E,C,x,A,R,L,N,V,M,_,B,U,H,q,F,G,K,W,J,X,Y=a.res,$=void 0===Y?null:Y,Z=a.sres,ee=void 0===Z?null:Z,ne=null!=u&&u.chromecastReceiverId?["chromecast","html5"]:["html5"],te=(null===(v=$)||void 0===v?void 0:v.contentType)||"video",re=s.impolicy16x9(null===(f=$)||void 0===f||null===(p=f[te])||void 0===p||null===(m=p.gist)||void 0===m?void 0:m.videoImageUrl)||s.impolicy16x9(null===(y=$)||void 0===y||null===(g=y[te])||void 0===g||null===(h=g.gist)||void 0===h||null===(b=h.imageGist)||void 0===b?void 0:b.r16x9),oe=(null===(k=$)||void 0===k||null===(S=k[te])||void 0===S||null===(O=S.liveDetails)||void 0===O?void 0:O.isDvrEnabled)||!1,ie=(null===(T=$)||void 0===T||null===(j=T[te])||void 0===j||null===(P=j.streamingInfo)||void 0===P?void 0:P.isLiveStream)||!1,le=(null===(I=$)||void 0===I||null===(E=I.ads)||void 0===E||null===(C=E.preRoll)||void 0===C||null===(x=C.adTags)||void 0===x||null===(A=x.web)||void 0===A?void 0:A.active)&&(null===(R=$)||void 0===R||null===(L=R.ads)||void 0===L||null===(N=L.preRoll)||void 0===N||null===(V=N.adTags)||void 0===V||null===(M=V.web)||void 0===M?void 0:M.url);$=Ee(Ee({},$),{},{audioAssetSource:null==u?void 0:u.audioAssetSource});var ae="MEDIA_TAILOR"==(null===(_=window)||void 0===_||null===(B=_.app_data)||void 0===B||null===(U=B.appcmsMain)||void 0===U||null===(H=U.adsConfig)||void 0===H?void 0:H.vodAdSticherProvider)||!1,ue=(null==u?void 0:u.latency)||6,se=(X={enableSmoothSeeking:!0,controls:0!=(null==u?void 0:u.controls),playsinline:!0,fluid:!0,aspectRatio:"16:9",muted:(null==u?void 0:u.muted)||!1,autoplay:(null==u?void 0:u.autoplay)||!1,controlBar:{volumePanel:{inline:!1},fullscreenToggle:!0,audioTrackButton:!0,pictureInPictureToggle:!1},muteToggle:"multiplayer"==u.skin,liveui:oe},n(X,"autoplay",null==u?void 0:u.autoplay),n(X,"normalizeAutoplay",(null==u?void 0:u.autoplay)&&!le),n(X,"loop",(null==u?void 0:u.loop)||!1),n(X,"audioPosterMode",null==u?void 0:u.audioPosterMode),n(X,"html5",Ee(Ee({dash:Ee(Ee(Ee({},!o.browser.IS_SAFARI&&{useTTML:!0}),(null==u?void 0:u.debugConfig)&&(null==u||null===(q=u.debugConfig)||void 0===q?void 0:q.enable)&&{debug:!0,logLevel:null!=u&&null!==(F=u.debugConfig)&&void 0!==F&&F.logLevel?null==u||null===(G=u.debugConfig)||void 0===G?void 0:G.logLevel:"DEBUG"}),{},{updateSettings:{streaming:{delay:{liveDelay:ue},text:{defaultEnabled:!1},liveCatchup:{maxDrift:0,playbackRate:{min:-.1,max:.1}},gaps:{enableStallFix:!0,stallSeek:3},abr:{autoSwitchBitrate:{video:!0,audio:!0}}}}}),vhs:Ee(Ee({liveRangeSafeTimeDelta:ue,useDevicePixelRatio:!0,experimentalLLHLS:(null==u?void 0:u.lowLatency)||!1,limitRenditionByPlayerDimensions:!1,useNetworkInformationApi:!0},(null==u||null===(K=u.customData)||void 0===K?void 0:K.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:!0}),debug:!0,nativeTextTracks:"Safari"==c.detectBrowser()},0==(null==u||null===(W=u.customData)||void 0===W?void 0:W.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==u||null===(J=u.customData)||void 0===J?void 0:J.nativeVideoTracks)&&{nativeVideoTracks:!1})),n(X,"poster",re),n(X,"techOrder",ne),n(X,"chromecast",{requestCustomDataFn:function(e){var n=s.getPlayer(i),t=((null==n?void 0:n.textTracksJson_)||n.textTracks().tracks_).filter(function(e){return"captions"==e.kind||"subtitles"==e.kind});return function(e,n,t){var r,o,i,l,a,u,s,c,d,v,f=(null==e?void 0:e.contentType)||"video",p={};if(e&&null!=e&&e[f]&&null!=e&&e[f].drmEnabled){var m,y,g,h,b,w,k,S;p.isDrmEnabled=!0;var O=(null==n||null===(m=n.keySystems)||void 0===m?void 0:m["com.widevine.alpha"])||null,T=(null==O?void 0:O.url)||(null==n||null===(y=n.keySystemOptions)||void 0===y||null===(g=y[0])||void 0===g||null===(h=g.options)||void 0===h?void 0:h.serverURL);p.licenseUrl=T;var j=(null==O?void 0:O.licenseHeaders["X-AxDRM-Message"])||(null==n||null===(b=n.keySystemOptions)||void 0===b||null===(w=b[0])||void 0===w||null===(k=w.options)||void 0===k||null===(S=k.httpRequestHeaders)||void 0===S?void 0:S["X-AxDRM-Message"]);p.licenseToken=j}var P=(null==e||null===(r=e[f])||void 0===r||null===(o=r.gist)||void 0===o?void 0:o.contentType)||"VIDEO";p.contentType=P;var I=null==e||null===(i=e[f])||void 0===i||null===(l=i.gist)||void 0===l?void 0:l.runtime;p.duration=I;var E=null==e||null===(a=e[f])||void 0===a||null===(u=a.gist)||void 0===u?void 0:u.title;p.mediaTitle=E;var D=null==e||null===(s=e[f])||void 0===s||null===(c=s.gist)||void 0===c?void 0:c.videoImageUrl;return p.mediaImage=D,p.subTitles=t,p.DVR=(null==e||null===(d=e[f])||void 0===d||null===(v=d.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1,console.log(p),p}($,e,t)},modifyLoadRequestFn:function(e){var n,t,r,o,l,a=s.getPlayer(i),u=(null==a?void 0:a.currentSource())||{};!(null===(n=$)||void 0===n||null===(t=n[te])||void 0===t||null===(r=t.streamingInfo)||void 0===r||null===(o=r.videoAssets)||void 0===o?void 0:o.is4K)&&1||null!=u&&u.src&&null!=u&&null!==(l=u.src)&&void 0!==l&&l.includes(".m3u8")&&(e.media.hlsSegmentFormat="fmp4",e.media.hlsVideoSegmentFormat="fmp4");return e}}),X);if(!o.getPlayers()[i]){o.log.level("debug");var de=o(i,se,function(){var n=t(r.mark(function n(){var t,a,s,c,v,f,p,m,y,g,h,b,k,S,O,T,j,P,I,E;return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return console.log(de),console.log(o.VERSION),console.log(o.getPlugins()),n.next=5,D(u,$);case 5:if(b=null===(t=$)||void 0===t||null===(a=t[te])||void 0===a||null===(s=a.liveDetails)||void 0===s?void 0:s.startOverTime,ie&&d.resolve(Ee({status:!0,msg:"Player Initialised"},ee?{seriesResponse:ee,response:$}:{response:$})),e.inititateBeacon(i,null==u?void 0:u.analyticsCb),Q(i,u),/Android/i.test(navigator.userAgent)&&(o.options.vhs.overrideNative=!0),oe&&w(i,b),!le||null!=u&&null!==(c=u.customData)&&void 0!==c&&c.disableAds||e.initialiseAdvertisement(i,le,$),k=e.getSource($,i),console.log(k),null!=u&&u.nearestClusterUrl&&(k=e.getUpdatedClusterSource(k,u.nearestClusterUrl)),!ae){n.next=19;break}return n.next=18,ke(i,$);case 18:k=n.sent;case 19:k?e.loadVideo(i,k):(d.reject({status:!1,msg:"Incompatible / Missing Source",response:$}),e.handleError(i,"Incompatible / Missing Source")),((null===(v=$)||void 0===v||null===(f=v[te])||void 0===f||null===(p=f.contentDetails)||void 0===p||null===(m=p.closedCaptions)||void 0===m?void 0:m.length)>0||(null===(y=$)||void 0===y||null===(g=y[te])||void 0===g||null===(h=g.closedCaptions)||void 0===h?void 0:h.length)>0)&&(E=(null===(O=$)||void 0===O||null===(T=O[te])||void 0===T||null===(j=T.contentDetails)||void 0===j?void 0:j.closedCaptions)||(null===(P=$)||void 0===P||null===(I=P[te])||void 0===I?void 0:I.closedCaptions),S=E.filter(function(e){return"VTT"===e.format}),l.addCaptions(i,S)),null!=u&&u.disableControls?e.disableControls(i):z(i,Ee(Ee(Ee({},u),se),{},{liveVideo:ie,isDvrEnabled:oe,res:$,sres:ee})),ce(i,Ee(Ee(Ee({},u),se),{},{liveVideo:ie}),d,{res:$,sres:ee});case 23:case"end":return n.stop()}},n)}));return function(){return n.apply(this,arguments)}}())}},Ce={spinco:"e8f2c1a7-5d94-4a1f-93ea-7c0b9186f1cd"};function xe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function Ae(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?xe(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xe(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Re,Le=function(e,n){var t=n.resolve,r=n.reject,o=null==e?void 0:e.playerId,i=Ne(e);De(o,{res:i},e,{resolve:t,reject:r})},Ne=function(n){var t,r,o=null==n?void 0:n.streamingInfo,i=null==n||null===(t=n.streamingInfo)||void 0===t?void 0:t.videoAssets,l=(null==n||null===(r=n.streamingInfo)||void 0===r?void 0:r.isDrmEnabled)||null,a=null==n?void 0:n.token,u=e.getDecodedToken(a),s=null==u?void 0:u.site;return Ae(Ae({id:null==Ce?void 0:Ce[s]},!l&&{directPlaybackUrl:null==i?void 0:i.url}),{},{video:{drmEnabled:l,streamingInfo:{videoAssets:{widevine:null==i?void 0:i.widevine,fairPlay:null==i?void 0:i.fairPlay,playReady:null==i?void 0:i.playReady}},liveDetails:{isDvrEnabled:null==o?void 0:o.isDvrEnabled}}})};function Ve(e,n){return Me.apply(this,arguments)}function Me(){return(Me=t(r.mark(function n(t,o){var i,l,a,u,s,c;return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return i=o.resolve,l=o.reject,a=null==t?void 0:t.videoId,u=null==t?void 0:t.playerId,s=!(null==t||!t.anonymousId),n.next=6,e.getToken();case 6:c=n.sent,e.getVideoDetails(a,c).then(function(n){var r,o,d,v;window.contentType=null==n||null===(r=n.data)||void 0===r||null===(o=r.video)||void 0===o||null===(d=o.gist)||void 0===d?void 0:d.contentType,e.setCurrentVideo(null==n?void 0:n.data);var f,p=null==n?void 0:n.data;if(null!=t&&t.watchHistory&&null!=t&&null!==(v=t.watchHistory)&&void 0!==v&&v.enable&&!s)if((null===(f=t.watchHistory)||void 0===f?void 0:f.saveOffline)||!1){var m,y,g,h=te((null===(m=t.watchHistory)||void 0===m?void 0:m.profileId)||"",a,null==t?void 0:t.siteOwner);if(h&&h.length)t.watchHistoryResumeTime=(null===(y=h[0])||void 0===y?void 0:y.watchedTime)||null,t.watchedPercentage=(null===(g=h[0])||void 0===g?void 0:g.watchedPercentage)||null;p.contentType="video",De(u,{res:p},t,{resolve:i,reject:l})}else e.getVideoInfo(a,c).then(function(e){var n,r,o,i,l,a;null!==(n=window)&&void 0!==n&&null!==(r=n.watchHistory)&&void 0!==r&&r.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(null==e?void 0:e.data)),t.watchHistoryResumeTime=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedTime)||null,t.watchedPercentage=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null,p.contentType="video"}).catch(function(e){var n,t,r,o;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(r=window)||void 0===r||null===(o=r.watchHistory)||void 0===o||o.cb(e))}).finally(function(){De(u,{res:p},t,{resolve:i,reject:l})});else De(u,{res:p},t,{resolve:i,reject:l})}).catch(function(n){e.initiateErrorHandling(n,u,l,a)});case 8:case"end":return n.stop()}},n)}))).apply(this,arguments)}function _e(e,n){return Be.apply(this,arguments)}function Be(){return(Be=t(r.mark(function n(t,o){var i,l,a,u,s;return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return i=o.resolve,l=o.reject,n.next=3,e.getToken();case 3:a=n.sent,u=null==t?void 0:t.playerId,s=null==t?void 0:t.epg,e.getLinearChannelDetails(s,a).then(function(e){var n=null==e?void 0:e.data;n.contentType="linearchannel",n.channelId=null==s?void 0:s.channelId,De(u,{res:n},t,{resolve:i,reject:l})}).catch(function(n){e.initiateErrorHandling(n,u,l,videoId)});case 7:case"end":return n.stop()}},n)}))).apply(this,arguments)}function Ue(e,n){return He.apply(this,arguments)}function He(){return(He=t(r.mark(function n(t,o){var i,l,a,u,s,c,d;return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return l=o.resolve,a=o.reject,n.next=3,e.getToken();case 3:u=n.sent,s=null==t?void 0:t.playerId,c=sessionStorage.getItem("season-idx")||0,e.seasonIdxManager.set(parseInt(c)),d=null==t||null===(i=t.series)||void 0===i?void 0:i.id,e.getSeriesDetails(d,u).then(function(n){var r,o,i,c=n.data,v=n.data.seasons;e.setCurrentSeries(v);var f=videoId||(null==v||null===(r=v[0])||void 0===r||null===(o=r.episodes)||void 0===o||null===(i=o[0])||void 0===i?void 0:i.id);e.createSeriesWatchMap(d,u),e.getVideoDetails(f,u).then(function(n){var r,o,i;window.contentType=null==n||null===(r=n.data)||void 0===r||null===(o=r.video)||void 0===o||null===(i=o.gist)||void 0===i?void 0:i.contentType,e.setCurrentVideo(n.data),De(s,{res:null==n?void 0:n.data,sres:c},t,{resolve:l,reject:a})}).catch(function(n){e.initiateErrorHandling(n,s,a,videoId)})}).catch(function(n){e.initiateErrorHandling(n,s,a)});case 9:case"end":return n.stop()}},n)}))).apply(this,arguments)}function qe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function Fe(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?qe(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qe(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}exports.VLPlayerCore=function(){return{loadVideoInstantly:e.loadVideoInstantly,onTimeUpdate:i.onTimeUpdate,getVideoDuration:i.getVideoDuration,onVideoEnded:i.onVideoEnded,init:function(n){return console.log("%c VIDEOJS-8 ","background: #bdf369; color: #000"),new Promise(function(){var o=t(r.mark(function t(o,i){var l,a,u,c,v,f,p,y,g,h,b,w,k,S,O,T,j,P,E,D,C,x,A;return r.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.isPlayerInitialised(null==n?void 0:n.playerId)){t.next=2;break}return t.abrupt("return");case 2:if(b=(null==n?void 0:n.videoSourceUrl)||!1,w=null==n?void 0:n.asat,k=(null==n||null===(l=n.epg)||void 0===l?void 0:l.enable)||!1,S=null==n?void 0:n.videoId,O=(null==n||null===(a=n.series)||void 0===a?void 0:a.enable)||!1,T=(null==n?void 0:n.streamingInfo)||!1,window.videoId=S,j=null==n?void 0:n.token,!e.token_authentication_enabled(n)){t.next=17;break}if(sessionStorage.setItem("vlp_token",j),e.refreshTokenManager().set(null==n?void 0:n.refreshToken),j&&!e.isTokenExpired(j)){t.next=16;break}return i({status:!1,msg:"".concat(j?"Token is expired !":"Missing Authorization Token"),response:{token:j}}),t.abrupt("return");case 16:Re=JSON.parse(atob(j.split(".")[1]));case 17:return n.isAnonymousUser=!(null===(u=Re)||void 0===u||!u.anonymousId),n.siteOwner=(null===(c=Re)||void 0===c?void 0:c.site)||null,n.userId=(null===(v=Re)||void 0===v?void 0:v.userId)||null,window.sessionStorage.setItem("uid",null===(f=Re)||void 0===f?void 0:f.userId),window.watchHistory=n.watchHistory||null,P=null==n?void 0:n.playerId,n.chromecastReceiverId=null!=n&&null!==(p=n.series)&&void 0!==p&&p.enable?null:null==n?void 0:n.chromecastReceiverId,E=(null==n||null===(y=n.analytics)||void 0===y?void 0:y.gaId)||null,(D=null==n?void 0:n.errors)&&(window.customErrors=D),window.customData=null==n?void 0:n.customData,d.setLocalisation(null==n||null===(g=n.customData)||void 0===g?void 0:g.localisation),e.baseUrlManager.set(n.apiBaseUrl),null!=n&&n.skin&&!s.isNotAValidSkin(n.skin)||(n.skin="VL_ONE"),t.next=33,I(n);case 33:E&&m("https://www.googletagmanager.com/gtag/js?id=".concat(E)).then(function(){return e.runGtag(E)}).catch(function(e){}),(C=null===(h=document)||void 0===h?void 0:h.getElementById("".concat(P)))&&C.addEventListener("contextmenu",function(e){return e.preventDefault()}),b?(A={directPlaybackUrl:b,id:x="c09576ca-8202-4e8e-ba1e-06d1ab0ce063"},w?e.getVideoDetails(x,j).then(function(e){var t=(null==e?void 0:e.data)||{};De(P,{res:Fe(Fe({},t),A)},n,{resolve:o,reject:i})}).catch(function(n){e.initiateErrorHandling(n,P,i,x)}):De(P,{res:A},n,{resolve:o,reject:i})):T?Le(n,{resolve:o,reject:i}):O?Ue(n,{resolve:o,reject:i}):k?_e(n,{resolve:o,reject:i}):Ve(n,{resolve:o,reject:i});case 37:case"end":return t.stop()}},t)}));return function(e,n){return o.apply(this,arguments)}}())},getRenditions:a.getRenditions,skip:e.skip,getPlayer:s.getPlayer,play:e.play,pause:e.pause,detectBrowser:c.detectBrowser,rewind:e.rewind,loadVideo:e.loadVideo,seekToTimeStamp:i.seekToTimeStamp,isPlayerInitialised:e.isPlayerInitialised,load:e.load,authenticateLC:e.authenticateLC,dispose:e.dispose,enableCaptions:l.enableCaptions,disableCaptions:l.disableCaptions,getCaptions:l.getCaptions,playSelectedResolution:u.playSelectedResolution,getSource:e.getSource,setVolume:g,getVolume:h,disableControls:e.disableControls,setPlaybackSpeed:i.setPlaybackSpeed,getEntitlementData:e.getEntitlementData,adsQueuePointManager:je}},exports.initialiseKeyboardEvents=function(n,t){var r,o,i,l=s.getPlayer(n),a=null==l||null===(r=l.controlBar)||void 0===r||null===(o=r.playToggle)||void 0===o?void 0:o.el_,u=document.getElementsByTagName("video")[0];null===(i=document)||void 0===i||i.addEventListener("keydown",function(r){var o;if(ve.enabled&&"input"!=r.target.localName){var i=r.key,s=!0===t.liveVideo||!0===t.liveui;switch([" ","m","M","f","F","ArrowLeft","ArrowRight"].includes(i)&&(r.preventDefault(),null==u||u.focus()),i){case" ":null==a||a.click();break;case"m":case"M":l.muted(!l.muted());break;case"f":case"F":null===(o=document.querySelector(".vjs-fullscreen-control"))||void 0===o||o.click();break;case"ArrowLeft":s&&!1===t.liveui||e.rewind(n,10);break;case"ArrowRight":s||e.skip(n,10)}}},!0)},exports.setupAdvertisementMarkers=function(e,n){return Pe.apply(this,arguments)};
@@ -1 +0,0 @@
1
- "use strict";var e,t,n,o,i=require("@babel/runtime/helpers/toConsumableArray"),l=require("./skin-3544db58.js"),a=require("./generic-77c1578a.js"),r=require("./autoNextVideo-948fb789.js"),d=require("./icons-0ea2e662.js"),s=require("@babel/runtime/helpers/typeof"),u=require("video.js"),c=[],v=!1,m=function(e,t){var n=l.getPlayer(e),o=Math.floor(n.currentTime());if(Math.floor(n.duration())!=o){n.pause(e);var i=a.getVideoIdx();r.switchToNext(i,e,c)}};e={0:{src:"data:image/gif;base64,R0lGODlhAQABAPAAAP///wAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==",alt:"loading"}},t=function e(){var t,n,o,i,l;for(o in n=(t=Array.prototype.slice.call(arguments)).shift()||{},t)for(l in i=t[o])i.hasOwnProperty(l)&&("object"===s(i[l])?n[l]=e(n[l],i[l]):n[l]=i[l]);return n},n=function(e,t){return function(n){return window.getComputedStyle?window.getComputedStyle(e,t)[n]:e.currentStyle[n]}},o=function e(t){return"HTML"!==t.nodeName&&"static"===n(t)("position")?e(t.offsetParent):t},u.registerPlugin("thumbnails",function(i){var l,a,r,d,s,u,c,v;function m(){document.removeEventListener("pointermove",c),document.removeEventListener("pointerup",m),v()}a=t({},e,i),d=this,function(){var e,t,n;-1!==navigator.userAgent.toLowerCase().indexOf("android")&&(t=function(){e.addClass("fake-active")},n=function(){e.removeClass("fake-active")},(e=d.controlBar.progressControl).on("touchstart",t),e.on("touchend",n),e.on("touchcancel",n))}(),(l=document.createElement("div")).className="vjs-thumbnail-holder",r=document.createElement("img"),l.appendChild(r),r.src=a[0].src,r.className="vjs-thumbnail",t(r.style,a[0].style),r.style.left||r.style.right||(r.onload=function(){r.style.left=-r.naturalWidth/2+"px"}),u=d.duration(),d.on("durationchange",function(e){u=d.duration()}),d.on("loadedmetadata",function(e){u=d.duration()}),(s=d.controlBar.progressControl).el().appendChild(l),c=function(e){var i,d,c,v,m,p,f,g,h,y;for(d in c=0,h=(window.pageXOffset?{x:window.pageXOffset,y:window.pageYOffset}:{x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop}).x,f=((y=o(s.el()).getBoundingClientRect()).width||y.right)+h,p=e.pageX,e.changedTouches&&(p=e.changedTouches[0].pageX),v=p||e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,v-=o(s.el()).getBoundingClientRect().left+h,i=Math.floor((v-s.el().offsetLeft)/s.width()*u),a)i>d&&(c=Math.max(c,d));(m=a[c]).src&&r.src!=m.src&&(r.src=m.src),m.style&&r.style!=m.style&&t(r.style,m.style),v+(g=function(e,t){var o;return t?parseFloat(t):"auto"!==(o=n(e)("clip"))&&"inherit"!==o&&4===(o=o.split(/(?:\(|\))/)[1].split(/(?:,| )/)).length?parseFloat(o[1])-parseFloat(o[3]):0}(r,m.width||a[0].width)/2)>f?v-=v+g-f:v<g&&(v=g),l.style.left=v+"px"},s.on("mousemove",c),s.on("touchmove",c),s.on("pointerdown",function(e){document.addEventListener("pointermove",c),document.addEventListener("pointerup",m)}),v=function(e){l.style.left="-1000px"},s.on("mouseout",v),s.on("touchcancel",v),s.on("touchend",v),d.on("userinactive",v)}),exports.addNextEpPreview=function(e,t){var n;if(v=!1,null!=t&&null!==(n=t.series)&&void 0!==n&&n.enable){var o;c=[];var r=a.getCurrentSeries();null==r||r.map(function(e){var t;return(t=c).push.apply(t,i(e.episodes))}),null==t||null===(o=t.series)||void 0===o||o.cb}else{var s,u;c=(null==t||null===(s=t.relatedVideos)||void 0===s?void 0:s.content)||[],null==t||null===(u=t.relatedVideos)||void 0===u||u.cb}var p=l.getPlayer(e);p.on("timeupdate",function(){var e,t;if(!v){var n=Math.floor(p.currentTime()),o=p.duration(),i=null===(e=document.getElementsByClassName("next-ep-preview"))||void 0===e?void 0:e[0];o-n<=10&&a.getVideoIdx()<=(null===(t=c)||void 0===t?void 0:t.length)-1?i&&(i.style.visibility="visible"):i&&(i.style.visibility="hidden")}});var f,g=c.filter(function(e,t){return t==a.getVideoIdx()});if((null==g?void 0:g.length)>0)if(null!==(f=document.getElementsByClassName("next-ep-preview"))&&void 0!==f&&f[0]){var h,y,x,A,w,E,C,b,N,B,L,P;(null===(h=document.getElementsByClassName("next-ep-preview"))||void 0===h?void 0:h[0]).style.visibility="hidden";var I=null===(y=document.getElementsByClassName("next-ep-title"))||void 0===y?void 0:y[0],j=null===(x=document.getElementsByClassName("next-ep-img"))||void 0===x?void 0:x[0],k=null===(A=document.getElementsByClassName("next-ep-content"))||void 0===A?void 0:A[0],T=null===(w=g[0])||void 0===w?void 0:w.title;(null===(E=T)||void 0===E?void 0:E.length)>60&&(T=T.substr(0,60)+"..."),I.textContent="".concat(T),j.src=(null===(C=g[0])||void 0===C||null===(b=C.gist)||void 0===b||null===(N=b.imageGist)||void 0===N?void 0:N.r16x9)||(null==g||null===(B=g[0])||void 0===B?void 0:B.img)||(null===(L=window)||void 0===L||null===(P=L.customData)||void 0===P?void 0:P.fallbackImage),k.onclick=function(){return m(e)}}else{var q,O,S,V,M,X,F,R,D=document.createElement("div");D.className="next-ep-preview",D.style.visibility="hidden",document.getElementById(e).append(D);var G=document.createElement("div");G.className="next-heading-wrapper";var H=document.createElement("div");H.className="next-ep-header",H.textContent="Next up";var Q=document.createElement("div");Q.className="next-ep-close",Q.onclick=function(){D.style.visibility="hidden",v=!0},Q.appendChild(l.parseSvgString(d.crossIconSvg())),G.append(H),G.append(Q);var U=null===(q=g[0])||void 0===q?void 0:q.title,W=document.createElement("img");W.className="next-ep-img",W.src=(null===(O=g[0])||void 0===O||null===(S=O.gist)||void 0===S||null===(V=S.imageGist)||void 0===V?void 0:V.r16x9)||(null==g||null===(M=g[0])||void 0===M?void 0:M.img)||(null===(X=window)||void 0===X||null===(F=X.customData)||void 0===F?void 0:F.fallbackImage);var Y=document.createElement("div");Y.className="next-ep-title",(null===(R=U)||void 0===R?void 0:R.length)>60&&(U=U.substr(0,60)+"..."),Y.textContent="".concat(U);var _=document.createElement("div");_.className="next-ep-content",_.append(W),_.append(Y),_.onclick=function(){return m(e)},D.append(G),D.append(_)}},exports.addTVProviderImage=function(e,t){var n=l.getPlayer(e),o=null==t?void 0:t.tvProviderLogoUrl;if(o){var i=document.createElement("div");i.className="tvProviderImage";var a=document.createElement("img");a.src="".concat(o),a.alt="Provider Image",i.append(a),n.el().appendChild(i),n.on("useractive",function(){i.classList.remove("vjs-fade")}),n.on("userinactive",function(){n.paused()||i.classList.add("vjs-fade")}),n.on("fullscreenchange",function(){n.isFullscreen_?i.style.top="3.2rem":i.style.top="1rem"})}};
@@ -1 +0,0 @@
1
- "use strict";var l=require("./skin-3544db58.js");exports.getRenditions=function(i){var n,t=l.getPlayer(i),e=[];if((null==t||null===(n=t.tech_)||void 0===n?void 0:n.vhs)||!1){var o,d,u=null==t||null===(o=t.tech_)||void 0===o||null===(d=o.vhs)||void 0===d?void 0:d.representations();(null==u?void 0:u.length)>0&&(e=null==u?void 0:u.sort(function(l,i){return(null==l?void 0:l.height)==(null==i?void 0:i.height)?(null==i?void 0:i.bandwidth)-(null==l?void 0:l.bandwidth):(null==i?void 0:i.height)-(null==l?void 0:l.height)}))}else{var v,r,h=null==t||null===(v=t.dash)||void 0===v||null===(r=v.mediaPlayer)||void 0===r?void 0:r.getBitrateInfoListFor("video");(null==h?void 0:h.length)>0&&(e=null==h?void 0:h.sort(function(l,i){return i.height-l.height}))}return e};
@@ -1 +0,0 @@
1
- "use strict";exports.default=".video-js .series-selection {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.video-js .series-selection .series-selector-icon {\n cursor: pointer;\n}\n\n.video-js .series-selection .series-selection-container {\n position: absolute;\n width: 250px;\n bottom: 0px;\n right: 0px;\n background: #000000 !important;\n z-index: 1;\n transition: right 300ms ease-out;\n}\n.video-js .series-selection .series-selection-container .series-selector-content .series-container:hover{\n cursor: pointer;\n}\n\n.video-js .series-selection .series-selection-container .series-selector-content .series-container {\n display: flex;\n align-items: center;\n width: 100%;\n padding: 8px;\n border-bottom: 1.5px solid gray;\n margin: 0;\n}\n\n.video-js .series-selection .series-selection-container .series-selector-content .series-container:first-child {\nborder-top: 1.5px solid gray;\n}\n\n.series-selection.open {\n background: rgba(255, 255, 255, 0.20) !important;\n}\n\n.video-js .series-selection .series-selection-container .series-selector-head {\n display: flex;\n align-items: center;\n}\n\n.video-js .series-selection .series-selection-container .series-selector-head .series-selector-title {\n text-align: left;\n background: #000;\n border-bottom: 1px solid #484848;\n width: 100%;\n padding: 0 3px 0 30px;\n font-size: 13px;\n line-height: 38px;\n}\n\n.video-js .series-selection .series-selector-cross-icon {\n cursor: pointer;\n position: absolute;\n right: 10px;\n}\n\n.video-js .series-selection .series-selection-container .series-selector-head .series-selector-back-icon {\n cursor: pointer;\n position: absolute;\n padding: 10px 8px;\n}\n\n.video-js .series-selection .series-selection-container .series-selector-content {\n height: 90%;\n -webkit-overflow-scrolling: touch;\n scrollbar-width: thin;\n scrollbar-color: #666 #444;\n width: 100%;\n overflow: hidden auto;\n}\n\n/* Scroll Bar */\n/* .video-js .series-selection .series-selection-container .series-selector-content::-webkit-scrollbar { */\n /* display: none; */\n/* } */\n\n/* Hide scrollbar for IE, Edge and Firefox */\n/* .video-js .series-selection .series-selection-container .series-selector-content { */\n /* -ms-overflow-style: none; */\n /* IE and Edge */\n /* scrollbar-width: none; */\n /* Firefox */\n/* } */\n\n\n\n\n.video-js .series-selection .series-selection-container .series-selector-content .series-section-data{\n font-size: 12px;\n text-align: left;\n margin-left: 5px;\n flex: 1;\n}\n\n.video-js .series-selection .series-selection-container .series-selector-content .series-section-image{\n width: 96px;\n height: 65px;\n flex: 1;\n background-repeat: no-repeat;\n background-size: contain;\n}\n.video-js .series-selection .series-selection-container .series-selector-content .series-section-image.hidden{\n visibility: hidden ;\n max-height: 0;\n}\n\n.video-js .series-selection .series-selection-container .series-selector-content .series-section-data .series-title{\n font-size: 12px;\n font-weight: 800;\n text-align: start;\n pointer-events: none;\n width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n\n}\n\n.video-js .series-selection .series-selection-container .series-selector-content .series-section-data .series-title:hover{\n cursor: pointer;\n}\n.video-js .series-selection .series-selection-container .series-selector-content .series-section-image .series-image {\n width: 100%;\n height: 100%;\n}\n\n\n.video-js .series-selection .series-selection-container .series-selector-content .series-section-expanded:hover{\n cursor: pointer;\n}\n\n\n.video-js .series-selection .series-selection-container .series-selector-content .season-container {\n width: 100%;\n margin-bottom: 30px;\n}\n\n.video-js .series-selection .series-selection-container .series-selector-content .season-container .season-holder {\n display: flex;\n width: 90%;\n height: 2.5rem;\n padding: 10px 10px;\n margin-bottom: 10px;\n margin-left: 6px;\n}\n\n.video-js .series-selection .series-selection-container .series-selector-content .season-container .season-holder>input {\n margin: 1px 4px;\n visibility: hidden;\n display: none;\n}\n\n.video-js .series-selection .series-selection-container .series-selector-content .season-container .season-holder>input[type='radio']:checked {\n background: black;\n}\n\n.season-selected {\n background: rgba(255, 255, 255, 0.2);\n}\n\n.video-js .series-selection .series-selection-container .series-selector-content .season-container .season-holder:hover {\n cursor: pointer;\n}\n.video-js .series-selection .series-selection-container .series-selector-content .season-container .season-holder .season {\n display: flex;\n align-items: center;\n font-size: 13px;\n margin-left: 14px;\n}\n\n.video-js .series-selection .series-selection-container.hidden{\n right: -250px;\n}\n\n@media (max-width:600px){\n .video-js .series-selection{\n display: none;\n }\n}\n";
@@ -1 +0,0 @@
1
- "use strict";var e=require("@babel/runtime/helpers/toConsumableArray"),t=require("@babel/runtime/helpers/classCallCheck"),s=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/assertThisInitialized"),o=require("@babel/runtime/helpers/inherits"),i=require("@babel/runtime/helpers/possibleConstructorReturn"),l=require("@babel/runtime/helpers/getPrototypeOf"),a=require("video.js"),r=require("./icons-0ea2e662.js"),d=require("./generic-77c1578a.js"),c=require("./skin-3544db58.js"),u=require("./autoNextVideo-948fb789.js");function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(v=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("./browser-77c57718.js"),require("js-cookie"),require("ua-parser-js"),require("./captions-07bd3069.js"),require("./util-ef2cd61e.js");var m=a.getComponent("Component"),p=function(){o(b,m);var p,h,y=(p=b,h=v(),function(){var e,t=l(p);if(h){var s=l(this).constructor;e=Reflect.construct(t,arguments,s)}else e=t.apply(this,arguments);return i(this,e)});function b(s){var o,i,l,a,r,c,v=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t(this,b),(c=y.call(this,s,v)).playerId=v.playerId,c.seriesData=v.sres,c.videos=null==v||null===(o=v.sres)||void 0===o?void 0:o.seasons,c.currentVideoData=v.res,c.initialiseStructure(),c.loadCSS(),c.selectedSeason=0,c.cb=null==v||null===(i=v.series)||void 0===i?void 0:i.cb,c.autoPlayNext=(null==v||null===(l=v.series)||void 0===l?void 0:l.autoPlayNext)||!1,sessionStorage.getItem("token"),c.watchMap=d.getSeriesWatchMap(),null!==(a=n(c))&&void 0!==a&&a.autoPlayNext&&null!=v&&null!==(r=v.series)&&void 0!==r&&r.enable){var m,p,h,g,f=null==v||null===(m=v.sres)||void 0===m?void 0:m.seasons,C=[];f.map(function(t){C.push.apply(C,e(t.episodes))}),d.createIdxMapping(C),d.setVideoIdxById(null===(p=c.options_)||void 0===p||null===(h=p.res)||void 0===h||null===(g=h.video)||void 0===g?void 0:g.id),u.autoPlayNext({playerId:c.playerId,content:C,cb:c.cb,series:null==v?void 0:v.sres})}return c}return s(b,[{key:"createEl",value:function(){var e=a.dom.createEl("div",{className:"series-selection vjs-control vjs-button"});e.style.position="unset";var t=a.dom.createEl("button",{className:"series-selector-icon",title:"series selector",innerHTML:"".concat(r.PlaylistIcon())});return a.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then(function(){return require("./series-v2-68886cd2.js")}).then(function(e){var t=document.createElement("style");t.id="series-v2",t.append("".concat(e.default)),document.head.appendChild(t)})}},{key:"toggleOpenClose",value:function(e){var t,s=this.el();null!=e&&null!==(t=e.classList)&&void 0!==t&&t.contains("hidden")?(c.closeOpenDrawers(),e.classList.remove("hidden"),s.classList.add("open"),c.setUpdatedElHeight(this.playerId,e)):(e.classList.add("hidden"),s.classList.remove("open"))}},{key:"handleTabIndexSelector",value:function(){var e,t=document.getElementsByClassName("season-holder");null!==(e=document.getElementsByClassName("series-selector-cross-icon"))&&void 0!==e&&e[0]&&(document.getElementsByClassName("series-selector-cross-icon")[0].tabIndex=0);for(var s=0;s<(null==t?void 0:t.length);s++)t[s].tabIndex=0}},{key:"handleCloseTabIndex",value:function(){var e,t=document.getElementsByClassName("season-holder");null!==(e=document.getElementsByClassName("series-selector-cross-icon"))&&void 0!==e&&e[0]&&(document.getElementsByClassName("series-selector-cross-icon")[0].tabIndex=-1);for(var s=0;s<(null==t?void 0:t.length);s++)t[s]&&(t[s].tabIndex=-1)}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),s=a.dom.createEl("div",{className:"series-selection-container hidden",role:"dialog",ariaModal:"false"});s.setAttribute("aria-labelledby","Seasons Dialog"),a.dom.$(".series-selector-icon",this.el()).onclick=function(){e.toggleOpenClose(s),e.handleTabIndexSelector()};var n=document.getElementById(this.playerId);if(n){var o=window.getComputedStyle(n,null).getPropertyValue("height").slice(0,-2);s.style.height="".concat(o,"px"),a.dom.appendContent(t,s),n.style.overflow="hidden",this.addFunctionality(s)}}},{key:"handleSeriesCloseIcon",value:function(e,t,s){if("series-selector-cross-icon"===e.className)t.classList.add("hidden"),s.classList.remove("open"),this.handleCloseTabIndex();else if("series-selector-back-icon"===e.className){var n=a.dom.$(".series-selector-content",this.el());for(a.dom.$(".series-selector-cross-icon",this.el()),e.className="series-selector-cross-icon";null!=n&&n.firstChild;)n.removeChild(n.firstChild);var o=this.createSeasonLister();for(a.dom.appendContent(n,o),a.dom.$(".series-selector-title",this.el()).textContent="Seasons";null!=e&&e.firstChild;)e.removeChild(e.firstChild);var i=c.parseSvgString(r.crossIconSvg());e.appendChild(i)}}},{key:"addFunctionality",value:function(e){var t=this,s=this.el(),n=a.dom.createEl("div",{className:"series-selector-head"}),o=a.dom.createEl("button",{className:"series-selector-cross-icon",ariaLabel:"close season selector",innerHTML:"".concat(r.crossIconSvg()),tabIndex:-1});o.onclick=function(){t.handleSeriesCloseIcon(o,e,s)},o.onkeydown=function(n){"Enter"===n.key&&t.handleSeriesCloseIcon(o,e,s)};var i=a.dom.createEl("div",{className:"series-selector-title",ariaLabel:"season title",innerHTML:"Seasons"}),l=a.dom.createEl("div",{className:"series-selector-content"}),d=this.createSeasonLister();a.dom.appendContent(l,d),a.dom.appendContent(n,o),a.dom.appendContent(n,i),a.dom.appendContent(e,n),a.dom.appendContent(e,l),c.handleDrawerResizing(this.playerId,e)}},{key:"createSeasonLister",value:function(){var e=this;c.getPlayer(this.playerId);for(var t=d.getCurrentSeries(),s=a.dom.createEl("div",{className:"season-container"}),n=function(n){var o,i,l,r,c=document.createElement("label");c.className="season-holder",c.ariaLabel=null===(o=t[n])||void 0===o?void 0:o.title,c.role="button",c.type="button",c.setAttribute("aria-LabelledBy",null===(i=t[n])||void 0===i?void 0:i.title),c.setAttribute("for","season-".concat(n));var u=document.createElement("div");u.className="season - ".concat(n),u.textContent=null===(l=t[n])||void 0===l?void 0:l.title,u.id=null===(r=t[n])||void 0===r?void 0:r.title;var v=a.dom.createEl("input",{className:"radio - ".concat(n),id:"season-".concat(n),name:"season-radio"});v.setAttribute("type","radio"),e.selectedSeason==n&&(v.checked=!0),v.onclick=function(t){d.seasonIdxManager.set(n),e.showSeasonDetails(n)},c.onkeydown=function(t){"Enter"===t.key&&(d.seasonIdxManager.set(n),e.showSeasonDetails(n))},a.dom.appendContent(c,v),a.dom.appendContent(c,u),a.dom.appendContent(s,c)},o=0;o<t.length;o++)n(o);return s}},{key:"loadSeriesAssetById",value:function(e,t){var s,n=this;d.setVideoIdxById(null===(s=e[t])||void 0===s?void 0:s.id),d.load(this.playerId,e[t].id).then(function(e){null!=n&&n.cb&&n.cb(e)}).catch(function(e){null!=n&&n.cb&&n.cb(e)})}},{key:"getSeasonDetailsContainer",value:function(t,s){var n=this;t=t.map(function(e){var t,s,o,i,l,a,r,d,c;return{id:null==e?void 0:e.id,title:null==e?void 0:e.title,description:null==e||null===(t=e.gist)||void 0===t?void 0:t.description,img:(null==e||null===(s=e.gist)||void 0===s||null===(o=s.imageGist)||void 0===o?void 0:o.r16x9)||(null===(i=window)||void 0===i||null===(l=i.app_data)||void 0===l||null===(a=l.appcmsMain)||void 0===a||null===(r=a.images)||void 0===r?void 0:r.placeholderCover),watchedPercentage:(null==n||null===(d=n.watchMap)||void 0===d||null===(c=d.get(null==e?void 0:e.id))||void 0===c?void 0:c.p)||0}});for(var o=function(o){var i,l,r,d,u,v=a.dom.createEl("div",{className:"series-container",tabIndex:0,role:"button",type:"button"}),m=a.dom.createEl("div",{className:"series-section-data",index:o,innerHTML:"".concat((null===(i=t[o])||void 0===i?void 0:i.title)||"")});a.dom.createEl("div",{className:"series-title",innerHTML:"".concat((null===(l=t[o])||void 0===l?void 0:l.title)||"")}),a.dom.createEl("div",{className:"series-progress-bar",innerHTML:"<div style='width:".concat(t[o].watchedPercentage,"%' class='series-progress-bar-value'></div>")});var p=a.dom.createEl("div",{className:"series-section-image"}),h=(null===(r=t[o])||void 0===r?void 0:r.description)||"";(null===(d=h)||void 0===d?void 0:d.length)>170&&(h=h.substr(0,170)+"..."),a.dom.createEl("div",{className:"series-description",innerHTML:"".concat(h||"")});var y=a.dom.createEl("img",{className:"series-image"});y.src="".concat(c.impolicy16x9(null===(u=t[o])||void 0===u?void 0:u.img)),y.alt="Episode ".concat(o+1),a.dom.appendContent(p,y),a.dom.appendContent(v,p),a.dom.appendContent(v,m),a.dom.appendContent(s,v),v.onclick=function(e){e.stopPropagation(),n.loadSeriesAssetById(t,o)},v.onkeydown=function(e){"Enter"===e.key&&(e.stopPropagation(),n.loadSeriesAssetById(t,o))},m.onclick=function(t){var s,n,o,i=document.getElementsByClassName("series-selector-content")[0].childNodes,l=(i=e(i))[t.target.index].getElementsByClassName("series-section-expanded")[0];null!=l&&null!==(s=l.classList)&&void 0!==s&&s.contains("hidden")?(v.style.backgroundColor="#0000007d",null==l||null===(n=l.classList)||void 0===n||n.remove("hidden")):(null==l||null===(o=l.classList)||void 0===o||o.add("hidden"),v.style.backgroundColor="unset")}},i=0;i<t.length;i++)o(i);return parent}},{key:"showSeasonDetails",value:function(e){this.selectedSeason=e;for(var t=a.dom.$(".series-selector-content",this.el());null!=t&&t.firstChild;)t.removeChild(t.firstChild);var s=d.getCurrentSeries()[e].episodes;this.getSeasonDetailsContainer(s,t);var n=a.dom.$(".series-selector-cross-icon",this.el());for(n.className="series-selector-back-icon";null!=n&&n.firstChild;)n.removeChild(n.firstChild);var o=c.parseSvgString(r.BackIcon());n.appendChild(o),a.dom.$(".series-selector-title",this.el()).textContent="Season ".concat(e+1)}}]),b}();exports.default=p;
@@ -1 +0,0 @@
1
- "use strict";var e=require("@babel/runtime/helpers/toConsumableArray"),n=require("video.js"),t=function(e){return!!n.getPlayer("".concat(e))&&n.getPlayer("".concat(e))},i=["live","carousel","V2","defaultV2","multiplayer","minimalist","VL_ONE"],o=function(e){var n=(new DOMParser).parseFromString(e,"image/svg+xml");return null==n?void 0:n.querySelector("svg")},r=function(n){e(document.querySelectorAll("[video-idx]")).map(function(e){var t=e.getAttribute("video-idx");e.style.border=t==n?"2px solid white":"none"})},l="",a=function(e,n){var t;if(n){var i=document.getElementById(e),o=null===(t=window.getComputedStyle(i,null))||void 0===t?void 0:t.height;n.style.height!==o&&(n.style.height="".concat(o))}};exports.clearEventListeners=function(){window._orientationChangeHandler&&(window.removeEventListener("resize",window._orientationChangeHandler),delete window._orientationChangeHandler),window._multiplayer_dbClickHandler&&(window.removeEventListener("dblclick",window._multiplayer_dbClickHandler),delete window._multiplayer_dbClickHandler),window._multiplayer_dbTapHandler&&(window.removeEventListener("touchend",window._multiplayer_dbTapHandler),delete window._multiplayer_dbTapHandler)},exports.closeOpenDrawers=function(){var n=e(document.getElementsByClassName("vjs-control vjs-button open"));null==n||n.map(function(e){var n,t;null==e||null===(n=e.childNodes)||void 0===n||null===(t=n[0])||void 0===t||t.click()})},exports.createIconMarkup=function(e){return o(e)},exports.detectOrientationChange=function(e,n){var t,i=function(){return function(e,n){var t=window.matchMedia("(orientation: portrait)").matches?"potrait":"landscape",i=document.getElementById(e);if(i&&l!==t){var o=window.getComputedStyle(i,null).getPropertyValue("height");n&&(n.style.height="".concat(o)),l=t}}(e,n)};window._orientationChangeHandler=i;window.addEventListener("resize",function(){clearTimeout(t),t=setTimeout(function(){i()},100)})},exports.getPlayer=t,exports.handleDrawerResizing=function(e,n){var i,o=t(e),r=t(e).el(),l=new ResizeObserver(function(){var t;null!==(t=n.classList)&&void 0!==t&&t.contains("hidden")||(i&&clearTimeout(i),i=setTimeout(function(){a(e,n)},300))});l.observe(r),o.on("dispose",function(){l.disconnect()}),o.on("fullscreenchange",function(){setTimeout(function(){a(e,n)},50)})},exports.highlightVideo=function(n,i){if(i){var o,l,a=t(i);if(a&&"function"==typeof a.el&&null!=a&&null!==(o=a.el())&&void 0!==o&&null!==(l=o.classList)&&void 0!==l&&l.contains("skin_defaultv2"))return void r(n)}var u=e(document.querySelectorAll("[video-idx]"));console.log(u),u.map(function(e){var t=e.parentNode,i=e.getAttribute("video-idx");t.style.background=i==n?"gray":"none"})},exports.highlightVideo_DEFAULTV2_TEMP=r,exports.impolicy16x9=function(e){return e&&!e.includes("?impolicy")?e+"?impolicy=resize&w=1920&h=1080":null},exports.isNotAValidSkin=function(e){return!i.includes(e)},exports.parseHtmlString=function(e){var n=(new DOMParser).parseFromString(e,"text/html");return null==n?void 0:n.querySelector("body")},exports.parseSvgString=o,exports.setUpdatedElHeight=a,exports.throttle=function(e,n){var t=null,i=null;return function(){for(var o=this,r=arguments.length,l=new Array(r),a=0;a<r;a++)l[a]=arguments[a];i?(clearTimeout(t),t=setTimeout(function(){Date.now()-i>=n&&(e.apply(o,l),i=Date.now())},n-(Date.now()-i))):(e.apply(this,l),i=Date.now())}};
@@ -1 +0,0 @@
1
- "use strict";var e=require("./features-07fdfbf2.js"),l=require("./skin-3544db58.js"),r=require("./index-b0ccbe15.js");require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/slicedToArray"),require("@babel/runtime/helpers/toConsumableArray"),require("videojs-contrib-quality-menu");var i=require("video.js"),o=require("./index-898638ad.js"),n=require("./generic-77c1578a.js");require("@babel/runtime/helpers/classCallCheck"),require("@babel/runtime/helpers/createClass"),require("@babel/runtime/helpers/inherits"),require("@babel/runtime/helpers/possibleConstructorReturn"),require("@babel/runtime/helpers/getPrototypeOf"),require("./renditions-fed22c12.js"),require("./localisation-56e0a999.js"),require("./autoNextVideo-948fb789.js"),require("./util-ef2cd61e.js"),require("./icons-0ea2e662.js"),require("@babel/runtime/helpers/typeof"),require("video.js/dist/video-js.min.css"),require("./captions-07bd3069.js"),require("./resolution-e46c9615.js"),require("@babel/runtime/helpers/assertThisInitialized"),require("./browser-77c57718.js"),require("axios"),require("js-cookie"),require("ua-parser-js");function u(i,o){var n=l.getPlayer(i);n&&(n.on("loadeddata",function(){var e,n,u,a,d;!function(e){var r=l.getPlayer(e);r&&(null==r||r.qualityMenu,r.qualityMenu({useResolutionLabels:!0}))}(i),!(null!=o&&null!==(e=o.series)&&void 0!==e&&e.enable||null!==(n=window)&&void 0!==n&&null!==(u=n.app_data)&&void 0!==u&&null!==(a=u.appcmsMain)&&void 0!==a&&null!==(d=a.features)&&void 0!==d&&d.auto_play)||null!=o&&o.liveVideo||r.addNextEpPreview(i,o)}),n.one("play",function(){var l,r,o,n;null!==(l=window)&&void 0!==l&&null!==(r=l.customData)&&void 0!==r&&r.iframeOverlayUrl&&e.addOutputtingOverlay(i,null===(o=window)||void 0===o||null===(n=o.customData)||void 0===n?void 0:n.iframeOverlayUrl)}))}var a=function(e,r){var o,n,u,a,d,t,s,v,p,c,b,y,m=l.getPlayer(e),q=(null==r?void 0:r.theme)||{},g=i.dom.$(".vjs-play-progress"),h=i.dom.$(".video-js .vjs-big-play-button .vjs-icon-placeholder");h&&(h.style.color="".concat(null===(o=window)||void 0===o||null===(n=o.app_data)||void 0===n||null===(u=n.appcmsMain)||void 0===u||null===(a=u.brand)||void 0===a||null===(d=a.cta)||void 0===d||null===(t=d.primary)||void 0===t?void 0:t.backgroundColor)),g&&(g.style.background="".concat(null===(s=window)||void 0===s||null===(v=s.app_data)||void 0===v||null===(p=v.appcmsMain)||void 0===p||null===(c=p.brand)||void 0===c||null===(b=c.cta)||void 0===b||null===(y=b.primary)||void 0===y?void 0:y.backgroundColor));var j=m.getChild("BigPlayButton")||null;(null==q?void 0:q.progressBarColor)&&g&&(g.style.background=q.progressBarColor),(null==q?void 0:q.playButtonBackgroundColor)&&j&&(j.el().style.background=q.playButtonBackgroundColor),(null==q?void 0:q.playButtonColor)&&h&&(h.style.color=q.playButtonColor),(null==q?void 0:q.playButtonType)&&("square"==(null==q?void 0:q.playButtonType)?j.el().style.borderRadius=".3em":j.el().style.borderRadius="1.3em")};exports.initialiseSkin=function(i,d){l.getPlayer(i).addClass("skin_vlone"),u(i,d),function(l,i){var u,a,d,t,s,v,p,c,b,y,m,q,g=n.getSource(null==i?void 0:i.res,l)||{};g.src,(null==i||null===(u=i.relatedVideos)||void 0===u||null===(a=u.content)||void 0===a?void 0:a.length)>0&&e.addVideoSelector(l,null==i?void 0:i.relatedVideos);null!=i&&null!==(d=i.series)&&void 0!==d&&d.enable&&e.addSeriesSelectorV2(l,i);(null==i||null===(t=i.streams)||void 0===t?void 0:t.length)>1&&e.addMulticamSelector(l,null==i?void 0:i.streams);if(r.addTVProviderImage(l,i),o.initialiseKeyboardEvents(l,i),"MEDIA_TAILOR"==(null===(s=window)||void 0===s||null===(v=s.app_data)||void 0===v||null===(p=v.appcmsMain)||void 0===p||null===(c=p.adsConfig)||void 0===c?void 0:c.vodAdSticherProvider)&&null!==(b=window)&&void 0!==b&&null!==(y=b.app_data)&&void 0!==y&&null!==(m=y.appcmsMain)&&void 0!==m&&null!==(q=m.adsConfig)&&void 0!==q&&q.vodAdClientSideTracking){var h,j=null;if(null!=i&&null!==(h=i.series)&&void 0!==h&&h.enable){var f,C,w,k=null===(f=n.getCurrentVideo())||void 0===f||null===(C=f.video)||void 0===C||null===(w=C.gist)||void 0===w?void 0:w.id,B=n.getSeriesWatchMap(),M=(null==B?void 0:B.get(k))||{t:0,p:0},P=M.t;M.p,j=P}else{j=i.watchHistoryResumeTime}o.setupAdvertisementMarkers(l,j)}}(i,d),a(i,d)};
@@ -1 +0,0 @@
1
- "use strict";var e=require("./features-07fdfbf2.js"),t=require("./icons-0ea2e662.js"),r=require("./skin-3544db58.js"),n=require("./renditions-fed22c12.js"),i=require("./captions-07bd3069.js"),l=require("./index-b0ccbe15.js"),a=require("@babel/runtime/helpers/asyncToGenerator"),u=require("@babel/runtime/regenerator"),o=require("@babel/runtime/helpers/defineProperty"),s=require("@babel/runtime/helpers/slicedToArray"),d=require("./generic-77c1578a.js"),c=require("./browser-77c57718.js");function p(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function v(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?p(Object(r),!0).forEach(function(t){o(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):p(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}require("@babel/runtime/helpers/classCallCheck"),require("@babel/runtime/helpers/createClass"),require("@babel/runtime/helpers/inherits"),require("@babel/runtime/helpers/possibleConstructorReturn"),require("@babel/runtime/helpers/getPrototypeOf"),require("video.js"),require("./localisation-56e0a999.js"),require("@babel/runtime/helpers/toConsumableArray"),require("./autoNextVideo-948fb789.js"),require("./util-ef2cd61e.js"),require("@babel/runtime/helpers/typeof"),require("axios"),require("js-cookie"),require("ua-parser-js");var m="my-player";function f(e){var t=e.split("\n"),r=[];return t.forEach(function(e){if((e=e.trim()).startsWith("#EXT-X-IMAGE-STREAM-INF")){var t=e.split(","),n={resolution:null,uri:null};t.forEach(function(e){e.includes("RESOLUTION")&&(n.resolution=e.split("=")[1]),e.includes("URI")&&(n.uri=e.split("=")[1].replace(/"/g,""))}),r.push(n)}}),r}function g(){return(g=a(u.mark(function e(t){var r,n,i,l,a,o,d,c,p,v,m,f,g,h,b,y,x,w,j,E,k,S,q,T;return u.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!t._tiles){e.next=2;break}return e.abrupt("return",t._tiles);case 2:return e.prev=2,e.next=5,fetch(t.uri,{mode:"cors"});case 5:return r=e.sent,e.next=8,r.blob();case 8:return n=e.sent,e.next=11,createImageBitmap(n);case 11:for(i=e.sent,l=t.layout.split("x").map(Number),a=s(l,2),o=a[0],d=a[1],c=i.width/d,p=i.height/o,v=[],m=0;m<o;m++)for(f=0;f<d;f++)(g=document.createElement("canvas")).width=c,g.height=p,g.getContext("2d").drawImage(i,f*c,m*p,c,p,0,0,c,p),h=g.toDataURL("image/png"),v.push({uri:h,duration:t.duration}),t._tiles=v;return e.abrupt("return",v);case 20:for(e.prev=20,e.t0=e.catch(2),b=t.layout.split("x").map(Number),y=s(b,2),x=y[0],w=y[1],j=[],E=0;E<x*w;E++)j.push({uri:null===(k=window)||void 0===k||null===(S=k.app_data)||void 0===S||null===(q=S.appcmsMain)||void 0===q||null===(T=q.images)||void 0===T?void 0:T.placeholderCover,duration:t.duration});return e.abrupt("return",j);case 26:case"end":return e.stop()}},e,null,[[2,20]])}))).apply(this,arguments)}function h(e,t){return b.apply(this,arguments)}function b(){return(b=a(u.mark(function e(t,r){var n,i;return u.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return m=r,e.prev=1,e.next=4,fetch(t);case 4:return n=e.sent,e.next=7,n.text();case 7:return i=e.sent,e.abrupt("return",f(i));case 11:e.prev=11,e.t0=e.catch(1),console.error("Error fetching the M3U8 manifest:",e.t0);case 14:case"end":return e.stop()}},e,null,[[1,11]])}))).apply(this,arguments)}function y(e,t,n){var i=document.querySelector(".vjs-progress-holder.vjs-slider.vjs-slider-horizontal"),l=r.getPlayer(m);if(i&&l){var a=i.getBoundingClientRect(),u=(e.clientX-a.left)/a.width,o=function(e,t){var r,n;if(!t||0===t.length)return null;var i=0,l=t.length-1;for(;i<=l;){var a=Math.floor((i+l)/2),u=t[a];if(u===e)return u;u<e?i=a+1:l=a-1}var o=null!==(r=t[i])&&void 0!==r?r:1/0,s=null!==(n=t[l])&&void 0!==n?n:-1/0;return Math.abs(o-e)<Math.abs(s-e)?o:s}(Math.round(u*l.duration()),n),s=t[o];s&&!s.loading&&(s.loading=!0,function(e){return g.apply(this,arguments)}(s).then(function(e){var t=e[s.tileIndex],r=document.querySelector(".vjs-thumbnail-holder img");r&&t.uri&&(r.src=t.uri),s.loading=!1,s.src=t.uri}))}}function x(e){return w.apply(this,arguments)}function w(){return(w=a(u.mark(function e(t){var n,i,l,a;return u.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n={},t.forEach(function(e,t){for(var r=e.layout.split("x").map(Number),i=s(r,2),l=i[0]*i[1],a=e.duration,u=0;u<l;u++){var d,c=Math.round((t*l+u)*a);n[c]=v(v({},e),{},{duration:e.duration,tileIndex:u,loading:!1,style:(d={left:"-60px",height:"85px",width:"130px"},o(d,"left","-60px"),o(d,"border","1px solid transparent"),o(d,"borderRadius","4px"),d)})}}),i=Object.keys(n).map(Number).sort(function(e,t){return e-t}),null==(l=document.querySelector(".vjs-progress-holder.vjs-slider.vjs-slider-horizontal"))||l.addEventListener("mousemove",r.throttle(function(e){return y(e,n,i)},500)),null==(a=document.querySelector(".vjs-progress-control.vjs-control"))||a.addEventListener("pointerdown",function(e){document.addEventListener("pointermove",r.throttle(function(e){return y(e,n,i)},500))}),e.abrupt("return",n);case 8:case"end":return e.stop()}},e)}))).apply(this,arguments)}var j=function(){var e=a(u.mark(function e(t,r){var n,i,l,a,o,d,c,p;return u.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(t+r);case 2:return n=e.sent,e.next=5,n.text();case 5:i=e.sent,l=i.split("\n").map(function(e){return e.trim()}),a=[],o=null,d=0;case 10:if(!(d<(null==l?void 0:l.length))){e.next=27;break}if(!(c=l[d]).startsWith("#EXT-X-TILES")){e.next=19;break}o={resolution:null,duration:null,uri:null,layout:null},p=c.split(":")[1]||"",p.split(",").forEach(function(e){var t=e.split("="),r=s(t,2),n=r[0],i=r[1];n&&i&&(o[n.trim().toLowerCase()]=i.trim())}),e.next=24;break;case 19:if(!c.startsWith("#EXTINF")){e.next=23;break}return e.abrupt("continue",24);case 23:(c.includes("jpg")||c.includes("png")||c.includes("jpeg"))&&(o.uri=c.includes("http")?c:t+c,a.push(o),o=null);case 24:d++,e.next=10;break;case 27:return e.abrupt("return",a);case 28:case"end":return e.stop()}},e)}));return function(t,r){return e.apply(this,arguments)}}();function E(e){return e.replace(/AdSegmentFilter\/markers=\(.+?\)\//,"")}function k(e,t){return S.apply(this,arguments)}function S(){return(S=a(u.mark(function e(t,n){var i,l,a,o,c,p,v,f,g,h,b,y,x,w,j,k,S,N,P,A,C,M,O,I,B,V,R,D,L,_,U,$,F,z,X,W,G,H,J,K,Q,Y,Z,ee,te,re,ne,ie,le,ae,ue,oe,se,de,ce,pe,ve,me;return u.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return m=n,i=r.getPlayer(n),l=t.split("/"),a=l.findIndex(function(e){return"dash"===e.toLowerCase()}),o=E(-1!==a?l.slice(0,a+1).join("/"):new URL(t).origin),e.prev=5,e.next=8,fetch(t);case 8:return f=e.sent,e.next=11,f.text();case 11:g=e.sent,h=new DOMParser,b=h.parseFromString(g,"application/xml"),y=(null==i?void 0:i.duration())||(null===(c=d.getCurrentVideo())||void 0===c||null===(p=c.video)||void 0===p?void 0:p.runtime),x=(null==b||null===(v=b.querySelector("MPD > BaseURL"))||void 0===v?void 0:v.textContent)||o+"/",w=b.getElementsByTagName("AdaptationSet"),j=0;case 18:if(!(j<w.length)){e.next=72;break}if(("image"!==(k=w[j]).getAttribute("contentType")||"image/png"!==k.getAttribute("mimeType"))&&"image/jpeg"!==k.getAttribute("mimeType")){e.next=69;break}if(N=k.getElementsByTagName("SegmentTemplate")[0],P=null===(S=N.getElementsByTagName("SegmentTimeline"))||void 0===S?void 0:S[0],!N||!P){e.next=48;break}if(M=P.getElementsByTagName("S"),O=parseInt(null===(A=M[0])||void 0===A?void 0:A.getAttribute("t")),I=parseInt(null===(C=M[0])||void 0===C?void 0:C.getAttribute("d")),B=k.getElementsByTagName("Representation")[0],V=B.getElementsByTagName("EssentialProperty")[0],R=V.getAttribute("value"),D=null==R?void 0:R.split("x"),L=s(D,2),_=L[0],U=L[1],!N){e.next=46;break}if(N.getAttribute("media"),$=N.getAttribute("timescale"),F=($?I/$:I)/(_*U),z=B.getAttribute("id"),X=Math.round(y/F),W=Math.ceil(X/(_*U)),G=N.getAttribute("media"),parseInt(N.getAttribute("startNumber")),!isNaN(parseInt(W))){e.next=43;break}return e.abrupt("return");case 43:for(H=[],j=0;j<W;j++)K="/"==(J=G)[0]?new URL(o).origin:o+"/",H.push({duration:F,layout:R,uri:K+J.replace("$Time$",O+j*I).replace("$RepresentationID$",z)});return e.abrupt("return",H);case 46:e.next=69;break;case 48:if(Q=k.getElementsByTagName("Representation")[0],Y=Q.getElementsByTagName("EssentialProperty")[0],Z=Y.getAttribute("value"),ee=null==Z?void 0:Z.split("x"),te=s(ee,2),re=te[0],ne=te[1],!N){e.next=69;break}if(N.getAttribute("media"),ie=N.getAttribute("duration"),le=N.getAttribute("timescale"),ae=(le?ie/le:ie)/(re*ne),ue=Q.getAttribute("id"),oe=Math.round(y/ae),se=Math.ceil(oe/(re*ne)),de=N.getAttribute("media"),ce=parseInt(N.getAttribute("startNumber"))||0,!isNaN(parseInt(se))){e.next=65;break}return e.abrupt("return");case 65:for(pe=[],ve=q(de),j=0;j<se;j++)me=ve?T(ve,j+ce):de,pe.push({duration:ae,layout:Z,uri:x+me.replace("$Number$",j+ce).replace("$RepresentationID$",ue)});return e.abrupt("return",pe);case 69:j++,e.next=18;break;case 72:return console.log("No trickplay segment found."),e.abrupt("return",null);case 76:e.prev=76,e.t0=e.catch(5),console.error("Error fetching or parsing MPD:",e.t0);case 79:case"end":return e.stop()}},e,null,[[5,76]])}))).apply(this,arguments)}function q(e){var t=e.match(/Thumbnail_\$Number%0\d+d\$\.\w+/);return t?t[0]:null}function T(e,t){var r=e.match(/%0(\d+)d/);if(!r)return e;var n=parseInt(r[1],10),i=String(t).padStart(n,"0");return e.replace(/\$Number%0\d+d\$/,i)}function N(){return(N=a(u.mark(function e(t){var n,i,l,a,o,s,d,c,p,v,m,f,g,b,y,w;return u.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(s=r.getPlayer(t),d=s.currentSource(),c=d.src,c=null!==(n=c)&&void 0!==n&&n.includes("blob")?null===(i=window)||void 0===i||null===(l=i.player)||void 0===l?void 0:l.getSource():c,null===(a=c)||void 0===a||!a.includes("m3u8")){e.next=19;break}return e.next=6,h(c,t);case 6:if(!((null==(p=e.sent)?void 0:p.length)>0)){e.next=17;break}return v=(null==p?void 0:p[0])||null,m=v.uri,f=c.substring(0,c.lastIndexOf("/"))+"/",e.next=12,j(f,m);case 12:return g=e.sent,e.next=15,x(g);case 15:b=e.sent,s.thumbnails(b);case 17:e.next=28;break;case 19:if(null===(o=c)||void 0===o||!o.includes("mpd")){e.next=28;break}return e.next=22,k(c,t);case 22:if(!((null==(y=e.sent)?void 0:y.length)>0)){e.next=28;break}return e.next=26,x(y);case 26:w=e.sent,s.thumbnails(w);case 28:case"end":return e.stop()}},e)}))).apply(this,arguments)}function P(t,a){var u=r.getPlayer(t);u&&(u.on("loadeddata",function(){var r,o,s,d,p,v,m;(null===(r=n.getRenditions(t))||void 0===r?void 0:r.length)>0&&e.addSettingsButtonV2(t,a),(null===(o=i.getCaptions(t))||void 0===o?void 0:o.length)>0&&e.addCaptionButton(t,a),!(null!=a&&null!==(s=a.series)&&void 0!==s&&s.enable||null!==(d=window)&&void 0!==d&&null!==(p=d.app_data)&&void 0!==p&&null!==(v=p.appcmsMain)&&void 0!==v&&null!==(m=v.features)&&void 0!==m&&m.auto_play)||null!=a&&a.liveVideo||l.addNextEpPreview(t,a),function(e,t){var r,n=Math.floor(e/60),i=null===(r=document.getElementsByClassName("vjs-progress-holder vjs-slider vjs-slider-horizontal"))||void 0===r?void 0:r[0];i&&(i.style.marginRight=n>60?"56px":"41px");var l=document.getElementsByClassName("vjs-live-control")[0],a=document.getElementsByClassName("vjs-time-control");t&&l.classList.value.includes("vjs-hidden")&&(a[0].style.display="block",i&&(i.style.marginRight="56px"))}(u.duration(),(null==a?void 0:a.liveVideo)||!1),null!=a&&a.liveVideo||c.isMobile()||function(e){N.apply(this,arguments)}(t)}),u.one("play",function(){var r,n,i,l;null!==(r=window)&&void 0!==r&&null!==(n=r.customData)&&void 0!==n&&n.iframeOverlayUrl&&e.addOutputtingOverlay(t,null===(i=window)||void 0===i||null===(l=i.customData)||void 0===l?void 0:l.iframeOverlayUrl)}))}exports.initialiseSkin=function(n,i){r.getPlayer(n).addClass("skin_defaultv2"),function(){"Chrome"==c.detectBrowser()&&Promise.resolve().then(function(){return require("./chromett-f925fb6c.js")}).then(function(e){var t=document.createElement("style");t.id="chromett",t.append("".concat(e.default)),document.head.appendChild(t)});Promise.resolve().then(function(){return require("./skin-87c06e34.js")}).then(function(e){var t=document.createElement("style");t.id="default_v2",t.append("".concat(e.default)),document.head.appendChild(t)})}(),P(n,i),function(e,n){var i,l,a,u,o,s,d=r.getPlayer(e);null==d||null===(i=d.controlBar)||void 0===i||null===(l=i.getChild("FullscreenToggle"))||void 0===l||null===(a=l.el())||void 0===a||a.appendChild(r.createIconMarkup(t.MinimizeSvg(window.controlsColor))),null==d||null===(u=d.controlBar)||void 0===u||null===(o=u.getChild("FullscreenToggle"))||void 0===o||null===(s=o.el())||void 0===s||s.appendChild(r.createIconMarkup(t.MaximizeSvg(window.controlsColor)));var c=document.getElementsByClassName("vjs-time-control");n.liveVideo&&c[0]&&(c[0].style.display="none")}(n,i),function(r,n){var i,l,a,u,o,s;0==(null==n?void 0:n.liveVideo)&&0==(null==n?void 0:n.liveui)&&e.addSkipButton(r,"defaultV2",t.SkipSvgV2());(0==(null==n?void 0:n.liveVideo)&&0==(null==n?void 0:n.liveui)||1==(null==n?void 0:n.liveui))&&e.addRewindButton(r,"defaultV2",t.RewindSvgV2());n.liveVideo||e.addSlowMotion(r);(null==n||null===(i=n.relatedVideos)||void 0===i||null===(l=i.content)||void 0===l?void 0:l.length)>0&&e.addVideoSelector_DEFAULTV2_TEMP(r,null==n?void 0:n.relatedVideos);(null==n||null===(a=n.streams)||void 0===a?void 0:a.length)>1&&e.addMulticamSelector_DEFAULTV2_TEMP(r,null==n?void 0:n.streams);(null==n||null===(u=n.playlist)||void 0===u||null===(o=u.content)||void 0===o?void 0:o.length)>0&&e.addPlaylistSelector(r,null==n?void 0:n.playlist);null!=n&&null!==(s=n.series)&&void 0!==s&&s.enable&&e.addSeriesSelectorV2_DEFAULTV2_TEMP(r,n)}(n,i),l.addTVProviderImage(n,i)};
@@ -1 +0,0 @@
1
- "use strict";var t=require("./skin-3544db58.js");exports.getVideoDuration=function(e){var n=t.getPlayer(e);return n?n.duration():"Cannot find player with id: '".concat(e,"'")},exports.onTimeUpdate=function(e,n){var a=t.getPlayer(e);a?a.on("timeupdate",function(){return n(a.currentTime())}):n("Cannot find player with id: '".concat(e,"'"))},exports.onVideoEnded=function(e,n){var a=t.getPlayer(e);a?a.on("ended",function(){return n(!0)}):n("Cannot find player with id: '".concat(e,"'"))},exports.seekToTimeStamp=function(e,n,a){var r=t.getPlayer(e);r?n>=0&&n<=r.duration()?(a({status:!0,msg:"Successfully seeked to timestamp : ".concat(n)}),r.currentTime(n)):a({status:!1,msg:"Out of bounds, please provide a valid timestamp"}):a("Cannot find player with id: '".concat(e,"'"))},exports.setPlaybackSpeed=function(e,n){var a=t.getPlayer(e);if(!a)return"Cannot find player with id: '".concat(e,"'");try{return a.playbackRate(n),"Playback speed set to ".concat(n,"x")}catch(t){return"Error: ".concat(t)}};
@@ -1 +0,0 @@
1
- import{H as n,f as t,R as i,Q as o,S as a}from"./generic-76d748e7.js";import{a as e}from"./util-80257541.js";import{g as c,h as s}from"./skin-58b9263c.js";var u,r=0,f=0,l=function(l){clearTimeout(r);var v=null==l?void 0:l.content;u=null==l?void 0:l.cb;var d=l.playerId;e(d,function(){var e=c(d);0!==(null==e?void 0:e.currentTime())&&((f=o())>v.length-1||(a(f+1),n(d,v[f].id).then(function(n){s(f,d),t(n.response),f++,h(n)}).catch(function(n){h(n),s(f,d),f++,r=setTimeout(function(){i(d)&&m(f,d,v)},5e3)})))})},m=function t(i,o,e,c){f=i,i>e.length-1||(a(f+1),n(o,e[i].id).then(function(n){s(f,o),f++,h(n)}).catch(function(n){h(n),setTimeout(function(){s(f,o),f++,t(f,o,e)},5e3)}))},h=function(n){u&&u(n)};export{l as a,m as s};
@@ -1 +0,0 @@
1
- var e=function(){var e,n;return navigator.userAgent.indexOf("Edg")>-1&&"macOS"!=(null===(e=window.navigator)||void 0===e||null===(n=e.userAgentData)||void 0===n?void 0:n.platform)?"IE":-1!=(navigator.userAgent.indexOf("Opera")||navigator.userAgent.indexOf("OPR"))?"Opera":-1!=navigator.userAgent.indexOf("Chrome")?"Chrome":-1!=navigator.userAgent.indexOf("Safari")?"Safari":-1!=navigator.userAgent.indexOf("Firefox")?"Firefox":"Unknown"},n=function(){return!!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)};export{e as d,n as i};
@@ -1 +0,0 @@
1
- import{g as t}from"./skin-58b9263c.js";var e=function(e,n){var a,s,r;document.getElementsByClassName("vjs-text-track-display-ttml")&&(null===(a=document.getElementsByClassName("vjs-text-track-display-ttml"))||void 0===a||null===(s=a[0])||void 0===s||null===(r=s.style)||void 0===r||r.setProperty("display","flex"));for(var i=t(e).textTracks(),l=0;l<i.length;l++){var o=i[l];"subtitles"!==o.kind&&"captions"!==o.kind||o.id!=n||(o.mode="showing")}},n=function(e,n){for(var a=t(e).textTracks(),s=0;s<a.length;s++){var r=a[s];"subtitles"!==r.kind&&"captions"!==r.kind||r.id!==n||(r.mode="hidden")}},a=function(e){var n,a=t(e);return(null==a||null===(n=a.textTracks())||void 0===n?void 0:n.tracks_.filter(function(t){return"subtitles"==t.kind||"captions"===t.kind}))||[]},s=function(e){var n=t(e);n.remoteTextTracks().tracks_.map(function(t){"subtitles"==(null==t?void 0:t.kind)||null==t||t.kind,n.removeRemoteTextTrack(t)})},r=function(e,n){var a=t(e);a.remoteTextTracks().tracks_.map(function(t){a.removeRemoteTextTrack(t)}),n.map(function(t){a.addRemoteTextTrack({src:t.url,srcLang:t.language,label:t.language})})};export{r as a,n as d,e,a as g,s as r};
@@ -1 +0,0 @@
1
- import e from"@babel/runtime/helpers/defineProperty";import n from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/regenerator";import i from"video.js";import o from"axios";import{g as r,c as a}from"./skin-58b9263c.js";import{i as l,d}from"./browser-d4613b36.js";import u from"js-cookie";import{UAParser as s}from"ua-parser-js";import{a as c,r as v}from"./captions-b7fd8308.js";function m(){var e,n;null===(e=window)||void 0===e||null===(n=e.dataLayer)||void 0===n||n.push(arguments)}function f(e){window.dataLayer=window.dataLayer||[],m("js",new Date),m("config",e)}function p(e,n){m("event",e,n)}var w={apiBaseUrl:"https://prod-api.viewlift.com",getVideoDetails:"/entitlement/video/status",getSeriesDetails:"/entitlement/series/status",saveWatchHistoryV1:"/user/userId/history/video",saveWatchHistoryV2:"/v2/user/history",getVideoInfoV1:"/user/info/video",getVideoInfoV2:"/v2/user/info",getSeriesWatchHistoryV1:"/user/userId/history/video",getSeriesWatchHistoryV2:"/v2/user/history/series",getLinearChannelDetails:"/v3/entitlement/linearchannel",getBeaconUrl:"/analytics/player-beacon"};function I(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function E(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?I(Object(i),!0).forEach(function(t){e(n,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):I(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}var g={name:"@viewlift/player",version:"2.0.39",main:"dist/bundle.cjs.js",amdName:"_playerCore",dependencies:{"@silvermine/videojs-airplay":"^1.3.0","@silvermine/videojs-chromecast":"^1.4.1",axios:"^1.2.3",ima:"npm:videojs-ima@2.2.0","js-cookie":"^3.0.5","ua-parser-js":"^2.0.3","video.js":"8.22.0","videojs-contrib-ads":"7.5.2","videojs-contrib-eme":"5.5.1","videojs-mux":"^4.21.7","videojs-contrib-quality-menu":"^1.0.3"}};window.vl_player_version=g.version;var T,h=function(e,n){var t,i,r,a,l,d,u,s;return null!==(t=window)&&void 0!==t&&null!==(i=t.customData)&&void 0!==i&&i.overrideEntitlementResponse?new Promise(function(e,n){var t,i;return e({data:null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i?void 0:i.overrideEntitlementResponse})}):o({url:null!==(l=window)&&void 0!==l&&null!==(d=l.customData)&&void 0!==d&&d.overrideEntitlementBaseUrl?(null===(u=window)||void 0===u||null===(s=u.customData)||void 0===s?void 0:s.overrideEntitlementBaseUrl)+"/video/status":F.get()+"".concat(null==w?void 0:w.getVideoDetails),params:E({id:e,deviceType:"web_browser",contentConsumption:"web"},null===(r=window)||void 0===r||null===(a=r.customData)||void 0===a?void 0:a.entitlement),method:"GET",headers:{Authorization:n,"Sdk-Version":g.version},withCredentials:!0})},y=function(e,n){var t,i,r,a;return null!==(t=window)&&void 0!==t&&null!==(i=t.customData)&&void 0!==i&&i.overrideEntitlementResponse?new Promise(function(e,n){var t,i;return e({data:null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i?void 0:i.overrideEntitlementResponse})}):o({url:F.get()+w.getLinearChannelDetails,params:E(E(E(E(E({id:null==e?void 0:e.id,deviceType:"web_browser",contentConsumption:"web"},(null==e?void 0:e.channelId)&&{channelId:null==e?void 0:e.channelId}),(null==e?void 0:e.programId)&&{programId:null==e?void 0:e.programId}),(null==e?void 0:e.programTitle)&&{programTitle:null==e?void 0:e.programTitle}),(null==e?void 0:e.programSubType)&&{programSubType:null==e?void 0:e.programSubType}),null===(r=window)||void 0===r||null===(a=r.customData)||void 0===a?void 0:a.entitlement),method:"GET",headers:{Authorization:n,hdcp:"HDCP-1.4",sl:"SW_SECURE_CRYPTO"}})},_=function(e,n){var t,i,r=x(n),a=(null==r?void 0:r.site)||null;return null!==(t=window)&&void 0!==t&&null!==(i=t.customData)&&void 0!==i&&i.seriesData?new Promise(function(e,n){var t,i;return e({data:null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i?void 0:i.seriesData})}):o({url:F.get()+"/v3/content/series/".concat(e),params:{site:a},method:"GET",headers:{Authorization:n}})},b=function(){var e=n(t.mark(function e(n){var i;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,M();case 2:return i=e.sent,e.abrupt("return",o({url:F.get()+"".concat(null==w?void 0:w.saveWatchHistoryV2),method:"POST",headers:{Authorization:i},data:E({},n),params:E({},(null==n?void 0:n.profileId)&&{profileId:null==n?void 0:n.profileId})}));case 4:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),D=function(e,n){var t,i,r=window.contentType;return o({method:"GET",url:F.get()+"".concat(null==w?void 0:w.getVideoInfoV2,"/").concat(r,"/").concat(e),headers:{Authorization:n,"x-api-key":null===(t=window)||void 0===t||null===(i=t.watchHistory)||void 0===i?void 0:i.xApiKey},timeout:15e3})},O=function(e){var n=e.videoId;return o({method:"GET",url:F.get()+"".concat(null==w?void 0:w.getSeriesWatchHistoryV2,"/").concat(n),headers:{Authorization:e.token},timeout:15e3})},F=(T=null==w?void 0:w.apiBaseUrl,{set:function(e){e&&(T=e)},get:function(){return T}}),P=function(e,n,t,i){return o({url:t,params:{id:e,deviceType:"web_browser",contentConsumption:"web",latitude:null==i?void 0:i.latitude,longitude:null==i?void 0:i.longitude},method:"GET",headers:{Authorization:n},withCredentials:!0})},S=function(e){var n=JSON.parse(atob(null==e?void 0:e.split(".")[1])),t=null==n?void 0:n.exp;if(new Date(1e3*t).getTime()<(new Date).getTime())return!0},L=null;function R(){return{set:function(e){e&&(L=e)},get:function(){return L}}}var V,W,A,C,N,B,j=function(){var e=n(t.mark(function e(){var n,i,r;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=R().get(),i=F.get(),e.prev=2,e.next=5,o({method:"GET",url:"".concat(i,"/identity/refresh/").concat(n)});case 5:return r=e.sent,e.abrupt("return",r);case 9:throw e.prev=9,e.t0=e.catch(2),console.error("Error fetching refresh token",e.t0),e.t0;case 13:case"end":return e.stop()}},e,null,[[2,9]])}));return function(){return e.apply(this,arguments)}}(),U=null,M=function(){var e=n(t.mark(function e(){var n;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=sessionStorage.getItem("vlp_token"))||!S(n)){e.next=6;break}return U||(U=j().then(function(e){var t,i,o=null==e||null===(t=e.data)||void 0===t?void 0:t.authorizationToken,r=null==e||null===(i=e.data)||void 0===i?void 0:i.refreshToken;return o&&sessionStorage.setItem("vlp_token",o),r&&R().set(r),o||n}).catch(function(e){return console.error("Error fetching refresh token",e),n}).finally(function(){U=null})),e.abrupt("return",U);case 6:return e.abrupt("return",n);case 7:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),k=function(e){var n=!0,t=null==e?void 0:e.videoSourceUrl,i=null==e?void 0:e.asat;return t&&!i&&(n=!1),n},x=function(e){if(e&&"string"==typeof e)return JSON.parse(atob(e.split(".")[1]))},H=function(e){W=e},G=function(){return W},z=function(e){V=e},Y=function(){return V},X=function(){return A},q=function(e){A=e},J=function(){return N},K=function(e){C=new Map,e.map(function(e,n){C.set(e.id,n)})},Q=function(e){if(C){var n=C.get(e);q(n+1)}},Z=(B=0,{set:function(e){e>=0&&(B=e)},get:function(){return B}});function $(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function ee(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?$(Object(i),!0).forEach(function(t){e(n,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):$(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}var ne=0,te=function(){var e,n,t,i,o,r,a,l=G();return"linearchannel"==((null==l?void 0:l.contentType)||"video")?null==l||null===(e=l.linearchannel)||void 0===e||null===(n=e.channels)||void 0===n||null===(t=n.find(function(e){return(null==e?void 0:e.id)===(null==l?void 0:l.channelId)}))||void 0===t||null===(i=t.content)||void 0===i?void 0:i.id:(null==l||null===(o=l.video)||void 0===o||null===(r=o.gist)||void 0===r?void 0:r.id)||(null==l||null===(a=l.video)||void 0===a?void 0:a.id)||(null==l?void 0:l.id)};function ie(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function oe(){var e=window.sessionStorage.getItem("uid");return e||(e=ie(),window.sessionStorage.setItem("uid",e),e)}function re(){return ae.apply(this,arguments)}function ae(){return(ae=n(t.mark(function e(){var n,i;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,M();case 2:if(!(n=e.sent)){e.next=10;break}if(null==(i=JSON.parse(atob(n.split(".")[1])))||!i.anonymousId){e.next=9;break}return e.abrupt("return","guest-user");case 9:return e.abrupt("return",null==i?void 0:i.userId);case 10:return e.abrupt("return","guest-user");case 11:case"end":return e.stop()}},e)}))).apply(this,arguments)}function le(e){return e?String(e):""}window.initialise=function(e){window.sid=ie(),window.environment="production",window.platform="WEBSITE",streamFailures(e),buffering(e),ads(e),ping(e)},window.streamFailures=function(e){var n=Math.floor(e.currentTime());e.on("error",function(){var t,i,o,r=Math.floor(e.currentTime());clearInterval(window.bufferingTimer),window.buffering=null,window.handleBufferTimer=null,p(r?"FAILED_TO_START":"DROPPED_STREAM",ee({pfm:window.platform,uid:oe(),vid:te(),videoPosition:Math.floor(e.currentTime())},null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i||null===(o=i.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:n===r?"FAILED_TO_START":"DROPPED_STREAM",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})})},window.firstFrame=function(e,n){e.one("play",tryCatch(function(){var t,i,o;window.ttFirstFrame=0,window.ttFirstFrameTimer=setInterval(function(){window.ttFirstFrame=window.handleBufferTimer?window.handleBufferTimer(window.ttFirstFrame,e):null},100),p("PLAY",ee({pfm:window.platform,uid:oe(),vid:te(),videoPosition:Math.floor(e.currentTime())},null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i||null===(o=i.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:"PLAY",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1}),n&&n("started_video_playback",{"Video ID":te(),watchTime:Math.floor(e.currentTime())})}))},window.buffering=function(e){e.on("waiting",tryCatch(function(){window.ttFirstFrameTimer||(e.currentTime(),clearInterval(window.bufferingTimer),window.bufferingTimer=setInterval(function(){var n,t;null!=e&&null!==(n=e.el_)&&void 0!==n&&null!==(t=n.className)&&void 0!==t&&t.includes("vjs-waiting")&&!e.paused()?window.totalBufferTime=window.handleBufferTimer?window.handleBufferTimer(window.totalBufferTime,e):null:clearInterval(window.bufferingTimer)},100))}))},window.handleBufferTimer=function(e,n){var t,i;if(n.el_){var o,r,a,l=e+.1;if(+l.toFixed(2)%5==0&&null!=n&&null!==(t=n.el_)&&void 0!==t&&null!==(i=t.className)&&void 0!==i&&i.includes("vjs-waiting")&&ne<4)ne++,p("BUFFERING",ee({pfm:window.platform,uid:oe(),vid:te(),videoPosition:n.el_&&Math.floor(n.currentTime())},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(a=r.beacon)||void 0===a?void 0:a.params)),fireEvent({eventName:"BUFFERING",videoPosition:n.el_&&Math.floor(n.currentTime()),isAdEvent:!1});return l}clearInterval(window.ttFirstFrameTimer)},window.endFirstFrame=function(e){e.one("timeupdate",function(){var n,t,i;clearInterval(window.ttFirstFrameTimer),clearInterval(window.bufferingTimer),window.ttFirstFrameTimer=null,window.totalBufferTime=window.ttFirstFrame||0,p("FIRST_FRAME",ee({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:oe(),vid:te()},null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(i=t.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e)})})},window.ads=function(e){e.on("adsready",function(){e.ima.addEventListener(window.google.ima.AdEvent.Type.STARTED,function(){var n,t,i,o,r,a;p("AD_REQUEST",ee({eventName:"AD_REQUEST",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:oe(),vid:te(),resHeight:e.videoHeight(),resWidth:e.videoWidth()},null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(i=t.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"AD_REQUEST",videoPosition:Math.ceil(e.currentTime()),isAdEvent:!0,resHeight:e.videoHeight(),resWidth:e.videoWidth(),adPosition:1}),p("AD_IMPRESSION",ee({eventName:"AD_IMPRESSION",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:oe(),resHeight:e.videoHeight(),resWidth:e.videoWidth(),vid:te()},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(a=r.beacon)||void 0===a?void 0:a.params)),fireEvent({eventName:"AD_IMPRESSION",videoPosition:Math.ceil(e.currentTime()),resHeight:e.videoHeight(),resWidth:e.videoWidth(),isAdEvent:!0,adPosition:1})}),e.ima.addEventListener(window.google.ima.AdEvent.Type.SKIPPED,function(){window.ttFirstFrame=0}),e.ima.addEventListener(window.google.ima.AdEvent.Type.COMPLETE,function(){window.ttFirstFrame=0})})},window.ping=function(e){var n=[];e.on("timeupdate",function(){var t=Math.floor(e.currentTime());t>=30&&t%30==0&&!n.includes(t)&&(ne=0,n.push(t),fireEvent({eventName:"PING",videoPosition:t,isAdEvent:!1,duration:30,resHeight:e.videoHeight(),resWidth:e.videoWidth(),bufferHealth:window.getRemainingBufferTime(e),bitrate:e.tech_.vhs&&window.getBitrate(e)}))})},window.getBitrate=function(e){return Math.round(e.tech_.vhs.selectPlaylist().attributes.BANDWIDTH/1e3)},window.getRemainingBufferTime=function(e){return tryCatch(function(){for(var n=e.currentTime(),t=e.duration(),i=e.buffered(),o=0;o<i.length;o++){var r=i.start(o),a=i.end(o);if(de(n,r,a)){var l=Math.round(t-a);if(isFinite(l))return l}}})()};var de=function(e,n,t){return e>=n&&e<=t};function ue(e,n){if("localhost"!==location.hostname&&"127.0.0.1"!==location.hostname){var t=r(e);window.initialise(t,n),window.firstFrame(t,n),t.on("loadedmetadata",function(){window.endFirstFrame(t)})}}window.fireEvent=function(){var e=n(t.mark(function e(n){var i,r,a,l,d,u,s,c,v,m,f,p,I,E,g,T,h,y,_,b;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,M();case 2:return T=e.sent,h=x(T),y=null==h?void 0:h.site,_=null==h?void 0:h.siteId,e.t0=ee,e.t1=ee,e.t2=ee({aid:y,cid:_,pfm:window.platform},null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(a=r.beacon)||void 0===a?void 0:a.params),e.t3={},e.t4=oe(),e.t5=te(),e.t6=n.url||document.location.href,e.t7=n.ref||document.referrer,e.t8=n.eventName,e.t9=null!==(l=n.videoPosition)&&void 0!==l?l:null,e.t10=window.environment,e.t11=n.dp1||"",e.t12=n.dp2||"",e.t13=n.dp3||"",e.t14=n.dp4||"",e.t15=n.dp5||"",e.t16=!0===n.isAdEvent?n.videoPosition:null,e.t17=!0===n.isAdEvent?le(n.adPosition):"",e.next=26,re();case 26:e.t18=e.sent,e.t19=n.playerType||"native",e.t20=n.mediaType||"VIDEO",e.t21=window.sid,e.t22=null!==(d=n.ttFirstFrame)&&void 0!==d?d:null,e.t23=null!==(u=n.bitrate)&&void 0!==u?u:null,e.t24=null!==(s=n.resHeight)&&void 0!==s?s:null,e.t25=null!==(c=n.resWidth)&&void 0!==c?c:null,e.t26=null!==(v=n.bufferHealth)&&void 0!==v?v:null,e.t27={uid:e.t4,vid:e.t5,url:e.t6,ref:e.t7,pa:e.t8,vpos:e.t9,environment:e.t10,dp1:e.t11,dp2:e.t12,dp3:e.t13,dp4:e.t14,dp5:e.t15,apos:e.t16,apod:e.t17,profid:e.t18,player:e.t19,media_type:e.t20,stream_id:e.t21,embedurl:"",ttfirstframe:e.t22,bitrate:e.t23,connectionspeed:null,resolutionheight:e.t24,resolutionwidth:e.t25,bufferhealth:e.t26},e.t28=(null==n?void 0:n.duration)&&{duration:n.duration},e.t29=(0,e.t1)(e.t2,e.t3,e.t27,e.t28),e.t30=null===(m=window)||void 0===m||null===(f=m.customData)||void 0===f||null===(p=f.beacon)||void 0===p?void 0:p.params,e.t31=(0,e.t0)(e.t29,e.t30),b=[e.t31],o({url:(null===(I=window)||void 0===I||null===(E=I.customData)||void 0===E||null===(g=E.beacon)||void 0===g?void 0:g.url)||F.get()+w.getBeaconUrl,method:"post",headers:{Authorization:T},contentType:"application/x-www-form-urlencoded",dataType:"text",data:b}).catch(function(e){console.error(e)});case 42:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),window.tryCatch=function(e){return function(){try{return e.apply(window,arguments)}catch(e){return console.error(e),null}}};var se=function(e,n){var t=new Map;O({videoId:e,token:n}).then(function(e){e.data.map(function(e){t.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})}),N=t}).catch(function(e){return console.log(e)})},ce=function(){var e=Z.get();return e>=0?e+1:1},ve=function(){var e,n,t,i=Y(),o=G(),r=null==o||null===(e=o.video)||void 0===e?void 0:e.id,a=Z.get(),l=null==i||null===(n=i[a])||void 0===n||null===(t=n.episodes)||void 0===t?void 0:t.findIndex(function(e){return(null==e?void 0:e.id)===r});return l>=0?l+1:1};function me(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function fe(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?me(Object(i),!0).forEach(function(t){e(n,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):me(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}window._deviceInfo=s(navigator.userAgent);var pe=function(e,n){return e&&n?"".concat(e,"x").concat(n):e>1024?"L":e>768?"M":"S"},we=function(e){var n=Ie(e,"video.tags",[]),t=Ie(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return n.length>0?n.map(function(e){return e.title}).join(","):t},Ie=function(e,n,t){for(var i=0,o=(n=n.split(".")).length;i<o;i++){var r;e=null===(r=e)||void 0===r?void 0:r[n[i]]}return e||t},Ee=function(){var e,n,t,i,o,a,l,d,s,c,v,m,f,p,w,I,E,g,T,h,y,_=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",b=arguments.length>1?arguments[1]:void 0,D=arguments.length>2?arguments[2]:void 0,O=(null==D?void 0:D.siteName)||"",F=(null==D?void 0:D.contentType)||"video",P=(null==D||null===(e=D[F])||void 0===e?void 0:e.metadata)||(null==D||null===(n=D[F])||void 0===n||null===(t=n.gist)||void 0===t?void 0:t.metadata),S=r(b);if(!_.includes("VIEWLIFT_"))return _;var L,R=window.getComputedStyle(document.getElementById(b),null),V=Math.trunc(R.getPropertyValue("height").slice(0,-2)),W=Math.trunc(R.getPropertyValue("width").slice(0,-2)),A="linearchannel"===F?null==D||null===(i=D.linearchannel)||void 0===i||null===(o=i.channels)||void 0===o||null===(a=o.find(function(e){return(null==e?void 0:e.id)===(null==D?void 0:D.channelId)}))||void 0===a||null===(l=a.content)||void 0===l?void 0:l.id:Ie(D,"video.gist.id",""),C="linearchannel"===F?null==D||null===(d=D.linearchannel)||void 0===d||null===(s=d.channels)||void 0===s||null===(c=s.find(function(e){return(null==e?void 0:e.id)===(null==D?void 0:D.channelId)}))||void 0===c?void 0:c.title:Ie(D,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),N=null,B=null;"function"==typeof window.__gpp&&(null===(L=window)||void 0===L||L.__gpp("ping",function(e){N=null==e?void 0:e.gppString,B=null==e?void 0:e.sectionList[0]}));var j=fe(fe({},ge(P)),{},{VIEWLIFT_WIDTH:W,VIEWLIFT_HEIGHT:V,VIEWLIFT_SIZE:pe(W,V),VIEWLIFT_DOMAIN:window.location.hostname,VIEWLIFT_URL:window.location.href,VIEWLIFT_ENCODED_URL:encodeURIComponent(window.location.href),VIEWLIFT_DOUBLE_ENCODED_URL:encodeURIComponent(encodeURIComponent(window.location.href)),VIEWLIFT_CACHEBUSTER:"3708662946268",VIEWLIFT_TIMESTAMP:Date.now().toString().substring(0,10),VIEWLIFT_TIMESTAMP_MS:Date.now().toString(),VIEWLIFT_IP:(null===(v=window)||void 0===v?void 0:v.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:encodeURIComponent(encodeURIComponent(navigator.userAgent)),VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:Ie(D,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:Ie(D,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:Ie(D,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==S||null===(m=S.options_)||void 0===m?void 0:m.autoplay)||1,VIEWLIFT_MUTE:(null==S||null===(f=S.options_)||void 0===f?void 0:f.autoplay)||0,VIEWLIFT_DEVICE_ID:"spinco"==O?"":localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_DEVICETYPE:"WEB_BROWSER",VIEWLIFT_IDTYPE:"dpid",VIEWLIFT_KEYWORDS:we(D),VIEWLIFT_MEDIA_ID:A,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(Ie(D,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:A,VIEWLIFT_VIDEO_URL:encodeURI(window.location.origin+Ie(D,"video.gist.permalink","")),VIEWLIFT_CONSENT:u.get("cc")||"VIEWLIFT_CONSENT",VIEWLIFT_COPPA:Ie(null===(p=window)||void 0===p||null===(w=p.app_data)||void 0===w||null===(I=w.site)||void 0===I?void 0:I.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR_CONSENT:"",VIEWLIFT_GDPR:"spinco"==O?"":Ie(null===(E=window)||void 0===E||null===(g=E.app_data)||void 0===g||null===(T=g.site)||void 0===T?void 0:T.settings,"compliance.gdpr")?1:0,VIEWLIFT_CONTENT_DURATION_MS:1e3*Ie(D,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:Ie(D,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:A,VIEWLIFT_CONTENT_TITLE:C,VIEWLIFT_CONTENT_SERIES_TITLE:Ie(D,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:Ie(D,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER",VIEWLIFT_EPISODE_NUMBER:ve(),VIEWLIFT_SEASON_NUMBER:ce(),VIEWLIFT_CONTENT_TAGS:we(D),VIEWLIFT_GPP_SID:B||"VIEWLIFT_GPP_SID",VIEWLIFT_GPP:N||"VIEWLIFT_GPP",VIEWLIFT_LAT:"",VIEWLIFT_APP_BUNDLE:"",VIEWLIFT_ATT_CONSENT:"",VIEWLIFT_APP_ID:"",VIEWLIFT_APP_STORE_URL:""},null===(h=window)||void 0===h||null===(y=h.customData)||void 0===y?void 0:y.macros);for(var U in j){var M=new RegExp(U,"g");_=_.replace(M,j[U])}return _},ge=function(e){var n,t,i,o,r,a,d={},u=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map(function(e){u.set(e.name,e.value)}));var s=(null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(i=t.subscription)||void 0===i?void 0:i.SVOD)||!1,c=(null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(a=r.subscription)||void 0===a?void 0:a.TVE)||!1;return s||c?(l()?s?d=fe(fe({},d),{},{VIEWLIFT_CSID:u.get("csid.mweb.dtc")||""}):c&&(d=fe(fe({},d),{},{VIEWLIFT_CSID:u.get("csid.mweb.tve")||""})):s?d=fe(fe({},d),{},{VIEWLIFT_CSID:u.get("csid.web.dtc")||""}):c&&(d=fe(fe({},d),{},{VIEWLIFT_CSID:u.get("csid.web.tve")||""})),s?d=fe(fe({},d),{},{VIEWLIFT_SFID:u.get("sfid.dtc")||u.get("sfid.web.dtc")||""}):c&&(d=fe(fe({},d),{},{VIEWLIFT_SFID:u.get("sfid.tve")||u.get("sfid.web.tve")||""})),d=l()?fe(fe({},d),{},{VIEWLIFT_PROF:u.get("prof.mweb")||""}):fe(fe({},d),{},{VIEWLIFT_PROF:u.get("prof.web")||""})):(d=fe(fe({},d),{},{VIEWLIFT_SFID:u.get("sfid.dtc")||u.get("sfid.web.dtc")||""}),d=l()?fe(fe({},d),{},{VIEWLIFT_CSID:u.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:u.get("prof.mweb")||""}):fe(fe({},d),{},{VIEWLIFT_CSID:u.get("csid.web.dtc")||"",VIEWLIFT_PROF:u.get("prof.web")||""})),d=fe(fe({},d),{},{VIEWLIFT_AFID:u.get("afid")})},Te=function(e,n){var t,i,o,r,a,l,u,s,c,v,m,f,p,w=(null==e?void 0:e.contentType)||"video",I=null==e||null===(t=e[w])||void 0===t?void 0:t.drmEnabled,E=null==e||null===(i=e[w])||void 0===i||null===(o=i.streamingInfo)||void 0===o?void 0:o.videoAssets,g=null==e||null===(r=e[w])||void 0===r||null===(a=r.streamingInfo)||void 0===a?void 0:a.audioAssets,T=(null==e||null===(l=e[w])||void 0===l||null===(u=l.streamingInfo)||void 0===u||null===(s=u.videoAssets)||void 0===s?void 0:s.hls)||!1;null==e||null===(c=e[w])||void 0===c||null===(v=c.liveDetails)||void 0===v||v.isDvrEnabled;var h=(null==e||null===(m=e[w])||void 0===m||null===(f=m.streamingInfo)||void 0===f||null===(p=f.videoAssets)||void 0===p?void 0:p.dash)||!1;if(null!=e&&e.directPlaybackUrl)return{src:null==e?void 0:e.directPlaybackUrl,type:null};if(null!=e&&e.audioAssetSource&&null!=g&&g.hls)return ye(g);if(I){var y=_e(E,n);return y.src=Ee(y.src,n,e),y}if("Safari"!==d()&&h)return he(E);if(T){var _=ye(E);return _.src=Ee(_.src,n,e),_}if(null!=E&&E.mpeg){var b=function(e){var n=null==e?void 0:e.mpeg;return{src:n[n.length-1].url,type:"video/mp4"}}(E);return b.src=Ee(b.src,n,e),b}return null},he=function(e){var n=null==e?void 0:e.dash;return n?{src:n,type:"application/dash+xml"}:null},ye=function(e){var n=null==e?void 0:e.hls;return n?{src:n,type:"application/x-mpegURL"}:null},_e=function(e,n){var t=e.fairPlayCmaf||e.fairPlay,o=e.widevine,a=e.playReady,l=d();if(r(n),"Safari"===l){var u=function(e){var n=e.url;return{src:n,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(n,t){var o={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};i.xhr(o,function(e,n,i){console.log(e),e&&t(e),t(null,new Uint8Array(i))})},getContentId:function(e,n){if(n){var t=n.indexOf("\0")+1;return n.slice(t)}},getLicense:function(n,t,o,r){var a={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:o,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};i.xhr(a,function(e,n,t){console.log(e),e&&r(e),r(null,t)})}}}}}(t);return be(n),u}var s,c={src:o.url,type:"application/dash+xml"};return"caliente"==(null===(s=window)||void 0===s?void 0:s.siteName)?(be(n),c.keySystems={"com.widevine.alpha":{url:o.licenseUrl,licenseHeaders:{"X-AxDRM-Message":o.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"},"com.microsoft.playready":{url:a.licenseUrl,licenseHeaders:{"X-AxDRM-Message":a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}):(c.keySystemOptions=[],c.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:o.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":o.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),c.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:a.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})),c};var be=function(e){var n=r(e);if("function"==typeof n.eme)try{n.eme(),"Safari"==d()&&n.eme.initLegacyFairplay()}catch(e){console.log("EME ERROR :",e)}},De=function(e,n){var t=e.src,i=e.type;if(!t||"string"!=typeof t||!t.includes(".com"))return{src:t,type:i};n=n.replace(/\/$/,"");var o=t.split(".com")[1]||"";return{src:o?"".concat(n).concat(o):t,type:i}},Oe=function(e,n){if(import("./error-2395864b.js").then(function(e){var n=document.createElement("style");n.id="errorblock",n.append("".concat(e.default)),document.head.appendChild(n)}),document.getElementsByClassName("error-container")[0]){var t=document.getElementsByClassName("error-message")[0];t&&(t.innerHTML="".concat(n))}else{var i=document.getElementById(e);if(i){var o=document.createElement("div");o.className="error-container";var r=document.createElement("div");r.className="error-message",r.innerHTML="".concat(n),o.appendChild(r),i.append(o)}}},Fe=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var Pe=!1,Se=function(e,n,t){var i=Ee(n,e,t),o=r(e);if(n&&window.google){if("function"!=typeof o.ima)return;o.ima.initializeAdDisplayContainer&&o.ima.initializeAdDisplayContainer(),function(e,n){var t,i,o,a=r(e);if(null!==a.el_){Pe=!0;var l={id:e,adTagUrl:"".concat(n),adLabel:"Your video will resume after this sponsor message"};a.ima.initializeAdDisplayContainer&&a.ima.initializeAdDisplayContainer(),Pe&&null!==a.el_&&("function"==typeof a.ima?a.ima(l):setTimeout(function(){a.ima.setContentWithAdTag(null,n,!0),a.ima.requestAds()},1e3));var d=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&d.hasAttribute("controls")&&d.removeAttribute("controls");var u="click",s=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(s=!0,u="touchend"),a.one(u,function(){s&&a.ima.initializeAdDisplayContainer()});var c=(null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i||null===(o=i.ads)||void 0===o?void 0:o.adEventHandler)||null;a.one("ads-ad-started",function(){c&&c({status:"STARTED",msg:"Advertisement Started"})}),a.one("ads-manager",function(e){e.adsManager.addEventListener(google.ima.AdEvent.Type.COMPLETE,function(){c&&c({status:"ENDED",msg:"Advertisement Ended"})})}),a.on("adserror",function(e){c&&c({status:"ERROR",msg:"Advertisement Error"})})}}(e,i)}};function Le(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}var Re=function(e){i(e).play()},Ve=function(e){i(e).pause()},We=function(e,n){var t=i(e),o=t.currentTime()+n;t.currentTime(o)},Ae=function(e,n){var t=i(e),o=t.currentTime(),r=o<=n?0:o-n;t.currentTime(r)},Ce=function(e){return!!i.getPlayer("".concat(e))},Ne=function(e){return i(e).paused()},Be=function(){var e=n(t.mark(function e(n,i){var o,a,l,d=arguments;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=d.length>2&&void 0!==d[2]&&d[2],e.next=3,M();case 3:return a=e.sent,l=r(n),e.abrupt("return",new Promise(function(e,t){y(i,a).then(function(t){var r=null==t?void 0:t.data;window.sid=ie(),r.contentType="linearchannel",r.channelId=null==i?void 0:i.channelId;var a=Te(r,n);H(r),a&&o?(xe(n,a),l.on("loadstart",function(){e({status:!0,msg:"Feed authenticated and loaded",response:r})})):e({status:!0,msg:"Feed authenticated",response:r})}).catch(function(e){t({status:!1,msg:"Cannot load feed",response:e})})}));case 6:case"end":return e.stop()}},e)}));return function(n,t){return e.apply(this,arguments)}}(),je=function(){var e=n(t.mark(function e(n,i,o){var a,l,d,u,s,m;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,M();case 2:return u=e.sent,(Y()||null)&&Q(i),s=0,m=0,null!==(a=window)&&void 0!==a&&a.watchHistory&&null!==(l=window)&&void 0!==l&&null!==(d=l.watchHistory)&&void 0!==d&&d.enable&&D(i,u).then(function(e){var n,t,i,o,r,a;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(i=window)||void 0===i||null===(o=i.watchHistory)||void 0===o||o.cb(null==e?void 0:e.data)),s=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,m=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null}).catch(function(e){var n,t,i,o;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(i=window)||void 0===i||null===(o=i.watchHistory)||void 0===o||o.cb(e))}),e.abrupt("return",new Promise(function(e,t){h(i,u).then(function(i){var o,a,l,d,u,f,p,w,I,E,g=null==i?void 0:i.data,T=(null==g||null===(o=g.video)||void 0===o||null===(a=o.streamingInfo)||void 0===a?void 0:a.isLiveStream)||!1;H(i.data);var h=(null==g||null===(l=g.ads)||void 0===l||null===(d=l.preRoll)||void 0===d||null===(u=d.adTags)||void 0===u||null===(f=u.web)||void 0===f?void 0:f.active)&&(null==g||null===(p=g.ads)||void 0===p||null===(w=p.preRoll)||void 0===w||null===(I=w.adTags)||void 0===I||null===(E=I.web)||void 0===E?void 0:E.url);h&&Se(n,h,g);var y=Te(g,n);if(y){var _,b,D,O,F,P,S,L,R,V,W,A,C,N,B=(null==g||null===(_=g.video)||void 0===_||null===(b=_.gist)||void 0===b?void 0:b.videoImageUrl)||(null==g||null===(D=g.video)||void 0===D||null===(O=D.gist)||void 0===O||null===(F=O.imageGist)||void 0===F?void 0:F.r16x9),j=r(n);if(j.poster(B),xe(n,y),j.on("loadstart",function(){T&&e({status:!0,msg:"Video Loaded",response:g})}),j.on("loadeddata",function(){Fe(),e({status:!0,msg:"Video Loaded",response:g})}),j.one("play",function(){s&&m<95&&setTimeout(function(){j.currentTime(s)},0)}),j.one("error",function(){var e;t({status:!1,msg:(null==j||null===(e=j.error())||void 0===e?void 0:e.message)||"Some error occured"})}),(null==g||null===(P=g.video)||void 0===P||null===(S=P.contentDetails)||void 0===S||null===(L=S.closedCaptions)||void 0===L?void 0:L.length)>0||(null==g||null===(R=g.video)||void 0===R||null===(V=R.closedCaptions)||void 0===V?void 0:V.length)>0)W=((null==g||null===(A=g.video)||void 0===A||null===(C=A.contentDetails)||void 0===C?void 0:C.closedCaptions)||(null==g||null===(N=g.video)||void 0===N?void 0:N.closedCaptions)).filter(function(e){return"VTT"===e.format}),c(n,W);else v(n)}else Oe(n,"Incompatible Source, only hls,mp4,drm content is allowed"),t("Incompatible Source, only hls,mp4,drm content is allowed")}).catch(function(e){He(e,n,t,i)})}));case 9:case"end":return e.stop()}},e)}));return function(n,t,i){return e.apply(this,arguments)}}(),Ue=function(e,n,t){var i=r(e);return i.src(n),new Promise(function(e,n){var o=0;i.one("loadedmetadata",function(){clearTimeout(o),e({status:!0,msg:"video loaded"})}),i.one("loadstart",function(e){o=setTimeout(function(){n("FAILED: Took too long to load")},t)})})},Me=function(e){var n=r(e);if(ke(),a(),window.onresize=null,n)n.dispose();else{var t=document.getElementById(e);t&&t.remove()}},ke=function(){document.getElementById("carousel_homepage")&&document.getElementById("carousel_homepage").remove(),document.getElementById("dvr_skin")&&document.getElementById("dvr_skin").remove(),document.getElementById("nondvr_skin")&&document.getElementById("nondvr_skin").remove(),document.getElementById("multicam")&&document.getElementById("multicam").remove(),document.getElementById("errorblock")&&document.getElementById("errorblock").remove(),document.getElementById("def_skin")&&document.getElementById("def_skin").remove(),document.getElementById("video-selection")&&document.getElementById("video-selection").remove(),document.getElementById("multicam-v2")&&document.getElementById("multicam-v2").remove(),document.getElementById("default_v2")&&document.getElementById("default_v2").remove(),document.getElementById("video-captions")&&document.getElementById("video-captions").remove(),document.getElementById("playlist-selection")&&document.getElementById("playlist-selection").remove(),document.getElementById("multiplayer_css")&&document.getElementById("multiplayer_css").remove(),document.getElementById("chromett")&&document.getElementById("chromett").remove()},xe=function(e,n){var t=r(e);t&&t.src(n)},He=function(n,t,i,o){var r,a,l,d,u,s,c=null==n||null===(r=n.response)||void 0===r||null===(a=r.data)||void 0===a?void 0:a.errorCode,v=(null==n||null===(l=n.response)||void 0===l||null===(d=l.data)||void 0===d?void 0:d.errorMessage)||(null==n?void 0:n.message);Ce(t)&&Oe(t,(null===(u=window)||void 0===u?void 0:u.customErrors)&&(null===(s=window)||void 0===s?void 0:s.customErrors[c])||"".concat(v)),i&&i(function(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Le(Object(i),!0).forEach(function(t){e(n,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):Le(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}({status:!1,response:n,msg:"".concat(v)},o&&{videoId:o}))},Ge=function(e){var n=document.getElementById(e),t=n.getElementsByClassName("vjs-control-bar")[0];t&&(t.style.visibility="hidden");var i=n.getElementsByClassName("vjs-big-play-button")[0];i&&(i.style.display="none");var o=n.getElementsByClassName("vjs-fullscreen-control")[0];o&&(o.style.display="none")};export{se as A,Z as B,z as C,Ue as D,Re as E,Ve as F,Ce as G,je as H,Be as I,Me as J,P as K,F as L,k as M,R as N,S as O,f as P,X as Q,Ne as R,q as S,O as T,K as U,Q as V,ve as a,Y as b,ce as c,G as d,Te as e,H as f,oe as g,Fe as h,Oe as i,J as j,We as k,xe as l,Ee as m,Ge as n,ue as o,Se as p,De as q,Ae as r,b as s,x as t,h as u,D as v,He as w,M as x,y,_ as z};
@@ -1 +0,0 @@
1
- import e from"@babel/runtime/helpers/toConsumableArray";import{g as t,p as n}from"./skin-58b9263c.js";import{Q as o,b as i}from"./generic-76d748e7.js";import{s as l}from"./autoNextVideo-613b5bf9.js";import{e as a}from"./icons-0676e9c7.js";import r from"@babel/runtime/helpers/typeof";import s from"video.js";var d,c,u,m,v=[],p=!1,f=function(l,r){var s;if(p=!1,null!=r&&null!==(s=r.series)&&void 0!==s&&s.enable){var d;v=[];var c=i();null==c||c.map(function(t){var n;return(n=v).push.apply(n,e(t.episodes))}),null==r||null===(d=r.series)||void 0===d||d.cb}else{var u,m;v=(null==r||null===(u=r.relatedVideos)||void 0===u?void 0:u.content)||[],null==r||null===(m=r.relatedVideos)||void 0===m||m.cb}var f=t(l);f.on("timeupdate",function(){var e,t;if(!p){var n=Math.floor(f.currentTime()),i=f.duration(),l=null===(e=document.getElementsByClassName("next-ep-preview"))||void 0===e?void 0:e[0];i-n<=10&&o()<=(null===(t=v)||void 0===t?void 0:t.length)-1?l&&(l.style.visibility="visible"):l&&(l.style.visibility="hidden")}});var h,y=v.filter(function(e,t){return t==o()});if((null==y?void 0:y.length)>0)if(null!==(h=document.getElementsByClassName("next-ep-preview"))&&void 0!==h&&h[0]){var A,x,w,E,b,C,N,B,L,j,k,P;(null===(A=document.getElementsByClassName("next-ep-preview"))||void 0===A?void 0:A[0]).style.visibility="hidden";var O=null===(x=document.getElementsByClassName("next-ep-title"))||void 0===x?void 0:x[0],I=null===(w=document.getElementsByClassName("next-ep-img"))||void 0===w?void 0:w[0],M=null===(E=document.getElementsByClassName("next-ep-content"))||void 0===E?void 0:E[0],T=null===(b=y[0])||void 0===b?void 0:b.title;(null===(C=T)||void 0===C?void 0:C.length)>60&&(T=T.substr(0,60)+"..."),O.textContent="".concat(T),I.src=(null===(N=y[0])||void 0===N||null===(B=N.gist)||void 0===B||null===(L=B.imageGist)||void 0===L?void 0:L.r16x9)||(null==y||null===(j=y[0])||void 0===j?void 0:j.img)||(null===(k=window)||void 0===k||null===(P=k.customData)||void 0===P?void 0:P.fallbackImage),M.onclick=function(){return g(l)}}else{var X,F,R,D,G,S,V,H,Q=document.createElement("div");Q.className="next-ep-preview",Q.style.visibility="hidden",document.getElementById(l).append(Q);var U=document.createElement("div");U.className="next-heading-wrapper";var W=document.createElement("div");W.className="next-ep-header",W.textContent="Next up";var Y=document.createElement("div");Y.className="next-ep-close",Y.onclick=function(){Q.style.visibility="hidden",p=!0},Y.appendChild(n(a())),U.append(W),U.append(Y);var _=null===(X=y[0])||void 0===X?void 0:X.title,q=document.createElement("img");q.className="next-ep-img",q.src=(null===(F=y[0])||void 0===F||null===(R=F.gist)||void 0===R||null===(D=R.imageGist)||void 0===D?void 0:D.r16x9)||(null==y||null===(G=y[0])||void 0===G?void 0:G.img)||(null===(S=window)||void 0===S||null===(V=S.customData)||void 0===V?void 0:V.fallbackImage);var z=document.createElement("div");z.className="next-ep-title",(null===(H=_)||void 0===H?void 0:H.length)>60&&(_=_.substr(0,60)+"..."),z.textContent="".concat(_);var J=document.createElement("div");J.className="next-ep-content",J.append(q),J.append(z),J.onclick=function(){return g(l)},Q.append(U),Q.append(J)}},g=function(e,n){var i=t(e),a=Math.floor(i.currentTime());if(Math.floor(i.duration())!=a){i.pause(e);var r=o();l(r,e,v)}};function h(e,n){var o=t(e),i=null==n?void 0:n.tvProviderLogoUrl;if(i){var l=document.createElement("div");l.className="tvProviderImage";var a=document.createElement("img");a.src="".concat(i),a.alt="Provider Image",l.append(a),o.el().appendChild(l),o.on("useractive",function(){l.classList.remove("vjs-fade")}),o.on("userinactive",function(){o.paused()||l.classList.add("vjs-fade")}),o.on("fullscreenchange",function(){o.isFullscreen_?l.style.top="3.2rem":l.style.top="1rem"})}}d={0:{src:"data:image/gif;base64,R0lGODlhAQABAPAAAP///wAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==",alt:"loading"}},c=function e(){var t,n,o,i,l;for(o in n=(t=Array.prototype.slice.call(arguments)).shift()||{},t)for(l in i=t[o])i.hasOwnProperty(l)&&("object"===r(i[l])?n[l]=e(n[l],i[l]):n[l]=i[l]);return n},u=function(e,t){return function(n){return window.getComputedStyle?window.getComputedStyle(e,t)[n]:e.currentStyle[n]}},m=function e(t){return"HTML"!==t.nodeName&&"static"===u(t)("position")?e(t.offsetParent):t},s.registerPlugin("thumbnails",function(e){var t,n,o,i,l,a,r,s;function v(){document.removeEventListener("pointermove",r),document.removeEventListener("pointerup",v),s()}n=c({},d,e),i=this,function(){var e,t,n;-1!==navigator.userAgent.toLowerCase().indexOf("android")&&(t=function(){e.addClass("fake-active")},n=function(){e.removeClass("fake-active")},(e=i.controlBar.progressControl).on("touchstart",t),e.on("touchend",n),e.on("touchcancel",n))}(),(t=document.createElement("div")).className="vjs-thumbnail-holder",o=document.createElement("img"),t.appendChild(o),o.src=n[0].src,o.className="vjs-thumbnail",c(o.style,n[0].style),o.style.left||o.style.right||(o.onload=function(){o.style.left=-o.naturalWidth/2+"px"}),a=i.duration(),i.on("durationchange",function(e){a=i.duration()}),i.on("loadedmetadata",function(e){a=i.duration()}),(l=i.controlBar.progressControl).el().appendChild(t),r=function(e){var i,r,s,d,v,p,f,g,h,y;for(r in s=0,h=(window.pageXOffset?{x:window.pageXOffset,y:window.pageYOffset}:{x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop}).x,f=((y=m(l.el()).getBoundingClientRect()).width||y.right)+h,p=e.pageX,e.changedTouches&&(p=e.changedTouches[0].pageX),d=p||e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,d-=m(l.el()).getBoundingClientRect().left+h,i=Math.floor((d-l.el().offsetLeft)/l.width()*a),n)i>r&&(s=Math.max(s,r));(v=n[s]).src&&o.src!=v.src&&(o.src=v.src),v.style&&o.style!=v.style&&c(o.style,v.style),d+(g=function(e,t){var n;return t?parseFloat(t):"auto"!==(n=u(e)("clip"))&&"inherit"!==n&&4===(n=n.split(/(?:\(|\))/)[1].split(/(?:,| )/)).length?parseFloat(n[1])-parseFloat(n[3]):0}(o,v.width||n[0].width)/2)>f?d-=d+g-f:d<g&&(d=g),t.style.left=d+"px"},l.on("mousemove",r),l.on("touchmove",r),l.on("pointerdown",function(e){document.addEventListener("pointermove",r),document.addEventListener("pointerup",v)}),s=function(e){t.style.left="-1000px"},l.on("mouseout",s),l.on("touchcancel",s),l.on("touchend",s),i.on("userinactive",s)});export{f as a,h as b};
@@ -1 +0,0 @@
1
- import"video.js/dist/video-js.min.css";import{g as e,a as n,b as t,c as o,d as r,s as i,e as l,l as a,f as s,h as u,i as c,j as d,k as v,r as f,m as p,n as m,o as y,p as g,q as h,t as b,u as w,v as k,w as O,x as S,y as j,z as T,A as I,B as E,C as P,D,E as x,F as A,G as C,H as R,I as L,J as N,K as M,L as _,M as V,N as U,O as B,P as H}from"./generic-76d748e7.js";import F from"@babel/runtime/helpers/defineProperty";import G from"@babel/runtime/helpers/asyncToGenerator";import K from"@babel/runtime/regenerator";import q from"video.js";import{o as Q,g as z,a as J,s as W,b as X}from"./util-80257541.js";import{g as Y,d as $,a as Z,e as ee}from"./captions-b7fd8308.js";import{g as ne}from"./renditions-4c09c626.js";import{playSelectedResolution as te}from"./resolution-920515d1.js";import{g as oe,t as re,i as ie,a as le}from"./skin-58b9263c.js";import{d as ae}from"./browser-d4613b36.js";import{s as se}from"./localisation-0bf399a1.js";import ue from"@babel/runtime/helpers/typeof";import ce from"@babel/runtime/helpers/toConsumableArray";import de from"@babel/runtime/helpers/slicedToArray";var ve=function(e){return new Promise(function(n,t){if(fe(e))t("".concat(e," is alread initialised"));else{var o=document.createElement("script");o.async=!0,o.src=e,o.onload=function(){n()},o.onerror=function(n){t("Error while loading script ".concat(e," : ").concat(n))},document.head.appendChild(o)}})},fe=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},pe=function(e,n,t){var o=oe(e);if(o)if(n>=0&&n<=100){o.muted()&&o.muted(!1);var r=parseFloat(n)/100;o.volume(r),t&&t({status:!0,msg:"Volume set to ".concat(n,"%")})}else t&&t({status:!1,msg:"Please enter a valid volume percentage (0 ≥ V ≤ 100)"});else t({status:!1,msg:"Cannot find player with id: '".concat(e,"'")})},me=function(e){var n=oe(e);return n?parseInt(100*n.volume())+"%":"Cannot find player with id: '".concat(e,"'")},ye=function(){var e=G(K.mark(function e(n){var t,o,r,i,l;return K.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(o=oe(null==n?void 0:n.playerId),null!=n&&null!==(t=n.series)&&void 0!==t&&t.enable||null==n||!n.chromecastReceiverId){e.next=22;break}return e.next=4,import("@silvermine/videojs-chromecast");case 4:return i=e.sent,e.prev=5,e.next=8,ve("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1");case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(5),console.log("Error",e.t0);case 13:return e.prev=13,i.default(q),e.finish(13);case 16:(l=q.getTech("chromecast"))&&!l.prototype.seeking&&(l.prototype.seeking=function(){}),null!==(r=window)&&void 0!==r&&r.cast?null==o||o.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}):window.__onGCastApiAvailable=function(){null==o||o.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0})},e.next=23;break;case 22:console.log("Chromecast plugin is not available");case 23:null!=n&&n.airplay&&"Safari"==ae()?null==o||o.airPlay({addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5}):console.log("AirPlay plugin is not available");case 24:case"end":return e.stop()}},e,null,[[5,10,13,16]])}));return function(n){return e.apply(this,arguments)}}(),ge=function(e,n){var t=oe(e);t&&n&&t.controlBar&&t.controlBar.progressControl.seekBar.on("click",function(n){var t,o,r,i,l,a=this.el(),s=q.dom.getPointerPosition(a,n).x;q.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var u=window.cast&&window.cast.framework&&window.cast.framework.CastSession,c=null===(t=window)||void 0===t||null===(o=t.cast)||void 0===o||null===(r=o.framework)||void 0===r||null===(i=r.CastContext)||void 0===i||null===(l=i.getInstance())||void 0===l?void 0:l.S;if(console.log(u),u&&"CONNECTED"===c){window.cast.framework.RemotePlayer.canSeek=!0;var d=new window.cast.framework.RemotePlayerController(window.cast.framework.RemotePlayer),v=d.h.media[0].liveSeekableRange.end;d.getSeekPosition(),window.cast.framework.RemotePlayer.currentTime=v*s,d.seek()}})};var he=function(){var e=G(K.mark(function e(){return K.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([import("videojs-contrib-ads"),import("ima"),ve("https://imasdk.googleapis.com/js/sdkloader/ima3.js").then(function(){}).catch(function(e){return console.log(e)})]);case 2:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),be=function(){var e=G(K.mark(function e(){return K.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return console.log("utilising contrib eme"),e.next=3,import("videojs-contrib-eme").then(function(e){q.getPlugin("eme")||q.registerPlugin("eme",e.default)});case 3:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),we=function(){var e=G(K.mark(function e(){var n;return K.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,import("videojs-mux");case 3:if(!(n=e.sent)||"function"!=typeof n.register){e.next=7;break}return n.register(q),e.abrupt("return");case 7:console.log("Mux registration failed"),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),console.log("Failed to load Mux plugin:",e.t0);case 13:case"end":return e.stop()}},e,null,[[0,10]])}));return function(){return e.apply(this,arguments)}}(),ke=function(){var e=G(K.mark(function e(){return K.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,import("./index-5d92eaa3.js");case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),console.error("Failed to load dvr seekbar");case 8:case"end":return e.stop()}},e,null,[[0,5]])}));return function(){return e.apply(this,arguments)}}(),Oe=function(){var e=G(K.mark(function e(){return K.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,import("./videojs-dash5.es-6c1ba1fe.js");case 3:console.log("utilising contrib dash"),e.next=9;break;case 6:e.prev=6,e.t0=e.catch(0),console.error("Failed to load contrib dash plugin");case 9:case"end":return e.stop()}},e,null,[[0,6]])}));return function(){return e.apply(this,arguments)}}(),Se=Object.freeze({__proto__:null,importChromecast:function(){import("@silvermine/videojs-chromecast").then(function(e){ve("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1").then(function(){e.default(q)}).catch(function(e){console.log(e)})})},importAirplay:function(){import("@silvermine/videojs-airplay").then(function(e){e.default(q)})},loadAdsLibrary:he,loadEMELibrary:be,loadMuxPlugin:we,loadDvrSeekbar:ke,loadContribDash:Oe});function je(e){return Te.apply(this,arguments)}function Te(){return(Te=G(K.mark(function e(n){var t;return K.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=(null==n?void 0:n.airplay)||!1,e.next=3,he();case 3:t&&"Safari"==ae()&&Promise.resolve().then(function(){return Se}).then(function(e){e.importAirplay()});case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Ie(e,n){return Ee.apply(this,arguments)}function Ee(){return(Ee=G(K.mark(function e(n,t){var o,r,i,l,a,s,u,c,d,v;return K.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return u=(null==t?void 0:t.contentType)||"video",c=null==t||null===(o=t[u])||void 0===o?void 0:o.drmEnabled,null==t||null===(r=t[u])||void 0===r||null===(i=r.liveDetails)||void 0===i||i.isDvrEnabled,null==n||n.showPositiveSeekbar,d=(null==t||null===(l=t[u])||void 0===l||null===(a=l.streamingInfo)||void 0===a||null===(s=a.videoAssets)||void 0===s?void 0:s.dash)||null,e.prev=5,e.next=8,Promise.allSettled([c?"Safari"==ae()?be():"caliente"!=(null===(v=window)||void 0===v?void 0:v.siteName)?Oe():be():"Safari"!=ae()&&d?Oe():null,ye(n)]);case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(5),console.log("Error",e.t0);case 13:case"end":return e.stop()}},e,null,[[5,10]])}))).apply(this,arguments)}function Pe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function De(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Pe(Object(t),!0).forEach(function(n){F(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Pe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var xe=new Set,Ae=null,Ce=function(n,o,r){var i,l,a,s,u,c,d,v={},f=(null==n?void 0:n.contentType)||"video";v["c3.cm.id"]=(null===(i=n[f])||void 0===i?void 0:i.id)||"Null",v["c3.cm.contentType"]=Ue(n),v[null==r||null===(l=r.Constants)||void 0===l?void 0:l.IS_LIVE]=!(null==n||!n.linearchannel),v[null==r||null===(a=r.Constants)||void 0===a?void 0:a.STREAM_URL]=o.currentSrc(),v[null==r||null===(s=r.Constants)||void 0===s?void 0:s.VIEWER_ID]="undefined"===e()?"NULL":e(),v["c3.cm.categoryType"]=Me(n),v["m3.net.t"]=function(){var e=navigator.connection||navigator.mozConnection||navigator.webkitConnection;if(!e)return"Unknown";if(e.type)switch(e.type){case"wifi":return"WiFi";case"ethernet":return"Ethernet";default:return e.type}switch(e.effectiveType){case"slow-2g":case"2g":return"2G";case"3g":return"3G";case"4g":return e.downlink>=20?"WiFi":"4G";default:return"Unknown"}}(),v.DRMEnabled=(null===(u=n[f])||void 0===u?void 0:u.drmEnabled)||"None",v.DAIStream=null!==(c=n[f])&&void 0!==c&&null!==(d=c.gist)&&void 0!==d&&d.isSSAIEnabled?"YES":"NO",v[r.Constants.DEFAULT_RESOURCE]="AKAMAI",v["c3.cm.brand"]="NULL",v.CDVREnabled=_e(n),v["c3.cm.genreList"]=Le(n),v["c3.cm.genre"]=Re(n),v["c3.cm.channel"]=Ne(n);var p=He(t(),n);return v=De(De({},v),p)},Re=function(e){var n,t,o,r=(null==e?void 0:e.contentType)||"video";return(null==e||null===(n=e[r])||void 0===n||null===(t=n.gist)||void 0===t||null===(o=t.primaryCategory)||void 0===o?void 0:o.title)||"Null"},Le=function(e){var n,t=(null==e?void 0:e.contentType)||"video";return((null==e||null===(n=e[t])||void 0===n?void 0:n.categories)||[]).map(function(e){return null==e?void 0:e.title}).join(", ")||"Null"},Ne=function(e){var n,t,o=(null==e?void 0:e.contentType)||"video";return"video"===o?"VOD":(null==e||null===(n=e[o])||void 0===n||null===(t=n.channels[0])||void 0===t?void 0:t.title)||"NULL"},Me=function(e){return(null==e?void 0:e.contentType)||"null"},_e=function(e){var n,t,o=(null==e?void 0:e.contentType)||"video",r=(null==e||null===(n=e[o])||void 0===n||null===(t=n.liveDetails)||void 0===t?void 0:t.isDvrEnabled)||!1;return r?"YES":"NO"},Ve=function(e,n){var t,o,r=(n||{}).epg;if(r&&null!=r&&r.enable&&null!=r&&r.programTitle)return r.programTitle;var i=(null==e?void 0:e.contentType)||"video",l=(null==e||null===(t=e[i])||void 0===t||null===(o=t.gist)||void 0===o?void 0:o.title)||"Null";return"".concat(l)},Ue=function(e){return"linearchannel"===((null==e?void 0:e.contentType)||"video")?"Live":"VOD"};var Be,He=function(e,t){var r,i,l,a,s,u={"c3.cm.seriesName":"Null","c3.cm.seasonNumber":"Null","c3.cm.showTitle":"Null","c3.cm.episodeNumber":"Null"};if(!e||!t||null!=t&&t.linearchannel)return u;var c=o(),d=n();return u["c3.cm.seriesName"]=(null==t||null===(r=t.video)||void 0===r||null===(i=r.series)||void 0===i?void 0:i.title)||"Null",u["c3.cm.seasonNumber"]=(null==c?void 0:c.toString())||"Null",u["c3.cm.showTitle"]=(null==e||null===(l=e[c-1])||void 0===l||null===(a=l.episodes)||void 0===a||null===(s=a[d-1])||void 0===s?void 0:s.title)||"Null",u["c3.cm.episodeNumber"]=(null==d?void 0:d.toString())||"Null",u},Fe=function(e){switch(e){case"com.widevine.alpha":return"Widevine";case"com.microsoft.playready":return"PlayReady";case"org.w3.clearkey":return"ClearKey";case"com.apple.fps.1_0":return"FairPlay";default:return"Unknown DRM System"}},Ge=function(e){switch(e){case"application/x-mpegURL":case"application/vnd.apple.mpegurl":return"HLS";case"application/dash+xml":return"DASH";default:return"Unknown"}},Ke=function(){var e=G(K.mark(function e(n,t){var o,i,l,a,s,u,c,d,v,f;return K.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(o=(null==t?void 0:t.convivaConfig)||{},i=o.trackConvivaPlayerEvent,l=o.paymentHandler,a=o.tveProvider,s=o.enable,u=o.appName,c=(t||{}).token,s){e.next=4;break}return e.abrupt("return");case 4:if(d=oe(n),"function"==typeof(v=i)){e.next=8;break}return e.abrupt("return");case 8:return e.next=10,v("getConvivaObject");case 10:if(f=e.sent){e.next=13;break}return e.abrupt("return");case 13:d.ready(function(){var e=d.tech(!0),n=!1;e.on("keysessioncreated",function(e){n=!0;var t=e.target;if(t&&t.keySystem){var o=Fe(t.keySystem);v("contentInfo",{DRMEnabled:o})}else v("contentInfo",{DRMEnabled:"None"})}),n||v("contentInfo",{DRMEnabled:"None"})}),d.on("loadstart",function(){var e,n;Ae&&Ae!==d.currentSrc()&&v("playbackEnded"),v("setPlayer",d),xe.clear(),Ae=d.currentSrc();var o=Ge(d.currentType()),i=r(),s=Ce(i,d,f);s[null==f||null===(e=f.Constants)||void 0===e?void 0:e.PLAYER_NAME]=u||"WEB",s[null==f||null===(n=f.Constants)||void 0===n?void 0:n.ASSET_NAME]=Ve(i,t),s.authToken=c||"NULL",s.streamType=o,s.D2CType=l||"NONE",s.subscriberType=a||(l?"D2C":"FREE"),s["c3.cm.affiliate"]=a||"NULL",v("contentInfo",s)}),d.on("loadedmetadata",function(){var e,n=d.videoHeight();e=n>=2160?"4K":n>=1440?"1440p":n>=1080?"1080p":n>=720?"720p":n>=480?"480p":"".concat(n,"p"),v("contentInfo",{screenResolution:e})}),d.on("play",function(){xe.has(d.currentSrc())||(xe.add(d.currentSrc()),v("playbackStarted",null))}),d.on("ended",function(){xe.has(d.currentSrc())&&xe.delete(d.currentSrc()),v("playbackEnded")}),d.on("ads-loader",function(e){e&&null!=e&&e.adsLoader&&v("initAdSensor",{player:d,adsLoader:null==e?void 0:e.adsLoader})}),d.on("dispose",function(){null==xe||xe.clear(),v("playbackEnded")});case 20:case"end":return e.stop()}},e)}));return function(n,t){return e.apply(this,arguments)}}(),qe=function(e,n){var t=null==n?void 0:n.skin;"default"==t?import("./skin-bc2d0757.js").then(function(t){t.initialiseSkin(e,n)}):"carousel"==t?import("./skin-b121228d.js").then(function(n){n.initaliseSkin(e)}):"defaultV2"==t?import("./skin-aa8bb069.js").then(function(t){t.initialiseSkin(e,n)}):"multiplayer"==t?import("./skin-c0a47a00.js").then(function(t){t.initialiseSkin(e,n)}):"minimalist"==t?import("./skin-66fc3448.js").then(function(t){t.initaliseSkin(e,n)}):"VL_ONE"==t&&import("./skin-49e82d7e.js").then(function(t){t.initialiseSkin(e,n)})};function Qe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function ze(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Qe(Object(t),!0).forEach(function(n){F(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Qe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var Je=[],We=0,Xe=null;function Ye(e,n,t){var o,l,a,s,u,c=arguments.length>3&&void 0!==arguments[3]&&arguments[3];null==n||null===(o=n.watchHistory)||void 0===o||o.apiVersion;var d=null==n||null===(l=n.watchHistory)||void 0===l?void 0:l.profileId,v=Math.floor(e.currentTime()),f=Math.floor(e.duration());null==n||null===(a=n.watchHistory)||void 0===a||a.xapiKey;var p=(null==n||null===(s=n.video)||void 0===s?void 0:s.originalObjectId)||null,m=(null==n||null===(u=n.watchHistory)||void 0===u?void 0:u.saveOffline)||!1,y=Math.floor(e.currentTime()),g=c?100:Math.floor(v/f*100),h={};m?function(e,n,t){var o=n?"watchhistory-data-".concat(n):"watchhistory-data-guest-".concat(t),i=$e(o),l=(new Date).getTime(),a=r(),s=(null==a?void 0:a.video)||{},u=["id","title","gist","categories","tags","status","publishDate","plans","isVerticalVideo","monetizationBadgeIdentifier","runtime"].reduce(function(e,n){return ze(ze({},e),{},F({},n,s[n]))},{}),c=i.findIndex(function(e){var n;return(null==e||null===(n=e.content)||void 0===n?void 0:n.id)===Be});c<0?i.push(ze(ze({content:u},e),{},{addedDate:l,updateDate:l})):i[c]=ze(ze(ze({},i[c]),e),{},{updateDate:l});localStorage.setItem("".concat(o),JSON.stringify(i))}(h={completed:c,watchedTime:y,watchedPercentage:g},d,n.siteOwner):(h=ze(ze({videoId:Be,watchedTime:y,watchedPercentage:g,doneWatching:c,profileId:d},Xe&&{seriesId:Xe}),p&&{originalObjectId:p}),i(h).then(function(e){}).catch(function(e){})),We=v+t}function $e(e){var n=[];return e&&(n=JSON.parse(localStorage.getItem("".concat(e))||"[]")),n}function Ze(e,n,t){var o=$e(e?"watchhistory-data-".concat(e):"watchhistory-data-guest-".concat(t)),r=[];return o&&Array.isArray(o)&&(r=o.filter(function(e){var t;return(null==e||null===(t=e.content)||void 0===t?void 0:t.id)===n})),r}var en=!1,nn=function(e,n){var t,o,r=(null==e?void 0:e.contentType)||"video";if(((null==e||null===(t=e[r])||void 0===t||null===(o=t.streamingInfo)||void 0===o?void 0:o.secondaryVideoAssets)||null)&&!en){var i=tn(e,"videoAssets","secondaryVideoAssets"),s=l(i,n);return s&&a(n,s),en=!0,console.log("switching to secondary source"),!0}return console.log("secondary source is either corrupted / not available"),!1};function tn(e,n,t){if(Array.isArray(e))return e.map(function(e){return tn(e,n,t)});if(null!==e&&"object"===ue(e)){var o={};return Object.keys(e).forEach(function(r){r===n&&void 0!==e[t]?o[r]=e[t]:r===t&&void 0!==e[n]?o[r]=e[n]:o[r]=tn(e[r],n,t)}),o}return e}function on(e,n){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,n){if(e){if("string"==typeof e)return rn(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?rn(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,l=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return l=e.done,e},e:function(e){a=!0,i=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw i}}}}function rn(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,o=Array(n);t<n;t++)o[t]=e[t];return o}function ln(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function an(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ln(Object(t),!0).forEach(function(n){F(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ln(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var sn=function(e,n,t,o){var i,l,a,v,f=o.res,p=o.sres,m=oe(e),y=(null==f?void 0:f.contentType)||"video",g=(null==f?void 0:f[y].drmEnabled)||!1,h=(null==f||null===(i=f[y])||void 0===i||null===(l=i.streamingInfo)||void 0===l?void 0:l.isLiveStream)||!1,b=(null==f||null===(a=f[y])||void 0===a||null===(v=a.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1;s(f),m&&(m.on("loadstart",function(){h?t.resolve({status:!0,msg:"Video Loaded",response:f}):t.resolve(an({status:!0,msg:"Player Initialised"},p?{seriesResponse:p,response:f}:{response:f}))}),m.on("loadeddata",function(){var t,o,i,l=Y(e);if(null==l||l.map(function(n){return $(e,n.id)}),b&&"Safari"===ae())try{var a;null==m||null===(a=m.liveTracker)||void 0===a||a.seekToLiveEdge()}catch(e){console.log("Cannot seek to Live Edge",e)}(null==m||!m.muted())&&pe(e,sessionStorage.getItem("volume")||"100");var s=r();if(u(),null!=n&&n.watchHistory&&null!=n&&null!==(t=n.watchHistory)&&void 0!==t&&t.enable&&(!n.isAnonymousUser||null!=n&&null!==(o=n.watchHistory)&&void 0!==o&&o.saveOffline)){var c,d,v=an(an({},n),f);!function(e,n,t){var o,r,i;null!=n&&n.series&&null!=n&&null!==(o=n.series)&&void 0!==o&&o.enable&&(Xe=null==n||null===(r=n.series)||void 0===r?void 0:r.id),Je=[],We=0,Be=t;var l=(null==n||null===(i=n.watchHistory)||void 0===i?void 0:i.interval)||30,a=oe(e);a&&(a.on("timeupdate",function(){var e=Math.floor(a.currentTime());Je.includes(We)||(e==We?(Je.push(e),Ye(a,n,l)):e>We&&(We=e+l))}),a.one("ended",function(){Ye(a,n,l,!0)}))}(e,v,null==s||null===(c=s.video)||void 0===c||null===(d=c.gist)||void 0===d?void 0:d.id)}if(null!=n&&null!==(i=n.analytics)&&void 0!==i&&i.muxKey&&null!=m&&m.mux){var p,y,g,h,w,k,O=(null===(p=r())||void 0===p?void 0:p.video)||(null==f?void 0:f.video),S=null==O?void 0:O.gist,j={env_key:null==n||null===(y=n.analytics)||void 0===y?void 0:y.muxKey,player_name:"vl-web-player",player_version:null===(g=window)||void 0===g?void 0:g.vl_player_version,video_id:null==S?void 0:S.id,video_title:null==S?void 0:S.title,video_series:null==O||null===(h=O.series)||void 0===h?void 0:h.title,video_stream_type:null!=O&&null!==(w=O.streamingInfo)&&void 0!==w&&w.isLiveStream?"live":"video",viewer_user_id:null==n||null===(k=n.analytics)||void 0===k?void 0:k.userId};m.mux({debug:!1,data:j})}}),m.textTracks().on("change",function(e){var n=this.tracks_.filter(function(e){if(("subtitles"===e.kind||"captions"===e.kind)&&"showing"===e.mode)return!0})[0];m.trigger("subtitlechanged",n)}),m.on("subtitlechanged",function(e,n){var t,o,r,i,l,a,s,u,c,d,v=window.cast&&window.cast.framework&&window.cast.framework.CastSession,f=null===(t=window)||void 0===t||null===(o=t.cast)||void 0===o||null===(r=o.framework)||void 0===r||null===(i=r.CastContext)||void 0===i||null===(l=i.getInstance())||void 0===l?void 0:l.S,p=null===(a=window)||void 0===a||null===(s=a.cast)||void 0===s||null===(u=s.framework)||void 0===u||null===(c=u.CastContext)||void 0===c||null===(d=c.getInstance())||void 0===d?void 0:d.getCurrentSession();if(v&&"CONNECTED"===f){var m,y=p.getMediaSession(),g=y.media.tracks.filter(function(e){return"TEXT"==e.type});m=n?new chrome.cast.media.EditTracksInfoRequest([g[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),y.editTracksInfo(m)}}),m.tech_.on("retryplaylist",function(){h&&nn(f,e)}),m.on("error",function(){var n,o;(console.log("ERROR",m.error(),m.error().code),4===m.error().code&&h)?nn(f,e):(c(e,(null==m||null===(n=m.error())||void 0===n?void 0:n.message)||"Some error occured"),t.reject({status:!1,msg:(null==m||null===(o=m.error())||void 0===o?void 0:o.message)||"Some error occured",response:f}))}),m.one("play",function(){var e,t,o,i,l;if(null===(e=window)||void 0===e||null===(t=e.app_data)||void 0===t||null===(o=t.appcmsMain)||void 0===o||null===(i=o.adsConfig)||void 0===i||!i.vodAdClientSideTracking){if(null!=n&&null!==(l=n.series)&&void 0!==l&&l.enable){var a,s,u,c=null===(a=r())||void 0===a||null===(s=a.video)||void 0===s||null===(u=s.gist)||void 0===u?void 0:u.id,v=d(),f=(null==v?void 0:v.get(c))||{t:0,p:0},p=f.t,y=f.p;p&&y<95&&setTimeout(function(){m.currentTime(p)},0)}else null!=n&&n.watchHistoryResumeTime&&(null==n?void 0:n.watchedPercentage)<95&&setTimeout(function(){m.currentTime(null==n?void 0:n.watchHistoryResumeTime)},0);if(null!=m&&m.dvrSeekbar)try{m.dvrSeekbar()}catch(e){console.error("Error while initilizing dvr seekbar")}}}),m.on("volumechange",function(){var e=100*m.volume().toFixed(2);m.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)}),m.on("chromecastDisconnected",function(){if(h){m.currentSource();for(var e=m.textTracks(),n=e.length-1;n>=0;n--)m.removeRemoteTextTrack(e[n])}}),m.one("loadeddata",function(){var e,n=(null==m||null===(e=m.audioTracks())||void 0===e?void 0:e.tracks_)||null;if(n)if("object"==ue(m.dash)){var t,o,r,i=null==m||null===(t=m.dash)||void 0===t||null===(o=t.mediaPlayer)||void 0===o?void 0:o.getTracksFor("audio"),l=null==i?void 0:i.find(function(e){var n;return null==e||null===(n=e.roles)||void 0===n?void 0:n.includes("main")}),a=on(n);try{for(a.s();!(r=a.n()).done;){var s=r.value;if(l&&(null==s?void 0:s.id)=="dash-audio-".concat(l.index)){s.enabled=!0;break}}}catch(e){a.e(e)}finally{a.f()}}else{var u,c=on(n);try{for(c.s();!(u=c.n()).done;){var d,v,f,p=u.value;("Chrome"==ae()||"Edge"==ae()&&(null!==(d=navigator)&&void 0!==d&&null!==(v=d.userAgent)&&void 0!==v&&v.includes("Macintosh")||!g))&&null!=p&&null!==(f=p.label)&&void 0!==f&&f.includes("5.1")?m.audioTracks().removeTrack(p):"main"==p.kind?p.enabled=!0:p.enabled=!1}}catch(e){c.e(e)}finally{c.f()}}}))};function un(e,n){var t,o,r,i=oe(e),l=null==i||null===(t=i.controlBar)||void 0===t||null===(o=t.playToggle)||void 0===o?void 0:o.el_,a=document.getElementsByTagName("video")[0];null===(r=document)||void 0===r||r.addEventListener("keydown",function(t){var o;if(dn.enabled&&"input"!=t.target.localName){var r=t.key,s=!0===n.liveVideo||!0===n.liveui;switch([" ","m","M","f","F","ArrowLeft","ArrowRight"].includes(r)&&(t.preventDefault(),null==a||a.focus()),r){case" ":null==l||l.click();break;case"m":case"M":i.muted(!i.muted());break;case"f":case"F":null===(o=document.querySelector(".vjs-fullscreen-control"))||void 0===o||o.click();break;case"ArrowLeft":s&&!1===n.liveui||f(e,10);break;case"ArrowRight":s||v(e,10)}}},!0)}var cn,dn=(cn=!0,{enable:function(){cn=!0},disable:function(){cn=!1},get enabled(){return cn}});function vn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function fn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?vn(Object(t),!0).forEach(function(n){F(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):vn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function pn(e,n){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,n){if(e){if("string"==typeof e)return mn(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?mn(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,l=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return l=e.done,e},e:function(e){a=!0,i=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw i}}}}function mn(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,o=Array(n);t<n;t++)o[t]=e[t];return o}var yn,gn,hn=(yn="",{set:function(e){e&&(yn=e)},get:function(){return yn}}),bn=(gn=null,{set:function(e){gn=e},get position(){return gn}});function wn(e,n){return kn.apply(this,arguments)}function kn(){return(kn=G(K.mark(function e(n,t){var o,r,i,a,s,u,c,d,v,f,m,y,g,h;return K.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return oe(n),o=l(t,n),r=o.src,i=r.replace("/dash/","/session/").replace("master","session"),i=p(i,n,t),a=On(i),s=de(a,2),u=s[0],c=s[1],i=new URL(i.split("?")[0]),Object.keys(c).length>0&&Object.entries(c).forEach(function(e){var n=de(e,2),t=n[0],o=n[1];i.searchParams.set(t,o)}),e.prev=8,e.next=11,fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({adsParams:fn({},u)})});case 11:return d=e.sent,e.next=14,d.json();case 14:return v=e.sent,f="https://"+new URL(i).hostname,m=v.trackingUrl,y=v.manifestUrl,g=f+m,h=f+y,hn.set(g),console.log("%c TRACKING URL","background: #bdf369; color: #000",g),o.src=h,e.abrupt("return",o);case 26:return e.prev=26,e.t0=e.catch(8),e.abrupt("return",o);case 29:case"end":return e.stop()}},e,null,[[8,26]])}))).apply(this,arguments)}function On(e){var n={},t=e.split("?")[1];if(!t)return[{},{}];var o,r=pn(t.split("&"));try{for(r.s();!(o=r.n()).done;){var i=o.value.split("="),l=de(i,2),a=l[0],s=l[1];n[decodeURIComponent(a)]=decodeURIComponent(s||"")}}catch(e){r.e(e)}finally{r.f()}for(var u={},c={},d=0,v=Object.entries(n);d<v.length;d++){var f=de(v[d],2),p=f[0],m=f[1];if(p.startsWith("ads."))u[p.replace(/^ads\./,"")]=m;else c[p]=m}return[u,c]}var Sn,jn=(Sn=[],{setQueuePoints:function(e){Sn=Array.isArray(e)?ce(e):Sn},getQueuePoints:function(){return ce(Sn)}});function Tn(e,n){return In.apply(this,arguments)}function In(){return In=G(K.mark(function e(n,t){var o,r,i,l,a,s;return K.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:s=function(e,t,o,r,i,s){var u=oe(n);if(!u.seeking()){t.startTimeInSeconds,t.durationInSeconds,Math.floor(u.currentTime());var c,d=pn(o);try{var v=function(){var n,o,d,v=c.value,f=v.eventType,p=v.beaconUrls,m=v.startTimeInSeconds,y=v.startTime,g=v.durationInSeconds,h=m||0,b=p,w=(null===(n=window)||void 0===n||null===(o=n.customData)||void 0===o||null===(d=o.ads)||void 0===d?void 0:d.adEventHandler)||null,k="".concat(h,"_").concat(f),O=l.get("pod-".concat(i))||[];if(console.warn(e,h,"map:",f,"condition1:",e>=h,"map:",l),e>=h&&!O.includes(k)){O.push(k),l.set("pod-".concat(i),O);try{a(f,t,b,u)}catch(e){console.error("Error when calling triggerAdBeacon:",e,f,t)}if("breakEnd"==f){var S=bn.position;bn.set(null),setTimeout(function(){null!=S&&(u.currentTime(S),s())},500)}if("function"==typeof w)try{var j;w({adsData:{eventType:f,startTimeInSeconds:m,startTime:y,durationInSeconds:g,ad:null==t||null===(j=t.ads)||void 0===j?void 0:j[r],adIndex:r}})}catch(e){console.error("Error when calling ads callback:",e)}}};for(d.s();!(c=d.n()).done;)v()}catch(e){d.e(e)}finally{d.f()}}},a=function(e,n,t,o){console.warn("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(o.currentTime())),"AD_POD:",n),console.log("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(o.currentTime())),"AD_POD:",n),null==t||t.forEach(function(e){fetch(e,{mode:"no-cors"}).catch(function(n){console.warn("Beacon failed:",e,n)})})},i=function(e){var n=Math.floor(e/60),t=Math.floor(e%60);return"".concat(n,":").concat(t.toString().padStart(2,"0"))},bn.set(t),o=hn.get(),oe(n).one("loadeddata",function(){o&&r(o)}),r=function(){var e=G(K.mark(function e(o){var r,l,a,u,c,d,v,f,p,m,y,g,h,b,w,k,O,S,j,T,I,E,P,D,x;return K.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return I=function(e){document.removeEventListener("pointermove",T),document.removeEventListener("pointerup",I),0===e.button&&S()},T=function(e){},j=function(){var e,n=m.currentTime(),t=null,o=pn(p);try{for(o.s();!(e=o.n()).done;){var r=e.value,i=r.startTimeInSeconds,l=r.durationInSeconds,a=(r.ads,Math.floor(i+l));n>=i&&n<=a&&(t=a,h.set(i,!0))}}catch(e){o.e(e)}finally{o.f()}null!==t&&(console.log("Seeking to end of the ad pod:",t),setTimeout(function(){m.currentTime(t+2.2)},100))},S=function(){var e,n=m.currentTime(),t=null,o=pn(p);try{for(o.s();!(e=o.n()).done;){var r=e.value,i=r.startTimeInSeconds,l=r.durationInSeconds,a=r.ads,s=Math.floor(i+l);(Array.isArray(a)&&(null==a?void 0:a.length)>0&&(n>s||n>i)&&!h.has(i)||n>=i&&n<=s)&&(t=i,h.set(i,!0))}}catch(e){o.e(e)}finally{o.f()}null!==t&&(console.log("Seeking back to ad pod:",t),setTimeout(function(){m.currentTime(t+.4)},100))},c=!1,e.next=7,fetch(o);case 7:return d=e.sent,e.next=10,d.json();case 10:v=e.sent,console.log("%c TRACKING URL RESPONSE ","background: #d9e7ff; color: #000",v),f=v.avails,p=[],m=oe(n),y=m.controlBar.progressControl,g=y.seekBar.el(),f.map(function(e,n){var t,o,r;0==n&&Array.isArray(null==e?void 0:e.ads)&&(null==e||null===(t=e.ads)||void 0===t?void 0:t.length)>0&&(c=!0),p.push({ads:null==e?void 0:e.ads,durationInSeconds:null==e?void 0:e.durationInSeconds,startTimeInSeconds:null==e?void 0:e.startTimeInSeconds,markerPositionInSeconds:Math.floor(null==e?void 0:e.startTimeInSeconds),podSlotImpressionBeacon:(null==e||null===(o=e.adBreakTrackingEvents)||void 0===o||null===(r=o.filter(function(e){return"breakStart"==(null==e?void 0:e.eventType)}))||void 0===r?void 0:r[0])||[]})}),!c&&t&&m.currentTime(t),null!=p&&p.length&&jn.setQueuePoints(p),p.forEach(function(e){var n=e.markerPositionInSeconds,t=e.ads,o=m.duration();if(!(n>o||Array.isArray(t)&&0==(null==t?void 0:t.length))){var r=n/o*100,i=document.createElement("div");i.className="vjs-seekbar-marker",i.style.left="".concat(r,"%"),i.style.position="absolute",i.style.top="0",i.style.bottom="0",i.style.width="2px",i.style.backgroundColor="#fecc09",i.style.left="".concat(r,"%"),i.style.pointerEvents="none",g.appendChild(i)}}),h=new Map,b=-1,w=(null===(r=document)||void 0===r||null===(l=r.getElementsByClassName("tvProviderImage"))||void 0===l?void 0:l[0])||null,k=(null==m||null===(a=m.controlBar)||void 0===a?void 0:a.getChild("videoSelector"))||null,O=(null==m||null===(u=m.controlBar)||void 0===u?void 0:u.getChild("seriesV2"))||null,m.on("timeupdate",re(function(){var e=m.currentTime();if(e!==b){b=e;for(var n=!1,t=function(){var t=p[o],r=t.startTimeInSeconds,l=t.durationInSeconds,a=t.ads,u=r+l;if(e>=r-1.2&&e<=u+1.2){e<=u&&Array.isArray(a)&&(null==a?void 0:a.length)>0&&(n=!0),e>u&&h.set(r,!0),dn.disable(),w&&w.classList.add("vjs-hidden"),k&&(k.el().style.pointerEvents="none",k.el().classList.add("vjs-hidden")),O&&(O.el().style.pointerEvents="none",O.el().classList.add("vjs-hidden")),y.el().style.visibility="hidden";for(var c=e-r,d=0,v=0,f=0;f<a.length;f++){var m,g=null==a||null===(m=a[f])||void 0===m?void 0:m.durationInSeconds;if(c<d+g){v=f;break}d+=g}var b=a[v],S=c-d,T=Math.max(0,(null==b?void 0:b.durationInSeconds)-S),I=Math.round(T);E.style.display="block",x.textContent="".concat(v+1," of ").concat(a.length," • ").concat(i(I));var P=[];return null==a||a.forEach(function(e){var n=e.trackingEvents.filter(function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression","complete"].includes(e.eventType)});P.push.apply(P,ce(n))}),Array.isArray(a)&&0==(null==a?void 0:a.length)&&P.push(null==t?void 0:t.podSlotImpressionBeacon),s(e,t,P,v,o,j),"break"}},o=0;o<p.length;o++){if("break"===t())break}n||(E.style.display="none",y.el().style.visibility="visible",k&&(k.el().style.pointerEvents="auto",k.el().classList.remove("vjs-hidden")),O&&(O.el().style.pointerEvents="auto",O.el().classList.remove("vjs-hidden")),w&&w.classList.remove("vjs-hidden"),dn.enable())}},1e3)),y.el().addEventListener("pointerdown",function(e){0===e.button&&(document.addEventListener("pointermove",T),document.addEventListener("pointerup",I))}),(E=document.createElement("div")).className="ssai-ad-container",(P=document.createElement("div")).className="sponsored-adbox",(D=document.createElement("div")).className="sponsored-text",D.textContent="Sponsored Ad",P.append(D),(x=document.createElement("div")).className="ad-counter",document.createElement("div").className="ad-timer",E.append(P),E.append(x),m.el().appendChild(E);case 44:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),l=new Map;case 10:case"end":return e.stop()}},e)})),In.apply(this,arguments)}function En(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function Pn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?En(Object(t),!0).forEach(function(n){F(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):En(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var Dn=function(e,n,t,o){var r,i,s,u,d,v,f,p,b,w,k,O,S,j,T,I,E,P,D,x,A,C,R,L,N,M,_,V,U,B,H,Q,z,J,W,X=n.res,Y=void 0===X?null:X,$=n.sres,ee=void 0===$?null:$,ne=null!=t&&t.chromecastReceiverId?["chromecast","html5"]:["html5"],te=(null===(r=Y)||void 0===r?void 0:r.contentType)||"video",re=ie(null===(i=Y)||void 0===i||null===(s=i[te])||void 0===s||null===(u=s.gist)||void 0===u?void 0:u.videoImageUrl)||ie(null===(d=Y)||void 0===d||null===(v=d[te])||void 0===v||null===(f=v.gist)||void 0===f||null===(p=f.imageGist)||void 0===p?void 0:p.r16x9),le=(null===(b=Y)||void 0===b||null===(w=b[te])||void 0===w||null===(k=w.liveDetails)||void 0===k?void 0:k.isDvrEnabled)||!1,se=(null===(O=Y)||void 0===O||null===(S=O[te])||void 0===S||null===(j=S.streamingInfo)||void 0===j?void 0:j.isLiveStream)||!1,ue=(null===(T=Y)||void 0===T||null===(I=T.ads)||void 0===I||null===(E=I.preRoll)||void 0===E||null===(P=E.adTags)||void 0===P||null===(D=P.web)||void 0===D?void 0:D.active)&&(null===(x=Y)||void 0===x||null===(A=x.ads)||void 0===A||null===(C=A.preRoll)||void 0===C||null===(R=C.adTags)||void 0===R||null===(L=R.web)||void 0===L?void 0:L.url);Y=Pn(Pn({},Y),{},{audioAssetSource:null==t?void 0:t.audioAssetSource});var ce="MEDIA_TAILOR"==(null===(N=window)||void 0===N||null===(M=N.app_data)||void 0===M||null===(_=M.appcmsMain)||void 0===_||null===(V=_.adsConfig)||void 0===V?void 0:V.vodAdSticherProvider)||!1,de=(null==t?void 0:t.latency)||6,ve=(W={enableSmoothSeeking:!0,controls:0!=(null==t?void 0:t.controls),playsinline:!0,fluid:!0,aspectRatio:"16:9",muted:(null==t?void 0:t.muted)||!1,autoplay:(null==t?void 0:t.autoplay)||!1,controlBar:{volumePanel:{inline:!1},fullscreenToggle:!0,audioTrackButton:!0,pictureInPictureToggle:!1},muteToggle:"multiplayer"==t.skin,liveui:le},F(W,"autoplay",null==t?void 0:t.autoplay),F(W,"normalizeAutoplay",(null==t?void 0:t.autoplay)&&!ue),F(W,"loop",(null==t?void 0:t.loop)||!1),F(W,"audioPosterMode",null==t?void 0:t.audioPosterMode),F(W,"html5",Pn(Pn({dash:Pn(Pn(Pn({},!q.browser.IS_SAFARI&&{useTTML:!0}),(null==t?void 0:t.debugConfig)&&(null==t||null===(U=t.debugConfig)||void 0===U?void 0:U.enable)&&{debug:!0,logLevel:null!=t&&null!==(B=t.debugConfig)&&void 0!==B&&B.logLevel?null==t||null===(H=t.debugConfig)||void 0===H?void 0:H.logLevel:"DEBUG"}),{},{updateSettings:{streaming:{delay:{liveDelay:de},text:{defaultEnabled:!1},liveCatchup:{maxDrift:0,playbackRate:{min:-.1,max:.1}},gaps:{enableStallFix:!0,stallSeek:3},abr:{autoSwitchBitrate:{video:!0,audio:!0}}}}}),vhs:Pn(Pn({liveRangeSafeTimeDelta:de,useDevicePixelRatio:!0,experimentalLLHLS:(null==t?void 0:t.lowLatency)||!1,limitRenditionByPlayerDimensions:!1,useNetworkInformationApi:!0},(null==t||null===(Q=t.customData)||void 0===Q?void 0:Q.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:!0}),debug:!0,nativeTextTracks:"Safari"==ae()},0==(null==t||null===(z=t.customData)||void 0===z?void 0:z.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==t||null===(J=t.customData)||void 0===J?void 0:J.nativeVideoTracks)&&{nativeVideoTracks:!1})),F(W,"poster",re),F(W,"techOrder",ne),F(W,"chromecast",{requestCustomDataFn:function(n){var t=oe(e),o=((null==t?void 0:t.textTracksJson_)||t.textTracks().tracks_).filter(function(e){return"captions"==e.kind||"subtitles"==e.kind});return function(e,n,t){var o,r,i,l,a,s,u,c,d,v,f=(null==e?void 0:e.contentType)||"video",p={};if(e&&null!=e&&e[f]&&null!=e&&e[f].drmEnabled){var m,y,g,h,b,w,k,O;p.isDrmEnabled=!0;var S=(null==n||null===(m=n.keySystems)||void 0===m?void 0:m["com.widevine.alpha"])||null,j=(null==S?void 0:S.url)||(null==n||null===(y=n.keySystemOptions)||void 0===y||null===(g=y[0])||void 0===g||null===(h=g.options)||void 0===h?void 0:h.serverURL);p.licenseUrl=j;var T=(null==S?void 0:S.licenseHeaders["X-AxDRM-Message"])||(null==n||null===(b=n.keySystemOptions)||void 0===b||null===(w=b[0])||void 0===w||null===(k=w.options)||void 0===k||null===(O=k.httpRequestHeaders)||void 0===O?void 0:O["X-AxDRM-Message"]);p.licenseToken=T}var I=(null==e||null===(o=e[f])||void 0===o||null===(r=o.gist)||void 0===r?void 0:r.contentType)||"VIDEO";p.contentType=I;var E=null==e||null===(i=e[f])||void 0===i||null===(l=i.gist)||void 0===l?void 0:l.runtime;p.duration=E;var P=null==e||null===(a=e[f])||void 0===a||null===(s=a.gist)||void 0===s?void 0:s.title;p.mediaTitle=P;var D=null==e||null===(u=e[f])||void 0===u||null===(c=u.gist)||void 0===c?void 0:c.videoImageUrl;return p.mediaImage=D,p.subTitles=t,p.DVR=(null==e||null===(d=e[f])||void 0===d||null===(v=d.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1,console.log(p),p}(Y,n,o)},modifyLoadRequestFn:function(n){var t,o,r,i,l,a=oe(e),s=(null==a?void 0:a.currentSource())||{};!(null===(t=Y)||void 0===t||null===(o=t[te])||void 0===o||null===(r=o.streamingInfo)||void 0===r||null===(i=r.videoAssets)||void 0===i?void 0:i.is4K)&&1||null!=s&&s.src&&null!=s&&null!==(l=s.src)&&void 0!==l&&l.includes(".m3u8")&&(n.media.hlsSegmentFormat="fmp4",n.media.hlsVideoSegmentFormat="fmp4");return n}}),W);if(!q.getPlayers()[e]){q.log.level("debug");var fe=q(e,ve,function(){var n=G(K.mark(function n(){var r,i,s,u,d,v,f,p,b,w,k,O,S,j,T,I,E,P,D,x;return K.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return console.log(fe),console.log(q.VERSION),console.log(q.getPlugins()),n.next=5,Ie(t,Y);case 5:if(O=null===(r=Y)||void 0===r||null===(i=r[te])||void 0===i||null===(s=i.liveDetails)||void 0===s?void 0:s.startOverTime,se&&o.resolve(Pn({status:!0,msg:"Player Initialised"},ee?{seriesResponse:ee,response:Y}:{response:Y})),y(e,null==t?void 0:t.analyticsCb),Ke(e,t),/Android/i.test(navigator.userAgent)&&(q.options.vhs.overrideNative=!0),le&&ge(e,O),!ue||null!=t&&null!==(u=t.customData)&&void 0!==u&&u.disableAds||g(e,ue,Y),S=l(Y,e),console.log(S),null!=t&&t.nearestClusterUrl&&(S=h(S,t.nearestClusterUrl)),!ce){n.next=19;break}return n.next=18,wn(e,Y);case 18:S=n.sent;case 19:S?a(e,S):(o.reject({status:!1,msg:"Incompatible / Missing Source",response:Y}),c(e,"Incompatible / Missing Source")),((null===(d=Y)||void 0===d||null===(v=d[te])||void 0===v||null===(f=v.contentDetails)||void 0===f||null===(p=f.closedCaptions)||void 0===p?void 0:p.length)>0||(null===(b=Y)||void 0===b||null===(w=b[te])||void 0===w||null===(k=w.closedCaptions)||void 0===k?void 0:k.length)>0)&&(x=(null===(T=Y)||void 0===T||null===(I=T[te])||void 0===I||null===(E=I.contentDetails)||void 0===E?void 0:E.closedCaptions)||(null===(P=Y)||void 0===P||null===(D=P[te])||void 0===D?void 0:D.closedCaptions),j=x.filter(function(e){return"VTT"===e.format}),Z(e,j)),null!=t&&t.disableControls?m(e):qe(e,Pn(Pn(Pn({},t),ve),{},{liveVideo:se,isDvrEnabled:le,res:Y,sres:ee})),sn(e,Pn(Pn(Pn({},t),ve),{},{liveVideo:se}),o,{res:Y,sres:ee});case 23:case"end":return n.stop()}},n)}));return function(){return n.apply(this,arguments)}}())}},xn={spinco:"e8f2c1a7-5d94-4a1f-93ea-7c0b9186f1cd"};function An(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function Cn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?An(Object(t),!0).forEach(function(n){F(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):An(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var Rn,Ln=function(e,n){var t=n.resolve,o=n.reject,r=null==e?void 0:e.playerId,i=Nn(e);Dn(r,{res:i},e,{resolve:t,reject:o})},Nn=function(e){var n,t,o=null==e?void 0:e.streamingInfo,r=null==e||null===(n=e.streamingInfo)||void 0===n?void 0:n.videoAssets,i=(null==e||null===(t=e.streamingInfo)||void 0===t?void 0:t.isDrmEnabled)||null,l=null==e?void 0:e.token,a=b(l),s=null==a?void 0:a.site;return Cn(Cn({id:null==xn?void 0:xn[s]},!i&&{directPlaybackUrl:null==r?void 0:r.url}),{},{video:{drmEnabled:i,streamingInfo:{videoAssets:{widevine:null==r?void 0:r.widevine,fairPlay:null==r?void 0:r.fairPlay,playReady:null==r?void 0:r.playReady}},liveDetails:{isDvrEnabled:null==o?void 0:o.isDvrEnabled}}})};function Mn(e,n){return _n.apply(this,arguments)}function _n(){return(_n=G(K.mark(function e(n,t){var o,r,i,l,a,u;return K.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=t.resolve,r=t.reject,i=null==n?void 0:n.videoId,l=null==n?void 0:n.playerId,a=!(null==n||!n.anonymousId),e.next=6,S();case 6:u=e.sent,w(i,u).then(function(e){var t,c,d,v;window.contentType=null==e||null===(t=e.data)||void 0===t||null===(c=t.video)||void 0===c||null===(d=c.gist)||void 0===d?void 0:d.contentType,s(null==e?void 0:e.data);var f,p=null==e?void 0:e.data;if(null!=n&&n.watchHistory&&null!=n&&null!==(v=n.watchHistory)&&void 0!==v&&v.enable&&!a)if((null===(f=n.watchHistory)||void 0===f?void 0:f.saveOffline)||!1){var m,y,g,h=Ze((null===(m=n.watchHistory)||void 0===m?void 0:m.profileId)||"",i,null==n?void 0:n.siteOwner);if(h&&h.length)n.watchHistoryResumeTime=(null===(y=h[0])||void 0===y?void 0:y.watchedTime)||null,n.watchedPercentage=(null===(g=h[0])||void 0===g?void 0:g.watchedPercentage)||null;p.contentType="video",Dn(l,{res:p},n,{resolve:o,reject:r})}else k(i,u).then(function(e){var t,o,r,i,l,a;null!==(t=window)&&void 0!==t&&null!==(o=t.watchHistory)&&void 0!==o&&o.cb&&(null===(r=window)||void 0===r||null===(i=r.watchHistory)||void 0===i||i.cb(null==e?void 0:e.data)),n.watchHistoryResumeTime=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedTime)||null,n.watchedPercentage=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null,p.contentType="video"}).catch(function(e){var n,t,o,r;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(r=o.watchHistory)||void 0===r||r.cb(e))}).finally(function(){Dn(l,{res:p},n,{resolve:o,reject:r})});else Dn(l,{res:p},n,{resolve:o,reject:r})}).catch(function(e){O(e,l,r,i)});case 8:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Vn(e,n){return Un.apply(this,arguments)}function Un(){return(Un=G(K.mark(function e(n,t){var o,r,i,l,a;return K.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=t.resolve,r=t.reject,e.next=3,S();case 3:i=e.sent,l=null==n?void 0:n.playerId,a=null==n?void 0:n.epg,j(a,i).then(function(e){var t=null==e?void 0:e.data;t.contentType="linearchannel",t.channelId=null==a?void 0:a.channelId,Dn(l,{res:t},n,{resolve:o,reject:r})}).catch(function(e){O(e,l,r,videoId)});case 7:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Bn(e,n){return Hn.apply(this,arguments)}function Hn(){return(Hn=G(K.mark(function e(n,t){var o,r,i,l,a,u,c;return K.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.resolve,i=t.reject,e.next=3,S();case 3:l=e.sent,a=null==n?void 0:n.playerId,u=sessionStorage.getItem("season-idx")||0,E.set(parseInt(u)),c=null==n||null===(o=n.series)||void 0===o?void 0:o.id,T(c,l).then(function(e){var t,o,u,d=e.data,v=e.data.seasons;P(v);var f=videoId||(null==v||null===(t=v[0])||void 0===t||null===(o=t.episodes)||void 0===o||null===(u=o[0])||void 0===u?void 0:u.id);I(c,l),w(f,l).then(function(e){var t,o,l;window.contentType=null==e||null===(t=e.data)||void 0===t||null===(o=t.video)||void 0===o||null===(l=o.gist)||void 0===l?void 0:l.contentType,s(e.data),Dn(a,{res:null==e?void 0:e.data,sres:d},n,{resolve:r,reject:i})}).catch(function(e){O(e,a,i,videoId)})}).catch(function(e){O(e,a,i)});case 9:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Fn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function Gn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Fn(Object(t),!0).forEach(function(n){F(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Fn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Kn(){return{loadVideoInstantly:D,onTimeUpdate:Q,getVideoDuration:z,onVideoEnded:J,init:function(e){return console.log("%c VIDEOJS-8 ","background: #bdf369; color: #000"),new Promise(function(){var n=G(K.mark(function n(t,o){var r,i,l,a,s,u,c,d,v,f,p,m,y,g,h,b,k,S,j,T,I,E,P;return K.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(!C(null==e?void 0:e.playerId)){n.next=2;break}return n.abrupt("return");case 2:if(p=(null==e?void 0:e.videoSourceUrl)||!1,m=null==e?void 0:e.asat,y=(null==e||null===(r=e.epg)||void 0===r?void 0:r.enable)||!1,g=null==e?void 0:e.videoId,h=(null==e||null===(i=e.series)||void 0===i?void 0:i.enable)||!1,b=(null==e?void 0:e.streamingInfo)||!1,window.videoId=g,k=null==e?void 0:e.token,!V(e)){n.next=17;break}if(sessionStorage.setItem("vlp_token",k),U().set(null==e?void 0:e.refreshToken),k&&!B(k)){n.next=16;break}return o({status:!1,msg:"".concat(k?"Token is expired !":"Missing Authorization Token"),response:{token:k}}),n.abrupt("return");case 16:Rn=JSON.parse(atob(k.split(".")[1]));case 17:return e.isAnonymousUser=!(null===(l=Rn)||void 0===l||!l.anonymousId),e.siteOwner=(null===(a=Rn)||void 0===a?void 0:a.site)||null,e.userId=(null===(s=Rn)||void 0===s?void 0:s.userId)||null,window.sessionStorage.setItem("uid",null===(u=Rn)||void 0===u?void 0:u.userId),window.watchHistory=e.watchHistory||null,S=null==e?void 0:e.playerId,e.chromecastReceiverId=null!=e&&null!==(c=e.series)&&void 0!==c&&c.enable?null:null==e?void 0:e.chromecastReceiverId,j=(null==e||null===(d=e.analytics)||void 0===d?void 0:d.gaId)||null,(T=null==e?void 0:e.errors)&&(window.customErrors=T),window.customData=null==e?void 0:e.customData,se(null==e||null===(v=e.customData)||void 0===v?void 0:v.localisation),_.set(e.apiBaseUrl),null!=e&&e.skin&&!le(e.skin)||(e.skin="VL_ONE"),n.next=33,je(e);case 33:j&&ve("https://www.googletagmanager.com/gtag/js?id=".concat(j)).then(function(){return H(j)}).catch(function(e){}),(I=null===(f=document)||void 0===f?void 0:f.getElementById("".concat(S)))&&I.addEventListener("contextmenu",function(e){return e.preventDefault()}),p?(P={directPlaybackUrl:p,id:E="c09576ca-8202-4e8e-ba1e-06d1ab0ce063"},m?w(E,k).then(function(n){var r=(null==n?void 0:n.data)||{};Dn(S,{res:Gn(Gn({},r),P)},e,{resolve:t,reject:o})}).catch(function(e){O(e,S,o,E)}):Dn(S,{res:P},e,{resolve:t,reject:o})):b?Ln(e,{resolve:t,reject:o}):h?Bn(e,{resolve:t,reject:o}):y?Vn(e,{resolve:t,reject:o}):Mn(e,{resolve:t,reject:o});case 37:case"end":return n.stop()}},n)}));return function(e,t){return n.apply(this,arguments)}}())},getRenditions:ne,skip:v,getPlayer:oe,play:x,pause:A,detectBrowser:ae,rewind:f,loadVideo:a,seekToTimeStamp:W,isPlayerInitialised:C,load:R,authenticateLC:L,dispose:N,enableCaptions:ee,disableCaptions:$,getCaptions:Y,playSelectedResolution:te,getSource:l,setVolume:pe,getVolume:me,disableControls:m,setPlaybackSpeed:X,getEntitlementData:M,adsQueuePointManager:jn}}export{Kn as V,un as i,Tn as s};
@@ -1 +0,0 @@
1
- import{g as l}from"./skin-58b9263c.js";var i=function(i){var n,o=l(i),t=[];if((null==o||null===(n=o.tech_)||void 0===n?void 0:n.vhs)||!1){var d,v,e=null==o||null===(d=o.tech_)||void 0===d||null===(v=d.vhs)||void 0===v?void 0:v.representations();(null==e?void 0:e.length)>0&&(t=null==e?void 0:e.sort(function(l,i){return(null==l?void 0:l.height)==(null==i?void 0:i.height)?(null==i?void 0:i.bandwidth)-(null==l?void 0:l.bandwidth):(null==i?void 0:i.height)-(null==l?void 0:l.height)}))}else{var u,h,r=null==o||null===(u=o.dash)||void 0===u||null===(h=u.mediaPlayer)||void 0===h?void 0:h.getBitrateInfoListFor("video");(null==r?void 0:r.length)>0&&(t=null==r?void 0:r.sort(function(l,i){return i.height-l.height}))}return t};export{i as g};
@@ -1 +0,0 @@
1
- import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/classCallCheck";import s from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/helpers/assertThisInitialized";import n from"@babel/runtime/helpers/inherits";import i from"@babel/runtime/helpers/possibleConstructorReturn";import l from"@babel/runtime/helpers/getPrototypeOf";import a from"video.js";import{f as r,e as d,B as c}from"./icons-0676e9c7.js";import{j as u,U as m,V as v,H as p,b as h,B as f}from"./generic-76d748e7.js";import{e as b,s as y,p as C,j as g,g as N,i as E}from"./skin-58b9263c.js";import{a as k}from"./autoNextVideo-613b5bf9.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./browser-d4613b36.js";import"js-cookie";import"ua-parser-js";import"./captions-b7fd8308.js";import"./util-80257541.js";function S(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(S=function(){return!!e})()}var I=a.getComponent("Component"),x=function(){n(w,I);var x,L,B=(x=w,L=S(),function(){var e,t=l(x);if(L){var s=l(this).constructor;e=Reflect.construct(t,arguments,s)}else e=t.apply(this,arguments);return i(this,e)});function w(s){var n,i,l,a,r,d,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t(this,w),(d=B.call(this,s,c)).playerId=c.playerId,d.seriesData=c.sres,d.videos=null==c||null===(n=c.sres)||void 0===n?void 0:n.seasons,d.currentVideoData=c.res,d.initialiseStructure(),d.loadCSS(),d.selectedSeason=0,d.cb=null==c||null===(i=c.series)||void 0===i?void 0:i.cb,d.autoPlayNext=(null==c||null===(l=c.series)||void 0===l?void 0:l.autoPlayNext)||!1,sessionStorage.getItem("token"),d.watchMap=u(),null!==(a=o(d))&&void 0!==a&&a.autoPlayNext&&null!=c&&null!==(r=c.series)&&void 0!==r&&r.enable){var p,h,f,b,y=null==c||null===(p=c.sres)||void 0===p?void 0:p.seasons,C=[];y.map(function(t){C.push.apply(C,e(t.episodes))}),m(C),v(null===(h=d.options_)||void 0===h||null===(f=h.res)||void 0===f||null===(b=f.video)||void 0===b?void 0:b.id),k({playerId:d.playerId,content:C,cb:d.cb,series:null==c?void 0:c.sres})}return d}return s(w,[{key:"createEl",value:function(){var e=a.dom.createEl("div",{className:"series-selection vjs-control vjs-button"});e.style.position="unset";var t=a.dom.createEl("button",{className:"series-selector-icon",title:"series selector",innerHTML:"".concat(r())});return a.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./series-v2-8a8b6f0c.js").then(function(e){var t=document.createElement("style");t.id="series-v2",t.append("".concat(e.default)),document.head.appendChild(t)})}},{key:"toggleOpenClose",value:function(e){var t,s=this.el();null!=e&&null!==(t=e.classList)&&void 0!==t&&t.contains("hidden")?(b(),e.classList.remove("hidden"),s.classList.add("open"),y(this.playerId,e)):(e.classList.add("hidden"),s.classList.remove("open"))}},{key:"handleTabIndexSelector",value:function(){var e,t=document.getElementsByClassName("season-holder");null!==(e=document.getElementsByClassName("series-selector-cross-icon"))&&void 0!==e&&e[0]&&(document.getElementsByClassName("series-selector-cross-icon")[0].tabIndex=0);for(var s=0;s<(null==t?void 0:t.length);s++)t[s].tabIndex=0}},{key:"handleCloseTabIndex",value:function(){var e,t=document.getElementsByClassName("season-holder");null!==(e=document.getElementsByClassName("series-selector-cross-icon"))&&void 0!==e&&e[0]&&(document.getElementsByClassName("series-selector-cross-icon")[0].tabIndex=-1);for(var s=0;s<(null==t?void 0:t.length);s++)t[s]&&(t[s].tabIndex=-1)}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),s=a.dom.createEl("div",{className:"series-selection-container hidden",role:"dialog",ariaModal:"false"});s.setAttribute("aria-labelledby","Seasons Dialog"),a.dom.$(".series-selector-icon",this.el()).onclick=function(){e.toggleOpenClose(s),e.handleTabIndexSelector()};var o=document.getElementById(this.playerId);if(o){var n=window.getComputedStyle(o,null).getPropertyValue("height").slice(0,-2);s.style.height="".concat(n,"px"),a.dom.appendContent(t,s),o.style.overflow="hidden",this.addFunctionality(s)}}},{key:"handleSeriesCloseIcon",value:function(e,t,s){if("series-selector-cross-icon"===e.className)t.classList.add("hidden"),s.classList.remove("open"),this.handleCloseTabIndex();else if("series-selector-back-icon"===e.className){var o=a.dom.$(".series-selector-content",this.el());for(a.dom.$(".series-selector-cross-icon",this.el()),e.className="series-selector-cross-icon";null!=o&&o.firstChild;)o.removeChild(o.firstChild);var n=this.createSeasonLister();for(a.dom.appendContent(o,n),a.dom.$(".series-selector-title",this.el()).textContent="Seasons";null!=e&&e.firstChild;)e.removeChild(e.firstChild);var i=C(d());e.appendChild(i)}}},{key:"addFunctionality",value:function(e){var t=this,s=this.el(),o=a.dom.createEl("div",{className:"series-selector-head"}),n=a.dom.createEl("button",{className:"series-selector-cross-icon",ariaLabel:"close season selector",innerHTML:"".concat(d()),tabIndex:-1});n.onclick=function(){t.handleSeriesCloseIcon(n,e,s)},n.onkeydown=function(o){"Enter"===o.key&&t.handleSeriesCloseIcon(n,e,s)};var i=a.dom.createEl("div",{className:"series-selector-title",ariaLabel:"season title",innerHTML:"Seasons"}),l=a.dom.createEl("div",{className:"series-selector-content"}),r=this.createSeasonLister();a.dom.appendContent(l,r),a.dom.appendContent(o,n),a.dom.appendContent(o,i),a.dom.appendContent(e,o),a.dom.appendContent(e,l),g(this.playerId,e)}},{key:"createSeasonLister",value:function(){var e=this;N(this.playerId);for(var t=h(),s=a.dom.createEl("div",{className:"season-container"}),o=function(o){var n,i,l,r,d=document.createElement("label");d.className="season-holder",d.ariaLabel=null===(n=t[o])||void 0===n?void 0:n.title,d.role="button",d.type="button",d.setAttribute("aria-LabelledBy",null===(i=t[o])||void 0===i?void 0:i.title),d.setAttribute("for","season-".concat(o));var c=document.createElement("div");c.className="season - ".concat(o),c.textContent=null===(l=t[o])||void 0===l?void 0:l.title,c.id=null===(r=t[o])||void 0===r?void 0:r.title;var u=a.dom.createEl("input",{className:"radio - ".concat(o),id:"season-".concat(o),name:"season-radio"});u.setAttribute("type","radio"),e.selectedSeason==o&&(u.checked=!0),u.onclick=function(t){f.set(o),e.showSeasonDetails(o)},d.onkeydown=function(t){"Enter"===t.key&&(f.set(o),e.showSeasonDetails(o))},a.dom.appendContent(d,u),a.dom.appendContent(d,c),a.dom.appendContent(s,d)},n=0;n<t.length;n++)o(n);return s}},{key:"loadSeriesAssetById",value:function(e,t){var s,o=this;v(null===(s=e[t])||void 0===s?void 0:s.id),p(this.playerId,e[t].id).then(function(e){null!=o&&o.cb&&o.cb(e)}).catch(function(e){null!=o&&o.cb&&o.cb(e)})}},{key:"getSeasonDetailsContainer",value:function(t,s){var o=this;t=t.map(function(e){var t,s,n,i,l,a,r,d,c;return{id:null==e?void 0:e.id,title:null==e?void 0:e.title,description:null==e||null===(t=e.gist)||void 0===t?void 0:t.description,img:(null==e||null===(s=e.gist)||void 0===s||null===(n=s.imageGist)||void 0===n?void 0:n.r16x9)||(null===(i=window)||void 0===i||null===(l=i.app_data)||void 0===l||null===(a=l.appcmsMain)||void 0===a||null===(r=a.images)||void 0===r?void 0:r.placeholderCover),watchedPercentage:(null==o||null===(d=o.watchMap)||void 0===d||null===(c=d.get(null==e?void 0:e.id))||void 0===c?void 0:c.p)||0}});for(var n=function(n){var i,l,r,d,c,u=a.dom.createEl("div",{className:"series-container",tabIndex:0,role:"button",type:"button"}),m=a.dom.createEl("div",{className:"series-section-data",index:n,innerHTML:"".concat((null===(i=t[n])||void 0===i?void 0:i.title)||"")});a.dom.createEl("div",{className:"series-title",innerHTML:"".concat((null===(l=t[n])||void 0===l?void 0:l.title)||"")}),a.dom.createEl("div",{className:"series-progress-bar",innerHTML:"<div style='width:".concat(t[n].watchedPercentage,"%' class='series-progress-bar-value'></div>")});var v=a.dom.createEl("div",{className:"series-section-image"}),p=(null===(r=t[n])||void 0===r?void 0:r.description)||"";(null===(d=p)||void 0===d?void 0:d.length)>170&&(p=p.substr(0,170)+"..."),a.dom.createEl("div",{className:"series-description",innerHTML:"".concat(p||"")});var h=a.dom.createEl("img",{className:"series-image"});h.src="".concat(E(null===(c=t[n])||void 0===c?void 0:c.img)),h.alt="Episode ".concat(n+1),a.dom.appendContent(v,h),a.dom.appendContent(u,v),a.dom.appendContent(u,m),a.dom.appendContent(s,u),u.onclick=function(e){e.stopPropagation(),o.loadSeriesAssetById(t,n)},u.onkeydown=function(e){"Enter"===e.key&&(e.stopPropagation(),o.loadSeriesAssetById(t,n))},m.onclick=function(t){var s,o,n,i=document.getElementsByClassName("series-selector-content")[0].childNodes,l=(i=e(i))[t.target.index].getElementsByClassName("series-section-expanded")[0];null!=l&&null!==(s=l.classList)&&void 0!==s&&s.contains("hidden")?(u.style.backgroundColor="#0000007d",null==l||null===(o=l.classList)||void 0===o||o.remove("hidden")):(null==l||null===(n=l.classList)||void 0===n||n.add("hidden"),u.style.backgroundColor="unset")}},i=0;i<t.length;i++)n(i);return parent}},{key:"showSeasonDetails",value:function(e){this.selectedSeason=e;for(var t=a.dom.$(".series-selector-content",this.el());null!=t&&t.firstChild;)t.removeChild(t.firstChild);var s=h()[e].episodes;this.getSeasonDetailsContainer(s,t);var o=a.dom.$(".series-selector-cross-icon",this.el());for(o.className="series-selector-back-icon";null!=o&&o.firstChild;)o.removeChild(o.firstChild);var n=C(c());o.appendChild(n),a.dom.$(".series-selector-title",this.el()).textContent="Season ".concat(e+1)}}]),w}();export{x as default};