@viewlift/player-backup 2.0.161-backup → 2.0.163-backup
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.
- package/cjs/{autoNextVideo-2238e469.js → autoNextVideo-6514c1af.js} +1 -1
- package/cjs/bundle.css +4 -4
- package/cjs/{features-99e1bcb4.js → features-77160208.js} +1 -1
- package/cjs/generic-15a63f46.js +1 -0
- package/cjs/{index-c2fa4876.js → index-0fcf7525.js} +1 -1
- package/cjs/{index-9400dc19.js → index-cc30402b.js} +1 -1
- package/cjs/index.js +1 -1
- package/cjs/{multicamv2-8e500de9.js → multicamv2-67a67a4a.js} +1 -1
- package/cjs/{multicamv2-824e4d3c.js → multicamv2-adf31491.js} +1 -1
- package/cjs/{nextEpisodeButton-7eb4a747.js → nextEpisodeButton-0c4b0b10.js} +1 -1
- package/cjs/{playlist-dee90f58.js → playlist-df102886.js} +1 -1
- package/cjs/{series-398271cc.js → series-1c051e73.js} +1 -1
- package/cjs/{series-v2-e3ae68f9.js → series-v2-1faec3a8.js} +1 -1
- package/cjs/{series-v2-afed3a2d.js → series-v2-d31c3b84.js} +1 -1
- package/cjs/{skin-17521808.js → skin-0139c5bd.js} +1 -1
- package/cjs/{skin-ef1b7ef3.js → skin-9312e234.js} +1 -1
- package/cjs/{skin-4c60b37d.js → skin-9d2e6528.js} +1 -1
- package/cjs/{skin-388b4527.js → skin-b24b04e2.js} +1 -1
- package/cjs/{skin-e2017f64.js → skin-b3890417.js} +1 -1
- package/cjs/{skin-cae6cd04.js → skin-f5be2a94.js} +1 -1
- package/cjs/{skin-dc5fe07d.js → skin-f6aec43f.js} +1 -1
- package/cjs/{util-f0e2c1f3.js → util-30c1868a.js} +1 -1
- package/cjs/{videoSelector-95115023.js → videoSelector-70c7a9d1.js} +1 -1
- package/cjs/{videoSelector-5241a0e8.js → videoSelector-8973b46e.js} +1 -1
- package/esm/{autoNextVideo-819b852a.js → autoNextVideo-2215ae9d.js} +1 -1
- package/esm/bundle.css +4 -4
- package/esm/{features-f29c23d0.js → features-fc64ebca.js} +1 -1
- package/esm/generic-b7b97306.js +1 -0
- package/esm/{index-4941dea6.js → index-504d3022.js} +1 -1
- package/esm/{index-5ea8efb2.js → index-bae1d9f5.js} +1 -1
- package/esm/index.js +1 -1
- package/esm/{multicamv2-e51c7c75.js → multicamv2-04ab92e7.js} +1 -1
- package/esm/{multicamv2-913b47ec.js → multicamv2-8e99826a.js} +1 -1
- package/esm/{nextEpisodeButton-11d49b89.js → nextEpisodeButton-47e70941.js} +1 -1
- package/esm/{playlist-b3e5cce2.js → playlist-55e014e8.js} +1 -1
- package/esm/{series-436edfc5.js → series-4fa341f3.js} +1 -1
- package/esm/{series-v2-8452f994.js → series-v2-03a02ce6.js} +1 -1
- package/esm/{series-v2-a5a411e1.js → series-v2-350f682d.js} +1 -1
- package/esm/{skin-e38e07b3.js → skin-1080dbdb.js} +1 -1
- package/esm/{skin-26697cee.js → skin-572cebb3.js} +1 -1
- package/esm/{skin-405362c8.js → skin-93518927.js} +1 -1
- package/esm/{skin-90df99f4.js → skin-98daca42.js} +1 -1
- package/esm/{skin-d9edc948.js → skin-a5c03365.js} +1 -1
- package/esm/{skin-2c54dc81.js → skin-c32c1cab.js} +1 -1
- package/esm/{skin-318b7ea8.js → skin-fb9ba1cf.js} +1 -1
- package/esm/{util-5dffd4ab.js → util-f0265a95.js} +1 -1
- package/esm/{videoSelector-0e1156eb.js → videoSelector-4088efa8.js} +1 -1
- package/esm/{videoSelector-11e66cf7.js → videoSelector-5066272e.js} +1 -1
- package/package.json +1 -1
- package/cjs/generic-34d67718.js +0 -1
- package/esm/generic-a84d8abd.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e,i=require("./currentVideoInfo-31d70bec.js"),t=require("./generic-
|
|
1
|
+
"use strict";var e,i=require("./currentVideoInfo-31d70bec.js"),t=require("./generic-15a63f46.js"),n=require("./util-30c1868a.js"),o=require("./skin-516012d7.js"),r=require("./player_instance-fcf6a8fb.js"),u=0,d=0,c=function e(n,r,u,c){d=n,n>u.length-1||(i.setVideoIdx(d+1),t.load(r,u[n].id).then((function(e){o.highlightVideo(d,r),d++,s(e)})).catch((function(i){s(i),setTimeout((function(){o.highlightVideo(d,r),d++,e(d,r,u)}),5e3)})))},s=function(i){e&&e(i)};exports.autoPlayNext=function(l){clearTimeout(u);var h=null==l?void 0:l.content;e=null==l?void 0:l.cb;var a=l.playerId;n.onVideoEnded(a,(function(){var e=r.getPlayer(a);0!==(null==e?void 0:e.currentTime())&&((d=i.getVideoIdx())>h.length-1||(i.setVideoIdx(d+1),t.load(a,h[d].id).then((function(e){o.highlightVideo(d,a),i.setCurrentVideo(e.response),d++,s(e)})).catch((function(e){s(e),o.highlightVideo(d,a),d++,u=setTimeout((function(){t.isPaused(a)&&c(d,a,h)}),5e3)}))))}))},exports.switchToNext=c;
|
package/cjs/bundle.css
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
+
|
|
6
7
|
.video-js.skin_vlone .vjs-control-bar .vjs-progress-control.vjs-control {
|
|
7
8
|
height: 0.7em;
|
|
8
9
|
position: absolute;
|
|
@@ -223,7 +224,6 @@
|
|
|
223
224
|
}
|
|
224
225
|
|
|
225
226
|
|
|
226
|
-
|
|
227
227
|
/* CSS for videojs-dvr-seekbar */
|
|
228
228
|
|
|
229
229
|
.video-js.vjs-dvr-seekbar {
|
|
@@ -397,9 +397,6 @@
|
|
|
397
397
|
|
|
398
398
|
|
|
399
399
|
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
400
|
.video-js .multicamera-parent.default{
|
|
404
401
|
height: 345px;
|
|
405
402
|
position: absolute;
|
|
@@ -480,6 +477,9 @@
|
|
|
480
477
|
|
|
481
478
|
|
|
482
479
|
|
|
480
|
+
|
|
481
|
+
|
|
482
|
+
|
|
483
483
|
/* nextep */
|
|
484
484
|
.next-ep-preview{
|
|
485
485
|
position: absolute;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/classCallCheck"),r=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/inherits"),o=require("@babel/runtime/helpers/possibleConstructorReturn"),l=require("@babel/runtime/helpers/getPrototypeOf"),i=require("video.js"),a=require("./generic-
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/classCallCheck"),r=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/inherits"),o=require("@babel/runtime/helpers/possibleConstructorReturn"),l=require("@babel/runtime/helpers/getPrototypeOf"),i=require("video.js"),a=require("./generic-15a63f46.js"),s=require("./resolution-f9dcc1b4.js"),d=require("./skin-516012d7.js"),c=require("./localisation-56e0a999.js"),u=require("./player_instance-fcf6a8fb.js");function h(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 g(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?h(Object(n),!0).forEach((function(r){e(t,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function p(e){var t=v();return function(){var r,n=l(e);if(t){var i=l(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return o(this,r)}}function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(v=function(){return!!e})()}exports.addCaptionButton=function(e,t){Promise.resolve().then((function(){return require("./caption-settings-4ca6c759.js")})).then((function(r){var n,o,l,a,s=r.default,d=u.getPlayer(e);i.registerComponent("captionSelector",s),null===(n=document)||void 0===n||null===(o=n.getElementById(e))||void 0===o||null===(l=o.getElementsByClassName("caption-selection vjs-control vjs-button"))||void 0===l||null===(a=l[0])||void 0===a||a.remove(),d&&d.getChild("controlBar").addChild("captionSelector",{playerId:e,options:t},d.controlBar.children().length-3)}))},exports.addDBClickFullScreen=function(e){var t=u.getPlayer(e).el(),r=0,n=u.getPlayer(e);n.addChild("fullscreenToggle");var o=function(){var e,r=null==t||null===(e=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===e?void 0:e[0];r&&r.click()};n.el().addEventListener("dblclick",o),window._multiplayer_dbClickHandler=o;n.el().addEventListener("touchend",(function(){var e=(new Date).getTime(),n=e-r;if(n<300&&n>0){var o,l=null==t||null===(o=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===o?void 0:o[0];l&&l.click()}r=e})),window._multiplayer_dbTapHandler=o},exports.addMulticamSelector=function(e,t){Promise.resolve().then((function(){return require("./multicamv2-67a67a4a.js")})).then((function(r){var n=r.default,o=u.getPlayer(e);i.registerComponent("streamSelector",n),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)}))},exports.addMulticamSelector_DEFAULTV2_TEMP=function(e,t){Promise.resolve().then((function(){return require("./multicamv2-adf31491.js")})).then((function(r){var n=r.default,o=u.getPlayer(e);i.registerComponent("streamSelector",n),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)}))},exports.addNextEpisodeButton=function(e,t,r){Promise.resolve().then((function(){return require("./nextEpisodeButton-0c4b0b10.js")})).then((function(n){var o=n.default,l=u.getPlayer(r);i.registerComponent("nextEpisodeButtonModule",o),l.getChild("controlBar").addChild("nextEpisodeButtonModule",{playerId:r,sres:e,res:t},l.controlBar.children().length-5)}))},exports.addOutputtingOverlay=function(e,t){var r=u.getPlayer(e).el(),n=i.dom.createEl("div",{className:"output-overlay",innerHTML:'<iframe frameBorder="0" src='.concat(t,"></iframe>")});r.append(n)},exports.addPlaylistSelector=function(e,t){Promise.resolve().then((function(){return require("./playlist-df102886.js")})).then((function(r){var n=r.default,o=u.getPlayer(e);i.registerComponent("playlistSelector",n),o.getChild("controlBar").addChild("playlistSelector",{playerId:e,playlist:t},o.controlBar.children().length-3)}))},exports.addResolutionModule=function(e,t,r){Promise.resolve().then((function(){return require("./resolution-v2-e42e0101.js")})).then((function(n){var o=n.default;document.getElementById(e).getElementsByClassName("container")[0]&&document.getElementById(e).getElementsByClassName("container")[0].remove();var l=u.getPlayer(e),a=s.getRenditions(e);(null==a?void 0:a.length)>0&&(i.registerComponent("resolutionModule",o),l.getChild("controlBar").addChild("resolutionModule",{playerId:e,skin:t,icon:r,renditions:a},l.controlBar.children().length-4))}))},exports.addRewindButton=function(e,o,l){var s=function(o){n(s,o);var i=p(s);function s(e,r){var n;t(this,s);var o=(n=i.call(this,e,r)).el_;o.classList.add("vjs-rewind-button");var a=d.parseSvgString(l);return o.append(a),n}return r(s,[{key:"handleClick",value:function(){a.rewind(e,10)}}]),s}(i.getComponent("Button"));i.registerComponent("MyButton",s),i(e).getChild("controlBar").addChild("myButton",{},1)},exports.addSeriesModule=function(e,t,r){Promise.resolve().then((function(){return require("./series-1c051e73.js")})).then((function(n){var o=n.seriesModule,l=u.getPlayer(e);i.registerComponent("seriesModule",o),l.getChild("controlBar").addChild("seriesModule",{playerId:e,seriesData:t},l.controlBar.children().length-4);for(var a=document.querySelectorAll(".season-title-sdk"),s=function(e){a[e].addEventListener("click",(function(){t[e]&&n.handleSeasonChange(t[e],e,l,r)}))},d=0;d<a.length;d++)s(d)}))},exports.addSeriesSelectorV2=function(e,t){Promise.resolve().then((function(){return require("./series-v2-1faec3a8.js")})).then((function(r){var n=r.default,o=u.getPlayer(e);i.registerComponent("seriesV2",n),o.getChild("controlBar").addChild("seriesV2",g({playerId:e},t),o.controlBar.children().length-3)}))},exports.addSeriesSelectorV2_DEFAULTV2_TEMP=function(e,t){Promise.resolve().then((function(){return require("./series-v2-d31c3b84.js")})).then((function(r){var n=r.default,o=u.getPlayer(e);i.registerComponent("seriesV2",n),o.getChild("controlBar").addChild("seriesV2",g({playerId:e},t),o.controlBar.children().length-3)}))},exports.addSettingsButtonV2=function(e,t){Promise.resolve().then((function(){return require("./settings-icon-a8ec6794.js")})).then((function(r){var n,o,l,a,s=r.default,d=u.getPlayer(e);i.registerComponent("settingsSelector",s),null===(n=document)||void 0===n||null===(o=n.getElementById(e))||void 0===o||null===(l=o.getElementsByClassName("settings-selection vjs-control vjs-button"))||void 0===l||null===(a=l[0])||void 0===a||a.remove(),d&&d.getChild("controlBar").addChild("settingsSelector",{playerId:e,options:t},d.controlBar.children().length-3)}))},exports.addSkipButton=function(e,o,l){var s=function(o){n(s,o);var i=p(s);function s(e,r){var n;t(this,s);var o=(n=i.call(this,e,r)).el_;o.classList.add("vjs-skip-button");var a=d.parseSvgString(l);return o.append(a),n}return r(s,[{key:"handleClick",value:function(){a.skip(e,10)}}]),s}(i.getComponent("Button"));i.registerComponent("MyButton",s),i(e).getChild("controlBar").addChild("myButton",{},1)},exports.addSlowMotion=function(e){var o=function(e){n(i,e);var o=p(i);function i(e,r){var n;t(this,i);var l=(n=o.call(this,e,r)).el_;return l.classList.add("vjs-slowmo-button"),l.textContent=c.getLocalisation("slowMoText")||"Slow Mo",n}return r(i,[{key:"handleClick",value:function(){1==l.playbackRate()?(l.playbackRate(.5),this.el().style.background="darkgray"):(l.playbackRate(1),this.el().style.background="none")}}]),i}(i.getComponent("Button"));i.registerComponent("MyButton",o);var l=i(e);l.getChild("controlBar").addChild("myButton",{},2)},exports.addStartFromBeginningButton=function(e,t){Promise.resolve().then((function(){return require("./start-begin-btn-5739a6c0.js")})).then((function(r){var n=r.default,o=u.getPlayer(e);i.registerComponent("startFromBeginingButton",n);var l=o.getChild("controlBar").addChild("startFromBeginingButton",g({playerId:e},t),o.controlBar.children().findIndex((function(e){return"PlayToggle"===e.name_})));o.startFromBeginningButton=l}))},exports.addVideoSelector=function(e,t){Promise.resolve().then((function(){return require("./videoSelector-70c7a9d1.js")})).then((function(r){var n=r.default,o=u.getPlayer(e);i.registerComponent("videoSelector",n),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)}))},exports.addVideoSelector_DEFAULTV2_TEMP=function(e,t){Promise.resolve().then((function(){return require("./videoSelector-8973b46e.js")})).then((function(r){var n=r.default,o=u.getPlayer(e);i.registerComponent("videoSelector",n),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)}))},exports.addWatchLiveButton=function(e,t){Promise.resolve().then((function(){return require("./watch-live-btn-822534d1.js")})).then((function(r){var n=r.default,o=u.getPlayer(e);i.registerComponent("watchLiveButton",n);var l=o.getChild("controlBar").addChild("watchLiveButton",g({playerId:e},t),o.controlBar.children().findIndex((function(e){return"PlayToggle"===e.name_}))+1);o.watchLiveButton=l}))};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/defineProperty"),n=require("@babel/runtime/helpers/asyncToGenerator"),t=require("@babel/runtime/regenerator"),o=require("video.js"),r=require("axios"),i=require("./player_instance-fcf6a8fb.js"),a=require("js-cookie"),l=require("./currentVideoInfo-31d70bec.js"),s=require("./captions-dbc83a75.js"),u=require("./skin-516012d7.js"),d=require("@babel/runtime/helpers/toConsumableArray"),c=require("@babel/runtime/helpers/slicedToArray");function v(){var e,n;null===(e=window)||void 0===e||null===(n=e.dataLayer)||void 0===n||n.push(arguments)}function p(e,n){v("event",e,n)}var f={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 m(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 g(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?m(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):m(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var I={name:"@viewlift/player",version:"2.0.61",main:"dist/bundle.cjs.js",types:"dist/@viewlift/player/esm/index.d.ts",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","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=I.version;var E,y=function(e,n){var t,o,i,a,l,s,u,d;return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.overrideEntitlementResponse?new Promise((function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementResponse})})):r({url:null!==(l=window)&&void 0!==l&&null!==(s=l.customData)&&void 0!==s&&s.overrideEntitlementBaseUrl?(null===(u=window)||void 0===u||null===(d=u.customData)||void 0===d?void 0:d.overrideEntitlementBaseUrl)+"/video/status":S.get()+"".concat(null==f?void 0:f.getVideoDetails),params:g({id:e,deviceType:"web_browser",contentConsumption:"web"},null===(i=window)||void 0===i||null===(a=i.customData)||void 0===a?void 0:a.entitlement),method:"GET",headers:{Authorization:n,"Sdk-Version":I.version,"x-player-name":"videojs"},withCredentials:!0})},h=function(e,n){var t,o,i,a;return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.overrideEntitlementResponse?new Promise((function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementResponse})})):r({url:S.get()+f.getLinearChannelDetails,params:g(g(g(g(g({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===(i=window)||void 0===i||null===(a=i.customData)||void 0===a?void 0:a.entitlement),method:"GET",headers:{Authorization:n,hdcp:"HDCP-1.4",sl:"SW_SECURE_CRYPTO"}})},T=function(){var e=n(t.mark((function e(n){var o;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,D();case 2:return o=e.sent,e.abrupt("return",r({url:S.get()+"".concat(null==f?void 0:f.saveWatchHistoryV2),method:"POST",headers:{Authorization:o},data:g({},n),params:g({},(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)}}(),b=function(e,n){var t,o,i=window.contentType;return r({method:"GET",url:S.get()+"".concat(null==f?void 0:f.getVideoInfoV2,"/").concat(i,"/").concat(e),headers:{Authorization:n,"x-api-key":null===(t=window)||void 0===t||null===(o=t.watchHistory)||void 0===o?void 0:o.xApiKey},timeout:15e3})},w=function(e){var n=e.videoId;return r({method:"GET",url:S.get()+"".concat(null==f?void 0:f.getSeriesWatchHistoryV2,"/").concat(n),headers:{Authorization:e.token},timeout:15e3})},S=(E=null==f?void 0:f.apiBaseUrl,{set:function(e){e&&(E=e)},get:function(){return E}}),_=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},O=null;function A(){return{set:function(e){e&&(O=e)},get:function(){return O}}}var P=function(){var e=n(t.mark((function e(){var n,o,i;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=A().get(),o=S.get(),e.prev=2,e.next=5,r({method:"GET",url:"".concat(o,"/identity/refresh/").concat(n)});case 5:return i=e.sent,e.abrupt("return",i);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)}}(),L=null,D=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"))||!_(n)){e.next=6;break}return L||(L=P().then((function(e){var t,o,r=null==e||null===(t=e.data)||void 0===t?void 0:t.authorizationToken,i=null==e||null===(o=e.data)||void 0===o?void 0:o.refreshToken;return r&&sessionStorage.setItem("vlp_token",r),i&&A().set(i),r||n})).catch((function(e){return console.error("Error fetching refresh token",e),n})).finally((function(){L=null}))),e.abrupt("return",L);case 6:return e.abrupt("return",n);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),C=function(e){if(e&&"string"==typeof e)return JSON.parse(atob(e.split(".")[1]))};function k(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 R(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?k(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):k(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var V=100,F=function(){var e,n,t,o,r,i,a,s=l.getCurrentVideo();return"linearchannel"===((null==s?void 0:s.contentType)||"video")?null==s||null===(e=s.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==s?void 0:s.channelId)})))||void 0===t||null===(o=t.content)||void 0===o?void 0:o.id:(null==s||null===(r=s.video)||void 0===r||null===(i=r.gist)||void 0===i?void 0:i.id)||(null==s||null===(a=s.video)||void 0===a?void 0:a.id)||(null==s?void 0:s.id)};function x(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return"".concat(e()).concat(e(),"-").concat(e(),"-").concat(e(),"-").concat(e(),"-").concat(e()).concat(e()).concat(e())}function N(){var e=window.sessionStorage.getItem("uid");return e||(e=x(),window.sessionStorage.setItem("uid",e),e)}function W(){return j.apply(this,arguments)}function j(){return(j=n(t.mark((function e(){var n,o;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,D();case 2:if(!(n=e.sent)){e.next=6;break}return o=JSON.parse(atob(n.split(".")[1])),e.abrupt("return",null!=o&&o.anonymousId?"guest-user":null==o?void 0:o.userId);case 6:return e.abrupt("return","guest-user");case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function U(e){return e?String(e):""}var M=function(e){return function(){try{return e.apply(void 0,arguments)}catch(e){return console.error(e),null}}};function B(e,o){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},l=x(),s="production",u="WEBSITE",d=null,c=0,v=null,m=0,g=0,I=!1,E=[],y=i.getPlayer(e);if(y){var h=function(){var e,n,t,o;return Math.round((null==y||null===(e=y.tech_)||void 0===e||null===(n=e.vhs)||void 0===n||null===(t=n.selectPlaylist())||void 0===t||null===(o=t.attributes)||void 0===o?void 0:o.BANDWIDTH)/1e3)},T=M((function(){for(var e=y.currentTime(),n=y.buffered(),t=0;t<n.length;t++){var o=n.start(t),r=n.end(t);if(e>=o&&e<=r)return Math.round(r-e)}return 0})),b=function(){var e=n(t.mark((function e(n){var o,i,d,c,v,p,m,g,I,E,y;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,D();case 2:return I=e.sent,E=C(I),e.t0=R,e.t1=R,e.t2=null==E?void 0:E.site,e.t3=null==E?void 0:E.siteId,e.t4=u,e.t5=N(),e.t6=F(),e.t7=n.url||document.location.href,e.t8=n.ref||document.referrer,e.t9=n.eventName,e.t10=null!==(o=n.videoPosition)&&void 0!==o?o:null,e.t11=s,e.t12=n.dp1||"",e.t13=n.dp2||"",e.t14=n.dp3||"",e.t15=n.dp4||"",e.t16=n.dp5||"",e.t17=n.isAdEvent?n.videoPosition:null,e.t18=n.isAdEvent?U(n.adPosition):"",e.next=25,W();case 25:e.t19=e.sent,e.t20=n.playerType||"videojs",e.t21=n.mediaType||"VIDEO",e.t22=l,e.t23=null!==(i=n.ttFirstFrame)&&void 0!==i?i:null,e.t24=null!==(d=n.bitrate)&&void 0!==d?d:null,e.t25=null!==(c=n.resHeight)&&void 0!==c?c:null,e.t26=null!==(v=n.resWidth)&&void 0!==v?v:null,e.t27=null!==(p=n.bufferHealth)&&void 0!==p?p:null,e.t28={aid:e.t2,cid:e.t3,pfm:e.t4,uid:e.t5,vid:e.t6,url:e.t7,ref:e.t8,pa:e.t9,vpos:e.t10,environment:e.t11,dp1:e.t12,dp2:e.t13,dp3:e.t14,dp4:e.t15,dp5:e.t16,apos:e.t17,apod:e.t18,profid:e.t19,player:e.t20,media_type:e.t21,stream_id:e.t22,embedurl:"",ttfirstframe:e.t23,bitrate:e.t24,connectionspeed:null,resolutionheight:e.t25,resolutionwidth:e.t26,bufferhealth:e.t27},e.t29=(null==n?void 0:n.duration)&&{duration:n.duration},e.t30=(0,e.t1)(e.t28,e.t29),e.t31=null==a||null===(m=a.beacon)||void 0===m?void 0:m.params,e.t32=(0,e.t0)(e.t30,e.t31),y=[e.t32],r({url:(null==a||null===(g=a.beacon)||void 0===g?void 0:g.url)||S.get()+f.getBeaconUrl,method:"post",headers:{Authorization:I},contentType:"application/x-www-form-urlencoded",dataType:"text",data:y}).catch((function(e){return console.error(e)}));case 41:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),w=function(e){if(!y.paused()&&y.readyState()>2)return clearInterval(d),clearInterval(v),e;var n,t=e+.1;return+t.toFixed(2)>=5&&g<4&&I?(g++,p("BUFFERING",R({pfm:u,uid:N(),vid:F(),videoPosition:Math.floor(y.currentTime)},null==a||null===(n=a.beacon)||void 0===n?void 0:n.params)),b({eventName:"BUFFERING",videoPosition:Math.floor(y.currentTime),isAdEvent:!1}),0):t},_=function(){var e=Math.floor(y.currentTime);y.on("error",(function(){var n,t=Math.floor(y.currentTime);clearInterval(d);var o=e===t?"FAILED_TO_START":"DROPPED_STREAM";p(o,R({pfm:u,uid:N(),vid:F(),videoPosition:t},null==a||null===(n=a.beacon)||void 0===n?void 0:n.params)),b({eventName:o,videoPosition:t,isAdEvent:!1})}))},O=function(){var e=M((function(){var e;c=0,v=setInterval((function(){c=w(c)}),V),p("PLAY",R({pfm:u,uid:N(),vid:F(),videoPosition:Math.floor(y.currentTime)},null==a||null===(e=a.beacon)||void 0===e?void 0:e.params)),b({eventName:"PLAY",videoPosition:Math.floor(y.currentTime),isAdEvent:!1}),o&&o("started_video_playback",{"Video ID":F(),watchTime:Math.floor(y.currentTime)})}));y.one("play",e)},A=function(){y.one("timeupdate",(function(){var e;clearInterval(v),clearInterval(d),m=c||0,p("FIRST_FRAME",R({pfm:u,uid:N(),vid:F(),videoPosition:Math.floor(y.currentTime),ttFirstFrame:c,bufferHealth:T()},null==a||null===(e=a.beacon)||void 0===e?void 0:e.params)),b({eventName:"FIRST_FRAME",videoPosition:Math.floor(y.currentTime),isAdEvent:!1,ttFirstFrame:c,bufferHealth:T()}),I=!0,c=0}))},P=function(){var e=!1;y.on("waiting",M((function(){I&&(e=!0,clearInterval(d),d=setInterval((function(){e&&!y.paused()?m=w(m):clearInterval(d)}),V))}))),y.on("playing",M((function(){e=!1,clearInterval(d)})))},L=function(){var e=function(e){var n,t,o,r=R({videoPosition:Math.floor(y.currentTime),isAdEvent:!0,bufferHealth:T(),pfm:u,uid:N(),vid:F(),resHeight:(null===(n=videoElement)||void 0===n?void 0:n.videoHeight)||null,resWidth:(null===(t=videoElement)||void 0===t?void 0:t.videoWidth)||null},null==a||null===(o=a.beacon)||void 0===o?void 0:o.params);p(e,R({},r)),b(R({eventName:e,adPosition:1},r))};y.on("adstart",(function(){e("AD_REQUEST"),e("AD_IMPRESSION")})),y.on("adskip",(function(){c=0})),y.on("adend",(function(){c=0}))},k=function(){y.on("timeupdate",(function(){var e=Math.floor(y.currentTime());if(e>=30&&e%30==0&&!E.includes(e)){var n,t=null===(n=y.el().getElementsByTagName("video"))||void 0===n?void 0:n[0];g=0,E.push(e),b({eventName:"PING",videoPosition:e,isAdEvent:!1,duration:30,resHeight:(null==t?void 0:t.videoHeight)||null,resWidth:(null==t?void 0:t.videoWidth)||null,bufferHealth:T(),bitrate:h()})}}))};_(),P(),L(),k(),O(),y.on("loadeddata",A)}else console.error("Videojs: Player instance not found.")}var H=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"},G=function(){return!!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},q=function(){var e=l.seasonIdxManager.get();return e>=0?e+1:1},Q=function(){var e,n,t,o=l.getCurrentSeries(),r=l.getCurrentVideo(),i=null==r||null===(e=r.video)||void 0===e?void 0:e.id,a=l.seasonIdxManager.get(),s=null==o||null===(n=o[a])||void 0===n||null===(t=n.episodes)||void 0===t?void 0:t.findIndex((function(e){return(null==e?void 0:e.id)===i}));return s>=0?s+1:1};function Y(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 z(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Y(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):Y(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var K=function(e,n){return e&&n?"".concat(e,"x").concat(n):e>1024?"L":e>768?"M":"S"},X=function(e){var n=J(e,"video.tags",[]),t=J(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return n.length>0?n.map((function(e){return e.title})).join(","):t},J=function(e,n,t){for(var o=0,r=(n=n.split(".")).length;o<r;o++){var i;e=null===(i=e)||void 0===i?void 0:i[n[o]]}return e||t},$=function(){var n,t,o,r,l,s,u,d,c,v,p,f,m,g,I,E,y,h,T,b,w,S,_,O,A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",P=arguments.length>1?arguments[1]:void 0,L=arguments.length>2?arguments[2]:void 0;if(null!==(n=window)&&void 0!==n&&null!==(t=n.customData)&&void 0!==t&&t.disableMacros)return A;var D=(null==L?void 0:L.siteName)||"",C=(null==L?void 0:L.contentType)||"video",k=(null==L||null===(o=L[C])||void 0===o?void 0:o.metadata)||(null==L||null===(r=L[C])||void 0===r||null===(l=r.gist)||void 0===l?void 0:l.metadata),R=i.getPlayer(P);if(!A.includes("VIEWLIFT_"))return A;var V,F=window.getComputedStyle(document.getElementById(P),null),x=Math.trunc(F.getPropertyValue("height").slice(0,-2)),N=Math.trunc(F.getPropertyValue("width").slice(0,-2)),W="linearchannel"===C?null==L||null===(s=L.linearchannel)||void 0===s||null===(u=s.channels)||void 0===u||null===(d=u.find((function(e){return(null==e?void 0:e.id)===(null==L?void 0:L.channelId)})))||void 0===d||null===(c=d.content)||void 0===c?void 0:c.id:J(L,"video.gist.id",""),j="linearchannel"===C?null==L||null===(v=L.linearchannel)||void 0===v||null===(p=v.channels)||void 0===p||null===(f=p.find((function(e){return(null==e?void 0:e.id)===(null==L?void 0:L.channelId)})))||void 0===f?void 0:f.title:J(L,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),U=null,M=null;"function"==typeof window.__gpp&&(null===(V=window)||void 0===V||V.__gpp("ping",(function(e){U=null==e?void 0:e.gppString,M=null==e?void 0:e.sectionList[0]})));var B=z(z({},Z(k)),{},(S={VIEWLIFT_WIDTH:N,VIEWLIFT_HEIGHT:x,VIEWLIFT_SIZE:K(N,x),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===(m=window)||void 0===m?void 0:m.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:encodeURIComponent(encodeURIComponent(navigator.userAgent)),VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:J(L,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:J(L,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:J(L,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==R||null===(g=R.options_)||void 0===g?void 0:g.autoplay)||1,VIEWLIFT_MUTE:(null==R||null===(I=R.options_)||void 0===I?void 0:I.autoplay)||0,VIEWLIFT_DEVICE_ID:"spinco"==D||"usanetwork"==D?"":localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_DEVICETYPE:"WEB_BROWSER",VIEWLIFT_IDTYPE:"dpid",VIEWLIFT_KEYWORDS:X(L),VIEWLIFT_MEDIA_ID:W,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(J(L,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:W,VIEWLIFT_VIDEO_URL:encodeURI(window.location.origin+J(L,"video.gist.permalink","")),VIEWLIFT_CONSENT:a.get("cc")||"VIEWLIFT_CONSENT",VIEWLIFT_COPPA:J(null===(E=window)||void 0===E||null===(y=E.app_data)||void 0===y||null===(h=y.site)||void 0===h?void 0:h.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR_CONSENT:"",VIEWLIFT_ROKU_AD_ID:"",VIEWLIFT_ROKU_AD_KEYS:"",VIEWLIFT_RDID:"",VIEWLIFT_GDPR:"spinco"==D||"usanetwork"==D?"":J(null===(T=window)||void 0===T||null===(b=T.app_data)||void 0===b||null===(w=b.site)||void 0===w?void 0:w.settings,"compliance.gdpr")?1:0,VIEWLIFT_CONTENT_DURATION_MS:1e3*J(L,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:J(L,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:W,VIEWLIFT_CONTENT_TITLE:j,VIEWLIFT_CONTENT_SERIES_TITLE:J(L,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:J(L,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER",VIEWLIFT_EPISODE_NUMBER:Q(),VIEWLIFT_SEASON_NUMBER:q(),VIEWLIFT_CONTENT_TAGS:X(L),VIEWLIFT_GPP_SID:M||"VIEWLIFT_GPP_SID",VIEWLIFT_GPP:U||"VIEWLIFT_GPP",VIEWLIFT_LAT:"",VIEWLIFT_APP_BUNDLE:"",VIEWLIFT_ATT_CONSENT:"",VIEWLIFT_APP_ID:"",VIEWLIFT_APP_STORE_URL:""},e(S,"VIEWLIFT_LAT",""),e(S,"VIEWLIFT_APP_BUNDLE",""),e(S,"VIEWLIFT_ATT_CONSENT",""),S),null===(_=window)||void 0===_||null===(O=_.customData)||void 0===O?void 0:O.macros);for(var H in B){var G=new RegExp(H,"g");A=A.replace(G,B[H])}return A},Z=function(e){var n,t,o,r,i,a,l={},s=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map((function(e){s.set(e.name,e.value)})));var u=(null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(o=t.subscription)||void 0===o?void 0:o.SVOD)||!1,d=(null===(r=window)||void 0===r||null===(i=r.customData)||void 0===i||null===(a=i.subscription)||void 0===a?void 0:a.TVE)||!1;return u||d?(G()?u?l=z(z({},l),{},{VIEWLIFT_CSID:s.get("csid.mweb.dtc")||""}):d&&(l=z(z({},l),{},{VIEWLIFT_CSID:s.get("csid.mweb.tve")||""})):u?l=z(z({},l),{},{VIEWLIFT_CSID:s.get("csid.web.dtc")||""}):d&&(l=z(z({},l),{},{VIEWLIFT_CSID:s.get("csid.web.tve")||""})),u?l=z(z({},l),{},{VIEWLIFT_SFID:s.get("sfid.dtc")||s.get("sfid.web.dtc")||""}):d&&(l=z(z({},l),{},{VIEWLIFT_SFID:s.get("sfid.tve")||s.get("sfid.web.tve")||""})),l=G()?z(z({},l),{},{VIEWLIFT_PROF:s.get("prof.mweb")||""}):z(z({},l),{},{VIEWLIFT_PROF:s.get("prof.web")||""})):(l=z(z({},l),{},{VIEWLIFT_SFID:s.get("sfid.dtc")||s.get("sfid.web.dtc")||""}),l=G()?z(z({},l),{},{VIEWLIFT_CSID:s.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:s.get("prof.mweb")||""}):z(z({},l),{},{VIEWLIFT_CSID:s.get("csid.web.dtc")||"",VIEWLIFT_PROF:s.get("prof.web")||""})),l=z(z({},l),{},{VIEWLIFT_AFID:s.get("afid"),VIEWLIFT_NIELSEN_APP_ID:s.get("VIEWLIFT_NIELSEN_APP_ID")||"VIEWLIFT_NIELSEN_APP_ID",VIEWLIFT_CHANNEL:s.get("VIEWLIFT_CHANNEL")||"VIEWLIFT_CHANNEL",VIEWLIFT_GRACE_NOTE_ID:s.get("VIEWLIFT_GRACE_NOTE_ID")||"VIEWLIFT_GRACE_NOTE_ID"})},ee=function(e,n){var t,o,r,i,a,l,s,u,d,c,v,p,f,m=(null==e?void 0:e.contentType)||"video",g=null==e||null===(t=e[m])||void 0===t?void 0:t.drmEnabled,I=null==e||null===(o=e[m])||void 0===o||null===(r=o.streamingInfo)||void 0===r?void 0:r.videoAssets,E=null==e||null===(i=e[m])||void 0===i||null===(a=i.streamingInfo)||void 0===a?void 0:a.audioAssets,y=(null==e||null===(l=e[m])||void 0===l||null===(s=l.streamingInfo)||void 0===s||null===(u=s.videoAssets)||void 0===u?void 0:u.hls)||!1;null==e||null===(d=e[m])||void 0===d||null===(c=d.liveDetails)||void 0===c||c.isDvrEnabled;var h=(null==e||null===(v=e[m])||void 0===v||null===(p=v.streamingInfo)||void 0===p||null===(f=p.videoAssets)||void 0===f?void 0:f.dash)||!1;if(null!=e&&e.directPlaybackUrl)return{src:null==e?void 0:e.directPlaybackUrl,type:null};if(null!=e&&e.audioAssetSource&&null!=E&&E.hls)return te(E);if(g){var T=oe(I,n);return T.src=$(T.src,n,e),T}if("Safari"!==H()&&h)return ne(I);if(y){var b=te(I);return b.src=$(b.src,n,e),b}if(null!=I&&I.mpeg){var w=function(e){var n=null==e?void 0:e.mpeg;return{src:n[n.length-1].url,type:"video/mp4"}}(I);return w.src=$(w.src,n,e),w}return null},ne=function(e){var n=null==e?void 0:e.dash;return n?{src:n,type:"application/dash+xml"}:null},te=function(e){var n=null==e?void 0:e.hls;return n?{src:n,type:"application/x-mpegURL"}:null},oe=function(e,n){var t=(null==e?void 0:e.drmProvider)||null,r=e.fairPlayCmaf||e.fairPlay,a=e.widevine,l=e.playReady,s=H();if(i.getPlayer(n),"Safari"===s){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 r={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};o.xhr(r,(function(e,n,o){console.log(e),e&&t(e),t(null,new Uint8Array(o))}))},getContentId:function(e,n){if(n){var t=n.indexOf("\0")+1;return n.slice(t)}},getLicense:function(n,t,r,i){var a={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:r,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};o.xhr(a,(function(e,n,t){console.log(e),e&&i(e),i(null,t)}))}}}}}(r);return re(n),u}var d,c={src:a.url,type:"application/dash+xml"};return"caliente"==(null===(d=window)||void 0===d?void 0:d.siteName)?(re(n),c.keySystems={"com.widevine.alpha":{url:a.licenseUrl,licenseHeaders:{"X-AxDRM-Message":a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"},"com.microsoft.playready":{url:null==l?void 0:l.licenseUrl,licenseHeaders:{"X-AxDRM-Message":null==l?void 0:l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}):"custom"==t?(c.keySystemOptions=[],c.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:a.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),c.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==l?void 0:l.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})):(c.keySystemOptions=[],c.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:a.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),c.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==l?void 0:l.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":null==l?void 0:l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})),c};var re=function(e){var n=i.getPlayer(e);if("function"==typeof n.eme)try{n.eme(),"Safari"==H()&&n.eme.initLegacyFairplay()}catch(e){console.log("EME ERROR :",e)}},ie=function(e,n){if(Promise.resolve().then((function(){return require("./error-26d5a3c3.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 o=document.getElementById(e);if(o){var r=document.createElement("div");r.className="error-container";var i=document.createElement("div");i.className="error-message",i.innerHTML="".concat(n),r.appendChild(i),o.append(r)}}},ae=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var le=!1,se=function(e,n,t){var o=$(n,e,t),r=i.getPlayer(e);if(n&&window.google){if("function"!=typeof r.ima)return;r.ima.initializeAdDisplayContainer&&r.ima.initializeAdDisplayContainer(),function(e,n){var t,o,r,a=i.getPlayer(e);if(null!==a.el_){le=!0;var l={id:e,adTagUrl:"".concat(n),adLabel:"Your video will resume after this sponsor message"};a.ima.initializeAdDisplayContainer&&a.ima.initializeAdDisplayContainer(),le&&null!==a.el_&&("function"==typeof a.ima?a.ima(l):setTimeout((function(){a.ima.setContentWithAdTag(null,n,!0),a.ima.requestAds()}),1e3));var s=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&s.hasAttribute("controls")&&s.removeAttribute("controls");var u="click",d=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(d=!0,u="touchend"),a.one(u,(function(){d&&a.ima.initializeAdDisplayContainer()}));var c=(null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o||null===(r=o.ads)||void 0===r?void 0:r.adEventHandler)||null;a.one("ads-ad-started",(function(){c&&c({status:"STARTED",msg:"Advertisement Started"})})),a.one("ads-manager",(function(e){var n=e.adsManager;n.addEventListener(google.ima.AdEvent.Type.COMPLETE,(function(){c&&c({status:"ENDED",msg:"Advertisement Ended"})})),n.addEventListener(google.ima.AdEvent.Type.LOADED,(function(e){c&&c({status:"LOADED",msg:"Advertisement Loaded",data:e})}))})),a.on("adserror",(function(e){c&&c({status:"ERROR",msg:"Advertisement Error"})}))}}(e,o)}};var ue,de=(ue=!0,{enable:function(){ue=!0},disable:function(){ue=!1},get enabled(){return ue}}),ce="ssai-breakStart",ve="ssai-adImpression",pe="ssai-firstQuartile",fe="ssai-midpoint",me="ssai-thirdQuartile",ge="ssai-complete",Ie="ssai-breakEnd",Ee={breakStart:ce,impression:ve,firstQuartile:pe,midpoint:fe,thirdQuartile:me,complete:ge,breakEnd:Ie};function ye(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=i.getPlayer(e);if(!t)return console.error("[SSAI] Player instance not found"),{};var o=n.eventType,r=Ee[o];r&&t.trigger(r,n)}function he(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 Te(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?he(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):he(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}function be(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 we(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)?we(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,a=!0,l=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==t.return||t.return()}finally{if(l)throw i}}}}function we(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 Se,_e=function(){var e="";return{set:function(n){n&&(e=n)},get:function(){return e}}}(),Oe=(Se=null,{set:function(e){Se=e},get position(){return Se}});function Ae(e,n){return Pe.apply(this,arguments)}function Pe(){return(Pe=n(t.mark((function e(n,o){var r,a,l,s,u,d,v,p,f,m,g,I,E,y,h,T,b,w;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i.getPlayer(n),l=ee(o,n),s=l.src,u=(null==o?void 0:o.contentType)||"video",d=(null==o||null===(r=o[u])||void 0===r||null===(a=r.streamingInfo)||void 0===a?void 0:a.isLiveStream)||!1,v=s.replace("/dash/","/session/").replace("/master/","/session/"),v=$(v,n,o),p=Le(v),f=c(p,2),m=f[0],g=f[1],v=new URL(v.split("?")[0]),Object.keys(g).length>0&&Object.entries(g).forEach((function(e){var n=c(e,2),t=n[0],o=n[1];v.searchParams.set(t,o)})),e.prev=10,e.next=13,fetch(v,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Te({adsParams:Te({},m)},d&&{availSuppression:{mode:"BEHIND_LIVE_EDGE",value:"00:00:00"}}))});case 13:return I=e.sent,e.next=16,I.json();case 16:return E=e.sent,y="https://"+new URL(v).hostname,h=E.trackingUrl,T=E.manifestUrl,b=y+h,w=y+T,_e.set(b),console.log("%c TRACKING URL","background: #bdf369; color: #000",b),l.src=w,e.abrupt("return",l);case 28:return e.prev=28,e.t0=e.catch(10),e.abrupt("return",l);case 31:case"end":return e.stop()}}),e,null,[[10,28]])})))).apply(this,arguments)}function Le(e){var n={};if(!e.split("?")[1])return[{},{}];var t,o=new URL(e,window.location.origin),r=be((null==o?void 0:o.searchParams)||[]);try{for(r.s();!(t=r.n()).done;){var i=c(t.value,2),a=i[0],l=i[1];n[decodeURIComponent(a)]=decodeURIComponent(l||"")}}catch(e){r.e(e)}finally{r.f()}for(var s={},u={},d=0,v=Object.entries(n);d<v.length;d++){var p=c(v[d],2),f=p[0],m=p[1];if(f.startsWith("ads."))s[f.replace(/^ads\./,"")]=m;else u[f]=m}return[s,u]}var De,Ce=(De=[],{setQueuePoints:function(e){console.log("%c Setting SGAI Queue Points ","background: #bdf369; color: #000",e),De=Array.isArray(e)?d(e):De},getQueuePoints:function(){return console.log("%c Getting SGAI Queue Points ","background: #bdf369; color: #000",De),d(De)}}),ke=new Map;function Re(e,n){return Ve.apply(this,arguments)}function Ve(){return Ve=n(t.mark((function e(o,r){var a,l,s,c,v,p,f,m,g,I,E,y,h,T,b,w,S,_,O,A,P,L;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:L=function(e,n,t,r,a,l){var s=i.getPlayer(o);if(!s.seeking()){n.startTimeInSeconds,n.durationInSeconds,Math.floor(s.currentTime());var u,d=be(t);try{var c=function(){var t,i,d,c=u.value,v=c.eventType,p=c.beaconUrls,f=c.startTimeInSeconds,m=c.startTime,g=c.durationInSeconds,I=f||0,E=p,y=(null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i||null===(d=i.ads)||void 0===d?void 0:d.adEventHandler)||null,h="".concat(I,"_").concat(v),T=ke.get("pod-".concat(a))||[];if(console.warn(e,I,"map:",v,"condition1:",e>=I,"map:",ke),e>=I&&!T.includes(h)){T.push(h),ke.set("pod-".concat(a),T);try{P(v,n,E,s)}catch(e){console.error("Error when calling triggerAdBeacon:",e,v,n)}if("breakEnd"==v){var b=Oe.position;Oe.set(null),setTimeout((function(){null!=b&&(s.currentTime(b),l())}),500)}if("function"==typeof y)try{var w,S={eventType:v,startTimeInSeconds:f,startTime:m,durationInSeconds:g,ad:null==n||null===(w=n.ads)||void 0===w?void 0:w[r],adIndex:r};y({adsData:S}),ye(o,S)}catch(e){console.error("Error when calling ads callback:",e)}}};for(d.s();!(u=d.n()).done;)c()}catch(e){d.e(e)}finally{d.f()}}},P=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)}))}))},A=function(e){var n=Math.floor(e/60),t=Math.floor(e%60);return"".concat(n,":").concat(t.toString().padStart(2,"0"))},ke.clear(),Oe.set(r),g=_e.get(),(I=i.getPlayer(o)).one("loadeddata",(function(){g&&O(g)})),E=new Map,y=new Map,h=-1,T=(null===(a=document)||void 0===a||null===(l=a.getElementsByClassName("tvProviderImage"))||void 0===l?void 0:l[0])||null,b=(null==I||null===(s=I.controlBar)||void 0===s?void 0:s.getChild("videoSelector"))||null,w=(null==I||null===(c=I.controlBar)||void 0===c?void 0:c.getChild("seriesV2"))||null,S=(null==I||null===(v=I.el())||void 0===v||null===(p=v.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===p?void 0:p[0])||null,_=(null==I||null===(f=I.el())||void 0===f||null===(m=f.getElementsByClassName("vjs-button vjs-skip-button"))||void 0===m?void 0:m[0])||null,O=function(){var e=n(t.mark((function e(n){var a,l,s,c,v,p,f,m,g,I,O,P,D,C,k,R,V,F,x,N;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return R=function(e){document.removeEventListener("pointermove",k),document.removeEventListener("pointerup",R),0===e.button&&D()},k=function(e){},C=function(){var e,n=I.currentTime(),t=null,o=be(g);try{for(o.s();!(e=o.n()).done;){var r=e.value,i=r.startTimeInSeconds,a=r.durationInSeconds,l=(r.ads,Math.floor(i+a));n>=i&&n<=l&&(t=l,E.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(){I.currentTime(t+2.2)}),100))},D=function(){var e,n=I.currentTime(),t=null,o=be(g);try{for(o.s();!(e=o.n()).done;){var r=e.value,i=r.startTimeInSeconds,a=r.durationInSeconds,l=r.ads,s=Math.floor(i+a);(Array.isArray(l)&&(null==l?void 0:l.length)>0&&(n>s||n>i)&&!E.has(i)||n>=i&&n<=s)&&(t=i,E.set(i,!0),y.set(i,!0))}}catch(e){o.e(e)}finally{o.f()}null!==t&&(console.log("Seeking back to ad pod:",t),setTimeout((function(){I.currentTime(t+.4)}),100))},v=!1,e.next=7,fetch(n);case 7:return p=e.sent,e.next=10,p.json();case 10:f=e.sent,console.log("%c TRACKING URL RESPONSE ","background: #d9e7ff; color: #000",f),m=f.avails,g=[],I=i.getPlayer(o),O=I.controlBar.progressControl,P=O.seekBar.el(),null===(a=document)||void 0===a||a.querySelectorAll(".vjs-seekbar-marker").forEach((function(e){return null==e?void 0:e.remove()})),m.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&&(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===(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])||[]})})),!v&&r&&(I.currentTime(r),C()),null!=g&&g.length&&(console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",g),window.adsQueueList=g),console.log(g,"data"),g.forEach((function(e){var n=e.markerPositionInSeconds,t=e.ads,o=I.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",P.appendChild(i)}})),I._timeUpdateHandler&&I.off("timeupdate",I._timeUpdateHandler),I._timeUpdateHandler=u.throttle((function(){var e=I.currentTime();if(e!==h){h=e;for(var n=!1,t=function(){var t=g[o],r=t.startTimeInSeconds,i=t.durationInSeconds,a=t.ads,l=r+i;if(e>=r-1.2&&e<=l+1.2){e>=r&&e<=l&&Array.isArray(a)&&(null==a?void 0:a.length)>0&&(n=!0),e>l&&E.set(r,!0),de.disable(),T&&T.classList.add("vjs-hidden"),S&&(S.style.pointerEvents="none",S.classList.add("vjs-hidden")),_&&(_.style.pointerEvents="none",_.classList.add("vjs-hidden")),b&&(b.el().style.pointerEvents="none",b.el().classList.add("vjs-hidden")),w&&(w.el().style.pointerEvents="none",w.el().classList.add("vjs-hidden")),O.el().classList.add("hide-progress-bar");for(var s=e-r,u=0,c=0,v=0;v<a.length;v++){var p,f=null==a||null===(p=a[v])||void 0===p?void 0:p.durationInSeconds;if(s<u+f){c=v;break}u+=f}a[c];var m=Math.max(0,i-s),I=Math.round(m);V.style.display="block",N.textContent="".concat(c+1," of ").concat(a.length," • ").concat(A(I));var h=[];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)}));h.push.apply(h,d(n))})),Array.isArray(a)&&0==(null==a?void 0:a.length)&&h.push(null==t?void 0:t.podSlotImpressionBeacon),L(e,t,h,c,o,C),"break"}y.delete(r)},o=0;o<g.length;o++){if("break"===t())break}n||(V.style.display="none",O.el().classList.remove("hide-progress-bar"),b&&(b.el().style.pointerEvents="auto",b.el().classList.remove("vjs-hidden")),w&&(w.el().style.pointerEvents="auto",w.el().classList.remove("vjs-hidden")),T&&T.classList.remove("vjs-hidden"),S&&(S.style.pointerEvents="auto",S.classList.remove("vjs-hidden")),_&&(_.style.pointerEvents="auto",_.classList.remove("vjs-hidden")),de.enable())}}),1e3),I.on("timeupdate",I._timeUpdateHandler),null===(l=document)||void 0===l||l.addEventListener("keydown",(function(e){de.enabled&&"ArrowRight"==e.key&&(D(),Me(o,10),e.stopPropagation())})),O.el().addEventListener("pointerdown",(function(e){0===e.button&&(document.addEventListener("pointermove",k),document.addEventListener("pointerup",R))})),null===(s=document)||void 0===s||null===(c=s.querySelectorAll(".ssai-ad-container"))||void 0===c||c.forEach((function(e){return null==e?void 0:e.remove()})),(V=document.createElement("div")).className="ssai-ad-container",(F=document.createElement("div")).className="sponsored-adbox",(x=document.createElement("div")).className="sponsored-text",x.textContent="Sponsored Ad",F.append(x),(N=document.createElement("div")).className="ad-counter",document.createElement("div").className="ad-timer",V.append(F),V.append(N),I.el().appendChild(V);case 45:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();case 18:case"end":return e.stop()}}),e)}))),Ve.apply(this,arguments)}function Fe(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 xe(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)?xe(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,a=!0,l=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==t.return||t.return()}finally{if(l)throw i}}}}function xe(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 Ne={};function We(e){return je.apply(this,arguments)}function je(){return je=n(t.mark((function e(o){var r,a,l,s,c,v,p,f,m,g,I,E,y,h,T,b,w,S,_,O,A,P,L,D,C,k,R;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:R=function(e,n,t,r,a){var l=i.getPlayer(o);if(!l.seeking()){n.startTimeInSeconds,n.durationInSeconds,Math.floor(l.currentTime());var s,u=Fe(t);try{for(u.s();!(s=u.n()).done;){var d,c,v,p=s.value,f=p.eventType,m=p.beaconUrls,g=p.startTimeInSeconds,I=p.startTime,E=p.durationInSeconds,y=g||0,h=m,T=(null===(d=window)||void 0===d||null===(c=d.customData)||void 0===c||null===(v=c.ads)||void 0===v?void 0:v.adEventHandler)||null,b="".concat(y,"_").concat(f),w=D.get("pod-".concat(a))||[];if(console.warn(e,y,"map:",f,"condition1:",e>=y,"map:",D),e>=y&&e<=y+C&&!w.includes(b)){w.push(b),D.set("pod-".concat(a),w);try{k(f,n,h,l)}catch(e){console.error("Error when calling triggerAdBeacon:",e,f,n)}if("function"==typeof T)try{var S,_={eventType:f,startTimeInSeconds:g,startTime:I,durationInSeconds:E,ad:null==n||null===(S=n.ads)||void 0===S?void 0:S[r],adIndex:r};T({adsData:_}),ye(o,_)}catch(e){console.error("Error when calling ads callback:",e)}}}}catch(e){u.e(e)}finally{u.f()}}},k=function(e,n,t,o){var r,i;"breakEnd"!==e||(null===(r=Ne)||void 0===r?void 0:r.currentAdIndex)+1==(null===(i=Ne)||void 0===i?void 0:i.totalAds)?(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)}))}))):console.log("SKIPPED FROM FIRING")},E=function(){I&&clearInterval(I)},m=_e.get(),g=i.getPlayer(o),I=null,g.one("loadeddata",(function(){I=setInterval((function(){m&&!g.paused()&&L(m)}),2e3)})),g.on("sourceset",(function(e){null!=e&&e.src||E(),console.log(e,"sourceset")})),g.on("dispose",(function(){E()})),y=new Map,h=new Map,T=-1,b=null,w=(null===(r=document)||void 0===r||null===(a=r.getElementsByClassName("tvProviderImage"))||void 0===a?void 0:a[0])||null,S=(null==g||null===(l=g.controlBar)||void 0===l?void 0:l.getChild("videoSelector"))||null,_=(null==g||null===(s=g.controlBar)||void 0===s?void 0:s.getChild("seriesV2"))||null,O=(null==g||null===(c=g.el())||void 0===c||null===(v=c.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===v?void 0:v[0])||null,A=(null==g||null===(p=g.el())||void 0===p||null===(f=p.getElementsByClassName("vjs-button vjs-skip-button"))||void 0===f?void 0:f[0])||null,P=!1,L=function(){var e=n(t.mark((function e(n){var r,a,l,s,c,v,p,f,m,g;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=new URL(n),b&&a.searchParams.append("nextToken",b),e.next=4,fetch(a.toString(),{method:"GET"});case 4:return l=e.sent,e.next=7,l.json();case 7:s=e.sent,c=s.avails,v=s.nextToken||null,b=v,p=[],f=i.getPlayer(o),m=f.controlBar.progressControl,g=m.seekBar.el(),null===(r=document)||void 0===r||r.querySelectorAll(".vjs-seekbar-marker").forEach((function(e){return null==e?void 0:e.remove()})),c.map((function(e,n){var t,o;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===(t=e.adBreakTrackingEvents)||void 0===t||null===(o=t.filter((function(e){return"breakStart"==(null==e?void 0:e.eventType)})))||void 0===o?void 0:o[0])||[]})})),console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",p),null!=p&&p.length&&(window.adsQueueList=p),p.forEach((function(e){var n=e.markerPositionInSeconds,t=e.ads,o=f.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)}})),f._timeUpdateHandler&&f.off("timeupdate",f._timeUpdateHandler),f._timeUpdateHandler=u.throttle((function(){var e=f.currentTime();if(e!==T){T=e;for(var n=function(){var n=p[t],o=n.startTimeInSeconds,r=n.durationInSeconds,i=n.ads,a=o+r;if(e>=o-1.2&&e<=a+1.2){P=!!(e>=o&&e<=a&&Array.isArray(i)&&(null==i?void 0:i.length)>0),e>a&&y.set(o,!0),de.disable(),w&&w.classList.add("vjs-hidden"),O&&(O.style.pointerEvents="none",O.classList.add("vjs-hidden")),A&&(A.style.pointerEvents="none",A.classList.add("vjs-hidden")),S&&(S.el().style.pointerEvents="none",S.el().classList.add("vjs-hidden")),_&&(_.el().style.pointerEvents="none",_.el().classList.add("vjs-hidden")),m.el().classList.add("hide-progress-bar");for(var l=e-o,s=0,u=0,c=0;c<i.length;c++){var v,f=null==i||null===(v=i[c])||void 0===v?void 0:v.durationInSeconds;if(l<s+f){u=c;break}s+=f}setTimeout((function(){Ne.totalAds=null==i?void 0:i.length,Ne.currentAdIndex=u}),1e3);var g=[];return null==i||i.forEach((function(e){var n=e.trackingEvents.filter((function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression","complete"].includes(e.eventType)}));g.push.apply(g,d(n))})),Array.isArray(i)&&0==(null==i?void 0:i.length)&&g.push(null==n?void 0:n.podSlotImpressionBeacon),R(e,n,g,u,t),"break"}h.delete(o)},t=0;t<p.length;t++){if("break"===n())break}P||(Ne={},m.el().classList.remove("hide-progress-bar"),S&&(S.el().style.pointerEvents="auto",S.el().classList.remove("vjs-hidden")),_&&(_.el().style.pointerEvents="auto",_.el().classList.remove("vjs-hidden")),w&&w.classList.remove("vjs-hidden"),O&&(O.style.pointerEvents="auto",O.classList.remove("vjs-hidden")),A&&(A.style.pointerEvents="auto",A.classList.remove("vjs-hidden")),de.enable())}}),1e3),f.on("timeupdate",f._timeUpdateHandler);case 23:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),D=new Map,C=2.5;case 23:case"end":return e.stop()}}),e)}))),je.apply(this,arguments)}function Ue(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}var Me=function(e,n){var t=o(e),r=t.currentTime()+n;t.currentTime(r)},Be=function(e,n){var t=o(e),r=t.currentTime(),i=r<=n?0:r-n;t.currentTime(i)},He=function(e){return!!o.getPlayer("".concat(e))},Ge=function(){var e=n(t.mark((function e(o,r){var a,s,u,d=arguments;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=d.length>2&&void 0!==d[2]&&d[2],e.next=3,D();case 3:return s=e.sent,u=i.getPlayer(o),e.abrupt("return",new Promise((function(e,i){var d=(null==r?void 0:r.programs)||[];null==r||delete r.programs,h(r,s).then(function(){var i=n(t.mark((function n(i){var s,c,v,p,f,m,g,I;return t.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(m=null==i?void 0:i.data,window.sid=x(),m.contentType="linearchannel",m.channelId=null==r?void 0:r.channelId,g=(null==m||null===(s=m.linearchannel)||void 0===s?void 0:s.isSSAIEnabled)&&"MEDIA_TAILOR"==(null===(c=window)||void 0===c||null===(v=c.app_data)||void 0===v||null===(p=v.appcmsMain)||void 0===p||null===(f=p.adsConfig)||void 0===f?void 0:f.vodAdSticherProvider)||!1,I=ee(m,o),!g){n.next=11;break}return n.next=9,Ae(o,m);case 9:I=n.sent,a=!0;case 11:l.setCurrentVideo(m),l.setCurrentEpgPrograms(d),sessionStorage.setItem("program_switched",!0),I&&a?(Ye(o,I),g&&We(o),u.on("loadstart",(function(){e({status:!0,msg:"Feed authenticated and loaded",response:m})}))):e({status:!0,msg:"Feed authenticated",response:m});case 15:case"end":return n.stop()}}),n)})));return function(e){return i.apply(this,arguments)}}()).catch((function(e){i({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)}}(),qe=function(){var e=n(t.mark((function e(o,r,a){var u,d,c,v,p,f,m;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,D();case 2:return v=e.sent,(l.getCurrentSeries()||null)&&l.setVideoIdxById(r),p=0,f=0,m=null,null!==(u=window)&&void 0!==u&&u.watchHistory&&null!==(d=window)&&void 0!==d&&null!==(c=d.watchHistory)&&void 0!==c&&c.enable&&b(r,v).then((function(e){var n,t,o,r,i,a,l;(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(null==e?void 0:e.data)),p=(null==e||null===(i=e.data)||void 0===i?void 0:i.watchedTime)||null,(f=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null)<95)&&(m=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedTime)||null)})).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))})),e.abrupt("return",new Promise((function(e,a){y(r,v).then(function(){var r=n(t.mark((function n(r){var u,d,c,v,g,I,E,y,h,T,b,w,S,_,O,A,P,L,D,C,k,R,V,F,x,N,W,j,U,M,B,H,G,q,Q,Y,z,K;return t.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(A=null==r?void 0:r.data,P=(null==A?void 0:A.contentType)||"video",L=(null==A||null===(u=A[P])||void 0===u?void 0:u.isSSAIEnabled)&&"MEDIA_TAILOR"==(null===(d=window)||void 0===d||null===(c=d.app_data)||void 0===c||null===(v=c.appcmsMain)||void 0===v||null===(g=v.adsConfig)||void 0===g?void 0:g.vodAdSticherProvider)||!1,D=(null==A||null===(I=A.video)||void 0===I||null===(E=I.streamingInfo)||void 0===E?void 0:E.isLiveStream)||!1,l.setCurrentVideo(r.data),(C=(null==A||null===(y=A.ads)||void 0===y||null===(h=y.preRoll)||void 0===h||null===(T=h.adTags)||void 0===T||null===(b=T.web)||void 0===b?void 0:b.active)&&(null==A||null===(w=A.ads)||void 0===w||null===(S=w.preRoll)||void 0===S||null===(_=S.adTags)||void 0===_||null===(O=_.web)||void 0===O?void 0:O.url))&&se(o,C,A),k=ee(A,o),!L){n.next=12;break}return n.next=11,Ae(o,A);case 11:k=n.sent;case 12:k?(H=(null==A||null===(R=A.video)||void 0===R||null===(V=R.gist)||void 0===V?void 0:V.videoImageUrl)||(null==A||null===(F=A.video)||void 0===F||null===(x=F.gist)||void 0===x||null===(N=x.imageGist)||void 0===N?void 0:N.r16x9),(G=i.getPlayer(o)).poster(H),Ye(o,k),L&&Re(o,m),G.on("loadstart",(function(){D&&e({status:!0,msg:"Video Loaded",response:A})})),G.on("loadeddata",(function(){ae(),e({status:!0,msg:"Video Loaded",response:A})})),G.one("play",(function(){p&&!L&&f<95&&setTimeout((function(){G.currentTime(p)}),0)})),G.one("error",(function(){var e;a({status:!1,msg:(null==G||null===(e=G.error())||void 0===e?void 0:e.message)||"Some error occured"})})),(null==A||null===(W=A.video)||void 0===W||null===(j=W.contentDetails)||void 0===j||null===(U=j.closedCaptions)||void 0===U?void 0:U.length)>0||(null==A||null===(M=A.video)||void 0===M||null===(B=M.closedCaptions)||void 0===B?void 0:B.length)>0?(K=(null==A||null===(Q=A.video)||void 0===Q||null===(Y=Q.contentDetails)||void 0===Y?void 0:Y.closedCaptions)||(null==A||null===(z=A.video)||void 0===z?void 0:z.closedCaptions),q=K.filter((function(e){return"VTT"===e.format})),s.addCaptions(o,q)):s.removeCaptions(o)):(ie(o,"Incompatible Source, only hls,mp4,drm content is allowed"),a("Incompatible Source, only hls,mp4,drm content is allowed"));case 13:case"end":return n.stop()}}),n)})));return function(e){return r.apply(this,arguments)}}()).catch((function(e){ze(e,o,a,r)}))})));case 10:case"end":return e.stop()}}),e)})));return function(n,t,o){return e.apply(this,arguments)}}(),Qe=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()},Ye=function(e,n){var t=i.getPlayer(e);t&&t.src(n)},ze=function(n,t,o,r){var i,a,l,s,u,d,c=null==n||null===(i=n.response)||void 0===i||null===(a=i.data)||void 0===a?void 0:a.errorCode,v=(null==n||null===(l=n.response)||void 0===l||null===(s=l.data)||void 0===s?void 0:s.errorMessage)||(null==n?void 0:n.message);He(t)&&ie(t,(null===(u=window)||void 0===u?void 0:u.customErrors)&&(null===(d=window)||void 0===d?void 0:d.customErrors[c])||"".concat(v)),o&&o(function(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Ue(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):Ue(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}({status:!1,response:n,msg:"".concat(v)},r&&{videoId:r}))};exports.adsQueuePointManager=Ce,exports.authenticateLC=Ge,exports.baseUrlManager=S,exports.clearError=ae,exports.createSeriesWatchMap=function(e,n){var t=new Map;w({videoId:e,token:n}).then((function(e){e.data.map((function(e){t.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})})),l.setSeriesWatchMap(t)})).catch((function(e){return console.log(e)}))},exports.detectBrowser=H,exports.disableControls=function(e){var n=document.getElementById(e),t=n.getElementsByClassName("vjs-control-bar")[0];t&&(t.style.visibility="hidden");var o=n.getElementsByClassName("vjs-big-play-button")[0];o&&(o.style.display="none");var r=n.getElementsByClassName("vjs-fullscreen-control")[0];r&&(r.style.display="none")},exports.dispose=function(e){var n=i.getPlayer(e);if(Qe(),u.clearEventListeners(),window.onresize=null,n)n.dispose();else{var t=document.getElementById(e);t&&t.remove()}},exports.getDecodedToken=C,exports.getEntitlementData=function(e,n,t,o){return r({url:t,params:{id:e,deviceType:"web_browser",contentConsumption:"web",latitude:null==o?void 0:o.latitude,longitude:null==o?void 0:o.longitude},method:"GET",headers:{Authorization:n},withCredentials:!0})},exports.getEpisodeNumber=Q,exports.getLinearChannelDetails=h,exports.getSGAIEnabledSource=Ae,exports.getSeasonNumber=q,exports.getSeriesDetails=function(e,n){var t,o,i=C(n),a=(null==i?void 0:i.site)||null;return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.seriesData?new Promise((function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.seriesData})})):r({url:S.get()+"/v3/content/series/".concat(e),params:{site:a},method:"GET",headers:{Authorization:n}})},exports.getSeriesWatchHistory=w,exports.getSource=ee,exports.getSsaiEvents=function(e){var n=i.getPlayer(e);if(!n)return console.error("[SSAI] Player instance not found"),{};var t=function(e,t){var o=function(e,n){return t(n)};return n.on(e,o),function(){return n.off(e,o)}};return{adBreakStart:function(e){return t(ce,e)},adImpression:function(e){return t(ve,e)},adFirstQuartile:function(e){return t(pe,e)},adMidpoint:function(e){return t(fe,e)},adThirdQuartile:function(e){return t(me,e)},adComplete:function(e){return t(ge,e)},adBreakEnd:function(e){return t(Ie,e)}}},exports.getToken=D,exports.getUpdatedClusterSource=function(e,n){var t=e.src,o=e.type;if(!t||"string"!=typeof t||!t.includes(".com"))return{src:t,type:o};n=n.replace(/\/$/,"");var r=t.split(".com")[1]||"";return{src:r?"".concat(n).concat(r):t,type:o}},exports.getUserId=N,exports.getVideoDetails=y,exports.getVideoInfo=b,exports.handleError=ie,exports.initialiseAdvertisement=se,exports.initialiseKeyboardEvents=function(e,n){var t,o,r,a=i.getPlayer(e),l=null==a||null===(t=a.controlBar)||void 0===t||null===(o=t.playToggle)||void 0===o?void 0:o.el_,s=document.getElementsByTagName("video")[0];null===(r=document)||void 0===r||r.addEventListener("keydown",(function(t){var o,r,i,u,d,c,v,p,f;if(de.enabled&&"input"!=t.target.localName){var m=t.key,g=!0===n.liveVideo||!0===n.liveui;switch([" ","m","M","f","F","ArrowLeft","ArrowRight"].includes(m)&&(t.preventDefault(),null==s||s.focus()),m){case" ":null==l||l.click();break;case"m":case"M":a.muted(!a.muted());break;case"f":case"F":null===(o=document.querySelector(".vjs-fullscreen-control"))||void 0===o||o.click();break;case"ArrowLeft":g&&!1===n.liveui||Be(e,10);break;case"ArrowRight":if("MEDIA_TAILOR"==(null===(r=window)||void 0===r||null===(i=r.app_data)||void 0===i||null===(u=i.appcmsMain)||void 0===u||null===(d=u.adsConfig)||void 0===d?void 0:d.vodAdSticherProvider)&&null!==(c=window)&&void 0!==c&&null!==(v=c.app_data)&&void 0!==v&&null!==(p=v.appcmsMain)&&void 0!==p&&null!==(f=p.adsConfig)&&void 0!==f&&f.vodAdClientSideTracking)return;g||Me(e,10)}}}),!0)},exports.initiateErrorHandling=ze,exports.inititateBeacon=function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};"localhost"!==location.hostname&&"127.0.0.1"!==location.hostname&&B(e,n,t)},exports.isMobile=G,exports.isPaused=function(e){return o(e).paused()},exports.isPlayerInitialised=He,exports.isTokenExpired=_,exports.load=qe,exports.loadVideo=Ye,exports.loadVideoInstantly=function(e,n,t){var o=i.getPlayer(e);return o.src(n),new Promise((function(e,n){var r=0;o.one("loadedmetadata",(function(){clearTimeout(r),e({status:!0,msg:"video loaded"})})),o.one("loadstart",(function(e){r=setTimeout((function(){n("FAILED: Took too long to load")}),t)}))}))},exports.pause=function(e){o(e).pause()},exports.play=function(e){o(e).play()},exports.refreshTokenManager=A,exports.rewind=Be,exports.runGtag=function(e){window.dataLayer=window.dataLayer||[],v("js",new Date),v("config",e)},exports.saveWatchHistory=T,exports.setupAdvertisementMarkers=Re,exports.setupAdvertisementMarkersForLinear=We,exports.skip=Me,exports.token_authentication_enabled=function(e){var n=!0,t=null==e?void 0:e.videoSourceUrl,o=null==e?void 0:e.asat;return t&&!o&&(n=!1),n},exports.trackMap=ke;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require("video.js/dist/video-js.min.css");var e=require("@babel/runtime/helpers/defineProperty"),n=require("@babel/runtime/helpers/asyncToGenerator"),t=require("@babel/runtime/regenerator");require("axios");var o=require("./generic-34d67718.js"),r=require("./player_instance-fcf6a8fb.js"),i=require("video.js"),l=require("./util-f0e2c1f3.js"),a=require("./captions-dbc83a75.js"),u=require("./resolution-f9dcc1b4.js"),s=require("./skin-516012d7.js"),d=require("./localisation-56e0a999.js"),c=require("./currentVideoInfo-31d70bec.js"),v=require("@babel/runtime/helpers/typeof"),p=require("./icons-2609dbe4.js"),f=require("./helper-a50a8ffc.js"),g=require("@babel/runtime/helpers/toConsumableArray"),m=function(e){return new Promise((function(n,t){if(y(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)}}))},y=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},h=function(e,n,t){var o=r.getPlayer(e);if(o)if(n>=0&&n<=100){o.muted()&&o.muted(!1);var i=parseFloat(n)/100;o.volume(i),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,"'")})},b=function(e){var n=r.getPlayer(e);return n?parseInt(100*n.volume())+"%":"Cannot find player with id: '".concat(e,"'")},w=function(){var e=n(t.mark((function e(n){var l,a,u,s,d;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=r.getPlayer(null==n?void 0:n.playerId),null!=n&&null!==(l=n.series)&&void 0!==l&&l.enable||null==n||!n.chromecastReceiverId){e.next=22;break}return e.next=4,import("@silvermine/videojs-chromecast");case 4:return s=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,s.default(i),e.finish(13);case 16:(d=i.getTech("chromecast"))&&!d.prototype.seeking&&(d.prototype.seeking=function(){}),null!==(u=window)&&void 0!==u&&u.cast?null==a||a.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}):window.__onGCastApiAvailable=function(){null==a||a.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.chromecastReceiverId&&null!=n&&n.airplay&&"Safari"==o.detectBrowser()?null==a||a.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)}}(),k=function(e,n){var t=r.getPlayer(e);t&&n&&t.controlBar&&t.controlBar.progressControl.seekBar.on("click",(function(n){var t,o,r,l,a,u=this.el(),s=i.dom.getPointerPosition(u,n).x;i.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var d=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===(l=r.CastContext)||void 0===l||null===(a=l.getInstance())||void 0===a?void 0:a.S;if(console.log(d),d&&"CONNECTED"===c){window.cast.framework.RemotePlayer.canSeek=!0;var v=new window.cast.framework.RemotePlayerController(window.cast.framework.RemotePlayer),p=v.h.media[0].liveSeekableRange.end;v.getSeekPosition(),window.cast.framework.RemotePlayer.currentTime=p*s,v.seek()}}))};var S=function(){var e=n(t.mark((function e(){return t.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)}}(),O=function(){var e=n(t.mark((function e(){return t.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){i.getPlugin("eme")||i.registerPlugin("eme",e.default)}));case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),I=function(){var e=n(t.mark((function e(){var n;return t.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(i),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)}}(),P=function(){var e=n(t.mark((function e(){return t.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-3f0e537b.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)}}(),T=function(){var e=n(t.mark((function e(){return t.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-3854764f.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)}}(),j=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(i)})).catch((function(e){console.log(e)}))}))},importAirplay:function(){import("@silvermine/videojs-airplay").then((function(e){e.default(i)}))},loadAdsLibrary:S,loadEMELibrary:O,loadMuxPlugin:I,loadDvrSeekbar:P,loadContribDash:T});function C(e){return E.apply(this,arguments)}function E(){return(E=n(t.mark((function e(n){var r;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=(null==n?void 0:n.airplay)||!1,e.next=3,S();case 3:r&&"Safari"==o.detectBrowser()&&Promise.resolve().then((function(){return j})).then((function(e){e.importAirplay()}));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function D(e,n){return x.apply(this,arguments)}function x(){return(x=n(t.mark((function e(n,r){var i,l,a,u,s,d,c,v,p,f;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c=(null==r?void 0:r.contentType)||"video",v=null==r||null===(i=r[c])||void 0===i?void 0:i.drmEnabled,null==r||null===(l=r[c])||void 0===l||null===(a=l.liveDetails)||void 0===a||a.isDvrEnabled,null==n||n.showPositiveSeekbar,p=(null==r||null===(u=r[c])||void 0===u||null===(s=u.streamingInfo)||void 0===s||null===(d=s.videoAssets)||void 0===d?void 0:d.dash)||null,e.prev=5,e.next=8,Promise.allSettled([v?"Safari"==o.detectBrowser()?O():"caliente"!=(null===(f=window)||void 0===f?void 0:f.siteName)?T():O():"Safari"!=o.detectBrowser()&&p?T():null,w(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 R(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 L(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?R(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):R(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var A=new Set,N=null,V=function(e,n,t){var r,i,l,a,u,s,d,v={},p=(null==e?void 0:e.contentType)||"video";v["c3.cm.id"]=(null===(r=e[p])||void 0===r?void 0:r.id)||"Null",v["c3.cm.contentType"]=F(e),v[null==t||null===(i=t.Constants)||void 0===i?void 0:i.IS_LIVE]=!(null==e||!e.linearchannel),v[null==t||null===(l=t.Constants)||void 0===l?void 0:l.STREAM_URL]=n.currentSrc(),v[null==t||null===(a=t.Constants)||void 0===a?void 0:a.VIEWER_ID]="undefined"===o.getUserId()?"NULL":o.getUserId(),v["c3.cm.categoryType"]=H(e),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=e[p])||void 0===u?void 0:u.drmEnabled)||"None",v.DAIStream=null!==(s=e[p])&&void 0!==s&&null!==(d=s.gist)&&void 0!==d&&d.isSSAIEnabled?"YES":"NO",v[t.Constants.DEFAULT_RESOURCE]="AKAMAI",v["c3.cm.brand"]="NULL",v.CDVREnabled=U(e),v["c3.cm.genreList"]=M(e),v["c3.cm.genre"]=_(e),v["c3.cm.channel"]=B(e);var f=J(c.getCurrentSeries(),e);return v=L(L({},v),f)},_=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"},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"},B=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"},H=function(e){return(null==e?void 0:e.contentType)||"null"},U=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"},q=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)},F=function(e){return"linearchannel"===((null==e?void 0:e.contentType)||"video")?"Live":"VOD"};var W,G,J=function(e,n){var t,r,i,l,a,u={"c3.cm.seriesName":"Null","c3.cm.seasonNumber":"Null","c3.cm.showTitle":"Null","c3.cm.episodeNumber":"Null"};if(!e||!n||null!=n&&n.linearchannel)return u;var s=o.getSeasonNumber(),d=o.getEpisodeNumber();return u["c3.cm.seriesName"]=(null==n||null===(t=n.video)||void 0===t||null===(r=t.series)||void 0===r?void 0:r.title)||"Null",u["c3.cm.seasonNumber"]=(null==s?void 0:s.toString())||"Null",u["c3.cm.showTitle"]=(null==e||null===(i=e[s-1])||void 0===i||null===(l=i.episodes)||void 0===l||null===(a=l[d-1])||void 0===a?void 0:a.title)||"Null",u["c3.cm.episodeNumber"]=(null==d?void 0:d.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"}},z=function(e){switch(e){case"application/x-mpegURL":case"application/vnd.apple.mpegurl":return"HLS";case"application/dash+xml":return"DASH";default:return"Unknown"}},X=function(){var e=n(t.mark((function e(n,o){var i,l,a,u,s,d,v,p,f,g;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==o?void 0:o.convivaConfig)||{},l=i.trackConvivaPlayerEvent,a=i.paymentHandler,u=i.tveProvider,s=i.enable,d=i.appName,v=(o||{}).token,s){e.next=4;break}return e.abrupt("return");case 4:if(p=r.getPlayer(n),"function"==typeof(f=l)){e.next=8;break}return e.abrupt("return");case 8:return e.next=10,f("getConvivaObject");case 10:if(g=e.sent){e.next=13;break}return e.abrupt("return");case 13:p.ready((function(){var e=p.tech(!0),n=!1;e.on("keysessioncreated",(function(e){n=!0;var t=e.target;if(t&&t.keySystem){var o=K(t.keySystem);f("contentInfo",{DRMEnabled:o})}else f("contentInfo",{DRMEnabled:"None"})})),n||f("contentInfo",{DRMEnabled:"None"})})),p.on("loadstart",(function(){var e,n;N&&N!==p.currentSrc()&&f("playbackEnded"),f("setPlayer",p),A.clear(),N=p.currentSrc();var t=z(p.currentType()),r=c.getCurrentVideo(),i=V(r,p,g);i[null==g||null===(e=g.Constants)||void 0===e?void 0:e.PLAYER_NAME]=d||"WEB",i[null==g||null===(n=g.Constants)||void 0===n?void 0:n.ASSET_NAME]=q(r,o),i.authToken=v||"NULL",i.streamType=t,i.D2CType=a||"NONE",i.subscriberType=u||(a?"D2C":"FREE"),i["c3.cm.affiliate"]=u||"NULL",Y.setData(i),f("contentInfo",i)})),p.on("loadedmetadata",(function(){var e,n=p.videoHeight();e=n>=2160?"4K":n>=1440?"1440p":n>=1080?"1080p":n>=720?"720p":n>=480?"480p":"".concat(n,"p"),f("contentInfo",{screenResolution:e})})),p.on("play",(function(){A.has(p.currentSrc())||(A.add(p.currentSrc()),f("playbackStarted",null))})),p.on("ended",(function(){A.has(p.currentSrc())&&A.delete(p.currentSrc()),f("playbackEnded")})),p.on("ads-loader",(function(e){e&&null!=e&&e.adsLoader&&f("initAdSensor",{player:p,adsLoader:null==e?void 0:e.adsLoader})})),p.on("dispose",(function(){null==A||A.clear(),f("playbackEnded")}));case 20:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),Y=(W={},{setData:function(e){W=L(L({},W),e)},getData:function(){return W}}),Q=function(e,n){var t=null==n?void 0:n.skin;"default"==t?Promise.resolve().then((function(){return require("./skin-dc5fe07d.js")})).then((function(t){t.initialiseSkin(e,n)})):"carousel"==t?Promise.resolve().then((function(){return require("./skin-cae6cd04.js")})).then((function(n){n.initaliseSkin(e)})):"defaultV2"==t?Promise.resolve().then((function(){return require("./skin-ef1b7ef3.js")})).then((function(t){t.initialiseSkin(e,n)})):"multiplayer"==t?Promise.resolve().then((function(){return require("./skin-388b4527.js")})).then((function(t){t.initialiseSkin(e,n)})):"minimalist"==t?Promise.resolve().then((function(){return require("./skin-e2017f64.js")})).then((function(t){t.initaliseSkin(e,n)})):"VL_ONE"==t?Promise.resolve().then((function(){return require("./skin-17521808.js")})).then((function(t){t.initialiseSkin(e,n)})):"news"==t&&Promise.resolve().then((function(){return require("./skin-4c60b37d.js")})).then((function(t){t.initialiseSkin(e,n)}))};function $(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 Z(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?$(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):$(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var ee=[],ne=0,te=null;function oe(){console.log("Cleaning up watch history data"),G=null,ee=[],ne=0,te=null}function re(e,n,t){var r,i,l,a,u,s=arguments.length>3&&void 0!==arguments[3]&&arguments[3];null==n||null===(r=n.watchHistory)||void 0===r||r.apiVersion;var d=null==n||null===(i=n.watchHistory)||void 0===i?void 0:i.profileId,c=Math.floor(e.currentTime()),v=Math.floor(e.duration());null==n||null===(l=n.watchHistory)||void 0===l||l.xapiKey;var p=(null==n||null===(a=n.video)||void 0===a?void 0:a.originalObjectId)||null,f=(null==n||null===(u=n.watchHistory)||void 0===u?void 0:u.saveOffline)||!1,g=Math.floor(e.currentTime()),m=s?100:Math.floor(c/v*100),y={};f?le(y={completed:s,watchedTime:g,watchedPercentage:m},d,n.siteOwner):(y=Z(Z({videoId:G,watchedTime:g,watchedPercentage:m,doneWatching:s,profileId:d},te&&{seriesId:te}),p&&{originalObjectId:p}),o.saveWatchHistory(y).then((function(e){})).catch((function(e){}))),ne=c+t}function ie(e){var n=[];return e&&(n=JSON.parse(localStorage.getItem("".concat(e))||"[]")),n}function le(n,t,o){var r=t?"watchhistory-data-".concat(t):"watchhistory-data-guest-".concat(o),i=ie(r),l=(new Date).getTime(),a=c.getCurrentVideo(),u=(null==a?void 0:a.video)||{},s=["id","title","gist","categories","tags","status","publishDate","plans","isVerticalVideo","monetizationBadgeIdentifier","runtime"].reduce((function(n,t){return Z(Z({},n),{},e({},t,u[t]))}),{}),d=i.findIndex((function(e){var n;return(null==e||null===(n=e.content)||void 0===n?void 0:n.id)===G}));d<0?i.push(Z(Z({content:s},n),{},{addedDate:l,updateDate:l})):i[d]=Z(Z(Z({},i[d]),n),{},{updateDate:l}),localStorage.setItem("".concat(r),JSON.stringify(i))}function ae(e,n,t){var o=ie(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 ue=!1,se=function(e,n){var t,r,i=(null==e?void 0:e.contentType)||"video";if(((null==e||null===(t=e[i])||void 0===t||null===(r=t.streamingInfo)||void 0===r?void 0:r.secondaryVideoAssets)||null)&&!ue){var l=de(e,"videoAssets","secondaryVideoAssets"),a=o.getSource(l,n);return a&&o.loadVideo(n,a),ue=!0,console.log("switching to secondary source"),!0}return console.log("secondary source is either corrupted / not available"),!1};function de(e,n,t){if(Array.isArray(e))return e.map((function(e){return de(e,n,t)}));if(null!==e&&"object"===v(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]=de(e[r],n,t)})),o}return e}function ce(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 ve(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)?ve(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 ve(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 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 fe(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?pe(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):pe(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var ge=function(e,n,t,i){var l,u,s,d,p,f=i.res,g=i.sres,m=r.getPlayer(e),y=(null==f?void 0:f.contentType)||"video",b=(null==f||null===(l=f[y])||void 0===l?void 0:l.drmEnabled)||!1,w=(null==f||null===(u=f[y])||void 0===u||null===(s=u.streamingInfo)||void 0===s?void 0:s.isLiveStream)||!1,k=(null==f||null===(d=f[y])||void 0===d||null===(p=d.liveDetails)||void 0===p?void 0:p.isDvrEnabled)||!1;c.setCurrentVideo(f),c.videoReplayTracker.set(f),m&&(m.on("loadstart",(function(){w?t.resolve({status:!0,msg:"Video Loaded",response:f}):t.resolve(fe({status:!0,msg:"Player Initialised"},g?{seriesResponse:g,response:f}:{response:f}))})),m.on("loadeddata",(function(){var t,i,l,u=a.getCaptions(e);if(null==u||u.map((function(n){return a.disableCaptions(e,n.id)})),k&&"Safari"===o.detectBrowser())try{var s;null==m||null===(s=m.liveTracker)||void 0===s||s.seekToLiveEdge()}catch(e){console.log("Cannot seek to Live Edge",e)}(null==m||!m.muted())&&h(e,sessionStorage.getItem("volume")||"100");var d=c.getCurrentVideo();if(o.clearError(),null!=n&&n.watchHistory&&null!=n&&null!==(t=n.watchHistory)&&void 0!==t&&t.enable&&(!n.isAnonymousUser||null!=n&&null!==(i=n.watchHistory)&&void 0!==i&&i.saveOffline)){var v,p,g=fe(fe({},n),f);!function(e,n,t){var o,i,l;null!=n&&n.series&&null!=n&&null!==(o=n.series)&&void 0!==o&&o.enable&&(te=null==n||null===(i=n.series)||void 0===i?void 0:i.id),ee=[],ne=0,G=t;var a=(null==n||null===(l=n.watchHistory)||void 0===l?void 0:l.interval)||30,u=r.getPlayer(e);u&&(u.on("dispose",oe),u.on("timeupdate",(function(){if(!u.seeking()){var e=Math.floor(u.currentTime());ee.includes(ne)||(e!=ne||e<a?e>ne&&(ne=e+a):(ee.push(e),re(u,n,a)))}})),u.one("ended",(function(){re(u,n,a,!0)})))}(e,g,null==d||null===(v=d.video)||void 0===v||null===(p=v.gist)||void 0===p?void 0:p.id)}if(null!=n&&null!==(l=n.analytics)&&void 0!==l&&l.muxKey&&null!=m&&m.mux){var y,b,w,S,O,I,P=(null===(y=c.getCurrentVideo())||void 0===y?void 0:y.video)||(null==f?void 0:f.video),T=null==P?void 0:P.gist,j={env_key:null==n||null===(b=n.analytics)||void 0===b?void 0:b.muxKey,player_name:"vl-web-player",player_version:null===(w=window)||void 0===w?void 0:w.vl_player_version,video_id:null==T?void 0:T.id,video_title:null==T?void 0:T.title,video_series:null==P||null===(S=P.series)||void 0===S?void 0:S.title,video_stream_type:null!=P&&null!==(O=P.streamingInfo)&&void 0!==O&&O.isLiveStream?"live":"video",viewer_user_id:null==n||null===(I=n.analytics)||void 0===I?void 0:I.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,u,s,d,c,v=window.cast&&window.cast.framework&&window.cast.framework.CastSession,p=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,f=null===(a=window)||void 0===a||null===(u=a.cast)||void 0===u||null===(s=u.framework)||void 0===s||null===(d=s.CastContext)||void 0===d||null===(c=d.getInstance())||void 0===c?void 0:c.getCurrentSession();if(v&&"CONNECTED"===p){var g,m=f.getMediaSession(),y=m.media.tracks.filter((function(e){return"TEXT"==e.type}));g=n?new chrome.cast.media.EditTracksInfoRequest([y[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),m.editTracksInfo(g)}})),m.tech_.on("retryplaylist",(function(){w&&se(f,e)})),m.on("error",(function(){var n,r;(console.log("ERROR",m.error(),m.error().code),4===m.error().code&&w)?se(f,e):(o.handleError(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===(r=m.error())||void 0===r?void 0:r.message)||"Some error occured",response:f}))})),m.one("play",(function(){var e,t,o,r,i;if(null===(e=window)||void 0===e||null===(t=e.app_data)||void 0===t||null===(o=t.appcmsMain)||void 0===o||null===(r=o.adsConfig)||void 0===r||!r.vodAdClientSideTracking){if(null!=n&&null!==(i=n.series)&&void 0!==i&&i.enable){var l,a,u,s=null===(l=c.getCurrentVideo())||void 0===l||null===(a=l.video)||void 0===a||null===(u=a.gist)||void 0===u?void 0:u.id,d=c.getSeriesWatchMap(),v=(null==d?void 0:d.get(s))||{t:0,p:0},p=v.t,f=v.p;p&&f<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(w){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(n.sort((function(e,n){var t=(e.language||e.language||"").toUpperCase(),o=(n.language||n.label||"").toUpperCase();return t<o?-1:t>o?1:0})),"object"==v(m.dash)){var t,r,i,l=null==m||null===(t=m.dash)||void 0===t||null===(r=t.mediaPlayer)||void 0===r?void 0:r.getTracksFor("audio"),a=null==l?void 0:l.find((function(e){var n;return null==e||null===(n=e.roles)||void 0===n?void 0:n.includes("main")})),u=ce(n);try{for(u.s();!(i=u.n()).done;){var s=i.value;if(a&&(null==s?void 0:s.id)=="dash-audio-".concat(a.index)){s.enabled=!0;break}}}catch(e){u.e(e)}finally{u.f()}}else{var d,c=ce(n);try{for(c.s();!(d=c.n()).done;){var p,f,g,y=d.value;if(("Chrome"==o.detectBrowser()||"Edge"==o.detectBrowser()&&(null!==(p=navigator)&&void 0!==p&&null!==(f=p.userAgent)&&void 0!==f&&f.includes("Macintosh")||!b))&&null!=y&&null!==(g=y.label)&&void 0!==g&&g.includes("5.1"))m.audioTracks().removeTrack(y);else{if("main"==y.kind){y.enabled=!0;break}y.enabled=!1}}}catch(e){c.e(e)}finally{c.f()}}})))};function me(e,n,t){var o=document.createElement("div");return o.className="vjs-seekbar-program-marker",o.id=e,o.style.title=n,o.style.left="".concat(t,"%"),o.style.position="absolute",o.style.top="0",o.style.bottom="0",o.style.width="4px",o.style.backgroundColor="#000000",o.style.left="".concat(t,"%"),o.style.pointerEvents="none",o}function ye(){document.querySelectorAll(".vjs-seekbar-program-marker").forEach((function(e){e.remove()}))}function he(e){var n=(new Date).getTime(),t=new Date(n-1e3*e).getTime();return(c.getCurrentEpgPrograms()||[]).filter((function(e){var o=new Date(e.formatted_startdate).getTime();return o>=t&&o<=n})).map((function(e){var n=new Date(e.formatted_startdate).getTime()-t;return{title:e.title,time:n/1e3,id:e.programme_id}}))}function be(e,n){var t=r.getPlayer(e);if(t){var o=n.dvrConfig,i=void 0===o?{}:o,l=n.videoId;n.epg;var a=i.playLive,u=i.playFromBegining,s=i.programs;c.setCurrentEpgPrograms(s),t.on("loadeddata",(function(){f.checkDvrStartOverEnabled(n)?u?f.playFromBeginningHandler(t,n):a?f.playLiveOrResumeHandler(t,l):(!function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.dvrConfig,o=void 0===t?{}:t,r=n.videoId,i=n.epg,l=o.buttonConfig,a=void 0===l?{}:l,u=a.watchLive;a.resume;var s=a.startFromBegining,d=r;if(i&&null!=i&&i.enable){var c=JSON.parse(sessionStorage.getItem("epgConfig"));d="".concat(null==c?void 0:c.programId,"-").concat(null==c?void 0:c.channelId)}var v=!!f.getWatchedTime(d),p=document.querySelector(".vjs-dvr-btn-overlay");p||((p=document.createElement("div")).className="vjs-dvr-btn-overlay");var g=f.getCurrentProgramThumbnail(n);g&&(p.style.backgroundImage="url(".concat(g,")"),p.style.backgroundPosition="center center",p.style.backgroundRepeat="no-repeat",p.style.backgroundSize="cover");p.innerHTML=ke(o,v),p.style.display="flex",e.el().appendChild(p),f.pauseAndHideControl(e),we("watch-live-resume-btn",u,(function(){f.showControl(e,p),f.playLiveOrResumeHandler(e,d)})),we("watch-begining-btn",s,(function(){f.showControl(e,p),f.playFromBeginningHandler(e,n)}))}(t,n),f.handleLiveStartOverBtn({player:t,showWatchLive:!0,showStartOver:!0})):f.removeDvrStartOver(t)})),t.one("loadedmetadata",(function(){sessionStorage.setItem("program_switched",!0),function(e,n){var t=n.videoId,o=e.currentTime(),r=!1,i=e.seekable(),l=i.start(0),a=i.end(i.length-1)-l,u=JSON.parse(sessionStorage.getItem("epgConfig")),s=t,d=!0;if(u&&null!=u&&u.enable){var c;d=(null==n||null===(c=n.epg)||void 0===c?void 0:c.programId)===(null==u?void 0:u.programId),s=null==u?void 0:u.programId}e.on("seeking",(function(){r=!0})),e.on("seeked",(function(){r=!1,o=e.currentTime();var t=JSON.parse(sessionStorage.getItem("epgConfig"));if(t&&null!=t&&t.enable){if(!d||sessionStorage.getItem("program_switched"))return;s="".concat(null==t?void 0:t.programId,"-").concat(null==t?void 0:t.channelId)}f.saveWatchedTime(s,o),f.getProgramStartTime(e,n),f.handleLiveStartOverBtn({player:e,showWatchLive:e.seekable().end(0)-e.currentTime()>5,showStartOver:!0})})),e.on("timeupdate",(function(){if(!r){var n=JSON.parse(sessionStorage.getItem("epgConfig"));if(n&&null!=n&&n.enable){if(!d||sessionStorage.getItem("program_switched")&&!e.currentTime())return;if(sessionStorage.getItem("program_switched")&&e.currentTime())return void sessionStorage.removeItem("program_switched");s="".concat(null==n?void 0:n.programId,"-").concat(null==n?void 0:n.channelId)}var t=e.currentTime();Math.abs(t-o)>=20&&(f.saveWatchedTime(s,t),o=t,function(e,n){he(n).forEach((function(t){var o=t.id,r=t.title,i=t.time,l=document.getElementById(o);if(l){var a=Math.min(i/n*100,99.5);l.style.left="".concat(a,"%")}else{var u=e.controlBar.progressControl.seekBar.el(),s=me(o,r,Math.min(i/n*100,99.5));u.appendChild(s)}}))}(e,a))}}))}(t,n)}))}else console.warn("Player instance is required to initialize start over.")}function we(e,n,t){var o,r,i=document.getElementById(e);i&&(r=n,(o=i)&&(o.style.color="".concat((null==r?void 0:r.textColor)||"#000"),o.style.backgroundColor="".concat((null==r?void 0:r.backGroundColor)||"#DCF95B")),i.addEventListener("click",t))}function ke(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],t=(null==e?void 0:e.buttonConfig)||{},o=t.watchLive,r=t.resume,i=t.startFromBegining,l=n?(null==r?void 0:r.text)||"Resume":(null==o?void 0:o.text)||"Watch Live",a='<button id="watch-live-resume-btn">'.concat(p.watchLiveIcon2()," ").concat(l,"</button>"),u='<button id="watch-begining-btn">'.concat(p.startLiveIcon()," ").concat((null==i?void 0:i.text)||"Start From Beginning","</button>");return'<div class="dvr-button">'.concat(a," ").concat(u,"</div>")}function Se(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 Oe(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Se(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):Se(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var Ie=function(l,u,d,c){var v,p,f,g,m,y,h,b,w,S,O,I,P,T,j,C,E,x,R,L,A,N,V,_,M,B,H,U,q,F,W,G,J,K,z,$,Z,ee,ne,te,oe=u.res,re=void 0===oe?null:oe,ie=u.sres,le=void 0===ie?null:ie,ae=null!=d&&d.chromecastReceiverId?["chromecast","html5"]:["html5"],ue=(null===(v=re)||void 0===v?void 0:v.contentType)||"video",se=s.impolicy16x9(null===(p=re)||void 0===p||null===(f=p[ue])||void 0===f||null===(g=f.gist)||void 0===g?void 0:g.videoImageUrl)||s.impolicy16x9(null===(m=re)||void 0===m||null===(y=m[ue])||void 0===y||null===(h=y.gist)||void 0===h||null===(b=h.imageGist)||void 0===b?void 0:b.r16x9),de=(null===(w=re)||void 0===w||null===(S=w[ue])||void 0===S||null===(O=S.liveDetails)||void 0===O?void 0:O.isDvrEnabled)||!1,ce=(null===(I=re)||void 0===I||null===(P=I[ue])||void 0===P||null===(T=P.streamingInfo)||void 0===T?void 0:T.isLiveStream)||!1,ve=(null===(j=re)||void 0===j||null===(C=j.ads)||void 0===C||null===(E=C.preRoll)||void 0===E||null===(x=E.adTags)||void 0===x||null===(R=x.web)||void 0===R?void 0:R.active)&&(null===(L=re)||void 0===L||null===(A=L.ads)||void 0===A||null===(N=A.preRoll)||void 0===N||null===(V=N.adTags)||void 0===V||null===(_=V.web)||void 0===_?void 0:_.url),pe=(null===(M=re=Oe(Oe({},re),{},{audioAssetSource:null==d?void 0:d.audioAssetSource}))||void 0===M||null===(B=M[ue])||void 0===B?void 0:B.isSSAIEnabled)&&"MEDIA_TAILOR"==(null===(H=window)||void 0===H||null===(U=H.app_data)||void 0===U||null===(q=U.appcmsMain)||void 0===q||null===(F=q.adsConfig)||void 0===F?void 0:F.vodAdSticherProvider)||!1,fe=(null==d?void 0:d.latency)||6,me=(null==d?void 0:d.skin_settings)||{};null==d||d.dvrConfig;var ye=(ne={enableSmoothSeeking:!0,controls:0!=(null==d?void 0:d.controls),playsinline:!0,fluid:!0,aspectRatio:"16:9",muted:(null==d?void 0:d.muted)||!1,autoplay:(null==d?void 0:d.autoplay)||!1,controlBar:{volumePanel:{inline:!1},fullscreenToggle:!0,audioTrackButton:!0,pictureInPictureToggle:(null==me?void 0:me.pictureInPictureToggle)||!1},playbackRates:null!=me&&me.playbackRates?[.5,1,1.5,2]:[],muteToggle:"multiplayer"==d.skin,liveui:de},e(ne,"autoplay",null==d?void 0:d.autoplay),e(ne,"normalizeAutoplay",(null==d?void 0:d.autoplay)&&!ve),e(ne,"loop",(null==d?void 0:d.loop)||!1),e(ne,"audioPosterMode",null==d?void 0:d.audioPosterMode),e(ne,"html5",Oe(Oe({dash:Oe(Oe(Oe({},!i.browser.IS_SAFARI&&{useTTML:!0}),(null==d?void 0:d.debugConfig)&&(null==d||null===(W=d.debugConfig)||void 0===W?void 0:W.enable)&&{debug:!0,logLevel:null!=d&&null!==(G=d.debugConfig)&&void 0!==G&&G.logLevel?null==d||null===(J=d.debugConfig)||void 0===J?void 0:J.logLevel:"DEBUG"}),{},{updateSettings:{streaming:{delay:{liveDelay:fe},text:{defaultEnabled:!1},liveCatchup:{maxDrift:0,playbackRate:{min:-.1,max:.1}},gaps:{enableStallFix:!0,stallSeek:3},abr:{autoSwitchBitrate:{video:!0,audio:!0}}}}}),vhs:Oe(Oe({liveRangeSafeTimeDelta:fe,useDevicePixelRatio:!0,experimentalLLHLS:(null==d?void 0:d.lowLatency)||!1,limitRenditionByPlayerDimensions:!1,useNetworkInformationApi:!0},(null==d||null===(K=d.customData)||void 0===K?void 0:K.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:null===(z=null==d?void 0:d.enableLowInitialPlaylist)||void 0===z||z}),debug:(null==d?void 0:d.debugConfig)&&(null==d||null===($=d.debugConfig)||void 0===$?void 0:$.enable)||!1,nativeTextTracks:"Safari"==o.detectBrowser()},0==(null==d||null===(Z=d.customData)||void 0===Z?void 0:Z.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==d||null===(ee=d.customData)||void 0===ee?void 0:ee.nativeVideoTracks)&&{nativeVideoTracks:!1})),e(ne,"poster",se),e(ne,"techOrder",ae),e(ne,"chromecast",{requestCustomDataFn:function(e){var n,t,o=r.getPlayer(l),i=((null==o?void 0:o.textTracksJson_)||o.textTracks().tracks_).filter((function(e){return"captions"==e.kind||"subtitles"==e.kind})),a=function(e,n,t){var o,r,i,l,a,u,s,d,c,v,p=(null==e?void 0:e.contentType)||"video",f={};if(e&&null!=e&&e[p]&&null!=e&&e[p].drmEnabled){var g,m,y,h,b,w,k,S;f.isDrmEnabled=!0;var O=(null==n||null===(g=n.keySystems)||void 0===g?void 0:g["com.widevine.alpha"])||null,I=(null==O?void 0:O.url)||(null==n||null===(m=n.keySystemOptions)||void 0===m||null===(y=m[0])||void 0===y||null===(h=y.options)||void 0===h?void 0:h.serverURL);f.licenseUrl=I;var P=(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"]);f.licenseToken=P}var T=(null==e||null===(o=e[p])||void 0===o||null===(r=o.gist)||void 0===r?void 0:r.contentType)||"VIDEO";f.contentType=T;var j=null==e||null===(i=e[p])||void 0===i||null===(l=i.gist)||void 0===l?void 0:l.runtime;f.duration=j;var C=null==e||null===(a=e[p])||void 0===a||null===(u=a.gist)||void 0===u?void 0:u.title;f.mediaTitle=C;var E=null==e||null===(s=e[p])||void 0===s||null===(d=s.gist)||void 0===d?void 0:d.videoImageUrl;return f.mediaImage=E,f.subTitles=t,f.DVR=(null==e||null===(c=e[p])||void 0===c||null===(v=c.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1,console.log(f),f}(re,e,i);return Oe(Oe({},a),{},{convivaMetaData:Oe({customerKey:(null==d||null===(n=d.convivaConfig)||void 0===n?void 0:n.customerKey)||null,debug:(null==d||null===(t=d.convivaConfig)||void 0===t?void 0:t.debug)||!1},Y.getData())})},modifyLoadRequestFn:function(e){var n,t,o,i,a,u=r.getPlayer(l),s=(null==u?void 0:u.currentSource())||{};!(null===(n=re)||void 0===n||null===(t=n[ue])||void 0===t||null===(o=t.streamingInfo)||void 0===o||null===(i=o.videoAssets)||void 0===i?void 0:i.is4K)&&1||null!=s&&s.src&&null!=s&&null!==(a=s.src)&&void 0!==a&&a.includes(".m3u8")&&(e.media.hlsSegmentFormat="fmp4",e.media.hlsVideoSegmentFormat="fmp4");return e}}),ne);if(!i.getPlayers()[l]){null!=d&&d.debugConfig&&null!=d&&null!==(te=d.debugConfig)&&void 0!==te&&te.enable&&i.log.level("debug");var he=i(l,ye,function(){var e=n(t.mark((function e(){var n,r,u,s,v,p,f,g,m,y,h,b,w,S,O,I,P,T,j,C,E,x;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.log(he),console.log(i.VERSION),console.log(i.getPlugins()),e.next=5,D(d,re);case 5:if(w=null===(n=re)||void 0===n||null===(r=n[ue])||void 0===r||null===(u=r.liveDetails)||void 0===u?void 0:u.startOverTime,ce&&c.resolve(Oe({status:!0,msg:"Player Initialised"},le?{seriesResponse:le,response:re}:{response:re})),S={},de&&null!=d&&null!==(s=d.dvrConfig)&&void 0!==s&&s.enable&&be(l,Oe(Oe({},d),{},{isDvrEnabled:de})),o.inititateBeacon(l,null==d?void 0:d.analyticsCb,S),X(l,d),/Android/i.test(navigator.userAgent)&&(i.options.vhs.overrideNative=!0),de&&k(l,w),!ve||null!=d&&null!==(v=d.customData)&&void 0!==v&&v.disableAds||o.initialiseAdvertisement(l,ve,re),O=o.getSource(re,l),console.log(O),null!=d&&d.nearestClusterUrl&&(O=o.getUpdatedClusterSource(O,d.nearestClusterUrl)),!pe){e.next=21;break}return e.next=20,o.getSGAIEnabledSource(l,re);case 20:O=e.sent;case 21:O?o.loadVideo(l,O):(c.reject({status:!1,msg:"Incompatible / Missing Source",response:re}),o.handleError(l,"Incompatible / Missing Source")),((null===(p=re)||void 0===p||null===(f=p[ue])||void 0===f||null===(g=f.contentDetails)||void 0===g||null===(m=g.closedCaptions)||void 0===m?void 0:m.length)>0||(null===(y=re)||void 0===y||null===(h=y[ue])||void 0===h||null===(b=h.closedCaptions)||void 0===b?void 0:b.length)>0)&&(x=(null===(P=re)||void 0===P||null===(T=P[ue])||void 0===T||null===(j=T.contentDetails)||void 0===j?void 0:j.closedCaptions)||(null===(C=re)||void 0===C||null===(E=C[ue])||void 0===E?void 0:E.closedCaptions),I=x.filter((function(e){return"VTT"===e.format||"WEBVTT"===e.format})),a.addCaptions(l,I)),null!=d&&d.disableControls?o.disableControls(l):Q(l,Oe(Oe(Oe({},d),ye),{},{liveVideo:ce,isDvrEnabled:de,res:re,sres:le})),ge(l,Oe(Oe(Oe({},d),ye),{},{liveVideo:ce}),c,{res:re,sres:le});case 25:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}())}},Pe={spinco:"e8f2c1a7-5d94-4a1f-93ea-7c0b9186f1cd"};function Te(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 je(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Te(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):Te(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var Ce,Ee=function(e,n){var t=n.resolve,o=n.reject,r=null==e?void 0:e.playerId,i=De(e);Ie(r,{res:i},e,{resolve:t,reject:o})},De=function(e){var n,t,r,i,l,a,u,s,d=null==e?void 0:e.streamingInfo,c=null==e||null===(n=e.streamingInfo)||void 0===n?void 0:n.videoAssets,v=(null==e||null===(t=e.streamingInfo)||void 0===t?void 0:t.isDrmEnabled)||null,p=(null==e||null===(r=e.streamingInfo)||void 0===r||null===(i=r.ads)||void 0===i?void 0:i.url)||null,f=(null==e||null===(l=e.streamingInfo)||void 0===l?void 0:l.posterUrl)||null,m=(null==e||null===(a=e.streamingInfo)||void 0===a?void 0:a.subtitles)||[],y=(null==e||null===(u=e.streamingInfo)||void 0===u||null===(s=u.videoAssets)||void 0===s?void 0:s.drmProvider)||null,h=null==e?void 0:e.token,b=o.getDecodedToken(h),w=null==b?void 0:b.site;return je(je({id:null==Pe?void 0:Pe[w]},!v&&{directPlaybackUrl:null==c?void 0:c.url}),{},{video:{drmEnabled:v,streamingInfo:{videoAssets:je(je({},y&&{drmProvider:y}),{},{widevine:null==c?void 0:c.widevine,fairPlay:null==c?void 0:c.fairPlay,playReady:null==c?void 0:c.playReady})},liveDetails:{isDvrEnabled:null==d?void 0:d.isDvrEnabled},gist:je({},f&&{videoImageUrl:f}),contentDetails:je({},(null==m?void 0:m.length)>0&&{closedCaptions:g(m)})},ads:{preRoll:{adTags:{web:je(je({},p&&{active:!0}),p&&{url:p})}}}})};function xe(e,n){return Re.apply(this,arguments)}function Re(){return(Re=n(t.mark((function e(n,r){var i,l,a,u,s,d;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=r.resolve,l=r.reject,a=null==n?void 0:n.videoId,u=null==n?void 0:n.playerId,s=!(null==n||!n.anonymousId),e.next=6,o.getToken();case 6:d=e.sent,o.getVideoDetails(a,d).then((function(e){var t,r,v,p;window.contentType=null==e||null===(t=e.data)||void 0===t||null===(r=t.video)||void 0===r||null===(v=r.gist)||void 0===v?void 0:v.contentType,c.setCurrentVideo(null==e?void 0:e.data);var f,g=null==e?void 0:e.data;if(null!=n&&n.watchHistory&&null!=n&&null!==(p=n.watchHistory)&&void 0!==p&&p.enable&&!s)if((null===(f=n.watchHistory)||void 0===f?void 0:f.saveOffline)||!1){var m,y,h,b=ae((null===(m=n.watchHistory)||void 0===m?void 0:m.profileId)||"",a,null==n?void 0:n.siteOwner);if(b&&b.length)n.watchHistoryResumeTime=(null===(y=b[0])||void 0===y?void 0:y.watchedTime)||null,n.watchedPercentage=(null===(h=b[0])||void 0===h?void 0:h.watchedPercentage)||null;g.contentType="video",Ie(u,{res:g},n,{resolve:i,reject:l})}else o.getVideoInfo(a,d).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,g.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(){Ie(u,{res:g},n,{resolve:i,reject:l})}));else Ie(u,{res:g},n,{resolve:i,reject:l})})).catch((function(e){o.initiateErrorHandling(e,u,l,a)}));case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Le(e,n){return Ae.apply(this,arguments)}function Ae(){return(Ae=n(t.mark((function e(n,r){var i,l,a,u,s;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=r.resolve,l=r.reject,e.next=3,o.getToken();case 3:a=e.sent,u=null==n?void 0:n.playerId,s=null==n?void 0:n.epg,o.getLinearChannelDetails(s,a).then((function(e){var t=null==e?void 0:e.data;t.contentType="linearchannel",t.channelId=null==s?void 0:s.channelId,Ie(u,{res:t},n,{resolve:i,reject:l})})).catch((function(e){o.initiateErrorHandling(e,u,l,videoId)}));case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ne(e,n){return Ve.apply(this,arguments)}function Ve(){return(Ve=n(t.mark((function e(n,r){var i,l,a,u,s,d,v;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l=r.resolve,a=r.reject,e.next=3,o.getToken();case 3:u=e.sent,s=null==n?void 0:n.playerId,d=sessionStorage.getItem("season-idx")||0,c.seasonIdxManager.set(parseInt(d)),v=null==n||null===(i=n.series)||void 0===i?void 0:i.id,o.getSeriesDetails(v,u).then((function(e){var t,r,i,d=e.data,p=e.data.seasons;c.setCurrentSeries(p);var f=videoId||(null==p||null===(t=p[0])||void 0===t||null===(r=t.episodes)||void 0===r||null===(i=r[0])||void 0===i?void 0:i.id);o.createSeriesWatchMap(v,u),o.getVideoDetails(f,u).then((function(e){var t,o,r;window.contentType=null==e||null===(t=e.data)||void 0===t||null===(o=t.video)||void 0===o||null===(r=o.gist)||void 0===r?void 0:r.contentType,c.setCurrentVideo(e.data),Ie(s,{res:null==e?void 0:e.data,sres:d},n,{resolve:l,reject:a})})).catch((function(e){o.initiateErrorHandling(e,s,a,videoId)}))})).catch((function(e){o.initiateErrorHandling(e,s,a)}));case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function _e(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 Me(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?_e(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):_e(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}exports.VLPlayerCore=function(){return{loadVideoInstantly:o.loadVideoInstantly,onTimeUpdate:l.onTimeUpdate,getVideoDuration:l.getVideoDuration,onVideoEnded:l.onVideoEnded,init:function(e){return console.log("%c VIDEOJS-8 ","background: #bdf369; color: #000"),new Promise(function(){var r=n(t.mark((function n(r,i){var l,a,u,c,v,p,f,g,y,h,b,w,k,S,O,I,P,T,j,E,D,x,R,L,A;return t.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!o.isPlayerInitialised(null==e?void 0:e.playerId)){n.next=2;break}return n.abrupt("return");case 2:if(k=(null==e?void 0:e.videoSourceUrl)||!1,S=null==e?void 0:e.asat,O=(null==e||null===(l=e.epg)||void 0===l?void 0:l.enable)||!1,I=null==e?void 0:e.videoId,P=(null==e||null===(a=e.series)||void 0===a?void 0:a.enable)||!1,T=(null==e?void 0:e.streamingInfo)||!1,window.videoId=I,j=null==e?void 0:e.token,!o.token_authentication_enabled(e)){n.next=17;break}if(sessionStorage.setItem("vlp_token",j),o.refreshTokenManager().set(null==e?void 0:e.refreshToken),j&&!o.isTokenExpired(j)){n.next=16;break}return i({status:!1,msg:"".concat(j?"Token is expired !":"Missing Authorization Token"),response:{token:j}}),n.abrupt("return");case 16:Ce=JSON.parse(atob(j.split(".")[1]));case 17:return window.siteName=null===(u=Ce)||void 0===u?void 0:u.site,window.siteId=null===(c=Ce)||void 0===c?void 0:c.siteId,e.isAnonymousUser=!(null===(v=Ce)||void 0===v||!v.anonymousId),e.siteOwner=(null===(p=Ce)||void 0===p?void 0:p.site)||null,e.userId=(null===(f=Ce)||void 0===f?void 0:f.userId)||null,window.sessionStorage.setItem("uid",null===(g=Ce)||void 0===g?void 0:g.userId),window.watchHistory=e.watchHistory||null,E=null==e?void 0:e.playerId,e.chromecastReceiverId=null!=e&&null!==(y=e.series)&&void 0!==y&&y.enable?null:null==e?void 0:e.chromecastReceiverId,D=(null==e||null===(h=e.analytics)||void 0===h?void 0:h.gaId)||null,(x=null==e?void 0:e.errors)&&(window.customErrors=x),window.customData=null==e?void 0:e.customData,d.setLocalisation(null==e||null===(b=e.customData)||void 0===b?void 0:b.localisation),o.baseUrlManager.set(e.apiBaseUrl),null!=e&&e.skin&&!s.isNotAValidSkin(e.skin)||(e.skin="VL_ONE"),n.next=35,C(e);case 35:D&&m("https://www.googletagmanager.com/gtag/js?id=".concat(D)).then((function(){return o.runGtag(D)})).catch((function(e){})),(R=null===(w=document)||void 0===w?void 0:w.getElementById("".concat(E)))&&R.addEventListener("contextmenu",(function(e){return e.preventDefault()})),k?(A={directPlaybackUrl:k,id:L="c09576ca-8202-4e8e-ba1e-06d1ab0ce063"},S?o.getVideoDetails(L,j).then((function(n){var t=(null==n?void 0:n.data)||{};Ie(E,{res:Me(Me({},t),A)},e,{resolve:r,reject:i})})).catch((function(e){o.initiateErrorHandling(e,E,i,L)})):Ie(E,{res:A},e,{resolve:r,reject:i})):T?Ee(e,{resolve:r,reject:i}):P?Ne(e,{resolve:r,reject:i}):O?Le(e,{resolve:r,reject:i}):xe(e,{resolve:r,reject:i});case 39:case"end":return n.stop()}}),n)})));return function(e,n){return r.apply(this,arguments)}}())},getRenditions:u.getRenditions,skip:o.skip,getPlayer:r.getPlayer,play:o.play,pause:o.pause,detectBrowser:o.detectBrowser,rewind:o.rewind,loadVideo:o.loadVideo,seekToTimeStamp:l.seekToTimeStamp,isPlayerInitialised:o.isPlayerInitialised,load:o.load,authenticateLC:o.authenticateLC,dispose:o.dispose,enableCaptions:a.enableCaptions,disableCaptions:a.disableCaptions,getCaptions:a.getCaptions,playSelectedResolution:u.playSelectedResolution,getSource:o.getSource,setVolume:h,getVolume:b,disableControls:o.disableControls,setPlaybackSpeed:l.setPlaybackSpeed,getEntitlementData:o.getEntitlementData,adsQueuePointManager:o.adsQueuePointManager,getSsaiEvents:o.getSsaiEvents,playerEvents:l.playerEvents,onReplay:l.onReplay}},exports.initiateMarker=function(e){var n=r.getPlayer(e),t=n.seekable(),o=n.controlBar.progressControl.seekBar.el();if(t&&t.length>0){var i=t.start(0),l=t.end(t.length-1)-i;ye(),he(l).forEach((function(e){var n=e.id,t=e.title,r=e.time,i=me(n,t,Math.min(r/l*100,99.5));o.appendChild(i)}))}},exports.removeMarkers=ye;
|
|
1
|
+
"use strict";require("video.js/dist/video-js.min.css");var e=require("@babel/runtime/helpers/defineProperty"),n=require("@babel/runtime/helpers/asyncToGenerator"),t=require("@babel/runtime/regenerator");require("axios");var o=require("./generic-15a63f46.js"),r=require("./player_instance-fcf6a8fb.js"),i=require("video.js"),l=require("./util-30c1868a.js"),a=require("./captions-dbc83a75.js"),u=require("./resolution-f9dcc1b4.js"),s=require("./skin-516012d7.js"),d=require("./localisation-56e0a999.js"),c=require("./currentVideoInfo-31d70bec.js"),v=require("@babel/runtime/helpers/typeof"),p=require("./icons-2609dbe4.js"),f=require("./helper-a50a8ffc.js"),g=require("@babel/runtime/helpers/toConsumableArray"),m=function(e){return new Promise((function(n,t){if(y(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)}}))},y=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},h=function(e,n,t){var o=r.getPlayer(e);if(o)if(n>=0&&n<=100){o.muted()&&o.muted(!1);var i=parseFloat(n)/100;o.volume(i),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,"'")})},b=function(e){var n=r.getPlayer(e);return n?parseInt(100*n.volume())+"%":"Cannot find player with id: '".concat(e,"'")},w=function(){var e=n(t.mark((function e(n){var l,a,u,s,d;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=r.getPlayer(null==n?void 0:n.playerId),null!=n&&null!==(l=n.series)&&void 0!==l&&l.enable||null==n||!n.chromecastReceiverId){e.next=22;break}return e.next=4,import("@silvermine/videojs-chromecast");case 4:return s=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,s.default(i),e.finish(13);case 16:(d=i.getTech("chromecast"))&&!d.prototype.seeking&&(d.prototype.seeking=function(){}),null!==(u=window)&&void 0!==u&&u.cast?null==a||a.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}):window.__onGCastApiAvailable=function(){null==a||a.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.chromecastReceiverId&&null!=n&&n.airplay&&"Safari"==o.detectBrowser()?null==a||a.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)}}(),k=function(e,n){var t=r.getPlayer(e);t&&n&&t.controlBar&&t.controlBar.progressControl.seekBar.on("click",(function(n){var t,o,r,l,a,u=this.el(),s=i.dom.getPointerPosition(u,n).x;i.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var d=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===(l=r.CastContext)||void 0===l||null===(a=l.getInstance())||void 0===a?void 0:a.S;if(console.log(d),d&&"CONNECTED"===c){window.cast.framework.RemotePlayer.canSeek=!0;var v=new window.cast.framework.RemotePlayerController(window.cast.framework.RemotePlayer),p=v.h.media[0].liveSeekableRange.end;v.getSeekPosition(),window.cast.framework.RemotePlayer.currentTime=p*s,v.seek()}}))};var S=function(){var e=n(t.mark((function e(){return t.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)}}(),O=function(){var e=n(t.mark((function e(){return t.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){i.getPlugin("eme")||i.registerPlugin("eme",e.default)}));case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),I=function(){var e=n(t.mark((function e(){var n;return t.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(i),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)}}(),P=function(){var e=n(t.mark((function e(){return t.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-3f0e537b.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)}}(),T=function(){var e=n(t.mark((function e(){return t.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-3854764f.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)}}(),j=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(i)})).catch((function(e){console.log(e)}))}))},importAirplay:function(){import("@silvermine/videojs-airplay").then((function(e){e.default(i)}))},loadAdsLibrary:S,loadEMELibrary:O,loadMuxPlugin:I,loadDvrSeekbar:P,loadContribDash:T});function C(e){return E.apply(this,arguments)}function E(){return(E=n(t.mark((function e(n){var r;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=(null==n?void 0:n.airplay)||!1,e.next=3,S();case 3:r&&"Safari"==o.detectBrowser()&&Promise.resolve().then((function(){return j})).then((function(e){e.importAirplay()}));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function D(e,n){return x.apply(this,arguments)}function x(){return(x=n(t.mark((function e(n,r){var i,l,a,u,s,d,c,v,p,f;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c=(null==r?void 0:r.contentType)||"video",v=null==r||null===(i=r[c])||void 0===i?void 0:i.drmEnabled,null==r||null===(l=r[c])||void 0===l||null===(a=l.liveDetails)||void 0===a||a.isDvrEnabled,null==n||n.showPositiveSeekbar,p=(null==r||null===(u=r[c])||void 0===u||null===(s=u.streamingInfo)||void 0===s||null===(d=s.videoAssets)||void 0===d?void 0:d.dash)||null,e.prev=5,e.next=8,Promise.allSettled([v?"Safari"==o.detectBrowser()?O():"caliente"!=(null===(f=window)||void 0===f?void 0:f.siteName)?T():O():"Safari"!=o.detectBrowser()&&p?T():null,w(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 R(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 L(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?R(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):R(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var A=new Set,N=null,V=function(e,n,t){var r,i,l,a,u,s,d,v={},p=(null==e?void 0:e.contentType)||"video";v["c3.cm.id"]=(null===(r=e[p])||void 0===r?void 0:r.id)||"Null",v["c3.cm.contentType"]=F(e),v[null==t||null===(i=t.Constants)||void 0===i?void 0:i.IS_LIVE]=!(null==e||!e.linearchannel),v[null==t||null===(l=t.Constants)||void 0===l?void 0:l.STREAM_URL]=n.currentSrc(),v[null==t||null===(a=t.Constants)||void 0===a?void 0:a.VIEWER_ID]="undefined"===o.getUserId()?"NULL":o.getUserId(),v["c3.cm.categoryType"]=H(e),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=e[p])||void 0===u?void 0:u.drmEnabled)||"None",v.DAIStream=null!==(s=e[p])&&void 0!==s&&null!==(d=s.gist)&&void 0!==d&&d.isSSAIEnabled?"YES":"NO",v[t.Constants.DEFAULT_RESOURCE]="AKAMAI",v["c3.cm.brand"]="NULL",v.CDVREnabled=U(e),v["c3.cm.genreList"]=M(e),v["c3.cm.genre"]=_(e),v["c3.cm.channel"]=B(e);var f=J(c.getCurrentSeries(),e);return v=L(L({},v),f)},_=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"},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"},B=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"},H=function(e){return(null==e?void 0:e.contentType)||"null"},U=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"},q=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)},F=function(e){return"linearchannel"===((null==e?void 0:e.contentType)||"video")?"Live":"VOD"};var W,G,J=function(e,n){var t,r,i,l,a,u={"c3.cm.seriesName":"Null","c3.cm.seasonNumber":"Null","c3.cm.showTitle":"Null","c3.cm.episodeNumber":"Null"};if(!e||!n||null!=n&&n.linearchannel)return u;var s=o.getSeasonNumber(),d=o.getEpisodeNumber();return u["c3.cm.seriesName"]=(null==n||null===(t=n.video)||void 0===t||null===(r=t.series)||void 0===r?void 0:r.title)||"Null",u["c3.cm.seasonNumber"]=(null==s?void 0:s.toString())||"Null",u["c3.cm.showTitle"]=(null==e||null===(i=e[s-1])||void 0===i||null===(l=i.episodes)||void 0===l||null===(a=l[d-1])||void 0===a?void 0:a.title)||"Null",u["c3.cm.episodeNumber"]=(null==d?void 0:d.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"}},z=function(e){switch(e){case"application/x-mpegURL":case"application/vnd.apple.mpegurl":return"HLS";case"application/dash+xml":return"DASH";default:return"Unknown"}},X=function(){var e=n(t.mark((function e(n,o){var i,l,a,u,s,d,v,p,f,g;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==o?void 0:o.convivaConfig)||{},l=i.trackConvivaPlayerEvent,a=i.paymentHandler,u=i.tveProvider,s=i.enable,d=i.appName,v=(o||{}).token,s){e.next=4;break}return e.abrupt("return");case 4:if(p=r.getPlayer(n),"function"==typeof(f=l)){e.next=8;break}return e.abrupt("return");case 8:return e.next=10,f("getConvivaObject");case 10:if(g=e.sent){e.next=13;break}return e.abrupt("return");case 13:p.ready((function(){var e=p.tech(!0),n=!1;e.on("keysessioncreated",(function(e){n=!0;var t=e.target;if(t&&t.keySystem){var o=K(t.keySystem);f("contentInfo",{DRMEnabled:o})}else f("contentInfo",{DRMEnabled:"None"})})),n||f("contentInfo",{DRMEnabled:"None"})})),p.on("loadstart",(function(){var e,n;N&&N!==p.currentSrc()&&f("playbackEnded"),f("setPlayer",p),A.clear(),N=p.currentSrc();var t=z(p.currentType()),r=c.getCurrentVideo(),i=V(r,p,g);i[null==g||null===(e=g.Constants)||void 0===e?void 0:e.PLAYER_NAME]=d||"WEB",i[null==g||null===(n=g.Constants)||void 0===n?void 0:n.ASSET_NAME]=q(r,o),i.authToken=v||"NULL",i.streamType=t,i.D2CType=a||"NONE",i.subscriberType=u||(a?"D2C":"FREE"),i["c3.cm.affiliate"]=u||"NULL",Y.setData(i),f("contentInfo",i)})),p.on("loadedmetadata",(function(){var e,n=p.videoHeight();e=n>=2160?"4K":n>=1440?"1440p":n>=1080?"1080p":n>=720?"720p":n>=480?"480p":"".concat(n,"p"),f("contentInfo",{screenResolution:e})})),p.on("play",(function(){A.has(p.currentSrc())||(A.add(p.currentSrc()),f("playbackStarted",null))})),p.on("ended",(function(){A.has(p.currentSrc())&&A.delete(p.currentSrc()),f("playbackEnded")})),p.on("ads-loader",(function(e){e&&null!=e&&e.adsLoader&&f("initAdSensor",{player:p,adsLoader:null==e?void 0:e.adsLoader})})),p.on("dispose",(function(){null==A||A.clear(),f("playbackEnded")}));case 20:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),Y=(W={},{setData:function(e){W=L(L({},W),e)},getData:function(){return W}}),Q=function(e,n){var t=null==n?void 0:n.skin;"default"==t?Promise.resolve().then((function(){return require("./skin-f6aec43f.js")})).then((function(t){t.initialiseSkin(e,n)})):"carousel"==t?Promise.resolve().then((function(){return require("./skin-f5be2a94.js")})).then((function(n){n.initaliseSkin(e)})):"defaultV2"==t?Promise.resolve().then((function(){return require("./skin-9312e234.js")})).then((function(t){t.initialiseSkin(e,n)})):"multiplayer"==t?Promise.resolve().then((function(){return require("./skin-b24b04e2.js")})).then((function(t){t.initialiseSkin(e,n)})):"minimalist"==t?Promise.resolve().then((function(){return require("./skin-b3890417.js")})).then((function(t){t.initaliseSkin(e,n)})):"VL_ONE"==t?Promise.resolve().then((function(){return require("./skin-0139c5bd.js")})).then((function(t){t.initialiseSkin(e,n)})):"news"==t&&Promise.resolve().then((function(){return require("./skin-9d2e6528.js")})).then((function(t){t.initialiseSkin(e,n)}))};function $(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 Z(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?$(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):$(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var ee=[],ne=0,te=null;function oe(){console.log("Cleaning up watch history data"),G=null,ee=[],ne=0,te=null}function re(e,n,t){var r,i,l,a,u,s=arguments.length>3&&void 0!==arguments[3]&&arguments[3];null==n||null===(r=n.watchHistory)||void 0===r||r.apiVersion;var d=null==n||null===(i=n.watchHistory)||void 0===i?void 0:i.profileId,c=Math.floor(e.currentTime()),v=Math.floor(e.duration());null==n||null===(l=n.watchHistory)||void 0===l||l.xapiKey;var p=(null==n||null===(a=n.video)||void 0===a?void 0:a.originalObjectId)||null,f=(null==n||null===(u=n.watchHistory)||void 0===u?void 0:u.saveOffline)||!1,g=Math.floor(e.currentTime()),m=s?100:Math.floor(c/v*100),y={};f?le(y={completed:s,watchedTime:g,watchedPercentage:m},d,n.siteOwner):(y=Z(Z({videoId:G,watchedTime:g,watchedPercentage:m,doneWatching:s,profileId:d},te&&{seriesId:te}),p&&{originalObjectId:p}),o.saveWatchHistory(y).then((function(e){})).catch((function(e){}))),ne=c+t}function ie(e){var n=[];return e&&(n=JSON.parse(localStorage.getItem("".concat(e))||"[]")),n}function le(n,t,o){var r=t?"watchhistory-data-".concat(t):"watchhistory-data-guest-".concat(o),i=ie(r),l=(new Date).getTime(),a=c.getCurrentVideo(),u=(null==a?void 0:a.video)||{},s=["id","title","gist","categories","tags","status","publishDate","plans","isVerticalVideo","monetizationBadgeIdentifier","runtime"].reduce((function(n,t){return Z(Z({},n),{},e({},t,u[t]))}),{}),d=i.findIndex((function(e){var n;return(null==e||null===(n=e.content)||void 0===n?void 0:n.id)===G}));d<0?i.push(Z(Z({content:s},n),{},{addedDate:l,updateDate:l})):i[d]=Z(Z(Z({},i[d]),n),{},{updateDate:l}),localStorage.setItem("".concat(r),JSON.stringify(i))}function ae(e,n,t){var o=ie(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 ue=!1,se=function(e,n){var t,r,i=(null==e?void 0:e.contentType)||"video";if(((null==e||null===(t=e[i])||void 0===t||null===(r=t.streamingInfo)||void 0===r?void 0:r.secondaryVideoAssets)||null)&&!ue){var l=de(e,"videoAssets","secondaryVideoAssets"),a=o.getSource(l,n);return a&&o.loadVideo(n,a),ue=!0,console.log("switching to secondary source"),!0}return console.log("secondary source is either corrupted / not available"),!1};function de(e,n,t){if(Array.isArray(e))return e.map((function(e){return de(e,n,t)}));if(null!==e&&"object"===v(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]=de(e[r],n,t)})),o}return e}function ce(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 ve(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)?ve(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 ve(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 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 fe(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?pe(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):pe(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var ge=function(e,n,t,i){var l,u,s,d,p,f=i.res,g=i.sres,m=r.getPlayer(e),y=(null==f?void 0:f.contentType)||"video",b=(null==f||null===(l=f[y])||void 0===l?void 0:l.drmEnabled)||!1,w=(null==f||null===(u=f[y])||void 0===u||null===(s=u.streamingInfo)||void 0===s?void 0:s.isLiveStream)||!1,k=(null==f||null===(d=f[y])||void 0===d||null===(p=d.liveDetails)||void 0===p?void 0:p.isDvrEnabled)||!1;c.setCurrentVideo(f),c.videoReplayTracker.set(f),m&&(m.on("loadstart",(function(){w?t.resolve({status:!0,msg:"Video Loaded",response:f}):t.resolve(fe({status:!0,msg:"Player Initialised"},g?{seriesResponse:g,response:f}:{response:f}))})),m.on("loadeddata",(function(){var t,i,l,u=a.getCaptions(e);if(null==u||u.map((function(n){return a.disableCaptions(e,n.id)})),k&&"Safari"===o.detectBrowser())try{var s;null==m||null===(s=m.liveTracker)||void 0===s||s.seekToLiveEdge()}catch(e){console.log("Cannot seek to Live Edge",e)}(null==m||!m.muted())&&h(e,sessionStorage.getItem("volume")||"100");var d=c.getCurrentVideo();if(o.clearError(),null!=n&&n.watchHistory&&null!=n&&null!==(t=n.watchHistory)&&void 0!==t&&t.enable&&(!n.isAnonymousUser||null!=n&&null!==(i=n.watchHistory)&&void 0!==i&&i.saveOffline)){var v,p,g=fe(fe({},n),f);!function(e,n,t){var o,i,l;null!=n&&n.series&&null!=n&&null!==(o=n.series)&&void 0!==o&&o.enable&&(te=null==n||null===(i=n.series)||void 0===i?void 0:i.id),ee=[],ne=0,G=t;var a=(null==n||null===(l=n.watchHistory)||void 0===l?void 0:l.interval)||30,u=r.getPlayer(e);u&&(u.on("dispose",oe),u.on("timeupdate",(function(){if(!u.seeking()){var e=Math.floor(u.currentTime());ee.includes(ne)||(e!=ne||e<a?e>ne&&(ne=e+a):(ee.push(e),re(u,n,a)))}})),u.one("ended",(function(){re(u,n,a,!0)})))}(e,g,null==d||null===(v=d.video)||void 0===v||null===(p=v.gist)||void 0===p?void 0:p.id)}if(null!=n&&null!==(l=n.analytics)&&void 0!==l&&l.muxKey&&null!=m&&m.mux){var y,b,w,S,O,I,P=(null===(y=c.getCurrentVideo())||void 0===y?void 0:y.video)||(null==f?void 0:f.video),T=null==P?void 0:P.gist,j={env_key:null==n||null===(b=n.analytics)||void 0===b?void 0:b.muxKey,player_name:"vl-web-player",player_version:null===(w=window)||void 0===w?void 0:w.vl_player_version,video_id:null==T?void 0:T.id,video_title:null==T?void 0:T.title,video_series:null==P||null===(S=P.series)||void 0===S?void 0:S.title,video_stream_type:null!=P&&null!==(O=P.streamingInfo)&&void 0!==O&&O.isLiveStream?"live":"video",viewer_user_id:null==n||null===(I=n.analytics)||void 0===I?void 0:I.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,u,s,d,c,v=window.cast&&window.cast.framework&&window.cast.framework.CastSession,p=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,f=null===(a=window)||void 0===a||null===(u=a.cast)||void 0===u||null===(s=u.framework)||void 0===s||null===(d=s.CastContext)||void 0===d||null===(c=d.getInstance())||void 0===c?void 0:c.getCurrentSession();if(v&&"CONNECTED"===p){var g,m=f.getMediaSession(),y=m.media.tracks.filter((function(e){return"TEXT"==e.type}));g=n?new chrome.cast.media.EditTracksInfoRequest([y[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),m.editTracksInfo(g)}})),m.tech_.on("retryplaylist",(function(){w&&se(f,e)})),m.on("error",(function(){var n,r;(console.log("ERROR",m.error(),m.error().code),4===m.error().code&&w)?se(f,e):(o.handleError(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===(r=m.error())||void 0===r?void 0:r.message)||"Some error occured",response:f}))})),m.one("play",(function(){var e,t,o,r,i;if(null===(e=window)||void 0===e||null===(t=e.app_data)||void 0===t||null===(o=t.appcmsMain)||void 0===o||null===(r=o.adsConfig)||void 0===r||!r.vodAdClientSideTracking){if(null!=n&&null!==(i=n.series)&&void 0!==i&&i.enable){var l,a,u,s=null===(l=c.getCurrentVideo())||void 0===l||null===(a=l.video)||void 0===a||null===(u=a.gist)||void 0===u?void 0:u.id,d=c.getSeriesWatchMap(),v=(null==d?void 0:d.get(s))||{t:0,p:0},p=v.t,f=v.p;p&&f<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(w){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(n.sort((function(e,n){var t=(e.language||e.language||"").toUpperCase(),o=(n.language||n.label||"").toUpperCase();return t<o?-1:t>o?1:0})),"object"==v(m.dash)){var t,r,i,l=null==m||null===(t=m.dash)||void 0===t||null===(r=t.mediaPlayer)||void 0===r?void 0:r.getTracksFor("audio"),a=null==l?void 0:l.find((function(e){var n;return null==e||null===(n=e.roles)||void 0===n?void 0:n.includes("main")})),u=ce(n);try{for(u.s();!(i=u.n()).done;){var s=i.value;if(a&&(null==s?void 0:s.id)=="dash-audio-".concat(a.index)){s.enabled=!0;break}}}catch(e){u.e(e)}finally{u.f()}}else{var d,c=ce(n);try{for(c.s();!(d=c.n()).done;){var p,f,g,y=d.value;if(("Chrome"==o.detectBrowser()||"Edge"==o.detectBrowser()&&(null!==(p=navigator)&&void 0!==p&&null!==(f=p.userAgent)&&void 0!==f&&f.includes("Macintosh")||!b))&&null!=y&&null!==(g=y.label)&&void 0!==g&&g.includes("5.1"))m.audioTracks().removeTrack(y);else{if("main"==y.kind){y.enabled=!0;break}y.enabled=!1}}}catch(e){c.e(e)}finally{c.f()}}})))};function me(e,n,t){var o=document.createElement("div");return o.className="vjs-seekbar-program-marker",o.id=e,o.style.title=n,o.style.left="".concat(t,"%"),o.style.position="absolute",o.style.top="0",o.style.bottom="0",o.style.width="4px",o.style.backgroundColor="#000000",o.style.left="".concat(t,"%"),o.style.pointerEvents="none",o}function ye(){document.querySelectorAll(".vjs-seekbar-program-marker").forEach((function(e){e.remove()}))}function he(e){var n=(new Date).getTime(),t=new Date(n-1e3*e).getTime();return(c.getCurrentEpgPrograms()||[]).filter((function(e){var o=new Date(e.formatted_startdate).getTime();return o>=t&&o<=n})).map((function(e){var n=new Date(e.formatted_startdate).getTime()-t;return{title:e.title,time:n/1e3,id:e.programme_id}}))}function be(e,n){var t=r.getPlayer(e);if(t){var o=n.dvrConfig,i=void 0===o?{}:o,l=n.videoId;n.epg;var a=i.playLive,u=i.playFromBegining,s=i.programs;c.setCurrentEpgPrograms(s),t.on("loadeddata",(function(){f.checkDvrStartOverEnabled(n)?u?f.playFromBeginningHandler(t,n):a?f.playLiveOrResumeHandler(t,l):(!function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.dvrConfig,o=void 0===t?{}:t,r=n.videoId,i=n.epg,l=o.buttonConfig,a=void 0===l?{}:l,u=a.watchLive;a.resume;var s=a.startFromBegining,d=r;if(i&&null!=i&&i.enable){var c=JSON.parse(sessionStorage.getItem("epgConfig"));d="".concat(null==c?void 0:c.programId,"-").concat(null==c?void 0:c.channelId)}var v=!!f.getWatchedTime(d),p=document.querySelector(".vjs-dvr-btn-overlay");p||((p=document.createElement("div")).className="vjs-dvr-btn-overlay");var g=f.getCurrentProgramThumbnail(n);g&&(p.style.backgroundImage="url(".concat(g,")"),p.style.backgroundPosition="center center",p.style.backgroundRepeat="no-repeat",p.style.backgroundSize="cover");p.innerHTML=ke(o,v),p.style.display="flex",e.el().appendChild(p),f.pauseAndHideControl(e),we("watch-live-resume-btn",u,(function(){f.showControl(e,p),f.playLiveOrResumeHandler(e,d)})),we("watch-begining-btn",s,(function(){f.showControl(e,p),f.playFromBeginningHandler(e,n)}))}(t,n),f.handleLiveStartOverBtn({player:t,showWatchLive:!0,showStartOver:!0})):f.removeDvrStartOver(t)})),t.one("loadedmetadata",(function(){sessionStorage.setItem("program_switched",!0),function(e,n){var t=n.videoId,o=e.currentTime(),r=!1,i=e.seekable(),l=i.start(0),a=i.end(i.length-1)-l,u=JSON.parse(sessionStorage.getItem("epgConfig")),s=t,d=!0;if(u&&null!=u&&u.enable){var c;d=(null==n||null===(c=n.epg)||void 0===c?void 0:c.programId)===(null==u?void 0:u.programId),s=null==u?void 0:u.programId}e.on("seeking",(function(){r=!0})),e.on("seeked",(function(){r=!1,o=e.currentTime();var t=JSON.parse(sessionStorage.getItem("epgConfig"));if(t&&null!=t&&t.enable){if(!d||sessionStorage.getItem("program_switched"))return;s="".concat(null==t?void 0:t.programId,"-").concat(null==t?void 0:t.channelId)}f.saveWatchedTime(s,o),f.getProgramStartTime(e,n),f.handleLiveStartOverBtn({player:e,showWatchLive:e.seekable().end(0)-e.currentTime()>5,showStartOver:!0})})),e.on("timeupdate",(function(){if(!r){var n=JSON.parse(sessionStorage.getItem("epgConfig"));if(n&&null!=n&&n.enable){if(!d||sessionStorage.getItem("program_switched")&&!e.currentTime())return;if(sessionStorage.getItem("program_switched")&&e.currentTime())return void sessionStorage.removeItem("program_switched");s="".concat(null==n?void 0:n.programId,"-").concat(null==n?void 0:n.channelId)}var t=e.currentTime();Math.abs(t-o)>=20&&(f.saveWatchedTime(s,t),o=t,function(e,n){he(n).forEach((function(t){var o=t.id,r=t.title,i=t.time,l=document.getElementById(o);if(l){var a=Math.min(i/n*100,99.5);l.style.left="".concat(a,"%")}else{var u=e.controlBar.progressControl.seekBar.el(),s=me(o,r,Math.min(i/n*100,99.5));u.appendChild(s)}}))}(e,a))}}))}(t,n)}))}else console.warn("Player instance is required to initialize start over.")}function we(e,n,t){var o,r,i=document.getElementById(e);i&&(r=n,(o=i)&&(o.style.color="".concat((null==r?void 0:r.textColor)||"#000"),o.style.backgroundColor="".concat((null==r?void 0:r.backGroundColor)||"#DCF95B")),i.addEventListener("click",t))}function ke(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],t=(null==e?void 0:e.buttonConfig)||{},o=t.watchLive,r=t.resume,i=t.startFromBegining,l=n?(null==r?void 0:r.text)||"Resume":(null==o?void 0:o.text)||"Watch Live",a='<button id="watch-live-resume-btn">'.concat(p.watchLiveIcon2()," ").concat(l,"</button>"),u='<button id="watch-begining-btn">'.concat(p.startLiveIcon()," ").concat((null==i?void 0:i.text)||"Start From Beginning","</button>");return'<div class="dvr-button">'.concat(a," ").concat(u,"</div>")}function Se(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 Oe(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Se(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):Se(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var Ie=function(l,u,d,c){var v,p,f,g,m,y,h,b,w,S,O,I,P,T,j,C,E,x,R,L,A,N,V,_,M,B,H,U,q,F,W,G,J,K,z,$,Z,ee,ne,te,oe=u.res,re=void 0===oe?null:oe,ie=u.sres,le=void 0===ie?null:ie,ae=null!=d&&d.chromecastReceiverId?["chromecast","html5"]:["html5"],ue=(null===(v=re)||void 0===v?void 0:v.contentType)||"video",se=s.impolicy16x9(null===(p=re)||void 0===p||null===(f=p[ue])||void 0===f||null===(g=f.gist)||void 0===g?void 0:g.videoImageUrl)||s.impolicy16x9(null===(m=re)||void 0===m||null===(y=m[ue])||void 0===y||null===(h=y.gist)||void 0===h||null===(b=h.imageGist)||void 0===b?void 0:b.r16x9),de=(null===(w=re)||void 0===w||null===(S=w[ue])||void 0===S||null===(O=S.liveDetails)||void 0===O?void 0:O.isDvrEnabled)||!1,ce=(null===(I=re)||void 0===I||null===(P=I[ue])||void 0===P||null===(T=P.streamingInfo)||void 0===T?void 0:T.isLiveStream)||!1,ve=(null===(j=re)||void 0===j||null===(C=j.ads)||void 0===C||null===(E=C.preRoll)||void 0===E||null===(x=E.adTags)||void 0===x||null===(R=x.web)||void 0===R?void 0:R.active)&&(null===(L=re)||void 0===L||null===(A=L.ads)||void 0===A||null===(N=A.preRoll)||void 0===N||null===(V=N.adTags)||void 0===V||null===(_=V.web)||void 0===_?void 0:_.url),pe=(null===(M=re=Oe(Oe({},re),{},{audioAssetSource:null==d?void 0:d.audioAssetSource}))||void 0===M||null===(B=M[ue])||void 0===B?void 0:B.isSSAIEnabled)&&"MEDIA_TAILOR"==(null===(H=window)||void 0===H||null===(U=H.app_data)||void 0===U||null===(q=U.appcmsMain)||void 0===q||null===(F=q.adsConfig)||void 0===F?void 0:F.vodAdSticherProvider)||!1,fe=(null==d?void 0:d.latency)||6,me=(null==d?void 0:d.skin_settings)||{};null==d||d.dvrConfig;var ye=(ne={enableSmoothSeeking:!0,controls:0!=(null==d?void 0:d.controls),playsinline:!0,fluid:!0,aspectRatio:"16:9",muted:(null==d?void 0:d.muted)||!1,autoplay:(null==d?void 0:d.autoplay)||!1,controlBar:{volumePanel:{inline:!1},fullscreenToggle:!0,audioTrackButton:!0,pictureInPictureToggle:(null==me?void 0:me.pictureInPictureToggle)||!1},playbackRates:null!=me&&me.playbackRates?[.5,1,1.5,2]:[],muteToggle:"multiplayer"==d.skin,liveui:de},e(ne,"autoplay",null==d?void 0:d.autoplay),e(ne,"normalizeAutoplay",(null==d?void 0:d.autoplay)&&!ve),e(ne,"loop",(null==d?void 0:d.loop)||!1),e(ne,"audioPosterMode",null==d?void 0:d.audioPosterMode),e(ne,"html5",Oe(Oe({dash:Oe(Oe(Oe({},!i.browser.IS_SAFARI&&{useTTML:!0}),(null==d?void 0:d.debugConfig)&&(null==d||null===(W=d.debugConfig)||void 0===W?void 0:W.enable)&&{debug:!0,logLevel:null!=d&&null!==(G=d.debugConfig)&&void 0!==G&&G.logLevel?null==d||null===(J=d.debugConfig)||void 0===J?void 0:J.logLevel:"DEBUG"}),{},{updateSettings:{streaming:{delay:{liveDelay:fe},text:{defaultEnabled:!1},liveCatchup:{maxDrift:0,playbackRate:{min:-.1,max:.1}},gaps:{enableStallFix:!0,stallSeek:3},abr:{autoSwitchBitrate:{video:!0,audio:!0}}}}}),vhs:Oe(Oe({liveRangeSafeTimeDelta:fe,useDevicePixelRatio:!0,experimentalLLHLS:(null==d?void 0:d.lowLatency)||!1,limitRenditionByPlayerDimensions:!1,useNetworkInformationApi:!0},(null==d||null===(K=d.customData)||void 0===K?void 0:K.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:null===(z=null==d?void 0:d.enableLowInitialPlaylist)||void 0===z||z}),debug:(null==d?void 0:d.debugConfig)&&(null==d||null===($=d.debugConfig)||void 0===$?void 0:$.enable)||!1,nativeTextTracks:"Safari"==o.detectBrowser()},0==(null==d||null===(Z=d.customData)||void 0===Z?void 0:Z.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==d||null===(ee=d.customData)||void 0===ee?void 0:ee.nativeVideoTracks)&&{nativeVideoTracks:!1})),e(ne,"poster",se),e(ne,"techOrder",ae),e(ne,"chromecast",{requestCustomDataFn:function(e){var n,t,o=r.getPlayer(l),i=((null==o?void 0:o.textTracksJson_)||o.textTracks().tracks_).filter((function(e){return"captions"==e.kind||"subtitles"==e.kind})),a=function(e,n,t){var o,r,i,l,a,u,s,d,c,v,p=(null==e?void 0:e.contentType)||"video",f={};if(e&&null!=e&&e[p]&&null!=e&&e[p].drmEnabled){var g,m,y,h,b,w,k,S;f.isDrmEnabled=!0;var O=(null==n||null===(g=n.keySystems)||void 0===g?void 0:g["com.widevine.alpha"])||null,I=(null==O?void 0:O.url)||(null==n||null===(m=n.keySystemOptions)||void 0===m||null===(y=m[0])||void 0===y||null===(h=y.options)||void 0===h?void 0:h.serverURL);f.licenseUrl=I;var P=(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"]);f.licenseToken=P}var T=(null==e||null===(o=e[p])||void 0===o||null===(r=o.gist)||void 0===r?void 0:r.contentType)||"VIDEO";f.contentType=T;var j=null==e||null===(i=e[p])||void 0===i||null===(l=i.gist)||void 0===l?void 0:l.runtime;f.duration=j;var C=null==e||null===(a=e[p])||void 0===a||null===(u=a.gist)||void 0===u?void 0:u.title;f.mediaTitle=C;var E=null==e||null===(s=e[p])||void 0===s||null===(d=s.gist)||void 0===d?void 0:d.videoImageUrl;return f.mediaImage=E,f.subTitles=t,f.DVR=(null==e||null===(c=e[p])||void 0===c||null===(v=c.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1,console.log(f),f}(re,e,i);return Oe(Oe({},a),{},{convivaMetaData:Oe({customerKey:(null==d||null===(n=d.convivaConfig)||void 0===n?void 0:n.customerKey)||null,debug:(null==d||null===(t=d.convivaConfig)||void 0===t?void 0:t.debug)||!1},Y.getData())})},modifyLoadRequestFn:function(e){var n,t,o,i,a,u=r.getPlayer(l),s=(null==u?void 0:u.currentSource())||{};!(null===(n=re)||void 0===n||null===(t=n[ue])||void 0===t||null===(o=t.streamingInfo)||void 0===o||null===(i=o.videoAssets)||void 0===i?void 0:i.is4K)&&1||null!=s&&s.src&&null!=s&&null!==(a=s.src)&&void 0!==a&&a.includes(".m3u8")&&(e.media.hlsSegmentFormat="fmp4",e.media.hlsVideoSegmentFormat="fmp4");return e}}),ne);if(!i.getPlayers()[l]){null!=d&&d.debugConfig&&null!=d&&null!==(te=d.debugConfig)&&void 0!==te&&te.enable&&i.log.level("debug");var he=i(l,ye,function(){var e=n(t.mark((function e(){var n,r,u,s,v,p,f,g,m,y,h,b,w,S,O,I,P,T,j,C,E;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.log(he),console.log(i.VERSION),console.log(i.getPlugins()),e.next=5,D(d,re);case 5:if(w=null===(n=re)||void 0===n||null===(r=n[ue])||void 0===r||null===(u=r.liveDetails)||void 0===u?void 0:u.startOverTime,ce&&c.resolve(Oe({status:!0,msg:"Player Initialised"},le?{seriesResponse:le,response:re}:{response:re})),de&&null!=d&&null!==(s=d.dvrConfig)&&void 0!==s&&s.enable&&be(l,Oe(Oe({},d),{},{isDvrEnabled:de})),o.inititateBeacon(l,null==d?void 0:d.analyticsCb,null==d?void 0:d.customData),X(l,d),/Android/i.test(navigator.userAgent)&&(i.options.vhs.overrideNative=!0),de&&k(l,w),!ve||null!=d&&null!==(v=d.customData)&&void 0!==v&&v.disableAds||o.initialiseAdvertisement(l,ve,re),S=o.getSource(re,l),console.log(S),null!=d&&d.nearestClusterUrl&&(S=o.getUpdatedClusterSource(S,d.nearestClusterUrl)),!pe){e.next=21;break}return e.next=20,o.getSGAIEnabledSource(l,re);case 20:S=e.sent;case 21:S?o.loadVideo(l,S):(c.reject({status:!1,msg:"Incompatible / Missing Source",response:re}),o.handleError(l,"Incompatible / Missing Source")),((null===(p=re)||void 0===p||null===(f=p[ue])||void 0===f||null===(g=f.contentDetails)||void 0===g||null===(m=g.closedCaptions)||void 0===m?void 0:m.length)>0||(null===(y=re)||void 0===y||null===(h=y[ue])||void 0===h||null===(b=h.closedCaptions)||void 0===b?void 0:b.length)>0)&&(E=(null===(I=re)||void 0===I||null===(P=I[ue])||void 0===P||null===(T=P.contentDetails)||void 0===T?void 0:T.closedCaptions)||(null===(j=re)||void 0===j||null===(C=j[ue])||void 0===C?void 0:C.closedCaptions),O=E.filter((function(e){return"VTT"===e.format||"WEBVTT"===e.format})),a.addCaptions(l,O)),null!=d&&d.disableControls?o.disableControls(l):Q(l,Oe(Oe(Oe({},d),ye),{},{liveVideo:ce,isDvrEnabled:de,res:re,sres:le})),ge(l,Oe(Oe(Oe({},d),ye),{},{liveVideo:ce}),c,{res:re,sres:le});case 25:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}())}},Pe={spinco:"e8f2c1a7-5d94-4a1f-93ea-7c0b9186f1cd"};function Te(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 je(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Te(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):Te(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var Ce,Ee=function(e,n){var t=n.resolve,o=n.reject,r=null==e?void 0:e.playerId,i=De(e);Ie(r,{res:i},e,{resolve:t,reject:o})},De=function(e){var n,t,r,i,l,a,u,s,d=null==e?void 0:e.streamingInfo,c=null==e||null===(n=e.streamingInfo)||void 0===n?void 0:n.videoAssets,v=(null==e||null===(t=e.streamingInfo)||void 0===t?void 0:t.isDrmEnabled)||null,p=(null==e||null===(r=e.streamingInfo)||void 0===r||null===(i=r.ads)||void 0===i?void 0:i.url)||null,f=(null==e||null===(l=e.streamingInfo)||void 0===l?void 0:l.posterUrl)||null,m=(null==e||null===(a=e.streamingInfo)||void 0===a?void 0:a.subtitles)||[],y=(null==e||null===(u=e.streamingInfo)||void 0===u||null===(s=u.videoAssets)||void 0===s?void 0:s.drmProvider)||null,h=null==e?void 0:e.token,b=o.getDecodedToken(h),w=null==b?void 0:b.site;return je(je({id:null==Pe?void 0:Pe[w]},!v&&{directPlaybackUrl:null==c?void 0:c.url}),{},{video:{drmEnabled:v,streamingInfo:{videoAssets:je(je({},y&&{drmProvider:y}),{},{widevine:null==c?void 0:c.widevine,fairPlay:null==c?void 0:c.fairPlay,playReady:null==c?void 0:c.playReady})},liveDetails:{isDvrEnabled:null==d?void 0:d.isDvrEnabled},gist:je({},f&&{videoImageUrl:f}),contentDetails:je({},(null==m?void 0:m.length)>0&&{closedCaptions:g(m)})},ads:{preRoll:{adTags:{web:je(je({},p&&{active:!0}),p&&{url:p})}}}})};function xe(e,n){return Re.apply(this,arguments)}function Re(){return(Re=n(t.mark((function e(n,r){var i,l,a,u,s,d;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=r.resolve,l=r.reject,a=null==n?void 0:n.videoId,u=null==n?void 0:n.playerId,s=!(null==n||!n.anonymousId),e.next=6,o.getToken();case 6:d=e.sent,o.getVideoDetails(a,d).then((function(e){var t,r,v,p;window.contentType=null==e||null===(t=e.data)||void 0===t||null===(r=t.video)||void 0===r||null===(v=r.gist)||void 0===v?void 0:v.contentType,c.setCurrentVideo(null==e?void 0:e.data);var f,g=null==e?void 0:e.data;if(null!=n&&n.watchHistory&&null!=n&&null!==(p=n.watchHistory)&&void 0!==p&&p.enable&&!s)if((null===(f=n.watchHistory)||void 0===f?void 0:f.saveOffline)||!1){var m,y,h,b=ae((null===(m=n.watchHistory)||void 0===m?void 0:m.profileId)||"",a,null==n?void 0:n.siteOwner);if(b&&b.length)n.watchHistoryResumeTime=(null===(y=b[0])||void 0===y?void 0:y.watchedTime)||null,n.watchedPercentage=(null===(h=b[0])||void 0===h?void 0:h.watchedPercentage)||null;g.contentType="video",Ie(u,{res:g},n,{resolve:i,reject:l})}else o.getVideoInfo(a,d).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,g.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(){Ie(u,{res:g},n,{resolve:i,reject:l})}));else Ie(u,{res:g},n,{resolve:i,reject:l})})).catch((function(e){o.initiateErrorHandling(e,u,l,a)}));case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Le(e,n){return Ae.apply(this,arguments)}function Ae(){return(Ae=n(t.mark((function e(n,r){var i,l,a,u,s;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=r.resolve,l=r.reject,e.next=3,o.getToken();case 3:a=e.sent,u=null==n?void 0:n.playerId,s=null==n?void 0:n.epg,o.getLinearChannelDetails(s,a).then((function(e){var t=null==e?void 0:e.data;t.contentType="linearchannel",t.channelId=null==s?void 0:s.channelId,Ie(u,{res:t},n,{resolve:i,reject:l})})).catch((function(e){o.initiateErrorHandling(e,u,l,videoId)}));case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ne(e,n){return Ve.apply(this,arguments)}function Ve(){return(Ve=n(t.mark((function e(n,r){var i,l,a,u,s,d,v;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l=r.resolve,a=r.reject,e.next=3,o.getToken();case 3:u=e.sent,s=null==n?void 0:n.playerId,d=sessionStorage.getItem("season-idx")||0,c.seasonIdxManager.set(parseInt(d)),v=null==n||null===(i=n.series)||void 0===i?void 0:i.id,o.getSeriesDetails(v,u).then((function(e){var t,r,i,d=e.data,p=e.data.seasons;c.setCurrentSeries(p);var f=videoId||(null==p||null===(t=p[0])||void 0===t||null===(r=t.episodes)||void 0===r||null===(i=r[0])||void 0===i?void 0:i.id);o.createSeriesWatchMap(v,u),o.getVideoDetails(f,u).then((function(e){var t,o,r;window.contentType=null==e||null===(t=e.data)||void 0===t||null===(o=t.video)||void 0===o||null===(r=o.gist)||void 0===r?void 0:r.contentType,c.setCurrentVideo(e.data),Ie(s,{res:null==e?void 0:e.data,sres:d},n,{resolve:l,reject:a})})).catch((function(e){o.initiateErrorHandling(e,s,a,videoId)}))})).catch((function(e){o.initiateErrorHandling(e,s,a)}));case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function _e(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 Me(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?_e(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):_e(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}exports.VLPlayerCore=function(){return{loadVideoInstantly:o.loadVideoInstantly,onTimeUpdate:l.onTimeUpdate,getVideoDuration:l.getVideoDuration,onVideoEnded:l.onVideoEnded,init:function(e){return console.log("%c VIDEOJS-8 ","background: #bdf369; color: #000"),new Promise(function(){var r=n(t.mark((function n(r,i){var l,a,u,c,v,p,f,g,y,h,b,w,k,S,O,I,P,T,j,E,D,x,R,L,A;return t.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!o.isPlayerInitialised(null==e?void 0:e.playerId)){n.next=2;break}return n.abrupt("return");case 2:if(k=(null==e?void 0:e.videoSourceUrl)||!1,S=null==e?void 0:e.asat,O=(null==e||null===(l=e.epg)||void 0===l?void 0:l.enable)||!1,I=null==e?void 0:e.videoId,P=(null==e||null===(a=e.series)||void 0===a?void 0:a.enable)||!1,T=(null==e?void 0:e.streamingInfo)||!1,window.videoId=I,j=null==e?void 0:e.token,!o.token_authentication_enabled(e)){n.next=17;break}if(sessionStorage.setItem("vlp_token",j),o.refreshTokenManager().set(null==e?void 0:e.refreshToken),j&&!o.isTokenExpired(j)){n.next=16;break}return i({status:!1,msg:"".concat(j?"Token is expired !":"Missing Authorization Token"),response:{token:j}}),n.abrupt("return");case 16:Ce=JSON.parse(atob(j.split(".")[1]));case 17:return window.siteName=null===(u=Ce)||void 0===u?void 0:u.site,window.siteId=null===(c=Ce)||void 0===c?void 0:c.siteId,e.isAnonymousUser=!(null===(v=Ce)||void 0===v||!v.anonymousId),e.siteOwner=(null===(p=Ce)||void 0===p?void 0:p.site)||null,e.userId=(null===(f=Ce)||void 0===f?void 0:f.userId)||null,window.sessionStorage.setItem("uid",null===(g=Ce)||void 0===g?void 0:g.userId),window.watchHistory=e.watchHistory||null,E=null==e?void 0:e.playerId,e.chromecastReceiverId=null!=e&&null!==(y=e.series)&&void 0!==y&&y.enable?null:null==e?void 0:e.chromecastReceiverId,D=(null==e||null===(h=e.analytics)||void 0===h?void 0:h.gaId)||null,(x=null==e?void 0:e.errors)&&(window.customErrors=x),window.customData=null==e?void 0:e.customData,d.setLocalisation(null==e||null===(b=e.customData)||void 0===b?void 0:b.localisation),o.baseUrlManager.set(e.apiBaseUrl),null!=e&&e.skin&&!s.isNotAValidSkin(e.skin)||(e.skin="VL_ONE"),n.next=35,C(e);case 35:D&&m("https://www.googletagmanager.com/gtag/js?id=".concat(D)).then((function(){return o.runGtag(D)})).catch((function(e){})),(R=null===(w=document)||void 0===w?void 0:w.getElementById("".concat(E)))&&R.addEventListener("contextmenu",(function(e){return e.preventDefault()})),k?(A={directPlaybackUrl:k,id:L="c09576ca-8202-4e8e-ba1e-06d1ab0ce063"},S?o.getVideoDetails(L,j).then((function(n){var t=(null==n?void 0:n.data)||{};Ie(E,{res:Me(Me({},t),A)},e,{resolve:r,reject:i})})).catch((function(e){o.initiateErrorHandling(e,E,i,L)})):Ie(E,{res:A},e,{resolve:r,reject:i})):T?Ee(e,{resolve:r,reject:i}):P?Ne(e,{resolve:r,reject:i}):O?Le(e,{resolve:r,reject:i}):xe(e,{resolve:r,reject:i});case 39:case"end":return n.stop()}}),n)})));return function(e,n){return r.apply(this,arguments)}}())},getRenditions:u.getRenditions,skip:o.skip,getPlayer:r.getPlayer,play:o.play,pause:o.pause,detectBrowser:o.detectBrowser,rewind:o.rewind,loadVideo:o.loadVideo,seekToTimeStamp:l.seekToTimeStamp,isPlayerInitialised:o.isPlayerInitialised,load:o.load,authenticateLC:o.authenticateLC,dispose:o.dispose,enableCaptions:a.enableCaptions,disableCaptions:a.disableCaptions,getCaptions:a.getCaptions,playSelectedResolution:u.playSelectedResolution,getSource:o.getSource,setVolume:h,getVolume:b,disableControls:o.disableControls,setPlaybackSpeed:l.setPlaybackSpeed,getEntitlementData:o.getEntitlementData,adsQueuePointManager:o.adsQueuePointManager,getSsaiEvents:o.getSsaiEvents,playerEvents:l.playerEvents,onReplay:l.onReplay}},exports.initiateMarker=function(e){var n=r.getPlayer(e),t=n.seekable(),o=n.controlBar.progressControl.seekBar.el();if(t&&t.length>0){var i=t.start(0),l=t.end(t.length-1)-i;ye(),he(l).forEach((function(e){var n=e.id,t=e.title,r=e.time,i=me(n,t,Math.min(r/l*100,99.5));o.appendChild(i)}))}},exports.removeMarkers=ye;
|