@viewlift/player-backup 1.0.35-backup → 1.0.37-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.
Files changed (55) hide show
  1. package/cjs/autoNextVideo-85a23f80.js +1 -0
  2. package/cjs/bundle.css +1 -1
  3. package/cjs/{caption-settings-c4cf197e.js → caption-settings-f6a4a87a.js} +1 -1
  4. package/cjs/{features-fb650b0b.js → features-1d7762e7.js} +1 -1
  5. package/cjs/generic-6b4b55bc.js +1 -0
  6. package/cjs/index.js +1 -1
  7. package/cjs/{keyboardShortcuts-699401fd.js → keyboardShortcuts-a046f83c.js} +1 -1
  8. package/cjs/{multicam-5f88c71f.js → multicam-215e5166.js} +1 -1
  9. package/cjs/{multicamv2-1a85a6d6.js → multicamv2-906a05ec.js} +1 -1
  10. package/cjs/{mwebPotraitTray-cf6ec4f9.js → mwebPotraitTray-31e2e0eb.js} +1 -1
  11. package/cjs/{nextEpisodeButton-2d046d57.js → nextEpisodeButton-3d85e750.js} +1 -1
  12. package/cjs/{playlist-ed2e02c7.js → playlist-29848c0c.js} +1 -1
  13. package/cjs/{renditions-ce87e11e.js → renditions-e32a815a.js} +1 -1
  14. package/cjs/{resolution-94d5bf3e.js → resolution-cc25544e.js} +1 -1
  15. package/cjs/{series-f3fe6bb1.js → series-a3018dd4.js} +1 -1
  16. package/cjs/{series-v2-942cb10b.js → series-v2-289865bb.js} +1 -1
  17. package/cjs/{settings-icon-11c5c6ed.js → settings-icon-174dafa3.js} +1 -1
  18. package/cjs/{skin-29a05e8d.js → skin-096d9286.js} +1 -1
  19. package/cjs/{skin-f13f36d4.js → skin-1d4dd948.js} +1 -1
  20. package/cjs/skin-1feb1a36.js +1 -0
  21. package/cjs/{skin-c4dd3269.js → skin-5a8b5056.js} +1 -1
  22. package/cjs/{skin-286492a0.js → skin-a402875a.js} +1 -1
  23. package/cjs/{util-9dc01a45.js → util-1eba9ba8.js} +1 -1
  24. package/cjs/{videoSelector-bef9605f.js → videoSelector-e0ee720f.js} +1 -1
  25. package/esm/autoNextVideo-d452aecb.js +1 -0
  26. package/esm/bundle.css +1 -1
  27. package/esm/{caption-settings-f784aca3.js → caption-settings-e1f9fd4f.js} +1 -1
  28. package/esm/{features-b654970e.js → features-ca46e2b2.js} +1 -1
  29. package/esm/generic-da59df34.js +1 -0
  30. package/esm/index.js +1 -1
  31. package/esm/{keyboardShortcuts-659e7e1a.js → keyboardShortcuts-f5a0f66c.js} +1 -1
  32. package/esm/{multicam-def01871.js → multicam-cf9b409f.js} +1 -1
  33. package/esm/{multicamv2-6472e5a0.js → multicamv2-d4909286.js} +1 -1
  34. package/esm/{mwebPotraitTray-96883a4d.js → mwebPotraitTray-9cdf3962.js} +1 -1
  35. package/esm/{nextEpisodeButton-2c8b7dee.js → nextEpisodeButton-1bfc1a3b.js} +1 -1
  36. package/esm/{playlist-aa798eea.js → playlist-9e5d456f.js} +1 -1
  37. package/esm/{renditions-f4b80506.js → renditions-67b59ff4.js} +1 -1
  38. package/esm/{resolution-ff09b408.js → resolution-7f1bdcfe.js} +1 -1
  39. package/esm/{series-69cd1781.js → series-a1e805bf.js} +1 -1
  40. package/esm/{series-v2-2faa5476.js → series-v2-54f0f169.js} +1 -1
  41. package/esm/{settings-icon-9c99611a.js → settings-icon-fa4a2428.js} +1 -1
  42. package/esm/skin-2337b3dc.js +1 -0
  43. package/esm/{skin-e692e688.js → skin-7ac46fa1.js} +1 -1
  44. package/esm/{skin-aa09f3af.js → skin-a8d4111c.js} +1 -1
  45. package/esm/{skin-e8b7a29c.js → skin-b3d1fa69.js} +1 -1
  46. package/esm/{skin-d960824b.js → skin-dd3d6b5d.js} +1 -1
  47. package/esm/{util-1dd072f8.js → util-e55de7ed.js} +1 -1
  48. package/esm/{videoSelector-877372e0.js → videoSelector-27ab7312.js} +1 -1
  49. package/package.json +1 -1
  50. package/cjs/autoNextVideo-d1c8e1bf.js +0 -1
  51. package/cjs/generic-80bcbdc4.js +0 -1
  52. package/cjs/skin-0a0e24cc.js +0 -1
  53. package/esm/autoNextVideo-7ba2d233.js +0 -1
  54. package/esm/generic-47799913.js +0 -1
  55. package/esm/skin-9d9e874b.js +0 -1
@@ -1 +1 @@
1
- import{a as t}from"./generic-47799913.js";var n=function(n,a,r){var e=t(n);e?a>=0&&a<=e.duration()?(r({status:!0,msg:"Successfully seeked to timestamp : ".concat(a)}),e.currentTime(a)):r({status:!1,msg:"Out of bounds, please provide a valid timestamp"}):r("Cannot find player with id: '".concat(n,"'"))},a=function(n,a){var r=t(n);if(!r)return"Cannot find player with id: '".concat(n,"'");try{return r.playbackRate(a),"Playback speed set to ".concat(a,"x")}catch(t){return"Error: ".concat(t)}},r=function(n,a){var r=t(n);r?r.on("timeupdate",(function(){return a(r.currentTime())})):a("Cannot find player with id: '".concat(n,"'"))},e=function(n,a){var r=t(n);r?r.on("ended",(function(){return a(!0)})):a("Cannot find player with id: '".concat(n,"'"))},i=function(n){var a=t(n);return a?a.duration():"Cannot find player with id: '".concat(n,"'")};export{e as a,a as b,i as g,r as o,n as s};
1
+ import{a as t}from"./generic-da59df34.js";var n=function(n,a,r){var e=t(n);e?a>=0&&a<=e.duration()?(r({status:!0,msg:"Successfully seeked to timestamp : ".concat(a)}),e.currentTime(a)):r({status:!1,msg:"Out of bounds, please provide a valid timestamp"}):r("Cannot find player with id: '".concat(n,"'"))},a=function(n,a){var r=t(n);if(!r)return"Cannot find player with id: '".concat(n,"'");try{return r.playbackRate(a),"Playback speed set to ".concat(a,"x")}catch(t){return"Error: ".concat(t)}},r=function(n,a){var r=t(n);r?r.on("timeupdate",(function(){return a(r.currentTime())})):a("Cannot find player with id: '".concat(n,"'"))},e=function(n,a){var r=t(n);r?r.on("ended",(function(){return a(!0)})):a("Cannot find player with id: '".concat(n,"'"))},i=function(n){var a=t(n);return a?a.duration():"Cannot find player with id: '".concat(n,"'")};export{e as a,a as b,i as g,r as o,n as s};
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/helpers/classCallCheck";import o from"@babel/runtime/helpers/createClass";import n from"@babel/runtime/helpers/inherits";import a from"@babel/runtime/helpers/possibleConstructorReturn";import i from"@babel/runtime/helpers/getPrototypeOf";import r from"@babel/runtime/regenerator";import l from"video.js";import{E as s,e as c}from"./icons-c2efba97.js";import{T as d,U as m,a as u,P as p,q as v,g as h,R as f}from"./generic-47799913.js";import{a as y}from"./autoNextVideo-7ba2d233.js";import{g as b}from"./localisation-0bf399a1.js";import"@babel/runtime/helpers/defineProperty";import"axios";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/toConsumableArray";import"./util-1dd072f8.js";function g(e){var t=C();return function(){var o,n=i(e);if(t){var r=i(this).constructor;o=Reflect.construct(n,arguments,r)}else o=n.apply(this,arguments);return a(this,o)}}function C(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(C=function(){return!!e})()}var E=l.getComponent("Component"),N=function(){n(C,E);var a,i=g(C);function C(e){var o,n,a,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,C),(a=i.call(this,e,r)).playerId=r.playerId,a.seriesData=r.sres,a.videos=r.related.content,a.cb=(null==r||null===(o=r.related)||void 0===o?void 0:o.cb)||null,a.autoNext=(null==r||null===(n=r.related)||void 0===n?void 0:n.autoNext)||!1,a.currentVideoData=r.res,a.initialiseStructure(),a.loadCSS(),a.autoNext&&(f(0),y({playerId:a.playerId,content:a.videos,cb:a.cb})),a}return o(C,[{key:"createEl",value:function(){var e=l.dom.createEl("div",{className:"video-selection vjs-control vjs-button"});e.style.position="unset";var t=l.dom.createEl("div",{className:"video-selector-icon",innerHTML:"".concat(s())});return l.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./videoSelector-8e258d45.js").then((function(e){var t=document.createElement("style");t.id="video-selection",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this.el(),t=l.dom.createEl("div",{className:"video-selection-container hidden"});l.dom.$(".video-selector-icon",this.el()).onclick=function(){var o;null!==(o=t.classList)&&void 0!==o&&o.contains("hidden")?(d(),t.classList.remove("hidden"),e.classList.add("open"),t.style.right="0px"):(t.classList.add("hidden"),e.classList.remove("open"),t.style.right="-350px")};var o=window.getComputedStyle(document.getElementById(this.playerId),null).getPropertyValue("height");t.style.height="".concat(o),l.dom.appendContent(e,t),document.getElementById(this.playerId).style.overflow="hidden",this.addFunctionality(t),m(this.playerId,t)}},{key:"toggleOpenClose",value:function(){}},{key:"addFunctionality",value:(a=e(r.mark((function e(t){var o,n,a,i,s,d,m,y,g,C=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,h();case 2:o=e.sent,n=this.el(),a=l.dom.createEl("div",{className:"video-selector-head"}),(i=l.dom.createEl("div",{className:"video-selector-cross-icon",innerHTML:"".concat(c())})).onclick=function(){t.classList.add("hidden"),n.classList.remove("open"),t.style.right="-350px"},s=l.dom.createEl("div",{className:"video-selector-title",innerHTML:b("relatedVideoTitle")||"Recommended"}),d=l.dom.createEl("div",{className:"video-selector-content"}),m=l.dom.createEl("div",{className:"video-container"}),y=r.mark((function e(t){var n,a,i,s,c,u,h,y,b;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:u=l.dom.createEl("div",{className:"video -".concat(t)}),(h=l.dom.createEl("div",{className:"recommended -".concat(t)})).setAttribute("video-idx",t),h.onclick=function(){f(t+1);for(var e=l.dom.$$(".recommended"),n=0;n<e.length;n++)e[n].style.border="none";p(t),v(C.playerId,C.videos[t].id,o).then((function(e){C.cb&&C.cb(e)})).catch((function(e){C.cb&&C.cb(e)}))},(y=document.createElement("img")).className="related-thumbnail-image",y.src="".concat((null==C||null===(n=C.videos)||void 0===n||null===(a=n[t])||void 0===a?void 0:a.img)||(null===(i=window)||void 0===i||null===(s=i.customData)||void 0===s?void 0:s.fallbackImage)),y.alt="No Thumbnail Available",h.append(y),b=l.dom.createEl("div",{className:"info -".concat(t),innerHTML:"".concat((null==C||null===(c=C.videos[t])||void 0===c?void 0:c.title)||"")}),l.dom.appendContent(u,h),l.dom.appendContent(u,b),l.dom.appendContent(m,u),l.dom.appendContent(d,m);case 14:case"end":return e.stop()}}),e)})),g=0;case 12:if(!(g<this.videos.length)){e.next=17;break}return e.delegateYield(y(g),"t0",14);case 14:g++,e.next=12;break;case 17:l.dom.appendContent(a,i),l.dom.appendContent(a,s),l.dom.appendContent(t,a),l.dom.appendContent(t,d),u(this.playerId).on("fullscreenchange",(function(){var e=window.getComputedStyle(document.getElementById(C.playerId),null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(e,"px")}));case 23:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})}]),C}();export{N as default};
1
+ import e from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/helpers/classCallCheck";import o from"@babel/runtime/helpers/createClass";import n from"@babel/runtime/helpers/inherits";import a from"@babel/runtime/helpers/possibleConstructorReturn";import i from"@babel/runtime/helpers/getPrototypeOf";import r from"@babel/runtime/regenerator";import l from"video.js";import{E as s,e as c}from"./icons-c2efba97.js";import{T as d,U as m,a as u,P as p,q as v,g as h,R as f}from"./generic-da59df34.js";import{a as y}from"./autoNextVideo-d452aecb.js";import{g as b}from"./localisation-0bf399a1.js";import"@babel/runtime/helpers/defineProperty";import"axios";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/toConsumableArray";import"./util-e55de7ed.js";function g(e){var t=C();return function(){var o,n=i(e);if(t){var r=i(this).constructor;o=Reflect.construct(n,arguments,r)}else o=n.apply(this,arguments);return a(this,o)}}function C(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(C=function(){return!!e})()}var E=l.getComponent("Component"),N=function(){n(C,E);var a,i=g(C);function C(e){var o,n,a,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,C),(a=i.call(this,e,r)).playerId=r.playerId,a.seriesData=r.sres,a.videos=r.related.content,a.cb=(null==r||null===(o=r.related)||void 0===o?void 0:o.cb)||null,a.autoNext=(null==r||null===(n=r.related)||void 0===n?void 0:n.autoNext)||!1,a.currentVideoData=r.res,a.initialiseStructure(),a.loadCSS(),a.autoNext&&(f(0),y({playerId:a.playerId,content:a.videos,cb:a.cb})),a}return o(C,[{key:"createEl",value:function(){var e=l.dom.createEl("div",{className:"video-selection vjs-control vjs-button"});e.style.position="unset";var t=l.dom.createEl("div",{className:"video-selector-icon",innerHTML:"".concat(s())});return l.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./videoSelector-8e258d45.js").then((function(e){var t=document.createElement("style");t.id="video-selection",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this.el(),t=l.dom.createEl("div",{className:"video-selection-container hidden"});l.dom.$(".video-selector-icon",this.el()).onclick=function(){var o;null!==(o=t.classList)&&void 0!==o&&o.contains("hidden")?(d(),t.classList.remove("hidden"),e.classList.add("open"),t.style.right="0px"):(t.classList.add("hidden"),e.classList.remove("open"),t.style.right="-350px")};var o=window.getComputedStyle(document.getElementById(this.playerId),null).getPropertyValue("height");t.style.height="".concat(o),l.dom.appendContent(e,t),document.getElementById(this.playerId).style.overflow="hidden",this.addFunctionality(t),m(this.playerId,t)}},{key:"toggleOpenClose",value:function(){}},{key:"addFunctionality",value:(a=e(r.mark((function e(t){var o,n,a,i,s,d,m,y,g,C=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,h();case 2:o=e.sent,n=this.el(),a=l.dom.createEl("div",{className:"video-selector-head"}),(i=l.dom.createEl("div",{className:"video-selector-cross-icon",innerHTML:"".concat(c())})).onclick=function(){t.classList.add("hidden"),n.classList.remove("open"),t.style.right="-350px"},s=l.dom.createEl("div",{className:"video-selector-title",innerHTML:b("relatedVideoTitle")||"Recommended"}),d=l.dom.createEl("div",{className:"video-selector-content"}),m=l.dom.createEl("div",{className:"video-container"}),y=r.mark((function e(t){var n,a,i,s,c,u,h,y,b;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:u=l.dom.createEl("div",{className:"video -".concat(t)}),(h=l.dom.createEl("div",{className:"recommended -".concat(t)})).setAttribute("video-idx",t),h.onclick=function(){f(t+1);for(var e=l.dom.$$(".recommended"),n=0;n<e.length;n++)e[n].style.border="none";p(t),v(C.playerId,C.videos[t].id,o).then((function(e){C.cb&&C.cb(e)})).catch((function(e){C.cb&&C.cb(e)}))},(y=document.createElement("img")).className="related-thumbnail-image",y.src="".concat((null==C||null===(n=C.videos)||void 0===n||null===(a=n[t])||void 0===a?void 0:a.img)||(null===(i=window)||void 0===i||null===(s=i.customData)||void 0===s?void 0:s.fallbackImage)),y.alt="No Thumbnail Available",h.append(y),b=l.dom.createEl("div",{className:"info -".concat(t),innerHTML:"".concat((null==C||null===(c=C.videos[t])||void 0===c?void 0:c.title)||"")}),l.dom.appendContent(u,h),l.dom.appendContent(u,b),l.dom.appendContent(m,u),l.dom.appendContent(d,m);case 14:case"end":return e.stop()}}),e)})),g=0;case 12:if(!(g<this.videos.length)){e.next=17;break}return e.delegateYield(y(g),"t0",14);case 14:g++,e.next=12;break;case 17:l.dom.appendContent(a,i),l.dom.appendContent(a,s),l.dom.appendContent(t,a),l.dom.appendContent(t,d),u(this.playerId).on("fullscreenchange",(function(){var e=window.getComputedStyle(document.getElementById(C.playerId),null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(e,"px")}));case 23:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})}]),C}();export{N as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@viewlift/player-backup",
3
- "version": "1.0.35-backup",
3
+ "version": "1.0.37-backup",
4
4
  "main": "dist/bundle.cjs.js",
5
5
  "amdName": "_playerCore",
6
6
  "dependencies": {
@@ -1 +0,0 @@
1
- "use strict";var e,t=require("@babel/runtime/helpers/asyncToGenerator"),n=require("@babel/runtime/regenerator"),i=require("./generic-80bcbdc4.js"),r=require("./util-9dc01a45.js"),o=0,u=0,c=function(){var c=t(n.mark((function t(c){var a,l,h;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return clearTimeout(o),a=null==c?void 0:c.content,e=null==c?void 0:c.cb,l=c.playerId,t.next=6,i.getToken();case 6:h=t.sent,r.onVideoEnded(l,(function(){var e=i.getPlayer(l);0!==(null==e?void 0:e.currentTime())&&((u=i.getVideoIdx())>a.length-1||i.load(l,a[u].id,h).then((function(e){i.highlightVideo(u),i.setCurrentVideo(e.response),u++,i.setVideoIdx(u),s(e)})).catch((function(e){s(e),i.highlightVideo(u),u++,i.setVideoIdx(u),o=setTimeout((function(){i.isPaused(l)&&d(u,l,a,h)}),5e3)})))}));case 8:case"end":return t.stop()}}),t)})));return function(e){return c.apply(this,arguments)}}(),d=function e(t,n,r,o,c){u=t,t>r.length-1||i.load(n,r[t].id,o).then((function(e){i.highlightVideo(u),u++,i.setVideoIdx(u),s(e)})).catch((function(t){s(t),setTimeout((function(){i.highlightVideo(u),u++,i.setVideoIdx(u),e(u,n,r,o)}),5e3)}))},s=function(t){e&&e(t)};exports.autoPlayNext=c,exports.switchToNext=d;
@@ -1 +0,0 @@
1
- "use strict";var e=require("@babel/runtime/helpers/defineProperty"),t=require("video.js"),n=require("@babel/runtime/helpers/asyncToGenerator"),o=require("@babel/runtime/regenerator"),i=require("axios");require("js-cookie");var r=require("ua-parser-js"),l=require("@babel/runtime/helpers/toConsumableArray"),a={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"};function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function s(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?d(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):d(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var u={name:"@viewlift/player-backup",version:"1.0.59",main:"dist/bundle.cjs.js",amdName:"_playerCore",dependencies:{"@silvermine/videojs-airplay":"^1.2.0","@silvermine/videojs-chromecast":"^1.4.1",axios:"^1.2.3","js-cookie":"^3.0.5","video.js":"^7.20.3","videojs-contrib-ads":"^6.9.0","videojs-contrib-dash":"^5.1.1","videojs-contrib-eme":"^3.11.1","videojs-ima":"^2.1.0"}},c=function(e,t){var n,o,r,l;return null!==(n=window)&&void 0!==n&&null!==(o=n.customData)&&void 0!==o&&o.overrideEntitlementResponse?new Promise((function(e,t){var n,o;return e({data:null===(n=window)||void 0===n||null===(o=n.customData)||void 0===o?void 0:o.overrideEntitlementResponse})})):i({url:w(),params:s({id:e,deviceType:"web_browser",contentConsumption:"web"},null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l?void 0:l.entitlement),method:"GET",headers:{Authorization:t,"Sdk-Version":u.version},withCredentials:!0})},v=function(e,t){var n,o,r=(null===(n=window)||void 0===n||null===(o=n.watchHistory)||void 0===o?void 0:o.apiVersion)||"v1";if("v1"==r){var l,a,d=JSON.parse(atob(t.split(".")[1])),s=(null==d?void 0:d.site)||null;return i({method:"GET",url:g(e),params:{site:s},headers:{Authorization:t,"x-api-key":null===(l=window)||void 0===l||null===(a=l.watchHistory)||void 0===a?void 0:a.xApiKey}})}if("v2"==r){var u,c;JSON.parse(atob(t.split(".")[1]));var v=window.contentType;return i({method:"GET",url:I(e,v),headers:{Authorization:t,"x-api-key":null===(u=window)||void 0===u||null===(c=u.watchHistory)||void 0===c?void 0:c.xApiKey}})}},m=function(e){return T()+"".concat(null==a?void 0:a.getSeriesWatchHistoryV2,"/").concat(e)},p=function(){return T()+"".concat(null==a?void 0:a.getSeriesWatchHistoryV1)},g=function(e){return T()+"".concat(null==a?void 0:a.getVideoInfoV1,"/").concat(e)},I=function(e,t){return T()+"".concat(null==a?void 0:a.getVideoInfoV2,"/").concat(t,"/").concat(e)},f=function(){return T()+"".concat(null==a?void 0:a.saveWatchHistoryV1)},E=function(){return T()+"".concat(null==a?void 0:a.saveWatchHistoryV2)},w=function(){return T()+"".concat(null==a?void 0:a.getVideoDetails)},T=function(){var e;return(null===(e=window)||void 0===e?void 0:e.playerEntitlementUrl)||(null==a?void 0:a.apiBaseUrl)},y=function(e){var t=JSON.parse(atob(null==e?void 0:e.split(".")[1])),n=null==t?void 0:t.exp;if(new Date(1e3*n).getTime()<(new Date).getTime())return!0};function h(){var e=null;return{set:function(t){t&&(e=t)},get:function(){return e}}}var _=function(){var e=n(o.mark((function e(){var t;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t=sessionStorage.getItem("vlp_token"))||!y(t)){e.next=5;break}return e.abrupt("return",b().then((function(e){var n,o,i=null==e||null===(n=e.data)||void 0===n?void 0:n.authorizationToken,r=null==e||null===(o=e.data)||void 0===o?void 0:o.refreshToken;return i&&sessionStorage.setItem("vlp_token",i),r&&h().set(r),i||t})).catch((function(e){return console.log("Error fetching refresh token",e),t})));case 5:return e.abrupt("return",t);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),b=function(){var e=h().get(),t=T();return i({method:"GET",url:t+"/identity/refresh/".concat(e)})},O=function(e,t){if(Promise.resolve().then((function(){return require("./error-26d5a3c3.js")})).then((function(e){var t=document.createElement("style");t.id="errorblock",t.append("".concat(e.default)),document.head.appendChild(t)})),document.getElementsByClassName("error-container")[0]){var n=document.getElementsByClassName("error-message")[0];n&&(n.innerHTML="".concat(t))}else{var o=document.getElementById(e),i=document.createElement("div");i.className="error-container";var r=document.createElement("div");r.className="error-message",r.innerHTML="".concat(t),i.appendChild(r),o.append(i)}},D=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var V=function(){var e,t;return navigator.userAgent.indexOf("Edg")>-1&&"macOS"!=(null===(e=window.navigator)||void 0===e||null===(t=e.userAgentData)||void 0===t?void 0:t.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"};function S(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function x(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?S(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):S(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}window._deviceInfo=r(navigator.userAgent);var C,L,W,A,P,F=function(e,t){return e&&t?"".concat(e,"x").concat(t):e>1024?"L":e>768?"M":"S"},k=function(e){var t=R(e,"video.tags",[]),n=R(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return t.length>0?t.map((function(e){return e.title})).join(","):n},R=function(e,t,n){for(var o=0,i=(t=t.split(".")).length;o<i;o++){var r;e=null===(r=e)||void 0===r?void 0:r[t[o]]}return e||n},N=function(){return!!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},j=function(){var e,t,n,o,i,r,l,a,d,s,u,c,v=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",m=arguments.length>1?arguments[1]:void 0,p=arguments.length>2?arguments[2]:void 0,g=null==p||null===(e=p.video)||void 0===e?void 0:e.metadata,I=te(m);if(!v.includes("VIEWLIFT_"))return v;var f=window.getComputedStyle(document.getElementById(m),null),E=Math.trunc(f.getPropertyValue("height").slice(0,-2)),w=Math.trunc(f.getPropertyValue("width").slice(0,-2)),T=R(p,"video.gist.id",""),y=x(x({},B(g)),{},{VIEWLIFT_WIDTH:w,VIEWLIFT_HEIGHT:E,VIEWLIFT_SIZE:F(w,E),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===(t=window)||void 0===t?void 0:t.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:navigator.userAgent,VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:R(p,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:R(p,"video.gist.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:R(p,"video.gist.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==I||null===(n=I.options_)||void 0===n?void 0:n.autoplay)||1,VIEWLIFT_MUTE:(null==I||null===(o=I.options_)||void 0===o?void 0:o.autoplay)||0,VIEWLIFT_DEVICE_ID:localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_KEYWORDS:k(p),VIEWLIFT_MEDIA_ID:T,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(R(p,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:T,VIEWLIFT_VIDEO_URL:encodeURI(window.location.host+R(p,"video.gist.permalink","")),VIEWLIFT_COPPA:R(null===(i=window)||void 0===i||null===(r=i.app_data)||void 0===r||null===(l=r.site)||void 0===l?void 0:l.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR:R(null===(a=window)||void 0===a||null===(d=a.app_data)||void 0===d||null===(s=d.site)||void 0===s?void 0:s.settings,"compliance.gdpr")?1:0,VIEWLIFT_CONTENT_DURATION_MS:1e3*R(p,"video.gist.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:R(p,"video.gist.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:T,VIEWLIFT_CONTENT_TITLE:R(p,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),VIEWLIFT_CONTENT_SERIES_TITLE:R(p,"video.series[0].gist.title",R(p,"seriesInfo.title","VIEWLIFT_CONTENT_SERIES_TITLE")),VIEWLIFT_CONTENT_EPISODE:R(p,"video.currentEpisode","VIEWLIFT_CONTENT_EPISODE"),VIEWLIFT_CONTENT_SEASON:R(p,"video.currentSeason","VIEWLIFT_CONTENT_SEASON"),VIEWLIFT_CONTENT_GENRE:R(p,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER"},null===(u=window)||void 0===u||null===(c=u.customData)||void 0===c?void 0:c.macros);for(var h in y){var _=new RegExp("\\b("+h+")\\b","g");v=v.replace(_,y[h])}return v},B=function(e){var t,n,o,i,r,l,a={},d=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map((function(e){d.set(e.name,e.value)})));var s=(null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(o=n.subscription)||void 0===o?void 0:o.SVOD)||!1,u=(null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(l=r.subscription)||void 0===l?void 0:l.TVE)||!1;return s||u?(N()?s?a=x(x({},a),{},{VIEWLIFT_CSID:d.get("csid.mweb.dtc")||""}):u&&(a=x(x({},a),{},{VIEWLIFT_CSID:d.get("csid.mweb.tve")||""})):s?a=x(x({},a),{},{VIEWLIFT_CSID:d.get("csid.web.dtc")||""}):u&&(a=x(x({},a),{},{VIEWLIFT_CSID:d.get("csid.web.tve")||""})),s?a=x(x({},a),{},{VIEWLIFT_SFID:d.get("sfid.dtc")||""}):u&&(a=x(x({},a),{},{VIEWLIFT_SFID:d.get("sfid.tve")||""})),a=N()?x(x({},a),{},{VIEWLIFT_PROF:d.get("prof.mweb")||""}):x(x({},a),{},{VIEWLIFT_PROF:d.get("prof.web")||""})):(a=x(x({},a),{},{VIEWLIFT_SFID:d.get("sfid.dtc")||""}),a=N()?x(x({},a),{},{VIEWLIFT_CSID:d.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:d.get("prof.mweb")||""}):x(x({},a),{},{VIEWLIFT_CSID:d.get("csid.web.dtc")||"",VIEWLIFT_PROF:d.get("prof.web")||""})),a},U=function(e,t){var n,o,i,r,l,a,d,s,u,c,v,m,p,g=(null==e?void 0:e.contentType)||"video",I=null==e||null===(n=e[g])||void 0===n?void 0:n.drmEnabled,f=null==e||null===(o=e[g])||void 0===o||null===(i=o.streamingInfo)||void 0===i?void 0:i.videoAssets,E=null==e||null===(r=e[g])||void 0===r||null===(l=r.streamingInfo)||void 0===l?void 0:l.audioAssets,w=(null==e||null===(a=e[g])||void 0===a||null===(d=a.streamingInfo)||void 0===d||null===(s=d.videoAssets)||void 0===s?void 0:s.hls)||!1;null==e||null===(u=e[g])||void 0===u||null===(c=u.liveDetails)||void 0===c||c.isDvrEnabled;var T=(null==e||null===(v=e[g])||void 0===v||null===(m=v.streamingInfo)||void 0===m||null===(p=m.videoAssets)||void 0===p?void 0:p.dash)||!1;if(null!=e&&e.audioAssetSource&&null!=E&&E.hls)return M(E);if(I){var y=z(f,t);return y.src=j(y.src,t,e),y}if("Safari"!==V()&&T)return H(f);if(w){var h=M(f);return h.src=j(h.src,t,e),h}if(null!=f&&f.mpeg){var _=function(e){var t=null==e?void 0:e.mpeg;return{src:t[t.length-1].url,type:"video/mp4"}}(f);return _.src=j(_.src,t,e),_}return null},H=function(e){var t=null==e?void 0:e.dash;return t?{src:t,type:"application/dash+xml"}:null},M=function(e){var t=null==e?void 0:e.hls;return t?{src:t,type:"application/x-mpegURL"}:null},z=function(e,n){var o=e.fairPlay,i=e.widevine,r=e.playReady,l=V(),a=te(n);if("Safari"===l){var d=function(e){var n=e.url;return{src:n,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(n,o){var i={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};t.xhr(i,(function(e,t,n){console.log(e),e&&o(e),o(null,new Uint8Array(n))}))},getContentId:function(e,t){if(t)return new TextDecoder("utf-16").decode(t.slice(16))},getLicense:function(n,o,i,r){var l={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:i,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};t.xhr(l,(function(e,t,n){console.log(e),e&&r(e),r(null,n)}))}}}}}(o);try{a.eme()}catch(e){console.log("EME ERROR :",e)}return d}var s,u={src:i.url,type:"application/dash+xml"};return"caliente"==(null===(s=window)||void 0===s?void 0:s.siteName)?(a.eme(),u.keySystems={"com.widevine.alpha":{url:i.licenseUrl,licenseHeaders:{"X-AxDRM-Message":i.licenseToken}},"com.microsoft.playready":{url:r.licenseUrl,licenseHeaders:{"X-AxDRM-Message":r.licenseToken}}}):(u.keySystemOptions=[],u.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:i.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":i.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),u.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:r.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":r.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})),u};var G=function(e){L=e},q=function(e){W=e},Y=function(e){if(A){var t=A.get(e);q(t+1)}},X=function(e,t){var n=te(e);n.remoteTextTracks().tracks_.map((function(e){n.removeRemoteTextTrack(e)})),t.map((function(e){n.addRemoteTextTrack({src:e.url,srcLang:e.language,label:e.language})}))},J=!1,K=function(e,t,n){var o=j(t,e,n),i=te(e);t&&window.google&&(i.ima.initializeAdDisplayContainer&&i.ima.initializeAdDisplayContainer(),function(e,t){var n,o,i,r=te(e);if(null!==r.el_){J=!0;var l={id:e,adTagUrl:"".concat(t,"&vid=").concat(window.videoId,"&url=").concat(window.location.href,"&correlator=").concat((new Date).getTime(),"&cust_params=sd%3D60000%26site%3D").concat(window.location.origin,"%26autostart%3D%26mute%3D%26user_agent%3D%26keyword%3D%26category%3D").concat(window.category,"%26vid%3D").concat(window.videoId),adLabel:"Your video will resume after this sponsor message"};r.ima.initializeAdDisplayContainer&&r.ima.initializeAdDisplayContainer(),J&&null!==r.el_&&("function"==typeof r.ima?r.ima(l):setTimeout((function(){r.ima.setContentWithAdTag(null,t,!0),r.ima.requestAds()}),1e3));var a=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&a.hasAttribute("controls")&&a.removeAttribute("controls");var d="click",s=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(s=!0,d="touchend"),r.one(d,(function(){s&&r.ima.initializeAdDisplayContainer()}));var u=(null===(n=window)||void 0===n||null===(o=n.customData)||void 0===o||null===(i=o.ads)||void 0===i?void 0:i.adEventHandler)||null;r.one("ads-ad-started",(function(){u&&u({status:"STARTED",msg:"Advertisement Started"})})),r.one("ads-manager",(function(e){e.adsManager.addEventListener(google.ima.AdEvent.Type.COMPLETE,(function(){u&&u({status:"ENDED",msg:"Advertisement Ended"})}))})),r.on("adserror",(function(e){u&&u({status:"ERROR",msg:"Advertisement Error"})}))}}(e,o))},Z=function(e){var t=(new DOMParser).parseFromString(e,"image/svg+xml");return null==t?void 0:t.querySelector("svg")},Q="";function $(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}var ee=function(e){return!!t.getPlayer("".concat(e))},te=function(e){return!!t.getPlayer("".concat(e))&&t.getPlayer("".concat(e))},ne=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()},oe=function(e,t){te(e).src(t)},ie=function(t,n,o,i){var r,l,a,d,s,u,c=null==t||null===(r=t.response)||void 0===r||null===(l=r.data)||void 0===l?void 0:l.errorCode,v=(null==t||null===(a=t.response)||void 0===a||null===(d=a.data)||void 0===d?void 0:d.errorMessage)||(null==t?void 0:t.message);ee(n)&&O(n,(null===(s=window)||void 0===s?void 0:s.customErrors)&&(null===(u=window)||void 0===u?void 0:u.customErrors[c])||"".concat(v)),o&&o(function(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?$(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):$(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}({status:!1,response:t,msg:"".concat(v)},i&&{videoId:i}))};exports.addCaptions=X,exports.clearError=D,exports.closeOpenDrawers=function(){var e=l(document.getElementsByClassName("vjs-control vjs-button open"));null==e||e.map((function(e){var t,n;null==e||null===(t=e.childNodes)||void 0===t||null===(n=t[0])||void 0===n||n.click()}))},exports.createIconMarkup=function(e){return Z(e)},exports.createIdxMapping=function(e){A=new Map,e.map((function(e,t){A.set(e.id,t)}))},exports.detectBrowser=V,exports.detectOrientationChange=function(e,t){var n,o=function(){return function(e,t){var n=window.matchMedia("(orientation: portrait)").matches?"potrait":"landscape";if(Q!==n){var o=window.getComputedStyle(document.getElementById(e),null).getPropertyValue("height");t&&(t.style.height="".concat(o)),Q=n}}(e,t)};window._orientationChangeHandler=o;window.addEventListener("resize",(function(){clearTimeout(n),n=setTimeout((function(){o()}),100)}))},exports.disableCaptions=function(e,t){for(var n=te(e).textTracks(),o=0;o<n.length;o++){var i=n[o];"subtitles"!==i.kind&&"captions"!==i.kind||i.id!==t||(i.mode="hidden")}},exports.disableControls=function(e){var t=document.getElementById(e),n=t.getElementsByClassName("vjs-control-bar")[0];n&&(n.style.visibility="hidden");var o=t.getElementsByClassName("vjs-big-play-button")[0];o&&(o.style.display="none");var i=t.getElementsByClassName("vjs-fullscreen-control")[0];i&&(i.style.display="none")},exports.dispose=function(e){var t=te(e);if(ne(),window._orientationChangeHandler&&(window.removeEventListener("resize",window._orientationChangeHandler),delete window._orientationChangeHandler),window._multiplayer_dbClickHandler&&(window.removeEventListener("dblclick",window._multiplayer_dbClickHandler),delete window._multiplayer_dbClickHandler),window._multiplayer_dbTapHandler&&(window.removeEventListener("touchend",window._multiplayer_dbTapHandler),delete window._multiplayer_dbTapHandler),window.onresize=null,t)t.dispose();else{var n=document.getElementById(e);n&&n.remove()}},exports.enableCaptions=function(e,t){for(var n=te(e).textTracks(),o=0;o<n.length;o++){var i=n[o];"subtitles"!==i.kind&&"captions"!==i.kind||i.id!=t||(i.mode="showing")}},exports.getCaptions=function(e){var t,n=te(e);return(null==n||null===(t=n.textTracks())||void 0===t?void 0:t.tracks_.filter((function(e){return"subtitles"==e.kind||"captions"===e.kind})))||[]},exports.getCurrentSeries=function(){return C},exports.getCurrentVideo=function(){return L},exports.getLinearChannelDetails=function(e,t){var n,o;return i({url:T()+a.getLinearChannelDetails,params:s(s(s(s(s({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===(n=window)||void 0===n||null===(o=n.customData)||void 0===o?void 0:o.entitlement),method:"GET",headers:{Authorization:t}})},exports.getPlayer=te,exports.getSeriesDetails=function(e,t){var n,o,r=JSON.parse(atob(t.split(".")[1])),l=(null==r?void 0:r.site)||null;return r&&r.countryCode,null!==(n=window)&&void 0!==n&&null!==(o=n.customData)&&void 0!==o&&o.seriesData?new Promise((function(e,t){var n,o;return e({data:null===(n=window)||void 0===n||null===(o=n.customData)||void 0===o?void 0:o.seriesData})})):i({url:T()+"/v3/content/series/".concat(e),params:{site:l},method:"GET",headers:{Authorization:t}})},exports.getSeriesWatchHistory=function(e){var t,n;if("v1"==((null===(t=window)||void 0===t||null===(n=t.watchHistory)||void 0===n?void 0:n.apiVersion)||"v1"))return i({method:"GET",url:p(),params:{site:null==e?void 0:e.siteOwner,version:"v2",seriesId:e.videoId},headers:{Authorization:e.token}});var o=e.videoId;return i({method:"GET",url:m(o),headers:{Authorization:e.token}})},exports.getSeriesWatchMap=function(){return P},exports.getSource=U,exports.getToken=_,exports.getVideoDetails=c,exports.getVideoIdx=function(){return W},exports.getVideoInfo=v,exports.handleError=O,exports.highlightVideo=function(e){l(document.querySelectorAll("[video-idx]")).map((function(t){var n=t.getAttribute("video-idx");t.style.border=n==e?"2px solid white":"none"}))},exports.impolicy16x9=function(e){return e?e+"?impolicy=resize&w=1920&h=1080":null},exports.initialiseAdvertisement=K,exports.initiateErrorHandling=ie,exports.isNotAValidSkin=function(e){return"live"!==e&&"carousel"!==e&&"V2"!==e&&"defaultV2"!==e&&"multiplayer"!==e},exports.isPaused=function(e){return t(e).paused()},exports.isPlayerInitialised=ee,exports.isTokenExpired=y,exports.load=function(e,t,n){var o,i,r;Y(t);var l=0,a=0;return null!==(o=window)&&void 0!==o&&o.watchHistory&&null!==(i=window)&&void 0!==i&&null!==(r=i.watchHistory)&&void 0!==r&&r.enable&&v(t,n).then((function(e){var t,n,o,i,r,d;null!==(t=window)&&void 0!==t&&null!==(n=t.watchHistory)&&void 0!==n&&n.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(null==e?void 0:e.data)),l=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,a=(null==e||null===(d=e.data)||void 0===d?void 0:d.watchedPercentage)||null})).catch((function(e){var t,n,o,i;null!==(t=window)&&void 0!==t&&null!==(n=t.watchHistory)&&void 0!==n&&n.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(e))})),new Promise((function(o,i){c(t,n).then((function(t){var n,r,d,s,u,c,v,m,p,g,I=null==t?void 0:t.data,f=(null==I||null===(n=I.video)||void 0===n||null===(r=n.streamingInfo)||void 0===r?void 0:r.isLiveStream)||!1;G(t.data);var E=(null==I||null===(d=I.ads)||void 0===d||null===(s=d.preRoll)||void 0===s||null===(u=s.adTags)||void 0===u||null===(c=u.web)||void 0===c?void 0:c.active)&&(null==I||null===(v=I.ads)||void 0===v||null===(m=v.preRoll)||void 0===m||null===(p=m.adTags)||void 0===p||null===(g=p.web)||void 0===g?void 0:g.url);E&&K(e,E,I);var w=U(I,e);if(w){var T,y,h,_,b,V,S,x,C,L,W,A,P,F,k=(null==I||null===(T=I.video)||void 0===T||null===(y=T.gist)||void 0===y?void 0:y.videoImageUrl)||(null==I||null===(h=I.video)||void 0===h||null===(_=h.gist)||void 0===_||null===(b=_.imageGist)||void 0===b?void 0:b.r16x9),R=te(e);if(R.poster(k),oe(e,w),R.on("loadstart",(function(){f&&o({status:!0,msg:"Video Loaded",response:I})})),R.on("loadeddata",(function(){D(),o({status:!0,msg:"Video Loaded",response:I})})),R.one("play",(function(){l&&a<95&&setTimeout((function(){R.currentTime(l)}),0)})),R.one("error",(function(){var e;i({status:!1,msg:(null==R||null===(e=R.error())||void 0===e?void 0:e.message)||"Some error occured"})})),(null==I||null===(V=I.video)||void 0===V||null===(S=V.contentDetails)||void 0===S||null===(x=S.closedCaptions)||void 0===x?void 0:x.length)>0||(null==I||null===(C=I.video)||void 0===C||null===(L=C.closedCaptions)||void 0===L?void 0:L.length)>0)W=((null==I||null===(A=I.video)||void 0===A||null===(P=A.contentDetails)||void 0===P?void 0:P.closedCaptions)||(null==I||null===(F=I.video)||void 0===F?void 0:F.closedCaptions)).filter((function(e){return"VTT"===e.format})),X(e,W);else!function(e){var t=te(e);t.remoteTextTracks().tracks_.map((function(e){"subtitles"==(null==e?void 0:e.kind)||null==e||e.kind,t.removeRemoteTextTrack(e)}))}(e)}else O(e,"Incompatible Source, only hls,mp4,drm content is allowed"),i("Incompatible Source, only hls,mp4,drm content is allowed")})).catch((function(n){ie(n,e,i,t)}))}))},exports.loadVideo=oe,exports.loadVideoInstantly=function(e,t,n){var o=te(e);return o.src(t),new Promise((function(e,t){var i=0;o.one("loadedmetadata",(function(){clearTimeout(i),e({status:!0,msg:"video loaded"})})),o.one("loadstart",(function(e){i=setTimeout((function(){t("FAILED: Took too long to load")}),n)}))}))},exports.parseHtmlString=function(e){var t=(new DOMParser).parseFromString(e,"text/html");return null==t?void 0:t.querySelector("body")},exports.parseSvgString=Z,exports.pause=function(e){t(e).pause()},exports.play=function(e){t(e).play()},exports.refreshTokenManager=h,exports.rewind=function(e,n){var o=t(e),i=o.currentTime(),r=i<=n?0:i-n;o.currentTime(r)},exports.saveWatchHistory=function(e,t,n){if("v1"==n){var o={siteOwner:null==e?void 0:e.siteOwner,userId:null==e?void 0:e.userId,videoId:null==e?void 0:e.videoId,watchedPercentage:null==e?void 0:e.watchedPercentage,watchedTime:null==e?void 0:e.watchedTime};return i({url:f(),method:"POST",headers:{Authorization:t,"x-api-key":e.xApiKey},params:{version:"v2"},data:JSON.stringify(o),withCredentials:!0})}if("v2"==n){var r=s({doneWatching:null==e?void 0:e.doneWatching,videoId:null==e?void 0:e.videoId,watchedPercentage:null==e?void 0:e.watchedPercentage,watchedTime:null==e?void 0:e.watchedTime},(null==e?void 0:e.seriesId)&&{seriesId:e.seriesId});return i({url:E(),method:"POST",headers:{Authorization:t},data:r,params:s({},(null==e?void 0:e.profileId)&&{profileId:null==e?void 0:e.profileId})})}},exports.setCurrentSeries=function(e){C=e},exports.setCurrentVideo=G,exports.setSeriesWatchMap=function(e){P=e},exports.setVideoIdx=q,exports.setVideoIdxById=Y,exports.skip=function(e,n){var o=t(e),i=o.currentTime()+n;o.currentTime(i)};
@@ -1 +0,0 @@
1
- "use strict";var e=require("./features-fb650b0b.js"),t=require("./icons-0f7b3404.js"),n=require("./generic-80bcbdc4.js"),l=require("./renditions-ce87e11e.js"),i=require("@babel/runtime/helpers/asyncToGenerator"),r=require("@babel/runtime/helpers/toConsumableArray"),o=require("@babel/runtime/regenerator"),a=require("./autoNextVideo-d1c8e1bf.js");require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/classCallCheck"),require("@babel/runtime/helpers/createClass"),require("@babel/runtime/helpers/inherits"),require("@babel/runtime/helpers/possibleConstructorReturn"),require("@babel/runtime/helpers/getPrototypeOf"),require("video.js"),require("./localisation-56e0a999.js"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("./util-9dc01a45.js");var d=n.getCurrentSeries(),u=[];null==d||d.map((function(e){return u.push.apply(u,r(e.episodes))}));var s=function(e,t){var l;null==t||null===(l=t.series)||void 0===l||l.cb;var i=n.getPlayer(e);i.on("timeupdate",(function(){var e,t=Math.floor(i.currentTime()),l=i.duration(),r=null===(e=document.getElementsByClassName("next-ep-preview"))||void 0===e?void 0:e[0];l-t<=10&&n.getVideoIdx()<=(null==u?void 0:u.length)-1?r&&(r.style.visibility="visible"):r&&(r.style.visibility="hidden")}));var r,o=u.filter((function(e,t){return t==n.getVideoIdx()}));if((null==o?void 0:o.length)>0)if(null!==(r=document.getElementsByClassName("next-ep-preview"))&&void 0!==r&&r[0]){var a,d,s,c,m,p,g,h,f,y,b;(null===(a=document.getElementsByClassName("next-ep-preview"))||void 0===a?void 0:a[0]).style.visibility="hidden";var x=null===(d=document.getElementsByClassName("next-ep-title"))||void 0===d?void 0:d[0],C=null===(s=document.getElementsByClassName("next-ep-img"))||void 0===s?void 0:s[0],w=null===(c=document.getElementsByClassName("next-ep-content"))||void 0===c?void 0:c[0],q=null===(m=o[0])||void 0===m?void 0:m.title;(null===(p=q)||void 0===p?void 0:p.length)>60&&(q=q.substr(0,60)+"..."),x.textContent="".concat(q),C.src=(null===(g=o[0])||void 0===g||null===(h=g.gist)||void 0===h||null===(f=h.imageGist)||void 0===f?void 0:f.r16x9)||(null===(y=window)||void 0===y||null===(b=y.customData)||void 0===b?void 0:b.fallbackImage),w.onclick=function(){return v(e,o)}}else{var j,E,N,B,V,k,S,P=document.createElement("div");P.className="next-ep-preview",P.style.visibility="hidden",document.getElementById(e).append(P);var I=document.createElement("div");I.className="next-ep-header",I.textContent="Next up";var M=null===(j=o[0])||void 0===j?void 0:j.title,T=document.createElement("img");T.className="next-ep-img",T.src=(null===(E=o[0])||void 0===E||null===(N=E.gist)||void 0===N||null===(B=N.imageGist)||void 0===B?void 0:B.r16x9)||(null===(V=window)||void 0===V||null===(k=V.customData)||void 0===k?void 0:k.fallbackImage);var R=document.createElement("div");R.className="next-ep-title",(null===(S=M)||void 0===S?void 0:S.length)>60&&(M=M.substr(0,60)+"..."),R.textContent="".concat(M);var O=document.createElement("div");O.className="next-ep-content",O.append(T),O.append(R),O.onclick=function(){return v(e,o)},P.append(I),P.append(O)}},v=function(){var e=i(o.mark((function e(t,l){var i,r,d,s;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.getToken();case 2:if(i=e.sent,r=n.getPlayer(t),d=Math.floor(r.currentTime()),Math.floor(r.duration())!=d){e.next=8;break}return e.abrupt("return");case 8:r.pause(t),s=n.getVideoIdx(),a.switchToNext(s,t,u,i);case 11:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();function c(t,i){var r=n.getPlayer(t);r.on("loadeddata",(function(){var o,a,d;(null===(o=l.getRenditions(t))||void 0===o?void 0:o.length)>0&&e.addSettingsButtonV2(t,i),(null===(a=n.getCaptions(t))||void 0===a?void 0:a.length)>0&&e.addCaptionButton(t,i),null!=i&&null!==(d=i.series)&&void 0!==d&&d.enable&&s(t,i),function(e,t){var n,l=Math.floor(e/60),i=null===(n=document.getElementsByClassName("vjs-progress-holder vjs-slider vjs-slider-horizontal"))||void 0===n?void 0:n[0];i&&(i.style.marginRight=l>60?"56px":"41px");var r=document.getElementsByClassName("vjs-live-control")[0],o=document.getElementsByClassName("vjs-time-control");t&&r.classList.value.includes("vjs-hidden")&&(o[0].style.display="block",i&&(i.style.marginRight="56px"))}(r.duration(),(null==i?void 0:i.liveVideo)||!1)})),r.one("play",(function(){var n,l,i,r;null!==(n=window)&&void 0!==n&&null!==(l=n.customData)&&void 0!==l&&l.iframeOverlayUrl&&e.addOutputtingOverlay(t,null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r?void 0:r.iframeOverlayUrl)}))}exports.initialiseSkin=function(l,i){!function(){"Chrome"==n.detectBrowser()&&Promise.resolve().then((function(){return require("./chromett-f925fb6c.js")})).then((function(e){var t=document.createElement("style");t.id="chromett",t.append("".concat(e.default)),document.head.appendChild(t)}));Promise.resolve().then((function(){return require("./skin-921d35a8.js")})).then((function(e){var t=document.createElement("style");t.id="default_v2",t.append("".concat(e.default)),document.head.appendChild(t)}))}(),c(l,i),function(e,l){var i=n.getPlayer(e);i.controlBar.getChild("FullscreenToggle").el().appendChild(n.createIconMarkup(t.MinimizeSvg(window.controlsColor))),i.controlBar.getChild("FullscreenToggle").el().appendChild(n.createIconMarkup(t.MaximizeSvg(window.controlsColor)));var r=document.getElementsByClassName("vjs-time-control");l.liveVideo&&(r[0].style.display="none")}(l,i),function(n,l){var i,r,o,a,d,u;0==(null==l?void 0:l.liveVideo)&&0==(null==l?void 0:l.liveui)&&e.addSkipButton(n,"defaultV2",t.SkipSvgV2());(0==(null==l?void 0:l.liveVideo)&&0==(null==l?void 0:l.liveui)||1==(null==l?void 0:l.liveui))&&e.addRewindButton(n,"defaultV2",t.RewindSvgV2());l.liveVideo||e.addSlowMotion(n);(null==l||null===(i=l.relatedVideos)||void 0===i||null===(r=i.content)||void 0===r?void 0:r.length)>0&&e.addVideoSelector(n,null==l?void 0:l.relatedVideos);(null==l||null===(o=l.streams)||void 0===o?void 0:o.length)>1&&e.addMulticamSelector(n,null==l?void 0:l.streams);(null==l||null===(a=l.playlist)||void 0===a||null===(d=a.content)||void 0===d?void 0:d.length)>0&&e.addPlaylistSelector(n,null==l?void 0:l.playlist);null!=l&&null!==(u=l.series)&&void 0!==u&&u.enable&&e.addSeriesSelectorV2(n,l)}(l,i),function(e,t){var l=n.getPlayer(e),i=null==t?void 0:t.tvProviderLogoUrl;if(!i)return;var r=document.createElement("div");r.className="tvProviderImage";var o=document.createElement("img");o.src="".concat(i),o.alt="Provider Image",r.append(o),l.el().appendChild(r),l.on("useractive",(function(){r.classList.remove("vjs-fade")})),l.on("userinactive",(function(){l.paused()||r.classList.add("vjs-fade")})),l.on("fullscreenchange",(function(){l.isFullscreen_?r.style.top="3.2rem":r.style.top="1rem"}))}(l,i)};
@@ -1 +0,0 @@
1
- import n from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/regenerator";import{a as e,q as r,P as o,e as a,Q as i,g as c,O as s,R as u}from"./generic-47799913.js";import{a as f}from"./util-1dd072f8.js";var l,m=0,p=0,h=function(){var h=n(t.mark((function n(h){var b,g,T;return t.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return clearTimeout(m),b=null==h?void 0:h.content,l=null==h?void 0:h.cb,g=h.playerId,n.next=6,c();case 6:T=n.sent,f(g,(function(){var n=e(g);0!==(null==n?void 0:n.currentTime())&&((p=s())>b.length-1||r(g,b[p].id,T).then((function(n){o(p),a(n.response),p++,u(p),d(n)})).catch((function(n){d(n),o(p),p++,u(p),m=setTimeout((function(){i(g)&&v(p,g,b,T)}),5e3)})))}));case 8:case"end":return n.stop()}}),n)})));return function(n){return h.apply(this,arguments)}}(),v=function n(t,e,a,i,c){p=t,t>a.length-1||r(e,a[t].id,i).then((function(n){o(p),p++,u(p),d(n)})).catch((function(t){d(t),setTimeout((function(){o(p),p++,u(p),n(p,e,a,i)}),5e3)}))},d=function(n){l&&l(n)};export{h as a,v as s};
@@ -1 +0,0 @@
1
- import e from"@babel/runtime/helpers/defineProperty";import n from"video.js";import t from"@babel/runtime/helpers/asyncToGenerator";import o from"@babel/runtime/regenerator";import i from"axios";import"js-cookie";import r from"ua-parser-js";import a from"@babel/runtime/helpers/toConsumableArray";var l={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"};function d(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 s(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?d(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):d(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var u={name:"@viewlift/player-backup",version:"1.0.59",main:"dist/bundle.cjs.js",amdName:"_playerCore",dependencies:{"@silvermine/videojs-airplay":"^1.2.0","@silvermine/videojs-chromecast":"^1.4.1",axios:"^1.2.3","js-cookie":"^3.0.5","video.js":"^7.20.3","videojs-contrib-ads":"^6.9.0","videojs-contrib-dash":"^5.1.1","videojs-contrib-eme":"^3.11.1","videojs-ima":"^2.1.0"}},c=function(e,n){var t,o,r,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})})):i({url:_(),params:s({id:e,deviceType:"web_browser",contentConsumption:"web"},null===(r=window)||void 0===r||null===(a=r.customData)||void 0===a?void 0:a.entitlement),method:"GET",headers:{Authorization:n,"Sdk-Version":u.version},withCredentials:!0})},v=function(e,n){var t,o;return i({url:b()+l.getLinearChannelDetails,params:s(s(s(s(s({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===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.entitlement),method:"GET",headers:{Authorization:n}})},m=function(e,n){var t,o,r=JSON.parse(atob(n.split(".")[1])),a=(null==r?void 0:r.site)||null;return r&&r.countryCode,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})})):i({url:b()+"/v3/content/series/".concat(e),params:{site:a},method:"GET",headers:{Authorization:n}})},p=function(e,n,t){if("v1"==t){var o={siteOwner:null==e?void 0:e.siteOwner,userId:null==e?void 0:e.userId,videoId:null==e?void 0:e.videoId,watchedPercentage:null==e?void 0:e.watchedPercentage,watchedTime:null==e?void 0:e.watchedTime};return i({url:y(),method:"POST",headers:{Authorization:n,"x-api-key":e.xApiKey},params:{version:"v2"},data:JSON.stringify(o),withCredentials:!0})}if("v2"==t){var r=s({doneWatching:null==e?void 0:e.doneWatching,videoId:null==e?void 0:e.videoId,watchedPercentage:null==e?void 0:e.watchedPercentage,watchedTime:null==e?void 0:e.watchedTime},(null==e?void 0:e.seriesId)&&{seriesId:e.seriesId});return i({url:h(),method:"POST",headers:{Authorization:n},data:r,params:s({},(null==e?void 0:e.profileId)&&{profileId:null==e?void 0:e.profileId})})}},I=function(e,n){var t,o,r=(null===(t=window)||void 0===t||null===(o=t.watchHistory)||void 0===o?void 0:o.apiVersion)||"v1";if("v1"==r){var a,l,d=JSON.parse(atob(n.split(".")[1])),s=(null==d?void 0:d.site)||null;return i({method:"GET",url:w(e),params:{site:s},headers:{Authorization:n,"x-api-key":null===(a=window)||void 0===a||null===(l=a.watchHistory)||void 0===l?void 0:l.xApiKey}})}if("v2"==r){var u,c;JSON.parse(atob(n.split(".")[1]));var v=window.contentType;return i({method:"GET",url:T(e,v),headers:{Authorization:n,"x-api-key":null===(u=window)||void 0===u||null===(c=u.watchHistory)||void 0===c?void 0:c.xApiKey}})}},g=function(e){var n,t;if("v1"==((null===(n=window)||void 0===n||null===(t=n.watchHistory)||void 0===t?void 0:t.apiVersion)||"v1"))return i({method:"GET",url:E(),params:{site:null==e?void 0:e.siteOwner,version:"v2",seriesId:e.videoId},headers:{Authorization:e.token}});var o=e.videoId;return i({method:"GET",url:f(o),headers:{Authorization:e.token}})},f=function(e){return b()+"".concat(null==l?void 0:l.getSeriesWatchHistoryV2,"/").concat(e)},E=function(){return b()+"".concat(null==l?void 0:l.getSeriesWatchHistoryV1)},w=function(e){return b()+"".concat(null==l?void 0:l.getVideoInfoV1,"/").concat(e)},T=function(e,n){return b()+"".concat(null==l?void 0:l.getVideoInfoV2,"/").concat(n,"/").concat(e)},y=function(){return b()+"".concat(null==l?void 0:l.saveWatchHistoryV1)},h=function(){return b()+"".concat(null==l?void 0:l.saveWatchHistoryV2)},_=function(){return b()+"".concat(null==l?void 0:l.getVideoDetails)},b=function(){var e;return(null===(e=window)||void 0===e?void 0:e.playerEntitlementUrl)||(null==l?void 0:l.apiBaseUrl)},O=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};function D(){var e=null;return{set:function(n){n&&(e=n)},get:function(){return e}}}var V=function(){var e=t(o.mark((function e(){var n;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=sessionStorage.getItem("vlp_token"))||!O(n)){e.next=5;break}return e.abrupt("return",L().then((function(e){var t,o,i=null==e||null===(t=e.data)||void 0===t?void 0:t.authorizationToken,r=null==e||null===(o=e.data)||void 0===o?void 0:o.refreshToken;return i&&sessionStorage.setItem("vlp_token",i),r&&D().set(r),i||n})).catch((function(e){return console.log("Error fetching refresh token",e),n})));case 5:return e.abrupt("return",n);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),L=function(){var e=D().get(),n=b();return i({method:"GET",url:n+"/identity/refresh/".concat(e)})},S=function(e,n){if(import("./error-2395864b.js").then((function(e){var n=document.createElement("style");n.id="errorblock",n.append("".concat(e.default)),document.head.appendChild(n)})),document.getElementsByClassName("error-container")[0]){var t=document.getElementsByClassName("error-message")[0];t&&(t.innerHTML="".concat(n))}else{var o=document.getElementById(e),i=document.createElement("div");i.className="error-container";var r=document.createElement("div");r.className="error-message",r.innerHTML="".concat(n),i.appendChild(r),o.append(i)}},C=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var W=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"};function A(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 F(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?A(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):A(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}window._deviceInfo=r(navigator.userAgent);var R,P,N,k,j,x=function(e,n){return e&&n?"".concat(e,"x").concat(n):e>1024?"L":e>768?"M":"S"},B=function(e){var n=U(e,"video.tags",[]),t=U(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return n.length>0?n.map((function(e){return e.title})).join(","):t},U=function(e,n,t){for(var o=0,i=(n=n.split(".")).length;o<i;o++){var r;e=null===(r=e)||void 0===r?void 0:r[n[o]]}return e||t},H=function(){return!!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},M=function(){var e,n,t,o,i,r,a,l,d,s,u,c,v=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",m=arguments.length>1?arguments[1]:void 0,p=arguments.length>2?arguments[2]:void 0,I=null==p||null===(e=p.video)||void 0===e?void 0:e.metadata,g=Ve(m);if(!v.includes("VIEWLIFT_"))return v;var f=window.getComputedStyle(document.getElementById(m),null),E=Math.trunc(f.getPropertyValue("height").slice(0,-2)),w=Math.trunc(f.getPropertyValue("width").slice(0,-2)),T=U(p,"video.gist.id",""),y=F(F({},z(I)),{},{VIEWLIFT_WIDTH:w,VIEWLIFT_HEIGHT:E,VIEWLIFT_SIZE:x(w,E),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===(n=window)||void 0===n?void 0:n.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:navigator.userAgent,VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:U(p,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:U(p,"video.gist.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:U(p,"video.gist.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==g||null===(t=g.options_)||void 0===t?void 0:t.autoplay)||1,VIEWLIFT_MUTE:(null==g||null===(o=g.options_)||void 0===o?void 0:o.autoplay)||0,VIEWLIFT_DEVICE_ID:localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_KEYWORDS:B(p),VIEWLIFT_MEDIA_ID:T,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(U(p,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:T,VIEWLIFT_VIDEO_URL:encodeURI(window.location.host+U(p,"video.gist.permalink","")),VIEWLIFT_COPPA:U(null===(i=window)||void 0===i||null===(r=i.app_data)||void 0===r||null===(a=r.site)||void 0===a?void 0:a.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR:U(null===(l=window)||void 0===l||null===(d=l.app_data)||void 0===d||null===(s=d.site)||void 0===s?void 0:s.settings,"compliance.gdpr")?1:0,VIEWLIFT_CONTENT_DURATION_MS:1e3*U(p,"video.gist.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:U(p,"video.gist.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:T,VIEWLIFT_CONTENT_TITLE:U(p,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),VIEWLIFT_CONTENT_SERIES_TITLE:U(p,"video.series[0].gist.title",U(p,"seriesInfo.title","VIEWLIFT_CONTENT_SERIES_TITLE")),VIEWLIFT_CONTENT_EPISODE:U(p,"video.currentEpisode","VIEWLIFT_CONTENT_EPISODE"),VIEWLIFT_CONTENT_SEASON:U(p,"video.currentSeason","VIEWLIFT_CONTENT_SEASON"),VIEWLIFT_CONTENT_GENRE:U(p,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER"},null===(u=window)||void 0===u||null===(c=u.customData)||void 0===c?void 0:c.macros);for(var h in y){var _=new RegExp("\\b("+h+")\\b","g");v=v.replace(_,y[h])}return v},z=function(e){var n,t,o,i,r,a,l={},d=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map((function(e){d.set(e.name,e.value)})));var s=(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,u=(null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(a=r.subscription)||void 0===a?void 0:a.TVE)||!1;return s||u?(H()?s?l=F(F({},l),{},{VIEWLIFT_CSID:d.get("csid.mweb.dtc")||""}):u&&(l=F(F({},l),{},{VIEWLIFT_CSID:d.get("csid.mweb.tve")||""})):s?l=F(F({},l),{},{VIEWLIFT_CSID:d.get("csid.web.dtc")||""}):u&&(l=F(F({},l),{},{VIEWLIFT_CSID:d.get("csid.web.tve")||""})),s?l=F(F({},l),{},{VIEWLIFT_SFID:d.get("sfid.dtc")||""}):u&&(l=F(F({},l),{},{VIEWLIFT_SFID:d.get("sfid.tve")||""})),l=H()?F(F({},l),{},{VIEWLIFT_PROF:d.get("prof.mweb")||""}):F(F({},l),{},{VIEWLIFT_PROF:d.get("prof.web")||""})):(l=F(F({},l),{},{VIEWLIFT_SFID:d.get("sfid.dtc")||""}),l=H()?F(F({},l),{},{VIEWLIFT_CSID:d.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:d.get("prof.mweb")||""}):F(F({},l),{},{VIEWLIFT_CSID:d.get("csid.web.dtc")||"",VIEWLIFT_PROF:d.get("prof.web")||""})),l},G=function(e,n){var t,o,i,r,a,l,d,s,u,c,v,m,p,I=(null==e?void 0:e.contentType)||"video",g=null==e||null===(t=e[I])||void 0===t?void 0:t.drmEnabled,f=null==e||null===(o=e[I])||void 0===o||null===(i=o.streamingInfo)||void 0===i?void 0:i.videoAssets,E=null==e||null===(r=e[I])||void 0===r||null===(a=r.streamingInfo)||void 0===a?void 0:a.audioAssets,w=(null==e||null===(l=e[I])||void 0===l||null===(d=l.streamingInfo)||void 0===d||null===(s=d.videoAssets)||void 0===s?void 0:s.hls)||!1;null==e||null===(u=e[I])||void 0===u||null===(c=u.liveDetails)||void 0===c||c.isDvrEnabled;var T=(null==e||null===(v=e[I])||void 0===v||null===(m=v.streamingInfo)||void 0===m||null===(p=m.videoAssets)||void 0===p?void 0:p.dash)||!1;if(null!=e&&e.audioAssetSource&&null!=E&&E.hls)return Y(E);if(g){var y=J(f,n);return y.src=M(y.src,n,e),y}if("Safari"!==W()&&T)return q(f);if(w){var h=Y(f);return h.src=M(h.src,n,e),h}if(null!=f&&f.mpeg){var _=function(e){var n=null==e?void 0:e.mpeg;return{src:n[n.length-1].url,type:"video/mp4"}}(f);return _.src=M(_.src,n,e),_}return null},q=function(e){var n=null==e?void 0:e.dash;return n?{src:n,type:"application/dash+xml"}:null},Y=function(e){var n=null==e?void 0:e.hls;return n?{src:n,type:"application/x-mpegURL"}:null},J=function(e,t){var o=e.fairPlay,i=e.widevine,r=e.playReady,a=W(),l=Ve(t);if("Safari"===a){var d=function(e){var t=e.url;return{src:t,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(t,o){var i={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};n.xhr(i,(function(e,n,t){console.log(e),e&&o(e),o(null,new Uint8Array(t))}))},getContentId:function(e,n){if(n)return new TextDecoder("utf-16").decode(n.slice(16))},getLicense:function(t,o,i,r){var a={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:i,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};n.xhr(a,(function(e,n,t){console.log(e),e&&r(e),r(null,t)}))}}}}}(o);try{l.eme()}catch(e){console.log("EME ERROR :",e)}return d}var s,u={src:i.url,type:"application/dash+xml"};return"caliente"==(null===(s=window)||void 0===s?void 0:s.siteName)?(l.eme(),u.keySystems={"com.widevine.alpha":{url:i.licenseUrl,licenseHeaders:{"X-AxDRM-Message":i.licenseToken}},"com.microsoft.playready":{url:r.licenseUrl,licenseHeaders:{"X-AxDRM-Message":r.licenseToken}}}):(u.keySystemOptions=[],u.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:i.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":i.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),u.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:r.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":r.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})),u};var X=function(e){P=e},K=function(){return P},Q=function(e){R=e},Z=function(){return R},$=function(){return N},ee=function(e){N=e},ne=function(e){j=e},te=function(){return j},oe=function(e){k=new Map,e.map((function(e,n){k.set(e.id,n)}))},ie=function(e){if(k){var n=k.get(e);ee(n+1)}},re=function(e,n){for(var t=Ve(e).textTracks(),o=0;o<t.length;o++){var i=t[o];"subtitles"!==i.kind&&"captions"!==i.kind||i.id!=n||(i.mode="showing")}},ae=function(e,n){for(var t=Ve(e).textTracks(),o=0;o<t.length;o++){var i=t[o];"subtitles"!==i.kind&&"captions"!==i.kind||i.id!==n||(i.mode="hidden")}},le=function(e){var n,t=Ve(e);return(null==t||null===(n=t.textTracks())||void 0===n?void 0:n.tracks_.filter((function(e){return"subtitles"==e.kind||"captions"===e.kind})))||[]},de=function(e,n){var t=Ve(e);t.remoteTextTracks().tracks_.map((function(e){t.removeRemoteTextTrack(e)})),n.map((function(e){t.addRemoteTextTrack({src:e.url,srcLang:e.language,label:e.language})}))},se=!1,ue=function(e,n,t){var o=M(n,e,t),i=Ve(e);n&&window.google&&(i.ima.initializeAdDisplayContainer&&i.ima.initializeAdDisplayContainer(),function(e,n){var t,o,i,r=Ve(e);if(null!==r.el_){se=!0;var a={id:e,adTagUrl:"".concat(n,"&vid=").concat(window.videoId,"&url=").concat(window.location.href,"&correlator=").concat((new Date).getTime(),"&cust_params=sd%3D60000%26site%3D").concat(window.location.origin,"%26autostart%3D%26mute%3D%26user_agent%3D%26keyword%3D%26category%3D").concat(window.category,"%26vid%3D").concat(window.videoId),adLabel:"Your video will resume after this sponsor message"};r.ima.initializeAdDisplayContainer&&r.ima.initializeAdDisplayContainer(),se&&null!==r.el_&&("function"==typeof r.ima?r.ima(a):setTimeout((function(){r.ima.setContentWithAdTag(null,n,!0),r.ima.requestAds()}),1e3));var l=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&l.hasAttribute("controls")&&l.removeAttribute("controls");var d="click",s=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(s=!0,d="touchend"),r.one(d,(function(){s&&r.ima.initializeAdDisplayContainer()}));var u=(null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o||null===(i=o.ads)||void 0===i?void 0:i.adEventHandler)||null;r.one("ads-ad-started",(function(){u&&u({status:"STARTED",msg:"Advertisement Started"})})),r.one("ads-manager",(function(e){e.adsManager.addEventListener(google.ima.AdEvent.Type.COMPLETE,(function(){u&&u({status:"ENDED",msg:"Advertisement Ended"})}))})),r.on("adserror",(function(e){u&&u({status:"ERROR",msg:"Advertisement Error"})}))}}(e,o))},ce=function(e){return"live"!==e&&"carousel"!==e&&"V2"!==e&&"defaultV2"!==e&&"multiplayer"!==e},ve=function(e){var n=(new DOMParser).parseFromString(e,"text/html");return null==n?void 0:n.querySelector("body")},me=function(e){var n=(new DOMParser).parseFromString(e,"image/svg+xml");return null==n?void 0:n.querySelector("svg")},pe=function(e){return me(e)},Ie=function(e){a(document.querySelectorAll("[video-idx]")).map((function(n){var t=n.getAttribute("video-idx");n.style.border=t==e?"2px solid white":"none"}))},ge=function(){var e=a(document.getElementsByClassName("vjs-control vjs-button open"));null==e||e.map((function(e){var n,t;null==e||null===(n=e.childNodes)||void 0===n||null===(t=n[0])||void 0===t||t.click()}))},fe=function(e){return e?e+"?impolicy=resize&w=1920&h=1080":null},Ee="",we=function(e,n){var t,o=function(){return function(e,n){var t=window.matchMedia("(orientation: portrait)").matches?"potrait":"landscape";if(Ee!==t){var o=window.getComputedStyle(document.getElementById(e),null).getPropertyValue("height");n&&(n.style.height="".concat(o)),Ee=t}}(e,n)};window._orientationChangeHandler=o;window.addEventListener("resize",(function(){clearTimeout(t),t=setTimeout((function(){o()}),100)}))};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}var ye=function(e){n(e).play()},he=function(e){n(e).pause()},_e=function(e,t){var o=n(e),i=o.currentTime()+t;o.currentTime(i)},be=function(e,t){var o=n(e),i=o.currentTime(),r=i<=t?0:i-t;o.currentTime(r)},Oe=function(e){return!!n.getPlayer("".concat(e))},De=function(e){return n(e).paused()},Ve=function(e){return!!n.getPlayer("".concat(e))&&n.getPlayer("".concat(e))},Le=function(e,n,t){var o,i,r;ie(n);var a=0,l=0;return null!==(o=window)&&void 0!==o&&o.watchHistory&&null!==(i=window)&&void 0!==i&&null!==(r=i.watchHistory)&&void 0!==r&&r.enable&&I(n,t).then((function(e){var n,t,o,i,r,d;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(null==e?void 0:e.data)),a=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,l=(null==e||null===(d=e.data)||void 0===d?void 0:d.watchedPercentage)||null})).catch((function(e){var n,t,o,i;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(e))})),new Promise((function(o,i){c(n,t).then((function(n){var t,r,d,s,u,c,v,m,p,I,g=null==n?void 0:n.data,f=(null==g||null===(t=g.video)||void 0===t||null===(r=t.streamingInfo)||void 0===r?void 0:r.isLiveStream)||!1;X(n.data);var E=(null==g||null===(d=g.ads)||void 0===d||null===(s=d.preRoll)||void 0===s||null===(u=s.adTags)||void 0===u||null===(c=u.web)||void 0===c?void 0:c.active)&&(null==g||null===(v=g.ads)||void 0===v||null===(m=v.preRoll)||void 0===m||null===(p=m.adTags)||void 0===p||null===(I=p.web)||void 0===I?void 0:I.url);E&&ue(e,E,g);var w=G(g,e);if(w){var T,y,h,_,b,O,D,V,L,W,A,F,R,P,N=(null==g||null===(T=g.video)||void 0===T||null===(y=T.gist)||void 0===y?void 0:y.videoImageUrl)||(null==g||null===(h=g.video)||void 0===h||null===(_=h.gist)||void 0===_||null===(b=_.imageGist)||void 0===b?void 0:b.r16x9),k=Ve(e);if(k.poster(N),Ae(e,w),k.on("loadstart",(function(){f&&o({status:!0,msg:"Video Loaded",response:g})})),k.on("loadeddata",(function(){C(),o({status:!0,msg:"Video Loaded",response:g})})),k.one("play",(function(){a&&l<95&&setTimeout((function(){k.currentTime(a)}),0)})),k.one("error",(function(){var e;i({status:!1,msg:(null==k||null===(e=k.error())||void 0===e?void 0:e.message)||"Some error occured"})})),(null==g||null===(O=g.video)||void 0===O||null===(D=O.contentDetails)||void 0===D||null===(V=D.closedCaptions)||void 0===V?void 0:V.length)>0||(null==g||null===(L=g.video)||void 0===L||null===(W=L.closedCaptions)||void 0===W?void 0:W.length)>0)A=((null==g||null===(F=g.video)||void 0===F||null===(R=F.contentDetails)||void 0===R?void 0:R.closedCaptions)||(null==g||null===(P=g.video)||void 0===P?void 0:P.closedCaptions)).filter((function(e){return"VTT"===e.format})),de(e,A);else!function(e){var n=Ve(e);n.remoteTextTracks().tracks_.map((function(e){"subtitles"==(null==e?void 0:e.kind)||null==e||e.kind,n.removeRemoteTextTrack(e)}))}(e)}else S(e,"Incompatible Source, only hls,mp4,drm content is allowed"),i("Incompatible Source, only hls,mp4,drm content is allowed")})).catch((function(t){Fe(t,e,i,n)}))}))},Se=function(e,n,t){var o=Ve(e);return o.src(n),new Promise((function(e,n){var i=0;o.one("loadedmetadata",(function(){clearTimeout(i),e({status:!0,msg:"video loaded"})})),o.one("loadstart",(function(e){i=setTimeout((function(){n("FAILED: Took too long to load")}),t)}))}))},Ce=function(e){var n=Ve(e);if(We(),window._orientationChangeHandler&&(window.removeEventListener("resize",window._orientationChangeHandler),delete window._orientationChangeHandler),window._multiplayer_dbClickHandler&&(window.removeEventListener("dblclick",window._multiplayer_dbClickHandler),delete window._multiplayer_dbClickHandler),window._multiplayer_dbTapHandler&&(window.removeEventListener("touchend",window._multiplayer_dbTapHandler),delete window._multiplayer_dbTapHandler),window.onresize=null,n)n.dispose();else{var t=document.getElementById(e);t&&t.remove()}},We=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()},Ae=function(e,n){Ve(e).src(n)},Fe=function(n,t,o,i){var r,a,l,d,s,u,c=null==n||null===(r=n.response)||void 0===r||null===(a=r.data)||void 0===a?void 0:a.errorCode,v=(null==n||null===(l=n.response)||void 0===l||null===(d=l.data)||void 0===d?void 0:d.errorMessage)||(null==n?void 0:n.message);Oe(t)&&S(t,(null===(s=window)||void 0===s?void 0:s.customErrors)&&(null===(u=window)||void 0===u?void 0:u.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?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}({status:!1,response:n,msg:"".concat(v)},i&&{videoId:i}))},Re=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 i=n.getElementsByClassName("vjs-fullscreen-control")[0];i&&(i.style.display="none")};export{O as A,ce as B,m as C,c as D,Fe as E,v as F,I as G,fe as H,ue as I,de as J,Q as K,me as L,pe as M,Z as N,$ as O,Ie as P,De as Q,ee as R,ve as S,ge as T,we as U,oe as V,ie as W,Ve as a,K as b,C as c,W as d,X as e,te as f,V as g,S as h,g as i,ne as j,_e as k,Se as l,he as m,Ae as n,Oe as o,ye as p,Le as q,be as r,p as s,Ce as t,re as u,ae as v,le as w,G as x,Re as y,D as z};
@@ -1 +0,0 @@
1
- import{i as e,j as t,k as l,g as n,h as i,d as o,l as a,m as r,n as s,o as d}from"./features-b654970e.js";import{M as u,a as v,c as m,d as c}from"./icons-c2efba97.js";import{N as p,a as f,O as g,g as h,w as y,M as b,d as C}from"./generic-47799913.js";import{g as x}from"./renditions-f4b80506.js";import j from"@babel/runtime/helpers/asyncToGenerator";import E from"@babel/runtime/helpers/toConsumableArray";import w from"@babel/runtime/regenerator";import{s as N}from"./autoNextVideo-7ba2d233.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"video.js";import"./localisation-0bf399a1.js";import"axios";import"js-cookie";import"ua-parser-js";import"./util-1dd072f8.js";var B=p(),k=[];null==B||B.map((function(e){return k.push.apply(k,E(e.episodes))}));var V=function(e,t){var l;null==t||null===(l=t.series)||void 0===l||l.cb;var n=f(e);n.on("timeupdate",(function(){var e,t=Math.floor(n.currentTime()),l=n.duration(),i=null===(e=document.getElementsByClassName("next-ep-preview"))||void 0===e?void 0:e[0];l-t<=10&&g()<=(null==k?void 0:k.length)-1?i&&(i.style.visibility="visible"):i&&(i.style.visibility="hidden")}));var i,o=k.filter((function(e,t){return t==g()}));if((null==o?void 0:o.length)>0)if(null!==(i=document.getElementsByClassName("next-ep-preview"))&&void 0!==i&&i[0]){var a,r,s,d,u,v,m,c,p,h,y;(null===(a=document.getElementsByClassName("next-ep-preview"))||void 0===a?void 0:a[0]).style.visibility="hidden";var b=null===(r=document.getElementsByClassName("next-ep-title"))||void 0===r?void 0:r[0],C=null===(s=document.getElementsByClassName("next-ep-img"))||void 0===s?void 0:s[0],x=null===(d=document.getElementsByClassName("next-ep-content"))||void 0===d?void 0:d[0],j=null===(u=o[0])||void 0===u?void 0:u.title;(null===(v=j)||void 0===v?void 0:v.length)>60&&(j=j.substr(0,60)+"..."),b.textContent="".concat(j),C.src=(null===(m=o[0])||void 0===m||null===(c=m.gist)||void 0===c||null===(p=c.imageGist)||void 0===p?void 0:p.r16x9)||(null===(h=window)||void 0===h||null===(y=h.customData)||void 0===y?void 0:y.fallbackImage),x.onclick=function(){return M(e,o)}}else{var E,w,N,B,V,I,P,T=document.createElement("div");T.className="next-ep-preview",T.style.visibility="hidden",document.getElementById(e).append(T);var D=document.createElement("div");D.className="next-ep-header",D.textContent="Next up";var L=null===(E=o[0])||void 0===E?void 0:E.title,O=document.createElement("img");O.className="next-ep-img",O.src=(null===(w=o[0])||void 0===w||null===(N=w.gist)||void 0===N||null===(B=N.imageGist)||void 0===B?void 0:B.r16x9)||(null===(V=window)||void 0===V||null===(I=V.customData)||void 0===I?void 0:I.fallbackImage);var F=document.createElement("div");F.className="next-ep-title",(null===(P=L)||void 0===P?void 0:P.length)>60&&(L=L.substr(0,60)+"..."),F.textContent="".concat(L);var G=document.createElement("div");G.className="next-ep-content",G.append(O),G.append(F),G.onclick=function(){return M(e,o)},T.append(D),T.append(G)}},M=function(){var e=j(w.mark((function e(t,l){var n,i,o,a;return w.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,h();case 2:if(n=e.sent,i=f(t),o=Math.floor(i.currentTime()),Math.floor(i.duration())!=o){e.next=8;break}return e.abrupt("return");case 8:i.pause(t),a=g(),N(a,t,k,n);case 11:case"end":return e.stop()}}),e)})));return function(t,l){return e.apply(this,arguments)}}();function I(n,i){var o=f(n);o.on("loadeddata",(function(){var l,a,r;(null===(l=x(n))||void 0===l?void 0:l.length)>0&&e(n,i),(null===(a=y(n))||void 0===a?void 0:a.length)>0&&t(n,i),null!=i&&null!==(r=i.series)&&void 0!==r&&r.enable&&V(n,i),function(e,t){var l,n=Math.floor(e/60),i=null===(l=document.getElementsByClassName("vjs-progress-holder vjs-slider vjs-slider-horizontal"))||void 0===l?void 0:l[0];i&&(i.style.marginRight=n>60?"56px":"41px");var o=document.getElementsByClassName("vjs-live-control")[0],a=document.getElementsByClassName("vjs-time-control");t&&o.classList.value.includes("vjs-hidden")&&(a[0].style.display="block",i&&(i.style.marginRight="56px"))}(o.duration(),(null==i?void 0:i.liveVideo)||!1)})),o.one("play",(function(){var e,t,i,o;null!==(e=window)&&void 0!==e&&null!==(t=e.customData)&&void 0!==t&&t.iframeOverlayUrl&&l(n,null===(i=window)||void 0===i||null===(o=i.customData)||void 0===o?void 0:o.iframeOverlayUrl)}))}function P(e,t){!function(){"Chrome"==C()&&import("./chromett-a3cbb2e1.js").then((function(e){var t=document.createElement("style");t.id="chromett",t.append("".concat(e.default)),document.head.appendChild(t)}));import("./skin-3470b8fa.js").then((function(e){var t=document.createElement("style");t.id="default_v2",t.append("".concat(e.default)),document.head.appendChild(t)}))}(),I(e,t),function(e,t){var l=f(e);l.controlBar.getChild("FullscreenToggle").el().appendChild(b(u(window.controlsColor))),l.controlBar.getChild("FullscreenToggle").el().appendChild(b(v(window.controlsColor)));var n=document.getElementsByClassName("vjs-time-control");t.liveVideo&&(n[0].style.display="none")}(e,t),function(e,t){var l,u,v,p,f,g;0==(null==t?void 0:t.liveVideo)&&0==(null==t?void 0:t.liveui)&&n(e,"defaultV2",m());(0==(null==t?void 0:t.liveVideo)&&0==(null==t?void 0:t.liveui)||1==(null==t?void 0:t.liveui))&&i(e,"defaultV2",c());t.liveVideo||o(e);(null==t||null===(l=t.relatedVideos)||void 0===l||null===(u=l.content)||void 0===u?void 0:u.length)>0&&a(e,null==t?void 0:t.relatedVideos);(null==t||null===(v=t.streams)||void 0===v?void 0:v.length)>1&&r(e,null==t?void 0:t.streams);(null==t||null===(p=t.playlist)||void 0===p||null===(f=p.content)||void 0===f?void 0:f.length)>0&&s(e,null==t?void 0:t.playlist);null!=t&&null!==(g=t.series)&&void 0!==g&&g.enable&&d(e,t)}(e,t),function(e,t){var l=f(e),n=null==t?void 0:t.tvProviderLogoUrl;if(!n)return;var i=document.createElement("div");i.className="tvProviderImage";var o=document.createElement("img");o.src="".concat(n),o.alt="Provider Image",i.append(o),l.el().appendChild(i),l.on("useractive",(function(){i.classList.remove("vjs-fade")})),l.on("userinactive",(function(){l.paused()||i.classList.add("vjs-fade")})),l.on("fullscreenchange",(function(){l.isFullscreen_?i.style.top="3.2rem":i.style.top="1rem"}))}(e,t)}export{P as initialiseSkin};